T.R | Title | User | Personal Name | Date | Lines |
---|
2850.1 | Use "highlight_pixmap" argument | SCAM::DIAL | | Fri Jun 01 1990 10:42 | 4 |
| In the UIL, you use "highlight_pixmap = <your_pixmap_name>".
This pixmap is used while the mouse button is down.
Barry
|
2850.2 | | VOGON::ODONNELL | | Fri Jun 01 1990 12:27 | 11 |
|
Actually what I wanted to do was to change the pushbutton
label permanently and not just when the mouse button was down.
Also, eventually, to select which icon will be placed into the
pushbutton label from within the C code.
I'm trying to achieve a similar effect as that of the helloworld
application except instead of a text string I wish to display
a simple icon.
Kevin.
|
2850.3 | Here's what I use | ATSE::DMILLER | Cecil B D'Miller, the esoteric | Fri Jun 01 1990 13:36 | 14 |
| I used DwtFetchSetValues() in my Yahtzee game, which changes the
pixmap of a "die" push button when the dice are rolled.
-Dave
static String Die_Icon[] = { "Blank_Icon", "Ace_Icon",
"Two_Icon", "Three_Icon,
"Four_Icon", "Five_Icon",
"Six_Icon" }
:
:
XtSetArg(al[0], DwtNpixmap, Die_Icon[v]); /* v is die value */
DwtFetchSetValues(s_DRMHierarchy, Die_Widget[die], al, 1);
|
2850.4 | Pixmap leak? | DECWIN::KLEIN | | Fri Jun 01 1990 15:42 | 13 |
| > static String Die_Icon[] = { "Blank_Icon", "Ace_Icon",
> "Two_Icon", "Three_Icon,
> "Four_Icon", "Five_Icon",
> "Six_Icon" }
> :
> :
>
> XtSetArg(al[0], DwtNpixmap, Die_Icon[v]); /* v is die value */
> DwtFetchSetValues(s_DRMHierarchy, Die_Widget[die], al, 1);
Won't this create a new instance of the icon pixmap each time it is loaded?
-steve-
|
2850.5 | | VOGON::ODONNELL | | Fri Jun 01 1990 15:51 | 34 |
|
I tried DwtFetchSetValues but it complained that my icon could not
be found!
Am I setting up the icon in the UIL O.K.? This what I do:
value
o_icon : icon(color_table = o_ct,
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++',
:
:
'+.....................................................+',
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++');
object TL_square : push_button {
arguments {
x = 0;
y = 0;
border_width = 2;
label_label_type = DwtPixmap;
label_pixmap = n_icon;
};
callbacks {
activate = procedure pushed_proc(k_TL_label);
};
};
Am I doing anything obviously wrong here?
Kevin.
|
2850.6 | value o_icon : exported icon ... | ATSE::DMILLER | Cecil B D'Miller, the esoteric | Fri Jun 01 1990 17:26 | 9 |
| The .UIL file should define the pixmaps as EXPORTED icons. Then
the fetch will succeed.
RE: Memory leakage.
I don't know. I do seem to have a slow leak, but couldn't pin
down the cause. How (and what) should I free the old pixmap?
-Dave
|
2850.7 | | VOGON::ODONNELL | | Mon Jun 04 1990 05:06 | 7 |
|
That did the trick.
Thanks for all your help.
Kevin.
|