| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_STYLE_PLATFORM_STYLE_H_ | 5 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/gfx/text_constants.h" |
| 11 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
| 12 #include "ui/views/controls/button/custom_button.h" | 13 #include "ui/views/controls/button/custom_button.h" |
| 13 #include "ui/views/controls/combobox/combobox.h" | 14 #include "ui/views/controls/combobox/combobox.h" |
| 14 #include "ui/views/views_export.h" | 15 #include "ui/views/views_export.h" |
| 15 | 16 |
| 16 namespace views { | 17 namespace views { |
| 17 | 18 |
| 18 class Border; | 19 class Border; |
| 19 class FocusableBorder; | 20 class FocusableBorder; |
| 20 class Label; | 21 class Label; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 42 // Whether the default button for a dialog can be the Cancel button. | 43 // Whether the default button for a dialog can be the Cancel button. |
| 43 static const bool kDialogDefaultButtonCanBeCancel; | 44 static const bool kDialogDefaultButtonCanBeCancel; |
| 44 | 45 |
| 45 // Whether dragging vertically above or below a textfield's bounds selects to | 46 // Whether dragging vertically above or below a textfield's bounds selects to |
| 46 // the left or right end of the text from the cursor, respectively. | 47 // the left or right end of the text from the cursor, respectively. |
| 47 static const bool kTextfieldDragVerticallyDragsToEnd; | 48 static const bool kTextfieldDragVerticallyDragsToEnd; |
| 48 | 49 |
| 49 // The menu button's action to show the menu. | 50 // The menu button's action to show the menu. |
| 50 static const CustomButton::NotifyAction kMenuNotifyActivationAction; | 51 static const CustomButton::NotifyAction kMenuNotifyActivationAction; |
| 51 | 52 |
| 53 // The default behavior for word text selection commands, when the selection |
| 54 // direction is reversed. |
| 55 static const gfx::SelectionReversedBehavior kWordSelectionBehavior; |
| 56 |
| 57 // The default behavior for line text selection commands, when the selection |
| 58 // direction is reversed. |
| 59 static const gfx::SelectionReversedBehavior kLineSelectionBehavior; |
| 60 |
| 52 // Creates an ImageSkia containing the image to use for the combobox arrow. | 61 // Creates an ImageSkia containing the image to use for the combobox arrow. |
| 53 // The |is_enabled| argument is true if the control the arrow is for is | 62 // The |is_enabled| argument is true if the control the arrow is for is |
| 54 // enabled, and false if the control is disabled. The |style| argument is the | 63 // enabled, and false if the control is disabled. The |style| argument is the |
| 55 // style of the combobox the arrow is being drawn for. | 64 // style of the combobox the arrow is being drawn for. |
| 56 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, | 65 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, |
| 57 Combobox::Style style); | 66 Combobox::Style style); |
| 58 | 67 |
| 59 // Creates the appropriate border for a focusable Combobox. | 68 // Creates the appropriate border for a focusable Combobox. |
| 60 static std::unique_ptr<FocusableBorder> CreateComboboxBorder(); | 69 static std::unique_ptr<FocusableBorder> CreateComboboxBorder(); |
| 61 | 70 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 85 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( | 94 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( |
| 86 LabelButton* button); | 95 LabelButton* button); |
| 87 | 96 |
| 88 private: | 97 private: |
| 89 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); | 98 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); |
| 90 }; | 99 }; |
| 91 | 100 |
| 92 } // namespace views | 101 } // namespace views |
| 93 | 102 |
| 94 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ | 103 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ |
| OLD | NEW |