42using namespace std::placeholders;
46 const wxPoint& aPosition,
const wxSize& aSize,
82 std::vector<MSG_PANEL_ITEM>& aList )
112 const int penWidth = 0;
114 m_pageDrawItem = std::make_unique<DS_DRAW_ITEM_PAGE>( penWidth, markerSize );
constexpr EDA_IU_SCALE drawSheetIUScale
wxString m_ColorTheme
Active color theme name.
Drawing sheet structure type definitions.
Handle the graphic items list to draw/plot the frame and title block.
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
The base class for create windows for drawing purpose.
virtual const TITLE_BLOCK & GetTitleBlock() const =0
virtual const PAGE_INFO & GetPageSettings() const =0
virtual const VECTOR2I GetPageSizeIU() const =0
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
EDA_DRAW_FRAME * m_edaFrame
Parent EDA_DRAW_FRAME (if available)
std::unique_ptr< KIGFX::PAINTER > m_painter
Contains information about how to draw items using GAL.
KIGFX::GAL * m_gal
Interface for drawing objects on a 2D-surface.
KIGFX::VIEW * m_view
Stores view settings (scale, center, etc.) and items to be drawn.
KIGFX::WX_VIEW_CONTROLS * m_viewControls
Control for VIEW (moving, zooming, etc.)
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
virtual bool SwitchBackend(GAL_TYPE aGalType)
Switch method of rendering graphics.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void UpdateAllLayersOrder()
Do everything that is needed to apply the rendering order of layers.
void SetLayerDisplayOnly(int aLayer, bool aDisplayOnly=true)
Set a layer display-only (ie: to be rendered but not returned by hit test queries).
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
void SetPainter(PAINTER *aPainter)
Set the painter object used by the view for drawing #VIEW_ITEMS.
void SetBoundary(const BOX2D &aBoundary)
Set limits for view area.
void SetGAL(GAL *aGal)
Assign a rendering device for the VIEW.
void SetLayerTarget(int aLayer, RENDER_TARGET aTarget)
Change the rendering target for a particular layer.
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
void Clear()
Remove all items from the view.
void ClearTopLayers()
Remove all layers from the on-the-top set (they are no longer displayed over the rest of layers).
static constexpr int VIEW_MAX_LAYERS
Rendering order modifier for layers that are marked as top layers.
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.
void SetScaleLimits(double aMaximum, double aMinimum)
Set minimum and maximum values for scale.
An implementation of class VIEW_CONTROLS for wxWidgets library.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
const wxString & GetType() const
virtual SETTINGS_MANAGER & GetSettingsManager() const
std::unique_ptr< DS_DRAW_ITEM_PAGE > m_pageDrawItem
virtual ~PL_DRAW_PANEL_GAL()
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
virtual void SetTopLayer(int aLayer) override
Move the selected layer to the top, so it is displayed above all others.
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)
void DisplayDrawingSheet()
Build and update the list of WS_DRAW_ITEM_xxx showing the frame layout.
void setDefaultLayerDeps()
< Set rendering targets & dependencies for layers.
bool SwitchBackend(GAL_TYPE aGalType) override
Move the selected layer to the top, so it is displayed above all others.
The main window used in the drawing sheet editor.
virtual void Clear() override
Remove all the stored items from the group.
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
T * GetAppSettings(const wxString &aFilename)
Returns a handle to the a given settings by type If the settings have already been loaded,...
@ LAYER_DRAWINGSHEET_PAGEn
for drawingsheetEditor previewing
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
@ LAYER_GP_OVERLAY
general purpose overlay
@ LAYER_DRAWINGSHEET_PAGE1
for drawingsheetEditor previewing
@ LAYER_SELECT_OVERLAY
currently selected items overlay
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
PGM_BASE & Pgm()
The global Program "get" accessor.
std::vector< FAB_LAYER_COLOR > dummy
constexpr int mmToIU(double mm) const
VECTOR2< double > VECTOR2D
WX_VIEW_CONTROLS class definition.
#define ZOOM_MAX_LIMIT_PLEDITOR
#define ZOOM_MIN_LIMIT_PLEDITOR