T.R | Title | User | Personal Name | Date | Lines |
---|
1279.1 | how to put up the watch cursor | PSW::WINALSKI | Meetings are our most important product | Tue Aug 15 1989 16:08 | 28 |
| #include <decw$cursor.h>
#define cursor_font_name "decw$cursor"
Cursor wait_cursor; /* cursor ID of wait cursor */
Font cursor_font;
/* Set up the wait cursor */
cursor_font = XLoadFont(our_display, cursor_font_name);
wait_cursor = XCreateGlyphCursor(our_display, cursor_font, cursor_font,
decw$c_wait_cursor, decw$c_wait_cursor + 1,
&our_cmap[1], &our_cmap[0]);
...
/* Put up the wait cursor */
XDefineCursor(our_display, w_main.win, wait_cursor);
XFlush(our_display);
...
/* Restore the normal cursor */
XUndefineCursor(our_display, w_main.win);
--PSW
|
1279.2 | Where do the colors come from??? | STOAT::BARKER | Jeremy Barker - NAC Europe - REO2-G/J2 | Wed Aug 16 1989 07:08 | 13 |
| Re: .1
Most helpful, a much lower noise level than in the manual; but where does
this (****) come from??? I have read the manual, but can't see how to get
the default cursor colors.
> wait_cursor = XCreateGlyphCursor(our_display, cursor_font, cursor_font,
> decw$c_wait_cursor, decw$c_wait_cursor + 1,
****> &our_cmap[1], &our_cmap[0]);
> ...
jb
|
1279.3 | | RAB::DESAI | Jatin Desai | Wed Aug 16 1989 11:05 | 24 |
|
re: .-1
This is how we get it:
XColor colors[2];
colors [0] . pixel = WhitePixelOfScreen (screen);
colors [1] . pixel = BlackPixelOfScreen (screen);
/* Get the RGB values for these colors. */
XQueryColors (
display, /* display */
DefaultColormapOfScreen (screen), /* color map */
colors, /* array of colors */
2); /* length of array */
- Jatin
|
1279.4 | my color map is getting full.... | STOAT::BARKER | Jeremy Barker - NAC Europe - REO2-G/J2 | Wed Aug 16 1989 13:55 | 29 |
| Re: .3
I think that that gets black and white. I DO NOT want black and white.
In the Session Manager setup there are several colors that you can define,
from Window...
Screen Foreground
Screen Background
Window Foreground
Window Background
Window Highlight
Window Border
and from Pointer...
Pointer Foreground
Pointer Background
Some other things - for example, the Wait cursor in the Session Manager
window and activated Toggle Buttons - seem to appear in another color.
What I want is to be able to select these colors to avoid using up
additional color map entries - I need them for other things (there are not
many on a 4-plane system), and so that my display is consistent with the
other displays on the screen.
jb
|
1279.5 | (Unless there's an easier way...) | HANNAH::MESSENGER | Bob Messenger | Wed Aug 16 1989 14:12 | 11 |
| Re: .4
The session manager sets the sm.pointer_foreground and sm.pointer_background
resources to the pointer foreground and background colors. You can read these
resources by calling XtDatabase (which means you'll have to call
XtCreateApplicationContext and XtDisplayInitialize) to obtain the resource
database set by the session manager and then calling XrmGetResource to read
the pointer resources that you're interested in.
-- Bob
|
1279.6 | | PSW::WINALSKI | Meetings are our most important product | Wed Aug 16 1989 18:07 | 13 |
| RE: .2
In my example, our_cmap[0] is WhitePixelOfScreen and our_cmap[1] is
BlackPixelOfScreen. Those parameters to XCreateCursor() are the foreground and
background pixel values.
The XUI Style Guide mandates the use of white background and black foreground
for the wait cursor. Yes, a lot of applications, including some of the OOTBs,
use red-on-white. They all picked up the same buggy code and are in violation
of the Style Guide.
--PSW
|
1279.7 | Come on, now | DECWIN::KLEIN | | Thu Aug 17 1989 13:28 | 9 |
| >>for the wait cursor. Yes, a lot of applications, including some of the OOTBs,
>>use red-on-white. They all picked up the same buggy code and are in violation
>>of the Style Guide.
Give us a break. The code we stole was originally written by Jake Vannoy,
who WAS Mr. Style Guide at the time!
-steve-
|
1279.8 | | CASEE::LACROIX | Object oriented dog food? No, sorry | Fri Aug 18 1989 10:49 | 21 |
| Re -2:
>use red-on-white. They all picked up the same buggy code and are in violation
>of the Style Guide.
All those 'Style Guide Violations' are a plain joke these days when
folks are struggling to decide whether Motif will require one or two
full time engineers to fix a single application. And officially, we are
pleased by the OSF decision. Pfff...
Re -1:
>Give us a break. The code we stole was originally written by Jake Vannoy,
>who WAS Mr. Style Guide at the time!
So what? This wouldn't be the first time that the style guide is
inconsistent with itself ;-) Sorry, couldn't resist. Apologies and all
that.
Denis.
|