Some C++ compilers can't handle char& and int& versions of methods, so

for now just remove the char (boolean) methods since the integer methods
can also be used for the same thing.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2274 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-31 19:27:56 +00:00
parent 778d528093
commit 23972703f4
5 changed files with 21 additions and 49 deletions

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Preferences.H,v 1.1.2.7 2002/05/07 00:43:20 easysw Exp $"
// "$Id: Fl_Preferences.H,v 1.1.2.8 2002/05/31 19:27:56 easysw Exp $"
//
// Preferences definitions for the Fast Light Tool Kit (FLTK).
//
@ -60,14 +60,12 @@ public:
FL_EXPORT char entryExists( const char *entry );
FL_EXPORT char deleteEntry( const char *entry );
FL_EXPORT char set( const char *entry, char value );
FL_EXPORT char set( const char *entry, int value );
FL_EXPORT char set( const char *entry, float value );
FL_EXPORT char set( const char *entry, double value );
FL_EXPORT char set( const char *entry, const char *value );
FL_EXPORT char set( const char *entry, const void *value, int size );
FL_EXPORT char get( const char *entry, char &value, char defaultValue );
FL_EXPORT char get( const char *entry, int &value, int defaultValue );
FL_EXPORT char get( const char *entry, float &value, float defaultValue );
FL_EXPORT char get( const char *entry, double &value, double defaultValue );
@ -157,5 +155,5 @@ private:
#endif // !Fl_Preferences_H
//
// End of "$Id: Fl_Preferences.H,v 1.1.2.7 2002/05/07 00:43:20 easysw Exp $".
// End of "$Id: Fl_Preferences.H,v 1.1.2.8 2002/05/31 19:27:56 easysw Exp $".
//

View File

