--- /dev/null
+#include "state.h"
+
+using namespace std;
+
+namespace Msp {
+namespace GLtk {
+
+istream &operator>>(istream &is, State &state)
+{
+ string str;
+ is>>str;
+ if(str=="normal")
+ state=NORMAL;
+ else if(str=="hover")
+ state=HOVER;
+ else if(str=="active")
+ state=ACTIVE;
+ else if(str=="disabled")
+ state=DISABLED;
+ else
+ is.setstate(ios_base::failbit);
+
+ return is;
+}
+
+} // namespace GLtk
+} // namespace Msp