panel.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/panel.h
  3. // Purpose: Base header for wxPanel
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created:
  7. // Copyright: (c) Julian Smart
  8. // (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
  9. // Licence: wxWindows Licence
  10. /////////////////////////////////////////////////////////////////////////////
  11. #ifndef _WX_PANEL_H_BASE_
  12. #define _WX_PANEL_H_BASE_
  13. // ----------------------------------------------------------------------------
  14. // headers and forward declarations
  15. // ----------------------------------------------------------------------------
  16. #include "wx/window.h"
  17. #include "wx/containr.h"
  18. class WXDLLIMPEXP_FWD_CORE wxControlContainer;
  19. extern WXDLLIMPEXP_DATA_CORE(const char) wxPanelNameStr[];
  20. // ----------------------------------------------------------------------------
  21. // wxPanel contains other controls and implements TAB traversal between them
  22. // ----------------------------------------------------------------------------
  23. class WXDLLIMPEXP_CORE wxPanelBase : public wxNavigationEnabled<wxWindow>
  24. {
  25. public:
  26. wxPanelBase() { }
  27. // Derived classes should also provide this constructor:
  28. /*
  29. wxPanelBase(wxWindow *parent,
  30. wxWindowID winid = wxID_ANY,
  31. const wxPoint& pos = wxDefaultPosition,
  32. const wxSize& size = wxDefaultSize,
  33. long style = wxTAB_TRAVERSAL | wxNO_BORDER,
  34. const wxString& name = wxPanelNameStr);
  35. */
  36. // Pseudo ctor
  37. bool Create(wxWindow *parent,
  38. wxWindowID winid = wxID_ANY,
  39. const wxPoint& pos = wxDefaultPosition,
  40. const wxSize& size = wxDefaultSize,
  41. long style = wxTAB_TRAVERSAL | wxNO_BORDER,
  42. const wxString& name = wxPanelNameStr);
  43. // implementation from now on
  44. // --------------------------
  45. virtual void InitDialog();
  46. private:
  47. wxDECLARE_NO_COPY_CLASS(wxPanelBase);
  48. };
  49. #if defined(__WXUNIVERSAL__)
  50. #include "wx/univ/panel.h"
  51. #elif defined(__WXMSW__)
  52. #include "wx/msw/panel.h"
  53. #else
  54. #define wxHAS_GENERIC_PANEL
  55. #include "wx/generic/panelg.h"
  56. #endif
  57. #endif // _WX_PANELH_BASE_