Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CComboBox Class Reference

#include <CComboBox.hpp>

Inheritance diagram for CComboBox:
[legend]
Collaboration diagram for CComboBox:
[legend]

Public Member Functions

 CComboBox (bool hasEntry=false)
 
 CComboBox (uint32_t *idSelected)
 
 ~CComboBox () override
 
void addOption (uint32_t idOption, std::string_view textOption)
 
uint32_t getId (int32_t index) const
 
int32_t getIndex (int32_t idOption) const
 
uint64_t getIdOptionSelection ()
 
uint32_t getIdFirstOption ()
 
void destroyWidget () override
 
size_t size ()
 
void clearNotDrawnComboBox ()
 
void removeAllOptions ()
 
void removeOptionByIdOption (uint32_t idOption)
 
void removeOptionByIndex (uint32_t index)
 
void setId (uint32_t option)
 
void setOption (uint32_t option)
 
void setHasEntry (bool hasEntry)
 
void addListenerDoubleClick (IListenerSelect **listener)
 
void addListenerLongClick (IListenerSelect **listener)
 
void addListenerShortClick (IListenerSelect **listener)
 
void emplaceListenerDoubleClick (std::function< bool(CEventSelected *)> doubleClickFunctionCall)
 
bool runListenersLongClick (uint64_t indColSelected, uint64_t indRowSelected)
 
bool runListenersShortClick (uint64_t indColSelected, uint64_t indRowSelected)
 
CDialoggetDialogFatherRef ()
 
void setDialogFatherOption (CDialog *dialogFatherRef)
 
std::string getTooltip () const
 
bool getActive () const
 
bool getInactiveVisualFeedback () const
 
void getSize (double *sizeX, double *sizeY) const
 
IWidgetmakeWidget (CDialog *dialogFatherRef, AbstractComponentGUI *componentFatherRef)
 
void addDataPanel (IDataPanel **dataPanel)
 
void addListenerAccept (IListenerAccept **listenerAccept)
 
void addListenerValidate (IListenerValidate **listenerValidate)
 
void addListenerChange (IListenerChange **listenerChange)
 
void addListenerClose (IListenerClose **listenerClose)
 
void addListenerIsAccept (IListenerIsAccept **listenerIsAccept)
 
void addListenerUpdate (IListenerUpdate **listenerUpdate)
 
void addListenerTimer (uint64_t timeout, IListenerTimer **timer)
 Agrega un listener de tipo Timer.
 
void emplaceListenerAccept (std::function< void()> acceptFunctionCall)
 Agrega un IListenerAccept formado mediante una función lambda.
 
void emplaceListenerClose (std::function< void()> closeFunctionCall)
 Agrega un IListenerClose formado mediante una función lambda.
 
void emplaceListenerChange (std::function< void(CDialog *, AbstractComponentGUI *)> changeFunctionCall)
 Agrega un IListenerChange formado mediante una función lambda.
 
void emplaceListenerIsAccept (std::function< bool(AbstractComponentGUI *, std::string *)> isAcceptFunctionCall)
 Agrega un IListenerIsAccept formado mediante una función lambda.
 
void emplaceListenerTimer (uint64_t timeout, std::function< bool()> timerExecutionFunctionCall)
 Agrega un IListenerTimer formado mediante una función lambda.
 
bool runValidate ()
 
void runChange ()
 
void runClose ()
 
bool runListenersIsAccept (std::string *messageError)
 
void runListenersAccept ()
 
void runListenersUpdate ()
 
void displayPopOver (std::string_view message, iv::types::milliseconds timeout=2000)
 
void grabFocus ()
 
void setName (const std::string &name)
 
void setTooltip (std::string_view tooltip)
 
void setActive (bool isActive)
 
void setHAlignment (CEnumComponentsGUI::EAlignmentHorizontal alignment)
 
void setVAlignment (CEnumComponentsGUI::EAlignmentVertical alignment)
 
void setBlinking (bool isBlinking)
 
void setColorBlink (iv::types::color colorARGB)
 
void setColorBackground (iv::types::color colorARGB)
 
void setColorForeground (iv::types::color colorARGB)
 
void setDefaultColorBlink ()
 
void setDefaultColorBackground ()
 
void setDefaultColorForeground ()
 
void setDefaultMinimum (iv::types::width sizeX, iv::types::height sizeY)
 
