32#include <wx/stattext.h>
37 wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ),
39 m_preview( nullptr ), m_status( nullptr ), m_statusSizer( nullptr ), m_previewItem( nullptr )
41 auto common_settings =
Pgm().GetCommonSettings();
59 m_preview->ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
73 if(
auto* theme =
Pgm().GetSettingsManager().GetColorSettings( app_settings->m_ColorTheme ) )
76 const COLOR4D& backgroundColor = settings->GetBackgroundColor();
77 const COLOR4D& foregroundColor = settings->GetCursorColor();
81 settings->m_ShowPinsElectricalType = app_settings->m_LibViewPanel.show_pin_electrical_type;
82 settings->m_ShowPinNumbers = app_settings->m_LibViewPanel.show_pin_numbers;
174 std::unique_ptr< LIB_SYMBOL > symbol;
185 wxLogError(
_(
"Error loading symbol %s from library '%s'." ) + wxS(
"\n%s" ),
206 std::vector<LIB_FIELD*> previewFields;
211 if( field->IsAutoAdded() )
212 field->SetVisible(
false );
220 settings->m_ShowConvert =
227 settings->m_ShowConvert );
267 settings->m_ShowConvert =
coord_type GetHeight() const
coord_type GetWidth() const
static constexpr GAL_TYPE GAL_FALLBACK
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
void ForceRefresh()
Force a redraw.
@ GAL_TYPE_OPENGL
OpenGL implementation.
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
void SetStealsFocus(bool aStealsFocus)
Set whether focus is taken on certain events (mouseover, keys, etc).
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
A color representation with 4 components: red, green, blue, alpha.
wxColour ToColour() const
void ReadConfig(COMMON_SETTINGS &aCommonConfig, WINDOW_SETTINGS &aWindowConfig, wxWindow *aWindow)
Read application and common configs.
bool m_forceDisplayCursor
The pixel scale factor (>1 for hi-DPI scaled displays)
void SetAxesEnabled(bool aAxesEnabled)
Enable drawing the axes.
void SetClearColor(const COLOR4D &aColor)
void SetGridVisibility(bool aVisibility)
Set the visibility setting of the grid.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Store schematic specific render settings.
void LoadColors(const COLOR_SETTINGS *aSettings) override
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
virtual void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 })
Set the scaling factor, zooming around a given anchor point.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Field object used in symbol libraries.
A logical library item identifier and consists of various portions much like a URI.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Define a library symbol object.
void GetFields(std::vector< LIB_FIELD * > &aList)
Return a list of fields within this symbol.
const BOX2I GetUnitBoundingBox(int aUnit, int aConvert, bool aIgnoreHiddenFields=true) const
Get the bounding box for the symbol.
std::unique_ptr< LIB_SYMBOL > Flatten() const
Return a flattened symbol inheritance to the caller.
bool HasConversion() const
Test if symbol has more than one body conversion type (DeMorgan).
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)