Avi Drissman | 3e1a26c | 2022-09-15 20:26:03 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
kylixrd | 3c489a8 | 2017-06-08 14:13:23 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Robert Liao | 708977c | 2019-03-01 02:13:50 | [diff] [blame] | 5 | #include "ui/views/view_class_properties.h" |
kylixrd | 3c489a8 | 2017-06-08 14:13:23 | [diff] [blame] | 6 | |
Evan Stade | e975a3e7 | 2018-07-25 16:09:15 | [diff] [blame] | 7 | #include "ui/base/hit_test.h" |
kylixrd | 3c489a8 | 2017-06-08 14:13:23 | [diff] [blame] | 8 | #include "ui/gfx/geometry/insets.h" |
Robert Liao | 3cea15a | 2018-08-13 21:10:19 | [diff] [blame] | 9 | #include "ui/views/bubble/bubble_dialog_delegate_view.h" |
Peter Boström | a934e7d7 | 2019-10-01 19:07:13 | [diff] [blame] | 10 | #include "ui/views/controls/highlight_path_generator.h" |
Dana Fried | 0cbada24 | 2019-06-26 20:12:21 | [diff] [blame] | 11 | #include "ui/views/layout/flex_layout_types.h" |
kylixrd | 3c489a8 | 2017-06-08 14:13:23 | [diff] [blame] | 12 | |
Ben Ruthig | 5a53d77 | 2017-07-25 12:13:11 | [diff] [blame] | 13 | #if !defined(USE_AURA) |
Peter Kasting | a6fb2914 | 2021-10-17 20:09:48 | [diff] [blame] | 14 | // aura_constants.cc also defines these types. |
Nico Weber | 0f1ed9a | 2019-02-20 18:26:30 | [diff] [blame] | 15 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, bool) |
| 16 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, int) |
Peter Kasting | a6fb2914 | 2021-10-17 20:09:48 | [diff] [blame] | 17 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Size*) |
Ben Ruthig | 5a53d77 | 2017-07-25 12:13:11 | [diff] [blame] | 18 | #endif |
| 19 | |
Nico Weber | 0f1ed9a | 2019-02-20 18:26:30 | [diff] [blame] | 20 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Insets*) |
kylixrd | 3c489a8 | 2017-06-08 14:13:23 | [diff] [blame] | 21 | |
Peter Boström | 4d70001 | 2020-11-03 23:53:40 | [diff] [blame] | 22 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, views::DialogDelegate*) |
Dominic Mazzoni | 2c41f79 | 2018-05-17 20:18:00 | [diff] [blame] | 23 | |
Peter Boström | a934e7d7 | 2019-10-01 19:07:13 | [diff] [blame] | 24 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, |
| 25 | views::HighlightPathGenerator*) |
Dana Fried | 0cbada24 | 2019-06-26 20:12:21 | [diff] [blame] | 26 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, views::FlexSpecification*) |
Dana Fried | d62dfd2 | 2020-09-28 11:26:23 | [diff] [blame] | 27 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, views::LayoutAlignment*) |
Dana Fried | 86efb88 | 2021-05-06 22:09:57 | [diff] [blame] | 28 | DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, ui::ElementIdentifier) |
Peter Boström | e02b436 | 2018-09-25 00:51:52 | [diff] [blame] | 29 | |
kylixrd | 3c489a8 | 2017-06-08 14:13:23 | [diff] [blame] | 30 | namespace views { |
| 31 | |
Nico Weber | 0f1ed9a | 2019-02-20 18:26:30 | [diff] [blame] | 32 | DEFINE_UI_CLASS_PROPERTY_KEY(int, kHitTestComponentKey, HTNOWHERE) |
| 33 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Insets, kMarginsKey, nullptr) |
| 34 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Insets, kInternalPaddingKey, nullptr) |
Peter Boström | 4d70001 | 2020-11-03 23:53:40 | [diff] [blame] | 35 | DEFINE_UI_CLASS_PROPERTY_KEY(views::DialogDelegate*, |
Dominic Mazzoni | 2c41f79 | 2018-05-17 20:18:00 | [diff] [blame] | 36 | kAnchoredDialogKey, |
Nico Weber | 0f1ed9a | 2019-02-20 18:26:30 | [diff] [blame] | 37 | nullptr) |
Peter Boström | a934e7d7 | 2019-10-01 19:07:13 | [diff] [blame] | 38 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(views::HighlightPathGenerator, |
| 39 | kHighlightPathGeneratorKey, |
| 40 | nullptr) |
Dana Fried | 0cbada24 | 2019-06-26 20:12:21 | [diff] [blame] | 41 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(FlexSpecification, kFlexBehaviorKey, nullptr) |
Dana Fried | d62dfd2 | 2020-09-28 11:26:23 | [diff] [blame] | 42 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(LayoutAlignment, |
| 43 | kCrossAxisAlignmentKey, |
| 44 | nullptr) |
Peter Kasting | a6fb2914 | 2021-10-17 20:09:48 | [diff] [blame] | 45 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Size, kTableColAndRowSpanKey, nullptr) |
| 46 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(LayoutAlignment, |
| 47 | kTableHorizAlignKey, |
| 48 | nullptr) |
| 49 | DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(LayoutAlignment, kTableVertAlignKey, nullptr) |
Allen Bauer | 82b3460 | 2021-01-07 04:16:21 | [diff] [blame] | 50 | DEFINE_UI_CLASS_PROPERTY_KEY(bool, kViewIgnoredByLayoutKey, false) |
Dana Fried | 86efb88 | 2021-05-06 22:09:57 | [diff] [blame] | 51 | DEFINE_UI_CLASS_PROPERTY_KEY(ui::ElementIdentifier, |
| 52 | kElementIdentifierKey, |
| 53 | ui::ElementIdentifier()) |
kylixrd | 3c489a8 | 2017-06-08 14:13:23 | [diff] [blame] | 54 | |
| 55 | } // namespace views |