checklst.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/cocoa/checklst.h
  3. // Purpose: wxCheckListBox class
  4. // Author: David Elliott
  5. // Modified by:
  6. // Created: 2003/03/16
  7. // Copyright: (c) 2003 David Elliott
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef __WX_COCOA_CHECKLST_H__
  11. #define __WX_COCOA_CHECKLST_H__
  12. //#include "wx/cocoa/NSTableView.h"
  13. // ========================================================================
  14. // wxCheckListBox
  15. // ========================================================================
  16. class WXDLLIMPEXP_CORE wxCheckListBox: public wxCheckListBoxBase //, protected wxCocoaNSTableView
  17. {
  18. DECLARE_DYNAMIC_CLASS(wxCheckListBox)
  19. DECLARE_EVENT_TABLE()
  20. WX_DECLARE_COCOA_OWNER(NSTableView,NSControl,NSView)
  21. // ------------------------------------------------------------------------
  22. // initialization
  23. // ------------------------------------------------------------------------
  24. public:
  25. wxCheckListBox() { }
  26. wxCheckListBox(wxWindow *parent, wxWindowID winid,
  27. const wxPoint& pos = wxDefaultPosition,
  28. const wxSize& size = wxDefaultSize,
  29. int n = 0, const wxString choices[] = NULL,
  30. long style = 0,
  31. const wxValidator& validator = wxDefaultValidator,
  32. const wxString& name = wxListBoxNameStr)
  33. {
  34. Create(parent, winid, pos, size, n, choices, style, validator, name);
  35. }
  36. wxCheckListBox(wxWindow *parent, wxWindowID winid,
  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. {
  44. Create(parent, winid, pos, size, choices, style, validator, name);
  45. }
  46. bool Create(wxWindow *parent, wxWindowID winid,
  47. const wxPoint& pos = wxDefaultPosition,
  48. const wxSize& size = wxDefaultSize,
  49. int n = 0, const wxString choices[] = NULL,
  50. long style = 0,
  51. const wxValidator& validator = wxDefaultValidator,
  52. const wxString& name = wxListBoxNameStr);
  53. bool Create(wxWindow *parent, wxWindowID winid,
  54. const wxPoint& pos,
  55. const wxSize& size,
  56. const wxArrayString& choices,
  57. long style = 0,
  58. const wxValidator& validator = wxDefaultValidator,
  59. const wxString& name = wxListBoxNameStr);
  60. virtual ~wxCheckListBox();
  61. // ------------------------------------------------------------------------
  62. // Cocoa callbacks
  63. // ------------------------------------------------------------------------
  64. protected:
  65. // ------------------------------------------------------------------------
  66. // Implementation
  67. // ------------------------------------------------------------------------
  68. public:
  69. // check list box specific methods
  70. virtual bool IsChecked(unsigned int item) const;
  71. virtual void Check(unsigned int item, bool check = true);
  72. };
  73. #endif // __WX_COCOA_CHECKLST_H__