CFx SDK Documentation  2020SP3
Public Types | Public Member Functions | List of all members
CFxUICheckBox Class Reference

#include <FxUICheckBox.h>

Inheritance diagram for CFxUICheckBox:
CFxUIBaseView CFxUIObject

Public Types

enum  CheckState { Unchecked, PartiallyChecked, Checked }
 
- Public Types inherited from CFxUIBaseView
enum  TextAlignment {
  AlignLeft = 0x0001, AlignRight = 0x0002, AlignHCenter = 0x0004, AlignJustify = 0x0008,
  AlignTop = 0x0020, AlignBottom = 0x0040, AlignVCenter = 0x0080, AlignBaseline = 0x0100,
  AlignCenter = AlignVCenter | AlignHCenter
}
 
enum  FocusPolicyType {
  eNoFocus = 0, eTabFocus = 0x1, eClickFocus = 0x2, eStrongFocus = eTabFocus | eClickFocus | 0x8,
  eWheelFocus = eStrongFocus | 0x4, eKeyboardOnSetfocus = 0x10
}
 
enum  UIWidthSizePolicy {
  eXS = 0, eS, eM, eL,
  eXL
}
 

Public Member Functions

 CFxUICheckBox ()
 
virtual ~CFxUICheckBox ()
 
void setText (const CFxUIString &str)
 
CFxUIString text () const
 
void setChecked (bool bChecked)
 
bool isChecked () const
 
void setResourceIcon (const CFxUIString &icon)
 
void setTextSize (float size)
 
bool isTristate () const
 
void setTristate (bool tristate=true)
 
CFxUICheckBox::CheckState checkState () const
 
void setCheckState (CFxUICheckBox::CheckState state)
 
CFxUISignal< void(int)> & stateChanged ()
 
CFxUISignal< void(bool)> & toggled ()
 
CFxUISignal< void(void)> & clicked ()
 
- Public Member Functions inherited from CFxUIBaseView
 CFxUIBaseView ()
 
virtual ~CFxUIBaseView ()
 
void setDisabled (bool on)
 
void setEnabled (bool on)
 
bool isEnabled () const
 
CFxUIPalette::ColorRole backgroundRole ()
 
void setPalette (const CFxUIPalette &)
 
const CFxUIPalettepalette () const
 
bool isVisible ()
 
void setVisible (bool bVisible)
 
bool hasFocus () const
 
void setFocus ()
 
void setFocus (int iReason)
 
void setFocusPolicy (int iPolicy)
 
int width ()
 
void setWidth (int w)
 
int height ()
 
void setHeight (int h)
 
void update ()
 
void setBusyState (bool bBusy=false)
 
void resize (int w, int h)
 
void setCornerRadius (float radius)
 
void setBorderWidth (float width)
 
void setBorderWidth (float left, float top, float right, float bottom)
 
void setBorderColor (int r, int g, int b)
 
virtual void showEvent (CFxUIShowEvent *event)
 
virtual void hideEvent (CFxUIHideEvent *event)
 
virtual void paintEvent (CFxUIPaintEvent *event)
 
virtual void resizeEvent (CFxUIResizeEvent *event)
 
virtual void focusInEvent (CFxUIFocusEvent *focusInEvent)
 
virtual void focusOutEvent (CFxUIFocusEvent *focusOutEvent)
 
void setEventAccepted (bool bAccepted=false)
 
void addView (CFxUIBaseView *pChild, float fWeight=0.0)
 
void insertView (CFxUIBaseView *pChild, int index=0, float fWeight=0.0)
 
int indexOf (CFxUIBaseView *pChild)
 
void removeView (CFxUIBaseView *pChild)
 
void setPreferableSize (int w, int h)
 
void setMinimumWidth (int iWidth)
 
void setMinimumHeight (int iHeight)
 
void setMaximumWidth (int iWidth)
 
void setMaximumHeight (int iHeight)
 
int minimumWidth ()
 
int minimumHeight ()
 
int maximumWidth ()
 
int maximumHeight ()
 
void setToolTip (const CFxUIString &sToolTip)
 
const CFxUIString toolTip ()
 
CFxUISignal< void(void)> & aboutToPassEventToParent ()
 
CFxUISignal< void(void)> & aboutToShow ()
 
CFxUISignal< void(void)> & hoverEnter ()
 
