frame.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/frame.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling, Julian Smart
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTK_FRAME_H_
  9. #define _WX_GTK_FRAME_H_
  10. //-----------------------------------------------------------------------------
  11. // wxFrame
  12. //-----------------------------------------------------------------------------
  13. class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
  14. {
  15. public:
  16. // construction
  17. wxFrame() { Init(); }
  18. wxFrame(wxWindow *parent,
  19. wxWindowID id,
  20. const wxString& title,
  21. const wxPoint& pos = wxDefaultPosition,
  22. const wxSize& size = wxDefaultSize,
  23. long style = wxDEFAULT_FRAME_STYLE,
  24. const wxString& name = wxFrameNameStr)
  25. {
  26. Init();
  27. Create(parent, id, title, pos, size, style, name);
  28. }
  29. bool Create(wxWindow *parent,
  30. wxWindowID id,
  31. const wxString& title,
  32. const wxPoint& pos = wxDefaultPosition,
  33. const wxSize& size = wxDefaultSize,
  34. long style = wxDEFAULT_FRAME_STYLE,
  35. const wxString& name = wxFrameNameStr);
  36. virtual ~wxFrame();
  37. #if wxUSE_STATUSBAR
  38. void SetStatusBar(wxStatusBar *statbar);
  39. #endif // wxUSE_STATUSBAR
  40. #if wxUSE_TOOLBAR
  41. void SetToolBar(wxToolBar *toolbar);
  42. #endif // wxUSE_TOOLBAR
  43. virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
  44. wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
  45. #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
  46. // in Hildon environment all frames are always shown maximized
  47. virtual bool IsMaximized() const { return true; }
  48. #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
  49. // implementation from now on
  50. // --------------------------
  51. virtual bool SendIdleEvents(wxIdleEvent& event);
  52. protected:
  53. // override wxWindow methods to take into account tool/menu/statusbars
  54. virtual void DoGetClientSize( int *width, int *height ) const;
  55. #if wxUSE_MENUS_NATIVE
  56. virtual void DetachMenuBar();
  57. virtual void AttachMenuBar(wxMenuBar *menubar);
  58. #endif // wxUSE_MENUS_NATIVE
  59. private:
  60. void Init();
  61. long m_fsSaveFlag;
  62. DECLARE_DYNAMIC_CLASS(wxFrame)
  63. };
  64. #endif // _WX_GTK_FRAME_H_