21#ifndef _GRID_TRICKS_H_
22#define _GRID_TRICKS_H_
35#define GRIDTRICKS_MAX_COL 50
75 m_grid->SetUseNativeSelection( aEnable );
135 bool finishEditor(
bool aCancel,
bool aMoveDown =
false );
138 virtual void showPopupMenu( wxMenu& menu, wxGridEvent& aEvent );
140 virtual void doPopupSelection( wxCommandEvent& event );
142 bool isTextEntry(
int aRow,
int aCol );
143 bool isChoiceEditor(
int aRow,
int aCol );
144 bool isCheckbox(
int aRow,
int aCol );
145 bool isReadOnly(
int aRow,
int aCol );
147 virtual bool toggleCell(
int aRow,
int aCol,
bool aPreserveSelection =
false );
148 bool showEditor(
int aRow,
int aCol );
150 virtual void paste_clipboard();
151 virtual void paste_text(
const wxString& cb_text );
152 virtual void cutcopy(
bool doCopy,
bool doDelete );
157 void Begin(
const wxGridCellCoords& aSource )
159 const unsigned int generation =
Generation + 1;
wxGridCellCoords m_bulkEditSource
void onGridMotion(wxMouseEvent &event)
void onGridLabelLeftClick(wxGridEvent &event)
void init()
Shared initialization for various ctors.
void onGridEditorShown(wxGridEvent &aEvent)
std::vector< std::pair< int, wxString > > m_bulkEditRows
void getSelectedArea()
Puts the selected area into a sensible rectangle of m_sel_{row,col}_{start,count} above.
bool m_multiCellEditEnabled
GRID_TRICKS(WX_GRID *aGrid)
void onGridEditorHidden(wxGridEvent &aEvent)
void EnableColumnBulkEdit(bool aEnable=true)
Apply an edit to every selected cell in the edited cell's column.
void onKeyDown(wxKeyEvent &event)
BULK_EDIT_SESSION m_bulkEditor
void onPopupSelection(wxCommandEvent &event)
void onEditorInput(wxCommandEvent &aEvent)
void onEditorKeyDown(wxKeyEvent &aEvent)
void onGridCellChanged(wxGridEvent &aEvent)
bool m_enableSingleClickEdit
void onGridCellChanging(wxGridEvent &aEvent)
bool GetTooltipEnabled(int aCol)
Query if the tooltip for a column is enabled.
std::function< void(wxCommandEvent &)> m_addHandler
bool m_bulkEditorEnterHandled
void onEditorDropdownOpened(wxCommandEvent &aEvent)
virtual void showPopupMenu(wxMenu &menu, wxGridEvent &aEvent)
std::bitset< GRIDTRICKS_MAX_COL > m_tooltipEnabled
wxComboCtrl * shownGenericPopup(const wxKeyEvent &aEnterKey)
void onEditorTextEnter(wxCommandEvent &aEvent)
void onUpdateUI(wxUpdateUIEvent &event)
friend class SCINTILLA_TRICKS
Allow various conspiracies between the two tricks handlers.
void onGridCellRightClick(wxGridEvent &event)
virtual void appendPopupMenuItems(wxMenu &aMenu)
WX_GRID * m_grid
I don't own the grid, but he owns me.
void onGridEditorCreated(wxGridEditorCreatedEvent &aEvent)
void onGridCellLeftDClick(wxGridEvent &event)
bool m_columnBulkEditEnabled
void SetTooltipEnable(int aCol, bool aEnable=true)
Enable the tooltip for a column.
virtual void onGridCellLeftClick(wxGridEvent &event)
virtual bool handleDoubleClick(wxGridEvent &aEvent)
virtual void onCharHook(wxKeyEvent &event)
void onEditorDropdownClosed(wxCommandEvent &aEvent)
bool finishEditor(bool aCancel, bool aMoveDown=false)
void onGridLabelRightClick(wxGridEvent &event)
#define GRIDTRICKS_MAX_COL
@ GRID_TRICKS_LAST_CLIENT_ID
@ GRIDTRICKS_FIRST_SHOWHIDE
@ GRIDTRICKS_FIRST_CLIENT_ID
std::vector< wxGridBlockCoords > Selection
void Begin(const wxGridCellCoords &aSource)