libcdos-fw
CFStateImage.h
1 #ifndef __CF_STATEIMAGE_H__
2 #define __CF_STATEIMAGE_H__
3 
4 #include <glibmm/ustring.h>
5 #include <array>
6 #include <Core/CFDefines.h>
7 
8 CF_NAMESPACE_BEGIN
9 
10 class StateImage {
11 public:
12  typedef enum {
13  STATE_NORMAL = 0,
14  STATE_PRESSED,
15  STATE_HOVER,
16  STATE_DISABLED,
17  STATE_INVALID,
18  STATE_MAX = STATE_INVALID
19  } State;
20 
21  typedef std::array<Glib::ustring, STATE_MAX> PathArray;
22 
23 public:
24  explicit StateImage();
25 
26  StateImage(const StateImage& other);
27 
28  StateImage(const PathArray& stateImages);
29 
30  void setStateImage(State st, const Glib::ustring& imgpath);
31 
32  void setStateImages(const PathArray& stateImages);
33 
34  const PathArray& getStateImages();
35 
36  StateImage& operator=(const StateImage& other);
37 
38 private:
39  void initialize();
40 
41 private:
42  PathArray m_stateImages;
43 };
44 
45 CF_NAMESPACE_END
46 
47 #endif // __CF_STATEIMAGE_H__
Definition: CFStateImage.h:10