choice.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/univ/choice.h
  3. // Purpose: the universal choice
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 30.08.00
  7. // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_UNIV_CHOICE_H_
  11. #define _WX_UNIV_CHOICE_H_
  12. #include "wx/combobox.h"
  13. // VS: This is only a *temporary* implementation, real wxChoice should not
  14. // derive from wxComboBox and may have different l&f
  15. class WXDLLIMPEXP_CORE wxChoice : public wxComboBox
  16. {
  17. public:
  18. wxChoice() {}
  19. wxChoice(wxWindow *parent, wxWindowID id,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize,
  22. int n = 0, const wxString choices[] = (const wxString *) NULL,
  23. long style = 0,
  24. const wxValidator& validator = wxDefaultValidator,
  25. const wxString& name = wxChoiceNameStr)
  26. {
  27. Create(parent, id, pos, size, n, choices, style, validator, name);
  28. }
  29. wxChoice(wxWindow *parent, wxWindowID id,
  30. const wxPoint& pos,
  31. const wxSize& size,
  32. const wxArrayString& choices,
  33. long style = 0,
  34. const wxValidator& validator = wxDefaultValidator,
  35. const wxString& name = wxChoiceNameStr);
  36. bool Create(wxWindow *parent, wxWindowID id,
  37. const wxPoint& pos = wxDefaultPosition,
  38. const wxSize& size = wxDefaultSize,
  39. int n = 0, const wxString choices[] = NULL,
  40. long style = 0,
  41. const wxValidator& validator = wxDefaultValidator,
  42. const wxString& name = wxChoiceNameStr);
  43. bool Create(wxWindow *parent, wxWindowID id,
  44. const wxPoint& pos,
  45. const wxSize& size,
  46. const wxArrayString& choices,
  47. long style = 0,
  48. const wxValidator& validator = wxDefaultValidator,
  49. const wxString& name = wxChoiceNameStr);
  50. private:
  51. void OnComboBox(wxCommandEvent &event);
  52. DECLARE_EVENT_TABLE()
  53. DECLARE_DYNAMIC_CLASS(wxChoice)
  54. };
  55. #endif // _WX_UNIV_CHOICE_H_