control.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/control.h
  3. // Purpose: wxControl class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 1998-01-01
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_CONTROL_H_
  11. #define _WX_CONTROL_H_
  12. WXDLLIMPEXP_DATA_CORE(extern const char) wxControlNameStr[];
  13. // General item class
  14. class WXDLLIMPEXP_CORE wxControl : public wxControlBase
  15. {
  16. DECLARE_ABSTRACT_CLASS(wxControl)
  17. public:
  18. wxControl();
  19. wxControl(wxWindow *parent, wxWindowID winid,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize, long style = 0,
  22. const wxValidator& validator = wxDefaultValidator,
  23. const wxString& name = wxControlNameStr)
  24. {
  25. Create(parent, winid, pos, size, style, validator, name);
  26. }
  27. bool Create(wxWindow *parent, wxWindowID winid,
  28. const wxPoint& pos = wxDefaultPosition,
  29. const wxSize& size = wxDefaultSize, long style = 0,
  30. const wxValidator& validator = wxDefaultValidator,
  31. const wxString& name = wxControlNameStr);
  32. // Simulates an event
  33. virtual void Command(wxCommandEvent& event) { ProcessCommand(event); }
  34. // implementation from now on
  35. // --------------------------
  36. // Calls the callback and appropriate event handlers
  37. bool ProcessCommand(wxCommandEvent& event);
  38. void OnKeyDown( wxKeyEvent &event ) ;
  39. };
  40. #endif
  41. // _WX_CONTROL_H_