wxWindow

wxWindow
wxWindow is a very well used class. Most controls are derived from wxWindow, so you should remember that anything that can be done to a window can be done to an object derived from wxWindow. The parameters for creating a wxWindow are:

An object of class wxWindow must have a parent. Therefore, you cannot create an object of class wxWindow to be your top level window. Your top level window should be either of type wxFrame or wxDialog. In fact, you should probably rarely create an object using wxWindow. See wxPanel.

Functions/Procedures
Supertopics
Subtopics

wxWindow

[proc]
capture_mouse
( atom window )

Category: wxWindow

This forces a mouse to keep the position it had when it left a window. If you call this while the cursor is in the 'double-arrow stance, it will keep that. However, if it has the normal arrow position when it is called, it will make the cursor turn into a wait stance while it is over the specified window.


wxWindow

[proc]
center_on_parent
( atom win, integer direction )

Category: wxWindow

Centers the window on its parent. direction can be wxHORIZONTAL, wxVERTICAL or wxBOTH.


wxWindow

[proc]
close_window
( atom win, atom force )

Category: wxWindow

Calls the close handler for the window, providing an opportunity for the window to choose whether to destroy the window. Usually it is only used with the top level windows (wxFrame and wxDialog classes) as the others are not supposed to have any special OnClose() logic. The close handler should check whether the window is being deleted forcibly, using can_veto, in which case it should destroy the window.

Note that calling Close does not guarantee that the window will be destroyed; but it provides a way to simulate a manual close of a window, which may or may not be implemented by destroying the window. The default implementation of wxDialog::OnCloseWindow does not necessarily delete the dialog, since it will simply simulate an wxID_CANCEL event which is handled by the appropriate button event handler and may do anything at all.

To guarantee that the window will be destroyed, call destroy instead


wxWindow

[func]
get_client_size
( atom this )

Category: wxWindow

This returns the size of this in a sequence of {x,y}. This can be any wx class that is graphical ( i.e., not wxFontData or wxArrayString. )


wxWindow

[func]
get_id
( atom this )

Category: wxWindow

Returns the id for objects that are derived from class wxWindow. This includes frames, windows and most controls, but does not include menu items. You should use get_menuitem_id() for that.


wxWindow

[func]
get_top_level_parent
( atom window )

Category: wxWindow

Returns the first top level parent of the given window, or in other words, the frame or dialog containing it, or NULL.


wxWindow

[func]
get_window_scroll_position
( atom window, atom orient )

Category: wxWindow

Returns the built-in scrollbar position.

orient is either wxVERTICAL or wxHORIZONTAL


wxWindow

[func]
get_window_sizer
( atom wnd )

Category: wxWindow

Return the sizer associated with the window by a previous call to set_sizer() or NULL.


wxWindow

[func]
get_window_style
( atom win )

Category: wxWindow

Returns the style flag for the specified window.


wxWindow

[proc]
refresh_window
( object params )

Category: wxWindow

Forces a wxWindow to repaint itself. params can take one of several forms:


wxWindow

[proc]
release_mouse
( atom window )

Category: wxWindow

This releases the mouse position after capture_mouse has been called.


wxWindow

[proc]
set_back_color
( atom window, atom color )

Category: wxWindow


wxWindow

[proc]
set_fore_color
( atom window, atom color )

Category: wxWindow


wxWindow

[proc]
set_title
( atom window, sequence title )

Category: wxWindow

This resets the title of a wxFrame and allows you to put whatever you want in it's place. You can use set_icon to change the icon beside of it.


wxWindow

[proc]
set_window_style
( atom win, atom style )

Category: wxWindow

Set the style for the specified window.


wxWindow

[proc]
show_popup_menu
( atom win, atom menu, integer x, integer y )

Category: wxWindow

Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usually. If the coordinates are not specified, the current mouse cursor position is used.