Websites Navigation:
Airbit
|
Shop
|
m-shell.net
Languages:
EN
|
DE
Home
Downloads
Products
Make SIS
Documentation
Forum
Blog
Contact
Index
Module abgui
Class abgui.Button
is
abgui.Label
is
abguibase.Widget
Known direct subclasses:
abgui.RadioButton
A button showing text and calling its listeners when clicked.
Constructor
function init(text=, align=LEFT|VCENTER)
Overrides
abgui.Label.init()
Initialize a new button.
Parameters:
text
– the text to show in the button.
align
– the horizontal and vertical alignment flags.
Fields
clickedBg
The background for the clicked state.
listeners
The listeners
normalBg
The background for the normal state.
Functions
addListener
(l)
Add a listener.
doClick
()
Perform a button click, i.e. notify the listeners.
draw
()
Draw the button.
focusable
()
A Button is focusable.
handled
(event)
Handle keystrokes and clicking via the pointer.
removeListener
(l)
Remove a listener.
function focusable()
Overrides
abguibase.Widget.focusable()
A Button is focusable.
Returns:
true
function addListener(l)
Add a listener. This must be a function reference or an instance function reference, taking the argument (this).
Parameters:
l
– the listener to add.
function removeListener(l)
Remove a listener.
Parameters:
l
– the listener to remove.
function doClick()
Perform a button click, i.e. notify the listeners.
function draw()
Overrides
abgui.Label.draw()
Draw the button.
function handled(event)
Overrides
abguibase.Widget.handled()
Handle keystrokes and clicking via the pointer.
Parameters:
event
– the event.
Returns:
true if the event was handled.
mShell Home
>
Documentation
> mdoc