checklst.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk1/checklst.h
  3. // Purpose: wxCheckListBox class
  4. // Author: Robert Roebling
  5. // Modified by:
  6. // Copyright: (c) 1998 Robert Roebling
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef __GTKCHECKLISTH__
  10. #define __GTKCHECKLISTH__
  11. // ----------------------------------------------------------------------------
  12. // macros
  13. // ----------------------------------------------------------------------------
  14. // there is no "right" choice of the checkbox indicators, so allow the user to
  15. // define them himself if he wants
  16. #ifndef wxCHECKLBOX_CHECKED
  17. #define wxCHECKLBOX_CHECKED wxT('x')
  18. #define wxCHECKLBOX_UNCHECKED wxT(' ')
  19. #define wxCHECKLBOX_STRING wxT("[ ] ")
  20. #endif
  21. //-----------------------------------------------------------------------------
  22. // wxCheckListBox
  23. // ----------------------------------------------------------------------------
  24. class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
  25. {
  26. public:
  27. wxCheckListBox();
  28. wxCheckListBox(wxWindow *parent, wxWindowID id,
  29. const wxPoint& pos = wxDefaultPosition,
  30. const wxSize& size = wxDefaultSize,
  31. int nStrings = 0,
  32. const wxString *choices = (const wxString *)NULL,
  33. long style = 0,
  34. const wxValidator& validator = wxDefaultValidator,
  35. const wxString& name = wxListBoxNameStr);
  36. wxCheckListBox(wxWindow *parent, wxWindowID id,
  37. const wxPoint& pos,
  38. const wxSize& size,
  39. const wxArrayString& choices,
  40. long style = 0,
  41. const wxValidator& validator = wxDefaultValidator,
  42. const wxString& name = wxListBoxNameStr);
  43. bool IsChecked(unsigned int index) const;
  44. void Check(unsigned int index, bool check = true);
  45. int GetItemHeight() const;
  46. private:
  47. DECLARE_DYNAMIC_CLASS(wxCheckListBox)
  48. };
  49. #endif //__GTKCHECKLISTH__