]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/frame.h
fab8f6c8a58aa6b5dd9e0e4bd0d8e44b07936786
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/frame.h
3 // Purpose: wxFrame class
4 // Author: William Osborne
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "frame.h"
19 class WXDLLEXPORT wxFrame
: public wxFrameBase
24 wxFrame(wxWindow
*parent
,
26 const wxString
& title
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxDEFAULT_FRAME_STYLE
,
30 const wxString
& name
= wxFrameNameStr
)
34 Create(parent
, id
, title
, pos
, size
, style
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxString
& title
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxDEFAULT_FRAME_STYLE
,
43 const wxString
& name
= wxFrameNameStr
);
47 // implement base class pure virtuals
48 virtual bool ShowFullScreen(bool show
, long style
= wxFULLSCREEN_ALL
);
51 // implementation only from now on
52 // -------------------------------
55 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
56 void OnPaint(wxPaintEvent
& event
);
60 virtual wxToolBar
* CreateToolBar(long style
= -1,
62 const wxString
& name
= wxToolBarNameStr
);
64 virtual void PositionToolBar();
65 #endif // wxUSE_TOOLBAR
69 virtual wxStatusBar
* OnCreateStatusBar(int number
= 1,
70 long style
= wxST_SIZEGRIP
,
72 const wxString
& name
= wxStatusLineNameStr
);
74 virtual void PositionStatusBar();
76 // Hint to tell framework which status bar to use: the default is to use
77 // native one for the platforms which support it (Win32), the generic one
80 // TODO: should this go into a wxFrameworkSettings class perhaps?
81 static void UseNativeStatusBar(bool useNative
)
82 { m_useNativeStatusBar
= useNative
; };
83 static bool UsesNativeStatusBar()
84 { return m_useNativeStatusBar
; };
85 #endif // wxUSE_STATUSBAR
87 WXHMENU
GetWinMenu() const { return m_hMenu
; }
91 bool HandleSize(int x
, int y
, WXUINT flag
);
92 bool HandleCommand(WXWORD id
, WXWORD cmd
, WXHWND control
);
93 bool HandleMenuLoop(const wxEventType
& evtType
, WXWORD isPopup
);
97 WXHWND
GetToolTipCtrl() const { return m_hwndToolTip
; }
98 void SetToolTipCtrl(WXHWND hwndTT
) { m_hwndToolTip
= hwndTT
; }
101 // a MSW only function which sends a size event to the window using its
102 // current size - this has an effect of refreshing the window layout
103 virtual void SendSizeEvent();
105 virtual wxPoint
GetClientAreaOrigin() const;
107 #if wxUSE_MENUS_NATIVE
108 bool HandleMenuOpen();
109 bool HandleMenuSelect(int ItemID
);
110 #endif // wxUSE_MENUS_NATIVE
113 // common part of all ctors
116 // override base class virtuals
117 virtual void DoGetClientSize(int *width
, int *height
) const;
118 virtual void DoSetClientSize(int width
, int height
);
120 #if wxUSE_MENUS_NATIVE
121 // perform MSW-specific action when menubar is changed
122 virtual void AttachMenuBar(wxMenuBar
*menubar
);
124 // a plug in for MDI frame classes which need to do something special when
125 // the menubar is set
126 virtual void InternalSetMenuBar();
127 #endif // wxUSE_MENUS_NATIVE
129 // propagate our state change to all child frames
130 void IconizeChildFrames(bool bIconize
);
132 // we add menu bar accel processing
133 bool MSWTranslateMessage(WXMSG
* pMsg
);
135 // window proc for the frames
136 WXLRESULT
MSWWindowProc(WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
138 // handle WM_INITMENUPOPUP message
139 bool HandleInitMenuPopup(WXHMENU hMenu
);
141 virtual bool IsMDIChild() const { return FALSE
; }
143 // get default (wxWidgets) icon for the frame
144 virtual WXHICON
GetDefaultIcon() const;
147 static bool m_useNativeStatusBar
;
148 wxStatusBar
*StatusBar
;
149 #endif // wxUSE_STATUSBAR
151 // Data to save/restore when calling ShowFullScreen
152 int m_fsStatusBarFields
; // 0 for no status bar
153 int m_fsStatusBarHeight
;
154 int m_fsToolBarHeight
;
158 WXHWND m_hwndToolTip
;
161 // used by IconizeChildFrames(), see comments there
164 DECLARE_EVENT_TABLE()
165 DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame
)