/[xforms]/xforms/demos/pup.c
ViewVC logotype

Diff of /xforms/demos/pup.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by leeming, Thu Apr 24 09:35:33 2003 UTC revision 1.4 by leeming, Tue Sep 9 00:28:25 2003 UTC
# Line 20  Line 20 
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
# Line 64  int main(int argc,char *argv[]) Line 64  int main(int argc,char *argv[])
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);
# Line 147  do_pup(FL_OBJECT *ob, long q) Line 147  do_pup(FL_OBJECT *ob, long q)
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);
# Line 166  do_pup(FL_OBJECT *ob, long q) Line 166  do_pup(FL_OBJECT *ob, long q)
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    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26