| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef UI_VIEWS_WINDOW_DIALOG_FRAME_VIEW_H_ | |
| 6 #define UI_VIEWS_WINDOW_DIALOG_FRAME_VIEW_H_ | |
| 7 | |
| 8 #include "ui/views/controls/button/button.h" | |
| 9 #include "ui/views/window/non_client_view.h" | |
| 10 | |
| 11 namespace views { | |
| 12 | |
| 13 class Label; | |
| 14 class LabelButton; | |
| 15 | |
| 16 // A NonClientFrameView that implements a new-style for dialogs. | |
| 17 class VIEWS_EXPORT DialogFrameView : public NonClientFrameView, | |
| 18 public ButtonListener { | |
| 19 public: | |
| 20 explicit DialogFrameView(const string16& title); | |
| 21 virtual ~DialogFrameView(); | |
| 22 | |
| 23 // Overridden from NonClientFrameView: | |
| 24 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | |
| 25 virtual gfx::Rect GetWindowBoundsForClientBounds( | |
| 26 const gfx::Rect& client_bounds) const OVERRIDE; | |
| 27 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | |
| 28 virtual void GetWindowMask(const gfx::Size& size, | |
| 29 gfx::Path* window_mask) OVERRIDE; | |
| 30 virtual void ResetWindowControls() OVERRIDE; | |
| 31 virtual void UpdateWindowIcon() OVERRIDE; | |
| 32 virtual void UpdateWindowTitle() OVERRIDE; | |
| 33 | |
| 34 // Overridden from View: | |
| 35 virtual std::string GetClassName() const OVERRIDE; | |
| 36 virtual void Layout() OVERRIDE; | |
| 37 | |
| 38 // Overridden from ButtonListener: | |
| 39 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | |
| 40 | |
| 41 private: | |
| 42 gfx::Insets GetClientInsets() const; | |
| 43 | |
| 44 Label* title_; | |
| 45 LabelButton* close_; | |
| 46 | |
| 47 // The margins between the content and the inside of the border. | |
| 48 gfx::Insets content_margins_; | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(DialogFrameView); | |
| 51 }; | |
| 52 | |
| 53 } // namespace views | |
| 54 | |
| 55 #endif // UI_VIEWS_WINDOW_DIALOG_FRAME_VIEW_H_ | |
| OLD | NEW |