A frame is a window containing text, canvas or panel subwindows. It normally has decorations added by the window manager, such as a system menu, a thick frame, and resize handles. When a wxWindows or wxCLIPS application initializes, a top-level frame must be returned to the system for successful start-up. When a top-level frame and all its children are deleted, the application terminates.
Usually an application will need to register an OnClose handler in case the window manager sends the application a close message. If the handler returns 1, the frame is deleted by the system (possibly terminating the application).
The user can register the following callbacks:
See also window-add-callback.
frame-create
frame-create-status-line
frame-iconize
frame-is-iconized
frame-on-size
frame-set-menu-bar
frame-set-tool-bar
frame-set-icon
frame-set-status-text
frame-set-title
long ( frame-create long parent-id string title
optional long x optional long y
optional long width optional long height optional string style optional string name)
Creates a frame. parent-id can be zero or a valid frame ID; title should be a string for the frame's title.
The style parameter may be a combination of the following, using the bitwise 'or' operator.
wxICONIZE | Display the frame iconized (minimized) (Windows only). |
wxCAPTION | Puts a caption on the frame (under XView and Motif this is mandatory). |
wxDEFAULT_FRAME | Defined as a combination of wxMINIMIZE_BOX, wxMAXIMIZE_BOX, wxTHICK_FRAME, wxSYSTEM_MENU, and wxCAPTION. |
wxMDI_CHILD | Specifies a Windows MDI (multiple document interface) child frame. |
wxMDI_PARENT | Specifies a Windows MDI (multiple document interface) parent frame. |
wxMINIMIZE | Identical to wxICONIZE. |
wxMINIMIZE_BOX | Displays a minimize box on the frame (Windows only). |
wxMAXIMIZE | Displays the frame maximized (Windows only). |
wxMAXIMIZE_BOX | Displays a maximize box on the frame (Windows only). |
wxSDI | Specifies a normal SDI (single document interface) frame. |
wxSTAY_ON_TOP | Stay on top of other windows (Windows only). |
wxSYSTEM_MENU | Displays a system menu (manadatory under XView and Motif). |
wxTHICK_FRAME | Displays a thick frame around the window (manadatory under XView and Motif). |
name gives the frame a name that can be retrieved with window-get-name.
The function window-show must be called before a new frame is visible.
long ( frame-create-status-line long parent-id, optional long n=1)
Creates a status line at the bottom of the frame. Use frame-set-status-text to write to the status line.
n is a number from 1 to 5 for the number of status areas to create.
long ( frame-iconize long frame-id optional long minimize)
Minimize the frame if the second argument is 1 or absent, restore the frame otherwise.
long ( frame-is-iconized long frame-id)
Returns 1 if the frame is iconized (minimized), 0 otherwise.
long ( frame-on-size long frame-id long width long height)
Performs default processing for the OnSize event. Can be called from within an OnSize callback.
long ( frame-set-menu-bar long frame-id long menu-bar-id)
Associate a menu bar with the frame. See menu bar.
long ( frame-set-tool-bar long frame-id long tool-bar)
Informs an MDI parent window that a panel or canvas should be treated as a toolbar, and sized accordingly. Windows only.
long ( frame-set-icon long frame-id long icon-id)
Set the icon of a frame. See icon.
long ( frame-set-status-text long frame-id string text, optional long i=0)
Sets the text for the status line (previously created with frame-create-status-line).
i is a number from 0 to 4 for the number of the status area to write to.
long ( frame-set-title long frame-id string text)
Set the title of a frame.