KiCad PCB EDA Suite
|
Drawing sheet structure type definitions. More...
#include <ds_data_item.h>
Public Types | |
enum | DS_ITEM_TYPE { DS_TEXT , DS_SEGMENT , DS_RECT , DS_POLYPOLYGON , DS_BITMAP } |
Public Member Functions | |
DS_DATA_ITEM (DS_ITEM_TYPE aType) | |
virtual | ~DS_DATA_ITEM () |
const std::vector< DS_DRAW_ITEM_BASE * > & | GetDrawItems () const |
virtual void | SyncDrawItems (DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) |
void | SetStart (double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor=RB_CORNER) |
void | SetEnd (double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor=RB_CORNER) |
DS_ITEM_TYPE | GetType () const |
PAGE_OPTION | GetPage1Option () const |
void | SetPage1Option (PAGE_OPTION aChoice) |
const VECTOR2I | GetStartPosIU (int ii=0) const |
const VECTOR2I | GetEndPosIU (int ii=0) const |
const VECTOR2D | GetStartPos (int ii=0) const |
const VECTOR2D | GetEndPos (int ii=0) const |
virtual int | GetPenSizeIU () |
void | MoveTo (const VECTOR2D &aPosition) |
Move item to a new position. | |
void | MoveToIU (const VECTOR2I &aPosition) |
Move item to a new position. | |
void | MoveStartPointTo (const VECTOR2D &aPosition) |
Move the starting point of the item to a new position. | |
void | MoveStartPointToIU (const VECTOR2I &aPosition) |
Move the starting point of the item to a new position. | |
void | MoveEndPointTo (const VECTOR2D &aPosition) |
Move the ending point of the item to a new position. | |
void | MoveEndPointToIU (const VECTOR2I &aPosition) |
Move the ending point of the item to a new position. | |
virtual bool | IsInsidePage (int ii) const |
const wxString | GetClassName () const |
Public Attributes | |
wxString | m_Name |
wxString | m_Info |
POINT_COORD | m_Pos |
POINT_COORD | m_End |
double | m_LineWidth |
int | m_RepeatCount |
VECTOR2D | m_IncrementVector |
int | m_IncrementLabel |
Protected Attributes | |
DS_ITEM_TYPE | m_type |
PAGE_OPTION | m_pageOption |
std::vector< DS_DRAW_ITEM_BASE * > | m_drawItems |
Drawing sheet structure type definitions.
Basic items are:
Definition at line 95 of file ds_data_item.h.
Enumerator | |
---|---|
DS_TEXT | |
DS_SEGMENT | |
DS_RECT | |
DS_POLYPOLYGON | |
DS_BITMAP |
Definition at line 98 of file ds_data_item.h.
DS_DATA_ITEM::DS_DATA_ITEM | ( | DS_ITEM_TYPE | aType | ) |
Definition at line 64 of file ds_data_item.cpp.
References ALL_PAGES, m_IncrementLabel, m_LineWidth, m_pageOption, m_RepeatCount, and m_type.
|
virtual |
Definition at line 74 of file ds_data_item.cpp.
References m_drawItems.
const wxString DS_DATA_ITEM::GetClassName | ( | ) | const |
Definition at line 359 of file ds_data_item.cpp.
References _, DS_BITMAP, DS_POLYPOLYGON, DS_RECT, DS_SEGMENT, DS_TEXT, GetType(), and name.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel().
|
inline |
Definition at line 110 of file ds_data_item.h.
References m_drawItems.
Referenced by PL_EDIT_TOOL::DoDelete(), PL_DRAWING_TOOLS::DrawShape(), DS_PROXY_UNDO_ITEM::DS_PROXY_UNDO_ITEM(), PL_EDIT_TOOL::moveItem(), DIALOG_INSPECTOR::onCellClicked(), PL_DRAWING_TOOLS::PlaceItem(), DS_PROXY_UNDO_ITEM::Restore(), and PL_POINT_EDITOR::updateItem().
const VECTOR2D DS_DATA_ITEM::GetEndPos | ( | int | ii = 0 | ) | const |
Definition at line 304 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, m_End, m_IncrementVector, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by GetEndPosIU(), IsInsidePage(), and MoveTo().
const VECTOR2I DS_DATA_ITEM::GetEndPosIU | ( | int | ii = 0 | ) | const |
Definition at line 334 of file ds_data_item.cpp.
References GetEndPos(), DS_DATA_MODEL::GetTheInstance(), KiROUND(), DS_DATA_MODEL::m_WSunits2Iu, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by MoveTo(), SyncDrawItems(), and PL_POINT_EDITOR::updateItem().
|
inline |
Definition at line 133 of file ds_data_item.h.
References m_pageOption.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), DS_DATA_MODEL_IO::formatOptions(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), and DS_DRAW_ITEM_BASE::ViewGetLayers().
|
virtual |
Reimplemented in DS_DATA_ITEM_POLYGONS, and DS_DATA_ITEM_TEXT.
Definition at line 134 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), KiROUND(), DS_DATA_MODEL::m_DefaultLineWidth, m_LineWidth, and DS_DATA_MODEL::m_WSunits2Iu.
Referenced by SyncDrawItems().
const VECTOR2D DS_DATA_ITEM::GetStartPos | ( | int | ii = 0 | ) | const |
Definition at line 266 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, m_IncrementVector, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DS_DATA_ITEM_POLYGONS::GetCornerPosition(), GetStartPosIU(), IsInsidePage(), DS_DATA_ITEM_POLYGONS::IsInsidePage(), and MoveTo().
const VECTOR2I DS_DATA_ITEM::GetStartPosIU | ( | int | ii = 0 | ) | const |
Definition at line 297 of file ds_data_item.cpp.
References GetStartPos(), DS_DATA_MODEL::GetTheInstance(), KiROUND(), DS_DATA_MODEL::m_WSunits2Iu, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_EDIT_TOOL::moveItem(), MoveTo(), PL_DRAWING_TOOLS::PlaceItem(), SyncDrawItems(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), and PL_POINT_EDITOR::updateItem().
|
inline |
Definition at line 128 of file ds_data_item.h.
References m_type.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::Format(), DS_DATA_MODEL_IO::format(), DS_DATA_MODEL_IO::formatRepeatParameters(), GetClassName(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), MoveEndPointTo(), and PL_DRAWING_TOOLS::PlaceItem().
|
virtual |
Reimplemented in DS_DATA_ITEM_POLYGONS.
Definition at line 342 of file ds_data_item.cpp.
References GetEndPos(), GetStartPos(), DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_LT_Corner, DS_DATA_MODEL::m_RB_Corner, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and DS_DATA_ITEM_BITMAP::SyncDrawItems().
void DS_DATA_ITEM::MoveEndPointTo | ( | const VECTOR2D & | aPosition | ) |
Move the ending point of the item to a new position.
This has meaning only for items defined by 2 points (segments and rectangles).
aPosition | is the new position of the ending point, in mm. |
Definition at line 213 of file ds_data_item.cpp.
References DS_RECT, DS_SEGMENT, DS_DATA_MODEL::GetTheInstance(), GetType(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, m_End, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by MoveEndPointToIU(), and MoveTo().
void DS_DATA_ITEM::MoveEndPointToIU | ( | const VECTOR2I & | aPosition | ) |
Move the ending point of the item to a new position.
This has meaning only for items defined by 2 points (segments and rectangles).
aPosition | is the new position of the ending point in graphic units |
Definition at line 256 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, MoveEndPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_POINT_EDITOR::updateItem().
void DS_DATA_ITEM::MoveStartPointTo | ( | const VECTOR2D & | aPosition | ) |
Move the starting point of the item to a new position.
aPosition | the new position of the starting point, in mm. |
Definition at line 171 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by MoveStartPointToIU(), and MoveTo().
void DS_DATA_ITEM::MoveStartPointToIU | ( | const VECTOR2I & | aPosition | ) |
Move the starting point of the item to a new position.
aPosition | is the new position of item in graphic units. |
Definition at line 204 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, MoveStartPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_DRAWING_TOOLS::PlaceItem(), and PL_POINT_EDITOR::updateItem().
void DS_DATA_ITEM::MoveTo | ( | const VECTOR2D & | aPosition | ) |
Move item to a new position.
aPosition | the new position of item, in mm. |
Definition at line 155 of file ds_data_item.cpp.
References GetEndPos(), GetEndPosIU(), GetStartPos(), GetStartPosIU(), m_drawItems, MoveEndPointTo(), and MoveStartPointTo().
Referenced by MoveToIU().
void DS_DATA_ITEM::MoveToIU | ( | const VECTOR2I & | aPosition | ) |
Move item to a new position.
aPosition | the new position of the starting point in graphic units. |
Definition at line 145 of file ds_data_item.cpp.
References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, MoveTo(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PL_DRAWING_TOOLS::DrawShape(), and PL_EDIT_TOOL::moveItem().
|
inline |
Definition at line 121 of file ds_data_item.h.
References POINT_COORD::m_Anchor, m_End, POINT_COORD::m_Pos, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inline |
Definition at line 134 of file ds_data_item.h.
References m_pageOption.
Referenced by PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), and DRAWING_SHEET_PARSER::readOption().
|
inline |
Definition at line 114 of file ds_data_item.h.
References POINT_COORD::m_Anchor, POINT_COORD::m_Pos, m_Pos, VECTOR2< T >::x, and VECTOR2< T >::y.
|
virtual |
Reimplemented in DS_DATA_ITEM_POLYGONS, DS_DATA_ITEM_TEXT, and DS_DATA_ITEM_BITMAP.
Definition at line 81 of file ds_data_item.cpp.
References KIGFX::VIEW::Add(), DS_DRAW_ITEM_LIST::Append(), DS_RECT, DS_SEGMENT, DS_DRAW_ITEM_LIST::GetDefaultPenSize(), GetEndPosIU(), EDA_ITEM::GetFlags(), GetPenSizeIU(), GetStartPosIU(), IsInsidePage(), m_drawItems, m_RepeatCount, m_type, DS_DRAW_ITEM_LIST::Remove(), KIGFX::VIEW::Remove(), and EDA_ITEM::SetFlags().
Referenced by PL_EDITOR_FRAME::AddDrawingSheetItem(), and DS_PROXY_UNDO_ITEM::Restore().
|
protected |
Definition at line 211 of file ds_data_item.h.
Referenced by GetDrawItems(), MoveTo(), SyncDrawItems(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), and ~DS_DATA_ITEM().
POINT_COORD DS_DATA_ITEM::m_End |
Definition at line 201 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::format(), GetEndPos(), MoveEndPointTo(), DRAWING_SHEET_PARSER::parseGraphic(), and SetEnd().
int DS_DATA_ITEM::m_IncrementLabel |
Definition at line 205 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_ITEM(), DS_DATA_ITEM_TEXT::DS_DATA_ITEM_TEXT(), DS_DATA_MODEL_IO::formatRepeatParameters(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DRAWING_SHEET_PARSER::parseText(), and DS_DATA_ITEM_TEXT::SyncDrawItems().
VECTOR2D DS_DATA_ITEM::m_IncrementVector |
Definition at line 204 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::formatRepeatParameters(), GetEndPos(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), GetStartPos(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
wxString DS_DATA_ITEM::m_Info |
Definition at line 199 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::format(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
double DS_DATA_ITEM::m_LineWidth |
Definition at line 202 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_ITEM(), DS_DATA_ITEM_TEXT::DS_DATA_ITEM_TEXT(), DS_DATA_MODEL_IO::format(), GetPenSizeIU(), DS_DATA_ITEM_POLYGONS::GetPenSizeIU(), DS_DATA_ITEM_TEXT::GetPenSizeIU(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
wxString DS_DATA_ITEM::m_Name |
Definition at line 198 of file ds_data_item.h.
Referenced by DS_DATA_MODEL_IO::format(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), and DRAWING_SHEET_PARSER::parseText().
|
protected |
Definition at line 209 of file ds_data_item.h.
Referenced by DS_DATA_ITEM(), GetPage1Option(), and SetPage1Option().
POINT_COORD DS_DATA_ITEM::m_Pos |
Definition at line 200 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_MODEL_IO::format(), GetStartPos(), MoveStartPointTo(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), DRAWING_SHEET_PARSER::parseText(), and SetStart().
int DS_DATA_ITEM::m_RepeatCount |
Definition at line 203 of file ds_data_item.h.
Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DS_DATA_ITEM(), DS_DATA_MODEL_IO::formatRepeatParameters(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), DRAWING_SHEET_PARSER::parseBitmap(), DRAWING_SHEET_PARSER::parseGraphic(), DRAWING_SHEET_PARSER::parsePolygon(), DRAWING_SHEET_PARSER::parseText(), SyncDrawItems(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and DS_DATA_ITEM_BITMAP::SyncDrawItems().
|
protected |
Definition at line 208 of file ds_data_item.h.
Referenced by DS_DATA_ITEM(), GetType(), and SyncDrawItems().