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

#include <FxUIBaseView.h>

Inheritance diagram for CFxUIBaseView:
CFxUIObject CFxUICheckBox CFxUIComboBox CFxUIDialogButtonBox CFxUIDockWidget CFxUIFlowLayout CFxUIGroupBox CFxUIHorizontalLayout CFxUIImageView CFxUILabel CFxUIListBox CFxUIListView CFxUIPushButton CFxUIRadioButton CFxUIRadioGroup CFxUIScrollableArea CFxUISegmentedControl CFxUISlider CFxUISpinBox CFxUISpinner CFxUIStackedWidget CFxUISwitchButton CFxUITabWidget CFxUITableView CFxUITextEdit CFxUITextView CFxUIToolButton CFxUITreeView CFxUIVerticalLayout CFxUIWebView

Public Types

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
}
 

Public Member Functions

 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
 

Static Public Member Functions

static void setTabOrder (CFxUIObject *first, CFxUIObject *second)
 

Additional Inherited Members

- Protected Member Functions inherited from CFxUIObject
CFxUIObjectsender ()
 
- Protected Attributes inherited from CFxUIObject
CFxUIObjectImpl * m_pImpl
 
CFxUIObjectData * m_pData
 

Detailed Description

Class CFxUIBaseView is the base class for all widgets and provides their common functionalities.

Definition at line 29 of file FxUIBaseView.h.

Member Enumeration Documentation

◆ 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
eExpanding 
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.

Constructor & Destructor Documentation

◆ CFxUIBaseView()

CFxUIBaseView::CFxUIBaseView ( )

Constructor

◆ ~CFxUIBaseView()

virtual CFxUIBaseView::~CFxUIBaseView ( )
virtual

Destructor

Member Function Documentation

◆ aboutToPassEventToParent()

CFxUISignal< void(void)> & CFxUIBaseView::aboutToPassEventToParent ( )

Signal is emitted before passing event to parent class.

◆ aboutToShow()

CFxUISignal< void(void)> & CFxUIBaseView::aboutToShow ( )

Signal is emitted before showing view.

◆ addView()

void CFxUIBaseView::addView ( CFxUIBaseView pChild,
float  fWeight = 0.0 
)

Add the child view at last index.

Parameters
pChildPointer to the child view to be added.
fWeightInput

◆ 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()

virtual void CFxUIBaseView::focusInEvent ( CFxUIFocusEvent focusInEvent)
virtual

This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the view.

Parameters
focusInEventPointer to the focusIn event.

◆ focusOutEvent()

virtual void CFxUIBaseView::focusOutEvent ( CFxUIFocusEvent focusOutEvent)
virtual

This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the view.

Parameters
focusOutEventPointer 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()

virtual void CFxUIBaseView::hideEvent ( CFxUIHideEvent event)
virtual

This event handler can be reimplemented in a subclass to receive view hide events. The event is passed in the event parameter.

Parameters
eventPointer the hide events.

Reimplemented in CFxUIDockWidget.

◆ hoverEnter()

CFxUISignal< void(void)> & CFxUIBaseView::hoverEnter ( )

Signal is emitted when mouse cursor enters the hover widget..

◆ hoverLeave()

CFxUISignal< void(void)> & CFxUIBaseView::hoverLeave ( )

Signal is emitted when mouse cursor leave the hover widget..

◆ indexOf()

int CFxUIBaseView::indexOf ( CFxUIBaseView pChild)

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
pChildPointer to the child view to be inserted.
indexValue at which the child view is inserted.
fWeightInput

◆ 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()

virtual void CFxUIBaseView::paintEvent ( CFxUIPaintEvent event)
virtual

This event handler can be reimplemented in a subclass to receive paint events passed in event.

Parameters
eventPointer to the paint events.

Reimplemented in CFxUIImageView.

◆ palette()

const CFxUIPalette & CFxUIBaseView::palette ( ) const

Returns the view's palette. The view's palette contains color groups for each view's state.

Returns
The view's palette

◆ removeView()

void CFxUIBaseView::removeView ( CFxUIBaseView pChild)

Remove the child view.

Parameters
pChildPointer to the child view to be removed.

