FLUID: using symbols instead of integers

This commit is contained in:
Matthias Melcher 2023-07-17 15:55:56 +02:00
parent 4d94a08bd2
commit 80ad543963
19 changed files with 290 additions and 370 deletions

View File

@ -45,7 +45,7 @@ Fl_Class_Type *current_class = NULL;
int has_toplevel_function(const char *rtype, const char *sig) {
Fl_Type *child;
for (child = Fl_Type::first; child; child = child->next) {
if (!child->is_in_class() && strcmp(child->type_name(), "Function")==0) {
if (!child->is_in_class() && (child->id() == Fl_Type::ID::Function)) {
const Fl_Function_Type *fn = (const Fl_Function_Type*)child;
if (fn->has_signature(rtype, sig))
return 1;
@ -1982,7 +1982,7 @@ void Fl_Class_Type::write_code2(Fd_Code_Writer& f) {
int Fl_Class_Type::has_function(const char *rtype, const char *sig) const {
Fl_Type *child;
for (child = next; child && child->level > level; child = child->next) {
if (child->level == level+1 && strcmp(child->type_name(), "Function")==0) {
if (child->level == level+1 && (child->id() == Fl_Type::ID::Function)) {
const Fl_Function_Type *fn = (const Fl_Function_Type*)child;
if (fn->has_signature(rtype, sig))
return 1;

View File

@ -61,7 +61,7 @@ public:
int is_parent() const FL_OVERRIDE {return 1;}
int is_code_block() const FL_OVERRIDE {return 1;}
int is_public() const FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 7; }
ID id() const FL_OVERRIDE { return ID::Function; }
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
int has_signature(const char *, const char*) const;
@ -85,7 +85,7 @@ public:
const char *type_name() FL_OVERRIDE {return "code";}
int is_code_block() const FL_OVERRIDE {return 0;}
int is_code() const FL_OVERRIDE {return 1;}
int pixmapID() FL_OVERRIDE { return 8; }
ID id() const FL_OVERRIDE { return ID::Code; }
int is_public() const FL_OVERRIDE { return -1; }
int is_editing();
int reap_editor();
@ -108,7 +108,7 @@ public:
int is_code_block() const FL_OVERRIDE {return 1;}
int is_parent() const FL_OVERRIDE {return 1;}
int is_public() const FL_OVERRIDE { return -1; }
int pixmapID() FL_OVERRIDE { return 9; }
ID id() const FL_OVERRIDE { return ID::CodeBlock; }
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
};
@ -131,7 +131,7 @@ public:
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
int is_public() const FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 10; }
ID id() const FL_OVERRIDE { return ID::Decl; }
};
// ---- Fl_Data_Type declaration
@ -150,7 +150,7 @@ public:
const char *type_name() FL_OVERRIDE {return "data";}
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 49; }
ID id() const FL_OVERRIDE { return ID::Data; }
};
// ---- Fl_DeclBlock_Type declaration
@ -172,7 +172,7 @@ public:
int is_parent() const FL_OVERRIDE {return 1;}
int is_decl_block() const FL_OVERRIDE {return 1;}
int is_public() const FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 11; }
ID id() const FL_OVERRIDE { return ID::DeclBlock; }
};
// ---- Fl_Comment_Type declaration
@ -193,7 +193,7 @@ public:
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
int is_public() const FL_OVERRIDE { return 1; }
int is_comment() const FL_OVERRIDE { return 1; }
int pixmapID() FL_OVERRIDE { return 46; }
ID id() const FL_OVERRIDE { return ID::Comment; }
};
// ---- Fl_Class_Type declaration
@ -219,7 +219,7 @@ public:
int is_decl_block() const FL_OVERRIDE {return 1;}
int is_class() const FL_OVERRIDE {return 1;}
int is_public() const FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 12; }
ID id() const FL_OVERRIDE { return ID::Class; }
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;

View File

@ -78,7 +78,7 @@ void group_cb(Fl_Widget *, void *) {
// Find the current widget:
Fl_Type *qq = Fl_Type::current;
while (qq && (!qq->is_widget() || qq->is_menu_item())) qq = qq->parent;
if (!qq || qq->level < 1 || (qq->level == 1 && !strcmp(qq->type_name(), "widget_class"))) {
if (!qq || qq->level < 1 || (qq->level == 1 && (qq->id() == Fl_Type::ID::Widget_Class))) {
fl_message("Please select widgets to group");
return;
}
@ -107,7 +107,7 @@ void ungroup_cb(Fl_Widget *, void *) {
Fl_Type *q = Fl_Type::current;
while (q && (!q->is_widget() || q->is_menu_item())) q = q->parent;
if (q) q = q->parent;
if (!q || q->level < 1 || (q->level == 1 && !strcmp(q->type_name(), "widget_class"))) {
if (!q || q->level < 1 || (q->level == 1 && (q->id() == Fl_Type::ID::Widget_Class))) {
fl_message("Please select widgets in a group");
return;
}

View File

@ -51,7 +51,7 @@ public:
void remove_child(Fl_Type*) FL_OVERRIDE;
int is_parent() const FL_OVERRIDE {return 1;}
int is_group() const FL_OVERRIDE {return 1;}
int pixmapID() FL_OVERRIDE { return 6; }
ID id() const FL_OVERRIDE { return ID::Group; }
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
void leave_live_mode() FL_OVERRIDE;
void copy_properties() FL_OVERRIDE;
@ -68,7 +68,7 @@ public:
const char *type_name() FL_OVERRIDE {return pack_type_name;}
const char *alt_type_name() FL_OVERRIDE {return "fltk::PackedGroup";}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Pack_Type();}
int pixmapID() FL_OVERRIDE { return 22; }
ID id() const FL_OVERRIDE { return ID::Pack; }
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
void copy_properties() FL_OVERRIDE;
};
@ -90,7 +90,7 @@ public:
Fl_Widget_Type *_make() FL_OVERRIDE { return new Fl_Flex_Type(); }
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
Fl_Flex *g = new Fl_Flex(X,Y,W,H); Fl_Group::current(0); return g;}
int pixmapID() FL_OVERRIDE { return 56; }
ID id() const FL_OVERRIDE { return ID::Flex; }
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
@ -117,7 +117,7 @@ public:
const char *alt_type_name() FL_OVERRIDE {return "fltk::TableGroup";}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Table_Type();}
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 51; }
ID id() const FL_OVERRIDE { return ID::Table; }
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
@ -145,7 +145,7 @@ public:
Fl_Type* click_test(int,int) FL_OVERRIDE;
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
void remove_child(Fl_Type*) FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 13; }
ID id() const FL_OVERRIDE { return ID::Tabs; }
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
int is_tabs() const FL_OVERRIDE {return 1;}
};
@ -161,7 +161,7 @@ public:
const char *type_name() FL_OVERRIDE {return scroll_type_name;}
const char *alt_type_name() FL_OVERRIDE {return "fltk::ScrollGroup";}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Scroll_Type();}
int pixmapID() FL_OVERRIDE { return 19; }
ID id() const FL_OVERRIDE { return ID::Scroll; }
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
void copy_properties() FL_OVERRIDE;
int is_scroll() const FL_OVERRIDE { return 1; }
@ -176,7 +176,7 @@ public:
const char *type_name() FL_OVERRIDE {return tile_type_name;}
const char *alt_type_name() FL_OVERRIDE {return "fltk::TileGroup";}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tile_Type();}
int pixmapID() FL_OVERRIDE { return 20; }
ID id() const FL_OVERRIDE { return ID::Tile; }
void copy_properties() FL_OVERRIDE;
};
@ -198,7 +198,7 @@ public:
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
iwizard *g = new iwizard(X,Y,W,H); Fl_Group::current(0); return g;}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Wizard_Type();}
int pixmapID() FL_OVERRIDE { return 21; }
ID id() const FL_OVERRIDE { return ID::Wizard; }
};
#endif // _FLUID_FL_GROUP_TYPE_H

View File

@ -293,11 +293,11 @@ void Fl_Menu_Item_Type::write_static(Fd_Code_Writer& f) {
Fl_Type* t = parent; while (t->is_menu_item()) t = t->parent;
Fl_Type *q = 0;
// Go up one more level for Fl_Input_Choice, as these are groups themselves
if (t && !strcmp(t->type_name(), "Fl_Input_Choice"))
if (t && (t->id() == Fl_Type::ID::Input_Choice))
f.write_c("->parent()");
for (t = t->parent; t && t->is_widget() && !is_class(); q = t, t = t->parent)
f.write_c("->parent()");
if (!q || strcmp(q->type_name(), "widget_class"))
if (!q || (q->id() != Fl_Type::ID::Widget_Class))
f.write_c("->user_data()");
f.write_c("))->%s_i(o,v);\n}\n", cn);
}

