44 intptr_t
handle()
const {
return data_->handle_;}
69 menu& menu_items(
const std::initializer_list<menu_item>& value);
70 menu& menu_items(
const std::vector<menu_item>& value);
89 std::any
tag()
const {
return data_->tag_;}
119 static constexpr const
int find_handle = 0;
121 static constexpr const
int find_shortcut = 1;
124 friend std::ostream& operator<<(std::ostream& os, const
xtd::
forms::
menu&
menu) noexcept {
138 explicit menu(
const std::initializer_list<menu_item>& items);
139 explicit menu(
const std::vector<menu_item>& items);
156 virtual void create_menu();
157 virtual void destroy_menu();
158 void recreate_menu();
164 intptr_t handle_ = 0;
165 menu* owner_ =
nullptr;
166 std::optional<std::reference_wrapper<menu>> context_menu_;
168 std::unique_ptr<menu_item> mdi_list_item_;
169 std::optional<std::reference_wrapper<menu>> main_menu_;
171 std::optional<std::reference_wrapper<menu>> parent_;
175 on_click_(
menu, event_args::empty);
178 std::shared_ptr<data> data_;
179 static std::map<intptr_t, menu*> handles_;
Contains xtd::forms::arranged_element_collection collection.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::forms::component class.
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition: event_handler.h:33
#define forms_export_
Define shared library export.
Definition: forms_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17