25#ifndef GRID_TEXT_BUTTON_HELPERS_H
26#define GRID_TEXT_BUTTON_HELPERS_H
31#include <wx/generic/gridctrl.h>
32#include <wx/generic/grideditors.h>
48 void SetSize(
const wxRect& aRect )
override;
51 void BeginEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
52 bool EndEdit(
int ,
int ,
const wxGrid* ,
const wxString& , wxString *aNewVal )
override;
53 void ApplyEdit(
int aRow,
int aCol, wxGrid* aGrid )
override;
54 void Reset()
override;
57 void SetValidator(
const wxValidator& validator );
61 wxComboCtrl*
Combo()
const {
return static_cast<wxComboCtrl*
>( m_control ); }
64 std::unique_ptr< wxValidator > m_validator;
77 const wxString& aPreselect = wxEmptyString ) :
82 wxGridCellEditor*
Clone()
const override
87 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
99 const wxString& aPreselect = wxEmptyString ) :
105 wxGridCellEditor*
Clone()
const override
110 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
127 wxGridCellEditor*
Clone()
const override
132 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
override;
158 bool aNormalize,
const wxString& aNormalizeBasePath,
159 std::function<wxString(
WX_GRID*
grid,
int row )> aFileFilterFn ) :
160 m_dlg( aParentDialog ),
180 const wxString& aFileFilter,
bool aNormalize =
false,
181 const wxString& aNormalizeBasePath = wxEmptyString ) :
182 m_dlg( aParentDialog ),
190 wxGridCellEditor*
Clone()
const override
204 void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
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
Editor for wxGrid cells that adds a file/folder browser to the grid input field.
GRID_CELL_PATH_EDITOR(DIALOG_SHIM *aParentDialog, WX_GRID *aGrid, wxString *aCurrentDir, const wxString &aFileFilter, bool aNormalize=false, const wxString &aNormalizeBasePath=wxEmptyString)
Constructor.
wxGridCellEditor * Clone() const override
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
std::function< wxString(WX_GRID *aGrid, int aRow)> m_fileFilterFn
wxString m_normalizeBasePath
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)
Constructor.
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
GRID_CELL_URL_EDITOR(DIALOG_SHIM *aParent, SEARCH_STACK *aSearchStack=nullptr, EMBEDDED_FILES *aFiles=nullptr)
wxGridCellEditor * Clone() const override
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
Look for files in a number of paths.