.TH wxTopLevelWindow 3erl "wx 2.4" "wxWidgets team." "Erlang Module Definition" .SH NAME wxTopLevelWindow \- Functions for wxTopLevelWindow class .SH DESCRIPTION .LP \fIwxTopLevelWindow\fR\& is a common base class for \fIwxDialog\fR\& and \fIwxFrame\fR\&\&. 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\&. .LP Note that the instances of \fIwxTopLevelWindow\fR\& are managed by wxWidgets in the internal top level window list\&. .LP See: \fIwxDialog\fR\&, \fIwxFrame\fR\& .LP This class is derived (and can use functions) from: \fIwxWindow\fR\& \fIwxEvtHandler\fR\& .LP wxWidgets docs: wxTopLevelWindow .SH "EVENTS" .LP Event types emitted from this class: \fImaximize\fR\&, \fImove\fR\&, \fIshow\fR\& .SH DATA TYPES .nf \fBwxTopLevelWindow()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B getIcon(This) -> wxIcon:wxIcon() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .RS .LP Returns the standard icon of the window\&. .LP The icon will be invalid if it hadn\&'t been previously set by \fIsetIcon/2\fR\&\&. .LP See: \fIgetIcons/1\fR\& .RE .LP .nf .B getIcons(This) -> wxIconBundle:wxIconBundle() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .RS .LP Returns all icons associated with the window, there will be none of them if neither \fIsetIcon/2\fR\& nor \fIsetIcons/2\fR\& had been called before\&. .LP Use \fIgetIcon/1\fR\& to get the main icon of the window\&. .LP See: \fIwxIconBundle\fR\& .RE .LP .nf .B getTitle(This) -> unicode:charlist() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .RS .LP Gets a string containing the window title\&. .LP See: \fIsetTitle/2\fR\& .RE .LP .nf .B isActive(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .RS .LP Returns true if this window is currently active, i\&.e\&. if the user is currently working with it\&. .RE .LP .nf .B iconize(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .LP .nf .B iconize(This, Options :: [Option]) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Option = {iconize, boolean()} .br .RE .RE .RS .LP Iconizes or restores the window\&. .LP Note that in wxGTK the change to the window state is not immediate, i\&.e\&. \fIisIconized/1\fR\& will typically return false right after a call to \fIiconize/2\fR\& 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\&. .LP See: \fIisIconized/1\fR\&, \fIRestore()\fR\& (not implemented in wx), (), \fIwxIconizeEvent\fR\& .RE .LP .nf .B isFullScreen(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .RS .LP Returns true if the window is in fullscreen mode\&. .LP See: \fIshowFullScreen/3\fR\& .RE .LP .nf .B isIconized(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .RS .LP Returns true if the window is iconized\&. .RE .LP .nf .B isMaximized(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .RS .LP Returns true if the window is maximized\&. .RE .LP .nf .B maximize(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .LP .nf .B maximize(This, Options :: [Option]) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Option = {maximize, boolean()} .br .RE .RE .RS .LP Maximizes or restores the window\&. .LP Note that, just as with \fIiconize/2\fR\&, the change to the window state is not immediate in at least wxGTK port\&. .LP See: \fIRestore()\fR\& (not implemented in wx), \fIiconize/2\fR\& .RE .LP .nf .B requestUserAttention(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .LP .nf .B requestUserAttention(This, Options :: [Option]) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Option = {flags, integer()} .br .RE .RE .RS .LP Use a system-dependent way to attract users attention to the window when it is in background\&. .LP \fIflags\fR\& may have the value of either \fI?wxUSER_ATTENTION_INFO\fR\& (default) or \fI?wxUSER_ATTENTION_ERROR\fR\& which results in a more drastic action\&. When in doubt, use the default value\&. .LP Note: This function should normally be only used when the application is not already in foreground\&. .LP This function is currently implemented for Win32 where it flashes the window icon in the taskbar, and for wxGTK with task bars supporting it\&. .RE .LP .nf .B setIcon(This, Icon) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Icon = wxIcon:wxIcon() .br .RE .RE .RS .LP Sets the icon for this window\&. .LP Remark: The window takes a \&'copy\&' of \fIicon\fR\&, but since it uses reference counting, the copy is very quick\&. It is safe to delete \fIicon\fR\& after calling this function\&. .LP Note: In wxMSW, \fIicon\fR\& must be either 16x16 or 32x32 icon\&. .LP See: \fIwxIcon\fR\&, \fIsetIcons/2\fR\& .RE .LP .nf .B setIcons(This, Icons) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Icons = wxIconBundle:wxIconBundle() .br .RE .RE .RS .LP Sets several icons of different sizes for this window: this allows using different icons for different situations (e\&.g\&. .LP task switching bar, taskbar, window title bar) instead of scaling, with possibly bad looking results, the only icon set by \fIsetIcon/2\fR\&\&. .LP Note: In wxMSW, \fIicons\fR\& must contain a 16x16 or 32x32 icon, preferably both\&. .LP See: \fIwxIconBundle\fR\& .RE .LP .nf .B centerOnScreen(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .LP .nf .B centreOnScreen(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br .RE .RE .LP .nf .B centerOnScreen(This, Options :: [Option]) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Option = {dir, integer()} .br .RE .RE .RS .LP See: \fIcentreOnScreen/2\fR\&\&. .RE .LP .nf .B centreOnScreen(This, Options :: [Option]) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Option = {dir, integer()} .br .RE .RE .RS .LP Centres the window on screen\&. .LP See: \fIwxWindow:centreOnParent/2\fR\& .RE .LP .nf .B setShape(This, Region) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Region = wxRegion:wxRegion() | wxGraphicsPath:wxGraphicsPath() .br .RE .RE .RS .LP If the platform supports it, sets the shape of the window to that depicted by \fIregion\fR\&\&. .LP 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 \fIsetShape/2\fR\& again with an empty \fIwxRegion\fR\&\&. Returns true if the operation is successful\&. .LP This method is available in this class only since wxWidgets 2\&.9\&.3, previous versions only provided it in \fIwxTopLevelWindow\fR\&\&. .LP Note that windows with non default shape have a fixed size and can\&'t be resized using \fIwxWindow:setSize/6\fR\&\&. .RE .LP .nf .B setTitle(This, Title) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Title = unicode:chardata() .br .RE .RE .RS .LP Sets the window title\&. .LP See: \fIgetTitle/1\fR\& .RE .LP .nf .B showFullScreen(This, Show) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Show = boolean() .br .RE .RE .LP .nf .B showFullScreen(This, Show, Options :: [Option]) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxTopLevelWindow() .br Show = boolean() .br Option = {style, integer()} .br .RE .RE .RS .LP Depending on the value of \fIshow\fR\& parameter the window is either shown full screen or restored to its normal state\&. .LP \fIstyle\fR\& 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: .LP This function has not been tested with MDI frames\&. .LP Note: Showing a window full screen also actually \fIwxWindow:show/2\fR\&s the window if it isn\&'t shown\&. .LP See: \fIEnableFullScreenView()\fR\& (not implemented in wx), \fIisFullScreen/1\fR\& .RE