8#include <xtd/drawing/image>
10#include <xtd/iclonable>
221 template<
typename delegate_type>
223 template<
typename delegate_type>
225 template<
typename delegate_type>
227 template<
typename delegate_type>
229 template<
typename delegate_type>
231 template<
typename delegate_type>
233 template<
typename delegate_type>
235 template<
typename delegate_type>
237 template<
typename delegate_type>
239 template<
typename delegate_type>
240 menu_item(
const xtd::ustring& text, delegate_type on_click,
const xtd::drawing::image& image,
xtd::forms::menu_item_kind kind,
bool checked,
xtd::forms::shortcut shortcut) : menu_item(
text,
xtd::
event_handler(on_click), image, kind,
checked,
shortcut) {}
241 menu_item(
const xtd::ustring& text,
const std::initializer_list<const_menu_item_ref>& items);
265 bool checked() const noexcept;
273 bool enabled() const noexcept;
279 bool is_parent() const noexcept override;
315 void perform_click();
343 std::unique_ptr<
xtd::
object> clone() const override;
346 void destroy_menu_handle(
intptr handle) override;
354 void on_item_removed(
size_t pos,
menu_item_ref item) override;
358 std::shared_ptr<data> data_;
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.h:49
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Represents an event.
Definition event.h:21
Represents the menu structure of a form.
Definition main_menu.h:39
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
Definition iclonable.h:19
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.h:32
#define forms_export_
Define shared library export.
Definition forms_export.h:13
intmax_t intptr
Represent a pointer or a handle.
Definition types.h:153
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::shortcut enum class.