OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 |
| 5 #ifndef UI_VIEWS_EXAMPLES_FILL_EXAMPLE_H_ |
| 6 #define UI_VIEWS_EXAMPLES_FILL_EXAMPLE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "ui/views/controls/button/button.h" |
| 12 #include "ui/views/examples/example_base.h" |
| 13 #include "ui/views/fill_attribute.h" |
| 14 #include "ui/views/widget/widget.h" |
| 15 |
| 16 namespace views { |
| 17 |
| 18 class LabelButton; |
| 19 |
| 20 namespace examples { |
| 21 |
| 22 // AlignExample demonstrates how to use AlignAttribute to align control |
| 23 // within the parent. |
| 24 class VIEWS_EXAMPLES_EXPORT FillExample : public ExampleBase, |
| 25 public ButtonListener { |
| 26 public: |
| 27 FillExample(); |
| 28 ~FillExample() override; |
| 29 |
| 30 // ExampleBase: |
| 31 void CreateExampleView(View* container) override; |
| 32 |
| 33 private: |
| 34 // ButtonListener: |
| 35 void ButtonPressed(Button* sender, const ui::Event& event) override; |
| 36 base::string16 LabelText(views::Fill fill); |
| 37 |
| 38 LabelButton* new_fill_view_button_ = nullptr; |
| 39 views::Fill current_fill_ = views::Fill::Top; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(FillExample); |
| 42 }; |
| 43 |
| 44 } // namespace examples |
| 45 } // namespace views |
| 46 |
| 47 #endif // UI_VIEWS_EXAMPLES_FILL_EXAMPLE_H_ |
OLD | NEW |