Websites Navigation:
Airbit
|
Shop
|
m-shell.net
Languages:
EN
|
DE
Home
Download
Products
Make SIS
Documentation
Forum
Blog
Contact
Index
Module abgui
Class abgui.ImageButton
is
abgui.Image
is
abguibase.Widget
A button showing an image and calling its listeners when clicked.
Constructor
function init(pathOrIcon=null, align=HCENTER|VCENTER)
Overrides
abgui.Image.init()
Initialize a new image button.
Parameters:
pathOrIcon
– either a path to an icon file, or an icon loaded via graph.icon. null if the icon cannot be set yet.
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
()
An ImageButton is focusable.
handled
(event)
Handle keystrokes and clicking via the pointer.
removeListener
(l)
Remove a listener.
function focusable()
Overrides
abguibase.Widget.focusable()
An ImageButton 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.Image.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