Many FLUID updates...
fluid/align_widget.cxx:
- Add widget_size_cb() to set default size and size of
labels and text for selected widgets.
fluid/factory.cxx:
- More normalization of menus - "..." when opening a window,
Capitalized Words.
- cb(): Assign default label/text size and resize to ideal
size.
- Make sure that all buttons, input, and valuator widgets
have default label strings.
- Fl_*_Button::ideal_size(): fix ideal width calcs to match
widget.
fluid/Fl_Menu_Type.cxx:
- Fl_Menu_Item_Type::make(): set default label size.
fluid/Fl_Type.h:
- Add Fl_Widget_Type::default_size global.
- Fl_Menu_Item_Type::type_name(): return "Menu_Item".
- Fl_Submenu_Type::type_name(): return "Submenu".
- Update ideal_size() methods to use a default height that
is evenly divisible by 5.
- Fl_Choice_Type::ideal_size() and
Fl_Menubutton_Type::ideal_size(): fix ideal width calcs to
match widget.
- Fl_Menu_Bar::ideal_size(): add, returning the window
width.
fluid/fluid.cxx:
- Add "Layout/Widget Size" submenu.
- "File/Write code..." becomes "File/Write Code..." and
"File/Write strings..." becomes "File/Write Strings..."
fluid/fluid.plist:
- Bump version number and copyright info.
fluid/Fl_Widget_Type.cxx:
- Fl_Widget_Type::ideal_size(): add box dw/dh and enforce a
minimum size of 15x15.
- labelsize_cb(): use Fl_Widget_Type::default_size instead
of FL_NORMAL_SIZE.
- textsize_cb(): use Fl_Widget_Type::default_size instead of
FL_NORMAL_SIZE.
fluid/Fl_Window_Type.cxx:
- Fl_Window_Type::newdx(): require at least 2 pixels of
movement.
- Fl_Window_Type::draw_overlay(): adjust bounding box for
outside labels above and below.
- Fl_Window_Type::handle(): reset dx/dy on FL_PUSH.
fluid/function_panel.cxx:
fluid/function_panel.fl:
fluid/function_panel.h:
- Update some of the windows for the "small" size.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
a218f44b5d
commit
59004878f3
5
CHANGES
5
CHANGES
@ -2,6 +2,11 @@ CHANGES IN FLTK 1.1.7
|
||||
|
||||
- Documentation fixes (STR #648, STR #692, STR #730, STR
|
||||
#744, STR #745)
|
||||
- In FLUID, new widgets are now created with the ideal
|
||||
size by default, and menu bars are positioned to use
|
||||
the entire width of the window.
|
||||
- Added Layout/Widget Size submenu to select default
|
||||
label and text size (Tiny, Small, and Normal).
|
||||
- Added Edit/Duplicate command to FLUID to duplicate the
|
||||
current selection.
|
||||
- FLUID now tracks the current state of the widget bin
|
||||
|
||||
@ -117,6 +117,7 @@ Fl_Type *Fl_Menu_Item_Type::make() {
|
||||
}
|
||||
if (!o) {
|
||||
o = new Fl_Button(0,0,100,20); // create template widget
|
||||
o->labelsize(Fl_Widget_Type::default_size);
|
||||
}
|
||||
|
||||
Fl_Menu_Item_Type* t = submenuflag ? new Fl_Submenu_Type() : new Fl_Menu_Item_Type();
|
||||
|
||||
@ -282,6 +282,7 @@ protected:
|
||||
void write_color(const char*, Fl_Color);
|
||||
|
||||
public:
|
||||
static int default_size;
|
||||
|
||||
const char *xclass; // junk string, used for shortcut
|
||||
Fl_Widget *o;
|
||||
@ -488,7 +489,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 "menuitem";}
|
||||
const char* type_name() {return "Menu_Item";}
|
||||
Fl_Type* make();
|
||||
int is_menu_item() const {return 1;}
|
||||
int is_button() const {return 1;} // this gets shortcut to work
|
||||
@ -506,7 +507,7 @@ public:
|
||||
class Fl_Submenu_Type : public Fl_Menu_Item_Type {
|
||||
public:
|
||||
Fl_Menu_Item* subtypes() {return 0;}
|
||||
const char* type_name() {return "submenu";}
|
||||
const char* type_name() {return "Submenu";}
|
||||
int is_parent() const {return 1;}
|
||||
int is_button() const {return 0;} // disable shortcut
|
||||
Fl_Type* make();
|
||||
@ -556,7 +557,8 @@ class Fl_Menu_Button_Type : public Fl_Menu_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += 20;
|
||||
w += 2 * ((o->labelsize() - 3) & ~1) + o->labelsize() - 4;
|
||||
h = (h / 5) * 5;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Menu_Button";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
@ -572,7 +574,12 @@ class Fl_Choice_Type : public Fl_Menu_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += 20;
|
||||
int w1 = o->h() - Fl::box_dh(o->box());
|
||||
if (w1 > 20) w1 = 20;
|
||||
w1 = (w1 - 4) / 3;
|
||||
if (w1 < 1) w1 = 1;
|
||||
w += 2 * w1 + o->labelsize() - 4;
|
||||
h = (h / 5) * 5;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Choice";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
@ -618,12 +625,17 @@ public:
|
||||
int pixmapID() { return 15; }
|
||||
};
|
||||
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Menu_Bar.H>
|
||||
class Fl_Menu_Bar_Type : public Fl_Menu_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
w = o->window()->w();
|
||||
h = ((o->labelsize() + Fl::box_dh(o->box()) + 4) / 5) * 5;
|
||||
if (h < 15) h = 15;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Menu_Bar";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
return new Fl_Menu_Bar(X,Y,W,H);}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {return new Fl_Menu_Bar(X,Y,W,H);}
|
||||
Fl_Widget_Type *_make() {return new Fl_Menu_Bar_Type();}
|
||||
int pixmapID() { return 17; }
|
||||
};
|
||||
|
||||
@ -52,6 +52,8 @@ extern const char* i18n_function;
|
||||
extern const char* i18n_file;
|
||||
extern const char* i18n_set;
|
||||
|
||||
int Fl_Widget_Type::default_size = FL_NORMAL_SIZE;
|
||||
|
||||
int Fl_Widget_Type::is_widget() const {return 1;}
|
||||
int Fl_Widget_Type::is_public() const {return public_;}
|
||||
|
||||
@ -71,8 +73,11 @@ Fl_Widget_Type::ideal_size(int &w, int &h) {
|
||||
h = o->labelsize();
|
||||
o->measure_label(w, h);
|
||||
|
||||
h += o->labelsize() - 6;
|
||||
w += 2 * (o->labelsize() - 4);
|
||||
w += Fl::box_dw(o->box());
|
||||
h += Fl::box_dh(o->box());
|
||||
|
||||
if (w < 15) w = 15;
|
||||
if (h < 15) h = 15;
|
||||
}
|
||||
|
||||
// Return the ideal widget spacing...
|
||||
@ -805,7 +810,7 @@ void labelsize_cb(Fl_Value_Input* i, void *v) {
|
||||
n = current_widget->o->labelsize();
|
||||
} else {
|
||||
n = int(i->value());
|
||||
if (n <= 0) n = FL_NORMAL_SIZE;
|
||||
if (n <= 0) n = Fl_Widget_Type::default_size;
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
@ -1091,7 +1096,7 @@ void textsize_cb(Fl_Value_Input* i, void* v) {
|
||||
i->activate();
|
||||
} else {
|
||||
s = int(i->value());
|
||||
if (s <= 0) s = FL_NORMAL_SIZE;
|
||||
if (s <= 0) s = Fl_Widget_Type::default_size;
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
|
||||
@ -409,6 +409,8 @@ void Fl_Window_Type::newdx() {
|
||||
if (Fl::event_state(FL_ALT) || !snap) {
|
||||
mydx = mx-x1;
|
||||
mydy = my-y1;
|
||||
|
||||
if (abs(mydx) < 2 && abs(mydy) < 2) mydx = mydy = 0;
|
||||
} else {
|
||||
int dx0 = mx-x1;
|
||||
int ix = (drag&RIGHT) ? br : bx;
|
||||
@ -614,6 +616,14 @@ void Fl_Window_Type::draw_overlay() {
|
||||
int x,y,r,t;
|
||||
newposition(myo,x,y,r,t);
|
||||
if (!show_guides || !drag || numselected != 1) fl_rect(x,y,r-x,t-y);
|
||||
if (!(myo->o->align() & FL_ALIGN_INSIDE)) {
|
||||
// Adjust top/bottom for top/bottom labels...
|
||||
int ww, hh;
|
||||
hh = myo->o->labelsize();
|
||||
myo->o->measure_label(ww, hh);
|
||||
if (myo->o->align() & FL_ALIGN_TOP) y -= hh;
|
||||
if (myo->o->align() & FL_ALIGN_BOTTOM) t += hh;
|
||||
}
|
||||
if (x < mybx) mybx = x;
|
||||
if (y < myby) myby = y;
|
||||
if (r > mybr) mybr = r;
|
||||
@ -969,7 +979,7 @@ int Fl_Window_Type::handle(int event) {
|
||||
case FL_PUSH:
|
||||
x1 = mx = Fl::event_x();
|
||||
y1 = my = Fl::event_y();
|
||||
drag = 0;
|
||||
drag = dx = dy = 0;
|
||||
// test for popup menu:
|
||||
if (Fl::event_button() >= 3) {
|
||||
in_this_only = this; // modifies how some menu items work.
|
||||
|
||||
@ -29,7 +29,8 @@
|
||||
|
||||
/**
|
||||
* the first behaviour always uses the first selected widget as a reference
|
||||
* the second behaviour uses the larges widget (most extreme positions) as a reference
|
||||
* the second behaviour uses the largest widget (most extreme positions) as
|
||||
* a reference.
|
||||
*/
|
||||
#define BREAK_ON_FIRST break
|
||||
//#define BREAK_ON_FIRST
|
||||
@ -437,6 +438,28 @@ void align_widget_cb(Fl_Widget*, long how)
|
||||
}
|
||||
|
||||
|
||||
// Set default widget sizes...
|
||||
void widget_size_cb(Fl_Widget *, long size) {
|
||||
// Update the "normal" text size of new widgets...
|
||||
Fl_Widget_Type::default_size = size;
|
||||
|
||||
// Update any selected widgets...
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next)
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
w->labelsize(size);
|
||||
Fl_Font f;
|
||||
int s = (int)size;
|
||||
Fl_Color c;
|
||||
((Fl_Widget_Type *)o)->textstuff(2, f, s, c);
|
||||
|
||||
w->redraw();
|
||||
|
||||
modflag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
@ -92,6 +92,11 @@ static Fl_Menu_Item buttontype_menu[] = {
|
||||
class Fl_Button_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return buttontype_menu;}
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += 2 * (o->labelsize() - 4);
|
||||
h = (h / 5) * 5;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
return new Fl_Button(x,y,w,h,"button");}
|
||||
@ -107,14 +112,14 @@ static Fl_Button_Type Fl_Button_type;
|
||||
class Fl_Return_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
int W = o->h();
|
||||
if (o->w()/3 < W) W = o->w()/3;
|
||||
w += W + 8 - o->labelsize();
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Return_Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
return new Fl_Return_Button(x,y,w,h,0);}
|
||||
return new Fl_Return_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Return_Button_Type();}
|
||||
int pixmapID() { return 23; }
|
||||
};
|
||||
@ -127,7 +132,7 @@ class Fl_Repeat_Button_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Repeat_Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
return new Fl_Repeat_Button(x,y,w,h,0);}
|
||||
return new Fl_Repeat_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Repeat_Button_Type();}
|
||||
int pixmapID() { return 25; }
|
||||
};
|
||||
@ -139,8 +144,8 @@ static Fl_Repeat_Button_Type Fl_Repeat_Button_type;
|
||||
class Fl_Light_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += o->labelsize() + 2 * Fl::box_dx(o->box()) + 4;
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
w += 4;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Light_Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
@ -156,8 +161,8 @@ static Fl_Light_Button_Type Fl_Light_Button_type;
|
||||
class Fl_Check_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += o->labelsize() + 2 * Fl::box_dx(o->box()) + 4;
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
w += 4;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Check_Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
@ -173,8 +178,8 @@ static Fl_Check_Button_Type Fl_Check_Button_type;
|
||||
class Fl_Round_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += o->labelsize() + 2 * Fl::box_dx(o->box()) + 4;
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
w += 4;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Round_Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
@ -566,7 +571,7 @@ class Fl_Progress_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Progress";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
Fl_Progress *myo = new Fl_Progress(x,y,w,h);
|
||||
Fl_Progress *myo = new Fl_Progress(x,y,w,h,"label");
|
||||
myo->value(50);
|
||||
return myo;}
|
||||
Fl_Widget_Type *_make() {return new Fl_Progress_Type();}
|
||||
@ -644,7 +649,7 @@ class Fl_Slider_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Slider";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
return new Fl_Slider(x,y,w,h);}
|
||||
return new Fl_Slider(x,y,w,h,"slider:");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Slider_Type();}
|
||||
int pixmapID() { return 37; }
|
||||
};
|
||||
@ -776,7 +781,7 @@ class Fl_Value_Slider_Type : public Fl_Slider_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Value_Slider";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
return new Fl_Value_Slider(x,y,w,h);}
|
||||
return new Fl_Value_Slider(x,y,w,h,"slider:");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Value_Slider_Type();}
|
||||
int pixmapID() { return 39; }
|
||||
};
|
||||
@ -820,22 +825,52 @@ extern class Fl_Wizard_Type Fl_Wizard_type;
|
||||
extern void select(Fl_Type *,int);
|
||||
extern void select_only(Fl_Type *);
|
||||
|
||||
#include <FL/Fl_Window.H>
|
||||
|
||||
static void cb(Fl_Widget *, void *v) {
|
||||
Fl_Type *t = ((Fl_Type*)v)->make();
|
||||
if (t) {select_only(t); modflag = 1; t->open();}
|
||||
if (t) {
|
||||
if (t->is_widget() && !t->is_window()) {
|
||||
Fl_Widget_Type *wt = (Fl_Widget_Type *)t;
|
||||
|
||||
// Set font sizes...
|
||||
wt->o->labelsize(Fl_Widget_Type::default_size);
|
||||
|
||||
Fl_Font f;
|
||||
int s = Fl_Widget_Type::default_size;
|
||||
Fl_Color c;
|
||||
|
||||
wt->textstuff(2, f, s, c);
|
||||
|
||||
// Resize and/or reposition new widget...
|
||||
int w, h;
|
||||
wt->ideal_size(w, h);
|
||||
|
||||
if (!strcmp(wt->type_name(), "Fl_Menu_Bar")) {
|
||||
// Move and resize the menubar across the top of the window...
|
||||
wt->o->resize(0, 0, w, h);
|
||||
} else {
|
||||
// Just resize to the ideal size...
|
||||
wt->o->size(w, h);
|
||||
}
|
||||
}
|
||||
select_only(t);
|
||||
modflag = 1;
|
||||
t->open();
|
||||
}
|
||||
}
|
||||
|
||||
Fl_Menu_Item New_Menu[] = {
|
||||
{"code",0,0,0,FL_SUBMENU},
|
||||
{"function/method",0,cb,(void*)&Fl_Function_type},
|
||||
{"code",0,cb,(void*)&Fl_Code_type},
|
||||
{"code block",0,cb,(void*)&Fl_CodeBlock_type},
|
||||
{"declaration",0,cb,(void*)&Fl_Decl_type},
|
||||
{"declaration block",0,cb,(void*)&Fl_DeclBlock_type},
|
||||
{"class",0,cb,(void*)&Fl_Class_type},
|
||||
{"comment",0,cb,(void*)&Fl_Comment_type},
|
||||
{"Code",0,0,0,FL_SUBMENU},
|
||||
{"Function/Method...",0,cb,(void*)&Fl_Function_type},
|
||||
{"Code...",0,cb,(void*)&Fl_Code_type},
|
||||
{"Code Block...",0,cb,(void*)&Fl_CodeBlock_type},
|
||||
{"Declaration...",0,cb,(void*)&Fl_Decl_type},
|
||||
{"Declaration Block...",0,cb,(void*)&Fl_DeclBlock_type},
|
||||
{"Class...",0,cb,(void*)&Fl_Class_type},
|
||||
{"Comment...",0,cb,(void*)&Fl_Comment_type},
|
||||
{0},
|
||||
{"group",0,0,0,FL_SUBMENU},
|
||||
{"Group",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Window_type},
|
||||
{0,0,cb,(void*)&Fl_Group_type},
|
||||
{0,0,cb,(void*)&Fl_Pack_type},
|
||||
@ -844,7 +879,7 @@ Fl_Menu_Item New_Menu[] = {
|
||||
{0,0,cb,(void*)&Fl_Tile_type},
|
||||
{0,0,cb,(void*)&Fl_Wizard_type},
|
||||
{0},
|
||||
{"buttons",0,0,0,FL_SUBMENU},
|
||||
{"Buttons",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Button_type},
|
||||
{0,0,cb,(void*)&Fl_Return_Button_type},
|
||||
{0,0,cb,(void*)&Fl_Light_Button_type},
|
||||
@ -852,7 +887,7 @@ Fl_Menu_Item New_Menu[] = {
|
||||
{0,0,cb,(void*)&Fl_Repeat_Button_type},
|
||||
{0,0,cb,(void*)&Fl_Round_Button_type},
|
||||
{0},
|
||||
{"valuators",0,0,0,FL_SUBMENU},
|
||||
{"Valuators",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Slider_type},
|
||||
{0,0,cb,(void*)&Fl_Scrollbar_type},
|
||||
{0,0,cb,(void*)&Fl_Value_Slider_type},
|
||||
@ -863,14 +898,14 @@ Fl_Menu_Item New_Menu[] = {
|
||||
{0,0,cb,(void*)&Fl_Value_Input_type},
|
||||
{0,0,cb,(void*)&Fl_Value_Output_type},
|
||||
{0},
|
||||
{"text",0,0,0,FL_SUBMENU},
|
||||
{"Text",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_File_Input_type},
|
||||
{0,0,cb,(void*)&Fl_Input_type},
|
||||
{0,0,cb,(void*)&Fl_Output_type},
|
||||
{0,0,cb,(void*)&Fl_Text_Display_type},
|
||||
{0,0,cb,(void*)&Fl_Text_Editor_type},
|
||||
{0},
|
||||
{"menus",0,0,0,FL_SUBMENU},
|
||||
{"Menus",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Menu_Bar_type},
|
||||
{0,0,cb,(void*)&Fl_Menu_Button_type},
|
||||
{0,0,cb,(void*)&Fl_Choice_type},
|
||||
@ -878,12 +913,12 @@ Fl_Menu_Item New_Menu[] = {
|
||||
{0,0,cb, (void*)&Fl_Submenu_type},
|
||||
{0,0,cb, (void*)&Fl_Menu_Item_type},
|
||||
{0},
|
||||
{"browsers",0,0,0,FL_SUBMENU},
|
||||
{"Browsers",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Browser_type},
|
||||
{0,0,cb,(void*)&Fl_Check_Browser_type},
|
||||
{0,0,cb,(void*)&Fl_File_Browser_type},
|
||||
{0},
|
||||
{"other",0,0,0,FL_SUBMENU},
|
||||
{"Other",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Box_type},
|
||||
{0,0,cb,(void*)&Fl_Clock_type},
|
||||
{0,0,cb,(void*)&Fl_Help_View_type},
|
||||
@ -897,9 +932,10 @@ Fl_Menu_Item New_Menu[] = {
|
||||
static void make_iconlabel( Fl_Menu_Item *mi, Fl_Image *ic, const char *txt )
|
||||
{
|
||||
if (ic) {
|
||||
char *t1 = new char[strlen(txt)+3];
|
||||
char *t1 = new char[strlen(txt)+6];
|
||||
strcpy( t1, " " );
|
||||
strcat(t1, txt);
|
||||
strcat(t1, "...");
|
||||
mi->image( ic );
|
||||
Fl_Multi_Label *ml = new Fl_Multi_Label;
|
||||
ml->labela = (char*)ic;
|
||||
|
||||
@ -445,6 +445,7 @@ void show_grid_cb(Fl_Widget *, void *);
|
||||
void show_settings_cb(Fl_Widget *, void *);
|
||||
|
||||
void align_widget_cb(Fl_Widget *, long);
|
||||
void widget_size_cb(Fl_Widget *, long);
|
||||
|
||||
void about_cb(Fl_Widget *, void *) {
|
||||
if (!about_panel) make_about_panel();
|
||||
@ -525,8 +526,8 @@ Fl_Menu_Item Main_Menu[] = {
|
||||
{"&Insert...", FL_CTRL+'i', open_cb, (void*)1, FL_MENU_DIVIDER},
|
||||
{"&Save", FL_CTRL+'s', save_cb, 0},
|
||||
{"Save &As...", FL_CTRL+FL_SHIFT+'s', save_cb, (void*)1, FL_MENU_DIVIDER},
|
||||
{"Write &code...", FL_CTRL+FL_SHIFT+'c', write_cb, 0},
|
||||
{"&Write strings...", FL_CTRL+FL_SHIFT+'w', write_strings_cb, 0, FL_MENU_DIVIDER},
|
||||
{"Write &Code...", FL_CTRL+FL_SHIFT+'c', write_cb, 0},
|
||||
{"&Write Strings...", FL_CTRL+FL_SHIFT+'w', write_strings_cb, 0, FL_MENU_DIVIDER},
|
||||
{"&Quit", FL_CTRL+'q', exit_cb},
|
||||
{0},
|
||||
{"&Edit",0,0,0,FL_SUBMENU},
|
||||
@ -570,10 +571,15 @@ Fl_Menu_Item Main_Menu[] = {
|
||||
{"&Height",0,(Fl_Callback *)align_widget_cb,(void*)31},
|
||||
{"&Both",0,(Fl_Callback *)align_widget_cb,(void*)32},
|
||||
{0},
|
||||
{"&Center In Group",0,0,0,FL_SUBMENU|FL_MENU_DIVIDER},
|
||||
{"&Center In Group",0,0,0,FL_SUBMENU},
|
||||
{"&Horizontal",0,(Fl_Callback *)align_widget_cb,(void*)40},
|
||||
{"&Vertical",0,(Fl_Callback *)align_widget_cb,(void*)41},
|
||||
{0},
|
||||
{"&Widget Size",0,0,0,FL_SUBMENU|FL_MENU_DIVIDER},
|
||||
{"&Tiny",0,(Fl_Callback *)widget_size_cb,(void*)8,FL_MENU_RADIO,FL_NORMAL_LABEL,FL_HELVETICA,8},
|
||||
{"&Small",0,(Fl_Callback *)widget_size_cb,(void*)11,FL_MENU_RADIO,FL_NORMAL_LABEL,FL_HELVETICA,11},
|
||||
{"&Normal",0,(Fl_Callback *)widget_size_cb,(void*)14,FL_MENU_RADIO|FL_MENU_VALUE},
|
||||
{0},
|
||||
{"&Grid...",FL_CTRL+'g',show_grid_cb},
|
||||
{0},
|
||||
{"&Shell",0,0,0,FL_SUBMENU},
|
||||
|
||||
@ -11,13 +11,13 @@
|
||||
<string>org.fltk.fluid</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.1.4</string>
|
||||
<string>1.1.7</string>
|
||||
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 1998-2003 by Bill Spitzak and others</string>
|
||||
<string>Copyright 1998-2005 by Bill Spitzak and others</string>
|
||||
|
||||
<key>CFAppleHelpAnchor</key>
|
||||
<string>help</string>
|
||||
@ -35,10 +35,10 @@
|
||||
<string>fluid.icns</string>
|
||||
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.1.4</string>
|
||||
<string>1.1.7</string>
|
||||
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>1.1.4, Copyright 1998-2003 by Bill Spitzak and others</string>
|
||||
<string>1.1.7, Copyright 1998-2005 by Bill Spitzak and others</string>
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
|
||||
@ -1,3 +1,30 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Code dialogs for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2005 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
//
|
||||
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0107
|
||||
|
||||
#include "function_panel.h"
|
||||
@ -23,39 +50,43 @@ Fl_Button *f_panel_cancel=(Fl_Button *)0;
|
||||
|
||||
Fl_Window* make_function_panel() {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = function_panel = new Fl_Window(285, 170, "function/method");
|
||||
{ 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, 65, 25, "public");
|
||||
{ Fl_Light_Button* o = f_public_button = new Fl_Light_Button(10, 10, 58, 20, "public");
|
||||
o->tooltip("Make the function or method publicly accessible.");
|
||||
o->labelsize(10);
|
||||
o->labelsize(11);
|
||||
o->when(FL_WHEN_NEVER);
|
||||
}
|
||||
{ Fl_Light_Button* o = f_c_button = new Fl_Light_Button(80, 10, 90, 25, "C declaration");
|
||||
{ Fl_Light_Button* o = f_c_button = new Fl_Light_Button(73, 10, 94, 20, "C declaration");
|
||||
o->tooltip("Declare with a C interface instead of C++.");
|
||||
o->labelsize(10);
|
||||
o->labelsize(11);
|
||||
}
|
||||
{ Fl_Input* o = f_name_input = new Fl_Input(10, 55, 265, 25, "Name(args): (blank for main())");
|
||||
{ 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->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_Input* o = f_return_type_input = new Fl_Input(10, 100, 265, 25, "Return Type: (blank to return outermost widget)");
|
||||
{ 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->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 = f_panel_ok = new Fl_Return_Button(110, 135, 80, 25, "OK");
|
||||
{ Fl_Return_Button* o = f_panel_ok = new Fl_Return_Button(175, 113, 47, 20, "OK");
|
||||
o->tooltip("Apply the changes.");
|
||||
o->labelsize(11);
|
||||
w->hotspot(o);
|
||||
}
|
||||
{ Fl_Button* o = f_panel_cancel = new Fl_Button(195, 135, 80, 25, "Cancel");
|
||||
{ Fl_Button* o = f_panel_cancel = new Fl_Button(227, 113, 48, 20, "Cancel");
|
||||
o->tooltip("Cancel the changes.");
|
||||
o->shortcut(0xff1b);
|
||||
o->labelsize(11);
|
||||
}
|
||||
o->set_modal();
|
||||
o->end();
|
||||
@ -73,25 +104,33 @@ Fl_Button *code_panel_cancel=(Fl_Button *)0;
|
||||
|
||||
Fl_Window* make_code_panel() {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = code_panel = new Fl_Window(545, 175, "code");
|
||||
{ Fl_Window* o = code_panel = new Fl_Window(545, 175, "Code");
|
||||
w = o;
|
||||
{ Fl_Group* o = new Fl_Group(10, 10, 525, 120);
|
||||
o->box(FL_DOWN_FRAME);
|
||||
{ Fl_Text_Editor* o = code_input = new Fl_Text_Editor(12, 12, 521, 116);
|
||||
o->box(FL_NO_BOX);
|
||||
o->labelsize(11);
|
||||
{ Fl_Text_Editor* o = code_input = new Fl_Text_Editor(12, 12, 523, 123);
|
||||
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(12, 145, 523, 20);
|
||||
o->labelsize(11);
|
||||
{ Fl_Return_Button* o = code_panel_ok = new Fl_Return_Button(419, 145, 55, 20, "OK");
|
||||
o->labelsize(11);
|
||||
w->hotspot(o);
|
||||
}
|
||||
{ Fl_Button* o = code_panel_cancel = new Fl_Button(479, 145, 56, 20, "Cancel");
|
||||
o->shortcut(0xff1b);
|
||||
o->labelsize(11);
|
||||
}
|
||||
{ Fl_Box* o = new Fl_Box(12, 145, 402, 20);
|
||||
o->labelsize(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);
|
||||
}
|
||||
o->end();
|
||||
Fl_Group::current()->resizable(o);
|
||||
}
|
||||
{ Fl_Return_Button* o = code_panel_ok = new Fl_Return_Button(370, 140, 80, 25, "OK");
|
||||
w->hotspot(o);
|
||||
}
|
||||
{ Fl_Button* o = code_panel_cancel = new Fl_Button(455, 140, 80, 25, "Cancel");
|
||||
o->shortcut(0xff1b);
|
||||
}
|
||||
o->set_modal();
|
||||
o->end();
|
||||
@ -679,3 +718,7 @@ Fl_Window* make_widgetbin() {
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
@ -2,6 +2,35 @@
|
||||
version 1.0107
|
||||
header_name {.h}
|
||||
code_name {.cxx}
|
||||
comment {//
|
||||
// "$Id$"
|
||||
//
|
||||
// Code dialogs for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2005 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
//
|
||||
} {in_source in_header
|
||||
}
|
||||
|
||||
decl {\#include <FL/Fl_Pixmap.H>} {}
|
||||
|
||||
decl {\#include "Fl_Type.h"} {}
|
||||
@ -15,32 +44,32 @@ decl {extern void select_only(Fl_Type*);} {}
|
||||
Function {make_function_panel()} {open
|
||||
} {
|
||||
Fl_Window function_panel {
|
||||
label {function/method} open
|
||||
xywh {1046 445 285 170} type Single hide resizable modal
|
||||
label {Function/Method} open
|
||||
xywh {855 21 285 140} type Single resizable modal visible
|
||||
} {
|
||||
Fl_Light_Button f_public_button {
|
||||
label public
|
||||
tooltip {Make the function or method publicly accessible.} xywh {10 10 65 25} labelsize 10 when 0
|
||||
tooltip {Make the function or method publicly accessible.} xywh {10 10 58 20} labelsize 11 when 0
|
||||
}
|
||||
Fl_Light_Button f_c_button {
|
||||
label {C declaration}
|
||||
tooltip {Declare with a C interface instead of C++.} xywh {80 10 90 25} labelsize 10
|
||||
tooltip {Declare with a C interface instead of C++.} xywh {73 10 94 20} labelsize 11
|
||||
}
|
||||
Fl_Input f_name_input {
|
||||
label {Name(args): (blank for main())}
|
||||
tooltip {The name of the function or method.} xywh {10 55 265 25} labelsize 12 align 5 when 0 textfont 4 resizable
|
||||
tooltip {The name of the function or method.} xywh {10 49 265 19} 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 100 265 25} labelsize 12 align 5 when 0 textfont 4
|
||||
tooltip {The return type of the function or method.} xywh {10 87 265 19} labelsize 11 align 5 when 0 textfont 4 textsize 11
|
||||
}
|
||||
Fl_Return_Button f_panel_ok {
|
||||
label OK
|
||||
tooltip {Apply the changes.} xywh {110 135 80 25} hotspot
|
||||
tooltip {Apply the changes.} xywh {175 113 47 20} labelsize 11 hotspot
|
||||
}
|
||||
Fl_Button f_panel_cancel {
|
||||
label Cancel
|
||||
tooltip {Cancel the changes.} xywh {195 135 80 25} shortcut 0xff1b
|
||||
tooltip {Cancel the changes.} xywh {227 113 48 20} shortcut 0xff1b labelsize 11
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -48,26 +77,29 @@ Function {make_function_panel()} {open
|
||||
Function {make_code_panel()} {open
|
||||
} {
|
||||
Fl_Window code_panel {
|
||||
label code open
|
||||
xywh {327 261 545 175} type Single hide resizable modal
|
||||
label Code open
|
||||
xywh {327 261 545 175} type Single labelsize 11 resizable modal visible
|
||||
} {
|
||||
Fl_Text_Editor code_input {selected
|
||||
xywh {12 12 523 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);}
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {10 10 525 120} box DOWN_FRAME resizable
|
||||
xywh {12 145 523 20} labelsize 11
|
||||
} {
|
||||
Fl_Text_Editor code_input {
|
||||
xywh {12 12 521 116} 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_Return_Button code_panel_ok {
|
||||
label OK
|
||||
xywh {419 145 55 20} labelsize 11 hotspot
|
||||
}
|
||||
Fl_Button code_panel_cancel {
|
||||
label Cancel
|
||||
xywh {479 145 56 20} shortcut 0xff1b labelsize 11
|
||||
}
|
||||
Fl_Box {} {
|
||||
xywh {12 145 402 20} labelsize 11 resizable
|
||||
}
|
||||
}
|
||||
Fl_Return_Button code_panel_ok {
|
||||
label OK
|
||||
xywh {370 140 80 25} hotspot
|
||||
}
|
||||
Fl_Button code_panel_cancel {
|
||||
label Cancel
|
||||
xywh {455 140 80 25} shortcut 0xff1b
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -227,7 +259,7 @@ Function {make_comment_panel()} {open
|
||||
tooltip {Put the comment into the header (.h) file.} xywh {10 40 80 25} labelsize 10 when 0
|
||||
}
|
||||
Fl_Menu_Button comment_predefined {
|
||||
label predefined open selected
|
||||
label predefined open
|
||||
xywh {10 75 80 25} labelsize 10
|
||||
} {}
|
||||
Fl_Button comment_load {
|
||||
@ -564,3 +596,9 @@ Function {make_widgetbin()} {open
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
comment {
|
||||
//
|
||||
// End of "$Id$".
|
||||
//} {in_source in_header
|
||||
}
|
||||
|
||||
@ -1,3 +1,30 @@
|
||||
//
|
||||
// "$Id$"
|
||||
//
|
||||
// Code dialogs for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2005 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
// Please report all bugs and problems on the following page:
|
||||
//
|
||||
// http://www.fltk.org/str.php
|
||||
//
|
||||
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0107
|
||||
|
||||
#ifndef function_panel_h
|
||||
@ -17,15 +44,15 @@ extern Fl_Return_Button *f_panel_ok;
|
||||
extern Fl_Button *f_panel_cancel;
|
||||
Fl_Window* make_function_panel();
|
||||
extern Fl_Window *code_panel;
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Text_Editor.H>
|
||||
extern Fl_Text_Editor *code_input;
|
||||
#include <FL/Fl_Group.H>
|
||||
extern Fl_Return_Button *code_panel_ok;
|
||||
extern Fl_Button *code_panel_cancel;
|
||||
#include <FL/Fl_Box.H>
|
||||
Fl_Window* make_code_panel();
|
||||
extern Fl_Window *codeblock_panel;
|
||||
extern Fl_Input *code_before_input;
|
||||
#include <FL/Fl_Box.H>
|
||||
extern Fl_Input *code_after_input;
|
||||
extern Fl_Return_Button *codeblock_panel_ok;
|
||||
extern Fl_Button *codeblock_panel_cancel;
|
||||
@ -65,3 +92,7 @@ extern Fl_Window *widgetbin_panel;
|
||||
extern void type_make_cb(Fl_Button*, void*);
|
||||
Fl_Window* make_widgetbin();
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
//
|
||||
|
||||
Loading…
Reference in New Issue
Block a user