2009-01-04 18:52:57 +00:00
|
|
|
/********************************************/
|
2009-11-03 13:26:31 +00:00
|
|
|
/* Definitions for the EESchema program: */
|
2009-01-04 18:52:57 +00:00
|
|
|
/********************************************/
|
|
|
|
|
|
|
|
#ifndef CLASS_DRAWSHEET_PATH_H
|
|
|
|
#define CLASS_DRAWSHEET_PATH_H
|
|
|
|
|
|
|
|
#include "base_struct.h"
|
|
|
|
|
2009-01-06 20:09:32 +00:00
|
|
|
/** Info about complex hierarchies handling:
|
2009-11-03 13:26:31 +00:00
|
|
|
* A hierarchical schematic uses sheets (hierarchical sheets) included in a
|
2009-12-02 21:44:03 +00:00
|
|
|
* given sheet. Each sheet corresponds to a schematic drawing handled by a
|
2009-11-03 13:26:31 +00:00
|
|
|
* SCH_SCREEN structure. A SCH_SCREEN structure contains drawings, and have
|
|
|
|
* a filename to write it's data. Also a SCH_SCREEN display a sheet number
|
|
|
|
* and the name of the sheet.
|
|
|
|
*
|
|
|
|
* In simple (and flat) hierarchies a sheet is linked to a SCH_SCREEN,
|
2009-01-06 20:09:32 +00:00
|
|
|
* and a SCH_SCREEN is used by only one hierarchical sheet.
|
|
|
|
*
|
2009-11-03 13:26:31 +00:00
|
|
|
* In complex hierarchies the same SCH_SCREEN (and its data) is shared between
|
|
|
|
* more than one sheet. Therefore subsheets (like subsheets in a SCH_SCREEN
|
|
|
|
* shared by many sheets) can be also shared. So the same SCH_SCREEN must
|
|
|
|
* handle different components references and parts selection depending on
|
|
|
|
* which sheet is currently selected, and how a given subsheet is selected.
|
|
|
|
* 2 sheets share the same SCH_SCREEN (the same drawings) if they have the
|
|
|
|
* same filename.
|
2009-01-06 20:09:32 +00:00
|
|
|
*
|
2009-11-03 13:26:31 +00:00
|
|
|
* In Kicad each component and sheet receives (when created) an unique
|
|
|
|
* identification called Time Stamp. So each sheet has 2 ids: its time stamp
|
|
|
|
* (that cannot change) and its name ( that can be edited and therefore is
|
|
|
|
* not reliable for strong identification). Kicad uses Time Stamp ( a unique
|
|
|
|
* 32 bit id), to identify sheets in hierarchies.
|
|
|
|
* A given sheet in a hierarchy is fully labeled by its path (or sheet path)
|
|
|
|
* that is the list of time stamp found to access it through the hierarchy
|
|
|
|
* the root sheet is /. All other sheets have a path like /1234ABCD or
|
|
|
|
* /4567FEDC/AA2233DD/. This path can be displayed as human readable sheet
|
|
|
|
* name like: / or /sheet1/include_sheet/ or /sheet2/include_sheet/
|
2009-01-06 20:09:32 +00:00
|
|
|
*
|
|
|
|
* So to know for a given SCH_SCREEN (a given schematic drawings) we must:
|
2009-11-03 13:26:31 +00:00
|
|
|
* 1) Handle all references possibilities.
|
|
|
|
* 2) When acceded by a given selected sheet, display (update) the
|
|
|
|
* corresponding references and sheet path
|
2009-01-06 20:09:32 +00:00
|
|
|
*
|
2009-12-02 21:44:03 +00:00
|
|
|
* The class SCH_SHEET_PATH handles paths used to access a sheet. The class
|
|
|
|
* SCH_SHEET_LIST allows to handle the full (or partial) list of sheets and
|
2009-11-03 13:26:31 +00:00
|
|
|
* their paths in a complex hierarchy. The class EDA_ScreenList allow to
|
|
|
|
* handle the list of SCH_SCREEN. It is useful to clear or save data,
|
|
|
|
* but is not suitable to handle the full complex hierarchy possibilities
|
|
|
|
* (usable in flat and simple hierarchies).
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-11-10 15:30:12 +00:00
|
|
|
class wxFindReplaceData;
|
|
|
|
class SCH_SCREEN;
|
2010-03-16 18:22:59 +00:00
|
|
|
class SCH_MARKER;
|
2010-11-10 15:30:12 +00:00
|
|
|
class SCH_SHEET;
|
|
|
|
class SCH_ITEM;
|
2010-03-16 18:22:59 +00:00
|
|
|
|
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
/**
|
|
|
|
* Class SCH_SHEET_PATH
|
|
|
|
* handles access to a sheet by way of a path.
|
|
|
|
* <p>
|
2009-11-03 13:26:31 +00:00
|
|
|
* The member m_sheets stores the list of sheets from the first (usually
|
2010-07-30 21:41:55 +00:00
|
|
|
* g_RootSheet) to a given sheet in last position.
|
|
|
|
* The _last_ sheet is usually the sheet we want to select or reach (which is
|
|
|
|
* what the function Last() returns).
|
|
|
|
* Others sheets constitute the "path" from the first to the last sheet.
|
2009-01-07 17:33:18 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
class SCH_SHEET_PATH
|
2009-01-04 18:52:57 +00:00
|
|
|
{
|
2009-01-07 20:09:03 +00:00
|
|
|
private:
|
2010-08-04 19:14:51 +00:00
|
|
|
unsigned m_numSheets;
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2009-01-07 20:09:03 +00:00
|
|
|
public:
|
2009-01-04 18:52:57 +00:00
|
|
|
#define DSLSZ 32 // Max number of levels for a sheet path
|
2010-08-04 19:14:51 +00:00
|
|
|
SCH_SHEET* m_sheets[DSLSZ];
|
|
|
|
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
public:
|
|
|
|
SCH_SHEET_PATH();
|
2010-07-30 21:41:55 +00:00
|
|
|
// ~SCH_SHEET_PATH() { };
|
2010-03-16 18:22:59 +00:00
|
|
|
|
|
|
|
void Clear()
|
2009-11-03 13:26:31 +00:00
|
|
|
{
|
|
|
|
m_numSheets = 0;
|
2009-01-07 20:09:03 +00:00
|
|
|
}
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
|
2009-01-07 20:09:03 +00:00
|
|
|
unsigned GetSheetsCount()
|
|
|
|
{
|
|
|
|
return m_numSheets;
|
|
|
|
}
|
2009-01-06 20:09:32 +00:00
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function Cmp
|
2009-01-06 20:09:32 +00:00
|
|
|
* Compare if this is the same sheet path as aSheetPathToTest
|
|
|
|
* @param aSheetPathToTest = sheet path to compare
|
2009-11-03 13:26:31 +00:00
|
|
|
* @return -1 if different, 0 if same
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
int Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const;
|
2009-01-07 17:33:18 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function Last
|
2009-11-03 13:26:31 +00:00
|
|
|
* returns a pointer to the last sheet of the list
|
|
|
|
* One can see the others sheet as the "path" to reach this last sheet
|
2009-01-07 17:33:18 +00:00
|
|
|
*/
|
2010-07-31 23:57:36 +00:00
|
|
|
SCH_SHEET* Last();
|
2009-01-07 17:33:18 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function LastScreen
|
2009-01-07 17:33:18 +00:00
|
|
|
* @return the SCH_SCREEN relative to the last sheet in list
|
|
|
|
*/
|
2009-11-03 13:26:31 +00:00
|
|
|
SCH_SCREEN* LastScreen();
|
2009-01-07 17:33:18 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function LastScreen
|
2009-01-07 17:33:18 +00:00
|
|
|
* @return a pointer to the first schematic item handled by the
|
|
|
|
* SCH_SCREEN relative to the last sheet in list
|
|
|
|
*/
|
2009-11-03 13:26:31 +00:00
|
|
|
SCH_ITEM* LastDrawList();
|
2009-01-06 20:09:32 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
/**
|
|
|
|
* Get the last schematic item relative to the first sheet in the list.
|
|
|
|
*
|
|
|
|
* @return Last schematic item relative to the first sheet in the list if list
|
|
|
|
* is not empty. Otherwise NULL.
|
|
|
|
*/
|
|
|
|
SCH_ITEM* FirstDrawList();
|
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function Push
|
2009-01-06 20:09:32 +00:00
|
|
|
* store (push) aSheet in list
|
2009-11-04 20:46:53 +00:00
|
|
|
* @param aSheet = pointer to the SCH_SHEET to store in list
|
2009-11-03 13:26:31 +00:00
|
|
|
* Push is used when entered a sheet to select or analyze it
|
2010-12-14 15:56:30 +00:00
|
|
|
* This is like cd <directory> in directories navigation
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2009-11-04 20:46:53 +00:00
|
|
|
void Push( SCH_SHEET* aSheet );
|
2009-01-06 20:09:32 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function Pop
|
2009-01-06 20:09:32 +00:00
|
|
|
* retrieves (pop) the last entered sheet and remove it from list
|
2009-11-04 20:46:53 +00:00
|
|
|
* @return a SCH_SHEET* pointer to the removed sheet in list
|
2009-11-03 13:26:31 +00:00
|
|
|
* Pop is used when leaving a sheet after a selection or analyze
|
2009-01-07 17:33:18 +00:00
|
|
|
* This is like cd .. in directories navigation
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2010-07-30 21:41:55 +00:00
|
|
|
SCH_SHEET* Pop();
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function Path
|
2009-11-03 13:26:31 +00:00
|
|
|
* the path uses the time stamps which do not changes even when editing
|
|
|
|
* sheet parameters
|
2009-01-04 18:52:57 +00:00
|
|
|
* a path is something like / (root) or /34005677 or /34005677/00AE4523
|
|
|
|
*/
|
2009-11-03 13:26:31 +00:00
|
|
|
wxString Path();
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-07-31 23:57:36 +00:00
|
|
|
/**
|
|
|
|
* Function PathHumanReadable
|
|
|
|
* returns the sheet path in a human readable form, i.e. as a path made
|
|
|
|
* from sheet names. The the "normal" path instead uses the time
|
|
|
|
* stamps in the path. (Time stamps do not change even when editing
|
|
|
|
* sheet parameters).
|
2009-01-04 18:52:57 +00:00
|
|
|
*/
|
2010-08-03 02:13:33 +00:00
|
|
|
wxString PathHumanReadable() const;
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-11-12 15:17:10 +00:00
|
|
|
/**
|
|
|
|
* Function BuildSheetPathInfoFromSheetPathValue
|
2010-12-14 15:56:30 +00:00
|
|
|
* Fill this with data to access to the hierarchical sheet known by its path \a aPath
|
2009-01-07 20:09:03 +00:00
|
|
|
* @param aPath = path of the sheet to reach (in non human readable format)
|
2010-12-14 15:56:30 +00:00
|
|
|
* @param aFound - Please document me.
|
2009-01-07 20:09:03 +00:00
|
|
|
* @return true if success else false
|
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
bool BuildSheetPathInfoFromSheetPathValue( const wxString& aPath,
|
|
|
|
bool aFound = false );
|
2009-01-07 20:09:03 +00:00
|
|
|
|
2009-01-04 18:52:57 +00:00
|
|
|
/**
|
|
|
|
* Function UpdateAllScreenReferences
|
|
|
|
* updates the reference and the m_Multi parameter (part selection) for all
|
|
|
|
* components on a screen depending on the actual sheet path.
|
2009-11-03 13:26:31 +00:00
|
|
|
* Mandatory in complex hierarchies because sheets use the same screen
|
|
|
|
* (basic schematic)
|
|
|
|
* but with different references and part selections according to the
|
|
|
|
* displayed sheet
|
2009-01-04 18:52:57 +00:00
|
|
|
*/
|
2009-11-03 13:26:31 +00:00
|
|
|
void UpdateAllScreenReferences();
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
/**
|
|
|
|
* Find the next schematic item in this sheet ojbect.
|
|
|
|
*
|
|
|
|
* @param aType - The type of schematic item object to search for.
|
|
|
|
* @param aLastItem - Start search from aLastItem. If no aLastItem, search from
|
|
|
|
* the beginning of the list.
|
|
|
|
* @param aWrap - Wrap around the end of the list to find the next item if aLastItem
|
|
|
|
* is defined.
|
|
|
|
* @return - The next schematic item if found. Otherwise, NULL is returned.
|
|
|
|
*/
|
|
|
|
SCH_ITEM* FindNextItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find the previous schematic item in this sheet path object.
|
|
|
|
*
|
2010-12-14 15:56:30 +00:00
|
|
|
* @param aType - The type of schematic item object to search for.
|
2010-03-16 18:22:59 +00:00
|
|
|
* @param aLastItem - Start search from aLastItem. If no aLastItem, search from
|
|
|
|
* the end of the list.
|
|
|
|
* @param aWrap - Wrap around the beginning of the list to find the next item if aLastItem
|
|
|
|
* is defined.
|
|
|
|
* @return - The previous schematic item if found. Otherwise, NULL is returned.
|
|
|
|
*/
|
|
|
|
SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Search this sheet path for the next item that matches the search criteria.
|
|
|
|
*
|
|
|
|
* @param aSearchData - Criteria to search item against.
|
|
|
|
* @param aLastItem - Find next item after aLastItem if not NULL.
|
2010-10-20 19:43:58 +00:00
|
|
|
* @param aFindLocation - a wxPoint where to put the location of matched item. can be NULL.
|
2010-03-16 18:22:59 +00:00
|
|
|
* @return If found, Returns the next schematic item. Otherwise, returns NULL.
|
|
|
|
*/
|
2010-10-20 19:43:58 +00:00
|
|
|
SCH_ITEM* MatchNextItem( wxFindReplaceData& aSearchData, SCH_ITEM* aLastItem,
|
|
|
|
wxPoint * aFindLocation );
|
2010-03-16 18:22:59 +00:00
|
|
|
|
2009-12-02 21:44:03 +00:00
|
|
|
bool operator=( const SCH_SHEET_PATH& d1 );
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-08-03 02:13:33 +00:00
|
|
|
bool operator==( const SCH_SHEET_PATH& d1 ) const;
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-08-03 02:13:33 +00:00
|
|
|
bool operator!=( const SCH_SHEET_PATH& d1 ) const;
|
2009-01-04 18:52:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
/**
|
|
|
|
* Class SCH_SHEET_LIST
|
|
|
|
* handles the list of Sheets in a hiearchy.
|
|
|
|
* Sheets are not unique, there can be many sheets with the same
|
2009-01-06 20:09:32 +00:00
|
|
|
* filename and the same SCH_SCREEN reference.
|
2010-07-30 21:41:55 +00:00
|
|
|
* The schematic (SCH_SCREEN) is shared between these sheets,
|
2009-01-06 20:09:32 +00:00
|
|
|
* and component references are specific to a sheet path.
|
2010-07-30 21:41:55 +00:00
|
|
|
* When a sheet is entered, component references and sheet number are updated.
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
class SCH_SHEET_LIST
|
2009-01-04 18:52:57 +00:00
|
|
|
{
|
|
|
|
private:
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_PATH* m_List;
|
|
|
|
int m_count; /* Number of sheets included in hierarchy,
|
|
|
|
* starting at the given sheet in constructor .
|
|
|
|
* the given sheet is counted
|
2009-01-04 18:52:57 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
int m_index; /* internal variable to handle GetNext():
|
|
|
|
* cleared by GetFirst()
|
|
|
|
* and incremented by GetNext() after
|
|
|
|
* returning the next item in m_List
|
|
|
|
* Also used for internal calculations in
|
|
|
|
* BuildSheetList()
|
|
|
|
*/
|
|
|
|
SCH_SHEET_PATH m_currList;
|
2009-01-04 18:52:57 +00:00
|
|
|
|
|
|
|
public:
|
2010-07-30 21:41:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
* builds the list of sheets from aSheet.
|
|
|
|
* If aSheet == NULL (default) build the whole list of sheets in hierarchy.
|
|
|
|
* So usually call it with no parameter.
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_LIST( SCH_SHEET* aSheet = NULL );
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2009-12-02 21:44:03 +00:00
|
|
|
~SCH_SHEET_LIST()
|
2009-01-04 18:52:57 +00:00
|
|
|
{
|
|
|
|
if( m_List )
|
|
|
|
free( m_List );
|
|
|
|
m_List = NULL;
|
|
|
|
}
|
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
/**
|
2010-11-12 16:59:16 +00:00
|
|
|
* Function GetCount
|
2009-01-06 20:09:32 +00:00
|
|
|
* @return the number of sheets in list:
|
|
|
|
* usually the number of sheets found in the whole hierarchy
|
|
|
|
*/
|
2009-01-04 18:52:57 +00:00
|
|
|
int GetCount() { return m_count; }
|
2009-01-06 20:09:32 +00:00
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
/**
|
|
|
|
* Function GetFirst
|
|
|
|
* @return the first item (sheet) in m_List and prepare calls to GetNext()
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_PATH* GetFirst();
|
2009-01-06 20:09:32 +00:00
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
/**
|
|
|
|
* Function GetNext
|
|
|
|
* @return the next item (sheet) in m_List or NULL if no more item in
|
2009-11-03 13:26:31 +00:00
|
|
|
* sheet list
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_PATH* GetNext();
|
2009-01-06 20:09:32 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
/**
|
2010-07-30 21:41:55 +00:00
|
|
|
* Function GetLast
|
|
|
|
* returns the last sheet in the sheet list.
|
2010-03-16 18:22:59 +00:00
|
|
|
*
|
|
|
|
* @return Last sheet in the list or NULL if sheet list is empty.
|
|
|
|
*/
|
|
|
|
SCH_SHEET_PATH* GetLast();
|
|
|
|
|
|
|
|
/**
|
2010-07-30 21:41:55 +00:00
|
|
|
* Function GetPrevious
|
|
|
|
* returns the previous sheet in the sheet list.
|
2010-03-16 18:22:59 +00:00
|
|
|
*
|
|
|
|
* @return The previous sheet in the sheet list or NULL if already at the
|
|
|
|
* beginning of the list.
|
|
|
|
*/
|
|
|
|
SCH_SHEET_PATH* GetPrevious();
|
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
/**
|
|
|
|
* Function GetSheet
|
|
|
|
* @return the item (sheet) in aIndex position in m_List or NULL if less
|
2009-11-03 13:26:31 +00:00
|
|
|
* than index items
|
2009-01-06 20:09:32 +00:00
|
|
|
* @param aIndex = index in sheet list to get the sheet
|
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_PATH* GetSheet( int aIndex );
|
2009-01-04 18:52:57 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
/**
|
2010-07-30 21:41:55 +00:00
|
|
|
* Function FindNextItem
|
|
|
|
* searches the entire schematic for the next schematic object.
|
2010-03-16 18:22:59 +00:00
|
|
|
*
|
|
|
|
* @param aType - The type of schematic item to find.
|
|
|
|
* @param aSheetFound - The sheet the item was found in. NULL if the next item
|
|
|
|
* is not found.
|
|
|
|
* @param aLastItem - Find next item after aLastItem if not NULL.
|
|
|
|
* @param aWrap - Wrap past around the end of the list of sheets.
|
|
|
|
* @return If found, Returns the next schematic item. Otherwise, returns NULL.
|
|
|
|
*/
|
|
|
|
SCH_ITEM* FindNextItem( KICAD_T aType, SCH_SHEET_PATH** aSheetFound = NULL,
|
|
|
|
SCH_ITEM* aLastItem = NULL, bool aWrap = true );
|
|
|
|
|
|
|
|
/**
|
2010-07-30 21:41:55 +00:00
|
|
|
* Function FindPreviousItem
|
|
|
|
* searches the entire schematic for the previous schematic item.
|
2010-03-16 18:22:59 +00:00
|
|
|
*
|
|
|
|
* @param aType - The type of schematic item to find.
|
|
|
|
* @param aSheetFound - The sheet the item was found in. NULL if the previous item
|
|
|
|
* is not found.
|
|
|
|
* @param aLastItem - Find the previous item before aLastItem if not NULL.
|
|
|
|
* @param aWrap - Wrap past around the beginning of the list of sheets.
|
|
|
|
* @return If found, the previous schematic item. Otherwise, NULL.
|
|
|
|
*/
|
|
|
|
SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_SHEET_PATH** aSheetFound = NULL,
|
|
|
|
SCH_ITEM* aLastItem = NULL, bool aWrap = true );
|
|
|
|
|
|
|
|
/**
|
2010-07-30 21:41:55 +00:00
|
|
|
* Function MatchNextItem
|
|
|
|
* searches the entire schematic for the next item that matches the search criteria.
|
2010-03-16 18:22:59 +00:00
|
|
|
*
|
|
|
|
* @param aSearchData - Criteria to search item against.
|
|
|
|
* @param aSheetFound - The sheet the item was found in. NULL if the next item
|
|
|
|
* is not found.
|
|
|
|
* @param aLastItem - Find next item after aLastItem if not NULL.
|
2010-10-20 19:43:58 +00:00
|
|
|
* @param aFindLocation - a wxPoint where to put the location of matched item. can be NULL.
|
2010-03-16 18:22:59 +00:00
|
|
|
* @return If found, Returns the next schematic item. Otherwise, returns NULL.
|
|
|
|
*/
|
|
|
|
SCH_ITEM* MatchNextItem( wxFindReplaceData& aSearchData,
|
2010-10-20 19:43:58 +00:00
|
|
|
SCH_SHEET_PATH** aSheetFound,
|
|
|
|
SCH_ITEM* aLastItem,
|
|
|
|
wxPoint * aFindLocation );
|
2010-03-16 18:22:59 +00:00
|
|
|
|
2009-01-04 18:52:57 +00:00
|
|
|
private:
|
2009-01-06 20:09:32 +00:00
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
/**
|
|
|
|
* Function BuildSheetList
|
|
|
|
* builds the list of sheets and their sheet path from \a aSheet.
|
|
|
|
* If aSheet = g_RootSheet, the full sheet path and sheet list is built
|
|
|
|
*
|
|
|
|
* @param aSheet is the starting sheet from which the list is built,
|
|
|
|
* or NULL indicating that g_RootSheet should be used.
|
2009-01-06 20:09:32 +00:00
|
|
|
*/
|
2009-11-04 20:46:53 +00:00
|
|
|
void BuildSheetList( SCH_SHEET* sheet );
|
2009-01-04 18:52:57 +00:00
|
|
|
};
|
|
|
|
|
2010-07-30 21:41:55 +00:00
|
|
|
#endif // CLASS_DRAWSHEET_PATH_H
|