Reformatting.

This commit is contained in:
Maciej Suminski 2013-08-19 09:47:36 +02:00
parent e697a2c41c
commit e87eea7abc
8 changed files with 36 additions and 36 deletions

View File

@ -58,7 +58,6 @@ typedef DELEGATE<int, TOOL_EVENT&> TOOL_STATE_FUNC;
class TOOL_BASE class TOOL_BASE
{ {
public: public:
TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) :
m_type( aType ), m_type( aType ),
m_toolId( aId ), m_toolId( aId ),
@ -125,7 +124,6 @@ protected:
return static_cast<T*>( m ); return static_cast<T*>( m );
} }
protected:
TOOL_Type m_type; TOOL_Type m_type;
TOOL_ID m_toolId; TOOL_ID m_toolId;
std::string m_toolName; std::string m_toolName;

View File

@ -98,7 +98,7 @@ enum TOOL_MouseButtons
enum TOOL_ContextMenuTrigger enum TOOL_ContextMenuTrigger
{ {
CMENU_BUTTON = 0, // On the right button CMENU_BUTTON = 0, // On the right button
CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContxtMenu) CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContextMenu)
CMENU_OFF // Never CMENU_OFF // Never
}; };

View File

@ -65,7 +65,8 @@ public:
* No conditions means any event. * No conditions means any event.
*/ */
template<class T> template<class T>
void Go ( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST & aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); void Go( int (T::*aStateFunc)( TOOL_EVENT& ),
const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_Any, TA_Any ) );
/** /**
* Function Wait() * Function Wait()
@ -78,10 +79,12 @@ public:
/** functions below are not yet implemented - their interface may change */ /** functions below are not yet implemented - their interface may change */
template<class Parameters, class ReturnValue> template<class Parameters, class ReturnValue>
bool InvokeTool ( const std::string& aToolName, const Parameters& parameters, ReturnValue& returnValue ); bool InvokeTool( const std::string& aToolName, const Parameters& parameters,
ReturnValue& returnValue );
template<class Parameters, class ReturnValue> template<class Parameters, class ReturnValue>
bool InvokeWindow ( const std::string& aWindowName, const Parameters& parameters, ReturnValue& returnValue ); bool InvokeWindow( const std::string& aWindowName, const Parameters& parameters,
ReturnValue& returnValue );
template<class T> template<class T>
void Yield( const T& returnValue ); void Yield( const T& returnValue );
@ -104,7 +107,8 @@ private:
// hide TOOL_MANAGER implementation // hide TOOL_MANAGER implementation
template<class T> template<class T>
void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST& aConditions ) void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ),
const TOOL_EVENT_LIST& aConditions )
{ {
TOOL_STATE_FUNC sptr( static_cast<T*>( this ), aStateFunc ); TOOL_STATE_FUNC sptr( static_cast<T*>( this ), aStateFunc );
goInternal( sptr, aConditions ); goInternal( sptr, aConditions );

View File

@ -73,17 +73,17 @@ public:
* An user-defined parameter object can be also passed * An user-defined parameter object can be also passed
*/ */
void InvokeTool( TOOL_ID aToolId ); void InvokeTool( TOOL_ID aToolId );
void InvokeTool( const std::string& name ); void InvokeTool( const std::string& aName );
template <class Parameters> template <class Parameters>
void InvokeTool( const std::string& name, const Parameters& aToolParams ); void InvokeTool( const std::string& aName, const Parameters& aToolParams );
/** /**
* Function FindTool() * Function FindTool()
* Searches for a tool with given name or ID * Searches for a tool with given name or ID
*/ */
TOOL_BASE* FindTool( int aId ); TOOL_BASE* FindTool( int aId ) const;
TOOL_BASE* FindTool( const std::string& aName ); TOOL_BASE* FindTool( const std::string& aName ) const;
/** /**
* Resets the state of a given tool by clearing its wait and * Resets the state of a given tool by clearing its wait and

View File

@ -124,7 +124,7 @@ public:
/** /**
* Function ViewIsVisible() * Function ViewIsVisible()
* Returns if the item is visible (or not). * Returns information if the item is visible (or not).
* *
* @return when true, the item is visible (i.e. to be displayed, not visible in the * @return when true, the item is visible (i.e. to be displayed, not visible in the
* *current* viewport) * *current* viewport)
@ -160,7 +160,7 @@ public:
* Function ViewRelease() * Function ViewRelease()
* Releases the item from an associated dynamic VIEW. For static views calling has no effect. * Releases the item from an associated dynamic VIEW. For static views calling has no effect.
*/ */
void ViewRelease(); virtual void ViewRelease();
protected: protected:
friend class VIEW; friend class VIEW;
@ -171,7 +171,7 @@ protected:
* *
* @param aView[]: dynamic VIEW instance the item is being added to. * @param aView[]: dynamic VIEW instance the item is being added to.
*/ */
void viewAssign( VIEW* aView ) virtual void viewAssign( VIEW* aView )
{ {
// release the item from a previously assigned dynamic view (if there is any) // release the item from a previously assigned dynamic view (if there is any)
ViewRelease(); ViewRelease();
@ -182,7 +182,6 @@ protected:
VIEW* m_view; ///* Current dynamic view the item is assigned to. VIEW* m_view; ///* Current dynamic view the item is assigned to.
bool m_visible; ///* Are we visible in the current dynamic VIEW. bool m_visible; ///* Are we visible in the current dynamic VIEW.
private:
///* Helper for storing cached items group ids ///* Helper for storing cached items group ids
typedef std::pair<int, int> GroupPair; typedef std::pair<int, int> GroupPair;
@ -198,7 +197,7 @@ private:
* @param aLayer is the layer number for which group id is queried. * @param aLayer is the layer number for which group id is queried.
* @return group id or -1 in case there is no group id (ie. item is not cached). * @return group id or -1 in case there is no group id (ie. item is not cached).
*/ */
int getGroup( int aLayer ) const; virtual int getGroup( int aLayer ) const;
/** /**
* Function getAllGroups() * Function getAllGroups()
@ -206,7 +205,7 @@ private:
* *
* @return vector of group ids. * @return vector of group ids.
*/ */
std::vector<int> getAllGroups() const; virtual std::vector<int> getAllGroups() const;
/** /**
* Function setGroup() * Function setGroup()
@ -215,13 +214,13 @@ private:
* @param aLayer is the layer numbe. * @param aLayer is the layer numbe.
* @param aGroup is the group id. * @param aGroup is the group id.
*/ */
void setGroup( int aLayer, int aGroup ); virtual void setGroup( int aLayer, int aGroup );
/** /**
* Function deleteGroups() * Function deleteGroups()
* Removes all of the stored group ids. Forces recaching of the item. * Removes all of the stored group ids. Forces recaching of the item.
*/ */
void deleteGroups(); virtual void deleteGroups();
/** /**
* Function storesGroups() * Function storesGroups()
@ -229,7 +228,7 @@ private:
* *
* @returns true in case it is cached at least for one layer. * @returns true in case it is cached at least for one layer.
*/ */
bool storesGroups() const; virtual bool storesGroups() const;
}; };
} // namespace KiGfx } // namespace KiGfx

View File

@ -367,7 +367,6 @@ enum pcbnew_ids
ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD,
ID_SELECTION_TOOL ID_SELECTION_TOOL
}; };
#endif // PCBNEW_ID_H_ #endif // PCBNEW_ID_H_