CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
CFxUIMenu Class Reference

#include <FxUIMenu.h>

Inheritance diagram for CFxUIMenu:
CFxUIBaseView CFxUIObject

Public Member Functions

 CFxUIMenu ()
 
 ~CFxUIMenu ()
 
void clear ()
 
void addAction (CFxUIAction *pAction)
 
void addMenu (CFxUIMenu *pMenu)
 
void addSeparator ()
 
void popup (CFxUIBaseView *anchorView)
 
void setTitle (const CFxUIString &text)
 
void hide ()
 
void setPosition (const CFxUIPoint &pt)
 
void setActiveAction (CFxUIAction *action)
 
void setPalette (const CFxUIPalette &palette)
 
CFxUIActiongetActiveAction ()
 
CFxUIPalette palette ()
 
void setBorderWidth (float width)
 
CFxUISignal< void(void)> & aboutToHide ()
 
CFxUISignal< void(void)> & aboutToShow ()
 
CFxUISignal< void(void)> & menuPressed ()
 
- Public Member Functions inherited from CFxUIBaseView
 CFxUIBaseView ()
 
virtual ~CFxUIBaseView ()
 
void setDisabled (bool on)
 
void setEnabled (bool on)
 
bool isEnabled () const
 
CFxUIPalette::FxUIColorRole backgroundRole ()
 
void setPalette (const CFxUIPalette &)
 
const CFxUIPalettepalette () const
 
bool isVisible ()
 
void setVisible (bool bVisible)
 
bool isHidden ()
 
void setHidden (bool bHidden)
 
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)
 
virtual void mousePressEvent (CFxUIMouseEvent *mouseEvent)
 
void setEventAccepted (bool bAccepted=false)
 
void setEventRejected (bool bRejected=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 ()
 
bool underMouse ()
 
void setMask (const CFxUIRegion &region)
 
void move (const CFxUIPoint &pos)
 
CFxUISize sizeHint () const
 
CFxUIPoint mapToGlobal (const CFxUIPoint &pos)
 
void setMargin (int left, int top, int right, int bottom)
 
void setParentWidget (CFxUIBaseView *pParent)
 
float getViewOpacity () const
 
void setViewOpacity (const float &opacity)
 
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
 

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 {
  eExpanding = -1 , eXS = 0 , eS , eM ,
  eL , eXL
}
 
enum  UIScrollBarPolicy { eScrollBarAsNeeded = 0 , eScrollBarAlwaysOff , eScrollBarAlwaysOn }
 
- 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 CFxUIMenu provides a menu widget for use in menu bars, context menus, and other popup menus.

Definition at line 27 of file FxUIMenu.h.

Constructor & Destructor Documentation

◆ CFxUIMenu()

CFxUIMenu::CFxUIMenu ( )

Constructor

◆ ~CFxUIMenu()

CFxUIMenu::~CFxUIMenu ( )

Destructor

Member Function Documentation

◆ aboutToHide()

CFxUISignal< void(void)> & CFxUIMenu::aboutToHide ( )

Signal is emitted when menu is about hide.

◆ aboutToShow()

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

Signal is emitted when menu is about show.

◆ addAction()

void CFxUIMenu::addAction ( CFxUIAction * pAction)

Adds the action action to the menu's list of actions.

Parameters
pActionPointer to the action that need to be added to list.

◆ addMenu()

void CFxUIMenu::addMenu ( CFxUIMenu * pMenu)

Adds the pMenu menu to the menu's list of menu-items.

Parameters
pMenuPointer to the menu that need to be added to list.

◆ addSeparator()

void CFxUIMenu::addSeparator ( )

Adds a new separator action,

◆ clear()

void CFxUIMenu::clear ( )

Removes all the menu's actions. Actions owned by the menu and not shown in any other widget are deleted.

◆ getActiveAction()

CFxUIAction * CFxUIMenu::getActiveAction ( )

Get active action of this menu

Returns
action

◆ hide()

void CFxUIMenu::hide ( )

Hide the menu

◆ menuPressed()

CFxUISignal< void(void)> & CFxUIMenu::menuPressed ( )

Signal is emitted when menu is pressed.

◆ palette()

CFxUIPalette CFxUIMenu::palette ( )

Get the menu palette.

Return The palette is used by the menu style in rendering menu.

Returns
palette

◆ popup()

void CFxUIMenu::popup ( CFxUIBaseView * anchorView)

◆ setActiveAction()

void CFxUIMenu::setActiveAction ( CFxUIAction * action)

Sets active action of this menu

Parameters
action

◆ setBorderWidth()

void CFxUIMenu::setBorderWidth ( float width)

Sets the border width of view.

Parameters
widthInput

◆ setPalette()

void CFxUIMenu::setPalette ( const CFxUIPalette & palette)

Sets the view paltte.

The palette is used by the menu style in rendering menu.

Parameters
paletteInput

◆ setPosition()

void CFxUIMenu::setPosition ( const CFxUIPoint & pt)

Sets the position of Menu.

Parameters
pt.

◆ setTitle()

void CFxUIMenu::setTitle ( const CFxUIString & text)

Sets title of this menu


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