backported wxGrid labels autosizing patch (r44835) to 2.8

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-11-23 21:21:25 +00:00
parent 6144cede54
commit c25ddfa8a3
4 changed files with 85 additions and 2 deletions

View File

@@ -51,6 +51,12 @@ extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxGridNameStr[];
#define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING
#define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER
#if wxABI_VERSION >= 20808
// magic constant which tells (to some functions) to automatically
// calculate the appropriate size
#define wxGRID_AUTOSIZE (-1)
#endif // wxABI_VERSION >= 20808
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
@@ -1996,6 +2002,10 @@ protected:
bool GetModelValues();
bool SetModelValues();
private:
// Calculate the minimum acceptable size for labels area
wxCoord CalcColOrRowLabelAreaMinSize(bool column /* or row? */);
friend class WXDLLIMPEXP_ADV wxGridSelection;
DECLARE_DYNAMIC_CLASS( wxGrid )