#define wxTINY_CAPTION_VERT 0x0080
#define wxRESIZE_BORDER 0x0040
-// deprecated versions defined for compatibility reasons
-#define wxRESIZE_BOX wxMAXIMIZE_BOX
-#define wxTHICK_FRAME wxRESIZE_BORDER
+#if WXWIN_COMPATIBILITY_2_6
-// obsolete styles, unused any more
-#define wxDIALOG_MODAL 0
-#define wxDIALOG_MODELESS 0
-#define wxNO_3D 0
-#define wxUSER_COLOURS 0
+ // deprecated versions defined for compatibility reasons
+ #define wxRESIZE_BOX wxMAXIMIZE_BOX
+ #define wxTHICK_FRAME wxRESIZE_BORDER
+
+ // obsolete styles, unused any more
+ #define wxDIALOG_MODAL 0
+ #define wxDIALOG_MODELESS 0
+ #define wxNO_3D 0
+ #define wxUSER_COLOURS 0
+
+#endif // WXWIN_COMPATIBILITY_2_6
// default style
//
// return true if the frame is maximized
virtual bool IsMaximized() const = 0;
+ // return true if the frame is always maximized
+ // due to native guidelines or current policy
+ virtual bool IsAlwaysMaximized() const;
+
// return true if the frame is iconized
virtual bool IsIconized() const = 0;
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
// Is this the active frame (highlighted in the taskbar)?
- virtual bool IsActive()
- { return (wxGetTopLevelParent(FindFocus()) == this); }
+ virtual bool IsActive() { return wxGetTopLevelParent(FindFocus()) == this; }
+
+ // this function may be overridden to return false to allow closing the
+ // application even when this top level window is still open
+ //
+ // notice that the window is still closed prior to the application exit and
+ // so it can still veto it even if it returns false from here
+ virtual bool ShouldPreventAppExit() const { return true; }
+
#if defined(__SMARTPHONE__)
virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0;
// coordinates: this is already the case
virtual void DoGetScreenPosition(int *x, int *y) const
{
- return DoGetPosition(x, y);
+ DoGetPosition(x, y);
}
// test whether this window makes part of the frame
virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const
{ return false; }
- // check if we should exit the program after deleting this top level
- // window (this is used in common dtor and wxMSW code)
+ // check if we should exit the program after deleting this window
bool IsLastBeforeExit() const;
// send the iconize event, return true if processed