View File

@ -47,21 +47,21 @@ public:
void write_item(Fd_Code_Writer& f);
void write_code1(Fd_Code_Writer& f) FL_OVERRIDE;
void write_code2(Fd_Code_Writer& f) FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 16; }
ID id() const FL_OVERRIDE { return ID::Menu_Item; }
};
class Fl_Radio_Menu_Item_Type : public Fl_Menu_Item_Type {
public:
const char* type_name() FL_OVERRIDE {return "RadioMenuItem";}
Fl_Type* make(Strategy strategy) FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 55; }
ID id() const FL_OVERRIDE { return ID::Radio_Menu_Item; }
};
class Fl_Checkbox_Menu_Item_Type : public Fl_Menu_Item_Type {
public:
const char* type_name() FL_OVERRIDE {return "CheckMenuItem";}
Fl_Type* make(Strategy strategy) FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 54; }
ID id() const FL_OVERRIDE { return ID::Checkbox_Menu_Item; }
};
class Fl_Submenu_Type : public Fl_Menu_Item_Type {
@ -77,7 +77,7 @@ public:
void add_child(Fl_Type*a, Fl_Type*b) FL_OVERRIDE {parent->add_child(a,b);}
void move_child(Fl_Type*a, Fl_Type*b) FL_OVERRIDE {parent->move_child(a,b);}
void remove_child(Fl_Type*a) FL_OVERRIDE {parent->remove_child(a);}
int pixmapID() FL_OVERRIDE { return 18; }
ID id() const FL_OVERRIDE { return ID::Submenu; }
};
class Fl_Menu_Type : public Fl_Widget_Type {
@ -107,6 +107,7 @@ public:
Fl_Type* click_test(int x, int y) FL_OVERRIDE;
void write_code2(Fd_Code_Writer& f) FL_OVERRIDE;
void copy_properties() FL_OVERRIDE;
ID id() const FL_OVERRIDE { return ID::Menu_; }
};
extern Fl_Menu_Item button_type_menu[];
@ -126,7 +127,7 @@ public:
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
return new Fl_Menu_Button(X,Y,W,H,"menu");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Menu_Button_Type();}
int pixmapID() FL_OVERRIDE { return 26; }
ID id() const FL_OVERRIDE { return ID::Menu_Button; }
};
extern Fl_Menu_Item dummymenu[];
@ -153,7 +154,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Choice_Type();}
int pixmapID() FL_OVERRIDE { return 15; }
ID id() const FL_OVERRIDE { return ID::Choice; }
};
class Fl_Input_Choice_Type : public Fl_Menu_Type {
@ -190,7 +191,7 @@ public:
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Input_Choice_Type();}
void build_menu() FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 53; }
ID id() const FL_OVERRIDE { return ID::Input_Choice; }
void copy_properties() FL_OVERRIDE;
};
@ -205,7 +206,7 @@ public:
const char *alt_type_name() FL_OVERRIDE {return "fltk::MenuBar";}
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {return new Fl_Menu_Bar(X,Y,W,H);}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Menu_Bar_Type();}
int pixmapID() FL_OVERRIDE { return 17; }
ID id() const FL_OVERRIDE { return ID::Menu_Bar; }
};

View File