void setDefaultWidthMaximum (iv::types::width sizeX)
 
void setDefaultHeightMaximum (iv::types::height sizeY)
 
void setVisible (bool isVisible)
 
void setInactiveVisualFeedback (bool hasInactiveVisualFeedback)
 
IWidgetgetWidget () const
 
bool getBlinking ()
 
void updateColor ()
 

Protected Attributes

std::vector< IListenerIsAccept * > * m_listenersIsAccept
 
std::vector< IListenerAccept * > * m_listenersAccept
 
std::vector< IListenerValidate * > * m_listenersValidate
 
std::vector< IListenerChange * > * m_listenersChange
 
std::vector< IListenerClose * > * m_listenersClose
 
std::vector< IListenerUpdate * > * m_listenersUpdate
 
const std::weak_ptr< IComponentsGUI > & m_frameRef {m_mutableFrameRef}
 
std::weak_ptr< IComponentsGUIm_mutableFrameRef
 
AbstractComponentGUIm_componentFatherRef
 
IWidgetm_widget
 
CDialogm_dialogFatherRef
 

Private Member Functions

uint32_t idToOption (uint32_t id)
 
IWidgetcreateWidget (CDialog *dialogFather) override
 
void prvProcessChangeRecursive (uint64_t recursiveLevel)
 
virtual void prvProcessCloseChildren ()
 

Private Attributes

SComboBoxm_sComboBox
 
bool m_hasEntry
 
uint32_t m_defaultOption
 
std::vector< IListenerSelect * > m_listeners
 
std::vector< IListenerSelect * > m_listenersShortClick
 
std::string m_name
 
std::string m_tooltip
 
bool m_isVisible
 
bool m_isActive
 
bool m_hasInactiveVisualFeedback {true}
 
CEnumComponentsGUI::EAlignmentHorizontal m_alignmentHorizontalComponent
 
CEnumComponentsGUI::EAlignmentVertical m_alignmentVerticalComponent
 
CAttrColorCompm_attrColor
 
bool m_hasSizeMinimum
 
iv::types::width m_sizeXMinimum
 
iv::types::height m_sizeYMinimum
 
std::optional< iv::types::widthm_sizeXMaximum
 
std::optional< iv::types::heightm_sizeYMaximum
 
std::vector< std::shared_ptr< SPrvTimerData > > m_rcpTimers
 
std::vector< IDataPanel * > * m_dataPanels
 

Constructor & Destructor Documentation

◆ CComboBox() [1/2]

CComboBox::CComboBox ( bool hasEntry = false)
explicit

◆ CComboBox() [2/2]

CComboBox::CComboBox ( uint32_t * idSelected)
explicit

◆ ~CComboBox()

CComboBox::~CComboBox ( )
override

Member Function Documentation

◆ addDataPanel()

void AbstractComponentGUI::addDataPanel ( IDataPanel ** dataPanel)
inherited

◆ addListenerAccept()

void AbstractComponentGUI::addListenerAccept ( IListenerAccept ** listenerAccept)
inherited

◆ addListenerChange()

void AbstractComponentGUI::addListenerChange ( IListenerChange ** listenerChange)
inherited

◆ addListenerClose()

void AbstractComponentGUI::addListenerClose ( IListenerClose ** listenerClose)
inherited

◆ addListenerDoubleClick()

void AbstractSelectionComponent::addListenerDoubleClick ( IListenerSelect ** listener)
inherited

◆ addListenerIsAccept()

void AbstractComponentGUI::addListenerIsAccept ( IListenerIsAccept ** listenerIsAccept)
inherited

◆ addListenerLongClick()

void AbstractSelectionComponent::addListenerLongClick ( IListenerSelect ** listener)
inherited

◆ addListenerShortClick()

void AbstractSelectionComponent::addListenerShortClick ( IListenerSelect ** listener)
inherited

◆ addListenerTimer()

void AbstractComponentGUI::addListenerTimer ( uint64_t timeout,
IListenerTimer ** timer )
inherited

Agrega un listener de tipo Timer.

Parameters
timeouttiempo de espera en milisegundos.
timerreferencia al listener Timer.
Note
El listener Timer se destruye al destruir el AbstractComponentGUI.
Si el Timer devuelve False, se destruye y no se vuelve a ejecutar.

◆ addListenerUpdate()

void AbstractComponentGUI::addListenerUpdate ( IListenerUpdate ** listenerUpdate)
inherited

