diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx index 1817374ba..1c5179b28 100644 --- a/fluid/Fl_Type.cxx +++ b/fluid/Fl_Type.cxx @@ -481,7 +481,7 @@ void Fl_Type::add(Fl_Type *p) { if (p) p->add_child(this,0); open_ = 1; fixvisible(this); - modflag = 1; + set_modflag(1); widget_browser->redraw(); } @@ -562,7 +562,7 @@ int storestring(const char *n, const char * & p, int nostrip) { strlcpy(q,n,length+1); p = q; } - modflag = 1; + set_modflag(1); return 1; } @@ -604,7 +604,7 @@ Fl_Type::~Fl_Type() { if (prev) prev->next = next; else first = next; if (next) next->prev = prev; else last = prev; if (current == this) current = 0; - modflag = 1; + set_modflag(1); if (parent) parent->remove_child(this); } diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h index a3abe95b1..535c4a88f 100644 --- a/fluid/Fl_Type.h +++ b/fluid/Fl_Type.h @@ -36,6 +36,8 @@ #include "Fluid_Image.h" #include +void set_modflag(int mf); + class Fl_Type { friend class Widget_Browser; @@ -356,7 +358,6 @@ public: class Fl_Group_Type : public Fl_Widget_Type { public: - virtual void ideal_spacing(int &x, int &y) { x = y = 10; } virtual const char *type_name() {return "Fl_Group";} Fl_Widget *widget(int X,int Y,int W,int H) { igroup *g = new igroup(X,Y,W,H); Fl_Group::current(0); return g;} @@ -489,7 +490,7 @@ extern Fl_Menu_Item menu_item_type_menu[]; class Fl_Menu_Item_Type : public Fl_Widget_Type { public: Fl_Menu_Item* subtypes() {return menu_item_type_menu;} - const char* type_name() {return "Menu_Item";} + const char* type_name() {return "MenuItem";} Fl_Type* make(); int is_menu_item() const {return 1;} int is_button() const {return 1;} // this gets shortcut to work diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 828bbd932..e5a038657 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -49,7 +49,6 @@ extern const char* i18n_include; extern const char* i18n_function; extern const char* i18n_file; extern const char* i18n_set; -extern int modflag; extern Fl_Preferences fluid_prefs; @@ -144,7 +143,7 @@ void i18n_type_cb(Fl_Choice *c, void *) { break; } - modflag = 1; + set_modflag(1); } void i18n_text_cb(Fl_Input *i, void *) { @@ -157,7 +156,7 @@ void i18n_text_cb(Fl_Input *i, void *) { else if (i == i18n_include_input) i18n_include = i->value(); - modflag = 1; + set_modflag(1); } extern const char* header_file_name; @@ -619,6 +618,7 @@ void Fl_Window_Type::draw_overlay() { if (!(myo->o->align() & FL_ALIGN_INSIDE)) { // Adjust top/bottom for top/bottom labels... int ww, hh; + ww = myo->o->w(); hh = myo->o->labelsize(); myo->o->measure_label(ww, hh); if (myo->o->align() & FL_ALIGN_TOP) y -= hh; @@ -644,7 +644,7 @@ void Fl_Window_Type::draw_overlay() { if (drag) { // Check top spacing... - if (abs(d = myby - ysp) < 5) { + if (abs(d = myby - ysp) < 3) { dy -= d; if (drag & DRAG) mybt -= d; myby -= d; @@ -652,7 +652,7 @@ void Fl_Window_Type::draw_overlay() { } // Check bottom spacing... - if (abs(d = o->h() - mybt - ysp) < 5) { + if (abs(d = o->h() - mybt - ysp) < 3) { dy += d; if (drag & DRAG) myby += d; mybt += d; @@ -660,7 +660,7 @@ void Fl_Window_Type::draw_overlay() { } // Check left spacing... - if (abs(d = mybx - xsp) < 5) { + if (abs(d = mybx - xsp) < 3) { dx -= d; if (drag & DRAG) mybr -= d; mybx -= d; @@ -668,7 +668,7 @@ void Fl_Window_Type::draw_overlay() { } // Check right spacing... - if (abs(d = o->w() - mybr - xsp) < 5) { + if (abs(d = o->w() - mybr - xsp) < 3) { dx += d; if (drag & DRAG) mybx += d; mybr += d; @@ -678,8 +678,10 @@ void Fl_Window_Type::draw_overlay() { if (numselected==1 && selection && !(drag & DRAG)) { // Check ideal sizes - int w = mybr-mybx; - int h = mybt-myby; + int x,y,r,t; + newposition(mysel,x,y,r,t); + int w = r-x; + int h = t-y; int iw = w, ih = h; mysel->ideal_size(iw, ih); @@ -690,15 +692,17 @@ void Fl_Window_Type::draw_overlay() { // Resize height if (drag & TOP) { myby -= d; + y -= d; dy -= d; } else { mybt += d; + t += d; dy += d; } } // Draw height guide - draw_height(mybx < 50 ? mybx+10 : mybx-10, myby, mybt, + draw_height(mybx < 50 ? mybx+10 : mybx-10, y, t, mybx < 50 ? FL_ALIGN_RIGHT : FL_ALIGN_LEFT); } @@ -716,8 +720,8 @@ void Fl_Window_Type::draw_overlay() { } // Draw width guide - draw_width(mybx, myby < 50 ? myby+10 : myby-10, mybr, - myby < 50 ? FL_ALIGN_BOTTOM : FL_ALIGN_TOP); + draw_width(mybx, myby < 50 ? y+10 : y-10, mybr, + y < 50 ? FL_ALIGN_BOTTOM : FL_ALIGN_TOP); } } @@ -726,16 +730,31 @@ void Fl_Window_Type::draw_overlay() { for (Fl_Type *q=next; q && q->level>level; q = q->next) if (q != selection && q->is_widget()) { Fl_Widget_Type *qw = (Fl_Widget_Type*)q; - // Only check visible widgets... if (!qw->o->visible_r()) continue; - // Do horizontal alignment when the widget is within 50 + // Get bounding box of widget... + int qx = qw->o->x(); + int qr = qw->o->x() + qw->o->w(); + int qy = qw->o->y(); + int qt = qw->o->y() + qw->o->h(); + + if (!(qw->o->align() & FL_ALIGN_INSIDE)) { + // Adjust top/bottom for top/bottom labels... + int ww, hh; + ww = qw->o->w(); + hh = qw->o->labelsize(); + qw->o->measure_label(ww, hh); + if (qw->o->align() & FL_ALIGN_TOP) qy -= hh; + if (qw->o->align() & FL_ALIGN_BOTTOM) qt += hh; + } + + // Do horizontal alignment when the widget is within 25 // pixels vertically... - if (fl_min(abs(qw->o->y() - mysel->o->y() - mysel->o->h()), - abs(mysel->o->y() - qw->o->y() - qw->o->h())) < 50) { + if (fl_min(abs(qy - mysel->o->y() - mysel->o->h()), + abs(mysel->o->y() - qt)) < 25) { // Align to left of other widget... - if ((drag & (LEFT | DRAG)) && abs(d = mybx - qw->o->x()) < 5) { + if ((drag & (LEFT | DRAG)) && abs(d = mybx - qx) < 3) { dx += d; mybx += d; if (drag & DRAG) mybr += d; @@ -745,7 +764,7 @@ void Fl_Window_Type::draw_overlay() { // Align to right of other widget... if ((drag & (RIGHT | DRAG)) && - abs(d = qw->o->x() + qw->o->w() - mybr) < 5) { + abs(d = qr - mybr) < 3) { dx += d; if (drag & DRAG) mybx += d; mybr += d; @@ -755,7 +774,7 @@ void Fl_Window_Type::draw_overlay() { } // Align to top of other widget... - if ((drag & (TOP | DRAG)) && abs(d = myby - qw->o->y()) < 5) { + if ((drag & (TOP | DRAG)) && abs(d = myby - qy) < 3) { dy += d; myby += d; if (drag & DRAG) mybt += d; @@ -764,7 +783,7 @@ void Fl_Window_Type::draw_overlay() { } // Align to bottom of other widget... - if ((drag & (BOTTOM | DRAG)) && abs(d = qw->o->y() + qw->o->h() - mybt) < 5) { + if ((drag & (BOTTOM | DRAG)) && abs(d = qt - mybt) < 3) { dy += d; if (drag & DRAG) myby += d; mybt += d; @@ -776,118 +795,118 @@ void Fl_Window_Type::draw_overlay() { if (mysel->is_group()) mysel->ideal_spacing(xsp, ysp); else qw->ideal_spacing(xsp, ysp); - if ((qw->o->y()+qw->o->h())>=myby && qw->o->y()<=mybt) { + if ((qt)>=myby && qy<=mybt) { if (drag & (LEFT | DRAG)) { // Compare left of selected to left of current - if (abs(d = qw->o->x() - mybx - xsp) >= 5) - d = qw->o->x() - mybx + xsp; + if (abs(d = qx - mybx - xsp) >= 3) + d = qx - mybx + xsp; - if (abs(d) < 5) { + if (abs(d) < 3) { dx += d; mybx += d; if (drag & DRAG) mybr += d; // Draw left arrow - draw_h_arrow(mybx, (myby+mybt)/2, qw->o->x()); + draw_h_arrow(mybx, (myby+mybt)/2, qx); } // Compare left of selected to right of current - if (abs(d = qw->o->x() + qw->o->w() - mybx - xsp) >= 5) - d = qw->o->x() + qw->o->w() - mybx + xsp; + if (abs(d = qr - mybx - xsp) >= 3) + d = qr - mybx + xsp; - if (abs(d) < 5) { + if (abs(d) < 3) { dx += d; mybx += d; if (drag & DRAG) mybr += d; // Draw left arrow - draw_h_arrow(mybx, (myby+mybt)/2, qw->o->x() + qw->o->w()); + draw_h_arrow(mybx, (myby+mybt)/2, qr); } } if (drag & (RIGHT | DRAG)) { // Compare right of selected to left of current - if (abs(d = qw->o->x() - mybr - xsp) >= 5) - d = qw->o->x() - mybr + xsp; + if (abs(d = qx - mybr - xsp) >= 3) + d = qx - mybr + xsp; - if (abs(d) < 5) { + if (abs(d) < 3) { dx += d; if (drag & DRAG) mybx += d; mybr += d; // Draw right arrow - draw_h_arrow(mybr, (myby+mybt)/2, qw->o->x()); + draw_h_arrow(mybr, (myby+mybt)/2, qx); } // Compare right of selected to right of current - if (abs(d = qw->o->x() + qw->o->w() - mybr + xsp) >= 5) - d = qw->o->x() + qw->o->w() - mybr - xsp; + if (abs(d = qr - mybr + xsp) >= 3) + d = qr - mybr - xsp; - if (abs(d) < 5) { + if (abs(d) < 3) { dx += d; if (drag & DRAG) mybx += d; mybr += d; // Draw right arrow - draw_h_arrow(mybr, (myby+mybt)/2, qw->o->x() + qw->o->w()); + draw_h_arrow(mybr, (myby+mybt)/2, qr); } } } - if ((qw->o->x()+qw->o->w())>=mybx && qw->o->x()<=mybr) { + if (qr>=mybx && qx<=mybr) { // Compare top of selected to top of current if (drag & (TOP | DRAG)) { - if (abs(d = qw->o->y() - myby - ysp) >= 5) - d = qw->o->y() - myby + ysp; + if (abs(d = qy - myby - ysp) >= 3) + d = qy - myby + ysp; - if (abs(d) < 5) { + if (abs(d) < 3) { dy += d; myby += d; if (drag & DRAG) mybt += d; // Draw up arrow... - draw_v_arrow((mybx+mybr)/2, myby, qw->o->y()); + draw_v_arrow((mybx+mybr)/2, myby, qy); } // Compare top of selected to bottom of current - if (abs(d = qw->o->y() + qw->o->h() - myby - ysp) >= 5) - d = qw->o->y() + qw->o->h() - myby + ysp; + if (abs(d = qt - myby - ysp) >= 3) + d = qt - myby + ysp; - if (abs(d) < 5) { + if (abs(d) < 3) { dy += d; myby += d; if (drag & DRAG) mybt += d; // Draw up arrow... - draw_v_arrow((mybx+mybr)/2, myby, qw->o->y()+qw->o->h()); + draw_v_arrow((mybx+mybr)/2, myby, qt); } } // Compare bottom of selected to top of current if (drag & (BOTTOM | DRAG)) { - if (abs(d = qw->o->y() - mybt - ysp) >= 5) - d = qw->o->y() - mybt + ysp; + if (abs(d = qy - mybt - ysp) >= 3) + d = qy - mybt + ysp; - if (abs(d) < 5) { + if (abs(d) < 3) { dy += d; if (drag & DRAG) myby += d; mybt += d; // Draw down arrow... - draw_v_arrow((mybx+mybr)/2, mybt, qw->o->y()); + draw_v_arrow((mybx+mybr)/2, mybt, qy); } // Compare bottom of selected to bottom of current - if (abs(d = qw->o->y() + qw->o->h() - mybt - ysp) >= 5) - d = qw->o->y() + qw->o->h() - mybt + ysp; + if (abs(d = qt - mybt - ysp) >= 3) + d = qt - mybt + ysp; - if (abs(d) < 5) { + if (abs(d) < 3) { dy += d; if (drag & DRAG) myby += d; mybt += d; // Draw down arrow... - draw_v_arrow((mybx+mybr)/2, mybt, qw->o->y() + qw->o->h()); + draw_v_arrow((mybx+mybr)/2, mybt, qt); } } } @@ -967,7 +986,7 @@ void Fl_Window_Type::moveallchildren() o->redraw(); recalc = 1; ((Overlay_Window *)(this->o))->redraw_overlay(); - modflag = 1; + set_modflag(1); dx = dy = 0; update_xywh(); diff --git a/fluid/about_panel.fl b/fluid/about_panel.fl index ba2160aeb..efc99b534 100644 --- a/fluid/about_panel.fl +++ b/fluid/about_panel.fl @@ -28,7 +28,7 @@ comment {// // // http://www.fltk.org/str.php // -} {selected in_source in_header +} {in_source in_header } decl {void show_help(const char *name);} {public @@ -38,35 +38,31 @@ Function {make_about_panel()} {open } { Fl_Window about_panel { label {About FLUID} open - xywh {391 113 350 195} type Double color 50 selection_color 47 hotspot non_modal visible + xywh {391 113 315 175} type Double color 50 selection_color 47 hotspot non_modal visible } { - Fl_Group {} {open - xywh {10 10 330 141} box THIN_UP_BOX - } { - Fl_Box {} { - image {icons/fluid-96.xpm} xywh {20 20 116 121} - } - Fl_Box {} { - label {FLTK User -Interface Designer -Version 1.1.7} - xywh {146 20 184 69} color 12 selection_color 47 labelfont 1 labelsize 18 labelcolor 0 align 21 - } - Fl_Box {} { - label {Copyright 1998-2005 by -Bill Spitzak and others} - xywh {146 99 184 42} align 148 - } + Fl_Box {} {selected + image {icons/fluid-96.xpm} xywh {10 10 115 120} } - Fl_Return_Button {} { - label Close - callback {((Fl_Window*)(o->parent()))->hide();} - xywh {271 161 69 25} + Fl_Box {} { + label {FLTK User +Interface Designer +Version 1.1.7} selected + xywh {135 10 170 69} color 12 selection_color 47 labelfont 1 labelsize 18 labelcolor 0 align 21 + } + Fl_Box {} { + label {Copyright 1998-2005 by +Bill Spitzak and others} selected + xywh {135 89 170 42} align 148 } Fl_Button {} { label {View License...} - callback {show_help("license.html");} - xywh {146 161 115 25} labelcolor 136 + callback {show_help("license.html");} selected + xywh {89 141 123 25} labelcolor 136 + } + Fl_Return_Button {} { + label Close + callback {((Fl_Window*)(o->parent()))->hide();} selected + xywh {222 141 83 25} } } } diff --git a/fluid/align_widget.cxx b/fluid/align_widget.cxx index 5d1f9a7e9..bc128c0a6 100644 --- a/fluid/align_widget.cxx +++ b/fluid/align_widget.cxx @@ -66,7 +66,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(left, w->y(), w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -98,7 +98,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize((center2-w->w())/2, w->y(), w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -127,7 +127,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(right-w->w(), w->y(), w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -155,7 +155,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(w->x(), top, w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -187,7 +187,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -216,7 +216,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize( w->x(), bot-w->h(), w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -252,7 +252,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(left+wsum+wdt*cnt/n, w->y(), w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); cnt++; @@ -290,7 +290,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(w->x(), top+hsum+hgt*cnt/n, w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); cnt++; @@ -322,7 +322,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(w->x(), w->y(), wdt, w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -350,7 +350,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize( w->x(), w->y(), w->w(), hgt); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -380,7 +380,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize( w->x(), w->y(), wdt, hgt); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -405,7 +405,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize((center2-w->w())/2, w->y(), w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -429,7 +429,7 @@ void align_widget_cb(Fl_Widget*, long how) // Otherwise, just do the widget... w->resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } - modflag=1; + set_modflag(1); w->redraw(); if (w->window()) w->window()->redraw(); } @@ -455,7 +455,7 @@ void widget_size_cb(Fl_Widget *, long size) { w->redraw(); - modflag = 1; + set_modflag(1); } } diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx index deb481c51..4f7fe02b9 100644 --- a/fluid/alignment_panel.cxx +++ b/fluid/alignment_panel.cxx @@ -167,10 +167,6 @@ Fl_Text_Buffer *shell_run_buffer; Fl_Double_Window *settings_window=(Fl_Double_Window *)0; -static void cb_Close1(Fl_Button*, void*) { - settings_window->hide(); -} - Fl_Check_Button *tooltips_button=(Fl_Check_Button *)0; static void cb_tooltips_button(Fl_Check_Button*, void*) { @@ -196,58 +192,46 @@ static void cb_prevpos_button(Fl_Check_Button*, void*) { fluid_prefs.set("prev_window_pos", prevpos_button->value()); } +static void cb_Close1(Fl_Button*, void*) { + settings_window->hide(); +} + Fl_Double_Window* make_settings_window() { Fl_Double_Window* w; - { Fl_Double_Window* o = settings_window = new Fl_Double_Window(215, 185, "GUI Settings"); + { Fl_Double_Window* o = settings_window = new Fl_Double_Window(235, 185, "GUI Settings"); w = o; - o->labelsize(11); - { Fl_Button* o = new Fl_Button(163, 155, 42, 20, "Close"); - o->tooltip("Close this dialog."); - o->labelsize(11); - o->callback((Fl_Callback*)cb_Close1); + { Fl_Check_Button* o = tooltips_button = new Fl_Check_Button(10, 10, 113, 25, "Show Tooltips"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)cb_tooltips_button); + int b; + fluid_prefs.get("show_tooltips", b, 1); + tooltips_button->value(b); + Fl_Tooltip::enable(b); } - { Fl_Tabs* o = new Fl_Tabs(10, 10, 195, 135); - o->selection_color(FL_INACTIVE_COLOR); - o->labelsize(11); - { Fl_Group* o = new Fl_Group(10, 30, 195, 115, "GUI:"); - o->labelsize(11); - o->align(FL_ALIGN_TOP_LEFT); - { Fl_Check_Button* o = tooltips_button = new Fl_Check_Button(20, 40, 97, 20, "Show Tooltips"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)cb_tooltips_button); - int b; - fluid_prefs.get("show_tooltips", b, 1); - tooltips_button->value(b); - Fl_Tooltip::enable(b); - } - { Fl_Check_Button* o = completion_button = new Fl_Check_Button(20, 65, 152, 20, "Show Completion Dialogs"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)cb_completion_button); - int b; - fluid_prefs.get("show_completion_dialogs", b, 1); - completion_button->value(b); - } - { Fl_Check_Button* o = openlast_button = new Fl_Check_Button(20, 90, 175, 20, "Open Previous File on Startup"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)cb_openlast_button); - int b; - fluid_prefs.get("open_previous_file", b, 0); - openlast_button->value(b); - } - { Fl_Check_Button* o = prevpos_button = new Fl_Check_Button(20, 115, 175, 20, "Remember Window Positions"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)cb_prevpos_button); - int b; - fluid_prefs.get("prev_window_pos", b, 1); - prevpos_button->value(b); - } - o->end(); - } - o->end(); + { Fl_Check_Button* o = completion_button = new Fl_Check_Button(10, 45, 186, 25, "Show Completion Dialogs"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)cb_completion_button); + int b; + fluid_prefs.get("show_completion_dialogs", b, 1); + completion_button->value(b); + } + { Fl_Check_Button* o = openlast_button = new Fl_Check_Button(10, 80, 215, 25, "Open Previous File on Startup"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)cb_openlast_button); + int b; + fluid_prefs.get("open_previous_file", b, 0); + openlast_button->value(b); + } + { Fl_Check_Button* o = prevpos_button = new Fl_Check_Button(10, 115, 210, 25, "Remember Window Positions"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)cb_prevpos_button); + int b; + fluid_prefs.get("prev_window_pos", b, 1); + prevpos_button->value(b); + } + { Fl_Button* o = new Fl_Button(161, 150, 64, 25, "Close"); + o->tooltip("Close this dialog."); + o->callback((Fl_Callback*)cb_Close1); } o->end(); } @@ -262,12 +246,6 @@ static void cb_shell_command_input(Fl_Input*, void*) { fluid_prefs.set("shell_command", shell_command_input->value()); } -Fl_Check_Button *shell_savefl_button=(Fl_Check_Button *)0; - -static void cb_shell_savefl_button(Fl_Check_Button*, void*) { - fluid_prefs.set("shell_savefl", shell_savefl_button->value()); -} - Fl_Check_Button *shell_writecode_button=(Fl_Check_Button *)0; static void cb_shell_writecode_button(Fl_Check_Button*, void*) { @@ -280,92 +258,79 @@ static void cb_shell_writemsgs_button(Fl_Check_Button*, void*) { fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value()); } +Fl_Check_Button *shell_savefl_button=(Fl_Check_Button *)0; + +static void cb_shell_savefl_button(Fl_Check_Button*, void*) { + fluid_prefs.set("shell_savefl", shell_savefl_button->value()); +} + static void cb_Cancel(Fl_Button*, void*) { shell_window->hide(); } Fl_Double_Window *shell_run_window=(Fl_Double_Window *)0; +Fl_Text_Display *shell_run_display=(Fl_Text_Display *)0; + Fl_Return_Button *shell_run_button=(Fl_Return_Button *)0; static void cb_shell_run_button(Fl_Return_Button*, void*) { shell_run_window->hide(); } -Fl_Text_Display *shell_run_display=(Fl_Text_Display *)0; - Fl_Double_Window* make_shell_window() { Fl_Double_Window* w; - { Fl_Double_Window* o = shell_window = new Fl_Double_Window(335, 135, "Shell Command"); + { Fl_Double_Window* o = shell_window = new Fl_Double_Window(365, 125, "Shell Command"); w = o; - o->labelsize(11); - { Fl_Tabs* o = new Fl_Tabs(10, 10, 314, 85); - o->selection_color(FL_INACTIVE_COLOR); - o->labelsize(11); - { Fl_Group* o = new Fl_Group(10, 30, 314, 65, "Shell Command"); - o->labelsize(11); - o->align(FL_ALIGN_TOP_LEFT); - { Fl_Input* o = shell_command_input = new Fl_Input(20, 40, 294, 21); - o->labelsize(11); - o->textsize(11); - o->callback((Fl_Callback*)cb_shell_command_input); - char buf[1024]; - fluid_prefs.get("shell_command", buf, "", sizeof(buf)); - shell_command_input->value(buf); - } - { Fl_Check_Button* o = shell_savefl_button = new Fl_Check_Button(20, 66, 93, 19, "Save .FL File"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)cb_shell_savefl_button); - int b; - fluid_prefs.get("shell_savefl", b, 1); - shell_savefl_button->value(b); - } - { Fl_Check_Button* o = shell_writecode_button = new Fl_Check_Button(118, 66, 83, 19, "Write Code"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)cb_shell_writecode_button); - int b; - fluid_prefs.get("shell_writecode", b, 1); - shell_writecode_button->value(b); - } - { Fl_Check_Button* o = shell_writemsgs_button = new Fl_Check_Button(206, 66, 108, 19, "Write Messages"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)cb_shell_writemsgs_button); - int b; - fluid_prefs.get("shell_writemsgs", b, 0); - shell_writemsgs_button->value(b); - } - o->end(); - } - o->end(); + { Fl_Input* o = shell_command_input = new Fl_Input(10, 27, 347, 25, "Command:"); + o->labelfont(1); + o->callback((Fl_Callback*)cb_shell_command_input); + o->align(FL_ALIGN_TOP_LEFT); + char buf[1024]; + fluid_prefs.get("shell_command", buf, "", sizeof(buf)); + shell_command_input->value(buf); } - { Fl_Button* o = new Fl_Button(276, 105, 48, 20, "Cancel"); - o->labelsize(11); - o->callback((Fl_Callback*)cb_Cancel); + { Fl_Check_Button* o = shell_writecode_button = new Fl_Check_Button(128, 61, 93, 19, "Write Code"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)cb_shell_writecode_button); + int b; + fluid_prefs.get("shell_writecode", b, 1); + shell_writecode_button->value(b); } - { Fl_Return_Button* o = new Fl_Return_Button(162, 105, 109, 20, "Run Command"); - o->labelsize(11); + { Fl_Check_Button* o = shell_writemsgs_button = new Fl_Check_Button(231, 61, 126, 19, "Write Messages"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)cb_shell_writemsgs_button); + int b; + fluid_prefs.get("shell_writemsgs", b, 0); + shell_writemsgs_button->value(b); + } + { Fl_Check_Button* o = shell_savefl_button = new Fl_Check_Button(10, 62, 108, 19, "Save .FL File"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)cb_shell_savefl_button); + int b; + fluid_prefs.get("shell_savefl", b, 1); + shell_savefl_button->value(b); + } + { Fl_Return_Button* o = new Fl_Return_Button(132, 90, 143, 25, "Run Command"); o->callback((Fl_Callback*)do_shell_command); } + { Fl_Button* o = new Fl_Button(285, 90, 72, 25, "Cancel"); + o->callback((Fl_Callback*)cb_Cancel); + } o->end(); } { Fl_Double_Window* o = shell_run_window = new Fl_Double_Window(555, 430, "Shell Command Output"); w = o; - o->labelsize(11); - { Fl_Return_Button* o = shell_run_button = new Fl_Return_Button(486, 400, 59, 20, "Close"); - o->labelsize(11); - o->callback((Fl_Callback*)cb_shell_run_button); - } - { Fl_Text_Display* o = shell_run_display = new Fl_Text_Display(10, 10, 530, 380); - o->labelsize(11); + { Fl_Text_Display* o = shell_run_display = new Fl_Text_Display(10, 10, 535, 375); + o->box(FL_DOWN_BOX); o->textfont(4); - o->textsize(11); Fl_Group::current()->resizable(o); shell_run_buffer = new Fl_Text_Buffer(); shell_run_display->buffer(shell_run_buffer); } + { Fl_Return_Button* o = shell_run_button = new Fl_Return_Button(468, 395, 77, 25, "Close"); + o->callback((Fl_Callback*)cb_shell_run_button); + } o->end(); } return w; @@ -387,59 +352,39 @@ static void cb_Close2(Fl_Button*, void*) { Fl_Double_Window* make_grid_window() { Fl_Double_Window* w; - { Fl_Double_Window* o = grid_window = new Fl_Double_Window(145, 180, "Grid"); + { Fl_Double_Window* o = grid_window = new Fl_Double_Window(145, 185, "Grid"); w = o; - o->labelsize(11); - { Fl_Tabs* o = new Fl_Tabs(10, 10, 124, 131); - o->selection_color(FL_INACTIVE_COLOR); - o->labelsize(11); - o->align(FL_ALIGN_TOP_LEFT); - { Fl_Group* o = new Fl_Group(10, 30, 124, 111, "Grid"); - o->labelsize(11); - o->align(FL_ALIGN_TOP_LEFT); - { Fl_Input* o = horizontal_input = new Fl_Input(84, 40, 40, 20, "Horizontal:"); - o->tooltip("Horizontal grid spacing."); - o->type(2); - o->box(FL_THIN_DOWN_BOX); - o->labelfont(1); - o->labelsize(11); - o->textsize(11); - o->callback((Fl_Callback*)grid_cb, (void*)(1)); - o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); - } - { Fl_Input* o = vertical_input = new Fl_Input(84, 65, 40, 20, "Vertical:"); - o->tooltip("Vertical grid spacing."); - o->type(2); - o->box(FL_THIN_DOWN_BOX); - o->labelfont(1); - o->labelsize(11); - o->textsize(11); - o->callback((Fl_Callback*)grid_cb, (void*)(2)); - o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); - } - { Fl_Input* o = snap_input = new Fl_Input(84, 90, 40, 20, "Snap:"); - o->tooltip("Snap to grid within this many pixels."); - o->type(2); - o->box(FL_THIN_DOWN_BOX); - o->labelfont(1); - o->labelsize(11); - o->textsize(11); - o->callback((Fl_Callback*)grid_cb, (void*)(3)); - o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); - } - { Fl_Check_Button* o = guides_toggle = new Fl_Check_Button(30, 115, 94, 16, "Show Guides"); - o->tooltip("Show distance and alignment guides in overlay"); - o->down_box(FL_DOWN_BOX); - o->labelsize(11); - o->callback((Fl_Callback*)guides_cb, (void*)(4)); - } - o->end(); - } - o->end(); + { Fl_Input* o = horizontal_input = new Fl_Input(88, 10, 47, 25, "Horizontal:"); + o->tooltip("Horizontal grid spacing."); + o->type(2); + o->box(FL_THIN_DOWN_BOX); + o->labelfont(1); + o->callback((Fl_Callback*)grid_cb, (void*)(1)); + o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); } - { Fl_Button* o = new Fl_Button(92, 151, 42, 20, "Close"); + { Fl_Input* o = vertical_input = new Fl_Input(88, 45, 47, 25, "Vertical:"); + o->tooltip("Vertical grid spacing."); + o->type(2); + o->box(FL_THIN_DOWN_BOX); + o->labelfont(1); + o->callback((Fl_Callback*)grid_cb, (void*)(2)); + o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); + } + { Fl_Input* o = snap_input = new Fl_Input(88, 80, 47, 25, "Snap:"); + o->tooltip("Snap to grid within this many pixels."); + o->type(2); + o->box(FL_THIN_DOWN_BOX); + o->labelfont(1); + o->callback((Fl_Callback*)grid_cb, (void*)(3)); + o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); + } + { Fl_Check_Button* o = guides_toggle = new Fl_Check_Button(27, 115, 108, 25, "Show Guides"); + o->tooltip("Show distance and alignment guides in overlay"); + o->down_box(FL_DOWN_BOX); + o->callback((Fl_Callback*)guides_cb, (void*)(4)); + } + { Fl_Button* o = new Fl_Button(76, 150, 59, 25, "Close"); o->tooltip("Close this dialog."); - o->labelsize(11); o->callback((Fl_Callback*)cb_Close2); } o->end(); diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index 17cccccb8..bb0db6430 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -88,15 +88,15 @@ Function {make_project_window()} {open callback i18n_type_cb open tooltip {Type of internationalization to use.} xywh {80 42 100 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 } { - menuitem {} { + Menu_Item {} { label None xywh {0 0 100 20} labelsize 11 } - menuitem {} { + Menu_Item {} { label {GNU gettext} xywh {0 0 100 20} labelsize 11 } - menuitem {} { + Menu_Item {} { label {POSIX catgets} xywh {0 0 100 20} labelsize 11 } @@ -138,56 +138,47 @@ decl {Fl_Text_Buffer *shell_run_buffer;} {public Function {make_settings_window()} {open } { Fl_Window settings_window { - label {GUI Settings} open - xywh {321 150 215 185} type Double labelsize 11 hide + label {GUI Settings} + xywh {321 150 235 185} type Double hide } { + Fl_Check_Button tooltips_button { + label {Show Tooltips} + callback {Fl_Tooltip::enable(tooltips_button->value()); +fluid_prefs.set("show_tooltips", tooltips_button->value());} selected + xywh {10 10 113 25} down_box DOWN_BOX + code0 {int b;} + code1 {fluid_prefs.get("show_tooltips", b, 1);} + code2 {tooltips_button->value(b);} + code3 {Fl_Tooltip::enable(b);} + } + Fl_Check_Button completion_button { + label {Show Completion Dialogs} + callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());} selected + xywh {10 45 186 25} down_box DOWN_BOX + code0 {int b;} + code1 {fluid_prefs.get("show_completion_dialogs", b, 1);} + code2 {completion_button->value(b);} + } + Fl_Check_Button openlast_button { + label {Open Previous File on Startup} + callback {fluid_prefs.set("open_previous_file", openlast_button->value());} selected + xywh {10 80 215 25} down_box DOWN_BOX + code0 {int b;} + code1 {fluid_prefs.get("open_previous_file", b, 0);} + code2 {openlast_button->value(b);} + } + Fl_Check_Button prevpos_button { + label {Remember Window Positions} + callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());} selected + xywh {10 115 210 25} down_box DOWN_BOX + code0 {int b;} + code1 {fluid_prefs.get("prev_window_pos", b, 1);} + code2 {prevpos_button->value(b);} + } Fl_Button {} { label Close - callback {settings_window->hide();} - tooltip {Close this dialog.} xywh {163 155 42 20} labelsize 11 - } - Fl_Tabs {} { - xywh {10 10 195 135} selection_color 8 labelsize 11 - } { - Fl_Group {} { - label {GUI:} - xywh {10 30 195 115} labelsize 11 align 5 - } { - Fl_Check_Button tooltips_button { - label {Show Tooltips} - callback {Fl_Tooltip::enable(tooltips_button->value()); -fluid_prefs.set("show_tooltips", tooltips_button->value());} - xywh {20 40 97 20} down_box DOWN_BOX labelsize 11 - code0 {int b;} - code1 {fluid_prefs.get("show_tooltips", b, 1);} - code2 {tooltips_button->value(b);} - code3 {Fl_Tooltip::enable(b);} - } - Fl_Check_Button completion_button { - label {Show Completion Dialogs} - callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());} - xywh {20 65 152 20} down_box DOWN_BOX labelsize 11 - code0 {int b;} - code1 {fluid_prefs.get("show_completion_dialogs", b, 1);} - code2 {completion_button->value(b);} - } - Fl_Check_Button openlast_button { - label {Open Previous File on Startup} - callback {fluid_prefs.set("open_previous_file", openlast_button->value());} - xywh {20 90 175 20} down_box DOWN_BOX labelsize 11 - code0 {int b;} - code1 {fluid_prefs.get("open_previous_file", b, 0);} - code2 {openlast_button->value(b);} - } - Fl_Check_Button prevpos_button { - label {Remember Window Positions} - callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());} - xywh {20 115 175 20} down_box DOWN_BOX labelsize 11 - code0 {int b;} - code1 {fluid_prefs.get("prev_window_pos", b, 1);} - code2 {prevpos_button->value(b);} - } - } + callback {settings_window->hide();} selected + tooltip {Close this dialog.} xywh {161 150 64 25} } } } @@ -195,73 +186,65 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());} Function {make_shell_window()} {open } { Fl_Window shell_window { - label {Shell Command} open - xywh {588 153 335 135} type Double labelsize 11 hide + label {Shell Command} + xywh {588 153 365 125} type Double hide } { - Fl_Tabs {} {open - xywh {10 10 314 85} selection_color 8 labelsize 11 - } { - Fl_Group {} { - label {Shell Command} open - xywh {10 30 314 65} labelsize 11 align 5 - } { - Fl_Input shell_command_input { - callback {fluid_prefs.set("shell_command", shell_command_input->value());} - xywh {20 40 294 21} labelsize 11 textsize 11 - code0 {char buf[1024];} - code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));} - code2 {shell_command_input->value(buf);} - } - Fl_Check_Button shell_savefl_button { - label {Save .FL File} - callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());} - xywh {20 66 93 19} down_box DOWN_BOX labelsize 11 - code0 {int b;} - code1 {fluid_prefs.get("shell_savefl", b, 1);} - code2 {shell_savefl_button->value(b);} - } - Fl_Check_Button shell_writecode_button { - label {Write Code} - callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());} - xywh {118 66 83 19} down_box DOWN_BOX labelsize 11 - code0 {int b;} - code1 {fluid_prefs.get("shell_writecode", b, 1);} - code2 {shell_writecode_button->value(b);} - } - Fl_Check_Button shell_writemsgs_button { - label {Write Messages} - callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());} - xywh {206 66 108 19} down_box DOWN_BOX labelsize 11 - code0 {int b;} - code1 {fluid_prefs.get("shell_writemsgs", b, 0);} - code2 {shell_writemsgs_button->value(b);} - } - } + Fl_Input shell_command_input { + label {Command:} + callback {fluid_prefs.set("shell_command", shell_command_input->value());} + xywh {10 27 347 25} labelfont 1 align 5 + code0 {char buf[1024];} + code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));} + code2 {shell_command_input->value(buf);} } - Fl_Button {} { - label Cancel - callback {shell_window->hide();} - xywh {276 105 48 20} labelsize 11 + Fl_Check_Button shell_writecode_button { + label {Write Code} + callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());} + xywh {128 61 93 19} down_box DOWN_BOX + code0 {int b;} + code1 {fluid_prefs.get("shell_writecode", b, 1);} + code2 {shell_writecode_button->value(b);} + } + Fl_Check_Button shell_writemsgs_button { + label {Write Messages} + callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());} + xywh {231 61 126 19} down_box DOWN_BOX + code0 {int b;} + code1 {fluid_prefs.get("shell_writemsgs", b, 0);} + code2 {shell_writemsgs_button->value(b);} + } + Fl_Check_Button shell_savefl_button { + label {Save .FL File} + callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());} + xywh {10 62 108 19} down_box DOWN_BOX + code0 {int b;} + code1 {fluid_prefs.get("shell_savefl", b, 1);} + code2 {shell_savefl_button->value(b);} } Fl_Return_Button {} { label {Run Command} callback do_shell_command - xywh {162 105 109 20} labelsize 11 + xywh {132 90 143 25} + } + Fl_Button {} { + label Cancel + callback {shell_window->hide();} + xywh {285 90 72 25} } } Fl_Window shell_run_window { - label {Shell Command Output} open - xywh {592 332 555 430} type Double labelsize 11 resizable visible + label {Shell Command Output} + xywh {592 332 555 430} type Double hide resizable } { + Fl_Text_Display shell_run_display { + xywh {10 10 535 375} box DOWN_BOX textfont 4 resizable + code0 {shell_run_buffer = new Fl_Text_Buffer();} + code1 {shell_run_display->buffer(shell_run_buffer);} + } Fl_Return_Button shell_run_button { label Close callback {shell_run_window->hide();} - xywh {486 400 59 20} labelsize 11 - } - Fl_Text_Display shell_run_display {selected - xywh {10 10 530 380} labelsize 11 textfont 4 textsize 11 resizable - code0 {shell_run_buffer = new Fl_Text_Buffer();} - code1 {shell_run_display->buffer(shell_run_buffer);} + xywh {468 395 77 25} } } } @@ -269,49 +252,40 @@ Function {make_shell_window()} {open Function {make_grid_window()} {open } { Fl_Window grid_window { - label Grid open - xywh {51 589 145 180} type Double labelsize 11 hide + label Grid + xywh {803 141 145 185} type Double hide } { - Fl_Tabs {} { - xywh {10 10 124 131} selection_color 8 labelsize 11 align 5 - } { - Fl_Group {} { - label Grid - xywh {10 30 124 111} labelsize 11 align 5 - } { - Fl_Input horizontal_input { - label {Horizontal:} - user_data 1 user_data_type long - callback grid_cb - tooltip {Horizontal grid spacing.} xywh {84 40 40 20} type Int box THIN_DOWN_BOX labelfont 1 labelsize 11 textsize 11 - code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} - } - Fl_Input vertical_input { - label {Vertical:} - user_data 2 user_data_type long - callback grid_cb - tooltip {Vertical grid spacing.} xywh {84 65 40 20} type Int box THIN_DOWN_BOX labelfont 1 labelsize 11 textsize 11 - code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} - } - Fl_Input snap_input { - label {Snap:} - user_data 3 user_data_type long - callback grid_cb - tooltip {Snap to grid within this many pixels.} xywh {84 90 40 20} type Int box THIN_DOWN_BOX labelfont 1 labelsize 11 textsize 11 - code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} - } - Fl_Check_Button guides_toggle { - label {Show Guides} - user_data 4 user_data_type long - callback guides_cb - tooltip {Show distance and alignment guides in overlay} xywh {30 115 94 16} down_box DOWN_BOX labelsize 11 - } - } + Fl_Input horizontal_input { + label {Horizontal:} + user_data 1 user_data_type long + callback grid_cb + tooltip {Horizontal grid spacing.} xywh {88 10 47 25} type Int box THIN_DOWN_BOX labelfont 1 + code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} + } + Fl_Input vertical_input { + label {Vertical:} + user_data 2 user_data_type long + callback grid_cb + tooltip {Vertical grid spacing.} xywh {88 45 47 25} type Int box THIN_DOWN_BOX labelfont 1 + code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} + } + Fl_Input snap_input { + label {Snap:} + user_data 3 user_data_type long + callback grid_cb + tooltip {Snap to grid within this many pixels.} xywh {88 80 47 25} type Int box THIN_DOWN_BOX labelfont 1 + code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} + } + Fl_Check_Button guides_toggle { + label {Show Guides} + user_data 4 user_data_type long + callback guides_cb + tooltip {Show distance and alignment guides in overlay} xywh {27 115 108 25} down_box DOWN_BOX } Fl_Button {} { label Close callback {grid_window->hide();} - tooltip {Close this dialog.} xywh {92 151 42 20} labelsize 11 + tooltip {Close this dialog.} xywh {76 150 59 25} } } } diff --git a/fluid/alignment_panel.h b/fluid/alignment_panel.h index 21f6c8d64..decc1d542 100644 --- a/fluid/alignment_panel.h +++ b/fluid/alignment_panel.h @@ -70,15 +70,15 @@ extern Fl_Check_Button *prevpos_button; Fl_Double_Window* make_settings_window(); extern Fl_Double_Window *shell_window; extern Fl_Input *shell_command_input; -extern Fl_Check_Button *shell_savefl_button; extern Fl_Check_Button *shell_writecode_button; extern Fl_Check_Button *shell_writemsgs_button; +extern Fl_Check_Button *shell_savefl_button; #include extern void do_shell_command(Fl_Return_Button*, void*); extern Fl_Double_Window *shell_run_window; -extern Fl_Return_Button *shell_run_button; #include extern Fl_Text_Display *shell_run_display; +extern Fl_Return_Button *shell_run_button; Fl_Double_Window* make_shell_window(); extern Fl_Double_Window *grid_window; extern void grid_cb(Fl_Input*, long); diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 9685c6a1c..932a6e812 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -855,7 +855,7 @@ static void cb(Fl_Widget *, void *v) { } } select_only(t); - modflag = 1; + set_modflag(1); t->open(); } } diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index f9d6dc4e1..283788ff4 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -85,6 +85,7 @@ void nyi(Fl_Widget *,void *) { static const char *filename; void set_filename(const char *c); +void set_modflag(int mf); int modflag; static char* pwd; @@ -145,19 +146,42 @@ Fl_Menu_Bar *main_menubar; void save_cb(Fl_Widget *, void *v) { const char *c = filename; if (v || !c || !*c) { - if (!(c=fl_file_chooser("Save to:", "FLUID Files (*.f[ld])", c))) return; + fl_ok = "Save"; + c=fl_file_chooser("Save to:", "FLUID Files (*.f[ld])", c); + fl_ok = "OK"; + if (!c) return; + + if (!access(c, 0)) + { + const char *basename; + if ((basename = strrchr(c, '/')) != NULL) + basename ++; +#if defined(WIN32) || defined(__EMX__) + if ((basename = strrchr(c, '\\')) != NULL) + basename ++; +#endif // WIN32 || __EMX__ + else + basename = c; + + if (fl_choice("The file \"%s\" already exists.\n" + "Do you want to replace it?", "Cancel", + "Replace", NULL, basename) == 0) return; + } + set_filename(c); } if (!write_file(c)) { fl_message("Error writing %s: %s", c, strerror(errno)); return; } - modflag = 0; + set_modflag(0); } void exit_cb(Fl_Widget *,void *) { if (modflag) - switch (fl_choice("Save changes before exiting?", "Cancel", "No", "Yes")) + switch (fl_choice("Do you want to save changes to this user\n" + "interface before exiting?", "Cancel", + "Don't Save", "Save")) { case 0 : /* Cancel */ return; @@ -185,7 +209,19 @@ void exit_cb(Fl_Widget *,void *) { void apple_open_cb(const char *c) { - if (modflag && !fl_ask("Discard changes?")) return; + if (modflag) + { + switch (fl_choice("Do you want to save changes to this user\n" + "interface before opening another one?", "Cancel", + "Don't Save", "Save")) + { + case 0 : /* Cancel */ + return; + case 2 : /* Yes */ + save_cb(NULL, NULL); + if (modflag) return; // Didn't save! + } + } const char *oldfilename; oldfilename = filename; filename = NULL; @@ -199,16 +235,31 @@ apple_open_cb(const char *c) { } // Loaded a file; free the old filename... - modflag = 0; + set_modflag(0); if (oldfilename) free((void *)oldfilename); } #endif // __APPLE__ void open_cb(Fl_Widget *, void *v) { - if (!v && modflag && !fl_ask("Discard changes?")) return; + if (!v && modflag) + { + switch (fl_choice("Do you want to save changes to this user\n" + "interface before opening another one?", "Cancel", + "Don't Save", "Save")) + { + case 0 : /* Cancel */ + return; + case 2 : /* Yes */ + save_cb(NULL, NULL); + if (modflag) return; // Didn't save! + } + } const char *c; const char *oldfilename; - if (!(c = fl_file_chooser("Open:", "FLUID Files (*.f[ld])", filename))) return; + fl_ok = "Open"; + c = fl_file_chooser("Open:", "FLUID Files (*.f[ld])", filename); + fl_ok = "OK"; + if (!c) return; oldfilename = filename; filename = NULL; set_filename(c); @@ -221,19 +272,31 @@ void open_cb(Fl_Widget *, void *v) { } if (v) { // Inserting a file; restore the original filename... - modflag = 1; + set_modflag(1); free((void *)filename); filename = oldfilename; if (main_window) main_window->label(filename); } else { // Loaded a file; free the old filename... - modflag = 0; + set_modflag(0); if (oldfilename) free((void *)oldfilename); } } void open_history_cb(Fl_Widget *, void *v) { - if (modflag && !fl_ask("Discard changes?")) return; + if (modflag) + { + switch (fl_choice("Do you want to save changes to this user\n" + "interface before opening another one?", "Cancel", + "Don't Save", "Save")) + { + case 0 : /* Cancel */ + return; + case 2 : /* Yes */ + save_cb(NULL, NULL); + if (modflag) return; // Didn't save! + } + } const char *oldfilename = filename; filename = NULL; set_filename((char *)v); @@ -244,17 +307,27 @@ void open_history_cb(Fl_Widget *, void *v) { if (main_window) main_window->label(filename); return; } - modflag = 0; + set_modflag(0); if (oldfilename) free((void *)oldfilename); } void new_cb(Fl_Widget *, void *v) { - if (!v && modflag && !fl_ask("Discard changes?")) return; - const char *c; - if (!(c = fl_file_chooser("New:", "FLUID Files (*.f[ld])", 0))) return; + if (!v && modflag) + { + switch (fl_choice("Do you want to save changes to this user\n" + "interface before creating a new one?", "Cancel", + "Don't Save", "Save")) + { + case 0 : /* Cancel */ + return; + case 2 : /* Yes */ + save_cb(NULL, NULL); + if (modflag) return; // Didn't save! + } + } delete_all(); - set_filename(c); - modflag = 0; + set_filename(NULL); + set_modflag(0); } int compile_only = 0; @@ -509,7 +582,7 @@ extern Fl_Menu_Item New_Menu[]; Fl_Menu_Item Main_Menu[] = { {"&File",0,0,0,FL_SUBMENU}, - {"&New", 0, new_cb, 0}, + {"&New", FL_CTRL+'n', new_cb, 0}, {"&Open...", FL_CTRL+'o', open_cb, 0}, {"Open &Previous",0,0,0,FL_SUBMENU}, {relative_history[0], FL_CTRL+'0', open_history_cb, absolute_history[0]}, @@ -819,10 +892,33 @@ show_shell_window() { void set_filename(const char *c) { if (filename) free((void *)filename); - filename = strdup(c); - if (main_window) main_window->label(filename); + filename = c ? strdup(c) : NULL; - update_history(filename); + if (filename) update_history(filename); + + set_modflag(modflag); +} + +// Set the "modified" flag and update the title of the main window... +void set_modflag(int mf) { + const char *basename; + static char title[1024]; + + modflag = mf; + + if (main_window) { + if (!filename) basename = "Untitled.fl"; + else if ((basename = strrchr(filename, '/')) != NULL) basename ++; +#if defined(WIN32) || defined(__EMX__) + else if ((basename = strrchr(filename, '\\')) != NULL) basename ++; +#endif // WIN32 || __EMX__ + else basename = filename; + + if (modflag) { + snprintf(title, sizeof(title), "%s (modified)", basename); + main_window->label(title); + } else main_window->label(basename); + } } //////////////////////////////////////////////////////////////// @@ -914,7 +1010,7 @@ int main(int argc,char **argv) { write_cb(0,0); exit(0); } - modflag = 0; + set_modflag(0); #ifndef WIN32 signal(SIGINT,sigint); #endif diff --git a/fluid/function_panel.cxx b/fluid/function_panel.cxx index 3d826aaee..075e2c1e2 100644 --- a/fluid/function_panel.cxx +++ b/fluid/function_panel.cxx @@ -52,17 +52,18 @@ Fl_Window* make_function_panel() { Fl_Window* w; { Fl_Window* o = function_panel = new Fl_Window(285, 140, "Function/Method"); w = o; - { Fl_Light_Button* o = f_public_button = new Fl_Light_Button(10, 10, 58, 20, "public"); + { Fl_Light_Button* o = f_public_button = new Fl_Light_Button(10, 10, 54, 20, "public"); o->tooltip("Make the function or method publicly accessible."); o->labelsize(11); o->when(FL_WHEN_NEVER); } - { Fl_Light_Button* o = f_c_button = new Fl_Light_Button(73, 10, 94, 20, "C declaration"); + { Fl_Light_Button* o = f_c_button = new Fl_Light_Button(69, 10, 90, 20, "C declaration"); o->tooltip("Declare with a C interface instead of C++."); o->labelsize(11); } { Fl_Input* o = f_name_input = new Fl_Input(10, 49, 265, 19, "Name(args): (blank for main())"); o->tooltip("The name of the function or method."); + o->labelfont(1); o->labelsize(11); o->textfont(4); o->textsize(11); @@ -72,6 +73,7 @@ Fl_Window* make_function_panel() { } { Fl_Input* o = f_return_type_input = new Fl_Input(10, 87, 265, 19, "Return Type: (blank to return outermost widget)"); o->tooltip("The return type of the function or method."); + o->labelfont(1); o->labelsize(11); o->textfont(4); o->textsize(11); @@ -107,7 +109,7 @@ Fl_Window* make_code_panel() { { Fl_Window* o = code_panel = new Fl_Window(545, 175, "Code"); w = o; o->labelsize(11); - { Fl_Text_Editor* o = code_input = new Fl_Text_Editor(12, 12, 523, 123); + { Fl_Text_Editor* o = code_input = new Fl_Text_Editor(10, 12, 525, 123); o->box(FL_DOWN_BOX); o->labelsize(11); o->textsize(11); @@ -150,31 +152,33 @@ Fl_Button *codeblock_panel_cancel=(Fl_Button *)0; Fl_Window* make_codeblock_panel() { Fl_Window* w; - { Fl_Window* o = codeblock_panel = new Fl_Window(295, 130, "codeblock"); + { Fl_Window* o = codeblock_panel = new Fl_Window(295, 100, "Code Block"); w = o; - { Fl_Input* o = code_before_input = new Fl_Input(10, 10, 275, 25); + o->labelsize(11); + { Fl_Input* o = code_before_input = new Fl_Input(10, 10, 275, 20); o->tooltip("#ifdef or similar conditional code block."); - o->labelsize(12); + o->labelsize(11); o->textfont(4); + o->textsize(11); o->align(FL_ALIGN_TOP_LEFT); o->when(FL_WHEN_NEVER); Fl_Group::current()->resizable(o); } - { Fl_Box* o = new Fl_Box(10, 35, 270, 25, "\"{...child code...}\" is inserted here"); - o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - } - { Fl_Input* o = code_after_input = new Fl_Input(10, 60, 275, 25); + { Fl_Input* o = code_after_input = new Fl_Input(10, 49, 275, 19, "\"{...child code...}\" is inserted here"); o->tooltip("#endif or similar conditional code block."); - o->labelsize(12); + o->labelsize(11); o->textfont(4); + o->textsize(11); o->align(FL_ALIGN_TOP_LEFT); o->when(FL_WHEN_NEVER); } - { Fl_Return_Button* o = codeblock_panel_ok = new Fl_Return_Button(120, 95, 80, 25, "OK"); + { Fl_Return_Button* o = codeblock_panel_ok = new Fl_Return_Button(164, 73, 60, 20, "OK"); + o->labelsize(11); w->hotspot(o); } - { Fl_Button* o = codeblock_panel_cancel = new Fl_Button(205, 95, 80, 25, "Cancel"); + { Fl_Button* o = codeblock_panel_cancel = new Fl_Button(229, 73, 56, 20, "Cancel"); o->shortcut(0xff1b); + o->labelsize(11); } o->set_modal(); o->end(); @@ -196,35 +200,37 @@ Fl_Light_Button *declblock_public_button=(Fl_Light_Button *)0; Fl_Window* make_declblock_panel() { Fl_Window* w; - { Fl_Window* o = declblock_panel = new Fl_Window(295, 155, "declaration block"); + { Fl_Window* o = declblock_panel = new Fl_Window(295, 125, "Declaration Block"); w = o; - { Fl_Input* o = decl_before_input = new Fl_Input(10, 35, 275, 25); + o->labelsize(11); + { Fl_Input* o = decl_before_input = new Fl_Input(10, 35, 275, 20); o->tooltip("#ifdef or similar conditional declaration block."); - o->labelsize(12); + o->labelsize(11); o->textfont(4); + o->textsize(11); o->align(FL_ALIGN_TOP_LEFT); o->when(FL_WHEN_NEVER); Fl_Group::current()->resizable(o); } - { Fl_Box* o = new Fl_Box(10, 60, 275, 25, "\"\\n...child code...\\n\" is inserted here"); - o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - } - { Fl_Input* o = decl_after_input = new Fl_Input(10, 85, 275, 25); + { Fl_Input* o = decl_after_input = new Fl_Input(10, 74, 275, 20, "\"\\n...child code...\\n\" is inserted here"); o->tooltip("#endif or similar declaration code block."); - o->labelsize(12); + o->labelsize(11); o->textfont(4); + o->textsize(11); o->align(FL_ALIGN_TOP_LEFT); o->when(FL_WHEN_NEVER); } - { Fl_Return_Button* o = declblock_panel_ok = new Fl_Return_Button(120, 120, 80, 25, "OK"); + { Fl_Return_Button* o = declblock_panel_ok = new Fl_Return_Button(169, 99, 55, 20, "OK"); + o->labelsize(11); w->hotspot(o); } - { Fl_Button* o = declblock_panel_cancel = new Fl_Button(205, 120, 80, 25, "Cancel"); + { Fl_Button* o = declblock_panel_cancel = new Fl_Button(229, 99, 56, 20, "Cancel"); o->shortcut(0xff1b); + o->labelsize(11); } - { Fl_Light_Button* o = declblock_public_button = new Fl_Light_Button(9, 6, 65, 25, "public"); + { Fl_Light_Button* o = declblock_public_button = new Fl_Light_Button(10, 10, 54, 20, "public"); o->tooltip("Make the declaration publicly accessible."); - o->labelsize(10); + o->labelsize(11); o->when(FL_WHEN_NEVER); } o->set_modal(); @@ -245,28 +251,31 @@ Fl_Button *decl_panel_cancel=(Fl_Button *)0; Fl_Window* make_decl_panel() { Fl_Window* w; - { Fl_Window* o = decl_panel = new Fl_Window(290, 180, "declaration"); + { Fl_Window* o = decl_panel = new Fl_Window(290, 145, "Declaration"); w = o; - { Fl_Light_Button* o = decl_public_button = new Fl_Light_Button(10, 10, 65, 25, "public"); + { Fl_Light_Button* o = decl_public_button = new Fl_Light_Button(10, 10, 54, 20, "public"); o->tooltip("Make the declaration publicly accessible."); - o->labelsize(10); + o->labelsize(11); o->when(FL_WHEN_NEVER); } - { Fl_Input* o = decl_input = new Fl_Input(10, 40, 270, 25, "Can be any declaration, like \"int x;\", an external symbol like \"extern int\ + { Fl_Input* o = decl_input = new Fl_Input(10, 35, 270, 19, "Can be any declaration, like \"int x;\", an external symbol like \"extern int\ foo();\", a #directive like \"#include \", a comment like \"//foo\" or\ \"/*foo*/\", or typedef like \"typedef char byte;\" or \"using std::list;\"."); o->tooltip("Declaration text."); - o->labelsize(12); + o->labelsize(11); o->textfont(4); + o->textsize(11); o->align(134); o->when(FL_WHEN_NEVER); Fl_Group::current()->resizable(o); } - { Fl_Return_Button* o = decl_panel_ok = new Fl_Return_Button(115, 145, 80, 25, "OK"); + { Fl_Return_Button* o = decl_panel_ok = new Fl_Return_Button(164, 116, 55, 20, "OK"); + o->labelsize(11); w->hotspot(o); } - { Fl_Button* o = decl_panel_cancel = new Fl_Button(200, 145, 80, 25, "Cancel"); + { Fl_Button* o = decl_panel_cancel = new Fl_Button(224, 116, 56, 20, "Cancel"); o->shortcut(0xff1b); + o->labelsize(11); } o->end(); } @@ -287,33 +296,40 @@ Fl_Button *c_panel_cancel=(Fl_Button *)0; Fl_Window* make_class_panel() { Fl_Window* w; - { Fl_Window* o = class_panel = new Fl_Window(285, 170, "class"); + { Fl_Window* o = class_panel = new Fl_Window(285, 140, "Class"); w = o; - { Fl_Light_Button* o = c_public_button = new Fl_Light_Button(10, 10, 65, 25, "public"); + o->labelsize(11); + { Fl_Light_Button* o = c_public_button = new Fl_Light_Button(10, 10, 54, 20, "public"); o->tooltip("Make the class publicly accessible."); - o->labelsize(10); + o->labelsize(11); o->when(FL_WHEN_NEVER); } - { Fl_Input* o = c_name_input = new Fl_Input(10, 55, 265, 25, "Name:"); + { Fl_Input* o = c_name_input = new Fl_Input(10, 49, 265, 19, "Name:"); o->tooltip("Name of class."); - o->labelsize(12); + o->labelfont(1); + o->labelsize(11); o->textfont(4); + o->textsize(11); o->align(FL_ALIGN_TOP_LEFT); o->when(FL_WHEN_NEVER); Fl_Group::current()->resizable(o); } - { Fl_Input* o = c_subclass_input = new Fl_Input(10, 100, 265, 25, "Subclass of (text between : and {)"); + { Fl_Input* o = c_subclass_input = new Fl_Input(10, 87, 265, 19, "Subclass of (text between : and {)"); o->tooltip("Name of subclass."); - o->labelsize(12); + o->labelfont(1); + o->labelsize(11); o->textfont(4); + o->textsize(11); o->align(FL_ALIGN_TOP_LEFT); o->when(FL_WHEN_NEVER); } - { Fl_Return_Button* o = c_panel_ok = new Fl_Return_Button(110, 135, 80, 25, "OK"); + { Fl_Return_Button* o = c_panel_ok = new Fl_Return_Button(159, 111, 55, 20, "OK"); + o->labelsize(11); w->hotspot(o); } - { Fl_Button* o = c_panel_cancel = new Fl_Button(195, 135, 80, 25, "Cancel"); + { Fl_Button* o = c_panel_cancel = new Fl_Button(219, 111, 56, 20, "Cancel"); o->shortcut(0xff1b); + o->labelsize(11); } o->set_modal(); o->end(); @@ -339,50 +355,55 @@ Fl_Button *comment_load=(Fl_Button *)0; Fl_Window* make_comment_panel() { Fl_Window* w; - { Fl_Window* o = comment_panel = new Fl_Window(545, 290, "comment"); + { Fl_Window* o = comment_panel = new Fl_Window(545, 285, "Comment"); w = o; - { Fl_Group* o = new Fl_Group(100, 10, 435, 235); - o->box(FL_DOWN_FRAME); - { Fl_Text_Editor* o = comment_input = new Fl_Text_Editor(102, 12, 431, 231); - o->box(FL_NO_BOX); - Fl_Group::current()->resizable(o); - o->buffer(new Fl_Text_Buffer); - o->textfont(FL_COURIER); - o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE); - } - o->end(); + o->labelsize(11); + { Fl_Text_Editor* o = comment_input = new Fl_Text_Editor(95, 10, 438, 241); + o->box(FL_DOWN_BOX); + o->labelsize(11); + o->textsize(11); Fl_Group::current()->resizable(o); + o->buffer(new Fl_Text_Buffer); + o->textfont(FL_COURIER); + o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE); } { Fl_Group* o = new Fl_Group(368, 255, 167, 25); - { Fl_Return_Button* o = comment_panel_ok = new Fl_Return_Button(370, 255, 80, 25, "OK"); + o->labelsize(11); + { Fl_Return_Button* o = comment_panel_ok = new Fl_Return_Button(419, 255, 55, 20, "OK"); + o->labelsize(11); w->hotspot(o); } - { Fl_Button* o = comment_panel_cancel = new Fl_Button(455, 255, 80, 25, "Cancel"); + { Fl_Button* o = comment_panel_cancel = new Fl_Button(479, 255, 56, 20, "Cancel"); o->shortcut(0xff1b); + o->labelsize(11); } { Fl_Box* o = new Fl_Box(368, 255, 1, 1); + o->labelsize(11); Fl_Group::current()->resizable(o); } o->end(); } - { Fl_Group* o = new Fl_Group(10, 10, 80, 127); - { Fl_Light_Button* o = comment_in_source = new Fl_Light_Button(10, 10, 80, 25, "in source"); + { Fl_Group* o = new Fl_Group(10, 10, 205, 127); + o->labelsize(11); + { Fl_Light_Button* o = comment_in_source = new Fl_Light_Button(10, 10, 80, 20, "In Source"); o->tooltip("Put the comment into the source (.cxx) file."); - o->labelsize(10); + o->labelsize(11); o->when(FL_WHEN_NEVER); } - { Fl_Light_Button* o = comment_in_header = new Fl_Light_Button(10, 40, 80, 25, "in header"); + { Fl_Light_Button* o = comment_in_header = new Fl_Light_Button(10, 35, 80, 20, "In Header"); o->tooltip("Put the comment into the header (.h) file."); - o->labelsize(10); + o->labelsize(11); o->when(FL_WHEN_NEVER); } - { Fl_Menu_Button* o = comment_predefined = new Fl_Menu_Button(10, 75, 80, 25, "predefined"); - o->labelsize(10); + { Fl_Menu_Button* o = comment_predefined = new Fl_Menu_Button(10, 60, 80, 20, "Predefined"); + o->labelsize(11); + o->textsize(11); } - { Fl_Button* o = comment_load = new Fl_Button(10, 110, 80, 25, "load..."); - o->labelsize(10); + { Fl_Button* o = comment_load = new Fl_Button(10, 85, 80, 22, "Import..."); + o->labelsize(11); } { Fl_Box* o = new Fl_Box(10, 135, 2, 2); + o->labelsize(11); Fl_Group::current()->resizable(o); } o->end(); @@ -395,14 +416,14 @@ Fl_Window* make_comment_panel() { void type_make_cb(Fl_Widget*w,void*d) { Fl_Type *t = Fl_Type_make((char*)d); -if (t) {select_only(t); modflag = 1; t->open();} +if (t) {select_only(t); set_modflag(1); t->open();} } Fl_Window *widgetbin_panel=(Fl_Window *)0; Fl_Window* make_widgetbin() { Fl_Window* w; - { Fl_Window* o = widgetbin_panel = new Fl_Window(468, 100, "Bin"); + { Fl_Window* o = widgetbin_panel = new Fl_Window(465, 100, "Widget Bin"); w = o; { Fl_Group* o = new Fl_Group(3, 3, 74, 74); o->box(FL_THIN_DOWN_BOX); diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl index 5efc8bc60..e70956b2a 100644 --- a/fluid/function_panel.fl +++ b/fluid/function_panel.fl @@ -44,24 +44,24 @@ decl {extern void select_only(Fl_Type*);} {} Function {make_function_panel()} {open } { Fl_Window function_panel { - label {Function/Method} open - xywh {855 21 285 140} type Single resizable modal visible + label {Function/Method} + xywh {855 21 285 140} type Single hide resizable modal } { Fl_Light_Button f_public_button { label public - tooltip {Make the function or method publicly accessible.} xywh {10 10 58 20} labelsize 11 when 0 + tooltip {Make the function or method publicly accessible.} xywh {10 10 54 20} labelsize 11 when 0 } Fl_Light_Button f_c_button { label {C declaration} - tooltip {Declare with a C interface instead of C++.} xywh {73 10 94 20} labelsize 11 + tooltip {Declare with a C interface instead of C++.} xywh {69 10 90 20} labelsize 11 } Fl_Input f_name_input { label {Name(args): (blank for main())} - tooltip {The name of the function or method.} xywh {10 49 265 19} labelsize 11 align 5 when 0 textfont 4 textsize 11 resizable + tooltip {The name of the function or method.} xywh {10 49 265 19} labelfont 1 labelsize 11 align 5 when 0 textfont 4 textsize 11 resizable } Fl_Input f_return_type_input { label {Return Type: (blank to return outermost widget)} - tooltip {The return type of the function or method.} xywh {10 87 265 19} labelsize 11 align 5 when 0 textfont 4 textsize 11 + tooltip {The return type of the function or method.} xywh {10 87 265 19} labelfont 1 labelsize 11 align 5 when 0 textfont 4 textsize 11 } Fl_Return_Button f_panel_ok { label OK @@ -77,11 +77,11 @@ Function {make_function_panel()} {open Function {make_code_panel()} {open } { Fl_Window code_panel { - label Code open - xywh {327 261 545 175} type Single labelsize 11 resizable modal visible + label Code + xywh {527 128 545 175} type Single labelsize 11 hide resizable modal } { - Fl_Text_Editor code_input {selected - xywh {12 12 523 123} box DOWN_BOX labelsize 11 textsize 11 resizable + Fl_Text_Editor code_input { + xywh {10 12 525 123} box DOWN_BOX labelsize 11 textsize 11 resizable code0 {o->buffer(new Fl_Text_Buffer);} code1 {o->textfont(FL_COURIER);} code2 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);} @@ -107,26 +107,23 @@ Function {make_code_panel()} {open Function {make_codeblock_panel()} {open } { Fl_Window codeblock_panel { - label codeblock open - xywh {289 462 295 130} type Single hide resizable modal + label {Code Block} + xywh {845 158 295 100} type Single labelsize 11 hide resizable modal } { Fl_Input code_before_input { - tooltip {\#ifdef or similar conditional code block.} xywh {10 10 275 25} labelsize 12 align 5 when 0 textfont 4 resizable - } - Fl_Box {} { - label {"{...child code...}" is inserted here} - xywh {10 35 270 25} align 20 + tooltip {\#ifdef or similar conditional code block.} xywh {10 10 275 20} labelsize 11 align 5 when 0 textfont 4 textsize 11 resizable } Fl_Input code_after_input { - tooltip {\#endif or similar conditional code block.} xywh {10 60 275 25} labelsize 12 align 5 when 0 textfont 4 + label {"{...child code...}" is inserted here} + tooltip {\#endif or similar conditional code block.} xywh {10 49 275 19} labelsize 11 align 5 when 0 textfont 4 textsize 11 } Fl_Return_Button codeblock_panel_ok { label OK - xywh {120 95 80 25} hotspot + xywh {164 73 60 20} labelsize 11 hotspot } Fl_Button codeblock_panel_cancel { label Cancel - xywh {205 95 80 25} shortcut 0xff1b + xywh {229 73 56 20} shortcut 0xff1b labelsize 11 } } } @@ -134,30 +131,27 @@ Function {make_codeblock_panel()} {open Function {make_declblock_panel()} {open } { Fl_Window declblock_panel { - label {declaration block} open - xywh {184 572 295 155} type Single hide resizable modal + label {Declaration Block} + xywh {665 33 295 125} type Single labelsize 11 hide resizable modal } { Fl_Input decl_before_input { - tooltip {\#ifdef or similar conditional declaration block.} xywh {10 35 275 25} labelsize 12 align 5 when 0 textfont 4 resizable - } - Fl_Box {} { - label {"\\n...child code...\\n" is inserted here} - xywh {10 60 275 25} align 20 + tooltip {\#ifdef or similar conditional declaration block.} xywh {10 35 275 20} labelsize 11 align 5 when 0 textfont 4 textsize 11 resizable } Fl_Input decl_after_input { - tooltip {\#endif or similar declaration code block.} xywh {10 85 275 25} labelsize 12 align 5 when 0 textfont 4 + label {"\\n...child code...\\n" is inserted here} + tooltip {\#endif or similar declaration code block.} xywh {10 74 275 20} labelsize 11 align 5 when 0 textfont 4 textsize 11 } Fl_Return_Button declblock_panel_ok { label OK - xywh {120 120 80 25} hotspot + xywh {169 99 55 20} labelsize 11 hotspot } Fl_Button declblock_panel_cancel { label Cancel - xywh {205 120 80 25} shortcut 0xff1b + xywh {229 99 56 20} shortcut 0xff1b labelsize 11 } Fl_Light_Button declblock_public_button { label public - tooltip {Make the declaration publicly accessible.} xywh {9 6 65 25} labelsize 10 when 0 + tooltip {Make the declaration publicly accessible.} xywh {10 10 54 20} labelsize 11 when 0 } } } @@ -165,24 +159,24 @@ Function {make_declblock_panel()} {open Function {make_decl_panel()} {open } { Fl_Window decl_panel { - label declaration open - xywh {393 601 290 180} type Single hide resizable + label Declaration + xywh {789 289 290 145} type Single hide resizable } { Fl_Light_Button decl_public_button { label public - tooltip {Make the declaration publicly accessible.} xywh {10 10 65 25} labelsize 10 when 0 + tooltip {Make the declaration publicly accessible.} xywh {10 10 54 20} labelsize 11 when 0 } Fl_Input decl_input { label {Can be any declaration, like "int x;", an external symbol like "extern int foo();", a \#directive like "\#include ", a comment like "//foo" or "/*foo*/", or typedef like "typedef char byte;" or "using std::list;".} - tooltip {Declaration text.} xywh {10 40 270 25} labelsize 12 align 134 when 0 textfont 4 resizable + tooltip {Declaration text.} xywh {10 35 270 19} labelsize 11 align 134 when 0 textfont 4 textsize 11 resizable } Fl_Return_Button decl_panel_ok { label OK - xywh {115 145 80 25} hotspot + xywh {164 116 55 20} labelsize 11 hotspot } Fl_Button decl_panel_cancel { label Cancel - xywh {200 145 80 25} shortcut 0xff1b + xywh {224 116 56 20} shortcut 0xff1b labelsize 11 } } } @@ -190,28 +184,28 @@ Function {make_decl_panel()} {open Function {make_class_panel()} {open } { Fl_Window class_panel { - label class open - xywh {517 797 285 170} type Single hide resizable modal + label Class + xywh {744 223 285 140} type Single labelsize 11 hide resizable modal } { Fl_Light_Button c_public_button { label public - tooltip {Make the class publicly accessible.} xywh {10 10 65 25} labelsize 10 when 0 + tooltip {Make the class publicly accessible.} xywh {10 10 54 20} labelsize 11 when 0 } Fl_Input c_name_input { label {Name:} - tooltip {Name of class.} xywh {10 55 265 25} labelsize 12 align 5 when 0 textfont 4 resizable + tooltip {Name of class.} xywh {10 49 265 19} labelfont 1 labelsize 11 align 5 when 0 textfont 4 textsize 11 resizable } Fl_Input c_subclass_input { label {Subclass of (text between : and \{)} - tooltip {Name of subclass.} xywh {10 100 265 25} labelsize 12 align 5 when 0 textfont 4 + tooltip {Name of subclass.} xywh {10 87 265 19} labelfont 1 labelsize 11 align 5 when 0 textfont 4 textsize 11 } Fl_Return_Button c_panel_ok { label OK - xywh {110 135 80 25} hotspot + xywh {159 111 55 20} labelsize 11 hotspot } Fl_Button c_panel_cancel { label Cancel - xywh {195 135 80 25} shortcut 0xff1b + xywh {219 111 56 20} shortcut 0xff1b labelsize 11 } } } @@ -219,55 +213,51 @@ Function {make_class_panel()} {open Function {make_comment_panel()} {open } { Fl_Window comment_panel { - label comment open - xywh {328 152 545 290} type Single hide resizable modal + label Comment + xywh {328 152 545 285} type Single labelsize 11 hide resizable modal } { - Fl_Group {} {open - xywh {100 10 435 235} box DOWN_FRAME resizable - } { - Fl_Text_Editor comment_input { - xywh {102 12 431 231} box NO_BOX resizable - code0 {o->buffer(new Fl_Text_Buffer);} - code1 {o->textfont(FL_COURIER);} - code2 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);} - } + Fl_Text_Editor comment_input { + xywh {95 10 438 241} box DOWN_BOX labelsize 11 textsize 11 resizable + code0 {o->buffer(new Fl_Text_Buffer);} + code1 {o->textfont(FL_COURIER);} + code2 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);} } Fl_Group {} {open - xywh {368 255 167 25} + xywh {368 255 167 25} labelsize 11 } { Fl_Return_Button comment_panel_ok { label OK - xywh {370 255 80 25} hotspot + xywh {419 255 55 20} labelsize 11 hotspot } Fl_Button comment_panel_cancel { label Cancel - xywh {455 255 80 25} shortcut 0xff1b + xywh {479 255 56 20} shortcut 0xff1b labelsize 11 } Fl_Box {} { - xywh {368 255 1 1} resizable + xywh {368 255 1 1} labelsize 11 resizable } } Fl_Group {} {open - xywh {10 10 80 127} + xywh {10 10 205 127} labelsize 11 } { Fl_Light_Button comment_in_source { - label {in source} - tooltip {Put the comment into the source (.cxx) file.} xywh {10 10 80 25} labelsize 10 when 0 + label {In Source} + tooltip {Put the comment into the source (.cxx) file.} xywh {10 10 80 20} labelsize 11 when 0 } Fl_Light_Button comment_in_header { - label {in header} - tooltip {Put the comment into the header (.h) file.} xywh {10 40 80 25} labelsize 10 when 0 + label {In Header} + tooltip {Put the comment into the header (.h) file.} xywh {10 35 80 20} labelsize 11 when 0 } Fl_Menu_Button comment_predefined { - label predefined open - xywh {10 75 80 25} labelsize 10 + label Predefined open + xywh {10 60 80 20} labelsize 11 textsize 11 } {} Fl_Button comment_load { - label {load...} - xywh {10 110 80 25} labelsize 10 + label {Import...} + xywh {10 85 80 22} labelsize 11 } Fl_Box {} { - xywh {10 135 2 2} resizable + xywh {10 135 2 2} labelsize 11 resizable } } } @@ -276,14 +266,14 @@ Function {make_comment_panel()} {open Function {type_make_cb(Fl_Widget*w,void*d)} {open return_type void } { code {Fl_Type *t = Fl_Type_make((char*)d); -if (t) {select_only(t); modflag = 1; t->open();}} {} +if (t) {select_only(t); set_modflag(1); t->open();}} {} } Function {make_widgetbin()} {open } { Fl_Window widgetbin_panel { - label Bin open - xywh {325 137 468 100} type Single hide + label {Widget Bin} selected + xywh {325 137 465 100} type Single hide code0 {o->size(o->w(),80);} non_modal } { Fl_Group {} { diff --git a/fluid/widget_panel.cxx b/fluid/widget_panel.cxx index 62890c997..22418616f 100644 --- a/fluid/widget_panel.cxx +++ b/fluid/widget_panel.cxx @@ -45,27 +45,26 @@ Fl_Input *v_input[4]={(Fl_Input *)0}; Fl_Double_Window* make_widget_panel() { Fl_Double_Window* w; - { Fl_Double_Window* o = new Fl_Double_Window(415, 365); + { Fl_Double_Window* o = new Fl_Double_Window(415, 355); w = o; o->labelsize(11); w->hotspot(o); - { Fl_Tabs* o = new Fl_Tabs(9, 10, 396, 315); + { Fl_Tabs* o = new Fl_Tabs(8, 10, 397, 310); o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->callback((Fl_Callback*)cb_); o->when(FL_WHEN_NEVER); - { Fl_Group* o = new Fl_Group(9, 30, 395, 295, "GUI"); + { Fl_Group* o = new Fl_Group(8, 30, 396, 285, "GUI"); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->when(FL_WHEN_NEVER); - o->hide(); - { Fl_Group* o = new Fl_Group(85, 40, 314, 285); + { Fl_Group* o = new Fl_Group(8, 30, 396, 285); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Group* o = new Fl_Group(94, 40, 300, 20); + { Fl_Group* o = new Fl_Group(90, 30, 309, 30); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(94, 40, 195, 20, "Label:"); + { Fl_Input* o = new Fl_Input(90, 35, 199, 20, "Label:"); o->tooltip("The label text for the widget."); o->labelfont(1); o->labelsize(11); @@ -74,7 +73,7 @@ Fl_Double_Window* make_widget_panel() { o->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(o); } - { Fl_Choice* o = new Fl_Choice(289, 40, 105, 20); + { Fl_Choice* o = new Fl_Choice(290, 35, 109, 20); o->tooltip("The label style for the widget."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -85,10 +84,10 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Group* o = new Fl_Group(94, 65, 300, 20); + { Fl_Group* o = new Fl_Group(90, 60, 310, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(94, 65, 240, 20, "Image:"); + { Fl_Input* o = new Fl_Input(90, 60, 241, 20, "Image:"); o->tooltip("The active image for the widget."); o->labelfont(1); o->labelsize(11); @@ -96,17 +95,17 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)image_cb); Fl_Group::current()->resizable(o); } - { Fl_Button* o = new Fl_Button(334, 65, 60, 20, "Browse..."); + { Fl_Button* o = new Fl_Button(330, 60, 70, 20, "Browse..."); o->tooltip("Click to choose the active image."); o->labelsize(11); o->callback((Fl_Callback*)image_browse_cb); } o->end(); } - { Fl_Group* o = new Fl_Group(94, 90, 300, 20); + { Fl_Group* o = new Fl_Group(89, 85, 310, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(94, 90, 240, 20, "Inactive:"); + { Fl_Input* o = new Fl_Input(90, 85, 240, 20, "Inactive:"); o->tooltip("The inactive image for the widget."); o->labelfont(1); o->labelsize(11); @@ -114,78 +113,87 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)inactive_cb); Fl_Group::current()->resizable(o); } - { Fl_Button* o = new Fl_Button(334, 90, 60, 20, "Browse..."); + { Fl_Button* o = new Fl_Button(329, 85, 70, 20, "Browse..."); o->tooltip("Click to choose the inactive image."); o->labelsize(11); o->callback((Fl_Callback*)inactive_browse_cb); } o->end(); } - { Fl_Group* o = new Fl_Group(95, 114, 304, 21, "Alignment:"); + { Fl_Group* o = new Fl_Group(90, 111, 309, 20, "Alignment:"); o->labelfont(1); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->align(FL_ALIGN_LEFT); - { Fl_Button* o = new Fl_Button(95, 115, 30, 20, "Clip"); + { Fl_Button* o = new Fl_Button(90, 111, 40, 20, "Clip"); o->tooltip("Clip the label to the inside of the widget."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_CLIP)); + o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); } - { Fl_Button* o = new Fl_Button(125, 115, 38, 20, "Wrap"); + { Fl_Button* o = new Fl_Button(135, 111, 45, 20, "Wrap"); o->tooltip("Wrap the label text."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_WRAP)); } - { Fl_Button* o = new Fl_Button(162, 115, 69, 20, "Text/Image"); + { Fl_Button* o = new Fl_Button(185, 111, 69, 20, "Text/Image"); o->tooltip("Show the label text over the image."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_TEXT_OVER_IMAGE)); } - { Fl_Button* o = new Fl_Button(234, 115, 20, 20, "@-1<-"); + { Fl_Button* o = new Fl_Button(259, 111, 20, 20, "@-1<-"); o->tooltip("Left-align the label."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->labelcolor(FL_INACTIVE_COLOR); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_LEFT)); } - { Fl_Button* o = new Fl_Button(254, 115, 20, 20, "@-1->"); + { Fl_Button* o = new Fl_Button(284, 111, 20, 20, "@-1->"); o->tooltip("Right-align the label."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->labelcolor(FL_INACTIVE_COLOR); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_RIGHT)); } - { Fl_Button* o = new Fl_Button(274, 115, 20, 20, "@-18"); + { Fl_Button* o = new Fl_Button(309, 111, 20, 20, "@-18"); o->tooltip("Top-align the label."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->labelcolor(FL_INACTIVE_COLOR); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_TOP)); } - { Fl_Button* o = new Fl_Button(294, 115, 20, 20, "@-12"); + { Fl_Button* o = new Fl_Button(334, 111, 20, 20, "@-12"); o->tooltip("Bottom-align the label."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->labelcolor(FL_INACTIVE_COLOR); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_BOTTOM)); } - { Fl_Button* o = new Fl_Button(314, 115, 20, 20, "@-3square"); + { Fl_Button* o = new Fl_Button(359, 111, 20, 20, "@-3square"); o->tooltip("Show the label inside the widget."); o->type(1); + o->selection_color(FL_INACTIVE_COLOR); o->labelsize(11); o->labelcolor(FL_INACTIVE_COLOR); o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_INSIDE)); } - { Fl_Box* o = new Fl_Box(376, 115, 18, 20); + { Fl_Box* o = new Fl_Box(384, 111, 15, 20); o->labelsize(11); Fl_Group::current()->resizable(o); } o->end(); } - { Fl_Value_Input* o = widget_x_input = new Fl_Value_Input(94, 150, 60, 20, "X:"); + { Fl_Value_Input* o = widget_x_input = new Fl_Value_Input(90, 150, 60, 20, "X:"); o->tooltip("The X position of the widget."); o->labelsize(11); o->maximum(2048); @@ -194,7 +202,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)x_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Box* o = new Fl_Box(94, 150, 0, 20, "Position:"); + { Fl_Box* o = new Fl_Box(29, 150, 61, 20, "Position:"); o->labelfont(1); o->labelsize(11); o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE); @@ -208,7 +216,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)y_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Value_Input* o = widget_w_input = new Fl_Value_Input(214, 150, 60, 20, "Width:"); + { Fl_Value_Input* o = widget_w_input = new Fl_Value_Input(219, 150, 60, 20, "Width:"); o->tooltip("The width of the widget."); o->labelsize(11); o->maximum(2048); @@ -217,7 +225,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)w_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Value_Input* o = widget_h_input = new Fl_Value_Input(274, 150, 60, 20, "Height:"); + { Fl_Value_Input* o = widget_h_input = new Fl_Value_Input(284, 150, 60, 20, "Height:"); o->tooltip("The height of the widget."); o->labelsize(11); o->maximum(2048); @@ -226,12 +234,12 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)h_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Box* o = new Fl_Box(94, 185, 0, 20, "Values:"); + { Fl_Box* o = new Fl_Box(34, 190, 55, 20, "Values:"); o->labelfont(1); o->labelsize(11); o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE); } - { Fl_Value_Input* o = new Fl_Value_Input(94, 185, 60, 20, "Size:"); + { Fl_Value_Input* o = new Fl_Value_Input(89, 190, 55, 20, "Size:"); o->tooltip("The size of the slider."); o->labelsize(11); o->step(0.010101); @@ -239,14 +247,14 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)slider_size_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Value_Input* o = new Fl_Value_Input(154, 185, 60, 20, "Minimum:"); + { Fl_Value_Input* o = new Fl_Value_Input(149, 190, 55, 20, "Minimum:"); o->tooltip("The minimum value of the widget."); o->labelsize(11); o->textsize(11); o->callback((Fl_Callback*)min_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Value_Input* o = new Fl_Value_Input(214, 185, 60, 20, "Maximum:"); + { Fl_Value_Input* o = new Fl_Value_Input(209, 190, 55, 20, "Maximum:"); o->tooltip("The maximum value of the widget."); o->labelsize(11); o->value(1); @@ -254,21 +262,21 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)max_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Value_Input* o = new Fl_Value_Input(274, 185, 60, 20, "Step:"); + { Fl_Value_Input* o = new Fl_Value_Input(269, 190, 55, 20, "Step:"); o->tooltip("The resolution of the widget value."); o->labelsize(11); o->textsize(11); o->callback((Fl_Callback*)step_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Value_Input* o = new Fl_Value_Input(334, 185, 60, 20, "Value:"); + { Fl_Value_Input* o = new Fl_Value_Input(329, 190, 55, 20, "Value:"); o->tooltip("The current widget value."); o->labelsize(11); o->textsize(11); o->callback((Fl_Callback*)value_cb); o->align(FL_ALIGN_TOP_LEFT); } - { Shortcut_Button* o = new Shortcut_Button(94, 210, 300, 20, "Shortcut:"); + { Shortcut_Button* o = new Shortcut_Button(89, 215, 308, 20, "Shortcut:"); o->tooltip("The shortcut key for the widget."); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); @@ -281,10 +289,10 @@ Fl_Double_Window* make_widget_panel() { o->align(FL_ALIGN_LEFT); o->when(FL_WHEN_RELEASE); } - { Fl_Group* o = new Fl_Group(94, 235, 300, 21); + { Fl_Group* o = new Fl_Group(92, 240, 305, 21); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(94, 235, 115, 20, "X Class:"); + { Fl_Input* o = new Fl_Input(92, 241, 101, 20, "X Class:"); o->tooltip("The X resource class."); o->labelfont(1); o->labelsize(11); @@ -292,19 +300,19 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)xclass_cb); Fl_Group::current()->resizable(o); } - { Fl_Light_Button* o = new Fl_Light_Button(209, 235, 57, 20, "Border"); + { Fl_Light_Button* o = new Fl_Light_Button(198, 241, 59, 20, "Border"); o->tooltip("Add a border around the window."); o->selection_color((Fl_Color)1); o->labelsize(11); o->callback((Fl_Callback*)border_cb); } - { Fl_Light_Button* o = new Fl_Light_Button(266, 235, 54, 20, "Modal"); + { Fl_Light_Button* o = new Fl_Light_Button(262, 241, 55, 20, "Modal"); o->tooltip("Make the window modal."); o->selection_color((Fl_Color)1); o->labelsize(11); o->callback((Fl_Callback*)modal_cb); } - { Fl_Light_Button* o = new Fl_Light_Button(320, 235, 74, 21, "Nonmodal"); + { Fl_Light_Button* o = new Fl_Light_Button(322, 240, 75, 21, "Nonmodal"); o->tooltip("Make the window non-modal."); o->selection_color((Fl_Color)1); o->labelsize(11); @@ -313,54 +321,54 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Group* o = new Fl_Group(94, 260, 301, 20); + { Fl_Group* o = new Fl_Group(92, 265, 307, 20); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Light_Button* o = new Fl_Light_Button(94, 260, 55, 20, "Visible"); + { Fl_Light_Button* o = new Fl_Light_Button(92, 265, 57, 20, "Visible"); o->tooltip("Show the widget."); o->selection_color((Fl_Color)1); o->labelsize(11); o->callback((Fl_Callback*)visible_cb); } - { Fl_Box* o = new Fl_Box(94, 260, 0, 20, "Attributes:"); + { Fl_Box* o = new Fl_Box(92, 265, 6, 20, "Attributes:"); o->labelfont(1); o->labelsize(11); o->align(FL_ALIGN_LEFT); } - { Fl_Light_Button* o = new Fl_Light_Button(149, 260, 55, 20, "Active"); + { Fl_Light_Button* o = new Fl_Light_Button(154, 265, 56, 20, "Active"); o->tooltip("Activate the widget."); o->selection_color((Fl_Color)1); o->labelsize(11); o->callback((Fl_Callback*)active_cb); } - { Fl_Light_Button* o = new Fl_Light_Button(204, 260, 72, 20, "Resizable"); + { Fl_Light_Button* o = new Fl_Light_Button(215, 265, 74, 20, "Resizable"); o->tooltip("Make the widget resizable."); o->selection_color((Fl_Color)1); o->labelsize(11); o->callback((Fl_Callback*)resizable_cb); o->when(FL_WHEN_CHANGED); } - { Fl_Light_Button* o = new Fl_Light_Button(276, 260, 61, 20, "Hotspot"); + { Fl_Light_Button* o = new Fl_Light_Button(294, 265, 64, 20, "Hotspot"); o->tooltip("Center the window under this widget."); o->selection_color((Fl_Color)1); o->labelsize(11); o->callback((Fl_Callback*)hotspot_cb); o->when(FL_WHEN_CHANGED); } - { Fl_Box* o = new Fl_Box(375, 260, 20, 20); + { Fl_Box* o = new Fl_Box(379, 265, 20, 20); o->labelsize(11); Fl_Group::current()->resizable(o); } o->end(); } - { Fl_Input* o = new Fl_Input(94, 285, 300, 20, "Tooltip:"); + { Fl_Input* o = new Fl_Input(92, 290, 307, 20, "Tooltip:"); o->tooltip("The tooltip text for the widget."); o->labelfont(1); o->labelsize(11); o->textsize(11); o->callback((Fl_Callback*)tooltip_cb); } - { Fl_Box* o = new Fl_Box(94, 305, 300, 20); + { Fl_Box* o = new Fl_Box(94, 310, 305, 5); o->labelsize(11); Fl_Group::current()->resizable(o); } @@ -370,21 +378,21 @@ Fl_Double_Window* make_widget_panel() { o->end(); Fl_Group::current()->resizable(o); } - { Fl_Group* o = new Fl_Group(10, 30, 395, 295, "Style"); + { Fl_Group* o = new Fl_Group(8, 30, 397, 290, "Style"); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->when(FL_WHEN_NEVER); o->hide(); - { Fl_Group* o = new Fl_Group(100, 40, 295, 276); + { Fl_Group* o = new Fl_Group(8, 30, 396, 178); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Group* o = new Fl_Group(100, 40, 295, 95); + { Fl_Group* o = new Fl_Group(100, 35, 300, 100); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Group* o = new Fl_Group(100, 40, 295, 20); + { Fl_Group* o = new Fl_Group(100, 35, 300, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Choice* o = new Fl_Choice(100, 40, 155, 20, "Label Font:"); + { Fl_Choice* o = new Fl_Choice(100, 35, 162, 20, "Label Font:"); o->tooltip("The style of the label text."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -394,7 +402,7 @@ Fl_Double_Window* make_widget_panel() { Fl_Group::current()->resizable(o); o->menu(fontmenu); } - { Fl_Value_Input* o = new Fl_Value_Input(255, 40, 50, 20); + { Fl_Value_Input* o = new Fl_Value_Input(260, 35, 50, 20); o->tooltip("The size of the label text."); o->labelsize(11); o->maximum(100); @@ -403,17 +411,17 @@ Fl_Double_Window* make_widget_panel() { o->textsize(11); o->callback((Fl_Callback*)labelsize_cb); } - { Fl_Button* o = new Fl_Button(305, 40, 90, 20, "Label Color"); + { Fl_Button* o = new Fl_Button(310, 35, 90, 20, "Label Color"); o->tooltip("The color of the label text."); o->labelsize(11); o->callback((Fl_Callback*)labelcolor_cb); } o->end(); } - { Fl_Group* o = new Fl_Group(100, 65, 295, 20); + { Fl_Group* o = new Fl_Group(100, 60, 300, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Choice* o = new Fl_Choice(100, 65, 205, 20, "Box:"); + { Fl_Choice* o = new Fl_Choice(100, 60, 210, 20, "Box:"); o->tooltip("The \"up\" box of the widget."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -423,17 +431,17 @@ Fl_Double_Window* make_widget_panel() { Fl_Group::current()->resizable(o); o->menu(boxmenu); } - { Fl_Button* o = new Fl_Button(305, 65, 90, 20, "Color"); + { Fl_Button* o = new Fl_Button(310, 60, 90, 20, "Color"); o->tooltip("The background color of the widget."); o->labelsize(11); o->callback((Fl_Callback*)color_cb); } o->end(); } - { Fl_Group* o = new Fl_Group(100, 90, 295, 20); + { Fl_Group* o = new Fl_Group(100, 85, 300, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Choice* o = new Fl_Choice(100, 90, 205, 20, "Down Box:"); + { Fl_Choice* o = new Fl_Choice(100, 85, 210, 20, "Down Box:"); o->tooltip("The \"down\" box of the widget."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -443,17 +451,17 @@ Fl_Double_Window* make_widget_panel() { Fl_Group::current()->resizable(o); o->menu(boxmenu); } - { Fl_Button* o = new Fl_Button(305, 90, 90, 20, "Select Color"); + { Fl_Button* o = new Fl_Button(310, 85, 90, 20, "Select Color"); o->tooltip("The selection color of the widget."); o->labelsize(11); o->callback((Fl_Callback*)color2_cb); } o->end(); } - { Fl_Group* o = new Fl_Group(100, 115, 295, 20); + { Fl_Group* o = new Fl_Group(100, 110, 300, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Choice* o = new Fl_Choice(100, 115, 155, 20, "Text Font:"); + { Fl_Choice* o = new Fl_Choice(100, 110, 160, 20, "Text Font:"); o->tooltip("The value text style."); o->box(FL_DOWN_BOX); o->down_box(FL_BORDER_BOX); @@ -463,7 +471,7 @@ Fl_Double_Window* make_widget_panel() { Fl_Group::current()->resizable(o); o->menu(fontmenu); } - { Fl_Value_Input* o = new Fl_Value_Input(255, 115, 50, 20); + { Fl_Value_Input* o = new Fl_Value_Input(260, 110, 50, 20); o->tooltip("The value text size."); o->labelsize(11); o->maximum(100); @@ -472,7 +480,7 @@ Fl_Double_Window* make_widget_panel() { o->textsize(11); o->callback((Fl_Callback*)textsize_cb); } - { Fl_Button* o = new Fl_Button(305, 115, 90, 20, "Text Color"); + { Fl_Button* o = new Fl_Button(310, 110, 90, 20, "Text Color"); o->tooltip("The value text color."); o->labelsize(11); o->callback((Fl_Callback*)textcolor_cb); @@ -481,7 +489,7 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Box* o = new Fl_Box(100, 304, 295, 12); + { Fl_Box* o = new Fl_Box(100, 140, 295, 68); o->labelsize(11); Fl_Group::current()->resizable(o); } @@ -490,17 +498,18 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Group* o = new Fl_Group(10, 30, 395, 295, "C++"); + { Fl_Group* o = new Fl_Group(10, 30, 395, 290, "C++"); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); o->when(FL_WHEN_NEVER); - { Fl_Group* o = new Fl_Group(100, 40, 295, 132); + o->hide(); + { Fl_Group* o = new Fl_Group(100, 35, 300, 137); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Group* o = new Fl_Group(100, 40, 295, 20); + { Fl_Group* o = new Fl_Group(100, 35, 300, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(100, 40, 160, 20, "Class:"); + { Fl_Input* o = new Fl_Input(105, 35, 160, 20, "Class:"); o->tooltip("The widget subclass."); o->labelfont(1); o->labelsize(11); @@ -509,7 +518,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)subclass_cb, (void*)(4)); Fl_Group::current()->resizable(o); } - { Fl_Choice* o = new Fl_Choice(260, 40, 135, 20); + { Fl_Choice* o = new Fl_Choice(265, 35, 135, 20); o->tooltip("The widget subtype."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -518,10 +527,10 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Group* o = new Fl_Group(100, 65, 295, 20); + { Fl_Group* o = new Fl_Group(100, 60, 300, 25); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(100, 65, 230, 20, "Name:"); + { Fl_Input* o = new Fl_Input(105, 60, 241, 20, "Name:"); o->tooltip("The name of the widget."); o->labelfont(1); o->labelsize(11); @@ -529,7 +538,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)name_cb); Fl_Group::current()->resizable(o); } - { Fl_Light_Button* o = new Fl_Light_Button(330, 65, 65, 20, "public"); + { Fl_Light_Button* o = new Fl_Light_Button(346, 60, 54, 20, "public"); o->tooltip("Make the widget publicly accessible."); o->selection_color((Fl_Color)1); o->labelsize(11); @@ -538,7 +547,7 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Input* o = v_input[0] = new Fl_Input(100, 90, 295, 20, "Extra Code:"); + { Fl_Input* o = v_input[0] = new Fl_Input(105, 85, 295, 20, "Extra Code:"); o->tooltip("Extra initialization code for the widget."); o->labelfont(1); o->labelsize(11); @@ -546,21 +555,21 @@ Fl_Double_Window* make_widget_panel() { o->textsize(11); o->callback((Fl_Callback*)v_input_cb, (void*)(0)); } - { Fl_Input* o = v_input[1] = new Fl_Input(100, 110, 295, 20); + { Fl_Input* o = v_input[1] = new Fl_Input(105, 105, 295, 20); o->tooltip("Extra initialization code for the widget."); o->labelsize(11); o->textfont(4); o->textsize(11); o->callback((Fl_Callback*)v_input_cb, (void*)(1)); } - { Fl_Input* o = v_input[2] = new Fl_Input(100, 130, 295, 20); + { Fl_Input* o = v_input[2] = new Fl_Input(105, 125, 295, 20); o->tooltip("Extra initialization code for the widget."); o->labelsize(11); o->textfont(4); o->textsize(11); o->callback((Fl_Callback*)v_input_cb, (void*)(2)); } - { Fl_Input* o = v_input[3] = new Fl_Input(100, 150, 295, 20); + { Fl_Input* o = v_input[3] = new Fl_Input(105, 147, 295, 20); o->tooltip("Extra initialization code for the widget."); o->labelsize(11); o->textfont(4); @@ -569,33 +578,25 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Group* o = new Fl_Group(100, 175, 295, 90); + { Fl_Text_Editor* o = new Fl_Text_Editor(105, 174, 295, 91, "Callback:"); + o->tooltip("The callback function or code for the widget."); o->box(FL_DOWN_BOX); + o->labelfont(1); o->labelsize(11); - o->callback((Fl_Callback*)propagate_load); - { Fl_Text_Editor* o = new Fl_Text_Editor(102, 177, 291, 86, "Callback:"); - o->tooltip("The callback function or code for the widget."); - o->box(FL_NO_BOX); - o->labelfont(1); - o->labelsize(11); - o->textfont(4); - o->textsize(11); - o->callback((Fl_Callback*)callback_cb); - o->align(FL_ALIGN_LEFT); - Fl_Group::current()->resizable(o); - o->buffer(new Fl_Text_Buffer()); - o->textfont(FL_COURIER); - } - o->end(); - Fl_Group::current()->resizable(o); + o->textfont(4); + o->textsize(11); + o->callback((Fl_Callback*)callback_cb); + o->align(FL_ALIGN_LEFT); + o->buffer(new Fl_Text_Buffer()); + o->textfont(FL_COURIER); } - { Fl_Group* o = new Fl_Group(100, 270, 295, 45); + { Fl_Group* o = new Fl_Group(100, 270, 303, 45); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Group* o = new Fl_Group(100, 270, 295, 20); + { Fl_Group* o = new Fl_Group(100, 270, 303, 20); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(100, 270, 140, 20, "User Data:"); + { Fl_Input* o = new Fl_Input(105, 270, 140, 20, "User Data:"); o->tooltip("The user data to pass into the callback code."); o->labelfont(1); o->labelsize(11); @@ -604,7 +605,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)user_data_cb); Fl_Group::current()->resizable(o); } - { Fl_Choice* o = new Fl_Choice(290, 270, 105, 20, "When:"); + { Fl_Choice* o = new Fl_Choice(295, 270, 105, 20, "When:"); o->tooltip("When to call the callback function."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -616,10 +617,10 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Group* o = new Fl_Group(100, 295, 295, 20); + { Fl_Group* o = new Fl_Group(100, 295, 300, 20); o->labelsize(11); o->callback((Fl_Callback*)propagate_load); - { Fl_Input* o = new Fl_Input(100, 295, 140, 20, "Type:"); + { Fl_Input* o = new Fl_Input(105, 295, 140, 20, "Type:"); o->tooltip("The type of the user data."); o->labelfont(1); o->labelsize(11); @@ -628,7 +629,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)user_data_type_cb); Fl_Group::current()->resizable(o); } - { Fl_Light_Button* o = new Fl_Light_Button(290, 295, 105, 20, "No Change"); + { Fl_Light_Button* o = new Fl_Light_Button(295, 295, 105, 20, "No Change"); o->tooltip("Call the callback even if the value has not changed."); o->selection_color((Fl_Color)1); o->labelsize(11); @@ -638,38 +639,33 @@ Fl_Double_Window* make_widget_panel() { } o->end(); } - { Fl_Box* o = new Fl_Box(95, 325, 100, 0, "label"); - o->labelsize(11); - o->hide(); - o->deactivate(); - } o->end(); } o->end(); Fl_Group::current()->resizable(o); } - { Fl_Group* o = new Fl_Group(8, 335, 396, 20); + { Fl_Group* o = new Fl_Group(8, 326, 396, 19); o->labelsize(11); - { Fl_Box* o = new Fl_Box(8, 335, 20, 0); + { Fl_Box* o = new Fl_Box(8, 330, 20, 0); o->labelsize(11); Fl_Group::current()->resizable(o); } - { Fl_Button* o = new Fl_Button(274, 335, 77, 19, "No &Overlay"); + { Fl_Button* o = new Fl_Button(268, 326, 80, 19, "No &Overlay"); o->tooltip("Hide the widget overlay box."); o->labelsize(11); o->labelcolor((Fl_Color)1); o->callback((Fl_Callback*)overlay_cb); } - { Fl_Button* o = new Fl_Button(159, 335, 80, 0, "Revert"); + { Fl_Button* o = new Fl_Button(159, 330, 80, 0, "Revert"); o->labelsize(11); o->callback((Fl_Callback*)revert_cb); o->hide(); } - { Fl_Return_Button* o = new Fl_Return_Button(356, 335, 48, 19, "OK"); + { Fl_Return_Button* o = new Fl_Return_Button(353, 326, 51, 19, "OK"); o->labelsize(11); o->callback((Fl_Callback*)ok_cb); } - { Fl_Button* o = new Fl_Button(329, 335, 75, 0, "Cancel"); + { Fl_Button* o = new Fl_Button(329, 330, 75, 0, "Cancel"); o->labelsize(11); o->callback((Fl_Callback*)cancel_cb); o->hide(); diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl index 37c778ccd..23f419ffa 100644 --- a/fluid/widget_panel.fl +++ b/fluid/widget_panel.fl @@ -34,132 +34,132 @@ comment {// Function {make_widget_panel()} {open } { Fl_Window {} {open - xywh {4 21 415 365} type Double labelsize 11 resizable hotspot visible + xywh {632 21 415 355} type Double labelsize 11 resizable hotspot visible } { Fl_Tabs {} { callback {propagate_load((Fl_Group *)o,v);} open - xywh {9 10 396 315} selection_color 8 labelsize 11 when 0 resizable + xywh {8 10 397 310} selection_color 8 labelsize 11 when 0 resizable } { Fl_Group {} { label GUI - callback propagate_load - xywh {9 30 395 295} labelsize 11 when 0 hide resizable + callback propagate_load selected + xywh {8 30 396 285} labelsize 11 when 0 resizable } { Fl_Group {} { callback propagate_load open - xywh {85 40 314 285} labelsize 11 resizable + xywh {8 30 396 285} labelsize 11 resizable } { Fl_Group {} { callback propagate_load open - xywh {94 40 300 20} labelsize 11 + xywh {90 30 309 30} labelsize 11 } { Fl_Input {} { label {Label:} callback label_cb - tooltip {The label text for the widget.} xywh {94 40 195 20} labelfont 1 labelsize 11 when 1 textsize 11 resizable + tooltip {The label text for the widget.} xywh {90 35 199 20} labelfont 1 labelsize 11 when 1 textsize 11 resizable } Fl_Choice {} { callback labeltype_cb open - tooltip {The label style for the widget.} xywh {289 40 105 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 textsize 11 + tooltip {The label style for the widget.} xywh {290 35 109 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 textsize 11 code0 {extern Fl_Menu_Item labeltypemenu[];} code1 {o->menu(labeltypemenu);} } {} } Fl_Group {} { callback propagate_load open - xywh {94 65 300 20} labelsize 11 + xywh {90 60 310 25} labelsize 11 } { Fl_Input {} { label {Image:} callback image_cb - tooltip {The active image for the widget.} xywh {94 65 240 20} labelfont 1 labelsize 11 textsize 11 resizable + tooltip {The active image for the widget.} xywh {90 60 241 20} labelfont 1 labelsize 11 textsize 11 resizable } Fl_Button {} { label {Browse...} callback image_browse_cb - tooltip {Click to choose the active image.} xywh {334 65 60 20} labelsize 11 + tooltip {Click to choose the active image.} xywh {330 60 70 20} labelsize 11 } } Fl_Group {} { callback propagate_load open - xywh {94 90 300 20} labelsize 11 + xywh {89 85 310 25} labelsize 11 } { Fl_Input {} { label {Inactive:} callback inactive_cb - tooltip {The inactive image for the widget.} xywh {94 90 240 20} labelfont 1 labelsize 11 textsize 11 resizable + tooltip {The inactive image for the widget.} xywh {90 85 240 20} labelfont 1 labelsize 11 textsize 11 resizable } Fl_Button {} { label {Browse...} callback inactive_browse_cb - tooltip {Click to choose the inactive image.} xywh {334 90 60 20} labelsize 11 + tooltip {Click to choose the inactive image.} xywh {329 85 70 20} labelsize 11 } } Fl_Group {} { label {Alignment:} callback propagate_load open - xywh {95 114 304 21} labelfont 1 labelsize 11 align 4 + xywh {90 111 309 20} labelfont 1 labelsize 11 align 4 } { Fl_Button {} { label Clip user_data FL_ALIGN_CLIP callback align_cb - tooltip {Clip the label to the inside of the widget.} xywh {95 115 30 20} type Toggle labelsize 11 + tooltip {Clip the label to the inside of the widget.} xywh {90 111 40 20} type Toggle selection_color 8 labelsize 11 align 16 } Fl_Button {} { label Wrap user_data FL_ALIGN_WRAP callback align_cb - tooltip {Wrap the label text.} xywh {125 115 38 20} type Toggle labelsize 11 + tooltip {Wrap the label text.} xywh {135 111 45 20} type Toggle selection_color 8 labelsize 11 } Fl_Button {} { label {Text/Image} user_data FL_ALIGN_TEXT_OVER_IMAGE callback align_cb - tooltip {Show the label text over the image.} xywh {162 115 69 20} type Toggle labelsize 11 + tooltip {Show the label text over the image.} xywh {185 111 69 20} type Toggle selection_color 8 labelsize 11 } Fl_Button {} { label {@-1<-} user_data FL_ALIGN_LEFT callback align_cb - tooltip {Left-align the label.} xywh {234 115 20 20} type Toggle labelsize 11 labelcolor 8 + tooltip {Left-align the label.} xywh {259 111 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 } Fl_Button {} { label {@-1->} user_data FL_ALIGN_RIGHT callback align_cb - tooltip {Right-align the label.} xywh {254 115 20 20} type Toggle labelsize 11 labelcolor 8 + tooltip {Right-align the label.} xywh {284 111 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 } Fl_Button {} { label {@-18} user_data FL_ALIGN_TOP callback align_cb - tooltip {Top-align the label.} xywh {274 115 20 20} type Toggle labelsize 11 labelcolor 8 + tooltip {Top-align the label.} xywh {309 111 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 } Fl_Button {} { label {@-12} user_data FL_ALIGN_BOTTOM callback align_cb - tooltip {Bottom-align the label.} xywh {294 115 20 20} type Toggle labelsize 11 labelcolor 8 + tooltip {Bottom-align the label.} xywh {334 111 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 } Fl_Button {} { label {@-3square} user_data FL_ALIGN_INSIDE callback align_cb - tooltip {Show the label inside the widget.} xywh {314 115 20 20} type Toggle labelsize 11 labelcolor 8 + tooltip {Show the label inside the widget.} xywh {359 111 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 } Fl_Box {} { - xywh {376 115 18 20} labelsize 11 resizable + xywh {384 111 15 20} labelsize 11 resizable } } Fl_Value_Input widget_x_input { label {X:} callback x_cb - tooltip {The X position of the widget.} xywh {94 150 60 20} labelsize 11 align 5 maximum 2048 step 1 textsize 11 + tooltip {The X position of the widget.} xywh {90 150 60 20} labelsize 11 align 5 maximum 2048 step 1 textsize 11 } Fl_Box {} { label {Position:} - xywh {94 150 0 20} labelfont 1 labelsize 11 align 24 + xywh {29 150 61 20} labelfont 1 labelsize 11 align 24 } Fl_Value_Input widget_y_input { label {Y:} @@ -169,352 +169,343 @@ Function {make_widget_panel()} {open Fl_Value_Input widget_w_input { label {Width:} callback w_cb - tooltip {The width of the widget.} xywh {214 150 60 20} labelsize 11 align 5 maximum 2048 step 1 textsize 11 + tooltip {The width of the widget.} xywh {219 150 60 20} labelsize 11 align 5 maximum 2048 step 1 textsize 11 } Fl_Value_Input widget_h_input { label {Height:} callback h_cb - tooltip {The height of the widget.} xywh {274 150 60 20} labelsize 11 align 5 maximum 2048 step 1 textsize 11 + tooltip {The height of the widget.} xywh {284 150 60 20} labelsize 11 align 5 maximum 2048 step 1 textsize 11 } Fl_Box {} { label {Values:} - xywh {94 185 0 20} labelfont 1 labelsize 11 align 24 + xywh {34 190 55 20} labelfont 1 labelsize 11 align 24 } Fl_Value_Input {} { label {Size:} callback slider_size_cb - tooltip {The size of the slider.} xywh {94 185 60 20} labelsize 11 align 5 step 0.010101 textsize 11 + tooltip {The size of the slider.} xywh {89 190 55 20} labelsize 11 align 5 step 0.010101 textsize 11 } Fl_Value_Input {} { label {Minimum:} callback min_cb - tooltip {The minimum value of the widget.} xywh {154 185 60 20} labelsize 11 align 5 textsize 11 + tooltip {The minimum value of the widget.} xywh {149 190 55 20} labelsize 11 align 5 textsize 11 } Fl_Value_Input {} { label {Maximum:} callback max_cb - tooltip {The maximum value of the widget.} xywh {214 185 60 20} labelsize 11 align 5 value 1 textsize 11 + tooltip {The maximum value of the widget.} xywh {209 190 55 20} labelsize 11 align 5 value 1 textsize 11 } Fl_Value_Input {} { label {Step:} callback step_cb - tooltip {The resolution of the widget value.} xywh {274 185 60 20} labelsize 11 align 5 textsize 11 + tooltip {The resolution of the widget value.} xywh {269 190 55 20} labelsize 11 align 5 textsize 11 } Fl_Value_Input {} { label {Value:} callback value_cb - tooltip {The current widget value.} xywh {334 185 60 20} labelsize 11 align 5 textsize 11 + tooltip {The current widget value.} xywh {329 190 55 20} labelsize 11 align 5 textsize 11 } Fl_Button {} { label {Shortcut:} callback shortcut_in_cb - tooltip {The shortcut key for the widget.} xywh {94 210 300 20} box DOWN_BOX color 7 selection_color 7 labelfont 1 labelsize 11 align 4 + tooltip {The shortcut key for the widget.} xywh {89 215 308 20} box DOWN_BOX color 7 selection_color 7 labelfont 1 labelsize 11 align 4 code0 {\#include "Shortcut_Button.h"} class Shortcut_Button } Fl_Group {} { callback propagate_load open - xywh {94 235 300 21} labelsize 11 + xywh {92 240 305 21} labelsize 11 } { Fl_Input {} { label {X Class:} callback xclass_cb - tooltip {The X resource class.} xywh {94 235 115 20} labelfont 1 labelsize 11 textsize 11 resizable + tooltip {The X resource class.} xywh {92 241 101 20} labelfont 1 labelsize 11 textsize 11 resizable } Fl_Light_Button {} { label Border callback border_cb - tooltip {Add a border around the window.} xywh {209 235 57 20} selection_color 1 labelsize 11 + tooltip {Add a border around the window.} xywh {198 241 59 20} selection_color 1 labelsize 11 } Fl_Light_Button {} { label Modal callback modal_cb - tooltip {Make the window modal.} xywh {266 235 54 20} selection_color 1 labelsize 11 + tooltip {Make the window modal.} xywh {262 241 55 20} selection_color 1 labelsize 11 } Fl_Light_Button {} { label Nonmodal callback non_modal_cb - tooltip {Make the window non-modal.} xywh {320 235 74 21} selection_color 1 labelsize 11 align 148 + tooltip {Make the window non-modal.} xywh {322 240 75 21} selection_color 1 labelsize 11 align 148 } } Fl_Group {} { callback propagate_load open - xywh {94 260 301 20} labelsize 11 + xywh {92 265 307 20} labelsize 11 } { Fl_Light_Button {} { label Visible callback visible_cb - tooltip {Show the widget.} xywh {94 260 55 20} selection_color 1 labelsize 11 + tooltip {Show the widget.} xywh {92 265 57 20} selection_color 1 labelsize 11 } Fl_Box {} { label {Attributes:} - xywh {94 260 0 20} labelfont 1 labelsize 11 align 4 + xywh {92 265 6 20} labelfont 1 labelsize 11 align 4 } Fl_Light_Button {} { label Active callback active_cb - tooltip {Activate the widget.} xywh {149 260 55 20} selection_color 1 labelsize 11 + tooltip {Activate the widget.} xywh {154 265 56 20} selection_color 1 labelsize 11 } Fl_Light_Button {} { label Resizable callback resizable_cb - tooltip {Make the widget resizable.} xywh {204 260 72 20} selection_color 1 labelsize 11 when 1 + tooltip {Make the widget resizable.} xywh {215 265 74 20} selection_color 1 labelsize 11 when 1 } Fl_Light_Button {} { label Hotspot callback hotspot_cb - tooltip {Center the window under this widget.} xywh {276 260 61 20} selection_color 1 labelsize 11 when 1 + tooltip {Center the window under this widget.} xywh {294 265 64 20} selection_color 1 labelsize 11 when 1 } Fl_Box {} { - xywh {375 260 20 20} labelsize 11 resizable + xywh {379 265 20 20} labelsize 11 resizable } } Fl_Input {} { label {Tooltip:} callback tooltip_cb - tooltip {The tooltip text for the widget.} xywh {94 285 300 20} labelfont 1 labelsize 11 textsize 11 + tooltip {The tooltip text for the widget.} xywh {92 290 307 20} labelfont 1 labelsize 11 textsize 11 } Fl_Box {} { - xywh {94 305 300 20} labelsize 11 resizable + xywh {94 310 305 5} labelsize 11 resizable } } } Fl_Group {} { label Style callback propagate_load - xywh {10 30 395 295} labelsize 11 when 0 hide + xywh {8 30 397 290} labelsize 11 when 0 hide } { Fl_Group {} { callback propagate_load open - xywh {100 40 295 276} labelsize 11 resizable + xywh {8 30 396 178} labelsize 11 resizable } { Fl_Group {} { callback propagate_load open - xywh {100 40 295 95} labelsize 11 + xywh {100 35 300 100} labelsize 11 } { Fl_Group {} { callback propagate_load open - xywh {100 40 295 20} labelsize 11 + xywh {100 35 300 25} labelsize 11 } { Fl_Choice {} { label {Label Font:} callback labelfont_cb open - tooltip {The style of the label text.} xywh {100 40 155 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable + tooltip {The style of the label text.} xywh {100 35 162 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable code0 {extern Fl_Menu_Item fontmenu[];} code1 {o->menu(fontmenu);} } {} Fl_Value_Input {} { callback labelsize_cb - tooltip {The size of the label text.} xywh {255 40 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 + tooltip {The size of the label text.} xywh {260 35 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 } Fl_Button {} { label {Label Color} callback labelcolor_cb - tooltip {The color of the label text.} xywh {305 40 90 20} labelsize 11 + tooltip {The color of the label text.} xywh {310 35 90 20} labelsize 11 } } Fl_Group {} { callback propagate_load open - xywh {100 65 295 20} labelsize 11 + xywh {100 60 300 25} labelsize 11 } { Fl_Choice {} { label {Box:} callback box_cb open - tooltip {The "up" box of the widget.} xywh {100 65 205 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable + tooltip {The "up" box of the widget.} xywh {100 60 210 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable code0 {extern Fl_Menu_Item boxmenu[];} code1 {o->menu(boxmenu);} } {} Fl_Button {} { label Color callback color_cb - tooltip {The background color of the widget.} xywh {305 65 90 20} labelsize 11 + tooltip {The background color of the widget.} xywh {310 60 90 20} labelsize 11 } } Fl_Group {} { callback propagate_load open - xywh {100 90 295 20} labelsize 11 + xywh {100 85 300 25} labelsize 11 } { Fl_Choice {} { label {Down Box:} callback down_box_cb open - tooltip {The "down" box of the widget.} xywh {100 90 205 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable + tooltip {The "down" box of the widget.} xywh {100 85 210 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable code0 {extern Fl_Menu_Item boxmenu[];} code1 {o->menu(boxmenu);} } {} Fl_Button {} { label {Select Color} callback color2_cb - tooltip {The selection color of the widget.} xywh {305 90 90 20} labelsize 11 + tooltip {The selection color of the widget.} xywh {310 85 90 20} labelsize 11 } } Fl_Group {} { callback propagate_load open - xywh {100 115 295 20} labelsize 11 + xywh {100 110 300 25} labelsize 11 } { Fl_Choice {} { label {Text Font:} callback textfont_cb open - tooltip {The value text style.} xywh {100 115 155 20} box DOWN_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable + tooltip {The value text style.} xywh {100 110 160 20} box DOWN_BOX down_box BORDER_BOX labelfont 1 labelsize 11 resizable code0 {extern Fl_Menu_Item fontmenu[];} code1 {o->menu(fontmenu);} } {} Fl_Value_Input {} { callback textsize_cb - tooltip {The value text size.} xywh {255 115 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 + tooltip {The value text size.} xywh {260 110 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 } Fl_Button {} { label {Text Color} callback textcolor_cb - tooltip {The value text color.} xywh {305 115 90 20} labelsize 11 + tooltip {The value text color.} xywh {310 110 90 20} labelsize 11 } } } Fl_Box {} { - xywh {100 304 295 12} labelsize 11 resizable + xywh {100 140 295 68} labelsize 11 resizable } } } Fl_Group {} { label {C++} - callback propagate_load selected - xywh {10 30 395 295} labelsize 11 when 0 + callback propagate_load open + xywh {10 30 395 290} labelsize 11 when 0 hide } { Fl_Group {} { callback propagate_load open - xywh {100 40 295 132} labelsize 11 + xywh {100 35 300 137} labelsize 11 } { Fl_Group {} { callback propagate_load open - xywh {100 40 295 20} labelsize 11 + xywh {100 35 300 25} labelsize 11 } { Fl_Input {} { label {Class:} user_data 4 callback subclass_cb - tooltip {The widget subclass.} xywh {100 40 160 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable + tooltip {The widget subclass.} xywh {105 35 160 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable } Fl_Choice {} { callback subtype_cb open - tooltip {The widget subtype.} xywh {260 40 135 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 + tooltip {The widget subtype.} xywh {265 35 135 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 } {} } Fl_Group {} { callback propagate_load open - xywh {100 65 295 20} labelsize 11 + xywh {100 60 300 25} labelsize 11 } { Fl_Input {} { label {Name:} callback name_cb - tooltip {The name of the widget.} xywh {100 65 230 20} labelfont 1 labelsize 11 textsize 11 resizable + tooltip {The name of the widget.} xywh {105 60 241 20} labelfont 1 labelsize 11 textsize 11 resizable } Fl_Light_Button {} { label public callback name_public_cb - tooltip {Make the widget publicly accessible.} xywh {330 65 65 20} selection_color 1 labelsize 11 when 1 + tooltip {Make the widget publicly accessible.} xywh {346 60 54 20} selection_color 1 labelsize 11 when 1 } } Fl_Input {v_input[0]} { label {Extra Code:} user_data 0 callback v_input_cb - tooltip {Extra initialization code for the widget.} xywh {100 90 295 20} labelfont 1 labelsize 11 textfont 4 textsize 11 + tooltip {Extra initialization code for the widget.} xywh {105 85 295 20} labelfont 1 labelsize 11 textfont 4 textsize 11 } Fl_Input {v_input[1]} { user_data 1 callback v_input_cb - tooltip {Extra initialization code for the widget.} xywh {100 110 295 20} labelsize 11 textfont 4 textsize 11 + tooltip {Extra initialization code for the widget.} xywh {105 105 295 20} labelsize 11 textfont 4 textsize 11 } Fl_Input {v_input[2]} { user_data 2 callback v_input_cb - tooltip {Extra initialization code for the widget.} xywh {100 130 295 20} labelsize 11 textfont 4 textsize 11 + tooltip {Extra initialization code for the widget.} xywh {105 125 295 20} labelsize 11 textfont 4 textsize 11 } Fl_Input {v_input[3]} { user_data 3 callback v_input_cb - tooltip {Extra initialization code for the widget.} xywh {100 150 295 20} labelsize 11 textfont 4 textsize 11 + tooltip {Extra initialization code for the widget.} xywh {105 147 295 20} labelsize 11 textfont 4 textsize 11 } } + Fl_Text_Editor {} { + label {Callback:} + callback callback_cb + tooltip {The callback function or code for the widget.} xywh {105 174 295 91} box DOWN_BOX labelfont 1 labelsize 11 align 4 textfont 4 textsize 11 + code0 {o->buffer(new Fl_Text_Buffer());} + code1 {o->textfont(FL_COURIER);} + } Fl_Group {} { callback propagate_load open - xywh {100 175 295 90} box DOWN_BOX labelsize 11 resizable - } { - Fl_Text_Editor {} { - label {Callback:} - callback callback_cb - tooltip {The callback function or code for the widget.} xywh {102 177 291 86} box NO_BOX labelfont 1 labelsize 11 align 4 textfont 4 textsize 11 resizable - code0 {o->buffer(new Fl_Text_Buffer());} - code1 {o->textfont(FL_COURIER);} - } - } - Fl_Group {} { - callback propagate_load open - xywh {100 270 295 45} labelsize 11 + xywh {100 270 303 45} labelsize 11 } { Fl_Group {} { callback propagate_load open - xywh {100 270 295 20} labelsize 11 + xywh {100 270 303 20} labelsize 11 } { Fl_Input {} { label {User Data:} callback user_data_cb - tooltip {The user data to pass into the callback code.} xywh {100 270 140 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable + tooltip {The user data to pass into the callback code.} xywh {105 270 140 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable } Fl_Choice {} { label {When:} callback when_cb open - tooltip {When to call the callback function.} xywh {290 270 105 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 when 1 + tooltip {When to call the callback function.} xywh {295 270 105 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 when 1 code0 {extern Fl_Menu_Item whenmenu[];} code1 {o->menu(whenmenu);} } {} } Fl_Group {} { callback propagate_load open - xywh {100 295 295 20} labelsize 11 + xywh {100 295 300 20} labelsize 11 } { Fl_Input {} { label {Type:} callback user_data_type_cb - tooltip {The type of the user data.} xywh {100 295 140 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable + tooltip {The type of the user data.} xywh {105 295 140 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable } Fl_Light_Button {} { label {No Change} callback when_button_cb - tooltip {Call the callback even if the value has not changed.} xywh {290 295 105 20} selection_color 1 labelsize 11 + tooltip {Call the callback even if the value has not changed.} xywh {295 295 105 20} selection_color 1 labelsize 11 } } } - Fl_Box {} { - label label - xywh {95 325 100 0} labelsize 11 hide deactivate - } } } Fl_Group {} { - xywh {8 335 396 20} labelsize 11 + xywh {8 326 396 19} labelsize 11 } { Fl_Box {} { - xywh {8 335 20 0} labelsize 11 resizable + xywh {8 330 20 0} labelsize 11 resizable } Fl_Button {} { label {No &Overlay} callback overlay_cb - tooltip {Hide the widget overlay box.} xywh {274 335 77 19} labelsize 11 labelcolor 1 + tooltip {Hide the widget overlay box.} xywh {268 326 80 19} labelsize 11 labelcolor 1 } Fl_Button {} { label Revert callback revert_cb - xywh {159 335 80 0} labelsize 11 hide + xywh {159 330 80 0} labelsize 11 hide } Fl_Return_Button {} { label OK callback ok_cb - xywh {356 335 48 19} labelsize 11 + xywh {353 326 51 19} labelsize 11 } Fl_Button {} { label Cancel callback cancel_cb - xywh {329 335 75 0} labelsize 11 hide + xywh {329 330 75 0} labelsize 11 hide } } }