Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-05-10 15:33:16 +0000
committerStijn Buys <ingar@osirion.org>2009-05-10 15:33:16 +0000
commitb3083a4fe57cc99c6972180a40091001cb209ad7 (patch)
tree52552b1fc62ff361867a7171404e5c5bd9e52917 /src/ui/iconbutton.h
parent3dde787b2546958072e8a98350335b2bab6d1c17 (diff)
added disabled ui palette color, added dock and launch buttons
Diffstat (limited to 'src/ui/iconbutton.h')
-rw-r--r--src/ui/iconbutton.h38
1 files changed, 27 insertions, 11 deletions
diff --git a/src/ui/iconbutton.h b/src/ui/iconbutton.h
index d545697..10b073f 100644
--- a/src/ui/iconbutton.h
+++ b/src/ui/iconbutton.h
@@ -18,29 +18,44 @@ public:
IconButton(Widget *parent, const char *icon=0, const char *command=0);
~IconButton();
+ /// the command this button executes
+ inline const std::string & command() const {
+ return iconbutton_command;
+ }
+
+ /// the icon texture
+ inline const std::string & icon() const {
+ return iconbutton_icon;
+ }
+
+ /// enabled or disabled
+ inline const bool enabled() const {
+ return iconbutton_enabled;
+ }
+
+ /// enabled or disabled
+ inline const bool disabled() const {
+ return !iconbutton_enabled;
+ }
+
+ /// enable or disable the button
+ void enable(bool enabled=true);
+
+ /// enable or disable the button
+ void disable(bool disabled=true);
+
/// set the command this button will execute
void set_command(const std::string &command);
/// set the command this button will execute
void set_command(const char *command);
- /// the command this button executes
- inline const std::string & command() const {
- return iconbutton_command;
- }
-
-
/// set the icon texture
void set_icon(const std::string & icon);
/// set the icon texture
void set_icon(const char *icon);
- /// the icon texture
- inline const std::string & icon() const {
- return iconbutton_icon;
- }
-
/// print button description
virtual void print(const size_t indent) const;
@@ -63,6 +78,7 @@ protected:
private:
std::string iconbutton_command;
std::string iconbutton_icon;
+ bool iconbutton_enabled;
};
}