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

#include <panel_embedded_files.h>

Inheritance diagram for EMBEDDED_FILES_GRID_TRICKS:
GRID_TRICKS

Public Member Functions

 EMBEDDED_FILES_GRID_TRICKS (WX_GRID *aGrid)
 
 ~EMBEDDED_FILES_GRID_TRICKS () override=default
 
void showPopupMenu (wxMenu &menu, wxGridEvent &aEvent) override
 
void doPopupSelection (wxCommandEvent &event) override
 
void SetTooltipEnable (int aCol, bool aEnable=true)
 Enable the tooltip for a column.
 
bool GetTooltipEnabled (int aCol)
 Query if the tooltip for a column is enabled.
 

Protected Member Functions

virtual bool supportsVisibilityColumn ()
 
void init ()
 Shared initialization for various ctors.
 
void getSelectedArea ()
 Puts the selected area into a sensible rectangle of m_sel_{row,col}_{start,count} above.
 
void onGridCellLeftClick (wxGridEvent &event)
 
void onGridCellLeftDClick (wxGridEvent &event)
 
void onGridCellRightClick (wxGridEvent &event)
 
void onGridLabelLeftClick (wxGridEvent &event)
 
void onGridLabelRightClick (wxGridEvent &event)
 
void onPopupSelection (wxCommandEvent &event)
 
void onKeyDown (wxKeyEvent &event)
 
void onCharHook (wxKeyEvent &event)
 
void onUpdateUI (wxUpdateUIEvent &event)
 
void onGridMotion (wxMouseEvent &event)
 
virtual bool handleDoubleClick (wxGridEvent &aEvent)
 
bool isTextEntry (int aRow, int aCol)
 
bool isCheckbox (int aRow, int aCol)
 
bool isReadOnly (int aRow, int aCol)
 
virtual bool toggleCell (int aRow, int aCol, bool aPreserveSelection=false)
 
bool showEditor (int aRow, int aCol)
 
virtual void paste_clipboard ()
 
virtual void paste_text (const wxString &cb_text)
 
virtual void cutcopy (bool doCopy, bool doDelete)
 

Protected Attributes

int m_curRow
 
WX_GRIDm_grid
 I don't own the grid, but he owns me.
 
int m_sel_row_start
 
int m_sel_col_start
 
int m_sel_row_count
 
int m_sel_col_count
 
std::function< void(wxCommandEvent &)> m_addHandler
 
std::bitset< GRIDTRICKS_MAX_COLm_tooltipEnabled
 
bool m_enableSingleClickEdit
 
bool m_multiCellEditEnabled
 

Private Types

enum  { EMBEDDED_FILES_GRID_TRICKS_COPY_FILENAME = GRIDTRICKS_FIRST_CLIENT_ID }
 

Detailed Description

Definition at line 33 of file panel_embedded_files.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
EMBEDDED_FILES_GRID_TRICKS_COPY_FILENAME 

Definition at line 35 of file panel_embedded_files.h.

Constructor & Destructor Documentation

◆ EMBEDDED_FILES_GRID_TRICKS()

EMBEDDED_FILES_GRID_TRICKS::EMBEDDED_FILES_GRID_TRICKS ( WX_GRID aGrid)
explicit

Definition at line 40 of file panel_embedded_files.cpp.

◆ ~EMBEDDED_FILES_GRID_TRICKS()

EMBEDDED_FILES_GRID_TRICKS::~EMBEDDED_FILES_GRID_TRICKS ( )
overridedefault

Member Function Documentation

◆ cutcopy()

◆ doPopupSelection()

void EMBEDDED_FILES_GRID_TRICKS::doPopupSelection ( wxCommandEvent &  event)
overridevirtual

◆ getSelectedArea()

void GRID_TRICKS::getSelectedArea ( )
protectedinherited

◆ GetTooltipEnabled()

bool GRID_TRICKS::GetTooltipEnabled ( int  aCol)
inlineinherited

Query if the tooltip for a column is enabled.

Parameters
aColis the column to query
Returns
if the tooltip is enabled for the column

Definition at line 86 of file grid_tricks.h.

References GRID_TRICKS::m_tooltipEnabled.

◆ handleDoubleClick()

