CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CFxUIPushButton Class Reference

#include <FxUIPushButton.h>

Inheritance diagram for CFxUIPushButton:
CFxUIBaseView CFxUIObject

Public Member Functions

 CFxUIPushButton ()
 
 ~CFxUIPushButton ()
 
void setText (const CFxUIString &text)
 
CFxUIString text () const
 
void setResourceIcon (const CFxUIString &resourceIcon)
 
void setIconSize (const CFxUISize &size)
 
CFxUISize iconSize () const
 
void setIcon (const CFxUIIcon &icon)
 
CFxUIIcon icon () const
 
void setTextAlignment (TextAlignment iAlignment)
 
void setBoldText (bool bBold)
 
void setCheckable (const bool bCheckable)
 
bool isCheckable ()
 
void setChecked (const bool bChecked)
 
bool isChecked ()
 
void setElideTextEnabled (const bool bEnableElideText)
 
void setMenu (CFxUIMenu *pMenu)
 
void setMenuArrowVisible (bool bVisible)
 
CFxUISignal< void(bool)> & clicked ()
 
CFxUISignal< void(bool)> & toggled ()
 
CFxUISignal< void(int)> & keyWentDown ()
 
- 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 setMinimumSize (const CFxUISize &size)
 
void setMaximumWidth (int iWidth)
 
void setMaximumHeight (int iHeight)
 
void setMaximumSize (const CFxUISize &size)
 
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 ()
 
CFxUISignal< void(bool)> & visibilityChanged ()
 
- 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

- 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 {
  eExpanding = -1 , eXS = 0 , eS , eM ,
  eL , eXL
}
 
- 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 CFxUIPushButton provides a command button. CFxUIPushButton: Tooltips without icons on desktop and web, no tooltips on mobile

Definition at line 29 of file FxUIPushButton.h.

Constructor & Destructor Documentation

◆ CFxUIPushButton()

CFxUIPushButton::CFxUIPushButton ( )

Constructor

◆ ~CFxUIPushButton()

CFxUIPushButton::~CFxUIPushButton ( )

Destructor

Member Function Documentation

◆ clicked()

CFxUISignal< void(bool)> & CFxUIPushButton::clicked ( )

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

◆ icon()

CFxUIIcon CFxUIPushButton::icon ( ) const

Gets the icon.

Returns
the icon

◆ iconSize()

CFxUISize CFxUIPushButton::iconSize ( ) const

Gets the size of the icon.

Returns
the size of the icon

◆ isCheckable()

bool CFxUIPushButton::isCheckable ( )

Returns if the push button is checkable.

Returns
true if the push button is checkable, otherwise false.

◆ isChecked()

bool CFxUIPushButton::isChecked ( )

Returns if the push button is checked.

Returns
true if the push button is checked, otherwise false.

◆ keyWentDown()

CFxUISignal< void(int)> & CFxUIPushButton::keyWentDown ( )

Signal is emitted when any key is pressed (including special keys like ESC, Shift etc.. )

◆ setBoldText()

void CFxUIPushButton::setBoldText ( bool  bBold)

Sets font of text in push button as bold.

Parameters
bBoldIf parameter is true font is set to bold, otherwise not.

◆ setCheckable()

void CFxUIPushButton::setCheckable ( const bool  bCheckable)

Set the push button checkable.

By default, the control is not checkable.

Parameters
bCheckableInput

◆ setChecked()

void CFxUIPushButton::setChecked ( const bool  bChecked)

Set the push button checked.

By default, the push button is not checked.

Parameters
bCheckedInput

◆ setElideTextEnabled()

void CFxUIPushButton::setElideTextEnabled ( const bool  bEnableElideText)

Enable or disable text elision.

By default, this property will be disabled.

Parameters
bEnableElideTextInput

◆ setIcon()

void CFxUIPushButton::setIcon ( const CFxUIIcon icon)

Sets the icon.

Parameters
icon

◆ setIconSize()

void CFxUIPushButton::setIconSize ( const CFxUISize size)

Sets the size of the icon.

Parameters
sizeThe icon is resized to the value passed in parameter.

◆ setMenu()

void CFxUIPushButton::setMenu ( CFxUIMenu pMenu)

Sets the popup menu.

Parameters
pMenuPointer to the popup menu.

◆ setMenuArrowVisible()

void CFxUIPushButton::setMenuArrowVisible ( bool  bVisible)

Sets whether the menu arrow is visible.

Parameters
bShowthe menu arrow is visible if this parameter is true, otherwise it's hidden.

◆ setResourceIcon()

void CFxUIPushButton::setResourceIcon ( const CFxUIString resourceIcon)

Sets the icon.

Parameters
strThe resource path is passed in parameter.

◆ setText()

void CFxUIPushButton::setText ( const CFxUIString text)

Sets the text.

Parameters
textInput

◆ setTextAlignment()

void CFxUIPushButton::setTextAlignment ( TextAlignment  iAlignment)

Sets alignment of text on push button.

Parameters
iAlignmentThe value is to be from enums defined in TextAlignment.

◆ text()

CFxUIString CFxUIPushButton::text ( ) const

Returns the text.

Returns
string

◆ toggled()

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

Signal is emitted when the button is toggled. This signal is emitted only for buttons which are checkable.


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