| 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_
|
|
|