bool GRID_TRICKS::handleDoubleClick ( wxGridEvent &  aEvent)
protectedvirtualinherited

Reimplemented in LIB_TABLE_GRID_TRICKS, and JOBS_GRID_TRICKS.

Definition at line 279 of file grid_tricks.cpp.

Referenced by GRID_TRICKS::onGridCellLeftDClick().

◆ init()

◆ isCheckbox()

bool GRID_TRICKS::isCheckbox ( int  aRow,
int  aCol 
)
protectedinherited

Definition at line 106 of file grid_tricks.cpp.

References GRID_TRICKS::m_grid.

Referenced by GRID_TRICKS::toggleCell().

◆ isReadOnly()

bool GRID_TRICKS::isReadOnly ( int  aRow,
int  aCol 
)
protectedinherited

◆ isTextEntry()

bool GRID_TRICKS::isTextEntry ( int  aRow,
int  aCol 
)
protectedinherited

Definition at line 95 of file grid_tricks.cpp.

References editor, and GRID_TRICKS::m_grid.

Referenced by GRID_TRICKS::cutcopy(), and GRID_TRICKS::showPopupMenu().

◆ onCharHook()

void GRID_TRICKS::onCharHook ( wxKeyEvent &  event)
protectedinherited

◆ onGridCellLeftClick()

◆ onGridCellLeftDClick()

void GRID_TRICKS::onGridCellLeftDClick ( wxGridEvent &  event)
protectedinherited

◆ onGridCellRightClick()

void GRID_TRICKS::onGridCellRightClick ( wxGridEvent &  event)
protectedinherited

Definition at line 326 of file grid_tricks.cpp.

References GRID_TRICKS::showPopupMenu().

Referenced by GRID_TRICKS::init().

◆ onGridLabelLeftClick()

void GRID_TRICKS::onGridLabelLeftClick ( wxGridEvent &  event)
protectedinherited

Definition at line 334 of file grid_tricks.cpp.

References WX_GRID::CommitPendingChanges(), and GRID_TRICKS::m_grid.

Referenced by GRID_TRICKS::init().

◆ onGridLabelRightClick()

void GRID_TRICKS::onGridLabelRightClick ( wxGridEvent &  event)
protectedinherited

Definition at line 342 of file grid_tricks.cpp.

References GRIDTRICKS_FIRST_SHOWHIDE, and GRID_TRICKS::m_grid.

Referenced by GRID_TRICKS::init().

◆ onGridMotion()

void GRID_TRICKS::onGridMotion ( wxMouseEvent &  event)
protectedinherited

Definition at line 256 of file grid_tricks.cpp.

References GRID_TRICKS::m_grid, and GRID_TRICKS::m_tooltipEnabled.

Referenced by GRID_TRICKS::init().

◆ onKeyDown()

void GRID_TRICKS::onKeyDown ( wxKeyEvent &  event)
protectedinherited

◆ onPopupSelection()

void GRID_TRICKS::onPopupSelection ( wxCommandEvent &  event)
protectedinherited

Definition at line 422 of file grid_tricks.cpp.

References GRID_TRICKS::doPopupSelection().

Referenced by GRID_TRICKS::init().

◆ onUpdateUI()

void GRID_TRICKS::onUpdateUI ( wxUpdateUIEvent &  event)
protectedinherited

Definition at line 889 of file grid_tricks.cpp.

References GRID_TRICKS::m_grid.

Referenced by GRID_TRICKS::init().

◆ paste_clipboard()

void GRID_TRICKS::paste_clipboard ( )
protectedvirtualinherited

◆ paste_text()

◆ SetTooltipEnable()

void GRID_TRICKS::SetTooltipEnable ( int  aCol,
bool  aEnable = true 
)
inlineinherited

Enable the tooltip for a column.

The tooltip is read from the string contained in the cell data.

Parameters
aColis the column to use
aEnableis true to enable the tooltip (default)

Definition at line 75 of file grid_tricks.h.

References GRID_TRICKS::m_tooltipEnabled.

Referenced by PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL().

◆ showEditor()

◆ showPopupMenu()

void EMBEDDED_FILES_GRID_TRICKS::showPopupMenu ( wxMenu &  menu,
wxGridEvent &  aEvent 
)
overridevirtual

