mirror of
https://github.com/fltk/fltk.git
synced 2026-05-24 16:36:37 +08:00
More UI cleanup.
fluid/*.fl:
- Go through all of the UIs and make sure they conform to the
UI guidelines.
fluid/fluid.cxx:
- Change fl_ask() and fl_choice() to use the "Save"/"Don't
Save" and similar button labels instead of "Yes" and "No",
per UI guidelines.
fluid/factory.cxx:
fluid/Fl_Type.h:
- Make sure that widget and type names are capitalized.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+3
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -36,6 +36,8 @@
|
||||
#include "Fluid_Image.h"
|
||||
#include <FL/fl_draw.H>
|
||||
|
||||
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
|
||||
|
||||
+74
-55
@@ -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();
|
||||
|
||||
+21
-25
@@ -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}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+111
-166
@@ -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();
|
||||
|
||||
+116
-142
@@ -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}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 <FL/Fl_Return_Button.H>
|
||||
extern void do_shell_command(Fl_Return_Button*, void*);
|
||||
extern Fl_Double_Window *shell_run_window;
|
||||
extern Fl_Return_Button *shell_run_button;
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
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);
|
||||
|
||||
+1
-1
@@ -855,7 +855,7 @@ static void cb(Fl_Widget *, void *v) {
|
||||
}
|
||||
}
|
||||
select_only(t);
|
||||
modflag = 1;
|
||||
set_modflag(1);
|
||||
t->open();
|
||||
}
|
||||
}
|
||||
|
||||
+117
-21
@@ -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
|
||||
|
||||
+86
-65
@@ -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 <foo.h>\", 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);
|
||||
|
||||
+62
-72
@@ -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 <foo.h>", 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 {} {
|
||||
|
||||
+110
-114
File diff suppressed because it is too large
Load Diff
+100
-109
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user