OROCHI
 
Loading...
Searching...
No Matches
GxGuiFormScript.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12#if GX_DEVELOP
13
14GX_CORE_NAMESPACE_BEGIN()
15class GxGuiPropertyComboBoxRtti;
16
17//===========================================================================
19//===========================================================================
20class GxGuiFormScript : public GxGuiForm
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 GX_RTTI_CLASS(GxGuiFormScript, GxGuiForm)
28 // ClassBaseReference継承クラス用禁止宣言
30
31private:
32 static const f32 ZOOM_MIN;
33 static const f32 ZOOM_MAX;
34
36 //-----------------------------------------------------------
38 //-----------------------------------------------------------
40public:
42 GxGuiFormScript(void);
43
45 //-----------------------------------------------------------
47 //-----------------------------------------------------------
49public:
51 void focus(const GxScript::GxBlock& block, b32 isForce = false);
52protected:
54 void update(void) override;
56 void onDraw(void) override;
58 void onMouseWheel(const GxPoint2& position, s32 rotate) override;
60 void onMouseDown(const GxPoint2& position, u32 button) override;
62 void onMouseUp(const GxPoint2& position, u32 button) override;
64 void onDoubleClick(const GxPoint2& position, u32 button) override;
66 void onMouseHover(const GxPoint2& position) override;
68 GxScript::GxBlockCommandFunction* addBlockCommandFunction(GxFunction* pFunction);
70 GxScript::GxBlockCommandFunctionDynamic* addBlockCommandFunctionDynamic(GxResScript::GxDynamicFunction* pDynamicFunction);
72 GxScript::GxBlockCommandSet* addBlockCommandSet(GxProperty* pProperty);
74 GxScript::GxBlockParameterFunction* addBlockParameterFunction(GxFunction* pFunction);
76 GxScript::GxBlockParameterFunctionDynamic* addBlockParameterFunctionDynamic(GxResScript::GxDynamicFunction* pDynamicFunction);
78 GxScript::GxBlockParameterProperty* addBlockParameterProperty(GxProperty* pProperty);
80 GxScript::GxBlockParameterProperty* addBlockParameterPropertyDynamic(GxResScript::GxDynamicProperty* pDynamicProperty);
82 GxScript::GxBlock* addBlock(GxRtti* pRtti, GxFunction* pFunction = nullptr, GxProperty* pProperty = nullptr);
83private:
85 void copySelectBlocks(void);
87 void pasteSelectBlocks(void);
89 void removeSelectBlocks(void);
91 void createMenu(const GxPropertyTable& propertyTable, b32 useSearchBar);
92
94 //-----------------------------------------------------------
96 //-----------------------------------------------------------
98public:
100 void setResource(GxResScript& resScript);
102 constexpr u32 getScriptIndex(void) const { return _scriptIndex; }
104 constexpr void setScriptIndex(u32 index) { _scriptIndex = index; }
106 void getSelectBlocks(GxArrayClassBase& blocks) const;
107private:
109 GxScript::GxBlock* getHitBlockConnect(GxScript::GxBlock* pBlockTarget, GxScript::GxBlock::CONNECT& connect) const;
111 GX_FORCE_INLINE static f32 getZoom(void) { return _zoom; }
112
114 //-----------------------------------------------------------
116 //-----------------------------------------------------------
118private:
119 static GxPoint2 _offset;
120 static f32 _zoom;
121 GxResScript* _pResScript;
122 GxScript::GxBlock* _pClickedBlock;
123 GxScript::GxBlock* _pDragBlock;
124 GxPoint2 _dragPoint;
125 GxPoint2 _dragOffset;
126 GxPoint2 _rightClickPoint;
127 u32 _scriptIndex;
128
130};
131
132GX_CORE_NAMESPACE_END()
133
134#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
配列クラス
Definition GxArrayClassBase.h:18
関数型情報
Definition GxFunction.h:18
プロパティクラス
Definition GxProperty.h:48
プロパティテーブルクラス
Definition GxProperty.h:1641
動的関数クラス
Definition GxResScript.h:49
動的プロパティクラス
Definition GxResScript.h:117
スクリプトリソース
Definition GxResScript.h:19
実行時型情報クラス
Definition GxRtti.h:154
命令動的関数ブロッククラス
Definition GxScript.h:558
命令関数ブロッククラス
Definition GxScript.h:509
代入ブロッククラス
Definition GxScript.h:613
標準ブロッククラス
Definition GxScript.h:231
パラメータ動的関数ブロッククラス
Definition GxScript.h:1295
パラメータ関数ブロッククラス
Definition GxScript.h:1221
パラメータプロパティブロッククラス
Definition GxScript.h:1149
座標
Definition GxStruct.h:867
32bitブーリアン
Definition GxDefine.h:173