diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-05-28 21:00:11 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-05-28 21:00:11 +0000 |
| commit | 475a3696cca29ad91d438c13cd62eb2794fa6acd (patch) | |
| tree | 8b93cb431d9c8e0fb2680f673b31751613c78676 | |
| parent | 1c4ed73d47d60ea4c1fd47797ec1ea26e01f632b (diff) | |
Fixed Function Panel in Fluid to obey HIG
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4376 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | fluid/function_panel.cxx | 53 | ||||
| -rw-r--r-- | fluid/function_panel.fl | 55 | ||||
| -rw-r--r-- | fluid/function_panel.h | 4 |
3 files changed, 70 insertions, 42 deletions
diff --git a/fluid/function_panel.cxx b/fluid/function_panel.cxx index 098de4638..ae068e548 100644 --- a/fluid/function_panel.cxx +++ b/fluid/function_panel.cxx @@ -51,18 +51,24 @@ 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, 140, "Function/Method Properties"); + { Fl_Window* o = function_panel = new Fl_Window(292, 152, "Function/Method Properties"); w = o; - { 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(69, 10, 90, 20, "C declaration"); - o->tooltip("Declare with a C interface instead of C++."); - o->labelsize(11); + { Fl_Group* o = new Fl_Group(10, 10, 270, 20); + { Fl_Light_Button* o = f_public_button = new Fl_Light_Button(10, 10, 60, 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(80, 10, 80, 20, "C declaration"); + o->tooltip("Declare with a C interface instead of C++."); + o->labelsize(11); + } + { Fl_Box* o = new Fl_Box(170, 10, 110, 20); + Fl_Group::current()->resizable(o); + } + o->end(); } - { Fl_Input* o = f_name_input = new Fl_Input(10, 49, 265, 19, "Name(args): (blank for main())"); + { Fl_Input* o = f_name_input = new Fl_Input(10, 50, 270, 20, "Name(args): (blank for main())"); o->tooltip("The name of the function or method."); o->labelfont(1); o->labelsize(11); @@ -72,7 +78,7 @@ Fl_Window* make_function_panel() { o->when(FL_WHEN_NEVER); Fl_Group::current()->resizable(o); } - { Fl_Input* o = f_return_type_input = new Fl_Input(10, 87, 265, 19, "Return Type: (blank to return outermost widget)"); + { Fl_Input* o = f_return_type_input = new Fl_Input(10, 90, 270, 20, "Return Type: (blank to return outermost widget)"); o->tooltip("The return type of the function or method."); o->labelfont(1); o->labelsize(11); @@ -81,16 +87,23 @@ Fl_Window* make_function_panel() { o->align(FL_ALIGN_TOP_LEFT); o->when(FL_WHEN_NEVER); } - { 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(227, 113, 48, 20, "Cancel"); - o->tooltip("Cancel the changes."); - o->shortcut(0xff1b); - o->labelsize(11); + { Fl_Group* o = new Fl_Group(10, 120, 270, 20); + { Fl_Return_Button* o = f_panel_ok = new Fl_Return_Button(170, 120, 50, 20, "OK"); + o->tooltip("Apply the changes."); + o->labelsize(11); + w->hotspot(o); + } + { Fl_Button* o = f_panel_cancel = new Fl_Button(230, 120, 50, 20, "Cancel"); + o->tooltip("Cancel the changes."); + o->shortcut(0xff1b); + o->labelsize(11); + } + { Fl_Box* o = new Fl_Box(10, 120, 150, 20); + Fl_Group::current()->resizable(o); + } + o->end(); } + o->size_range(292, 152, 2002, 152); o->set_modal(); o->end(); } diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl index 312e2e5a0..3d648b5e4 100644 --- a/fluid/function_panel.fl +++ b/fluid/function_panel.fl @@ -46,32 +46,47 @@ decl {extern void select_only(Fl_Type*);} {} Function {make_function_panel()} {open } { Fl_Window function_panel { - label {Function/Method Properties} - xywh {855 21 285 140} type Single hide resizable modal + label {Function/Method Properties} selected + xywh {419 200 292 152} type Single resizable + code0 {o->size_range(292, 152, 2002, 152);} modal visible } { - Fl_Light_Button f_public_button { - label public - 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 {69 10 90 20} labelsize 11 + Fl_Group {} {open + xywh {10 10 270 20} + } { + Fl_Light_Button f_public_button { + label public + tooltip {Make the function or method publicly accessible.} xywh {10 10 60 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 80 20} labelsize 11 + } + Fl_Box {} { + xywh {170 10 110 20} resizable + } } Fl_Input f_name_input { label {Name(args): (blank for main())} - 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 + tooltip {The name of the function or method.} xywh {10 50 270 20} 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} labelfont 1 labelsize 11 align 5 when 0 textfont 4 textsize 11 - } - Fl_Return_Button f_panel_ok { - label OK - tooltip {Apply the changes.} xywh {175 113 47 20} labelsize 11 hotspot + tooltip {The return type of the function or method.} xywh {10 90 270 20} labelfont 1 labelsize 11 align 5 when 0 textfont 4 textsize 11 } - Fl_Button f_panel_cancel { - label Cancel - tooltip {Cancel the changes.} xywh {227 113 48 20} shortcut 0xff1b labelsize 11 + Fl_Group {} {open + xywh {10 120 270 20} + } { + Fl_Return_Button f_panel_ok { + label OK + tooltip {Apply the changes.} xywh {170 120 50 20} labelsize 11 hotspot + } + Fl_Button f_panel_cancel { + label Cancel + tooltip {Cancel the changes.} xywh {230 120 50 20} shortcut 0xff1b labelsize 11 + } + Fl_Box {} { + xywh {10 120 150 20} resizable + } } } } @@ -215,8 +230,8 @@ Function {make_class_panel()} {open Function {make_comment_panel()} {open } { Fl_Window comment_panel { - label {Comment Properties} open selected - xywh {422 190 552 282} type Single labelsize 11 resizable modal visible + label {Comment Properties} + xywh {422 190 552 282} type Single labelsize 11 hide resizable modal } { Fl_Text_Editor comment_input { xywh {110 10 430 230} box DOWN_BOX labelsize 11 textfont 4 textsize 11 resizable diff --git a/fluid/function_panel.h b/fluid/function_panel.h index 9f3b86277..b2e7d8f2e 100644 --- a/fluid/function_panel.h +++ b/fluid/function_panel.h @@ -32,9 +32,11 @@ #include <FL/Fl.H> #include <FL/Fl_Window.H> extern Fl_Window *function_panel; +#include <FL/Fl_Group.H> #include <FL/Fl_Light_Button.H> extern Fl_Light_Button *f_public_button; extern Fl_Light_Button *f_c_button; +#include <FL/Fl_Box.H> #include <FL/Fl_Input.H> extern Fl_Input *f_name_input; extern Fl_Input *f_return_type_input; @@ -46,10 +48,8 @@ Fl_Window* make_function_panel(); extern Fl_Window *code_panel; #include "CodeEditor.h" extern CodeEditor *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; |
