diff options
author | Paweł Kołodziejski | 2003-03-06 19:52:54 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-03-06 19:52:54 +0000 |
commit | 1ff9749b872afe85ed90a74cc1c140ed956b0fdf (patch) | |
tree | 0e0992c99c60a3a3c844a960fa59c0fff5b91352 /gui/widget.h | |
parent | 4fe8dcd671941efec47e20c6c598c372b8fa1cb7 (diff) | |
download | scummvm-rg350-1ff9749b872afe85ed90a74cc1c140ed956b0fdf.tar.gz scummvm-rg350-1ff9749b872afe85ed90a74cc1c140ed956b0fdf.tar.bz2 scummvm-rg350-1ff9749b872afe85ed90a74cc1c140ed956b0fdf.zip |
and more cleanup .... Last
svn-id: r6721
Diffstat (limited to 'gui/widget.h')
-rw-r--r-- | gui/widget.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gui/widget.h b/gui/widget.h index 49362a838c..99cb78c165 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -79,8 +79,7 @@ public: void setTarget(CommandReceiver *target) { _target = target; } CommandReceiver *getTarget() const { return _target; } - virtual void sendCommand(uint32 cmd, uint32 data) - { + virtual void sendCommand(uint32 cmd, uint32 data) { if (_target && cmd) _target->handleCommand(this, cmd, data); } @@ -120,7 +119,7 @@ public: void setFlags(int flags) { _flags |= flags; } void clearFlags(int flags) { _flags &= ~flags; } int getFlags() const { return _flags; } - + void setEnabled(bool e) { if (e) setFlags(WIDGET_ENABLED); else clearFlags(WIDGET_ENABLED); } bool isEnabled() const { return _flags & WIDGET_ENABLED; } bool isVisible() const { return !(_flags & WIDGET_INVISIBLE); } @@ -132,7 +131,6 @@ protected: virtual void lostFocusWidget() {} }; - /* StaticTextWidget */ class StaticTextWidget : public Widget { protected: @@ -143,16 +141,15 @@ protected: public: StaticTextWidget(Dialog *boss, int x, int y, int w, int h, const String &text, int align); void setValue(int value); - void setLabel(const String &label) { _label = label; } - const String &getLabel() const { return _label; } - void setAlign(int align) { _align = align; } - int getAlign() const { return _align; } + void setLabel(const String &label) { _label = label; } + const String &getLabel() const { return _label; } + void setAlign(int align) { _align = align; } + int getAlign() const { return _align; } protected: void drawWidget(bool hilite); }; - /* ButtonWidget */ class ButtonWidget : public StaticTextWidget, public CommandSender { friend class Dialog; // Needed for the hotkey handling @@ -221,7 +218,7 @@ public: protected: void drawWidget(bool hilite); - + int valueToPos(int value); int posToValue(int pos); }; |