X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58580a7e3cf744de919827f827f14e595f8231af..dc3b0532ee434e7344cc939526c982918bfd3d4f:/contrib/src/gizmos/multicell.cpp diff --git a/contrib/src/gizmos/multicell.cpp b/contrib/src/gizmos/multicell.cpp index b5c70dd8e6..a7a9020b38 100644 --- a/contrib/src/gizmos/multicell.cpp +++ b/contrib/src/gizmos/multicell.cpp @@ -38,7 +38,7 @@ //--------------------------------------------------------------------------- IMPLEMENT_ABSTRACT_CLASS(wxMultiCellSizer, wxSizer); -IMPLEMENT_ABSTRACT_CLASS(wxMultiCellItemHandle, wxRect); +IMPLEMENT_ABSTRACT_CLASS(wxMultiCellItemHandle, wxObject); //--------------------------------------------------------------------------- // wxMultiCellItemHandle @@ -296,11 +296,10 @@ void wxMultiCellSizer::RecalcSizes() wxPoint c_point; wxSize c_size; - wxNode *current; - current = m_children.GetFirst(); + wxSizerItemList::Node *current = m_children.GetFirst(); while (current != NULL) { - wxSizerItem *item = (wxSizerItem*) current->Data(); + wxSizerItem *item = current->GetData(); wxMultiCellItemHandle *rect; if (item != NULL && @@ -321,7 +320,7 @@ void wxMultiCellSizer::RecalcSizes() minSize.SetHeight(wxMax(minSize.GetHeight(), c_size.GetHeight())); minSize.SetWidth(wxMax(minSize.GetWidth(), c_size.GetWidth())); } - if (rect->GetStyle() & wxHORIZENTAL_RESIZABLE || + if (rect->GetStyle() & wxHORIZONTAL_RESIZABLE || rect->GetWidth() > 1 || m_minSizes[rect->GetColumn()]->GetWidth() < 0) { @@ -372,7 +371,7 @@ void wxMultiCellSizer::RecalcSizes() } item->SetDimension(c_point, c_size); } - current = current->Next(); + current = current->GetNext(); } } //--------------------------------------------------------------------------- @@ -404,10 +403,10 @@ void wxMultiCellSizer :: GetMinimums() m_weights[x]->SetWidth(0); } - wxNode *node = m_children.GetFirst(); + wxSizerItemList::Node *node = m_children.GetFirst(); while (node) { - wxSizerItem *item = (wxSizerItem*) node->Data(); + wxSizerItem *item = node->GetData(); wxMultiCellItemHandle *rect; if (item != NULL && (rect = (wxMultiCellItemHandle *)item->GetUserData()) != NULL) @@ -489,7 +488,7 @@ void wxMultiCellSizer :: GetMinimums() // For each column, calculate the max width for those fields which are not // resizable in the horizontal pane - if (!(rect->GetStyle() & wxHORIZENTAL_RESIZABLE || m_minSizes[col]->GetWidth() < 0)) + if (!(rect->GetStyle() & wxHORIZONTAL_RESIZABLE || m_minSizes[col]->GetWidth() < 0)) { if (m_minSizes[col]->GetWidth()) { @@ -506,7 +505,7 @@ void wxMultiCellSizer :: GetMinimums() m_maxWidth[col] = wxMax(m_maxWidth[col], m_defaultCellSize.GetWidth()); m_weights[col]->SetWidth(wxMax(m_weights[col]->GetWidth(), rect->GetWeight().GetWidth())); } - node = node->Next(); + node = node->GetNext(); } } } // wxMultiCellSizer :: GetMinimums @@ -644,7 +643,7 @@ void wxMultiCellCanvas :: Add(wxWindow *win, unsigned int row, unsigned int col) { wxASSERT_MSG(row >= 0 && row < m_maxRows, wxString("Row ") + itoa(row) + " out of bounds (" + itoa(m_maxRows) + ")"); wxASSERT_MSG(col >= 0 && col < m_maxCols, wxString("Column ") + itoa(col) + " out of bounds (" + itoa(m_maxCols) + ")"); - wxASSERT_MSG(m_cells[CELL_LOC(row, col)] == NULL, "Cell already occupied"); + wxASSERT_MSG(m_cells[CELL_LOC(row, col)] == NULL, wxT("Cell already occupied")); wxCell *newCell = new wxCell(win); m_cells[CELL_LOC(row,col)] = newCell;