◆ addListenerValidate()

void AbstractComponentGUI::addListenerValidate ( IListenerValidate ** listenerValidate)
inherited

◆ addOption()

void CComboBox::addOption ( uint32_t idOption,
std::string_view textOption )

◆ clearNotDrawnComboBox()

void CComboBox::clearNotDrawnComboBox ( )

◆ createWidget()

IWidget * CComboBox::createWidget ( CDialog * dialogFather)
overrideprivatevirtual

Implements AbstractComponentGUI.

◆ destroyWidget()

void CComboBox::destroyWidget ( )
overridevirtual

destroyWidget.

Destroys the widget held by the AbstractComponentGUI object and resets its related references.

This is needed for example by the object CSheet to create and destroy widgets on demand, keeping the component (AbstractComponentGUI), in order to manage multiple cells and preventing a high increase in memory use.

Inherited classes that hold a reference to the related members must reset them too (override this virtual method).

Reimplemented from AbstractComponentGUI.

◆ displayPopOver()

void AbstractComponentGUI::displayPopOver ( std::string_view message,
iv::types::milliseconds timeout = 2000 )
inherited

◆ emplaceListenerAccept()

void AbstractComponentGUI::emplaceListenerAccept ( std::function< void()> acceptFunctionCall)
inherited

Agrega un IListenerAccept formado mediante una función lambda.

Parameters
acceptFunctionCallfunción lambda a ejecutar por el listener.
Note
Si la función lambda tiene parámetros adicionales, pasar esos parámetros por copia y no referencia.

◆ emplaceListenerChange()

void AbstractComponentGUI::emplaceListenerChange ( std::function< void(CDialog *, AbstractComponentGUI *)> changeFunctionCall)
inherited

Agrega un IListenerChange formado mediante una función lambda.

Parameters
changeFunctionCallfunción lambda a ejecutar por el listener.
Note
Si la función lambda tiene parámetros adicionales, pasar esos parámetros por copia y no referencia.

◆ emplaceListenerClose()

void AbstractComponentGUI::emplaceListenerClose ( std::function< void()> closeFunctionCall)
inherited

Agrega un IListenerClose formado mediante una función lambda.

Parameters
closeFunctionCallfunción lambda a ejecutar por el listener.
Note
Si la función lambda tiene parámetros adicionales, pasar esos parámetros por copia y no referencia.

◆ emplaceListenerDoubleClick()

void AbstractSelectionComponent::emplaceListenerDoubleClick ( std::function< bool(CEventSelected *)> doubleClickFunctionCall)
inherited

◆ emplaceListenerIsAccept()

void AbstractComponentGUI::emplaceListenerIsAccept ( std::function< bool(AbstractComponentGUI *, std::string *)> isAcceptFunctionCall)
inherited

Agrega un IListenerIsAccept formado mediante una función lambda.

Parameters
isAcceptFunctionCallfunción lambda a ejecutar por el listener.
Note
Si la función lambda tiene parámetros adicionales, pasar esos parámetros por copia y no referencia.

◆ emplaceListenerTimer()

void AbstractComponentGUI::emplaceListenerTimer ( uint64_t timeout,
std::function< bool()> timerExecutionFunctionCall )
inherited

Agrega un IListenerTimer formado mediante una función lambda.

Parameters
timeouttiempo de espera en milisegundos.
timerExecutionFunctionCallfunción lambda a ejecutar por el listener.
Note
Si la función lambda devuelve False, el listener Timer se destruye y no se vuelve a invocar.

◆ getActive()

bool AbstractComponentGUI::getActive ( ) const
nodiscardinherited

◆ getBlinking()

bool AbstractComponentGUI::getBlinking ( )
inherited

◆ getDialogFatherRef()

CDialog * AbstractComponentGUI::getDialogFatherRef ( )
inherited

◆ getId()

uint32_t CComboBox::getId ( int32_t index) const
nodiscard

◆ getIdFirstOption()

uint32_t CComboBox::getIdFirstOption ( )

◆ getIdOptionSelection()

uint64_t CComboBox::getIdOptionSelection ( )

◆ getInactiveVisualFeedback()

bool AbstractComponentGUI::getInactiveVisualFeedback ( ) const
nodiscardinherited

◆ getIndex()

int32_t CComboBox::getIndex ( int32_t idOption) const
nodiscard