@ -780,7 +780,7 @@ void Fl_Type::copy_properties() {
*/
int Fl_Type::user_defined(const char* cbname) const {
for (Fl_Type* p = Fl_Type::first; p ; p = p->next)
if (strcmp(p->type_name(), "Function") == 0 && p->name() != 0)
if ((p->id() == Fl_Type::ID::Function) && p->name() != 0)
if (strncmp(p->name(), cbname, strlen(cbname)) == 0)
if (p->name()[strlen(cbname)] == '(')
return 1;

View File

@ -87,6 +87,31 @@ protected:
public:
typedef enum {
// administrative
Base_, Widget_, Menu_,
// non-widget
Function, Code, CodeBlock, Decl, DeclBlock, Class, Widget_Class,
Comment, Data,
// groups
Window, Group, Pack, Flex, Tabs, Scroll, Tile, Wizard,
// buttons
Button, Return_Button, Light_Button, Check_Button, Repeat_Button, Round_Button,
// valuators
Slider, Scrollbar, Value_Slider, Adjuster, Counter, Spinner, Dial,
Roller, Value_Input, Value_Output,
// text
Input, Output, Text_Editor, Text_Display, File_Input, Simple_Terminal,
// menus
Menu_Bar, Menu_Button, Choice, Input_Choice, Submenu, Menu_Item,
Checkbox_Menu_Item, Radio_Menu_Item,
// browsers
Browser, Check_Browser, File_Browser, Tree, Help_View, Table,
// misc
Box, Clock, Progress,
MaxID
} ID;
virtual ~Fl_Type();
virtual Fl_Type *make(Strategy strategy) = 0;
@ -171,7 +196,7 @@ public:
virtual int is_class() const {return 0;}
virtual int is_public() const {return 1;}
virtual int pixmapID() { return 0; }
virtual ID id() const { return ID::Base_; }
const char* class_name(const int need_nest) const;
const class Fl_Class_Type* is_in_class() const;

View File

@ -59,7 +59,7 @@ const char* subclassname(Fl_Type* l) {
if (c) return c;
if (l->is_class()) return "Fl_Group";
if (p->o->type() == FL_WINDOW+1) return "Fl_Double_Window";
if (strcmp(p->type_name(), "Fl_Input") == 0) {
if (p->id() == Fl_Type::ID::Input) {
if (p->o->type() == FL_FLOAT_INPUT) return "Fl_Float_Input";
if (p->o->type() == FL_INT_INPUT) return "Fl_Int_Input";
}
@ -878,7 +878,7 @@ void h_cb(Fluid_Coord_Input *i, void *v) {
void wc_relative_cb(Fl_Choice *i, void *v) {
if (v == LOAD) {
if (!strcmp(current_widget->type_name(), "widget_class")) {
if (current_widget->id() == Fl_Type::ID::Widget_Class) {
i->show();
i->value(((Fl_Widget_Class_Type *)current_widget)->wc_relative);
} else {
@ -888,7 +888,7 @@ void wc_relative_cb(Fl_Choice *i, void *v) {
int mod = 0;
undo_checkpoint();
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
if (o->selected && !strcmp(current_widget->type_name(), "widget_class")) {
if (o->selected && (current_widget->id() == Fl_Type::ID::Widget_Class)) {
Fl_Widget_Class_Type *t = (Fl_Widget_Class_Type *)o;
t->wc_relative = i->value();
mod = 1;
@ -1049,7 +1049,7 @@ void down_box_cb(Fl_Choice* i, void *v) {
int n;
if (current_widget->is_button() && !current_widget->is_menu_item())
n = ((Fl_Button*)(current_widget->o))->down_box();
else if (!strcmp(current_widget->type_name(), "Fl_Input_Choice"))
else if (current_widget->id() == Fl_Type::ID::Input_Choice)
n = ((Fl_Input_Choice*)(current_widget->o))->down_box();
else if (current_widget->is_menu_button())
n = ((Fl_Menu_*)(current_widget->o))->down_box();
@ -1072,7 +1072,7 @@ void down_box_cb(Fl_Choice* i, void *v) {
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
((Fl_Button*)(q->o))->down_box((Fl_Boxtype)n);
if (((Fl_Button*)(q->o))->value()) q->redraw();
} else if (!strcmp(o->type_name(), "Fl_Input_Choice")) {
} else if (o->id() == Fl_Type::ID::Input_Choice) {
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
((Fl_Input_Choice*)(q->o))->down_box((Fl_Boxtype)n);
} else if (o->is_menu_button()) {
@ -1278,9 +1278,9 @@ void visible_cb(Fl_Light_Button* i, void* v) {
n ? q->o->show() : q->o->hide();
q->redraw();
if (n && q->parent && q->parent->type_name()) {
if (!strcmp(q->parent->type_name(), "Fl_Tabs")) {
if (q->parent->id() == Fl_Type::ID::Tabs) {
((Fl_Tabs *)q->o->parent())->value(q->o);
} else if (!strcmp(q->parent->type_name(), "Fl_Wizard")) {
} else if (q->parent->id() == Fl_Type::ID::Wizard) {
((Fl_Wizard *)q->o->parent())->value(q->o);
}
}
@ -1439,7 +1439,7 @@ void color_common(Fl_Color c) {
if (o->selected && o->is_widget()) {
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
q->o->color(c); q->o->redraw();
if (q->parent && q->parent->type_name() == tabs_type_name) {
if (q->parent && (q->parent->id() == Fl_Type::ID::Tabs)) {
if (q->o->parent()) q->o->parent()->redraw();
}
mod = 1;
@ -2810,7 +2810,7 @@ void Fl_Widget_Type::write_static(Fd_Code_Writer& f) {
Fl_Type *q = 0;
for (Fl_Type* p = parent; p && p->is_widget(); q = p, p = p->parent)
f.write_c("->parent()");
if (!q || strcmp(q->type_name(), "widget_class"))
if (!q || (q->id() != Fl_Type::ID::Widget_Class))
f.write_c("->user_data()");
f.write_c("))->%s_i(o,v);\n}\n", cn);
}
@ -3036,7 +3036,7 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) {
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);
} else if (!strcmp(type_name(), "Fl_Input_Choice")) {
} else if (id() == Fl_Type::ID::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()));
@ -3212,7 +3212,7 @@ void Fl_Widget_Type::write_properties(Fd_Project_Writer &f) {
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 (!strcmp(type_name(), "Fl_Input_Choice")) {
} else if (id() == Fl_Type::ID::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()));}
@ -3344,7 +3344,7 @@ void Fl_Widget_Type::read_property(Fd_Project_Reader &f, const char *c) {
if (x == ZERO_ENTRY) x = 0;
((Fl_Button*)o)->down_box((Fl_Boxtype)x);
}
} else if (!strcmp(type_name(), "Fl_Input_Choice") && !strcmp(c,"down_box")) {
} else if ((id() == Fl_Type::ID::Input_Choice) && !strcmp(c,"down_box")) {
const char* value = f.read_word();
if ((x = boxnumber(value))) {
if (x == ZERO_ENTRY) x = 0;

View File

@ -102,6 +102,7 @@ public:
virtual int textstuff(int what, Fl_Font &, int &, Fl_Color &);
virtual Fl_Menu_Item *subtypes();
ID id() const FL_OVERRIDE { return ID::Widget_; }
int is_widget() const FL_OVERRIDE;
int is_public() const FL_OVERRIDE;

View File

@ -688,8 +688,8 @@ void check_redraw_corresponding_parent(Fl_Type *s) {
if( !s || !s->selected || !s->is_widget()) return;
for (Fl_Type *i=s; i && i->parent; i=i->parent) {
if (i->is_group() && prev_parent &&
(!strcmp(i->type_name(), "Fl_Tabs") ||
!strcmp(i->type_name(), "Fl_Wizard"))) {
( (i->id() == Fl_Type::ID::Tabs) ||
(i->id() == Fl_Type::ID::Wizard))) {
((Fl_Tabs*)((Fl_Widget_Type*)i)->o)->value(prev_parent->o);
return;
}

View File

@ -70,7 +70,7 @@ protected:
Fl_Widget *widget(int,int,int,int) FL_OVERRIDE {return 0;}
int recalc; // set by fix_overlay()
void moveallchildren();
int pixmapID() FL_OVERRIDE { return 1; }
ID id() const FL_OVERRIDE { return ID::Window; }
void open_();
public:
@ -139,7 +139,7 @@ public:
void write_code2(Fd_Code_Writer& f) FL_OVERRIDE;
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
const char *type_name() FL_OVERRIDE {return "widget_class";}
int pixmapID() FL_OVERRIDE { return 48; }
ID id() const FL_OVERRIDE { return ID::Widget_Class; }
int is_parent() const FL_OVERRIDE {return 1;}
int is_code_block() const FL_OVERRIDE {return 1;}
int is_decl_block() const FL_OVERRIDE {return 1;}

View File

@ -663,7 +663,7 @@ Fl_Type* Fd_Code_Writer::write_code(Fl_Type* p) {
if (p->is_widget() && p->is_class()) {
// Handle widget classes specially
for (q = p->next; q && q->level > p->level;) {
if (strcmp(q->type_name(), "Function")) q = write_code(q);
if (q->id() != Fl_Type::ID::Function) q = write_code(q);
else {
int level = q->level;
do {
@ -676,7 +676,7 @@ Fl_Type* Fd_Code_Writer::write_code(Fl_Type* p) {
p->write_code2(*this);
for (q = p->next; q && q->level > p->level;) {
if (!strcmp(q->type_name(), "Function")) q = write_code(q);
if (q->id() == Fl_Type::ID::Function) q = write_code(q);
else {
int level = q->level;
do {

View File

@ -53,7 +53,7 @@ public:
Fl_Widget *widget(int x,int y,int w, int h) FL_OVERRIDE {
return new Fl_Box(x,y,w,h,"label");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Box_Type();}
int pixmapID() FL_OVERRIDE { return 5; }
ID id() const FL_OVERRIDE { return ID::Box; }
};
static Fl_Box_Type Fl_Box_type;
@ -79,7 +79,7 @@ public:
return new Fl_Button(x,y,w,h,"button");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Button_Type();}
int is_button() const FL_OVERRIDE {return 1;}
int pixmapID() FL_OVERRIDE { return 2; }
ID id() const FL_OVERRIDE { return ID::Button; }
};
static Fl_Button_Type Fl_Button_type;
@ -99,7 +99,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Return_Button(x,y,w,h,"button");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Return_Button_Type();}
int pixmapID() FL_OVERRIDE { return 23; }
ID id() const FL_OVERRIDE { return ID::Return_Button; }
};
static Fl_Return_Button_Type Fl_Return_Button_type;
@ -113,7 +113,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Repeat_Button(x,y,w,h,"button");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Repeat_Button_Type();}
int pixmapID() FL_OVERRIDE { return 25; }
ID id() const FL_OVERRIDE { return ID::Repeat_Button; }
};
static Fl_Repeat_Button_Type Fl_Repeat_Button_type;
@ -131,7 +131,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Light_Button(x,y,w,h,"button");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Light_Button_Type();}
int pixmapID() FL_OVERRIDE { return 24; }
ID id() const FL_OVERRIDE { return ID::Light_Button; }
};
static Fl_Light_Button_Type Fl_Light_Button_type;
@ -149,7 +149,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Check_Button(x,y,w,h,"button");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Check_Button_Type();}
int pixmapID() FL_OVERRIDE { return 3; }
ID id() const FL_OVERRIDE { return ID::Check_Button; }
};
static Fl_Check_Button_Type Fl_Check_Button_type;
@ -167,7 +167,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Round_Button(x,y,w,h,"button");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Round_Button_Type();}
int pixmapID() FL_OVERRIDE { return 4; }
ID id() const FL_OVERRIDE { return ID::Round_Button; }
};
static Fl_Round_Button_Type Fl_Round_Button_type;
@ -214,7 +214,7 @@ public:
return b;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Browser_Type();}
int pixmapID() FL_OVERRIDE { return 31; }
ID id() const FL_OVERRIDE { return ID::Browser; }
};
static Fl_Browser_Type Fl_Browser_type;
@ -261,7 +261,7 @@ public:
return b;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Check_Browser_Type();}
int pixmapID() FL_OVERRIDE { return 32; }
ID id() const FL_OVERRIDE { return ID::Check_Browser; }
};
static Fl_Check_Browser_Type Fl_Check_Browser_type;
@ -300,7 +300,7 @@ public:
return b;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tree_Type();}
int pixmapID() FL_OVERRIDE { return 50; }
ID id() const FL_OVERRIDE { return ID::Tree; }
};
static Fl_Tree_Type Fl_Tree_type;
@ -331,7 +331,7 @@ public:
return b;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_File_Browser_Type();}
int pixmapID() FL_OVERRIDE { return 33; }
ID id() const FL_OVERRIDE { return ID::File_Browser; }
};
static Fl_File_Browser_Type Fl_File_Browser_type;
@ -358,13 +358,13 @@ class Fl_Counter_Type : public Fl_Widget_Type {
Fl_Menu_Item *subtypes() FL_OVERRIDE {return counter_type_menu;}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
int is_valuator() const FL_OVERRIDE {return 1;}
int pixmapID() FL_OVERRIDE { return 41; }
public:
const char *type_name() FL_OVERRIDE {return "Fl_Counter";}
const char *alt_type_name() FL_OVERRIDE {return "fltk::Counter";}
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Counter(x,y,w,h,"counter:");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Counter_Type();}
ID id() const FL_OVERRIDE { return ID::Counter; }
};
static Fl_Counter_Type Fl_Counter_type;
@ -390,7 +390,6 @@ static Fl_Menu_Item spinner_type_menu[] = {
class Fl_Spinner_Type : public Fl_Widget_Type {
Fl_Menu_Item *subtypes() FL_OVERRIDE {return spinner_type_menu;}
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
int pixmapID() FL_OVERRIDE { return 47; }
public:
void ideal_size(int &w, int &h) FL_OVERRIDE {
Fl_Spinner *myo = (Fl_Spinner *)o;
@ -409,6 +408,7 @@ public:
return new Fl_Spinner(x,y,w,h,"spinner:");
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Spinner_Type();}
ID id() const FL_OVERRIDE { return ID::Spinner; }
};
static Fl_Spinner_Type Fl_Spinner_type;
@ -457,7 +457,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Input_Type();}
int pixmapID() FL_OVERRIDE { return 14; }
ID id() const FL_OVERRIDE { return ID::Input; }
void copy_properties() FL_OVERRIDE {
Fl_Widget_Type::copy_properties();
Fl_Input_ *d = (Fl_Input_*)live_widget, *s = (Fl_Input_*)o;
@ -507,7 +507,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_File_Input_Type();}
int pixmapID() FL_OVERRIDE { return 30; }
ID id() const FL_OVERRIDE { return ID::File_Input; }
};
static Fl_File_Input_Type Fl_File_Input_type;
@ -548,7 +548,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Text_Display_Type();}
int pixmapID() FL_OVERRIDE { return 28; }
ID id() const FL_OVERRIDE { return ID::Text_Display; }
};
static Fl_Text_Display_Type Fl_Text_Display_type;
@ -589,7 +589,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Text_Editor_Type();}
int pixmapID() FL_OVERRIDE { return 29; }
ID id() const FL_OVERRIDE { return ID::Text_Editor; }
};
static Fl_Text_Editor_Type Fl_Text_Editor_type;
@ -626,7 +626,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Simple_Terminal_Type();}
int pixmapID() FL_OVERRIDE { return 52; }
ID id() const FL_OVERRIDE { return ID::Simple_Terminal; }
};
static Fl_Simple_Terminal_Type Fl_Simple_Terminal_type;
@ -640,7 +640,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Clock(x,y,w,h);}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Clock_Type();}
int pixmapID() FL_OVERRIDE { return 34; }
ID id() const FL_OVERRIDE { return ID::Clock; }
};
static Fl_Clock_Type Fl_Clock_type;
@ -670,7 +670,7 @@ public:
}
return myo;}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Help_View_Type();}
int pixmapID() FL_OVERRIDE { return 35; }
ID id() const FL_OVERRIDE { return ID::Help_View; }
};
static Fl_Help_View_Type Fl_Help_View_type;
@ -686,7 +686,7 @@ public:
myo->value(50);
return myo;}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Progress_Type();}
int pixmapID() FL_OVERRIDE { return 36; }
ID id() const FL_OVERRIDE { return ID::Progress; }
};
static Fl_Progress_Type Fl_Progress_type;
@ -701,7 +701,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Adjuster(x,y,w,h);}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Adjuster_Type();}
int pixmapID() FL_OVERRIDE { return 40; }
ID id() const FL_OVERRIDE { return ID::Adjuster; }
};
static Fl_Adjuster_Type Fl_Adjuster_type;
@ -722,7 +722,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Dial(x,y,w,h);}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Dial_Type();}
int pixmapID() FL_OVERRIDE { return 42; }
ID id() const FL_OVERRIDE { return ID::Dial; }
};
static Fl_Dial_Type Fl_Dial_type;
@ -742,7 +742,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Roller(x,y,w,h);}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Roller_Type();}
int pixmapID() FL_OVERRIDE { return 43; }
ID id() const FL_OVERRIDE { return ID::Roller; }
};
static Fl_Roller_Type Fl_Roller_type;
@ -766,7 +766,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Slider(x,y,w,h,"slider:");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Slider_Type();}
int pixmapID() FL_OVERRIDE { return 37; }
ID id() const FL_OVERRIDE { return ID::Slider; }
};
static Fl_Slider_Type Fl_Slider_type;
@ -783,7 +783,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Scrollbar(x,y,w,h);}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Scrollbar_Type();}
int pixmapID() FL_OVERRIDE { return 38; }
ID id() const FL_OVERRIDE { return ID::Scrollbar; }
};
static Fl_Scrollbar_Type Fl_Scrollbar_type;
@ -815,7 +815,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Output_Type();}
int pixmapID() FL_OVERRIDE { return 27; }
ID id() const FL_OVERRIDE { return ID::Output; }
};
static Fl_Output_Type Fl_Output_type;
@ -844,7 +844,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Input_Type();}
int pixmapID() FL_OVERRIDE { return 44; }
ID id() const FL_OVERRIDE { return ID::Value_Input; }
};
static Fl_Value_Input_Type Fl_Value_Input_type;
@ -884,7 +884,7 @@ public:
return myo;
}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Output_Type();}
int pixmapID() FL_OVERRIDE { return 45; }
ID id() const FL_OVERRIDE { return ID::Value_Output; }
};
static Fl_Value_Output_Type Fl_Value_Output_type;
@ -911,7 +911,7 @@ public:
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
return new Fl_Value_Slider(x,y,w,h,"slider:");}
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Slider_Type();}
int pixmapID() FL_OVERRIDE { return 39; }
ID id() const FL_OVERRIDE { return ID::Value_Slider; }
};
static Fl_Value_Slider_Type Fl_Value_Slider_type;
@ -1081,7 +1081,7 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
if ((t->parent && t->parent->is_flex())) {
// Do not resize or layout the widget. Flex will need the widget size.
} else if (!strcmp(wt->type_name(), "Fl_Menu_Bar")) {
} else if (wt->id() == Fl_Type::ID::Menu_Bar) {
// Move and resize the menubar across the top of the window...
wt->o->resize(0, 0, w, h);
} else {
@ -1248,12 +1248,12 @@ void fill_in_New_Menu() {
if (m->user_data()) {
Fl_Type *t = (Fl_Type*)m->user_data();
if (m->text) {
make_iconlabel( m, pixmap[t->pixmapID()], m->label() );
make_iconlabel( m, pixmap[t->id()], m->label() );
} else {
const char *n = t->type_name();
if (!strncmp(n,"Fl_",3)) n += 3;
if (!strncmp(n,"fltk::",6)) n += 6;
make_iconlabel( m, pixmap[t->pixmapID()], n );
make_iconlabel( m, pixmap[t->id()], n );
}
}
}

View File

@ -727,55 +727,55 @@ 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[7]);
o->image(pixmap[Fl_Type::ID::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[12]);
o->image(pixmap[Fl_Type::ID::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[46]);
o->image(pixmap[Fl_Type::ID::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[8]);
o->image(pixmap[Fl_Type::ID::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[9]);
o->image(pixmap[Fl_Type::ID::CodeBlock]);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(55, 46, 24, 24);
o->tooltip("Widget Class");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)type_make_cb, (void*)("widget_class"));
o->image(pixmap[48]);
o->image(pixmap[Fl_Type::ID::Widget_Class]);
} // Fl_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[10]);
o->image(pixmap[Fl_Type::ID::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[11]);
o->image(pixmap[Fl_Type::ID::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[49]);
o->image(pixmap[Fl_Type::ID::Data]);
} // Fl_Button* o
o->end();
} // Fl_Group* o
@ -793,7 +793,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[1]);
o->image(pixmap[Fl_Type::ID::Window]);
} // Widget_Bin_Window_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(114, 21, 24, 24);
o->tooltip("Group");
@ -807,7 +807,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[6]);
o->image(pixmap[Fl_Type::ID::Group]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(139, 21, 24, 24);
o->tooltip("Pack");
@ -821,7 +821,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[22]);
o->image(pixmap[Fl_Type::ID::Pack]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(89, 46, 24, 24);
o->tooltip("Tabs");
@ -835,7 +835,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[13]);
o->image(pixmap[Fl_Type::ID::Tabs]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(114, 46, 24, 24);
o->tooltip("Scroll");
@ -849,7 +849,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[19]);
o->image(pixmap[Fl_Type::ID::Scroll]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(139, 46, 24, 24);
o->tooltip("Flex");
@ -863,7 +863,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[56]);
o->image(pixmap[Fl_Type::ID::Flex]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(89, 71, 24, 24);
o->tooltip("Tile");
@ -877,7 +877,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[20]);
o->image(pixmap[Fl_Type::ID::Tile]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(114, 71, 24, 24);
o->tooltip("Wizard");
@ -891,7 +891,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[21]);
o->image(pixmap[Fl_Type::ID::Wizard]);
} // Widget_Bin_Button* o
o->end();
} // Fl_Group* o
@ -909,7 +909,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[2]);
o->image(pixmap[Fl_Type::ID::Button]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(198, 21, 24, 24);
o->tooltip("Return Button");
@ -923,7 +923,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[23]);
o->image(pixmap[Fl_Type::ID::Return_Button]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(173, 46, 24, 24);
o->tooltip("Light Button");
@ -937,7 +937,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[24]);
o->image(pixmap[Fl_Type::ID::Light_Button]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(198, 46, 24, 24);
o->tooltip("Repeat Button");
@ -951,7 +951,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[25]);
o->image(pixmap[Fl_Type::ID::Repeat_Button]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(173, 71, 24, 24);
o->tooltip("Check Button");
@ -965,7 +965,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[3]);
o->image(pixmap[Fl_Type::ID::Check_Button]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(198, 71, 24, 24);
o->tooltip("Round Button");
@ -979,7 +979,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[4]);
o->image(pixmap[Fl_Type::ID::Round_Button]);
} // Widget_Bin_Button* o
o->end();
} // Fl_Group* o
@ -997,7 +997,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[37]);
o->image(pixmap[Fl_Type::ID::Slider]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(257, 21, 24, 24);
o->tooltip("Scroll Bar");
@ -1011,7 +1011,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[38]);
o->image(pixmap[Fl_Type::ID::Scrollbar]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(282, 21, 24, 24);
o->tooltip("Value Slider");
@ -1025,7 +1025,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[39]);
o->image(pixmap[Fl_Type::ID::Value_Slider]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(307, 21, 24, 24);
o->tooltip("Value Output");
@ -1039,7 +1039,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[45]);
o->image(pixmap[Fl_Type::ID::Value_Output]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(232, 46, 24, 24);
o->tooltip("Adjuster");
@ -1053,7 +1053,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[40]);
o->image(pixmap[Fl_Type::ID::Adjuster]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(257, 46, 24, 24);
o->tooltip("Counter");
@ -1067,7 +1067,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[41]);
o->image(pixmap[Fl_Type::ID::Counter]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(282, 46, 24, 24);
o->tooltip("Dial");
@ -1081,7 +1081,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[42]);
o->image(pixmap[Fl_Type::ID::Dial]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(232, 71, 24, 24);
o->tooltip("Roller");
@ -1095,7 +1095,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[43]);
o->image(pixmap[Fl_Type::ID::Roller]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(257, 71, 24, 24);
o->tooltip("Spinner");
@ -1109,7 +1109,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[47]);
o->image(pixmap[Fl_Type::ID::Spinner]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(282, 71, 24, 24);
o->tooltip("Value Input");
@ -1123,7 +1123,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[44]);
o->image(pixmap[Fl_Type::ID::Value_Input]);
} // Widget_Bin_Button* o
o->end();
} // Fl_Group* o
@ -1141,7 +1141,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[14]);
o->image(pixmap[Fl_Type::ID::Input]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(366, 21, 24, 24);
o->tooltip("Output");
@ -1155,7 +1155,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[27]);
o->image(pixmap[Fl_Type::ID::Output]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(341, 46, 24, 24);
o->tooltip("Text Edit");
@ -1169,7 +1169,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[29]);
o->image(pixmap[Fl_Type::ID::Text_Editor]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(366, 46, 24, 24);
o->tooltip("Text Display");
@ -1183,7 +1183,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[28]);
o->image(pixmap[Fl_Type::ID::Text_Display]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(341, 71, 24, 24);
o->tooltip("File Input");
@ -1197,7 +1197,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[30]);
o->image(pixmap[Fl_Type::ID::File_Input]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(366, 71, 24, 24);
o->tooltip("Simple Terminal");
@ -1211,7 +1211,7 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Simple_Terminal"));
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
o->image(pixmap[52]);
o->image(pixmap[Fl_Type::ID::Simple_Terminal]);
} // Widget_Bin_Button* o
o->end();
} // Fl_Group* o
@ -1229,7 +1229,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[53]);
o->image(pixmap[Fl_Type::ID::Input_Choice]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(425, 21, 24, 24);
o->tooltip("Menu Item");
@ -1243,7 +1243,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[16]);
o->image(pixmap[Fl_Type::ID::Menu_Item]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(450, 21, 24, 24);
o->tooltip("Menu Bar");
@ -1257,7 +1257,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[17]);
o->image(pixmap[Fl_Type::ID::Menu_Bar]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(400, 46, 24, 24);
o->tooltip("Menu Button");
@ -1271,7 +1271,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[26]);
o->image(pixmap[Fl_Type::ID::Menu_Button]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(425, 46, 24, 24);
o->tooltip("Checkbox Menu Item");
@ -1285,7 +1285,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[54]);
o->image(pixmap[Fl_Type::ID::Checkbox_Menu_Item]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(450, 46, 24, 24);
o->tooltip("Sub Menu");
@ -1299,7 +1299,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[18]);
o->image(pixmap[Fl_Type::ID::Submenu]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(400, 71, 24, 24);
o->tooltip("Choice");
@ -1313,7 +1313,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[15]);
o->image(pixmap[Fl_Type::ID::Choice]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(425, 71, 24, 24);
o->tooltip("Radio Menu Item");
@ -1327,7 +1327,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[55]);
o->image(pixmap[Fl_Type::ID::Radio_Menu_Item]);
} // Widget_Bin_Button* o
o->end();
} // Fl_Group* o
@ -1345,7 +1345,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[31]);
o->image(pixmap[Fl_Type::ID::Browser]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(509, 21, 24, 24);
o->tooltip("Tree");
@ -1359,7 +1359,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[50]);
o->image(pixmap[Fl_Type::ID::Tree]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(484, 46, 24, 24);
o->tooltip("Check Browser");
@ -1373,7 +1373,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[32]);
o->image(pixmap[Fl_Type::ID::Check_Browser]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(509, 46, 24, 24);
o->tooltip("Help Browser");
@ -1387,7 +1387,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[35]);
o->image(pixmap[Fl_Type::ID::Help_View]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(484, 71, 24, 24);
o->tooltip("File Browser");
@ -1401,7 +1401,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[33]);
o->image(pixmap[Fl_Type::ID::File_Browser]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(509, 71, 24, 24);
o->tooltip("Table");
@ -1415,7 +1415,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[51]);
o->image(pixmap[Fl_Type::ID::Table]);
} // Widget_Bin_Button* o
o->end();
} // Fl_Group* o
@ -1433,7 +1433,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[5]);
o->image(pixmap[Fl_Type::ID::Box]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(567, 21, 24, 24);
o->tooltip("Clock");
@ -1447,7 +1447,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[34]);
o->image(pixmap[Fl_Type::ID::Clock]);
} // Widget_Bin_Button* o
{ Widget_Bin_Button* o = new Widget_Bin_Button(542, 46, 24, 24);
o->tooltip("Progress");
@ -1461,7 +1461,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[36]);
o->image(pixmap[Fl_Type::ID::Progress]);
} // Widget_Bin_Button* o
o->end();
} // Fl_Group* o

