CFx SDK Documentation  2022 SP0
FxUIToolButton.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2021 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "FxUIBaseView.h"
20 
21 class CFxUIMenu;
22 
30 {
31 public:
36  {
41  eFollowStyle
42  };
43 public:
46 
49 
55  void setText( const CFxUIString& text );
56 
62  CFxUIString text() const;
63 
69  void setResourceIcon( const CFxUIString& resourceIcon );
70 
76  void setIconSize(const CFxUISize &size);
77 
84 
90  void setIcon(const CFxUIIcon &icon);
91 
97  void setTextAlignment( TextAlignment iAlignment );
98 
104  void setBoldText( bool bBold );
105 
113  void setCheckable( const bool bCheckable );
114 
122  void setChecked( bool bChecked );
123 
129  bool isChecked() const;
130 
138  void setElideTextEnabled( const bool bEnableElideText );
139 
145  void setMenu( CFxUIMenu* pMenu );
146 
152  void setMenuArrowVisible( bool bVisible );
153 
160 
167 
172 
177  CFxUISignal< void( int, int ) >& keyWentDown();
178 
179  //...
180 };
181 
182 
#define COMMONUI_API
QString CFxUIString
Definition: FxUIObject.h:48
QIcon CFxUIIcon
Definition: FxUIObject.h:62
QSize CFxUISize
Definition: FxUIObject.h:47
void setCheckable(const bool bCheckable)
void setMenu(CFxUIMenu *pMenu)
void setChecked(bool bChecked)
CFxUIString text() const
CFxUISignal< void(bool)> & clicked()
void setToolButtonStyle(UIToolButtonStyle iStyle)
CFxUISignal< void(int, int) > & keyWentDown()
void setText(const CFxUIString &text)
void setBoldText(bool bBold)
CFxUIToolButton::UIToolButtonStyle toolButtonStyle()
@ eTextUnderIcon
This enum displays text under icon.
@ eIconOnly
This enum displays icon only.
@ eTextBesideIcon
This enum displays text beside icon.
@ eTextOnly
This enum displays text only.
void setResourceIcon(const CFxUIString &resourceIcon)
CFxUISize iconSize() const
void setIcon(const CFxUIIcon &icon)
bool isChecked() const
void setIconSize(const CFxUISize &size)
void setTextAlignment(TextAlignment iAlignment)
void setMenuArrowVisible(bool bVisible)
void setElideTextEnabled(const bool bEnableElideText)
GLsizeiptr size
Definition: gles2_ext.h:182
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)