aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-01-29 07:30:44 +0000
committercorvid <corvid@lavabit.com>2011-01-29 07:30:44 +0000
commitb1a83aee9683d73f728fd9eea76c54636036acbc (patch)
tree45ee74e435fb13a7d9be5e1f233d705bd17f9019
parent4ba4af791a8819155536cbc6a71f060a6b450ac5 (diff)
clean out FltkSelectionResource
-rw-r--r--dw/fltkui.cc27
-rw-r--r--dw/fltkui.hh34
2 files changed, 2 insertions, 59 deletions
diff --git a/dw/fltkui.cc b/dw/fltkui.cc
index 460f312c..fe65cbd7 100644
--- a/dw/fltkui.cc
+++ b/dw/fltkui.cc
@@ -821,35 +821,8 @@ Fl_Button *FltkRadioButtonResource::createNewButton (core::Allocation
return button;
}
-/*
-
-FLTK 1.3's Browser doesn't seem to permit a hierarchy, so I think we'll
-use Choice and Tree. There is no Item or ItemGroup, but I see they both
-have an add("menu/sub/sub/leaf") interface (not based on a common
-ancestor, though), so maybe SelectionResource's job will be to keep
-track of our menu-adding string or something. This will be experimental
-enough that I don't want to write the code until dw's in good enough shape
-to test whether I'm going about it sensibly.
-
-*/
// ----------------------------------------------------------------------
-template <class I>
-FltkSelectionResource<I>::FltkSelectionResource (FltkPlatform *platform):
- FltkSpecificResource<I> (platform)
-{
- widgetStacks = new List <WidgetStack> (true);
- allItems = new List <Item> (true);
- items = new Vector <Item> (16, false);
-}
-
-template <class I> FltkSelectionResource<I>::~FltkSelectionResource ()
-{
- delete widgetStacks;
- delete allItems;
- delete items;
-}
-
template <class I> dw::core::Iterator *
FltkSelectionResource<I>::iterator (dw::core::Content::Type mask, bool atEnd)
{
diff --git a/dw/fltkui.hh b/dw/fltkui.hh
index 741db2ab..f62e7a3e 100644
--- a/dw/fltkui.hh
+++ b/dw/fltkui.hh
@@ -436,43 +436,13 @@ template <class I> class FltkSelectionResource:
public FltkSpecificResource <I>
{
protected:
- class Item: public lout::object::Object
- {
- public:
- enum Type { ITEM, START, END } type;
-
- const char *name;
- bool enabled, initSelected;
-
- Item (Type type, const char *name = NULL, bool enabled = true,
- bool selected = false);
- ~Item ();
-
- Item *createNewWidget (int index);
-// Fl_ItemGroup *createNewGroupWidget ();
- };
-
- class WidgetStack: public lout::object::Object
- {
- public:
- Fl_Menu *widget;
- lout::container::typed::Stack <lout::object::TypedPointer < Fl_Menu> > *stack;
-
- WidgetStack (Fl_Menu *widget);
- ~WidgetStack ();
- };
-
- lout::container::typed::List <WidgetStack> *widgetStacks;
- lout::container::typed::List <Item> *allItems;
- lout::container::typed::Vector <Item> *items;
virtual bool setSelectedItems() { return false; }
virtual void addItem (const char *str, bool enabled, bool selected) = 0;
virtual void pushGroup (const char *name, bool enabled) = 0;
virtual void popGroup () = 0;
public:
- FltkSelectionResource (FltkPlatform *platform);
- ~FltkSelectionResource ();
-
+ FltkSelectionResource (FltkPlatform *platform) :
+ FltkSpecificResource<I> (platform) {};
dw::core::Iterator *iterator (dw::core::Content::Type mask, bool atEnd);
};