CFx SDK Documentation  2020SP3
Public Member Functions | List of all members
CFxUIListBox Class Reference

#include <FxUIListBox.h>

Inheritance diagram for CFxUIListBox:
CFxUIBaseView CFxUIObject

Public Member Functions

 CFxUIListBox ()
 
 ~CFxUIListBox ()
 
void addItem (const CFxUIString &item)
 
int count () const
 
void clear ()
 
CFxUIStringList selectedItems () const
 
int row (const CFxUIString &) const
 
int currentRow () const
 
void clearSelection ()
 
void setItemSelected (int index, bool)
 
void setItemData (int index, const CFxUIVariant &data)
 
const CFxUIStringitem (int index)
 
void setItemText (int index, const CFxUIString &sText)
 
bool isItemSelected (int index)
 
CFxUIVariant itemData (int index) const
 
CFxUISignal< void(int)> & valueChanged ()
 
CFxUISignal< void(void)> & selectionChanged ()
 
CFxUISignal< void(const int &)> & itemDoubleClicked ()
 
- 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 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 ()
 
- 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 {
  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 CFxUIListBox provides a list of selectable, read-only items.

Definition at line 25 of file FxUIListBox.h.

Constructor & Destructor Documentation

◆ CFxUIListBox()

CFxUIListBox::CFxUIListBox ( )

Constructor

◆ ~CFxUIListBox()

CFxUIListBox::~CFxUIListBox ( )

Destructor

Member Function Documentation

◆ addItem()

void CFxUIListBox::addItem ( const CFxUIString item)

Add an item with the text label at the end of the list widget.

Parameters
itemInput

◆ clear()

void CFxUIListBox::clear ( )

Removes all the items from the list box.

◆ clearSelection()

void CFxUIListBox::clearSelection ( )

Removes the selection from all selected items.

◆ count()

int CFxUIListBox::count ( ) const

Returns the total number of items in list.

Returns
int value.

◆ currentRow()

int CFxUIListBox::currentRow ( ) const

Returns the current row in list box.

Returns
int The current row returned is -1 if list box is empty.

◆ isItemSelected()

bool CFxUIListBox::isItemSelected ( int  index)

Returns if item is selected at given index.

Parameters
index
Returns
bool If item is selected value returned is true else false.

◆ item()

const CFxUIString& CFxUIListBox::item ( int  index)

Returns the item at given index.

Parameters
index
Returns
string.

◆ itemData()

CFxUIVariant CFxUIListBox::itemData ( int  index) const

Returns item data at given index.

Parameters
index
Returns
variant

◆ itemDoubleClicked()

CFxUISignal<void( const int& )>& CFxUIListBox::itemDoubleClicked ( )

Signal is emitted when item is double clicked.

◆ row()

int CFxUIListBox::row ( const CFxUIString ) const

Returns the row containing the given item.

Parameters
itemInput.
Returns
int returns the index of given item.

◆ selectedItems()

CFxUIStringList CFxUIListBox::selectedItems ( ) const

Returns list of all selected items in the list.

Returns
stringlist

◆ selectionChanged()

CFxUISignal<void( void )>& CFxUIListBox::selectionChanged ( )

Signal is emitted on selection changed.

◆ setItemData()

void CFxUIListBox::setItemData ( int  index,
const CFxUIVariant data 
)

Sets the data on item present at given index.

Parameters
indexValue for item at which data is to be set.
dataInput.

◆ setItemSelected()

void CFxUIListBox::setItemSelected ( int  index,
bool   
)

Sets the item selected at given index.

Parameters
indexInput value to select.
bSelectInput. Item is selected if parameter is true.

◆ setItemText()

void CFxUIListBox::setItemText ( int  index,
const CFxUIString sText 
)

Sets the text of item at given index.

Parameters
indexValue for item at which text is to be set.
sTextInput.

◆ valueChanged()

CFxUISignal<void(int)>& CFxUIListBox::valueChanged ( )

Signal is emitted value of item is changed.


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