@ -138,7 +138,7 @@ static void cb_openlast_button(Fl_Check_Button*, void*) {
Fl_Window* make_settings_window() {
Fl_Window* w;
{ Fl_Window* o = settings_window = new Fl_Window(255, 179, "GUI Settings");
{ Fl_Window* o = settings_window = new Fl_Window(255, 175, "GUI Settings");
w = o;
{ Fl_Button* o = new Fl_Button(185, 145, 60, 25, "Close");
o->tooltip("Close this dialog.");
@ -150,7 +150,7 @@ Fl_Window* make_settings_window() {
{ Fl_Check_Button* o = tooltips_button = new Fl_Check_Button(20, 45, 215, 20, "Show Tooltips");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_tooltips_button);
char b;
int b;
fluid_prefs.get("show_tooltips", b, 1);
tooltips_button->value(b);
Fl_Tooltip::enable(b);
@ -158,14 +158,14 @@ Fl_Window* make_settings_window() {
{ Fl_Check_Button* o = completion_button = new Fl_Check_Button(20, 75, 215, 20, "Show Completion Dialogs");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_completion_button);
char b;
int b;
fluid_prefs.get("show_completion_dialogs", b, 1);
completion_button->value(b);
}
{ Fl_Check_Button* o = openlast_button = new Fl_Check_Button(20, 105, 215, 20, "Open Previous File on Startup");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_openlast_button);
char b;
int b;
fluid_prefs.get("open_previous_file", b, 0);
openlast_button->value(b);
}
@ -234,21 +234,21 @@ Fl_Window* make_shell_window() {
{ Fl_Check_Button* o = shell_savefl_button = new Fl_Check_Button(20, 65, 110, 20, "Save .FL File");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_shell_savefl_button);
char b;
int b;
fluid_prefs.get("shell_savefl", b, 1);
shell_savefl_button->value(b);
}
{ Fl_Check_Button* o = shell_writecode_button = new Fl_Check_Button(140, 65, 95, 20, "Write Code");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_shell_writecode_button);
char b;
int b;
fluid_prefs.get("shell_writecode", b, 1);
shell_writecode_button->value(b);
}
{ Fl_Check_Button* o = shell_writemsgs_button = new Fl_Check_Button(245, 65, 130, 20, "Write Messages");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_shell_writemsgs_button);
char b;
int b;
fluid_prefs.get("shell_writemsgs", b, 0);
shell_writemsgs_button->value(b);
}

View File

@ -12,7 +12,7 @@ Function {make_project_window()} {open
} {
Fl_Button {} {
label Close
callback {project_window->hide();} selected
callback {project_window->hide();}
tooltip {Close this dialog.} xywh {295 175 60 25}
}
Fl_Tabs {} {open
@ -101,7 +101,7 @@ Function {make_settings_window()} {open
} {
Fl_Window settings_window {
label {GUI Settings} open
xywh {397 774 255 179} visible
xywh {397 774 255 175} visible
} {
Fl_Button {} {
label Close
@ -120,7 +120,7 @@ Function {make_settings_window()} {open
callback {Fl_Tooltip::enable(tooltips_button->value());
fluid_prefs.set("show_tooltips", tooltips_button->value());}
xywh {20 45 215 20} down_box DOWN_BOX
code0 {char b;}
code0 {int b;}
code1 {fluid_prefs.get("show_tooltips", b, 1);}
code2 {tooltips_button->value(b);}
code3 {Fl_Tooltip::enable(b);}
@ -129,15 +129,15 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
label {Show Completion Dialogs}
callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
xywh {20 75 215 20} down_box DOWN_BOX
code0 {char b;}
code0 {int b;}
code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
code2 {completion_button->value(b);}
}
Fl_Check_Button openlast_button {
label {Open Previous File on Startup}
callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
callback {fluid_prefs.set("open_previous_file", openlast_button->value());} selected
xywh {20 105 215 20} down_box DOWN_BOX
code0 {char b;}
code0 {int b;}
code1 {fluid_prefs.get("open_previous_file", b, 0);}
code2 {openlast_button->value(b);}
}
@ -170,7 +170,7 @@ Function {make_shell_window()} {open
label {Save .FL File}
callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());}
xywh {20 65 110 20} down_box DOWN_BOX
code0 {char b;}
code0 {int b;}
code1 {fluid_prefs.get("shell_savefl", b, 1);}
code2 {shell_savefl_button->value(b);}
}
@ -178,7 +178,7 @@ Function {make_shell_window()} {open
label {Write Code}
callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());}
xywh {140 65 95 20} down_box DOWN_BOX
code0 {char b;}
code0 {int b;}
code1 {fluid_prefs.get("shell_writecode", b, 1);}
code2 {shell_writecode_button->value(b);}
}
@ -186,7 +186,7 @@ Function {make_shell_window()} {open
label {Write Messages}
callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());}
xywh {245 65 130 20} down_box DOWN_BOX
code0 {char b;}
code0 {int b;}
code1 {fluid_prefs.get("shell_writemsgs", b, 0);}
code2 {shell_writemsgs_button->value(b);}
}

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Preferences.cxx,v 1.1.2.15 2002/05/17 21:17:05 matthiaswm Exp $"
// "$Id: Fl_Preferences.cxx,v 1.1.2.16 2002/05/31 19:27:56 easysw Exp $"
//
// Preferences methods for the Fast Light Tool Kit (FLTK).
//
@ -189,32 +189,6 @@ char Fl_Preferences::deleteEntry( const char *key )
}
/**
* read an entry from the group
* - a default value must be supplied
* - the return value indicates, if the value was not available and the default was used (0)
* example: button.get( "visible", b.visible, 1 );
*/
char Fl_Preferences::get( const char *key, char &value, char defaultValue )
{
const char *v = node->get( key );
value = v ? atoi( v ) : defaultValue;
return ( v != 0 );
}
/**
* set an entry (name/value pair)
*/
char Fl_Preferences::set( const char *key, char value )
{
sprintf( nameBuffer, "%d", value );
node->set( key, nameBuffer );
return 1;
}
/**
* read an entry from the group
*/
@ -1076,5 +1050,5 @@ char Fl_Preferences::Node::remove()
//
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.15 2002/05/17 21:17:05 matthiaswm Exp $".
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.16 2002/05/31 19:27:56 easysw Exp $".
//

View File

@ -185,7 +185,7 @@ Function {} {open return_type int
Function {readPrefs()} {open return_type void
} {
code {char boolValue;
code {int boolValue;
int intValue;
char buffer[80];
double doubleValue;