]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/frame.h
4cb7f953c86a8a48536b6546ddddf009e6d26b07
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/frame.h
3 // Purpose: wxFrame class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MOTIF_FRAME_H_
13 #define _WX_MOTIF_FRAME_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "frame.h"
19 class WXDLLEXPORT wxFrame
: public wxFrameBase
23 wxFrame(wxWindow
*parent
,
25 const wxString
& title
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
28 long style
= wxDEFAULT_FRAME_STYLE
,
29 const wxString
& name
= wxFrameNameStr
)
33 Create(parent
, id
, title
, pos
, size
, style
, name
);
36 bool Create(wxWindow
*parent
,
38 const wxString
& title
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
41 long style
= wxDEFAULT_FRAME_STYLE
,
42 const wxString
& name
= wxFrameNameStr
);
46 virtual bool Show(bool show
= TRUE
);
49 void SetMenuBar(wxMenuBar
*menu_bar
);
52 void SetTitle(const wxString
& title
);
55 virtual void SetIcon(const wxIcon
& icon
);
56 virtual void SetIcons(const wxIconBundle
& icons
);
59 virtual void PositionStatusBar();
60 #endif // wxUSE_STATUSBAR
64 virtual wxToolBar
* CreateToolBar(long style
= -1,
66 const wxString
& name
= wxToolBarNameStr
);
67 virtual void SetToolBar(wxToolBar
*toolbar
);
68 virtual void PositionToolBar();
69 #endif // wxUSE_TOOLBAR
71 // Implementation only from now on
72 // -------------------------------
74 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
75 void OnActivate(wxActivateEvent
& event
);
77 virtual void ChangeFont(bool keepOriginalSize
= TRUE
);
78 virtual void ChangeBackgroundColour();
79 virtual void ChangeForegroundColour();
80 WXWidget
GetMenuBarWidget() const;
81 WXWidget
GetShellWidget() const { return m_frameShell
; }
82 WXWidget
GetWorkAreaWidget() const { return m_workArea
; }
83 WXWidget
GetClientAreaWidget() const { return m_clientArea
; }
84 WXWidget
GetTopWidget() const { return m_frameShell
; }
86 virtual WXWidget
GetMainWidget() const { return m_mainWidget
; }
88 // The widget that can have children on it
89 WXWidget
GetClientWidget() const;
90 bool GetVisibleStatus() const { return m_visibleStatus
; }
91 void SetVisibleStatus( bool status
) { m_visibleStatus
= status
; }
98 virtual void DoGetClientSize(int *width
, int *height
) const;
100 // common part of all ctors
103 // set a single icon for the frame
104 void DoSetIcon( const wxIcon
& icon
);
107 WXWidget m_frameShell
;
109 WXWidget m_clientArea
;
110 bool m_visibleStatus
;
113 virtual void DoGetSize(int *width
, int *height
) const;
114 virtual void DoSetSize(int x
, int y
,
115 int width
, int height
,
116 int sizeFlags
= wxSIZE_AUTO
);
117 virtual void DoSetClientSize(int width
, int height
);
120 virtual bool DoCreate( wxWindow
* parent
, wxWindowID id
,
121 const wxString
& title
,
125 const wxString
& name
);
126 virtual void DoDestroy();
128 DECLARE_EVENT_TABLE()
129 DECLARE_DYNAMIC_CLASS(wxFrame
)
133 // _WX_MOTIF_FRAME_H_