checklst.mm 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: src/cocoa/checklst.mm
  3. // Purpose: wxCheckListBox
  4. // Author: David Elliott
  5. // Modified by:
  6. // Created: 2003/03/18
  7. // Copyright: (c) 2003 David Elliott
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #include "wx/wxprec.h"
  11. #if wxUSE_CHECKLISTBOX
  12. #include "wx/checklst.h"
  13. #ifndef WX_PRECOMP
  14. #include "wx/log.h"
  15. #include "wx/app.h"
  16. #endif //WX_PRECOMP
  17. BEGIN_EVENT_TABLE(wxCheckListBox, wxCheckListBoxBase)
  18. END_EVENT_TABLE()
  19. // WX_IMPLEMENT_COCOA_OWNER(wxCheckListBox,NSButton,NSControl,NSView)
  20. bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
  21. const wxPoint& pos,
  22. const wxSize& size,
  23. const wxArrayString& choices,
  24. long style,
  25. const wxValidator& validator,
  26. const wxString& name)
  27. {
  28. wxCArrayString chs(choices);
  29. return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
  30. style, validator, name);
  31. }
  32. bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
  33. const wxPoint& pos,
  34. const wxSize& size,
  35. int n, const wxString choices[],
  36. long style,
  37. const wxValidator& validator,
  38. const wxString& name)
  39. {
  40. if(!CreateControl(parent,winid,pos,size,style,validator,name))
  41. return false;
  42. if(m_parent)
  43. m_parent->CocoaAddChild(this);
  44. return true;
  45. }
  46. wxCheckListBox::~wxCheckListBox()
  47. {
  48. }
  49. bool wxCheckListBox::IsChecked(unsigned int item) const
  50. {
  51. return false;
  52. }
  53. void wxCheckListBox::Check(unsigned int item, bool check)
  54. {
  55. }
  56. #endif