]>
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 SetIcon(const wxIcon
& icon
);
52 virtual void SetIcons(const wxIconBundle
& icons
);
55 virtual void PositionStatusBar();
56 #endif // wxUSE_STATUSBAR
60 virtual wxToolBar
* CreateToolBar(long style
= -1,
61 wxWindowID id
= wxID_ANY
,
62 const wxString
& name
= wxToolBarNameStr
);
63 virtual void SetToolBar(wxToolBar
*toolbar
);
64 virtual void PositionToolBar();
65 #endif // wxUSE_TOOLBAR
67 // Implementation only from now on
68 // -------------------------------
70 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
71 void OnActivate(wxActivateEvent
& event
);
73 virtual void ChangeFont(bool keepOriginalSize
= true);
74 virtual void ChangeBackgroundColour();
75 virtual void ChangeForegroundColour();
76 WXWidget
GetMenuBarWidget() const;
77 WXWidget
GetShellWidget() const { return m_frameShell
; }
78 WXWidget
GetWorkAreaWidget() const { return m_workArea
; }
79 WXWidget
GetClientAreaWidget() const { return m_clientArea
; }
80 WXWidget
GetTopWidget() const { return m_frameShell
; }
82 virtual WXWidget
GetMainWidget() const { return m_mainWidget
; }
84 // The widget that can have children on it
85 WXWidget
GetClientWidget() const;
86 bool GetVisibleStatus() const { return m_visibleStatus
; }
87 void SetVisibleStatus( bool status
) { m_visibleStatus
= status
; }
94 virtual void DoGetClientSize(int *width
, int *height
) const;
96 // common part of all ctors
99 // set a single icon for the frame
100 void DoSetIcon( const wxIcon
& icon
);
103 WXWidget m_frameShell
;
105 WXWidget m_clientArea
;
106 bool m_visibleStatus
;
109 virtual void DoGetSize(int *width
, int *height
) const;
110 virtual void DoSetSize(int x
, int y
,
111 int width
, int height
,
112 int sizeFlags
= wxSIZE_AUTO
);
113 virtual void DoSetClientSize(int width
, int height
);
116 virtual bool XmDoCreateTLW(wxWindow
* parent
,
118 const wxString
& title
,
122 const wxString
& name
);
126 DECLARE_EVENT_TABLE()
127 DECLARE_DYNAMIC_CLASS(wxFrame
)
130 #endif // _WX_MOTIF_FRAME_H_