46 EVT_MENU( wxID_CLOSE, SYMBOL_DIFF_FRAME::CloseLibraryViewer )
52#define LIB_VIEW_STYLE ( KICAD_DEFAULT_DRAWFRAME_STYLE )
53#define LIB_VIEW_STYLE_MODAL ( KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT )
56 const wxString& aLibraryName ) :
57 SCH_BASE_FRAME( aKiway, aParent, aFrameType,
_(
"Symbol Library Browser" ),
58 wxDefaultPosition, wxDefaultSize, wxS(
"SymbolDiff" ) )
66 icon.CopyFromBitmap(
KiBitmap( BITMAPS::library_browser ) );
92 wxPanel* libPanel =
new wxPanel(
this );
93 wxSizer* libSizer =
new wxBoxSizer( wxVERTICAL );
96 wxPanel* symbolPanel =
new wxPanel(
this );
97 wxSizer* symbolSizer =
new wxBoxSizer( wxVERTICAL );
100 wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
101 m_symbolFilter->SetDescriptiveText(
_(
"Filter" ) );
102 m_symbolFilter->SetToolTip(
103 _(
"Filter on symbol name, keywords, description and pin count.\n"
104 "Search terms are separated by spaces. All search terms must match.\n"
105 "A term which is a number will also match against the pin count." ) );
106 symbolSizer->Add( m_symbolFilter, 0, wxEXPAND, 5 );
111 m_libFilter->SetMinSize( wxSize( -1, GetTextExtent( wxT(
"qb" ) ).y + 10 ) );
112 m_symbolFilter->SetMinSize( wxSize( -1, GetTextExtent( wxT(
"qb" ) ).y + 10 ) );
116 0,
nullptr, wxLB_HSCROLL | wxNO_BORDER );
117 symbolSizer->Add( m_symbolList, 1, wxEXPAND, 5 );
119 symbolPanel->SetSizer( symbolSizer );
125 if( aLibraryName.empty() )
131 m_currentSymbol.SetLibNickname( aLibraryName );
132 m_currentSymbol.SetLibItemName(
"" );
137 m_selection_changed =
false;
149 m_auimgr.AddPane( libPanel,
EDA_PANE().Palette().Name(
"Libraries" ).Left().Layer(2)
150 .CaptionVisible(
false ).MinSize( 100, -1 ).BestSize( 200, -1 ) );
151 m_auimgr.AddPane( symbolPanel,
EDA_PANE().Palette().Name(
"Symbols" ).Left().Layer(1)
152 .CaptionVisible(
false ).MinSize( 100, -1 ).BestSize( 300, -1 ) );
156 m_auimgr.GetPane( libPanel ).Show( aLibraryName.empty() );
160 if( m_libListWidth > 0 )
163 if( m_symbolListWidth > 0 )
184 bbox.
SetOrigin( -max_size_x / 2, -max_size_y / 2 );
185 bbox.
SetSize( max_size_x, max_size_y );
190 wxString symbName = m_symbolList->GetStringSelection();
192 if( !symbName.IsEmpty() )
194 SetSelectedSymbol( symbName );
195 updatePreviewSymbol();
209 m_previewItem =
nullptr;
constexpr EDA_IU_SCALE schIUScale
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
static TOOL_ACTION zoomFitScreen
bool m_Center
Center on screen.
constexpr void SetOrigin(const Vec &pos)
constexpr void SetSize(const SizeVec &size)
COLOR4D GetColor(int aLayer) const
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
void FinishAUIInitialization()
void ReCreateMenuBar()
Recreates the menu bar.
COLOR_SETTINGS * m_colorSettings
void setupUnits(APP_SETTINGS_BASE *aCfg)
GAL_DISPLAY_OPTIONS_IMPL & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
EDA_MSG_PANEL * m_messagePanel
virtual void SetScreen(BASE_SCREEN *aScreen)
ACTION_TOOLBAR * m_mainToolBar
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
Specialization of the wxAuiPaneInfo class for KiCad panels.
double m_gridMinSpacing
Whether or not to draw the coordinate system axes.
bool m_axesEnabled
Fullscreen crosshair or small cross.
void SetAxesColor(const COLOR4D &aAxesColor)
Set the axes color.
void SetDefaultPenWidth(int aWidth)
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
void SetBoundary(const BOX2D &aBoundary)
Set limits for view area.
void SetModal(bool aIsModal)
bool IsModal() const override
Return true if the frame is shown in our modal mode and false if the frame is shown as an usual frame...
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
SCH_RENDER_SETTINGS * GetRenderSettings()
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void SyncView()
Mark all items for refresh.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void LoadColors(const COLOR_SETTINGS *aSettings) override
Symbol library viewer main window.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
SYMBOL_DIFF_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aLibraryName=wxEmptyString)
void ReCreateVToolbar() override
void OnActivate(wxActivateEvent &event)
Called when the frame is activated to reload the libraries and symbol lists that can be changed by th...
void ReCreateHToolbar() override
void OnSize(wxSizeEvent &event) override
Recalculate the size of toolbars and display panel when the frame size changes.
#define DEFAULT_LINE_WIDTH_MILS
The default wire width in mils. (can be changed in preference menu)
@ ID_LIBVIEW_SELECT_UNIT_NUMBER
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::OnSelectHighlightChoice EVT_UPDATE_UI(ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, GERBVIEW_FRAME::OnUpdateLayerSelectBox) void GERBVIEW_FRAME
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
@ LAYER_SCHEMATIC_GRID_AXES
constexpr int mmToIU(double mm) const
void SetAuiPaneSize(wxAuiManager &aManager, wxAuiPaneInfo &aPane, int aWidth, int aHeight)
Sets the size of an AUI pane, working around http://trac.wxwidgets.org/ticket/13180.