X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d157d59786f32c4c094300450df99c0243e5e61..f40f8e17226c2080dec017e2043fe59e2d21e15b:/interface/wx/frame.h diff --git a/interface/wx/frame.h b/interface/wx/frame.h index 04de46ed7a..9fda5c534e 100644 --- a/interface/wx/frame.h +++ b/interface/wx/frame.h @@ -3,9 +3,17 @@ // Purpose: interface of wxFrame // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +/** + Frame specific styles +*/ +#define wxFRAME_NO_TASKBAR 0x0002 // No taskbar button (MSW only) +#define wxFRAME_TOOL_WINDOW 0x0004 // No taskbar button, no system menu +#define wxFRAME_FLOAT_ON_PARENT 0x0008 // Always above its parent + + /** @class wxFrame @@ -43,44 +51,54 @@ @style{wxICONIZE} Display the frame iconized (minimized). Windows only. @style{wxCAPTION} - Puts a caption on the frame. + Puts a caption on the frame. Notice that this flag is required by + wxMINIMIZE_BOX, wxMAXIMIZE_BOX and wxCLOSE_BOX on most systems as + the corresponding buttons cannot be shown if the window has no title + bar at all. I.e. if wxCAPTION is not specified those styles would be + simply ignored. @style{wxMINIMIZE} Identical to wxICONIZE. Windows only. @style{wxMINIMIZE_BOX} Displays a minimize box on the frame. @style{wxMAXIMIZE} - Displays the frame maximized. Windows only. + Displays the frame maximized. Windows and GTK+ only. @style{wxMAXIMIZE_BOX} - Displays a maximize box on the frame. + Displays a maximize box on the frame. Notice that under wxGTK + wxRESIZE_BORDER must be used as well or this style is ignored. @style{wxCLOSE_BOX} Displays a close box on the frame. @style{wxSTAY_ON_TOP} Stay on top of all other windows, see also wxFRAME_FLOAT_ON_PARENT. @style{wxSYSTEM_MENU} - Displays a system menu. + Displays a system menu containing the list of various windows + commands in the window title bar. Unlike wxMINIMIZE_BOX, + wxMAXIMIZE_BOX and wxCLOSE_BOX styles this style can be used without + wxCAPTION, at least under Windows, and makes the system menu + available without showing it on screen in this case. However it is + recommended to only use it together with wxCAPTION for consistent + behaviour under all platforms. @style{wxRESIZE_BORDER} - Displays a resizeable border around the window. + Displays a resizable border around the window. @style{wxFRAME_TOOL_WINDOW} - Causes a frame with a small titlebar to be created; the frame does + Causes a frame with a small title bar to be created; the frame does not appear in the taskbar under Windows or GTK+. @style{wxFRAME_NO_TASKBAR} Creates an otherwise normal frame but it does not appear in the taskbar under Windows or GTK+ (note that it will minimize to the desktop window under Windows which may seem strange to the users and thus it might be better to use this style only without - wxMINIMIZE_BOX style). In wxGTK, the flag is respected only if GTK+ - is at least version 2.2 and the window manager supports - _NET_WM_STATE_SKIP_TASKBAR hint. Has no effect under other platforms. + wxMINIMIZE_BOX style). In wxGTK, the flag is respected only if the + window manager supports _NET_WM_STATE_SKIP_TASKBAR hint. @style{wxFRAME_FLOAT_ON_PARENT} The frame will always be on top of its parent (unlike wxSTAY_ON_TOP). A frame created with this style must have a non-@NULL parent. @style{wxFRAME_SHAPED} - Windows with this style are allowed to have their shape changed + Windows with this style are allowed to have their shape changed with the SetShape() method. @endStyleTable - The default frame style is for normal, resizeable frames. - To create a frame which can not be resized by user, you may use the following + The default frame style is for normal, resizable frames. + To create a frame which cannot be resized by user, you may use the following combination of styles: @code @@ -93,7 +111,7 @@ @style{wxFRAME_EX_CONTEXTHELP} Under Windows, puts a query button on the caption. When pressed, Windows will go into a context-sensitive help mode and wxWidgets - will send a wxEVT_HELP event if the user clicked on an application + will send a @c wxEVT_HELP event if the user clicked on an application window. Note that this is an extended style and must be set by calling SetExtraStyle before Create is called (two-step construction). You cannot use this style together with @@ -106,15 +124,27 @@ look. This is an extra style. @endExtraStyleTable - @beginEventTable{wxCloseEvent} + @beginEventEmissionTable @event{EVT_CLOSE(func)} - The frame is being closed by the user or programmatically (see wxWindow::Close). + Process a @c wxEVT_CLOSE_WINDOW event when the frame is being + closed by the user or programmatically (see wxWindow::Close). The user may generate this event clicking the close button (typically the 'X' on the top-right of the title bar) if it's present - (see the @c wxCLOSE_BOX style). + (see the @c wxCLOSE_BOX style). See wxCloseEvent. + @event{EVT_ICONIZE(func)} + Process a @c wxEVT_ICONIZE event. See wxIconizeEvent. + @event{EVT_MENU_OPEN(func)} + A menu is about to be opened. See wxMenuEvent. + @event{EVT_MENU_CLOSE(func)} + A menu has been just closed. See wxMenuEvent. + @event{EVT_MENU_HIGHLIGHT(id, func)} + The menu item with the specified id has been highlighted: used to show + help prompts in the status bar by wxFrame. See wxMenuEvent. + @event{EVT_MENU_HIGHLIGHT_ALL(func)} + A menu item has been highlighted, i.e. the currently selected menu item has changed. + See wxMenuEvent. @endEventTable - @library{wxcore} @category{managedwnd} @@ -165,6 +195,8 @@ public: /** Destructor. Destroys all child windows and menu bar if present. + + See @ref overview_windowdeletion for more info. */ virtual ~wxFrame(); @@ -209,9 +241,9 @@ public: @see SetStatusText(), OnCreateStatusBar(), GetStatusBar() */ - virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE, + virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID id = 0, - const wxString& name = wxStatusLineNameStr); + const wxString& name = wxStatusBarNameStr); /** Creates a toolbar at the top or left of the frame. @@ -360,6 +392,9 @@ public: /** Associates a status bar with the frame. + If @a statusBar is @NULL, then the status bar, if present, is detached from + the frame, but @e not deleted. + @see CreateStatusBar(), wxStatusBar, GetStatusBar() */ virtual void SetStatusBar(wxStatusBar* statusBar); @@ -399,6 +434,10 @@ public: @remarks The widths of the variable fields are calculated from the total width of all fields, minus the sum of widths of the non-variable fields, divided by the number of variable fields. + + @beginWxPerlOnly + In wxPerl this method takes the field widths as parameters. + @endWxPerlOnly */ virtual void SetStatusWidths(int n, const int* widths_field); @@ -406,5 +445,10 @@ public: Associates a toolbar with the frame. */ virtual void SetToolBar(wxToolBar* toolBar); + + + void PushStatusText(const wxString &text, int number = 0); + void PopStatusText(int number = 0); + };