summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/fluidbin2685848 -> 2685160 bytes
-rw-r--r--fluid/Fluid.cxx20
-rw-r--r--fluid/Fluid.h22
-rw-r--r--fluid/Project.cxx4
-rw-r--r--fluid/app/Snap_Action.cxx42
-rw-r--r--fluid/app/Snap_Action.h4
-rw-r--r--fluid/app/shell_command.cxx20
-rw-r--r--fluid/app/shell_command.h2
-rw-r--r--fluid/app/templates.cxx2
-rw-r--r--fluid/fld_tool_store.h30
-rw-r--r--fluid/io/Code_Writer.cxx34
-rw-r--r--fluid/io/Project_Reader.cxx4
-rw-r--r--fluid/io/String_Writer.cxx6
-rw-r--r--fluid/nodes/Button_Node.h24
-rw-r--r--fluid/nodes/Function_Node.cxx10
-rw-r--r--fluid/nodes/Function_Node.h32
-rw-r--r--fluid/nodes/Grid_Node.cxx2
-rw-r--r--fluid/nodes/Grid_Node.h4
-rw-r--r--fluid/nodes/Group_Node.cxx16
-rw-r--r--fluid/nodes/Group_Node.h32
-rw-r--r--fluid/nodes/Menu_Node.cxx62
-rw-r--r--fluid/nodes/Menu_Node.h40
-rw-r--r--fluid/nodes/Node.cxx12
-rw-r--r--fluid/nodes/Node.h50
-rw-r--r--fluid/nodes/Widget_Node.cxx184
-rw-r--r--fluid/nodes/Widget_Node.h4
-rw-r--r--fluid/nodes/Window_Node.cxx46
-rw-r--r--fluid/nodes/Window_Node.h8
-rw-r--r--fluid/nodes/factory.cxx126
-rw-r--r--fluid/panels/function_panel.cxx114
-rw-r--r--fluid/panels/function_panel.fl114
-rw-r--r--fluid/panels/settings_panel.cxx64
-rw-r--r--fluid/panels/settings_panel.fl64
-rw-r--r--fluid/panels/widget_panel.cxx268
-rw-r--r--fluid/panels/widget_panel.fl268
-rw-r--r--fluid/panels/widget_panel/Grid_Child_Tab.cxx6
-rw-r--r--fluid/panels/widget_panel/Grid_Child_Tab.fl6
-rw-r--r--fluid/proj/i18n.cxx18
-rw-r--r--fluid/proj/i18n.h16
-rw-r--r--fluid/proj/mergeback.cxx54
-rw-r--r--fluid/proj/mergeback.h23
-rw-r--r--fluid/proj/undo.cxx10
-rw-r--r--fluid/proj/undo.h12
-rw-r--r--fluid/rsrcs/pixmaps.cxx138
-rw-r--r--fluid/tools/autodoc.cxx18
-rw-r--r--fluid/widgets/Bin_Button.cxx2
-rw-r--r--fluid/widgets/Node_Browser.cxx8
-rw-r--r--lib/libfltk.abin2237456 -> 2237456 bytes
-rw-r--r--lib/libfltk_images.abin268016 -> 268016 bytes
49 files changed, 1042 insertions, 1003 deletions
diff --git a/bin/fluid b/bin/fluid
index 8e20d02c8..1cff6c3cb 100755
--- a/bin/fluid
+++ b/bin/fluid
Binary files differ
diff --git a/fluid/Fluid.cxx b/fluid/Fluid.cxx
index 8d1bd29d3..083d00257 100644
--- a/fluid/Fluid.cxx
+++ b/fluid/Fluid.cxx
@@ -73,7 +73,7 @@ static void external_editor_timer(void*) {
// Walk tree looking for files modified by external editors.
int modified = 0;
for (Node *p: Fluid.proj.tree.all_nodes()) {
- if ( p->is_a(Type::Code) ) {
+ if ( p->is_a(FLD_NODE_TYPE_Code) ) {
Code_Node *code = static_cast<Code_Node*>(p);
// Code changed by external editor?
if ( code->handle_editor_changes() ) { // updates ram, file size/mtime
@@ -163,13 +163,13 @@ int Application::run(int argc,char **argv) {
Fl::visual((Fl_Mode)(FL_DOUBLE|FL_INDEX));
Fl_File_Icon::load_system_icons();
main_window->callback(exit_cb);
- position_window(main_window,"main_window_pos", 1, 10, 30, WINWIDTH, WINHEIGHT );
+ position_window(main_window,"main_window_pos", 1, 10, 30, FLD_WINWIDTH, FLD_WINHEIGHT );
if (g_shell_config) {
- g_shell_config->read(preferences, fld::Tool_Store::USER);
+ g_shell_config->read(preferences, FLD_TOOL_STORE_USER);
g_shell_config->update_settings_dialog();
g_shell_config->rebuild_shell_menu();
}
- Fluid.layout_list.read(preferences, fld::Tool_Store::USER);
+ Fluid.layout_list.read(preferences, FLD_TOOL_STORE_USER);
main_window->show(argc,argv);
toggle_widget_bin();
toggle_codeview_cb(nullptr,nullptr);
@@ -292,8 +292,8 @@ void Application::quit() {
delete help_dialog;
if (g_shell_config)
- g_shell_config->write(preferences, fld::Tool_Store::USER);
- Fluid.layout_list.write(preferences, fld::Tool_Store::USER);
+ g_shell_config->write(preferences, FLD_TOOL_STORE_USER);
+ Fluid.layout_list.write(preferences, FLD_TOOL_STORE_USER);
proj.undo.clear();
@@ -768,7 +768,7 @@ void Application::print_snapshots() {
Fl_Window *win;
for (auto w: proj.tree.all_widgets()) {
- if (w->is_a(Type::Window)) {
+ if (w->is_a(FLD_NODE_TYPE_Window)) {
Window_Node *win_t = static_cast<Window_Node*>(w);
windows[num_windows] = win_t;
Fl_Window *win = static_cast<Fl_Window*>(win_t->o);
@@ -1176,13 +1176,13 @@ void Application::make_main_window() {
if (!main_window) {
Fl_Widget *o;
loadPixmaps();
- main_window = new Fl_Double_Window(WINWIDTH,WINHEIGHT,"fluid");
+ main_window = new Fl_Double_Window(FLD_WINWIDTH,FLD_WINHEIGHT,"fluid");
main_window->box(FL_NO_BOX);
- o = make_widget_browser(0,MENUHEIGHT,BROWSERWIDTH,BROWSERHEIGHT);
+ o = make_widget_browser(0,FLD_MENUHEIGHT,FLD_BROWSERWIDTH,FLD_BROWSERHEIGHT);
o->box(FL_FLAT_BOX);
o->tooltip("Double-click to view or change an item.");
main_window->resizable(o);
- main_menubar = new fld::widget::App_Menu_Bar(0,0,BROWSERWIDTH,MENUHEIGHT);
+ main_menubar = new fld::widget::App_Menu_Bar(0,0,FLD_BROWSERWIDTH,FLD_MENUHEIGHT);
main_menubar->menu(main_menu);
// quick access to all dynamic menu items
save_item = (Fl_Menu_Item*)main_menubar->find_item(menu_file_save_cb);
diff --git a/fluid/Fluid.h b/fluid/Fluid.h
index d67c31cb3..1498760e3 100644
--- a/fluid/Fluid.h
+++ b/fluid/Fluid.h
@@ -29,11 +29,11 @@
#include <string>
-constexpr int BROWSERWIDTH = 300;
-constexpr int BROWSERHEIGHT = 500;
-constexpr int WINWIDTH = 300;
-constexpr int MENUHEIGHT = 25;
-constexpr int WINHEIGHT = (BROWSERHEIGHT+MENUHEIGHT);
+#define FLD_BROWSERWIDTH 300
+#define FLD_BROWSERHEIGHT 500
+#define FLD_WINWIDTH 300
+#define FLD_MENUHEIGHT 25
+#define FLD_WINHEIGHT (FLD_BROWSERHEIGHT+FLD_MENUHEIGHT)
// ---- types
@@ -54,18 +54,6 @@ namespace widget {
class App_Menu_Bar;
}
-/**
- Indicate the storage location for tools like layout suites and shell macros.
- \see class Fd_Shell_Command, class Layout_Suite
- */
-enum class Tool_Store {
- INTERNAL, ///< stored inside FLUID app
- USER, ///< suite is stored in the user wide FLUID settings
- PROJECT, ///< suite is stored within the current .fl project file
- FILE ///< store suite in external file
-};
-
-
class Project;
class Application {
diff --git a/fluid/Project.cxx b/fluid/Project.cxx
index e2599e3e6..4545530a6 100644
--- a/fluid/Project.cxx
+++ b/fluid/Project.cxx
@@ -167,8 +167,8 @@ std::string Project::stringsfile_name() const {
if (!proj_filename) return std::string{};
switch (i18n.type) {
default: return fl_filename_setext_str(fl_filename_name(proj_filename), ".txt");
- case fld::I18n_Type::GNU: return fl_filename_setext_str(fl_filename_name(proj_filename), ".po");
- case fld::I18n_Type::POSIX: return fl_filename_setext_str(fl_filename_name(proj_filename), ".msg");
+ case FLD_I18N_TYPE_GNU: return fl_filename_setext_str(fl_filename_name(proj_filename), ".po");
+ case FLD_I18N_TYPE_POSIX: return fl_filename_setext_str(fl_filename_name(proj_filename), ".msg");
}
}
diff --git a/fluid/app/Snap_Action.cxx b/fluid/app/Snap_Action.cxx
index 08e9bf1e5..2ec7affad 100644
--- a/fluid/app/Snap_Action.cxx
+++ b/fluid/app/Snap_Action.cxx
@@ -105,8 +105,8 @@ static Layout_Preset grid_tool = {
Layout_Preset *fld::app::default_layout_preset = &fltk_app;
static Layout_Suite static_suite_list[] = {
- { (char*)"FLTK", (char*)"@fd_beaker FLTK", { &fltk_app, &fltk_dlg, &fltk_tool }, fld::Tool_Store::INTERNAL },
- { (char*)"Grid", (char*)"@fd_beaker Grid", { &grid_app, &grid_dlg, &grid_tool }, fld::Tool_Store::INTERNAL }
+ { (char*)"FLTK", (char*)"@fd_beaker FLTK", { &fltk_app, &fltk_dlg, &fltk_tool }, FLD_TOOL_STORE_INTERNAL },
+ { (char*)"Grid", (char*)"@fd_beaker Grid", { &grid_app, &grid_dlg, &grid_tool }, FLD_TOOL_STORE_INTERNAL }
};
Fl_Menu_Item main_layout_submenu_[] = {
@@ -403,10 +403,10 @@ void Layout_Suite::read(fld::io::Project_Reader *in) {
void Layout_Suite::update_label() {
std::string sym;
switch (storage_) {
- case fld::Tool_Store::INTERNAL: sym.assign("@fd_beaker "); break;
- case fld::Tool_Store::USER: sym.assign("@fd_user "); break;
- case fld::Tool_Store::PROJECT: sym.assign("@fd_project "); break;
- case fld::Tool_Store::FILE: sym.assign("@fd_file "); break;
+ case FLD_TOOL_STORE_INTERNAL: sym.assign("@fd_beaker "); break;
+ case FLD_TOOL_STORE_USER: sym.assign("@fd_user "); break;
+ case FLD_TOOL_STORE_PROJECT: sym.assign("@fd_project "); break;
+ case FLD_TOOL_STORE_FILE: sym.assign("@fd_file "); break;
}
sym.append(name_);
if (menu_label)
@@ -436,14 +436,14 @@ void Layout_Suite::init() {
name_ = nullptr;
menu_label = nullptr;
layout[0] = layout[1] = layout[2] = nullptr;
- storage_ = fld::Tool_Store::INTERNAL;
+ storage_ = FLD_TOOL_STORE_INTERNAL;
}
/**
Free all allocated resources.
*/
Layout_Suite::~Layout_Suite() {
- if (storage_ == fld::Tool_Store::INTERNAL) return;
+ if (storage_ == FLD_TOOL_STORE_INTERNAL) return;
if (name_) ::free(name_);
for (int i = 0; i < 3; ++i) {
delete layout[i];
@@ -619,7 +619,7 @@ Layout_List::~Layout_List() {
::free(choice_menu_);
for (int i = 0; i < list_size_; i++) {
Layout_Suite &suite = list_[i];
- if (suite.storage_ != fld::Tool_Store::INTERNAL)
+ if (suite.storage_ != FLD_TOOL_STORE_INTERNAL)
suite.~Layout_Suite();
}
::free(list_);
@@ -664,9 +664,9 @@ void Layout_List::update_menu_labels() {
Load all user layouts from the FLUID user preferences.
*/
int Layout_List::load(const std::string &filename) {
- remove_all(fld::Tool_Store::FILE);
+ remove_all(FLD_TOOL_STORE_FILE);
Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", nullptr, Fl_Preferences::C_LOCALE);
- read(prefs, fld::Tool_Store::FILE);
+ read(prefs, FLD_TOOL_STORE_FILE);
return 0;
}
@@ -677,7 +677,7 @@ int Layout_List::save(const std::string &filename) {
assert(this);
Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", nullptr, (Fl_Preferences::Root)(Fl_Preferences::C_LOCALE|Fl_Preferences::CLEAR));
prefs.clear();
- write(prefs, fld::Tool_Store::FILE);
+ write(prefs, FLD_TOOL_STORE_FILE);
return 0;
}
@@ -736,7 +736,7 @@ void Layout_List::write(fld::io::Project_Writer *out) {
if ((current_suite()==0) && (current_preset()==0)) {
int nSuite = 0;
for (int i=0; i<list_size_; i++) {
- if (list_[i].storage_ == fld::Tool_Store::PROJECT) nSuite++;
+ if (list_[i].storage_ == FLD_TOOL_STORE_PROJECT) nSuite++;
}
if (nSuite == 0) return;
}
@@ -745,7 +745,7 @@ void Layout_List::write(fld::io::Project_Writer *out) {
out->write_string(" current_preset %d\n", current_preset());
for (int i=0; i<list_size_; i++) {
Layout_Suite &suite = list_[i];
- if (suite.storage_ == fld::Tool_Store::PROJECT)
+ if (suite.storage_ == FLD_TOOL_STORE_PROJECT)
suite.write(out);
}
out->write_string("}");
@@ -772,7 +772,7 @@ void Layout_List::read(fld::io::Project_Reader *in) {
} else if (!strcmp(key, "suite")) {
int n = add(in->filename_name());
list_[n].read(in);
- list_[n].storage(fld::Tool_Store::PROJECT);
+ list_[n].storage(FLD_TOOL_STORE_PROJECT);
} else if (!strcmp(key, "}")) {
break;
} else {
@@ -878,8 +878,8 @@ int Layout_List::add(const char *name) {
::memcpy(new_suite.layout[i], old_suite.layout[i], sizeof(Layout_Preset));
}
fld::Tool_Store new_storage = old_suite.storage_;
- if (new_storage == fld::Tool_Store::INTERNAL)
- new_storage = fld::Tool_Store::USER;
+ if (new_storage == FLD_TOOL_STORE_INTERNAL)
+ new_storage = FLD_TOOL_STORE_USER;
new_suite.storage(new_storage);
main_menu_[n].label(new_suite.menu_label);
main_menu_[n].callback(main_menu_[0].callback());
@@ -920,7 +920,7 @@ void Layout_List::remove(int ix) {
/**
Remove all Suites that use the given storage attribute.
- \param[in] storage storage attribute, see fld::Tool_Store::INTERNAL, etc.
+ \param[in] storage storage attribute, see FLD_TOOL_STORE_INTERNAL, etc.
*/
void Layout_List::remove_all(fld::Tool_Store storage) {
for (int i=list_size_-1; i>=0; --i) {
@@ -953,11 +953,11 @@ static bool in_window(Snap_Data &d) {
}
static bool in_group(Snap_Data &d) {
- return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(Type::Group) && d.wgt->parent != d.win);
+ return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(FLD_NODE_TYPE_Group) && d.wgt->parent != d.win);
}
static bool in_tabs(Snap_Data &d) {
- return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(Type::Tabs));
+ return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(FLD_NODE_TYPE_Tabs));
}
static Fl_Group *parent(Snap_Data &d) {
@@ -1473,7 +1473,7 @@ public:
clr();
best_match = nullptr;
if (!d.wgt) return;
- if (!d.wgt->parent->is_a(Type::Group)) return;
+ if (!d.wgt->parent->is_a(FLD_NODE_TYPE_Group)) return;
int dsib_min = 1024;
Group_Node *gt = (Group_Node*)d.wgt->parent;
Fl_Group *g = (Fl_Group*)gt->o;
diff --git a/fluid/app/Snap_Action.h b/fluid/app/Snap_Action.h
index e5f4c998a..6bbe07bb8 100644
--- a/fluid/app/Snap_Action.h
+++ b/fluid/app/Snap_Action.h
@@ -17,6 +17,7 @@
#ifndef _FLUID_FD_SNAP_ACTION_H
#define _FLUID_FD_SNAP_ACTION_H
+#include "../fld_tool_store.h"
#include <string>
class Window_Node;
@@ -27,7 +28,6 @@ class Fl_Preferences;
extern Fl_Menu_Item main_layout_submenu_[];
namespace fld {
-enum class Tool_Store; // fld::
namespace io {
class Project_Reader; // fld::io::
class Project_Writer; // fld::io::
@@ -99,7 +99,7 @@ public:
char *name_; ///< name of the suite
char *menu_label; ///< label text used in pulldown menu
Layout_Preset *layout[3]; ///< presets for application, dialog, and toolbox windows
- fld::Tool_Store storage_; ///< storage location (see fld::Tool_Store::INTERNAL, etc.)
+ fld::Tool_Store storage_; ///< storage location (see FLD_TOOL_STORE_INTERNAL, etc.)
void write(Fl_Preferences &prefs);
void read(Fl_Preferences &prefs);
void write(fld::io::Project_Writer*);
diff --git a/fluid/app/shell_command.cxx b/fluid/app/shell_command.cxx
index a4b664fda..05bc28ec0 100644
--- a/fluid/app/shell_command.cxx
+++ b/fluid/app/shell_command.cxx
@@ -426,7 +426,7 @@ void run_shell_command(const std::string &cmd, int flags) {
*/
Fd_Shell_Command::Fd_Shell_Command()
: shortcut(0),
- storage(fld::Tool_Store::USER),
+ storage(FLD_TOOL_STORE_USER),
condition(0),
flags(0),
shell_menu_item_(nullptr)
@@ -460,7 +460,7 @@ Fd_Shell_Command::Fd_Shell_Command(const std::string &in_name)
: name(in_name),
label(in_name),
shortcut(0),
- storage(fld::Tool_Store::USER),
+ storage(FLD_TOOL_STORE_USER),
condition(Fd_Shell_Command::ALWAYS),
command("echo \"Hello, FLUID!\""),
flags(Fd_Shell_Command::SAVE_PROJECT|Fd_Shell_Command::SAVE_SOURCECODE),
@@ -595,7 +595,7 @@ void Fd_Shell_Command::write(Fl_Preferences &prefs, bool save_location) {
void Fd_Shell_Command::read(class fld::io::Project_Reader *in) {
const char *c = in->read_word(1);
if (strcmp(c, "{")!=0) return; // expecting start of group
- storage = fld::Tool_Store::PROJECT;
+ storage = FLD_TOOL_STORE_PROJECT;
for (;;) {
c = in->read_word(1);
if (strcmp(c, "}")==0) break; // end of command list
@@ -696,7 +696,7 @@ void Fd_Shell_Command_List::read(Fl_Preferences &prefs, fld::Tool_Store storage)
if (version == 0) {
int save_fl, save_code, save_strings;
Fd_Shell_Command *cmd = new Fd_Shell_Command();
- cmd->storage = fld::Tool_Store::USER;
+ cmd->storage = FLD_TOOL_STORE_USER;
cmd->name = "Sample Shell Command";
cmd->label = "Sample Shell Command";
cmd->shortcut = FL_ALT+'g';
@@ -719,7 +719,7 @@ void Fd_Shell_Command_List::read(Fl_Preferences &prefs, fld::Tool_Store storage)
for (int i=0; i<n; i++) {
Fl_Preferences cmd_prefs(shell_commands, Fl_Preferences::Name(i));
Fd_Shell_Command *cmd = new Fd_Shell_Command();
- cmd->storage = fld::Tool_Store::USER;
+ cmd->storage = FLD_TOOL_STORE_USER;
cmd->read(cmd_prefs);
add(cmd);
}
@@ -733,7 +733,7 @@ void Fd_Shell_Command_List::write(Fl_Preferences &prefs, fld::Tool_Store storage
shell_commands.delete_all_groups();
int index = 0;
for (int i=0; i<list_size; i++) {
- if (list[i]->storage == fld::Tool_Store::USER) {
+ if (list[i]->storage == FLD_TOOL_STORE_USER) {
Fl_Preferences cmd(shell_commands, Fl_Preferences::Name(index++));
list[i]->write(cmd);
}
@@ -746,7 +746,7 @@ void Fd_Shell_Command_List::write(Fl_Preferences &prefs, fld::Tool_Store storage
void Fd_Shell_Command_List::read(fld::io::Project_Reader *in) {
const char *c = in->read_word(1);
if (strcmp(c, "{")!=0) return; // expecting start of group
- clear(fld::Tool_Store::PROJECT);
+ clear(FLD_TOOL_STORE_PROJECT);
for (;;) {
c = in->read_word(1);
if (strcmp(c, "}")==0) break; // end of command list
@@ -766,13 +766,13 @@ void Fd_Shell_Command_List::read(fld::io::Project_Reader *in) {
void Fd_Shell_Command_List::write(fld::io::Project_Writer *out) {
int n_in_project_file = 0;
for (int i=0; i<list_size; i++) {
- if (list[i]->storage == fld::Tool_Store::PROJECT)
+ if (list[i]->storage == FLD_TOOL_STORE_PROJECT)
n_in_project_file++;
}
if (n_in_project_file > 0) {
out->write_string("\nshell_commands {");
for (int i=0; i<list_size; i++) {
- if (list[i]->storage == fld::Tool_Store::PROJECT)
+ if (list[i]->storage == FLD_TOOL_STORE_PROJECT)
list[i]->write(out);
}
out->write_string("\n}");
@@ -960,7 +960,7 @@ void Fd_Shell_Command_List::import_from_file() {
for (i = 0; i < n; i++) {
Fl_Preferences cmd_prefs(shell_commands, Fl_Preferences::Name(i));
Fd_Shell_Command *cmd = new Fd_Shell_Command();
- cmd->storage = fld::Tool_Store::USER;
+ cmd->storage = FLD_TOOL_STORE_USER;
cmd->read(cmd_prefs);
g_shell_config->add(cmd);
}
diff --git a/fluid/app/shell_command.h b/fluid/app/shell_command.h
index bc7a18c3e..b9e68ca15 100644
--- a/fluid/app/shell_command.h
+++ b/fluid/app/shell_command.h
@@ -104,7 +104,7 @@ public:
std::string name { };
std::string label { };
Fl_Shortcut shortcut = 0;
- fld::Tool_Store storage = fld::Tool_Store::USER;
+ fld::Tool_Store storage = FLD_TOOL_STORE_USER;
int condition = ALWAYS; // always, hide, windows only, linux only, mac only, user, machine
std::string condition_data { }; // user name, machine name
std::string command { };
diff --git a/fluid/app/templates.cxx b/fluid/app/templates.cxx
index cbd266b13..09fdc0220 100644
--- a/fluid/app/templates.cxx
+++ b/fluid/app/templates.cxx
@@ -107,7 +107,7 @@ void fld::app::save_template() {
for (t = Fluid.proj.tree.first; t; t = t->next) {
// Find the first window...
- if (t->is_a(Type::Window)) break;
+ if (t->is_a(FLD_NODE_TYPE_Window)) break;
}
if (!t) return;
diff --git a/fluid/fld_tool_store.h b/fluid/fld_tool_store.h
new file mode 100644
index 000000000..cfe325def
--- /dev/null
+++ b/fluid/fld_tool_store.h
@@ -0,0 +1,30 @@
+//
+// Tool_Store type definition for FLUID.
+//
+// Copyright 1998-2025 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file.
+//
+
+#ifndef FLUID_FLD_TOOL_STORE_H
+#define FLUID_FLD_TOOL_STORE_H
+
+namespace fld {
+
+/**
+ Indicate the storage location for tools like layout suites and shell macros.
+ \see class Fd_Shell_Command, class Layout_Suite
+ */
+typedef int Tool_Store;
+
+} // namespace fld
+
+enum {
+ FLD_TOOL_STORE_INTERNAL = 0, ///< stored inside FLUID app
+ FLD_TOOL_STORE_USER, ///< suite is stored in the user wide FLUID settings
+ FLD_TOOL_STORE_PROJECT, ///< suite is stored within the current .fl project file
+ FLD_TOOL_STORE_FILE ///< store suite in external file
+};
+
+#endif // FLUID_FLD_TOOL_STORE_H
diff --git a/fluid/io/Code_Writer.cxx b/fluid/io/Code_Writer.cxx
index 7f265bafa..916d024bd 100644
--- a/fluid/io/Code_Writer.cxx
+++ b/fluid/io/Code_Writer.cxx
@@ -457,12 +457,12 @@ void Code_Writer::write_c_indented(const char *textlines, int inIndent, char inT
members of the class itself.
*/
bool is_class_member(Node *t) {
- return t->is_a(Type::Function)
- || t->is_a(Type::Decl)
- || t->is_a(Type::Data);
-// || t->is_a(Type::Class) // FLUID can't handle a class inside a class
-// || t->is_a(Type::Widget_Class)
-// || t->is_a(Type::DeclBlock) // Declaration blocks are generally not handled well
+ return t->is_a(FLD_NODE_TYPE_Function)
+ || t->is_a(FLD_NODE_TYPE_Decl)
+ || t->is_a(FLD_NODE_TYPE_Data);
+// || t->is_a(FLD_NODE_TYPE_Class) // FLUID can't handle a class inside a class
+// || t->is_a(FLD_NODE_TYPE_Widget_Class)
+// || t->is_a(FLD_NODE_TYPE_DeclBlock) // Declaration blocks are generally not handled well
}
/**
@@ -476,8 +476,8 @@ bool is_class_member(Node *t) {
\see is_class_member(Node *t)
*/
bool is_comment_before_class_member(Node *q) {
- if (q->is_a(Type::Comment) && q->next && q->next->level==q->level) {
- if (q->next->is_a(Type::Comment))
+ if (q->is_a(FLD_NODE_TYPE_Comment) && q->next && q->next->level==q->level) {
+ if (q->next->is_a(FLD_NODE_TYPE_Comment))
return is_comment_before_class_member(q->next);
if (is_class_member(q->next))
return true;
@@ -515,7 +515,7 @@ Node* Code_Writer::write_static(Node* p) {
Node* Code_Writer::write_code(Node* p) {
// write all code that comes before the children code
// (but don't write the last comment until the very end)
- if (!(p==Fluid.proj.tree.last && p->is_a(Type::Comment))) {
+ if (!(p==Fluid.proj.tree.last && p->is_a(FLD_NODE_TYPE_Comment))) {
if (write_codeview) p->code1_start = (int)ftell(code_file);
if (write_codeview) p->header1_start = (int)ftell(header_file);
p->write_code1(*this);
@@ -611,7 +611,7 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) {
// if the first entry in the Type tree is a comment, then it is probably
// a copyright notice. We print that before anything else in the file!
Node* first_node = Fluid.proj.tree.first;
- if (first_node && first_node->is_a(Type::Comment)) {
+ if (first_node && first_node->is_a(FLD_NODE_TYPE_Comment)) {
if (write_codeview) {
first_node->code1_start = first_node->code2_start = (int)ftell(code_file);
first_node->header1_start = first_node->header2_start = (int)ftell(header_file);
@@ -689,14 +689,14 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) {
}
}
std::string loc_include, loc_conditional;
- if (proj_.i18n.type==fld::I18n_Type::GNU) {
+ if (proj_.i18n.type==FLD_I18N_TYPE_GNU) {
loc_include = proj_.i18n.gnu_include;
loc_conditional = proj_.i18n.gnu_conditional;
} else {
loc_include = proj_.i18n.posix_include;
loc_conditional = proj_.i18n.posix_conditional;
}
- if ((proj_.i18n.type != fld::I18n_Type::NONE) && !loc_include.empty()) {
+ if ((proj_.i18n.type != FLD_I18N_TYPE_NONE) && !loc_include.empty()) {
int conditional = !loc_conditional.empty();
if (conditional) {
write_c("#ifdef %s\n", loc_conditional.c_str());
@@ -706,7 +706,7 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) {
write_c("#%sinclude \"%s\"\n", indent(), loc_include.c_str());
else
write_c("#%sinclude %s\n", indent(), loc_include.c_str());
- if (proj_.i18n.type == fld::I18n_Type::POSIX) {
+ if (proj_.i18n.type == FLD_I18N_TYPE_POSIX) {
if (!proj_.i18n.posix_file.empty()) {
write_c("extern nl_catd %s;\n", proj_.i18n.posix_file.c_str());
} else {
@@ -718,14 +718,14 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) {
}
if (conditional) {
write_c("#else\n");
- if (proj_.i18n.type == fld::I18n_Type::GNU) {
+ if (proj_.i18n.type == FLD_I18N_TYPE_GNU) {
if (!proj_.i18n.gnu_function.empty()) {
write_c("#%sifndef %s\n", indent(), proj_.i18n.gnu_function.c_str());
write_c("#%sdefine %s(text) text\n", indent_plus(1), proj_.i18n.gnu_function.c_str());
write_c("#%sendif\n", indent());
}
}
- if (proj_.i18n.type == fld::I18n_Type::POSIX) {
+ if (proj_.i18n.type == FLD_I18N_TYPE_POSIX) {
write_c("#%sifndef catgets\n", indent());
write_c("#%sdefine catgets(catalog, set, msgid, text) text\n", indent_plus(1));
write_c("#%sendif\n", indent());
@@ -733,7 +733,7 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) {
indentation--;
write_c("#endif\n");
}
- if (proj_.i18n.type == fld::I18n_Type::GNU && proj_.i18n.gnu_static_function[0]) {
+ if (proj_.i18n.type == FLD_I18N_TYPE_GNU && proj_.i18n.gnu_static_function[0]) {
write_c("#ifndef %s\n", proj_.i18n.gnu_static_function.c_str());
write_c("#%sdefine %s(text) text\n", indent_plus(1), proj_.i18n.gnu_static_function.c_str());
write_c("#endif\n");
@@ -751,7 +751,7 @@ int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) {
fprintf(header_file, "#endif\n");
Node* last_node = Fluid.proj.tree.last;
- if (last_node && (last_node != Fluid.proj.tree.first) && last_node->is_a(Type::Comment)) {
+ if (last_node && (last_node != Fluid.proj.tree.first) && last_node->is_a(FLD_NODE_TYPE_Comment)) {
if (write_codeview) {
last_node->code1_start = last_node->code2_start = (int)ftell(code_file);
last_node->header1_start = last_node->header2_start = (int)ftell(header_file);
diff --git a/fluid/io/Project_Reader.cxx b/fluid/io/Project_Reader.cxx
index a4c3695d6..e4eb65606 100644
--- a/fluid/io/Project_Reader.cxx
+++ b/fluid/io/Project_Reader.cxx
@@ -350,7 +350,7 @@ Node *Project_Reader::read_children(Node *p, int merge, Strategy strategy, char
// FIXME: this has no business in the file reader!
// TODO: this is called whenever something is pasted from the top level into a grid
// It makes sense to make this more universal for other widget types too.
- if (merge && t && t->parent && t->parent->is_a(Type::Grid)) {
+ if (merge && t && t->parent && t->parent->is_a(FLD_NODE_TYPE_Grid)) {
if (Window_Node::popupx != 0x7FFFFFFF) {
((Grid_Node*)t->parent)->insert_child_at(((Widget_Node*)t)->o, Window_Node::popupx, Window_Node::popupy);
} else {
@@ -403,7 +403,7 @@ int Project_Reader::read_project(const char *filename, int merge, Strategy strat
Fluid.proj.tree.current = nullptr;
// Force menu items to be rebuilt...
for (o = Fluid.proj.tree.first; o; o = o->next) {
- if (o->is_a(Type::Menu_Manager_)) {
+ if (o->is_a(FLD_NODE_TYPE_Menu_Manager_)) {
o->add_child(nullptr,nullptr);
}
}
diff --git a/fluid/io/String_Writer.cxx b/fluid/io/String_Writer.cxx
index 4928e218a..6d7761a49 100644
--- a/fluid/io/String_Writer.cxx
+++ b/fluid/io/String_Writer.cxx
@@ -69,7 +69,7 @@ int fld::io::write_strings(Project &proj, const std::string &filename) {
if (!fp) return 1;
switch (proj.i18n.type) {
- case fld::I18n_Type::NONE : /* None, just put static text out */
+ case FLD_I18N_TYPE_NONE : /* None, just put static text out */
fprintf(fp, "# generated by Fast Light User Interface Designer (fluid) version %.4f\n",
FL_VERSION);
for (auto w: proj.tree.all_widgets()) {
@@ -83,7 +83,7 @@ int fld::io::write_strings(Project &proj, const std::string &filename) {
}
}
break;
- case fld::I18n_Type::GNU : /* GNU gettext, put a .po file out */
+ case FLD_I18N_TYPE_GNU : /* GNU gettext, put a .po file out */
fprintf(fp, "# generated by Fast Light User Interface Designer (fluid) version %.4f\n",
FL_VERSION);
for (p = proj.tree.first; p; p = p->next) {
@@ -112,7 +112,7 @@ int fld::io::write_strings(Project &proj, const std::string &filename) {
}
}
break;
- case fld::I18n_Type::POSIX : /* POSIX catgets, put a .msg file out */
+ case FLD_I18N_TYPE_POSIX : /* POSIX catgets, put a .msg file out */
fprintf(fp, "$ generated by Fast Light User Interface Designer (fluid) version %.4f\n",
FL_VERSION);
fprintf(fp, "$set %s\n", proj.i18n.posix_set.c_str());
diff --git a/fluid/nodes/Button_Node.h b/fluid/nodes/Button_Node.h
index ecdc8cc24..53944d6ea 100644
--- a/fluid/nodes/Button_Node.h
+++ b/fluid/nodes/Button_Node.h
@@ -36,8 +36,8 @@ public:
Fl_Widget *widget(int x, int y, int w, int h) override;
Widget_Node *_make() override { return new Button_Node(); }
int is_button() const override { return 1; }
- Type type() const override { return Type::Button; }
- bool is_a(Type inType) const override { return (inType==Type::Button) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Button; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Button) ? true : super::is_a(inType); }
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
void copy_properties() override;
@@ -59,8 +59,8 @@ public:
const char *alt_type_name() override { return "fltk::ReturnButton"; }
Fl_Widget *widget(int x, int y, int w, int h) override;
Widget_Node *_make() override { return new Return_Button_Node(); }
- Type type() const override { return Type::Return_Button; }
- bool is_a(Type inType) const override { return (inType==Type::Return_Button) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Return_Button; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Return_Button) ? true : super::is_a(inType); }
};
// ---- Repeat Button ----
@@ -81,8 +81,8 @@ public:
const char *alt_type_name() override { return "fltk::RepeatButton"; }
Fl_Widget *widget(int x, int y, int w, int h) override;
Widget_Node *_make() override { return new Repeat_Button_Node(); }
- Type type() const override { return Type::Repeat_Button; }
- bool is_a(Type inType) const override { return (inType==Type::Repeat_Button) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Repeat_Button; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Repeat_Button) ? true : super::is_a(inType); }
};
// ---- Light Button ----
@@ -101,8 +101,8 @@ public:
const char *alt_type_name() override { return "fltk::LightButton"; }
Fl_Widget *widget(int x, int y, int w, int h) override;
Widget_Node *_make() override { return new Light_Button_Node(); }
- Type type() const override { return Type::Light_Button; }
- bool is_a(Type inType) const override { return (inType==Type::Light_Button) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Light_Button; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Light_Button) ? true : super::is_a(inType); }
};
// ---- Check Button ----
@@ -121,8 +121,8 @@ public:
const char *alt_type_name() override { return "fltk::CheckButton"; }
Fl_Widget *widget(int x, int y, int w, int h) override;
Widget_Node *_make() override { return new Check_Button_Node(); }
- Type type() const override { return Type::Check_Button; }
- bool is_a(Type inType) const override { return (inType==Type::Check_Button) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Check_Button; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Check_Button) ? true : super::is_a(inType); }
};
// ---- Round Button ----
@@ -141,8 +141,8 @@ public:
const char *alt_type_name() override { return "fltk::RadioButton"; }
Fl_Widget *widget(int x, int y, int w, int h) override;
Widget_Node *_make() override { return new Round_Button_Node(); }
- Type type() const override { return Type::Round_Button; }
- bool is_a(Type inType) const override { return (inType==Type::Round_Button) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Round_Button; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Round_Button) ? true : super::is_a(inType); }
};
diff --git a/fluid/nodes/Function_Node.cxx b/fluid/nodes/Function_Node.cxx
index 8404b931e..02f4d75ca 100644
--- a/fluid/nodes/Function_Node.cxx
+++ b/fluid/nodes/Function_Node.cxx
@@ -56,7 +56,7 @@ Class_Node *current_class = nullptr;
int has_toplevel_function(const char *rtype, const char *sig) {
Node *child;
for (child = Fluid.proj.tree.first; child; child = child->next) {
- if (!child->is_in_class() && child->is_a(Type::Function)) {
+ if (!child->is_in_class() && child->is_a(FLD_NODE_TYPE_Function)) {
const Function_Node *fn = (const Function_Node*)child;
if (fn->has_signature(rtype, sig))
return 1;
@@ -451,7 +451,7 @@ void Function_Node::write_code2(fld::io::Code_Writer& f) {
char havechildren = 0;
for (child = next; child && child->level > level; child = child->next) {
havechildren = 1;
- if (child->is_a(Type::Window) && child->name()) var = child->name();
+ if (child->is_a(FLD_NODE_TYPE_Window) && child->name()) var = child->name();
}
if (ismain()) {
@@ -558,9 +558,9 @@ void Code_Node::write_code1(fld::io::Code_Writer& f) {
if ( handle_editor_changes() == 1 ) {
Fluid.main_window->redraw(); // tell fluid to redraw; edits may affect tree's contents
}
- f.tag(Mergeback::Tag::GENERIC, Mergeback::Tag::CODE, 0);
+ f.tag(FLD_MERGEBACK_TAG_GENERIC, FLD_MERGEBACK_TAG_CODE, 0);
f.write_c_indented(name(), 0, '\n');
- f.tag(Mergeback::Tag::CODE, Mergeback::Tag::GENERIC, get_uid());
+ f.tag(FLD_MERGEBACK_TAG_CODE, FLD_MERGEBACK_TAG_GENERIC, get_uid());
}
/**
@@ -1530,7 +1530,7 @@ void Class_Node::write_code2(fld::io::Code_Writer& f) {
int Node::has_function(const char *rtype, const char *sig) const {
Node *child;
for (child = next; child && child->level > level; child = child->next) {
- if (child->level == level+1 && child->is_a(Type::Function)) {
+ if (child->level == level+1 && child->is_a(FLD_NODE_TYPE_Function)) {
const Function_Node *fn = (const Function_Node*)child;
if (fn->has_signature(rtype, sig))
return 1;
diff --git a/fluid/nodes/Function_Node.h b/fluid/nodes/Function_Node.h
index be16e5414..e92f36f80 100644
--- a/fluid/nodes/Function_Node.h
+++ b/fluid/nodes/Function_Node.h
@@ -71,8 +71,8 @@ public:
int can_have_children() const override {return 1;}
int is_code_block() const override {return 1;}
int is_public() const override;
- Type type() const override { return Type::Function; }
- bool is_a(Type inType) const override { return (inType==Type::Function) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Function; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Function) ? true : super::is_a(inType); }
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
int has_signature(const char *, const char*) const;
@@ -109,8 +109,8 @@ public:
void open() override;
const char *type_name() override {return "code";}
int is_code_block() const override {return 0;}
- Type type() const override { return Type::Code; }
- bool is_a(Type inType) const override { return (inType==Type::Code) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Code; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Code) ? true : super::is_a(inType); }
int is_public() const override { return -1; }
int is_editing();
int reap_editor();
@@ -146,8 +146,8 @@ public:
int is_code_block() const override {return 1;}
int can_have_children() const override {return 1;}
int is_public() const override { return -1; }
- Type type() const override { return Type::CodeBlock; }
- bool is_a(Type inType) const override { return (inType==Type::CodeBlock) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_CodeBlock; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_CodeBlock) ? true : super::is_a(inType); }
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
std::string end_code() const { return end_code_; }
@@ -178,8 +178,8 @@ public:
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
int is_public() const override;
- Type type() const override { return Type::Decl; }
- bool is_a(Type inType) const override { return (inType==Type::Decl) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Decl; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Decl) ? true : super::is_a(inType); }
char visibility() { return public_; }
void visibility(char v) { public_ = v; }
char output_file() { return (public_&1)|((static_&1)<<1); }
@@ -209,8 +209,8 @@ public:
const char *type_name() override {return "data";}
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
- Type type() const override { return Type::Data; }
- bool is_a(Type inType) const override { return (inType==Type::Data) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Data; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Data) ? true : super::is_a(inType); }
void filename(const std::string& fn) { storestring(fn, filename_); }
std::string filename() const { return filename_; }
int output_format() { return output_format_; }
@@ -251,8 +251,8 @@ public:
int can_have_children() const override {return 1;}
int is_decl_block() const override {return 1;}
int is_public() const override;
- Type type() const override { return Type::DeclBlock; }
- bool is_a(Type inType) const override { return (inType==Type::DeclBlock) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_DeclBlock; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_DeclBlock) ? true : super::is_a(inType); }
std::string end_code() const { return end_code_; }
void end_code(const std::string& p) { storestring(p, end_code_); }
int write_map() { return write_map_; }
@@ -284,8 +284,8 @@ public:
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
int is_public() const override { return 1; }
- Type type() const override { return Type::Comment; }
- bool is_a(Type inType) const override { return (inType==Type::Comment) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Comment; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Comment) ? true : super::is_a(inType); }
bool in_h() { return in_h_; }
void in_h(bool v) { in_h_ = v; }
bool in_c() { return in_c_; }
@@ -322,8 +322,8 @@ public:
int is_decl_block() const override {return 1;}
int is_class() const override {return 1;}
int is_public() const override;
- Type type() const override { return Type::Class; }
- bool is_a(Type inType) const override { return (inType==Type::Class) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Class; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Class) ? true : super::is_a(inType); }
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
diff --git a/fluid/nodes/Grid_Node.cxx b/fluid/nodes/Grid_Node.cxx
index 06f6d4166..2304a7a10 100644
--- a/fluid/nodes/Grid_Node.cxx
+++ b/fluid/nodes/Grid_Node.cxx
@@ -676,7 +676,7 @@ void Grid_Node::child_resized(Widget_Node *child_type) {
/** Return the currently selected Grid widget if is a Grid Type. */
Fl_Grid *Grid_Node::selected() {
- if (current_widget && current_widget->is_a(Type::Grid))
+ if (current_widget && current_widget->is_a(FLD_NODE_TYPE_Grid))
return ((Fl_Grid*)((Grid_Node*)current_widget)->o);
return nullptr;
}
diff --git a/fluid/nodes/Grid_Node.h b/fluid/nodes/Grid_Node.h
index 4363164ee..706791d98 100644
--- a/fluid/nodes/Grid_Node.h
+++ b/fluid/nodes/Grid_Node.h
@@ -55,8 +55,8 @@ public:
const char *alt_type_name() override {return "fltk::GridGroup";}
Widget_Node *_make() override { return new Grid_Node(); }
Fl_Widget *widget(int X,int Y,int W,int H) override;
- Type type() const override { return Type::Grid; }
- bool is_a(Type inType) const override { return (inType==Type::Grid) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Grid; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Grid) ? true : super::is_a(inType); }
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
void write_parent_properties(fld::io::Project_Writer &f, Node *child, bool encapsulate) override;
diff --git a/fluid/nodes/Group_Node.cxx b/fluid/nodes/Group_Node.cxx
index 7565a5552..088e999aa 100644
--- a/fluid/nodes/Group_Node.cxx
+++ b/fluid/nodes/Group_Node.cxx
@@ -73,7 +73,7 @@ void Fl_Group_Proxy::draw() {
\brief Enlarge the group size, so all children fit within.
*/
void fix_group_size(Node *tt) {
- if (!tt || !tt->is_a(Type::Group)) return;
+ if (!tt || !tt->is_a(FLD_NODE_TYPE_Group)) return;
Group_Node* t = (Group_Node*)tt;
int X = t->o->x();
int Y = t->o->y();
@@ -102,14 +102,14 @@ void group_cb(Fl_Widget *, void *) {
fl_message("Only widgets and menu items can be grouped.");
return;
}
- if (Fluid.proj.tree.current->is_a(Type::Menu_Item)) {
+ if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Menu_Item)) {
group_selected_menuitems();
return;
}
// The group will be created in the parent group of the current widget
Node *qq = Fluid.proj.tree.current->parent;
Widget_Node *q = static_cast<Widget_Node*>(Fluid.proj.tree.current);
- while (qq && !qq->is_a(Type::Group)) {
+ while (qq && !qq->is_a(FLD_NODE_TYPE_Group)) {
qq = qq->parent;
}
if (!qq) {
@@ -150,7 +150,7 @@ void ungroup_cb(Fl_Widget *, void *) {
fl_message("Only widgets and menu items can be ungrouped.");
return;
}
- if (Fluid.proj.tree.current->is_a(Type::Menu_Item)) {
+ if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Menu_Item)) {
ungroup_selected_menuitems();
return;
}
@@ -159,7 +159,7 @@ void ungroup_cb(Fl_Widget *, void *) {
int q_level = q->level;
Node *qq = Fluid.proj.tree.current->parent;
while (qq && !qq->is_true_widget()) qq = qq->parent;
- if (!qq || !qq->is_a(Type::Group)) {
+ if (!qq || !qq->is_a(FLD_NODE_TYPE_Group)) {
fl_message("Only menu widgets inside a group can be ungrouped.");
return;
}
@@ -510,7 +510,7 @@ void Flex_Node::change_subtype_to(int n) {
int Flex_Node::parent_is_flex(Node *t) {
return (t->is_widget()
&& t->parent
- && t->parent->is_a(Type::Flex));
+ && t->parent->is_a(FLD_NODE_TYPE_Flex));
}
/**
@@ -576,7 +576,7 @@ void Flex_Node::keyboard_move_child(Widget_Node *child, int key) {
int Flex_Node::size(Node *t, char fixed_only) {
if (!t->is_widget()) return 0;
if (!t->parent) return 0;
- if (!t->parent->is_a(Type::Flex)) return 0;
+ if (!t->parent->is_a(FLD_NODE_TYPE_Flex)) return 0;
Flex_Node* ft = (Flex_Node*)t->parent;
Fl_Flex* f = (Fl_Flex*)ft->o;
Fl_Widget *w = ((Widget_Node*)t)->o;
@@ -587,7 +587,7 @@ int Flex_Node::size(Node *t, char fixed_only) {
int Flex_Node::is_fixed(Node *t) {
if (!t->is_widget()) return 0;
if (!t->parent) return 0;
- if (!t->parent->is_a(Type::Flex)) return 0;
+ if (!t->parent->is_a(FLD_NODE_TYPE_Flex)) return 0;
Flex_Node* ft = (Flex_Node*)t->parent;
Fl_Flex* f = (Fl_Flex*)ft->o;
Fl_Widget *w = ((Widget_Node*)t)->o;
diff --git a/fluid/nodes/Group_Node.h b/fluid/nodes/Group_Node.h
index 1aea39df5..52f31a907 100644
--- a/fluid/nodes/Group_Node.h
+++ b/fluid/nodes/Group_Node.h
@@ -62,8 +62,8 @@ public:
void move_child(Node*, Node*) override;
void remove_child(Node*) override;
int can_have_children() const override {return 1;}
- Type type() const override { return Type::Group; }
- bool is_a(Type inType) const override { return (inType==Type::Group) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Group; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Group) ? true : super::is_a(inType); }
Fl_Widget *enter_live_mode(int top=0) override;
void leave_live_mode() override;
void copy_properties() override;
@@ -85,8 +85,8 @@ public:
const char *type_name() override {return pack_type_name;}
const char *alt_type_name() override {return "fltk::PackedGroup";}
Widget_Node *_make() override {return new Pack_Node();}
- Type type() const override { return Type::Pack; }
- bool is_a(Type inType) const override { return (inType==Type::Pack) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Pack; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Pack) ? true : super::is_a(inType); }
Fl_Widget *enter_live_mode(int top=0) override;
void copy_properties() override;
};
@@ -120,8 +120,8 @@ public:
Widget_Node *_make() override { return new Flex_Node(); }
Fl_Widget *widget(int X,int Y,int W,int H) override {
Fl_Flex *g = new Fl_Flex_Proxy(X,Y,W,H); Fl_Group::current(nullptr); return g;}
- Type type() const override { return Type::Flex; }
- bool is_a(Type inType) const override { return (inType==Type::Flex) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Flex; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Flex) ? true : super::is_a(inType); }
void write_properties(fld::io::Project_Writer &f) override;
void read_property(fld::io::Project_Reader &f, const char *) override;
Fl_Widget *enter_live_mode(int top=0) override;
@@ -154,8 +154,8 @@ public:
const char *alt_type_name() override { return "fltk::TableGroup"; }
Widget_Node *_make() override { return new Table_Node(); }
Fl_Widget *widget(int X, int Y, int W, int H) override;
- Type type() const override { return Type::Table; }
- bool is_a(Type inType) const override { return (inType==Type::Table) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Table; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Table) ? true : super::is_a(inType); }
Fl_Widget *enter_live_mode(int top=0) override;
void add_child(Node*, Node*) override;
void move_child(Node*, Node*) override;
@@ -187,8 +187,8 @@ public:
Node* click_test(int,int) override;
void add_child(Node*, Node*) override;
void remove_child(Node*) override;
- Type type() const override { return Type::Tabs; }
- bool is_a(Type inType) const override { return (inType==Type::Tabs) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Tabs; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Tabs) ? true : super::is_a(inType); }
Fl_Widget *enter_live_mode(int top=0) override;
};
@@ -208,8 +208,8 @@ public:
const char *type_name() override {return scroll_type_name;}
const char *alt_type_name() override {return "fltk::ScrollGroup";}
Widget_Node *_make() override {return new Scroll_Node();}
- Type type() const override { return Type::Scroll; }
- bool is_a(Type inType) const override { return (inType==Type::Scroll) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Scroll; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Scroll) ? true : super::is_a(inType); }
Fl_Widget *enter_live_mode(int top=0) override;
void copy_properties() override;
};
@@ -227,8 +227,8 @@ public:
const char *type_name() override {return tile_type_name;}
const char *alt_type_name() override {return "fltk::TileGroup";}
Widget_Node *_make() override {return new Tile_Node();}
- Type type() const override { return Type::Tile; }
- bool is_a(Type inType) const override { return (inType==Type::Tile) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Tile; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Tile) ? true : super::is_a(inType); }
Fl_Widget *enter_live_mode(int top=0) override;
void leave_live_mode() override;
void copy_properties() override;
@@ -256,8 +256,8 @@ public:
Fl_Widget *widget(int X,int Y,int W,int H) override {
Fl_Wizard_Proxy *g = new Fl_Wizard_Proxy(X,Y,W,H); Fl_Group::current(nullptr); return g;}
Widget_Node *_make() override {return new Wizard_Node();}
- Type type() const override { return Type::Wizard; }
- bool is_a(Type inType) const override { return (inType==Type::Wizard) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Wizard; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Wizard) ? true : super::is_a(inType); }
};
#endif // FLUID_NODES_GROUP_NODE_H
diff --git a/fluid/nodes/Menu_Node.cxx b/fluid/nodes/Menu_Node.cxx
index b29fb8293..e0f1c11ee 100644
--- a/fluid/nodes/Menu_Node.cxx
+++ b/fluid/nodes/Menu_Node.cxx
@@ -135,7 +135,7 @@ void Input_Choice_Node::build_menu() {
if (q->can_have_children()) {lvl++; m->flags |= FL_SUBMENU;}
m++;
int l1 =
- (q->next && q->next->is_a(Type::Menu_Item)) ? q->next->level : level;
+ (q->next && q->next->is_a(FLD_NODE_TYPE_Menu_Item)) ? q->next->level : level;
while (lvl > l1) {m->label(nullptr); m++; lvl--;}
lvl = l1;
}
@@ -163,7 +163,7 @@ Node* Menu_Item_Node::make(int flags, Strategy strategy) {
Node *anchor = Fluid.proj.tree.current, *p = anchor;
if (p && (strategy.placement() == Strategy::AFTER_CURRENT))
p = p->parent;
- while (p && !(p->is_a(Type::Menu_Manager_) || p->is_a(Type::Submenu))) {
+ while (p && !(p->is_a(FLD_NODE_TYPE_Menu_Manager_) || p->is_a(FLD_NODE_TYPE_Submenu))) {
anchor = p;
strategy.placement(Strategy::AFTER_CURRENT);
p = p->parent;
@@ -198,12 +198,12 @@ Node* Menu_Item_Node::make(int flags, Strategy strategy) {
void group_selected_menuitems() {
// The group will be created in the parent group of the current menuitem
- if (!Fluid.proj.tree.current->is_a(Type::Menu_Item)) {
+ if (!Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Menu_Item)) {
return;
}
Menu_Item_Node *q = static_cast<Menu_Item_Node*>(Fluid.proj.tree.current);
Node *qq = Fluid.proj.tree.current->parent;
- if (!qq || !(qq->is_a(Type::Menu_Manager_) || qq->is_a(Type::Submenu))) {
+ if (!qq || !(qq->is_a(FLD_NODE_TYPE_Menu_Manager_) || qq->is_a(FLD_NODE_TYPE_Submenu))) {
fl_message("Can't create a new submenu here.");
return;
}
@@ -229,7 +229,7 @@ void ungroup_selected_menuitems() {
Node *qq = Fluid.proj.tree.current->parent;
Widget_Node *q = static_cast<Widget_Node*>(Fluid.proj.tree.current);
int q_level = q->level;
- if (!qq || !qq->is_a(Type::Submenu)) {
+ if (!qq || !qq->is_a(FLD_NODE_TYPE_Submenu)) {
fl_message("Only menu items inside a submenu can be ungrouped.");
return;
}
@@ -305,7 +305,7 @@ int isdeclare(const char *c);
const char* Menu_Item_Node::menu_name(fld::io::Code_Writer& f, int& i) {
i = 0;
Node* t = prev;
- while (t && t->is_a(Type::Menu_Item)) {
+ while (t && t->is_a(FLD_NODE_TYPE_Menu_Item)) {
// be sure to count the {0} that ends a submenu:
if (t->level > t->next->level) i += (t->level - t->next->level);
// detect empty submenu:
@@ -352,7 +352,7 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) {
f.write_c(", %s", ut);
if (use_v) f.write_c(" v");
f.write_c(") {\n");
- f.tag(Mergeback::Tag::GENERIC, Mergeback::Tag::MENU_CALLBACK, 0);
+ f.tag(FLD_MERGEBACK_TAG_GENERIC, FLD_MERGEBACK_TAG_MENU_CALLBACK, 0);
f.write_c_indented(callback(), 1, 0);
if (*(d-1) != ';' && *(d-1) != '}') {
const char *p = strrchr(callback(), '\n');
@@ -363,7 +363,7 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) {
if (*p != '#' && *p) f.write_c(";");
}
f.write_c("\n");
- f.tag(Mergeback::Tag::MENU_CALLBACK, Mergeback::Tag::GENERIC, get_uid());
+ f.tag(FLD_MERGEBACK_TAG_MENU_CALLBACK, FLD_MERGEBACK_TAG_GENERIC, get_uid());
f.write_c("}\n");
// If the menu item is part of a Class or Widget Class, FLUID generates
@@ -374,12 +374,12 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) {
// Implement the callback as a static member function
f.write_c("void %s::%s(Fl_Menu_* o, %s v) {\n", k, cn, ut);
// Find the Fl_Menu_ container for this menu item
- Node* t = parent; while (t->is_a(Type::Menu_Item)) t = t->parent;
+ Node* t = parent; while (t->is_a(FLD_NODE_TYPE_Menu_Item)) t = t->parent;
if (t) {
Widget_Node *tw = (t->is_widget()) ? static_cast<Widget_Node*>(t) : nullptr;
Node *q = nullptr;
// Generate code to call the callback
- if (tw->is_a(Type::Menu_Bar) && ((Menu_Bar_Node*)tw)->is_sys_menu_bar()) {
+ if (tw->is_a(FLD_NODE_TYPE_Menu_Bar) && ((Menu_Bar_Node*)tw)->is_sys_menu_bar()) {
// Fl_Sys_Menu_Bar removes itself from any parent on macOS, so we
// wrapped it in a class and remeber the parent class in a new
// class memeber variable.
@@ -393,7 +393,7 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) {
} else {
f.write_c("%s((%s*)(o", f.indent(1), k);
// The class pointer is in the user_data field of the top widget
- if (t && t->is_a(Type::Input_Choice)) {
+ if (t && t->is_a(FLD_NODE_TYPE_Input_Choice)) {
// Go up one more level for Fl_Input_Choice, as these are groups themselves
f.write_c("->parent()");
}
@@ -401,7 +401,7 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) {
for (t = t->parent; t && t->is_widget() && !is_class(); q = t, t = t->parent)
f.write_c("->parent()");
// user_data is cast into a pointer to the
- if (!q || !q->is_a(Type::Widget_Class))
+ if (!q || !q->is_a(FLD_NODE_TYPE_Widget_Class))
f.write_c("->user_data()");
f.write_c("))->%s_i(o,v);\n}\n", cn);
}
@@ -414,7 +414,7 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) {
if (!f.c_contains(image))
image->write_static(f, compress_image_);
}
- if (next && next->is_a(Type::Menu_Item)) return;
+ if (next && next->is_a(FLD_NODE_TYPE_Menu_Item)) return;
// okay, when we hit last item in the menu we have to write the
// entire array out:
const char* k = class_name(1);
@@ -425,20 +425,20 @@ void Menu_Item_Node::write_static(fld::io::Code_Writer& f) {
int i;
f.write_c("\nFl_Menu_Item %s[] = {\n", menu_name(f, i));
}
- Node* t = prev; while (t && t->is_a(Type::Menu_Item)) t = t->prev;
- for (Node* q = t->next; q && q->is_a(Type::Menu_Item); q = q->next) {
+ Node* t = prev; while (t && t->is_a(FLD_NODE_TYPE_Menu_Item)) t = t->prev;
+ for (Node* q = t->next; q && q->is_a(FLD_NODE_TYPE_Menu_Item); q = q->next) {
((Menu_Item_Node*)q)->write_item(f);
int thislevel = q->level; if (q->can_have_children()) thislevel++;
int nextlevel =
- (q->next && q->next->is_a(Type::Menu_Item)) ? q->next->level : t->level+1;
+ (q->next && q->next->is_a(FLD_NODE_TYPE_Menu_Item)) ? q->next->level : t->level+1;
while (thislevel > nextlevel) {f.write_c(" {0,0,0,0,0,0,0,0,0},\n"); thislevel--;}
}
f.write_c(" {0,0,0,0,0,0,0,0,0}\n};\n");
if (k) {
// Write menu item variables...
- t = prev; while (t && t->is_a(Type::Menu_Item)) t = t->prev;
- for (Node* q = t->next; q && q->is_a(Type::Menu_Item); q = q->next) {
+ t = prev; while (t && t->is_a(FLD_NODE_TYPE_Menu_Item)) t = t->prev;
+ for (Node* q = t->next; q && q->is_a(FLD_NODE_TYPE_Menu_Item); q = q->next) {
Menu_Item_Node *m = (Menu_Item_Node*)q;
const char *c = array_name(m);
if (c) {
@@ -487,13 +487,13 @@ void Menu_Item_Node::write_item(fld::io::Code_Writer& f) {
f.write_c(" {");
if (label() && label()[0])
switch (Fluid.proj.i18n.type) {
- case fld::I18n_Type::GNU:
+ case FLD_I18N_TYPE_GNU:
// we will call i18n when the menu is instantiated for the first time
f.write_c("%s(", Fluid.proj.i18n.gnu_static_function.c_str());
f.write_cstring(label());
f.write_c(")");
break;
- case fld::I18n_Type::POSIX:
+ case FLD_I18N_TYPE_POSIX:
// fall through: strings can't be translated before a catalog is chosen
default:
f.write_cstring(label());
@@ -522,10 +522,10 @@ void Menu_Item_Node::write_item(fld::io::Code_Writer& f) {
if (callback()) {
if (callback()[0] == '[') {
f.write_c("\n");
- f.tag(Mergeback::Tag::GENERIC, Mergeback::Tag::WIDGET_CALLBACK, 0);
+ f.tag(FLD_MERGEBACK_TAG_GENERIC, FLD_MERGEBACK_TAG_WIDGET_CALLBACK, 0);
f.write_c_indented(callback(), 1, 0);
f.write_c("\n");
- f.tag(Mergeback::Tag::WIDGET_CALLBACK, Mergeback::Tag::GENERIC, get_uid());
+ f.tag(FLD_MERGEBACK_TAG_WIDGET_CALLBACK, FLD_MERGEBACK_TAG_GENERIC, get_uid());
f.write_c("%s, ", f.indent_plus(1));
} else {
const char* k = is_name(callback()) ? nullptr : class_name(1);
@@ -557,7 +557,7 @@ void start_menu_initialiser(fld::io::Code_Writer& f, int &initialized, const cha
void Menu_Item_Node::write_code1(fld::io::Code_Writer& f) {
int i; const char* mname = menu_name(f, i);
- if (!prev->is_a(Type::Menu_Item)) {
+ if (!prev->is_a(FLD_NODE_TYPE_Menu_Item)) {
// for first menu item, declare the array
if (class_name(1)) {
f.write_h("%sstatic Fl_Menu_Item %s[];\n", f.indent(1), mname);
@@ -601,12 +601,12 @@ void Menu_Item_Node::write_code1(fld::io::Code_Writer& f) {
f.write_c("%sml->labela = (char*)", f.indent());
image->write_inline(f);
f.write_c(";\n");
- if (Fluid.proj.i18n.type==fld::I18n_Type::NONE) {
+ if (Fluid.proj.i18n.type==FLD_I18N_TYPE_NONE) {
f.write_c("%sml->labelb = o->label();\n", f.indent());
- } else if (Fluid.proj.i18n.type==fld::I18n_Type::GNU) {
+ } else if (Fluid.proj.i18n.type==FLD_I18N_TYPE_GNU) {
f.write_c("%sml->labelb = %s(o->label());\n",
f.indent(), Fluid.proj.i18n.gnu_function.c_str());
- } else if (Fluid.proj.i18n.type==fld::I18n_Type::POSIX) {
+ } else if (Fluid.proj.i18n.type==FLD_I18N_TYPE_POSIX) {
f.write_c("%sml->labelb = catgets(%s,%s,i+%d,o->label());\n",
f.indent(),
Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(),
@@ -619,17 +619,17 @@ void Menu_Item_Node::write_code1(fld::io::Code_Writer& f) {
image->write_code(f, 0, "o");
}
}
- if ((Fluid.proj.i18n.type != fld::I18n_Type::NONE) && label() && label()[0]) {
+ if ((Fluid.proj.i18n.type != FLD_I18N_TYPE_NONE) && label() && label()[0]) {
Fl_Labeltype t = o->labeltype();
if (image) {
// label was already copied a few lines up
} else if ( t==FL_NORMAL_LABEL || t==FL_SHADOW_LABEL
|| t==FL_ENGRAVED_LABEL || t==FL_EMBOSSED_LABEL) {
start_menu_initialiser(f, menuItemInitialized, mname, i);
- if (Fluid.proj.i18n.type==fld::I18n_Type::GNU) {
+ if (Fluid.proj.i18n.type==FLD_I18N_TYPE_GNU) {
f.write_c("%so->label(%s(o->label()));\n",
f.indent(), Fluid.proj.i18n.gnu_function.c_str());
- } else if (Fluid.proj.i18n.type==fld::I18n_Type::POSIX) {
+ } else if (Fluid.proj.i18n.type==FLD_I18N_TYPE_POSIX) {
f.write_c("%so->label(catgets(%s,%s,i+%d,o->label()));\n",
f.indent(),
Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(),
@@ -714,7 +714,7 @@ void Menu_Base_Node::build_menu() {
if (q->can_have_children()) {lvl++; m->flags |= FL_SUBMENU;}
m++;
int l1 =
- (q->next && q->next->is_a(Type::Menu_Item)) ? q->next->level : level;
+ (q->next && q->next->is_a(FLD_NODE_TYPE_Menu_Item)) ? q->next->level : level;
while (lvl > l1) {m->label(nullptr); m++; lvl--;}
lvl = l1;
}
@@ -742,7 +742,7 @@ Node* Menu_Base_Node::click_test(int, int) {
}
void Menu_Manager_Node::write_code2(fld::io::Code_Writer& f) {
- if (next && next->is_a(Type::Menu_Item)) {
+ if (next && next->is_a(FLD_NODE_TYPE_Menu_Item)) {
f.write_c("%s%s->menu(%s);\n", f.indent(), name() ? name() : "o",
f.unique_id(this, "menu", name(), label()));
}
diff --git a/fluid/nodes/Menu_Node.h b/fluid/nodes/Menu_Node.h
index 181ab8243..4bf27ed34 100644
--- a/fluid/nodes/Menu_Node.h
+++ b/fluid/nodes/Menu_Node.h
@@ -67,8 +67,8 @@ public:
void write_code1(fld::io::Code_Writer& f) override;
void write_code2(fld::io::Code_Writer& f) override;
int is_true_widget() const override { return 0; }
- Type type() const override { return Type::Menu_Item; }
- bool is_a(Type inType) const override { return (inType==Type::Menu_Item) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Menu_Item; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Menu_Item) ? true : super::is_a(inType); }
};
/**
@@ -82,8 +82,8 @@ public:
public:
const char* type_name() override {return "RadioMenuItem";}
Node* make(Strategy strategy) override;
- Type type() const override { return Type::Radio_Menu_Item; }
- bool is_a(Type inType) const override { return (inType==Type::Radio_Menu_Item) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Radio_Menu_Item; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Radio_Menu_Item) ? true : super::is_a(inType); }
};
/**
@@ -97,8 +97,8 @@ public:
public:
const char* type_name() override {return "CheckMenuItem";}
Node* make(Strategy strategy) override;
- Type type() const override { return Type::Checkbox_Menu_Item; }
- bool is_a(Type inType) const override { return (inType==Type::Checkbox_Menu_Item) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Checkbox_Menu_Item; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Checkbox_Menu_Item) ? true : super::is_a(inType); }
};
/**
@@ -125,8 +125,8 @@ public:
void add_child(Node*a, Node*b) override {parent->add_child(a,b);}
void move_child(Node*a, Node*b) override {parent->move_child(a,b);}
void remove_child(Node*a) override {parent->remove_child(a);}
- Type type() const override { return Type::Submenu; }
- bool is_a(Type inType) const override { return (inType==Type::Submenu) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Submenu; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Submenu) ? true : super::is_a(inType); }
};
// -----------------------------------------------------------------------------
@@ -156,8 +156,8 @@ public:
Node* click_test(int x, int y) override = 0;
void write_code2(fld::io::Code_Writer& f) override;
void copy_properties() override = 0;
- Type type() const override { return Type::Menu_Manager_; }
- bool is_a(Type inType) const override { return (inType==Type::Menu_Manager_) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Menu_Manager_; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Menu_Manager_) ? true : super::is_a(inType); }
};
/**
@@ -198,8 +198,8 @@ public:
}
Widget_Node *_make() override {return new Input_Choice_Node();}
void build_menu() override;
- Type type() const override { return Type::Input_Choice; }
- bool is_a(Type inType) const override { return (inType==Type::Input_Choice) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Input_Choice; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Input_Choice) ? true : super::is_a(inType); }
void copy_properties() override;
};
@@ -228,8 +228,8 @@ public:
}
Node* click_test(int x, int y) override;
void copy_properties() override;
- Type type() const override { return Type::Menu_; }
- bool is_a(Type inType) const override { return (inType==Type::Menu_) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Menu_; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Menu_) ? true : super::is_a(inType); }
};
extern Fl_Menu_Item button_type_menu[];
@@ -250,8 +250,8 @@ public:
Fl_Widget *widget(int X,int Y,int W,int H) override {
return new Fl_Menu_Button(X,Y,W,H,"menu");}
Widget_Node *_make() override {return new Menu_Button_Node();}
- Type type() const override { return Type::Menu_Button; }
- bool is_a(Type inType) const override { return (inType==Type::Menu_Button) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Menu_Button; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Menu_Button) ? true : super::is_a(inType); }
};
@@ -272,8 +272,8 @@ public:
return myo;
}
Widget_Node *_make() override {return new Choice_Node();}
- Type type() const override { return Type::Choice; }
- bool is_a(Type inType) const override { return (inType==Type::Choice) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Choice; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Choice) ? true : super::is_a(inType); }
};
@@ -297,8 +297,8 @@ public:
void write_static(fld::io::Code_Writer& f) override;
void write_code1(fld::io::Code_Writer& f) override;
// void write_code2(fld::io::Code_Writer& f) override;
- Type type() const override { return Type::Menu_Bar; }
- bool is_a(Type inType) const override { return (inType==Type::Menu_Bar) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Menu_Bar; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Menu_Bar) ? true : super::is_a(inType); }
bool is_sys_menu_bar();
std::string sys_menubar_name() const;
const char *sys_menubar_proxy_name();
diff --git a/fluid/nodes/Node.cxx b/fluid/nodes/Node.cxx
index 61d736f83..be54ce3a1 100644
--- a/fluid/nodes/Node.cxx
+++ b/fluid/nodes/Node.cxx
@@ -401,7 +401,7 @@ void delete_all(int selected_only) {
if(!selected_only) {
// reset the setting for the external shell command
if (g_shell_config) {
- g_shell_config->clear(fld::Tool_Store::PROJECT);
+ g_shell_config->clear(FLD_TOOL_STORE_PROJECT);
g_shell_config->rebuild_shell_menu();
g_shell_config->update_settings_dialog();
}
@@ -409,7 +409,7 @@ void delete_all(int selected_only) {
widget_browser->hposition(0);
widget_browser->vposition(0);
}
- Fluid.layout_list.remove_all(fld::Tool_Store::PROJECT);
+ Fluid.layout_list.remove_all(FLD_TOOL_STORE_PROJECT);
Fluid.layout_list.current_suite(0);
Fluid.layout_list.current_preset(0);
Fluid.layout_list.update_dialogs();
@@ -603,7 +603,7 @@ Window_Node *Node::window() {
if (!is_widget())
return nullptr;
for (Node *t = this; t; t=t->parent)
- if (t->is_a(Type::Window))
+ if (t->is_a(FLD_NODE_TYPE_Window))
return (Window_Node*)t;
return nullptr;
}
@@ -616,7 +616,7 @@ Group_Node *Node::group() {
if (!is_widget())
return nullptr;
for (Node *t = this; t; t=t->parent)
- if (t->is_a(Type::Group))
+ if (t->is_a(FLD_NODE_TYPE_Group))
return (Group_Node*)t;
return nullptr;
}
@@ -831,7 +831,7 @@ Node *Node::remove() {
}
void Node::name(const char *n) {
- int nostrip = is_a(Type::Comment);
+ int nostrip = is_a(FLD_NODE_TYPE_Comment);
if (storestring(n,name_,nostrip)) {
if (visible) widget_browser->redraw();
}
@@ -1199,7 +1199,7 @@ void Node::copy_properties() {
*/
int Node::user_defined(const char* cbname) const {
for (Node* p = Fluid.proj.tree.first; p ; p = p->next)
- if (p->is_a(Type::Function) && p->name() != nullptr)
+ if (p->is_a(FLD_NODE_TYPE_Function) && p->name() != nullptr)
if (strncmp(p->name(), cbname, strlen(cbname)) == 0)
if (p->name()[strlen(cbname)] == '(')
return 1;
diff --git a/fluid/nodes/Node.h b/fluid/nodes/Node.h
index 900addc6b..1c94e493d 100644
--- a/fluid/nodes/Node.h
+++ b/fluid/nodes/Node.h
@@ -79,38 +79,40 @@ typedef struct Strategy {
Flags source() { return (Flags)(flags & SOURCE_MASK); }
} Strategy;
-enum class Type {
+typedef int NodeType;
+enum {
// administrative
- Base_, Widget_, Menu_Manager_, Menu_, Browser_, Valuator_,
+ FLD_NODE_TYPE_Base_, FLD_NODE_TYPE_Widget_, FLD_NODE_TYPE_Menu_Manager_, FLD_NODE_TYPE_Menu_, FLD_NODE_TYPE_Browser_, FLD_NODE_TYPE_Valuator_,
// non-widget
- Function, Code, CodeBlock,
- Decl, DeclBlock, Class,
- Widget_Class, Comment, Data,
+ FLD_NODE_TYPE_Function, FLD_NODE_TYPE_Code, FLD_NODE_TYPE_CodeBlock,
+ FLD_NODE_TYPE_Decl, FLD_NODE_TYPE_DeclBlock, FLD_NODE_TYPE_Class,
+ FLD_NODE_TYPE_Widget_Class, FLD_NODE_TYPE_Comment, FLD_NODE_TYPE_Data,
// groups
- Window, Group, Pack,
- Flex, Tabs, Scroll,
- Tile, Wizard, Grid,
+ FLD_NODE_TYPE_Window, FLD_NODE_TYPE_Group, FLD_NODE_TYPE_Pack,
+ FLD_NODE_TYPE_Flex, FLD_NODE_TYPE_Tabs, FLD_NODE_TYPE_Scroll,
+ FLD_NODE_TYPE_Tile, FLD_NODE_TYPE_Wizard, FLD_NODE_TYPE_Grid,
// buttons
- Button, Return_Button, Light_Button,
- Check_Button, Repeat_Button, Round_Button,
+ FLD_NODE_TYPE_Button, FLD_NODE_TYPE_Return_Button, FLD_NODE_TYPE_Light_Button,
+ FLD_NODE_TYPE_Check_Button, FLD_NODE_TYPE_Repeat_Button, FLD_NODE_TYPE_Round_Button,
// valuators
- Slider, Scrollbar, Value_Slider,
- Adjuster, Counter, Spinner,
- Dial, Roller, Value_Input, Value_Output,
+ FLD_NODE_TYPE_Slider, FLD_NODE_TYPE_Scrollbar, FLD_NODE_TYPE_Value_Slider,
+ FLD_NODE_TYPE_Adjuster, FLD_NODE_TYPE_Counter, FLD_NODE_TYPE_Spinner,
+ FLD_NODE_TYPE_Dial, FLD_NODE_TYPE_Roller, FLD_NODE_TYPE_Value_Input, FLD_NODE_TYPE_Value_Output,
// text
- Input, Output, Text_Editor,
- Text_Display, File_Input, Terminal,
+ FLD_NODE_TYPE_Input, FLD_NODE_TYPE_Output, FLD_NODE_TYPE_Text_Editor,
+ FLD_NODE_TYPE_Text_Display, FLD_NODE_TYPE_File_Input, FLD_NODE_TYPE_Terminal,
// menus
- Menu_Bar, Menu_Button, Choice,
- Input_Choice, Submenu, Menu_Item,
- Checkbox_Menu_Item, Radio_Menu_Item,
+ FLD_NODE_TYPE_Menu_Bar, FLD_NODE_TYPE_Menu_Button, FLD_NODE_TYPE_Choice,
+ FLD_NODE_TYPE_Input_Choice, FLD_NODE_TYPE_Submenu, FLD_NODE_TYPE_Menu_Item,
+ FLD_NODE_TYPE_Checkbox_Menu_Item, FLD_NODE_TYPE_Radio_Menu_Item,
// browsers
- Browser, Check_Browser, File_Browser,
- Tree, Help_View, Table,
+ FLD_NODE_TYPE_Browser, FLD_NODE_TYPE_Check_Browser, FLD_NODE_TYPE_File_Browser,
+ FLD_NODE_TYPE_Tree, FLD_NODE_TYPE_Help_View, FLD_NODE_TYPE_Table,
// misc
- Box, Clock, Progress,
- Max_
+ FLD_NODE_TYPE_Box, FLD_NODE_TYPE_Clock, FLD_NODE_TYPE_Progress,
+ FLD_NODE_TYPE_Max_
};
+typedef NodeType Type;
void update_visibility_flag(Node *p);
void delete_all(int selected_only=0);
@@ -300,9 +302,9 @@ public:
/** Return 1 if the type browser shall draw a padlock over the icon. */
virtual int is_public() const {return 1;}
/** Return the type Type for this Type. */
- virtual Type type() const { return Type::Base_; }
+ virtual Type type() const { return FLD_NODE_TYPE_Base_; }
/** Check if this Type is of the give type Type or derived from that type Type. */
- virtual bool is_a(Type inType) const { return (inType==Type::Base_); }
+ virtual bool is_a(Type inType) const { return (inType==FLD_NODE_TYPE_Base_); }
const char* class_name(const int need_nest) const;
bool is_in_class() const;
diff --git a/fluid/nodes/Widget_Node.cxx b/fluid/nodes/Widget_Node.cxx
index b02e53e66..929a88bf9 100644
--- a/fluid/nodes/Widget_Node.cxx
+++ b/fluid/nodes/Widget_Node.cxx
@@ -71,7 +71,7 @@ int Widget_Node::is_public() const {
}
std::string subclassname(Node* l) {
- if (l->is_a(Type::Menu_Bar)) {
+ if (l->is_a(FLD_NODE_TYPE_Menu_Bar)) {
Menu_Bar_Node* mb = static_cast<Menu_Bar_Node*>(l);
if (mb->is_sys_menu_bar())
return mb->sys_menubar_name();
@@ -85,7 +85,7 @@ std::string subclassname(Node* l) {
return "Fl_Group";
if (p->o->type() == FL_DOUBLE_WINDOW)
return "Fl_Double_Window";
- if (p->type() == Type::Input) {
+ if (p->type() == FLD_NODE_TYPE_Input) {
if (p->o->type() == FL_FLOAT_INPUT)
return "Fl_Float_Input";
if (p->o->type() == FL_INT_INPUT)
@@ -111,7 +111,7 @@ Node* Widget_Node::make(Strategy strategy) {
Node* anchor = Fluid.proj.tree.current, *pp = anchor;
if (pp && (strategy.placement() == Strategy::AFTER_CURRENT))
pp = pp->parent;
- while (pp && !pp->is_a(Type::Group)) {
+ while (pp && !pp->is_a(FLD_NODE_TYPE_Group)) {
anchor = pp;
strategy.placement(Strategy::AFTER_CURRENT);
pp = pp->parent;
@@ -132,7 +132,7 @@ Node* Widget_Node::make(Strategy strategy) {
B = 25;
int ULX,ULY; // parent's origin in window
- if (!p->is_a(Type::Window)) { // if it is a group, add corner
+ if (!p->is_a(FLD_NODE_TYPE_Window)) { // if it is a group, add corner
ULX = p->o->x(); ULY = p->o->y();
} else {
ULX = ULY = 0;
@@ -140,7 +140,7 @@ Node* Widget_Node::make(Strategy strategy) {
// Figure out a position and size for the widget
int X,Y,W,H;
- if (is_a(Type::Group)) { // fill the parent with the widget
+ if (is_a(FLD_NODE_TYPE_Group)) { // fill the parent with the widget
X = ULX+B;
W = p->o->w()-B;
Y = ULY+B;
@@ -184,7 +184,7 @@ Node* Widget_Node::make(Strategy strategy) {
}
void Widget_Node::setimage(Image_Asset* i) {
- if (i == image || is_a(Type::Window))
+ if (i == image || is_a(FLD_NODE_TYPE_Window))
return;
if (image)
image->dec_ref();
@@ -206,7 +206,7 @@ void Widget_Node::setimage(Image_Asset* i) {
}
void Widget_Node::setinactive(Image_Asset* i) {
- if (i == inactive || is_a(Type::Window))
+ if (i == inactive || is_a(FLD_NODE_TYPE_Window))
return;
if (inactive)
inactive->dec_ref();
@@ -275,11 +275,11 @@ void Widget_Node::inactive_name(const std::string& name) {
void Widget_Node::redraw() {
Node* t = this;
- if (is_a(Type::Menu_Item)) {
+ if (is_a(FLD_NODE_TYPE_Menu_Item)) {
// find the menu button that parents this menu:
do {
t = t->parent;
- } while (t && t->is_a(Type::Menu_Item));
+ } while (t && t->is_a(FLD_NODE_TYPE_Menu_Item));
// kludge to cause build_menu to be called again:
if (t)
t->add_child(nullptr, nullptr);
@@ -764,7 +764,7 @@ void set_whenmenu(int n) {
uchar Widget_Node::resizable() const {
- if (is_a(Type::Window))
+ if (is_a(FLD_NODE_TYPE_Window))
return ((Fl_Window*)o)->resizable() != nullptr;
Fl_Group* p = (Fl_Group*)o->parent();
if (p)
@@ -777,7 +777,7 @@ void Widget_Node::resizable(uchar v) {
if (v) {
if (resizable())
return;
- if (is_a(Type::Window)) {
+ if (is_a(FLD_NODE_TYPE_Window)) {
((Fl_Window*)o)->resizable(o);
} else {
Fl_Group* p = (Fl_Group*)o->parent();
@@ -786,7 +786,7 @@ void Widget_Node::resizable(uchar v) {
} else {
if (!resizable())
return;
- if (is_a(Type::Window)) {
+ if (is_a(FLD_NODE_TYPE_Window)) {
((Fl_Window*)o)->resizable(nullptr);
} else {
Fl_Group* p = (Fl_Group*)o->parent();
@@ -907,7 +907,7 @@ void color_common(Fl_Color c) {
if (o->selected && o->is_widget()) {
Widget_Node* q = (Widget_Node*)o;
q->o->color(c); q->o->redraw();
- if (q->parent && q->parent->is_a(Type::Tabs)) {
+ if (q->parent && q->parent->is_a(FLD_NODE_TYPE_Tabs)) {
if (q->o->parent()) {
q->o->parent()->redraw();
}
@@ -979,7 +979,7 @@ static Fl_Menu_Item alignmenu[] = {
void align_cb(Fl_Button* i, void* v) {
Fl_Align b = Fl_Align(fl_uintptr_t(i->user_data()));
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
i->deactivate();
return;
} else {
@@ -1022,7 +1022,7 @@ void align_cb(Fl_Button* i, void* v) {
void align_position_cb(Fl_Choice* i, void* v) {
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
i->deactivate();
return;
} else {
@@ -1057,7 +1057,7 @@ void align_position_cb(Fl_Choice* i, void* v) {
void align_text_image_cb(Fl_Choice* i, void* v) {
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
i->deactivate();
return;
} else {
@@ -1136,14 +1136,14 @@ void textcolor_common(Fl_Color c) {
// void (*load_margin)(Fl_Flex*,Fl_Value_Input*),
// int (*update_margin)(Fl_Flex*,int)) {
// if (v == LOAD) {
-// if (current_widget->is_a(Type::Flex)) {
+// if (current_widget->is_a(FLD_NODE_TYPE_Flex)) {
// load_margin((Fl_Flex*)current_widget->o, i);
// }
// } else {
// int mod = 0;
// int new_value = (int)i->value();
// for (Node* o = Fluid.proj.tree.first; o; o = o->next) {
-// if (o->selected && o->is_a(Type::Flex)) {
+// if (o->selected && o->is_a(FLD_NODE_TYPE_Flex)) {
// Flex_Node* q = (Flex_Node*)o;
// Fl_Flex* w = (Fl_Flex*)q->o;
// if (update_margin(w, new_value)) {
@@ -1281,7 +1281,7 @@ void live_mode_cb(Fl_Button* o, void *) {
live_window->resizable(live_widget);
live_window->set_modal(); // block all other UI
live_window->callback(leave_live_mode_cb);
- if (current_widget->is_a(Type::Window)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) {
Window_Node* w = (Window_Node*)current_widget;
int mw = w->sr_min_w; if (mw>0) mw += 20;
int mh = w->sr_min_h; if (mh>0) mh += 55;
@@ -1315,35 +1315,35 @@ void load_panel() {
numselected = 0;
current_widget = nullptr;
if (Fluid.proj.tree.current) {
- if (Fluid.proj.tree.current->is_a(Type::Data)) {
+ if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Data)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(data_tabs);
numselected = 1;
- } else if (Fluid.proj.tree.current->is_a(Type::Comment)) {
+ } else if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Comment)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(comment_tabs);
numselected = 1;
- } else if (Fluid.proj.tree.current->is_a(Type::Class)) {
+ } else if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Class)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(class_tabs);
numselected = 1;
- } else if (Fluid.proj.tree.current->is_a(Type::DeclBlock)) {
+ } else if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_DeclBlock)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(declblock_tabs);
numselected = 1;
- } else if (Fluid.proj.tree.current->is_a(Type::Decl)) {
+ } else if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Decl)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(decl_tabs);
numselected = 1;
- } else if (Fluid.proj.tree.current->is_a(Type::CodeBlock)) {
+ } else if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_CodeBlock)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(codeblock_tabs);
numselected = 1;
- } else if (Fluid.proj.tree.current->is_a(Type::Code)) {
+ } else if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Code)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(code_tabs);
numselected = 1;
- } else if (Fluid.proj.tree.current->is_a(Type::Function)) {
+ } else if (Fluid.proj.tree.current->is_a(FLD_NODE_TYPE_Function)) {
current_node = Fluid.proj.tree.current;
tabs_wizard->value(func_tabs);
numselected = 1;
@@ -1361,7 +1361,7 @@ void load_panel() {
}
if (current_widget) {
tabs_wizard->value(widget_tabs);
- if (current_widget && current_widget->is_a(Type::Grid)) {
+ if (current_widget && current_widget->is_a(FLD_NODE_TYPE_Grid)) {
if (widget_tab_grid->parent()!=widget_tabs)
widget_tabs->add(widget_tab_grid);
} else {
@@ -1369,7 +1369,7 @@ void load_panel() {
widget_tabs_repo->add(widget_tab_grid);
}
}
- if (current_widget && current_widget->parent && current_widget->parent->is_a(Type::Grid)) {
+ if (current_widget && current_widget->parent && current_widget->parent->is_a(FLD_NODE_TYPE_Grid)) {
if (widget_tab_grid_child->parent()!=widget_tabs)
widget_tabs->add(widget_tab_grid_child);
} else {
@@ -1566,7 +1566,7 @@ void Widget_Node::write_static(fld::io::Code_Writer& f) {
f.write_c(", %s", ut);
if (use_v) f.write_c(" v");
f.write_c(") {\n");
- f.tag(Mergeback::Tag::GENERIC, Mergeback::Tag::WIDGET_CALLBACK, 0);
+ f.tag(FLD_MERGEBACK_TAG_GENERIC, FLD_MERGEBACK_TAG_WIDGET_CALLBACK, 0);
f.write_c_indented(callback(), 1, 0);
if (*(d-1) != ';' && *(d-1) != '}') {
const char* p = strrchr(callback(), '\n');
@@ -1577,7 +1577,7 @@ void Widget_Node::write_static(fld::io::Code_Writer& f) {
if (*p != '#' && *p) f.write_c(";");
}
f.write_c("\n");
- f.tag(Mergeback::Tag::WIDGET_CALLBACK, Mergeback::Tag::GENERIC, get_uid());
+ f.tag(FLD_MERGEBACK_TAG_WIDGET_CALLBACK, FLD_MERGEBACK_TAG_GENERIC, get_uid());
f.write_c("}\n");
if (k) {
f.write_c("void %s::%s(%s* o, %s v) {\n", k, cn, t.c_str(), ut);
@@ -1585,7 +1585,7 @@ void Widget_Node::write_static(fld::io::Code_Writer& f) {
Node* q = nullptr;
for (Node* p = parent; p && p->is_widget(); q = p, p = p->parent)
f.write_c("->parent()");
- if (!q || !q->is_a(Type::Widget_Class))
+ if (!q || !q->is_a(FLD_NODE_TYPE_Widget_Class))
f.write_c("->user_data()");
f.write_c("))->%s_i(o,v);\n}\n", cn);
}
@@ -1617,7 +1617,7 @@ void Widget_Node::write_code1(fld::io::Code_Writer& f) {
f.write_h("%sstatic void %s(%s*, %s);\n", f.indent(1), cn, t.c_str(), ut);
}
// figure out if local variable will be used (prevent compiler warnings):
- int wused = !name() && is_a(Type::Window);
+ int wused = !name() && is_a(FLD_NODE_TYPE_Window);
const char* ptr;
f.varused = wused;
@@ -1679,14 +1679,14 @@ void Widget_Node::write_code1(fld::io::Code_Writer& f) {
write_comment_inline_c(f);
if (f.varused) f.write_c("%s* o = ", t.c_str());
if (name()) f.write_c("%s = ", name());
- if (is_a(Type::Window)) {
+ if (is_a(FLD_NODE_TYPE_Window)) {
// Handle special case where user is faking a Fl_Group type as a window,
// there is no 2-argument constructor in that case:
if (t.find("Window")==t.npos)
f.write_c("new %s(0, 0, %d, %d", t.c_str(), o->w(), o->h());
else
f.write_c("new %s(%d, %d", t.c_str(), o->w(), o->h());
- } else if (is_a(Type::Menu_Bar)
+ } else if (is_a(FLD_NODE_TYPE_Menu_Bar)
&& ((Menu_Bar_Node*)this)->is_sys_menu_bar()
&& is_in_class()) {
f.write_c("(%s*)new %s(%d, %d, %d, %d",
@@ -1698,15 +1698,15 @@ void Widget_Node::write_code1(fld::io::Code_Writer& f) {
if (label() && *label()) {
f.write_c(", ");
switch (Fluid.proj.i18n.type) {
- case fld::I18n_Type::NONE : /* None */
+ case FLD_I18N_TYPE_NONE : /* None */
f.write_cstring(label());
break;
- case fld::I18n_Type::GNU : /* GNU gettext */
+ case FLD_I18N_TYPE_GNU : /* GNU gettext */
f.write_c("%s(", Fluid.proj.i18n.gnu_function.c_str());
f.write_cstring(label());
f.write_c(")");
break;
- case fld::I18n_Type::POSIX : /* POSIX catgets */
+ case FLD_I18N_TYPE_POSIX : /* POSIX catgets */
f.write_c("catgets(%s,%s,%d,",
Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(),
Fluid.proj.i18n.posix_set.c_str(), msgnum());
@@ -1772,15 +1772,15 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
if (!tooltip().empty()) {
f.write_c("%s%s->tooltip(",f.indent(), var);
switch (Fluid.proj.i18n.type) {
- case fld::I18n_Type::NONE : /* None */
+ case FLD_I18N_TYPE_NONE : /* None */
f.write_cstring(tooltip().c_str());
break;
- case fld::I18n_Type::GNU : /* GNU gettext */
+ case FLD_I18N_TYPE_GNU : /* GNU gettext */
f.write_c("%s(", Fluid.proj.i18n.gnu_function.c_str());
f.write_cstring(tooltip().c_str());
f.write_c(")");
break;
- case fld::I18n_Type::POSIX : /* POSIX catgets */
+ case FLD_I18N_TYPE_POSIX : /* POSIX catgets */
f.write_c("catgets(%s,%s,%d,",
Fluid.proj.i18n.posix_file.empty() ? "_catalog" : Fluid.proj.i18n.posix_file.c_str(),
Fluid.proj.i18n.posix_set.c_str(),
@@ -1792,9 +1792,9 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
f.write_c(");\n");
}
- if (is_a(Type::Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type())
+ if (is_a(FLD_NODE_TYPE_Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type())
f.write_c("%s%s->type(%d);\n", f.indent(), var, ((Fl_Spinner*)o)->type());
- else if (o->type() != tplate->type() && !is_a(Type::Window))
+ else if (o->type() != tplate->type() && !is_a(FLD_NODE_TYPE_Window))
f.write_c("%s%s->type(%d);\n", f.indent(), var, o->type());
if (o->box() != tplate->box() || !subclass().empty())
f.write_c("%s%s->box(FL_%s);\n", f.indent(), var, boxname(o->box()));
@@ -1802,9 +1802,9 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
// write shortcut command if needed
int shortcut = 0;
if (is_button()) shortcut = ((Fl_Button*)o)->shortcut();
- else if (is_a(Type::Input)) shortcut = ((Fl_Input_*)o)->shortcut();
- else if (is_a(Type::Value_Input)) shortcut = ((Fl_Value_Input*)o)->shortcut();
- else if (is_a(Type::Text_Display)) shortcut = ((Fl_Text_Display*)o)->shortcut();
+ else if (is_a(FLD_NODE_TYPE_Input)) shortcut = ((Fl_Input_*)o)->shortcut();
+ else if (is_a(FLD_NODE_TYPE_Value_Input)) shortcut = ((Fl_Value_Input*)o)->shortcut();
+ else if (is_a(FLD_NODE_TYPE_Text_Display)) shortcut = ((Fl_Text_Display*)o)->shortcut();
if (shortcut) {
int s = shortcut;
f.write_c("%s%s->shortcut(", f.indent(), var);
@@ -1823,17 +1823,17 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
f.write_c("0x%x);\n", s);
}
- if (is_a(Type::Button)) {
+ if (is_a(FLD_NODE_TYPE_Button)) {
Fl_Button* b = (Fl_Button*)o;
if (b->down_box()) f.write_c("%s%s->down_box(FL_%s);\n", f.indent(), var,
boxname(b->down_box()));
if (b->value()) f.write_c("%s%s->value(1);\n", f.indent(), var);
if (b->compact()) f.write_c("%s%s->compact(%d);\n", f.indent(), var, b->compact());
- } else if (is_a(Type::Input_Choice)) {
+ } else if (is_a(FLD_NODE_TYPE_Input_Choice)) {
Fl_Input_Choice* b = (Fl_Input_Choice*)o;
if (b->down_box()) f.write_c("%s%s->down_box(FL_%s);\n", f.indent(), var,
boxname(b->down_box()));
- } else if (is_a(Type::Menu_Manager_)) {
+ } else if (is_a(FLD_NODE_TYPE_Menu_Manager_)) {
Fl_Menu_* b = (Fl_Menu_*)o;
if (b->down_box()) f.write_c("%s%s->down_box(FL_%s);\n", f.indent(), var,
boxname(b->down_box()));
@@ -1885,7 +1885,7 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
f.write_c("%s%s->vertical_label_margin(%d);\n", f.indent(), var, o->vertical_label_margin());
if (o->label_image_spacing() != tplate->label_image_spacing())
f.write_c("%s%s->label_image_spacing(%d);\n", f.indent(), var, o->label_image_spacing());
- if (is_a(Type::Valuator_)) {
+ if (is_a(FLD_NODE_TYPE_Valuator_)) {
Fl_Valuator* v = (Fl_Valuator*)o;
Fl_Valuator* t = (Fl_Valuator*)(tplate);
if (v->minimum()!=t->minimum())
@@ -1895,19 +1895,19 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
if (v->step()!=t->step())
f.write_c("%s%s->step(%g);\n", f.indent(), var, v->step());
if (v->value()) {
- if (is_a(Type::Scrollbar)) { // Fl_Scrollbar::value(double) is not available
+ if (is_a(FLD_NODE_TYPE_Scrollbar)) { // Fl_Scrollbar::value(double) is not available
f.write_c("%s%s->Fl_Slider::value(%g);\n", f.indent(), var, v->value());
} else {
f.write_c("%s%s->value(%g);\n", f.indent(), var, v->value());
}
}
- if (is_a(Type::Slider)) {
+ if (is_a(FLD_NODE_TYPE_Slider)) {
double x = ((Fl_Slider*)v)->slider_size();
double y = ((Fl_Slider*)t)->slider_size();
if (x != y) f.write_c("%s%s->slider_size(%g);\n", f.indent(), var, x);
}
}
- if (is_a(Type::Spinner)) {
+ if (is_a(FLD_NODE_TYPE_Spinner)) {
Fl_Spinner* v = (Fl_Spinner*)o;
Fl_Spinner* t = (Fl_Spinner*)(tplate);
if (v->minimum()!=t->minimum())
@@ -1931,10 +1931,10 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
if (callback()) {
if (callback()[0] == '[') {
f.write_c("%s%s->callback(\n", f.indent(), var);
- f.tag(Mergeback::Tag::GENERIC, Mergeback::Tag::WIDGET_CALLBACK, 0);
+ f.tag(FLD_MERGEBACK_TAG_GENERIC, FLD_MERGEBACK_TAG_WIDGET_CALLBACK, 0);
f.write_c_indented(callback(), 1, 0);
f.write_c("\n");
- f.tag(Mergeback::Tag::WIDGET_CALLBACK, Mergeback::Tag::GENERIC, get_uid());
+ f.tag(FLD_MERGEBACK_TAG_WIDGET_CALLBACK, FLD_MERGEBACK_TAG_GENERIC, get_uid());
f.write_c("%s", f.indent_plus(1));
} else {
f.write_c("%s%s->callback((Fl_Callback*)%s", f.indent(), var, callback_name(f));
@@ -1960,12 +1960,12 @@ void Widget_Node::write_widget_code(fld::io::Code_Writer& f) {
f.write_c("%s%s->hide();\n", f.indent(), var);
if (!o->active())
f.write_c("%s%s->deactivate();\n", f.indent(), var);
- if (!is_a(Type::Group) && resizable())
+ if (!is_a(FLD_NODE_TYPE_Group) && resizable())
f.write_c("%sFl_Group::current()->resizable(%s);\n", f.indent(), var);
if (hotspot()) {
if (is_class())
f.write_c("%shotspot(%s);\n", f.indent(), var);
- else if (is_a(Type::Window))
+ else if (is_a(FLD_NODE_TYPE_Window))
f.write_c("%s%s->hotspot(%s);\n", f.indent(), var, var);
else
f.write_c("%s%s->window()->hotspot(%s);\n", f.indent(), var, var);
@@ -2021,38 +2021,38 @@ void Widget_Node::write_properties(fld::io::Project_Writer &f) {
if (bind_deimage_) f.write_string("bind_deimage 1");
f.write_string("xywh {%d %d %d %d}", o->x(), o->y(), o->w(), o->h());
Fl_Widget* tplate = ((Widget_Node*)factory)->o;
- if (is_a(Type::Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type()) {
+ if (is_a(FLD_NODE_TYPE_Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type()) {
f.write_string("type");
f.write_word(item_name(subtypes(), ((Fl_Spinner*)o)->type()));
- } else if (subtypes() && (o->type() != tplate->type() || is_a(Type::Window))) {
+ } else if (subtypes() && (o->type() != tplate->type() || is_a(FLD_NODE_TYPE_Window))) {
f.write_string("type");
f.write_word(item_name(subtypes(), o->type()));
}
if (o->box() != tplate->box()) {
f.write_string("box"); f.write_word(boxname(o->box()));}
- if (is_a(Type::Input)) {
+ if (is_a(FLD_NODE_TYPE_Input)) {
Fl_Input_* b = (Fl_Input_*)o;
if (b->shortcut()) f.write_string("shortcut 0x%x", b->shortcut());
}
- if (is_a(Type::Value_Input)) {
+ if (is_a(FLD_NODE_TYPE_Value_Input)) {
Fl_Value_Input* b = (Fl_Value_Input*)o;
if (b->shortcut()) f.write_string("shortcut 0x%x", b->shortcut());
}
- if (is_a(Type::Text_Display)) {
+ if (is_a(FLD_NODE_TYPE_Text_Display)) {
Fl_Text_Display* b = (Fl_Text_Display*)o;
if (b->shortcut()) f.write_string("shortcut 0x%x", b->shortcut());
}
- if (is_a(Type::Button)) {
+ if (is_a(FLD_NODE_TYPE_Button)) {
Fl_Button* b = (Fl_Button*)o;
if (b->down_box()) {
f.write_string("down_box"); f.write_word(boxname(b->down_box()));}
if (b->shortcut()) f.write_string("shortcut 0x%x", b->shortcut());
if (b->value()) f.write_string("value 1");
- } else if (is_a(Type::Input_Choice)) {
+ } else if (is_a(FLD_NODE_TYPE_Input_Choice)) {
Fl_Input_Choice* b = (Fl_Input_Choice*)o;
if (b->down_box()) {
f.write_string("down_box"); f.write_word(boxname(b->down_box()));}
- } else if (is_a(Type::Menu_)) {
+ } else if (is_a(FLD_NODE_TYPE_Menu_)) {
Fl_Menu_* b = (Fl_Menu_*)o;
if (b->down_box()) {
f.write_string("down_box"); f.write_word(boxname(b->down_box()));}
@@ -2081,20 +2081,20 @@ void Widget_Node::write_properties(fld::io::Project_Writer &f) {
f.write_string("image_spacing %d", o->label_image_spacing());
if (o->when() != tplate->when())
f.write_string("when %d", o->when());
- if (is_a(Type::Valuator_)) {
+ if (is_a(FLD_NODE_TYPE_Valuator_)) {
Fl_Valuator* v = (Fl_Valuator*)o;
Fl_Valuator* t = (Fl_Valuator*)(tplate);
if (v->minimum()!=t->minimum()) f.write_string("minimum %g",v->minimum());
if (v->maximum()!=t->maximum()) f.write_string("maximum %g",v->maximum());
if (v->step()!=t->step()) f.write_string("step %g",v->step());
if (v->value()!=0.0) f.write_string("value %g",v->value());
- if (is_a(Type::Slider)) {
+ if (is_a(FLD_NODE_TYPE_Slider)) {
double x = ((Fl_Slider*)v)->slider_size();
double y = ((Fl_Slider*)t)->slider_size();
if (x != y) f.write_string("slider_size %g", x);
}
}
- if (is_a(Type::Spinner)) {
+ if (is_a(FLD_NODE_TYPE_Spinner)) {
Fl_Spinner* v = (Fl_Spinner*)o;
Fl_Spinner* t = (Fl_Spinner*)(tplate);
if (v->minimum()!=t->minimum()) f.write_string("minimum %g",v->minimum());
@@ -2111,7 +2111,7 @@ void Widget_Node::write_properties(fld::io::Project_Writer &f) {
if (!o->visible() && !override_visible_) f.write_string("hide");
if (!o->active()) f.write_string("deactivate");
if (resizable()) f.write_string("resizable");
- if (hotspot()) f.write_string(is_a(Type::Menu_Item) ? "divider" : "hotspot");
+ if (hotspot()) f.write_string(is_a(FLD_NODE_TYPE_Menu_Item) ? "divider" : "hotspot");
if (menu_headline()) f.write_string("headline");
for (int n=0; n < NUM_EXTRA_CODE; n++) if (!extra_code(n).empty()) {
f.write_indent(level+1);
@@ -2183,7 +2183,7 @@ void Widget_Node::read_property(fld::io::Project_Reader &f, const char* c) {
} else if (!strcmp(c,"compress_deimage")) {
compress_deimage_ = (int)atol(f.read_word());
} else if (!strcmp(c,"type")) {
- if (is_a(Type::Spinner))
+ if (is_a(FLD_NODE_TYPE_Spinner))
((Fl_Spinner*)o)->type(item_number(subtypes(), f.read_word()));
else
o->type(item_number(subtypes(), f.read_word()));
@@ -2193,19 +2193,19 @@ void Widget_Node::read_property(fld::io::Project_Reader &f, const char* c) {
if (x == ZERO_ENTRY) x = 0;
o->box((Fl_Boxtype)x);
} else if (sscanf(value,"%d",&x) == 1) o->box((Fl_Boxtype)x);
- } else if (is_a(Type::Button) && !strcmp(c,"down_box")) {
+ } else if (is_a(FLD_NODE_TYPE_Button) && !strcmp(c,"down_box")) {
const char* value = f.read_word();
if ((x = boxnumber(value))) {
if (x == ZERO_ENTRY) x = 0;
((Fl_Button*)o)->down_box((Fl_Boxtype)x);
}
- } else if (is_a(Type::Input_Choice) && !strcmp(c,"down_box")) {
+ } else if (is_a(FLD_NODE_TYPE_Input_Choice) && !strcmp(c,"down_box")) {
const char* value = f.read_word();
if ((x = boxnumber(value))) {
if (x == ZERO_ENTRY) x = 0;
((Fl_Input_Choice*)o)->down_box((Fl_Boxtype)x);
}
- } else if (is_a(Type::Menu_) && !strcmp(c,"down_box")) {
+ } else if (is_a(FLD_NODE_TYPE_Menu_) && !strcmp(c,"down_box")) {
const char* value = f.read_word();
if ((x = boxnumber(value))) {
if (x == ZERO_ENTRY) x = 0;
@@ -2258,18 +2258,18 @@ void Widget_Node::read_property(fld::io::Project_Reader &f, const char* c) {
} else if (!strcmp(c,"when")) {
if (sscanf(f.read_word(),"%d",&x) == 1) o->when(x);
} else if (!strcmp(c,"minimum")) {
- if (is_a(Type::Valuator_)) ((Fl_Valuator*)o)->minimum(strtod(f.read_word(),nullptr));
- if (is_a(Type::Spinner)) ((Fl_Spinner*)o)->minimum(strtod(f.read_word(),nullptr));
+ if (is_a(FLD_NODE_TYPE_Valuator_)) ((Fl_Valuator*)o)->minimum(strtod(f.read_word(),nullptr));
+ if (is_a(FLD_NODE_TYPE_Spinner)) ((Fl_Spinner*)o)->minimum(strtod(f.read_word(),nullptr));
} else if (!strcmp(c,"maximum")) {
- if (is_a(Type::Valuator_)) ((Fl_Valuator*)o)->maximum(strtod(f.read_word(),nullptr));
- if (is_a(Type::Spinner)) ((Fl_Spinner*)o)->maximum(strtod(f.read_word(),nullptr));
+ if (is_a(FLD_NODE_TYPE_Valuator_)) ((Fl_Valuator*)o)->maximum(strtod(f.read_word(),nullptr));
+ if (is_a(FLD_NODE_TYPE_Spinner)) ((Fl_Spinner*)o)->maximum(strtod(f.read_word(),nullptr));
} else if (!strcmp(c,"step")) {
- if (is_a(Type::Valuator_)) ((Fl_Valuator*)o)->step(strtod(f.read_word(),nullptr));
- if (is_a(Type::Spinner)) ((Fl_Spinner*)o)->step(strtod(f.read_word(),nullptr));
+ if (is_a(FLD_NODE_TYPE_Valuator_)) ((Fl_Valuator*)o)->step(strtod(f.read_word(),nullptr));
+ if (is_a(FLD_NODE_TYPE_Spinner)) ((Fl_Spinner*)o)->step(strtod(f.read_word(),nullptr));
} else if (!strcmp(c,"value")) {
- if (is_a(Type::Valuator_)) ((Fl_Valuator*)o)->value(strtod(f.read_word(),nullptr));
- if (is_a(Type::Spinner)) ((Fl_Spinner*)o)->value(strtod(f.read_word(),nullptr));
- } else if ( (!strcmp(c,"slider_size") || !strcmp(c,"size")) && is_a(Type::Slider)) {
+ if (is_a(FLD_NODE_TYPE_Valuator_)) ((Fl_Valuator*)o)->value(strtod(f.read_word(),nullptr));
+ if (is_a(FLD_NODE_TYPE_Spinner)) ((Fl_Spinner*)o)->value(strtod(f.read_word(),nullptr));
+ } else if ( (!strcmp(c,"slider_size") || !strcmp(c,"size")) && is_a(FLD_NODE_TYPE_Slider)) {
((Fl_Slider*)o)->slider_size(strtod(f.read_word(),nullptr));
} else if (!strcmp(c,"textfont")) {
if (sscanf(f.read_word(),"%d",&x) == 1) {ft=(Fl_Font)x; textstuff(1,ft,s,cc);}
@@ -2292,9 +2292,9 @@ void Widget_Node::read_property(fld::io::Project_Reader &f, const char* c) {
} else if (!strcmp(c,"shortcut")) {
int shortcut = (int)strtol(f.read_word(),nullptr,0);
if (is_button()) ((Fl_Button*)o)->shortcut(shortcut);
- else if (is_a(Type::Input)) ((Fl_Input_*)o)->shortcut(shortcut);
- else if (is_a(Type::Value_Input)) ((Fl_Value_Input*)o)->shortcut(shortcut);
- else if (is_a(Type::Text_Display)) ((Fl_Text_Display*)o)->shortcut(shortcut);
+ else if (is_a(FLD_NODE_TYPE_Input)) ((Fl_Input_*)o)->shortcut(shortcut);
+ else if (is_a(FLD_NODE_TYPE_Value_Input)) ((Fl_Value_Input*)o)->shortcut(shortcut);
+ else if (is_a(FLD_NODE_TYPE_Text_Display)) ((Fl_Text_Display*)o)->shortcut(shortcut);
} else {
if (!strncmp(c,"code",4)) {
int n = atoi(c+4);
@@ -2340,7 +2340,7 @@ int Widget_Node::read_fdesign(const char* propname, const char* value) {
if (sscanf(value,"%f %f %f %f",&x,&y,&w,&h) == 4) {
if (fld::io::fdesign_flip) {
Node* p;
- for (p = parent; p && !p->is_a(Type::Window); p = p->parent) {/*empty*/}
+ for (p = parent; p && !p->is_a(FLD_NODE_TYPE_Window); p = p->parent) {/*empty*/}
if (p && p->is_widget()) y = ((Widget_Node*)p)->o->h()-(y+h);
}
x += Fluid.pasteoffset;
@@ -2496,7 +2496,7 @@ void Widget_Node::copy_properties() {
}
// copy all attributes specific to widgets derived from Fl_Input_
- if (is_a(Type::Input)) {
+ if (is_a(FLD_NODE_TYPE_Input)) {
Fl_Input_* d = (Fl_Input_*)live_widget, *s = (Fl_Input_*)o;
d->shortcut(s->shortcut());
d->textfont(ff);
@@ -2505,7 +2505,7 @@ void Widget_Node::copy_properties() {
}
// copy all attributes specific to widgets derived from Fl_Value_Input
- if (is_a(Type::Value_Input)) {
+ if (is_a(FLD_NODE_TYPE_Value_Input)) {
Fl_Value_Input* d = (Fl_Value_Input*)live_widget, *s = (Fl_Value_Input*)o;
d->shortcut(s->shortcut());
d->textfont(ff);
@@ -2514,7 +2514,7 @@ void Widget_Node::copy_properties() {
}
// copy all attributes specific to widgets derived from Fl_Text_Display
- if (is_a(Type::Text_Display)) {
+ if (is_a(FLD_NODE_TYPE_Text_Display)) {
Fl_Text_Display* d = (Fl_Text_Display*)live_widget, *s = (Fl_Text_Display*)o;
d->shortcut(s->shortcut());
d->textfont(ff);
@@ -2523,20 +2523,20 @@ void Widget_Node::copy_properties() {
}
// copy all attributes specific to Fl_Valuator and derived classes
- if (is_a(Type::Valuator_)) {
+ if (is_a(FLD_NODE_TYPE_Valuator_)) {
Fl_Valuator* d = (Fl_Valuator*)live_widget, *s = (Fl_Valuator*)o;
d->minimum(s->minimum());
d->maximum(s->maximum());
d->step(s->step());
d->value(s->value());
- if (is_a(Type::Slider)) {
+ if (is_a(FLD_NODE_TYPE_Slider)) {
Fl_Slider* d = (Fl_Slider*)live_widget, *s = (Fl_Slider*)o;
d->slider_size(s->slider_size());
}
}
// copy all attributes specific to Fl_Spinner and derived classes
- if (is_a(Type::Spinner)) {
+ if (is_a(FLD_NODE_TYPE_Spinner)) {
Fl_Spinner* d = (Fl_Spinner*)live_widget, *s = (Fl_Spinner*)o;
d->minimum(s->minimum());
d->maximum(s->maximum());
diff --git a/fluid/nodes/Widget_Node.h b/fluid/nodes/Widget_Node.h
index 51623612d..b2afa58a6 100644
--- a/fluid/nodes/Widget_Node.h
+++ b/fluid/nodes/Widget_Node.h
@@ -139,8 +139,8 @@ public:
virtual int textstuff(int what, Fl_Font &, int &, Fl_Color &);
virtual Fl_Menu_Item* subtypes();
- Type type() const override { return Type::Widget_; }
- bool is_a(Type inType) const override { return (inType==Type::Widget_) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Widget_; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Widget_) ? true : super::is_a(inType); }
int is_widget() const override;
int is_true_widget() const override { return 1; }
int is_public() const override;
diff --git a/fluid/nodes/Window_Node.cxx b/fluid/nodes/Window_Node.cxx
index 7e90f8272..965d0e8d6 100644
--- a/fluid/nodes/Window_Node.cxx
+++ b/fluid/nodes/Window_Node.cxx
@@ -85,15 +85,15 @@ void i18n_type_cb(Fl_Choice *c, void *v) {
Fluid.proj.set_modflag(1);
}
switch (Fluid.proj.i18n.type) {
- case fld::I18n_Type::NONE : /* None */
+ case FLD_I18N_TYPE_NONE : /* None */
i18n_gnu_group->hide();
i18n_posix_group->hide();
break;
- case fld::I18n_Type::GNU : /* GNU gettext */
+ case FLD_I18N_TYPE_GNU : /* GNU gettext */
i18n_gnu_group->show();
i18n_posix_group->hide();
break;
- case fld::I18n_Type::POSIX : /* POSIX cat */
+ case FLD_I18N_TYPE_POSIX : /* POSIX cat */
i18n_gnu_group->hide();
i18n_posix_group->show();
break;
@@ -235,7 +235,7 @@ int Overlay_Window::handle(int e) {
Node *Window_Node::make(Strategy strategy) {
Node *anchor = Fluid.proj.tree.current, *p = anchor;
if (p && (strategy.placement() == Strategy::AFTER_CURRENT)) p = p->parent;
- while (p && (!p->is_code_block() || p->is_a(Type::Widget_Class))) {
+ while (p && (!p->is_code_block() || p->is_a(FLD_NODE_TYPE_Widget_Class))) {
anchor = p;
strategy.placement(Strategy::AFTER_CURRENT);
p = p->parent;
@@ -363,7 +363,7 @@ void Overlay_Window::resize(int X,int Y,int W,int H) {
if (X!=x() || Y!=y() || W!=w() || H!=h()) {
// Set a checkpoint on the first resize event, ignore further resizes until
// a different type of checkpoint is triggered.
- if (Fluid.proj.undo.checkpoint(fld::proj::Undo::OnceType::WINDOW_RESIZE))
+ if (Fluid.proj.undo.checkpoint(fld::proj::FLD_UNDO_ONCETYPE_WINDOW_RESIZE))
Fluid.proj.set_modflag(1);
}
@@ -512,7 +512,7 @@ void Window_Node::draw_out_of_bounds() {
draw_out_of_bounds(this, 0, 0, o->w(), o->h());
for (Node *q=next; q && q->level>level; q = q->next) {
// don't do this for Fl_Scroll (which we currently can't handle in FLUID anyway)
- if (q->is_a(Type::Group) && !q->is_a(Type::Scroll)) {
+ if (q->is_a(FLD_NODE_TYPE_Group) && !q->is_a(FLD_NODE_TYPE_Scroll)) {
Widget_Node *w = (Widget_Node*)q;
draw_out_of_bounds(w, w->o->x(), w->o->y(), w->o->w(), w->o->h());
}
@@ -600,7 +600,7 @@ void Window_Node::draw_overlay() {
newposition(myo,x,y,r,t);
if (Fluid.show_guides) {
// If we are in a drag operation, and the parent is a grid, show the grid overlay
- if (drag && q->parent && q->parent->is_a(Type::Grid)) {
+ if (drag && q->parent && q->parent->is_a(FLD_NODE_TYPE_Grid)) {
Fl_Grid_Proxy *grid = ((Fl_Grid_Proxy*)((Grid_Node*)q->parent)->o);
grid->draw_overlay();
}
@@ -614,7 +614,7 @@ void Window_Node::draw_overlay() {
} else {
draw_height(wgt->x()+15, wgt->y(), wgt->y()+wgt->h(), FL_ALIGN_CENTER);
}
- } else if (q->is_a(Type::Grid)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Grid)) {
Fl_Grid_Proxy *grid = ((Fl_Grid_Proxy*)((Grid_Node*)q)->o);
grid->draw_overlay();
}
@@ -675,17 +675,17 @@ void check_redraw_corresponding_parent(Node *s) {
Widget_Node * prev_parent = nullptr;
if( !s || !s->selected || !s->is_widget()) return;
for (Node *i=s; i && i->parent; i=i->parent) {
- if (i->is_a(Type::Group) && prev_parent) {
- if (i->is_a(Type::Tabs)) {
+ if (i->is_a(FLD_NODE_TYPE_Group) && prev_parent) {
+ if (i->is_a(FLD_NODE_TYPE_Tabs)) {
((Fl_Tabs*)((Widget_Node*)i)->o)->value(prev_parent->o);
return;
}
- if (i->is_a(Type::Wizard)) {
+ if (i->is_a(FLD_NODE_TYPE_Wizard)) {
((Fl_Wizard*)((Widget_Node*)i)->o)->value(prev_parent->o);
return;
}
}
- if (i->is_a(Type::Group) && s->is_widget())
+ if (i->is_a(FLD_NODE_TYPE_Group) && s->is_widget())
prev_parent = (Widget_Node*)i;
}
}
@@ -693,7 +693,7 @@ void check_redraw_corresponding_parent(Node *s) {
// do that for every window (when selected set changes):
void redraw_overlays() {
for (Node *o=Fluid.proj.tree.first; o; o=o->next)
- if (o->is_a(Type::Window)) ((Window_Node*)o)->fix_overlay();
+ if (o->is_a(FLD_NODE_TYPE_Window)) ((Window_Node*)o)->fix_overlay();
}
void toggle_overlays(Fl_Widget *,void *) {
@@ -708,7 +708,7 @@ void toggle_overlays(Fl_Widget *,void *) {
}
for (Node *o=Fluid.proj.tree.first; o; o=o->next)
- if (o->is_a(Type::Window)) {
+ if (o->is_a(FLD_NODE_TYPE_Window)) {
Widget_Node* w = (Widget_Node*)o;
((Overlay_Window*)(w->o))->redraw_overlay();
}
@@ -731,7 +731,7 @@ void toggle_guides(Fl_Widget *,void *) {
guides_button->value(Fluid.show_guides);
for (Node *o=Fluid.proj.tree.first; o; o=o->next) {
- if (o->is_a(Type::Window)) {
+ if (o->is_a(FLD_NODE_TYPE_Window)) {
Widget_Node* w = (Widget_Node*)o;
((Overlay_Window*)(w->o))->redraw_overlay();
}
@@ -763,7 +763,7 @@ void toggle_restricted(Fl_Widget *,void *) {
restricted_button->value(Fluid.show_restricted);
for (Node *o=Fluid.proj.tree.first; o; o=o->next) {
- if (o->is_a(Type::Window)) {
+ if (o->is_a(FLD_NODE_TYPE_Window)) {
Widget_Node* w = (Widget_Node*)o;
((Overlay_Window*)(w->o))->redraw_overlay();
}
@@ -777,7 +777,7 @@ void toggle_ghosted_outline_cb(Fl_Check_Button *,void *) {
Fluid.show_ghosted_outline = !Fluid.show_ghosted_outline;
Fluid.preferences.set("Fluid.show_ghosted_outline", Fluid.show_ghosted_outline);
for (Node *o=Fluid.proj.tree.first; o; o=o->next) {
- if (o->is_a(Type::Window)) {
+ if (o->is_a(FLD_NODE_TYPE_Window)) {
Widget_Node* w = (Widget_Node*)o;
((Overlay_Window*)(w->o))->redraw();
}
@@ -825,7 +825,7 @@ void Window_Node::moveallchildren(int key)
Widget_Node* myo = (Widget_Node*)i;
int x,y,r,t,ow=myo->o->w(),oh=myo->o->h();
newposition(myo,x,y,r,t);
- if (myo->is_a(Type::Flex) || myo->is_a(Type::Grid)) {
+ if (myo->is_a(FLD_NODE_TYPE_Flex) || myo->is_a(FLD_NODE_TYPE_Grid)) {
// Flex and Grid need to be able to layout their children.
Fluid.proj.tree.allow_layout++;
myo->o->resize(x,y,r-x,t-y);
@@ -861,7 +861,7 @@ void Window_Node::moveallchildren(int key)
Fluid.proj.tree.allow_layout++;
f->layout();
Fluid.proj.tree.allow_layout--;
- } else if (myo->parent && myo->parent->is_a(Type::Grid)) {
+ } else if (myo->parent && myo->parent->is_a(FLD_NODE_TYPE_Grid)) {
Grid_Node* gt = (Grid_Node*)myo->parent;
Fl_Grid* g = (Fl_Grid*)gt->o;
if (key) {
@@ -877,14 +877,14 @@ void Window_Node::moveallchildren(int key)
g->layout();
Fluid.proj.tree.allow_layout--;
update_widget_panel = true;
- } else if (myo->parent && myo->parent->is_a(Type::Group)) {
+ } else if (myo->parent && myo->parent->is_a(FLD_NODE_TYPE_Group)) {
Group_Node* gt = (Group_Node*)myo->parent;
((Fl_Group*)gt->o)->init_sizes();
}
// move all the children, whether selected or not:
Node* p;
for (p = myo->next; p && p->level>myo->level; p = p->next)
- if (p->is_true_widget() && !myo->is_a(Type::Flex) && !myo->is_a(Type::Grid)) {
+ if (p->is_true_widget() && !myo->is_a(FLD_NODE_TYPE_Flex) && !myo->is_a(FLD_NODE_TYPE_Grid)) {
Widget_Node* myo2 = (Widget_Node*)p;
int X,Y,R,T;
newposition(myo2,X,Y,R,T);
@@ -923,7 +923,7 @@ int Window_Node::handle(int event) {
// find the innermost item clicked on:
selection = this;
for (Node* i=next; i && i->level>level; i=i->next)
- if (i->is_a(Type::Group)) {
+ if (i->is_a(FLD_NODE_TYPE_Group)) {
Widget_Node* myo = (Widget_Node*)i;
if (Fl::event_inside(myo->o) && myo->o->visible_r()) {
selection = myo;
@@ -1075,7 +1075,7 @@ int Window_Node::handle(int event) {
} else {
deselect();
select(t, 1);
- if (t->is_a(Type::Menu_Item)) t->open();
+ if (t->is_a(FLD_NODE_TYPE_Menu_Item)) t->open();
}
selection = t;
drag = 0;
diff --git a/fluid/nodes/Window_Node.h b/fluid/nodes/Window_Node.h
index a6846168b..422326734 100644
--- a/fluid/nodes/Window_Node.h
+++ b/fluid/nodes/Window_Node.h
@@ -76,8 +76,8 @@ protected:
Fl_Widget *widget(int,int,int,int) override {return nullptr;}
int recalc; // set by fix_overlay()
void moveallchildren(int key=0);
- Type type() const override { return Type::Window; }
- bool is_a(Type inType) const override { return (inType==Type::Window) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Window; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Window) ? true : super::is_a(inType); }
void open_();
public:
@@ -152,8 +152,8 @@ public:
void write_code2(fld::io::Code_Writer& f) override;
Node *make(Strategy strategy) override;
const char *type_name() override {return "widget_class";}
- Type type() const override { return Type::Widget_Class; }
- bool is_a(Type inType) const override { return (inType==Type::Widget_Class) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Widget_Class; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Widget_Class) ? true : super::is_a(inType); }
int can_have_children() const override {return 1;}
int is_code_block() const override {return 1;}
int is_decl_block() const override {return 1;}
diff --git a/fluid/nodes/factory.cxx b/fluid/nodes/factory.cxx
index 8c4caa08d..90a1c4687 100644
--- a/fluid/nodes/factory.cxx
+++ b/fluid/nodes/factory.cxx
@@ -131,8 +131,8 @@ public:
return b;
}
Widget_Node *_make() override { return new Browser_Base_Node(); }
- Type type() const override { return Type::Browser_; }
- bool is_a(Type inType) const override { return (inType==Type::Browser_) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Browser_; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Browser_) ? true : super::is_a(inType); }
};
Browser_Base_Node Browser_Base_Node::prototype;
@@ -166,8 +166,8 @@ public:
return b;
}
Widget_Node *_make() override { return new Browser_Node(); }
- Type type() const override { return Type::Browser; }
- bool is_a(Type inType) const override { return (inType==Type::Browser) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Browser; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Browser) ? true : super::is_a(inType); }
};
Browser_Node Browser_Node::prototype;
@@ -201,8 +201,8 @@ public:
return b;
}
Widget_Node *_make() override { return new Check_Browser_Node(); }
- Type type() const override { return Type::Check_Browser; }
- bool is_a(Type inType) const override { return (inType==Type::Check_Browser) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Check_Browser; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Check_Browser) ? true : super::is_a(inType); }
};
Check_Browser_Node Check_Browser_Node::prototype;
@@ -229,8 +229,8 @@ public:
return b;
}
Widget_Node *_make() override { return new File_Browser_Node(); }
- Type type() const override { return Type::File_Browser; }
- bool is_a(Type inType) const override { return (inType==Type::File_Browser) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_File_Browser; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_File_Browser) ? true : super::is_a(inType); }
};
File_Browser_Node File_Browser_Node::prototype;
@@ -274,8 +274,8 @@ public:
return b;
}
Widget_Node *_make() override { return new Tree_Node(); }
- Type type() const override { return Type::Tree; }
- bool is_a(Type inType) const override { return (inType==Type::Tree) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Tree; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Tree) ? true : super::is_a(inType); }
};
Tree_Node Tree_Node::prototype;
@@ -323,8 +323,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Help_View_Node(); }
- Type type() const override { return Type::Help_View; }
- bool is_a(Type inType) const override { return (inType==Type::Help_View) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Help_View; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Help_View) ? true : super::is_a(inType); }
};
Help_View_Node Help_View_Node::prototype;
@@ -351,8 +351,8 @@ public:
return new Fl_Slider(x, y, w, h, "Valuator");
}
Widget_Node *_make() override { return new Valuator_Node(); }
- Type type() const override { return Type::Valuator_; }
- bool is_a(Type inType) const override { return (inType==Type::Valuator_) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Valuator_; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Valuator_) ? true : super::is_a(inType); }
};
Valuator_Node Valuator_Node::prototype;
@@ -401,8 +401,8 @@ public:
return new Fl_Counter(x, y, w, h, "counter:");
}
Widget_Node *_make() override { return new Counter_Node(); }
- Type type() const override { return Type::Counter; }
- bool is_a(Type inType) const override { return (inType==Type::Counter) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Counter; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Counter) ? true : super::is_a(inType); }
};
Counter_Node Counter_Node::prototype;
@@ -431,8 +431,8 @@ public:
return new Fl_Adjuster(x, y, w, h);
}
Widget_Node *_make() override { return new Adjuster_Node(); }
- Type type() const override { return Type::Adjuster; }
- bool is_a(Type inType) const override { return (inType==Type::Adjuster) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Adjuster; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Adjuster) ? true : super::is_a(inType); }
};
Adjuster_Node Adjuster_Node::prototype;
@@ -468,8 +468,8 @@ public:
return new Fl_Dial(x, y, w, h);
}
Widget_Node *_make() override { return new Dial_Node(); }
- Type type() const override { return Type::Dial; }
- bool is_a(Type inType) const override { return (inType==Type::Dial) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Dial; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Dial) ? true : super::is_a(inType); }
};
Dial_Node Dial_Node::prototype;
@@ -506,8 +506,8 @@ public:
return new Fl_Roller(x, y, w, h);
}
Widget_Node *_make() override { return new Roller_Node(); }
- Type type() const override { return Type::Roller; }
- bool is_a(Type inType) const override { return (inType==Type::Roller) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Roller; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Roller) ? true : super::is_a(inType); }
};
Roller_Node Roller_Node::prototype;
@@ -550,8 +550,8 @@ public:
return new Fl_Slider(x, y, w, h, "slider:");
}
Widget_Node *_make() override { return new Slider_Node(); }
- Type type() const override { return Type::Slider; }
- bool is_a(Type inType) const override { return (inType==Type::Slider) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Slider; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Slider) ? true : super::is_a(inType); }
};
Slider_Node Slider_Node::prototype;
@@ -582,8 +582,8 @@ public:
return new Fl_Scrollbar(x, y, w, h);
}
Widget_Node *_make() override { return new Scrollbar_Node(); }
- Type type() const override { return Type::Scrollbar; }
- bool is_a(Type inType) const override { return (inType==Type::Scrollbar) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Scrollbar; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Scrollbar) ? true : super::is_a(inType); }
};
Scrollbar_Node Scrollbar_Node::prototype;
@@ -618,8 +618,8 @@ public:
return new Fl_Value_Slider(x, y, w, h, "slider:");
}
Widget_Node *_make() override { return new Value_Slider_Node(); }
- Type type() const override { return Type::Value_Slider; }
- bool is_a(Type inType) const override { return (inType==Type::Value_Slider) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Value_Slider; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Value_Slider) ? true : super::is_a(inType); }
};
Value_Slider_Node Value_Slider_Node::prototype;
@@ -661,8 +661,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Value_Input_Node(); }
- Type type() const override { return Type::Value_Input; }
- bool is_a(Type inType) const override { return (inType==Type::Value_Input) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Value_Input; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Value_Input) ? true : super::is_a(inType); }
};
Value_Input_Node Value_Input_Node::prototype;
@@ -704,8 +704,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Value_Output_Node(); }
- Type type() const override { return Type::Value_Output; }
- bool is_a(Type inType) const override { return (inType==Type::Value_Output) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Value_Output; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Value_Output) ? true : super::is_a(inType); }
};
Value_Output_Node Value_Output_Node::prototype;
@@ -764,8 +764,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Input_Node(); }
- Type type() const override { return Type::Input; }
- bool is_a(Type inType) const override { return (inType==Type::Input) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Input; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Input) ? true : super::is_a(inType); }
void copy_properties() override {
Widget_Node::copy_properties();
Fl_Input_ *d = (Fl_Input_*)live_widget, *s = (Fl_Input_*)o;
@@ -806,8 +806,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new File_Input_Node(); }
- Type type() const override { return Type::File_Input; }
- bool is_a(Type inType) const override { return (inType==Type::File_Input) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_File_Input; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_File_Input) ? true : super::is_a(inType); }
};
File_Input_Node File_Input_Node::prototype;
@@ -840,8 +840,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Output_Node(); }
- Type type() const override { return Type::Output; }
- bool is_a(Type inType) const override { return (inType==Type::Output) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Output; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Output) ? true : super::is_a(inType); }
};
Output_Node Output_Node::prototype;
@@ -894,8 +894,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Text_Display_Node(); }
- Type type() const override { return Type::Text_Display; }
- bool is_a(Type inType) const override { return (inType==Type::Text_Display) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Text_Display; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Text_Display) ? true : super::is_a(inType); }
};
Text_Display_Node Text_Display_Node::prototype;
@@ -924,8 +924,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Text_Editor_Node(); }
- Type type() const override { return Type::Text_Editor; }
- bool is_a(Type inType) const override { return (inType==Type::Text_Editor) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Text_Editor; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Text_Editor) ? true : super::is_a(inType); }
};
Text_Editor_Node Text_Editor_Node::prototype;
@@ -1019,8 +1019,8 @@ public:
return 1;
}
Widget_Node *_make() override {return new Terminal_Node();}
- Type type() const override { return Type::Terminal; }
- bool is_a(Type inType) const override { return (inType==Type::Terminal) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Terminal; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Terminal) ? true : super::is_a(inType); }
};
Terminal_Node Terminal_Node::prototype;
@@ -1051,8 +1051,8 @@ public:
return new Fl_Box(x, y, w, h, "label");
}
Widget_Node *_make() override { return new Box_Node(); }
- Type type() const override { return Type::Box; }
- bool is_a(Type inType) const override { return (inType==Type::Box) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Box; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Box) ? true : super::is_a(inType); }
};
Box_Node Box_Node::prototype;
@@ -1080,8 +1080,8 @@ public:
return new Fl_Clock(x, y, w, h);
}
Widget_Node *_make() override { return new Clock_Node(); }
- Type type() const override { return Type::Clock; }
- bool is_a(Type inType) const override { return (inType==Type::Clock) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Clock; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Clock) ? true : super::is_a(inType); }
};
Clock_Node Clock_Node::prototype;
@@ -1114,8 +1114,8 @@ public:
return myo;
}
Widget_Node *_make() override { return new Progress_Node(); }
- Type type() const override { return Type::Progress; }
- bool is_a(Type inType) const override { return (inType==Type::Progress) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Progress; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Progress) ? true : super::is_a(inType); }
};
Progress_Node Progress_Node::prototype;
@@ -1164,8 +1164,8 @@ public:
return new Fl_Spinner(x, y, w, h, "spinner:");
}
Widget_Node *_make() override { return new Spinner_Node(); }
- Type type() const override { return Type::Spinner; }
- bool is_a(Type inType) const override { return (inType==Type::Spinner) ? true : super::is_a(inType); }
+ Type type() const override { return FLD_NODE_TYPE_Spinner; }
+ bool is_a(Type inType) const override { return (inType==FLD_NODE_TYPE_Spinner) ? true : super::is_a(inType); }
};
Spinner_Node Spinner_Node::prototype;
@@ -1285,7 +1285,7 @@ Node *add_new_widget_from_user(Node *inPrototype, Strategy strategy, bool and_op
auto layout = Fluid.proj.layout;
Node *t = ((Node*)inPrototype)->make(strategy);
if (t) {
- if (t->is_widget() && !t->is_a(Type::Window)) {
+ if (t->is_widget() && !t->is_a(FLD_NODE_TYPE_Window)) {
auto layout = Fluid.proj.layout;
Widget_Node *wt = (Widget_Node *)t;
bool changed = false;
@@ -1312,14 +1312,14 @@ Node *add_new_widget_from_user(Node *inPrototype, Strategy strategy, bool and_op
wt->textstuff(2, f, s, c);
}
- if (changed && t->is_a(Type::Menu_Item)) {
+ if (changed && t->is_a(FLD_NODE_TYPE_Menu_Item)) {
Node * tt = t->parent;
- while (tt && !tt->is_a(Type::Menu_Manager_)) tt = tt->parent;
+ while (tt && !tt->is_a(FLD_NODE_TYPE_Menu_Manager_)) tt = tt->parent;
if (tt)
((Menu_Manager_Node*)tt)->build_menu();
}
}
- if (t->is_true_widget() && !t->is_a(Type::Window)) {
+ if (t->is_true_widget() && !t->is_a(FLD_NODE_TYPE_Window)) {
// Resize and/or reposition new widget...
Widget_Node *wt = (Widget_Node *)t;
@@ -1328,13 +1328,13 @@ Node *add_new_widget_from_user(Node *inPrototype, Strategy strategy, bool and_op
int w = 0, h = 0;
wt->ideal_size(w, h);
- if ((t->parent && t->parent->is_a(Type::Flex))) {
+ if ((t->parent && t->parent->is_a(FLD_NODE_TYPE_Flex))) {
if (Window_Node::popupx != 0x7FFFFFFF)
((Flex_Node*)t->parent)->insert_child_at(((Widget_Node*)t)->o, Window_Node::popupx, Window_Node::popupy);
t->parent->layout_widget();
- } else if ( wt->is_a(Type::Group)
+ } else if ( wt->is_a(FLD_NODE_TYPE_Group)
&& wt->parent
- && wt->parent->is_a(Type::Tabs)
+ && wt->parent->is_a(FLD_NODE_TYPE_Tabs)
//&& (Window_Node::popupx == 0x7FFFFFFF)
&& (layout->top_tabs_margin > 0)) {
// If the widget is a group and the parent is tabs and the top tabs
@@ -1343,9 +1343,9 @@ Node *add_new_widget_from_user(Node *inPrototype, Strategy strategy, bool and_op
Fl_Widget *po = ((Tabs_Node*)wt->parent)->o;
wt->o->resize(po->x(), po->y() + layout->top_tabs_margin,
po->w(), po->h() - layout->top_tabs_margin);
- } else if ( wt->is_a(Type::Menu_Bar)
+ } else if ( wt->is_a(FLD_NODE_TYPE_Menu_Bar)
&& wt->parent
- && wt->parent->is_a(Type::Window)
+ && wt->parent->is_a(FLD_NODE_TYPE_Window)
&& (wt->prev == wt->parent)) {
// If this is the first child of a window, make the menu bar as wide as
// the window and drop it at 0, 0. Otherwise just use the suggested size.
@@ -1362,7 +1362,7 @@ Node *add_new_widget_from_user(Node *inPrototype, Strategy strategy, bool and_op
wt->o->size(w, h);
}
}
- if (t->parent && t->parent->is_a(Type::Grid)) {
+ if (t->parent && t->parent->is_a(FLD_NODE_TYPE_Grid)) {
if (Window_Node::popupx != 0x7FFFFFFF) {
((Grid_Node*)t->parent)->insert_child_at(((Widget_Node*)t)->o, Window_Node::popupx, Window_Node::popupy);
} else {
@@ -1370,7 +1370,7 @@ Node *add_new_widget_from_user(Node *inPrototype, Strategy strategy, bool and_op
}
}
}
- if (t->is_a(Type::Window)) {
+ if (t->is_a(FLD_NODE_TYPE_Window)) {
int x = 0, y = 0, w = 480, h = 320;
Window_Node *wt = (Window_Node *)t;
wt->ideal_size(w, h);
diff --git a/fluid/panels/function_panel.cxx b/fluid/panels/function_panel.cxx
index 4fea9aa1e..a5aa35f12 100644
--- a/fluid/panels/function_panel.cxx
+++ b/fluid/panels/function_panel.cxx
@@ -52,31 +52,31 @@ Fl_Window* make_widgetbin() {
o->tooltip("Function");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("Function"));
- o->image(pixmap[(int)Type::Function]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Function]);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(30, 21, 24, 24);
o->tooltip("Class");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("Class"));
- o->image(pixmap[(int)Type::Class]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Class]);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(55, 21, 24, 24);
o->tooltip("Comment");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("comment"));
- o->image(pixmap[(int)Type::Comment]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Comment]);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(5, 46, 24, 24);
o->tooltip("Code");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("Code"));
- o->image(pixmap[(int)Type::Code]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Code]);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(30, 46, 24, 24);
o->tooltip("Code Block");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("CodeBlock"));
- o->image(pixmap[(int)Type::CodeBlock]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_CodeBlock]);
} // Fl_Button* o
{ fld::widget::Bin_Window_Button* o = new fld::widget::Bin_Window_Button(55, 46, 24, 24);
o->tooltip("Widget Class");
@@ -90,25 +90,25 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("widget_class"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Widget_Class]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Widget_Class]);
} // fld::widget::Bin_Window_Button* o
{ Fl_Button* o = new Fl_Button(5, 71, 24, 24);
o->tooltip("Declaration");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("decl"));
- o->image(pixmap[(int)Type::Decl]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Decl]);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(30, 71, 24, 24);
o->tooltip("Declaration Block");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("declblock"));
- o->image(pixmap[(int)Type::DeclBlock]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_DeclBlock]);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(55, 71, 24, 24);
o->tooltip("Inline Data");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("data"));
- o->image(pixmap[(int)Type::Data]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Data]);
} // Fl_Button* o
o->end();
} // Fl_Group* o
@@ -126,7 +126,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Window"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Window]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Window]);
} // fld::widget::Bin_Window_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(114, 21, 24, 24);
o->tooltip("Group");
@@ -140,7 +140,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Group"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Group]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Group]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(139, 21, 24, 24);
o->tooltip("Pack");
@@ -154,7 +154,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Pack"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Pack]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Pack]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(89, 46, 24, 24);
o->tooltip("Tabs");
@@ -168,7 +168,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tabs"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Tabs]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Tabs]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(114, 46, 24, 24);
o->tooltip("Scroll");
@@ -182,7 +182,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scroll"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Scroll]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Scroll]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(139, 46, 24, 24);
o->tooltip("Flex");
@@ -196,7 +196,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Flex"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Flex]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Flex]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(89, 71, 24, 24);
o->tooltip("Tile");
@@ -210,7 +210,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tile"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Tile]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Tile]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(114, 71, 24, 24);
o->tooltip("Wizard");
@@ -224,7 +224,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Wizard"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Wizard]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Wizard]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(139, 71, 24, 24);
o->tooltip("Grid");
@@ -238,7 +238,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Grid"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Grid]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Grid]);
} // fld::widget::Bin_Button* o
o->end();
} // Fl_Group* o
@@ -256,7 +256,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Button"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Button]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Button]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(198, 21, 24, 24);
o->tooltip("Return Button");
@@ -270,7 +270,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Return_Button"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Return_Button]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Return_Button]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(173, 46, 24, 24);
o->tooltip("Light Button");
@@ -284,7 +284,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Light_Button"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Light_Button]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Light_Button]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(198, 46, 24, 24);
o->tooltip("Repeat Button");
@@ -298,7 +298,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Repeat_Button"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Repeat_Button]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Repeat_Button]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(173, 71, 24, 24);
o->tooltip("Check Button");
@@ -312,7 +312,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Button"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Check_Button]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Check_Button]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(198, 71, 24, 24);
o->tooltip("Round Button");
@@ -326,7 +326,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Round_Button"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Round_Button]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Round_Button]);
} // fld::widget::Bin_Button* o
o->end();
} // Fl_Group* o
@@ -344,7 +344,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Slider"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Slider]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Slider]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(257, 21, 24, 24);
o->tooltip("Scroll Bar");
@@ -358,7 +358,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scrollbar"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Scrollbar]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Scrollbar]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(282, 21, 24, 24);
o->tooltip("Value Slider");
@@ -372,7 +372,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Slider"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Value_Slider]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Value_Slider]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(307, 21, 24, 24);
o->tooltip("Value Output");
@@ -386,7 +386,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Output"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Value_Output]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Value_Output]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(232, 46, 24, 24);
o->tooltip("Adjuster");
@@ -400,7 +400,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Adjuster"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Adjuster]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Adjuster]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(257, 46, 24, 24);
o->tooltip("Counter");
@@ -414,7 +414,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Counter"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Counter]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Counter]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(282, 46, 24, 24);
o->tooltip("Dial");
@@ -428,7 +428,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Dial"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Dial]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Dial]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(232, 71, 24, 24);
o->tooltip("Roller");
@@ -442,7 +442,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Roller"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Roller]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Roller]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(257, 71, 24, 24);
o->tooltip("Spinner");
@@ -456,7 +456,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Spinner"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Spinner]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Spinner]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(282, 71, 24, 24);
o->tooltip("Value Input");
@@ -470,7 +470,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Input"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Value_Input]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Value_Input]);
} // fld::widget::Bin_Button* o
o->end();
} // Fl_Group* o
@@ -488,7 +488,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Input]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Input]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(366, 21, 24, 24);
o->tooltip("Output");
@@ -502,7 +502,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Output"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Output]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Output]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(341, 46, 24, 24);
o->tooltip("Text Edit");
@@ -516,7 +516,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Editor"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Text_Editor]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Text_Editor]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(366, 46, 24, 24);
o->tooltip("Text Display");
@@ -530,7 +530,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Display"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Text_Display]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Text_Display]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(341, 71, 24, 24);
o->tooltip("File Input");
@@ -544,7 +544,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Input"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::File_Input]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_File_Input]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(366, 71, 24, 24);
o->tooltip("Terminal");
@@ -558,7 +558,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Terminal"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Terminal]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Terminal]);
} // fld::widget::Bin_Button* o
o->end();
} // Fl_Group* o
@@ -576,7 +576,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input_Choice"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Input_Choice]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Input_Choice]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(425, 21, 24, 24);
o->tooltip("Menu Item");
@@ -590,7 +590,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("menuitem"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Menu_Item]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Menu_Item]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(450, 21, 24, 24);
o->tooltip("Menu Bar");
@@ -604,7 +604,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Bar"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Menu_Bar]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Menu_Bar]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(400, 46, 24, 24);
o->tooltip("Menu Button");
@@ -618,7 +618,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Button"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Menu_Button]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Menu_Button]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(425, 46, 24, 24);
o->tooltip("Checkbox Menu Item");
@@ -632,7 +632,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("checkmenuitem"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Checkbox_Menu_Item]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Checkbox_Menu_Item]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(450, 46, 24, 24);
o->tooltip("Sub Menu");
@@ -646,7 +646,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("submenu"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Submenu]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Submenu]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(400, 71, 24, 24);
o->tooltip("Choice");
@@ -660,7 +660,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Choice"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Choice]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Choice]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(425, 71, 24, 24);
o->tooltip("Radio Menu Item");
@@ -674,7 +674,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("radiomenuitem"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Radio_Menu_Item]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Radio_Menu_Item]);
} // fld::widget::Bin_Button* o
o->end();
} // Fl_Group* o
@@ -692,7 +692,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Browser"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Browser]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Browser]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(509, 21, 24, 24);
o->tooltip("Tree");
@@ -706,7 +706,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tree"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Tree]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Tree]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(484, 46, 24, 24);
o->tooltip("Check Browser");
@@ -720,7 +720,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Browser"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Check_Browser]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Check_Browser]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(509, 46, 24, 24);
o->tooltip("Help Browser");
@@ -734,7 +734,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Help_View"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Help_View]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Help_View]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(484, 71, 24, 24);
o->tooltip("File Browser");
@@ -748,7 +748,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Browser"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::File_Browser]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_File_Browser]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(509, 71, 24, 24);
o->tooltip("Table");
@@ -762,7 +762,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Table"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Table]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Table]);
} // fld::widget::Bin_Button* o
o->end();
} // Fl_Group* o
@@ -780,7 +780,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Box"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Box]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Box]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(567, 21, 24, 24);
o->tooltip("Clock");
@@ -794,7 +794,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Clock"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Clock]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Clock]);
} // fld::widget::Bin_Button* o
{ fld::widget::Bin_Button* o = new fld::widget::Bin_Button(542, 46, 24, 24);
o->tooltip("Progress");
@@ -808,7 +808,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Progress"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
- o->image(pixmap[(int)Type::Progress]);
+ o->image(pixmap[(int)FLD_NODE_TYPE_Progress]);
} // fld::widget::Bin_Button* o
o->end();
} // Fl_Group* o
diff --git a/fluid/panels/function_panel.fl b/fluid/panels/function_panel.fl
index 23240f469..6bb28907e 100644
--- a/fluid/panels/function_panel.fl
+++ b/fluid/panels/function_panel.fl
@@ -74,56 +74,56 @@ else
user_data {"Function"}
callback type_make_cb
tooltip Function xywh {5 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Function]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Function]);}
}
Fl_Button {} {
user_data {"Class"}
callback type_make_cb
tooltip Class xywh {30 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Class]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Class]);}
}
Fl_Button {} {
user_data {"comment"}
callback type_make_cb
tooltip Comment xywh {55 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Comment]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Comment]);}
}
Fl_Button {} {
user_data {"Code"}
callback type_make_cb
tooltip Code xywh {5 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Code]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Code]);}
}
Fl_Button {} {
user_data {"CodeBlock"}
callback type_make_cb
tooltip {Code Block} xywh {30 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::CodeBlock]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_CodeBlock]);}
}
Fl_Button {} {
user_data {"widget_class"}
callback type_make_cb
tooltip {Widget Class} xywh {55 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Widget_Class]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Widget_Class]);}
class {fld::widget::Bin_Window_Button}
}
Fl_Button {} {
user_data {"decl"}
callback type_make_cb
tooltip Declaration xywh {5 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Decl]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Decl]);}
}
Fl_Button {} {
user_data {"declblock"}
callback type_make_cb
tooltip {Declaration Block} xywh {30 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::DeclBlock]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_DeclBlock]);}
}
Fl_Button {} {
user_data {"data"}
callback type_make_cb
tooltip {Inline Data} xywh {55 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Data]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Data]);}
}
}
Fl_Group {} {
@@ -134,63 +134,63 @@ else
user_data {"Fl_Window"}
callback type_make_cb
tooltip Window xywh {89 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Window]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Window]);}
class {fld::widget::Bin_Window_Button}
}
Fl_Button {} {
user_data {"Fl_Group"}
callback type_make_cb
tooltip Group xywh {114 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Group]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Group]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Pack"}
callback type_make_cb
tooltip Pack xywh {139 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Pack]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Pack]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Tabs"}
callback type_make_cb
tooltip Tabs xywh {89 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Tabs]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Tabs]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Scroll"}
callback type_make_cb
tooltip Scroll xywh {114 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Scroll]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Scroll]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Flex"}
callback type_make_cb
tooltip Flex xywh {139 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Flex]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Flex]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Tile"}
callback type_make_cb
tooltip Tile xywh {89 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Tile]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Tile]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Wizard"}
callback type_make_cb
tooltip Wizard xywh {114 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Wizard]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Wizard]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Grid"}
callback type_make_cb
tooltip Grid xywh {139 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Grid]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Grid]);}
class {fld::widget::Bin_Button}
}
}
@@ -202,42 +202,42 @@ else
user_data {"Fl_Button"}
callback type_make_cb
tooltip Button xywh {173 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Button]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Button]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Return_Button"}
callback type_make_cb
tooltip {Return Button} xywh {198 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Return_Button]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Return_Button]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Light_Button"}
callback type_make_cb
tooltip {Light Button} xywh {173 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Light_Button]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Light_Button]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Repeat_Button"}
callback type_make_cb
tooltip {Repeat Button} xywh {198 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Repeat_Button]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Repeat_Button]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Check_Button"}
callback type_make_cb
tooltip {Check Button} xywh {173 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Check_Button]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Check_Button]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Round_Button"}
callback type_make_cb
tooltip {Round Button} xywh {198 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Round_Button]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Round_Button]);}
class {fld::widget::Bin_Button}
}
}
@@ -249,70 +249,70 @@ else
user_data {"Fl_Slider"}
callback type_make_cb
tooltip Slider xywh {232 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Slider]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Slider]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Scrollbar"}
callback type_make_cb
tooltip {Scroll Bar} xywh {257 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Scrollbar]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Scrollbar]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Value_Slider"}
callback type_make_cb
tooltip {Value Slider} xywh {282 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Value_Slider]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Value_Slider]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Value_Output"}
callback type_make_cb
tooltip {Value Output} xywh {307 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Value_Output]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Value_Output]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Adjuster"}
callback type_make_cb
tooltip Adjuster xywh {232 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Adjuster]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Adjuster]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Counter"}
callback type_make_cb
tooltip Counter xywh {257 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Counter]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Counter]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Dial"}
callback type_make_cb
tooltip Dial xywh {282 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Dial]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Dial]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Roller"}
callback type_make_cb
tooltip Roller xywh {232 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Roller]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Roller]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Spinner"}
callback type_make_cb
tooltip Spinner xywh {257 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Spinner]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Spinner]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Value_Input"}
callback type_make_cb
tooltip {Value Input} xywh {282 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Value_Input]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Value_Input]);}
class {fld::widget::Bin_Button}
}
}
@@ -324,42 +324,42 @@ else
user_data {"Fl_Input"}
callback type_make_cb
tooltip Input xywh {341 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Input]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Input]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Output"}
callback type_make_cb
tooltip Output xywh {366 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Output]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Output]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Text_Editor"}
callback type_make_cb
tooltip {Text Edit} xywh {341 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Text_Editor]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Text_Editor]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Text_Display"}
callback type_make_cb
tooltip {Text Display} xywh {366 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Text_Display]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Text_Display]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_File_Input"}
callback type_make_cb
tooltip {File Input} xywh {341 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::File_Input]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_File_Input]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Terminal"}
callback type_make_cb
tooltip Terminal xywh {366 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Terminal]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Terminal]);}
class {fld::widget::Bin_Button}
}
}
@@ -371,56 +371,56 @@ else
user_data {"Fl_Input_Choice"}
callback type_make_cb
tooltip {Input Choice} xywh {400 22 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Input_Choice]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Input_Choice]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"menuitem"}
callback type_make_cb
tooltip {Menu Item} xywh {425 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Menu_Item]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Menu_Item]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Menu_Bar"}
callback type_make_cb
tooltip {Menu Bar} xywh {450 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Menu_Bar]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Menu_Bar]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Menu_Button"}
callback type_make_cb
tooltip {Menu Button} xywh {400 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Menu_Button]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Menu_Button]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"checkmenuitem"}
callback type_make_cb
tooltip {Checkbox Menu Item} xywh {425 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Checkbox_Menu_Item]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Checkbox_Menu_Item]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"submenu"}
callback type_make_cb
tooltip {Sub Menu} xywh {450 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Submenu]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Submenu]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Choice"}
callback type_make_cb
tooltip Choice xywh {400 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Choice]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Choice]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"radiomenuitem"}
callback type_make_cb
tooltip {Radio Menu Item} xywh {425 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Radio_Menu_Item]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Radio_Menu_Item]);}
class {fld::widget::Bin_Button}
}
}
@@ -432,42 +432,42 @@ else
user_data {"Fl_Browser"}
callback type_make_cb
tooltip Browser xywh {484 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Browser]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Browser]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Tree"}
callback type_make_cb
tooltip Tree xywh {509 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Tree]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Tree]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Check_Browser"}
callback type_make_cb
tooltip {Check Browser} xywh {484 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Check_Browser]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Check_Browser]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Help_View"}
callback type_make_cb
tooltip {Help Browser} xywh {509 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Help_View]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Help_View]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_File_Browser"}
callback type_make_cb
tooltip {File Browser} xywh {484 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::File_Browser]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_File_Browser]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Table"}
callback type_make_cb
tooltip Table xywh {509 71 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Table]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Table]);}
class {fld::widget::Bin_Button}
}
}
@@ -479,21 +479,21 @@ else
user_data {"Fl_Box"}
callback type_make_cb
tooltip Box xywh {542 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Box]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Box]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Clock"}
callback type_make_cb
tooltip Clock xywh {567 21 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Clock]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Clock]);}
class {fld::widget::Bin_Button}
}
Fl_Button {} {
user_data {"Fl_Progress"}
callback type_make_cb
tooltip Progress xywh {542 46 24 24} box THIN_UP_BOX
- code0 {o->image(pixmap[(int)Type::Progress]);}
+ code0 {o->image(pixmap[(int)FLD_NODE_TYPE_Progress]);}
class {fld::widget::Bin_Button}
}
}
diff --git a/fluid/panels/settings_panel.cxx b/fluid/panels/settings_panel.cxx
index e691e9e97..e108e57e4 100644
--- a/fluid/panels/settings_panel.cxx
+++ b/fluid/panels/settings_panel.cxx
@@ -544,7 +544,7 @@ Fl_Menu_Button *w_layout_menu=(Fl_Menu_Button *)0;
static void cb_w_layout_menu(Fl_Menu_Button*, void* v) {
if (v == LOAD) {
fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
- if (suite.storage_ == fld::Tool_Store::INTERNAL) {
+ if (suite.storage_ == FLD_TOOL_STORE_INTERNAL) {
w_layout_menu_rename->deactivate();
for (int i=1; i<4; i++) w_layout_menu_storage[i]->deactivate();
w_layout_menu_delete->deactivate();
@@ -571,25 +571,25 @@ static void cb_w_layout_menu_rename(Fl_Menu_*, void*) {
static void cb_w_layout_menu_storage(Fl_Menu_*, void*) {
fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
- suite.storage(fld::Tool_Store::INTERNAL);
+ suite.storage(FLD_TOOL_STORE_INTERNAL);
Fluid.layout_list.update_dialogs();
}
static void cb_w_layout_menu_storage1(Fl_Menu_*, void*) {
fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
- suite.storage(fld::Tool_Store::USER);
+ suite.storage(FLD_TOOL_STORE_USER);
Fluid.layout_list.update_dialogs();
}
static void cb_w_layout_menu_storage2(Fl_Menu_*, void*) {
fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
- suite.storage(fld::Tool_Store::PROJECT);
+ suite.storage(FLD_TOOL_STORE_PROJECT);
Fluid.layout_list.update_dialogs();
}
static void cb_w_layout_menu_storage3(Fl_Menu_*, void*) {
fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
- suite.storage(fld::Tool_Store::FILE);
+ suite.storage(FLD_TOOL_STORE_FILE);
Fluid.layout_list.update_dialogs();
}
@@ -895,9 +895,9 @@ static void cb_w_settings_shell_list(Fl_Browser* o, void* v) {
for (int i=0; i<g_shell_config->list_size; i++) {
Fd_Shell_Command *cmd = g_shell_config->list[i];
o->add(cmd->name.c_str());
- if (cmd->storage == fld::Tool_Store::USER)
+ if (cmd->storage == FLD_TOOL_STORE_USER)
o->icon(i+1, w_settings_shell_fd_user->image());
- else if (cmd->storage == fld::Tool_Store::PROJECT)
+ else if (cmd->storage == FLD_TOOL_STORE_PROJECT)
o->icon(i+1, w_settings_shell_fd_project->image());
}
}
@@ -930,9 +930,9 @@ static void cb_a(Fl_Button*, void* v) {
w_settings_shell_list->insert(selected+1, cmd->name.c_str());
w_settings_shell_list->deselect();
w_settings_shell_list->value(selected+1);
- if (cmd->storage == fld::Tool_Store::USER) {
+ if (cmd->storage == FLD_TOOL_STORE_USER) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image());
- } else if (cmd->storage == fld::Tool_Store::PROJECT) {
+ } else if (cmd->storage == FLD_TOOL_STORE_PROJECT) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image());
Fluid.proj.set_modflag(1);
}
@@ -960,9 +960,9 @@ static void cb_w_settings_shell_dup(Fl_Button* o, void* v) {
w_settings_shell_list->insert(selected+1, cmd->name.c_str());
w_settings_shell_list->deselect();
w_settings_shell_list->value(selected+1);
- if (cmd->storage == fld::Tool_Store::USER) {
+ if (cmd->storage == FLD_TOOL_STORE_USER) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image());
- } else if (cmd->storage == fld::Tool_Store::PROJECT) {
+ } else if (cmd->storage == FLD_TOOL_STORE_PROJECT) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image());
Fluid.proj.set_modflag(1);
}
@@ -988,7 +988,7 @@ static void cb_w_settings_shell_remove(Fl_Button* o, void* v) {
int ret = fl_choice("Delete the shell command\n\"%s\"?\n\nThis can not be undone.",
"Delete", "Cancel", nullptr, g_shell_config->list[selected-1]->name.c_str());
if (ret==1) return;
- if (g_shell_config->at(selected-1)->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (g_shell_config->at(selected-1)->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
g_shell_config->remove(selected-1);
w_settings_shell_list->remove(selected);
if (selected <= w_settings_shell_list->size())
@@ -1073,7 +1073,7 @@ static void cb_Name(Fl_Input* o, void* v) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->name = o->value();
w_settings_shell_list->text(selected, o->value());
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1091,7 +1091,7 @@ static void cb_Menu(Fl_Input* o, void* v) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->label = o->value();
cmd->update_shell_menu();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1114,7 +1114,7 @@ static void cb_Shortcut(Fl_Shortcut_Button* o, void* v) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->shortcut = o->value();
cmd->update_shell_menu();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1126,27 +1126,27 @@ static void cb_Store(Fl_Choice* o, void* v) {
fld::Tool_Store ts = g_shell_config->list[selected-1]->storage;
o->value(o->find_item_with_argument((long)ts));
} else {
- o->value(o->find_item_with_argument((long)fld::Tool_Store::USER));
+ o->value(o->find_item_with_argument((long)FLD_TOOL_STORE_USER));
}
} else {
if (selected) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
fld::Tool_Store ts = (fld::Tool_Store)(o->mvalue()->argument());
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
cmd->storage = ts;
//w_settings_shell_list->text(selected, cmd->name.c_str());
- if (cmd->storage == fld::Tool_Store::USER)
+ if (cmd->storage == FLD_TOOL_STORE_USER)
w_settings_shell_list->icon(selected, w_settings_shell_fd_user->image());
- else if (cmd->storage == fld::Tool_Store::PROJECT)
+ else if (cmd->storage == FLD_TOOL_STORE_PROJECT)
w_settings_shell_list->icon(selected, w_settings_shell_fd_project->image());
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
Fl_Menu_Item menu_Store[] = {
- {"@fd_user User Setting", 0, 0, (void*)(fld::Tool_Store::USER), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0},
- {"@fd_project Project File", 0, 0, (void*)(fld::Tool_Store::PROJECT), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0},
+ {"@fd_user User Setting", 0, 0, (void*)(FLD_TOOL_STORE_USER), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0},
+ {"@fd_project Project File", 0, 0, (void*)(FLD_TOOL_STORE_PROJECT), 0, (uchar)FL_NORMAL_LABEL, 0, 12, 0},
{0,0,0,0,0,0,0,0,0}
};
@@ -1165,7 +1165,7 @@ static void cb_Condition(Fl_Choice* o, void* v) {
int cond = (int)(o->mvalue()->argument());
cmd->condition = cond;
g_shell_config->rebuild_shell_menu();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1202,7 +1202,7 @@ static void cb_w_settings_shell_command(Fl_Text_Editor* o, void* v) {
if (selected) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->command = o->buffer()->text();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1281,7 +1281,7 @@ static void cb_save(Fl_Check_Button* o, void* v) {
} else {
cmd->flags &= ~Fd_Shell_Command::SAVE_PROJECT;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1303,7 +1303,7 @@ static void cb_save1(Fl_Check_Button* o, void* v) {
} else {
cmd->flags &= ~Fd_Shell_Command::SAVE_SOURCECODE;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1325,7 +1325,7 @@ static void cb_save2(Fl_Check_Button* o, void* v) {
} else {
cmd->flags &= ~Fd_Shell_Command::SAVE_STRINGS;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1347,7 +1347,7 @@ static void cb_show(Fl_Check_Button* o, void* v) {
} else {
cmd->flags &= ~Fd_Shell_Command::DONT_SHOW_TERMINAL;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1369,7 +1369,7 @@ static void cb_clear(Fl_Check_Button* o, void* v) {
} else {
cmd->flags &= ~Fd_Shell_Command::CLEAR_TERMINAL;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -1391,7 +1391,7 @@ static void cb_clear1(Fl_Check_Button* o, void* v) {
} else {
cmd->flags &= ~Fd_Shell_Command::CLEAR_HISTORY;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}
}
@@ -2465,8 +2465,8 @@ static void cb_Reset(Fl_Button* o, void* v) {
static void cb_Close(Fl_Button*, void*) {
if (g_shell_config)
- g_shell_config->write(Fluid.preferences, fld::Tool_Store::USER);
- Fluid.layout_list.write(Fluid.preferences, fld::Tool_Store::USER);
+ g_shell_config->write(Fluid.preferences, FLD_TOOL_STORE_USER);
+ Fluid.layout_list.write(Fluid.preferences, FLD_TOOL_STORE_USER);
settings_window->hide();
}
diff --git a/fluid/panels/settings_panel.fl b/fluid/panels/settings_panel.fl
index 483bb650e..abc0ade2f 100644
--- a/fluid/panels/settings_panel.fl
+++ b/fluid/panels/settings_panel.fl
@@ -513,7 +513,7 @@ Fluid.layout_list.update_dialogs();}
Fl_Menu_Button w_layout_menu {
callback {if (v == LOAD) {
fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
- if (suite.storage_ == fld::Tool_Store::INTERNAL) {
+ if (suite.storage_ == FLD_TOOL_STORE_INTERNAL) {
w_layout_menu_rename->deactivate();
for (int i=1; i<4; i++) w_layout_menu_storage[i]->deactivate();
w_layout_menu_delete->deactivate();
@@ -542,28 +542,28 @@ Fluid.layout_list.update_dialogs();}
MenuItem {w_layout_menu_storage[0]} {
label {@fd_beaker FLUID Built-In}
callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
-suite.storage(fld::Tool_Store::INTERNAL);
+suite.storage(FLD_TOOL_STORE_INTERNAL);
Fluid.layout_list.update_dialogs();}
xywh {0 0 31 20} type Radio deactivate
}
MenuItem {w_layout_menu_storage[1]} {
label {@fd_user User Preference}
callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
-suite.storage(fld::Tool_Store::USER);
+suite.storage(FLD_TOOL_STORE_USER);
Fluid.layout_list.update_dialogs();}
xywh {0 0 31 20} type Radio
}
MenuItem {w_layout_menu_storage[2]} {
label {@fd_project Store in .fl Project File}
callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
-suite.storage(fld::Tool_Store::PROJECT);
+suite.storage(FLD_TOOL_STORE_PROJECT);
Fluid.layout_list.update_dialogs();}
xywh {0 0 31 20} type Radio
}
MenuItem {w_layout_menu_storage[3]} {
label {@fd_file Store in External File}
callback {fld::app::Layout_Suite &suite = Fluid.layout_list[Fluid.layout_list.current_suite()];
-suite.storage(fld::Tool_Store::FILE);
+suite.storage(FLD_TOOL_STORE_FILE);
Fluid.layout_list.update_dialogs();}
xywh {0 0 31 20} type Radio divider
}
@@ -932,9 +932,9 @@ list:}
for (int i=0; i<g_shell_config->list_size; i++) {
Fd_Shell_Command *cmd = g_shell_config->list[i];
o->add(cmd->name.c_str());
- if (cmd->storage == fld::Tool_Store::USER)
+ if (cmd->storage == FLD_TOOL_STORE_USER)
o->icon(i+1, w_settings_shell_fd_user->image());
- else if (cmd->storage == fld::Tool_Store::PROJECT)
+ else if (cmd->storage == FLD_TOOL_STORE_PROJECT)
o->icon(i+1, w_settings_shell_fd_project->image());
}
}
@@ -966,9 +966,9 @@ list:}
w_settings_shell_list->insert(selected+1, cmd->name.c_str());
w_settings_shell_list->deselect();
w_settings_shell_list->value(selected+1);
- if (cmd->storage == fld::Tool_Store::USER) {
+ if (cmd->storage == FLD_TOOL_STORE_USER) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image());
- } else if (cmd->storage == fld::Tool_Store::PROJECT) {
+ } else if (cmd->storage == FLD_TOOL_STORE_PROJECT) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image());
Fluid.proj.set_modflag(1);
}
@@ -995,9 +995,9 @@ if (v==LOAD) {
w_settings_shell_list->insert(selected+1, cmd->name.c_str());
w_settings_shell_list->deselect();
w_settings_shell_list->value(selected+1);
- if (cmd->storage == fld::Tool_Store::USER) {
+ if (cmd->storage == FLD_TOOL_STORE_USER) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_user->image());
- } else if (cmd->storage == fld::Tool_Store::PROJECT) {
+ } else if (cmd->storage == FLD_TOOL_STORE_PROJECT) {
w_settings_shell_list->icon(selected+1, w_settings_shell_fd_project->image());
Fluid.proj.set_modflag(1);
}
@@ -1022,7 +1022,7 @@ if (v==LOAD) {
int ret = fl_choice("Delete the shell command\\n\\"%s\\"?\\n\\nThis can not be undone.",
"Delete", "Cancel", nullptr, g_shell_config->list[selected-1]->name.c_str());
if (ret==1) return;
- if (g_shell_config->at(selected-1)->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (g_shell_config->at(selected-1)->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
g_shell_config->remove(selected-1);
w_settings_shell_list->remove(selected);
if (selected <= w_settings_shell_list->size())
@@ -1124,7 +1124,7 @@ if (v == LOAD) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->name = o->value();
w_settings_shell_list->text(selected, o->value());
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {file the shell command under this name in the shell command list} xywh {110 246 230 20} labelfont 1 labelsize 12 when 13 textfont 4 textsize 12
@@ -1143,7 +1143,7 @@ if (v == LOAD) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->label = o->value();
cmd->update_shell_menu();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {label text for the Shell menu in the main menu bar} xywh {110 272 230 20} labelfont 1 labelsize 12 textfont 4 textsize 12
@@ -1167,7 +1167,7 @@ if (v == LOAD) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->shortcut = o->value();
cmd->update_shell_menu();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {an optional keyboard shortcut to run this shell command} xywh {110 297 130 20} labelsize 12 align 16
@@ -1182,32 +1182,32 @@ if (v == LOAD) {
fld::Tool_Store ts = g_shell_config->list[selected-1]->storage;
o->value(o->find_item_with_argument((long)ts));
} else {
- o->value(o->find_item_with_argument((long)fld::Tool_Store::USER));
+ o->value(o->find_item_with_argument((long)FLD_TOOL_STORE_USER));
}
} else {
if (selected) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
fld::Tool_Store ts = (fld::Tool_Store)(o->mvalue()->argument());
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
cmd->storage = ts;
//w_settings_shell_list->text(selected, cmd->name.c_str());
- if (cmd->storage == fld::Tool_Store::USER)
+ if (cmd->storage == FLD_TOOL_STORE_USER)
w_settings_shell_list->icon(selected, w_settings_shell_fd_user->image());
- else if (cmd->storage == fld::Tool_Store::PROJECT)
+ else if (cmd->storage == FLD_TOOL_STORE_PROJECT)
w_settings_shell_list->icon(selected, w_settings_shell_fd_project->image());
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}} open
tooltip {store this shell command as a user setting or save it with the .fl project file} xywh {110 322 130 20} down_box BORDER_BOX labelfont 1 labelsize 12 textsize 12
} {
MenuItem {} {
label {@fd_user User Setting}
- user_data {fld::Tool_Store::USER} user_data_type long
+ user_data {FLD_TOOL_STORE_USER} user_data_type long
xywh {0 0 100 20} labelsize 12
}
MenuItem {} {
label {@fd_project Project File}
- user_data {fld::Tool_Store::PROJECT} user_data_type long
+ user_data {FLD_TOOL_STORE_PROJECT} user_data_type long
xywh {0 0 100 20} labelsize 12
}
}
@@ -1227,7 +1227,7 @@ if (v == LOAD) {
int cond = (int)(o->mvalue()->argument());
cmd->condition = cond;
g_shell_config->rebuild_shell_menu();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}} open
tooltip {add this command to the main menu bar only if this condition is true} xywh {110 348 130 20} down_box BORDER_BOX labelfont 1 labelsize 12 textsize 12
@@ -1293,7 +1293,7 @@ if (v == LOAD) {
if (selected) {
Fd_Shell_Command *cmd = g_shell_config->list[selected-1];
cmd->command = o->buffer()->text();
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
xywh {110 373 208 80} labelfont 1 labelsize 12 align 4 textfont 4 textsize 12 resizable
@@ -1414,7 +1414,7 @@ if (v == LOAD) {
} else {
cmd->flags &= ~Fd_Shell_Command::SAVE_PROJECT;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {save the project to the .fl file before running the command} xywh {110 458 110 20} down_box DOWN_BOX labelsize 12
@@ -1437,7 +1437,7 @@ if (v == LOAD) {
} else {
cmd->flags &= ~Fd_Shell_Command::SAVE_SOURCECODE;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {generate the source code and header file before running the command} xywh {110 478 110 19} down_box DOWN_BOX labelsize 12
@@ -1460,7 +1460,7 @@ if (v == LOAD) {
} else {
cmd->flags &= ~Fd_Shell_Command::SAVE_STRINGS;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {save the internationalisation strings before running the command} xywh {110 498 110 20} down_box DOWN_BOX labelsize 12
@@ -1483,7 +1483,7 @@ if (v == LOAD) {
} else {
cmd->flags &= ~Fd_Shell_Command::DONT_SHOW_TERMINAL;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {show the terminal window when launching this script} xywh {229 458 106 20} down_box DOWN_BOX labelsize 12
@@ -1506,7 +1506,7 @@ if (v == LOAD) {
} else {
cmd->flags &= ~Fd_Shell_Command::CLEAR_TERMINAL;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {clear the teminal window before running this script} xywh {229 478 106 19} down_box DOWN_BOX labelsize 12
@@ -1529,7 +1529,7 @@ if (v == LOAD) {
} else {
cmd->flags &= ~Fd_Shell_Command::CLEAR_HISTORY;
}
- if (cmd->storage == fld::Tool_Store::PROJECT) Fluid.proj.set_modflag(1);
+ if (cmd->storage == FLD_TOOL_STORE_PROJECT) Fluid.proj.set_modflag(1);
}
}}
tooltip {clear the teminal history in the terminal window} xywh {229 498 106 19} down_box DOWN_BOX labelsize 12
@@ -1880,8 +1880,8 @@ widget_browser->save_prefs();}
Fl_Button {} {
label Close
callback {if (g_shell_config)
- g_shell_config->write(Fluid.preferences, fld::Tool_Store::USER);
-Fluid.layout_list.write(Fluid.preferences, fld::Tool_Store::USER);
+ g_shell_config->write(Fluid.preferences, FLD_TOOL_STORE_USER);
+Fluid.layout_list.write(Fluid.preferences, FLD_TOOL_STORE_USER);
settings_window->hide();}
tooltip {Close this dialog.} xywh {230 550 120 25}
}
diff --git a/fluid/panels/widget_panel.cxx b/fluid/panels/widget_panel.cxx
index a6f4129ae..195ddc533 100644
--- a/fluid/panels/widget_panel.cxx
+++ b/fluid/panels/widget_panel.cxx
@@ -127,7 +127,7 @@ fld::widget::Formula_Input *image_panel_imagew=(fld::widget::Formula_Input *)0;
static void cb_image_panel_imagew(fld::widget::Formula_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~--~=---~-~=-=~~~-~~- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_image_w_);
}
} else {
@@ -159,7 +159,7 @@ fld::widget::Formula_Input *image_panel_imageh=(fld::widget::Formula_Input *)0;
static void cb_image_panel_imageh(fld::widget::Formula_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-~=-~~-=-=~~~--~----= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_image_h_);
}
} else {
@@ -200,7 +200,7 @@ static void cb_Reset(Fl_Button*, void* v) {
static void cb_convert(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback --~~=-=-~-~--=---~-=~= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(!current_widget->compress_image_);
} else {
@@ -220,7 +220,7 @@ static void cb_convert(Fl_Check_Button* o, void* v) {
static void cb_bind(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~~~~-=~=~---~--~~~~~= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(current_widget->bind_image_);
} else {
@@ -267,7 +267,7 @@ fld::widget::Formula_Input *image_panel_deimagew=(fld::widget::Formula_Input *)0
static void cb_image_panel_deimagew(fld::widget::Formula_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~--=~=~=~=~-=~--=~~=- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_deimage_w_);
}
} else {
@@ -299,7 +299,7 @@ fld::widget::Formula_Input *image_panel_deimageh=(fld::widget::Formula_Input *)0
static void cb_image_panel_deimageh(fld::widget::Formula_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~=-=---~-~~-=-=~-~--- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_deimage_h_);
}
} else {
@@ -340,7 +340,7 @@ static void cb_Reset1(Fl_Button*, void* v) {
static void cb_convert1(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~-==--~~-~~=~-==~-~-- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(!current_widget->compress_deimage_);
} else {
@@ -360,7 +360,7 @@ static void cb_convert1(Fl_Check_Button* o, void* v) {
static void cb_bind1(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ---=--~-=--~-~~~-=-=~= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(current_widget->bind_deimage_);
} else {
@@ -580,14 +580,14 @@ void run_image_panel() {
void flex_margin_cb(Fl_Value_Input* i, void* v, void (*load_margin)(Fl_Flex*,Fl_Value_Input*), int (*update_margin)(Fl_Flex*,int)) {
//fl ▼ ------------------------ code ------=--~--~=-~-~~~~~-= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Flex)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Flex)) {
load_margin((Fl_Flex*)current_widget->o, i);
}
} else {
int mod = 0;
int new_value = (int)i->value();
for (Node *o = Fluid.proj.tree.first; o; o = o->next) {
- if (o->selected && o->is_a(Type::Flex)) {
+ if (o->selected && o->is_a(FLD_NODE_TYPE_Flex)) {
Flex_Node* q = (Flex_Node*)o;
Fl_Flex* w = (Fl_Flex*)q->o;
if (update_margin(w, new_value)) {
@@ -627,7 +627,7 @@ Fl_Input *widget_image_input=(Fl_Input *)0;
static void cb_widget_image_input(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback --~-------=~=~~==~-=~~ ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(((Widget_Node*)current_widget)->image_name().c_str());
} else o->deactivate();
@@ -645,7 +645,7 @@ static void cb_widget_image_input(Fl_Input* o, void* v) {
static void cb_Browse(Fl_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~-~-=~~=~~-=--~=--~-~ ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window))
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window))
o->activate();
else
o->deactivate();
@@ -677,7 +677,7 @@ Fl_Input *widget_deimage_input=(Fl_Input *)0;
static void cb_widget_deimage_input(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~=-~=-=-------~-~~-=~ ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(((Widget_Node*)current_widget)->inactive_name().c_str());
} else o->deactivate();
@@ -695,7 +695,7 @@ static void cb_widget_deimage_input(Fl_Input* o, void* v) {
static void cb_Browse1(Fl_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~-=~=~~-~=~~-=~~---~~ ▼ fl//
if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window))
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window))
o->activate();
else
o->deactivate();
@@ -881,7 +881,7 @@ static void cb_widget_h_input(fld::widget::Formula_Input* o, void* v) {
static void cb_Children(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback ---=-=-~=-~=~=~-~=~-~- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Widget_Class)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Widget_Class)) {
o->show();
o->value(((Widget_Class_Node *)current_widget)->wc_relative);
} else {
@@ -891,7 +891,7 @@ static void cb_Children(Fl_Choice* o, void* v) {
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Widget_Class)) {
+ if (q->is_a(FLD_NODE_TYPE_Widget_Class)) {
Widget_Class_Node *t = (Widget_Class_Node *)q;
t->wc_relative = o->value();
mod = 1;
@@ -1004,9 +1004,9 @@ Fl_Group *wp_gui_values=(Fl_Group *)0;
static void cb_wp_gui_values(Fl_Group* o, void* v) {
//fl ▼ ---------------------- callback ~~~~=~-=-==~--~=~==-~- ▼ fl//
if (v == LOAD) {
- if ( current_widget->is_a(Type::Flex)
- || current_widget->is_a(Type::Grid)
- || current_widget->is_a(Type::Window))
+ if ( current_widget->is_a(FLD_NODE_TYPE_Flex)
+ || current_widget->is_a(FLD_NODE_TYPE_Grid)
+ || current_widget->is_a(FLD_NODE_TYPE_Window))
{
o->hide();
} else {
@@ -1020,7 +1020,7 @@ static void cb_wp_gui_values(Fl_Group* o, void* v) {
static void cb_Size(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~~-~~-=~=~-~~---==--~ ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Slider)) {o->deactivate(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Slider)) {o->deactivate(); return;}
o->activate();
o->value(((Fl_Slider*)(current_widget->o))->slider_size());
} else {
@@ -1028,7 +1028,7 @@ static void cb_Size(Fl_Value_Input* o, void* v) {
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Slider)) {
+ if (q->is_a(FLD_NODE_TYPE_Slider)) {
((Fl_Slider*)(q->o))->slider_size(n);
q->o->redraw();
mod = 1;
@@ -1042,10 +1042,10 @@ static void cb_Size(Fl_Value_Input* o, void* v) {
static void cb_Minimum(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback -~-=~~-=-=-=~=~==-~~~- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->minimum());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->minimum());
} else {
@@ -1057,11 +1057,11 @@ static void cb_Minimum(Fl_Value_Input* o, void* v) {
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->minimum(n);
q->o->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->minimum(n);
q->o->redraw();
mod = 1;
@@ -1075,10 +1075,10 @@ static void cb_Minimum(Fl_Value_Input* o, void* v) {
static void cb_Maximum(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-~-=~=-=-~-=-~-~=---= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->maximum());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->maximum());
} else {
@@ -1090,11 +1090,11 @@ static void cb_Maximum(Fl_Value_Input* o, void* v) {
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->maximum(n);
q->o->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->maximum(n);
q->o->redraw();
mod = 1;
@@ -1108,10 +1108,10 @@ static void cb_Maximum(Fl_Value_Input* o, void* v) {
static void cb_Step(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback --~-=~-~=~~~~~-~=--~~= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->step());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->step());
} else {
@@ -1123,11 +1123,11 @@ static void cb_Step(Fl_Value_Input* o, void* v) {
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->step(n);
q->o->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->step(n);
q->o->redraw();
mod = 1;
@@ -1141,13 +1141,13 @@ static void cb_Step(Fl_Value_Input* o, void* v) {
static void cb_Value(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback --=-=-~--~-~-~-~~=-~~~ ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->value());
} else if (current_widget->is_button()) {
o->activate();
o->value(((Fl_Button*)(current_widget->o))->value());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->value());
} else
@@ -1157,14 +1157,14 @@ static void cb_Value(Fl_Value_Input* o, void* v) {
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->value(n);
mod = 1;
} else if (q->is_button()) {
((Fl_Button*)(q->o))->value(n != 0);
- if (q->is_a(Type::Menu_Item)) q->redraw();
+ if (q->is_a(FLD_NODE_TYPE_Menu_Item)) q->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->value(n);
mod = 1;
}
@@ -1179,7 +1179,7 @@ Fl_Group *wp_gui_margins=(Fl_Group *)0;
static void cb_wp_gui_margins(Fl_Group* o, void* v) {
//fl ▼ ---------------------- callback ---~~==--~-~=~~--==~~- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Flex)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Flex)) {
o->show();
propagate_load(o, v);
} else {
@@ -1312,7 +1312,7 @@ Fl_Group *wp_gui_sizerange=(Fl_Group *)0;
static void cb_wp_gui_sizerange(Fl_Group* o, void* v) {
//fl ▼ ---------------------- callback ~~-==-=~--=-=~-~-~-=-~ ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Window)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->show();
propagate_load(o, v);
} else {
@@ -1325,14 +1325,14 @@ static void cb_wp_gui_sizerange(Fl_Group* o, void* v) {
static void cb_Minimum1(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-=~=-~-~==~~-~~~-~--= ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_min_w);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_min_w = n;
mod = 1;
}
@@ -1345,14 +1345,14 @@ static void cb_Minimum1(Fl_Value_Input* o, void* v) {
static void cb_1(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-~-=~~=~-=-~==-=~-=-= ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_min_h);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_min_h = n;
mod = 1;
}
@@ -1369,7 +1369,7 @@ static void cb_set(Fl_Button* o, void* v) {
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
Window_Node *win = (Window_Node*)q;
win->sr_min_w = win->o->w();
win->sr_min_h = win->o->h();
@@ -1385,14 +1385,14 @@ static void cb_set(Fl_Button* o, void* v) {
static void cb_Maximum1(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~~~-=~=-~--=~=~-~=~=~ ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_max_w);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_max_w = n;
mod = 1;
}
@@ -1405,14 +1405,14 @@ static void cb_Maximum1(Fl_Value_Input* o, void* v) {
static void cb_2(Fl_Value_Input* o, void* v) {
//fl ▼ ---------------------- callback -~~~~=~==-~~~=-~=-~~~~ ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_max_h);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_max_h = n;
mod = 1;
}
@@ -1429,7 +1429,7 @@ static void cb_set1(Fl_Button* o, void* v) {
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
Window_Node *win = (Window_Node*)q;
win->sr_max_w = win->o->w();
win->sr_max_h = win->o->h();
@@ -1449,11 +1449,11 @@ static void cb_wp_gui_shortcut(Fl_Shortcut_Button* o, void* v) {
if (v == LOAD) {
if (current_widget->is_button())
o->value( ((Fl_Button*)(current_widget->o))->shortcut() );
- else if (current_widget->is_a(Type::Input))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Input))
o->value( ((Fl_Input_*)(current_widget->o))->shortcut() );
- else if (current_widget->is_a(Type::Value_Input))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Value_Input))
o->value( ((Fl_Value_Input*)(current_widget->o))->shortcut() );
- else if (current_widget->is_a(Type::Text_Display))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Text_Display))
o->value( ((Fl_Text_Display*)(current_widget->o))->shortcut() );
else {
o->hide();
@@ -1471,16 +1471,16 @@ static void cb_wp_gui_shortcut(Fl_Shortcut_Button* o, void* v) {
Fl_Button* b = (Fl_Button*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
- if (q->is_a(Type::Menu_Item)) q->redraw();
- } else if (q->is_a(Type::Input)) {
+ if (q->is_a(FLD_NODE_TYPE_Menu_Item)) q->redraw();
+ } else if (q->is_a(FLD_NODE_TYPE_Input)) {
Fl_Input_* b = (Fl_Input_*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
- } else if (q->is_a(Type::Value_Input)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Value_Input)) {
Fl_Value_Input* b = (Fl_Value_Input*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
- } else if (q->is_a(Type::Text_Display)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Text_Display)) {
Fl_Text_Display* b = (Fl_Text_Display*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
@@ -1495,7 +1495,7 @@ Fl_Group *wp_gui_xclass=(Fl_Group *)0;
static void cb_3(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-~=~-~~=~~~-~~-~~~~-= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Window)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->show();
o->parent()->show();
o->value(((Window_Node *)current_widget)->xclass);
@@ -1507,7 +1507,7 @@ static void cb_3(Fl_Input* o, void* v) {
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
mod = 1;
Window_Node *wt = (Window_Node *)q;
storestring(o->value(), wt->xclass);
@@ -1522,7 +1522,7 @@ static void cb_3(Fl_Input* o, void* v) {
static void cb_Border(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback -~-=~-=~~-~~-=-~--~~-= ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) {o->hide(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) {o->hide(); return;}
o->show();
o->value(((Fl_Window*)(current_widget->o))->border());
} else {
@@ -1536,7 +1536,7 @@ static void cb_Border(Fl_Light_Button* o, void* v) {
static void cb_Modal(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback ~---~~~=~==~-=-=~=-=-- ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) {o->hide(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) {o->hide(); return;}
o->show();
o->value(((Window_Node *)current_widget)->modal);
} else {
@@ -1550,7 +1550,7 @@ static void cb_Modal(Fl_Light_Button* o, void* v) {
static void cb_Nonmodal(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~~~-~~=~=~=---~-=~~~- ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) {o->hide(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) {o->hide(); return;}
o->show();
o->value(((Window_Node *)current_widget)->non_modal);
} else {
@@ -1567,7 +1567,7 @@ static void cb_Visible(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback ~-~~=-~-~==--~=-~~=-=- ▼ fl//
if (v == LOAD) {
o->value(current_widget->o->visible());
- if (current_widget->is_a(Type::Window)) o->deactivate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) o->deactivate();
else o->activate();
} else {
int mod = 0;
@@ -1580,9 +1580,9 @@ static void cb_Visible(Fl_Light_Button* o, void* v) {
n ? q->o->show() : q->o->hide();
q->redraw();
if (n && q->parent && q->parent->type_name()) {
- if (q->parent->is_a(Type::Tabs)) {
+ if (q->parent->is_a(FLD_NODE_TYPE_Tabs)) {
((Fl_Tabs *)q->o->parent())->value(q->o);
- } else if (q->parent->is_a(Type::Wizard)) {
+ } else if (q->parent->is_a(FLD_NODE_TYPE_Wizard)) {
((Fl_Wizard *)q->o->parent())->value(q->o);
}
}
@@ -1599,7 +1599,7 @@ static void cb_Active(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~-~--~--=~=~~--~-=~~~ ▼ fl//
if (v == LOAD) {
o->value(current_widget->o->active());
- if (current_widget->is_a(Type::Window)) o->deactivate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) o->deactivate();
else o->activate();
} else {
int mod = 0;
@@ -1620,7 +1620,7 @@ static void cb_Active(Fl_Light_Button* o, void* v) {
static void cb_Resizable(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~=-=~-==~=~~----=-=~= ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->hide();
return;
}
@@ -1642,7 +1642,7 @@ static void cb_Resizable(Fl_Light_Button* o, void* v) {
static void cb_Headline(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback -~--~=~-=~-=~--=~~---- ▼ fl//
if (v == LOAD) {
- if (!current_widget->is_a(Type::Menu_Item)) {
+ if (!current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->hide();
return;
}
@@ -1652,7 +1652,7 @@ static void cb_Headline(Fl_Light_Button* o, void* v) {
int mod = 0;
int n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Menu_Item)) {
+ if (q->is_a(FLD_NODE_TYPE_Menu_Item)) {
if (!mod) {
mod = 1;
Fluid.proj.undo.checkpoint();
@@ -1670,21 +1670,21 @@ static void cb_Hotspot(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~=-~-=~=-=~-~-=~=~~-= ▼ fl//
if (v == LOAD) {
if (numselected > 1) {o->deactivate(); return;}
- if (current_widget->is_a(Type::Menu_Item)) o->label("divider");
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) o->label("divider");
else o->label("hotspot");
o->activate();
o->value(current_widget->hotspot());
} else {
Fluid.proj.undo.checkpoint();
current_widget->hotspot(o->value());
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
current_widget->redraw();
return;
}
if (o->value()) {
Node *p = current_widget->parent;
if (!p || !p->is_widget()) return;
- while (!p->is_a(Type::Window)) p = p->parent;
+ while (!p->is_a(FLD_NODE_TYPE_Window)) p = p->parent;
for (Node *q = p->next; q && q->level > p->level; q = q->next) {
if (q->is_widget() && q != current_widget)
((Widget_Node*)q)->hotspot(0);
@@ -1799,7 +1799,7 @@ Fl_Group *wp_style_box=(Fl_Group *)0;
static void cb_7(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback ~-~--~-~~=--~~=-=---=- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {o->deactivate(); return;} else o->activate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {o->deactivate(); return;} else o->activate();
int n = current_widget->o->box();
if (!n) n = ZERO_ENTRY;
for (int j = 0; j < 72 /*int(sizeof(boxmenu)/sizeof(*boxmenu))*/; j++)
@@ -1826,7 +1826,7 @@ static void cb_w_color(Fl_Button* o, void* v) {
//fl ▼ ---------------------- callback --=---~=~--~~-=~--~~~- ▼ fl//
Fl_Color c = current_widget->o->color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
} else {
o->activate();
@@ -1847,7 +1847,7 @@ static void cb_8(Fl_Menu_Button* o, void* v) {
//fl ▼ ---------------------- callback ---~-~~==--==--=~-=--= ▼ fl//
Fl_Color c = current_widget->o->color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {o->deactivate(); return;} else o->activate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {o->deactivate(); return;} else o->activate();
} else {
Fl_Color d = (Fl_Color)(o->mvalue()->argument());
if (d == c) return;
@@ -1866,11 +1866,11 @@ static void cb_9(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback -~-=----~-~-~==-=--=~= ▼ fl//
if (v == LOAD) {
int n;
- if (current_widget->is_a(Type::Button))
+ if (current_widget->is_a(FLD_NODE_TYPE_Button))
n = ((Fl_Button*)(current_widget->o))->down_box();
- else if (current_widget->is_a(Type::Input_Choice))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Input_Choice))
n = ((Fl_Input_Choice*)(current_widget->o))->down_box();
- else if (current_widget->is_a(Type::Menu_Manager_))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Menu_Manager_))
n = ((Fl_Menu_*)(current_widget->o))->down_box();
else {
o->deactivate(); return;
@@ -1886,12 +1886,12 @@ static void cb_9(Fl_Choice* o, void* v) {
if (!n) return; // should not happen
if (n == ZERO_ENTRY) n = 0;
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Button)) {
+ if (q->is_a(FLD_NODE_TYPE_Button)) {
((Fl_Button*)(q->o))->down_box((Fl_Boxtype)n);
if (((Fl_Button*)(q->o))->value()) q->redraw();
- } else if (q->is_a(Type::Input_Choice)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Input_Choice)) {
((Fl_Input_Choice*)(q->o))->down_box((Fl_Boxtype)n);
- } else if (q->is_a(Type::Menu_Manager_)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Menu_Manager_)) {
((Fl_Menu_*)(q->o))->down_box((Fl_Boxtype)n);
}
mod = 1;
@@ -1907,7 +1907,7 @@ static void cb_w_selectcolor(Fl_Button* o, void* v) {
//fl ▼ ---------------------- callback --~~~-=~~-=--~~~~-=~~~ ▼ fl//
Fl_Color c = current_widget->o->selection_color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
return;
} else {
@@ -1929,7 +1929,7 @@ static void cb_a(Fl_Menu_Button* o, void* v) {
//fl ▼ ---------------------- callback -~~=~~-~-~-~~~~=--~~=~ ▼ fl//
Fl_Color c = current_widget->o->selection_color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
return;
} else {
@@ -2133,7 +2133,7 @@ static void cb_Compact(Fl_Light_Button* o, void* v) {
//fl ▼ ---------------------- callback ~-~-=~-~-==~=-~~=--=-= ▼ fl//
if (v == LOAD) {
uchar n;
- if (current_widget->is_a(Type::Button) && !current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Button) && !current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
n = ((Fl_Button*)(current_widget->o))->compact();
o->value(n);
o->show();
@@ -2144,7 +2144,7 @@ static void cb_Compact(Fl_Light_Button* o, void* v) {
int mod = 0;
uchar n = (uchar)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Button) && !q->is_a(Type::Menu_Item)) {
+ if (q->is_a(FLD_NODE_TYPE_Button) && !q->is_a(FLD_NODE_TYPE_Menu_Item)) {
uchar v = ((Fl_Button*)(q->o))->compact();
if (n != v) {
if (!mod) {
@@ -2168,7 +2168,7 @@ Fl_Group *wp_cpp_class=(Fl_Group *)0;
static void cb_e(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-~=~--~--~-~-~=-~~-~~ ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
} else {
o->activate();
@@ -2203,7 +2203,7 @@ static void cb_f(Fl_Choice* o, void* v) {
int j;
for (j = 0;; j++) {
if (!m[j].text) {j = 0; break;}
- if (current_widget->is_a(Type::Spinner)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
if (m[j].argument() == ((Fl_Spinner*)current_widget->o)->type()) break;
} else {
if (m[j].argument() == current_widget->o->type()) break;
@@ -2219,9 +2219,9 @@ static void cb_f(Fl_Choice* o, void* v) {
Fl_Menu_Item* m = current_widget->subtypes();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
if (q->subtypes()==m) {
- if (q->is_a(Type::Spinner))
+ if (q->is_a(FLD_NODE_TYPE_Spinner))
((Fl_Spinner*)q->o)->type(n);
- else if (q->is_a(Type::Flex))
+ else if (q->is_a(FLD_NODE_TYPE_Flex))
((Flex_Node*)q)->change_subtype_to(n);
else
q->o->type(n);
@@ -2414,7 +2414,7 @@ static void cb_13(Fl_Input* o, void* v) {
static void cb_When(Fl_Menu_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~=--==-~-=~=~~==-~-~- ▼ fl//
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {o->deactivate(); return;} else o->activate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {o->deactivate(); return;} else o->activate();
int n = current_widget->o->when();
set_whenmenu(n);
w_when_box->copy_label(when_symbol_name(n));
@@ -2496,7 +2496,7 @@ Fl_Tabs *data_tabs=(Fl_Tabs *)0;
static void cb_data_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback -~-==~-~-~-~-=-~~-~==- ▼ fl//
- if (current_node && current_node->is_a(Type::Data))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_Data))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------~=~~=-~~-==-----------~-=~=~~=--~--==~=-=~=- ▲ fl//
}
@@ -2505,7 +2505,7 @@ Fl_Group *data_tabs_data=(Fl_Group *)0;
static void cb_15(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback --~~-==-=~-==-~-~-~~-= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Data)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2537,7 +2537,7 @@ Fl_Menu_Item menu_5[] = {
static void cb_16(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback ~-=~-=--~~-=--=~~~=-=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Data)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2568,7 +2568,7 @@ Fl_Menu_Item menu_6[] = {
static void cb_17(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback -~=---~-=~=---=~~~=--= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Data)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2594,7 +2594,7 @@ Fl_Menu_Item menu_7[] = {
static void cb_Name(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~-~~~-~=~~~=~-~~=-~-= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Data)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2617,7 +2617,7 @@ Fl_Input *wp_data_filename=(Fl_Input *)0;
static void cb_wp_data_filename(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-~=~~~~~~-=~~=~-==--- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Data)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
update_current(o, v,
[nd](){return nd->filename();},
@@ -2646,7 +2646,7 @@ static void cb_fileopen(Fl_Button*, void* v) {
static void cb_Comment(Fl_Text_Editor* o, void* v) {
//fl ▼ ---------------------- callback ~--=---~~~-=-~=-=-~-=~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Data)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2671,7 +2671,7 @@ Fl_Tabs *comment_tabs=(Fl_Tabs *)0;
static void cb_comment_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback ---~~~~==~~=~~~~--~~~~ ▼ fl//
- if (current_node && current_node->is_a(Type::Comment))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_Comment))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------=~--~=---~~=----------~--~=-~=---=~-~=~~=-~~ ▲ fl//
}
@@ -2682,7 +2682,7 @@ Fl_Text_Editor *comment_tabs_name=(Fl_Text_Editor *)0;
static void cb_comment_tabs_name(Fl_Text_Editor* o, void* v) {
//fl ▼ ---------------------- callback --~~-~-~~=--~---~~~~=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Comment)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
Comment_Node* nd = (Comment_Node*)current_node;
if (v == LOAD) {
@@ -2708,7 +2708,7 @@ Fl_Menu_Button *comment_predefined_2=(Fl_Menu_Button *)0;
static void cb_comment_predefined_2(Fl_Menu_Button* o, void* v) {
//fl ▼ ---------------------- callback ~-~-=~=~=-=--=~==-~--- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Comment)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
static char itempath[256];
static int last_selected_item { 0 };
@@ -2807,7 +2807,7 @@ static void cb_comment_load_2(Fl_Button*, void* v) {
static void cb_output(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~-=~=-~~~~=-------~~=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Comment)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
Comment_Node* nd = (Comment_Node*)current_node;
if (v == LOAD) {
@@ -2823,7 +2823,7 @@ static void cb_output(Fl_Check_Button* o, void* v) {
static void cb_output1(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ---=~-~-=~=--~~~~-=~-= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Comment)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
Comment_Node* nd = (Comment_Node*)current_node;
if (v == LOAD) {
@@ -2841,7 +2841,7 @@ Fl_Tabs *class_tabs=(Fl_Tabs *)0;
static void cb_class_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback -~-----=-~-=~-~=-~---- ▼ fl//
- if (current_node && current_node->is_a(Type::Class))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_Class))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------=~----~=-==-----------~-~~~~=~~~-==~-=~=~~-= ▲ fl//
}
@@ -2850,7 +2850,7 @@ Fl_Group *class_tabs_main=(Fl_Group *)0;
static void cb_18(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback ---=~~-~=~--=----=~--= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Class)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -2881,7 +2881,7 @@ Fl_Menu_Item menu_8[] = {
static void cb_Attribute(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback -~~==-~---~~~~~=~=--~~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Class)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -2899,7 +2899,7 @@ static void cb_Attribute(Fl_Input* o, void* v) {
static void cb_Class(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~~-~-~-~-~==-~-~==~~= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Class)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -2944,7 +2944,7 @@ static void cb_Class(Fl_Input* o, void* v) {
static void cb_Base(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~=~=-=-~==~=~=-~==~=~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Class)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -2961,7 +2961,7 @@ static void cb_Base(Fl_Input* o, void* v) {
static void cb_Comment1(Fl_Text_Editor* o, void* v) {
//fl ▼ ---------------------- callback -~~=~=-==----=~~-~~-=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Class)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -2986,7 +2986,7 @@ Fl_Tabs *declblock_tabs=(Fl_Tabs *)0;
static void cb_declblock_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback ~~--=~~=~~~~-==-~=~~=~ ▼ fl//
- if (current_node && current_node->is_a(Type::DeclBlock))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_DeclBlock))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------=~=~~=-=~--=-------------~-~=~~=-=-~=~----=~ ▲ fl//
}
@@ -2995,7 +2995,7 @@ Fl_Group *declblock_tabs_main=(Fl_Group *)0;
static void cb_Start(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~-~=~-~=----~=~==~~-~~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3016,7 +3016,7 @@ static void cb_Start(Fl_Input* o, void* v) {
static void cb_End(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback -~-~--~-----=-~~~~~=-~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
update_current(o, v,
[nd](){return nd->end_code();},
@@ -3027,7 +3027,7 @@ static void cb_End(Fl_Input* o, void* v) {
static void cb_implementations(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~-~=-~~=-==~=~--=-=~-= ▼ fl//
- if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3048,7 +3048,7 @@ static void cb_implementations(Fl_Check_Button* o, void* v) {
static void cb_static(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~-~=-~~=~~-~=~~=~==-=~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3069,7 +3069,7 @@ static void cb_static(Fl_Check_Button* o, void* v) {
static void cb_forward(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~--=~=-==~~--=--~~~-~~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3090,7 +3090,7 @@ static void cb_forward(Fl_Check_Button* o, void* v) {
static void cb_preprecessor(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~~~~-=~=~~~=~==~-~-=~= ▼ fl//
- if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3111,7 +3111,7 @@ static void cb_preprecessor(Fl_Check_Button* o, void* v) {
static void cb_Comment2(Fl_Text_Editor* o, void* v) {
//fl ▼ ---------------------- callback ~-=~=~-=~-~=-==~~~=-~- ▼ fl//
- if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3136,7 +3136,7 @@ Fl_Tabs *decl_tabs=(Fl_Tabs *)0;
static void cb_decl_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback --~--~=~~~-~--=~--=~=~ ▼ fl//
- if (current_node && current_node->is_a(Type::Decl))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_Decl))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------=~~~-==-=~=~----------~~-~=~~~~==~--~--=--=~ ▲ fl//
}
@@ -3145,7 +3145,7 @@ Fl_Group *decl_tabs_main=(Fl_Group *)0;
static void cb_19(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback -~~==~--~~~-=-~~-==--= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Decl)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3177,7 +3177,7 @@ Fl_Menu_Item menu_9[] = {
static void cb_1a(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback -~-~-=~~~~=~~=--~-~~~= ▼ fl//
- if (!current_node || !current_node->is_a(Type::Decl)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3214,7 +3214,7 @@ static void cb_1b(Fl_Tile* o, void* v) {
static void cb_Declaration(fld::widget::Code_Editor* o, void* v) {
//fl ▼ ---------------------- callback ---==--~~-=-=-~=----=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Decl)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3238,7 +3238,7 @@ static void cb_Declaration(fld::widget::Code_Editor* o, void* v) {
static void cb_Comment3(Fl_Text_Editor* o, void* v) {
//fl ▼ ---------------------- callback -~-~~=~--=~--==-=----- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Decl)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3263,7 +3263,7 @@ Fl_Tabs *codeblock_tabs=(Fl_Tabs *)0;
static void cb_codeblock_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback ~-~=~~~--~~=-~~-~---~~ ▼ fl//
- if (current_node && current_node->is_a(Type::CodeBlock))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_CodeBlock))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------=~--~~~~~-~-----------~-=-=--~-=-=---=---~=- ▲ fl//
}
@@ -3272,7 +3272,7 @@ Fl_Group *codeblock_tabs_main=(Fl_Group *)0;
static void cb_Start1(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback -~-~=-=~~=~=~-~==-~-=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::CodeBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_CodeBlock)) return;
CodeBlock_Node* nd = (CodeBlock_Node*)current_node;
if (v == LOAD) {
@@ -3293,7 +3293,7 @@ static void cb_Start1(Fl_Input* o, void* v) {
static void cb_End1(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~-~~=~=-~=-~-=~~~=-=~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::CodeBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_CodeBlock)) return;
CodeBlock_Node* nd = (CodeBlock_Node*)current_node;
update_current(o, v,
[nd](){return nd->end_code();},
@@ -3304,7 +3304,7 @@ static void cb_End1(Fl_Input* o, void* v) {
static void cb_Comment4(Fl_Text_Editor* o, void* v) {
//fl ▼ ---------------------- callback ~~~=~=~=-~--=--==~~-=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::CodeBlock)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_CodeBlock)) return;
CodeBlock_Node* nd = (CodeBlock_Node*)current_node;
if (v == LOAD) {
@@ -3329,7 +3329,7 @@ Fl_Tabs *code_tabs=(Fl_Tabs *)0;
static void cb_code_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback ---~-=-~-==-~=-=~~=-~- ▼ fl//
- if (current_node && current_node->is_a(Type::Code))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_Code))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------=~=~-~=~-~=~----------~~=~~~-=--~-=~--=~---= ▲ fl//
}
@@ -3338,7 +3338,7 @@ Fl_Group *code_tabs_main=(Fl_Group *)0;
static void cb_1c(fld::widget::Code_Editor* o, void* v) {
//fl ▼ ---------------------- callback ~-=--~=~~==~=~=~-~--=~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Code)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Code)) return;
Code_Node* nd = (Code_Node*)current_node;
if (v == LOAD) {
the_panel->label("Code Editor");
@@ -3368,7 +3368,7 @@ Fl_Tabs *func_tabs=(Fl_Tabs *)0;
static void cb_func_tabs(Fl_Tabs* o, void* v) {
//fl ▼ ---------------------- callback ~~=~~==~~-~~-~=~=-=~-- ▼ fl//
- if (current_node && current_node->is_a(Type::Function))
+ if (current_node && current_node->is_a(FLD_NODE_TYPE_Function))
propagate_load((Fl_Group *)o,v);
//fl ▲ ----------~=~--=~=--~~------------~-~=-~=~=~=~~~~~=--= ▲ fl//
}
@@ -3377,7 +3377,7 @@ Fl_Group *func_tabs_main=(Fl_Group *)0;
static void cb_1d(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback ----~-~=--~-=~~~-~~==- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Function)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3408,7 +3408,7 @@ Fl_Menu_Item menu_b[] = {
static void cb_1e(Fl_Choice* o, void* v) {
//fl ▼ ---------------------- callback ~-=~-=~---=~--~==-=~=- ▼ fl//
- if (!current_node || !current_node->is_a(Type::Function)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3439,7 +3439,7 @@ Fl_Menu_Item menu_c[] = {
static void cb_declare(Fl_Check_Button* o, void* v) {
//fl ▼ ---------------------- callback ~-~-=-~-=~-=~=~-~=-=-~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Function)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3461,7 +3461,7 @@ static void cb_1f(Fl_Tile* o, void* v) {
static void cb_Function(fld::widget::Code_Editor* o, void* v) {
//fl ▼ ---------------------- callback --=~=----~=~~-=~-==--~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Function)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3485,7 +3485,7 @@ static void cb_Function(fld::widget::Code_Editor* o, void* v) {
static void cb_Return(fld::widget::Code_Editor* o, void* v) {
//fl ▼ ---------------------- callback -~=--~-~=~=~~~---=~~=~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Function)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
update_current(o, v,
[nd](){return nd->return_type();},
@@ -3496,7 +3496,7 @@ static void cb_Return(fld::widget::Code_Editor* o, void* v) {
static void cb_Comment5(Fl_Text_Editor* o, void* v) {
//fl ▼ ---------------------- callback ----=~--=~-==-~=-~=~=~ ▼ fl//
- if (!current_node || !current_node->is_a(Type::Function)) return;
+ if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
diff --git a/fluid/panels/widget_panel.fl b/fluid/panels/widget_panel.fl
index 03c08272b..0fb788ff2 100644
--- a/fluid/panels/widget_panel.fl
+++ b/fluid/panels/widget_panel.fl
@@ -192,7 +192,7 @@ Function {make_image_panel()} {uid b832
Fl_Input image_panel_imagew {uid 7e73
label {Width:}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_image_w_);
}
} else {
@@ -222,7 +222,7 @@ Function {make_image_panel()} {uid b832
Fl_Input image_panel_imageh {uid e676
label {Height:}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_image_h_);
}
} else {
@@ -271,7 +271,7 @@ Function {make_image_panel()} {uid b832
Fl_Check_Button {} {uid 08b7
label {convert to raw pixel data}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(!current_widget->compress_image_);
} else {
@@ -290,7 +290,7 @@ Function {make_image_panel()} {uid b832
Fl_Check_Button {} {uid 62a3
label {bind to widget}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(current_widget->bind_image_);
} else {
@@ -342,7 +342,7 @@ Function {make_image_panel()} {uid b832
Fl_Input image_panel_deimagew {uid 117f
label {Width:}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_deimage_w_);
}
} else {
@@ -372,7 +372,7 @@ Function {make_image_panel()} {uid b832
Fl_Input image_panel_deimageh {uid c6c4
label {Height:}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->value(current_widget->scale_deimage_h_);
}
} else {
@@ -421,7 +421,7 @@ Function {make_image_panel()} {uid b832
Fl_Check_Button {} {uid 0d5e
label {convert to raw pixel data}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(!current_widget->compress_deimage_);
} else {
@@ -440,7 +440,7 @@ Function {make_image_panel()} {uid b832
Fl_Check_Button {} {uid c4ca
label {bind to widget}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(current_widget->bind_deimage_);
} else {
@@ -493,14 +493,14 @@ if (img) {
Function {flex_margin_cb(Fl_Value_Input* i, void* v, void (*load_margin)(Fl_Flex*,Fl_Value_Input*), int (*update_margin)(Fl_Flex*,int))} {uid 03b3 return_type void
} {
code {if (v == LOAD) {
- if (current_widget->is_a(Type::Flex)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Flex)) {
load_margin((Fl_Flex*)current_widget->o, i);
}
} else {
int mod = 0;
int new_value = (int)i->value();
for (Node *o = Fluid.proj.tree.first; o; o = o->next) {
- if (o->selected && o->is_a(Type::Flex)) {
+ if (o->selected && o->is_a(FLD_NODE_TYPE_Flex)) {
Flex_Node* q = (Flex_Node*)o;
Fl_Flex* w = (Fl_Flex*)q->o;
if (update_margin(w, new_value)) {
@@ -561,7 +561,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t
} {
Fl_Input widget_image_input {uid cbeb
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(((Widget_Node*)current_widget)->image_name().c_str());
} else o->deactivate();
@@ -578,7 +578,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t
Fl_Button {} {uid cdf4
label {Browse...}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window))
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window))
o->activate();
else
o->deactivate();
@@ -611,7 +611,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t
} {
Fl_Input widget_deimage_input {uid 887c
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->activate();
o->value(((Widget_Node*)current_widget)->inactive_name().c_str());
} else o->deactivate();
@@ -628,7 +628,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t
Fl_Button {} {uid 8947
label {Browse...}
callback {if (v == LOAD) {
- if (current_widget->is_widget() && !current_widget->is_a(Type::Window))
+ if (current_widget->is_widget() && !current_widget->is_a(FLD_NODE_TYPE_Window))
o->activate();
else
o->deactivate();
@@ -954,7 +954,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Choice {} {uid 4f6a
label {Children:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Widget_Class)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Widget_Class)) {
o->show();
o->value(((Widget_Class_Node *)current_widget)->wc_relative);
} else {
@@ -964,7 +964,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Widget_Class)) {
+ if (q->is_a(FLD_NODE_TYPE_Widget_Class)) {
Widget_Class_Node *t = (Widget_Class_Node *)q;
t->wc_relative = o->value();
mod = 1;
@@ -1080,9 +1080,9 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Group wp_gui_values {uid 2348
label {Values:}
callback {if (v == LOAD) {
- if ( current_widget->is_a(Type::Flex)
- || current_widget->is_a(Type::Grid)
- || current_widget->is_a(Type::Window))
+ if ( current_widget->is_a(FLD_NODE_TYPE_Flex)
+ || current_widget->is_a(FLD_NODE_TYPE_Grid)
+ || current_widget->is_a(FLD_NODE_TYPE_Window))
{
o->hide();
} else {
@@ -1095,7 +1095,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Value_Input {} {uid 4e4e
label {Size:}
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Slider)) {o->deactivate(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Slider)) {o->deactivate(); return;}
o->activate();
o->value(((Fl_Slider*)(current_widget->o))->slider_size());
} else {
@@ -1103,7 +1103,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Slider)) {
+ if (q->is_a(FLD_NODE_TYPE_Slider)) {
((Fl_Slider*)(q->o))->slider_size(n);
q->o->redraw();
mod = 1;
@@ -1116,10 +1116,10 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Value_Input {} {uid eaec
label {Minimum:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->minimum());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->minimum());
} else {
@@ -1131,11 +1131,11 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->minimum(n);
q->o->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->minimum(n);
q->o->redraw();
mod = 1;
@@ -1148,10 +1148,10 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Value_Input {} {uid 6bdb
label {Maximum:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->maximum());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->maximum());
} else {
@@ -1163,11 +1163,11 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->maximum(n);
q->o->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->maximum(n);
q->o->redraw();
mod = 1;
@@ -1180,10 +1180,10 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Value_Input {} {uid 0339
label {Step:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->step());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->step());
} else {
@@ -1195,11 +1195,11 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->step(n);
q->o->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->step(n);
q->o->redraw();
mod = 1;
@@ -1212,13 +1212,13 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Value_Input {} {uid aa3f
label {Value:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Valuator_)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Valuator_)) {
o->activate();
o->value(((Fl_Valuator*)(current_widget->o))->value());
} else if (current_widget->is_button()) {
o->activate();
o->value(((Fl_Button*)(current_widget->o))->value());
- } else if (current_widget->is_a(Type::Spinner)) {
+ } else if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
o->activate();
o->value(((Fl_Spinner*)(current_widget->o))->value());
} else
@@ -1228,14 +1228,14 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fluid.proj.undo.checkpoint();
double n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Valuator_)) {
+ if (q->is_a(FLD_NODE_TYPE_Valuator_)) {
((Fl_Valuator*)(q->o))->value(n);
mod = 1;
} else if (q->is_button()) {
((Fl_Button*)(q->o))->value(n != 0);
- if (q->is_a(Type::Menu_Item)) q->redraw();
+ if (q->is_a(FLD_NODE_TYPE_Menu_Item)) q->redraw();
mod = 1;
- } else if (q->is_a(Type::Spinner)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Spinner)) {
((Fl_Spinner*)(q->o))->value(n);
mod = 1;
}
@@ -1251,7 +1251,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Group wp_gui_margins {uid 910a
label {Margins:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Flex)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Flex)) {
o->show();
propagate_load(o, v);
} else {
@@ -1381,7 +1381,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Group wp_gui_sizerange {uid 0e6b
label {Size Range:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Window)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->show();
propagate_load(o, v);
} else {
@@ -1393,14 +1393,14 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Value_Input {} {uid a350
label {Minimum Size:}
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_min_w);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_min_w = n;
mod = 1;
}
@@ -1411,14 +1411,14 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
}
Fl_Value_Input {} {uid f50b
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_min_h);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_min_h = n;
mod = 1;
}
@@ -1434,7 +1434,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
Window_Node *win = (Window_Node*)q;
win->sr_min_w = win->o->w();
win->sr_min_h = win->o->h();
@@ -1449,14 +1449,14 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Value_Input {} {uid 99ee
label {Maximum Size:}
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_max_w);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_max_w = n;
mod = 1;
}
@@ -1467,14 +1467,14 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
}
Fl_Value_Input {} {uid e850
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) return;
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) return;
o->value(((Window_Node*)current_widget)->sr_max_h);
} else {
int mod = 0;
Fluid.proj.undo.checkpoint();
int n = (int)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
((Window_Node*)q)->sr_max_h = n;
mod = 1;
}
@@ -1490,7 +1490,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
Window_Node *win = (Window_Node*)q;
win->sr_max_w = win->o->w();
win->sr_max_h = win->o->h();
@@ -1515,11 +1515,11 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
callback {if (v == LOAD) {
if (current_widget->is_button())
o->value( ((Fl_Button*)(current_widget->o))->shortcut() );
- else if (current_widget->is_a(Type::Input))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Input))
o->value( ((Fl_Input_*)(current_widget->o))->shortcut() );
- else if (current_widget->is_a(Type::Value_Input))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Value_Input))
o->value( ((Fl_Value_Input*)(current_widget->o))->shortcut() );
- else if (current_widget->is_a(Type::Text_Display))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Text_Display))
o->value( ((Fl_Text_Display*)(current_widget->o))->shortcut() );
else {
o->hide();
@@ -1537,16 +1537,16 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
Fl_Button* b = (Fl_Button*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
- if (q->is_a(Type::Menu_Item)) q->redraw();
- } else if (q->is_a(Type::Input)) {
+ if (q->is_a(FLD_NODE_TYPE_Menu_Item)) q->redraw();
+ } else if (q->is_a(FLD_NODE_TYPE_Input)) {
Fl_Input_* b = (Fl_Input_*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
- } else if (q->is_a(Type::Value_Input)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Value_Input)) {
Fl_Value_Input* b = (Fl_Value_Input*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
- } else if (q->is_a(Type::Text_Display)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Text_Display)) {
Fl_Text_Display* b = (Fl_Text_Display*)(q->o);
if (b->shortcut() != (int)o->value()) mod = 1;
b->shortcut(o->value());
@@ -1568,7 +1568,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
Fl_Input {} {uid f009
label {:}
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Window)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) {
o->show();
o->parent()->show();
o->value(((Window_Node *)current_widget)->xclass);
@@ -1580,7 +1580,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
int mod = 0;
Fluid.proj.undo.checkpoint();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Window)) {
+ if (q->is_a(FLD_NODE_TYPE_Window)) {
mod = 1;
Window_Node *wt = (Window_Node *)q;
storestring(o->value(), wt->xclass);
@@ -1594,7 +1594,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
Fl_Light_Button {} {uid eca1
label Border
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) {o->hide(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) {o->hide(); return;}
o->show();
o->value(((Fl_Window*)(current_widget->o))->border());
} else {
@@ -1607,7 +1607,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
Fl_Light_Button {} {uid 457d
label Modal
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) {o->hide(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) {o->hide(); return;}
o->show();
o->value(((Window_Node *)current_widget)->modal);
} else {
@@ -1620,7 +1620,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
Fl_Light_Button {} {uid 3574
label Nonmodal
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Window)) {o->hide(); return;}
+ if (!current_widget->is_a(FLD_NODE_TYPE_Window)) {o->hide(); return;}
o->show();
o->value(((Window_Node *)current_widget)->non_modal);
} else {
@@ -1640,7 +1640,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
label Visible
callback {if (v == LOAD) {
o->value(current_widget->o->visible());
- if (current_widget->is_a(Type::Window)) o->deactivate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) o->deactivate();
else o->activate();
} else {
int mod = 0;
@@ -1653,9 +1653,9 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
n ? q->o->show() : q->o->hide();
q->redraw();
if (n && q->parent && q->parent->type_name()) {
- if (q->parent->is_a(Type::Tabs)) {
+ if (q->parent->is_a(FLD_NODE_TYPE_Tabs)) {
((Fl_Tabs *)q->o->parent())->value(q->o);
- } else if (q->parent->is_a(Type::Wizard)) {
+ } else if (q->parent->is_a(FLD_NODE_TYPE_Wizard)) {
((Fl_Wizard *)q->o->parent())->value(q->o);
}
}
@@ -1671,7 +1671,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
label Active
callback {if (v == LOAD) {
o->value(current_widget->o->active());
- if (current_widget->is_a(Type::Window)) o->deactivate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Window)) o->deactivate();
else o->activate();
} else {
int mod = 0;
@@ -1691,7 +1691,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
Fl_Light_Button {} {uid 9305
label Resizable
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->hide();
return;
}
@@ -1712,7 +1712,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
Fl_Light_Button {} {uid 32ad
label Headline
callback {if (v == LOAD) {
- if (!current_widget->is_a(Type::Menu_Item)) {
+ if (!current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->hide();
return;
}
@@ -1722,7 +1722,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
int mod = 0;
int n = o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Menu_Item)) {
+ if (q->is_a(FLD_NODE_TYPE_Menu_Item)) {
if (!mod) {
mod = 1;
Fluid.proj.undo.checkpoint();
@@ -1740,21 +1740,21 @@ unselectable, but not grayed out} xywh {225 260 75 20} selection_color 1 labelsi
label Hotspot
callback {if (v == LOAD) {
if (numselected > 1) {o->deactivate(); return;}
- if (current_widget->is_a(Type::Menu_Item)) o->label("divider");
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) o->label("divider");
else o->label("hotspot");
o->activate();
o->value(current_widget->hotspot());
} else {
Fluid.proj.undo.checkpoint();
current_widget->hotspot(o->value());
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
current_widget->redraw();
return;
}
if (o->value()) {
Node *p = current_widget->parent;
if (!p || !p->is_widget()) return;
- while (!p->is_a(Type::Window)) p = p->parent;
+ while (!p->is_a(FLD_NODE_TYPE_Window)) p = p->parent;
for (Node *q = p->next; q && q->level > p->level; q = q->next) {
if (q->is_widget() && q != current_widget)
((Widget_Node*)q)->hotspot(0);
@@ -1878,7 +1878,7 @@ if (v != LOAD) {
} {
Fl_Choice {} {uid 5454
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {o->deactivate(); return;} else o->activate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {o->deactivate(); return;} else o->activate();
int n = current_widget->o->box();
if (!n) n = ZERO_ENTRY;
for (int j = 0; j < 72 /*int(sizeof(boxmenu)/sizeof(*boxmenu))*/; j++)
@@ -1904,7 +1904,7 @@ if (v != LOAD) {
label Color
callback {Fl_Color c = current_widget->o->color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
} else {
o->activate();
@@ -1923,7 +1923,7 @@ o->redraw();}
Fl_Menu_Button {} {uid 7a18
callback {Fl_Color c = current_widget->o->color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {o->deactivate(); return;} else o->activate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {o->deactivate(); return;} else o->activate();
} else {
Fl_Color d = (Fl_Color)(o->mvalue()->argument());
if (d == c) return;
@@ -1946,11 +1946,11 @@ if (v == LOAD) {
Fl_Choice {} {uid d304
callback {if (v == LOAD) {
int n;
- if (current_widget->is_a(Type::Button))
+ if (current_widget->is_a(FLD_NODE_TYPE_Button))
n = ((Fl_Button*)(current_widget->o))->down_box();
- else if (current_widget->is_a(Type::Input_Choice))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Input_Choice))
n = ((Fl_Input_Choice*)(current_widget->o))->down_box();
- else if (current_widget->is_a(Type::Menu_Manager_))
+ else if (current_widget->is_a(FLD_NODE_TYPE_Menu_Manager_))
n = ((Fl_Menu_*)(current_widget->o))->down_box();
else {
o->deactivate(); return;
@@ -1966,12 +1966,12 @@ if (v == LOAD) {
if (!n) return; // should not happen
if (n == ZERO_ENTRY) n = 0;
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Button)) {
+ if (q->is_a(FLD_NODE_TYPE_Button)) {
((Fl_Button*)(q->o))->down_box((Fl_Boxtype)n);
if (((Fl_Button*)(q->o))->value()) q->redraw();
- } else if (q->is_a(Type::Input_Choice)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Input_Choice)) {
((Fl_Input_Choice*)(q->o))->down_box((Fl_Boxtype)n);
- } else if (q->is_a(Type::Menu_Manager_)) {
+ } else if (q->is_a(FLD_NODE_TYPE_Menu_Manager_)) {
((Fl_Menu_*)(q->o))->down_box((Fl_Boxtype)n);
}
mod = 1;
@@ -1986,7 +1986,7 @@ if (v == LOAD) {
label {Select Color}
callback {Fl_Color c = current_widget->o->selection_color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
return;
} else {
@@ -2006,7 +2006,7 @@ o->redraw();}
Fl_Menu_Button {} {uid b1b3
callback {Fl_Color c = current_widget->o->selection_color();
if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
return;
} else {
@@ -2217,7 +2217,7 @@ if (v == LOAD) {
label Compact
callback {if (v == LOAD) {
uchar n;
- if (current_widget->is_a(Type::Button) && !current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Button) && !current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
n = ((Fl_Button*)(current_widget->o))->compact();
o->value(n);
o->show();
@@ -2228,7 +2228,7 @@ if (v == LOAD) {
int mod = 0;
uchar n = (uchar)o->value();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
- if (q->is_a(Type::Button) && !q->is_a(Type::Menu_Item)) {
+ if (q->is_a(FLD_NODE_TYPE_Button) && !q->is_a(FLD_NODE_TYPE_Menu_Item)) {
uchar v = ((Fl_Button*)(q->o))->compact();
if (n != v) {
if (!mod) {
@@ -2261,7 +2261,7 @@ if (v == LOAD) {
Fl_Input {} {uid 31e6
user_data 4
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {
o->deactivate();
} else {
o->activate();
@@ -2294,7 +2294,7 @@ if (v == LOAD) {
int j;
for (j = 0;; j++) {
if (!m[j].text) {j = 0; break;}
- if (current_widget->is_a(Type::Spinner)) {
+ if (current_widget->is_a(FLD_NODE_TYPE_Spinner)) {
if (m[j].argument() == ((Fl_Spinner*)current_widget->o)->type()) break;
} else {
if (m[j].argument() == current_widget->o->type()) break;
@@ -2310,9 +2310,9 @@ if (v == LOAD) {
Fl_Menu_Item* m = current_widget->subtypes();
for (Widget_Node *q: Fluid.proj.tree.all_selected_widgets()) {
if (q->subtypes()==m) {
- if (q->is_a(Type::Spinner))
+ if (q->is_a(FLD_NODE_TYPE_Spinner))
((Fl_Spinner*)q->o)->type(n);
- else if (q->is_a(Type::Flex))
+ else if (q->is_a(FLD_NODE_TYPE_Flex))
((Flex_Node*)q)->change_subtype_to(n);
else
q->o->type(n);
@@ -2523,7 +2523,7 @@ wCallback->do_callback(wCallback, v);} open
Fl_Menu_Button {} {uid ba4c
label When
callback {if (v == LOAD) {
- if (current_widget->is_a(Type::Menu_Item)) {o->deactivate(); return;} else o->activate();
+ if (current_widget->is_a(FLD_NODE_TYPE_Menu_Item)) {o->deactivate(); return;} else o->activate();
int n = current_widget->o->when();
set_whenmenu(n);
w_when_box->copy_label(when_symbol_name(n));
@@ -2611,7 +2611,7 @@ if (v == LOAD) {
} {}
}
Fl_Tabs data_tabs {uid 3ae5
- callback {if (current_node && current_node->is_a(Type::Data))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_Data))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide
} {
@@ -2626,7 +2626,7 @@ if (v == LOAD) {
xywh {95 49 310 21} labelfont 1 labelsize 11 align 4
} {
Fl_Choice {} {uid 0b51
- callback {if (!current_node || !current_node->is_a(Type::Data)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2665,7 +2665,7 @@ if (v == LOAD) {
}
}
Fl_Choice {} {uid e705
- callback {if (!current_node || !current_node->is_a(Type::Data)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2709,7 +2709,7 @@ if (v == LOAD) {
xywh {95 75 310 20} labelfont 1 labelsize 11 align 4
} {
Fl_Choice {} {uid 6268
- callback {if (!current_node || !current_node->is_a(Type::Data)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2759,7 +2759,7 @@ if (v == LOAD) {
}
Fl_Input {} {uid f233
label {Name:}
- callback {if (!current_node || !current_node->is_a(Type::Data)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2779,7 +2779,7 @@ if (v == LOAD) {
}
Fl_Input wp_data_filename {uid 1148
label {Filename:}
- callback {if (!current_node || !current_node->is_a(Type::Data)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
update_current(o, v,
[nd](){return nd->filename();},
@@ -2806,7 +2806,7 @@ update_current(o, v,
}
Fl_Text_Editor {} {uid 8a96
label {Comment:}
- callback {if (!current_node || !current_node->is_a(Type::Data)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Data)) return;
Data_Node* nd = (Data_Node*)current_node;
if (v == LOAD) {
@@ -2831,7 +2831,7 @@ if (v == LOAD) {
}
}
Fl_Tabs comment_tabs {uid 8c0e
- callback {if (current_node && current_node->is_a(Type::Comment))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_Comment))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide
} {
@@ -2842,7 +2842,7 @@ if (v == LOAD) {
} {
Fl_Text_Editor comment_tabs_name {uid e7bf
label {Comment:}
- callback {if (!current_node || !current_node->is_a(Type::Comment)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
Comment_Node* nd = (Comment_Node*)current_node;
if (v == LOAD) {
@@ -2871,7 +2871,7 @@ if (v == LOAD) {
} {
Fl_Menu_Button comment_predefined_2 {uid 35da
label Predefined
- callback {if (!current_node || !current_node->is_a(Type::Comment)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
static char itempath[256];
static int last_selected_item { 0 };
@@ -2968,7 +2968,7 @@ if (v != LOAD) {
}
Fl_Check_Button {} {uid b4f1
label {output to header file}
- callback {if (!current_node || !current_node->is_a(Type::Comment)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
Comment_Node* nd = (Comment_Node*)current_node;
if (v == LOAD) {
@@ -2983,7 +2983,7 @@ if (v == LOAD) {
}
Fl_Check_Button {} {uid 4b86
label {output to source file}
- callback {if (!current_node || !current_node->is_a(Type::Comment)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Comment)) return;
Comment_Node* nd = (Comment_Node*)current_node;
if (v == LOAD) {
@@ -3003,7 +3003,7 @@ if (v == LOAD) {
}
}
Fl_Tabs class_tabs {uid 81a5
- callback {if (current_node && current_node->is_a(Type::Class))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_Class))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide
} {
@@ -3020,7 +3020,7 @@ support a class inside a class at this point} open
xywh {95 50 310 21} labelfont 1 labelsize 11 align 4 hide
} {
Fl_Choice {} {uid 5488
- callback {if (!current_node || !current_node->is_a(Type::Class)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -3060,7 +3060,7 @@ if (v == LOAD) {
}
Fl_Input {} {uid df8b
label {Attribute:}
- callback {if (!current_node || !current_node->is_a(Type::Class)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -3077,7 +3077,7 @@ if (v == LOAD) {
}
Fl_Input {} {uid 2af0
label {Class Name:}
- callback {if (!current_node || !current_node->is_a(Type::Class)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -3121,7 +3121,7 @@ if (v == LOAD) {
}
Fl_Input {} {uid 31d1
label {Base Class:}
- callback {if (!current_node || !current_node->is_a(Type::Class)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -3138,7 +3138,7 @@ e.g. `public Fl_Widget`} xywh {95 100 305 20} labelfont 1 labelsize 11 textfont
}
Fl_Text_Editor {} {uid 9923
label {Comment:}
- callback {if (!current_node || !current_node->is_a(Type::Class)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Class)) return;
Class_Node* nd = (Class_Node*)current_node;
if (v == LOAD) {
@@ -3163,7 +3163,7 @@ if (v == LOAD) {
}
}
Fl_Tabs declblock_tabs {uid fd14
- callback {if (current_node && current_node->is_a(Type::DeclBlock))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_DeclBlock))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide
} {
@@ -3174,7 +3174,7 @@ if (v == LOAD) {
} {
Fl_Input {} {uid 7354
label {Start Code:}
- callback {if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3194,7 +3194,7 @@ if (v == LOAD) {
}
Fl_Input {} {uid b795
label {End Code:}
- callback {if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
update_current(o, v,
[nd](){return nd->end_code();},
@@ -3212,7 +3212,7 @@ update_current(o, v,
}
Fl_Check_Button {} {uid 7b16
label implementations
- callback {if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3232,7 +3232,7 @@ if (v == LOAD) {
}
Fl_Check_Button {} {uid 02cf
label {static initializations and callbacks}
- callback {if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3256,7 +3256,7 @@ if (v == LOAD) {
}
Fl_Check_Button {} {uid 1686
label {forward declarations}
- callback {if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3276,7 +3276,7 @@ if (v == LOAD) {
}
Fl_Check_Button {} {uid e71b
label {preprecessor and callback declarations}
- callback {if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3300,7 +3300,7 @@ if (v == LOAD) {
}
Fl_Text_Editor {} {uid 9e73
label {Comment:}
- callback {if (!current_node || !current_node->is_a(Type::DeclBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_DeclBlock)) return;
DeclBlock_Node* nd = (DeclBlock_Node*)current_node;
if (v == LOAD) {
@@ -3325,7 +3325,7 @@ if (v == LOAD) {
}
}
Fl_Tabs decl_tabs {uid b97f
- callback {if (current_node && current_node->is_a(Type::Decl))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_Decl))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide
} {
@@ -3346,7 +3346,7 @@ if (v == LOAD) {
xywh {95 50 1 20} labelfont 1 labelsize 11 align 4
}
Fl_Choice {} {uid 871c
- callback {if (!current_node || !current_node->is_a(Type::Decl)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3385,7 +3385,7 @@ if (v == LOAD) {
}
}
Fl_Choice {} {uid 796e
- callback {if (!current_node || !current_node->is_a(Type::Decl)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3432,7 +3432,7 @@ if (v == LOAD) {
} {
Fl_Text_Editor {} {uid b84e
label {Declaration:}
- callback {if (!current_node || !current_node->is_a(Type::Decl)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3465,7 +3465,7 @@ a `\#` directive: `\#include <foo.h>`, a typedef `typedef char byte;`,
} {
Fl_Text_Editor {} {uid 0067
label {Comment:}
- callback {if (!current_node || !current_node->is_a(Type::Decl)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Decl)) return;
Decl_Node* nd = (Decl_Node*)current_node;
if (v == LOAD) {
@@ -3492,7 +3492,7 @@ if (v == LOAD) {
}
}
Fl_Tabs codeblock_tabs {uid 86d2
- callback {if (current_node && current_node->is_a(Type::CodeBlock))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_CodeBlock))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide
} {
@@ -3503,7 +3503,7 @@ if (v == LOAD) {
} {
Fl_Input {} {uid 2539
label {Start Code:}
- callback {if (!current_node || !current_node->is_a(Type::CodeBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_CodeBlock)) return;
CodeBlock_Node* nd = (CodeBlock_Node*)current_node;
if (v == LOAD) {
@@ -3523,7 +3523,7 @@ if (v == LOAD) {
}
Fl_Input {} {uid 0157
label {End Code:}
- callback {if (!current_node || !current_node->is_a(Type::CodeBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_CodeBlock)) return;
CodeBlock_Node* nd = (CodeBlock_Node*)current_node;
update_current(o, v,
[nd](){return nd->end_code();},
@@ -3533,7 +3533,7 @@ update_current(o, v,
}
Fl_Text_Editor {} {uid 13f0
label {Comment:}
- callback {if (!current_node || !current_node->is_a(Type::CodeBlock)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_CodeBlock)) return;
CodeBlock_Node* nd = (CodeBlock_Node*)current_node;
if (v == LOAD) {
@@ -3558,7 +3558,7 @@ if (v == LOAD) {
}
}
Fl_Tabs code_tabs {uid f3cf
- callback {if (current_node && current_node->is_a(Type::Code))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_Code))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide
} {
@@ -3568,7 +3568,7 @@ if (v == LOAD) {
xywh {10 30 400 330} labelsize 11 resizable
} {
Fl_Text_Editor {} {uid ff87
- callback {if (!current_node || !current_node->is_a(Type::Code)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Code)) return;
Code_Node* nd = (Code_Node*)current_node;
if (v == LOAD) {
the_panel->label("Code Editor");
@@ -3600,7 +3600,7 @@ o->linenumber_size(o->Fl_Text_Display::textsize());}
}
}
Fl_Tabs func_tabs {uid 2983
- callback {if (current_node && current_node->is_a(Type::Function))
+ callback {if (current_node && current_node->is_a(FLD_NODE_TYPE_Function))
propagate_load((Fl_Group *)o,v);}
xywh {10 10 400 350} selection_color 12 labelsize 11 labelcolor 255 hide resizable
} {
@@ -3621,7 +3621,7 @@ o->linenumber_size(o->Fl_Text_Display::textsize());}
xywh {95 50 1 20} labelfont 1 labelsize 11 align 4
}
Fl_Choice {} {uid 8105
- callback {if (!current_node || !current_node->is_a(Type::Function)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3656,7 +3656,7 @@ if (v == LOAD) {
}
}
Fl_Choice {} {uid 2fa7
- callback {if (!current_node || !current_node->is_a(Type::Function)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3692,7 +3692,7 @@ if (v == LOAD) {
}
Fl_Check_Button {} {uid 4f85
label {declare "C"}
- callback {if (!current_node || !current_node->is_a(Type::Function)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3721,7 +3721,7 @@ if (v == LOAD) {
label {Function
Name and
Args:}
- callback {if (!current_node || !current_node->is_a(Type::Function)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
@@ -3752,7 +3752,7 @@ if (v == LOAD) {
} {
Fl_Text_Editor {} {uid 3fba
label {Return Type:}
- callback {if (!current_node || !current_node->is_a(Type::Function)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
update_current(o, v,
[nd](){return nd->return_type();},
@@ -3770,7 +3770,7 @@ update_current(o, v,
} {
Fl_Text_Editor {} {uid b95f
label {Comment:}
- callback {if (!current_node || !current_node->is_a(Type::Function)) return;
+ callback {if (!current_node || !current_node->is_a(FLD_NODE_TYPE_Function)) return;
Function_Node* nd = (Function_Node*)current_node;
if (v == LOAD) {
diff --git a/fluid/panels/widget_panel/Grid_Child_Tab.cxx b/fluid/panels/widget_panel/Grid_Child_Tab.cxx
index b0f943803..d39f46477 100644
--- a/fluid/panels/widget_panel/Grid_Child_Tab.cxx
+++ b/fluid/panels/widget_panel/Grid_Child_Tab.cxx
@@ -84,7 +84,7 @@ void Grid_Child_Tab::cb_widget_grid_transient(Fl_Box* o, void* v) {
void Grid_Child_Tab::cb_Horizontal_i(Fl_Choice* o, void* v) {
if ( !current_widget
|| !current_widget->parent
- || !current_widget->parent->is_a(Type::Grid))
+ || !current_widget->parent->is_a(FLD_NODE_TYPE_Grid))
{
return;
}
@@ -131,7 +131,7 @@ Fl_Menu_Item* Grid_Child_Tab::GRID_LEFT = Grid_Child_Tab::menu_Horizontal + 0;
void Grid_Child_Tab::cb_Vertical_i(Fl_Choice* o, void* v) {
if ( !current_widget
|| !current_widget->parent
- || !current_widget->parent->is_a(Type::Grid))
+ || !current_widget->parent->is_a(FLD_NODE_TYPE_Grid))
{
return;
}
@@ -470,7 +470,7 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char *L) :
void Grid_Child_Tab::grid_child_cb(fld::widget::Formula_Input* i, void* v, int what) {
if ( !current_widget
|| !current_widget->parent
- || !current_widget->parent->is_a(Type::Grid))
+ || !current_widget->parent->is_a(FLD_NODE_TYPE_Grid))
{
return;
}
diff --git a/fluid/panels/widget_panel/Grid_Child_Tab.fl b/fluid/panels/widget_panel/Grid_Child_Tab.fl
index 0fa9ffef9..4bd3744d6 100644
--- a/fluid/panels/widget_panel/Grid_Child_Tab.fl
+++ b/fluid/panels/widget_panel/Grid_Child_Tab.fl
@@ -120,7 +120,7 @@ widget_class Grid_Child_Tab {
label Horizontal
callback {if ( !current_widget
|| !current_widget->parent
- || !current_widget->parent->is_a(Type::Grid))
+ || !current_widget->parent->is_a(FLD_NODE_TYPE_Grid))
{
return;
}
@@ -177,7 +177,7 @@ widget_class Grid_Child_Tab {
label Vertical
callback {if ( !current_widget
|| !current_widget->parent
- || !current_widget->parent->is_a(Type::Grid))
+ || !current_widget->parent->is_a(FLD_NODE_TYPE_Grid))
{
return;
}
@@ -329,7 +329,7 @@ widget_class Grid_Child_Tab {
} {
code {if ( !current_widget
|| !current_widget->parent
- || !current_widget->parent->is_a(Type::Grid))
+ || !current_widget->parent->is_a(FLD_NODE_TYPE_Grid))
{
return;
}
diff --git a/fluid/proj/i18n.cxx b/fluid/proj/i18n.cxx
index d2b9b202c..dc4380bd4 100644
--- a/fluid/proj/i18n.cxx
+++ b/fluid/proj/i18n.cxx
@@ -28,7 +28,7 @@ using namespace fld::proj;
Reset all project setting to create a new empty project.
*/
void I18n::reset() {
- type = fld::I18n_Type::NONE;
+ type = FLD_I18N_TYPE_NONE;
gnu_include = "<libintl.h>";
gnu_conditional = "";
@@ -53,33 +53,33 @@ void I18n::read(io::Project_Reader &f, const char *key) {
} else if (!strcmp(key, "i18n_pos_set")) {
posix_set = f.read_word();
} else if (!strcmp(key, "i18n_include")) {
- if (type == fld::I18n_Type::GNU) {
+ if (type == FLD_I18N_TYPE_GNU) {
gnu_include = f.read_word();
- } else if (type == fld::I18n_Type::POSIX) {
+ } else if (type == FLD_I18N_TYPE_POSIX) {
posix_include = f.read_word();
}
} else if (!strcmp(key, "i18n_conditional")) {
- if (type == fld::I18n_Type::GNU) {
+ if (type == FLD_I18N_TYPE_GNU) {
gnu_conditional = f.read_word();
- } else if (type == fld::I18n_Type::POSIX) {
+ } else if (type == FLD_I18N_TYPE_POSIX) {
posix_conditional = f.read_word();
}
}
}
void I18n::write(io::Project_Writer &f) const {
- if ((type != fld::I18n_Type::NONE)) {
+ if ((type != FLD_I18N_TYPE_NONE)) {
f.write_string("\ni18n_type %d", static_cast<int>(type));
switch (type) {
- case fld::I18n_Type::NONE:
+ case FLD_I18N_TYPE_NONE:
break;
- case fld::I18n_Type::GNU : /* GNU gettext */
+ case FLD_I18N_TYPE_GNU : /* GNU gettext */
f.write_string("\ni18n_include"); f.write_word(gnu_include);
f.write_string("\ni18n_conditional"); f.write_word(gnu_conditional);
f.write_string("\ni18n_gnu_function"); f.write_word(gnu_function);
f.write_string("\ni18n_gnu_static_function"); f.write_word(gnu_static_function);
break;
- case fld::I18n_Type::POSIX : /* POSIX catgets */
+ case FLD_I18N_TYPE_POSIX : /* POSIX catgets */
f.write_string("\ni18n_include"); f.write_word(posix_include);
f.write_string("\ni18n_conditional"); f.write_word(posix_conditional);
if (!posix_file.empty()) {
diff --git a/fluid/proj/i18n.h b/fluid/proj/i18n.h
index 30e09efae..0d9119ca2 100644
--- a/fluid/proj/i18n.h
+++ b/fluid/proj/i18n.h
@@ -26,12 +26,18 @@ class Project;
/**
Enumeration of available internationalization types.
*/
-enum class I18n_Type {
- NONE = 0, ///< No i18n, all strings are litearals
- GNU, ///< GNU gettext internationalization
- POSIX ///< Posix catgets internationalization
+typedef int I18n_Type;
+
+} // namespace fld
+
+enum {
+ FLD_I18N_TYPE_NONE = 0, ///< No i18n, all strings are litearals
+ FLD_I18N_TYPE_GNU, ///< GNU gettext internationalization
+ FLD_I18N_TYPE_POSIX ///< Posix catgets internationalization
};
+namespace fld {
+
namespace io {
class Project_Reader;
class Project_Writer;
@@ -48,7 +54,7 @@ public:
Project &project_;
/// One of the available internationalization types.
- fld::I18n_Type type = I18n_Type::NONE;
+ fld::I18n_Type type = FLD_I18N_TYPE_NONE;
/// Include file for GNU i18n, writes an #include statement into the source
/// file. This is usually `<libintl.h>` or `"gettext.h"` for GNU gettext.
std::string gnu_include = "<libintl.h>";
diff --git a/fluid/proj/mergeback.cxx b/fluid/proj/mergeback.cxx
index 34e4e1361..016732795 100644
--- a/fluid/proj/mergeback.cxx
+++ b/fluid/proj/mergeback.cxx
@@ -263,7 +263,7 @@ void Mergeback::analyse_callback(unsigned long code_crc, unsigned long tag_crc,
*/
void Mergeback::analyse_code(unsigned long code_crc, unsigned long tag_crc, int uid) {
Node *tp = proj_.tree.find_by_uid(uid);
- if (tp && tp->is_a(Type::Code)) {
+ if (tp && tp->is_a(FLD_NODE_TYPE_Code)) {
std::string code = tp->name(); code += "\n";
unsigned long project_crc = fld::io::Code_Writer::block_crc(code.c_str());
// check if the code and project crc are the same, so this modification was already applied
@@ -361,10 +361,10 @@ void Mergeback::print_tag(FILE *out, Tag prev_type, Tag next_type, uint16_t uid,
static const char *tag_lut[] = { "----------", "-- code --", " callback ", " callback " };
fputs("//fl ", out); // Distinct start of tag using utf8
// Indicate that the text above can be edited
- if (prev_type != Tag::GENERIC) fputs("▲", out);
- if (prev_type != Tag::GENERIC && next_type != Tag::GENERIC) fputc('/', out);
+ if (prev_type != FLD_MERGEBACK_TAG_GENERIC) fputs("▲", out);
+ if (prev_type != FLD_MERGEBACK_TAG_GENERIC && next_type != FLD_MERGEBACK_TAG_GENERIC) fputc('/', out);
// Indicate that the text below can be edited
- if (next_type != Tag::GENERIC) fputs("▼", out);
+ if (next_type != FLD_MERGEBACK_TAG_GENERIC) fputs("▼", out);
fputc(' ', out);
// Write the first 32 bit word as an encoded divider line
uint32_t pt = static_cast<uint32_t>(prev_type);
@@ -372,18 +372,18 @@ void Mergeback::print_tag(FILE *out, Tag prev_type, Tag next_type, uint16_t uid,
uint32_t word = (0<<24) | (pt<<16) | (uid); // top 8 bit available for encoding type
print_trichar32(out, word);
// Write a string indicating the type of editable text
- if ( next_type != Tag::GENERIC) {
+ if ( next_type != FLD_MERGEBACK_TAG_GENERIC) {
fputs(tag_lut[nt], out);
- } else if (prev_type != Tag::GENERIC) {
+ } else if (prev_type != FLD_MERGEBACK_TAG_GENERIC) {
fputs(tag_lut[nt], out);
}
// Write the second 32 bit word as an encoded divider line
print_trichar32(out, crc);
// Repeat the intor pattern
fputc(' ', out);
- if (prev_type != Tag::GENERIC) fputs("▲", out);
- if (prev_type != Tag::GENERIC && next_type != Tag::GENERIC) fputc('/', out);
- if (next_type != Tag::GENERIC) fputs("▼", out);
+ if (prev_type != FLD_MERGEBACK_TAG_GENERIC) fputs("▲", out);
+ if (prev_type != FLD_MERGEBACK_TAG_GENERIC && next_type != FLD_MERGEBACK_TAG_GENERIC) fputc('/', out);
+ if (next_type != FLD_MERGEBACK_TAG_GENERIC) fputs("▼", out);
fputs(" fl//\n", out);
}
@@ -431,24 +431,24 @@ int Mergeback::analyse() {
code_crc = fld::io::Code_Writer::block_crc(line, -1, code_crc, &line_start);
} else {
// if this line has a tag, read all tag data
- Tag tag_type = Tag::UNUSED_;
+ Tag tag_type = FLD_MERGEBACK_TAG_UNUSED_;
uint16_t uid = 0;
uint32_t tag_crc = 0;
bool tag_ok = read_tag(tag, &tag_type, &uid, &tag_crc);
- if (!tag_ok || tag_type==Tag::UNUSED_ ) {
+ if (!tag_ok || tag_type==FLD_MERGEBACK_TAG_UNUSED_ ) {
tag_error = 1;
return -1;
}
if (code_crc != tag_crc) {
switch (tag_type) {
- case Tag::GENERIC:
+ case FLD_MERGEBACK_TAG_GENERIC:
num_changed_structure++;
break;
- case Tag::MENU_CALLBACK:
- case Tag::WIDGET_CALLBACK:
+ case FLD_MERGEBACK_TAG_MENU_CALLBACK:
+ case FLD_MERGEBACK_TAG_WIDGET_CALLBACK:
analyse_callback(code_crc, tag_crc, uid);
break;
- case Tag::CODE:
+ case FLD_MERGEBACK_TAG_CODE:
analyse_code(code_crc, tag_crc, uid);
break;
default: break;
@@ -483,7 +483,7 @@ int Mergeback::apply_callback(long block_end, long block_start, unsigned long co
*/
int Mergeback::apply_code(long block_end, long block_start, unsigned long code_crc, int uid) {
Node *tp = proj_.tree.find_by_uid(uid);
- if (tp && tp->is_a(Type::Code)) {
+ if (tp && tp->is_a(FLD_NODE_TYPE_Code)) {
std::string cb = tp->name(); cb += "\n";
unsigned long project_crc = fld::io::Code_Writer::block_crc(cb.c_str());
if (project_crc!=code_crc) {
@@ -525,18 +525,18 @@ int Mergeback::apply() {
block_end = ::ftell(code);
} else {
// if this line has a tag, read all tag data
- Tag tag_type = Tag::UNUSED_;
+ Tag tag_type = FLD_MERGEBACK_TAG_UNUSED_;
uint16_t uid = 0;
uint32_t tag_crc = 0;
bool tag_ok = read_tag(tag, &tag_type, &uid, &tag_crc);
- if (!tag_ok || tag_type==Tag::UNUSED_ ) {
+ if (!tag_ok || tag_type==FLD_MERGEBACK_TAG_UNUSED_ ) {
tag_error = 1;
return -1;
}
if (code_crc != tag_crc) {
- if (tag_type==Tag::MENU_CALLBACK || tag_type==Tag::WIDGET_CALLBACK) {
+ if (tag_type==FLD_MERGEBACK_TAG_MENU_CALLBACK || tag_type==FLD_MERGEBACK_TAG_WIDGET_CALLBACK) {
changed |= apply_callback(block_end, block_start, code_crc, uid);
- } else if (tag_type==Tag::CODE) {
+ } else if (tag_type==FLD_MERGEBACK_TAG_CODE) {
changed |= apply_code(block_end, block_start, code_crc, uid);
}
}
@@ -562,7 +562,7 @@ int Mergeback::merge_back(const std::string &s, const std::string &p, Task task)
code = fl_fopen(s.c_str(), "rb");
if (!code) return -2;
do { // no actual loop, just make sure we close the code file
- if (task == Task::ANALYSE) {
+ if (task == FLD_MERGEBACK_TASK_ANALYSE) {
analyse();
if (tag_error) {ret = -1; break; }
if (num_changed_structure) ret |= 1;
@@ -571,14 +571,14 @@ int Mergeback::merge_back(const std::string &s, const std::string &p, Task task)
if (num_possible_override) ret |= 8;
break;
}
- if (task == Task::INTERACTIVE) {
+ if (task == FLD_MERGEBACK_TASK_INTERACTIVE) {
analyse();
ret = ask_user_to_merge(s, p);
if (ret != 1)
return ret;
- task = Task::APPLY; // fall through
+ task = FLD_MERGEBACK_TASK_APPLY; // fall through
}
- if (task == Task::APPLY_IF_SAFE) {
+ if (task == FLD_MERGEBACK_TASK_APPLY_IF_SAFE) {
analyse();
if (tag_error || num_changed_structure || num_possible_override) {
ret = -1;
@@ -588,9 +588,9 @@ int Mergeback::merge_back(const std::string &s, const std::string &p, Task task)
ret = 0;
break;
}
- task = Task::APPLY; // fall through
+ task = FLD_MERGEBACK_TASK_APPLY; // fall through
}
- if (task == Task::APPLY) {
+ if (task == FLD_MERGEBACK_TASK_APPLY) {
ret = apply();
if (ret == 1) {
proj_.set_modflag(1);
@@ -660,7 +660,7 @@ int mergeback_code_files(Project &proj, Mergeback::Feedback feedback)
if (code_filename.empty())
code_filename = proj.codefile_path() + proj.codefile_name();
if (!Fluid.batch_mode) proj.enter_project_dir();
- int c = merge_back(proj, code_filename, proj_filename, Mergeback::Task::INTERACTIVE);
+ int c = merge_back(proj, code_filename, proj_filename, FLD_MERGEBACK_TASK_INTERACTIVE);
if (c>0) {
// update the project to reflect the changes
proj.set_modflag(1);
diff --git a/fluid/proj/mergeback.h b/fluid/proj/mergeback.h
index a515b1815..48cc4e400 100644
--- a/fluid/proj/mergeback.h
+++ b/fluid/proj/mergeback.h
@@ -33,15 +33,26 @@ namespace proj {
/** Class that implements the MergeBack functionality.
\see merge_back(const std::string &s, int task)
*/
+enum {
+ FLD_MERGEBACK_TAG_GENERIC = 0,
+ FLD_MERGEBACK_TAG_CODE,
+ FLD_MERGEBACK_TAG_MENU_CALLBACK,
+ FLD_MERGEBACK_TAG_WIDGET_CALLBACK,
+ FLD_MERGEBACK_TAG_UNUSED_
+};
+
+enum {
+ FLD_MERGEBACK_TASK_ANALYSE = 0,
+ FLD_MERGEBACK_TASK_INTERACTIVE,
+ FLD_MERGEBACK_TASK_APPLY,
+ FLD_MERGEBACK_TASK_APPLY_IF_SAFE = 3
+};
+
class Mergeback
{
public:
- enum class Tag {
- GENERIC = 0, CODE, MENU_CALLBACK, WIDGET_CALLBACK, UNUSED_
- };
- enum class Task {
- ANALYSE = 0, INTERACTIVE, APPLY, APPLY_IF_SAFE = 3
- };
+ typedef int Tag;
+ typedef int Task;
enum Feedback { QUIET = 0, CHATTY = 1 };
protected:
/// Apply mergeback for this project.
diff --git a/fluid/proj/undo.cxx b/fluid/proj/undo.cxx
index 0f1a478fb..01d1b68c2 100644
--- a/fluid/proj/undo.cxx
+++ b/fluid/proj/undo.cxx
@@ -82,7 +82,7 @@ char *Undo::filename(int level) {
void Undo::redo() {
// int undo_item = main_menubar->find_index(undo_cb);
// int redo_item = main_menubar->find_index(redo_cb);
- once_type_ = OnceType::ALWAYS;
+ once_type_ = FLD_UNDO_ONCETYPE_ALWAYS;
if (current_ >= last_) {
fl_beep();
@@ -126,7 +126,7 @@ void Undo::redo() {
void Undo::undo() {
// int undo_item = main_menubar->find_index(undo_cb);
// int redo_item = main_menubar->find_index(redo_cb);
- once_type_ = OnceType::ALWAYS;
+ once_type_ = FLD_UNDO_ONCETYPE_ALWAYS;
if (current_ <= 0) {
fl_beep();
@@ -184,8 +184,8 @@ void Undo::undo() {
\return 1 if the checkpoint was set, 0 if this is a repeating event
*/
int Undo::checkpoint(OnceType type) {
- if (type == OnceType::ALWAYS) {
- once_type_ = OnceType::ALWAYS;
+ if (type == FLD_UNDO_ONCETYPE_ALWAYS) {
+ once_type_ = FLD_UNDO_ONCETYPE_ALWAYS;
return 0;
}
if (paused_) return 0;
@@ -209,7 +209,7 @@ void Undo::checkpoint() {
// int undo_item = main_menubar->find_index(undo_cb);
// int redo_item = main_menubar->find_index(redo_cb);
- once_type_ = OnceType::ALWAYS;
+ once_type_ = FLD_UNDO_ONCETYPE_ALWAYS;
// Save the current UI to a checkpoint file...
const char *file = filename(current_);
diff --git a/fluid/proj/undo.h b/fluid/proj/undo.h
index 7bb02b72f..de038908a 100644
--- a/fluid/proj/undo.h
+++ b/fluid/proj/undo.h
@@ -27,14 +27,16 @@ class Project;
namespace proj {
+enum {
+ FLD_UNDO_ONCETYPE_ALWAYS = 0,
+ FLD_UNDO_ONCETYPE_WINDOW_RESIZE
+};
+
class Undo
{
public:
- enum class OnceType {
- ALWAYS = 0,
- WINDOW_RESIZE
- };
+ typedef int OnceType;
/// Link Undo class to this project.
Project &proj_;
@@ -53,7 +55,7 @@ public:
// length w/o filename
unsigned int path_len_ = 0;
/// Suspend further undos of the same type
- OnceType once_type_ = OnceType::ALWAYS;
+ OnceType once_type_ = FLD_UNDO_ONCETYPE_ALWAYS;
public:
diff --git a/fluid/rsrcs/pixmaps.cxx b/fluid/rsrcs/pixmaps.cxx
index 640cf79d9..486c98267 100644
--- a/fluid/rsrcs/pixmaps.cxx
+++ b/fluid/rsrcs/pixmaps.cxx
@@ -90,7 +90,7 @@ Fl_Pixmap *protected_pixmap;
Fl_Pixmap *invisible_pixmap;
Fl_Pixmap *compressed_pixmap;
-Fl_Pixmap *pixmap[(int)Type::Max_] = { nullptr };
+Fl_Pixmap *pixmap[(int)FLD_NODE_TYPE_Max_] = { nullptr };
/**
Draw a zoom cross pointing in all four diagonal directions
@@ -152,74 +152,74 @@ void loadPixmaps()
invisible_pixmap = new Fl_Pixmap(invisible_xpm); invisible_pixmap->scale(16, 16);
compressed_pixmap = new Fl_Pixmap(compressed_xpm); compressed_pixmap->scale(16, 16);
- pixmap[(int)Type::Window] = tmp = new Fl_Pixmap(flWindow_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Button] = tmp = new Fl_Pixmap(flButton_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Check_Button] = tmp = new Fl_Pixmap(flCheckButton_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Round_Button] = tmp = new Fl_Pixmap(flRoundButton_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Box] = tmp = new Fl_Pixmap(flBox_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Group] = tmp = new Fl_Pixmap(flGroup_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Function] = tmp = new Fl_Pixmap(flFunction_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Code] = tmp = new Fl_Pixmap(flCode_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::CodeBlock] = tmp = new Fl_Pixmap(flCodeBlock_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Decl] = tmp = new Fl_Pixmap(flDeclaration_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::DeclBlock] = tmp = new Fl_Pixmap(flDeclarationBlock_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Class] = tmp = new Fl_Pixmap(flClass_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Tabs] = tmp = new Fl_Pixmap(flTabs_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Input] = tmp = new Fl_Pixmap(flInput_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Choice] = tmp = new Fl_Pixmap(flChoice_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Menu_Item] = tmp = new Fl_Pixmap(flMenuitem_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Menu_Bar] = tmp = new Fl_Pixmap(flMenubar_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Submenu] = tmp = new Fl_Pixmap(flSubmenu_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Scroll] = tmp = new Fl_Pixmap(flScroll_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Tile] = tmp = new Fl_Pixmap(flTile_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Wizard] = tmp = new Fl_Pixmap(flWizard_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Pack] = tmp = new Fl_Pixmap(flPack_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Return_Button] = tmp = new Fl_Pixmap(flReturnButton_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Light_Button] = tmp = new Fl_Pixmap(flLightButton_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Repeat_Button] = tmp = new Fl_Pixmap(flRepeatButton_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Menu_Button] = tmp = new Fl_Pixmap(flMenuButton_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Output] = tmp = new Fl_Pixmap(flOutput_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Text_Display] = tmp = new Fl_Pixmap(flTextDisplay_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Text_Editor] = tmp = new Fl_Pixmap(flTextEdit_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::File_Input] = tmp = new Fl_Pixmap(flFileInput_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Browser] = tmp = new Fl_Pixmap(flBrowser_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Check_Browser] = tmp = new Fl_Pixmap(flCheckBrowser_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::File_Browser] = tmp = new Fl_Pixmap(flFileBrowser_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Clock] = tmp = new Fl_Pixmap(flClock_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Help_View] = tmp = new Fl_Pixmap(flHelp_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Progress] = tmp = new Fl_Pixmap(flProgress_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Slider] = tmp = new Fl_Pixmap(flSlider_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Scrollbar] = tmp = new Fl_Pixmap(flScrollBar_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Value_Slider] = tmp = new Fl_Pixmap(flValueSlider_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Adjuster] = tmp = new Fl_Pixmap(flAdjuster_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Counter] = tmp = new Fl_Pixmap(flCounter_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Dial] = tmp = new Fl_Pixmap(flDial_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Roller] = tmp = new Fl_Pixmap(flRoller_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Value_Input] = tmp = new Fl_Pixmap(flValueInput_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Value_Output] = tmp = new Fl_Pixmap(flValueOutput_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Comment] = tmp = new Fl_Pixmap(flComment_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Spinner] = tmp = new Fl_Pixmap(flSpinner_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Widget_Class] = tmp = new Fl_Pixmap(flWidgetClass_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Data] = tmp = new Fl_Pixmap(flData_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Tree] = tmp = new Fl_Pixmap(flTree_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Table] = tmp = new Fl_Pixmap(flTable_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Terminal] = tmp = new Fl_Pixmap(flSimpleTerminal_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Input_Choice] = tmp = new Fl_Pixmap(flInputChoice_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Checkbox_Menu_Item] = tmp = new Fl_Pixmap(flCheckMenuitem_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Radio_Menu_Item] = tmp = new Fl_Pixmap(flRadioMenuitem_xpm); tmp->scale(16, 16);
-
- pixmap[(int)Type::Flex] = tmp = new Fl_Pixmap(flFlex_xpm); tmp->scale(16, 16);
- pixmap[(int)Type::Grid] = tmp = new Fl_Pixmap(flGrid_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Window] = tmp = new Fl_Pixmap(flWindow_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Button] = tmp = new Fl_Pixmap(flButton_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Check_Button] = tmp = new Fl_Pixmap(flCheckButton_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Round_Button] = tmp = new Fl_Pixmap(flRoundButton_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Box] = tmp = new Fl_Pixmap(flBox_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Group] = tmp = new Fl_Pixmap(flGroup_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Function] = tmp = new Fl_Pixmap(flFunction_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Code] = tmp = new Fl_Pixmap(flCode_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_CodeBlock] = tmp = new Fl_Pixmap(flCodeBlock_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Decl] = tmp = new Fl_Pixmap(flDeclaration_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_DeclBlock] = tmp = new Fl_Pixmap(flDeclarationBlock_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Class] = tmp = new Fl_Pixmap(flClass_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Tabs] = tmp = new Fl_Pixmap(flTabs_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Input] = tmp = new Fl_Pixmap(flInput_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Choice] = tmp = new Fl_Pixmap(flChoice_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Menu_Item] = tmp = new Fl_Pixmap(flMenuitem_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Menu_Bar] = tmp = new Fl_Pixmap(flMenubar_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Submenu] = tmp = new Fl_Pixmap(flSubmenu_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Scroll] = tmp = new Fl_Pixmap(flScroll_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Tile] = tmp = new Fl_Pixmap(flTile_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Wizard] = tmp = new Fl_Pixmap(flWizard_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Pack] = tmp = new Fl_Pixmap(flPack_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Return_Button] = tmp = new Fl_Pixmap(flReturnButton_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Light_Button] = tmp = new Fl_Pixmap(flLightButton_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Repeat_Button] = tmp = new Fl_Pixmap(flRepeatButton_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Menu_Button] = tmp = new Fl_Pixmap(flMenuButton_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Output] = tmp = new Fl_Pixmap(flOutput_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Text_Display] = tmp = new Fl_Pixmap(flTextDisplay_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Text_Editor] = tmp = new Fl_Pixmap(flTextEdit_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_File_Input] = tmp = new Fl_Pixmap(flFileInput_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Browser] = tmp = new Fl_Pixmap(flBrowser_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Check_Browser] = tmp = new Fl_Pixmap(flCheckBrowser_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_File_Browser] = tmp = new Fl_Pixmap(flFileBrowser_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Clock] = tmp = new Fl_Pixmap(flClock_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Help_View] = tmp = new Fl_Pixmap(flHelp_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Progress] = tmp = new Fl_Pixmap(flProgress_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Slider] = tmp = new Fl_Pixmap(flSlider_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Scrollbar] = tmp = new Fl_Pixmap(flScrollBar_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Value_Slider] = tmp = new Fl_Pixmap(flValueSlider_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Adjuster] = tmp = new Fl_Pixmap(flAdjuster_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Counter] = tmp = new Fl_Pixmap(flCounter_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Dial] = tmp = new Fl_Pixmap(flDial_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Roller] = tmp = new Fl_Pixmap(flRoller_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Value_Input] = tmp = new Fl_Pixmap(flValueInput_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Value_Output] = tmp = new Fl_Pixmap(flValueOutput_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Comment] = tmp = new Fl_Pixmap(flComment_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Spinner] = tmp = new Fl_Pixmap(flSpinner_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Widget_Class] = tmp = new Fl_Pixmap(flWidgetClass_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Data] = tmp = new Fl_Pixmap(flData_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Tree] = tmp = new Fl_Pixmap(flTree_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Table] = tmp = new Fl_Pixmap(flTable_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Terminal] = tmp = new Fl_Pixmap(flSimpleTerminal_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Input_Choice] = tmp = new Fl_Pixmap(flInputChoice_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Checkbox_Menu_Item] = tmp = new Fl_Pixmap(flCheckMenuitem_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Radio_Menu_Item] = tmp = new Fl_Pixmap(flRadioMenuitem_xpm); tmp->scale(16, 16);
+
+ pixmap[(int)FLD_NODE_TYPE_Flex] = tmp = new Fl_Pixmap(flFlex_xpm); tmp->scale(16, 16);
+ pixmap[(int)FLD_NODE_TYPE_Grid] = tmp = new Fl_Pixmap(flGrid_xpm); tmp->scale(16, 16);
fl_add_symbol("fd_zoom", fd_zoom, 1);
}
diff --git a/fluid/tools/autodoc.cxx b/fluid/tools/autodoc.cxx
index 4c1dc5bff..51afe76c6 100644
--- a/fluid/tools/autodoc.cxx
+++ b/fluid/tools/autodoc.cxx
@@ -503,33 +503,33 @@ void run_autodoc(const std::string &target_dir) {
t_win->open();
t_win->open();
- // -- Type::Function
+ // -- FLD_NODE_TYPE_Function
select_only(t_func);
fl_snapshot((target_dir + "function_panel.png").c_str(), func_tabs_main, tab_margin, row_blend);
- // -- Type::Code
+ // -- FLD_NODE_TYPE_Code
select_only(t_code);
fl_snapshot((target_dir + "code_panel.png").c_str(), code_tabs_main, tab_margin, row_blend);
- // -- Type::CodeBlock
+ // -- FLD_NODE_TYPE_CodeBlock
select_only(t_codeblock);
fl_snapshot((target_dir + "codeblock_panel.png").c_str(), declblock_tabs_main, tab_margin, row_blend);
- // -- Type::Decl
+ // -- FLD_NODE_TYPE_Decl
select_only(t_decl);
fl_snapshot((target_dir + "decl_panel.png").c_str(), decl_tabs_main, tab_margin, row_blend);
- // -- Type::DeclBlock
+ // -- FLD_NODE_TYPE_DeclBlock
select_only(t_declblock);
fl_snapshot((target_dir + "declblock_panel.png").c_str(), declblock_tabs_main, tab_margin, row_blend);
- // -- Type::Class
+ // -- FLD_NODE_TYPE_Class
select_only(t_class);
fl_snapshot((target_dir + "class_panel.png").c_str(), class_tabs_main, tab_margin, row_blend);
- // -- Type::Widget_Class is handled like Window_Node
+ // -- FLD_NODE_TYPE_Widget_Class is handled like Window_Node
- // -- Type::Comment
+ // -- FLD_NODE_TYPE_Comment
select_only(t_comment);
fl_snapshot((target_dir + "comment_panel.png").c_str(), comment_tabs_comment, tab_margin, row_blend);
@@ -596,7 +596,7 @@ void run_autodoc(const std::string &target_dir) {
widget_tabs->value(widget_tab_grid_child);
fl_snapshot((target_dir + "wp_gridc_tab.png").c_str(), widget_tab_grid_child, tab_margin, row_blend);
- // -- Type::Data
+ // -- FLD_NODE_TYPE_Data
select_only(t_data);
fl_snapshot((target_dir + "data_panel.png").c_str(), data_tabs_data, tab_margin, row_blend);
diff --git a/fluid/widgets/Bin_Button.cxx b/fluid/widgets/Bin_Button.cxx
index 32630369a..29afddb9c 100644
--- a/fluid/widgets/Bin_Button.cxx
+++ b/fluid/widgets/Bin_Button.cxx
@@ -112,7 +112,7 @@ int fld::widget::Bin_Window_Button::handle(int inEvent)
Node *prototype = typename_to_prototype((char*)user_data());
if (prototype) {
Node *new_type = add_new_widget_from_user(prototype, Strategy::AFTER_CURRENT);
- if (new_type && new_type->is_a(Type::Window)) {
+ if (new_type && new_type->is_a(FLD_NODE_TYPE_Window)) {
Window_Node *new_window = (Window_Node*)new_type;
Fl_Window *w = (Fl_Window *)new_window->o;
w->position(Fl::event_x_root(), Fl::event_y_root());
diff --git a/fluid/widgets/Node_Browser.cxx b/fluid/widgets/Node_Browser.cxx
index 91611f876..06804125d 100644
--- a/fluid/widgets/Node_Browser.cxx
+++ b/fluid/widgets/Node_Browser.cxx
@@ -380,11 +380,11 @@ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const {
}
if ( l->is_widget()
- && !l->is_a(Type::Window)
+ && !l->is_a(FLD_NODE_TYPE_Window)
&& ((Widget_Node*)l)->o
&& !((Widget_Node*)l)->o->visible()
- && (!l->parent || ( !l->parent->is_a(Type::Tabs)
- && !l->parent->is_a(Type::Wizard) ) )
+ && (!l->parent || ( !l->parent->is_a(FLD_NODE_TYPE_Tabs)
+ && !l->parent->is_a(FLD_NODE_TYPE_Wizard) ) )
)
{
invisible_pixmap->draw(X - 17, Y);
@@ -425,7 +425,7 @@ void Node_Browser::item_draw(void *v, int X, int Y, int, int) const {
else fl_color(func_color);
copy_trunc(buf, l->title(), 55, 0, 0);
} else {
- if (l->is_a(Type::Comment)) {
+ if (l->is_a(FLD_NODE_TYPE_Comment)) {
// -- comment (in main line, not above entry)
fl_font(comment_font, textsize());
if (l->new_selected) fl_color(fl_contrast(comment_color, FL_SELECTION_COLOR));
diff --git a/lib/libfltk.a b/lib/libfltk.a
index 914c19a37..d8dd7cddb 100644
--- a/lib/libfltk.a
+++ b/lib/libfltk.a
Binary files differ
diff --git a/lib/libfltk_images.a b/lib/libfltk_images.a
index 34645bf0b..7292e1174 100644
--- a/lib/libfltk_images.a
+++ b/lib/libfltk_images.a
Binary files differ