private.parentFrame - WIN

Class parentFrame
Inherits from window.

The parentFrame class provides a base frame level object, and is locally defined in the win API. Its colors are initialized from the theme but may be customized after creation. The frame is initially set to not accept input focus (the frame window itself, a child window may).

Properties

pFrame__continue_modal
boolean Modal state indicator.
pFrame__focused_wnd
window The child window that is input active.
pFrame__modal_result
boolean Modal state result.

Methods

See also API Reference, WIN.

private.parentFrame:constructor

frame parentFrame:constructor (desktop, id, x, y, width, height)

Constructs and returns the instantiated frame window.

Parameters
desktop desktopWindow Parent window in window hierarchy. Always the respective desktop window.
id number Numeric id value for the frame window.
x number Parent relative x position.
y number Parent relative y position.
width number Width of the frame window.
height number Height of the frame window.

Returns
frame parentFrame The instantiated frame window object.

Remarks


top


private.parentFrame:create_popup

frame parentFrame:create_popup (width, height)

Creates and returns a popupFrame window of the size given, setting it as this parentFrame's current popup.

Parameters
width number Width of the popup.
height number Height of the popup.

Returns
frame popupFrame Created popup frame, or nil on failure.

Remarks
This method fails and returns nil if this parentFrame currently has a popup.


top


private.parentFrame:end_modal

parentFrame:end_modal (result)

Forces parentFrame:run_modal to return, and leave modal state.

Parameters
result number The value parentFrame:run_modal will return.

Returns
none


Remarks


top


private.parentFrame:get_active_frame

frame parentFrame:get_active_frame ()

Returns the active frame. This will be itself or a popupFrame if one is active. If a popupFrame it is the top frame (the one that has none itself).

Parameters
none


Returns
frame parentFrame The active frame.

Remarks
See parentFrame:get_popup, parentFrame:get_owner.


top


private.parentFrame:get_owner

frame parentFrame:get_owner ()

Returns the parentFrame that owns this parentFrame, or itself if the parentFrame has no owner.

Parameters
none


Returns
frame parentFrame The owner frame.

Remarks
Together with parentFrame:get_popup, the owner frame provides a sibling relationship between 2 frames. A frame may have a current popupFrame which it owns.

See parentFrame:get_active_frame.


top


private.parentFrame:get_popup

frame parentFrame:get_popup ()

Returns the current popupFrame this parentFrame owns, or nil if none.

Parameters
none


Returns
frame popupFrame The current popup owned by this parent frame.

Remarks
Together with parentFrame:get_owner, the owner frame provides a sibling relationship between 2 frames. A frame may have a current popupFrame which it owns.

See also parentFrame:get_active_frame.


top


private.parentFrame:msgbox

parentFrame:msgbox (title, message, bgcolor)

Displays the message in an application msgBoxFrame, as this parentFrame's current popupFrame.

Parameters
title string Title bar text.
message string Message to display.
bgcolor number Background color of the message box, if nil the theme's popup_back color is used.

Returns
none


Remarks
The calling thread does not continue until the message box is dismissed, and the owner frame is disabled while displayed. The user can still switch between applications while displayed.


top


private.parentFrame:next_wnd

wnd parentFrame:next_wnd (child, focusable)

Returns the next child window in the z order of the parentFrame following the given child.

Parameters
child window The child window to search from. If nil the first suitable child is returned.
focusable boolean If true only child windows that are shown and enabled are returned.

Returns
wnd window The next child window or nil if none suitable found.

Remarks
See parentFrame:prior_wnd.


top


private.parentFrame:on_child_key

result parentFrame:on_child_key (child, key, ctrl, alt, shift)

Processes tab and shift+tab keys to navigate between child windows.

Parameters
child window Child window the event is for.
key number Key code.
ctrl boolean True if control key is depressed.
alt boolean True if alternate key is depressed.
shift boolean True if shift key is depressed.

Returns
result boolean True if handle, false if not.

Remarks
See window:on_child_key.


top


private.parentFrame:on_frame_activate

parentFrame:on_frame_activate (active)

Called when this frame is made active or inactive.

Parameters
active boolean True if made active, false if inactive.

Returns
none


Remarks
This base implementation does nothing.


top


private.parentFrame:prior_wnd

wnd parentFrame:prior_wnd (child, focusable)

Returns the prior child window in the z order of the parentFrame before the given child.

Parameters
child window The child window to search from. If nil the last suitable child is returned.
focusable boolean If true only child windows that are shown and enabled are returned.

Returns
wnd window The prior child window or nil if none suitable found.

Remarks
See parentFrame:next_wnd.


top


private.parentFrame:run_modal

result parentFrame:run_modal ()

Runs the frame in modal state. Events are routed from the system but this method does not return until parentFrame:end_modal is called.

Parameters
none


Returns
result number Value passed to parentFrame:end_modal.

Remarks


top


private.parentFrame:set_active_top_frame

result parentFrame:set_active_top_frame ()

Sets this parentFrame as the currently active top frame in the desktop. If this parentFrame currently owns a popupFrame, the popupFrame is made active on top of this frame.

Parameters
none


Returns
result boolean True if made the active top frame, false if not.

Remarks
See desktopWindow:set_active_frame.


top


private.parentFrame:set_focus_wnd

result parentFrame:set_focus_wnd (child)

Sets the child window as the currently active input window for this parentFrame.

Parameters
child window Child window to be set with input focus.

Returns
result boolean True is successful, false if not.

Remarks
If the child parameter is nil, the closest child window to the current is set as the focus window.

If this parentFrame is not the active top frame in the desktop the set child window receives input focus when it is brought to the top.

Use window:set_focus to set focus to a window.


top


See also API Reference, WIN.