25 #ifndef DS_DRAW_ITEM_H 26 #define DS_DRAW_ITEM_H 66 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
68 virtual void SetEnd(
const wxPoint& aPos ) { }
91 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override 98 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
131 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_LINE" ); }
142 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
149 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
168 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_POLYPOLYGONS" ); }
175 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
176 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
183 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
217 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_RECT" ); }
230 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
231 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
236 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
262 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_PAGE" ); }
276 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override {
return false; }
281 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
301 const wxSize& aSize,
int aPenWidth,
bool aItalic =
false,
302 bool aBold =
false ) :
313 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_TEXT" ); }
323 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
324 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
329 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
348 virtual wxString
GetClass()
const override {
return wxT(
"DS_DRAW_ITEM_BITMAP" ); }
355 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
356 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
362 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
583 #endif // DS_DRAW_ITEM_H bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
virtual void PrintWsItem(const RENDER_SETTINGS *aSettings)
bool m_isFirstPage
Is this the first page or not.
void SetStart(const wxPoint &aPos)
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void SetStart(const wxPoint &aPos)
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
virtual wxString GetClass() const override
Return the class name.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
void SetMarkerPos(const wxPoint &aPos)
Container for project specific data.
const TITLE_BLOCK * m_titleBlock
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
const wxPoint & GetMarkerPos() const
void SetMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to draw/plot units.
void SetPosition(const wxPoint &aPos) override
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
wxString BuildFullText(const wxString &aTextbase)
Return the full text corresponding to the aTextbase, after replacing format symbols by the correspond...
void SetEnd(const wxPoint &aPos) override
wxPoint GetPosition() const override
void PrintWsItem(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
void SetDefaultPenSize(int aPenSize)
const PROJECT * m_project
DS_DRAW_ITEM_LINE(DS_DATA_ITEM *aPeer, int aIndex, wxPoint aStart, wxPoint aEnd, int aPenWidth)
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
virtual ~DS_DRAW_ITEM_BASE()
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
void SetItalic(bool isItalic)
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
wxPoint GetPosition() const override
void SetTextPos(const wxPoint &aPoint)
void PrintWsItem(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void SetTextSize(const wxSize &aNewSize)
void SetPosition(const wxPoint &aPos) override
virtual wxString GetClass() const override
Return the class name.
The base class for create windows for drawing purpose.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
const wxPoint & GetStart() const
wxPoint GetPosition() const override
const wxPoint & GetStart() const
void SetPosition(const wxPoint &aPos) override
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
void PrintWsItem(const RENDER_SETTINGS *, const wxPoint &) override
void SetPaperFormat(const wxString *aFormatName)
Set the paper format name (mainly for drawing sheet editor)
void Print(const RENDER_SETTINGS *aSettings)
Draws the item list created by BuildDrawItemsList.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
virtual bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const
Test if aPosition is inside or on the boundary of this item.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
Base class to handle basic graphic items.
void SetPageSize(const wxSize &aSize)
wxString m_pageNumber
The actual page number displayed in the title block.
SHAPE_POLY_SET & GetPolygons()
DS_DRAW_ITEM_BASE * GetNext()
int GetDefaultPenSize() const
void SetPosition(const wxPoint &aPos) override
virtual wxString GetClass() const override
Return the class name.
DS_DRAW_ITEM_BASE(DS_DATA_ITEM *aPeer, int aIndex, KICAD_T aType)
static void GetTextVars(wxArrayString *aVars)
Represent a set of closed polygons.
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
Describe the page size and margins of a paper page on which to eventually print or plot.
wxPoint GetPosition() const override
wxSize GetPageSize() const
void SetTextAngle(double aAngle) override
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
virtual wxString GetClass() const override
Return the class name.
double GetMilsToIUfactor()
Get the scalar to convert pages units (mils) to draw/plot units.
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
int m_sheetCount
The number of sheets.
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
DS_DRAW_ITEM_POLYPOLYGONS(DS_DATA_ITEM *aPeer, int aIndex, wxPoint aPos, int aPenWidth)
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
A rectangle with thick segment showing the page limits and a marker showing the coordinate origin.
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Non filled rectangle with thick segment.
DS_DRAW_ITEM_BITMAP(DS_DATA_ITEM *aPeer, int aIndex, wxPoint aPos)
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
void Append(DS_DRAW_ITEM_BASE *aItem)
DS_DATA_ITEM * GetPeer() const
std::vector< DS_DRAW_ITEM_BASE * > m_graphicList
double GetMarkerSize() const
int GetIndexInPeer() const
virtual wxString GetClass() const override
Return the class name.
SHAPE_POLY_SET m_Polygons
The list of polygons.
virtual void SetEnd(const wxPoint &aPos)
DS_DRAW_ITEM_TEXT(DS_DATA_ITEM *aPeer, int aIndex, const wxString &aText, const wxPoint &aPos, const wxSize &aSize, int aPenWidth, bool aItalic=false, bool aBold=false)
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Drawing sheet structure type definitions.
const wxString * m_sheetLayer
wxPoint GetPosition() const override
const wxString * m_paperFormat
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
Handle the component boundary box.
void SetProject(const PROJECT *aProject)
A base class for most all the KiCad significant classes used in schematics and boards.
virtual wxString GetClass() const override
Return the class name.
void SetTitleBlock(const TITLE_BLOCK *aTblock)
Set the title block (mainly for drawing sheet editor)
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
const wxPoint & GetTextPos() const
const wxPoint & GetEnd() const
wxPoint GetPosition() const override
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
virtual int GetPenWidth() const
void SetPosition(const wxPoint &aPos) override
void GetAllItems(std::vector< DS_DRAW_ITEM_BASE * > *aList)
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
const EDA_RECT GetBoundingBox() const override=0
Return the orthogonal bounding box of this object for display purposes.
Message panel definition file.
DS_DRAW_ITEM_BASE * GetFirst()
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
DS_DRAW_ITEM_RECT(DS_DATA_ITEM *aPeer, int aIndex, wxPoint aStart, wxPoint aEnd, int aPenWidth)
void PrintWsItem(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
const wxPoint & GetEnd() const
void Remove(DS_DRAW_ITEM_BASE *aItem)
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
DS_DRAW_ITEM_PAGE(int aPenWidth, double aMarkerSize)
void PrintWsItem(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void SetEnd(const wxPoint &aPos) override
void SetPosition(const wxPoint &aPos) override