74 std::vector<int> layers( 1 );
109 std::vector<MSG_PANEL_ITEM>& aList )
114 if( dataItem ==
nullptr )
121 aList.emplace_back(
_(
"Line" ), wxEmptyString );
125 aList.emplace_back(
_(
"Rectangle" ), wxEmptyString );
137 aList.emplace_back(
_(
"Imported Shape" ), wxEmptyString );
141 aList.emplace_back(
_(
"Image" ), wxEmptyString );
149 default: msg =
_(
"All Pages" );
break;
152 aList.emplace_back(
_(
"First Page Option" ), msg );
156 aList.emplace_back(
_(
"Repeat Count" ), msg );
160 aList.emplace_back(
_(
"Repeat Label Increment" ), msg );
162 msg.Printf( wxT(
"(%s, %s)" ),
166 aList.emplace_back(
_(
"Repeat Position Increment" ), msg );
168 aList.emplace_back(
_(
"Comment" ), dataItem->
m_Info );
178 if(
color == COLOR4D::UNSPECIFIED )
203 wxFAIL_MSG( wxT(
"Indeterminate state legal only in dialogs." ) );
213 wxFAIL_MSG( wxT(
"Indeterminate state legal only in dialogs." ) );
242 return wxString::Format(
_(
"Text '%s'" ),
256 std::vector<VECTOR2I> points_moved;
260 points_moved.clear();
263 for(
int ii = 0; ii < outline.
PointCount(); ii++ )
265 points_moved.emplace_back( outline.
CPoint( ii ).
x + aOffset.
x,
266 outline.
CPoint( ii ).
y + aOffset.
y );
269 GRPoly( DC, (
int) points_moved.size(), &points_moved[0],
true, penWidth,
color,
color );
315 for(
int ii = 0; ii < outline.
PointCount(); ii++ )
338 return _(
"Imported Shape" );
437 return wxString::Format(
_(
"Rectangle, width %s height %s" ),
463 int mindist = aAccuracy + (
GetPenWidth() / 2 ) + 1;
470 return wxString::Format(
_(
"Line, length %s" ),
528 return _(
"Page Limits" );
568 wsItem->SyncDrawItems(
this,
nullptr );
581 std::vector<DS_DRAW_ITEM_BASE*> second_items;
586 item->PrintWsItem( aSettings );
588 second_items.push_back( item );
592 item->PrintWsItem( aSettings );
constexpr EDA_IU_SCALE unityScale
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
void DrawBitmap(wxDC *aDC, const VECTOR2I &aPos, const KIGFX::COLOR4D &aBackgroundColor=KIGFX::COLOR4D::UNSPECIFIED) const
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
constexpr void SetHeight(size_type val)
constexpr void SetOrigin(const Vec &pos)
constexpr size_type GetWidth() const
constexpr void SetSize(const SizeVec &size)
constexpr size_type GetHeight() const
constexpr bool Contains(const Vec &aPoint) const
constexpr void SetWidth(size_type val)
constexpr void SetX(coord_type val)
constexpr void SetY(coord_type val)
constexpr void Offset(coord_type dx, coord_type dy)
constexpr bool Intersects(const BOX2< Vec > &aRect) const
BITMAP_BASE * m_ImageBitmap
Drawing sheet structure type definitions.
PAGE_OPTION GetPage1Option() const
DS_ITEM_TYPE GetType() const
VECTOR2D m_IncrementVector
Handle the graphic items list to draw/plot the frame and title block.
bool LoadDrawingSheet(const wxString &aFullFileName, wxString *aMsg, bool aAppend=false)
Populates the list with a custom layout or the default layout if no custom layout is available.
void SetupDrawEnvironment(const PAGE_INFO &aPageInfo, double aMilsToIU)
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
unsigned GetCount() const
std::vector< DS_DATA_ITEM * > & GetItems()
Base class to handle basic graphic items.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
const BOX2I GetBoundingBox() const override=0
Return the orthogonal bounding box of this object for display purposes.
virtual int GetPenWidth() const
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.
DS_DATA_ITEM * GetPeer() const
const KIFONT::METRICS & GetFontMetrics() const
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
const VECTOR2I & GetStart() const
const VECTOR2I & GetEnd() const
DS_DRAW_ITEM_BASE * GetFirst()
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
void Print(const RENDER_SETTINGS *aSettings)
Draws the item list created by BuildDrawItemsList.
const TITLE_BLOCK * m_titleBlock
bool m_isFirstPage
Is this the first page or not.
double GetMilsToIUfactor()
Get the scalar to convert pages units (mils) to draw/plot units.
DS_DRAW_ITEM_BASE * GetNext()
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
SHAPE_POLY_SET m_Polygons
The list of polygons.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void SetPosition(const VECTOR2I &aPos) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const VECTOR2I & GetEnd() const
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
const VECTOR2I & GetStart() const
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void PrintWsItem(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
virtual const BOX2I GetApproxBBox() override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
The base class for create windows for drawing purpose.
const VECTOR2I & GetTextPos() const
COLOR4D GetTextColor() const
virtual const wxString & GetText() const
Return the string associated with the text object.
BOX2I GetTextBox(int aLine=-1) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
virtual bool TextHitTest(const VECTOR2I &aPoint, int aAccuracy=0) const
Test if aPoint is within the bounds of this object.
const TEXT_ATTRIBUTES & GetAttributes() const
virtual wxString GetShownText(bool aAllowExtraText, int aDepth=0) const
Return the string actually shown after processing of the base text.
void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, const COLOR4D &aColor, OUTLINE_MODE aDisplay_mode=FILLED)
Print this text object to the device context aDC.
static const METRICS & Default()
A color representation with 4 components: red, green, blue, alpha.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
int GetDefaultPenWidth() const
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
virtual const COLOR4D & GetBackgroundColor() const =0
Return current background color settings.
wxDC * GetPrintDC() const
Describe the page size and margins of a paper page on which to eventually print or plot.
const wxString & GetType() const
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int PointCount() const
Return the number of points (vertices) in this line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
bool Collide(const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
int OutlineCount() const
Return the number of outlines in the set.
void Move(const VECTOR2I &aVector) override
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
GR_TEXT_H_ALIGN_T m_Halign
Hold the information shown in the lower right corner of a plot, printout, or editing view.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
void GRRect(wxDC *DC, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, const COLOR4D &aColor)
void GRLine(wxDC *DC, int x1, int y1, int x2, int y2, int width, const COLOR4D &Color, wxPenStyle aStyle)
void GRPoly(wxDC *DC, int n, const VECTOR2I *Points, bool Fill, int width, const COLOR4D &Color, const COLOR4D &BgColor)
Draw a new polyline and fill it if Fill, in drawing space.
@ LAYER_DRAWINGSHEET_PAGEn
for drawingsheetEditor previewing
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
@ LAYER_DRAWINGSHEET_PAGE1
for drawingsheetEditor previewing
KICOMMON_API wxString MessageTextFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A helper to convert the double length aValue to a string in inches, millimeters, or unscaled units.
KICOMMON_API wxString EllipsizeMenuText(const wxString &aString)
Ellipsize text (at the end) to be no more than 36 characters.
KICOMMON_API wxString EllipsizeStatusText(wxWindow *aWindow, const wxString &aString)
Ellipsize text (at the end) to be no more than 1/3 of the window width.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
std::vector< FAB_LAYER_COLOR > dummy
@ GR_TEXT_H_ALIGN_INDETERMINATE
@ GR_TEXT_V_ALIGN_INDETERMINATE
bool TestSegmentHit(const VECTOR2I &aRefPoint, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aDist)
Test if aRefPoint is with aDistance on the line defined by aStart and aEnd.