2#include <unordered_map>
7#include "webcface/common/webcface-config.h"
16struct Canvas2DComponentData;
19struct TemporalCanvas2DComponentData;
34 std::shared_ptr<message::Canvas2DComponentData> msg_data;
35 std::weak_ptr<internal::ClientData> data_w;
38 void checkData()
const;
48 const std::shared_ptr<message::Canvas2DComponentData> &msg_data,
49 const std::weak_ptr<internal::ClientData> &data_w,
61 std::string id()
const;
71 std::wstring idW()
const;
81 return !(*
this == other);
109 double strokeWidth()
const;
119 std::string text()
const;
124 std::wstring textW()
const;
129 std::optional<Geometry>
geometry()
const;
134 std::optional<Func> onClick()
const;
138 std::unique_ptr<internal::TemporalCanvas2DComponentData> msg_data;
167 std::unique_ptr<internal::TemporalCanvas2DComponentData>
168 lockTmp(
const std::shared_ptr<internal::ClientData> &data,
170 std::unordered_map<Canvas2DComponentType, int> *idx_next =
nullptr);
191 this->origin(origin);
192 return std::move(*
this);
207 return std::move(*
this);
221 this->fillColor(color);
222 return std::move(*
this);
238 this->strokeWidth(s);
239 return std::move(*
this);
257 return std::move(*
this);
272 return std::move(*
this);
285 return std::move(*
this);
297 return std::move(*
this);
312 return std::move(*
this);
326 return std::move(*
this);
337 template <typename T, decltype(std::declval<T>()(),
nullptr) =
nullptr>
346 template <typename T, decltype(std::declval<T>()(),
nullptr) =
nullptr>
348 this->onClick(std::move(func));
349 return std::move(*
this);
Canvas2Dの各要素を表すクラス。
Definition component_canvas2d.h:33
double textSize() const
文字の大きさ(高さ)
Definition component_canvas2d.h:114
bool operator!=(const Canvas2DComponent &other) const
Definition component_canvas2d.h:80
関数1つを表すクラス
Definition func.h:95
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition encoding.h:69
Definition component_canvas2d.h:137
TemporalCanvas2DComponent & onClick(T func) &
クリック時に実行される関数を設定
Definition component_canvas2d.h:338
TemporalCanvas2DComponent && fillColor(const ViewColor &color) &&
Definition component_canvas2d.h:220
TemporalCanvas2DComponent && origin(const Transform &origin) &&
Definition component_canvas2d.h:190
TemporalCanvas2DComponent && strokeWidth(double s) &&
Definition component_canvas2d.h:237
TemporalCanvas2DComponent && onClick(T func) &&
クリック時に実行される関数を設定
Definition component_canvas2d.h:347
TemporalCanvas2DComponent && onClick(const FuncListener &func) &&
クリック時に実行される関数を設定 (FuncListener)
Definition component_canvas2d.h:324
TemporalCanvas2DComponent && text(std::string_view text) &&
Definition component_canvas2d.h:270
TemporalCanvas2DComponent && textSize(double s) &&
Definition component_canvas2d.h:255
TemporalCanvas2DComponent & textSize(double s) &
文字の大きさ(高さ)
Definition component_canvas2d.h:251
TemporalCanvas2DComponent && text(std::wstring_view text) &&
表示する文字列を設定 (wstring)
Definition component_canvas2d.h:283
TemporalCanvas2DComponent && onClick(const Func &func) &&
クリック時に実行される関数を設定 (Funcオブジェクト)
Definition component_canvas2d.h:310
TemporalCanvas2DComponent && color(const ViewColor &color) &&
Definition component_canvas2d.h:205
TemporalCanvas2DComponent && geometry(const Geometry &g) &&
Definition component_canvas2d.h:295
Canvas2DComponentType
Definition component_canvas2d.h:22
bool operator==(const T &other, const InputRef &ref)
Definition text.h:566
ViewColor
Definition component_view.h:40
#define WEBCFACE_DLL
Definition webcface-config.h:60
#define WEBCFACE_NS_END
Definition webcface-config.h:104
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:103
#define WEBCFACE_CALL_FP
Definition webcface-config.h:98