| 
    KiCad PCB EDA Suite
    
   | 
 
Editor for wxGrid cells that adds a file/folder browser to the grid input field. More...
#include <grid_text_button_helpers.h>
  
Public Member Functions | |
| 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.   | |
| 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.   | |
| wxGridCellEditor * | Clone () const override | 
| void | Create (wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override | 
| wxString | GetValue () const override | 
| void | SetSize (const wxRect &aRect) override | 
| 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 | Reset () override | 
Protected Member Functions | |
| wxComboCtrl * | Combo () const | 
| wxDECLARE_NO_COPY_CLASS (GRID_CELL_TEXT_BUTTON) | |
Protected Attributes | |
| DIALOG_SHIM * | m_dlg | 
| WX_GRID * | m_grid | 
| wxString * | m_currentDir | 
| bool | m_normalize | 
| wxString | m_normalizeBasePath | 
| wxString | m_fileFilter | 
| std::function< wxString(WX_GRID *aGrid, int aRow)> | m_fileFilterFn | 
| std::function< wxString(const wxString &)> | m_embedCallback | 
| wxString | m_value | 
Editor for wxGrid cells that adds a file/folder browser to the grid input field.
Definition at line 148 of file grid_text_button_helpers.h.
      
  | 
  inline | 
Constructor.
| aCurrentDir | is current directory the path editor will open at | 
| aNormalize | indicates whether to normalize the selected path (replace part of path with variables or relative path) | 
| aNormalizeBasePath | is the path to use when trying to base variables (generally current project path) | 
| aFileFilterFn | a callback which provides a file extension(s) filter. | 
Definition at line 161 of file grid_text_button_helpers.h.
References grid, m_currentDir, m_dlg, m_embedCallback, m_fileFilterFn, m_grid, m_normalize, m_normalizeBasePath, and move.
Referenced by Clone().
      
  | 
  inline | 
Constructor.
| aCurrentDir | is current directory the path editor will open at | 
| aFileFilter | is the file extension(s) to filter by. If empty, the path editor will switch to folder mode instead of file. | 
| aNormalize | indicates whether to normalize the selected path (replace part of path with variables or relative path) | 
| aNormalizeBasePath | is the path to use when trying to base variables (generally current project path) | 
Definition at line 185 of file grid_text_button_helpers.h.
References m_currentDir, m_dlg, m_embedCallback, m_fileFilter, m_grid, m_normalize, m_normalizeBasePath, and move.
      
  | 
  overrideinherited | 
Definition at line 153 of file grid_text_button_helpers.cpp.
References m_value.
      
  | 
  overrideinherited | 
Definition at line 123 of file grid_text_button_helpers.cpp.
References Combo(), and m_value.
Referenced by GRID_CELL_RUN_FUNCTION_EDITOR::BeginEdit().
      
  | 
  inlineoverride | 
Definition at line 198 of file grid_text_button_helpers.h.
References GRID_CELL_PATH_EDITOR(), m_currentDir, m_dlg, m_embedCallback, m_fileFilter, m_fileFilterFn, m_grid, m_normalize, and m_normalizeBasePath.
      
  | 
  inlineprotectedinherited | 
Definition at line 63 of file grid_text_button_helpers.h.
Referenced by BeginEdit(), GRID_CELL_FPID_EDITOR::Create(), GRID_CELL_PATH_EDITOR::Create(), GRID_CELL_RUN_FUNCTION_EDITOR::Create(), GRID_CELL_SYMBOL_ID_EDITOR::Create(), GRID_CELL_URL_EDITOR::Create(), EndEdit(), GetValue(), Reset(), and StartingKey().
      
  | 
  override | 
Definition at line 598 of file grid_text_button_helpers.cpp.
References WX_GRID::CellEditorSetMargins(), GRID_CELL_TEXT_BUTTON::Combo(), m_currentDir, m_dlg, m_embedCallback, m_fileFilter, m_fileFilterFn, m_grid, m_normalize, and m_normalizeBasePath.
      
  | 
  overrideinherited | 
Definition at line 137 of file grid_text_button_helpers.cpp.
      
  | 
  overrideinherited | 
Definition at line 57 of file grid_text_button_helpers.cpp.
References Combo().
      
  | 
  overrideinherited | 
Definition at line 159 of file grid_text_button_helpers.cpp.
      
  | 
  overrideinherited | 
Definition at line 63 of file grid_text_button_helpers.cpp.
References WX_GRID::CellEditorTransformSizeRect().
      
  | 
  overrideinherited | 
Definition at line 72 of file grid_text_button_helpers.cpp.
References Combo().
      
  | 
  protectedinherited | 
References GRID_CELL_TEXT_BUTTON().
      
  | 
  protected | 
Definition at line 217 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), GRID_CELL_PATH_EDITOR(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protected | 
Definition at line 215 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), GRID_CELL_PATH_EDITOR(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protected | 
Definition at line 223 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), GRID_CELL_PATH_EDITOR(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protected | 
Definition at line 221 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protected | 
Definition at line 222 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protected | 
Definition at line 216 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), GRID_CELL_PATH_EDITOR(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protected | 
Definition at line 218 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), GRID_CELL_PATH_EDITOR(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protected | 
Definition at line 219 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), GRID_CELL_PATH_EDITOR(), and GRID_CELL_PATH_EDITOR().
      
  | 
  protectedinherited | 
Definition at line 69 of file grid_text_button_helpers.h.
Referenced by ApplyEdit(), BeginEdit(), EndEdit(), and Reset().