More FLUID IDE file generation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7225 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
7a9f415c65
commit
a2547a31a0
@ -635,6 +635,7 @@ int create_new_database(const char *filename)
|
||||
fluid_app.add_source(files_db, "fluid/file.cxx");
|
||||
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_maketools.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");
|
||||
@ -1135,6 +1136,31 @@ int create_new_database(const char *filename)
|
||||
return 0;
|
||||
}
|
||||
|
||||
class Item_Manager {
|
||||
Fl_Preferences::ID id;
|
||||
public:
|
||||
Item_Manager(Fl_Preferences::ID idA) { id = idA; }
|
||||
virtual ~Item_Manager() { }
|
||||
virtual void select(Fl_Tree_Item *) { dbm_wizard->value(dbm_empty); }
|
||||
};
|
||||
|
||||
class Test_Item_Manager : public Item_Manager {
|
||||
Fl_Preferences::ID id;
|
||||
public:
|
||||
Test_Item_Manager(Fl_Preferences::ID idA) : Item_Manager(idA) { }
|
||||
virtual void select(Fl_Tree_Item *ti) {
|
||||
dbm_wizard->value(dbm_test);
|
||||
dbm_test_name->value(ti->label());
|
||||
}
|
||||
};
|
||||
|
||||
void tree_item_cb(Fl_Tree *t, void *) {
|
||||
Fl_Tree_Item *ti = t->item_clicked();
|
||||
Item_Manager *im = (Item_Manager*)ti->user_data();
|
||||
if (im) {
|
||||
im->select(ti);
|
||||
}
|
||||
}
|
||||
|
||||
void ui_load_database(const char *filename)
|
||||
{
|
||||
@ -1142,6 +1168,8 @@ void ui_load_database(const char *filename)
|
||||
float v = 0.0f;
|
||||
int i, j;
|
||||
|
||||
dbmanager_tree->callback((Fl_Callback*)tree_item_cb);
|
||||
|
||||
// FIXME: must be global, so we can close it
|
||||
Fl_Preferences *db = new Fl_Preferences(filename, "fltk.org", 0);
|
||||
|
||||
@ -1185,17 +1213,21 @@ void ui_load_database(const char *filename)
|
||||
|
||||
// load all tests
|
||||
ti = dbmanager_tree->add("Applications");
|
||||
ti->user_data(new Item_Manager(0L));
|
||||
|
||||
// load all tests
|
||||
ti = dbmanager_tree->add("Libraries & Frameworks");
|
||||
ti->user_data(new Item_Manager(0L));
|
||||
|
||||
// load all tests
|
||||
ti = dbmanager_tree->add("Test Applications");
|
||||
ti->user_data(new Item_Manager(0L));
|
||||
Fl_Preferences testsDB(targetsDB, "tests");
|
||||
for (i=0; i<testsDB.groups(); i++) {
|
||||
Fl_Preferences testDB(testsDB, i);
|
||||
testDB.get("name", buf, "DB-Error", 1024);
|
||||
Fl_Tree_Item *tt = dbmanager_tree->add(ti, buf); tt->close();
|
||||
tt->user_data(new Test_Item_Manager(testDB.id()));
|
||||
|
||||
if (testDB.groupExists("sources")) {
|
||||
Fl_Tree_Item *ts = dbmanager_tree->add(tt, "Sources"); ts->close();
|
||||
@ -1205,7 +1237,6 @@ void ui_load_database(const char *filename)
|
||||
srcDB.get("refUUID", buf, "DBERROR", 1024);
|
||||
Fl_File_Prefs fileDB(filesDB, buf);
|
||||
Fl_Tree_Item *tb = dbmanager_tree->add(ts, fileDB.fullName());
|
||||
tb->user_data(0L); // TODO: add the callback information here
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,26 @@ if (filename) {
|
||||
};
|
||||
}
|
||||
|
||||
Fl_Wizard *dbm_wizard=(Fl_Wizard *)0;
|
||||
|
||||
Fl_Group *dbm_empty=(Fl_Group *)0;
|
||||
|
||||
Fl_Group *dbm_app=(Fl_Group *)0;
|
||||
|
||||
Fl_Input *dbm_app_name=(Fl_Input *)0;
|
||||
|
||||
Fl_Group *dbm_lib=(Fl_Group *)0;
|
||||
|
||||
Fl_Input *dbm_lib_name=(Fl_Input *)0;
|
||||
|
||||
Fl_Group *dbm_test=(Fl_Group *)0;
|
||||
|
||||
Fl_Input *dbm_test_name=(Fl_Input *)0;
|
||||
|
||||
Fl_Group *dbm_sources=(Fl_Group *)0;
|
||||
|
||||
Fl_Group *dbm_source=(Fl_Group *)0;
|
||||
|
||||
Fl_Double_Window* make_dbmanager_window() {
|
||||
{ dbmanager_window = new Fl_Double_Window(427, 500);
|
||||
{ dbmanager_tree = new Fl_Tree(8, 8, 200, 480);
|
||||
@ -60,27 +80,124 @@ Fl_Double_Window* make_dbmanager_window() {
|
||||
dbmanager_tree->labelsize(14);
|
||||
dbmanager_tree->labelcolor(FL_FOREGROUND_COLOR);
|
||||
dbmanager_tree->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
dbmanager_tree->when(FL_WHEN_RELEASE);
|
||||
dbmanager_tree->when(FL_WHEN_CHANGED);
|
||||
Fl_Group::current()->resizable(dbmanager_tree);
|
||||
dbmanager_tree->showroot(0);
|
||||
dbmanager_tree->labelsize(12);
|
||||
} // Fl_Tree* dbmanager_tree
|
||||
{ Fl_Group* o = new Fl_Group(216, 8, 200, 444);
|
||||
o->box(FL_ENGRAVED_BOX);
|
||||
{ Fl_Group* o = new Fl_Group(224, 271, 184, 172);
|
||||
{ Fl_Group* o = new Fl_Group(224, 364, 184, 79);
|
||||
o->end();
|
||||
Fl_Group::current()->resizable(o);
|
||||
} // Fl_Group* o
|
||||
{ Fl_Box* o = new Fl_Box(224, 108, 184, 160, "Show editor\nfor selected\nItem here");
|
||||
o->box(FL_THIN_DOWN_BOX);
|
||||
} // Fl_Box* o
|
||||
{ Fl_Button* o = new Fl_Button(242, 60, 148, 28, "Open Database...");
|
||||
{ Fl_Button* o = new Fl_Button(240, 52, 152, 28, "Open Database...");
|
||||
o->callback((Fl_Callback*)cb_Open);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(242, 24, 148, 28, " (New Database... )");
|
||||
{ Fl_Button* o = new Fl_Button(240, 16, 152, 28, " (New Database... )");
|
||||
o->callback((Fl_Callback*)cb_New);
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ dbm_wizard = new Fl_Wizard(216, 92, 200, 272);
|
||||
dbm_wizard->box(FL_ENGRAVED_BOX);
|
||||
{ dbm_empty = new Fl_Group(216, 92, 200, 272);
|
||||
dbm_empty->hide();
|
||||
dbm_empty->end();
|
||||
} // Fl_Group* dbm_empty
|
||||
{ dbm_app = new Fl_Group(216, 92, 200, 272);
|
||||
dbm_app->hide();
|
||||
{ dbm_app_name = new Fl_Input(280, 108, 111, 24, "(Name:)");
|
||||
dbm_app_name->deactivate();
|
||||
} // Fl_Input* dbm_app_name
|
||||
{ Fl_Button* o = new Fl_Button(240, 140, 152, 28, " (New Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 176, 152, 28, " (Add Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 212, 152, 28, " (Add Library... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 248, 152, 28, " (Add Dependency... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 284, 152, 28, " (Add External Item... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 320, 152, 28, " (Remove Test...)");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
dbm_app->end();
|
||||
} // Fl_Group* dbm_app
|
||||
{ dbm_lib = new Fl_Group(216, 92, 200, 272);
|
||||
dbm_lib->hide();
|
||||
{ dbm_lib_name = new Fl_Input(280, 108, 111, 24, "(Name:)");
|
||||
dbm_lib_name->deactivate();
|
||||
} // Fl_Input* dbm_lib_name
|
||||
{ Fl_Button* o = new Fl_Button(240, 140, 152, 28, " (New Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 176, 152, 28, " (Add Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 212, 152, 28, " (Add Library... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 248, 152, 28, " (Add Dependency... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 284, 152, 28, " (Add External Item... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 320, 152, 28, " (Remove Test...)");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
dbm_lib->end();
|
||||
} // Fl_Group* dbm_lib
|
||||
{ dbm_test = new Fl_Group(216, 92, 200, 272);
|
||||
dbm_test->hide();
|
||||
{ dbm_test_name = new Fl_Input(280, 108, 111, 24, "(Name:)");
|
||||
dbm_test_name->deactivate();
|
||||
} // Fl_Input* dbm_test_name
|
||||
{ Fl_Button* o = new Fl_Button(240, 140, 152, 28, " (New Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 176, 152, 28, " (Add Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 212, 152, 28, " (Add Library... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 248, 152, 28, " (Add Dependency... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 284, 152, 28, " (Add External Item... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 320, 152, 28, " (Remove Test...)");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
dbm_test->end();
|
||||
} // Fl_Group* dbm_test
|
||||
{ dbm_sources = new Fl_Group(216, 92, 200, 128);
|
||||
dbm_sources->hide();
|
||||
{ Fl_Button* o = new Fl_Button(240, 104, 152, 28, " (New Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 140, 152, 28, " (Add Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(240, 176, 152, 28, " (Remove All Sources...)");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
dbm_sources->end();
|
||||
} // Fl_Group* dbm_sources
|
||||
{ dbm_source = new Fl_Group(216, 92, 200, 52);
|
||||
{ Fl_Button* o = new Fl_Button(240, 104, 152, 28, " (Remove Source... )");
|
||||
o->deactivate();
|
||||
} // Fl_Button* o
|
||||
dbm_source->end();
|
||||
} // Fl_Group* dbm_source
|
||||
dbm_wizard->end();
|
||||
} // Fl_Wizard* dbm_wizard
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Button* o = new Fl_Button(324, 460, 92, 28, "( Close )");
|
||||
|
@ -46,38 +46,158 @@ Function {make_dbmanager_window()} {open
|
||||
xywh {459 167 427 500} type Double resizable visible
|
||||
} {
|
||||
Fl_Box dbmanager_tree {
|
||||
xywh {8 8 200 480} box DOWN_BOX color 55 resizable
|
||||
xywh {8 8 200 480} box DOWN_BOX color 55 when 1 resizable
|
||||
code0 {dbmanager_tree->showroot(0);}
|
||||
code1 {dbmanager_tree->labelsize(12);}
|
||||
class Fl_Tree
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {216 8 200 444} box ENGRAVED_BOX
|
||||
xywh {216 8 200 444}
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {224 271 184 172} resizable
|
||||
xywh {224 364 184 79} resizable
|
||||
} {}
|
||||
Fl_Box {} {
|
||||
label {Show editor
|
||||
for selected
|
||||
Item here}
|
||||
xywh {224 108 184 160} box THIN_DOWN_BOX
|
||||
}
|
||||
Fl_Button {} {
|
||||
label {Open Database...}
|
||||
callback {const char *filename = fl_file_chooser("Load Database", "*.db", 0, 0);
|
||||
if (filename) {
|
||||
ui_load_database(filename);
|
||||
}}
|
||||
xywh {242 60 148 28}
|
||||
xywh {240 52 152 28}
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (New Database... )}
|
||||
callback {const char *filename = fl_file_chooser("Load Database", "*.db", 0, 0);
|
||||
if (filename) {
|
||||
ui_load_database(filename);
|
||||
}} selected
|
||||
xywh {242 24 148 28} deactivate
|
||||
}}
|
||||
xywh {240 16 152 28} deactivate
|
||||
}
|
||||
Fl_Wizard dbm_wizard {open selected
|
||||
xywh {216 92 200 272} box ENGRAVED_BOX
|
||||
} {
|
||||
Fl_Group dbm_empty {open
|
||||
xywh {216 92 200 272} hide
|
||||
} {}
|
||||
Fl_Group dbm_app {
|
||||
xywh {216 92 200 272} hide
|
||||
} {
|
||||
Fl_Input dbm_app_name {
|
||||
label {(Name:)}
|
||||
xywh {280 108 111 24} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (New Source... )}
|
||||
xywh {240 140 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Source... )}
|
||||
xywh {240 176 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Library... )}
|
||||
xywh {240 212 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Dependency... )}
|
||||
xywh {240 248 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add External Item... )}
|
||||
xywh {240 284 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Remove Test...)}
|
||||
xywh {240 320 152 28} deactivate
|
||||
}
|
||||
}
|
||||
Fl_Group dbm_lib {
|
||||
xywh {216 92 200 272} hide
|
||||
} {
|
||||
Fl_Input dbm_lib_name {
|
||||
label {(Name:)}
|
||||
xywh {280 108 111 24} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (New Source... )}
|
||||
xywh {240 140 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Source... )}
|
||||
xywh {240 176 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Library... )}
|
||||
xywh {240 212 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Dependency... )}
|
||||
xywh {240 248 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add External Item... )}
|
||||
xywh {240 284 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Remove Test...)}
|
||||
xywh {240 320 152 28} deactivate
|
||||
}
|
||||
}
|
||||
Fl_Group dbm_test {
|
||||
xywh {216 92 200 272} hide
|
||||
} {
|
||||
Fl_Input dbm_test_name {
|
||||
label {(Name:)}
|
||||
xywh {280 108 111 24} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (New Source... )}
|
||||
xywh {240 140 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Source... )}
|
||||
xywh {240 176 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Library... )}
|
||||
xywh {240 212 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Dependency... )}
|
||||
xywh {240 248 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add External Item... )}
|
||||
xywh {240 284 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Remove Test...)}
|
||||
xywh {240 320 152 28} deactivate
|
||||
}
|
||||
}
|
||||
Fl_Group dbm_sources {
|
||||
xywh {216 92 200 128} hide
|
||||
} {
|
||||
Fl_Button {} {
|
||||
label { (New Source... )}
|
||||
xywh {240 104 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Add Source... )}
|
||||
xywh {240 140 152 28} deactivate
|
||||
}
|
||||
Fl_Button {} {
|
||||
label { (Remove All Sources...)}
|
||||
xywh {240 176 152 28} deactivate
|
||||
}
|
||||
}
|
||||
Fl_Group dbm_source {
|
||||
xywh {216 92 200 52}
|
||||
} {
|
||||
Fl_Button {} {
|
||||
label { (Remove Source... )}
|
||||
xywh {240 104 152 28} deactivate
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Button {} {
|
||||
|
@ -35,8 +35,19 @@
|
||||
extern Fl_Double_Window *dbmanager_window;
|
||||
extern Fl_Tree *dbmanager_tree;
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Box.H>
|
||||
#include <FL/Fl_Button.H>
|
||||
#include <FL/Fl_Wizard.H>
|
||||
extern Fl_Wizard *dbm_wizard;
|
||||
extern Fl_Group *dbm_empty;
|
||||
extern Fl_Group *dbm_app;
|
||||
#include <FL/Fl_Input.H>
|
||||
extern Fl_Input *dbm_app_name;
|
||||
extern Fl_Group *dbm_lib;
|
||||
extern Fl_Input *dbm_lib_name;
|
||||
extern Fl_Group *dbm_test;
|
||||
extern Fl_Input *dbm_test_name;
|
||||
extern Fl_Group *dbm_sources;
|
||||
extern Fl_Group *dbm_source;
|
||||
Fl_Double_Window* make_dbmanager_window();
|
||||
#endif
|
||||
|
||||
|
@ -181,5 +181,9 @@ SOURCE=..\..\fluid\undo.cxx
|
||||
|
||||
SOURCE=..\..\fluid\widget_panel.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\fluid\ide_maketools.cxx
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ide_xcode.cxx 7146 2010-02-25 21:21:04Z matt $"
|
||||
* "$Id: ide_xcode.cxx 7169 2010-02-27 22:38:25Z matt $"
|
||||
*
|
||||
* Configuration file for the Fast Light Tool Kit (FLTK).
|
||||
*
|
||||
@ -50,5 +50,5 @@
|
||||
#define HAVE_DLSYM 1
|
||||
|
||||
/*
|
||||
* End of "$Id: ide_xcode.cxx 7146 2010-02-25 21:21:04Z matt $".
|
||||
* End of "$Id: ide_xcode.cxx 7169 2010-02-27 22:38:25Z matt $".
|
||||
*/
|
Loading…
Reference in New Issue
Block a user