Represents an individual item that is displayed within a main_menu or context_menu.
Protected Attributes | |
friend | main_menu |
friend | context_menu |
Protected Attributes inherited from xtd::forms::menu | |
friend | menu_item |
Public Events | |
event< menu_item, event_handler > | click |
Occurs when the menu item is clicked or selected using a shortcut key or access key defined for the menu item. | |
Public Constructors | |
menu_item () | |
Initializes a menu_item with a blank caption. | |
menu_item (const xtd::string &text) | |
Initializes a new instance of the menu_item class with a specified caption for the menu item. | |
menu_item (const xtd::string &text, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, const xtd::drawing::image &image) | |
Initializes a new instance of the class with a specified caption, and image menu item. | |
menu_item (const xtd::string &text, const xtd::drawing::image &image, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, and image menu item, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::forms::menu_item_kind kind) | |
Initializes a new instance of the class with a specified caption, and kind the menu item. | |
menu_item (const xtd::string &text, xtd::forms::menu_item_kind kind, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, kind the menu item, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind) | |
Initializes a new instance of the class with a specified caption, image menu item, and kind the menu item. | |
menu_item (const xtd::string &text, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, image menu item, kind the menu item, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::forms::menu_item_kind kind, bool checked) | |
Initializes a new instance of the class with a specified caption, kind the menu item and checked. | |
menu_item (const xtd::string &text, xtd::forms::menu_item_kind kind, bool checked, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, kind the menu item, checked, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind, bool checked) | |
Initializes a new instance of the class with a specified caption, image menu item, kind the menu item, and checked. | |
menu_item (const xtd::string &text, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind, bool checked, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, image menu item, kind the menu item, checked, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click) | |
Initializes a new instance of the class with a specified caption and event handler for the Click event of the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, event handler, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, const xtd::drawing::image &image) | |
Initializes a new instance of the class with a specified caption, event handler, and image menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, const xtd::drawing::image &image, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, event handler, and image menu item, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, xtd::forms::menu_item_kind kind) | |
Initializes a new instance of the class with a specified caption, event handler, and kind the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, xtd::forms::menu_item_kind kind, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, event handler, kind the menu item, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind) | |
Initializes a new instance of the class with a specified caption, event handler, image menu item, and kind the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, event handler, image menu item, kind the menu item, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, xtd::forms::menu_item_kind kind, bool checked) | |
Initializes a new instance of the class with a specified caption, event handler, kind the menu item and checked. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, xtd::forms::menu_item_kind kind, bool checked, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, event handler, kind the menu item, checked, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind, bool checked) | |
Initializes a new instance of the class with a specified caption, event handler, image menu item, kind the menu item, and checked. | |
menu_item (const xtd::string &text, xtd::event_handler on_click, const xtd::drawing::image &image, xtd::forms::menu_item_kind kind, bool checked, xtd::forms::shortcut shortcut) | |
Initializes a new instance of the class with a specified caption, event handler, image menu item, kind the menu item, checked, and associated shortcut key for the menu item. | |
menu_item (const xtd::string &text, const std::vector< menu_item_ref > &items) | |
Initializes a new instance of the class with a specified caption and an array of submenu items defined for the menu item. | |
menu_item (menu_item &&)=default | |
menu_item (const menu_item &)=default | |
menu_item & | operator= (const menu_item &)=default |
Public Properties | |
intptr | menu_id () const noexcept |
Gets a value indicating the Windows identifier for this menu item. | |
bool | checked () const noexcept |
Gets a value indicating whether a check mark appears next to the text of the menu item. | |
menu_item & | checked (bool value) |
Sets a value indicating whether a check mark appears next to the text of the menu item. | |
bool | enabled () const noexcept |
Gets a value indicating whether the menu item is enabled. | |
menu_item & | enabled (bool value) |
Gets a value indicating whether the menu item is enabled. | |
bool | is_parent () const noexcept override |
Gets a value indicating whether this menu contains any menu items. | |
xtd::forms::menu_item_kind | kind () const noexcept |
Gets a value that represents the kind of menu item. | |
menu_item & | kind (xtd::forms::menu_item_kind value) |
Sets a value that represents the kind of menu item. | |
xtd::forms::shortcut | shortcut () const noexcept |
Gets a value indicating the shortcut key associated with the menu item. | |
menu_item & | shortcut (xtd::forms::shortcut value) |
Sets a value indicating the shortcut key associated with the menu item. | |
const xtd::string & | text () const noexcept |
Gets a value indicating the caption of the menu item. | |
menu_item & | text (const xtd::string &value) |
Sets a value indicating the caption of the menu item. | |
Public Methods | |
void | perform_click () |
Generates a xtd::forms::menu_item::click event for the xtd::forms::menu_item, simulating a click by a user. | |
xtd::string | to_string () const noexcept override |
Returns a string that represents the menu control. | |
Protected Methods | |
xtd::uptr< xtd::object > | clone () const override |
Creates a new object that is a copy of the current instance. | |
intptr | create_menu_handle () override |
Creates a new handle to the Menu. | |
void | destroy_menu_handle (intptr handle) override |
Destroys the handle to the Menu. | |
virtual void | on_click (const event_args &e) |
Raises the Click event. | |
void | on_item_added (size_t pos, menu_item_ref item) override |
void | on_item_removed (size_t pos, menu_item_ref item) override |
Additional Inherited Members | |
Public Types inherited from xtd::forms::menu | |
using | menu_item_collection = layout::arranged_element_collection< menu_item_ref > |
Represents a collection of menu_item objects. | |
Static Public Attributes inherited from xtd::forms::menu | |
static constexpr int32 | find_handle |
Specifies that the find_menu_item(int32, intptr) method should search for a handle. | |
static constexpr int32 | find_shortcut |
Specifies that the find_menu_item(int32, intptr) method should search for a shortcut. | |
Public Member Functions inherited from xtd::forms::menu | |
intptr | handle () const noexcept |
Gets a value representing the window handle for the menu. | |
const menu_item & | mdi_list_item () const noexcept |
Gets a value indicating the menu_item that is used to display a list of multiple document interface (MDI) child forms. | |
const menu_item_collection & | menu_items () const noexcept |
Gets a value indicating the collection of menu_item objects associated with the menu. | |
menu_item_collection & | menu_items () noexcept |
Gets a value indicating the collection of menu_item objects associated with the menu. | |
menu & | menu_items (const menu_item_collection &value) |
Sets a value indicating the collection of menu_item objects associated with the menu. | |
const xtd::string & | name () const noexcept |
Gets the name of the menu. | |
menu & | name (const xtd::string &value) |
Sets the name of the menu. | |
std::any | tag () const noexcept |
Gets user-defined data associated with the control. | |
menu & | tag (std::any value) |
Sets user-defined data associated with the control. | |
bool | equals (const menu &) const noexcept override |
std::optional< std::reference_wrapper< context_menu > > | get_context_menu () const noexcept |
Gets the context_menu that contains this menu. | |
std::optional< std::reference_wrapper< main_menu > > | get_main_menu () const noexcept |
Gets the main_menu that contains this menu. | |
virtual void | merge_menu (const menu &menu_src) |
Merges the MenuItem objects of one menu with the current menu. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
Public Member Functions inherited from xtd::iequatable< menu > | |
virtual bool | equals (const menu &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
Public Member Functions inherited from xtd::iclonable | |
Static Public Member Functions inherited from xtd::forms::menu | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
Static Public Member Functions inherited from xtd::object | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<typename object_a_t , typename object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
Protected Member Functions inherited from xtd::forms::menu | |
menu () | |
Initializes a new instance of the Menu class. | |
menu (const menu_item_collection &items) | |
Initializes a new instance of the Menu class. | |
void | clone_menu (const menu &menu_src) |
Copies the menu that is passed as a parameter to the current menu. | |
Protected Member Functions inherited from xtd::forms::component | |
component () | |
Initialises a new instance of the component class. | |
virtual bool | can_raise_events () const noexcept |
Gets a value indicating whether the component can raise an event. | |
bool | design_mode () const noexcept |
Gets a value that indicates whether the component is currently in design mode. | |
xtd::forms::menu_item::menu_item | ( | ) |
|
explicit |
Initializes a new instance of the menu_item class with a specified caption for the menu item.
text | The caption for the menu item. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, and associated shortcut key for the menu item.
text | The caption for the menu item. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
const xtd::drawing::image & | image | ||
) |
Initializes a new instance of the class with a specified caption, and image menu item.
text | The caption for the menu item. |
image | A xtd::drawing::image menu item. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
const xtd::drawing::image & | image, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, and image menu item, and associated shortcut key for the menu item.
text | The caption for the menu item. |
image | A xtd::drawing::image menu item. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::forms::menu_item_kind | kind | ||
) |
Initializes a new instance of the class with a specified caption, and kind the menu item.
text | The caption for the menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::forms::menu_item_kind | kind, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, kind the menu item, and associated shortcut key for the menu item.
text | The caption for the menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind | ||
) |
Initializes a new instance of the class with a specified caption, image menu item, and kind the menu item.
text | The caption for the menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, image menu item, kind the menu item, and associated shortcut key for the menu item.
text | The caption for the menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::forms::menu_item_kind | kind, | ||
bool | checked | ||
) |
Initializes a new instance of the class with a specified caption, kind the menu item and checked.
text | The caption for the menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::forms::menu_item_kind | kind, | ||
bool | checked, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, kind the menu item, checked, and associated shortcut key for the menu item.
text | The caption for the menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind, | ||
bool | checked | ||
) |
Initializes a new instance of the class with a specified caption, image menu item, kind the menu item, and checked.
text | The caption for the menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind, | ||
bool | checked, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, image menu item, kind the menu item, checked, and associated shortcut key for the menu item.
text | The caption for the menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click | ||
) |
Initializes a new instance of the class with a specified caption and event handler for the Click event of the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, event handler, and associated shortcut key for the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
const xtd::drawing::image & | image | ||
) |
Initializes a new instance of the class with a specified caption, event handler, and image menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
image | A xtd::drawing::image menu item. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
const xtd::drawing::image & | image, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, event handler, and image menu item, and associated shortcut key for the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
image | A xtd::drawing::image menu item. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
xtd::forms::menu_item_kind | kind | ||
) |
Initializes a new instance of the class with a specified caption, event handler, and kind the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
xtd::forms::menu_item_kind | kind, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, event handler, kind the menu item, and associated shortcut key for the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind | ||
) |
Initializes a new instance of the class with a specified caption, event handler, image menu item, and kind the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, event handler, image menu item, kind the menu item, and associated shortcut key for the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
xtd::forms::menu_item_kind | kind, | ||
bool | checked | ||
) |
Initializes a new instance of the class with a specified caption, event handler, kind the menu item and checked.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
xtd::forms::menu_item_kind | kind, | ||
bool | checked, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, event handler, kind the menu item, checked, and associated shortcut key for the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind, | ||
bool | checked | ||
) |
Initializes a new instance of the class with a specified caption, event handler, image menu item, kind the menu item, and checked.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
xtd::event_handler | on_click, | ||
const xtd::drawing::image & | image, | ||
xtd::forms::menu_item_kind | kind, | ||
bool | checked, | ||
xtd::forms::shortcut | shortcut | ||
) |
Initializes a new instance of the class with a specified caption, event handler, image menu item, kind the menu item, checked, and associated shortcut key for the menu item.
text | The caption for the menu item. |
on_click | The event_handler that handles the Click event for this menu item. |
image | A xtd::drawing::image menu item. |
kind | One of the xtd::forms::menu_item_kind value. |
checked | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
shortcut | One of the xtd::forms::shortcut values. |
xtd::forms::menu_item::menu_item | ( | const xtd::string & | text, |
const std::vector< menu_item_ref > & | items | ||
) |
Initializes a new instance of the class with a specified caption and an array of submenu items defined for the menu item.
text | The caption for the menu item. |
items | An array of menu_item objects that contains the submenu items for this menu item. |
|
noexcept |
Gets a value indicating the Windows identifier for this menu item.
|
noexcept |
Gets a value indicating whether a check mark appears next to the text of the menu item.
menu_item & xtd::forms::menu_item::checked | ( | bool | value | ) |
Sets a value indicating whether a check mark appears next to the text of the menu item.
value | true if there is a check mark next to the menu item; otherwise, false. The default is false. |
|
noexcept |
Gets a value indicating whether the menu item is enabled.
menu_item & xtd::forms::menu_item::enabled | ( | bool | value | ) |
Gets a value indicating whether the menu item is enabled.
value | true if the menu item is enabled; otherwise, false. The default is true. |
|
overridevirtualnoexcept |
Gets a value indicating whether this menu contains any menu items.
Reimplemented from xtd::forms::menu.
|
noexcept |
Gets a value that represents the kind of menu item.
menu_item & xtd::forms::menu_item::kind | ( | xtd::forms::menu_item_kind | value | ) |
Sets a value that represents the kind of menu item.
value | One of the xtd::forms::menu_item_kind value. |
|
noexcept |
Gets a value indicating the shortcut key associated with the menu item.
menu_item & xtd::forms::menu_item::shortcut | ( | xtd::forms::shortcut | value | ) |
Sets a value indicating the shortcut key associated with the menu item.
value | One of the xtd::forms::shortcut values. The default is xtd::forms::shortcut::none. |
|
noexcept |
Gets a value indicating the caption of the menu item.
menu_item & xtd::forms::menu_item::text | ( | const xtd::string & | value | ) |
Sets a value indicating the caption of the menu item.
value | The text caption of the menu item. |
void xtd::forms::menu_item::perform_click | ( | ) |
Generates a xtd::forms::menu_item::click event for the xtd::forms::menu_item, simulating a click by a user.
|
overridevirtualnoexcept |
Returns a string that represents the menu control.
Reimplemented from xtd::forms::menu.
|
overrideprotectedvirtual |
Creates a new object that is a copy of the current instance.
Implements xtd::iclonable.
|
overrideprotectedvirtual |
Creates a new handle to the Menu.
Implements xtd::forms::menu.
|
overrideprotectedvirtual |
Destroys the handle to the Menu.
handle | A handle to the menu. |
Reimplemented from xtd::forms::menu.
|
protectedvirtual |
Raises the Click event.
e | An xtd::event_args that contains the event data. |
|
overrideprotectedvirtual |
Reimplemented from xtd::forms::menu.
|
overrideprotectedvirtual |
Reimplemented from xtd::forms::menu.
event<menu_item, event_handler> xtd::forms::menu_item::click |
Occurs when the menu item is clicked or selected using a shortcut key or access key defined for the menu item.