SCV  4.2.1
Simple Components for Visual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
scv::ToggleButton Class Reference

#include <ToggleButton.h>

Inheritance diagram for scv::ToggleButton:
scv::StateButton scv::Button scv::Label scv::Component scv::SCVCallbacks scv::ColorPicker::EyeDropper

Public Member Functions

 ToggleButton (const scv::Point &p1, const scv::Point &p2, bool state, const std::string &str)
 
 ToggleButton (const scv::Point &p1, unsigned int width, bool state, const std::string &str)
 
 ToggleButton (const scv::Point &p1, bool state, const std::string &str)
 
virtual ~ToggleButton (void)
 
virtual void onValueChange (void)
 Callback called when the widget's state changes.
 
virtual void display (void)
 
- Public Member Functions inherited from scv::StateButton
 StateButton (bool state)
 
bool getState (void) const
 
void setState (bool state)
 
void registerButtonGroup (ButtonGroup *buttonGroup)
 Registers the widget in a button group.
 
- Public Member Functions inherited from scv::Button
 Button (const scv::Point &p1, const scv::Point &p2, const std::string &str)
 
 Button (const scv::Point &p, unsigned int width, const std::string &str)
 
 Button (const scv::Point &p, const std::string &str)
 
virtual ~Button (void)
 
- Public Member Functions inherited from scv::Label
 Label (const scv::Point &p1, const scv::Point &p2, const std::string &str)
 
 Label (const scv::Point &p, unsigned int width, const std::string &str)
 
 Label (const scv::Point &p, const std::string &str)
 
virtual void onStringChange (void)
 
const std::string & getString (void) const
 
virtual void setString (const std::string &str)
 
virtual void setWidth (int width)
 
virtual void setHeight (int height)
 
- Public Member Functions inherited from scv::Component
 Component (const scv::Point &p1, const scv::Point &p2)
 
virtual ~Component (void)
 
virtual Point getRelativePosition (void) const
 
virtual void setRelativePosition (const Point &position)
 
virtual Point getAbsolutePosition (void) const
 
virtual void setAbsolutePosition (const Point &position)
 
virtual int getWidth (void) const
 
virtual int getHeight (void) const
 
virtual Point getSize (void) const
 
virtual void setSize (int width, int height)
 
virtual void setMinimumSize (const scv::Point &size)
 
virtual Point getMinimumSize (void) const
 
virtual void setPreferredSize (const scv::Point &size)
 
virtual Point getPreferredSize (void) const
 
virtual void setMaximumSize (const scv::Point &size)
 
virtual Point getMaximumSize (void) const
 
virtual bool isOvered (void) const
 
virtual bool isHolded (void) const
 
virtual bool isDragging (void) const
 
virtual bool isResizing (void) const
 
virtual bool isFocused (void) const
 
virtual void setDraggable (bool state)
 
virtual bool isDraggable (void) const
 
virtual void setResizable (bool state)
 
virtual bool isResizable (void) const
 
virtual void setVisible (bool state)
 
virtual bool isVisible (void) const
 
ContextMenugetContextMenu (void) const
 
virtual void registerContextMenu (ContextMenu *contextMenu)
 
virtual void unregisterContextMenu (void)
 
virtual bool isInside (const Point &evtPosition) const
 
virtual bool getCallbacksStatus (void) const
 
virtual void setCallbacksStatus (bool state)
 
virtual Scissor::Info getParentScissor (void) const
 
virtual Scissor::Info getScissor (void) const
 
virtual void processKey (const scv::KeyEvent &evt)
 
Type getType (void)
 
void setType (Type type)
 
void setParent (Component *parent)
 
ComponentgetParent (void) const
 
const Component::ListgetChildren (void) const
 
virtual void addChild (Component *object)
 
virtual void removeChild (Component *object)
 
virtual void removeAllChild (void)
 
virtual ComponentgetChild (int index) const
 
void pullChildToTop (Component *child)
 
bool hasChild (Component *child) const
 
- Public Member Functions inherited from scv::SCVCallbacks
virtual ~SCVCallbacks ()
 
virtual void onMouseClick (const scv::MouseEvent &evt)
 
virtual void onMouseHold (const scv::MouseEvent &evt)
 
virtual void onMouseOver (const scv::MouseEvent &evt)
 
virtual void onMouseUp (const scv::MouseEvent &evt)
 
virtual void onMouseWheel (const scv::MouseEvent &evt)
 
virtual void onKeyPressed (const scv::KeyEvent &evt)
 
virtual void onKeyUp (const scv::KeyEvent &evt)
 
virtual void onSizeChange (void)
 
virtual void onPositionChange (void)
 

Protected Member Functions

void processMouse (const scv::MouseEvent &evt)
 
- Protected Member Functions inherited from scv::Button
void createTexture (void)
 
- Protected Member Functions inherited from scv::Label
void createTexture (void)
 
- Protected Member Functions inherited from scv::Component
void setResizingCursor (void)
 
bool isInsideSide (Component::Side side, const Point &evtPosition)
 

Additional Inherited Members

- Public Types inherited from scv::Component
enum  Type {
  NONE, PANEL, COLORPICKER, PROGRESSBAR,
  SCROLL, SLIDER, SPINNER, BUTTON,
  CHECKBOX, RADIOBUTTON, TOGGLEBUTTON, TEXTFIELD,
  TEXTBOX, SEPARATOR, WINDOW, MENUBAR,
  TABBEDPANE, SCROLLCOMPONENT, IMAGE, TABLE,
  COMBOBOX, CANVAS, TREEVIEW, LABEL,
  CONTEXTMENU, GENERICTREE, NOFWIDGETS
}
 
typedef std::list< Component * > List
 
- Public Attributes inherited from scv::Component
Component::List _children
 
- Protected Types inherited from scv::Component
enum  Side { LEFT, RIGHT, TOP, BOTTOM }
 
- Protected Attributes inherited from scv::Label
ComponentTexture_cTexture
 
std::string _str
 
- Static Protected Attributes inherited from scv::Component
static const int s_mouseBacklash = 4
 

Constructor & Destructor Documentation

scv::ToggleButton::ToggleButton ( const scv::Point p1,
const scv::Point p2,
bool  state,
const std::string &  str 
)
scv::ToggleButton::ToggleButton ( const scv::Point p1,
unsigned int  width,
bool  state,
const std::string &  str 
)
scv::ToggleButton::ToggleButton ( const scv::Point p1,
bool  state,
const std::string &  str 
)
scv::ToggleButton::~ToggleButton ( void  )
virtual

Member Function Documentation

void scv::ToggleButton::display ( void  )
virtual

Reimplemented from scv::Button.

void scv::ToggleButton::onValueChange ( void  )
virtual

Callback called when the widget's state changes.

Note
Called even when setState(bool) sets the state to the same value as before.

Implements scv::StateButton.

void scv::ToggleButton::processMouse ( const scv::MouseEvent evt)
protectedvirtual

Reimplemented from scv::Component.


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