65#define MODAL_FRAME ( wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN \
66 | wxWANTS_CHARS | wxFRAME_NO_TASKBAR | wxSTAY_ON_TOP )
76 wxBoxSizer* frameSizer =
new wxBoxSizer( wxVERTICAL );
78 std::vector<PICKED_SYMBOL> dummyAlreadyPlaced;
81 dummyAlreadyPlaced,
false,
false,
95 wxPanel* bottomPanel =
new wxPanel(
this );
96 wxBoxSizer* bottomSizer =
new wxBoxSizer( wxVERTICAL );
98 wxStdDialogButtonSizer* sdbSizer =
new wxStdDialogButtonSizer();
99 wxButton* okButton =
new wxButton( bottomPanel, wxID_OK );
100 wxButton* cancelButton =
new wxButton( bottomPanel, wxID_CANCEL );
101 sdbSizer->AddButton( okButton );
102 sdbSizer->AddButton( cancelButton );
105 bottomSizer->Add( sdbSizer, 1, wxEXPAND | wxALL, 5 );
107 bottomPanel->SetSizer( bottomSizer );
108 frameSizer->Add( bottomPanel, 0, wxEXPAND );
110 SetSizer( frameSizer );
112 SetTitle( GetTitle() + wxString::Format(
_(
" (%d items loaded)" ),
122 if( aSymbol && !aSymbol->IsEmpty() )
126 libid.
Parse( *aSymbol,
true );
168 symbol.
LibId = libId;
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
EDA_MSG_PANEL * m_messagePanel
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