42 using namespace std::placeholders;
46 const wxPoint& aPosition,
const wxSize& aSize,
81 std::vector<MSG_PANEL_ITEM>& aList )
118 const int penWidth = 0;
120 m_pageDrawItem = std::make_unique<DS_DRAW_ITEM_PAGE>( penWidth, markerSize );
132 VECTOR2D( size_x * 1.5, size_y * 1.5) );
136 wxPoint originCoord = static_cast<PL_EDITOR_FRAME*>(
m_edaFrame )->ReturnCoordOriginCorner();
void SetScaleLimits(double aMaximum, double aMinimum)
Set minimum and maximum values for scale.
KIGFX::GAL * m_gal
Interface for drawing objects on a 2D-surface.
for drawingsheetEditor previewing
Handle the graphic items list to draw/plot the frame and title block.
virtual void Clear() override
Remove all the stored items from the group.
KIGFX::WX_VIEW_CONTROLS * m_viewControls
Control for VIEW (moving, zooming, etc.)
virtual const TITLE_BLOCK & GetTitleBlock() const =0
virtual void SetTopLayer(int aLayer, bool aEnabled=true)
Set given layer to be displayed on the top or sets back the default order of layers.
PL_DRAW_PANEL_GAL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
An implementation of class VIEW_CONTROLS for wxWidgets library.
#define ZOOM_MAX_LIMIT_PLEDITOR
static constexpr double IU_PER_MM
Mock up a conversion function.
virtual bool SwitchBackend(GAL_TYPE aGalType)
Switch method of rendering graphics.
bool SwitchBackend(GAL_TYPE aGalType) override
Move the selected layer to the top, so it is displayed above all others.
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
const wxString & GetType() const
void UpdateAllLayersOrder()
Do everything that is needed to apply the rendering order of layers.
The base class for create windows for drawing purpose.
void DisplayWorksheet()
Build and update the list of WS_DRAW_ITEM_xxx showing the frame layout.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
virtual const wxSize GetPageSizeIU() const =0
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
WX_VIEW_CONTROLS class definition.
static constexpr int VIEW_MAX_LAYERS
maximum number of layers that may be shown
Auxiliary rendering target (noncached)
void SetLayerTarget(int aLayer, RENDER_TARGET aTarget)
Change the rendering target for a particular layer.
virtual const PAGE_INFO & GetPageSettings() const =0
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
std::unique_ptr< DS_DRAW_ITEM_PAGE > m_pageDrawItem
VECTOR2< double > VECTOR2D
void Clear()
Remove all items from the view.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
std::unique_ptr< KIGFX::PAINTER > m_painter
Contains information about how to draw items using GAL.
for drawingsheetEditor previewing
void SetLayerDisplayOnly(int aLayer, bool aDisplayOnly=true)
Items that may change while the view stays the same (noncached)
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
AppSettings * GetAppSettings(bool aLoadNow=true)
Returns a handle to the a given settings by type If the settings have already been loaded,...
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
EDA_DRAW_FRAME * m_edaFrame
Parent EDA_DRAW_FRAME (if available)
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
void ClearTopLayers()
Remove all layers from the on-the-top set (they are no longer displayed over the rest of layers).
virtual ~PL_DRAW_PANEL_GAL()
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
void setDefaultLayerDeps()
< Set rendering targets & dependencies for layers.
KIGFX::VIEW * m_view
Stores view settings (scale, center, etc.) and items to be drawn.
Drawing sheet structure type definitions.
currently selected items overlay
void SetPainter(PAINTER *aPainter)
Set the painter object used by the view for drawing #VIEW_ITEMS.
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
drawingsheet frame and titleblock
void SetShowPageLimits(bool aShow)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetBoundary(const BOX2D &aBoundary)
Set limits for view area.
void SetGAL(GAL *aGal)
Assign a rendering device for the VIEW.
virtual void SetTopLayer(int aLayer) override
Move the selected layer to the top, so it is displayed above all others.
static constexpr int Millimeter2iu(double mm)
void SetShowPageLimits(bool aDraw)
#define ZOOM_MIN_LIMIT_PLEDITOR
wxString m_ColorTheme
Active color theme name.