diff options
-rw-r--r-- | dw/fltkplatform.cc | 4 | ||||
-rw-r--r-- | dw/fltkplatform.hh | 3 | ||||
-rw-r--r-- | dw/fltkui.cc | 6 | ||||
-rw-r--r-- | dw/fltkui.hh | 4 | ||||
-rw-r--r-- | dw/ui.hh | 4 |
5 files changed, 10 insertions, 11 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc index d8e95a6e..7dd87a18 100644 --- a/dw/fltkplatform.cc +++ b/dw/fltkplatform.cc @@ -419,11 +419,11 @@ FltkPlatform::FltkResourceFactory::createOptionMenuResource () } core::ui::EntryResource * -FltkPlatform::FltkResourceFactory::createEntryResource (int maxLength, +FltkPlatform::FltkResourceFactory::createEntryResource (int size, bool password, const char *label) { - return new ui::FltkEntryResource (platform, maxLength, password, label); + return new ui::FltkEntryResource (platform, size, password, label); } core::ui::MultiLineTextResource * diff --git a/dw/fltkplatform.hh b/dw/fltkplatform.hh index 7b4272eb..64605b68 100644 --- a/dw/fltkplatform.hh +++ b/dw/fltkplatform.hh @@ -109,8 +109,7 @@ private: createListResource (core::ui::ListResource::SelectionMode selectionMode, int rows); core::ui::OptionMenuResource *createOptionMenuResource (); - core::ui::EntryResource *createEntryResource (int maxLength, - bool password, + core::ui::EntryResource *createEntryResource (int size, bool password, const char *label); core::ui::MultiLineTextResource *createMultiLineTextResource (int cols, int rows); diff --git a/dw/fltkui.cc b/dw/fltkui.cc index d2fae962..e8416bb3 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -536,11 +536,11 @@ Fl_Widget *FltkComplexButtonResource::createNewWidget (core::Allocation // ---------------------------------------------------------------------- -FltkEntryResource::FltkEntryResource (FltkPlatform *platform, int maxLength, +FltkEntryResource::FltkEntryResource (FltkPlatform *platform, int size, bool password, const char *label): FltkSpecificResource <dw::core::ui::EntryResource> (platform) { - this->maxLength = maxLength; + this->size = size; this->password = password; this->label = label ? strdup(label) : NULL; this->label_w = 0; @@ -615,7 +615,7 @@ void FltkEntryResource::sizeRequest (core::Requisition *requisition) // 1.3.0 (STR #2688). requisition->width = (int)fl_width ("n") - * (maxLength == UNLIMITED_MAX_LENGTH ? 10 : maxLength) + * (size == UNLIMITED_SIZE ? 10 : size) + label_w + (2 * RELIEF_X_THICKNESS); requisition->ascent = font->ascent + RELIEF_Y_THICKNESS; requisition->descent = font->descent + RELIEF_Y_THICKNESS; diff --git a/dw/fltkui.hh b/dw/fltkui.hh index a65d4930..976e5395 100644 --- a/dw/fltkui.hh +++ b/dw/fltkui.hh @@ -282,7 +282,7 @@ class FltkEntryResource: public FltkSpecificResource <dw::core::ui::EntryResource> { private: - int maxLength; + int size; bool password; const char *initText; char *label; @@ -297,7 +297,7 @@ protected: void setWidgetStyle (Fl_Widget *widget, core::style::Style *style); public: - FltkEntryResource (FltkPlatform *platform, int maxLength, bool password, + FltkEntryResource (FltkPlatform *platform, int size, bool password, const char *label); ~FltkEntryResource (); @@ -481,7 +481,7 @@ public: class EntryResource: public TextResource { public: - enum { UNLIMITED_MAX_LENGTH = -1 }; + enum { UNLIMITED_SIZE = -1 }; }; class MultiLineTextResource: public TextResource @@ -541,7 +541,7 @@ public: virtual ListResource *createListResource (ListResource::SelectionMode selectionMode, int rows) = 0; virtual OptionMenuResource *createOptionMenuResource () = 0; - virtual EntryResource *createEntryResource (int maxLength, bool password, + virtual EntryResource *createEntryResource (int size, bool password, const char *label) = 0; virtual MultiLineTextResource *createMultiLineTextResource (int cols, int rows) = 0; |