aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/fltkui.cc169
-rw-r--r--dw/fltkui.hh62
2 files changed, 105 insertions, 126 deletions
diff --git a/dw/fltkui.cc b/dw/fltkui.cc
index 8c8f5aad..2984c4bf 100644
--- a/dw/fltkui.cc
+++ b/dw/fltkui.cc
@@ -26,20 +26,6 @@
#include "../lout/misc.hh"
#include <stdio.h>
-#include <fltk/Widget.h>
-#include <fltk/Group.h>
-#include <fltk/Input.h>
-#include <fltk/TextEditor.h>
-#include <fltk/RadioButton.h>
-#include <fltk/CheckButton.h>
-#include <fltk/Choice.h>
-#include <fltk/Browser.h>
-#include <fltk/Font.h>
-#include <fltk/draw.h>
-#include <fltk/Symbol.h>
-#include <fltk/Item.h>
-#include <fltk/ItemGroup.h>
-#include <fltk/events.h>
namespace dw {
namespace fltk {
@@ -139,7 +125,7 @@ void FltkResource::setStyle (core::style::Style *style)
setWidgetStyle (widget, style);
}
-void FltkResource::setWidgetStyle (::fltk::Widget *widget,
+void FltkResource::setWidgetStyle (Fl_Widget *widget,
core::style::Style *style)
{
FltkFont *font = (FltkFont*)style->font;
@@ -155,7 +141,7 @@ void FltkResource::setWidgetStyle (::fltk::Widget *widget,
if (style->color) {
int style_fg = ((FltkColor*)style->color)->colors
[FltkColor::SHADING_NORMAL];
- ::fltk::Color fg = ::fltk::contrast(style_fg, normal_bg);
+ Fl_Color fg = fl_contrast(style_fg, normal_bg);
widget->labelcolor(fg);
widget->textcolor(fg);
@@ -165,8 +151,8 @@ void FltkResource::setWidgetStyle (::fltk::Widget *widget,
widget->color(normal_bg);
widget->buttoncolor(normal_bg);
widget->selection_textcolor(normal_bg);
- if (widget->type() != ::fltk::Widget::RADIO &&
- widget->type() != ::fltk::Widget::TOGGLE) {
+ if (widget->type() != Fl_Widget::RADIO &&
+ widget->type() != Fl_Widget::TOGGLE) {
/* it looks awful to highlight the buttons */
widget->highlight_color(bg->colors[FltkColor::SHADING_LIGHT]);
}
@@ -253,13 +239,12 @@ FltkLabelButtonResource::~FltkLabelButtonResource ()
delete label;
}
-::fltk::Widget *FltkLabelButtonResource::createNewWidget (core::Allocation
- *allocation)
+Fl_Widget *FltkLabelButtonResource::createNewWidget (core::Allocation
+ *allocation)
{
- ::fltk::Button *button =
- new ::fltk::Button (allocation->x, allocation->y, allocation->width,
- allocation->ascent + allocation->descent,
- label);
+ Fl_Button *button =
+ new Fl_Button (allocation->x, allocation->y, allocation->width,
+ allocation->ascent + allocation->descent, label);
button->clear_flag (SHORTCUT_LABEL);
button->callback (widgetCallback, this);
button->when (FL_WHEN_RELEASE);
@@ -272,7 +257,7 @@ void FltkLabelButtonResource::sizeRequest (core::Requisition *requisition)
FltkFont *font = (FltkFont*)style->font;
::fltk::setfont(font->font,font->size);
requisition->width =
- (int)::fltk::getwidth (label, strlen (label))
+ (int)fl_width (label, strlen (label))
+ 2 * RELIEF_X_THICKNESS;
requisition->ascent = font->ascent + RELIEF_Y_THICKNESS;
requisition->descent = font->descent + RELIEF_Y_THICKNESS;
@@ -312,7 +297,7 @@ static void setButtonEvent(dw::core::EventButton *event)
event->numPressed = Fl::event_clicks() + 1;
}
-void FltkLabelButtonResource::widgetCallback (::fltk::Widget *widget,
+void FltkLabelButtonResource::widgetCallback (Fl_Widget *widget,
void *data)
{
if ((widget->when () & FL_WHEN_RELEASE) &&
@@ -358,7 +343,7 @@ FltkComplexButtonResource::~FltkComplexButtonResource ()
{
}
-void FltkComplexButtonResource::widgetCallback (::fltk::Widget *widget,
+void FltkComplexButtonResource::widgetCallback (Fl_Widget *widget,
void *data)
{
FltkComplexButtonResource *res = (FltkComplexButtonResource*)data;
@@ -423,7 +408,7 @@ int FltkComplexButtonResource::reliefYThickness ()
}
-::fltk::Widget *FltkComplexButtonResource::createNewWidget (core::Allocation
+Fl_Widget *FltkComplexButtonResource::createNewWidget (core::Allocation
*allocation)
{
ComplexButton *button =
@@ -470,14 +455,14 @@ FltkEntryResource::~FltkEntryResource ()
delete label;
}
-::fltk::Widget *FltkEntryResource::createNewWidget (core::Allocation
+Fl_Widget *FltkEntryResource::createNewWidget (core::Allocation
*allocation)
{
- ::fltk::Input *input =
- new ::fltk::Input (allocation->x, allocation->y, allocation->width,
- allocation->ascent + allocation->descent);
+ Fl_Input *input =
+ new Fl_Input (allocation->x, allocation->y, allocation->width,
+ allocation->ascent + allocation->descent);
if (password)
- input->type(::fltk::Input::SECRET);
+ input->type(Fl_Input::SECRET);
input->callback (widgetCallback, this);
input->when (FL_WHEN_ENTER_KEY_ALWAYS);
@@ -503,7 +488,7 @@ void FltkEntryResource::sizeRequest (core::Requisition *requisition)
FltkFont *font = (FltkFont*)style->font;
::fltk::setfont(font->font,font->size);
requisition->width =
- (int)::fltk::getwidth ("n", 1)
+ (int)fl_width ('n')
* (maxLength == UNLIMITED_MAX_LENGTH ? 10 : maxLength)
+ 2 * RELIEF_X_THICKNESS;
requisition->ascent = font->ascent + RELIEF_Y_THICKNESS;
@@ -515,8 +500,7 @@ void FltkEntryResource::sizeRequest (core::Requisition *requisition)
}
}
-void FltkEntryResource::widgetCallback (::fltk::Widget *widget,
- void *data)
+void FltkEntryResource::widgetCallback (Fl_Widget *widget, void *data)
{
/* The (::fltk::event_key() == FL_Enter) test
* is necessary because WHEN_ENTER_KEY also includes
@@ -532,7 +516,7 @@ void FltkEntryResource::widgetCallback (::fltk::Widget *widget,
const char *FltkEntryResource::getText ()
{
- return ((::fltk::Input*)widget)->value ();
+ return ((Fl_Input*)widget)->value ();
}
void FltkEntryResource::setText (const char *text)
@@ -541,7 +525,7 @@ void FltkEntryResource::setText (const char *text)
delete initText;
initText = strdup (text);
- ((::fltk::Input*)widget)->value (initText);
+ ((Fl_Input*)widget)->value (initText);
}
bool FltkEntryResource::isEditable ()
@@ -560,7 +544,7 @@ FltkMultiLineTextResource::FltkMultiLineTextResource (FltkPlatform *platform,
int cols, int rows):
FltkSpecificResource <dw::core::ui::MultiLineTextResource> (platform)
{
- buffer = new ::fltk::TextBuffer;
+ buffer = new Fl_Text_Buffer;
editable = false;
numCols = cols;
@@ -582,17 +566,16 @@ FltkMultiLineTextResource::FltkMultiLineTextResource (FltkPlatform *platform,
FltkMultiLineTextResource::~FltkMultiLineTextResource ()
{
/* Free memory avoiding a double-free of text buffers */
- ((::fltk::TextEditor *) widget)->buffer (0);
+ ((Fl_Text_Editor *) widget)->buffer (0);
delete buffer;
}
-::fltk::Widget *FltkMultiLineTextResource::createNewWidget (core::Allocation
+Fl_Widget *FltkMultiLineTextResource::createNewWidget (core::Allocation
*allocation)
{
- ::fltk::TextEditor *text =
- new ::fltk::TextEditor (allocation->x, allocation->y,
- allocation->width,
- allocation->ascent + allocation->descent);
+ Fl_Text_Editor *text =
+ new Fl_Text_Editor (allocation->x, allocation->y, allocation->width,
+ allocation->ascent + allocation->descent);
text->buffer (buffer);
return text;
}
@@ -603,8 +586,7 @@ void FltkMultiLineTextResource::sizeRequest (core::Requisition *requisition)
FltkFont *font = (FltkFont*)style->font;
::fltk::setfont(font->font,font->size);
requisition->width =
- (int)::fltk::getwidth ("n", 1) * numCols +
- 2 * RELIEF_X_THICKNESS;
+ (int)fl_width ('n') * numCols + 2 * RELIEF_X_THICKNESS;
requisition->ascent =
RELIEF_Y_THICKNESS + font->ascent +
(font->ascent + font->descent) * (numRows - 1);
@@ -656,10 +638,10 @@ FltkToggleButtonResource<I>::~FltkToggleButtonResource ()
template <class I>
-::fltk::Widget *FltkToggleButtonResource<I>::createNewWidget (core::Allocation
+Fl_Widget *FltkToggleButtonResource<I>::createNewWidget (core::Allocation
*allocation)
{
- ::fltk::Button *button = createNewButton (allocation);
+ Fl_Button *button = createNewButton (allocation);
button->value (initActivated);
return button;
}
@@ -687,7 +669,7 @@ void FltkToggleButtonResource<I>::sizeRequest (core::Requisition *requisition)
template <class I>
bool FltkToggleButtonResource<I>::FltkToggleButtonResource::isActivated ()
{
- return ((::fltk::Button*)this->widget)->value ();
+ return ((Fl_Button*)this->widget)->value ();
}
@@ -695,7 +677,7 @@ template <class I>
void FltkToggleButtonResource<I>::setActivated (bool activated)
{
initActivated = activated;
- ((::fltk::Button*)this->widget)->value (initActivated);
+ ((Fl_Button*)this->widget)->value (initActivated);
}
// ----------------------------------------------------------------------
@@ -714,12 +696,12 @@ FltkCheckButtonResource::~FltkCheckButtonResource ()
}
-::fltk::Button *FltkCheckButtonResource::createNewButton (core::Allocation
+Fl_Button *FltkCheckButtonResource::createNewButton (core::Allocation
*allocation)
{
- ::fltk::CheckButton *cb =
- new ::fltk::CheckButton (allocation->x, allocation->y, allocation->width,
- allocation->ascent + allocation->descent);
+ Fl_Check_Button *cb =
+ new Fl_Check_Button (allocation->x, allocation->y, allocation->width,
+ allocation->ascent + allocation->descent);
cb->clear_flag (SHORTCUT_LABEL);
return cb;
}
@@ -798,7 +780,7 @@ dw::core::ui::RadioButtonResource::GroupIterator
return group->groupIterator ();
}
-void FltkRadioButtonResource::widgetCallback (::fltk::Widget *widget,
+void FltkRadioButtonResource::widgetCallback (Fl_Widget *widget,
void *data)
{
if (widget->when () & FL_WHEN_CHANGED)
@@ -814,11 +796,11 @@ void FltkRadioButtonResource::buttonClicked ()
}
}
-::fltk::Button *FltkRadioButtonResource::createNewButton (core::Allocation
- *allocation)
+Fl_Button *FltkRadioButtonResource::createNewButton (core::Allocation
+ *allocation)
{
/*
- * Groups of fltk::RadioButton must be added to one fltk::Group, which is
+ * Groups of Fl_Radio_Button must be added to one Fl_Group, which is
* not possible in this context. For this, we do the grouping ourself,
* based on FltkRadioButtonResource::Group.
*
@@ -829,14 +811,13 @@ void FltkRadioButtonResource::buttonClicked ()
* (instead of creating a check button, and changing the style).
*/
- ::fltk::Button *button =
- new ::fltk::RadioButton (allocation->x, allocation->y,
- allocation->width,
- allocation->ascent + allocation->descent);
+ Fl_Button *button =
+ new Fl_Radio_Button (allocation->x, allocation->y, allocation->width,
+ allocation->ascent + allocation->descent);
button->clear_flag (SHORTCUT_LABEL);
button->when (FL_WHEN_CHANGED);
button->callback (widgetCallback, this);
- button->type (::fltk::Button::TOGGLE);
+ button->type (Fl_Button::TOGGLE);
return button;
}
@@ -861,19 +842,19 @@ template <class I> FltkSelectionResource<I>::Item::~Item ()
}
template <class I>
-::fltk::Item *FltkSelectionResource<I>::Item::createNewWidget (int index)
+Fl_Item *FltkSelectionResource<I>::Item::createNewWidget (int index)
{
- ::fltk::Item *item = new ::fltk::Item (name);
+ Fl_Item *item = new Fl_Item (name);
item->clear_flag (SHORTCUT_LABEL);
item->user_data ((void *) index);
return item;
}
template <class I>
-::fltk::ItemGroup *
+Fl_ItemGroup *
FltkSelectionResource<I>::Item::createNewGroupWidget ()
{
- ::fltk::ItemGroup *itemGroup = new ::fltk::ItemGroup (name);
+ Fl_ItemGroup *itemGroup = new Fl_ItemGroup (name);
itemGroup->clear_flag (SHORTCUT_LABEL);
itemGroup->user_data ((void *) -1L);
return itemGroup;
@@ -881,10 +862,10 @@ FltkSelectionResource<I>::Item::createNewGroupWidget ()
template <class I>
-FltkSelectionResource<I>::WidgetStack::WidgetStack (::fltk::Menu *widget)
+FltkSelectionResource<I>::WidgetStack::WidgetStack (Fl_Menu *widget)
{
this->widget = widget;
- this->stack = new Stack <TypedPointer < ::fltk::Menu> > (true);
+ this->stack = new Stack <TypedPointer < Fl_Menu> > (true);
}
template <class I> FltkSelectionResource<I>::WidgetStack::~WidgetStack ()
@@ -916,21 +897,21 @@ FltkSelectionResource<I>::iterator (dw::core::Content::Type mask, bool atEnd)
return new core::EmptyIterator (this->getEmbed (), mask, atEnd);
}
-template <class I> ::fltk::Widget *
+template <class I> Fl_Widget *
FltkSelectionResource<I>::createNewWidget (core::Allocation *allocation)
{
/** \todo Attributes (enabled, selected). */
- ::fltk::Menu *menu = createNewMenu (allocation);
+ Fl_Menu *menu = createNewMenu (allocation);
WidgetStack *widgetStack = new WidgetStack (menu);
- widgetStack->stack->push (new TypedPointer < ::fltk::Menu> (menu));
+ widgetStack->stack->push (new TypedPointer < Fl_Menu> (menu));
widgetStacks->append (widgetStack);
- ::fltk::Menu *itemGroup;
- ::fltk::Item *itemWidget;
+ Fl_Menu *itemGroup;
+ Fl_Item *itemWidget;
- ::fltk::Group *currGroup = widgetStack->stack->getTop()->getTypedValue();
+ Fl_Group *currGroup = widgetStack->stack->getTop()->getTypedValue();
int index = 0;
for (Iterator <Item> it = allItems->iterator (); it.hasNext (); ) {
@@ -944,7 +925,7 @@ FltkSelectionResource<I>::createNewWidget (core::Allocation *allocation)
case Item::START:
itemGroup = item->createNewGroupWidget ();
currGroup->add (itemGroup);
- widgetStack->stack->push (new TypedPointer < ::fltk::Menu> (menu));
+ widgetStack->stack->push (new TypedPointer < Fl_Menu> (menu));
currGroup = itemGroup;
break;
@@ -979,7 +960,7 @@ template <class I> void FltkSelectionResource<I>::addItem (const char *str,
for (Iterator <WidgetStack> it = widgetStacks->iterator ();
it.hasNext(); ) {
WidgetStack *widgetStack = it.getNext ();
- ::fltk::Item *itemWidget = item->createNewWidget (index);
+ Fl_Item *itemWidget = item->createNewWidget (index);
widgetStack->stack->getTop()->getTypedValue()->add (itemWidget);
if (!enabled)
@@ -991,12 +972,12 @@ template <class I> void FltkSelectionResource<I>::addItem (const char *str,
// Handle multiple item selection.
int *pos = new int[widgetStack->stack->size ()];
int i;
- Iterator <TypedPointer < ::fltk::Menu> > it;
+ Iterator <TypedPointer < Fl_Menu> > it;
for (it = widgetStack->stack->iterator (),
i = widgetStack->stack->size () - 1;
it.hasNext ();
i--) {
- TypedPointer < ::fltk::Menu> * p = it.getNext ();
+ TypedPointer < Fl_Menu> * p = it.getNext ();
pos[i] = p->getTypedValue()->children () - 1;
}
widgetStack->widget->set_item (pos, widgetStack->stack->size ());
@@ -1015,9 +996,9 @@ template <class I> void FltkSelectionResource<I>::pushGroup (const char *name,
for (Iterator <WidgetStack> it = widgetStacks->iterator ();
it.hasNext(); ) {
WidgetStack *widgetStack = it.getNext ();
- ::fltk::ItemGroup *group = item->createNewGroupWidget ();
+ Fl_ItemGroup *group = item->createNewGroupWidget ();
widgetStack->stack->getTop()->getTypedValue()->add (group);
- widgetStack->stack->push (new TypedPointer < ::fltk::Menu> (group));
+ widgetStack->stack->push (new TypedPointer < Fl_Menu> (group));
if (!enabled)
group->deactivate ();
}
@@ -1049,7 +1030,7 @@ template <class I> int FltkSelectionResource<I>::getMaxStringWidth ()
{
int width = 0, numberOfItems = getNumberOfItems ();
for (int i = 0; i < numberOfItems; i++) {
- int len = (int)::fltk::getwidth (getItem(i));
+ int len = (int)fl_width (getItem(i));
if (len > width) width = len;
}
return width;
@@ -1069,11 +1050,11 @@ FltkOptionMenuResource::~FltkOptionMenuResource ()
}
-::fltk::Menu *FltkOptionMenuResource::createNewMenu (core::Allocation
+Fl_Menu *FltkOptionMenuResource::createNewMenu (core::Allocation
*allocation)
{
- ::fltk::Menu *menu =
- new ::fltk::Choice (allocation->x, allocation->y,
+ Fl_Menu *menu =
+ new Fl_Choice (allocation->x, allocation->y,
allocation->width,
allocation->ascent + allocation->descent);
menu->clear_flag (SHORTCUT_LABEL);
@@ -1081,11 +1062,11 @@ FltkOptionMenuResource::~FltkOptionMenuResource ()
return menu;
}
-void FltkOptionMenuResource::widgetCallback (::fltk::Widget *widget,
+void FltkOptionMenuResource::widgetCallback (Fl_Widget *widget,
void *data)
{
((FltkOptionMenuResource *) data)->selection =
- (long) (((::fltk::Menu *) widget)->item()->user_data());
+ (long) (((Fl_Menu *) widget)->item()->user_data());
}
void FltkOptionMenuResource::sizeRequest (core::Requisition *requisition)
@@ -1140,22 +1121,22 @@ FltkListResource::~FltkListResource ()
}
-::fltk::Menu *FltkListResource::createNewMenu (core::Allocation *allocation)
+Fl_Menu *FltkListResource::createNewMenu (core::Allocation *allocation)
{
- ::fltk::Menu *menu =
- new ::fltk::Browser (allocation->x, allocation->y, allocation->width,
+ Fl_Menu *menu =
+ new Fl_Browser (allocation->x, allocation->y, allocation->width,
allocation->ascent + allocation->descent);
if (mode == SELECTION_MULTIPLE)
- menu->type(::fltk::Browser::MULTI);
+ menu->type(Fl_Browser::MULTI);
menu->clear_flag (SHORTCUT_LABEL);
menu->callback(widgetCallback,this);
menu->when(FL_WHEN_CHANGED);
return menu;
}
-void FltkListResource::widgetCallback (::fltk::Widget *widget, void *data)
+void FltkListResource::widgetCallback (Fl_Widget *widget, void *data)
{
- ::fltk::Widget *fltkItem = ((::fltk::Menu *) widget)->item ();
+ Fl_Widget *fltkItem = ((Fl_Menu *) widget)->item ();
int index = -1;
if (fltkItem)
index = (long) (fltkItem->user_data ());
diff --git a/dw/fltkui.hh b/dw/fltkui.hh
index 245d5aad..1fdb142b 100644
--- a/dw/fltkui.hh
+++ b/dw/fltkui.hh
@@ -5,11 +5,9 @@
# error Do not include this file directly, use "fltkcore.hh" instead.
#endif
-#include <fltk/Button.h>
-#include <fltk/Menu.h>
-#include <fltk/TextBuffer.h>
-#include <fltk/Item.h>
-#include <fltk/ItemGroup.h>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Menu.H>
+#include <FL/Fl_Text_Buffer.H>
namespace dw {
namespace fltk {
@@ -179,7 +177,7 @@ private:
protected:
FltkView *view;
- ::fltk::Widget *widget;
+ Fl_Widget *widget;
core::Allocation allocation;
FltkPlatform *platform;
@@ -187,9 +185,9 @@ protected:
FltkResource (FltkPlatform *platform);
void init (FltkPlatform *platform);
- virtual ::fltk::Widget *createNewWidget (core::Allocation *allocation) = 0;
+ virtual Fl_Widget *createNewWidget (core::Allocation *allocation) = 0;
- void setWidgetStyle (::fltk::Widget *widget, core::style::Style *style);
+ void setWidgetStyle (Fl_Widget *widget, core::style::Style *style);
void setDisplayed (bool displayed);
bool displayed();
public:
@@ -229,10 +227,10 @@ class FltkLabelButtonResource:
private:
const char *label;
- static void widgetCallback (::fltk::Widget *widget, void *data);
+ static void widgetCallback (Fl_Widget *widget, void *data);
protected:
- ::fltk::Widget *createNewWidget (core::Allocation *allocation);
+ Fl_Widget *createNewWidget (core::Allocation *allocation);
public:
FltkLabelButtonResource (FltkPlatform *platform, const char *label);
@@ -251,7 +249,7 @@ class FltkComplexButtonResource:
private:
bool relief;
- static void widgetCallback (::fltk::Widget *widget, void *data);
+ static void widgetCallback (Fl_Widget *widget, void *data);
protected:
FltkView *topView, *flatView;
@@ -267,7 +265,7 @@ protected:
int reliefXThickness ();
int reliefYThickness ();
- ::fltk::Widget *createNewWidget (core::Allocation *allocation);
+ Fl_Widget *createNewWidget (core::Allocation *allocation);
public:
FltkComplexButtonResource (FltkPlatform *platform, dw::core::Widget *widget,
@@ -290,11 +288,11 @@ private:
char *label;
bool editable;
- static void widgetCallback (::fltk::Widget *widget, void *data);
+ static void widgetCallback (Fl_Widget *widget, void *data);
void setDisplayed (bool displayed);
protected:
- ::fltk::Widget *createNewWidget (core::Allocation *allocation);
+ Fl_Widget *createNewWidget (core::Allocation *allocation);
public:
FltkEntryResource (FltkPlatform *platform, int maxLength, bool password,
@@ -314,12 +312,12 @@ class FltkMultiLineTextResource:
public FltkSpecificResource <dw::core::ui::MultiLineTextResource>
{
private:
- ::fltk::TextBuffer *buffer;
+ Fl_Text_Buffer *buffer;
bool editable;
int numCols, numRows;
protected:
- ::fltk::Widget *createNewWidget (core::Allocation *allocation);
+ Fl_Widget *createNewWidget (core::Allocation *allocation);
public:
FltkMultiLineTextResource (FltkPlatform *platform, int cols, int rows);
@@ -341,8 +339,8 @@ private:
bool initActivated;
protected:
- virtual ::fltk::Button *createNewButton (core::Allocation *allocation) = 0;
- ::fltk::Widget *createNewWidget (core::Allocation *allocation);
+ virtual Fl_Button *createNewButton (core::Allocation *allocation) = 0;
+ Fl_Widget *createNewWidget (core::Allocation *allocation);
public:
FltkToggleButtonResource (FltkPlatform *platform,
@@ -360,7 +358,7 @@ class FltkCheckButtonResource:
public FltkToggleButtonResource <dw::core::ui::CheckButtonResource>
{
protected:
- ::fltk::Button *createNewButton (core::Allocation *allocation);
+ Fl_Button *createNewButton (core::Allocation *allocation);
public:
FltkCheckButtonResource (FltkPlatform *platform,
@@ -418,11 +416,11 @@ private:
Group *group;
- static void widgetCallback (::fltk::Widget *widget, void *data);
+ static void widgetCallback (Fl_Widget *widget, void *data);
void buttonClicked ();
protected:
- ::fltk::Button *createNewButton (core::Allocation *allocation);
+ Fl_Button *createNewButton (core::Allocation *allocation);
public:
FltkRadioButtonResource (FltkPlatform *platform,
@@ -450,17 +448,17 @@ protected:
bool selected = false);
~Item ();
- ::fltk::Item *createNewWidget (int index);
- ::fltk::ItemGroup *createNewGroupWidget ();
+ Item *createNewWidget (int index);
+ Fl_ItemGroup *createNewGroupWidget ();
};
class WidgetStack: public lout::object::Object
{
public:
- ::fltk::Menu *widget;
- lout::container::typed::Stack <lout::object::TypedPointer < ::fltk::Menu> > *stack;
+ Fl_Menu *widget;
+ lout::container::typed::Stack <lout::object::TypedPointer < Fl_Menu> > *stack;
- WidgetStack (::fltk::Menu *widget);
+ WidgetStack (Fl_Menu *widget);
~WidgetStack ();
};
@@ -473,8 +471,8 @@ protected:
bool enabled = true,
bool selected = false);
- ::fltk::Widget *createNewWidget (core::Allocation *allocation);
- virtual ::fltk::Menu *createNewMenu (core::Allocation *allocation) = 0;
+ Fl_Widget *createNewWidget (core::Allocation *allocation);
+ virtual Fl_Menu *createNewMenu (core::Allocation *allocation) = 0;
virtual bool setSelectedItems() { return false; }
int getMaxStringWidth ();
@@ -499,11 +497,11 @@ class FltkOptionMenuResource:
public FltkSelectionResource <dw::core::ui::OptionMenuResource>
{
protected:
- ::fltk::Menu *createNewMenu (core::Allocation *allocation);
+ Fl_Menu *createNewMenu (core::Allocation *allocation);
virtual bool setSelectedItems() { return true; }
private:
- static void widgetCallback (::fltk::Widget *widget, void *data);
+ static void widgetCallback (Fl_Widget *widget, void *data);
int selection;
public:
@@ -520,10 +518,10 @@ class FltkListResource:
public FltkSelectionResource <dw::core::ui::ListResource>
{
protected:
- ::fltk::Menu *createNewMenu (core::Allocation *allocation);
+ Fl_Menu *createNewMenu (core::Allocation *allocation);
private:
- static void widgetCallback (::fltk::Widget *widget, void *data);
+ static void widgetCallback (Fl_Widget *widget, void *data);
lout::misc::SimpleVector <bool> itemsSelected;
int showRows;
ListResource::SelectionMode mode;