9 #include <xtd/optional> 11 #include <xtd/iequatable> 49 static constexpr
int32 find_handle = 0;
51 static constexpr
int32 find_shortcut = 1;
64 intptr handle() const noexcept;
68 virtual
bool is_parent() const noexcept;
73 const
menu_item& mdi_list_item() const noexcept;
106 std::any tag() const noexcept;
110 menu& tag(std::any value);
116 bool equals(const
menu&) const noexcept override;
121 std::optional<std::reference_wrapper<
context_menu>> get_context_menu() const noexcept;
126 std::optional<std::reference_wrapper<
main_menu>> get_main_menu() const noexcept;
131 virtual
void merge_menu(const
menu& menu_src);
167 void clone_menu(const
menu& menu_src);
171 virtual
intptr create_menu_handle() = 0;
175 virtual
void destroy_menu_handle(
intptr handle);
178 virtual
void on_item_removed(
size_t pos,
menu_item_ref item);
182 virtual
void create_menu();
183 virtual
void destroy_menu();
184 void recreate_menu();
186 std::shared_ptr<data> data_;
187 static std::map<
intptr, std::reference_wrapper<
menu>> handles_;
intmax_t intptr
Represent a pointer or a handle.
Definition: types.h:151
Contains xtd::forms::layout::arranged_element_collection collection.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1063
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Contains xtd::forms::component class.
Represents the menu structure of a form.
Definition: main_menu.h:38