#ifndef UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_
#define UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_
#include <string>
#include "base/macros.h"
#include "ui/views/examples/views_examples_export.h"
namespace views {
class View;
namespace examples {
class VIEWS_EXAMPLES_EXPORT ExampleBase {
public:
virtual ~ExampleBase();
virtual void CreateExampleView(View* parent) = 0;
const std::string& example_title() const { return example_title_; }
View* example_view() { return container_; }
protected:
explicit ExampleBase(const char* title);
View* container() { return container_; }
void PrintStatus(const char* format, ...);
const char* BoolToOnOff(bool value) {
return value ? "on" : "off";
}
private:
std::string example_title_;
View* container_;
DISALLOW_COPY_AND_ASSIGN(ExampleBase);
};
}
}
#endif