Improve wxMenu::Break() documentation and show it in the sample
Document that this method only actually does something in wxMSW. Demonstrate the use of it in the menu sample. See #18692.
This commit is contained in:
@@ -665,6 +665,9 @@ public:
|
|||||||
/**
|
/**
|
||||||
Inserts a break in a menu, causing the next appended item to appear in
|
Inserts a break in a menu, causing the next appended item to appear in
|
||||||
a new column.
|
a new column.
|
||||||
|
|
||||||
|
This function only actually inserts a break in wxMSW and does nothing
|
||||||
|
under the other platforms.
|
||||||
*/
|
*/
|
||||||
virtual void Break();
|
virtual void Break();
|
||||||
|
|
||||||
|
@@ -592,7 +592,15 @@ MyFrame::MyFrame()
|
|||||||
"Enable or disable the last menu item", true);
|
"Enable or disable the last menu item", true);
|
||||||
menuMenu->Append(Menu_Menu_Check, "&Check menu item\tAlt-C",
|
menuMenu->Append(Menu_Menu_Check, "&Check menu item\tAlt-C",
|
||||||
"Check or uncheck the last menu item", true);
|
"Check or uncheck the last menu item", true);
|
||||||
|
|
||||||
|
// Show the effect of Break(). As wxMSW is the only port in which calling
|
||||||
|
// it actually does something, insert a separator under the other platforms.
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
menuMenu->Break();
|
||||||
|
#else
|
||||||
menuMenu->AppendSeparator();
|
menuMenu->AppendSeparator();
|
||||||
|
#endif
|
||||||
|
|
||||||
menuMenu->Append(Menu_Menu_GetInfo, "Get menu item in&fo\tAlt-F",
|
menuMenu->Append(Menu_Menu_GetInfo, "Get menu item in&fo\tAlt-F",
|
||||||
"Show the state of the last menu item");
|
"Show the state of the last menu item");
|
||||||
#if wxUSE_TEXTDLG
|
#if wxUSE_TEXTDLG
|
||||||
|
Reference in New Issue
Block a user