65#define PARENT_STYLE ( wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN \
66 | wxWANTS_CHARS | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT )
67#define MODAL_STYLE ( wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN \
68 | wxWANTS_CHARS | wxFRAME_NO_TASKBAR )
79 wxBoxSizer* frameSizer =
new wxBoxSizer( wxVERTICAL );
81 std::vector<PICKED_SYMBOL> dummyAlreadyPlaced;
84 dummyAlreadyPlaced,
false,
false, aCancelled,
100 wxPanel* bottomPanel =
new wxPanel(
this );
101 wxBoxSizer* bottomSizer =
new wxBoxSizer( wxVERTICAL );
103 wxStdDialogButtonSizer* sdbSizer =
new wxStdDialogButtonSizer();
104 wxButton* okButton =
new wxButton( bottomPanel, wxID_OK );
105 wxButton* cancelButton =
new wxButton( bottomPanel, wxID_CANCEL );
106 sdbSizer->AddButton( okButton );
107 sdbSizer->AddButton( cancelButton );
110 bottomSizer->Add( sdbSizer, 1, wxEXPAND | wxALL, 5 );
112 bottomPanel->SetSizer( bottomSizer );
113 frameSizer->Add( bottomPanel, 0, wxEXPAND );
115 SetSizer( frameSizer );
132 if( aSymbol && !aSymbol->IsEmpty() )
136 libid.
Parse( *aSymbol,
true );
180 symbol.
LibId = libId;
195 return &cfg->m_LibViewPanel.window;
197 wxFAIL_MSG( wxT(
"SYMBOL_CHOOSER not running with EESCHEMA_SETTINGS" ) );
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
EDA_MSG_PANEL * m_messagePanel
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 OnChar(wxKeyEvent &aEvent)
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
SYMBOL_CHOOSER_FRAME(KIWAY *aKiway, wxWindow *aParent, bool &aCancelled)
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
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
Store 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