65#define MODAL_FRAME ( wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN \
66 | wxWANTS_CHARS | wxFRAME_NO_TASKBAR | wxSTAY_ON_TOP )
74 wxBoxSizer* sizer =
new wxBoxSizer( wxVERTICAL );
76 std::vector<PICKED_SYMBOL> dummyAlreadyPlaced;
79 dummyAlreadyPlaced,
false,
false,
88 wxStdDialogButtonSizer* sdbSizer =
new wxStdDialogButtonSizer();
89 wxButton* okButton =
new wxButton(
this, wxID_OK );
90 wxButton* cancelButton =
new wxButton(
this, wxID_CANCEL );
91 sdbSizer->AddButton( okButton );
92 sdbSizer->AddButton( cancelButton );
95 sizer->Add( sdbSizer, 0, wxEXPAND | wxALL, 5 );
98 SetTitle( GetTitle() + wxString::Format(
_(
" (%d items loaded)" ),
108 if( aSymbol && !aSymbol->IsEmpty() )
112 libid.
Parse( *aSymbol,
true );
154 symbol.
LibId = libId;
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
PANEL_LIB_VIEW m_LibViewPanel
virtual bool ShowModal(wxString *aResult=nullptr, wxWindow *aResultantFocusWindow=nullptr)
Show this wxFrame as if it were a modal dialog, with all other instantiated wxFrames disabled until t...
void SetModal(bool aIsModal)
void DismissModal(bool aRetVal, const wxString &aResult=wxEmptyString)
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
A logical library item identifier and consists of various portions much like a URI.
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
bool IsValid() const
Check if this LID_ID is valid.
wxWindow * GetFocusTarget() const
void SetPreselect(const LIB_ID &aPreselect)
LIB_ID GetSelectedLibId(int *aUnit=nullptr) const
To be called after this dialog returns from ShowModal().
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Symbol library viewer main window.
void OnOK(wxCommandEvent &aEvent)
void doCloseWindow() override
void OnPaint(wxPaintEvent &aEvent)
WINDOW_SETTINGS * GetWindowSettings(APP_SETTINGS_BASE *aCfg) override
Return a pointer to the window settings for this frame.
bool ShowModal(wxString *aSymbol, wxWindow *aParent) override
Runs the symbol viewer as a modal dialog.
PANEL_SYMBOL_CHOOSER * m_chooserPanel
SYMBOL_CHOOSER_FRAME(KIWAY *aKiway, wxWindow *aParent)
void CloseSymbolChooser(wxCommandEvent &aEvent)
#define SYMBOL_CHOOSER_FRAME_NAME
void delete_if(_Container &__c, _Function &&__f)
Deletes all values from __c for which __f returns true.
std::vector< FAB_LAYER_COLOR > dummy
Stores the common settings that are saved and loaded for each window / frame.
static void AddSymbolToHistory(const PICKED_SYMBOL &aSymbol)
static std::vector< PICKED_SYMBOL > s_SymbolHistoryList
static unsigned s_SymbolHistoryMaxCount