]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/state.h
Initial revision
[libs/gltk.git] / source / state.h
diff --git a/source/state.h b/source/state.h
new file mode 100644 (file)
index 0000000..6cbe152
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef MSP_GLTK_STATE_H_
+#define MSP_GLTK_STATE_H_
+
+#include <istream>
+#include <msp/parser/value.h>
+
+namespace Msp {
+namespace GLtk {
+
+enum State
+{
+       NORMAL,   //< Default state
+       HOVER,    //< Pointer over the widget
+       ACTIVE,   //< Widget is active (e.g. pressed button)
+       DISABLED, //< Widget is unresponsive
+       N_STATES_ //< Sentry value
+};
+
+extern std::istream &operator>>(std::istream &, State &);
+
+} // namespace GLtk
+
+namespace Parser {
+
+template<>
+struct TypeResolver<GLtk::State> { static const Value::Type type=Value::ENUM; };
+
+} // namespace Parser
+} // namespace Msp
+
+#endif