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

#include <CMenuOption.hpp>

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

Public Member Functions

 CMenuOption ()
 
 CMenuOption (const CMenuOption &other)
 
 CMenuOption (CMenuOption &&other) noexcept=delete
 
 ~CMenuOption () override
 
CMenuOptionoperator= (const CMenuOption &other)=delete
 
CMenuOptionoperator= (CMenuOption &&other)=delete
 
 CMenuOption (std::string_view nameOption)
 
 CMenuOption (std::string_view nameOption, std::string_view nameImage, bool isInToolbar)
 
bool operator== (const CMenuOption &b) const
 
std::string getName () const
 
std::string getImage () const
 
bool getIsCurrentActiveOption () const
 
bool isInToolbar () const
 
void updateActive () const
 
void setOptionName (const std::string &name)
 
void setImage (const std::string &image)
 
void setIsCurrentActiveOption (bool isCurrentActiveOption)
 
void setColorRgb (uint32_t rgb)
 
void appendOptionMenubarWidget (IWidget *menuBar, const std::shared_ptr< IComponentsGUI > &frame, CDialog *dlgFather)
 
void appendOptionToolbarWidget (IWidget *toolbar, const std::shared_ptr< IComponentsGUI > &frame, CDialog *dlgFather)
 
void appendOptionMenuContextWidget (IWidget *menuContext, CDialog *dlgFather)
 
void addListenerClick (IListenerClick **listener)
 
void emplaceListenerClick (std::function< void(CEventClick *evtClick)> clickFunctionCall)
 Agrega un IListenerClick formado mediante una función lambda.
 
void runListenersClick ()
 
bool getWithBackground () const
 
bool getWithShadow () const
 
void setWithBackground (bool withBackground)
 
void setWithChange (bool withChange)
 
void setWithShadow (bool withShadow)
 
bool isWithChange () const
 
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)
 
virtual void destroyWidget ()
 
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 Member Functions

virtual bool isActivated () const
 

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

IWidgetcreateWidget (CDialog *dialogFatherRef) override
 
void prvProcessChangeRecursive (uint64_t recursiveLevel)
 
virtual void prvProcessCloseChildren ()
 

Private Attributes

std::string m_name
 
std::string m_image
 
bool m_isInToolbar
 
bool m_isCurrentActiveOption
 
uint32_t m_argb
 
IWidgetm_compOption
 
IWidgetm_compOptionToolbar
 
bool _withChange
 
bool _withBackground
 
bool _withShadow
 
std::vector< IListenerClick * > _listeners
 
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

◆ CMenuOption() [1/5]

CMenuOption::CMenuOption ( )

◆ CMenuOption() [2/5]

CMenuOption::CMenuOption ( const CMenuOption & other)

◆ CMenuOption() [3/5]

CMenuOption::CMenuOption ( CMenuOption && other)
deletenoexcept

◆ ~CMenuOption()

CMenuOption::~CMenuOption ( )
override

◆ CMenuOption() [4/5]

CMenuOption::CMenuOption ( std::string_view nameOption)
explicit

◆ CMenuOption() [5/5]

CMenuOption::CMenuOption ( std::string_view nameOption,
std::string_view nameImage,
bool isInToolbar )

Member Function Documentation

◆ addDataPanel()

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

◆ addListenerAccept()

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

◆ addListenerChange()

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

◆ addListenerClick()

void AbstractClickComponentGUI::addListenerClick ( IListenerClick ** listener)
inherited

◆ addListenerClose()

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

◆ addListenerIsAccept()

void AbstractComponentGUI::addListenerIsAccept ( IListenerIsAccept ** listenerIsAccept)
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

◆ appendOptionMenubarWidget()

void CMenuOption::appendOptionMenubarWidget ( IWidget * menuBar,
const std::shared_ptr< IComponentsGUI > & frame,
CDialog * dlgFather )

◆ appendOptionMenuContextWidget()

void CMenuOption::appendOptionMenuContextWidget ( IWidget * menuContext,
CDialog * dlgFather )

◆ appendOptionToolbarWidget()

void CMenuOption::appendOptionToolbarWidget ( IWidget * toolbar,
const std::shared_ptr< IComponentsGUI > & frame,
CDialog * dlgFather )

◆ createWidget()

IWidget * CMenuOption::createWidget ( CDialog * dialogFatherRef)
overrideprivatevirtual

Implements AbstractComponentGUI.

◆ destroyWidget()

void AbstractComponentGUI::destroyWidget ( )
virtualinherited

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 in CCalendar, CCanvas, CCheckButton, CComboBox, CComboBoxString, CEdit, CFrameBin, CGooCanvas, CInfoBar, CLayoutContainer, CLayoutLayers, CLayoutTabs, CList, CPaned, CPickerFileChooser, CProgress, CRadioButton, CSheet, and CTree.

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

◆ emplaceListenerClick()

void AbstractClickComponentGUI::emplaceListenerClick ( std::function< void(CEventClick *evtClick)> clickFunctionCall)
inherited

Agrega un IListenerClick formado mediante una función lambda.

Parameters
clickFunctionCallfunció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.

◆ 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

◆ getImage()

std::string CMenuOption::getImage ( ) const
nodiscard

◆ getInactiveVisualFeedback()

bool AbstractComponentGUI::getInactiveVisualFeedback ( ) const
nodiscardinherited

