Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: ui/views/controls/message_box_view.h

Issue 10437006: Converts ui/views/controls, ui/views/examples, ui/base/models to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_CONTROLS_MESSAGE_BOX_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_
6 #define UI_VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 13
14 namespace gfx {
15 class ImageSkia;
16 }
17
14 namespace views { 18 namespace views {
15 19
16 class Checkbox; 20 class Checkbox;
17 class ImageView; 21 class ImageView;
18 class Label; 22 class Label;
19 class Textfield; 23 class Textfield;
20 24
21 // This class displays the contents of a message box. It is intended for use 25 // This class displays the contents of a message box. It is intended for use
22 // within a constrained window, and has options for a message, prompt, OK 26 // within a constrained window, and has options for a message, prompt, OK
23 // and Cancel buttons. 27 // and Cancel buttons.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 59
56 // Returns user entered data in the prompt field. 60 // Returns user entered data in the prompt field.
57 string16 GetInputText(); 61 string16 GetInputText();
58 62
59 // Returns true if a checkbox is selected, false otherwise. (And false if 63 // Returns true if a checkbox is selected, false otherwise. (And false if
60 // the message box has no checkbox.) 64 // the message box has no checkbox.)
61 bool IsCheckBoxSelected(); 65 bool IsCheckBoxSelected();
62 66
63 // Adds |icon| to the upper left of the message box or replaces the current 67 // Adds |icon| to the upper left of the message box or replaces the current
64 // icon. To start out, the message box has no icon. 68 // icon. To start out, the message box has no icon.
65 void SetIcon(const SkBitmap& icon); 69 void SetIcon(const gfx::ImageSkia& icon);
66 70
67 // Adds a checkbox with the specified label to the message box if this is the 71 // Adds a checkbox with the specified label to the message box if this is the
68 // first call. Otherwise, it changes the label of the current checkbox. To 72 // first call. Otherwise, it changes the label of the current checkbox. To
69 // start, the message box has no checkbox until this function is called. 73 // start, the message box has no checkbox until this function is called.
70 void SetCheckBoxLabel(const string16& label); 74 void SetCheckBoxLabel(const string16& label);
71 75
72 // Sets the state of the check-box. 76 // Sets the state of the check-box.
73 void SetCheckBoxSelected(bool selected); 77 void SetCheckBoxSelected(bool selected);
74 78
75 // View: 79 // View:
(...skipping 30 matching lines...) Expand all
106 110
107 // Maximum width of the message label. 111 // Maximum width of the message label.
108 int message_width_; 112 int message_width_;
109 113
110 DISALLOW_COPY_AND_ASSIGN(MessageBoxView); 114 DISALLOW_COPY_AND_ASSIGN(MessageBoxView);
111 }; 115 };
112 116
113 } // namespace views 117 } // namespace views
114 118
115 #endif // UI_VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ 119 #endif // UI_VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698