Used Fluid to generate Fluid files. Fixed two naming issues for the new Fl_Int_Input type, generated by Fluid.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
a35defedd5
commit
150fc6e7f7
@ -84,7 +84,7 @@ void guides_cb(Fl_Check_Button *i, long) {
|
||||
}
|
||||
}
|
||||
|
||||
void grid_cb(Fl_Input *i, long v) {
|
||||
void grid_cb(Fl_Int_Input *i, long v) {
|
||||
int n = atoi(i->value());
|
||||
if (n < 0) n = 0;
|
||||
switch (v) {
|
||||
@ -170,14 +170,21 @@ void i18n_text_cb(Fl_Input *i, void *) {
|
||||
i18n_function = i->value();
|
||||
else if (i == i18n_file_input)
|
||||
i18n_file = i->value();
|
||||
else if (i == i18n_set_input)
|
||||
i18n_set = i->value();
|
||||
else if (i == i18n_include_input)
|
||||
i18n_include = i->value();
|
||||
|
||||
set_modflag(1);
|
||||
}
|
||||
|
||||
void i18n_int_cb(Fl_Int_Input *i, void *) {
|
||||
undo_checkpoint();
|
||||
|
||||
if (i == i18n_set_input)
|
||||
i18n_set = i->value();
|
||||
|
||||
set_modflag(1);
|
||||
}
|
||||
|
||||
extern const char* header_file_name;
|
||||
extern const char* code_file_name;
|
||||
|
||||
|
||||
@ -283,10 +283,10 @@ Fl_Double_Window* make_about_panel() {
|
||||
o->selection_color(FL_DARK1);
|
||||
o->labelfont(1);
|
||||
o->labelsize(18);
|
||||
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
} // Fl_Box* o
|
||||
{ Fl_Box* o = new Fl_Box(135, 89, 170, 42, "Copyright 1998-2010 by\nBill Spitzak and others");
|
||||
o->align(132|FL_ALIGN_INSIDE);
|
||||
{ Fl_Box* o = new Fl_Box(135, 89, 170, 42, "Copyright 1998-2009 by\nBill Spitzak and others");
|
||||
o->align(Fl_Align(132|FL_ALIGN_INSIDE));
|
||||
} // Fl_Box* o
|
||||
{ Fl_Button* o = new Fl_Button(89, 141, 123, 25, "View License...");
|
||||
o->labelcolor(FL_DARK_BLUE);
|
||||
|
||||
@ -57,7 +57,7 @@ Fl_Input *i18n_include_input=(Fl_Input *)0;
|
||||
|
||||
Fl_Input *i18n_file_input=(Fl_Input *)0;
|
||||
|
||||
Fl_Input *i18n_set_input=(Fl_Input *)0;
|
||||
Fl_Int_Input *i18n_set_input=(Fl_Int_Input *)0;
|
||||
|
||||
Fl_Input *i18n_function_input=(Fl_Input *)0;
|
||||
|
||||
@ -125,14 +125,14 @@ Fl_Double_Window* make_project_window() {
|
||||
i18n_file_input->textfont(4);
|
||||
i18n_file_input->callback((Fl_Callback*)i18n_text_cb);
|
||||
} // Fl_Input* i18n_file_input
|
||||
{ i18n_set_input = new Fl_Input(100, 128, 272, 20, "Set:");
|
||||
{ i18n_set_input = new Fl_Int_Input(100, 128, 272, 20, "Set:");
|
||||
i18n_set_input->tooltip("The message set number.");
|
||||
i18n_set_input->type(2);
|
||||
i18n_set_input->box(FL_THIN_DOWN_BOX);
|
||||
i18n_set_input->labelfont(1);
|
||||
i18n_set_input->textfont(4);
|
||||
i18n_set_input->callback((Fl_Callback*)i18n_text_cb);
|
||||
} // Fl_Input* i18n_set_input
|
||||
i18n_set_input->callback((Fl_Callback*)i18n_int_cb);
|
||||
} // Fl_Int_Input* i18n_set_input
|
||||
{ i18n_function_input = new Fl_Input(100, 103, 272, 20, "Function:");
|
||||
i18n_function_input->tooltip("The function to call to internationalize the labels and tooltips.");
|
||||
i18n_function_input->box(FL_THIN_DOWN_BOX);
|
||||
@ -379,11 +379,11 @@ Fl_Double_Window* make_shell_window() {
|
||||
|
||||
Fl_Double_Window *grid_window=(Fl_Double_Window *)0;
|
||||
|
||||
Fl_Input *horizontal_input=(Fl_Input *)0;
|
||||
Fl_Int_Input *horizontal_input=(Fl_Int_Input *)0;
|
||||
|
||||
Fl_Input *vertical_input=(Fl_Input *)0;
|
||||
Fl_Int_Input *vertical_input=(Fl_Int_Input *)0;
|
||||
|
||||
Fl_Input *snap_input=(Fl_Input *)0;
|
||||
Fl_Int_Input *snap_input=(Fl_Int_Input *)0;
|
||||
|
||||
Fl_Check_Button *guides_toggle=(Fl_Check_Button *)0;
|
||||
|
||||
@ -395,30 +395,30 @@ Fl_Round_Button *def_widget_size[6]={(Fl_Round_Button *)0};
|
||||
|
||||
Fl_Double_Window* make_layout_window() {
|
||||
{ grid_window = new Fl_Double_Window(285, 245, "Layout Settings");
|
||||
{ Fl_Input* o = horizontal_input = new Fl_Input(106, 10, 50, 25, "x");
|
||||
{ Fl_Int_Input* o = horizontal_input = new Fl_Int_Input(106, 10, 50, 25, "x");
|
||||
horizontal_input->tooltip("Horizontal grid spacing.");
|
||||
horizontal_input->type(2);
|
||||
horizontal_input->box(FL_THIN_DOWN_BOX);
|
||||
horizontal_input->callback((Fl_Callback*)grid_cb, (void*)(1));
|
||||
horizontal_input->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
|
||||
} // Fl_Input* horizontal_input
|
||||
{ Fl_Input* o = vertical_input = new Fl_Input(166, 10, 50, 25, "pixels");
|
||||
} // Fl_Int_Input* horizontal_input
|
||||
{ Fl_Int_Input* o = vertical_input = new Fl_Int_Input(166, 10, 50, 25, "pixels");
|
||||
vertical_input->tooltip("Vertical grid spacing.");
|
||||
vertical_input->type(2);
|
||||
vertical_input->box(FL_THIN_DOWN_BOX);
|
||||
vertical_input->callback((Fl_Callback*)grid_cb, (void*)(2));
|
||||
vertical_input->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
|
||||
} // Fl_Input* vertical_input
|
||||
{ Fl_Input* o = snap_input = new Fl_Input(106, 45, 50, 25, "pixel snap");
|
||||
} // Fl_Int_Input* vertical_input
|
||||
{ Fl_Int_Input* o = snap_input = new Fl_Int_Input(106, 45, 50, 25, "pixel snap");
|
||||
snap_input->tooltip("Snap to grid within this many pixels.");
|
||||
snap_input->type(2);
|
||||
snap_input->box(FL_THIN_DOWN_BOX);
|
||||
snap_input->callback((Fl_Callback*)grid_cb, (void*)(3));
|
||||
snap_input->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
|
||||
} // Fl_Input* snap_input
|
||||
} // Fl_Int_Input* snap_input
|
||||
{ guides_toggle = new Fl_Check_Button(106, 80, 110, 25, "Show Guides");
|
||||
guides_toggle->tooltip("Show distance and alignment guides in overlay");
|
||||
guides_toggle->down_box(FL_DOWN_BOX);
|
||||
|
||||
@ -37,7 +37,7 @@ decl {\#include <FL/Fl_Text_Buffer.H>} {public local
|
||||
decl {\#include <FL/Fl_Text_Display.H>} {public local
|
||||
}
|
||||
|
||||
decl {\#include <FL/filename.H>} {selected public local
|
||||
decl {\#include <FL/filename.H>} {public local
|
||||
}
|
||||
|
||||
decl {extern void load_history();} {public local
|
||||
@ -142,7 +142,7 @@ Function {make_project_window()} {open
|
||||
}
|
||||
Fl_Input i18n_set_input {
|
||||
label {Set:}
|
||||
callback i18n_text_cb
|
||||
callback i18n_int_cb selected
|
||||
tooltip {The message set number.} xywh {100 128 272 20} type Int box THIN_DOWN_BOX labelfont 1 textfont 4
|
||||
}
|
||||
Fl_Input i18n_function_input {
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Text_Buffer.H>
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
#include <FL/filename.H>
|
||||
extern void load_history();
|
||||
extern void redraw_browser();
|
||||
extern int show_comments;
|
||||
@ -63,7 +64,9 @@ extern Fl_Choice *i18n_type_chooser;
|
||||
extern void i18n_text_cb(Fl_Input*, void*);
|
||||
extern Fl_Input *i18n_include_input;
|
||||
extern Fl_Input *i18n_file_input;
|
||||
extern Fl_Input *i18n_set_input;
|
||||
#include <FL/Fl_Int_Input.H>
|
||||
extern void i18n_int_cb(Fl_Int_Input*, void*);
|
||||
extern Fl_Int_Input *i18n_set_input;
|
||||
extern Fl_Input *i18n_function_input;
|
||||
Fl_Double_Window* make_project_window();
|
||||
extern Fl_Menu_Item menu_i18n_type_chooser[];
|
||||
@ -94,10 +97,10 @@ 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);
|
||||
extern Fl_Input *horizontal_input;
|
||||
extern Fl_Input *vertical_input;
|
||||
extern Fl_Input *snap_input;
|
||||
extern void grid_cb(Fl_Int_Input*, long);
|
||||
extern Fl_Int_Input *horizontal_input;
|
||||
extern Fl_Int_Input *vertical_input;
|
||||
extern Fl_Int_Input *snap_input;
|
||||
extern void guides_cb(Fl_Check_Button*, long);
|
||||
extern Fl_Check_Button *guides_toggle;
|
||||
#include <FL/Fl_Round_Button.H>
|
||||
|
||||
@ -73,9 +73,9 @@ static void cb_print_selection(Fl_Round_Button*, void*) {
|
||||
print_to->deactivate();
|
||||
}
|
||||
|
||||
Fl_Input *print_from=(Fl_Input *)0;
|
||||
Fl_Int_Input *print_from=(Fl_Int_Input *)0;
|
||||
|
||||
Fl_Input *print_to=(Fl_Input *)0;
|
||||
Fl_Int_Input *print_to=(Fl_Int_Input *)0;
|
||||
|
||||
Fl_Spinner *print_copies=(Fl_Spinner *)0;
|
||||
|
||||
@ -278,16 +278,16 @@ Fl_Double_Window* make_print_panel() {
|
||||
print_selection->down_box(FL_ROUND_DOWN_BOX);
|
||||
print_selection->callback((Fl_Callback*)cb_print_selection);
|
||||
} // Fl_Round_Button* print_selection
|
||||
{ print_from = new Fl_Input(136, 126, 28, 25, "From:");
|
||||
{ print_from = new Fl_Int_Input(136, 126, 28, 25, "From:");
|
||||
print_from->type(2);
|
||||
print_from->textfont(4);
|
||||
print_from->deactivate();
|
||||
} // Fl_Input* print_from
|
||||
{ print_to = new Fl_Input(199, 126, 28, 25, "To:");
|
||||
} // Fl_Int_Input* print_from
|
||||
{ print_to = new Fl_Int_Input(199, 126, 28, 25, "To:");
|
||||
print_to->type(2);
|
||||
print_to->textfont(4);
|
||||
print_to->deactivate();
|
||||
} // Fl_Input* print_to
|
||||
} // Fl_Int_Input* print_to
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(247, 86, 210, 105, "Copies");
|
||||
|
||||
@ -44,9 +44,9 @@ extern Fl_Box *print_status;
|
||||
extern Fl_Round_Button *print_all;
|
||||
extern Fl_Round_Button *print_pages;
|
||||
extern Fl_Round_Button *print_selection;
|
||||
#include <FL/Fl_Input.H>
|
||||
extern Fl_Input *print_from;
|
||||
extern Fl_Input *print_to;
|
||||
#include <FL/Fl_Int_Input.H>
|
||||
extern Fl_Int_Input *print_from;
|
||||
extern Fl_Int_Input *print_to;
|
||||
#include <FL/Fl_Spinner.H>
|
||||
extern Fl_Spinner *print_copies;
|
||||
#include <FL/Fl_Check_Button.H>
|
||||
|
||||
@ -91,7 +91,7 @@ template_name->value(template_browser->text(item));
|
||||
|
||||
template_delete->activate();
|
||||
|
||||
char pngfile[FL_PATH_MAX], *ext;
|
||||
char pngfile[1024], *ext;
|
||||
|
||||
strlcpy(pngfile, flfile, sizeof(pngfile));
|
||||
if ((ext = strrchr(pngfile, '.')) == NULL) return;
|
||||
@ -148,12 +148,12 @@ Fl_Double_Window* make_template_panel() {
|
||||
template_browser->type(2);
|
||||
template_browser->labelfont(1);
|
||||
template_browser->callback((Fl_Callback*)cb_template_browser);
|
||||
template_browser->align(FL_ALIGN_TOP_LEFT);
|
||||
template_browser->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
template_browser->when(3);
|
||||
} // Fl_Browser* template_browser
|
||||
{ template_preview = new Fl_Box(200, 28, 250, 250);
|
||||
template_preview->box(FL_THIN_DOWN_BOX);
|
||||
template_preview->align(69|FL_ALIGN_INSIDE);
|
||||
template_preview->align(Fl_Align(69|FL_ALIGN_INSIDE));
|
||||
Fl_Group::current()->resizable(template_preview);
|
||||
} // Fl_Box* template_preview
|
||||
{ template_name = new Fl_Input(124, 288, 326, 25, "Template Name:");
|
||||
@ -222,7 +222,7 @@ template_browser->do_callback();
|
||||
|
||||
void template_load() {
|
||||
int i;
|
||||
char name[FL_PATH_MAX], filename[FL_PATH_MAX], path[FL_PATH_MAX], *ptr;
|
||||
char name[1024], filename[1024], path[1024], *ptr;
|
||||
struct dirent **files;
|
||||
int num_files;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user