/[antiright]/antiright/src/arshell/textedit.c
ViewVC logotype

Diff of /antiright/src/arshell/textedit.c

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

revision 1.11 by jefbed, Mon Aug 16 17:27:05 2004 UTC revision 1.12 by jefbed, Thu Aug 19 00:31:32 2004 UTC
# Line 65  arshell_change_font_cb() Line 65  arshell_change_font_cb()
65        font_struct=XLoadQueryFont(antiright.display, font_string);        font_struct=XLoadQueryFont(antiright.display, font_string);
66        if(font_struct!=NULL)        if(font_struct!=NULL)
67          {          {
68            XmFontList font_list=XmFontListCreate(font_struct, XmSTRING_DEFAULT_CHARSET);            XmFontList font_list=XmFontListCreate(font_struct,
69                                                    XmSTRING_DEFAULT_CHARSET);
70            ARCLARG;            ARCLARG;
71            antiright_set(XmNfontList, (XtArgVal)font_list);            antiright_set(XmNfontList, (XtArgVal)font_list);
72            antiright_set_values(arshell.gui.widgets.work);            antiright_set_values(arshell.gui.widgets.work);
# Line 74  arshell_change_font_cb() Line 75  arshell_change_font_cb()
75          }          }
76        else        else
77          {          {
78            antiright_system("arshell -ADm 'The entered font was not found.  ' &");            antiright_system
79                ("arshell -ADm 'The entered font was not found.  ' &");
80          }          }
81      }      }
82    free(font_string);    free(font_string);
# Line 223  arshell_motion_verify_cb(Widget widget, Line 225  arshell_motion_verify_cb(Widget widget,
225    arshell_verified_status(call_data);    arshell_verified_status(call_data);
226  }  }
227  void  void
228    arshell_setup_work_area_callbacks()
229    {
230      XtAddCallback(arshell.gui.widgets.work, XmNvalueChangedCallback,
231                    arshell_value_changed_cb, NULL);
232      XtAddCallback(arshell.gui.widgets.work, XmNmodifyVerifyCallback,
233                    arshell_modify_verify_cb, NULL);
234      XtAddCallback(arshell.gui.widgets.work, XmNmotionVerifyCallback,
235                    arshell_motion_verify_cb, NULL);
236    }
237    void
238    arshell_work_area_pixmap_hack()
239    {
240      char *icon;
241      asprintf(&icon, "%s/handtoface.xpm", ICONDIR);
242      antiright_set_bitmap_from_file(antiright.parent_widget, icon);
243      free(icon);
244    }
245    void
246  arshell_create_text_work_area()  arshell_create_text_work_area()
247  {  {
248    arshell_set_work_area_arguments();    arshell_set_work_area_arguments();
# Line 231  arshell_create_text_work_area() Line 251  arshell_create_text_work_area()
251                                          antiright.arguments_int);                                          antiright.arguments_int);
252    XtManageChild(arshell.gui.widgets.work);    XtManageChild(arshell.gui.widgets.work);
253    antiright_defined_popup_menu(arshell.gui.widgets.work);    antiright_defined_popup_menu(arshell.gui.widgets.work);
254    XtAddCallback(arshell.gui.widgets.work, XmNvalueChangedCallback,    arshell_setup_work_area_callbacks();
                 arshell_value_changed_cb, NULL);  
   XtAddCallback(arshell.gui.widgets.work, XmNmodifyVerifyCallback,  
                 arshell_modify_verify_cb, NULL);  
   XtAddCallback(arshell.gui.widgets.work, XmNmotionVerifyCallback,  
                 arshell_motion_verify_cb, NULL);  
255    arshell_setup_work_menubar();    arshell_setup_work_menubar();
256    {    arshell_work_area_pixmap_hack();
     char *icon;  
     asprintf(&icon, "%s/handtoface.xpm", ICONDIR);  
     antiright_set_bitmap_from_file(antiright.parent_widget, icon);  
     free(icon);  
   }  
257  }  }
258    
259  void  void
# Line 254  arshell_create_default_text_label(Widget Line 264  arshell_create_default_text_label(Widget
264    antiright_form_positions(0, 100, 0, 25);    antiright_form_positions(0, 100, 0, 25);
265    antiright_label(form_widget, label_string);    antiright_label(form_widget, label_string);
266  }  }
267    void
268  Widget  arshell_set_text_field_arguments()
 arshell_create_default_text_field(Widget parent_widget, char* return_string)  
269  {  {
   Widget text_widget;  
270    ARCLARG;    ARCLARG;
271    antiright_form_positions(0, 100, 25, 100);    antiright_form_positions(0, 100, 25, 100);
272    antiright_set(XmNeditMode, XmSINGLE_LINE_EDIT);    antiright_set(XmNeditMode, XmSINGLE_LINE_EDIT);
273    antiright_set(XmNscrollHorizontal, False);    antiright_set(XmNscrollHorizontal, False);
274    }
275    Widget
276    arshell_create_default_text_field(Widget parent_widget, char* return_string)
277    {
278      Widget text_widget;
279      arshell_set_text_field_arguments();
280    text_widget=XmCreateText(parent_widget, "text_widget",    text_widget=XmCreateText(parent_widget, "text_widget",
281                             antiright.arguments, antiright.arguments_int);                             antiright.arguments, antiright.arguments_int);
282    assert(text_widget!=NULL);    assert(text_widget!=NULL);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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