+
+ // Set the shape of the window to the given region.
+ // Returns true if the platform supports this feature (and the
+ // operation is successful.)
+ virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return false; }
+
+ // Attracts the users attention to this window if the application is
+ // inactive (should be called when a background event occurs)
+ virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
+
+ // Is this the active frame (highlighted in the taskbar)?
+ virtual bool IsActive()
+ { return (wxGetTopLevelParent(FindFocus()) == this); }
+
+#if defined(__SMARTPHONE__)
+ virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0;
+ virtual void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0;
+#endif // __SMARTPHONE__
+
+ // implementation only from now on
+ // -------------------------------
+
+ // override some base class virtuals
+ virtual bool Destroy();
+ virtual bool IsTopLevel() const { return true; }
+ virtual wxSize GetMaxSize() const;
+ virtual bool ProvidesBackground() const { return true; }
+
+ // event handlers
+ void OnCloseWindow(wxCloseEvent& event);
+ void OnSize(wxSizeEvent& WXUNUSED(event)) { DoLayout(); }
+
+ // Get rect to be used to center top-level children
+ virtual void GetRectForTopLevelChildren(int *x, int *y, int *w, int *h);
+
+ // this should go away, but for now it's called from docview.cpp,
+ // so should be there for all platforms
+ void OnActivate(wxActivateEvent &WXUNUSED(event)) { }
+
+ // do the window-specific processing after processing the update event
+ virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
+
+protected:
+ // the frame client to screen translation should take account of the
+ // toolbar which may shift the origin of the client area
+ virtual void DoClientToScreen(int *x, int *y) const;
+ virtual void DoScreenToClient(int *x, int *y) const;
+
+ // test whether this window makes part of the frame
+ // (menubar, toolbar and statusbar are excluded from automatic layout)
+ 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)
+ bool IsLastBeforeExit() const;
+
+ // send the iconize event, return true if processed
+ bool SendIconizeEvent(bool iconized = true);
+
+ // do TLW-specific layout: we resize our unique child to fill the entire
+ // client area
+ void DoLayout();
+
+ // Get the default size for the new window if no explicit size given. If
+ // there are better default sizes then these can be changed, just as long
+ // as they are not too small for TLWs (and not larger than screen).
+ static wxSize GetDefaultSize();
+ static int WidthDefault(int w) { return w == wxDefaultCoord ? GetDefaultSize().x : w; }
+ static int HeightDefault(int h) { return h == wxDefaultCoord ? GetDefaultSize().y : h; }
+
+ // the frame icon
+ wxIconBundle m_icons;
+
+ DECLARE_NO_COPY_CLASS(wxTopLevelWindowBase)
+ DECLARE_EVENT_TABLE()