8#include <xtd/drawing/image>
10#include <xtd/iclonable>
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>
241 template<
typename delegate_type>
242 menu_item(
const xtd::string& 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) {}
243 menu_item(
const xtd::string& text,
const std::initializer_list<const_menu_item_ref>& items);
267 bool checked() const noexcept;
275 bool enabled() const noexcept;
281 bool is_parent() const noexcept override;
303 const
xtd::
string& text() const noexcept;
317 void perform_click();
322 xtd::
string to_string() const noexcept override;
348 void destroy_menu_handle(
intptr handle) override;
356 void on_item_removed(
size_t pos,
menu_item_ref item) override;
Represents text as a sequence of character units.
Definition basic_string.h:79
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:41
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
Definition iclonable.h:21
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
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.h:25
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::shortcut enum class.