[Plib-cvs] plib/demos/p-guide/src LoadSave.cxx,1.5,1.6 PropertiesWindow.cxx,1.3,1.4 StatusWindow.cxx
Brought to you by:
sjbaker
From: Sebastian U. <ud...@us...> - 2002-08-18 01:06:03
|
Update of /cvsroot/plib/plib/demos/p-guide/src In directory usw-pr-cvs1:/tmp/cvs-serv28341 Modified Files: LoadSave.cxx PropertiesWindow.cxx StatusWindow.cxx WidgetWindow.cxx WriteCode.cxx pGuide.cxx Log Message: Cleanups Index: LoadSave.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/p-guide/src/LoadSave.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- LoadSave.cxx 18 Aug 2002 00:23:11 -0000 1.5 +++ LoadSave.cxx 18 Aug 2002 01:05:58 -0000 1.6 @@ -81,10 +81,10 @@ extern puFileSelector *file_selector ; // Duplication checking -void chk_dupname ( WidgetList *new_wid ) ; -puInput *dup_newname = (puInput *)NULL ; -puDialogBox *dup_dialog = (puDialogBox *)NULL ; -WidgetList *nextwid ; +static void chk_dupname ( WidgetList *new_wid ) ; +static puInput *dup_newname = (puInput *)NULL ; +static puDialogBox *dup_dialog = (puDialogBox *)NULL ; +static WidgetList *nextwid ; [...63 lines suppressed...] void loadProject ( puObject *ob ) { extern puInput *window_name ; @@ -707,7 +707,7 @@ /* Done checking name for duplication */ } -void chk_dupname_ok_cb ( puObject *ob ) +static void chk_dupname_ok_cb ( puObject *ob ) { /* The user's new name from the dialog has already been set to the object_name*/ /* Close dialogbox and update main window ...*/ @@ -719,7 +719,7 @@ chk_dupname(nextwid); } -void chk_dupname ( WidgetList *new_wid ) +static void chk_dupname ( WidgetList *new_wid ) { if (!new_wid) return; Index: PropertiesWindow.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/p-guide/src/PropertiesWindow.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- PropertiesWindow.cxx 18 Aug 2002 00:23:11 -0000 1.3 +++ PropertiesWindow.cxx 18 Aug 2002 01:05:58 -0000 1.4 @@ -96,7 +96,7 @@ // PUI Callback Functions: -void cb_properties_close (puObject *obj) +static void cb_properties_close (puObject *obj) { /* Save the changes ... Needed? */ if ( puActiveWidget() ) @@ -111,7 +111,7 @@ // Data setting standard callbacks [...80 lines suppressed...] } -void cb_float4 (puObject *obj) +static void cb_float4 (puObject *obj) { /*Set the first floating storage value */ if (active_widget) active_widget->floatval4 = obj->getFloatValue(); } -void cb_float5 (puObject *obj) +static void cb_float5 (puObject *obj) { /*Set the first floating storage value */ if (active_widget) active_widget->floatval5 = obj->getFloatValue(); } -void cb_float6 (puObject *obj) +static void cb_float6 (puObject *obj) { /*Set the first floating storage value */ if (active_widget) Index: StatusWindow.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/p-guide/src/StatusWindow.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- StatusWindow.cxx 18 Aug 2002 00:23:11 -0000 1.5 +++ StatusWindow.cxx 18 Aug 2002 01:05:58 -0000 1.6 @@ -52,19 +52,19 @@ puInput *object_position_x ; puInput *object_position_y ; -puInput *object_label ; -puComboBox *object_vert_label_place ; -puComboBox *object_horz_label_place ; -puInput *object_legend ; -puComboBox *object_vert_legend_place ; -puComboBox *object_horz_legend_place ; +static puInput *object_label ; +static puComboBox *object_vert_label_place ; [...282 lines suppressed...] @@ -857,7 +857,7 @@ } } -void autolock_cb ( puObject *ob ) +static void autolock_cb ( puObject *ob ) { if ( ob->getIntegerValue () == 1 ) autolock = true ; @@ -867,8 +867,8 @@ // Setup Menubar -char *file_submenu [] = { "Exit", "------------", "Export Code", "------------", "Save Project", "Load Project", "New Project", NULL } ; -puCallback file_submenu_cb [] = { quit_cb, NULL, write_code_cb, NULL, saveProject_cb, loadProject_cb, clear_cb, NULL } ; +static char *file_submenu [] = { "Exit", "------------", "Export Code", "------------", "Save Project", "Load Project", "New Project", NULL } ; +static puCallback file_submenu_cb [] = { quit_cb, NULL, write_code_cb, NULL, saveProject_cb, loadProject_cb, clear_cb, NULL } ; // Function to define the window Index: WidgetWindow.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/p-guide/src/WidgetWindow.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- WidgetWindow.cxx 18 Aug 2002 00:23:11 -0000 1.5 +++ WidgetWindow.cxx 18 Aug 2002 01:05:58 -0000 1.6 @@ -34,7 +34,7 @@ puButton *active_button = (puButton *)NULL ; // Widget window parameters -int widget_window = 0 ; // Window handle +static int widget_window = 0 ; // Window handle // GLUT Widget Window Callbacks @@ -99,7 +99,7 @@ // PUI Callback Functions: [...148 lines suppressed...] selected_object_sticky = ( glutGetModifiers () & GLUT_ACTIVE_CTRL ) ? 1 : 0 ; selected_object_type = PUCLASS_BISLIDER ; @@ -239,7 +239,7 @@ active_button = (puButton *)ob ; } -void trislider_cb ( puObject *ob ) +static void trislider_cb ( puObject *ob ) { selected_object_sticky = ( glutGetModifiers () & GLUT_ACTIVE_CTRL ) ? 1 : 0 ; selected_object_type = PUCLASS_TRISLIDER ; @@ -247,7 +247,7 @@ active_button = (puButton *)ob ; } -void spinbox_cb ( puObject *ob ) +static void spinbox_cb ( puObject *ob ) { selected_object_sticky = ( glutGetModifiers () & GLUT_ACTIVE_CTRL ) ? 1 : 0 ; selected_object_type = PUCLASS_SPINBOX ; Index: WriteCode.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/p-guide/src/WriteCode.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- WriteCode.cxx 18 Aug 2002 00:23:11 -0000 1.6 +++ WriteCode.cxx 18 Aug 2002 01:05:58 -0000 1.7 @@ -547,14 +547,14 @@ // TO DO: Allow the user to customize colour and style - char *place_name [] = { "PUPLACE_TOP_LEFT", "PUPLACE_TOP_CENTERED", "PUPLACE_TOP_RIGHT", - "PUPLACE_CENTERED_LEFT", "PUPLACE_CENTERED_RIGHT", - "PUPLACE_BOTTOM_LEFT", "PUPLACE_BOTTOM_CENTERED", "PUPLACE_BOTTOM_RIGHT", - "PUPLACE_CENTERED_CENTERED", - "PUPLACE_ABOVE_LEFT", "PUPLACE_ABOVE_RIGHT", - "PUPLACE_BELOW_LEFT", "PUPLACE_BELOW_RIGHT", - "PUPLACE_UPPER_LEFT", "PUPLACE_UPPER_RIGHT", - "PUPLACE_LOWER_LEFT", "PUPLACE_LOWER_RIGHT" } ; + const char *place_name [] = { "PUPLACE_TOP_LEFT", "PUPLACE_TOP_CENTERED", "PUPLACE_TOP_RIGHT", + "PUPLACE_CENTERED_LEFT", "PUPLACE_CENTERED_RIGHT", + "PUPLACE_BOTTOM_LEFT", "PUPLACE_BOTTOM_CENTERED", "PUPLACE_BOTTOM_RIGHT", + "PUPLACE_CENTERED_CENTERED", + "PUPLACE_ABOVE_LEFT", "PUPLACE_ABOVE_RIGHT", + "PUPLACE_BELOW_LEFT", "PUPLACE_BELOW_RIGHT", + "PUPLACE_UPPER_LEFT", "PUPLACE_UPPER_RIGHT", + "PUPLACE_LOWER_LEFT", "PUPLACE_LOWER_RIGHT" } ; if ( wid->label_text ) { Index: pGuide.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/p-guide/src/pGuide.cxx,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pGuide.cxx 18 Aug 2002 00:23:11 -0000 1.7 +++ pGuide.cxx 18 Aug 2002 01:05:58 -0000 1.8 @@ -20,6 +20,10 @@ $Id$ */ +#ifdef VERSION +#undef VERSION +#endif + #define VERSION = "0.1a" // Program to allow the user to build a PUI Graphical User Interface @@ -33,14 +37,14 @@ puObject *active_object = (puObject *)NULL ; WidgetList *active_widget = (WidgetList *)NULL ; -short activity_flag = 0 ; // 0 - inactive; 1 - moving; 2 - resizing xmin, 3 - resizing ymin, 4 - resizing xmax, 5 - resizing ymax -int resize_symmetric = 1 ; -int resize_corner = 0 ; +static short activity_flag = 0 ; // 0 - inactive; 1 - moving; 2 - resizing xmin, 3 - resizing ymin, 4 - resizing xmax, 5 - resizing ymax +static int resize_symmetric = 1 ; +static int resize_corner = 0 ; -int mouse_x_position_in_object = 0 ; -int mouse_y_position_in_object = 0 ; +static int mouse_x_position_in_object = 0 ; +static int mouse_y_position_in_object = 0 ; -int pguide_last_buttons = 0 ; // Because puMouse isn't called, we have to do our own last_buttons checking +static int pguide_last_buttons = 0 ; // Because puMouse isn't called, we have to do our own last_buttons checking // Main window parameters int main_window = 0 ; // Main window handle @@ -53,7 +57,7 @@ main_window_color_b = 1.0, main_window_color_a = 1.0 ; bool main_window_changed = false ; -bool done_first_setup = false ; +static bool done_first_setup = false ; bool currently_loading = false ; static int ctrl_key_down = 0 ; @@ -70,7 +74,7 @@ bool autolock = false ; // Properties popup -puPopupMenu *context_menu; +static puPopupMenu *context_menu; // From the status window: extern void setStatusWidgets ( WidgetList *wid ) ; @@ -80,7 +84,7 @@ // Properties Callback -void cb_edit_properties ( puObject *ob ) +static void cb_edit_properties ( puObject *ob ) { if (properties_window) { @@ -96,7 +100,7 @@ define_properties_window(); } -void cb_lock_toggle ( puObject *ob ) +static void cb_lock_toggle ( puObject *ob ) { WidgetList *wid = widgets ; while ( wid ) @@ -112,7 +116,7 @@ } } -void cb_popup_delete ( puObject *ob ) +static void cb_popup_delete ( puObject *ob ) { WidgetList *wid = widgets ; WidgetList *prv = (WidgetList *)NULL ; @@ -460,7 +464,7 @@ } else { context_menu->hide(); } - } else /*if ( context_menu->isVisible() == 1) { context_menu->hide(); } /* The user did something funny, so hide the menu since they've been naughty */ + } else /*if ( context_menu->isVisible() == 1) { context_menu->hide(); } * The user did something funny, so hide the menu since they've been naughty */ { // Downclick: Place a new widget, activate an existing widget, deactivate widget, or select from menu. if ( updown == GLUT_DOWN ) |