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> 
   50    void SetSize( 
const wxRect& aRect ) 
override;
 
   53    void BeginEdit( 
int aRow, 
int aCol, wxGrid* aGrid ) 
override;
 
   54    bool EndEdit( 
int , 
int , 
const wxGrid* , 
const wxString& , wxString *aNewVal ) 
override;
 
   55    void ApplyEdit( 
int aRow, 
int aCol, wxGrid* aGrid ) 
override;
 
   56    void Reset() 
override;
 
   59    void SetValidator( 
const wxValidator& validator );
 
   63    wxComboCtrl* 
Combo()
 const { 
return static_cast<wxComboCtrl*
>( m_control ); }
 
   66    std::unique_ptr< wxValidator > m_validator;
 
 
   79                                const wxString& aPreselect = wxEmptyString ) :
 
 
   84    wxGridCellEditor* 
Clone()
 const override 
 
   89    void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) 
override;
 
 
  101                           const wxString& aPreselect = wxEmptyString ) :
 
 
  107    wxGridCellEditor* 
Clone()
 const override 
 
  112    void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) 
override;
 
 
  125                          std::vector<EMBEDDED_FILES*> aFilesStack = {} ) :
 
 
  131    wxGridCellEditor* 
Clone()
 const override 
 
  136    void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) 
override;
 
 
  162                           bool aNormalize, 
const wxString& aNormalizeBasePath,
 
  163                           std::function<wxString( 
WX_GRID* 
grid, 
int row )> aFileFilterFn,
 
  164                           std::function<wxString( 
const wxString& )> aEmbedCallback = 
nullptr ) :
 
  165            m_dlg( aParentDialog ),
 
 
  186                           const wxString& aFileFilter, 
bool aNormalize = 
false,
 
  187                           const wxString& aNormalizeBasePath = wxEmptyString,
 
  188                           std::function<wxString( 
const wxString& )> aEmbedCallback = 
nullptr ) :
 
  189            m_dlg( aParentDialog ),
 
 
  198    wxGridCellEditor* 
Clone()
 const override 
 
  212    void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) 
override;
 
 
  237                                   const bool aIsNullable = 
false ) :
 
 
  246    wxGridCellEditor* 
Clone()
 const override 
 
  251    void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) 
override;
 
  252    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.