GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
DropDownMenuItem.cpp
Go to the documentation of this file.
1#include "DropDownMenuItem.h"
2
3using namespace std;
4
5namespace gui_framework
6{
7 DropDownMenuItem::DropDownMenuItem(const wstring& text, HMENU popupMenuHandle) :
8 IMenuItem
9 (
10 text,
11 standard_menu_items::dropDownMenuItem
12 ),
13 popupMenuHandle(popupMenuHandle)
14 {
15
16 }
17
22
23 tuple<uint32_t, uint64_t> DropDownMenuItem::getCreationData() const
24 {
25 return make_tuple(static_cast<uint32_t>(MF_POPUP), reinterpret_cast<uint64_t>(popupMenuHandle));
26 }
27
28 json::JSONBuilder DropDownMenuItem::getStructure() const
29 {
30 json::JSONBuilder builder = IMenuItem::getStructure();
31
32 builder.append("popupId"s, reinterpret_cast<uint64_t>(popupMenuHandle));
33
34 return builder;
35 }
36}
virtual std::tuple< uint32_t, uint64_t > getCreationData() const final override
virtual json::JSONBuilder getStructure() const final override
DropDownMenuItem(const std::wstring &text, HMENU popupMenuHandle)