50 wxASSERT( aAction.
GetId() > 0 );
58 wxASSERT( aAction.
GetId() > 0 );
67 wxMenuItem item(
nullptr, aId, aText, aTooltip, wxITEM_NORMAL );
80 wxMenuItem item(
nullptr, aId, aText, aTooltip, wxITEM_CHECK );
121 if( conditionalMenu )
138 wxMenuItem* menuItem =
nullptr;
142 result = cond( aSelection );
144 catch( std::exception& )
152 switch( entry.Type() )
155 Add( *entry.Action(), entry.IsCheckmarkEntry() );
160 entry.Menu()->UpdateTitle();
161 Add( entry.Menu()->Clone() );
166 menuItem =
new wxMenuItem(
this,
167 entry.wxItem()->GetId(),
168 wxGetTranslation( entry.wxItem()->GetItemLabel() ),
169 wxGetTranslation( entry.wxItem()->GetHelp() ),
170 entry.wxItem()->GetKind() );
172 if( !!entry.GetIcon() )
202 if( conditionalMenu )
203 conditionalMenu->
Evaluate( aSelection );
210 if( aEntry.
Order() < 0 )
213 std::list<ENTRY>::iterator it =
m_entries.begin();
238 m_data.wxItem =
new wxMenuItem(
nullptr,
254 if( WXITEM == m_type )
255 delete m_data.wxItem;
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
void AddBitmapToMenuItem(wxMenuItem *aMenu, const wxBitmap &aImage)
Add a bitmap to a menuitem.
BITMAPS
A list of all bitmap identifiers.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
std::function< bool(const SELECTION &)> SELECTION_CONDITION
< Functor type that checks a specific condition for selected items.