]> git.tdb.fi Git - libs/gltk.git/blob - source/state.cpp
Reorder class members
[libs/gltk.git] / source / state.cpp
1 /* $Id$
2
3 This file is part of libmspgltk
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #include "state.h"
9
10 using namespace std;
11
12 namespace Msp {
13 namespace GLtk {
14
15 istream &operator>>(istream &is, State &state)
16 {
17         string str;
18         is>>str;
19         if(str=="NORMAL")
20                 state=NORMAL;
21         else if(str=="HOVER")
22                 state=HOVER;
23         else if(str=="ACTIVE")
24                 state=ACTIVE;
25         else if(str=="DISABLED")
26                 state=DISABLED;
27         else
28                 is.setstate(ios_base::failbit);
29
30         return is;
31 }
32
33 } // namespace GLtk
34 } // namespace Msp