projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new VC++ project files with both dll and lib in one project
[wxWidgets.git]
/
src
/
generic
/
grid.cpp
diff --git
a/src/generic/grid.cpp
b/src/generic/grid.cpp
index c7bb960e079f40ab26963da030f8274f2e816206..bd3c956897db5d4cbe2a5939f2e1d445f2f477f6 100644
(file)
--- a/
src/generic/grid.cpp
+++ b/
src/generic/grid.cpp
@@
-17,7
+17,7
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#if
def __GNUG__
+#if
defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "grid.h"
#endif
#pragma implementation "grid.h"
#endif
@@
-69,7
+69,8
@@
// array classes
// ----------------------------------------------------------------------------
// array classes
// ----------------------------------------------------------------------------
-WX_DEFINE_EXPORTED_ARRAY_NO_PTR(wxGridCellAttr *, wxArrayAttrs);
+WX_DEFINE_ARRAY_WITH_DECL_NO_PTR(wxGridCellAttr *, wxArrayAttrs,
+ class WXDLLIMPEXP_ADV);
struct wxGridCellWithAttr
{
struct wxGridCellWithAttr
{
@@
-91,7
+92,8
@@
struct wxGridCellWithAttr
// without rewriting the macros, which require a public copy constructor.
};
// without rewriting the macros, which require a public copy constructor.
};
-WX_DECLARE_EXPORTED_OBJARRAY(wxGridCellWithAttr, wxGridCellWithAttrArray);
+WX_DECLARE_OBJARRAY_WITH_DECL(wxGridCellWithAttr, wxGridCellWithAttrArray,
+ class WXDLLIMPEXP_ADV);
#include "wx/arrimpl.cpp"
#include "wx/arrimpl.cpp"
@@
-123,7
+125,7
@@
DEFINE_EVENT_TYPE(wxEVT_GRID_EDITOR_CREATED)
// private classes
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
-class WXDLL
EXPORT
wxGridRowLabelWindow : public wxWindow
+class WXDLL
IMPEXP_ADV
wxGridRowLabelWindow : public wxWindow
{
public:
wxGridRowLabelWindow() { m_owner = (wxGrid *)NULL; }
{
public:
wxGridRowLabelWindow() { m_owner = (wxGrid *)NULL; }
@@
-145,7
+147,7
@@
private:
};
};
-class WXDLL
EXPORT
wxGridColLabelWindow : public wxWindow
+class WXDLL
IMPEXP_ADV
wxGridColLabelWindow : public wxWindow
{
public:
wxGridColLabelWindow() { m_owner = (wxGrid *)NULL; }
{
public:
wxGridColLabelWindow() { m_owner = (wxGrid *)NULL; }
@@
-167,7
+169,7
@@
private:
};
};
-class WXDLL
EXPORT
wxGridCornerLabelWindow : public wxWindow
+class WXDLL
IMPEXP_ADV
wxGridCornerLabelWindow : public wxWindow
{
public:
wxGridCornerLabelWindow() { m_owner = (wxGrid *)NULL; }
{
public:
wxGridCornerLabelWindow() { m_owner = (wxGrid *)NULL; }
@@
-188,7
+190,7
@@
private:
DECLARE_NO_COPY_CLASS(wxGridCornerLabelWindow)
};
DECLARE_NO_COPY_CLASS(wxGridCornerLabelWindow)
};
-class WXDLL
EXPORT
wxGridWindow : public wxWindow
+class WXDLL
IMPEXP_ADV
wxGridWindow : public wxWindow
{
public:
wxGridWindow()
{
public:
wxGridWindow()
@@
-263,7
+265,7
@@
END_EVENT_TABLE()
// ----------------------------------------------------------------------------
// this class stores attributes set for cells
// ----------------------------------------------------------------------------
// this class stores attributes set for cells
-class WXDLL
EXPORT
wxGridCellAttrData
+class WXDLL
IMPEXP_ADV
wxGridCellAttrData
{
public:
void SetAttr(wxGridCellAttr *attr, int row, int col);
{
public:
void SetAttr(wxGridCellAttr *attr, int row, int col);
@@
-279,7
+281,7
@@
private:
};
// this class stores attributes set for rows or columns
};
// this class stores attributes set for rows or columns
-class WXDLL
EXPORT
wxGridRowOrColAttrData
+class WXDLL
IMPEXP_ADV
wxGridRowOrColAttrData
{
public:
// empty ctor to suppress warnings
{
public:
// empty ctor to suppress warnings
@@
-297,7
+299,7
@@
private:
// NB: this is just a wrapper around 3 objects: one which stores cell
// attributes, and 2 others for row/col ones
// NB: this is just a wrapper around 3 objects: one which stores cell
// attributes, and 2 others for row/col ones
-class WXDLL
EXPORT
wxGridCellAttrProviderData
+class WXDLL
IMPEXP_ADV
wxGridCellAttrProviderData
{
public:
wxGridCellAttrData m_cellAttrs;
{
public:
wxGridCellAttrData m_cellAttrs;
@@
-332,10
+334,11
@@
struct wxGridDataTypeInfo
};
};
-WX_DEFINE_EXPORTED_ARRAY_NO_PTR(wxGridDataTypeInfo*, wxGridDataTypeInfoArray);
+WX_DEFINE_ARRAY_WITH_DECL_NO_PTR(wxGridDataTypeInfo*, wxGridDataTypeInfoArray,
+ class WXDLLIMPEXP_ADV);
-class WXDLL
EXPORT
wxGridTypeRegistry
+class WXDLL
IMPEXP_ADV
wxGridTypeRegistry
{
public:
wxGridTypeRegistry() {}
{
public:
wxGridTypeRegistry() {}
@@
-3135,23
+3138,25
@@
int wxGridStringTable::GetNumberCols()
wxString wxGridStringTable::GetValue( int row, int col )
{
wxString wxGridStringTable::GetValue( int row, int col )
{
- wxASSERT_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
- _T("invalid row or column index in wxGridStringTable") );
+ wxCHECK_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
+ wxEmptyString,
+ _T("invalid row or column index in wxGridStringTable") );
return m_data[row][col];
}
void wxGridStringTable::SetValue( int row, int col, const wxString& value )
{
return m_data[row][col];
}
void wxGridStringTable::SetValue( int row, int col, const wxString& value )
{
- wx
ASSERT_MSG
( (row < GetNumberRows()) && (col < GetNumberCols()),
-
_T("invalid row or column index in wxGridStringTable") );
+ wx
CHECK_RET
( (row < GetNumberRows()) && (col < GetNumberCols()),
+ _T("invalid row or column index in wxGridStringTable") );
m_data[row][col] = value;
}
bool wxGridStringTable::IsEmptyCell( int row, int col )
{
m_data[row][col] = value;
}
bool wxGridStringTable::IsEmptyCell( int row, int col )
{
- wxASSERT_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
+ wxCHECK_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
+ true,
_T("invalid row or column index in wxGridStringTable") );
return (m_data[row][col] == wxEmptyString);
_T("invalid row or column index in wxGridStringTable") );
return (m_data[row][col] == wxEmptyString);
@@
-3913,21
+3918,21
@@
bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership,
{
if ( m_created )
{
{
if ( m_created )
{
- // stop all processing
- m_created = FALSE;
+ // stop all processing
+ m_created = FALSE;
if (m_ownTable)
{
wxGridTableBase *t=m_table;
m_table=0;
if (m_ownTable)
{
wxGridTableBase *t=m_table;
m_table=0;
- delete t;
+ delete t;
}
}
- delete m_selection;
-
- m_table=0;
- m_selection=0;
- m_numRows=0;
- m_numCols=0;
+ delete m_selection;
+
+ m_table=0;
+ m_selection=0;
+ m_numRows=0;
+ m_numCols=0;
}
if (table)
{
}
if (table)
{
@@
-9336,13
+9341,13
@@
void wxGrid::SetColSize( int col, int width )
// should we check that it's bigger than GetColMinimalWidth(col) here?
// (VZ)
// No, because it is reasonable to assume the library user know's
// should we check that it's bigger than GetColMinimalWidth(col) here?
// (VZ)
// No, because it is reasonable to assume the library user know's
- // what he is doing. However whe should test against the weaker
+ // what he is doing. However whe should test against the weaker
// constariant of minimalAcceptableWidth, as this breaks rendering
// constariant of minimalAcceptableWidth, as this breaks rendering
- //
+ //
// This test then fixes sf.net bug #645734
// This test then fixes sf.net bug #645734
-
+
if ( width < GetColMinimalAcceptableWidth()) { return; }
if ( width < GetColMinimalAcceptableWidth()) { return; }
-
+
if ( m_colWidths.IsEmpty() )
{
// need to really create the array
if ( m_colWidths.IsEmpty() )
{
// need to really create the array