20 |
*/ |
*/ |
21 |
|
|
22 |
|
|
23 |
/* Demo: complete pop-ups. |
/* Demo: complete pop-ups. |
24 |
* test font/cursor change |
* test font/cursor change |
25 |
* test attaching pup to menu |
* test attaching pup to menu |
26 |
*/ |
*/ |
27 |
|
|
28 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
64 |
return 0; |
return 0; |
65 |
} |
} |
66 |
|
|
67 |
static int subm = -1, m = -1, ssm; |
static int subm = -1, m = -1, ssm; |
68 |
|
|
69 |
/* post-handler */ |
/* post-handler */ |
70 |
int |
int |
71 |
post(FL_OBJECT *ob, int ev, FL_Coord mx, FL_Coord y, int key, void *xev) |
post(FL_OBJECT *ob, int ev, FL_Coord mx, FL_Coord y, int key, void *xev) |
72 |
{ |
{ |
73 |
static int n1 = -1,n2 = -1; |
static int n1 = -1,n2 = -1; |
74 |
|
|
75 |
if(n1 == -1) |
if(n1 == -1) |
76 |
{ |
{ |
77 |
n1 = fl_defpup(FL_ObjWin(ob),"line1|line2"); |
n1 = fl_defpup(FL_ObjWin(ob),"line1|line2"); |
78 |
fl_setpup_shadow(n1,0); |
fl_setpup_shadow(n1,0); |
79 |
fl_setpup_bw(n1,0); |
fl_setpup_bw(n1,0); |
147 |
fl_addtopup(ssm,"SSMItem32%x32%r2"); |
fl_addtopup(ssm,"SSMItem32%x32%r2"); |
148 |
|
|
149 |
/* fl_addtopup(subm,"SubMenu%t");*/ |
/* fl_addtopup(subm,"SubMenu%t");*/ |
150 |
fl_addtopup(subm,"SMItemA\tAlt-A%x10%h","#a"); |
fl_addtopup(subm,"SMItemA\tAlt-A%x10%h","#a"); |
151 |
fl_addtopup(subm,"SMItemB\tAlt-B%x11%h","#b"); |
fl_addtopup(subm,"SMItemB\tAlt-B%x11%h","#b"); |
152 |
fl_addtopup(subm,"SMItemC\tAlt-C%x12%h","#c"); |
fl_addtopup(subm,"SMItemC\tAlt-C%x12%h","#c"); |
153 |
fl_addtopup(subm,"SMItemD\tAlt-F5%x13%h%m","#&5",ssm); |
fl_addtopup(subm,"SMItemD\tAlt-F5%x13%h%m","#&5",ssm); |
166 |
|
|
167 |
|
|
168 |
if(fl_get_button_numb(ob) >= FL_SHORTCUT) |
if(fl_get_button_numb(ob) >= FL_SHORTCUT) |
169 |
fl_setpup_position(ob->form->x + ob->x, |
fl_setpup_position(ob->form->x + ob->x, |
170 |
ob->form->y + ob->y + ob->h); |
ob->form->y + ob->y + ob->h); |
171 |
|
|
172 |
show_return_val(fl_dopup(m)); |
show_return_val(fl_dopup(m)); |
173 |
|
|