]>
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_
15 class WXDLLEXPORT wxFrame
: public wxFrameBase
19 wxFrame(wxWindow
*parent
,
21 const wxString
& title
,
22 const wxPoint
& pos
= wxDefaultPosition
,
23 const wxSize
& size
= wxDefaultSize
,
24 long style
= wxDEFAULT_FRAME_STYLE
,
25 const wxString
& name
= wxFrameNameStr
)
29 Create(parent
, id
, title
, pos
, size
, style
, name
);
32 bool Create(wxWindow
*parent
,
34 const wxString
& title
,
35 const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
,
37 long style
= wxDEFAULT_FRAME_STYLE
,
38 const wxString
& name
= wxFrameNameStr
);
42 virtual bool Show(bool show
= true);
45 void SetMenuBar(wxMenuBar
*menu_bar
);
48 void SetTitle(const wxString
& title
);
51 virtual void SetIcons(const wxIconBundle
& icons
);
54 virtual void PositionStatusBar();
55 #endif // wxUSE_STATUSBAR
59 virtual wxToolBar
* CreateToolBar(long style
= -1,
60 wxWindowID id
= wxID_ANY
,
61 const wxString
& name
= wxToolBarNameStr
);
62 virtual void SetToolBar(wxToolBar
*toolbar
);
63 virtual void PositionToolBar();
64 #endif // wxUSE_TOOLBAR
66 // Implementation only from now on
67 // -------------------------------
69 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
70 void OnActivate(wxActivateEvent
& event
);
72 virtual void ChangeFont(bool keepOriginalSize
= true);
73 virtual void ChangeBackgroundColour();
74 virtual void ChangeForegroundColour();
75 WXWidget
GetMenuBarWidget() const;
76 WXWidget
GetShellWidget() const { return m_frameShell
; }
77 WXWidget
GetWorkAreaWidget() const { return m_workArea
; }
78 WXWidget
GetClientAreaWidget() const { return m_clientArea
; }
79 WXWidget
GetTopWidget() const { return m_frameShell
; }
81 virtual WXWidget
GetMainWidget() const { return m_mainWidget
; }
83 // The widget that can have children on it
84 WXWidget
GetClientWidget() const;
85 bool GetVisibleStatus() const { return m_visibleStatus
; }
86 void SetVisibleStatus( bool status
) { m_visibleStatus
= status
; }
93 virtual void DoGetClientSize(int *width
, int *height
) const;
95 // common part of all ctors
98 // set a single icon for the frame
99 void DoSetIcon( const wxIcon
& icon
);
102 WXWidget m_frameShell
;
104 WXWidget m_clientArea
;
105 bool m_visibleStatus
;
108 virtual void DoGetSize(int *width
, int *height
) const;
109 virtual void DoSetSize(int x
, int y
,
110 int width
, int height
,
111 int sizeFlags
= wxSIZE_AUTO
);
112 virtual void DoSetClientSize(int width
, int height
);
115 virtual bool XmDoCreateTLW(wxWindow
* parent
,
117 const wxString
& title
,
121 const wxString
& name
);
125 DECLARE_EVENT_TABLE()
126 DECLARE_DYNAMIC_CLASS(wxFrame
)
129 #endif // _WX_MOTIF_FRAME_H_