View File

@ -31,7 +31,7 @@ decl {\#include "fluid.h"} {private local
decl {\#include "custom_widgets.h"} {private global
}
decl {\#include "pixmaps.h"} {selected private local
decl {\#include "pixmaps.h"} {private local
}
decl {\#include "factory.h"} {private local
@ -550,8 +550,8 @@ Function {make_widgetbin()} {open
callback {if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
exit_cb((Fl_Widget*)o, v);
else
toggle_widgetbin_cb((Fl_Widget*)o, v);}
xywh {421 218 600 102} type Single align 80 non_modal visible
toggle_widgetbin_cb((Fl_Widget*)o, v);} open
xywh {436 243 600 102} type Single align 80 non_modal visible
} {
Fl_Group {} {
label Code open
@ -561,55 +561,55 @@ else
user_data {"Function"}
callback type_make_cb
tooltip Function xywh {5 21 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[7]);}
code0 {o->image(pixmap[Fl_Type::ID::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[12]);}
code0 {o->image(pixmap[Fl_Type::ID::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[46]);}
code0 {o->image(pixmap[Fl_Type::ID::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[8]);}
code0 {o->image(pixmap[Fl_Type::ID::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[9]);}
code0 {o->image(pixmap[Fl_Type::ID::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[48]);}
code0 {o->image(pixmap[Fl_Type::ID::Widget_Class]);}
}
Fl_Button {} {
user_data {"decl"}
callback type_make_cb
tooltip Declaration xywh {5 71 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[10]);}
code0 {o->image(pixmap[Fl_Type::ID::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[11]);}
code0 {o->image(pixmap[Fl_Type::ID::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[49]);}
code0 {o->image(pixmap[Fl_Type::ID::Data]);}
}
}
Fl_Group {} {
@ -620,56 +620,56 @@ else
user_data {"Fl_Window"}
callback type_make_cb
tooltip Window xywh {89 21 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[1]);}
code0 {o->image(pixmap[Fl_Type::ID::Window]);}
class 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[6]);}
code0 {o->image(pixmap[Fl_Type::ID::Group]);}
class 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[22]);}
code0 {o->image(pixmap[Fl_Type::ID::Pack]);}
class 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[13]);}
code0 {o->image(pixmap[Fl_Type::ID::Tabs]);}
class 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[19]);}
code0 {o->image(pixmap[Fl_Type::ID::Scroll]);}
class 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[56]);}
code0 {o->image(pixmap[Fl_Type::ID::Flex]);}
class 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[20]);}
code0 {o->image(pixmap[Fl_Type::ID::Tile]);}
class 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[21]);}
code0 {o->image(pixmap[Fl_Type::ID::Wizard]);}
class Widget_Bin_Button
}
}
@ -681,42 +681,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[2]);}
code0 {o->image(pixmap[Fl_Type::ID::Button]);}
class 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[23]);}
code0 {o->image(pixmap[Fl_Type::ID::Return_Button]);}
class 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[24]);}
code0 {o->image(pixmap[Fl_Type::ID::Light_Button]);}
class 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[25]);}
code0 {o->image(pixmap[Fl_Type::ID::Repeat_Button]);}
class 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[3]);}
code0 {o->image(pixmap[Fl_Type::ID::Check_Button]);}
class 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[4]);}
code0 {o->image(pixmap[Fl_Type::ID::Round_Button]);}
class Widget_Bin_Button
}
}
@ -728,70 +728,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[37]);}
code0 {o->image(pixmap[Fl_Type::ID::Slider]);}
class 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[38]);}
code0 {o->image(pixmap[Fl_Type::ID::Scrollbar]);}
class 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[39]);}
code0 {o->image(pixmap[Fl_Type::ID::Value_Slider]);}
class Widget_Bin_Button
}
Fl_Button {} {
user_data {"Fl_Value_Output"}
callback type_make_cb
callback type_make_cb selected
tooltip {Value Output} xywh {307 21 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[45]);}
code0 {o->image(pixmap[Fl_Type::ID::Value_Output]);}
class 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[40]);}
code0 {o->image(pixmap[Fl_Type::ID::Adjuster]);}
class 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[41]);}
code0 {o->image(pixmap[Fl_Type::ID::Counter]);}
class 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[42]);}
code0 {o->image(pixmap[Fl_Type::ID::Dial]);}
class 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[43]);}
code0 {o->image(pixmap[Fl_Type::ID::Roller]);}
class 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[47]);}
code0 {o->image(pixmap[Fl_Type::ID::Spinner]);}
class 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[44]);}
code0 {o->image(pixmap[Fl_Type::ID::Value_Input]);}
class Widget_Bin_Button
}
}
@ -803,42 +803,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[14]);}
code0 {o->image(pixmap[Fl_Type::ID::Input]);}
class 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[27]);}
code0 {o->image(pixmap[Fl_Type::ID::Output]);}
class 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[29]);}
code0 {o->image(pixmap[Fl_Type::ID::Text_Editor]);}
class 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[28]);}
code0 {o->image(pixmap[Fl_Type::ID::Text_Display]);}
class 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[30]);}
code0 {o->image(pixmap[Fl_Type::ID::File_Input]);}
class Widget_Bin_Button
}
Fl_Button {} {
user_data {"Fl_Simple_Terminal"}
callback type_make_cb
tooltip {Simple Terminal} xywh {366 71 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[52]);}
code0 {o->image(pixmap[Fl_Type::ID::Simple_Terminal]);}
class Widget_Bin_Button
}
}
@ -850,56 +850,56 @@ else
user_data {"Fl_Input_Choice"}
callback type_make_cb
tooltip {Input Choice} xywh {400 21 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[53]);}
code0 {o->image(pixmap[Fl_Type::ID::Input_Choice]);}
class 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[16]);}
code0 {o->image(pixmap[Fl_Type::ID::Menu_Item]);}
class 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[17]);}
code0 {o->image(pixmap[Fl_Type::ID::Menu_Bar]);}
class 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[26]);}
code0 {o->image(pixmap[Fl_Type::ID::Menu_Button]);}
class 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[54]);}
code0 {o->image(pixmap[Fl_Type::ID::Checkbox_Menu_Item]);}
class 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[18]);}
code0 {o->image(pixmap[Fl_Type::ID::Submenu]);}
class 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[15]);}
code0 {o->image(pixmap[Fl_Type::ID::Choice]);}
class 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[55]);}
code0 {o->image(pixmap[Fl_Type::ID::Radio_Menu_Item]);}
class Widget_Bin_Button
}
}
@ -911,42 +911,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[31]);}
code0 {o->image(pixmap[Fl_Type::ID::Browser]);}
class 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[50]);}
code0 {o->image(pixmap[Fl_Type::ID::Tree]);}
class 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[32]);}
code0 {o->image(pixmap[Fl_Type::ID::Check_Browser]);}
class 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[35]);}
code0 {o->image(pixmap[Fl_Type::ID::Help_View]);}
class 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[33]);}
code0 {o->image(pixmap[Fl_Type::ID::File_Browser]);}
class 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[51]);}
code0 {o->image(pixmap[Fl_Type::ID::Table]);}
class Widget_Bin_Button
}
}
@ -958,21 +958,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[5]);}
code0 {o->image(pixmap[Fl_Type::ID::Box]);}
class 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[34]);}
code0 {o->image(pixmap[Fl_Type::ID::Clock]);}
class 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[36]);}
code0 {o->image(pixmap[Fl_Type::ID::Progress]);}
class Widget_Bin_Button
}
}

