X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a183ec70940e5ecddd4d5a0ea13ccdd43cc015b5..71abf17edb285a2a028b473e723cd52f79d1fb29:/interface/wx/toplevel.h?ds=inline diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h index bb8bdea42f..0d6294021a 100644 --- a/interface/wx/toplevel.h +++ b/interface/wx/toplevel.h @@ -34,6 +34,14 @@ enum wxFULLSCREEN_NOCAPTION }; +#define wxDEFAULT_FRAME_STYLE (wxSYSTEM_MENU | \ + wxRESIZE_BORDER | \ + wxMINIMIZE_BOX | \ + wxMAXIMIZE_BOX | \ + wxCLOSE_BOX | \ + wxCAPTION | \ + wxCLIP_CHILDREN) + /** @class wxTopLevelWindow @@ -46,7 +54,7 @@ enum internal top level window list. @beginEventEmissionTable - @event{EVT_ACTIVATE(id, func)} + @event{EVT_MAXIMIZE(id, func)} Process a @c wxEVT_MAXIMIZE event. See wxMaximizeEvent. @event{EVT_MOVE(func)} Process a @c wxEVT_MOVE event, which is generated when a window is moved. @@ -68,7 +76,7 @@ enum @see wxDialog, wxFrame */ -class wxTopLevelWindow : public wxWindow +class wxTopLevelWindow : public wxNonOwnedWindow { public: /** @@ -80,7 +88,7 @@ public: Constructor creating the top level window. */ wxTopLevelWindow(wxWindow *parent, - wxWindowID winid, + wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -117,7 +125,7 @@ public: /** A synonym for CentreOnScreen(). */ - void CenterOnScreen(int direction); + void CenterOnScreen(int direction = wxBOTH); /** Centres the window on screen. @@ -262,6 +270,33 @@ public: */ virtual void Maximize(bool maximize = true); + /** + MSW-specific function for accessing the system menu. + + Returns a wxMenu pointer representing the system menu of the window + under MSW. The returned wxMenu may be used, if non-@c NULL, to add + extra items to the system menu. The usual @c wxEVT_COMMAND_MENU_SELECTED + events (that can be processed using @c EVT_MENU event table macro) will + then be generated for them. All the other wxMenu methods may be used as + well but notice that they won't allow you to access any standard system + menu items (e.g. they can't be deleted or modified in any way + currently). + + Notice that because of the native system limitations the identifiers of + the items added to the system menu must be multiples of 16, otherwise + no events will be generated for them. + + The returned pointer must @em not be deleted, it is owned by the window + and will be only deleted when the window itself is destroyed. + + This function is not available in the other ports by design, any + occurrences of it in the portable code must be guarded by + @code #ifdef __WXMSW__ @endcode preprocessor guards. + + @since 2.9.3 + */ + wxMenu *MSWGetSystemMenu() const; + /** Use a system-dependent way to attract users attention to the window when it is in background. @@ -288,6 +323,11 @@ public: */ wxWindow* SetDefaultItem(wxWindow* win); + + wxWindow* SetTmpDefaultItem(wxWindow * win); + wxWindow* GetTmpDefaultItem() const; + + /** Sets the icon for this window. @@ -366,15 +406,6 @@ public: const wxString& label = wxEmptyString, wxMenu* subMenu = NULL); - /** - If the platform supports it, sets the shape of the window to that - depicted by @a region. The system will not display or respond to any - mouse event for the pixels that lie outside of the region. To reset the - window to the normal rectangular shape simply call SetShape() again with - an empty wxRegion. Returns @true if the operation is successful. - */ - virtual bool SetShape(const wxRegion& region); - /** Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), no @@ -440,7 +471,7 @@ public: @param alpha Determines how opaque or transparent the window will be, if the - platform supports the opreration. A value of 0 sets the window to be + platform supports the operation. A value of 0 sets the window to be fully transparent, and a value of 255 sets the window to be fully opaque. */ @@ -472,6 +503,27 @@ public: */ virtual bool OSXIsModified() const; + /** + Sets the file name represented by this wxTopLevelWindow. + + Under OS X, this file name is used to set the "proxy icon", which + appears in the window title bar near its title, corresponding to this + file name. Under other platforms it currently doesn't do anything but + it is harmless to call it now and it might be implemented to do + something useful in the future so you're encouraged to use it for any + window representing a file-based document. + + @since 2.9.4 + */ + virtual void SetRepresentedFilename(const wxString& filename); + + /** + Show the wxTopLevelWindow, but do not give it keyboard focus. This can be + used for pop up or notification windows that should not steal the current + focus. + */ + virtual void ShowWithoutActivating(); + /** Depending on the value of @a show parameter the window is either shown full screen or restored to its normal state. @a style is a bit list