Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cXCheckBox.h
Go to the documentation of this file.
1 //
4 //
5 #ifndef _INC_cXCheckBox_H
6 #define _INC_cXCheckBox_H
7 #pragma once
8 
9 #include "cXButton.h"
10 
11 namespace GrayGUI
12 {
13  class cXCheckBox : public cXButton
14  {
17  public:
18  cXCheckBox(cXWindow* pParent, DLGID_t id, X_WNDCLASS_TYPE eXWClass = X_CTRL_CheckBox);
19  virtual ~cXCheckBox();
20  void UpdateCheckedIcon();
21 
22  bool get_CheckedState() const
23  {
24  return m_bIsChecked;
25  }
26  void put_CheckedState(bool State);
27 
28  virtual bool InitXWindow(void);
29  virtual bool OnMouseDown(MBUTTON_TYPE uButton, PIXELS_t x, PIXELS_t y);
30  virtual bool OnMouseUp(MBUTTON_TYPE uButton, PIXELS_t x, PIXELS_t y);
31  virtual bool OnKeyFocus(bool bActive);
32 
33  void put_Expanded(bool bExpanded);
34  bool get_Expanded(void) const
35  {
36  return m_bExpanded;
37  }
38 
39  private:
40  bool m_bExpanded; //whether it's visible in an expanded listbox.
41  //??? HORRIBLE object oriented design to have this here.
42  };
43 
45 };
46 
47 #endif
Definition: cXButton.h:47
bool m_bIsChecked
Definition: cXButton.h:70
Definition: cXCheckBox.h:14
void UpdateCheckedIcon()
Definition: cXCheckBox.cpp:37
cXCheckBox(cXWindow *pParent, DLGID_t id, X_WNDCLASS_TYPE eXWClass=X_CTRL_CheckBox)
Definition: cXCheckBox.cpp:12
void put_CheckedState(bool State)
Definition: cXCheckBox.cpp:62
virtual bool OnKeyFocus(bool bActive)
Definition: cXCheckBox.cpp:117
virtual bool OnMouseUp(MBUTTON_TYPE uButton, PIXELS_t x, PIXELS_t y)
Definition: cXCheckBox.cpp:94
bool get_CheckedState() const
Definition: cXCheckBox.h:22
virtual bool InitXWindow(void)
Definition: cXCheckBox.cpp:27
void put_Expanded(bool bExpanded)
Definition: cXCheckBox.cpp:53
bool get_Expanded(void) const
Definition: cXCheckBox.h:34
virtual bool OnMouseDown(MBUTTON_TYPE uButton, PIXELS_t x, PIXELS_t y)
Definition: cXCheckBox.cpp:70
virtual ~cXCheckBox()
Definition: cXCheckBox.cpp:23
Definition: cXWindow.h:94
Definition: cRefPtr.h:225
Definition: GrayGUI.cpp:11
cRefPtr< cXCheckBox > cXCheckBoxPtr
Definition: cXCheckBox.h:44
X_WNDCLASS_TYPE
Definition: cXWindow.h:34
UINT DLGID_t
old window format this was a WORD, EX format this is UINT32.
Definition: cResDialog.h:68
MBUTTON_TYPE
Definition: cInputBase.h:40
int PIXELS_t
Count of pixels in a dimension of some image/surface.
Definition: cSurfaceInfo.h:20