◆ getSize()

void AbstractComponentGUI::getSize ( double * sizeX,
double * sizeY ) const
inherited

◆ getTooltip()

std::string AbstractComponentGUI::getTooltip ( ) const
nodiscardinherited

◆ getWidget()

IWidget * AbstractComponentGUI::getWidget ( ) const
inherited

◆ grabFocus()

void AbstractComponentGUI::grabFocus ( )
inherited

◆ idToOption()

uint32_t CComboBox::idToOption ( uint32_t id)
private

◆ makeWidget()

IWidget * AbstractComponentGUI::makeWidget ( CDialog * dialogFatherRef,
AbstractComponentGUI * componentFatherRef )
inherited

◆ prvProcessChangeRecursive()

void AbstractComponentGUI::prvProcessChangeRecursive ( uint64_t recursiveLevel)
privateinherited

◆ prvProcessCloseChildren()

void AbstractComponentGUI::prvProcessCloseChildren ( )
privatevirtualinherited

◆ removeAllOptions()

void CComboBox::removeAllOptions ( )

◆ removeOptionByIdOption()

void CComboBox::removeOptionByIdOption ( uint32_t idOption)

◆ removeOptionByIndex()

void CComboBox::removeOptionByIndex ( uint32_t index)

◆ runChange()

void AbstractComponentGUI::runChange ( )
inherited

◆ runClose()

void AbstractComponentGUI::runClose ( )
inherited

◆ runListenersAccept()

void AbstractComponentGUI::runListenersAccept ( )
inherited

◆ runListenersIsAccept()

bool AbstractComponentGUI::runListenersIsAccept ( std::string * messageError)
inherited

◆ runListenersLongClick()

bool AbstractSelectionComponent::runListenersLongClick ( uint64_t indColSelected,
uint64_t indRowSelected )
inherited

◆ runListenersShortClick()

bool AbstractSelectionComponent::runListenersShortClick ( uint64_t indColSelected,
uint64_t indRowSelected )
inherited

◆ runListenersUpdate()

void AbstractComponentGUI::runListenersUpdate ( )
inherited

◆ runValidate()

bool AbstractComponentGUI::runValidate ( )
inherited

◆ setActive()

void AbstractComponentGUI::setActive ( bool isActive)
inherited

◆ setBlinking()

void AbstractComponentGUI::setBlinking ( bool isBlinking)
inherited

◆ setColorBackground()

void AbstractComponentGUI::setColorBackground ( iv::types::color colorARGB)
inherited

◆ setColorBlink()

void AbstractComponentGUI::setColorBlink ( iv::types::color colorARGB)
inherited

◆ setColorForeground()

void AbstractComponentGUI::setColorForeground ( iv::types::color colorARGB)
inherited

◆ setDefaultColorBackground()

void AbstractComponentGUI::setDefaultColorBackground ( )
inherited

◆ setDefaultColorBlink()

void AbstractComponentGUI::setDefaultColorBlink ( )
inherited

◆ setDefaultColorForeground()

void AbstractComponentGUI::setDefaultColorForeground ( )
inherited

◆ setDefaultHeightMaximum()

void AbstractComponentGUI::setDefaultHeightMaximum ( iv::types::height sizeY)
inherited

◆ setDefaultMinimum()

void AbstractComponentGUI::setDefaultMinimum ( iv::types::width sizeX,
iv::types::height sizeY )
inherited

◆ setDefaultWidthMaximum()

void AbstractComponentGUI::setDefaultWidthMaximum ( iv::types::width sizeX)
inherited

◆ setDialogFatherOption()

void AbstractComponentGUI::setDialogFatherOption ( CDialog * dialogFatherRef)
inherited

◆ setHAlignment()

void AbstractComponentGUI::setHAlignment ( CEnumComponentsGUI::EAlignmentHorizontal alignment)
inherited

◆ setHasEntry()

void CComboBox::setHasEntry ( bool hasEntry)

◆ setId()

void CComboBox::setId ( uint32_t option)

◆ setInactiveVisualFeedback()

void AbstractComponentGUI::setInactiveVisualFeedback ( bool hasInactiveVisualFeedback)
inherited

◆ setName()

void AbstractComponentGUI::setName ( const std::string & name)
inherited

◆ setOption()

void CComboBox::setOption ( uint32_t option)

◆ setTooltip()