◆ supportsVisibilityColumn()

virtual bool EMBEDDED_FILES_GRID_TRICKS::supportsVisibilityColumn ( )
inlineprotectedvirtual

Definition at line 51 of file panel_embedded_files.h.

◆ toggleCell()

bool GRID_TRICKS::toggleCell ( int  aRow,
int  aCol,
bool  aPreserveSelection = false 
)
protectedvirtualinherited

Member Data Documentation

◆ m_addHandler

std::function<void( wxCommandEvent& )> GRID_TRICKS::m_addHandler
protectedinherited

Definition at line 134 of file grid_tricks.h.

Referenced by GRID_TRICKS::onCharHook(), and GRID_TRICKS::paste_text().

◆ m_curRow

int EMBEDDED_FILES_GRID_TRICKS::m_curRow
protected

Definition at line 53 of file panel_embedded_files.h.

Referenced by doPopupSelection(), and showPopupMenu().

◆ m_enableSingleClickEdit

bool GRID_TRICKS::m_enableSingleClickEdit
protectedinherited

◆ m_grid

WX_GRID* GRID_TRICKS::m_grid
protectedinherited

I don't own the grid, but he owns me.

Definition at line 125 of file grid_tricks.h.

Referenced by GRID_TRICKS::cutcopy(), GRID_TRICKS::doPopupSelection(), doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FIELDS_GRID_TRICKS::doPopupSelection(), SIGNALS_GRID_TRICKS::doPopupSelection(), CURSORS_GRID_TRICKS::doPopupSelection(), MEASUREMENTS_GRID_TRICKS::doPopupSelection(), LIB_TABLE_GRID_TRICKS::doPopupSelection(), JOBS_GRID_TRICKS::doPopupSelection(), PLUGINS_GRID_TRICKS::doPopupSelection(), GRID_TRICKS::getSelectedArea(), JOBS_GRID_TRICKS::handleDoubleClick(), GRID_TRICKS::init(), GRID_TRICKS::isCheckbox(), GRID_TRICKS::isReadOnly(), GRID_TRICKS::isTextEntry(), GRID_TRICKS::onCharHook(), GRID_TRICKS::onGridCellLeftClick(), GRID_TRICKS::onGridLabelLeftClick(), GRID_TRICKS::onGridLabelRightClick(), GRID_TRICKS::onGridMotion(), GRID_TRICKS::onKeyDown(), GRID_TRICKS::onUpdateUI(), DESIGN_BLOCK_GRID_TRICKS::optionsEditor(), SYMBOL_GRID_TRICKS::optionsEditor(), FP_GRID_TRICKS::optionsEditor(), GRID_TRICKS::paste_clipboard(), GRID_TRICKS::paste_text(), DESIGN_BLOCK_GRID_TRICKS::paste_text(), SYMBOL_GRID_TRICKS::paste_text(), FP_GRID_TRICKS::paste_text(), GRID_TRICKS::showEditor(), GRID_TRICKS::showPopupMenu(), FIELDS_EDITOR_GRID_TRICKS::showPopupMenu(), FIELDS_GRID_TRICKS::showPopupMenu(), SIGNALS_GRID_TRICKS::showPopupMenu(), CURSORS_GRID_TRICKS::showPopupMenu(), MEASUREMENTS_GRID_TRICKS::showPopupMenu(), LIB_TABLE_GRID_TRICKS::showPopupMenu(), JOBS_GRID_TRICKS::showPopupMenu(), PLUGINS_GRID_TRICKS::showPopupMenu(), and GRID_TRICKS::toggleCell().

◆ m_multiCellEditEnabled

bool GRID_TRICKS::m_multiCellEditEnabled
protectedinherited

◆ m_sel_col_count

int GRID_TRICKS::m_sel_col_count
protectedinherited

◆ m_sel_col_start

int GRID_TRICKS::m_sel_col_start
protectedinherited

◆ m_sel_row_count

◆ m_sel_row_start

◆ m_tooltipEnabled

std::bitset<GRIDTRICKS_MAX_COL> GRID_TRICKS::m_tooltipEnabled
protectedinherited

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