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

Standard menu item. More...

#include <MenuItem.h>

Inheritance diagram for gui_framework::MenuItem:
gui_framework::BaseMenuItem gui_framework::interfaces::IMenuItem gui_framework::interfaces::ISerializable

Public Member Functions

 MenuItem (const std::wstring &text, const std::function< void()> &onClick)
 
 MenuItem (const std::wstring &text, const std::string &functionName, const std::string &moduleName)
 
void processMessage () override
 
json::JSONBuilder getStructure () const override
 
 ~MenuItem ()=default
 
- Public Member Functions inherited from gui_framework::BaseMenuItem
 BaseMenuItem (const std::wstring &text)
 
virtual std::tuple< uint32_t, uint64_t > getCreationData () const final override
 
virtual ~BaseMenuItem ()=default
 
- Public Member Functions inherited from gui_framework::interfaces::IMenuItem
 IMenuItem (const std::wstring &text, const std::string &type)
 
virtual void createMenuItem (HMENU parent) final
 
virtual void setParent (HMENU parent) final
 
virtual void setIndex (uint32_t index) final
 
virtual const std::wstring & getText () const final
 
virtual const std::string & getType () const final
 
virtual ~IMenuItem ()
 
- 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 ()
 
- Protected Attributes inherited from gui_framework::interfaces::IMenuItem
std::wstring text
 
std::string type
 
HMENU parent
 
uint32_t index
 

Detailed Description

Standard menu item.

Definition at line 8 of file MenuItem.h.

Constructor & Destructor Documentation

◆ MenuItem() [1/2]

gui_framework::MenuItem::MenuItem ( const std::wstring & text,
const std::function< void()> & onClick )

◆ MenuItem() [2/2]

gui_framework::MenuItem::MenuItem ( const std::wstring & text,
const std::string & functionName,
const std::string & moduleName )
Parameters
text
functionName
moduleName
Exceptions
CantFindFunctionFromModuleException

◆ ~MenuItem()

gui_framework::MenuItem::~MenuItem ( )
default

Member Function Documentation

◆ getStructure()

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

Reimplemented from gui_framework::interfaces::IMenuItem.

Definition at line 41 of file MenuItem.cpp.

◆ processMessage()

void gui_framework::MenuItem::processMessage ( )
overridevirtual

Implements gui_framework::BaseMenuItem.

Definition at line 36 of file MenuItem.cpp.


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