View File

@ -16,6 +16,8 @@
#include "pixmaps.h"
#include "Fl_Type.h"
#include <FL/Fl_Pixmap.H>
#include "pixmaps/bind.xpm"
@ -87,139 +89,84 @@ Fl_Pixmap *protected_pixmap;
Fl_Pixmap *invisible_pixmap;
Fl_Pixmap *compressed_pixmap;
Fl_Pixmap *window_pixmap;
Fl_Pixmap *button_pixmap;
Fl_Pixmap *checkbutton_pixmap;
Fl_Pixmap *roundbutton_pixmap;
Fl_Pixmap *box_pixmap;
Fl_Pixmap *group_pixmap;
Fl_Pixmap *function_pixmap;
Fl_Pixmap *code_pixmap;
Fl_Pixmap *codeblock_pixmap;
Fl_Pixmap *comment_pixmap;
Fl_Pixmap *declaration_pixmap;
Fl_Pixmap *declarationblock_pixmap;
Fl_Pixmap *class_pixmap;
Fl_Pixmap *tabs_pixmap;
Fl_Pixmap *input_pixmap;
Fl_Pixmap *choice_pixmap;
Fl_Pixmap *menuitem_pixmap;
Fl_Pixmap *menubar_pixmap;
Fl_Pixmap *submenu_pixmap;
Fl_Pixmap *scroll_pixmap;
Fl_Pixmap *tile_pixmap;
Fl_Pixmap *wizard_pixmap;
Fl_Pixmap *pack_pixmap;
Fl_Pixmap *returnbutton_pixmap;
Fl_Pixmap *lightbutton_pixmap;
Fl_Pixmap *repeatbutton_pixmap;
Fl_Pixmap *menubutton_pixmap;
Fl_Pixmap *output_pixmap;
Fl_Pixmap *textdisplay_pixmap;
Fl_Pixmap *textedit_pixmap;
Fl_Pixmap *fileinput_pixmap;
Fl_Pixmap *browser_pixmap;
Fl_Pixmap *checkbrowser_pixmap;
Fl_Pixmap *filebrowser_pixmap;
Fl_Pixmap *clock_pixmap;
Fl_Pixmap *help_pixmap;
Fl_Pixmap *progress_pixmap;
Fl_Pixmap *slider_pixmap;
Fl_Pixmap *scrollbar_pixmap;
Fl_Pixmap *valueslider_pixmap;
Fl_Pixmap *adjuster_pixmap;
Fl_Pixmap *counter_pixmap;
Fl_Pixmap *dial_pixmap;
Fl_Pixmap *roller_pixmap;
Fl_Pixmap *valueinput_pixmap;
Fl_Pixmap *valueoutput_pixmap;
Fl_Pixmap *spinner_pixmap;
Fl_Pixmap *widgetclass_pixmap;
Fl_Pixmap *data_pixmap;
Fl_Pixmap *tree_pixmap;
Fl_Pixmap *table_pixmap;
Fl_Pixmap *simple_terminal_pixmap;
Fl_Pixmap *input_choice_pixmap;
Fl_Pixmap *check_menuitem_pixmap;
Fl_Pixmap *radio_menuitem_pixmap;
Fl_Pixmap *flex_pixmap;
Fl_Pixmap *pixmap[57];
Fl_Pixmap *pixmap[Fl_Type::ID::MaxID] = { NULL };
void loadPixmaps()
{
Fl_Pixmap *tmp;
bind_pixmap = new Fl_Pixmap(bind_xpm); bind_pixmap->scale(16, 16);
lock_pixmap = new Fl_Pixmap(lock_xpm); lock_pixmap->scale(16, 16);
protected_pixmap = new Fl_Pixmap(protected_xpm); protected_pixmap->scale(16, 16);
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[1] = window_pixmap = new Fl_Pixmap(flWindow_xpm); window_pixmap->scale(16, 16);
pixmap[2] = button_pixmap = new Fl_Pixmap(flButton_xpm); button_pixmap->scale(16, 16);
pixmap[3] = checkbutton_pixmap = new Fl_Pixmap(flCheckButton_xpm); checkbutton_pixmap->scale(16, 16);
pixmap[4] = roundbutton_pixmap = new Fl_Pixmap(flRoundButton_xpm); roundbutton_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Window] = tmp = new Fl_Pixmap(flWindow_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Button] = tmp = new Fl_Pixmap(flButton_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Check_Button] = tmp = new Fl_Pixmap(flCheckButton_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Round_Button] = tmp = new Fl_Pixmap(flRoundButton_xpm); tmp->scale(16, 16);
pixmap[5] = box_pixmap = new Fl_Pixmap(flBox_xpm); box_pixmap->scale(16, 16);
pixmap[6] = group_pixmap = new Fl_Pixmap(flGroup_xpm); group_pixmap->scale(16, 16);
pixmap[7] = function_pixmap = new Fl_Pixmap(flFunction_xpm); function_pixmap->scale(16, 16);
pixmap[8] = code_pixmap = new Fl_Pixmap(flCode_xpm); code_pixmap->scale(16, 16);
pixmap[9] = codeblock_pixmap = new Fl_Pixmap(flCodeBlock_xpm); codeblock_pixmap->scale(16, 16);
pixmap[10] = declaration_pixmap = new Fl_Pixmap(flDeclaration_xpm); declaration_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Box] = tmp = new Fl_Pixmap(flBox_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Group] = tmp = new Fl_Pixmap(flGroup_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Function] = tmp = new Fl_Pixmap(flFunction_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Code] = tmp = new Fl_Pixmap(flCode_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::CodeBlock] = tmp = new Fl_Pixmap(flCodeBlock_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Decl] = tmp = new Fl_Pixmap(flDeclaration_xpm); tmp->scale(16, 16);
pixmap[11] = declarationblock_pixmap = new Fl_Pixmap(flDeclarationBlock_xpm); declarationblock_pixmap->scale(16, 16);
pixmap[12] = class_pixmap = new Fl_Pixmap(flClass_xpm); class_pixmap->scale(16, 16);
pixmap[13] = tabs_pixmap = new Fl_Pixmap(flTabs_xpm); tabs_pixmap->scale(16, 16);
pixmap[14] = input_pixmap = new Fl_Pixmap(flInput_xpm); input_pixmap->scale(16, 16);
pixmap[15] = choice_pixmap = new Fl_Pixmap(flChoice_xpm); choice_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::DeclBlock] = tmp = new Fl_Pixmap(flDeclarationBlock_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Class] = tmp = new Fl_Pixmap(flClass_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Tabs] = tmp = new Fl_Pixmap(flTabs_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Input] = tmp = new Fl_Pixmap(flInput_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Choice] = tmp = new Fl_Pixmap(flChoice_xpm); tmp->scale(16, 16);
pixmap[16] = menuitem_pixmap = new Fl_Pixmap(flMenuitem_xpm); menuitem_pixmap->scale(16, 16);
pixmap[17] = menubar_pixmap = new Fl_Pixmap(flMenubar_xpm); menubar_pixmap->scale(16, 16);
pixmap[18] = submenu_pixmap = new Fl_Pixmap(flSubmenu_xpm); submenu_pixmap->scale(16, 16);
pixmap[19] = scroll_pixmap = new Fl_Pixmap(flScroll_xpm); scroll_pixmap->scale(16, 16);
pixmap[20] = tile_pixmap = new Fl_Pixmap(flTile_xpm); tile_pixmap->scale(16, 16);
pixmap[21] = wizard_pixmap = new Fl_Pixmap(flWizard_xpm); wizard_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Menu_Item] = tmp = new Fl_Pixmap(flMenuitem_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Menu_Bar] = tmp = new Fl_Pixmap(flMenubar_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Submenu] = tmp = new Fl_Pixmap(flSubmenu_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Scroll] = tmp = new Fl_Pixmap(flScroll_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Tile] = tmp = new Fl_Pixmap(flTile_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Wizard] = tmp = new Fl_Pixmap(flWizard_xpm); tmp->scale(16, 16);
pixmap[22] = pack_pixmap = new Fl_Pixmap(flPack_xpm); pack_pixmap->scale(16, 16);
pixmap[23] = returnbutton_pixmap = new Fl_Pixmap(flReturnButton_xpm); returnbutton_pixmap->scale(16, 16);
pixmap[24] = lightbutton_pixmap = new Fl_Pixmap(flLightButton_xpm); lightbutton_pixmap->scale(16, 16);
pixmap[25] = repeatbutton_pixmap = new Fl_Pixmap(flRepeatButton_xpm); repeatbutton_pixmap->scale(16, 16);
pixmap[26] = menubutton_pixmap = new Fl_Pixmap(flMenuButton_xpm); menubutton_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Pack] = tmp = new Fl_Pixmap(flPack_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Return_Button] = tmp = new Fl_Pixmap(flReturnButton_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Light_Button] = tmp = new Fl_Pixmap(flLightButton_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Repeat_Button] = tmp = new Fl_Pixmap(flRepeatButton_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Menu_Button] = tmp = new Fl_Pixmap(flMenuButton_xpm); tmp->scale(16, 16);
pixmap[27] = output_pixmap = new Fl_Pixmap(flOutput_xpm); output_pixmap->scale(16, 16);
pixmap[28] = textdisplay_pixmap = new Fl_Pixmap(flTextDisplay_xpm); textdisplay_pixmap->scale(16, 16);
pixmap[29] = textedit_pixmap = new Fl_Pixmap(flTextEdit_xpm); textedit_pixmap->scale(16, 16);
pixmap[30] = fileinput_pixmap = new Fl_Pixmap(flFileInput_xpm); fileinput_pixmap->scale(16, 16);
pixmap[31] = browser_pixmap = new Fl_Pixmap(flBrowser_xpm); browser_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Output] = tmp = new Fl_Pixmap(flOutput_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Text_Display] = tmp = new Fl_Pixmap(flTextDisplay_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Text_Editor] = tmp = new Fl_Pixmap(flTextEdit_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::File_Input] = tmp = new Fl_Pixmap(flFileInput_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Browser] = tmp = new Fl_Pixmap(flBrowser_xpm); tmp->scale(16, 16);
pixmap[32] = checkbrowser_pixmap = new Fl_Pixmap(flCheckBrowser_xpm); checkbrowser_pixmap->scale(16, 16);
pixmap[33] = filebrowser_pixmap = new Fl_Pixmap(flFileBrowser_xpm); filebrowser_pixmap->scale(16, 16);
pixmap[34] = clock_pixmap = new Fl_Pixmap(flClock_xpm); clock_pixmap->scale(16, 16);
pixmap[35] = help_pixmap = new Fl_Pixmap(flHelp_xpm); help_pixmap->scale(16, 16);
pixmap[36] = progress_pixmap = new Fl_Pixmap(flProgress_xpm); progress_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Check_Browser] = tmp = new Fl_Pixmap(flCheckBrowser_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::File_Browser] = tmp = new Fl_Pixmap(flFileBrowser_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Clock] = tmp = new Fl_Pixmap(flClock_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Help_View] = tmp = new Fl_Pixmap(flHelp_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Progress] = tmp = new Fl_Pixmap(flProgress_xpm); tmp->scale(16, 16);
pixmap[37] = slider_pixmap = new Fl_Pixmap(flSlider_xpm); slider_pixmap->scale(16, 16);
pixmap[38] = scrollbar_pixmap = new Fl_Pixmap(flScrollBar_xpm); scrollbar_pixmap->scale(16, 16);
pixmap[39] = valueslider_pixmap = new Fl_Pixmap(flValueSlider_xpm); valueslider_pixmap->scale(16, 16);
pixmap[40] = adjuster_pixmap = new Fl_Pixmap(flAdjuster_xpm); adjuster_pixmap->scale(16, 16);
pixmap[41] = counter_pixmap = new Fl_Pixmap(flCounter_xpm); counter_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Slider] = tmp = new Fl_Pixmap(flSlider_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Scrollbar] = tmp = new Fl_Pixmap(flScrollBar_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Value_Slider] = tmp = new Fl_Pixmap(flValueSlider_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Adjuster] = tmp = new Fl_Pixmap(flAdjuster_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Counter] = tmp = new Fl_Pixmap(flCounter_xpm); tmp->scale(16, 16);
pixmap[42] = dial_pixmap = new Fl_Pixmap(flDial_xpm); dial_pixmap->scale(16, 16);
pixmap[43] = roller_pixmap = new Fl_Pixmap(flRoller_xpm); roller_pixmap->scale(16, 16);
pixmap[44] = valueinput_pixmap = new Fl_Pixmap(flValueInput_xpm); valueinput_pixmap->scale(16, 16);
pixmap[45] = valueoutput_pixmap = new Fl_Pixmap(flValueOutput_xpm); valueoutput_pixmap->scale(16, 16);
pixmap[46] = comment_pixmap = new Fl_Pixmap(flComment_xpm); comment_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Dial] = tmp = new Fl_Pixmap(flDial_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Roller] = tmp = new Fl_Pixmap(flRoller_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Value_Input] = tmp = new Fl_Pixmap(flValueInput_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Value_Output] = tmp = new Fl_Pixmap(flValueOutput_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Comment] = tmp = new Fl_Pixmap(flComment_xpm); tmp->scale(16, 16);
pixmap[47] = spinner_pixmap = new Fl_Pixmap(flSpinner_xpm); spinner_pixmap->scale(16, 16);
pixmap[48] = widgetclass_pixmap = new Fl_Pixmap(flWidgetClass_xpm); widgetclass_pixmap->scale(16, 16);
pixmap[49] = data_pixmap = new Fl_Pixmap(flData_xpm); data_pixmap->scale(16, 16);
pixmap[50] = tree_pixmap = new Fl_Pixmap(flTree_xpm); tree_pixmap->scale(16, 16);
pixmap[51] = table_pixmap = new Fl_Pixmap(flTable_xpm); table_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Spinner] = tmp = new Fl_Pixmap(flSpinner_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Widget_Class] = tmp = new Fl_Pixmap(flWidgetClass_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Data] = tmp = new Fl_Pixmap(flData_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Tree] = tmp = new Fl_Pixmap(flTree_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Table] = tmp = new Fl_Pixmap(flTable_xpm); tmp->scale(16, 16);
pixmap[52] = simple_terminal_pixmap = new Fl_Pixmap(flSimpleTerminal_xpm); simple_terminal_pixmap->scale(16, 16);
pixmap[53] = input_choice_pixmap = new Fl_Pixmap(flInputChoice_xpm); input_choice_pixmap->scale(16, 16);
pixmap[54] = check_menuitem_pixmap = new Fl_Pixmap(flCheckMenuitem_xpm); check_menuitem_pixmap->scale(16, 16);
pixmap[55] = radio_menuitem_pixmap = new Fl_Pixmap(flRadioMenuitem_xpm); radio_menuitem_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Simple_Terminal] = tmp = new Fl_Pixmap(flSimpleTerminal_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Input_Choice] = tmp = new Fl_Pixmap(flInputChoice_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Checkbox_Menu_Item] = tmp = new Fl_Pixmap(flCheckMenuitem_xpm); tmp->scale(16, 16);
pixmap[Fl_Type::ID::Radio_Menu_Item] = tmp = new Fl_Pixmap(flRadioMenuitem_xpm); tmp->scale(16, 16);
pixmap[56] = flex_pixmap = new Fl_Pixmap(flFlex_xpm); flex_pixmap->scale(16, 16);
pixmap[Fl_Type::ID::Flex] = tmp = new Fl_Pixmap(flFlex_xpm); tmp->scale(16, 16);
}

