Improve some comments.

This commit is contained in:
Jeff Young 2020-03-29 20:02:23 +01:00
parent 132d4d3ffa
commit a1d62e0622
2 changed files with 23 additions and 16 deletions

View File

@ -48,18 +48,14 @@ public:
/**
* Function GetItem
* retrieves a RC_ITEM by pointer. The actual item remains owned by the
* list container.
* @param aIndex The 0 based index into the list of the desired item.
* @return const RC_ITEM* - the desired item or NULL if aIndex is out of range.
* retrieves a RC_ITEM by index.
*/
virtual RC_ITEM* GetItem( int aIndex ) = 0;
/**
* Function DeleteItems
* removes and deletes desired item from the list.
* @param aIndex The 0 based index into the list of the desired item which is to be deleted.
* @param aDeep If true, the source item should be deleted as well as the filtered item.
* Function DeleteItem
* removes (and optionally deletes) the indexed item from the list.
* @param aDeep If true, the source item should be deleted as well as its entry in the list.
*/
virtual void DeleteItem( int aIndex, bool aDeep ) = 0;
@ -241,7 +237,8 @@ public:
/**
* Function SetAuxiliaryData
* initialize data for the second (auxiliary) item
* @param aAuxiliaryText = the second text (main text) concerning the second schematic or board item
* @param aAuxiliaryText = the second text (main text) concerning the second schematic
* or board item
* @param aAuxiliaryPos = position the second item
*/
void SetAuxiliaryData( const wxString& aAuxiliaryText, const wxPoint& aAuxiliaryPos )

View File

@ -35,6 +35,13 @@ class TOOL_DISPATCHER;
class ACTIONS;
/*
* Class TOOLS_HOLDER
* A mix-in class which allows its owner to hold a set of tools from the tool framework.
*
* This is just the framework; the owner is responsible for registering individual tools,
* creating the dispatcher, etc.
*/
class TOOLS_HOLDER
{
protected:
@ -42,14 +49,17 @@ protected:
ACTIONS* m_actions;
TOOL_DISPATCHER* m_toolDispatcher;
std::vector<std::string> m_toolStack; // Stack of user-level "tools". Not to be confused
// with a stack of TOOL_BASE instances, because many
// of them implement multiple user-level "tools". The
// user-level "tools" equate to ACTIONs.
std::vector<std::string> m_toolStack; // Stack of user-level "tools". This is NOT a
// stack of TOOL instances, because somewhat
// confusingly most TOOLs implement more than one
// user-level tool. A user-level tool actually
// equates to an ACTION handler, so this stack
// stores ACTION names.
bool m_immediateActions; // Preference for immediate actions. If false, the
// first invocation of a hotkey will just select the
// relevant tool.
bool m_immediateActions; // Preference for immediate actions. If false,
// the first invocation of a hotkey will just
// select the relevant tool rather than executing
// the tool's action.
bool m_dragSelects; // Prefer selection to dragging.
bool m_moveWarpsCursor; // cursor is warped to move/drag origin