aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.h
diff options
context:
space:
mode:
authorMax Horn2002-07-07 23:37:47 +0000
committerMax Horn2002-07-07 23:37:47 +0000
commitc3b606cd9b0b0445b0360f9a95225186252ae1c1 (patch)
tree00b31845f07a89afb6f2bb425d3e2e7a478554e1 /gui/widget.h
parent10d86be56456b57392cca05d5a2135408289223c (diff)
downloadscummvm-rg350-c3b606cd9b0b0445b0360f9a95225186252ae1c1.tar.gz
scummvm-rg350-c3b606cd9b0b0445b0360f9a95225186252ae1c1.tar.bz2
scummvm-rg350-c3b606cd9b0b0445b0360f9a95225186252ae1c1.zip
added CheckboxWidget; added NewGui::drawBitmap
svn-id: r4486
Diffstat (limited to 'gui/widget.h')
-rw-r--r--gui/widget.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/gui/widget.h b/gui/widget.h
index 58e04d48a9..a1ea0fcf64 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -83,13 +83,30 @@ protected:
uint8 _hotkey;
public:
ButtonWidget(Dialog *boss, int x, int y, int w, int h, const char *label, uint32 cmd);
- void setCmd(uint32 cmd);
- uint32 getCmd();
- void handleClick(int button);
+ void setCmd(uint32 cmd) { _cmd = cmd; }
+ uint32 getCmd() { return _cmd; }
+ void handleClick(int button);
void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); draw(); }
void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); draw(); }
};
+/* CheckboxWidget */
+class CheckboxWidget : public ButtonWidget {
+protected:
+ bool _state;
+public:
+ CheckboxWidget(Dialog *boss, int x, int y, int w, int h, const char *label, uint32 cmd);
+ void setState(bool state) { _state = state; }
+ bool getState() { return _state; }
+
+ void handleClick(int button);
+ virtual void handleMouseEntered(int button) {}
+ virtual void handleMouseLeft(int button) {}
+
+protected:
+ void drawWidget(bool hilite);
+};
+
#endif