wex  v21.04.0
Public Types | Public Member Functions | List of all members
wex::menu Class Reference

Adds artid, edit, printing and tool menu items to wxMenu. More...

#include <wex/menu.h>

Inherits wxMenu.

Public Types

enum  {
  IS_EMPTY = 0 , IS_POPUP , IS_READ_ONLY , IS_SELECTED ,
  IS_VISUAL , ALLOW_CLEAR , CAN_PASTE , DEFAULT = CAN_PASTE
}
 The menu flags. More...
 

Public Member Functions

 menu (menu_t style=menu_t().set(DEFAULT), const std::vector< menu_item > &items={{}})
 Default constructor.
 
 menu (const std::vector< menu_item > &items)
 Constructor with a vector of items.
 
 menu (const std::string &title, menu_t style)
 Construct a menu with a title.
 
size_t append (const std::vector< menu_item > &items)
 Appends a vector of items. More...
 
auto & style () const
 Returns the style.
 
auto & style ()
 Sets the style.
 

Detailed Description

Adds artid, edit, printing and tool menu items to wxMenu.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The menu flags.

Enumerator
IS_EMPTY 

control is empty

IS_POPUP 

menu should appear as popup, instead of main menu

IS_READ_ONLY 

readonly control

IS_SELECTED 

text is selected somewhere on the control

IS_VISUAL 

the control has visual mode

ALLOW_CLEAR 

add clear item in menu

CAN_PASTE 

add paste item in menu

DEFAULT 

default

Member Function Documentation

◆ append()

size_t wex::menu::append ( const std::vector< menu_item > &  items)

Appends a vector of items.

Returns number of items appended.