1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_FOCUS_BORDER_H_
6 #define UI_VIEWS_FOCUS_BORDER_H_
8 #include "ui/views/views_export.h"
9 #include "base/basictypes.h"
18 ////////////////////////////////////////////////////////////////////////////////
20 // Focus border class.
22 // The focus border class is used to display an indication of focus on a view.
23 // To set a focus border on a view, call SetFocusBorder on the view. Once set
24 // on a view, the focus border is owned by the view.
26 ////////////////////////////////////////////////////////////////////////////////
28 class VIEWS_EXPORT FocusBorder
{
30 virtual ~FocusBorder();
32 // Creates the default inset dashed line focus border.
33 static FocusBorder
* CreateDashedFocusBorder();
34 static FocusBorder
* CreateDashedFocusBorder(
35 int left
, int top
, int right
, int bottom
);
37 // Renders the focus border for the specified view.
38 virtual void Paint(const View
& view
, gfx::Canvas
* canvas
) const = 0;
44 DISALLOW_COPY_AND_ASSIGN(FocusBorder
);
49 #endif // UI_VIEWS_FOCUS_BORDER_H_