#include <SkWidgetViews.h>
Inherits SkWidgetView.
Public Types | |
enum | CheckState { kOff_CheckState, kOn_CheckState, kUnknown_CheckState } |
Public Member Functions | |
SkCheckButtonView () | |
CheckState | getCheckState () const |
void | setCheckState (CheckState) |
Static Public Member Functions | |
static bool | GetWidgetEventCheckState (const SkEvent &, CheckState *state) |
Protected Member Functions | |
virtual void | onCheckStateChange (CheckState oldState, CheckState newState) |
virtual void | onInflate (const SkDOM &dom, const SkDOM::Node *) |
virtual bool | onPrepareWidgetEvent (SkEvent *evt) |
Definition at line 124 of file SkWidgetViews.h.
kOff_CheckState |
inflate: check-state="off" |
kOn_CheckState |
inflate: check-state="on" |
kUnknown_CheckState |
inflate: check-state="unknown" |
Definition at line 130 of file SkWidgetViews.h.
SkCheckButtonView::SkCheckButtonView | ( | ) |
CheckState SkCheckButtonView::getCheckState | ( | ) | const [inline] |
Definition at line 135 of file SkWidgetViews.h.
static bool SkCheckButtonView::GetWidgetEventCheckState | ( | const SkEvent & | , | |
CheckState * | state | |||
) | [static] |
use this to extract the CheckState from an event (i.e. one that as posted by a SkCheckButtonView). Returns true if the proper slot was present in the event, and sets state to that value. If no proper slot is found, returns false and does not modify state.
virtual void SkCheckButtonView::onCheckStateChange | ( | CheckState | oldState, | |
CheckState | newState | |||
) | [protected, virtual] |
virtual void SkCheckButtonView::onInflate | ( | const SkDOM & | dom, | |
const SkDOM::Node * | node | |||
) | [protected, virtual] |
Override this to initialize your subclass from the XML node. Be sure to call the inherited version too
Reimplemented from SkWidgetView.
virtual bool SkCheckButtonView::onPrepareWidgetEvent | ( | SkEvent * | evt | ) | [protected, virtual] |
called before posting the event to our listeners. Override to add slots to the event before posting. Return true to proceed with posting, or false to not post the event to any listener. Note: the event passed in may not be the same as calling this->event(). Be sure to call your INHERITED method as well, so that all classes in the hierarchy get a shot at modifying the event (and possibly returning false to abort).
Reimplemented from SkWidgetView.
void SkCheckButtonView::setCheckState | ( | CheckState | ) |