◆ resize()

void CFxUIBaseView::resize ( int  w,
int  h 
)

Resize the view to width and height.

Parameters
wInput
hInput

◆ resizeEvent()

virtual void CFxUIBaseView::resizeEvent ( CFxUIResizeEvent event)
virtual

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
eventPointer to the resize event.

◆ setBorderColor()

void CFxUIBaseView::setBorderColor ( int  r,
int  g,
int  b 
)

Sets the border color of view in rgb format.

Parameters
rInput
gInput
bInput

◆ setBorderWidth() [1/2]

void CFxUIBaseView::setBorderWidth ( float  left,
float  top,
float  right,
float  bottom 
)

Sets the border width of view.

Parameters
leftInput
topInput
rightInput
bottomInput

◆ setBorderWidth() [2/2]

void CFxUIBaseView::setBorderWidth ( float  width)

Sets the border width of view.

Parameters
widthInput

◆ setBusyState()

void CFxUIBaseView::setBusyState ( bool  bBusy = false)

Sets the view in busy state.

By default, this property will be disabled.

Parameters
bBusyInput

◆ setCornerRadius()

void CFxUIBaseView::setCornerRadius ( float  radius)

Sets the corner radius of view.

Parameters
radiusInput

◆ setDisabled()

void CFxUIBaseView::setDisabled ( bool  on)

Sets whether the view is disabled.

Parameters
onThe 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
onThe 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
bAcceptedInput

◆ 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
iReasonThis 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
iPolicyThe input defines policies view can have with respect to acquiring keyboard focus.

◆ setHeight()

void CFxUIBaseView::setHeight ( int  h)

Sets the height of view.

Parameters
hInput

◆ setMaximumHeight()

void CFxUIBaseView::setMaximumHeight ( int  iHeight)

Sets the maximum height of view.

Parameters
iHeightInput

◆ setMaximumSize()

void CFxUIBaseView::setMaximumSize ( const CFxUISize size)

◆ setMaximumWidth()

void CFxUIBaseView::setMaximumWidth ( int  iWidth)

Sets the maximum width of view.

Parameters
iWidthInput

◆ setMinimumHeight()

void CFxUIBaseView::setMinimumHeight ( int  iHeight)

Sets the minimum height of view.

Parameters
iHeightInput

◆ setMinimumSize()

void CFxUIBaseView::setMinimumSize ( const CFxUISize size)

◆ setMinimumWidth()

void CFxUIBaseView::setMinimumWidth ( int  iWidth)

Sets the minimum width of view.

Parameters
iWidthInput

◆ setPalette()

void CFxUIBaseView::setPalette ( const CFxUIPalette )

Sets the view pallete.

The palette is used by the view's style when rendering standard components.

Parameters
paletteInput

◆ setPreferableSize()

void CFxUIBaseView::setPreferableSize ( int  w,
int  h 
)

Sets the preferred size of view.

Parameters
wInput
hInput

◆ setTabOrder()

static void CFxUIBaseView::setTabOrder ( CFxUIObject first,
CFxUIObject second 
)
static

Set the tab order of the views.

Parameters
firstPointer to the first view in the order.
secondPointer to the second view in the order.

◆ setToolTip()

void CFxUIBaseView::setToolTip ( const CFxUIString sToolTip)

Sets tooltip .

Parameters
sToolTipThe 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
bVisibleThe 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
wInput

◆ showEvent()

virtual void CFxUIBaseView::showEvent ( CFxUIShowEvent event)
virtual

This event handler can be reimplemented in a subclass to receive view show events which are passed in the event parameter.

Parameters
eventPointer to the show events.

Reimplemented in CFxUIDockWidget.

◆ toolTip()

const CFxUIString CFxUIBaseView::toolTip ( )

Returns the tooltip.

Returns
tool tip

◆ update()

void CFxUIBaseView::update ( )

Updates the view unless updates are disabled or the view is hidden.

◆ visibilityChanged()

CFxUISignal< void(bool)> & CFxUIBaseView::visibilityChanged ( )

Signal is emitted when widget change its visibility..

◆ width()

int CFxUIBaseView::width ( )

Returns width of view.

Returns
int value.

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