view_class_properties.cc 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright 2017 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. #include "ui/views/view_class_properties.h"
  5. #include "ui/base/hit_test.h"
  6. #include "ui/gfx/geometry/insets.h"
  7. #include "ui/views/bubble/bubble_dialog_delegate_view.h"
  8. #include "ui/views/controls/highlight_path_generator.h"
  9. #include "ui/views/layout/flex_layout_types.h"
  10. #if !defined(USE_AURA)
  11. // aura_constants.cc also defines these types.
  12. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, bool)
  13. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, int)
  14. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Size*)
  15. #endif
  16. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Insets*)
  17. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, views::DialogDelegate*)
  18. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT,
  19. views::HighlightPathGenerator*)
  20. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, views::FlexSpecification*)
  21. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, views::LayoutAlignment*)
  22. DEFINE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, ui::ElementIdentifier)
  23. namespace views {
  24. DEFINE_UI_CLASS_PROPERTY_KEY(int, kHitTestComponentKey, HTNOWHERE)
  25. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Insets, kMarginsKey, nullptr)
  26. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Insets, kInternalPaddingKey, nullptr)
  27. DEFINE_UI_CLASS_PROPERTY_KEY(views::DialogDelegate*,
  28. kAnchoredDialogKey,
  29. nullptr)
  30. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(views::HighlightPathGenerator,
  31. kHighlightPathGeneratorKey,
  32. nullptr)
  33. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(FlexSpecification, kFlexBehaviorKey, nullptr)
  34. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(LayoutAlignment,
  35. kCrossAxisAlignmentKey,
  36. nullptr)
  37. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Size, kTableColAndRowSpanKey, nullptr)
  38. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(LayoutAlignment,
  39. kTableHorizAlignKey,
  40. nullptr)
  41. DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(LayoutAlignment, kTableVertAlignKey, nullptr)
  42. DEFINE_UI_CLASS_PROPERTY_KEY(bool, kViewIgnoredByLayoutKey, false)
  43. DEFINE_UI_CLASS_PROPERTY_KEY(ui::ElementIdentifier,
  44. kElementIdentifierKey,
  45. ui::ElementIdentifier())
  46. } // namespace views