Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

MenuBar

 

 

 

This class provides the menu hierarchy. It can be used either as Frame or as regular Ctrl (in that case it represents top-level menu), or be pop-up as local menu (PopUp or Execute).

 

 

Public Method List

 

The height of top-level menu using the font.

 


 

Forces closing any open sub-menus.

 


 

Sets the top-level menu. Use for top-level menu bars only.

 


 

Deprecated - do not use.

 


 

Pop-ups the menu at p in the owner view area. sz is the size of menu, if zero, needed size is computed. Menu can be defined by issuing individual Add methods before calling PopUp.

 


 

Same as PopUp(GetActiveWindow(), p).

 


 

Same as previous method, with p set to the current mouse position.

 


 

Pop-ups the menu at p in the owner view area and performs the modal loop for it. Returns false when menu is canceled without performing any action.

 


 

Same as Execute(GetActiveWindow(), p). Returns false when menu is canceled without performing any action.

 


 

Same as previous method, with p set to the current mouse position. Returns false when menu is canceled without performing any action.

 


 

static bool Execute(Ctrl *owner, Event<Bar&proc, Point p)

Pop-ups the menu based on proc. Returns false when menu is canceled without performing any action.

 


 

static bool Execute(Event<Bar&proc, Point p)

Same as previous method, using GetActiveWindow() as owner. Returns false when menu is canceled without performing any action.

 


 

static bool Execute(Event<Bar&proc)

Same as previous method, using current mouse position. Returns false when menu is canceled without performing any action.

 


 

Returns true if MenuBar has no items.

 


 

Removes all items from MenuBar.

 


 

Minimum size reserved on the left side of menu items for icons in pixels. Default value is 16. Returns *this.

 


 

Sets the font to be used in MenuBar. Default is standard GUI font. Returns *this.

 


 

Returns the font used in MenuBar.

 


 

Sets the maximum size of an iconn displaye inside a menu item to sz.

 


 

MenuBar& MaxIconSize(int n)

Same as MaxIconSize(n, n).

 


 

Returns the maximum icons size.

 

 

Do you want to contribute?