CFxUISignal< void(void)> & hoverLeave ()
 
- Public Member Functions inherited from CFxUIObject
 CFxUIObject ()
 
virtual ~CFxUIObject ()
 
FxNativeHandle getHandle () const
 
void setHandle (FxNativeHandle handle)
 
void setParent (CFxUIObject *parent)
 
CFxUIObjectparent ()
 
const CFxUIObjectparent () const
 
void setObjectName (const CFxUIString &objectName)
 
CFxUIString objectName () const
 
bool setProperty (const char *name, const CFxUIVariant &value)
 
CFxUIVariant property (const char *name)
 
CFxUIList< CFxUIObject * > children () const
 
template<typename T >
CFxUIList< T > findChildren (const CFxUIString &name=CFxUIString())
 
void blockSignals (bool block)
 
bool signalsBlocked () const
 

Additional Inherited Members

- Static Public Member Functions inherited from CFxUIBaseView
static void setTabOrder (CFxUIObject *first, CFxUIObject *second)
 
- Protected Member Functions inherited from CFxUIObject
CFxUIObjectsender ()
 
- Protected Attributes inherited from CFxUIObject
CFxUIObjectImpl * m_pImpl
 
CFxUIObjectData * m_pData
 

Detailed Description

Class CFxUI type check box.

Definition at line 27 of file FxUICheckBox.h.

Member Enumeration Documentation

◆ CheckState

This enum type defines the alignment of text to be done.

Enumerator
Unchecked 

The item is unchecked.

PartiallyChecked 

The item is partially checked. Items in hierarchical models may be partially checked if some, but not all, of their children are checked.

Checked 

The item is checked.

Definition at line 34 of file FxUICheckBox.h.

Constructor & Destructor Documentation

◆ CFxUICheckBox()

CFxUICheckBox::CFxUICheckBox ( )

Constructor

◆ ~CFxUICheckBox()

virtual CFxUICheckBox::~CFxUICheckBox ( )
virtual

Destructor

Member Function Documentation

◆ checkState()

CFxUICheckBox::CheckState CFxUICheckBox::checkState ( ) const

Returns the checkbox's check state

Returns
checkState according to the states defined in CFxUICheckBox::CheckState.

◆ clicked()

CFxUISignal<void(void)>& CFxUICheckBox::clicked ( )

Signal is emitted when the button pressed down then released while the mouse cursor is inside the box.

◆ isChecked()

bool CFxUICheckBox::isChecked ( ) const

Returns if check box is checked.

Returns
true if the check box is checked, otherwise false.

◆ isTristate()

bool CFxUICheckBox::isTristate ( ) const

Returns if whether the checkbox is a tri-state checkbox.

Returns
true if the check box is tristate, otherwise false.

◆ setChecked()

void CFxUICheckBox::setChecked ( bool  bChecked)

Set the check box checked.

Only checkable controls can be checked.

Parameters
bCheckedThe check box is set to checked only if the value of the parameter is true.

◆ setCheckState()

void CFxUICheckBox::setCheckState ( CFxUICheckBox::CheckState  state)

Sets the checkbox's check state to state.

Parameters
stateInput.

◆ setResourceIcon()

void CFxUICheckBox::setResourceIcon ( const CFxUIString icon)

Sets the icon.

Parameters
strThe resource path is passed in parameter.

◆ setText()

void CFxUICheckBox::setText ( const CFxUIString str)

Sets the text.

Parameters
strInput

◆ setTextSize()

void CFxUICheckBox::setTextSize ( float  size)

Sets the text size of checkbox label.

Parameters
sizeInput

◆ setTristate()

void CFxUICheckBox::setTristate ( bool  tristate = true)

Sets the tristate for checkbox.

Parameters
tristateInput . By default tristate is set to true.

◆ stateChanged()

CFxUISignal<void(int)>& CFxUICheckBox::stateChanged ( )

Signal is emitted whenever the check box's state changes, i.e. whenever the user checks or unchecks it.

◆ text()

CFxUIString CFxUICheckBox::text ( ) const

Returns the text.

Returns
string

◆ toggled()

CFxUISignal<void(bool)>& CFxUICheckBox::toggled ( )

Signal is emitted whenever the check box's state changes, i.e. whenever the user checks or unchecks it.


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