38using namespace std::placeholders;
42 const wxPoint& aPosition,
const wxSize& aSize,
64 color_settings = frame->GetColorSettings();
68 wxASSERT( color_settings );
95 std::vector<MSG_PANEL_ITEM>& aList )
129 if( gerber ==
nullptr )
constexpr EDA_IU_SCALE gerbIUScale
Color settings are a bit different than most of the settings objects in that there can be more than o...
The base class for create windows for drawing purpose.
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.
@ GAL_TYPE_OPENGL
OpenGL implementation.
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.
GAL_TYPE m_backend
Currently used GAL.
EDA_DRAW_FRAME * GetParentEDAFrame() const
Returns parent EDA_DRAW_FRAME, if available or NULL otherwise.
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
Hold the image data and parameters for one gerber file and layer parameters.
GERBER_DRAW_ITEMS & GetItems()
BOX2I GetDefaultViewBBox() const override
Return the bounding box of the view that should be used if model is not valid.
std::unique_ptr< DS_PROXY_VIEW_ITEM > m_drawingSheet
void SetDrawingSheet(DS_PROXY_VIEW_ITEM *aDrawingSheet)
Set or update the drawing-sheet (borders and title block) used by the draw panel.
void setDefaultLayerDeps()
< Set rendering targets & dependencies for layers.
GERBVIEW_DRAW_PANEL_GAL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
virtual void SetTopLayer(int aLayer) override
Return the bounding box of the view that should be used if model is not valid.
virtual ~GERBVIEW_DRAW_PANEL_GAL()
Take care of display settings for the given layer to be displayed in high contrast mode.
void OnShow() override
Called when the window is shown for the first time.
virtual void SetHighContrastLayer(int aLayer) override
bool SwitchBackend(GAL_TYPE aGalType) override
Move the selected layer to the top, so it is displayed above all others.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Called when the window is shown for the first time.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
int GetActiveLayer() const
Return the active layer.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
Store GerbView specific render settings.
void LoadColors(const COLOR_SETTINGS *aSettings) override
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void ClearHighContrastLayers()
Clear the list of active layers.
void SetLayerIsHighContrast(int aLayerId, bool aEnabled=true)
Set the specified layer as high-contrast.
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 UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
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 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.
void RecacheAllItems()
Rebuild GAL display lists.
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.
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void SetScaleLimits(double aMaximum, double aMinimum)
Set minimum and maximum values for scale.
void SetLayerOrder(int aLayer, int aRenderingOrder)
Set rendering order of a particular layer.
An implementation of class VIEW_CONTROLS for wxWidgets library.
virtual SETTINGS_MANAGER & GetSettingsManager() const
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
@ LAYER_GERBVIEW_BACKGROUND
#define GERBER_DCODE_LAYER(x)
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
@ LAYER_GP_OVERLAY
general purpose overlay
@ LAYER_SELECT_OVERLAY
currently selected items overlay
#define GERBER_DRAWLAYERS_COUNT
#define GERBER_DRAW_LAYER(x)
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_CACHED
Main rendering target (cached)
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
PGM_BASE & Pgm()
The global Program "get" accessor.
WX_VIEW_CONTROLS class definition.
#define ZOOM_MIN_LIMIT_GERBVIEW
#define ZOOM_MAX_LIMIT_GERBVIEW