summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/panels/panel_scroller_header.h
blob: 465558f00f530e1783a7418ed8b2c6d8d44c611c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2009 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.

#ifndef CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_
#define CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_
#pragma once

#include <string>

#include "base/basictypes.h"
#include "base/string16.h"
#include "views/view.h"

class PanelScroller;

class PanelScrollerHeader : public views::View {
 public:
  explicit PanelScrollerHeader(PanelScroller* scroller);
  virtual ~PanelScrollerHeader();

  void set_title(const string16& title) {
    title_ = title;
  }

  // views::View overrides.
  virtual bool OnMousePressed(const views::MouseEvent& event);
  virtual bool OnMouseDragged(const views::MouseEvent& event);
  virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
  virtual gfx::Size GetPreferredSize();
  virtual void Paint(gfx::Canvas* canvas);

 private:
  // Non-owning pointer to our parent scroller object.
  PanelScroller* scroller_;

  string16 title_;

  DISALLOW_COPY_AND_ASSIGN(PanelScrollerHeader);
};

#endif  // CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_