#ifndef UI_VIEWS_EXAMPLES_TEXT_EXAMPLE_H_
#define UI_VIEWS_EXAMPLES_TEXT_EXAMPLE_H_
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/examples/example_base.h"
namespace views {
class Checkbox;
class GridLayout;
namespace examples {
class ExampleComboboxModel;
class VIEWS_EXAMPLES_EXPORT TextExample : public ExampleBase,
public ButtonListener,
public ComboboxListener {
public:
TextExample();
virtual ~TextExample();
virtual void CreateExampleView(View* container) OVERRIDE;
private:
Checkbox* AddCheckbox(GridLayout* layout, const char* name);
Combobox* AddCombobox(GridLayout* layout,
const char* name,
const char** strings,
int count);
virtual void ButtonPressed(Button* button, const ui::Event& event) OVERRIDE;
virtual void OnPerformAction(Combobox* combobox) OVERRIDE;
class TextExampleView;
TextExampleView* text_view_;
Combobox* h_align_cb_;
Combobox* eliding_cb_;
Combobox* prefix_cb_;
Combobox* text_cb_;
Checkbox* multiline_checkbox_;
Checkbox* break_checkbox_;
Checkbox* halo_checkbox_;
Checkbox* bold_checkbox_;
Checkbox* italic_checkbox_;
Checkbox* underline_checkbox_;
ScopedVector<ExampleComboboxModel> example_combobox_model_;
DISALLOW_COPY_AND_ASSIGN(TextExample);
};
}
}
#endif