diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-02-24 21:14:22 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-02-24 21:14:22 +0000 |
| commit | 2df3459457eb7c83fea191fa6105fca0c8ca7e8d (patch) | |
| tree | 85780cd1c60ba72877664b6e202a19de8ae13de3 /fluid | |
| parent | 97b9464f59e87bc33009336b3a5b9b37ae06292e (diff) | |
Added Greg Ercolano's simple Fl_Input_Choice widget which is a
combination of the Fl_Input and Fl_Menu_Button widgets (STR
#650)
FL/Fl_Input_Choice.H:
documentation/Fl_Input_Choice.html:
- Added.
documentation/fltk.book:
- Added Fl_Input_Choice.html + --no-embedfonts option.
documentation/index.html:
- Update version number and revision.
documentation/input_choice.jpg:
- Added.
documentation/preface.html:
- Update version number and revision.
documentation/widgets.html:
- Add Fl_Input_Choice to lists.
fluid/Fl_Menu_Type.cxx:
- Add Fl_Input_Choice_Type class and instance.
fluid/Fl_Type.h:
- Add Fl_Input_Choice_Type class and instance.
fluid/factory.cxx:
- Add Fl_Input_Choice menu item.
test/Makefile:
- Add input_choice example.
test/input_choice.cxx:
- Added.
test/demo.menu:
- Add input_choice example.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Menu_Type.cxx | 2 | ||||
| -rw-r--r-- | fluid/Fl_Type.h | 18 | ||||
| -rw-r--r-- | fluid/factory.cxx | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index 08d109916..954aa5051 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -419,6 +419,8 @@ Fl_Menu_Item dummymenu[] = {{"CHOICE"},{0}}; Fl_Choice_Type Fl_Choice_type; +Fl_Input_Choice_Type Fl_Input_Choice_type; + //////////////////////////////////////////////////////////////// Fl_Menu_Bar_Type Fl_Menu_Bar_type; diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h index 1a732ad2e..cc0c246cb 100644 --- a/fluid/Fl_Type.h +++ b/fluid/Fl_Type.h @@ -1,5 +1,5 @@ // -// "$Id: Fl_Type.h,v 1.5.2.11.2.13 2004/04/11 04:38:55 easysw Exp $" +// "$Id$" // // Widget type header file for the Fast Light Tool Kit (FLTK). // @@ -549,6 +549,20 @@ public: int pixmapID() { return 15; } }; +#include <FL/Fl_Input_Choice.H> +class Fl_Input_Choice_Type : public Fl_Menu_Type { +public: + virtual const char *type_name() {return "Fl_Input_Choice";} + Fl_Widget *widget(int X,int Y,int W,int H) { + Fl_Input_Choice *myo = new Fl_Input_Choice(X,Y,W,H,"input choice:"); + myo->menu(dummymenu); + myo->value("input"); + return myo; + } + Fl_Widget_Type *_make() {return new Fl_Input_Choice_Type();} + int pixmapID() { return 15; } +}; + #include <FL/Fl_Menu_Bar.H> class Fl_Menu_Bar_Type : public Fl_Menu_Type { public: @@ -599,5 +613,5 @@ int storestring(const char *n, const char * & p, int nostrip=0); extern int include_H_from_C; // -// End of "$Id: Fl_Type.h,v 1.5.2.11.2.13 2004/04/11 04:38:55 easysw Exp $". +// End of "$Id$". // diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 995c93182..efba7d6de 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -690,6 +690,7 @@ extern class Fl_Pack_Type Fl_Pack_type; extern class Fl_Tabs_Type Fl_Tabs_type; extern class Fl_Scroll_Type Fl_Scroll_type; extern class Fl_Tile_Type Fl_Tile_type; +extern class Fl_Input_Choice_Type Fl_Input_Choice_type; extern class Fl_Choice_Type Fl_Choice_type; extern class Fl_Menu_Bar_Type Fl_Menu_Bar_type; extern class Fl_Menu_Button_Type Fl_Menu_Button_type; @@ -753,6 +754,7 @@ Fl_Menu_Item New_Menu[] = { {0,0,cb,(void*)&Fl_Menu_Bar_type}, {0,0,cb,(void*)&Fl_Menu_Button_type}, {0,0,cb,(void*)&Fl_Choice_type}, + {0,0,cb,(void*)&Fl_Input_Choice_type}, {0,0,cb, (void*)&Fl_Submenu_type}, {0,0,cb, (void*)&Fl_Menu_Item_type}, {0}, |
