wxTopLevelWindow is a common base class for wxDialog and wxFrame. It is an abstract base class meaning that you never work with objects of this class directly, but all of its methods are also applicable for the two classes above.
Note that the instances of wxTopLevelWindow are managed by wxWidgets in the internal top level window list.
wxWidgets docs: wxTopLevelWindow
getIcon(This) -> wxIcon:wxIcon()
getIcons(This) -> wxIconBundle:wxIconBundle()
getTitle(This) -> unicode:charlist()
Gets a string containing the window title.
isActive(This) -> boolean()
Returns true if this window is currently active, i.e. if the user is currently working with it.
iconize(This) -> ok
iconize(This, Options :: [Option]) -> ok
Iconizes or restores the window.
Note that in wxGTK the change to the window state is not immediate, i.e. isIconized/1 will typically return false right after a call to iconize/2 and its return value will only change after the control flow returns to the event loop and the notification about the window being really iconized is received.
isFullScreen(This) -> boolean()
Returns true if the window is in fullscreen mode.
isIconized(This) -> boolean()
Returns true if the window is iconized.
isMaximized(This) -> boolean()
Returns true if the window is maximized.
maximize(This) -> ok
maximize(This, Options :: [Option]) -> ok
requestUserAttention(This) -> ok
requestUserAttention(This, Options :: [Option]) -> ok
Use a system-dependent way to attract users attention to the window when it is in background.
flags may have the value of either ?wxUSER_ATTENTION_INFO (default) or ?wxUSER_ATTENTION_ERROR which results in a more drastic action. When in doubt, use the default value.
Note: This function should normally be only used when the application is not already in foreground.
This function is currently implemented for Win32 where it flashes the window icon in the taskbar, and for wxGTK with task bars supporting it.
setIcon(This, Icon) -> ok
setIcons(This, Icons) -> ok
Sets several icons of different sizes for this window: this allows using different icons for different situations (e.g.
task switching bar, taskbar, window title bar) instead of scaling, with possibly bad looking results, the only icon set by setIcon/2.
Note: In wxMSW, icons must contain a 16x16 or 32x32 icon, preferably both.
centerOnScreen(This) -> ok
centreOnScreen(This) -> ok
centerOnScreen(This, Options :: [Option]) -> ok
centreOnScreen(This, Options :: [Option]) -> ok
Centres the window on screen.
setShape(This, Region) -> boolean()
If the platform supports it, sets the shape of the window to that depicted by 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/2 again with an empty wxRegion. Returns true if the operation is successful.
This method is available in this class only since wxWidgets 2.9.3, previous versions only provided it in wxTopLevelWindow.
Note that windows with non default shape have a fixed size and can't be resized using wxWindow:setSize/6.
setTitle(This, Title) -> ok
Sets the window title.
showFullScreen(This, Show) -> boolean()
showFullScreen(This, Show, Options :: [Option]) -> boolean()
Depending on the value of show parameter the window is either shown full screen or restored to its normal state.
style is a bit list containing some or all of the following values, which indicate what elements of the window to hide in full-screen mode:
This function has not been tested with MDI frames.
Note: Showing a window full screen also actually wxWindow:show/2s the window if it isn't shown.
See: EnableFullScreenView() (not implemented in wx), isFullScreen/1