hollyhock
Public Types | Public Member Functions | List of all members
GUIButton Class Reference
Inheritance diagram for GUIButton:
Inheritance graph
[legend]
Collaboration diagram for GUIButton:
Collaboration graph
[legend]

Public Types

enum  Flag : int { FlagEnabled = 1 << 15 }
 

Public Member Functions

 GUIButton (uint16_t leftX, uint16_t topY, uint16_t rightX, uint16_t bottomY, const char *text, uint16_t eventID)
 
 GUIButton (uint16_t leftX, uint16_t topY, uint16_t rightX, uint16_t bottomY, const char *text, uint16_t eventID, int flags)
 
- Public Member Functions inherited from Wrapped
template<typename T >
T * GetWrapped ()
 

Additional Inherited Members

- Protected Member Functions inherited from Wrapped
 Wrapped (Wrapped const &)=delete
 
void operator= (Wrapped const &)=delete
 
- Protected Attributes inherited from Wrapped
void * m_wrapped
 A pointer to the wrapped class.
 

Member Enumeration Documentation

◆ Flag

enum GUIButton::Flag : int
Enumerator
FlagEnabled 

Allows the button to be pressed.

Constructor & Destructor Documentation

◆ GUIButton() [1/2]

GUIButton::GUIButton ( uint16_t  leftX,
uint16_t  topY,
uint16_t  rightX,
uint16_t  bottomY,
const char *  text,
uint16_t  eventID 
)

Creates a button.

The event.type value which arises when the button is pressed is not the value passed in the eventType parameter. You must use the GetEventType method to convert the eventType parameter passed in here to the event.type value. 0 is not a valid value for the eventType parameter.

Parameters
leftX,topY,rightX,bottomYThe coordinates of the bounding box of the button, in screen pixels relative to the top left of the display.
[in]textThe text to display on the button.
eventIDThe ID to use for events relating to this button.

◆ GUIButton() [2/2]

GUIButton::GUIButton ( uint16_t  leftX,
uint16_t  topY,
uint16_t  rightX,
uint16_t  bottomY,
const char *  text,
uint16_t  eventID,
int  flags 
)

Creates a button.

The event.type value which arises when the button is pressed is not the value passed in the eventType parameter. You must use the GetEventType method to convert the eventType parameter passed in here to the event.type value. 0 is not a valid value for the eventType parameter.

Parameters
leftX,topY,rightX,bottomYThe coordinates of the bounding box of the button, in screen pixels relative to the top left of the display.
[in]textThe text to display on the button.
eventIDThe ID to use for events relating to this button.
flagsA bitfield of flags specified by bitwise-ORing members of the Flag enum.

The documentation for this class was generated from the following files: