34#include <wx/stattext.h>
39 wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ),
43 m_statusPanel( nullptr ),
44 m_statusSizer( nullptr ),
45 m_previewItem( nullptr )
47 auto common_settings =
Pgm().GetCommonSettings();
65 m_preview->ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
79 if(
auto* theme =
Pgm().GetSettingsManager().GetColorSettings( app_settings->m_ColorTheme ) )
82 const COLOR4D& backgroundColor = settings->GetBackgroundColor();
83 const COLOR4D& foregroundColor = settings->GetCursorColor();
87 settings->m_ShowPinsElectricalType = app_settings->m_LibViewPanel.show_pin_electrical_type;
88 settings->m_ShowPinNumbers = app_settings->m_LibViewPanel.show_pin_numbers;
190 std::unique_ptr< LIB_SYMBOL > symbol;
201 wxLogError(
_(
"Error loading symbol %s from library '%s'." ) + wxS(
"\n%s" ),
222 std::vector<LIB_FIELD*> previewFields;
227 if( field->IsAutoAdded() )
228 field->SetVisible(
false );
236 settings->m_ShowConvert =
243 settings->m_ShowConvert );
286 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).
void ReadConfig(COMMON_SETTINGS &aCommonConfig, WINDOW_SETTINGS &aWindowConfig, wxWindow *aWindow)
Read application and common configs.
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
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).
static SYMBOL_LIB_TABLE * SchSymbolLibTable(PROJECT *aProject)
Accessor for project symbol library table.
LIB_SYMBOL * LoadSymbol(const wxString &aNickname, const wxString &aName)
Load a LIB_SYMBOL having aName from the library given by aNickname.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)