summaryrefslogtreecommitdiffstats
path: root/chrome/views/bitmap_scroll_bar.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 22:25:33 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 22:25:33 +0000
commit6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7 (patch)
tree4ce1316dbfd179681bdff905a7d71f1b4cbb902c /chrome/views/bitmap_scroll_bar.cc
parent4c45708be10906e3cdbe9d40d206cfd3fcbaf1c2 (diff)
downloadchromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.zip
chromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.tar.gz
chromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.tar.bz2
Rename legacy methods that were in CamelCase to unix_hacker.
Required going through and modifying some of the code to solve name clashes. Review URL: http://codereview.chromium.org/2945 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/bitmap_scroll_bar.cc')
-rw-r--r--chrome/views/bitmap_scroll_bar.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/chrome/views/bitmap_scroll_bar.cc b/chrome/views/bitmap_scroll_bar.cc
index a0656e7..7dcf18e 100644
--- a/chrome/views/bitmap_scroll_bar.cc
+++ b/chrome/views/bitmap_scroll_bar.cc
@@ -146,14 +146,14 @@ class BitmapScrollBarThumb : public View {
canvas->DrawBitmapInt(*start_cap_bitmap(), 0, 0);
int top_cap_height = start_cap_bitmap()->height();
int bottom_cap_height = end_cap_bitmap()->height();
- int thumb_body_height = GetHeight() - top_cap_height - bottom_cap_height;
+ int thumb_body_height = height() - top_cap_height - bottom_cap_height;
canvas->TileImageInt(*background_bitmap(), 0, top_cap_height,
background_bitmap()->width(), thumb_body_height);
canvas->DrawBitmapInt(*end_cap_bitmap(), 0,
- GetHeight() - bottom_cap_height);
+ height() - bottom_cap_height);
// Paint the grippy over the track.
- int grippy_x = (GetWidth() - grippy_bitmap()->width()) / 2;
+ int grippy_x = (width() - grippy_bitmap()->width()) / 2;
int grippy_y = (thumb_body_height - grippy_bitmap()->height()) / 2;
canvas->DrawBitmapInt(*grippy_bitmap(), grippy_x, grippy_y);
}
@@ -167,7 +167,7 @@ class BitmapScrollBarThumb : public View {
}
virtual bool OnMousePressed(const MouseEvent& event) {
- mouse_offset_ = scroll_bar_->IsHorizontal() ? event.GetX() : event.GetY();
+ mouse_offset_ = scroll_bar_->IsHorizontal() ? event.x() : event.y();
drag_start_position_ = GetPosition();
SetState(BaseButton::BS_PUSHED);
return true;
@@ -178,24 +178,24 @@ class BitmapScrollBarThumb : public View {
// the bounds of the thumb, the scrollbar will snap the scroll back to the
// point it was at before the drag began.
if (scroll_bar_->IsHorizontal()) {
- if ((event.GetY() < GetY() - kScrollThumbDragOutSnap) ||
- (event.GetY() > (GetY() + GetHeight() + kScrollThumbDragOutSnap))) {
+ if ((event.y() < y() - kScrollThumbDragOutSnap) ||
+ (event.y() > (y() + height() + kScrollThumbDragOutSnap))) {
scroll_bar_->ScrollToThumbPosition(drag_start_position_, false);
return true;
}
} else {
- if ((event.GetX() < GetX() - kScrollThumbDragOutSnap) ||
- (event.GetX() > (GetX() + GetWidth() + kScrollThumbDragOutSnap))) {
+ if ((event.x() < x() - kScrollThumbDragOutSnap) ||
+ (event.x() > (x() + width() + kScrollThumbDragOutSnap))) {
scroll_bar_->ScrollToThumbPosition(drag_start_position_, false);
return true;
}
}
if (scroll_bar_->IsHorizontal()) {
- int thumb_x = event.GetX() - mouse_offset_;
- scroll_bar_->ScrollToThumbPosition(GetX() + thumb_x, false);
+ int thumb_x = event.x() - mouse_offset_;
+ scroll_bar_->ScrollToThumbPosition(x() + thumb_x, false);
} else {
- int thumb_y = event.GetY() - mouse_offset_;
- scroll_bar_->ScrollToThumbPosition(GetY() + thumb_y, false);
+ int thumb_y = event.y() - mouse_offset_;
+ scroll_bar_->ScrollToThumbPosition(y() + thumb_y, false);
}
return true;
}
@@ -292,14 +292,14 @@ gfx::Rect BitmapScrollBar::GetTrackBounds() const {
if (!show_scroll_buttons_)
prefsize.cx = 0;
int new_width = std::max(0,
- static_cast<int>(GetWidth() - (prefsize.cx * 2)));
+ static_cast<int>(width() - (prefsize.cx * 2)));
gfx::Rect track_bounds(prefsize.cx, 0, new_width, prefsize.cy);
return track_bounds;
}
if (!show_scroll_buttons_)
prefsize.cy = 0;
gfx::Rect track_bounds(0, prefsize.cy, prefsize.cx,
- std::max(0l, GetHeight() - (prefsize.cy * 2)));
+ std::max(0l, height() - (prefsize.cy * 2)));
return track_bounds;
}
@@ -417,10 +417,10 @@ void BitmapScrollBar::Layout() {
prev_button_->SetBounds(0, 0, prefsize.cx, prefsize.cy);
next_button_->GetPreferredSize(&prefsize);
if (IsHorizontal()) {
- next_button_->SetBounds(GetWidth() - prefsize.cx, 0, prefsize.cx,
+ next_button_->SetBounds(width() - prefsize.cx, 0, prefsize.cx,
prefsize.cy);
} else {
- next_button_->SetBounds(0, GetHeight() - prefsize.cy, prefsize.cx,
+ next_button_->SetBounds(0, height() - prefsize.cy, prefsize.cx,
prefsize.cy);
}
} else {
@@ -468,15 +468,15 @@ bool BitmapScrollBar::OnMousePressed(const MouseEvent& event) {
CRect thumb_bounds;
thumb_->GetBounds(&thumb_bounds);
if (IsHorizontal()) {
- if (event.GetX() < thumb_bounds.left) {
+ if (event.x() < thumb_bounds.left) {
last_scroll_amount_ = SCROLL_PREV_PAGE;
- } else if (event.GetX() > thumb_bounds.right) {
+ } else if (event.x() > thumb_bounds.right) {
last_scroll_amount_ = SCROLL_NEXT_PAGE;
}
} else {
- if (event.GetY() < thumb_bounds.top) {
+ if (event.y() < thumb_bounds.top) {
last_scroll_amount_ = SCROLL_PREV_PAGE;
- } else if (event.GetY() > thumb_bounds.bottom) {
+ } else if (event.y() > thumb_bounds.bottom) {
last_scroll_amount_ = SCROLL_NEXT_PAGE;
}
}