Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
widgets.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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 FLUTTER_IMPELLER_PLAYGROUND_WIDGETS_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_WIDGETS_H_
7
8#include <optional>
9#include <tuple>
10
14#include "third_party/imgui/imgui.h"
15
16namespace impeller {
18 PlaygroundPoint(Point default_position, Scalar p_radius, Color p_color)
19 : position(default_position),
20 reset_position(default_position),
21 radius(p_radius),
22 color(p_color) {}
25 bool dragging = false;
26 std::optional<Point> prev_mouse_pos;
32};
33
35
36std::tuple<Point, Point> DrawPlaygroundLine(PlaygroundPoint& point_a,
37 PlaygroundPoint& point_b);
38} // namespace impeller
39#endif // FLUTTER_IMPELLER_PLAYGROUND_WIDGETS_H_
float Scalar
Definition scalar.h:18
Point DrawPlaygroundPoint(PlaygroundPoint &point)
Definition widgets.cc:9
std::tuple< Point, Point > DrawPlaygroundLine(PlaygroundPoint &point_a, PlaygroundPoint &point_b)
Definition widgets.cc:50
PlaygroundPoint(const PlaygroundPoint &)=delete
PlaygroundPoint & operator=(const PlaygroundPoint &)=delete
PlaygroundPoint(Point default_position, Scalar p_radius, Color p_color)
Definition widgets.h:18
PlaygroundPoint(PlaygroundPoint &&)=delete
std::optional< Point > prev_mouse_pos
Definition widgets.h:26