OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 5 #ifndef UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
7 | 7 |
8 #include "ui/base/ui_base_types.h" | 8 #include "ui/base/ui_base_types.h" |
9 #include "ui/views/controls/button/button.h" | 9 #include "ui/views/controls/button/button.h" |
10 #include "ui/views/focus/focus_manager.h" | 10 #include "ui/views/focus/focus_manager.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void PaintSizeBox(gfx::Canvas* canvas); | 112 void PaintSizeBox(gfx::Canvas* canvas); |
113 | 113 |
114 // Returns the greater of ok and cancel button's preferred height. | 114 // Returns the greater of ok and cancel button's preferred height. |
115 int GetButtonsHeight() const; | 115 int GetButtonsHeight() const; |
116 | 116 |
117 // Returns the height of the dialog buttons area, including the spacing | 117 // Returns the height of the dialog buttons area, including the spacing |
118 // between bottom of contents view and top of buttons, the buttons height, | 118 // between bottom of contents view and top of buttons, the buttons height, |
119 // and the spacing between bottom of buttons to end of the dialog. | 119 // and the spacing between bottom of buttons to end of the dialog. |
120 int GetDialogButtonsAreaHeight() const; | 120 int GetDialogButtonsAreaHeight() const; |
121 | 121 |
122 // Returns the preferred height of |footnote_view_|, or 0 if that view is | 122 // Returns the size of |footnote_view_|. If |footnote_view_| is NULL or |
123 // NULL. | 123 // !visible(), gfx::Size() will be returned. |
124 int GetFootnoteViewHeight() const; | 124 gfx::Size GetFootnoteSize() const; |
125 | 125 |
126 // Position and size various sub-views. | 126 // Position and size various sub-views. |
127 void LayoutDialogButtons(); | 127 void LayoutDialogButtons(); |
128 void LayoutContentsView(); | 128 void LayoutContentsView(); |
129 void LayoutFootnoteView(); | 129 void LayoutFootnoteView(); |
130 | 130 |
131 // Makes the specified button the default button. | 131 // Makes the specified button the default button. |
132 void SetDefaultButton(TextButton* button); | 132 void SetDefaultButton(TextButton* button); |
133 | 133 |
134 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } | 134 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 // When ancestor gets changed focus manager gets changed as well. | 183 // When ancestor gets changed focus manager gets changed as well. |
184 FocusManager* saved_focus_manager_; | 184 FocusManager* saved_focus_manager_; |
185 | 185 |
186 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 186 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
187 }; | 187 }; |
188 | 188 |
189 } // namespace views | 189 } // namespace views |
190 | 190 |
191 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 191 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
OLD | NEW |