◆ getIsCurrentActiveOption()

bool CMenuOption::getIsCurrentActiveOption ( ) const
nodiscard

◆ getName()

std::string CMenuOption::getName ( ) 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

◆ getWithBackground()

bool AbstractClickComponentGUI::getWithBackground ( ) const
nodiscardinherited

◆ getWithShadow()

bool AbstractClickComponentGUI::getWithShadow ( ) const
nodiscardinherited

◆ grabFocus()

void AbstractComponentGUI::grabFocus ( )
inherited

◆ isActivated()

bool CMenuOption::isActivated ( ) const
nodiscardprotectedvirtual

Reimplemented in CMenuOptionApp.

◆ isInToolbar()

bool CMenuOption::isInToolbar ( ) const
nodiscard

◆ isWithChange()

bool AbstractClickComponentGUI::isWithChange ( ) const
nodiscardinherited

◆ makeWidget()

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

◆ operator=() [1/2]

CMenuOption & CMenuOption::operator= ( CMenuOption && other)
delete

◆ operator=() [2/2]

CMenuOption & CMenuOption::operator= ( const CMenuOption & other)
delete

◆ operator==()

bool CMenuOption::operator== ( const CMenuOption & b) const
inline

◆ prvProcessChangeRecursive()

void AbstractComponentGUI::prvProcessChangeRecursive ( uint64_t recursiveLevel)
privateinherited

◆ prvProcessCloseChildren()

void AbstractComponentGUI::prvProcessCloseChildren ( )
privatevirtualinherited

◆ runChange()

void AbstractComponentGUI::runChange ( )
inherited

◆ runClose()

void AbstractComponentGUI::runClose ( )
inherited

◆ runListenersAccept()

void AbstractComponentGUI::runListenersAccept ( )
inherited

◆ runListenersClick()

void AbstractClickComponentGUI::runListenersClick ( )
inherited

◆ runListenersIsAccept()

bool AbstractComponentGUI::runListenersIsAccept ( std::string * messageError)
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

◆ setColorRgb()

void CMenuOption::setColorRgb ( uint32_t rgb)

◆ 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

◆ setImage()

void CMenuOption::setImage ( const std::string & image)

◆ setInactiveVisualFeedback()

void AbstractComponentGUI::setInactiveVisualFeedback ( bool hasInactiveVisualFeedback)
inherited

◆ setIsCurrentActiveOption()

void CMenuOption::setIsCurrentActiveOption ( bool isCurrentActiveOption)

◆ setName()

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

◆ setOptionName()

void CMenuOption::setOptionName ( const std::string & name)

◆ setTooltip()

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

◆ setVAlignment()

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

◆ setVisible()

void AbstractComponentGUI::setVisible ( bool isVisible)
inherited

◆ setWithBackground()

void AbstractClickComponentGUI::setWithBackground ( bool withBackground)
inherited

◆ setWithChange()

void AbstractClickComponentGUI::setWithChange ( bool withChange)
inherited

◆ setWithShadow()

void AbstractClickComponentGUI::setWithShadow ( bool withShadow)
inherited

◆ updateActive()

void CMenuOption::updateActive ( ) const

◆ updateColor()

void AbstractComponentGUI::updateColor ( )
inherited

Member Data Documentation

◆ _listeners

std::vector<IListenerClick *> AbstractClickComponentGUI::_listeners
privateinherited

◆ _withBackground

bool AbstractClickComponentGUI::_withBackground
privateinherited

◆ _withChange

bool AbstractClickComponentGUI::_withChange
privateinherited

◆ _withShadow

bool AbstractClickComponentGUI::_withShadow
privateinherited

◆ m_alignmentHorizontalComponent

CEnumComponentsGUI::EAlignmentHorizontal AbstractComponentGUI::m_alignmentHorizontalComponent
privateinherited

◆ m_alignmentVerticalComponent

CEnumComponentsGUI::EAlignmentVertical AbstractComponentGUI::m_alignmentVerticalComponent
privateinherited

◆ m_argb

uint32_t CMenuOption::m_argb
private

◆ m_attrColor

CAttrColorComp* AbstractComponentGUI::m_attrColor
privateinherited

◆ m_componentFatherRef

AbstractComponentGUI* AbstractComponentGUI::m_componentFatherRef
protectedinherited

◆ m_compOption

IWidget* CMenuOption::m_compOption
private

◆ m_compOptionToolbar

IWidget* CMenuOption::m_compOptionToolbar
private

◆ m_dataPanels

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

◆ m_dialogFatherRef

CDialog* AbstractComponentGUI::m_dialogFatherRef
protectedinherited

◆ m_frameRef

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

◆ m_hasInactiveVisualFeedback

bool AbstractComponentGUI::m_hasInactiveVisualFeedback {true}
privateinherited

◆ m_hasSizeMinimum

bool AbstractComponentGUI::m_hasSizeMinimum
privateinherited

◆ m_image

std::string CMenuOption::m_image
private

◆ m_isActive

bool AbstractComponentGUI::m_isActive
privateinherited

◆ m_isCurrentActiveOption

bool CMenuOption::m_isCurrentActiveOption
private

◆ m_isInToolbar

bool CMenuOption::m_isInToolbar
private

◆ m_isVisible

bool AbstractComponentGUI::m_isVisible
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_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 CMenuOption::m_name
private

◆ m_rcpTimers

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

◆ 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: