#include <FxUIBaseView.h>
|
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
} |
|
|
| CFxUIBaseView () |
|
virtual | ~CFxUIBaseView () |
|
void | setDisabled (bool on) |
|
void | setEnabled (bool on) |
|
bool | isEnabled () const |
|
CFxUIPalette::ColorRole | backgroundRole () |
|
void | setPalette (const CFxUIPalette &) |
|
const CFxUIPalette & | palette () 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 () |
|
| CFxUIObject () |
|
virtual | ~CFxUIObject () |
|
FxNativeHandle | getHandle () const |
|
void | setHandle (FxNativeHandle handle) |
|
void | setParent (CFxUIObject *parent) |
|
CFxUIObject * | parent () |
|
const CFxUIObject * | parent () 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 |
|
Class CFxUIBaseView is the base class for all widgets and provides their common functionalities.
Definition at line 29 of file FxUIBaseView.h.
◆ FocusPolicyType
This enum type defines the policies a view can have with respect to acquiring keyboard focus.
Enumerator |
---|
eNoFocus | The widget does not accept focus.
|
eTabFocus | The widget accepts focus by tabbing.
|
eClickFocus | The widget accepts focus by clicking.
|
eStrongFocus | The widget accepts focus by both tabbing and clicking. On macOS it will also accept tab focus in "Text/List focus mode".
|
eWheelFocus | The widget accepts focus by using the mouse wheel in addition to eStrongFocus.
|
eKeyboardOnSetfocus | A programmatic SetFocus automatically opens the soft keyboard if available (implemented for Touch).
|
Definition at line 54 of file FxUIBaseView.h.
◆ TextAlignment
This enum type defines the alignment of text to be done.
Enumerator |
---|
AlignLeft | |
AlignRight | |
AlignHCenter | |
AlignJustify | |
AlignTop | |
AlignBottom | |
AlignVCenter | |
AlignBaseline | |
AlignCenter | |
Definition at line 36 of file FxUIBaseView.h.
◆ UIWidthSizePolicy
This enum type defines the size policy.
Enumerator |
---|
eXS | This enum defines size as extra small.
|
eS | This enum defines size as small.
|
eM | This enum defines size as medium.
|
eL | This enum defines size as large.
|
eXL | This enum defines size as extra large.
|
Definition at line 66 of file FxUIBaseView.h.
◆ CFxUIBaseView()
CFxUIBaseView::CFxUIBaseView |
( |
| ) |
|
◆ ~CFxUIBaseView()
virtual CFxUIBaseView::~CFxUIBaseView |
( |
| ) |
|
|
virtual |
◆ aboutToPassEventToParent()
Signal is emitted before passing event to parent class.
◆ aboutToShow()
Signal is emitted before showing view.
◆ addView()
Add the child view at last index.
- Parameters
-
pChild | Pointer to the child view to be added. |
fWeight | Input |
◆ backgroundRole()
CFxUIPalette::ColorRole CFxUIBaseView::backgroundRole |
( |
| ) |
|
Returns the background role of the view.
The background role defines the brush from the view's palette that is used to render the background.
◆ focusInEvent()
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the view.
- Parameters
-
focusInEvent | Pointer to the focusIn event. |
◆ focusOutEvent()
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the view.
- Parameters
-
focusOutEvent | Pointer to the focusOut event. |
◆ hasFocus()
bool CFxUIBaseView::hasFocus |
( |
| ) |
const |
Returns if view has the keyboard input focus.
- Returns
- bool if has keyboard focus the return value is true, otherwise false.
◆ height()
int CFxUIBaseView::height |
( |
| ) |
|
Returns height of view.
- Returns
- int value.
◆ hideEvent()
This event handler can be reimplemented in a subclass to receive view hide events. The event is passed in the event parameter.
- Parameters
-
event | Pointer the hide events. |
Reimplemented in CFxUIDockWidget.
◆ hoverEnter()
Signal is emitted when mouse cursor enters the hover widget..
◆ hoverLeave()
Signal is emitted when mouse cursor leave the hover widget..
◆ indexOf()
Returns the index of view.
- Returns
- int value.
◆ insertView()
void CFxUIBaseView::insertView |
( |
CFxUIBaseView * |
pChild, |
|
|
int |
index = 0 , |
|
|
float |
fWeight = 0.0 |
|
) |
| |
Insert the child view at specified index.
- Parameters
-
pChild | Pointer to the child view to be inserted. |
index | Value at which the child view is inserted. |
fWeight | Input |
◆ isEnabled()
bool CFxUIBaseView::isEnabled |
( |
| ) |
const |
Returns if the view is enabled.
- Returns
- true if the view is enabled, otherwise false.
◆ isVisible()
bool CFxUIBaseView::isVisible |
( |
| ) |
|
Returns if view is visible.
- Returns
- true if visible, otherwise false
◆ maximumHeight()
int CFxUIBaseView::maximumHeight |
( |
| ) |
|
Returns the maximum height of view.
- Returns
- int value.
◆ maximumWidth()
int CFxUIBaseView::maximumWidth |
( |
| ) |
|
Returns the maximum width of view.
- Returns
- int value.
◆ minimumHeight()
int CFxUIBaseView::minimumHeight |
( |
| ) |
|
Returns the minimum height of view.
- Returns
- int value.
◆ minimumWidth()
int CFxUIBaseView::minimumWidth |
( |
| ) |
|
Returns the minimum width of view.
- Returns
- int value.
◆ paintEvent()
This event handler can be reimplemented in a subclass to receive paint events passed in event.
- Parameters
-
event | Pointer to the paint events. |
Reimplemented in CFxUIImageView.
◆ palette()
Returns the view's palette. The view's palette contains color groups for each view's state.
- Returns
- The view's palette
◆ removeView()
Remove the child view.
- Parameters
-
pChild | Pointer to the child view to be removed. |
◆ resize()
void CFxUIBaseView::resize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
Resize the view to width and height.
- Parameters
-
◆ resizeEvent()
This event handler can be reimplemented in a subclass to receive view resize events which are passed in the event parameter.
When resizeEvent() is called, the view already has its new geometry.
- Parameters
-
event | Pointer to the resize event. |
◆ setBorderColor()
void CFxUIBaseView::setBorderColor |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
Sets the border color of view in rgb format.
- Parameters
-
◆ setBorderWidth() [1/2]
void CFxUIBaseView::setBorderWidth |
( |
float |
left, |
|
|
float |
top, |
|
|
float |
right, |
|
|
float |
bottom |
|
) |
| |
Sets the border width of view.
- Parameters
-
left | Input |
top | Input |
right | Input |
bottom | Input |
◆ setBorderWidth() [2/2]
void CFxUIBaseView::setBorderWidth |
( |
float |
width | ) |
|
Sets the border width of view.
- Parameters
-
◆ setBusyState()
void CFxUIBaseView::setBusyState |
( |
bool |
bBusy = false | ) |
|
Sets the view in busy state.
By default, this property will be disabled.
- Parameters
-
◆ setCornerRadius()
void CFxUIBaseView::setCornerRadius |
( |
float |
radius | ) |
|
Sets the corner radius of view.
- Parameters
-
◆ setDisabled()
void CFxUIBaseView::setDisabled |
( |
bool |
on | ) |
|
Sets whether the view is disabled.
- Parameters
-
on | The view is disabled if the value of the parameter is true, otherwise it will be enabled. |
◆ setEnabled()
void CFxUIBaseView::setEnabled |
( |
bool |
on | ) |
|
Sets whether the view is enabled.
- Parameters
-
on | The view is enabled if the value of the parameter is true, otherwise it will be disabled. |
◆ setEventAccepted()
void CFxUIBaseView::setEventAccepted |
( |
bool |
bAccepted = false | ) |
|
Accept the current event by enabling it.
By default, this property will be disabled.
- Parameters
-
◆ setFocus() [1/2]
void CFxUIBaseView::setFocus |
( |
| ) |
|
Sets keyoboard input focus to this view.
◆ setFocus() [2/2]
void CFxUIBaseView::setFocus |
( |
int |
iReason | ) |
|
Set the keyboard input focus to this view.
- Parameters
-
iReason | This is used to give an explanation of what caused the view to get focus. |
◆ setFocusPolicy()
void CFxUIBaseView::setFocusPolicy |
( |
int |
iPolicy | ) |
|
Set the focus policy in the way view accepts keyboard focus.
- Parameters
-
iPolicy | The input defines policies view can have with respect to acquiring keyboard focus. |
◆ setHeight()
void CFxUIBaseView::setHeight |
( |
int |
h | ) |
|
Sets the height of view.
- Parameters
-
◆ setMaximumHeight()
void CFxUIBaseView::setMaximumHeight |
( |
int |
iHeight | ) |
|
Sets the maximum height of view.
- Parameters
-
◆ setMaximumWidth()
void CFxUIBaseView::setMaximumWidth |
( |
int |
iWidth | ) |
|
Sets the maximum width of view.
- Parameters
-
◆ setMinimumHeight()
void CFxUIBaseView::setMinimumHeight |
( |
int |
iHeight | ) |
|
Sets the minimum height of view.
- Parameters
-
◆ setMinimumWidth()
void CFxUIBaseView::setMinimumWidth |
( |
int |
iWidth | ) |
|
Sets the minimum width of view.
- Parameters
-
◆ setPalette()
Sets the view pallete.
The palette is used by the view's style when rendering standard components.
- Parameters
-
◆ setPreferableSize()
void CFxUIBaseView::setPreferableSize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
Sets the preferred size of view.
- Parameters
-
◆ setTabOrder()
Set the tab order of the views.
- Parameters
-
first | Pointer to the first view in the order. |
second | Pointer to the second view in the order. |
◆ setToolTip()
Sets tooltip .
- Parameters
-
sToolTip | The value passed in parameter is set to tooltip which is visible on hovering. |
◆ setVisible()
void CFxUIBaseView::setVisible |
( |
bool |
bVisible | ) |
|
Sets whether the view is visible.
- Parameters
-
bVisible | The view is visible if the value of the parameter is true, otherwise it will be hidden. |
◆ setWidth()
void CFxUIBaseView::setWidth |
( |
int |
w | ) |
|
Sets the width of view.
- Parameters
-
◆ showEvent()
This event handler can be reimplemented in a subclass to receive view show events which are passed in the event parameter.
- Parameters
-
event | Pointer to the show events. |
Reimplemented in CFxUIDockWidget.
◆ toolTip()
Returns the tooltip.
- Returns
- tool tip
◆ update()
void CFxUIBaseView::update |
( |
| ) |
|
Updates the view unless updates are disabled or the view is hidden.
◆ width()
int CFxUIBaseView::width |
( |
| ) |
|
Returns width of view.
- Returns
- int value.
The documentation for this class was generated from the following file: