21 #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DBGRID_H__
22 #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DBGRID_H__
25 #include <yuni/yuni.h>
27 namespace Antares::Component::Datagrid
46 const wxPoint& currentPosition()
const
48 return pCurrentPosition;
53 return pParentComponent;
56 void copyToClipboard();
57 void copyAllToClipboard();
58 void pasteFromClipboard();
60 void ensureDataAreLoaded();
62 void resizeAllHeaders(
bool nodelay =
false);
69 pAllowRefresh = enabled;
72 bool canRefresh()
const
77 void DrawColLabel(wxDC& dc,
int col, uint& offset);
78 void DrawRowLabel(wxDC& dc,
int row, uint& offset);
79 void DrawCellHighlight(wxDC& dc,
const wxGridCellAttr* attr);
81 void disableColorMappingForRowLabels()
83 pColorMappingRowLabels =
false;
87 void setOtherGrid(
DBGrid* otherGrid);
91 bool dataAreReady()
const;
93 void ensureDataAreLoadedDelayed();
98 void onGridSelectCell(wxGridEvent& evt);
103 void onGridRangeSelect(wxGridRangeSelectEvent& evt);
108 void onGridLeave(wxFocusEvent& evt);
110 void onDraw(wxPaintEvent& evt);
112 void onKeyUp(wxKeyEvent& evt);
114 void evtOnResizeHeaders(wxCommandEvent& evt);
116 void evtCornerPaint(wxPaintEvent& evt);
118 void onEraseBackground(wxEraseEvent&)
122 void onDrawColLabels(wxPaintEvent&);
123 void onDrawRowLabels(wxPaintEvent&);
125 void onScroll(wxScrollWinEvent&);
129 Component* pParentComponent;
130 wxPoint pCurrentPosition;
132 bool pColorMappingRowLabels;
134 DBGrid* otherGrid_ =
nullptr;
136 DECLARE_EVENT_TABLE();
A datagrid with virtual values.
Definition: component.h:84
void enableRefresh(bool enabled)
Allow refresh.
Definition: dbgrid.h:67
virtual ~DBGrid()
Destructor.
Definition: dbgrid.cpp:123
DBGrid(Component *parent)
Constructor.
Definition: dbgrid.cpp:74