diff --git a/interface/wx/menu.h b/interface/wx/menu.h index 1b8a85aaca..0ac578cfd9 100644 --- a/interface/wx/menu.h +++ b/interface/wx/menu.h @@ -665,6 +665,9 @@ public: /** Inserts a break in a menu, causing the next appended item to appear in a new column. + + This function only actually inserts a break in wxMSW and does nothing + under the other platforms. */ virtual void Break(); diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index 3d3f5c2e52..7c42ccd84d 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -592,7 +592,15 @@ MyFrame::MyFrame() "Enable or disable the last menu item", true); menuMenu->Append(Menu_Menu_Check, "&Check menu item\tAlt-C", "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(); +#endif + menuMenu->Append(Menu_Menu_GetInfo, "Get menu item in&fo\tAlt-F", "Show the state of the last menu item"); #if wxUSE_TEXTDLG