From 59004878f3c36ec693737b631f5769f511fd74cb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 19 Mar 2005 04:09:32 +0000 Subject: 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 --- fluid/function_panel.cxx | 95 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 69 insertions(+), 26 deletions(-) (limited to 'fluid/function_panel.cxx') diff --git a/fluid/function_panel.cxx b/fluid/function_panel.cxx index ba261b189..3d826aaee 100644 --- a/fluid/function_panel.cxx +++ b/fluid/function_panel.cxx @@ -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$". +// -- cgit v1.2.3