win.closeButtonWindow - WIN

Class closeButtonWindow
Inherits from buttonWindow.

The closeButtonWindow class provides a button control window with a single character label of the theme's close_btn character value. Its colors are initialized from the theme but may be customized after creation. A frame_close event is sent to the parent window when it is left clicked/touched/enter key pressed while active.

To create a closeButtonWindow use it's new method:
local btn = win.closeButtonWindow:new (parent, x, y)


Properties

none       

Methods

See also API Reference, WIN.

win.closeButtonWindow:constructor

btn closeButtonWindow:constructor (parent, x, y)

Constructs and returns the instantiated close button window.

Parameters
parent window Parent window, typically a frame.
x number Parent relative x position.
y number Parent relative y position.

Returns
btn closeButtonWindow The instantiated close button window.

Remarks


top


win.closeButtonWindow:on_left_click

result closeButtonWindow:on_left_click (x, y, count)

Calls the base window implementation and sends a frame_close event to the parent window.

Parameters
x number Window relative x position.
y number Window relative y position.
count
number The number of times this same position was repeatedly clicked, with each successive click within the double_click_time.

Returns
result boolean Result from base call.

Remarks
See window:on_left_click.


top


win.closeButtonWindow:on_touch

result closeButtonWindow:on_touch (x, y)

Calls the base window implementation and sends a frame_close event to the parent window.

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

Returns
result boolean Result from base call.

Remarks
See window:on_touch.


top


See also API Reference, WIN.