BsScriptFont.h 1.2 KB

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