38 enum class BITMAPS : unsigned int;
65 class wxFindReplaceData;
187 for(
const KICAD_T* p = aScanTypes; *p !=
EOT; ++p )
224 virtual bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const 237 virtual bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const 299 for(
auto it : aList )
301 if( static_cast<EDA_ITEM*>( it )->
Visit( inspector, testData, scanTypes )
314 std::vector<T>& aList,
INSPECTOR inspector,
void* testData,
const KICAD_T scanTypes[] )
316 for(
auto it : aList )
318 if( static_cast<EDA_ITEM*>( it )->
Visit( inspector, testData, scanTypes )
329 virtual wxString
GetClass()
const = 0;
364 virtual bool Matches(
const wxFindReplaceData& aSearchData,
void* aAuxData )
const 378 static bool Replace(
const wxFindReplaceData& aSearchData, wxString& aText );
391 virtual bool Replace(
const wxFindReplaceData& aSearchData,
void* aAuxData =
nullptr )
429 virtual void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
442 virtual void Show(
int nestLevel, std::ostream& os )
const = 0;
444 void ShowDummy( std::ostream& os )
const;
453 static std::ostream& NestedSpace(
int nestLevel, std::ostream& os );
471 bool Matches(
const wxString& aText,
const wxFindReplaceData& aSearchData )
const;
#define IS_CHANGED
Item was edited, and modified.
EDA_ITEM * m_parent
Linked list: Link (parent struct)
virtual SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
May be re-implemented for each derived class in order to handle all the types given by its member dat...
#define DO_NOT_DRAW
Used to disable draw function.
virtual bool Matches(const wxFindReplaceData &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
bool operator<(const EDA_ITEM &aItem) const
Test if another item is less than this object.
#define STARTPOINT
When a line is selected, these flags indicate which.
#define IS_NEW
New item, just created.
#define IS_RESIZING
Item being resized.
virtual void SetPosition(const wxPoint &aPos)
virtual const wxPoint GetFocusPosition() const
Similar to GetPosition, but allows items to return their visual center rather than their anchor.
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
#define IS_DRAGGING
Item being dragged.
void SetFlags(EDA_ITEM_FLAGS aMask)
bool IsBrightened() const
void SetStatus(EDA_ITEM_FLAGS aStatus)
std::uint32_t EDA_ITEM_FLAGS
EDA_ITEM_FLAGS GetStatus() const
#define ENDPOINT
ends. (Used to support dragging.)
virtual wxPoint GetPosition() const
An abstract base class for deriving all objects that can be added to a VIEW.
The base class for create windows for drawing purpose.
EDA_ITEM * new_clone(const EDA_ITEM &aItem)
Provide cloning capabilities for all Boost pointer containers of EDA_ITEM pointers.
A 2D bounding box built on top of an origin point and size vector.
const INSPECTOR_FUNC & INSPECTOR
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
virtual void SetParent(EDA_ITEM *aParent)
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
#define IS_LINKED
Used in calculation to mark linked items (temporary use)
virtual bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const
Test if aPosition is inside or on the boundary of this item.
#define CANDIDATE
flag indicating that the structure is connected
#define IS_PASTED
Modifier on IS_NEW which indicates it came from clipboard.
void SetState(EDA_ITEM_FLAGS type, bool state)
#define IS_MOVING
Item being moved.
std::function< SEARCH_RESULT(EDA_ITEM *aItem, void *aTestData) > INSPECTOR_FUNC
Used to inspect and possibly collect the (search) results of iterating over a list or tree of KICAD_T...
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
virtual void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
void SetForceVisible(bool aEnable)
Set and clear force visible flag used to force the item to be drawn even if it's draw attribute is se...
#define EDA_ITEM_ALL_FLAGS
EDA_ITEM * GetParent() const
#define STRUCT_DELETED
flag indication structures to be erased
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
virtual bool IsType(const KICAD_T aScanTypes[]) const
Check whether the item is one of the listed types.
int GetState(EDA_ITEM_FLAGS type) const
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
EDA_ITEM_FLAGS GetEditFlags() const
static bool Sort(const EDA_ITEM *aLeft, const EDA_ITEM *aRight)
Helper function to be used by the C++ STL sort algorithm for sorting a STL container of EDA_ITEM poin...
virtual bool Replace(const wxFindReplaceData &aSearchData, void *aAuxData=nullptr)
Perform a text replace using the find and replace criteria in aSearchData on items that support text ...
static bool Replace(const wxFindReplaceData &aSearchData, wxString &aText)
Perform a text replace on aText using the find and replace criteria in aSearchData on items that supp...
EDA_ITEM & operator=(const EDA_ITEM &aItem)
Assign the members of aItem to another object.
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType)
EDA_ITEM_FLAGS GetFlags() const
#define ENTERED
indicates a group has been entered
bool IsForceVisible() const
virtual wxString GetClass() const =0
Return the class name.
#define SKIP_STRUCT
flag indicating that the structure should be ignored
#define TEMP_SELECTED
flag indicating that the structure has already selected
BITMAPS
A list of all bitmap identifiers.
virtual wxString GetSelectMenuText(EDA_UNITS aUnits) const
Return the text to display to be used in the selection clarification context menu when multiple items...
virtual BITMAPS GetMenuImage() const
Return a pointer to an image to be used in menus.
virtual bool IsReplaceable() const
Override this method in any derived object that supports test find and replace.
Handle the component boundary box.
virtual bool HitTest(const EDA_RECT &aRect, bool aContained, int aAccuracy=0) const
Test if aRect intersects this item.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T m_structType
Run time identification, keep private so it can never be changed after a ctor sets it.
static SEARCH_RESULT IterateForward(std::deque< T > &aList, INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
This changes first parameter to avoid the DList and use the main queue instead.
virtual const EDA_RECT GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
EDA_MSG_PANEL items for displaying messages.
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
static SEARCH_RESULT IterateForward(std::vector< T > &aList, INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
Change first parameter to avoid the DList and use std::vector instead.
KICAD_T Type() const
Returns the type of object.
#define IS_WIRE_IMAGE
Item to be drawn as wireframe while editing.
#define BRIGHTENED
item is drawn with a bright contour
FIND_REPLACE_FLAGS
Additional flag values wxFindReplaceData::m_Flags.