FloatingButtonCollection
ReferencesUtility class for storing and maintaining collections of floating buttons. You don't technically need this class but it's a lot easier than doing all the maintenance/bookkeeping yourself.
Properties
Names
#Enumerate over all button names. This method ignores those buttons which are in states FloatingState.Closing or FloatingState.Closed.
Indexers
this[]
#Gets a specific button by name. This accessor will throw if the name is not recognized.
Returns: Button associated with name.
Methods
Add
#Add a fixed button to this collection.
public void Add()
position,
Position, may not be FloatingPosition.Anchored.
name,
Name of button.
info = null,
Info text for button.
Color?
colour = null,
Fill colour of button.
icon = null,
Icon of button.
click = null,
Event handler for clicks.
mouseDown = null,
Mouse down handler.
mouseUp = null
Mouse up handler.
AddAnchored
#Add an anchored button to this collection.
public void AddAnchored()
PointF
anchor,
Location of button.
name,
Name of button.
info = null,
Info text for button.
Color?
colour = null,
Fill colour of button.
icon = null,
Icon of button.
click = null,
Event handler for clicks.
mouseDown = null,
Mouse down handler.
mouseUp = null
Mouse up handler.
FindByPoint
#Try and retrieve a button underneath a specific point.
public FloatingButton FindByPoint()
PointF
point
Point in control coordinates (NOT! content coordinates).
Returns: Button underneath point.
ModifyAnchor
#Assign a new anchor to a button.
ModifyIcon
#Assign a new icon to a button.
ModifyInfo
#Change the Info field on a button.
StateCount
#Count the number of buttons in a specific state.
Returns: Number of buttons currently in that state.