74    std::vector<int> layers( 1 );
 
 
  108                                         std::vector<MSG_PANEL_ITEM>& aList )
 
  113    if( dataItem == 
nullptr )   
 
  120        aList.emplace_back( 
_( 
"Line" ), wxEmptyString );
 
  124        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 );
 
 
  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;
 
  258    for( 
int idx = 0; idx < 
m_Polygons.OutlineCount(); ++idx )
 
  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 );
 
 
  293    return m_Polygons.Collide( aPosition, aAccuracy );
 
 
  311    for( 
int idx = 0; idx < 
m_Polygons.OutlineCount(); ++idx )
 
  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 );
 
 
  575    std::vector<DS_DRAW_ITEM_BASE*> second_items;
 
  580            item->PrintWsItem( aSettings );
 
  582            second_items.push_back( item );
 
  586        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
 
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
 
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)
Populate 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()
Return 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(const RENDER_SETTINGS *aSettings, 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
 
void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, const COLOR4D &aColor)
Print this text object to the device context aDC.
 
virtual wxString GetShownText(bool aAllowExtraText, int aDepth=0) const
Return the string actually shown after processing of the base text.
 
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.
 
wxString GetTypeAsString() 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.
 
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
Sheet Editor previewing pages after first page.
 
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
 
@ LAYER_DRAWINGSHEET_PAGE1
Sheet Editor previewing first page.
 
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.
 
VECTOR2< int32_t > VECTOR2I