CFx SDK Documentation
2023 SP0
|
#include <FxUIToolButton.h>
Public Types | |
enum | UIToolButtonStyle { eIconOnly , eTextOnly , eTextBesideIcon , eTextUnderIcon , eFollowStyle } |
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 } |
Additional Inherited Members | |
Static Public Member Functions inherited from CFxUIBaseView | |
static void | setTabOrder (CFxUIObject *first, CFxUIObject *second) |
Protected Member Functions inherited from CFxUIObject | |
CFxUIObject * | sender () |
Protected Attributes inherited from CFxUIObject | |
CFxUIObjectImpl * | m_pImpl |
CFxUIObjectData * | m_pData |
Class CFxUIToolButton provides a command button. CFxUIToolButton: Tooltips with icons on desktop, tooltips without icons on web, no tooltips on mobile
Definition at line 29 of file FxUIToolButton.h.
This enum type defines the Tool Button Style.
Definition at line 35 of file FxUIToolButton.h.
CFxUIToolButton::CFxUIToolButton | ( | ) |
Constructor
CFxUIToolButton::~CFxUIToolButton | ( | ) |
Destructor
CFxUISignal<void(bool)>& CFxUIToolButton::clicked | ( | ) |
Signal is emitted when the button pressed down then released while the mouse cursor is inside the box.
CFxUISize CFxUIToolButton::iconSize | ( | ) | const |
Gets the size of the icon.
bool CFxUIToolButton::isChecked | ( | ) | const |
Returns if button is checked.
CFxUISignal< void( int, int ) >& CFxUIToolButton::keyWentDown | ( | ) |
Signal is emitted whenever a key is pressed.
void CFxUIToolButton::setBoldText | ( | bool | bBold | ) |
Sets font of text in tool button as bold.
bBold | If parameter is true font is set to bold, otherwise not. |
void CFxUIToolButton::setCheckable | ( | const bool | bCheckable | ) |
Set the control checkable.
By default, the control is not checkable.
bCheckable | Input |
void CFxUIToolButton::setChecked | ( | bool | bChecked | ) |
Set the button checked.
Only checkable controls can be checked.
bChecked | The button is set to checked only if the value of the parameter is true. |
void CFxUIToolButton::setElideTextEnabled | ( | const bool | bEnableElideText | ) |
Enable or disable text elision.
By default, this property will be disabled.
bEnableElideText | Input |
Sets the size of the icon.
size | The icon is resized to the value passed in parameter. |
Sets the popup menu.
pMenu | Pointer to the popup menu. |
void CFxUIToolButton::setMenuArrowVisible | ( | bool | bVisible | ) |
Sets whether the menu arrow is visible.
bShow | the menu arrow is visible if this parameter is true, otherwise it's hidden. |
void CFxUIToolButton::setResourceIcon | ( | const CFxUIString & | resourceIcon | ) |
Sets the icon.
resourceIcon | The resource path is passed in parameter. |
void CFxUIToolButton::setText | ( | const CFxUIString & | text | ) |
Sets the text.
text | Input |
void CFxUIToolButton::setTextAlignment | ( | TextAlignment | iAlignment | ) |
Sets alignment of text on tool button.
iAlignment | The value is to be from enums defined in TextAlignment. |
void CFxUIToolButton::setToolButtonStyle | ( | UIToolButtonStyle | iStyle | ) |
Sets style on tool button.
iStyle | The value is to be from enums defined in ToolButtonStyle. |
CFxUIString CFxUIToolButton::text | ( | ) | const |
Returns the text.
CFxUISignal<void(bool)>& CFxUIToolButton::toggled | ( | ) |
Signal is emitted when the button is toggled. This signal is emitted only for buttons which are checkable.
CFxUIToolButton::UIToolButtonStyle CFxUIToolButton::toolButtonStyle | ( | ) |
Returns the style.