KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GRID_CELL_PATH_EDITOR Class Reference

Editor for wxGrid cells that adds a file/folder browser to the grid input field. More...

#include <grid_text_button_helpers.h>

Inheritance diagram for GRID_CELL_PATH_EDITOR:
GRID_CELL_TEXT_BUTTON

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)
 Constructor.
 
 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
 
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_SHIMm_dlg
 
WX_GRIDm_grid
 
wxString * m_currentDir
 
bool m_normalize
 
wxString m_normalizeBasePath
 
wxString m_fileFilter
 
std::function< wxString(WX_GRID *aGrid, int aRow)> m_fileFilterFn
 
wxString m_value
 

Detailed Description

Editor for wxGrid cells that adds a file/folder browser to the grid input field.

Definition at line 144 of file grid_text_button_helpers.h.

Constructor & Destructor Documentation

◆ GRID_CELL_PATH_EDITOR() [1/2]

GRID_CELL_PATH_EDITOR::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 
)
inline

Constructor.

Parameters
aCurrentDiris current directory the path editor will open at
aNormalizeindicates whether to normalize the selected path (replace part of path with variables or relative path)
aNormalizeBasePathis the path to use when trying to base variables (generally current project path)
aFileFilterFna callback which provides a file extension(s) filter.

Definition at line 157 of file grid_text_button_helpers.h.

◆ GRID_CELL_PATH_EDITOR() [2/2]

GRID_CELL_PATH_EDITOR::GRID_CELL_PATH_EDITOR ( DIALOG_SHIM aParentDialog,
WX_GRID aGrid,
wxString *  aCurrentDir,
const wxString &  aFileFilter,
bool  aNormalize = false,
const wxString &  aNormalizeBasePath = wxEmptyString 
)
inline

Constructor.

Parameters
aCurrentDiris current directory the path editor will open at
aFileFilteris the file extension(s) to filter by. If empty, the path editor will switch to folder mode instead of file.
aNormalizeindicates whether to normalize the selected path (replace part of path with variables or relative path)
aNormalizeBasePathis the path to use when trying to base variables (generally current project path)

Definition at line 179 of file grid_text_button_helpers.h.

Member Function Documentation

◆ ApplyEdit()

void GRID_CELL_TEXT_BUTTON::ApplyEdit ( int  aRow,
int  aCol,
wxGrid *  aGrid 
)
overrideinherited

Definition at line 152 of file grid_text_button_helpers.cpp.

References GRID_CELL_TEXT_BUTTON::m_value.

◆ BeginEdit()

void GRID_CELL_TEXT_BUTTON::BeginEdit ( int  aRow,
int  aCol,
wxGrid *  aGrid 
)
overrideinherited

◆ Clone()

wxGridCellEditor * GRID_CELL_PATH_EDITOR::Clone ( ) const
inlineoverride

◆ Combo()

◆ Create()

void GRID_CELL_PATH_EDITOR::Create ( wxWindow *  aParent,
wxWindowID  aId,
wxEvtHandler *  aEventHandler 
)
override

◆ EndEdit()

bool GRID_CELL_TEXT_BUTTON::EndEdit ( int  ,
int  ,
const wxGrid *  ,
const wxString &  ,
wxString *  aNewVal 
)
overrideinherited

◆ GetValue()

wxString GRID_CELL_TEXT_BUTTON::GetValue ( ) const
overrideinherited

Definition at line 57 of file grid_text_button_helpers.cpp.

References GRID_CELL_TEXT_BUTTON::Combo().

◆ Reset()

void GRID_CELL_TEXT_BUTTON::Reset ( )
overrideinherited

◆ SetSize()

void GRID_CELL_TEXT_BUTTON::SetSize ( const wxRect &  aRect)
overrideinherited

◆ StartingKey()

void GRID_CELL_TEXT_BUTTON::StartingKey ( wxKeyEvent &  event)
overrideinherited

Definition at line 72 of file grid_text_button_helpers.cpp.

References GRID_CELL_TEXT_BUTTON::Combo().

◆ wxDECLARE_NO_COPY_CLASS()

GRID_CELL_TEXT_BUTTON::wxDECLARE_NO_COPY_CLASS ( GRID_CELL_TEXT_BUTTON  )
protectedinherited

Member Data Documentation

◆ m_currentDir

wxString* GRID_CELL_PATH_EDITOR::m_currentDir
protected

Definition at line 209 of file grid_text_button_helpers.h.

Referenced by Clone(), and Create().

◆ m_dlg

DIALOG_SHIM* GRID_CELL_PATH_EDITOR::m_dlg
protected

Definition at line 207 of file grid_text_button_helpers.h.

Referenced by Clone(), and Create().

◆ m_fileFilter

wxString GRID_CELL_PATH_EDITOR::m_fileFilter
protected

Definition at line 213 of file grid_text_button_helpers.h.

Referenced by Clone(), and Create().

◆ m_fileFilterFn

std::function<wxString( WX_GRID* aGrid, int aRow )> GRID_CELL_PATH_EDITOR::m_fileFilterFn
protected

Definition at line 214 of file grid_text_button_helpers.h.

Referenced by Clone(), and Create().

◆ m_grid

WX_GRID* GRID_CELL_PATH_EDITOR::m_grid
protected

Definition at line 208 of file grid_text_button_helpers.h.

Referenced by Clone(), and Create().

◆ m_normalize

bool GRID_CELL_PATH_EDITOR::m_normalize
protected

Definition at line 210 of file grid_text_button_helpers.h.

Referenced by Clone(), and Create().

◆ m_normalizeBasePath

wxString GRID_CELL_PATH_EDITOR::m_normalizeBasePath
protected

Definition at line 211 of file grid_text_button_helpers.h.

Referenced by Clone(), and Create().

◆ m_value

wxString GRID_CELL_TEXT_BUTTON::m_value
protectedinherited

The documentation for this class was generated from the following files: