Rename wxGrid::m_colWindow to m_colLabelWin
No real changes, just rename it for consistency with m_rowLabelWin.
This commit is contained in:
@@ -1670,7 +1670,7 @@ public:
|
|||||||
// Accessors for component windows
|
// Accessors for component windows
|
||||||
wxWindow* GetGridWindow() const { return (wxWindow*)m_gridWin; }
|
wxWindow* GetGridWindow() const { return (wxWindow*)m_gridWin; }
|
||||||
wxWindow* GetGridRowLabelWindow() const { return (wxWindow*)m_rowLabelWin; }
|
wxWindow* GetGridRowLabelWindow() const { return (wxWindow*)m_rowLabelWin; }
|
||||||
wxWindow* GetGridColLabelWindow() const { return m_colWindow; }
|
wxWindow* GetGridColLabelWindow() const { return m_colLabelWin; }
|
||||||
wxWindow* GetGridCornerLabelWindow() const { return (wxWindow*)m_cornerLabelWin; }
|
wxWindow* GetGridCornerLabelWindow() const { return (wxWindow*)m_cornerLabelWin; }
|
||||||
|
|
||||||
// This one can only be called if we are using the native header window
|
// This one can only be called if we are using the native header window
|
||||||
@@ -1681,7 +1681,7 @@ public:
|
|||||||
// static_cast<> doesn't work without the full class declaration in
|
// static_cast<> doesn't work without the full class declaration in
|
||||||
// view and we prefer to avoid adding more compile-time dependencies
|
// view and we prefer to avoid adding more compile-time dependencies
|
||||||
// even at the cost of using reinterpret_cast<>
|
// even at the cost of using reinterpret_cast<>
|
||||||
return reinterpret_cast<wxHeaderCtrl *>(m_colWindow);
|
return reinterpret_cast<wxHeaderCtrl *>(m_colLabelWin);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow adjustment of scroll increment. The default is (15, 15).
|
// Allow adjustment of scroll increment. The default is (15, 15).
|
||||||
@@ -1908,13 +1908,13 @@ protected:
|
|||||||
// the real type of the column window depends on m_useNativeHeader value:
|
// the real type of the column window depends on m_useNativeHeader value:
|
||||||
// if it is true, its dynamic type is wxHeaderCtrl, otherwise it is
|
// if it is true, its dynamic type is wxHeaderCtrl, otherwise it is
|
||||||
// wxGridColLabelWindow, use accessors below when the real type matters
|
// wxGridColLabelWindow, use accessors below when the real type matters
|
||||||
wxWindow *m_colWindow;
|
wxWindow *m_colLabelWin;
|
||||||
|
|
||||||
wxGridColLabelWindow *GetColLabelWindow() const
|
wxGridColLabelWindow *GetColLabelWindow() const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !m_useNativeHeader, "no column label window" );
|
wxASSERT_MSG( !m_useNativeHeader, "no column label window" );
|
||||||
|
|
||||||
return reinterpret_cast<wxGridColLabelWindow *>(m_colWindow);
|
return reinterpret_cast<wxGridColLabelWindow *>(m_colLabelWin);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGridTableBase *m_table;
|
wxGridTableBase *m_table;
|
||||||
|
@@ -2322,8 +2322,8 @@ void wxGrid::Create()
|
|||||||
m_cornerLabelWin->SetOwnBackgroundColour(lbg);
|
m_cornerLabelWin->SetOwnBackgroundColour(lbg);
|
||||||
m_rowLabelWin->SetOwnForegroundColour(lfg);
|
m_rowLabelWin->SetOwnForegroundColour(lfg);
|
||||||
m_rowLabelWin->SetOwnBackgroundColour(lbg);
|
m_rowLabelWin->SetOwnBackgroundColour(lbg);
|
||||||
m_colWindow->SetOwnForegroundColour(lfg);
|
m_colLabelWin->SetOwnForegroundColour(lfg);
|
||||||
m_colWindow->SetOwnBackgroundColour(lbg);
|
m_colLabelWin->SetOwnBackgroundColour(lbg);
|
||||||
|
|
||||||
m_gridWin->SetOwnForegroundColour(gfg);
|
m_gridWin->SetOwnForegroundColour(gfg);
|
||||||
m_gridWin->SetOwnBackgroundColour(gbg);
|
m_gridWin->SetOwnBackgroundColour(gbg);
|
||||||
@@ -2346,12 +2346,12 @@ void wxGrid::CreateColumnWindow()
|
|||||||
{
|
{
|
||||||
if ( m_useNativeHeader )
|
if ( m_useNativeHeader )
|
||||||
{
|
{
|
||||||
m_colWindow = new wxGridHeaderCtrl(this);
|
m_colLabelWin = new wxGridHeaderCtrl(this);
|
||||||
m_colLabelHeight = m_colWindow->GetBestSize().y;
|
m_colLabelHeight = m_colLabelWin->GetBestSize().y;
|
||||||
}
|
}
|
||||||
else // draw labels ourselves
|
else // draw labels ourselves
|
||||||
{
|
{
|
||||||
m_colWindow = new wxGridColLabelWindow(this);
|
m_colLabelWin = new wxGridColLabelWindow(this);
|
||||||
m_colLabelHeight = WXGRID_DEFAULT_COL_LABEL_HEIGHT;
|
m_colLabelHeight = WXGRID_DEFAULT_COL_LABEL_HEIGHT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2479,7 +2479,7 @@ void wxGrid::Init()
|
|||||||
|
|
||||||
m_cornerLabelWin = NULL;
|
m_cornerLabelWin = NULL;
|
||||||
m_rowLabelWin = NULL;
|
m_rowLabelWin = NULL;
|
||||||
m_colWindow = NULL;
|
m_colLabelWin = NULL;
|
||||||
m_gridWin = NULL;
|
m_gridWin = NULL;
|
||||||
|
|
||||||
m_table = NULL;
|
m_table = NULL;
|
||||||
@@ -2754,8 +2754,8 @@ void wxGrid::CalcWindowSizes()
|
|||||||
if ( m_cornerLabelWin && m_cornerLabelWin->IsShown() )
|
if ( m_cornerLabelWin && m_cornerLabelWin->IsShown() )
|
||||||
m_cornerLabelWin->SetSize( 0, 0, m_rowLabelWidth, m_colLabelHeight );
|
m_cornerLabelWin->SetSize( 0, 0, m_rowLabelWidth, m_colLabelHeight );
|
||||||
|
|
||||||
if ( m_colWindow && m_colWindow->IsShown() )
|
if ( m_colLabelWin && m_colLabelWin->IsShown() )
|
||||||
m_colWindow->SetSize( m_rowLabelWidth, 0, gw, m_colLabelHeight );
|
m_colLabelWin->SetSize( m_rowLabelWidth, 0, gw, m_colLabelHeight );
|
||||||
|
|
||||||
if ( m_rowLabelWin && m_rowLabelWin->IsShown() )
|
if ( m_rowLabelWin && m_rowLabelWin->IsShown() )
|
||||||
m_rowLabelWin->SetSize( 0, m_colLabelHeight, m_rowLabelWidth, gh );
|
m_rowLabelWin->SetSize( 0, m_colLabelHeight, m_rowLabelWidth, gh );
|
||||||
@@ -2989,7 +2989,7 @@ bool wxGrid::Redimension( wxGridTableMessage& msg )
|
|||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
{
|
{
|
||||||
CalcDimensions();
|
CalcDimensions();
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = true;
|
result = true;
|
||||||
@@ -3047,7 +3047,7 @@ bool wxGrid::Redimension( wxGridTableMessage& msg )
|
|||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
{
|
{
|
||||||
CalcDimensions();
|
CalcDimensions();
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = true;
|
result = true;
|
||||||
@@ -3124,7 +3124,7 @@ bool wxGrid::Redimension( wxGridTableMessage& msg )
|
|||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
{
|
{
|
||||||
CalcDimensions();
|
CalcDimensions();
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = true;
|
result = true;
|
||||||
@@ -3510,7 +3510,7 @@ void wxGrid::UpdateColumnSortingIndicator(int col)
|
|||||||
if ( m_useNativeHeader )
|
if ( m_useNativeHeader )
|
||||||
GetGridColHeader()->UpdateColumn(col);
|
GetGridColHeader()->UpdateColumn(col);
|
||||||
else if ( m_nativeColumnLabels )
|
else if ( m_nativeColumnLabels )
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
//else: sorting indicator display not yet implemented in grid version
|
//else: sorting indicator display not yet implemented in grid version
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3795,7 +3795,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
|||||||
// the column didn't actually move anywhere
|
// the column didn't actually move anywhere
|
||||||
if ( col != -1 )
|
if ( col != -1 )
|
||||||
DoColHeaderClick(col);
|
DoColHeaderClick(col);
|
||||||
m_colWindow->Refresh(); // "unpress" the column
|
m_colLabelWin->Refresh(); // "unpress" the column
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3964,9 +3964,9 @@ void wxGrid::ChangeCursorMode(CursorMode mode,
|
|||||||
|
|
||||||
wxLogTrace(wxT("grid"),
|
wxLogTrace(wxT("grid"),
|
||||||
wxT("wxGrid cursor mode (mouse capture for %s): %s -> %s"),
|
wxT("wxGrid cursor mode (mouse capture for %s): %s -> %s"),
|
||||||
win == m_colWindow ? wxT("colLabelWin")
|
win == m_colLabelWin ? wxT("colLabelWin")
|
||||||
: win ? wxT("rowLabelWin")
|
: win ? wxT("rowLabelWin")
|
||||||
: wxT("gridWin"),
|
: wxT("gridWin"),
|
||||||
cursorModes[m_cursorMode], cursorModes[mode]);
|
cursorModes[m_cursorMode], cursorModes[mode]);
|
||||||
#endif // wxUSE_LOG_TRACE
|
#endif // wxUSE_LOG_TRACE
|
||||||
|
|
||||||
@@ -4576,7 +4576,7 @@ void wxGrid::RefreshAfterColPosChange()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
m_gridWin->Refresh();
|
m_gridWin->Refresh();
|
||||||
}
|
}
|
||||||
@@ -4886,7 +4886,7 @@ void wxGrid::Refresh(bool eraseb, const wxRect* rect)
|
|||||||
if ( width_cell > 0 && height_label > 0 )
|
if ( width_cell > 0 && height_label > 0 )
|
||||||
{
|
{
|
||||||
wxRect anotherrect(x, rect_y, width_cell, height_label);
|
wxRect anotherrect(x, rect_y, width_cell, height_label);
|
||||||
m_colWindow->Refresh(eraseb, &anotherrect);
|
m_colLabelWin->Refresh(eraseb, &anotherrect);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paint row labels part intersecting rect.
|
// Paint row labels part intersecting rect.
|
||||||
@@ -4906,7 +4906,7 @@ void wxGrid::Refresh(bool eraseb, const wxRect* rect)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_cornerLabelWin->Refresh(eraseb, NULL);
|
m_cornerLabelWin->Refresh(eraseb, NULL);
|
||||||
m_colWindow->Refresh(eraseb, NULL);
|
m_colLabelWin->Refresh(eraseb, NULL);
|
||||||
m_rowLabelWin->Refresh(eraseb, NULL);
|
m_rowLabelWin->Refresh(eraseb, NULL);
|
||||||
m_gridWin->Refresh(eraseb, NULL);
|
m_gridWin->Refresh(eraseb, NULL);
|
||||||
}
|
}
|
||||||
@@ -5944,7 +5944,7 @@ void wxGrid::UseNativeColHeader(bool native)
|
|||||||
if ( native == m_useNativeHeader )
|
if ( native == m_useNativeHeader )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
delete m_colWindow;
|
delete m_colLabelWin;
|
||||||
m_useNativeHeader = native;
|
m_useNativeHeader = native;
|
||||||
|
|
||||||
CreateColumnWindow();
|
CreateColumnWindow();
|
||||||
@@ -6053,7 +6053,7 @@ void wxGrid::DrawColLabel(wxDC& dc, int col)
|
|||||||
{
|
{
|
||||||
// It is reported that we need to erase the background to avoid display
|
// It is reported that we need to erase the background to avoid display
|
||||||
// artefacts, see #12055.
|
// artefacts, see #12055.
|
||||||
wxDCBrushChanger setBrush(dc, m_colWindow->GetBackgroundColour());
|
wxDCBrushChanger setBrush(dc, m_colLabelWin->GetBackgroundColour());
|
||||||
dc.DrawRectangle(rect);
|
dc.DrawRectangle(rect);
|
||||||
|
|
||||||
rend.DrawBorder(*this, dc, rect);
|
rend.DrawBorder(*this, dc, rect);
|
||||||
@@ -6260,7 +6260,7 @@ void wxGrid::EndBatch()
|
|||||||
{
|
{
|
||||||
CalcDimensions();
|
CalcDimensions();
|
||||||
m_rowLabelWin->Refresh();
|
m_rowLabelWin->Refresh();
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
m_cornerLabelWin->Refresh();
|
m_cornerLabelWin->Refresh();
|
||||||
m_gridWin->Refresh();
|
m_gridWin->Refresh();
|
||||||
}
|
}
|
||||||
@@ -7216,12 +7216,12 @@ void wxGrid::SetColLabelSize( int height )
|
|||||||
{
|
{
|
||||||
if ( height == 0 )
|
if ( height == 0 )
|
||||||
{
|
{
|
||||||
m_colWindow->Show( false );
|
m_colLabelWin->Show( false );
|
||||||
m_cornerLabelWin->Show( false );
|
m_cornerLabelWin->Show( false );
|
||||||
}
|
}
|
||||||
else if ( m_colLabelHeight == 0 )
|
else if ( m_colLabelHeight == 0 )
|
||||||
{
|
{
|
||||||
m_colWindow->Show( true );
|
m_colLabelWin->Show( true );
|
||||||
if ( m_rowLabelWidth > 0 )
|
if ( m_rowLabelWidth > 0 )
|
||||||
m_cornerLabelWin->Show( true );
|
m_cornerLabelWin->Show( true );
|
||||||
}
|
}
|
||||||
@@ -7239,13 +7239,13 @@ void wxGrid::SetLabelBackgroundColour( const wxColour& colour )
|
|||||||
{
|
{
|
||||||
m_labelBackgroundColour = colour;
|
m_labelBackgroundColour = colour;
|
||||||
m_rowLabelWin->SetBackgroundColour( colour );
|
m_rowLabelWin->SetBackgroundColour( colour );
|
||||||
m_colWindow->SetBackgroundColour( colour );
|
m_colLabelWin->SetBackgroundColour( colour );
|
||||||
m_cornerLabelWin->SetBackgroundColour( colour );
|
m_cornerLabelWin->SetBackgroundColour( colour );
|
||||||
|
|
||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
{
|
{
|
||||||
m_rowLabelWin->Refresh();
|
m_rowLabelWin->Refresh();
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
m_cornerLabelWin->Refresh();
|
m_cornerLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7259,7 +7259,7 @@ void wxGrid::SetLabelTextColour( const wxColour& colour )
|
|||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
{
|
{
|
||||||
m_rowLabelWin->Refresh();
|
m_rowLabelWin->Refresh();
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7270,7 +7270,7 @@ void wxGrid::SetLabelFont( const wxFont& font )
|
|||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
{
|
{
|
||||||
m_rowLabelWin->Refresh();
|
m_rowLabelWin->Refresh();
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7336,7 +7336,7 @@ void wxGrid::SetColLabelAlignment( int horiz, int vert )
|
|||||||
|
|
||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
{
|
{
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7386,7 +7386,7 @@ void wxGrid::SetColLabelTextOrientation( int textOrientation )
|
|||||||
m_colLabelTextOrientation = textOrientation;
|
m_colLabelTextOrientation = textOrientation;
|
||||||
|
|
||||||
if ( !GetBatchCount() )
|
if ( !GetBatchCount() )
|
||||||
m_colWindow->Refresh();
|
m_colLabelWin->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::SetCornerLabelTextOrientation( int textOrientation )
|
void wxGrid::SetCornerLabelTextOrientation( int textOrientation )
|
||||||
@@ -8381,7 +8381,7 @@ void wxGrid::SetColSize( int col, int width )
|
|||||||
{
|
{
|
||||||
long w, h;
|
long w, h;
|
||||||
wxArrayString lines;
|
wxArrayString lines;
|
||||||
wxClientDC dc(m_colWindow);
|
wxClientDC dc(m_colLabelWin);
|
||||||
dc.SetFont(GetLabelFont());
|
dc.SetFont(GetLabelFont());
|
||||||
StringToLines(GetColLabelValue(col), lines);
|
StringToLines(GetColLabelValue(col), lines);
|
||||||
if ( GetColLabelTextOrientation() == wxHORIZONTAL )
|
if ( GetColLabelTextOrientation() == wxHORIZONTAL )
|
||||||
|
Reference in New Issue
Block a user