summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-02-27 22:38:25 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-02-27 22:38:25 +0000
commitc35463fdbee1563f7216757ba039cfb89b188897 (patch)
tree19f30bcf09879b180a8348d7750025713eadad15 /fluid
parent5f1ca6a2b05da2905c7c92916acab165db3164b4 (diff)
Starting to add a GUI to manage the IDE database.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7169 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Type.h2
-rw-r--r--fluid/alignment_panel.cxx43
-rw-r--r--fluid/alignment_panel.fl89
-rw-r--r--fluid/alignment_panel.h3
-rw-r--r--fluid/fluid.cxx57
-rw-r--r--fluid/ide_support.cxx19
-rw-r--r--fluid/ide_support.h4
-rw-r--r--fluid/ide_support_ui.cxx86
-rw-r--r--fluid/ide_support_ui.fl90
-rw-r--r--fluid/ide_support_ui.h46
-rw-r--r--fluid/ide_visualc.cxx1
-rw-r--r--fluid/ide_xcode.cxx1
12 files changed, 356 insertions, 85 deletions
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h
index 9390a23e7..49800b6c5 100644
--- a/fluid/Fl_Type.h
+++ b/fluid/Fl_Type.h
@@ -825,6 +825,8 @@ public:
virtual int test(const char *a1=0L, const char *a2=0L, const char *a3=0L) {
return 0;
}
+ // show a GUI panel to edit some data
+ virtual void show_panel() { }
};
diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx
index 5d2295e53..f62f268f9 100644
--- a/fluid/alignment_panel.cxx
+++ b/fluid/alignment_panel.cxx
@@ -217,6 +217,17 @@ fluid_prefs.set("show_comments", show_comments);
redraw_browser();
}
+Fl_Check_Button *show_coredevmenus_button=(Fl_Check_Button *)0;
+
+static void cb_show_coredevmenus_button(Fl_Check_Button*, void*) {
+ show_coredevmenus = show_coredevmenus_button->value();
+fluid_prefs.set("show_coredevmenus", show_coredevmenus);
+if (show_coredevmenus)
+ dbmanager_item->show();
+else
+ dbmanager_item->hide();
+}
+
Fl_Spinner *recent_spinner=(Fl_Spinner *)0;
static void cb_recent_spinner(Fl_Spinner*, void*) {
@@ -229,8 +240,8 @@ static void cb_Close1(Fl_Button*, void*) {
}
Fl_Double_Window* make_settings_window() {
- { settings_window = new Fl_Double_Window(342, 242, "GUI Settings");
- { scheme_choice = new Fl_Choice(116, 10, 115, 25, "Scheme:");
+ { settings_window = new Fl_Double_Window(342, 269, "GUI Settings");
+ { scheme_choice = new Fl_Choice(116, 10, 115, 25, "Scheme: ");
scheme_choice->down_box(FL_BORDER_BOX);
scheme_choice->labelfont(1);
scheme_choice->callback((Fl_Callback*)scheme_cb);
@@ -240,10 +251,14 @@ Fl_Double_Window* make_settings_window() {
scheme_choice->value(s);
scheme_cb(0, 0);
} // Fl_Choice* scheme_choice
- { Fl_Group* o = new Fl_Group(70, 40, 266, 128, "Options:\n\n\n\n\n");
+ { Fl_Group* o = new Fl_Group(116, 43, 220, 149);
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_LEFT));
- { tooltips_button = new Fl_Check_Button(116, 40, 113, 25, "Show Tooltips");
+ { Fl_Box* o = new Fl_Box(116, 43, 1, 25, "Options: ");
+ o->labelfont(1);
+ o->align(Fl_Align(FL_ALIGN_LEFT));
+ } // Fl_Box* o
+ { tooltips_button = new Fl_Check_Button(116, 43, 113, 25, "Show Tooltips");
tooltips_button->down_box(FL_DOWN_BOX);
tooltips_button->callback((Fl_Callback*)cb_tooltips_button);
int b;
@@ -251,38 +266,44 @@ Fl_Double_Window* make_settings_window() {
tooltips_button->value(b);
Fl_Tooltip::enable(b);
} // Fl_Check_Button* tooltips_button
- { completion_button = new Fl_Check_Button(116, 65, 186, 25, "Show Completion Dialogs");
+ { completion_button = new Fl_Check_Button(116, 68, 186, 25, "Show Completion Dialogs");
completion_button->down_box(FL_DOWN_BOX);
completion_button->callback((Fl_Callback*)cb_completion_button);
int b;
fluid_prefs.get("show_completion_dialogs", b, 1);
completion_button->value(b);
} // Fl_Check_Button* completion_button
- { openlast_button = new Fl_Check_Button(115, 90, 215, 25, "Open Previous File on Startup");
+ { openlast_button = new Fl_Check_Button(116, 93, 214, 25, "Open Previous File on Startup");
openlast_button->down_box(FL_DOWN_BOX);
openlast_button->callback((Fl_Callback*)cb_openlast_button);
int b;
fluid_prefs.get("open_previous_file", b, 0);
openlast_button->value(b);
} // Fl_Check_Button* openlast_button
- { prevpos_button = new Fl_Check_Button(115, 115, 210, 25, "Remember Window Positions");
+ { prevpos_button = new Fl_Check_Button(116, 118, 209, 25, "Remember Window Positions");
prevpos_button->down_box(FL_DOWN_BOX);
prevpos_button->callback((Fl_Callback*)cb_prevpos_button);
int b;
fluid_prefs.get("prev_window_pos", b, 1);
prevpos_button->value(b);
} // Fl_Check_Button* prevpos_button
- { show_comments_button = new Fl_Check_Button(115, 140, 210, 25, "Show Comments in Browser");
+ { show_comments_button = new Fl_Check_Button(116, 143, 209, 25, "Show Comments in Browser");
show_comments_button->down_box(FL_DOWN_BOX);
show_comments_button->callback((Fl_Callback*)cb_show_comments_button);
fluid_prefs.get("show_comments", show_comments, 1);
show_comments_button->value(show_comments);
} // Fl_Check_Button* show_comments_button
+ { show_coredevmenus_button = new Fl_Check_Button(116, 167, 209, 25, "Show Core Developer Menus");
+ show_coredevmenus_button->down_box(FL_DOWN_BOX);
+ show_coredevmenus_button->callback((Fl_Callback*)cb_show_coredevmenus_button);
+ fluid_prefs.get("show_coredevmenus", show_coredevmenus, 0);
+ show_coredevmenus_button->value(show_coredevmenus);
+ if (!show_coredevmenus) dbmanager_item->hide();
+ } // Fl_Check_Button* show_coredevmenus_button
o->end();
} // Fl_Group* o
- { recent_spinner = new Fl_Spinner(115, 170, 40, 25, "# Recent Files:");
+ { recent_spinner = new Fl_Spinner(115, 199, 40, 25, "# Recent Files: ");
recent_spinner->labelfont(1);
- recent_spinner->value(1);
recent_spinner->callback((Fl_Callback*)cb_recent_spinner);
recent_spinner->when(FL_WHEN_CHANGED);
int c;
@@ -290,7 +311,7 @@ Fl_Double_Window* make_settings_window() {
recent_spinner->maximum(10);
recent_spinner->value(c);
} // Fl_Spinner* recent_spinner
- { Fl_Button* o = new Fl_Button(266, 205, 64, 25, "Close");
+ { Fl_Button* o = new Fl_Button(266, 231, 64, 25, "Close");
o->tooltip("Close this dialog.");
o->callback((Fl_Callback*)cb_Close1);
} // Fl_Button* o
diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl
index bf2b074c4..463a5febc 100644
--- a/fluid/alignment_panel.fl
+++ b/fluid/alignment_panel.fl
@@ -31,26 +31,31 @@ comment {//
} {in_source in_header
}
-decl {\#include <FL/Fl_Text_Buffer.H>} {public
+decl {\#include <FL/Fl_Text_Buffer.H>} {public local
}
-decl {\#include <FL/Fl_Text_Display.H>} {public
+decl {\#include <FL/Fl_Text_Display.H>} {public local
}
-decl {extern void load_history();} {public
+decl {extern void load_history();} {public local
}
-decl {extern void redraw_browser();} {public
+decl {extern void redraw_browser();} {public local
}
-decl {extern int show_comments;} {public
+decl {extern int show_comments;} {public local
}
-Function {make_project_window()} {selected
-} {
+decl {extern int show_coredevmenus;} {public local
+}
+
+decl {extern class Fl_Menu_Item *dbmanager_item;} {public local
+}
+
+Function {make_project_window()} {} {
Fl_Window project_window {
label {Project Settings}
- xywh {312 395 358 207} type Double
+ xywh {393 460 358 207} type Double
code0 {\#include <FL/Fl_Preferences.H>}
code1 {\#include <FL/Fl_Tooltip.H>} modal visible
} {
@@ -140,26 +145,25 @@ Function {make_project_window()} {selected
}
}
-decl {extern void i18n_cb(Fl_Choice *,void *);} {public
+decl {extern void i18n_cb(Fl_Choice *,void *);} {public local
}
-decl {extern Fl_Preferences fluid_prefs;} {public
+decl {extern Fl_Preferences fluid_prefs;} {public local
}
-decl {Fl_Text_Buffer *shell_run_buffer;} {public
+decl {Fl_Text_Buffer *shell_run_buffer;} {public local
}
-decl {void scheme_cb(Fl_Choice *, void *);} {public
+decl {void scheme_cb(Fl_Choice *, void *);} {public local
}
-Function {make_settings_window()} {open
-} {
+Function {make_settings_window()} {} {
Fl_Window settings_window {
label {GUI Settings} open
- xywh {393 191 342 242} type Double non_modal visible
+ xywh {393 191 342 269} type Double non_modal visible
} {
Fl_Choice scheme_choice {
- label {Scheme:}
+ label {Scheme: }
callback scheme_cb open
xywh {116 10 115 25} down_box BORDER_BOX labelfont 1
code0 {int s;}
@@ -184,20 +188,18 @@ Function {make_settings_window()} {open
xywh {10 10 35 25}
}
}
- Fl_Group {} {
- label {Options:
-
-
-
-
-} open
- xywh {70 40 266 128} labelfont 1 align 4
+ Fl_Group {} {open
+ xywh {116 43 220 149} labelfont 1 align 4
} {
+ Fl_Box {} {
+ label {Options: }
+ xywh {116 43 1 25} labelfont 1 align 4
+ }
Fl_Check_Button tooltips_button {
label {Show Tooltips}
callback {Fl_Tooltip::enable(tooltips_button->value());
fluid_prefs.set("show_tooltips", tooltips_button->value());}
- xywh {116 40 113 25} down_box DOWN_BOX
+ xywh {116 43 113 25} down_box DOWN_BOX
code0 {int b;}
code1 {fluid_prefs.get("show_tooltips", b, 1);}
code2 {tooltips_button->value(b);}
@@ -206,7 +208,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button completion_button {
label {Show Completion Dialogs}
callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
- xywh {116 65 186 25} down_box DOWN_BOX
+ xywh {116 68 186 25} down_box DOWN_BOX
code0 {int b;}
code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
code2 {completion_button->value(b);}
@@ -214,7 +216,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button openlast_button {
label {Open Previous File on Startup}
callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
- xywh {115 90 215 25} down_box DOWN_BOX
+ xywh {116 93 214 25} down_box DOWN_BOX
code0 {int b;}
code1 {fluid_prefs.get("open_previous_file", b, 0);}
code2 {openlast_button->value(b);}
@@ -222,7 +224,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button prevpos_button {
label {Remember Window Positions}
callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());}
- xywh {115 115 210 25} down_box DOWN_BOX
+ xywh {116 118 209 25} down_box DOWN_BOX
code0 {int b;}
code1 {fluid_prefs.get("prev_window_pos", b, 1);}
code2 {prevpos_button->value(b);}
@@ -232,16 +234,29 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
callback {show_comments = show_comments_button->value();
fluid_prefs.set("show_comments", show_comments);
redraw_browser();}
- xywh {115 140 210 25} down_box DOWN_BOX
+ xywh {116 143 209 25} down_box DOWN_BOX
code1 {fluid_prefs.get("show_comments", show_comments, 1);}
code2 {show_comments_button->value(show_comments);}
}
+ Fl_Check_Button show_coredevmenus_button {
+ label {Show Core Developer Menus}
+ callback {show_coredevmenus = show_coredevmenus_button->value();
+fluid_prefs.set("show_coredevmenus", show_coredevmenus);
+if (show_coredevmenus)
+ dbmanager_item->show();
+else
+ dbmanager_item->hide();}
+ xywh {116 167 209 25} down_box DOWN_BOX
+ code1 {fluid_prefs.get("show_coredevmenus", show_coredevmenus, 0);}
+ code2 {show_coredevmenus_button->value(show_coredevmenus);}
+ code3 {if (!show_coredevmenus) dbmanager_item->hide();}
+ }
}
Fl_Spinner recent_spinner {
- label {\# Recent Files:}
+ label {\# Recent Files: }
callback {fluid_prefs.set("recent_files", recent_spinner->value());
load_history();}
- xywh {115 170 40 25} labelfont 1 when 1 value 1
+ xywh {115 199 40 25} labelfont 1 when 1
code0 {int c;}
code1 {fluid_prefs.get("recent_files", c, 5);}
code2 {recent_spinner->maximum(10);}
@@ -250,16 +265,15 @@ load_history();}
Fl_Button {} {
label Close
callback {settings_window->hide();}
- tooltip {Close this dialog.} xywh {266 205 64 25}
+ tooltip {Close this dialog.} xywh {266 231 64 25}
}
}
}
-Function {make_shell_window()} {open
-} {
+Function {make_shell_window()} {} {
Fl_Window shell_window {
label {Shell Command}
- xywh {682 167 365 125} type Double visible
+ xywh {741 195 365 125} type Double visible
} {
Fl_Input shell_command_input {
label {Command:}
@@ -321,11 +335,10 @@ Function {make_shell_window()} {open
}
}
-Function {make_layout_window()} {open
-} {
+Function {make_layout_window()} {} {
Fl_Window grid_window {
label {Layout Settings} open
- xywh {676 337 285 245} type Double non_modal visible
+ xywh {760 427 285 245} type Double non_modal visible
} {
Fl_Input horizontal_input {
label x
diff --git a/fluid/alignment_panel.h b/fluid/alignment_panel.h
index 09de250d2..5051dac94 100644
--- a/fluid/alignment_panel.h
+++ b/fluid/alignment_panel.h
@@ -35,6 +35,8 @@
extern void load_history();
extern void redraw_browser();
extern int show_comments;
+extern int show_coredevmenus;
+extern class Fl_Menu_Item *dbmanager_item;
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Preferences.H>
#include <FL/Fl_Tooltip.H>
@@ -75,6 +77,7 @@ extern Fl_Check_Button *completion_button;
extern Fl_Check_Button *openlast_button;
extern Fl_Check_Button *prevpos_button;
extern Fl_Check_Button *show_comments_button;
+extern Fl_Check_Button *show_coredevmenus_button;
#include <FL/Fl_Spinner.H>
extern Fl_Spinner *recent_spinner;
Fl_Double_Window* make_settings_window();
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index d01c2cbbd..d099d05ff 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php
//
-#undef IDE_SUPPORT
+#define IDE_SUPPORT
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
@@ -102,6 +102,7 @@ int gridy = 5;
int snap = 1;
int show_guides = 1;
int show_comments = 1;
+int show_coredevmenus = 1;
// File history info...
char absolute_history[10][1024];
@@ -117,6 +118,7 @@ Fl_Menu_Item *save_item = 0L;
Fl_Menu_Item *history_item = 0L;
Fl_Menu_Item *widgetbin_item = 0L;
Fl_Menu_Item *sourceview_item = 0L;
+Fl_Menu_Item *dbmanager_item = 0L;
////////////////////////////////////////////////////////////////
@@ -1579,43 +1581,28 @@ void print_cb(Fl_Return_Button *, void *) {
}
#endif // WIN32 && !__CYGWIN__
-void fltkdb_cb(Fl_Widget*, void*)
-{
- int i;
+void fltkdb_cb(Fl_Widget*, void*) {
Fl_Plugin_Manager pm("commandline");
- for (i=0; i<pm.plugins(); i++) {
- Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin(i);
- if (strcmp(pi->name(), "FltkDB.fluid.fltk.org")==0) {
- pi->test("/Users/matt/dev/fltk-1.3.0/fltk.db");
- break;
- }
- }
+ Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin("FltkDB.fluid.fltk.org");
+ if (pi) pi->test("/Users/matt/dev/fltk-1.3.0/fltk.db");
}
-void dbxcode_cb(Fl_Widget*, void*)
-{
- int i;
+void dbxcode_cb(Fl_Widget*, void*) {
Fl_Plugin_Manager pm("commandline");
- for (i=0; i<pm.plugins(); i++) {
- Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin(i);
- if (strcmp(pi->name(), "ideXcode.fluid.fltk.org")==0) {
- pi->test("/Users/matt/dev/fltk-1.3.0/fltk.db", "/Users/matt/dev/fltk-test");
- break;
- }
- }
+ Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin("ideXcode.fluid.fltk.org");
+ if (pi) pi->test("/Users/matt/dev/fltk-1.3.0/fltk.db", "/Users/matt/dev/fltk-1.3.0");
}
-void dbvisualc_cb(Fl_Widget*, void*)
-{
- int i;
+void dbvisualc_cb(Fl_Widget*, void*) {
Fl_Plugin_Manager pm("commandline");
- for (i=0; i<pm.plugins(); i++) {
- Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin(i);
- if (strcmp(pi->name(), "ideVisualC.fluid.fltk.org")==0) {
- pi->test("/Users/matt/dev/fltk-1.3.0/fltk.db", "/Users/matt/dev/fltk-1.3.0");
- break;
- }
- }
+ Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin("ideVisualC.fluid.fltk.org");
+ if (pi) pi->test("/Users/matt/dev/fltk-1.3.0/fltk.db", "/Users/matt/dev/fltk-1.3.0");
+}
+
+void show_dbmanager_cb(Fl_Widget*, void*) {
+ Fl_Plugin_Manager pm("commandline");
+ Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin("FltkDB.fluid.fltk.org");
+ if (pi) pi->show_panel();
}
////////////////////////////////////////////////////////////////
@@ -1671,6 +1658,7 @@ Fl_Menu_Item Main_Menu[] = {
{"Show Source Code...",FL_ALT+FL_SHIFT+'s', (Fl_Callback*)toggle_sourceview_cb, 0, FL_MENU_DIVIDER},
{"Pro&ject Settings...",FL_ALT+'p',show_project_cb},
{"GU&I Settings...",FL_ALT+FL_SHIFT+'p',show_settings_cb},
+ {"Manage &FLTK Database...",0,show_dbmanager_cb},
{0},
{"&New", 0, 0, (void *)New_Menu, FL_SUBMENU_POINTER},
{"&Layout",0,0,0,FL_SUBMENU},
@@ -1715,9 +1703,9 @@ Fl_Menu_Item Main_Menu[] = {
#endif
{0},
{"&Help",0,0,0,FL_SUBMENU},
+ {"&Rapid development with FLUID...",0,help_cb},
+ {"&FLTK Programmers Manual...",0,manual_cb, 0, FL_MENU_DIVIDER},
{"&About FLUID...",0,about_cb},
- {"&On FLUID...",0,help_cb},
- {"&Manual...",0,manual_cb},
{0},
{0}};
@@ -1807,7 +1795,6 @@ void make_main_window() {
fluid_prefs.get("widget_size", Fl_Widget_Type::default_size, 14);
fluid_prefs.get("show_comments", show_comments, 1);
make_layout_window();
- make_settings_window();
make_shell_window();
}
@@ -1826,6 +1813,7 @@ void make_main_window() {
history_item = (Fl_Menu_Item*)main_menubar->find_item(open_history_cb);
widgetbin_item = (Fl_Menu_Item*)main_menubar->find_item(toggle_widgetbin_cb);
sourceview_item = (Fl_Menu_Item*)main_menubar->find_item((Fl_Callback*)toggle_sourceview_cb);
+ dbmanager_item = (Fl_Menu_Item*)main_menubar->find_item((Fl_Callback*)show_dbmanager_cb);
main_menubar->global();
fill_in_New_Menu();
main_window->end();
@@ -1833,6 +1821,7 @@ void make_main_window() {
if (!compile_only) {
load_history();
+ make_settings_window();
}
}
diff --git a/fluid/ide_support.cxx b/fluid/ide_support.cxx
index 41ccd60d2..53362928b 100644
--- a/fluid/ide_support.cxx
+++ b/fluid/ide_support.cxx
@@ -103,6 +103,7 @@
*/
#include "ide_support.h"
+#include "ide_support_ui.h"
#include <FL/Fl.H>
#include <FL/fl_ask.H>
@@ -632,6 +633,7 @@ int create_new_database(const char *filename)
fluid_app.add_source(files_db, "fluid/fluid.cxx");
fluid_app.add_source(files_db, "fluid/function_panel.cxx");
fluid_app.add_source(files_db, "fluid/ide_support.cxx");
+ fluid_app.add_source(files_db, "fluid/ide_support_ui.cxx");
fluid_app.add_source(files_db, "fluid/ide_visualc.cxx");
fluid_app.add_source(files_db, "fluid/ide_xcode.cxx");
fluid_app.add_source(files_db, "fluid/template_panel.cxx");
@@ -1125,11 +1127,21 @@ int create_new_database(const char *filename)
demo_db.depends_on(db);
}
- db->flush();
+ db->flush();
+ delete db;
return 0;
}
+void ui_load_database(const char *filename)
+{
+ Fl_Preferences *db = new Fl_Preferences(filename, "fltk.org", 0);
+ db->copyTo(dbmanager_tree);
+ dbmanager_tree->redraw();
+ delete db;
+}
+
+
// Make this module into a plugin
extern int exit_early;
@@ -1160,6 +1172,11 @@ public:
create_new_database(a1);
return 0;
}
+ void show_panel() {
+ if (!dbmanager_window)
+ make_dbmanager_window();
+ dbmanager_window->show();
+ }
};
Fl_FltkDB_Plugin FltkDB_Plugin;
diff --git a/fluid/ide_support.h b/fluid/ide_support.h
index adca73c99..bb74ed9e4 100644
--- a/fluid/ide_support.h
+++ b/fluid/ide_support.h
@@ -103,8 +103,10 @@ char with_xcode(Fl_Preferences::ID id);
char with_visualc(Fl_Preferences::ID id);
char with_makefile(Fl_Preferences::ID id);
+void ui_load_database(const char *filename);
+
#endif
//
// End of "$Id: ide_support.h 6981 2009-12-25 20:53:22Z matt $".
-// \ No newline at end of file
+//
diff --git a/fluid/ide_support_ui.cxx b/fluid/ide_support_ui.cxx
new file mode 100644
index 000000000..5211b049d
--- /dev/null
+++ b/fluid/ide_support_ui.cxx
@@ -0,0 +1,86 @@
+//
+// "$Id: ide_support_ui.fl 6614 2009-01-01 16:11:32Z matt $"
+//
+// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2009 by Bill Spitzak and others.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// generated by Fast Light User Interface Designer (fluid) version 1.0300
+
+#include "ide_support_ui.h"
+#include "ide_support.h"
+#include <FL/Fl_File_Chooser.H>
+
+Fl_Double_Window *dbmanager_window=(Fl_Double_Window *)0;
+
+static void cb_fileopen(Fl_Button*, void*) {
+ const char *filename = fl_file_chooser("Load Database", "*.db", 0, 0);
+if (filename) {
+ ui_load_database(filename);
+};
+}
+
+Fl_Tree *dbmanager_tree=(Fl_Tree *)0;
+
+Fl_Double_Window* make_dbmanager_window() {
+ { dbmanager_window = new Fl_Double_Window(409, 510);
+ { new Fl_File_Input(80, 4, 280, 36, "Database:");
+ } // Fl_File_Input* o
+ { Fl_Button* o = new Fl_Button(360, 14, 36, 26, "@fileopen");
+ o->labelcolor((Fl_Color)94);
+ o->callback((Fl_Callback*)cb_fileopen);
+ } // Fl_Button* o
+ { dbmanager_tree = new Fl_Tree(12, 52, 208, 444);
+ dbmanager_tree->box(FL_DOWN_BOX);
+ dbmanager_tree->color((Fl_Color)55);
+ dbmanager_tree->selection_color(FL_BACKGROUND_COLOR);
+ dbmanager_tree->labeltype(FL_NORMAL_LABEL);
+ dbmanager_tree->labelfont(0);
+ dbmanager_tree->labelsize(14);
+ dbmanager_tree->labelcolor(FL_FOREGROUND_COLOR);
+ dbmanager_tree->align(Fl_Align(FL_ALIGN_CENTER));
+ dbmanager_tree->when(FL_WHEN_RELEASE);
+ Fl_Group::current()->resizable(dbmanager_tree);
+ dbmanager_tree->showroot(0);
+ dbmanager_tree->labelsize(12);
+ } // Fl_Tree* dbmanager_tree
+ { Fl_Group* o = new Fl_Group(232, 52, 164, 444);
+ { new Fl_Button(304, 468, 92, 28, "Close");
+ } // Fl_Button* o
+ { Fl_Group* o = new Fl_Group(232, 128, 164, 340);
+ o->end();
+ Fl_Group::current()->resizable(o);
+ } // Fl_Group* o
+ { Fl_Box* o = new Fl_Box(232, 52, 164, 76, "Show editor\nfor selected\nItem here");
+ o->box(FL_THIN_DOWN_BOX);
+ } // Fl_Box* o
+ o->end();
+ } // Fl_Group* o
+ dbmanager_window->end();
+ } // Fl_Double_Window* dbmanager_window
+ return dbmanager_window;
+}
+
+//
+// End of "$Id: ide_support_ui.fl 6614 2009-01-01 16:11:32Z matt $".
+//
diff --git a/fluid/ide_support_ui.fl b/fluid/ide_support_ui.fl
new file mode 100644
index 000000000..75f38ad2b
--- /dev/null
+++ b/fluid/ide_support_ui.fl
@@ -0,0 +1,90 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 1.0300
+header_name {.h}
+code_name {.cxx}
+comment {//
+// "$Id: ide_support_ui.fl 6614 2009-01-01 16:11:32Z matt $"
+//
+// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2009 by Bill Spitzak and others.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+} {in_source in_header
+}
+
+decl {\#include <FL/Fl_Tree.H>} {public local
+}
+
+decl {\#include "ide_support.h"} {private global
+}
+
+decl {\#include <FL/Fl_File_Chooser.H>} {selected private global
+}
+
+Function {make_dbmanager_window()} {open
+} {
+ Fl_Window dbmanager_window {open
+ xywh {459 167 409 510} type Double resizable visible
+ } {
+ Fl_File_Input {} {
+ label {Database:}
+ xywh {80 4 280 36}
+ }
+ Fl_Button {} {
+ label {@fileopen}
+ callback {const char *filename = fl_file_chooser("Load Database", "*.db", 0, 0);
+if (filename) {
+ ui_load_database(filename);
+}}
+ xywh {360 14 36 26} labelcolor 94
+ }
+ Fl_Box dbmanager_tree {
+ xywh {12 52 208 444} box DOWN_BOX color 55 resizable
+ code0 {dbmanager_tree->showroot(0);}
+ code1 {dbmanager_tree->labelsize(12);}
+ class Fl_Tree
+ }
+ Fl_Group {} {open
+ xywh {232 52 164 444}
+ } {
+ Fl_Button {} {
+ label Close
+ xywh {304 468 92 28}
+ }
+ Fl_Group {} {open
+ xywh {232 128 164 340} resizable
+ } {}
+ Fl_Box {} {
+ label {Show editor
+for selected
+Item here}
+ xywh {232 52 164 76} box THIN_DOWN_BOX
+ }
+ }
+ }
+}
+
+comment {
+//
+// End of "$Id: ide_support_ui.fl 6614 2009-01-01 16:11:32Z matt $".
+//} {in_source in_header
+}
diff --git a/fluid/ide_support_ui.h b/fluid/ide_support_ui.h
new file mode 100644
index 000000000..9d36a0490
--- /dev/null
+++ b/fluid/ide_support_ui.h
@@ -0,0 +1,46 @@
+//
+// "$Id: ide_support_ui.fl 6614 2009-01-01 16:11:32Z matt $"
+//
+// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2009 by Bill Spitzak and others.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+// generated by Fast Light User Interface Designer (fluid) version 1.0300
+
+#ifndef ide_support_ui_h
+#define ide_support_ui_h
+#include <FL/Fl.H>
+#include <FL/Fl_Tree.H>
+#include <FL/Fl_Double_Window.H>
+extern Fl_Double_Window *dbmanager_window;
+#include <FL/Fl_File_Input.H>
+#include <FL/Fl_Button.H>
+extern Fl_Tree *dbmanager_tree;
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Box.H>
+Fl_Double_Window* make_dbmanager_window();
+#endif
+
+//
+// End of "$Id: ide_support_ui.fl 6614 2009-01-01 16:11:32Z matt $".
+//
diff --git a/fluid/ide_visualc.cxx b/fluid/ide_visualc.cxx
index 3011238f2..68baaf177 100644
--- a/fluid/ide_visualc.cxx
+++ b/fluid/ide_visualc.cxx
@@ -764,6 +764,7 @@ void generate_fltk_VisualC6_support(const char *filename, const char *targetpath
new Fl_Preferences(filename, "fltk.org", 0);
VisualC6_IDE ide(*db, targetpath);
ide.write();
+ delete db;
return;
}
diff --git a/fluid/ide_xcode.cxx b/fluid/ide_xcode.cxx
index 79c9b9dd3..361013445 100644
--- a/fluid/ide_xcode.cxx
+++ b/fluid/ide_xcode.cxx
@@ -1664,6 +1664,7 @@ void generate_fltk_Xcode3_support(const char *filename, const char *targetpath)
new Fl_Preferences(filename, "fltk.org", 0);
Xcode3_IDE ide(*db, targetpath);
ide.write();
+ delete db;
return;
}