X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef5df12bdf587773bcd0ac0e521af9fc9013a0c9..3964e424bf6b70e43b7cf53ef41d279e4da5c037:/include/wx/generic/grid.h?ds=sidebyside diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 5601ed1c2a..95cc40e022 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -605,13 +605,6 @@ public: Merged }; - enum wxAttrOverflowMode - { - Unset = -1, - Overflow, - SingleCell - }; - // ctors wxGridCellAttr(wxGridCellAttr *attrDefault = NULL) { @@ -675,7 +668,7 @@ public: bool HasRenderer() const { return m_renderer != NULL; } bool HasEditor() const { return m_editor != NULL; } bool HasReadWriteMode() const { return m_isReadOnly != Unset; } - bool HasOverflowMode() const { return m_overflow != Unset; } + bool HasOverflowMode() const { return m_overflow != UnsetOverflow; } const wxColour& GetTextColour() const; const wxColour& GetBackgroundColour() const; @@ -683,7 +676,7 @@ public: void GetAlignment(int *hAlign, int *vAlign) const; void GetSize(int *num_rows, int *num_cols) const; bool GetOverflow() const - { return m_overflow != wxGridCellAttr::SingleCell; } + { return m_overflow != SingleCell; } wxGridCellRenderer *GetRenderer(wxGrid* grid, int row, int col) const; wxGridCellEditor *GetEditor(wxGrid* grid, int row, int col) const; @@ -701,6 +694,13 @@ private: ReadOnly }; + enum wxAttrOverflowMode + { + UnsetOverflow = -1, + Overflow, + SingleCell + }; + // the common part of all ctors void Init(wxGridCellAttr *attrDefault = NULL); @@ -1351,6 +1351,18 @@ public: void SetColMinimalWidth( int col, int width ); void SetRowMinimalHeight( int row, int width ); + /* These members can be used to query and modify the minimal + * acceptable size of grid rows and columns. Call this function in + * your code which creates the grid if you want to display cells + * with a size smaller than the default acceptable minimum size. + * Like the members SetColMinimalWidth and SetRowMinimalWidth, + * the existing rows or columns will not be checked/resized. + */ + void SetColMinimalAcceptableWidth( int width ); + void SetRowMinimalAcceptableHeight( int width ); + int GetColMinimalAcceptableWidth() const; + int GetRowMinimalAcceptableHeight() const; + void SetDefaultCellBackgroundColour( const wxColour& ); void SetCellBackgroundColour( int row, int col, const wxColour& ); void SetDefaultCellTextColour( const wxColour& ); @@ -1686,6 +1698,7 @@ protected: void InitRowHeights(); int m_defaultRowHeight; + int m_minAcceptableRowHeight; wxArrayInt m_rowHeights; wxArrayInt m_rowBottoms; @@ -1693,6 +1706,7 @@ protected: void InitColWidths(); int m_defaultColWidth; + int m_minAcceptableColWidth; wxArrayInt m_colWidths; wxArrayInt m_colRights; @@ -1881,6 +1895,7 @@ protected: DECLARE_NO_COPY_CLASS(wxGrid) }; + // ---------------------------------------------------------------------------- // Grid event class and event types // ----------------------------------------------------------------------------