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

Unified Diff: ui/views/view.h

Issue 2230913003: Experimental alignment layout manager using a property on the views Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed AlignAttribute and associated types to FillAttribute Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/layout/anchor_layout_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index 572d3a55f0487c33d11ef164b203bcb513cce133..518a15eeb2f356164cf855abd293ef19db36eb90 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -36,6 +36,7 @@
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/path.h"
+#include "ui/views/attributes.h"
#include "ui/views/view_targeter.h"
#include "ui/views/views_export.h"
@@ -401,6 +402,9 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Attributes ----------------------------------------------------------------
+ // Returns this view's custom attribute container
+ AttributeContainer& attributes() { return attributes_; }
+
// The view class name.
static const char kViewClassName[];
@@ -1466,6 +1470,11 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Whether this view is enabled.
bool enabled_;
+ // Container which holds any number of custom attributes used for various
+ // reasons, such as custom alignment and anchoring of the control within
+ // its parent.
+ AttributeContainer attributes_;
+
// When this flag is on, a View receives a mouse-enter and mouse-leave event
// even if a descendant View is the event-recipient for the real mouse
// events. When this flag is turned on, and mouse moves from outside of the
« no previous file with comments | « ui/views/layout/anchor_layout_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698