BsScriptFont.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /**
  11. * @brief Interop class between C++ & CLR for Font.
  12. */
  13. class BS_SCR_BE_EXPORT ScriptFont : public TScriptResource<ScriptFont, Font>
  14. {
  15. public:
  16. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Font")
  17. private:
  18. friend class ScriptResourceManager;
  19. ScriptFont(MonoObject* instance, const HFont& font);
  20. /**
  21. * @brief Creates an empty, uninitialized managed instance of the resource interop object.
  22. */
  23. static MonoObject* createInstance();
  24. /************************************************************************/
  25. /* CLR HOOKS */
  26. /************************************************************************/
  27. static MonoObject* internal_GetBitmap(ScriptFont* instance, int size);
  28. static int internal_GetClosestSize(ScriptFont* instance, int size);
  29. };
  30. /**
  31. * @brief Interop class between C++ & CLR for CharRange.
  32. */
  33. class BS_SCR_BE_EXPORT ScriptCharRange : public ScriptObject <ScriptCharRange>
  34. {
  35. public:
  36. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "CharRange")
  37. private:
  38. ScriptCharRange(MonoObject* instance);
  39. };
  40. }