BsScriptFont.h 1.5 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 bs
  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. friend class BuiltinResourceTypes;
  23. ScriptFont(MonoObject* instance, const HFont& font);
  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. /** Interop class between C++ & CLR for CharRange. */
  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. /** @} */
  39. }