summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-05-30 07:32:29 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-05-30 07:32:29 +0000
commit5b8d9e746ab17af2d36ea6080055f78a97d383b6 (patch)
tree699baa25712ec1db7e4d540170649f0f285fd73b
parent107304f75f1fca39fe46195ac938ca2100361800 (diff)
Fluid: Added a pixmap for WidgetClass, added pixmap to the Widget Bin.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4383 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--fluid/Fl_Type.cxx5
-rw-r--r--fluid/Fl_Type.h1
-rw-r--r--fluid/function_panel.cxx6
-rw-r--r--fluid/function_panel.fl8
-rw-r--r--fluid/pixmaps/flWidgetClass.xpm31
5 files changed, 49 insertions, 2 deletions
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx
index bd432c21b..9b768c1d8 100644
--- a/fluid/Fl_Type.cxx
+++ b/fluid/Fl_Type.cxx
@@ -101,6 +101,7 @@ static Fl_Pixmap lock_pixmap(lock_xpm);
#include "pixmaps/flValueInput.xpm"
#include "pixmaps/flValueOutput.xpm"
#include "pixmaps/flSpinner.xpm"
+#include "pixmaps/flWidgetClass.xpm"
static Fl_Pixmap window_pixmap(flWindow_xpm);
static Fl_Pixmap button_pixmap(flButton_xpm);
@@ -149,6 +150,7 @@ static Fl_Pixmap roller_pixmap(flRoller_xpm);
static Fl_Pixmap valueinput_pixmap(flValueInput_xpm);
static Fl_Pixmap valueoutput_pixmap(flValueOutput_xpm);
static Fl_Pixmap spinner_pixmap(flSpinner_xpm);
+static Fl_Pixmap widgetclass_pixmap(flWidgetClass_xpm);
Fl_Pixmap *pixmap[] = { 0, &window_pixmap, &button_pixmap, &checkbutton_pixmap, &roundbutton_pixmap, /* 0..4 */
&box_pixmap, &group_pixmap, &function_pixmap, &code_pixmap, &codeblock_pixmap, &declaration_pixmap, /* 5..10 */
@@ -158,7 +160,8 @@ Fl_Pixmap *pixmap[] = { 0, &window_pixmap, &button_pixmap, &checkbutton_pixmap,
&output_pixmap, &textdisplay_pixmap, &textedit_pixmap, &fileinput_pixmap, &browser_pixmap, /* 27..32 */
&checkbrowser_pixmap, &filebrowser_pixmap, &clock_pixmap, &help_pixmap, &progress_pixmap, /* 33..36 */
&slider_pixmap, &scrollbar_pixmap, &valueslider_pixmap, &adjuster_pixmap, &counter_pixmap, /* 37..41 */
- &dial_pixmap, &roller_pixmap, &valueinput_pixmap, &valueoutput_pixmap, &comment_pixmap, &spinner_pixmap /* 42..47 */ };
+ &dial_pixmap, &roller_pixmap, &valueinput_pixmap, &valueoutput_pixmap, &comment_pixmap, /* 42..46 */
+ &spinner_pixmap, &widgetclass_pixmap /* 47..48 */ };
////////////////////////////////////////////////////////////////
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h
index 5f6daca0e..c34d34439 100644
--- a/fluid/Fl_Type.h
+++ b/fluid/Fl_Type.h
@@ -499,6 +499,7 @@ public:
void write_code2();
Fl_Type *make();
virtual const char *type_name() {return "widget_class";}
+ int pixmapID() { return 48; }
int is_parent() const {return 1;}
int is_decl_block() const {return 1;}
int is_class() const {return 1;}
diff --git a/fluid/function_panel.cxx b/fluid/function_panel.cxx
index 1527adbec..a7de6a735 100644
--- a/fluid/function_panel.cxx
+++ b/fluid/function_panel.cxx
@@ -539,6 +539,12 @@ Fl_Window* make_widgetbin() {
o->callback((Fl_Callback*)type_make_cb, (void*)("CodeBlock"));
o->image(pixmap[9]);
}
+ { Fl_Button* o = new Fl_Button(55, 30, 25, 25);
+ o->tooltip("Widget Class");
+ o->box(FL_THIN_UP_BOX);
+ o->callback((Fl_Callback*)type_make_cb, (void*)("widget_class"));
+ o->image(pixmap[48]);
+ }
{ Fl_Button* o = new Fl_Button(5, 55, 25, 25);
o->tooltip("Declaration");
o->box(FL_THIN_UP_BOX);
diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl
index 5e4060b01..e4c668100 100644
--- a/fluid/function_panel.fl
+++ b/fluid/function_panel.fl
@@ -355,7 +355,7 @@ Function {make_widgetbin()} {open
label {Widget Bin}
xywh {413 185 520 85} type Single hide non_modal
} {
- Fl_Group {} {
+ Fl_Group {} {open
xywh {3 3 79 79} box THIN_DOWN_BOX
} {
Fl_Button {} {
@@ -389,6 +389,12 @@ Function {make_widgetbin()} {open
code0 {o->image(pixmap[9]);}
}
Fl_Button {} {
+ user_data {"widget_class"}
+ callback type_make_cb
+ tooltip {Widget Class} xywh {55 30 25 25} box THIN_UP_BOX
+ code0 {o->image(pixmap[48]);}
+ }
+ Fl_Button {} {
user_data {"decl"}
callback type_make_cb
tooltip Declaration xywh {5 55 25 25} box THIN_UP_BOX
diff --git a/fluid/pixmaps/flWidgetClass.xpm b/fluid/pixmaps/flWidgetClass.xpm
new file mode 100644
index 000000000..79c337768
--- /dev/null
+++ b/fluid/pixmaps/flWidgetClass.xpm
@@ -0,0 +1,31 @@
+/* XPM */
+static const char *flWidgetClass_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"16 16 8 1",
+/* colors */
+"a c #606060",
+"b c #2020ff",
+"c c none",
+"d c #a0a0a0",
+"e c #8080ff",
+"f c #d0d0d0",
+"g c #c0e0c0",
+"h c #000000",
+/* pixels */
+"cccccccccccccccc",
+"cccccccccccccccc",
+"ffffffffffffffff",
+"feebbbbbbbeebeea",
+"feebbbbbbbeebeea",
+"fdddhhhhhhhhhhda",
+"fddhgggggggghdda",
+"fdhgggggggghddda",
+"fdhgggggggghddda",
+"fdhgggggggghddda",
+"fdhgggggggghddda",
+"fddhgggggggghdda",
+"fdddhhhhhhhhhhda",
+"faaaaaaaaaaaaaaa",
+"cccccccccccccccc",
+"cccccccccccccccc"
+};