33 lines
811 B
C++
33 lines
811 B
C++
#pragma once
|
|
|
|
#include <Scenario/Document/State/StateModel.hpp>
|
|
#include <Process/Style/ScenarioStyle.hpp>
|
|
#include <widgets/container_widget.hpp>
|
|
|
|
namespace Hardware
|
|
{
|
|
struct StateWidget final : bugui::container_widget
|
|
{
|
|
explicit StateWidget(Scenario::StateModel& state,
|
|
container_widget* parent);
|
|
|
|
void paint(bugui::painter& painter) const override;
|
|
bool on_press(int x, int y, bool pressed) override;
|
|
bool on_double_press(int x, int y) override;
|
|
bool on_drag(int from_x, int from_y, int to_x, int to_y) override;
|
|
|
|
int x() const override;
|
|
int y() const override;
|
|
|
|
const Scenario::StateModel& get_model() const;
|
|
|
|
protected:
|
|
bool contains(int px, int py) const override;
|
|
|
|
private:
|
|
Scenario::StateModel& model;
|
|
const Process::Style& skin;
|
|
};
|
|
|
|
} //namespace Hardware
|
|
|