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