| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsScriptEditorPrerequisites.h"
- #include "Wrappers/GUI/BsScriptGUIElement.h"
- namespace bs
- {
- struct __GUIContentInterop;
- /** @addtogroup ScriptInteropEditor
- * @{
- */
- /** Interop class between C++ & CLR for GUITextField. */
- class BS_SCR_BED_EXPORT ScriptGUITextField : public TScriptGUIElement<ScriptGUITextField>
- {
- public:
- SCRIPT_OBJ(EDITOR_ASSEMBLY, EDITOR_NS, "GUITextField")
- private:
- /**
- * Triggered when the value in the native text field changes.
- *
- * @param[in] newValue New string value.
- */
- void onChanged(const String& newValue);
- /** Triggered when the user confirms input in the native text field. */
- void onConfirmed();
- ScriptGUITextField(MonoObject* instance, GUITextField* textField);
- /************************************************************************/
- /* CLR HOOKS */
- /************************************************************************/
- static void internal_createInstance(MonoObject* instance, bool multiline, __GUIContentInterop* title,
- UINT32 titleWidth, MonoString* style, MonoArray* guiOptions, bool withTitle);
- static void internal_getValue(ScriptGUITextField* nativeInstance, MonoString** output);
- static void internal_setValue(ScriptGUITextField* nativeInstance, MonoString* value);
- static void internal_hasInputFocus(ScriptGUITextField* nativeInstance, bool* output);
- static void internal_setTint(ScriptGUITextField* nativeInstance, Color* color);
- typedef void(BS_THUNKCALL *OnChangedThunkDef) (MonoObject*, MonoString*, MonoException**);
- typedef void(BS_THUNKCALL *OnConfirmedThunkDef) (MonoObject*, MonoException**);
- static OnChangedThunkDef onChangedThunk;
- static OnConfirmedThunkDef onConfirmedThunk;
- };
- /** @} */
- }
|