and not crash when it tries to get them later. (If NULL it falls back
to the grid's default like it used to before the type registry was
added.)
Added wxTE_PROCESS_TAB to wxTextCtrl style for MSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8723
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_control = new wxTextCtrl(parent, id, wxEmptyString,
wxDefaultPosition, wxDefaultSize
#if defined(__WXMSW__)
m_control = new wxTextCtrl(parent, id, wxEmptyString,
wxDefaultPosition, wxDefaultSize
#if defined(__WXMSW__)
- , wxTE_MULTILINE | wxTE_NO_VSCROLL | wxTE_AUTO_SCROLL
+ , wxTE_PROCESS_TAB | wxTE_MULTILINE |
+ wxTE_NO_VSCROLL | wxTE_AUTO_SCROLL
}
#else // !GTK
int extra_x = ( rect.x > 2 )? 2 : 1;
}
#else // !GTK
int extra_x = ( rect.x > 2 )? 2 : 1;
-
-// MB: treat MSW separately here otherwise the caret doesn't show
-// when the editor is in the first row.
+
+// MB: treat MSW separately here otherwise the caret doesn't show
+// when the editor is in the first row.
#if defined(__WXMSW__)
int extra_y = 2;
#else
#if defined(__WXMSW__)
int extra_y = 2;
#else
wxGridCellRenderer* wxGridTypeRegistry::GetRenderer(int index)
{
wxGridCellRenderer* renderer = m_typeinfo[index]->m_renderer;
wxGridCellRenderer* wxGridTypeRegistry::GetRenderer(int index)
{
wxGridCellRenderer* renderer = m_typeinfo[index]->m_renderer;
+ if (renderer)
+ renderer->IncRef();
return renderer;
}
wxGridCellEditor* wxGridTypeRegistry::GetEditor(int index)
{
wxGridCellEditor* editor = m_typeinfo[index]->m_editor;
return renderer;
}
wxGridCellEditor* wxGridTypeRegistry::GetEditor(int index)
{
wxGridCellEditor* editor = m_typeinfo[index]->m_editor;
+ if (editor)
+ editor->IncRef();
wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider();
if (attrProvider) {
attrProvider->UpdateAttrRows( pos, -((int)numRows) );
wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider();
if (attrProvider) {
attrProvider->UpdateAttrRows( pos, -((int)numRows) );
-// ifdef'd out following patch from Paul Gammans
-#if 0
+// ifdef'd out following patch from Paul Gammans
+#if 0
// No need to touch column attributes, unless we
// removed _all_ rows, in this case, we remove
// all column attributes.
// No need to touch column attributes, unless we
// removed _all_ rows, in this case, we remove
// all column attributes.
// needed data is not available inside UpdateAttrRows.
if ( !GetNumberRows() )
attrProvider->UpdateAttrCols( 0, -GetNumberCols() );
// needed data is not available inside UpdateAttrRows.
if ( !GetNumberRows() )
attrProvider->UpdateAttrCols( 0, -GetNumberCols() );
}
if ( !GetBatchCount() )
{
}
if ( !GetBatchCount() )
{
wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider();
if (attrProvider) {
attrProvider->UpdateAttrCols( pos, -((int)numCols) );
wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider();
if (attrProvider) {
attrProvider->UpdateAttrCols( pos, -((int)numCols) );
-// ifdef'd out following patch from Paul Gammans
-#if 0
+// ifdef'd out following patch from Paul Gammans
+#if 0
// No need to touch row attributes, unless we
// removed _all_ columns, in this case, we remove
// all row attributes.
// No need to touch row attributes, unless we
// removed _all_ columns, in this case, we remove
// all row attributes.
// needed data is not available inside UpdateAttrCols.
if ( !GetNumberCols() )
attrProvider->UpdateAttrRows( 0, -GetNumberRows() );
// needed data is not available inside UpdateAttrCols.
if ( !GetNumberCols() )
attrProvider->UpdateAttrRows( 0, -GetNumberRows() );
}
if ( !GetBatchCount() )
{
}
if ( !GetBatchCount() )
{
// Otherwise refresh redraws the highlight!
m_currentCellCoords = coords;
// Otherwise refresh redraws the highlight!
m_currentCellCoords = coords;
case wxRIGHT: horiz = wxALIGN_RIGHT; break;
case wxCENTRE: horiz = wxALIGN_CENTRE; break;
}
case wxRIGHT: horiz = wxALIGN_RIGHT; break;
case wxCENTRE: horiz = wxALIGN_CENTRE; break;
}
switch ( vert )
{
case wxTOP: vert = wxALIGN_TOP; break;
case wxBOTTOM: vert = wxALIGN_BOTTOM; break;
case wxCENTRE: vert = wxALIGN_CENTRE; break;
}
switch ( vert )
{
case wxTOP: vert = wxALIGN_TOP; break;
case wxBOTTOM: vert = wxALIGN_BOTTOM; break;
case wxCENTRE: vert = wxALIGN_CENTRE; break;
}
if ( horiz == wxALIGN_LEFT || horiz == wxALIGN_CENTRE || horiz == wxALIGN_RIGHT )
{
m_rowLabelHorizAlign = horiz;
if ( horiz == wxALIGN_LEFT || horiz == wxALIGN_CENTRE || horiz == wxALIGN_RIGHT )
{
m_rowLabelHorizAlign = horiz;
case wxRIGHT: horiz = wxALIGN_RIGHT; break;
case wxCENTRE: horiz = wxALIGN_CENTRE; break;
}
case wxRIGHT: horiz = wxALIGN_RIGHT; break;
case wxCENTRE: horiz = wxALIGN_CENTRE; break;
}
switch ( vert )
{
case wxTOP: vert = wxALIGN_TOP; break;
case wxBOTTOM: vert = wxALIGN_BOTTOM; break;
case wxCENTRE: vert = wxALIGN_CENTRE; break;
}
switch ( vert )
{
case wxTOP: vert = wxALIGN_TOP; break;
case wxBOTTOM: vert = wxALIGN_BOTTOM; break;
case wxCENTRE: vert = wxALIGN_CENTRE; break;
}
if ( horiz == wxALIGN_LEFT || horiz == wxALIGN_CENTRE || horiz == wxALIGN_RIGHT )
{
m_colLabelHorizAlign = horiz;
if ( horiz == wxALIGN_LEFT || horiz == wxALIGN_CENTRE || horiz == wxALIGN_RIGHT )
{
m_colLabelHorizAlign = horiz;
-void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol,
+void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol,
bool addToSelected )
{
if ( IsSelection() && !addToSelected )
ClearSelection();
bool addToSelected )
{
if ( IsSelection() && !addToSelected )
ClearSelection();
- m_selection->SelectBlock( topRow, leftCol, bottomRow, rightCol,
- FALSE, addToSelected );
+ m_selection->SelectBlock( topRow, leftCol, bottomRow, rightCol,
+ FALSE, addToSelected );