25#ifndef GRID_TEXT_BUTTON_HELPERS_H
26#define GRID_TEXT_BUTTON_HELPERS_H
33#include <wx/generic/gridctrl.h>
34#include <wx/generic/grideditors.h>
51 void SetSize(
const wxRect& aRect )
override;
54 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
55 bool EndEdit(
int ,
int ,
const wxGrid* ,
const wxString& , wxString *aNewVal )
override;
56 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
57 void Reset()
override;
60 void SetValidator(
const wxValidator& validator );
64 wxComboCtrl*
Combo()
const {
return static_cast<wxComboCtrl*
>( m_control ); }
67 std::unique_ptr< wxValidator > m_validator;
80 const wxString& aPreselect = wxEmptyString ) :
85 wxGridCellEditor*
Clone()
const override
90 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
102 const wxString& aPreselect = wxEmptyString ) :
108 wxGridCellEditor*
Clone()
const override
113 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
126 std::vector<EMBEDDED_FILES*> aFilesStack = {} ) :
132 wxGridCellEditor*
Clone()
const override
137 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
163 bool aNormalize,
const wxString& aNormalizeBasePath,
164 std::function<wxString(
WX_GRID*
grid,
int row )> aFileFilterFn,
165 std::function<wxString(
const wxString& )> aEmbedCallback =
nullptr ) :
166 m_dlg( aParentDialog ),
187 const wxString& aFileFilter,
bool aNormalize =
false,
188 const wxString& aNormalizeBasePath = wxEmptyString,
189 std::function<wxString(
const wxString& )> aEmbedCallback =
nullptr ) :
190 m_dlg( aParentDialog ),
199 wxGridCellEditor*
Clone()
const override
213 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
238 const bool aIsNullable =
false ) :
247 wxGridCellEditor*
Clone()
const override
252 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
253 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
GRID_CELL_FPID_EDITOR(DIALOG_SHIM *aParent, const wxString &aSymbolNetlist, const wxString &aPreselect=wxEmptyString)
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
wxGridCellEditor * Clone() const override
GRID_CELL_NULLABLE_INTERFACE()
virtual bool IsNullable() const
wxGridCellEditor * Clone() const override
GRID_CELL_PATH_EDITOR(DIALOG_SHIM *aParentDialog, WX_GRID *aGrid, wxString *aCurrentDir, const wxString &aFileFilter, bool aNormalize=false, const wxString &aNormalizeBasePath=wxEmptyString, std::function< wxString(const wxString &)> aEmbedCallback=nullptr)
Constructor.
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
std::function< wxString(WX_GRID *aGrid, int aRow)> m_fileFilterFn
wxString m_normalizeBasePath
std::function< wxString(const wxString &)> m_embedCallback
GRID_CELL_PATH_EDITOR(DIALOG_SHIM *aParentDialog, WX_GRID *aGrid, wxString *aCurrentDir, bool aNormalize, const wxString &aNormalizeBasePath, std::function< wxString(WX_GRID *grid, int row)> aFileFilterFn, std::function< wxString(const wxString &)> aEmbedCallback=nullptr)
Constructor.
void BeginEdit(int aRow, int aCol, wxGrid *aGrid) override
wxGridCellEditor * Clone() const override
GRID_CELL_RUN_FUNCTION_EDITOR(DIALOG_SHIM *aParent, const std::function< void(int, int)> aFunction, const bool aIsNullable=false)
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
std::function< void(int, int)> m_function
wxGridCellEditor * Clone() const override
GRID_CELL_SYMBOL_ID_EDITOR(DIALOG_SHIM *aParent, const wxString &aPreselect=wxEmptyString)
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
wxDECLARE_NO_COPY_CLASS(GRID_CELL_TEXT_BUTTON)
wxString GetValue() const override
wxComboCtrl * Combo() const
void StartingKey(wxKeyEvent &event) override
void BeginEdit(int aRow, int aCol, wxGrid *aGrid) override
bool EndEdit(int, int, const wxGrid *, const wxString &, wxString *aNewVal) override
void ApplyEdit(int aRow, int aCol, wxGrid *aGrid) override
void SetSize(const wxRect &aRect) override
SEARCH_STACK * m_searchStack
wxGridCellEditor * Clone() const override
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
std::vector< EMBEDDED_FILES * > m_filesStack
GRID_CELL_URL_EDITOR(DIALOG_SHIM *aParent, SEARCH_STACK *aSearchStack=nullptr, std::vector< EMBEDDED_FILES * > aFilesStack={})
Look for files in a number of paths.