blob: 210401a8e41c830dd7799882778a93cd17fc0cfd [file] [log] [blame]
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
namespace views {
class NativeScrollBar;
class View;
// A specialization of NativeControlWrapper that hosts a platform-native
// scroll bar.
class VIEWS_EXPORT NativeScrollBarWrapper {
virtual ~NativeScrollBarWrapper() {}
// Updates the scroll bar appearance given a viewport size, content size and
// current position.
virtual void Update(int viewport_size, int content_size, int current_pos) = 0;
// Retrieves the views::View that hosts the native control.
virtual View* GetView() = 0;
// Returns the position of the scrollbar.
virtual int GetPosition() const = 0;
// Creates an appropriate NativeScrollBarWrapper for the platform.
static NativeScrollBarWrapper* CreateWrapper(NativeScrollBar* button);
// Returns the system sizes of vertical/horizontal scroll bars.
static int GetVerticalScrollBarWidth();
static int GetHorizontalScrollBarHeight();
} // namespace views