2
0

BsScriptFont.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptResource.h"
  6. #include "BsScriptObject.h"
  7. #include "BsFont.h"
  8. namespace BansheeEngine
  9. {
  10. /** @addtogroup ScriptInteropEngine
  11. * @{
  12. */
  13. /** Interop class between C++ & CLR for Font. */
  14. class BS_SCR_BE_EXPORT ScriptFont : public TScriptResource<ScriptFont, Font>
  15. {
  16. public:
  17. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Font")
  18. /** Creates an empty, uninitialized managed instance of the resource interop object. */
  19. static MonoObject* createInstance();
  20. private:
  21. friend class ScriptResourceManager;
  22. ScriptFont(MonoObject* instance, const HFont& font);
  23. /************************************************************************/
  24. /* CLR HOOKS */
  25. /************************************************************************/
  26. static MonoObject* internal_GetBitmap(ScriptFont* instance, int size);
  27. static int internal_GetClosestSize(ScriptFont* instance, int size);
  28. };
  29. /** Interop class between C++ & CLR for CharRange. */
  30. class BS_SCR_BE_EXPORT ScriptCharRange : public ScriptObject <ScriptCharRange>
  31. {
  32. public:
  33. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "CharRange")
  34. private:
  35. ScriptCharRange(MonoObject* instance);
  36. };
  37. /** @} */
  38. }