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

Unified Diff: ui/views/examples/fill_example.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/examples/examples_window.cc ('k') | ui/views/examples/fill_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/fill_example.h
diff --git a/ui/views/examples/fill_example.h b/ui/views/examples/fill_example.h
new file mode 100644
index 0000000000000000000000000000000000000000..9cda48060db2984c6d30232839970797be6b389d
--- /dev/null
+++ b/ui/views/examples/fill_example.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_EXAMPLES_FILL_EXAMPLE_H_
+#define UI_VIEWS_EXAMPLES_FILL_EXAMPLE_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "ui/views/controls/button/button.h"
+#include "ui/views/examples/example_base.h"
+#include "ui/views/fill_attribute.h"
+#include "ui/views/widget/widget.h"
+
+namespace views {
+
+class LabelButton;
+
+namespace examples {
+
+// AlignExample demonstrates how to use AlignAttribute to align control
+// within the parent.
+class VIEWS_EXAMPLES_EXPORT FillExample : public ExampleBase,
+ public ButtonListener {
+ public:
+ FillExample();
+ ~FillExample() override;
+
+ // ExampleBase:
+ void CreateExampleView(View* container) override;
+
+ private:
+ // ButtonListener:
+ void ButtonPressed(Button* sender, const ui::Event& event) override;
+ base::string16 LabelText(views::Fill fill);
+
+ LabelButton* new_fill_view_button_ = nullptr;
+ views::Fill current_fill_ = views::Fill::Top;
+
+ DISALLOW_COPY_AND_ASSIGN(FillExample);
+};
+
+} // namespace examples
+} // namespace views
+
+#endif // UI_VIEWS_EXAMPLES_FILL_EXAMPLE_H_
« no previous file with comments | « ui/views/examples/examples_window.cc ('k') | ui/views/examples/fill_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698