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

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

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

revision 1.5 by jefbed, Mon Aug 23 01:15:56 2004 UTC revision 1.6 by jefbed, Wed Aug 25 23:50:18 2004 UTC
# Line 123  arshell_hide_sticky_note_toolbar() Line 123  arshell_hide_sticky_note_toolbar()
123    antiright_get_values(antiright.parent_widget);    antiright_get_values(antiright.parent_widget);
124    if((title[0]=='S') & (title[1]=='t') & (title[2]=='i'))    if((title[0]=='S') & (title[1]=='t') & (title[2]=='i'))
125      {      {
126        XtUnmanageChild(XtParent(XtParent(arshell.edit.toolbar)));        XtUnmanageChild(XtParent(arshell.gui.layout.row_manager_widget));
127      }      }
128    ARCLARG;    ARCLARG;
129  }  }
# Line 146  Widget Line 146  Widget
146  arshell_toolbar_button(char *description, char **icon,  arshell_toolbar_button(char *description, char **icon,
147                         XtCallbackProc callback, XtPointer client_data)                         XtCallbackProc callback, XtPointer client_data)
148  {  {
149    return(antiright_toolbar_button(arshell.edit.toolbar, description, icon,    return(antiright_toolbar_button(arshell.gui.layout.row_manager_widget,
150                                      description, icon,
151                                    callback, client_data));                                    callback, client_data));
152  }  }
153    
# Line 156  arshell_toggle_toolbar_cb(Widget widget, Line 157  arshell_toggle_toolbar_cb(Widget widget,
157  {  {
158    if(XmToggleButtonGetState(widget))    if(XmToggleButtonGetState(widget))
159      {      {
160        if(!XtIsManaged(XtParent(XtParent(arshell.edit.toolbar))))        if(!XtIsManaged(XtParent(arshell.gui.layout.row_manager_widget)))
161          {          {
162            XtManageChild(XtParent(XtParent(arshell.edit.toolbar)));            XtManageChild(XtParent(arshell.gui.layout.row_manager_widget));
163          }          }
164      }      }
165    else    else
166      {      {
167        if(XtIsManaged(XtParent(XtParent(arshell.edit.toolbar))))        if(XtIsManaged(XtParent(arshell.gui.layout.row_manager_widget)))
168          {          {
169            XtUnmanageChild(XtParent(XtParent(arshell.edit.toolbar)));            XtUnmanageChild(XtParent(arshell.gui.layout.row_manager_widget));
170          }          }
171      }      }
172    client_data=NULL;    client_data=NULL;
# Line 176  void Line 177  void
177  arshell_setup_editor_toolbar()  arshell_setup_editor_toolbar()
178  {  {
179    arshell_initialize_row_manager();    arshell_initialize_row_manager();
180    ARCLARG;    /*  ARCLARG;
181    antiright_set(XmNmarginWidth, 0);    antiright_set(XmNmarginWidth, 0);
182    antiright_set(XmNmarginHeight, 0);    antiright_set(XmNmarginHeight, 0);
183    antiright_set(XmNpacking, XmPACK_TIGHT);    antiright_set(XmNpacking, XmPACK_TIGHT);
184    antiright_set(XmNorientation, XmHORIZONTAL);    antiright_set(XmNorientation, XmHORIZONTAL);
185    antiright_set(XmNspacing, 0);    antiright_set(XmNspacing, 0);
186    arshell.edit.toolbar=    arshell.edit.toolbar=
187      antiright_row(arshell.gui.layout.row_manager_widget);    antiright_row(arshell.gui.layout.row_manager_widget);*/
188    
189    arshell_hide_sticky_note_toolbar();    arshell_hide_sticky_note_toolbar();
190    arshell_toolbar_button("Open a file.", open_xpm,    arshell_toolbar_button("Open a file.", open_xpm,
# Line 200  arshell_setup_editor_toolbar() Line 201  arshell_setup_editor_toolbar()
201                           antiright_paste_cb, arshell.gui.widgets.work);                           antiright_paste_cb, arshell.gui.widgets.work);
202    arshell_toolbar_button("Search for and optionally replace text.", search_xpm,    arshell_toolbar_button("Search for and optionally replace text.", search_xpm,
203                           arshell_search_replace_cb, NULL);                           arshell_search_replace_cb, NULL);
204      arshell_row_layout();
205  }  }
206    
207  void  void
# Line 229  arshell_setup_work_menubar() Line 231  arshell_setup_work_menubar()
231        antiright_separator(arshell.gui.menubar.edit_widget);        antiright_separator(arshell.gui.menubar.edit_widget);
232        antiright_button(arshell.gui.menubar.edit_widget, "Select All",        antiright_button(arshell.gui.menubar.edit_widget, "Select All",
233                         arshell_select_all, NULL);                         arshell_select_all, NULL);
234          antiright_separator(arshell.gui.menubar.edit_widget);
235        antiright_button(arshell.gui.menubar.edit_widget, "Search/Replace",        antiright_button(arshell.gui.menubar.edit_widget, "Search/Replace",
236                         arshell_search_replace_cb, NULL);                         arshell_search_replace_cb, NULL);
       antiright_button(arshell.gui.menubar.edit_widget, "Find Selected",  
                        arshell_find_selected, NULL);  
237        antiright_button(arshell.gui.menubar.edit_widget, "Find at Cursor",        antiright_button(arshell.gui.menubar.edit_widget, "Find at Cursor",
238                         arshell_find_at_cursor_cb, NULL);                         arshell_find_at_cursor_cb, NULL);
239          antiright_button(arshell.gui.menubar.edit_widget, "Find Selected",
240                           arshell_find_selected, NULL);
241        antiright_button(arshell.gui.menubar.edit_widget, "Go to Line",        antiright_button(arshell.gui.menubar.edit_widget, "Go to Line",
242                         arshell_goto_line_cb, NULL);                         arshell_goto_line_cb, NULL);
243          antiright_separator(arshell.gui.menubar.edit_widget);
244        antiright_button(arshell.gui.menubar.edit_widget, "Lower Selection Case",        antiright_button(arshell.gui.menubar.edit_widget, "Lower Selection Case",
245                         arshell_lower_selection_case, NULL);                         arshell_lower_selection_case, NULL);
246        antiright_button(arshell.gui.menubar.edit_widget, "Raise Selection Case",        antiright_button(arshell.gui.menubar.edit_widget, "Raise Selection Case",
247                         arshell_upper_selection_case, NULL);                         arshell_upper_selection_case, NULL);
248        antiright_separator(arshell.gui.menubar.view_widget);        antiright_separator(arshell.gui.menubar.edit_widget);
249          antiright_button(arshell.gui.menubar.edit_widget, "Comment Selected",
250                           antiright_comment_selection, arshell.gui.widgets.work);
251          antiright_button(arshell.gui.menubar.edit_widget, "Uncomment Selected",
252                           antiright_uncomment_selection, arshell.gui.widgets.work);
253        ARCLARG;        ARCLARG;
254        toggle_widget=XmCreateToggleButton(arshell.gui.menubar.view_widget,        toggle_widget=XmCreateToggleButton(arshell.gui.menubar.view_widget,
255                                           "Show/Hide Toolbar", ARARGS);                                           "Show/Hide Toolbar", ARARGS);
256        XtManageChild(toggle_widget);        XtManageChild(toggle_widget);
257        if(XtIsManaged(XtParent(XtParent(arshell.edit.toolbar))))        if(XtIsManaged(XtParent(arshell.gui.layout.row_manager_widget)))
258          XmToggleButtonSetState(toggle_widget, True, True);          XmToggleButtonSetState(toggle_widget, True, True);
259        XtAddCallback(toggle_widget, XmNvalueChangedCallback,        XtAddCallback(toggle_widget, XmNvalueChangedCallback,
260                      arshell_toggle_toolbar_cb, NULL);                      arshell_toggle_toolbar_cb, NULL);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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