Mixed bag. Please see CHANGES.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
7ae0c170ad
commit
2f82fd0663
5
CHANGES
5
CHANGES
@ -1,5 +1,10 @@
|
||||
CHANGES IN FLTK 1.3.0
|
||||
|
||||
- Removed redundant Fl_Group casts
|
||||
- Added indexing to Fl_Preferences
|
||||
- Integrated default menu into Demo test app
|
||||
- Added automated Xcode IDE file generation to Fluid
|
||||
- Fixed lost top item in Fluid's tree browser (STR #2233)
|
||||
- Fixed crash in test/Editor when freeing buffer
|
||||
too soon (STR #2294)
|
||||
- Fixed Fl_Preferences Cygwin wide character bug (STR #2164)
|
||||
|
@ -211,8 +211,19 @@ private:
|
||||
RootNode *root_; // top_ bit set
|
||||
};
|
||||
char *path_;
|
||||
Entry *entry_;
|
||||
int nEntry_, NEntry_;
|
||||
unsigned char dirty_:1;
|
||||
unsigned char top_:1;
|
||||
unsigned char indexed_:1;
|
||||
// indexing routines
|
||||
Node **index_;
|
||||
int nIndex_, NIndex_;
|
||||
void createIndex();
|
||||
void updateIndex();
|
||||
void deleteIndex();
|
||||
public:
|
||||
static int lastEntrySet;
|
||||
public:
|
||||
Node( const char *path );
|
||||
~Node();
|
||||
@ -242,10 +253,8 @@ private:
|
||||
int getEntry( const char *name );
|
||||
char deleteEntry( const char *name );
|
||||
void deleteAllEntries();
|
||||
// public values
|
||||
Entry *entry;
|
||||
int nEntry, NEntry;
|
||||
static int lastEntrySet;
|
||||
int nEntry() { return nEntry_; }
|
||||
Entry &entry(int i) { return entry_[i]; }
|
||||
};
|
||||
friend class Node;
|
||||
|
||||
|
@ -865,7 +865,7 @@ public:
|
||||
} else {
|
||||
table->hide();
|
||||
}
|
||||
Fl_Group::current((Fl_Group*)(Fl_Group::parent()));
|
||||
Fl_Group::current(Fl_Group::parent());
|
||||
}
|
||||
Fl_Widget * const *array() {
|
||||
return(table->array());
|
||||
|
@ -239,13 +239,12 @@ inline void fl_redraw_object(Fl_Widget* o) {o->redraw();}
|
||||
inline void fl_show_object(Fl_Widget* o) {o->show();}
|
||||
inline void fl_hide_object(Fl_Widget* o) {o->hide();}
|
||||
inline void fl_free_object(Fl_Widget* x) {delete x;}
|
||||
inline void fl_delete_object(Fl_Widget* o) {((Fl_Group*)(o->parent()))->remove(*o);}
|
||||
inline void fl_delete_object(Fl_Widget* o) {o->parent()->remove(*o);}
|
||||
inline void fl_activate_object(Fl_Widget* o) {o->activate();}
|
||||
inline void fl_deactivate_object(Fl_Widget* o) {o->deactivate();}
|
||||
|
||||
inline void fl_add_object(Fl_Window* f, Fl_Widget* x) {f->add(x);}
|
||||
inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) {
|
||||
((Fl_Group*)(b->parent()))->insert(*o,b);}
|
||||
inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) {b->parent()->insert(*o,b);}
|
||||
|
||||
inline Fl_Window* FL_ObjWin(Fl_Widget* o) {return o->window();}
|
||||
|
||||
|
@ -739,8 +739,7 @@ Fl_Type *Fl_Data_Type::make() {
|
||||
o->public_ = 1;
|
||||
o->static_ = 1;
|
||||
o->filename_ = 0;
|
||||
//char buf[32]; sprintf(buf, "data_%08x", (unsigned int)o);
|
||||
char buf[32]; sprintf(buf, "data_%p", o);
|
||||
char buf[32]; sprintf(buf, "data_%016x", (unsigned long int)o);
|
||||
o->name(buf);
|
||||
o->add(p);
|
||||
o->factory = this;
|
||||
|
@ -821,6 +821,10 @@ public:
|
||||
virtual const char *help() = 0;
|
||||
// handle a command and return the number of args used, or 0
|
||||
virtual int arg(int argc, char **argv, int &i) = 0;
|
||||
// optional test the plugin
|
||||
virtual int test(const char *a1=0L, const char *a2=0L, const char *a3=0L) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -1572,6 +1572,32 @@ void print_cb(Fl_Return_Button *, void *) {
|
||||
}
|
||||
#endif // WIN32 && !__CYGWIN__
|
||||
|
||||
void fltkdb_cb(Fl_Widget*, void*)
|
||||
{
|
||||
int i;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dbxcode_cb(Fl_Widget*, void*)
|
||||
{
|
||||
int i;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
extern Fl_Menu_Item New_Menu[];
|
||||
@ -1666,6 +1692,8 @@ Fl_Menu_Item Main_Menu[] = {
|
||||
{"&Shell",0,0,0,FL_SUBMENU},
|
||||
{"Execute &Command...",FL_ALT+'x',(Fl_Callback *)show_shell_window},
|
||||
{"Execute &Again...",FL_ALT+'g',(Fl_Callback *)do_shell_command},
|
||||
{"--fltkdb",0,(Fl_Callback *)fltkdb_cb,0,FL_MENU_INVISIBLE},
|
||||
{"--dbxcode",0,(Fl_Callback *)dbxcode_cb,0,FL_MENU_INVISIBLE},
|
||||
{0},
|
||||
{"&Help",0,0,0,FL_SUBMENU},
|
||||
{"&About FLUID...",0,about_cb},
|
||||
|
@ -202,7 +202,7 @@ Fl_Preferences::ID Fl_Target_Prefs::add_fl(Fl_IDE_Prefs &fdb, const char *pathAn
|
||||
|
||||
Fl_Preferences::ID Fl_Target_Prefs::depends_on(Fl_IDE_Prefs &dep) {
|
||||
Fl_IDE_Prefs p(*this, "deps");
|
||||
Fl_Preferences d(p.add_with_key("refUUID", dep.name()));
|
||||
return p.add_with_key("refUUID", dep.name());
|
||||
}
|
||||
|
||||
Fl_Preferences::ID Fl_Target_Prefs::add_lib(Fl_IDE_Prefs &lib) {
|
||||
@ -211,9 +211,8 @@ Fl_Preferences::ID Fl_Target_Prefs::add_lib(Fl_IDE_Prefs &lib) {
|
||||
return p.add_with_key("refUUID", lib.name());
|
||||
}
|
||||
|
||||
Fl_Preferences::ID Fl_Target_Prefs::add_external_lib(Fl_IDE_Prefs &fdb, const char *name) {
|
||||
char buf[1024]; sprintf(buf, "%s.lib", name);
|
||||
Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", buf));
|
||||
Fl_Preferences::ID Fl_Target_Prefs::add_external_lib(Fl_IDE_Prefs &fdb, const char *pathAndName) {
|
||||
Fl_IDE_Prefs file(fdb.add_with_key("pathAndName", pathAndName));
|
||||
Fl_IDE_Prefs p(*this, "externals");
|
||||
return p.add_with_key("refUUID", file.name());
|
||||
}
|
||||
@ -271,6 +270,11 @@ const char *Fl_File_Prefs::fileExt() {
|
||||
return pExt;
|
||||
}
|
||||
|
||||
void osx_only(Fl_Preferences::ID id) {
|
||||
Fl_Preferences p(id);
|
||||
p.set("only", "OS:OSX*"); // type:name#ver # is >, >=, <, <=, ==, !=, *
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
// TODO: Find a good standard position for the database
|
||||
@ -291,152 +295,253 @@ int create_new_database(const char *filename)
|
||||
|
||||
Fl_Target_Prefs fltk_lib(libs_db.add_with_key("name", "fltk")); {
|
||||
fltk_lib.add_source(files_db, "src/Fl.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_get_system_colors.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_get_key.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_font.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Input.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Icon.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_file_dir.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Chooser2.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Chooser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Browser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_engraved_label.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_encoding_mac_roman.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_draw_pixmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Adjuster.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Bitmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Browser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Browser_.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Browser_load.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Chart.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Check_Browser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Check_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_dnd.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_display.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_diamond_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_set_fonts.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window_fullscreen.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Widget.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_visual.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_vertex.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Round_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tooltip.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window_iconize.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window_hotspot.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Text_Display.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Scroll.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Choice.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Clock.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Color_Chooser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Counter.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Dial.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Double_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Browser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Chooser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Chooser2.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Icon.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_File_Input.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Group.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_rounded_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_overlay_visual.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_shortcut.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Shared_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/flstring.c");
|
||||
fltk_lib.add_source(files_db, "src/Fl_grab.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_arg.cxx");
|
||||
fltk_lib.add_source(files_db, "src/cmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_XPM_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Help_View.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Input.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_scroll_area.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tiled_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tile.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Text_Editor.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Overlay_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_own_colormap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_expand.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_absolute.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Multi_Label.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Dial.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_curve.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_global.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_Bar.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_add.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_list.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Browser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Value_Input.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Valuator.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_read_image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Progress.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Preferences.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Positioner.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Sys_Menu_Bar.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_symbols.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Light_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_labeltype.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_draw.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Double_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_XBM_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_x.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Wizard.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Help_View.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_open_uri.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Input_.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_line_style.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Adjuster.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_rect.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_arc.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_ext.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_set_font.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Scrollbar.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_abort.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_overlay.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_oval_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Text_Buffer.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tabs.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_lock.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_cursor.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Counter.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Check_Browser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Bitmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_isdir.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_match.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Slider.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_draw_image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Browser_load.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_round_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Roller.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Return_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Repeat_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_add_idle.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_plastic.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Pixmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Light_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_Bar.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_add.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Menu_global.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Multi_Label.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Native_File_Chooser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Native_File_Chooser_common.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Overlay_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Pack.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Browser_.cxx");
|
||||
fltk_lib.add_source(files_db, "src/scandir.c");
|
||||
fltk_lib.add_source(files_db, "src/numericsort.c");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_call_main.c");
|
||||
fltk_lib.add_source(files_db, "src/vsnprintf.c");
|
||||
fltk_lib.add_source(files_db, "src/screen_xywh.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Pixmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Positioner.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Preferences.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Progress.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Repeat_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Return_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Roller.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Round_Button.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Scroll.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Scrollbar.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Shared_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Single_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_show_colormap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_encoding_latin1.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Chart.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Value_Slider.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Slider.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Sys_Menu_Bar.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Table.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Table_Row.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tabs.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Text_Buffer.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Text_Display.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Text_Editor.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tile.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tiled_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tooltip.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree_Item.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree_Item_Array.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree_Prefs.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Valuator.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Value_Input.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Value_Output.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Color_Chooser.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_color.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_arci.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Value_Slider.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Widget.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window_fullscreen.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window_hotspot.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Window_iconize.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Wizard.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_XBM_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_XPM_Image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_abort.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_add_idle.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_arg.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_compose.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_display.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_get_key.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_get_system_colors.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_grab.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_lock.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_own_colormap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_visual.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_x.cxx");
|
||||
fltk_lib.add_source(files_db, "src/cmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_absolute.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_expand.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_ext.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_isdir.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_list.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_match.cxx");
|
||||
fltk_lib.add_source(files_db, "src/filename_setext.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Clock.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_arc.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_arci.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_ask.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_boxtype.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_call_main.c");
|
||||
fltk_lib.add_source(files_db, "src/fl_color.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_cursor.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_curve.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_diamond_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_dnd.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_draw.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_draw_image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_draw_pixmap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_encoding_latin1.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_encoding_mac_roman.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_engraved_label.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_file_dir.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_font.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_gtk.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_compose.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_labeltype.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_line_style.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_open_uri.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_oval_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_overlay.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_overlay_visual.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_plastic.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_read_image.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_rect.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_round_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_rounded_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_scroll_area.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_set_font.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_set_fonts.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_shadow_box.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_shortcut.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_show_colormap.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_symbols.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_utf.c");
|
||||
fltk_lib.add_source(files_db, "src/fl_utf8.cxx");
|
||||
fltk_lib.add_source(files_db, "src/fl_vertex.cxx");
|
||||
fltk_lib.add_source(files_db, "src/flstring.c");
|
||||
fltk_lib.add_source(files_db, "src/numericsort.c");
|
||||
fltk_lib.add_source(files_db, "src/scandir.c");
|
||||
fltk_lib.add_source(files_db, "src/screen_xywh.cxx");
|
||||
fltk_lib.add_source(files_db, "src/vsnprintf.c");
|
||||
fltk_lib.add_source(files_db, "src/xutf8/case.c");
|
||||
fltk_lib.add_source(files_db, "src/xutf8/is_right2left.c");
|
||||
fltk_lib.add_source(files_db, "src/xutf8/is_spacing.c");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Table_Row.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Table.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree_Item_Array.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree_Item.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree_Prefs.cxx");
|
||||
fltk_lib.add_source(files_db, "src/Fl_Tree.cxx");
|
||||
}
|
||||
|
||||
Fl_Target_Prefs fltk_gl_lib(libs_db.add_with_key("name", "fltk_gl")); {
|
||||
fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Choice.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Overlay.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Window.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_geometry.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_stroke_mono_roman.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_stroke_roman.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_teapot.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/gl_draw.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/glut_compatability.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/glut_font.cxx");
|
||||
osx_only(fltk_gl_lib.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(fltk_gl_lib.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
fltk_gl_lib.add_lib(fltk_lib);
|
||||
}
|
||||
|
||||
Fl_Target_Prefs fltk_images_lib(libs_db.add_with_key("name", "fltk_images")); {
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_BMP_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_File_Icon2.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_GIF_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_Help_Dialog.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_JPEG_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_PNG_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_PNM_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/fl_images_core.cxx");
|
||||
fltk_images_lib.add_lib(fltk_lib);
|
||||
fltk_gl_lib.depends_on(fltk_lib);
|
||||
}
|
||||
|
||||
Fl_Target_Prefs fltk_png_lib(libs_db.add_with_key("name", "fltk_png")); {
|
||||
fltk_png_lib.add_source(files_db, "png/png.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngerror.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngget.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngmem.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngpread.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngread.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngrio.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngrtran.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngrutil.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngset.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngtrans.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwio.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwrite.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwtran.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwutil.c");
|
||||
osx_only(fltk_png_lib.add_external_lib(files_db, "/usr/lib/libz.dylib"));
|
||||
fltk_images_lib.add_lib(fltk_png_lib);
|
||||
}
|
||||
|
||||
Fl_Target_Prefs fltk_jpeg_lib(libs_db.add_with_key("name", "fltk_jpeg")); {
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcapimin.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcapistd.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jccoefct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jccolor.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcdctmgr.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jchuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcinit.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcmainct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcmarker.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcmaster.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcomapi.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcparam.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcphuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcprepct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcsample.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jctrans.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdapimin.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdapistd.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdatadst.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdatasrc.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdcoefct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdcolor.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jddctmgr.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdhuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdinput.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmainct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmarker.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmaster.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmerge.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdphuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdpostct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdsample.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdtrans.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jerror.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctflt.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctfst.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctint.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctflt.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctfst.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctint.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctred.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jmemmgr.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jmemnobs.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jquant1.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jquant2.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jutils.c");
|
||||
fltk_images_lib.add_lib(fltk_jpeg_lib);
|
||||
}
|
||||
|
||||
Fl_Target_Prefs fltk_forms_lib(libs_db.add_with_key("name", "fltk_forms")); {
|
||||
fltk_forms_lib.add_source(files_db, "src/forms_bitmap.cxx");
|
||||
fltk_forms_lib.add_source(files_db, "src/forms_compatability.cxx");
|
||||
@ -446,120 +551,30 @@ int create_new_database(const char *filename)
|
||||
fltk_forms_lib.add_source(files_db, "src/forms_timer.cxx");
|
||||
fltk_forms_lib.add_lib(fltk_lib);
|
||||
}
|
||||
Fl_Target_Prefs fltk_images_lib(libs_db.add_with_key("name", "fltk_images")); {
|
||||
fltk_images_lib.add_source(files_db, "src/fl_images_core.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_BMP_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_File_Icon2.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_GIF_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_Help_Dialog.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_JPEG_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_PNG_Image.cxx");
|
||||
fltk_images_lib.add_source(files_db, "src/Fl_PNM_Image.cxx");
|
||||
fltk_images_lib.add_lib(fltk_lib);
|
||||
}
|
||||
Fl_Target_Prefs fltk_gl_lib(libs_db.add_with_key("name", "fltk_gl")); {
|
||||
fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Choice.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Overlay.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/Fl_Gl_Window.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/gl_draw.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_stroke_roman.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_teapot.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_geometry.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/glut_font.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/freeglut_stroke_mono_roman.cxx");
|
||||
fltk_gl_lib.add_source(files_db, "src/glut_compatability.cxx");
|
||||
fltk_gl_lib.add_lib(fltk_lib);
|
||||
}
|
||||
Fl_Target_Prefs fltk_png_lib(libs_db.add_with_key("name", "fltk_png")); {
|
||||
fltk_png_lib.add_source(files_db, "png/pngmem.c");
|
||||
fltk_png_lib.add_source(files_db, "png/png.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwio.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwtran.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngset.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwutil.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngwrite.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngrio.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngget.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngerror.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngtrans.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngread.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngrutil.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngpread.c");
|
||||
fltk_png_lib.add_source(files_db, "png/pngrtran.c");
|
||||
fltk_png_lib.add_external_lib(files_db, "z");
|
||||
fltk_images_lib.add_lib(fltk_png_lib);
|
||||
}
|
||||
Fl_Target_Prefs fltk_jpeg_lib(libs_db.add_with_key("name", "fltk_jpeg")); {
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctflt.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctint.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcmarker.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdhuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdatasrc.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jerror.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctred.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcomapi.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctfst.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jfdctflt.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jutils.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jquant2.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jquant1.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcphuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdpostct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdphuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmarker.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmaster.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdatadst.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctint.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jidctfst.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdapimin.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jccolor.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdapistd.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcmainct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmerge.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jddctmgr.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdtrans.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdsample.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jmemnobs.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jmemmgr.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdinput.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdmainct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcinit.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jccoefct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcapistd.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdcolor.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcsample.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcdctmgr.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcmaster.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcapimin.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jdcoefct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcparam.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jchuff.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jcprepct.c");
|
||||
fltk_jpeg_lib.add_source(files_db, "jpeg/jctrans.c");
|
||||
fltk_images_lib.add_lib(fltk_jpeg_lib);
|
||||
}
|
||||
|
||||
|
||||
// --- create applications
|
||||
Fl_IDE_Prefs apps_db(targets_db, "apps");
|
||||
|
||||
Fl_Target_Prefs fluid_app(apps_db.add_with_key("name", "Fluid")); {
|
||||
fluid_app.add_source(files_db, "fluid/about_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/align_widget.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/alignment_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/code.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/CodeEditor.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/factory.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/file.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Function_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Group_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Menu_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Widget_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fl_Window_Type.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/fluid.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/Fluid_Image.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/about_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/align_widget.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/alignment_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/code.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/factory.cxx");
|
||||
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_support.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/ide_support.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/ide_xcode.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/ide_xcode.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/template_panel.cxx");
|
||||
fluid_app.add_source(files_db, "fluid/undo.cxx");
|
||||
@ -606,7 +621,7 @@ int create_new_database(const char *filename)
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "blocks"));
|
||||
db.add_source(files_db, "test/blocks.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
//db.add_lib(fltk_audio_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/CoreAudio.framework"));
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -663,6 +678,8 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/cube.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -672,6 +689,9 @@ int create_new_database(const char *filename)
|
||||
db.add_fl(files_db, "test/CubeViewUI.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -702,6 +722,7 @@ int create_new_database(const char *filename)
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "fast_slow"));
|
||||
db.add_fl(files_db, "test/fast_slow.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -732,6 +753,8 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/fracviewer.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
db.add_lib(fltk_forms_lib);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
@ -740,6 +763,8 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/fullscreen.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -747,6 +772,8 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/gl_overlay.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -754,6 +781,8 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/glpuzzle.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -787,6 +816,7 @@ int create_new_database(const char *filename)
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "inactive"));
|
||||
db.add_fl(files_db, "test/inactive.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -806,6 +836,7 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/keyboard.cxx");
|
||||
db.add_fl(files_db, "test/keyboard_ui.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -832,6 +863,7 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/mandelbrot.cxx");
|
||||
db.add_fl(files_db, "test/mandelbrot_ui.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -902,12 +934,14 @@ int create_new_database(const char *filename)
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "preferences"));
|
||||
db.add_fl(files_db, "test/preferences.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "radio"));
|
||||
db.add_fl(files_db, "test/radio.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -920,6 +954,7 @@ int create_new_database(const char *filename)
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "resize"));
|
||||
db.add_fl(files_db, "test/resize.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -933,6 +968,8 @@ int create_new_database(const char *filename)
|
||||
db.add_source(files_db, "test/shape.cxx");
|
||||
db.add_lib(fltk_lib);
|
||||
db.add_lib(fltk_gl_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/OpenGL.framework"));
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/AGL.framework"));
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -948,7 +985,7 @@ int create_new_database(const char *filename)
|
||||
db.add_lib(fltk_images_lib);
|
||||
db.add_lib(fltk_jpeg_lib);
|
||||
db.add_lib(fltk_png_lib);
|
||||
//db.add_lib(fltk_audio_lib);
|
||||
osx_only(db.add_external_lib(files_db, "/System/Library/Frameworks/CoreAudio.framework"));
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -967,6 +1004,7 @@ int create_new_database(const char *filename)
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "tabs"));
|
||||
db.add_fl(files_db, "test/tabs.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
@ -1006,10 +1044,12 @@ int create_new_database(const char *filename)
|
||||
{ Fl_Target_Prefs db(tests_db.add_with_key("name", "valuators"));
|
||||
db.add_fl(files_db, "test/valuators.fl");
|
||||
db.add_lib(fltk_lib);
|
||||
db.depends_on(fluid_app);
|
||||
demo_db.depends_on(db);
|
||||
}
|
||||
|
||||
db->flush();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1039,6 +1079,10 @@ public:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int test(const char *a1, const char *a2, const char *a3) {
|
||||
create_new_database(a1);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
Fl_FltkDB_Plugin FltkDB_Plugin;
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
Fl_Preferences::ID add_fl(Fl_IDE_Prefs &fdb, const char *pathAndName);
|
||||
Fl_Preferences::ID depends_on(Fl_IDE_Prefs &dep);
|
||||
Fl_Preferences::ID add_lib(Fl_IDE_Prefs &lib);
|
||||
Fl_Preferences::ID add_external_lib(Fl_IDE_Prefs &fdb, const char *name);
|
||||
Fl_Preferences::ID add_external_lib(Fl_IDE_Prefs &fdb, const char *pathAndName);
|
||||
};
|
||||
|
||||
|
||||
@ -94,7 +94,9 @@ public:
|
||||
const char *fullName();
|
||||
const char *fileExt();
|
||||
};
|
||||
|
||||
|
||||
void osx_only(Fl_Preferences::ID id);
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -116,7 +116,9 @@ class Xcode3_IDE {
|
||||
XCID xcBuildConfigurationListID;
|
||||
XCID xcMainGroupID;
|
||||
XCID xcProductsGroupID;
|
||||
XCID xcFilesGroupID;
|
||||
XCID xcAppsGroupID;
|
||||
XCID xcLibsGroupID;
|
||||
XCID xcTestsGroupID;
|
||||
XCID xcBuildConfigurationDebugID;
|
||||
XCID xcBuildConfigurationReleaseID;
|
||||
public:
|
||||
@ -137,7 +139,9 @@ public:
|
||||
getXCID(ideDB, "xcBuildConfigurationListID", xcBuildConfigurationListID);
|
||||
getXCID(ideDB, "xcMainGroupID", xcMainGroupID);
|
||||
getXCID(ideDB, "xcProductsGroupID", xcProductsGroupID);
|
||||
getXCID(ideDB, "xcFilesGroupID", xcFilesGroupID);
|
||||
getXCID(ideDB, "xcAppsGroupID", xcAppsGroupID);
|
||||
getXCID(ideDB, "xcLibsGroupID", xcLibsGroupID);
|
||||
getXCID(ideDB, "xcTestsGroupID", xcTestsGroupID);
|
||||
getXCID(ideDB, "xcBuildConfigurationDebugID", xcBuildConfigurationDebugID);
|
||||
getXCID(ideDB, "xcBuildConfigurationReleaseID", xcBuildConfigurationReleaseID);
|
||||
}
|
||||
@ -195,8 +199,8 @@ public:
|
||||
MAKE_XCID(xcBuildFrameworkID, extDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
MAKE_XCID(xcFileID, fileDB);
|
||||
const char *name = fileDB.fileName();
|
||||
fprintf(out, "\t\t%s /* lib%s.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = %s /* lib%s.dylib */; };\n", xcBuildFrameworkID, name, xcFileID, name);
|
||||
const char *fullName = fileDB.fullName();
|
||||
fprintf(out, "\t\t%s /* %s in Frameworks */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };\n", xcBuildFrameworkID, fullName, xcFileID, fullName);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -240,6 +244,7 @@ public:
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\tscript = \"export DYLD_FRAMEWORK_PATH=${TARGET_BUILD_DIR} && cd ../../test && ${TARGET_BUILD_DIR}/Fluid.app/Contents/MacOS/Fluid -c ${INPUT_FILE_NAME}\";\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -374,7 +379,7 @@ public:
|
||||
* A list of all files that are somehow referenced in this project
|
||||
*/
|
||||
int writeFileReferenceSection(FILE *out) {
|
||||
int i, j;
|
||||
int i;
|
||||
fprintf(out, "/* Begin PBXFileReference section */\n");
|
||||
// --- list of all Application target results
|
||||
for (i=0; i<nTgtApps; i++) {
|
||||
@ -419,7 +424,8 @@ public:
|
||||
const char *filetype = "test";
|
||||
const char *ext = fileDB.fileExt();
|
||||
if (!ext) {
|
||||
} else if (strcmp(pathAndName, "src/Fl.cxx")==0) { // FIXME: bad hack!
|
||||
} else if (strcmp(pathAndName, "src/Fl.cxx")==0
|
||||
||strcmp(pathAndName, "src/Fl_Native_File_Chooser.cxx")==0) { // FIXME: bad hack!
|
||||
filetype = "sourcecode.cpp.objcpp";
|
||||
} else if (strcmp(ext, ".cxx")==0) {
|
||||
filetype = "sourcecode.cpp.cpp";
|
||||
@ -427,13 +433,21 @@ public:
|
||||
filetype = "sourcecode.c.c";
|
||||
} else if (strcmp(ext, ".mm")==0) {
|
||||
filetype = "sourcecode.cpp.objcpp";
|
||||
} else if (strcmp(ext, ".lib")==0) {
|
||||
} else if (strcmp(ext, ".dylib")==0) {
|
||||
fprintf(out,
|
||||
"\t\t%s /* lib%s.dylib */ = {isa = PBXFileReference; "
|
||||
"\t\t%s /* %s */ = {isa = PBXFileReference; "
|
||||
"lastKnownFileType = \"compiled.mach-o.dylib\"; "
|
||||
"name = lib%s.dylib; path = /usr/lib/libz.dylib; "
|
||||
"name = %s; path = %s; "
|
||||
"sourceTree = \"<absolute>\"; };\n",
|
||||
xcFileID, fileDB.fileName(), fileDB.fileName() );
|
||||
xcFileID, fullName, fullName, pathAndName );
|
||||
filetype = 0L;
|
||||
} else if (strcmp(ext, ".framework")==0) {
|
||||
fprintf(out,
|
||||
"\t\t%s /* %s */ = {isa = PBXFileReference; "
|
||||
"lastKnownFileType = \"wrapper.framework\"; "
|
||||
"name = %s; path = %s; "
|
||||
"sourceTree = \"<absolute>\"; };\n",
|
||||
xcFileID, fullName, fullName, pathAndName );
|
||||
filetype = 0L;
|
||||
} else if (strcmp(ext, ".plist")==0) {
|
||||
filetype = "text.plist.xml";
|
||||
@ -510,7 +524,13 @@ public:
|
||||
*
|
||||
*/
|
||||
int writeTargetFiles(FILE *out, Fl_Preferences &targetDB) {
|
||||
char name[80]; targetDB.get("name", name, "DBERROR", 80);
|
||||
char name[80];
|
||||
MAKE_XCID(xcTargetGroupID, targetDB);
|
||||
targetDB.get("name", name, "DBERROR", 80);
|
||||
fprintf(out, "\t\t%s /* %s */ = {\n", xcTargetGroupID, name);
|
||||
fprintf(out, "\t\t\tisa = PBXGroup;\n");
|
||||
fprintf(out, "\t\t\tchildren = (\n");
|
||||
|
||||
MAKE_XCID(xcProductID, targetDB);
|
||||
Fl_Preferences sourcesDB(targetDB, "sources");
|
||||
int j, n = sourcesDB.groups();
|
||||
@ -539,23 +559,32 @@ public:
|
||||
GET_UUID(refUUID, extDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
MAKE_XCID(xcFileID, fileDB);
|
||||
const char *name = fileDB.fileName();
|
||||
fprintf(out, "\t\t\t\t%s /* lib%s.dylib */,\n", xcFileID, name);
|
||||
const char *fullName = fileDB.fullName();
|
||||
fprintf(out, "\t\t\t\t%s /* %s */,\n", xcFileID, fullName);
|
||||
}
|
||||
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\tname = %s;\n", name);
|
||||
fprintf(out, "\t\t\tsourceTree = \"<group>\";\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Groups define the folder hierarchy in the "Groups & Files" panel
|
||||
*/
|
||||
int writeGroupSection(FILE *out) {
|
||||
int i, j;
|
||||
int i;
|
||||
char name[80];
|
||||
fprintf(out, "/* Begin PBXGroup section */\n");
|
||||
// --- FIXME: missing "icons" group
|
||||
// --- main group
|
||||
fprintf(out, "\t\t%s = {\n", xcMainGroupID);
|
||||
fprintf(out, "\t\t\tisa = PBXGroup;\n");
|
||||
fprintf(out, "\t\t\tchildren = (\n");
|
||||
fprintf(out, "\t\t\t\t%s /* Files */,\n", xcFilesGroupID); // link to "Files" group
|
||||
fprintf(out, "\t\t\t\t%s /* Applications */,\n", xcAppsGroupID);
|
||||
fprintf(out, "\t\t\t\t%s /* Frameworks */,\n", xcLibsGroupID);
|
||||
fprintf(out, "\t\t\t\t%s /* Tests */,\n", xcTestsGroupID);
|
||||
fprintf(out, "\t\t\t\t%s /* Products */,\n", xcProductsGroupID); // link to "Products" group
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\tsourceTree = \"<group>\";\n");
|
||||
@ -594,28 +623,63 @@ public:
|
||||
// --- FIXME: missing "jpeg Sources" group
|
||||
// --- FIXME: missing "png Sources" group
|
||||
// --- FIXME: missing "libs" group
|
||||
|
||||
// --- "Files" group for testing
|
||||
fprintf(out, "\t\t%s /* Files */ = {\n", xcFilesGroupID);
|
||||
|
||||
// --- "Applications" group for testing
|
||||
fprintf(out, "\t\t%s /* Applications */ = {\n", xcAppsGroupID);
|
||||
fprintf(out, "\t\t\tisa = PBXGroup;\n");
|
||||
fprintf(out, "\t\t\tchildren = (\n");
|
||||
for (i=0; i<nTgtApps; i++) {
|
||||
Fl_Preferences targetDB(tgtAppsDB, i);
|
||||
MAKE_XCID(xcTargetGroupID, targetDB);
|
||||
targetDB.get("name", name, "DBERROR", 80);
|
||||
fprintf(out, "\t\t\t\t%s /* %s */,\n", xcTargetGroupID, name);
|
||||
}
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\tname = Applications;\n");
|
||||
fprintf(out, "\t\t\tsourceTree = \"<group>\";\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
for (i=0; i<nTgtApps; i++) {
|
||||
Fl_Preferences targetDB(tgtAppsDB, i);
|
||||
writeTargetFiles(out, targetDB);
|
||||
}
|
||||
// --- "Frameworks" group for testing
|
||||
fprintf(out, "\t\t%s /* Frameworks */ = {\n", xcLibsGroupID);
|
||||
fprintf(out, "\t\t\tisa = PBXGroup;\n");
|
||||
fprintf(out, "\t\t\tchildren = (\n");
|
||||
for (i=0; i<nTgtLibs; i++) {
|
||||
Fl_Preferences targetDB(tgtLibsDB, i);
|
||||
MAKE_XCID(xcTargetGroupID, targetDB);
|
||||
targetDB.get("name", name, "DBERROR", 80);
|
||||
fprintf(out, "\t\t\t\t%s /* %s */,\n", xcTargetGroupID, name);
|
||||
}
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\tname = Frameworks;\n");
|
||||
fprintf(out, "\t\t\tsourceTree = \"<group>\";\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
for (i=0; i<nTgtLibs; i++) {
|
||||
Fl_Preferences targetDB(tgtLibsDB, i);
|
||||
writeTargetFiles(out, targetDB);
|
||||
}
|
||||
// --- "Tests" group for testing
|
||||
fprintf(out, "\t\t%s /* Tests */ = {\n", xcTestsGroupID);
|
||||
fprintf(out, "\t\t\tisa = PBXGroup;\n");
|
||||
fprintf(out, "\t\t\tchildren = (\n");
|
||||
for (i=0; i<nTgtTests; i++) {
|
||||
Fl_Preferences targetDB(tgtTestsDB, i);
|
||||
MAKE_XCID(xcTargetGroupID, targetDB);
|
||||
targetDB.get("name", name, "DBERROR", 80);
|
||||
fprintf(out, "\t\t\t\t%s /* %s */,\n", xcTargetGroupID, name);
|
||||
}
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\tname = Tests;\n");
|
||||
fprintf(out, "\t\t\tsourceTree = \"<group>\";\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
for (i=0; i<nTgtTests; i++) {
|
||||
Fl_Preferences targetDB(tgtTestsDB, i);
|
||||
writeTargetFiles(out, targetDB);
|
||||
}
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
fprintf(out, "\t\t\tname = Files;\n");
|
||||
fprintf(out, "\t\t\tsourceTree = \"<group>\";\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
// --- done
|
||||
|
||||
fprintf(out, "/* End PBXGroup section */\n\n");
|
||||
return 0;
|
||||
}
|
||||
@ -831,7 +895,6 @@ public:
|
||||
GET_UUID(refUUID, sourceDB);
|
||||
MAKE_XCID(xcBuildFileID, sourceDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
const char *fullName = fileDB.fullName();
|
||||
fprintf(out, "\t\t\t\t%s /* %s in Sources */,\n", xcBuildFileID, fileDB.fullName());
|
||||
}
|
||||
Fl_Preferences flsDB(targetDB, "fl");
|
||||
@ -841,7 +904,6 @@ public:
|
||||
GET_UUID(refUUID, flDB);
|
||||
MAKE_XCID(xcBuildFileID, flDB);
|
||||
Fl_File_Prefs fileDB(filesDB, refUUID);
|
||||
const char *fullName = fileDB.fullName();
|
||||
fprintf(out, "\t\t\t\t%s /* %s in Sources */,\n", xcBuildFileID, fileDB.fullName());
|
||||
}
|
||||
fprintf(out, "\t\t\t);\n");
|
||||
@ -941,7 +1003,7 @@ public:
|
||||
fprintf(out, "\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PFE_FILE_C_DIALECTS = \"c c++\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"$(SDKROOT)/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;\n");
|
||||
fprintf(out, "\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.2;\n");
|
||||
fprintf(out, "\t\t\t\tSDKROOT = \"$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk\";\n");
|
||||
@ -960,7 +1022,7 @@ public:
|
||||
fprintf(out, "\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PFE_FILE_C_DIALECTS = \"c c++\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"$(SDKROOT)/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;\n");
|
||||
fprintf(out, "\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.3;\n");
|
||||
fprintf(out, "\t\t\t\tSDKROOT = \"$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk\";\n");
|
||||
@ -988,7 +1050,7 @@ public:
|
||||
fprintf(out, "\t\t\t\tGCC_MODEL_TUNING = G5;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = \"USING_XCODE=1\";\n");
|
||||
fprintf(out, "\t\t\t\tHEADER_SEARCH_PATHS = (\n");
|
||||
fprintf(out, "\t\t\t\t\t../../ide/XCode3/,\n");
|
||||
@ -1000,11 +1062,14 @@ public:
|
||||
fprintf(out, "\t\t\t\tINSTALL_PATH = /Applications;\n");
|
||||
fprintf(out, "\t\t\t\tOTHER_LDFLAGS = (\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCocoa,\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCarbon,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tPREBINDING = NO;\n");
|
||||
fprintf(out, "\t\t\t\tPRODUCT_NAME = %s;\n", name);
|
||||
fprintf(out, "\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tWARNING_CFLAGS = \"-Wno-format-security\";\n");
|
||||
fprintf(out, "\t\t\t\tWRAPPER_EXTENSION = app;\n");
|
||||
fprintf(out, "\t\t\t\tZERO_LINK = YES;\n");
|
||||
fprintf(out, "\t\t\t};\n");
|
||||
@ -1019,7 +1084,7 @@ public:
|
||||
fprintf(out, "\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_MODEL_TUNING = G5;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREFIX_HEADER = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = \"USING_XCODE=1\";\n");
|
||||
fprintf(out, "\t\t\t\tHEADER_SEARCH_PATHS = (\n");
|
||||
fprintf(out, "\t\t\t\t\t../../ide/XCode3/,\n");
|
||||
@ -1031,16 +1096,20 @@ public:
|
||||
fprintf(out, "\t\t\t\tINSTALL_PATH = /Applications;\n");
|
||||
fprintf(out, "\t\t\t\tOTHER_LDFLAGS = (\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCocoa,\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCarbon,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tPREBINDING = NO;\n");
|
||||
fprintf(out, "\t\t\t\tPRODUCT_NAME = %s;\n", name);
|
||||
fprintf(out, "\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tWARNING_CFLAGS = \"-Wno-format-security\";\n");
|
||||
fprintf(out, "\t\t\t\tWRAPPER_EXTENSION = app;\n");
|
||||
fprintf(out, "\t\t\t\tZERO_LINK = NO;\n");
|
||||
fprintf(out, "\t\t\t};\n");
|
||||
fprintf(out, "\t\t\tname = Release;\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1073,14 +1142,14 @@ public:
|
||||
fprintf(out, "\t\t\t\tINSTALL_PATH = \"@executable_path/../Frameworks\";\n");
|
||||
fprintf(out, "\t\t\t\tOTHER_LDFLAGS = (\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCarbon,\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCocoa,\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCarbon,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tPREBINDING = NO;\n");
|
||||
fprintf(out, "\t\t\t\tPRODUCT_NAME = %s;\n", name);
|
||||
fprintf(out, "\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tWARNING_CFLAGS = \"-Wno-format-nonliteral\";\n");
|
||||
fprintf(out, "\t\t\t\tWARNING_CFLAGS = \"-Wno-format-security\";\n");
|
||||
fprintf(out, "\t\t\t\tZERO_LINK = YES;\n");
|
||||
fprintf(out, "\t\t\t};\n");
|
||||
fprintf(out, "\t\t\tname = Debug;\n");
|
||||
@ -1111,18 +1180,19 @@ public:
|
||||
fprintf(out, "\t\t\t\tOTHER_LDFLAGS = (\n");
|
||||
fprintf(out, "\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\tCocoa,\n");
|
||||
fprintf(out, "\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\tCarbon,\n");
|
||||
fprintf(out, "\t\t\t\t\t\"-framework\",\n");
|
||||
fprintf(out, "\t\t\t\t\tCarbon,\n");
|
||||
fprintf(out, "\t\t\t\t);\n");
|
||||
fprintf(out, "\t\t\t\tPREBINDING = NO;\n");
|
||||
fprintf(out, "\t\t\t\tPRODUCT_NAME = %s;\n", name);
|
||||
fprintf(out, "\t\t\t\tSDKROOT = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n");
|
||||
fprintf(out, "\t\t\t\tWARNING_CFLAGS = \"-Wno-format-nonliteral\";\n");
|
||||
fprintf(out, "\t\t\t\tWARNING_CFLAGS = \"-Wno-format-security\";\n");
|
||||
fprintf(out, "\t\t\t\tZERO_LINK = NO;\n");
|
||||
fprintf(out, "\t\t\t};\n");
|
||||
fprintf(out, "\t\t\tname = Release;\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1161,6 +1231,7 @@ public:
|
||||
fprintf(out, "\t\t\tdefaultConfigurationIsVisible = 0;\n");
|
||||
fprintf(out, "\t\t\tdefaultConfigurationName = Debug;\n");
|
||||
fprintf(out, "\t\t};\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1246,8 +1317,36 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int writeConfigH(const char *filepath) {
|
||||
// FIXME: LATER: do we want to do that?
|
||||
int writeConfigH(const char *filename) {
|
||||
FILE *f = fopen(filename, "wb");
|
||||
fputs("/*\n * \"$Id$\"\n"
|
||||
" *\n * Configuration file for the Fast Light Tool Kit (FLTK).\n *\n"
|
||||
" * Copyright 1998-2010 by Bill Spitzak and others.\n */\n\n", f);
|
||||
fputs("#define FLTK_DATADIR \"/usr/local/share/fltk\"\n"
|
||||
"#define FLTK_DOCDIR \"/usr/local/share/doc/fltk\"\n"
|
||||
"#define BORDER_WIDTH 2\n#define HAVE_GL 1\n#define HAVE_GL_GLU_H 1\n"
|
||||
"#define USE_COLORMAP 1\n#define HAVE_XINERAMA 0\n#define USE_XFT 0\n"
|
||||
"#define HAVE_XDBE 0\n#define USE_XDBE HAVE_XDBE\n", f);
|
||||
fputs("#define USE_QUARTZ 1\n#define __APPLE_QUARTZ__ 1\n"
|
||||
"#define __APPLE_COCOA__ 1\n#define HAVE_OVERLAY 0\n"
|
||||
"#define HAVE_GL_OVERLAY HAVE_OVERLAY\n#define WORDS_BIGENDIAN 0\n"
|
||||
"#define U16 unsigned short\n#define U32 unsigned\n"
|
||||
"#define HAVE_DIRENT_H 1\n#define HAVE_SCANDIR 1\n"
|
||||
"#define HAVE_VSNPRINTF 1\n", f);
|
||||
fputs("#define HAVE_SNPRINTF 1\n#define HAVE_STRINGS_H 1\n"
|
||||
"#define HAVE_STRCASECMP 1\n#define HAVE_STRLCAT 1\n"
|
||||
"#define HAVE_STRLCPY 1\n#define HAVE_LOCALE_H 1\n"
|
||||
"#define HAVE_LOCALECONV 1\n#define HAVE_SYS_SELECT_H 1\n"
|
||||
"#define USE_POLL 0\n#define HAVE_LIBPNG 1\n#define HAVE_LIBZ 1\n"
|
||||
"#define HAVE_LIBJPEG 1\n#define HAVE_PNG_H 1\n", f);
|
||||
fputs("#define HAVE_PTHREAD 1\n#define HAVE_PTHREAD_H 1\n"
|
||||
"#define HAVE_LONG_LONG 1\n#define FLTK_LLFMT \"%lld\"\n"
|
||||
"#define FLTK_LLCAST (long long)\n#define HAVE_STRTOLL 1\n"
|
||||
"#define HAVE_DLFCN_H 1\n#define HAVE_DLSYM 1\n\n", f);
|
||||
fputs("/*\n"
|
||||
" * End of \"$Id$\".\n"
|
||||
" */", f);
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1322,7 +1421,8 @@ public:
|
||||
// --- create project.pbxproj
|
||||
sprintf(filepath, "%s/ide/Xcode3/FLTK.xcodeproj", rootDir); fl_mkdir(filepath, 0777);
|
||||
writeProjectFile(filepath);
|
||||
// --- FIXME: LATER: should we create config.h here?
|
||||
// --- create a valid config.h
|
||||
sprintf(filepath, "%s/ide/Xcode3/config.h", rootDir);
|
||||
writeConfigH(filepath);
|
||||
// --- FIXME: LATER: create default icons (maybe import icons for apps?)
|
||||
sprintf(filepath, "%s/ide/Xcode3/icons", rootDir); fl_mkdir(filepath, 0777);
|
||||
@ -1377,6 +1477,10 @@ public:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int test(const char *a1, const char *a2, const char *a3) {
|
||||
generate_fltk_Xcode3_support(a1, a2);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
Fl_IDE_Xcode_Plugin IDE_Xcode_Plugin;
|
||||
|
||||
|
@ -60,7 +60,7 @@ int Fl_Button::value(int v) {
|
||||
*/
|
||||
void Fl_Button::setonly() { // set this radio button on, turn others off
|
||||
value(1);
|
||||
Fl_Group* g = (Fl_Group*)parent();
|
||||
Fl_Group* g = parent();
|
||||
Fl_Widget*const* a = g->array();
|
||||
for (int i = g->children(); i--;) {
|
||||
Fl_Widget* o = *a++;
|
||||
|
@ -77,7 +77,7 @@ void Fl_Group::begin() {current_ = this;}
|
||||
<I>Exactly the same as</I> current(this->parent()). Any new widgets
|
||||
added to the widget tree will be added to the parent of the group.
|
||||
*/
|
||||
void Fl_Group::end() {current_ = (Fl_Group*)parent();}
|
||||
void Fl_Group::end() {current_ = parent();}
|
||||
|
||||
/**
|
||||
Returns the currently active group.
|
||||
@ -429,7 +429,7 @@ Fl_Group::~Fl_Group() {
|
||||
*/
|
||||
void Fl_Group::insert(Fl_Widget &o, int index) {
|
||||
if (o.parent()) {
|
||||
Fl_Group* g = (Fl_Group*)(o.parent());
|
||||
Fl_Group* g = o.parent();
|
||||
int n = g->find(o);
|
||||
if (g == this) {
|
||||
if (index > n) index--;
|
||||
|
@ -466,7 +466,7 @@ char Fl_Preferences::deleteAllGroups()
|
||||
*/
|
||||
int Fl_Preferences::entries()
|
||||
{
|
||||
return node->nEntry;
|
||||
return node->nEntry();
|
||||
}
|
||||
|
||||
|
||||
@ -480,7 +480,7 @@ int Fl_Preferences::entries()
|
||||
*/
|
||||
const char *Fl_Preferences::entry( int index )
|
||||
{
|
||||
return node->entry[index].name;
|
||||
return node->entry(index).name;
|
||||
}
|
||||
|
||||
|
||||
@ -1350,10 +1350,13 @@ Fl_Preferences::Node::Node( const char *path )
|
||||
{
|
||||
if ( path ) path_ = strdup( path ); else path_ = 0;
|
||||
child_ = 0; next_ = 0; parent_ = 0;
|
||||
entry = 0;
|
||||
nEntry = NEntry = 0;
|
||||
entry_ = 0;
|
||||
nEntry_ = NEntry_ = 0;
|
||||
dirty_ = 0;
|
||||
top_ = 0;
|
||||
indexed_ = 0;
|
||||
index_ = 0;
|
||||
nIndex_ = NIndex_ = 0;
|
||||
}
|
||||
|
||||
void Fl_Preferences::Node::deleteAllChildren()
|
||||
@ -1366,27 +1369,28 @@ void Fl_Preferences::Node::deleteAllChildren()
|
||||
}
|
||||
child_ = 0L;
|
||||
dirty_ = 1;
|
||||
updateIndex();
|
||||
}
|
||||
|
||||
void Fl_Preferences::Node::deleteAllEntries()
|
||||
{
|
||||
if ( entry )
|
||||
if ( entry_ )
|
||||
{
|
||||
for ( int i = 0; i < nEntry; i++ )
|
||||
for ( int i = 0; i < nEntry_; i++ )
|
||||
{
|
||||
if ( entry[i].name ) {
|
||||
free( entry[i].name );
|
||||
entry[i].name = 0L;
|
||||
if ( entry_[i].name ) {
|
||||
free( entry_[i].name );
|
||||
entry_[i].name = 0L;
|
||||
}
|
||||
if ( entry[i].value ) {
|
||||
free( entry[i].value );
|
||||
entry[i].value = 0L;
|
||||
if ( entry_[i].value ) {
|
||||
free( entry_[i].value );
|
||||
entry_[i].value = 0L;
|
||||
}
|
||||
}
|
||||
free( entry );
|
||||
entry = 0L;
|
||||
nEntry = 0;
|
||||
NEntry = 0;
|
||||
free( entry_ );
|
||||
entry_ = 0L;
|
||||
nEntry_ = 0;
|
||||
NEntry_ = 0;
|
||||
}
|
||||
dirty_ = 1;
|
||||
}
|
||||
@ -1396,6 +1400,7 @@ Fl_Preferences::Node::~Node()
|
||||
{
|
||||
deleteAllChildren();
|
||||
deleteAllEntries();
|
||||
deleteIndex();
|
||||
if ( path_ ) {
|
||||
free( path_ );
|
||||
path_ = 0L;
|
||||
@ -1420,12 +1425,12 @@ int Fl_Preferences::Node::write( FILE *f )
|
||||
{
|
||||
if ( next_ ) next_->write( f );
|
||||
fprintf( f, "\n[%s]\n\n", path_ );
|
||||
for ( int i = 0; i < nEntry; i++ )
|
||||
for ( int i = 0; i < nEntry_; i++ )
|
||||
{
|
||||
char *src = entry[i].value;
|
||||
char *src = entry_[i].value;
|
||||
if ( src )
|
||||
{ // hack it into smaller pieces if needed
|
||||
fprintf( f, "%s:", entry[i].name );
|
||||
fprintf( f, "%s:", entry_[i].name );
|
||||
int cnt;
|
||||
for ( cnt = 0; cnt < 60; cnt++ )
|
||||
if ( src[cnt]==0 ) break;
|
||||
@ -1443,7 +1448,7 @@ int Fl_Preferences::Node::write( FILE *f )
|
||||
}
|
||||
}
|
||||
else
|
||||
fprintf( f, "%s\n", entry[i].name );
|
||||
fprintf( f, "%s\n", entry_[i].name );
|
||||
}
|
||||
if ( child_ ) child_->write( f );
|
||||
dirty_ = 0;
|
||||
@ -1482,37 +1487,38 @@ Fl_Preferences::Node *Fl_Preferences::Node::addChild( const char *path )
|
||||
Node *nd = find( name );
|
||||
free( name );
|
||||
dirty_ = 1;
|
||||
updateIndex();
|
||||
return nd;
|
||||
}
|
||||
|
||||
// create and set, or change an entry within this node
|
||||
void Fl_Preferences::Node::set( const char *name, const char *value )
|
||||
{
|
||||
for ( int i=0; i<nEntry; i++ )
|
||||
for ( int i=0; i<nEntry_; i++ )
|
||||
{
|
||||
if ( strcmp( name, entry[i].name ) == 0 )
|
||||
if ( strcmp( name, entry_[i].name ) == 0 )
|
||||
{
|
||||
if ( !value ) return; // annotation
|
||||
if ( strcmp( value, entry[i].value ) != 0 )
|
||||
if ( strcmp( value, entry_[i].value ) != 0 )
|
||||
{
|
||||
if ( entry[i].value )
|
||||
free( entry[i].value );
|
||||
entry[i].value = strdup( value );
|
||||
if ( entry_[i].value )
|
||||
free( entry_[i].value );
|
||||
entry_[i].value = strdup( value );
|
||||
dirty_ = 1;
|
||||
}
|
||||
lastEntrySet = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ( NEntry==nEntry )
|
||||
if ( NEntry_==nEntry_ )
|
||||
{
|
||||
NEntry = NEntry ? NEntry*2 : 10;
|
||||
entry = (Entry*)realloc( entry, NEntry * sizeof(Entry) );
|
||||
NEntry_ = NEntry_ ? NEntry_*2 : 10;
|
||||
entry_ = (Entry*)realloc( entry_, NEntry_ * sizeof(Entry) );
|
||||
}
|
||||
entry[ nEntry ].name = strdup( name );
|
||||
entry[ nEntry ].value = value?strdup( value ):0;
|
||||
lastEntrySet = nEntry;
|
||||
nEntry++;
|
||||
entry_[ nEntry_ ].name = strdup( name );
|
||||
entry_[ nEntry_ ].value = value?strdup( value ):0;
|
||||
lastEntrySet = nEntry_;
|
||||
nEntry_++;
|
||||
dirty_ = 1;
|
||||
}
|
||||
|
||||
@ -1546,8 +1552,8 @@ void Fl_Preferences::Node::set( const char *line )
|
||||
// add more data to an existing entry
|
||||
void Fl_Preferences::Node::add( const char *line )
|
||||
{
|
||||
if ( lastEntrySet<0 || lastEntrySet>=nEntry ) return;
|
||||
char *&dst = entry[ lastEntrySet ].value;
|
||||
if ( lastEntrySet<0 || lastEntrySet>=nEntry_ ) return;
|
||||
char *&dst = entry_[ lastEntrySet ].value;
|
||||
int a = strlen( dst );
|
||||
int b = strlen( line );
|
||||
dst = (char*)realloc( dst, a+b+1 );
|
||||
@ -1559,15 +1565,15 @@ void Fl_Preferences::Node::add( const char *line )
|
||||
const char *Fl_Preferences::Node::get( const char *name )
|
||||
{
|
||||
int i = getEntry( name );
|
||||
return i>=0 ? entry[i].value : 0 ;
|
||||
return i>=0 ? entry_[i].value : 0 ;
|
||||
}
|
||||
|
||||
// find the index of an entry, returns -1 if no such entry
|
||||
int Fl_Preferences::Node::getEntry( const char *name )
|
||||
{
|
||||
for ( int i=0; i<nEntry; i++ )
|
||||
for ( int i=0; i<nEntry_; i++ )
|
||||
{
|
||||
if ( strcmp( name, entry[i].name ) == 0 )
|
||||
if ( strcmp( name, entry_[i].name ) == 0 )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
@ -1580,8 +1586,8 @@ char Fl_Preferences::Node::deleteEntry( const char *name )
|
||||
{
|
||||
int ix = getEntry( name );
|
||||
if ( ix == -1 ) return 0;
|
||||
memmove( entry+ix, entry+ix+1, (nEntry-ix-1) * sizeof(Entry) );
|
||||
nEntry--;
|
||||
memmove( entry_+ix, entry_+ix+1, (nEntry_-ix-1) * sizeof(Entry) );
|
||||
nEntry_--;
|
||||
dirty_ = 1;
|
||||
return 1;
|
||||
}
|
||||
@ -1670,10 +1676,14 @@ Fl_Preferences::Node *Fl_Preferences::Node::search( const char *path, int offset
|
||||
// return the number of child nodes (groups)
|
||||
int Fl_Preferences::Node::nChildren()
|
||||
{
|
||||
int cnt = 0;
|
||||
for ( Node *nd = child_; nd; nd = nd->next_ )
|
||||
cnt++;
|
||||
return cnt;
|
||||
if (indexed_) {
|
||||
return nIndex_;
|
||||
} else {
|
||||
int cnt = 0;
|
||||
for ( Node *nd = child_; nd; nd = nd->next_ )
|
||||
cnt++;
|
||||
return cnt;
|
||||
}
|
||||
}
|
||||
|
||||
// return the node name
|
||||
@ -1688,7 +1698,7 @@ const char *Fl_Preferences::Node::name()
|
||||
}
|
||||
}
|
||||
|
||||
// return the n'th child node
|
||||
// return the n'th child node's name
|
||||
const char *Fl_Preferences::Node::child( int ix )
|
||||
{
|
||||
Node *nd = childNode( ix );
|
||||
@ -1701,13 +1711,22 @@ const char *Fl_Preferences::Node::child( int ix )
|
||||
// return the n'th child node
|
||||
Fl_Preferences::Node *Fl_Preferences::Node::childNode( int ix )
|
||||
{
|
||||
Node *nd;
|
||||
for ( nd = child_; nd; nd = nd->next_ )
|
||||
{
|
||||
if ( !ix-- ) break;
|
||||
if ( !nd ) break;
|
||||
createIndex();
|
||||
if (indexed_) {
|
||||
// usually faster access in correct order, but needing more memory
|
||||
return index_[ix];
|
||||
} else {
|
||||
// slow access and reverse order
|
||||
int n = nChildren();
|
||||
ix = n - ix -1;
|
||||
Node *nd;
|
||||
for ( nd = child_; nd; nd = nd->next_ )
|
||||
{
|
||||
if ( !ix-- ) break;
|
||||
if ( !nd ) break;
|
||||
}
|
||||
return nd;
|
||||
}
|
||||
return nd;
|
||||
}
|
||||
|
||||
// remove myself from the list and delete me (and all children)
|
||||
@ -1729,11 +1748,39 @@ char Fl_Preferences::Node::remove()
|
||||
}
|
||||
}
|
||||
parent()->dirty_ = 1;
|
||||
parent()->updateIndex();
|
||||
}
|
||||
delete this;
|
||||
return ( nd != 0 );
|
||||
}
|
||||
|
||||
void Fl_Preferences::Node::createIndex() {
|
||||
if (indexed_) return;
|
||||
int n = nChildren();
|
||||
if (n>NIndex_) {
|
||||
NIndex_ = n + 16;
|
||||
index_ = (Node**)realloc(index_, NIndex_*sizeof(Node**));
|
||||
}
|
||||
Node *nd;
|
||||
int i = 0;
|
||||
for (nd = child_; nd; nd = nd->next_, i++) {
|
||||
index_[n-i-1] = nd;
|
||||
}
|
||||
nIndex_ = n;
|
||||
indexed_ = 1;
|
||||
}
|
||||
|
||||
void Fl_Preferences::Node::updateIndex() {
|
||||
indexed_ = 0;
|
||||
}
|
||||
|
||||
void Fl_Preferences::Node::deleteIndex() {
|
||||
if (index_) free(index_);
|
||||
NIndex_ = nIndex_ = 0;
|
||||
index_ = 0;
|
||||
indexed_ = 0;
|
||||
}
|
||||
|
||||
char Fl_Preferences::Node::copyTo(Fl_Tree *tree, Fl_Tree_Item *ti)
|
||||
{
|
||||
ti->label(name());
|
||||
@ -1744,11 +1791,11 @@ char Fl_Preferences::Node::copyTo(Fl_Tree *tree, Fl_Tree_Item *ti)
|
||||
nd->copyTo(tree, tic);
|
||||
tic->close();
|
||||
}
|
||||
int i, n = nEntry;
|
||||
int i, n = nEntry_;
|
||||
for (i=0; i<n; i++) {
|
||||
char buf[80];
|
||||
const char *name = entry[i].name;
|
||||
const char *value = entry[i].value;
|
||||
const char *name = entry_[i].name;
|
||||
const char *value = entry_[i].value;
|
||||
fl_snprintf(buf, 80, "%s: %s", name, value);
|
||||
tree->add(ti, buf);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
// 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
|
||||
|
@ -126,7 +126,7 @@ Fl_Value_Input::Fl_Value_Input(int X, int Y, int W, int H, const char* l)
|
||||
: Fl_Valuator(X, Y, W, H, l), input(X, Y, W, H, 0) {
|
||||
soft_ = 0;
|
||||
if (input.parent()) // defeat automatic-add
|
||||
((Fl_Group*)input.parent())->remove(input);
|
||||
input.parent()->remove(input);
|
||||
input.parent((Fl_Group *)this); // kludge!
|
||||
input.callback(input_cb, this);
|
||||
input.when(FL_WHEN_CHANGED);
|
||||
|
@ -38,6 +38,47 @@
|
||||
// One Compile to copy them all and in the bundle bind them,
|
||||
// in the Land of MacOS X where the Drop-Shadows lie."
|
||||
|
||||
/*
|
||||
TODO: The following messages point to the last Carbon remainders. We should
|
||||
really remove these as well, so we can stop linking to Carbon alltogether.
|
||||
|
||||
"_GetKeys", referenced from:
|
||||
Fl::get_key(int) in Fl_get_key.o
|
||||
|
||||
"_GetCurrentEventQueue", referenced from:
|
||||
do_queued_events(double)in Fl.o
|
||||
|
||||
"_InstallEventLoopTimer", referenced from:
|
||||
Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
|
||||
|
||||
"_FlushEvents", referenced from:
|
||||
fl_open_display() in Fl.o
|
||||
|
||||
"_GetEventParameter", referenced from:
|
||||
carbonTextHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in Fl.o
|
||||
|
||||
"_InstallEventHandler", referenced from:
|
||||
fl_open_display() in Fl.o
|
||||
|
||||
"_GetEventDispatcherTarget", referenced from:
|
||||
fl_open_display() in Fl.o
|
||||
|
||||
"_SetEventLoopTimerNextFireTime", referenced from:
|
||||
Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
|
||||
|
||||
"_RemoveEventLoopTimer", referenced from:
|
||||
Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
|
||||
delete_timer(MacTimeout&) in Fl.o
|
||||
|
||||
"_GetMainEventLoop", referenced from:
|
||||
Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
|
||||
|
||||
"_GetCurrentKeyModifiers", referenced from:
|
||||
-[FLView flagsChanged:] in Fl.o
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// we don't need the following definition because we deliver only
|
||||
// true mouse moves. On very slow systems however, this flag may
|
||||
// still be useful.
|
||||
@ -1918,7 +1959,7 @@ static void q_set_window_title(NSWindow *nsw, const char * name ) {
|
||||
if ( Fl::e_keysym )
|
||||
sendEvent = ( prevMods<mods ) ? FL_KEYBOARD : FL_KEYUP;
|
||||
Fl::e_length = 0;
|
||||
Fl::e_text = "";
|
||||
Fl::e_text = (char*)"";
|
||||
prevMods = mods;
|
||||
}
|
||||
mods_to_e_state( mods );
|
||||
|
114
test/demo.cxx
114
test/demo.cxx
@ -25,6 +25,104 @@
|
||||
// http://www.fltk.org/str.php
|
||||
//
|
||||
|
||||
const char *default_menu[] = {
|
||||
"# Menu description file for the generic demo program\n",
|
||||
"#\n",
|
||||
"# Each line consists of three fields, separated by :\n",
|
||||
"#\n",
|
||||
"# - menu name : To which the item belongs (starts with @)\n",
|
||||
"# - item name : Placed on button. (use \\n for newline)\n",
|
||||
"# - command name: To be executed. Use a menu name to define a submenu.\n",
|
||||
"#\n",
|
||||
"# @main indicates the main menu.\n",
|
||||
"#\n",
|
||||
"\n",
|
||||
"@main:Widget\\nTests:@x\n",
|
||||
"@x:Fl_Browser:browser\n",
|
||||
"@x:Fl_Input:input\n",
|
||||
"@x:Fl_Output:output\n",
|
||||
"@x:Fl_Button:radio\n",
|
||||
"@x:Fl_Tabs:tabs\n",
|
||||
"@x:Fl_Tile:tile\n",
|
||||
"@x:Fl_Scroll:scroll\n",
|
||||
"@x:Fl_Pack:pack\n",
|
||||
"@x:more...:@xm\n",
|
||||
"@xm:Fl_Menu:menubar\n",
|
||||
"@xm:Fl_Table:table\n",
|
||||
"@xm:Fl_Tree:tree\n",
|
||||
"\n",
|
||||
"@main:Window\\nTests:@w\n",
|
||||
"@w:overlay:overlay\n",
|
||||
"@w:subwindow:subwindow\n",
|
||||
"@w:double\\nbuffer:doublebuffer\n",
|
||||
"@w:GL window:cube\n",
|
||||
"@w:GL overlay:gl_overlay\n",
|
||||
"@w:iconize:iconize\n",
|
||||
"@w:fullscreen:fullscreen\n",
|
||||
"@w:resizable:resizebox\n",
|
||||
"@w:resize:resize\n",
|
||||
"\n",
|
||||
"@main:Drawing\\nTests:@d\n",
|
||||
"@d:Images:@di\n",
|
||||
"@di:Fl_Bitmap:bitmap\n",
|
||||
"@di:Fl_Pixmap:pixmap\n",
|
||||
"@di:Fl_RGB\\n_Image:image\n",
|
||||
"@di:Fl_Shared\\n_Image:pixmap_browser\n",
|
||||
"@di:Fl_Tiled\\n_Image:tiled_image\n",
|
||||
"@d:cursor:cursor\n",
|
||||
"@d:labels:label\n",
|
||||
"@d:fl_arc:arc\n",
|
||||
"@d:fl_curve:curve\n",
|
||||
"@d:fl_line_style:line_style\n",
|
||||
"\n",
|
||||
"@main:Events:@u\n",
|
||||
"@u:navigation:navigation\n",
|
||||
"@u:minimum update:minimum\n",
|
||||
"@u:keyboard:keyboard\n",
|
||||
"@u:fast && slow widgets:fast_slow\n",
|
||||
"@u:inactive:inactive\n",
|
||||
"\n",
|
||||
"@main:Fluid\\n(UI design tool):../fluid/fluid valuators.fl\n",
|
||||
"\n",
|
||||
"@main:Cool\\nDemos:@e\n",
|
||||
"@e:X Color\\nBrowser:colbrowser\n",
|
||||
"@e:Mandelbrot:mandelbrot\n",
|
||||
"@e:Fractals:fractals\n",
|
||||
"@e:Puzzle:glpuzzle\n",
|
||||
"@e:Block\\nAttack!:blocks\n",
|
||||
"@e:Checkers:checkers\n",
|
||||
"@e:Sudoku:sudoku\n",
|
||||
"\n",
|
||||
"@main:Other\\nTests:@o\n",
|
||||
"@o:Color Choosers:color_chooser\n",
|
||||
"@o:File Chooser:file_chooser\n",
|
||||
"@o:Native File Chooser:native-filechooser\n",
|
||||
"@o:Font Tests:@of\n",
|
||||
"@of:Fonts:fonts\n",
|
||||
"@of:UTF-8:utf8\n",
|
||||
"@o:HelpDialog:help\n",
|
||||
"@o:Input Choice:input_choice\n",
|
||||
"@o:Preferences:preferences\n",
|
||||
"@o:Threading:threads\n",
|
||||
"@o:XForms Emulation:forms\n",
|
||||
"\n",
|
||||
"@main:Tutorial\\nfrom\\nManual:@j\n",
|
||||
"@j:ask\\n(modified):ask\n",
|
||||
"@j:button:button\n",
|
||||
"@j:CubeView:CubeView\n",
|
||||
"@j:editor:editor editor.cxx\n",
|
||||
"@j:hello:hello\n",
|
||||
"@j:shape:shape\n",
|
||||
"\n",
|
||||
"@main:Images\\nfor\\nManual:@i\n",
|
||||
"@i:valuators:valuators\n",
|
||||
"@i:symbols:symbols\n",
|
||||
"@i:buttons:buttons\n",
|
||||
"@i:clock:clock\n",
|
||||
"@i:popups:message\n",
|
||||
"@i:boxtypes:boxtype\n",
|
||||
0 };
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@ -316,9 +414,9 @@ void doexit(Fl_Widget *, void *) {exit(0);}
|
||||
int load_the_menu(const char* fname)
|
||||
/* Loads the menu file. Returns whether successful. */
|
||||
{
|
||||
FILE *fin;
|
||||
FILE *fin = 0;
|
||||
char line[256], mname[64],iname[64],cname[64];
|
||||
int i,j;
|
||||
int i,j, mi = 0;
|
||||
fin = fopen(fname,"r");
|
||||
if (fin == NULL)
|
||||
{
|
||||
@ -333,10 +431,15 @@ int load_the_menu(const char* fname)
|
||||
fin = fopen(fname,"r");
|
||||
if (fin == NULL)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
for (;;) {
|
||||
if (fgets(line,256,fin) == NULL) break;
|
||||
if (fin) {
|
||||
if (fgets(line,256,fin) == NULL) break;
|
||||
} else {
|
||||
const char *m = default_menu[mi++];
|
||||
if (!m) break;
|
||||
strcpy(line, m);
|
||||
}
|
||||
// remove all carriage returns that Cygwin may have inserted
|
||||
char *s = line, *d = line;
|
||||
for (;;++d) {
|
||||
@ -370,7 +473,8 @@ int load_the_menu(const char* fname)
|
||||
cname[j] = '\0';
|
||||
addto_menu(mname,iname,cname);
|
||||
}
|
||||
fclose(fin);
|
||||
if (fin)
|
||||
fclose(fin);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user