View File

@ -25,60 +25,6 @@ extern Fl_Pixmap *protected_pixmap;
extern Fl_Pixmap *invisible_pixmap;
extern Fl_Pixmap *compressed_pixmap;
extern Fl_Pixmap *window_pixmap;
extern Fl_Pixmap *button_pixmap;
extern Fl_Pixmap *checkbutton_pixmap;
extern Fl_Pixmap *roundbutton_pixmap;
extern Fl_Pixmap *box_pixmap;
extern Fl_Pixmap *group_pixmap;
extern Fl_Pixmap *function_pixmap;
extern Fl_Pixmap *code_pixmap;
extern Fl_Pixmap *codeblock_pixmap;
extern Fl_Pixmap *comment_pixmap;
extern Fl_Pixmap *declaration_pixmap;
extern Fl_Pixmap *declarationblock_pixmap;
extern Fl_Pixmap *class_pixmap;
extern Fl_Pixmap *tabs_pixmap;
extern Fl_Pixmap *input_pixmap;
extern Fl_Pixmap *choice_pixmap;
extern Fl_Pixmap *menuitem_pixmap;
extern Fl_Pixmap *menubar_pixmap;
extern Fl_Pixmap *submenu_pixmap;
extern Fl_Pixmap *scroll_pixmap;
extern Fl_Pixmap *tile_pixmap;
extern Fl_Pixmap *wizard_pixmap;
extern Fl_Pixmap *pack_pixmap;
extern Fl_Pixmap *returnbutton_pixmap;
extern Fl_Pixmap *lightbutton_pixmap;
extern Fl_Pixmap *repeatbutton_pixmap;
extern Fl_Pixmap *menubutton_pixmap;
extern Fl_Pixmap *output_pixmap;
extern Fl_Pixmap *textdisplay_pixmap;
extern Fl_Pixmap *textedit_pixmap;
extern Fl_Pixmap *fileinput_pixmap;
extern Fl_Pixmap *browser_pixmap;
extern Fl_Pixmap *checkbrowser_pixmap;
extern Fl_Pixmap *filebrowser_pixmap;
extern Fl_Pixmap *clock_pixmap;
extern Fl_Pixmap *help_pixmap;
extern Fl_Pixmap *progress_pixmap;
extern Fl_Pixmap *slider_pixmap;
extern Fl_Pixmap *scrollbar_pixmap;
extern Fl_Pixmap *valueslider_pixmap;
extern Fl_Pixmap *adjuster_pixmap;
extern Fl_Pixmap *counter_pixmap;
extern Fl_Pixmap *dial_pixmap;
extern Fl_Pixmap *roller_pixmap;
extern Fl_Pixmap *valueinput_pixmap;
extern Fl_Pixmap *valueoutput_pixmap;
extern Fl_Pixmap *spinner_pixmap;
extern Fl_Pixmap *widgetclass_pixmap;
extern Fl_Pixmap *data_pixmap;
extern Fl_Pixmap *tree_pixmap;
extern Fl_Pixmap *table_pixmap;
extern Fl_Pixmap *simple_terminal_pixmap;
extern Fl_Pixmap *flex_pixmap;
extern Fl_Pixmap *pixmap[];
void loadPixmaps();

View File

@ -335,7 +335,7 @@ void Widget_Browser::item_draw(void *v, int X, int Y, int, int) const {
}
// Width=18: Draw the icon associated with the type.
Fl_Pixmap *pm = pixmap[l->pixmapID()];
Fl_Pixmap *pm = pixmap[l->id()];
if (pm) pm->draw(X-18, Y);
// Add tags on top of the icon for locked and protected types.
@ -348,8 +348,8 @@ void Widget_Browser::item_draw(void *v, int X, int Y, int, int) const {
&& !l->is_window()
&& ((Fl_Widget_Type*)l)->o
&& !((Fl_Widget_Type*)l)->o->visible()
&& (!l->parent || ( strcmp(l->parent->type_name(),"Fl_Tabs")
&& strcmp(l->parent->type_name(),"Fl_Wizard")) )
&& (!l->parent || ( (l->parent->id() != Fl_Type::ID::Tabs)
&& (l->parent->id() != Fl_Type::ID::Wizard) ) )
)
{
invisible_pixmap->draw(X - 17, Y);