void AbstractComponentGUI::setTooltip ( std::string_view tooltip)
inherited

◆ setVAlignment()

void AbstractComponentGUI::setVAlignment ( CEnumComponentsGUI::EAlignmentVertical alignment)
inherited

◆ setVisible()

void AbstractComponentGUI::setVisible ( bool isVisible)
inherited

◆ size()

size_t CComboBox::size ( )

◆ updateColor()

void AbstractComponentGUI::updateColor ( )
inherited

Member Data Documentation

◆ m_alignmentHorizontalComponent

CEnumComponentsGUI::EAlignmentHorizontal AbstractComponentGUI::m_alignmentHorizontalComponent
privateinherited

◆ m_alignmentVerticalComponent

CEnumComponentsGUI::EAlignmentVertical AbstractComponentGUI::m_alignmentVerticalComponent
privateinherited

◆ m_attrColor

CAttrColorComp* AbstractComponentGUI::m_attrColor
privateinherited

◆ m_componentFatherRef

AbstractComponentGUI* AbstractComponentGUI::m_componentFatherRef
protectedinherited

◆ m_dataPanels

std::vector<IDataPanel *>* AbstractComponentGUI::m_dataPanels
privateinherited

◆ m_defaultOption

uint32_t CComboBox::m_defaultOption
private

◆ m_dialogFatherRef

CDialog* AbstractComponentGUI::m_dialogFatherRef
protectedinherited

◆ m_frameRef

const std::weak_ptr<IComponentsGUI>& AbstractComponentGUI::m_frameRef {m_mutableFrameRef}
protectedinherited

◆ m_hasEntry

bool CComboBox::m_hasEntry
private

◆ m_hasInactiveVisualFeedback

bool AbstractComponentGUI::m_hasInactiveVisualFeedback {true}
privateinherited

◆ m_hasSizeMinimum

bool AbstractComponentGUI::m_hasSizeMinimum
privateinherited

◆ m_isActive

bool AbstractComponentGUI::m_isActive
privateinherited

◆ m_isVisible

bool AbstractComponentGUI::m_isVisible
privateinherited

◆ m_listeners

std::vector<IListenerSelect *> AbstractSelectionComponent::m_listeners
privateinherited

◆ m_listenersAccept

std::vector<IListenerAccept *>* AbstractComponentGUI::m_listenersAccept
protectedinherited

◆ m_listenersChange

std::vector<IListenerChange *>* AbstractComponentGUI::m_listenersChange
protectedinherited

◆ m_listenersClose

std::vector<IListenerClose *>* AbstractComponentGUI::m_listenersClose
protectedinherited

◆ m_listenersIsAccept

std::vector<IListenerIsAccept *>* AbstractComponentGUI::m_listenersIsAccept
protectedinherited

◆ m_listenersShortClick

std::vector<IListenerSelect *> AbstractSelectionComponent::m_listenersShortClick
privateinherited

◆ m_listenersUpdate

std::vector<IListenerUpdate *>* AbstractComponentGUI::m_listenersUpdate
protectedinherited

◆ m_listenersValidate

std::vector<IListenerValidate *>* AbstractComponentGUI::m_listenersValidate
protectedinherited

◆ m_mutableFrameRef

std::weak_ptr<IComponentsGUI> AbstractComponentGUI::m_mutableFrameRef
protectedinherited

◆ m_name

std::string AbstractComponentGUI::m_name
privateinherited

◆ m_rcpTimers

std::vector<std::shared_ptr<SPrvTimerData> > AbstractComponentGUI::m_rcpTimers
privateinherited

◆ m_sComboBox

SComboBox* CComboBox::m_sComboBox
private

◆ m_sizeXMaximum

std::optional<iv::types::width> AbstractComponentGUI::m_sizeXMaximum
privateinherited

◆ m_sizeXMinimum

iv::types::width AbstractComponentGUI::m_sizeXMinimum
privateinherited

◆ m_sizeYMaximum

std::optional<iv::types::height> AbstractComponentGUI::m_sizeYMaximum
privateinherited

◆ m_sizeYMinimum

iv::types::height AbstractComponentGUI::m_sizeYMinimum
privateinherited

◆ m_tooltip

std::string AbstractComponentGUI::m_tooltip
privateinherited

◆ m_widget

IWidget* AbstractComponentGUI::m_widget
protectedinherited

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