diff options
author | B Stack <bgstack15@gmail.com> | 2020-11-01 17:16:37 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-11-01 17:16:37 -0500 |
commit | 2a57306c461964f860ba1cb51f1bf96c954173e0 (patch) | |
tree | 9939cdd1735bf15e97ad6700419c0604cac7c59e /wx+/grid.h | |
parent | Merge branch '11.2' into 'master' (diff) | |
download | FreeFileSync-2a57306c461964f860ba1cb51f1bf96c954173e0.tar.gz FreeFileSync-2a57306c461964f860ba1cb51f1bf96c954173e0.tar.bz2 FreeFileSync-2a57306c461964f860ba1cb51f1bf96c954173e0.zip |
add upstream 11.3
Diffstat (limited to 'wx+/grid.h')
-rw-r--r-- | wx+/grid.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -66,17 +66,18 @@ struct GridSelectEvent : public wxEvent GridSelectEvent* Clone() const override { return new GridSelectEvent(*this); } const size_t rowFirst_; //selected range: [rowFirst_, rowLast_) - const size_t rowLast_; - const bool positive_; //"false" when clearing selection! + const size_t rowLast_; // + const bool positive_; //"false" when clearing selection! const std::optional<GridClickEvent> mouseClick_; //filled unless selection was performed via keyboard shortcuts }; struct GridLabelClickEvent : public wxEvent { - GridLabelClickEvent(wxEventType et, ColumnType colType) : wxEvent(0 /*winid*/, et), colType_(colType) {} + GridLabelClickEvent(wxEventType et, ColumnType colType, const wxPoint& mousePos) : wxEvent(0 /*winid*/, et), colType_(colType), mousePos_(mousePos) {} GridLabelClickEvent* Clone() const override { return new GridLabelClickEvent(*this); } const ColumnType colType_; //may be ColumnType::none + const wxPoint mousePos_; //client coordinates }; struct GridColumnResizeEvent : public wxEvent @@ -85,7 +86,7 @@ struct GridColumnResizeEvent : public wxEvent GridColumnResizeEvent* Clone() const override { return new GridColumnResizeEvent(*this); } const ColumnType colType_; - const int offset_; + const int offset_; }; struct GridContextMenuEvent : public wxEvent @@ -109,11 +110,11 @@ public: //cell area: virtual std::wstring getValue(size_t row, ColumnType colType) const = 0; - virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected); //default implementation + virtual void renderRowBackgound(wxDC& dc, const wxRect& rect, size_t row, bool enabled, bool selected, HoverArea rowHover); //default implementation virtual void renderCell (wxDC& dc, const wxRect& rect, size_t row, ColumnType colType, bool enabled, bool selected, HoverArea rowHover); virtual int getBestSize (wxDC& dc, size_t row, ColumnType colType); //must correspond to renderCell()! - virtual HoverArea getRowMouseHover (wxDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) { return HoverArea::none; } - virtual std::wstring getToolTip (size_t row, ColumnType colType) const { return std::wstring(); } + virtual HoverArea getMouseHover (wxDC& dc, size_t row, ColumnType colType, int cellRelativePosX, int cellWidth) { return HoverArea::none; } + virtual std::wstring getToolTip (size_t row, ColumnType colType, HoverArea rowHover) { return std::wstring(); } //label area: virtual std::wstring getColumnLabel(ColumnType colType) const = 0; @@ -174,6 +175,7 @@ public: //----------------------------------------------------------------------------- void setColumnLabelHeight(int height); + int getColumnLabelHeight() const { return colLabelHeight_; } void showRowLabel(bool visible); enum ScrollBarStatus |