]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/grid.h
VC6 SDK doesn't define INVALID_FILE_ATTRIBUTES, do it ourselves
[wxWidgets.git] / interface / wx / grid.h
index 9072c1992c1200cb1b40ea8b0c5d50847fd84322..0f4e06e2a787d529ff3b8a57b7eb0eea117fbcaf 100644 (file)
@@ -2014,6 +2014,11 @@ public:
     */
     int GetColSize(int col) const;
 
+    /**
+        Returns @true if the specified column is not currently hidden.
+     */
+    bool IsColShown(int col) const;
+
     /**
         Returns the default height for column labels.
     */
@@ -2054,6 +2059,11 @@ public:
     */
     int GetRowSize(int row) const;
 
+    /**
+        Returns @true if the specified row is not currently hidden.
+     */
+    bool IsRowShown(int row) const;
+
     /**
         Sets the height of the column labels.
 
@@ -2295,6 +2305,15 @@ public:
     */
     void SetColPos(int colID, int newPos);
 
+    /**
+        Sets the positions of all columns at once.
+
+        This method takes an array containing the indices of the columns in
+        their display order, i.e. uses the same convention as
+        wxHeaderCtrl::SetColumnsOrder().
+     */
+    void SetColumnsOrder(const wxArrayInt& order);
+
     /**
         Resets the position of the columns to the default.
      */
@@ -3166,6 +3185,71 @@ protected:
      */
     void UnsetSortingColumn();
     //@}
+
+    /**
+        @name Accessors for component windows.
+
+        Return the various child windows of wxGrid.
+
+        wxGrid is an empty parent window for 4 children representing the column
+        labels window (top), the row labels window (left), the corner window
+        (top left) and the main grid window. It may be necessary to use these
+        individual windows and not the wxGrid window itself if you need to
+        handle events for them (this can be done using wxEvtHandler::Connect()
+        or wxWindow::PushEventHandler()) or do something else requiring the use
+        of the correct window pointer. Notice that you should not, however,
+        change these windows (e.g. reposition them or draw over them) because
+        they are managed by wxGrid itself.
+     */
+    //@{
+
+    /**
+        Return the main grid window containing the grid cells.
+
+        This window is always shown.
+     */
+    wxWindow *GetGridWindow() const;
+
+    /**
+        Return the row labels window.
+
+        This window is not shown if the row labels were hidden using
+        HideRowLabels().
+     */
+    wxWindow *GetGridRowLabelWindow() const;
+
+    /**
+        Return the column labels window.
+
+        This window is not shown if the columns labels were hidden using
+        HideColLabels().
+
+        Depending on whether UseNativeColHeader() was called or not this can be
+        either a wxHeaderCtrl or a plain wxWindow.  This function returns a valid
+        window pointer in either case but in the former case you can also use
+        GetGridColHeader() to access it if you need wxHeaderCtrl-specific
+        functionality.
+     */
+    wxWindow *GetGridWindow() const;
+
+    /**
+        Return the window in the top left grid corner.
+
+        This window is shown only of both columns and row labels are shown and
+        normally doesn't contain anything. Clicking on it is handled by wxGrid
+        however and can be used to select the entire grid.
+     */
+    wxWindow *GetGridCornerLabelWindow() const;
+
+    /**
+        Return the header control used for column labels display.
+
+        This function can only be called if UseNativeColHeader() had been
+        called.
+     */
+    wxHeaderCtrl *GetGridColHeader() const;
+
+    //@}
 };