]>
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
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MOTIF_FRAME_H_
12 #define _WX_MOTIF_FRAME_H_
14 class WXDLLIMPEXP_CORE wxFrame
: public wxFrameBase
18 wxFrame(wxWindow
*parent
,
20 const wxString
& title
,
21 const wxPoint
& pos
= wxDefaultPosition
,
22 const wxSize
& size
= wxDefaultSize
,
23 long style
= wxDEFAULT_FRAME_STYLE
,
24 const wxString
& name
= wxFrameNameStr
)
28 Create(parent
, id
, title
, pos
, size
, style
, name
);
31 bool Create(wxWindow
*parent
,
33 const wxString
& title
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
36 long style
= wxDEFAULT_FRAME_STYLE
,
37 const wxString
& name
= wxFrameNameStr
);
41 virtual bool Show(bool show
= true);
44 void SetMenuBar(wxMenuBar
*menu_bar
);
47 void SetTitle(const wxString
& title
);
50 virtual void SetIcons(const wxIconBundle
& icons
);
53 virtual void PositionStatusBar();
54 #endif // wxUSE_STATUSBAR
58 virtual wxToolBar
* CreateToolBar(long style
= -1,
59 wxWindowID id
= wxID_ANY
,
60 const wxString
& name
= wxToolBarNameStr
);
61 virtual void SetToolBar(wxToolBar
*toolbar
);
62 virtual void PositionToolBar();
63 #endif // wxUSE_TOOLBAR
65 // Implementation only from now on
66 // -------------------------------
68 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
69 void OnActivate(wxActivateEvent
& event
);
71 virtual void ChangeFont(bool keepOriginalSize
= true);
72 virtual void ChangeBackgroundColour();
73 virtual void ChangeForegroundColour();
74 WXWidget
GetMenuBarWidget() const;
75 WXWidget
GetShellWidget() const { return m_frameShell
; }
76 WXWidget
GetWorkAreaWidget() const { return m_workArea
; }
77 WXWidget
GetClientAreaWidget() const { return m_clientArea
; }
78 WXWidget
GetTopWidget() const { return m_frameShell
; }
80 virtual WXWidget
GetMainWidget() const { return m_mainWidget
; }
82 // The widget that can have children on it
83 WXWidget
GetClientWidget() const;
84 bool GetVisibleStatus() const { return m_visibleStatus
; }
85 void SetVisibleStatus( bool status
) { m_visibleStatus
= status
; }
90 virtual void DoGetClientSize(int *width
, int *height
) const;
93 // common part of all ctors
96 // set a single icon for the frame
97 void DoSetIcon( const wxIcon
& icon
);
100 WXWidget m_frameShell
;
102 WXWidget m_clientArea
;
103 bool m_visibleStatus
;
106 virtual void DoGetSize(int *width
, int *height
) const;
107 virtual void DoSetSize(int x
, int y
,
108 int width
, int height
,
109 int sizeFlags
= wxSIZE_AUTO
);
110 virtual void DoSetClientSize(int width
, int height
);
113 virtual bool XmDoCreateTLW(wxWindow
* parent
,
115 const wxString
& title
,
119 const wxString
& name
);
123 DECLARE_EVENT_TABLE()
124 DECLARE_DYNAMIC_CLASS(wxFrame
)
127 #endif // _WX_MOTIF_FRAME_H_