summaryrefslogtreecommitdiff
path: root/library/CustomGrid.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 16:44:25 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 16:44:25 +0200
commitc63d9b438572f06f555e2232a15bd3c46bd10546 (patch)
tree92f2eca00f2a915078ee979acf26906670d75e5f /library/CustomGrid.h
downloadFreeFileSync-c63d9b438572f06f555e2232a15bd3c46bd10546.tar.gz
FreeFileSync-c63d9b438572f06f555e2232a15bd3c46bd10546.tar.bz2
FreeFileSync-c63d9b438572f06f555e2232a15bd3c46bd10546.zip
1.2
Diffstat (limited to 'library/CustomGrid.h')
-rw-r--r--library/CustomGrid.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/library/CustomGrid.h b/library/CustomGrid.h
new file mode 100644
index 00000000..93a378b4
--- /dev/null
+++ b/library/CustomGrid.h
@@ -0,0 +1,62 @@
+#ifndef CUSTOMGRID_H_INCLUDED
+#define CUSTOMGRID_H_INCLUDED
+
+#include "../ui/MainDialog.h"
+#include <vector>
+#include <wx/grid.h>
+
+using namespace std;
+
+extern int leadingPanel;
+
+class CustomGridTableBase;
+
+//##################################################################################
+
+class CustomGrid : public wxGrid
+{
+public:
+ CustomGrid( wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxWANTS_CHARS,
+ const wxString& name = wxGridNameStr );
+
+ ~CustomGrid();
+
+ bool CreateGrid(int numRows, int numCols, wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells);
+
+ void deactivateScrollbars();
+
+ //overwrite virtual method to finally get rid of the scrollbars
+ void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh = true);
+
+ //this method is called when grid view changes: useful for parallel updating of multiple grids
+ void DoPrepareDC(wxDC& dc);
+
+ void setScrollFriends(CustomGrid* grid1, CustomGrid* grid2, CustomGrid* grid3);
+
+ void setGridDataTable(UI_Grid* currentUI_ViewPtr);
+
+ void updateGridSizes();
+
+ //set sort direction indicator on UI
+ void setSortMarker(const int sortColumn, const wxBitmap* bitmap = &wxNullBitmap);
+
+ void DrawColLabel( wxDC& dc, int col );
+
+private:
+ bool scrollbarsEnabled;
+
+ CustomGrid* m_grid1;
+ CustomGrid* m_grid2;
+ CustomGrid* m_grid3;
+
+ CustomGridTableBase* gridDataTable;
+
+ int currentSortColumn;
+ const wxBitmap* sortMarker;
+};
+
+#endif // CUSTOMGRID_H_INCLUDED
bgstack15