Home | History | Annotate | Download | only in panels
      1 // Copyright (c) 2011 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.
      4 
      5 #ifndef CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_
      6 #define CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_
      7 #pragma once
      8 
      9 #include "base/basictypes.h"
     10 #include "base/string16.h"
     11 #include "views/view.h"
     12 
     13 class PanelScroller;
     14 
     15 class PanelScrollerHeader : public views::View {
     16  public:
     17   explicit PanelScrollerHeader(PanelScroller* scroller);
     18   virtual ~PanelScrollerHeader();
     19 
     20   void set_title(const string16& title) { title_ = title; }
     21 
     22   // views::View overrides.
     23   virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
     24   virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
     25   virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
     26   virtual void OnMouseCaptureLost() OVERRIDE;
     27   virtual gfx::Size GetPreferredSize();
     28   virtual void OnPaint(gfx::Canvas* canvas);
     29 
     30  private:
     31   // Non-owning pointer to our parent scroller object.
     32   PanelScroller* scroller_;
     33 
     34   string16 title_;
     35 
     36   DISALLOW_COPY_AND_ASSIGN(PanelScrollerHeader);
     37 };
     38 
     39 #endif  // CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_
     40