1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        wx/gtk1/frame.h 
   4 // Author:      Robert Roebling 
   6 // Copyright:   (c) 1998 Robert Roebling, Julian Smart 
   7 // Licence:     wxWindows licence 
   8 ///////////////////////////////////////////////////////////////////////////// 
  13 //----------------------------------------------------------------------------- 
  15 //----------------------------------------------------------------------------- 
  17 class WXDLLIMPEXP_CORE wxMDIChildFrame
; 
  18 class WXDLLIMPEXP_CORE wxMDIClientWindow
; 
  19 class WXDLLIMPEXP_CORE wxMenu
; 
  20 class WXDLLIMPEXP_CORE wxMenuBar
; 
  21 class WXDLLIMPEXP_CORE wxToolBar
; 
  22 class WXDLLIMPEXP_CORE wxStatusBar
; 
  24 //----------------------------------------------------------------------------- 
  26 //----------------------------------------------------------------------------- 
  28 class WXDLLIMPEXP_CORE wxFrame 
: public wxFrameBase
 
  33     wxFrame(wxWindow 
*parent
, 
  35                const wxString
& title
, 
  36                const wxPoint
& pos 
= wxDefaultPosition
, 
  37                const wxSize
& size 
= wxDefaultSize
, 
  38                long style 
= wxDEFAULT_FRAME_STYLE
, 
  39                const wxString
& name 
= wxFrameNameStr
) 
  43         Create(parent
, id
, title
, pos
, size
, style
, name
); 
  46     bool Create(wxWindow 
*parent
, 
  48                 const wxString
& title
, 
  49                 const wxPoint
& pos 
= wxDefaultPosition
, 
  50                 const wxSize
& size 
= wxDefaultSize
, 
  51                 long style 
= wxDEFAULT_FRAME_STYLE
, 
  52                 const wxString
& name 
= wxFrameNameStr
); 
  57     virtual void PositionStatusBar(); 
  59     virtual wxStatusBar
* CreateStatusBar(int number 
= 1, 
  60                                          long style 
= wxST_SIZEGRIP
|wxFULL_REPAINT_ON_RESIZE
, 
  62                                          const wxString
& name 
= wxStatusLineNameStr
); 
  64     void SetStatusBar(wxStatusBar 
*statbar
); 
  65 #endif // wxUSE_STATUSBAR 
  68     virtual wxToolBar
* CreateToolBar(long style 
= -1, 
  70                                      const wxString
& name 
= wxToolBarNameStr
); 
  71     void SetToolBar(wxToolBar 
*toolbar
); 
  72 #endif // wxUSE_TOOLBAR 
  74     wxPoint 
GetClientAreaOrigin() const { return wxPoint(0, 0); } 
  76     // implementation from now on 
  77     // -------------------------- 
  80     virtual void GtkOnSize( int x
, int y
, int width
, int height 
); 
  81     virtual void OnInternalIdle(); 
  83     bool          m_menuBarDetached
; 
  85     bool          m_toolBarDetached
; 
  88     // common part of all ctors 
  91     // override wxWindow methods to take into account tool/menu/statusbars 
  92     virtual void DoSetClientSize(int width
, int height
); 
  93     virtual void DoGetClientSize( int *width
, int *height 
) const; 
  95 #if wxUSE_MENUS_NATIVE 
  97     virtual void DetachMenuBar(); 
  98     virtual void AttachMenuBar(wxMenuBar 
*menubar
); 
 101     // Menu size is dynamic now, call this whenever it might change. 
 102     void UpdateMenuBarSize(); 
 104 #endif // wxUSE_MENUS_NATIVE 
 106     DECLARE_DYNAMIC_CLASS(wxFrame
) 
 109 #endif // __GTKFRAMEH__