OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sharedstatebutton.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_WIDGETS_SHAREDSTATEBUTTON_HPP
2 #define OPENMW_WIDGETS_SHAREDSTATEBUTTON_HPP
3 
4 #include <MyGUI_Button.h>
5 
6 namespace Gui
7 {
8 
10 
11  typedef std::vector<SharedStateButton*> ButtonGroup;
12 
14  class SharedStateButton : public MyGUI::Button
15  {
16  MYGUI_RTTI_DERIVED(SharedStateButton)
17 
18  public:
20 
21  protected:
22  void updateButtonState();
23 
24  virtual void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id);
25  virtual void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id);
26  virtual void onMouseSetFocus(MyGUI::Widget* _old);
27  virtual void onMouseLostFocus(MyGUI::Widget* _new);
28  virtual void baseUpdateEnable();
29 
30  virtual void shutdownOverride();
31 
32  bool _setState(const std::string &_value);
33 
34  public:
35  void shareStateWith(ButtonGroup shared);
36 
38  static void createButtonGroup(ButtonGroup group);
39 
41  void setStateSelected(bool _value);
42 
43  private:
45 
48  };
49 }
50 
51 #endif
void shareStateWith(ButtonGroup shared)
Definition: sharedstatebutton.cpp:22
virtual void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id)
Definition: sharedstatebutton.cpp:27
virtual void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id)
Definition: sharedstatebutton.cpp:34
bool _setState(const std::string &_value)
Definition: sharedstatebutton.cpp:72
virtual void onMouseLostFocus(MyGUI::Widget *_new)
Definition: sharedstatebutton.cpp:48
bool mIsMouseFocus
Definition: sharedstatebutton.hpp:47
static void createButtonGroup(ButtonGroup group)
Definition: sharedstatebutton.cpp:120
virtual void onMouseSetFocus(MyGUI::Widget *_old)
Definition: sharedstatebutton.cpp:41
ButtonGroup mSharedWith
Definition: sharedstatebutton.hpp:44
void setStateSelected(bool _value)
Set button selected state.
Definition: sharedstatebutton.cpp:61
A button that applies its own state changes to other widgets, to do this you define it as part of a B...
Definition: sharedstatebutton.hpp:14
SharedStateButton()
Definition: sharedstatebutton.cpp:6
std::vector< SharedStateButton * > ButtonGroup
Definition: sharedstatebutton.hpp:9
virtual void baseUpdateEnable()
Definition: sharedstatebutton.cpp:55
virtual void shutdownOverride()
Definition: sharedstatebutton.cpp:13
void updateButtonState()
Definition: sharedstatebutton.cpp:85
bool mIsMousePressed
Definition: sharedstatebutton.hpp:46