Merge branch 'rename-listctrl-checkbox-methods' of https://github.com/discnl/wxWidgets

Use consistent case for wxListCtrl::{Has,Enable}CheckBoxes() methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/275
This commit is contained in:
Vadim Zeitlin
2016-04-23 18:52:47 +02:00
10 changed files with 52 additions and 45 deletions

View File

@@ -797,7 +797,7 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
x += 2;
#endif
if ( m_owner->HasCheckboxes() )
if ( m_owner->HasCheckBoxes() )
{
wxSize cbSize = wxRendererNative::Get().GetCheckBoxSize(m_owner);
int yOffset = (rect.height - cbSize.GetHeight()) / 2;
@@ -820,7 +820,7 @@ void wxListLineData::DrawInReportMode( wxDC *dc,
wxListItemData *item = node->GetData();
int width = m_owner->GetColumnWidth(col);
if (col == 0 && m_owner->HasCheckboxes())
if (col == 0 && m_owner->HasCheckBoxes())
width -= x;
int xOld = x;
x += width;
@@ -1609,7 +1609,7 @@ void wxListMainWindow::Init()
m_lineSelectSingleOnUp =
m_lineBeforeLastClicked = (size_t)-1;
m_hasCheckboxes = false;
m_hasCheckBoxes = false;
}
wxListMainWindow::wxListMainWindow()
@@ -2579,7 +2579,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
bool cmdModifierDown = event.CmdDown();
if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) )
{
if (IsInsideCheckbox(current, x, y))
if (IsInsideCheckBox(current, x, y))
{
CheckItem(current, !IsItemChecked(current));
}
@@ -3703,14 +3703,14 @@ bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos) const
// checkboxes
// ----------------------------------------------------------------------------
bool wxListMainWindow::HasCheckboxes() const
bool wxListMainWindow::HasCheckBoxes() const
{
return m_hasCheckboxes;
return m_hasCheckBoxes;
}
bool wxListMainWindow::EnableCheckboxes(bool enable)
bool wxListMainWindow::EnableCheckBoxes(bool enable)
{
m_hasCheckboxes = enable;
m_hasCheckBoxes = enable;
m_dirty = true;
m_headerWidth = 0;
@@ -3736,9 +3736,9 @@ bool wxListMainWindow::IsItemChecked(long item) const
return line->IsChecked();
}
bool wxListMainWindow::IsInsideCheckbox(long item, int x, int y)
bool wxListMainWindow::IsInsideCheckBox(long item, int x, int y)
{
if ( HasCheckboxes() )
if ( HasCheckBoxes() )
{
wxRect lineRect = GetLineRect(item);
wxSize cbSize = wxRendererNative::Get().GetCheckBoxSize(this);
@@ -4769,20 +4769,20 @@ void wxGenericListCtrl::OnScroll(wxScrollWinEvent& event)
event.Skip();
}
bool wxGenericListCtrl::HasCheckboxes() const
bool wxGenericListCtrl::HasCheckBoxes() const
{
if (!InReportView())
return false;
return m_mainWin->HasCheckboxes();
return m_mainWin->HasCheckBoxes();
}
bool wxGenericListCtrl::EnableCheckboxes(bool enable)
bool wxGenericListCtrl::EnableCheckBoxes(bool enable)
{
if (!InReportView())
return false;
return m_mainWin->EnableCheckboxes(enable);
return m_mainWin->EnableCheckBoxes(enable);
}
void wxGenericListCtrl::CheckItem(long item, bool state)