X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1be7a35c5ec31b6cfcab9d969c7969586441a945..c00fed0ef4d70c9b45d9b8405f636d30eadb7ea6:/include/wx/toplevel.h diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index b52ae52b79..b1b2f3c7fd 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -177,6 +177,11 @@ public: virtual void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0; #endif // __SMARTPHONE__ + // centre the window on screen: this is just a shortcut + void CentreOnScreen(int dir = wxBOTH) { DoCentre(dir | wxCENTRE_ON_SCREEN); } + void CenterOnScreen(int dir = wxBOTH) { CentreOnScreen(dir); } + + // implementation only from now on // ------------------------------- @@ -216,6 +221,10 @@ protected: virtual void DoClientToScreen(int *x, int *y) const; virtual void DoScreenToClient(int *x, int *y) const; + // add support for wxCENTRE_ON_SCREEN + virtual void DoCentre(int dir); + + // 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