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 template <WEBCFACE_COMPLETE(Func)>
137extern template std::optional<Func> Canvas2DComponent::onClick<Func, true>()
const;
140 std::unique_ptr<internal::TemporalCanvas2DComponentData> msg_data;
169 std::unique_ptr<internal::TemporalCanvas2DComponentData>
170 lockTmp(
const std::shared_ptr<internal::ClientData> &data,
172 std::unordered_map<Canvas2DComponentType, int> *idx_next =
nullptr);
193 this->origin(origin);
194 return std::move(*
this);
209 return std::move(*
this);
223 this->fillColor(color);
224 return std::move(*
this);
240 this->strokeWidth(s);
241 return std::move(*
this);
259 return std::move(*
this);
274 return std::move(*
this);
287 return std::move(*
this);
299 return std::move(*
this);
314 return std::move(*
this);
328 return std::move(*
this);
339 template <typename T, decltype(std::declval<T>()(),
nullptr) =
nullptr>
348 template <typename T, decltype(std::declval<T>()(),
nullptr) =
nullptr>
350 this->onClick(std::move(func));
351 return std::move(*
this);
Canvas2Dの各要素を表すクラス。
Definition component_canvas2d.h:33
std::optional< Func_ > onClick() const
クリック時に実行される関数を取得
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:67
Definition component_canvas2d.h:139
TemporalCanvas2DComponent & onClick(T func) &
クリック時に実行される関数を設定
Definition component_canvas2d.h:340
TemporalCanvas2DComponent && fillColor(const ViewColor &color) &&
Definition component_canvas2d.h:222
TemporalCanvas2DComponent && origin(const Transform &origin) &&
Definition component_canvas2d.h:192
TemporalCanvas2DComponent && strokeWidth(double s) &&
Definition component_canvas2d.h:239
TemporalCanvas2DComponent && onClick(T func) &&
クリック時に実行される関数を設定
Definition component_canvas2d.h:349
TemporalCanvas2DComponent && onClick(const FuncListener &func) &&
クリック時に実行される関数を設定 (FuncListener)
Definition component_canvas2d.h:326
TemporalCanvas2DComponent && text(std::string_view text) &&
Definition component_canvas2d.h:272
TemporalCanvas2DComponent && textSize(double s) &&
Definition component_canvas2d.h:257
TemporalCanvas2DComponent & textSize(double s) &
文字の大きさ(高さ)
Definition component_canvas2d.h:253
TemporalCanvas2DComponent && text(std::wstring_view text) &&
表示する文字列を設定 (wstring)
Definition component_canvas2d.h:285
TemporalCanvas2DComponent && onClick(const Func &func) &&
クリック時に実行される関数を設定 (Funcオブジェクト)
Definition component_canvas2d.h:312
TemporalCanvas2DComponent && color(const ViewColor &color) &&
Definition component_canvas2d.h:207
TemporalCanvas2DComponent && geometry(const Geometry &g) &&
Definition component_canvas2d.h:297
Canvas2DComponentType
Definition component_canvas2d.h:22
bool operator==(const T &other, const InputRef &ref)
Definition text.h:574
ViewColor
Definition component_view.h:40
#define WEBCFACE_DLL
Definition webcface-config.h:69
#define WEBCFACE_NS_END
Definition webcface-config.h:118
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:117
#define WEBCFACE_CALL_FP
Definition webcface-config.h:107