ZeroZero Game Engine  v0.0
A 3D game engine using Vulkan & Jolt
Public Types | Public Member Functions | List of all members
CheckWidget Class Reference

Detailed Description

Super class for all two-states widgets

Inheritance diagram for CheckWidget:
Widget Object ToggleButton

Public Types

enum  State { CHECK, UNCHECK }
 State of the widget. Change on user action. More...
 
- Public Types inherited from Widget
enum  Type {
  WIDGET, PANEL, BOX, LINE,
  FRAME, BUTTON, TOGGLEBUTTON, TEXT,
  TEXTEDIT, SCROLLBAR, TREEVIEW, IMAGE
}
 Widget type. More...
 
enum  AlignmentType { ,
  FILL, CENTER, HCENTER, VCENTER,
  TOP, BOTTOM, LEFT, RIGHT,
  TOPCENTER, BOTTOMCENTER, LEFTCENTER, RIGHTCENTER,
  TOPLEFT, BOTTOMLEFT, BOTTOMRIGHT, TOPRIGHT,
  LEFTTOP, LEFTBOTTOM, RIGHTBOTTOM, RIGHTTOP
}
 Widget placement (relative to the parent widget) More...
 

Public Member Functions

State getState () const
 Return current state of the widget.
 
virtual void setState (State S)
 Change the state of the widget.
 
- Public Member Functions inherited from Widget
 Widget (Type=WIDGET)
 
Type getType () const
 
bool isVisible () const
 
void show (bool=true)
 
bool isEnabled () const
 
void enable (bool isEnabled=true)
 
void setPos (float x, float y)
 
float getWidth () const
 
float getHeight () const
 
virtual void setSize (float width, float height)
 
const RectgetRect () const
 
void setRect (float x, float y, float width, float height)
 
void setRect (const Rect &)
 
AlignmentType getAlignment () const
 
void setAlignment (AlignmentType)
 
FontgetFont ()
 
void setFont (const shared_ptr< Font > &)
 
bool isFocused () const
 
Widget * getParent () const
 
template<typename T >
shared_ptr< T > add (shared_ptr< T > child, const AlignmentType alignment, const string &resource="", const bool overlap=false)
 
virtual void remove (const shared_ptr< Widget > &child)
 
virtual void removeAll ()
 
void setPadding (float)
 
float getPadding () const
 
bool isDrawBackground () const
 
void setDrawBackground (bool drawBackground)
 
void refresh () const
 
void setResource (shared_ptr< Resource >)
 
uint32_t getGroupIndex () const
 
void setGroupIndex (int32_t)
 
void * getUserData () const
 
void setUserData (void *)
 
float getTransparency () const
 
void setTransparency (float alpha)
 
- Public Member Functions inherited from Object
void connect (const Signal::signal &name, const Signal::Handler &handler)
 
void connect (const Signal::signal &name, const function< void ()> &handler)
 
void emit (const Signal::signal &name, void *params=nullptr)
 
virtual string toString () const
 

Member Enumeration Documentation

enum State

State of the widget. Change on user action.

Enum ValuesDocumentation
CHECK 

Checked (aka ON)

UNCHECK 

Unchecked (aka OFF)