GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
gui_framework::Menu Class Referencefinal

Menu class. More...

#include <Menu.h>

Inheritance diagram for gui_framework::Menu:
gui_framework::interfaces::ISerializable

Public Member Functions

 Menu ()
 
 Menu (const std::wstring &name, HWND parent)
 
 Menu (const Menu &)=delete
 
 Menu (Menu &&other) noexcept
 
Menuoperator= (const Menu &)=delete
 
Menuoperator= (Menu &&other) noexcept
 
MenuaddMenuItem (std::unique_ptr< interfaces::IMenuItem > &&item)
 Also calls item's createMenuItem method.
 
void removeMenuItem (uint32_t index)
 
void handleMessage (uint32_t index)
 
void updateMenu () const
 
const std::wstring & getName () const
 
const std::vector< std::unique_ptr< interfaces::IMenuItem > > & getItems () const
 
HMENU getHandle () const
 
json::JSONBuilder getStructure () const override
 
 ~Menu ()
 
- Public Member Functions inherited from gui_framework::interfaces::ISerializable
 ISerializable ()=default
 
virtual ~ISerializable ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from gui_framework::interfaces::ISerializable
static uint32_t getCodepage ()
 

Detailed Description

Menu class.

Definition at line 8 of file Menu.h.

Constructor & Destructor Documentation

◆ Menu() [1/4]

gui_framework::Menu::Menu ( )

Definition at line 9 of file Menu.cpp.

◆ Menu() [2/4]

gui_framework::Menu::Menu ( const std::wstring & name,
HWND parent )

◆ Menu() [3/4]

gui_framework::Menu::Menu ( const Menu & )
delete

◆ Menu() [4/4]

gui_framework::Menu::Menu ( Menu && other)
noexcept

Definition at line 35 of file Menu.cpp.

◆ ~Menu()

gui_framework::Menu::~Menu ( )

Definition at line 147 of file Menu.cpp.

Member Function Documentation

◆ addMenuItem()

Menu & gui_framework::Menu::addMenuItem ( std::unique_ptr< interfaces::IMenuItem > && item)

Also calls item's createMenuItem method.

Returns
self

Definition at line 58 of file Menu.cpp.

◆ getHandle()

HMENU gui_framework::Menu::getHandle ( ) const

Definition at line 102 of file Menu.cpp.

◆ getItems()

const vector< unique_ptr< interfaces::IMenuItem > > & gui_framework::Menu::getItems ( ) const

Definition at line 97 of file Menu.cpp.

◆ getName()

const wstring & gui_framework::Menu::getName ( ) const

Definition at line 92 of file Menu.cpp.

◆ getStructure()

json::JSONBuilder gui_framework::Menu::getStructure ( ) const
overridevirtual

Implements gui_framework::interfaces::ISerializable.

Definition at line 107 of file Menu.cpp.

◆ handleMessage()

void gui_framework::Menu::handleMessage ( uint32_t index)

Definition at line 82 of file Menu.cpp.

◆ operator=() [1/2]

Menu & gui_framework::Menu::operator= ( const Menu & )
delete

◆ operator=() [2/2]

Menu & gui_framework::Menu::operator= ( Menu && other)
noexcept

Definition at line 45 of file Menu.cpp.

◆ removeMenuItem()

void gui_framework::Menu::removeMenuItem ( uint32_t index)

Definition at line 70 of file Menu.cpp.

◆ updateMenu()

void gui_framework::Menu::updateMenu ( ) const

Definition at line 87 of file Menu.cpp.


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