KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CONDITIONAL_MENU::ENTRY Class Reference

< Helper class to organize menu entries. Inserts the entry, preserving the requested order. More...

Public Types

enum  ENTRY_TYPE { ACTION , MENU , WXITEM , SEPARATOR }
 

Public Member Functions

 ENTRY (const TOOL_ACTION *aAction, SELECTION_CONDITION aCondition, int aOrder, bool aCheckmark)
 
 ENTRY (ACTION_MENU *aMenu, SELECTION_CONDITION aCondition, int aOrder)
 
 ENTRY (const wxMenuItem &aItem, BITMAPS aBitmap, SELECTION_CONDITION aCondition, int aOrder, bool aCheckmark)
 
 ENTRY (SELECTION_CONDITION aCondition, int aOrder)
 
 ENTRY (const ENTRY &aEntry)
 
 ~ENTRY ()
 Possible entry types.
 
ENTRY_TYPE Type () const
 
BITMAPS GetIcon () const
 
const TOOL_ACTIONAction () const
 
ACTION_MENUMenu () const
 
wxMenuItem * wxItem () const
 
bool IsCheckmarkEntry () const
 
const SELECTION_CONDITIONCondition () const
 
int Order () const
 
void SetOrder (int aOrder)
 

Private Attributes

ENTRY_TYPE m_type
 
BITMAPS m_icon
 
union {
   const TOOL_ACTION *   action
 
   ACTION_MENU *   menu
 
   wxMenuItem *   wxItem
 
m_data
 Condition to be fulfilled to show the entry in menu.
 
SELECTION_CONDITION m_condition
 Order number, the higher the number the lower position it takes it is in the menu.
 
int m_order
 
bool m_isCheckmarkEntry
 

Detailed Description

< Helper class to organize menu entries. Inserts the entry, preserving the requested order.

Definition at line 122 of file conditional_menu.h.

Member Enumeration Documentation

◆ ENTRY_TYPE

Enumerator
ACTION 
MENU 
WXITEM 
SEPARATOR 

Definition at line 174 of file conditional_menu.h.

Constructor & Destructor Documentation

◆ ENTRY() [1/5]

CONDITIONAL_MENU::ENTRY::ENTRY ( const TOOL_ACTION aAction,
SELECTION_CONDITION  aCondition,
int  aOrder,
bool  aCheckmark 
)
inline

Definition at line 125 of file conditional_menu.h.

References m_data.

◆ ENTRY() [2/5]

CONDITIONAL_MENU::ENTRY::ENTRY ( ACTION_MENU aMenu,
SELECTION_CONDITION  aCondition,
int  aOrder 
)
inline

Definition at line 136 of file conditional_menu.h.

References m_data.

◆ ENTRY() [3/5]

CONDITIONAL_MENU::ENTRY::ENTRY ( const wxMenuItem &  aItem,
BITMAPS  aBitmap,
SELECTION_CONDITION  aCondition,
int  aOrder,
bool  aCheckmark 
)
inline

Definition at line 146 of file conditional_menu.h.

References m_data.

◆ ENTRY() [4/5]

CONDITIONAL_MENU::ENTRY::ENTRY ( SELECTION_CONDITION  aCondition,
int  aOrder 
)
inline

Definition at line 159 of file conditional_menu.h.

◆ ENTRY() [5/5]

CONDITIONAL_MENU::ENTRY::ENTRY ( const ENTRY aEntry)

◆ ~ENTRY()

CONDITIONAL_MENU::ENTRY::~ENTRY ( )

Possible entry types.

Definition at line 253 of file conditional_menu.cpp.

Member Function Documentation

◆ Action()

const TOOL_ACTION * CONDITIONAL_MENU::ENTRY::Action ( ) const
inline

Definition at line 191 of file conditional_menu.h.

References ACTION, m_data, and m_type.

◆ Condition()

const SELECTION_CONDITION & CONDITIONAL_MENU::ENTRY::Condition ( ) const
inline

Definition at line 214 of file conditional_menu.h.

References m_condition.

◆ GetIcon()

BITMAPS CONDITIONAL_MENU::ENTRY::GetIcon ( ) const
inline

Definition at line 186 of file conditional_menu.h.

References m_icon.

◆ IsCheckmarkEntry()

bool CONDITIONAL_MENU::ENTRY::IsCheckmarkEntry ( ) const
inline

Definition at line 209 of file conditional_menu.h.

References m_isCheckmarkEntry.

◆ Menu()

ACTION_MENU * CONDITIONAL_MENU::ENTRY::Menu ( ) const
inline

Definition at line 197 of file conditional_menu.h.

References m_data, m_type, and MENU.

◆ Order()

int CONDITIONAL_MENU::ENTRY::Order ( ) const
inline

Definition at line 219 of file conditional_menu.h.

References m_order.

Referenced by CONDITIONAL_MENU::addEntry().

◆ SetOrder()

void CONDITIONAL_MENU::ENTRY::SetOrder ( int  aOrder)
inline

Definition at line 224 of file conditional_menu.h.

References m_order.

Referenced by CONDITIONAL_MENU::addEntry().

◆ Type()

ENTRY_TYPE CONDITIONAL_MENU::ENTRY::Type ( ) const
inline

Definition at line 181 of file conditional_menu.h.

References m_type.

◆ wxItem()

wxMenuItem * CONDITIONAL_MENU::ENTRY::wxItem ( ) const
inline

Definition at line 203 of file conditional_menu.h.

References m_data, m_type, and WXITEM.

Member Data Documentation

◆ action

const TOOL_ACTION* CONDITIONAL_MENU::ENTRY::action

Definition at line 236 of file conditional_menu.h.

Referenced by ENTRY().

◆ m_condition

SELECTION_CONDITION CONDITIONAL_MENU::ENTRY::m_condition
private

Order number, the higher the number the lower position it takes it is in the menu.

Definition at line 242 of file conditional_menu.h.

Referenced by Condition(), and ENTRY().

◆ 

union { ... } CONDITIONAL_MENU::ENTRY::m_data

Condition to be fulfilled to show the entry in menu.

Referenced by Action(), ENTRY(), Menu(), and wxItem().

◆ m_icon

BITMAPS CONDITIONAL_MENU::ENTRY::m_icon
private

Definition at line 231 of file conditional_menu.h.

Referenced by ENTRY(), and GetIcon().

◆ m_isCheckmarkEntry

bool CONDITIONAL_MENU::ENTRY::m_isCheckmarkEntry
private

Definition at line 247 of file conditional_menu.h.

Referenced by ENTRY(), and IsCheckmarkEntry().

◆ m_order

int CONDITIONAL_MENU::ENTRY::m_order
private

Definition at line 245 of file conditional_menu.h.

Referenced by ENTRY(), Order(), and SetOrder().

◆ m_type

ENTRY_TYPE CONDITIONAL_MENU::ENTRY::m_type
private

Definition at line 230 of file conditional_menu.h.

Referenced by Action(), ENTRY(), Menu(), Type(), and wxItem().

◆ menu

ACTION_MENU* CONDITIONAL_MENU::ENTRY::menu

Definition at line 237 of file conditional_menu.h.

Referenced by ENTRY().

◆ wxItem

wxMenuItem* CONDITIONAL_MENU::ENTRY::wxItem

Definition at line 238 of file conditional_menu.h.

Referenced by ENTRY().


The documentation for this class was generated from the following files: