22#include <wx/bmpbuttn.h>
25#include <wx/stattext.h>
39 m_libraryItem( nullptr ),
42 wxBoxSizer* bottomSizer =
new wxBoxSizer( wxHORIZONTAL );
44 wxStaticText* schLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Schematic" ) );
45 wxStaticText* libLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Library" ) );
46 m_slider =
new wxSlider(
this, wxID_ANY, 50, 0, 100 );
48 bottomSizer->Add( schLabel, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTRE_VERTICAL, 6 );
49 bottomSizer->Add(
m_slider, 1, wxLEFT | wxRIGHT | wxALIGN_BOTTOM, 30 );
50 bottomSizer->Add( libLabel, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTRE_VERTICAL, 6 );
53 wxString toggleTooltip =
_(
"Toggle between A and B display" );
54 toggleTooltip =
AddHotkeyName( toggleTooltip,
'/', HOTKEY_ACTION_TYPE::IS_COMMENT );
57 bottomSizer->Add(
m_toggleButton, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL, 6 );
59 m_outerSizer->Add( bottomSizer, 0, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, 10 );
76 [
this]( wxCommandEvent& aEvent )
121 settings->m_ShowBodyStyle );
126 wxASSERT( aLibSymbol );
142 const int val =
m_slider->GetValue();
157 double pct = (double)
m_slider->GetValue() / 100.0;
166 val = ( pct - 0.5 ) * 2;
173 child.SetForcedTransparency( val );
185 val = 1.0 - ( pct * 2 );
192 child.SetForcedTransparency( val );
205 if( aEvent.GetKeyCode() ==
'/' )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
void ForceRefresh()
Force a redraw.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
void SetForcedTransparency(double aForcedTransparency)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
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.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Define a library symbol object.
bool IsMulti() const override
const BOX2I GetUnitBoundingBox(int aUnit, int aBodyStyle, bool aIgnoreHiddenFields=true) const
Get the bounding box for the symbol.
bool HasAlternateBodyStyle() const override
Test if symbol has more than one body conversion type (DeMorgan).
LIB_ITEMS_CONTAINER & GetDrawItems()
Return a reference to the draw item list.
Base class for any item which can be embedded within the SCHEMATIC container class,...
wxString AddHotkeyName(const wxString &aText, int aHotKey, HOTKEY_ACTION_TYPE aStyle)
std::vector< FAB_LAYER_COLOR > dummy