]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/frame.h
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_
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
);
53 wxString
GetTitle() const { return m_title
; }
56 virtual void SetIcon(const wxIcon
& icon
);
57 virtual void SetIcons(const wxIconBundle
& icons
);
60 virtual void PositionStatusBar();
61 #endif // wxUSE_STATUSBAR
65 virtual wxToolBar
* CreateToolBar(long style
= wxNO_BORDER
|wxTB_HORIZONTAL
, wxWindowID id
= -1, const wxString
& name
= wxToolBarNameStr
);
66 virtual void PositionToolBar();
67 #endif // wxUSE_TOOLBAR
70 virtual void Iconize(bool iconize
);
72 virtual bool IsIconized() const;
74 // Is the frame maximized? Returns FALSE under Motif (but TRUE for
75 // wxMDIChildFrame due to the tabbed implementation).
76 virtual bool IsMaximized() const;
78 virtual void Maximize(bool maximize
);
83 virtual void Restore();
85 // Implementation only from now on
86 // -------------------------------
88 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
89 void OnActivate(wxActivateEvent
& event
);
91 virtual void ChangeFont(bool keepOriginalSize
= TRUE
);
92 virtual void ChangeBackgroundColour();
93 virtual void ChangeForegroundColour();
94 WXWidget
GetMenuBarWidget() const;
95 WXWidget
GetShellWidget() const { return m_frameShell
; }
96 WXWidget
GetWorkAreaWidget() const { return m_workArea
; }
97 WXWidget
GetClientAreaWidget() const { return m_clientArea
; }
98 WXWidget
GetTopWidget() const { return m_frameShell
; }
100 virtual WXWidget
GetMainWidget() const { return m_frameWidget
; }
102 // The widget that can have children on it
103 WXWidget
GetClientWidget() const;
104 bool GetVisibleStatus() const { return m_visibleStatus
; }
109 // common part of all ctors
112 // set a single icon for the frame
113 void DoSetIcon( const wxIcon
& icon
);
116 WXWidget m_frameShell
;
117 WXWidget m_frameWidget
;
119 WXWidget m_clientArea
;
121 bool m_visibleStatus
;
124 virtual void DoGetClientSize(int *width
, int *height
) const;
125 virtual void DoGetSize(int *width
, int *height
) const;
126 virtual void DoGetPosition(int *x
, int *y
) const;
127 virtual void DoSetSize(int x
, int y
,
128 int width
, int height
,
129 int sizeFlags
= wxSIZE_AUTO
);
130 virtual void DoSetClientSize(int width
, int height
);
133 DECLARE_EVENT_TABLE()
134 DECLARE_DYNAMIC_CLASS(wxFrame
)
138 // _WX_MOTIF_FRAME_H_