private.keyboardFrame - WIN

Class keyboardFrame
Inherits from applicationFrame.

The keyboardFrame class provides the keyboard overlay frame for monitors. It is privately defined in the win API. To invoke the on screen keyboard use the window:set_want_key_input method of the window requiring key input.

Properties

alt_state boolean Alternate key state.
cancel_color number Cancel key background color.
caps_state boolean Caps lock key state.
cmd_color number Command key background color.
ctrl_state boolean Control key state.
kb_bg_color number Keyboard background color.
kb_text_color number Key text color.
key_map
table
Reference to appropriate keyboard layout.
keys_left number Left position of key panel.
keys_top number Top position of key panel.
shift_state boolean Shift key state.
std_color number Standard key background color.
target_parent window Stores parent of target window.
target_parent_frame parentFrame
Stores parent frame of target window.
target_rect rect Stores target window size and placement.
target_wnd window Window to receive key input.
target_z number Stores z position of target window.
toggle_color number Toggled key background color.

Methods

See also API Reference, WIN.

private.keyboardFrame:alt_key_color

color keyboardFrame:alt_key_color ()

Returns the current background color for an alternate key.

Parameters
none


Returns
color number Alternate key color.

Remarks


top


private.keyboardFrame:cancel_key_color

color keyboardFrame:cancel_key_color ()

Returns the current background color for the cancel key.

Parameters
none


Returns
color number Cancel key color.

Remarks


top


private.keyboardFrame:caps_key_color

color keyboardFrame:caps_key_color ()

Returns the current background color for the caps lock key.

Parameters
none


Returns
color number Caps lock key color.

Remarks


top


private.keyboardFrame:cmd_key_color

color keyboardFrame:cmd_key_color ()

Returns the current background color for a command key.

Parameters
none


Returns
color number Command key color.

Remarks


top


private.keyboardFrame:constructor

frame keyboardFrame:constructor (dir, target_wnd)

Constructs and returns the instantiated home page frame window.

Parameters
dir string Desktop directory under /win/devices.
target_wnd window The window to receive key input from the on screen keyboard.

Returns
frame keyboardFrame The instantiated frame window.

Remarks


top


private.keyboardFrame:ctrl_key_color

color keyboardFrame:ctrl_key_color ()

Returns the current background color for a control key.

Parameters
none


Returns
color number Control key color.

Remarks


top


private.keyboardFrame:dismiss

keyboardFrame:dismiss ()

Dismisses the keyboard overlay by ending its modal state.

Parameters
none


Returns
none


Remarks


top


private.keyboardFrame:draw

keyboardFrame:draw (gdi, bounds)

Draws the keyboard overlay window.

Parameters
gdi GDI GDI object to use for drawing.
bounds rect Invalidated area of the window.

Returns
none


Remarks


top


private.keyboardFrame:get_key_def

def keyboardFrame:get_key_def (x, y)

Retrieves the key definition table for the key at the given position, or nil if none.

Parameters
x number Window relative x position.
y number Window relative y position.

Returns
def table Key definition (information) table.

Remarks


top


private.keyboardFrame:no_key_color

color keyboardFrame:no_key_color ()

Returns the background color of the keyboard..

Parameters
none


Returns
color number Keyboard color.

Remarks


top


private.keyboardFrame:on_create

result keyboardFrame:on_create ()

Adopts the target window and sets up the keyboard.

Parameters
none



Returns
result
boolean
Always true.

Remarks


top


private.keyboardFrame:on_event

result keyboardFrame:on_event (event, p1, p2, p3, p4, p5, ...)

Processes any events from the target window (the window receiving key input).

Parameters
event string The event type.
p1 any First parameter to event or nil if not used.
p2 any Second parameter to event or nil if not used.
p3 any Third parameter to event or nil if not used.
p4 any Fourth parameter to event or nil if not used.
p5 any Fifth parameter to event or nil if not used.
...
any Any additional parameters.

Returns
result boolean Always true.

Remarks
See window:on_event.


top


private.keyboardFrame:on_quit

result keyboardFrame:on_quit ()

Restores the target window back to it's original parent.

Parameters
none



Returns
result
boolean
Always false.

Remarks


top


private.keyboardFrame:on_resize

result keyboardFrame:on_resize ()

Resizes the frame and reconfigures the keyboard layout.

Parameters
none


Returns
result boolean Always true.

Remarks


top


private.keyboardFrame:on_touch

result keyboardFrame:on_touch (x, y)

Implements the keyboard's touch responses.

Parameters
x number Window relative x position.
y number Window relative y position.

Returns
result boolean Always true.

Remarks
See window:on_touch.


top


private.keyboardFrame:shift_key_color

color keyboardFrame:shift_key_color ()

Returns the current background color for a shift key.

Parameters
none


Returns
color number Shift key color.

Remarks


top


private.keyboardFrame:std_key_color

color keyboardFrame:std_key_color ()

Returns the current background color for a standard key.

Parameters
none


Returns
color number Standard key color.

Remarks


top


See also API Reference, WIN.