summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textbox.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-17 19:07:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-17 19:07:25 +0300
commite9fb9da5bf17d3402781eb5205be7d2f794887ee (patch)
tree729a7932fab668bcc2de180ebfe287e811f8e136 /src/gui/widgets/textbox.h
parent00ec60c1c0c3db8e3602e85dd152106f59f0c0e2 (diff)
downloadmv-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.gz
mv-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.bz2
mv-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.xz
mv-e9fb9da5bf17d3402781eb5205be7d2f794887ee.zip
Add strong typed bool Opaque.
Diffstat (limited to 'src/gui/widgets/textbox.h')
-rw-r--r--src/gui/widgets/textbox.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 355a2fb47..097c772b8 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -68,6 +68,8 @@
#include "gui/widgets/widget.h"
+#include "enums/simpletypes/opaque.h"
+
#include "listeners/keylistener.h"
#include "listeners/mouselistener.h"
@@ -258,7 +260,7 @@ class TextBox final : public Widget,
* @see setOpaque
*/
bool isOpaque() const
- { return mOpaque; }
+ { return mOpaque == Opaque_true; }
/**
* Sets the text box to be opaque or not. An opaque text box will draw
@@ -268,7 +270,7 @@ class TextBox final : public Widget,
* @param opaque True if the text box should be opaque, false otherwise.
* @see isOpaque
*/
- void setOpaque(const bool opaque)
+ void setOpaque(const Opaque opaque)
{ mOpaque = opaque; }
void fontChanged() override final
@@ -321,7 +323,7 @@ class TextBox final : public Widget,
/**
* True if the text box is editable, false otherwise.
*/
- bool mOpaque;
+ Opaque mOpaque;
};
#endif // GUI_WIDGETS_TEXTBOX_H