Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdFontServices.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
11namespace Teigha.Core {
12
13using System;
14using System.Runtime.InteropServices;
15
16public class OdFontServices : OdRxObject {
17 private Object locker = new Object();
18 private HandleRef swigCPtr;
19 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
20 public OdFontServices(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdFontServices_SWIGUpcast(cPtr), cMemoryOwn) {
21 swigCPtr = new HandleRef(this, cPtr);
22 }
23
24 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
25 public static HandleRef getCPtr(OdFontServices obj) {
26 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
27 }
28
29 protected override void Dispose(bool disposing) {
30 lock(this) {
31 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
32 if (swigCMemOwn) {
33 swigCMemOwn = false;
35 }
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37 }
38 base.Dispose(disposing);
39 }
40 }
41
42 public static OdFontServices cast(OdRxObject pObj) {// OdSmartPtr<OdFontServices>
43 MemoryManager mMan = MemoryManager.GetMemoryManager();
44 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
46
47 OdFontServices ret = null;
48 if (null != mTrans)
49 {
50 mTrans.AddObject((OdFontServices)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFontServices),ptr, true));
51 ret = (OdFontServices)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFontServices),ptr, false);
52 }
53 else
54 {
55 ret = (OdFontServices)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFontServices),ptr, true);
56 }
57
59 return ret;
60}
61
62 public new static OdRxClass desc() {
63 OdRxClass ret = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxClass),GlobalsPINVOKE.OdFontServices_desc(),false); /*createInt 3_2*/
64
66 return ret;
67}
68
69 public override OdRxClass isA() {
70 OdRxClass ret = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxClass),GlobalsPINVOKE.OdFontServices_isA(swigCPtr),false); /*createInt 3_2*/
71
73 return ret;
74}
75
76 public override OdRxObject queryX(OdRxClass protocolClass) {
77 OdRxObject ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),GlobalsPINVOKE.OdFontServices_queryX(swigCPtr, OdRxClass.getCPtr(protocolClass)),false); /*createInt 3_2*/
78
80 return ret;
81}
82
83 public static OdFontServices createObject() {// OdSmartPtr<OdFontServices>
84 MemoryManager mMan = MemoryManager.GetMemoryManager();
85 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
87
88 OdFontServices ret = null;
89 if (null != mTrans)
90 {
91 mTrans.AddObject((OdFontServices)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFontServices),ptr, true));
92 ret = (OdFontServices)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFontServices),ptr, false);
93 }
94 else
95 {
96 ret = (OdFontServices)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFontServices),ptr, true);
97 }
98
100 return ret;
101}
102
103 public virtual void loadStyleRec(OdGiTextStyle textStyle, OdRxObject pDb) {
106 }
107
108 public virtual String getFontFilePath(OdGiTextStyle textStyle, OdRxObject pDb) {
109 string ret = GlobalsPINVOKE.OdFontServices_getFontFilePath(swigCPtr, OdGiTextStyle.getCPtr(textStyle).Handle, OdRxObject.getCPtr(pDb));
111 return ret;
112}
113
114 public virtual String getBigFontFilePath(OdGiTextStyle textStyle, OdRxObject pDb) {
115 string ret = GlobalsPINVOKE.OdFontServices_getBigFontFilePath(swigCPtr, OdGiTextStyle.getCPtr(textStyle).Handle, OdRxObject.getCPtr(pDb));
117 return ret;
118}
119
120 public virtual OdFont defaultFont() {// OdFontPtr
121 MemoryManager mMan = MemoryManager.GetMemoryManager();
122 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
123 IntPtr ptr = GlobalsPINVOKE.OdFontServices_defaultFont(swigCPtr);
124
125 OdFont ret = null;
126 if (null != mTrans)
127 {
128 mTrans.AddObject((OdFont)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFont),ptr, true));
129 ret = (OdFont)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFont),ptr, false);
130 }
131 else
132 {
133 ret = (OdFont)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdFont),ptr, true);
134 }
135
137 return ret;
138}
139
140 public virtual bool getTTFParamFromFile(String fileName, OdTtfDescriptor descr) {
141 bool ret = GlobalsPINVOKE.OdFontServices_getTTFParamFromFile(swigCPtr, fileName, OdTtfDescriptor.getCPtr(descr));
143 return ret;
144 }
145
146 public virtual bool ttfFileNameByDescriptor(OdTtfDescriptor descr, ref string fileName, OdDbBaseHostAppServices pHost) {
147IntPtr tmp_fileName = Marshal.StringToCoTaskMemUni(fileName);
148 IntPtr saved_fileName = tmp_fileName;
149 try {
152 return ret;
153 } finally {
154if (tmp_fileName != saved_fileName) fileName = Marshal.PtrToStringUni(tmp_fileName);
155 }
156 }
157
161 return ret;
162 }
163
164 public virtual void collectFilePathsInDirectory(OdStringArray res, String sPath, String sFilter) {
167 }
168
169 public virtual void collectFilePathsInDirectory(OdStringArray res, String sPath) {
172 }
173
174 public virtual String iFindFile(String file, OdDbBaseHostAppServices pHostApp) {
175 string ret = GlobalsPINVOKE.OdFontServices_iFindFile(swigCPtr, file, OdDbBaseHostAppServices.getCPtr(pHostApp));
177 return ret;
178}
179
180 protected static string getRealClassName(IntPtr /*SIMPLETYPE*/ ptr) {
181 string ret = GlobalsPINVOKE.OdFontServices_getRealClassName(ptr /*SIMPLETYPE*/);
183 return ret;
184 }
185
186}
187
188}
static global::System.Exception Retrieve()
static IntPtr OdFontServices_queryX(HandleRef jarg1, HandleRef jarg2)
static IntPtr OdFontServices_isA(HandleRef jarg1)
static IntPtr OdFontServices_createObject()
static string OdFontServices_getRealClassName(IntPtr jarg1)
static bool OdFontServices_ttfFileNameByDescriptor(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, ref IntPtr jarg3, HandleRef jarg4)
static void OdFontServices_collectFilePathsInDirectory__SWIG_1(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, [MarshalAs(UnmanagedType.LPWStr)]String jarg3)
static String OdFontServices_iFindFile(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2, HandleRef jarg3)
static void OdFontServices_loadStyleRec(HandleRef jarg1, IntPtr jarg2, HandleRef jarg3)
static String OdFontServices_getFontFilePath(HandleRef jarg1, IntPtr jarg2, HandleRef jarg3)
static String OdFontServices_getBigFontFilePath(HandleRef jarg1, IntPtr jarg2, HandleRef jarg3)
static bool OdFontServices_getTTFParamFromFile(HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static IntPtr OdFontServices_defaultFont(HandleRef jarg1)
static IntPtr OdFontServices_cast(HandleRef jarg1)
static IntPtr OdFontServices_desc()
static void OdFontServices_collectFilePathsInDirectory__SWIG_0(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, [MarshalAs(UnmanagedType.LPWStr)]String jarg3, [MarshalAs(UnmanagedType.LPWStr)]String jarg4)
static void delete_OdFontServices(HandleRef jarg1)
static bool OdFontServices_getSystemFontFolders(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, HandleRef jarg3)
static HandleRef getCPtr(OdDbBaseHostAppServices obj)
static new OdRxClass desc()
static OdFontServices cast(OdRxObject pObj)
virtual bool ttfFileNameByDescriptor(OdTtfDescriptor descr, ref string fileName, OdDbBaseHostAppServices pHost)
static string getRealClassName(IntPtr ptr)
virtual OdFont defaultFont()
virtual void collectFilePathsInDirectory(OdStringArray res, String sPath)
override void Dispose(bool disposing)
virtual void loadStyleRec(OdGiTextStyle textStyle, OdRxObject pDb)
virtual String getFontFilePath(OdGiTextStyle textStyle, OdRxObject pDb)
static OdFontServices createObject()
virtual void collectFilePathsInDirectory(OdStringArray res, String sPath, String sFilter)
static HandleRef getCPtr(OdFontServices obj)
override OdRxObject queryX(OdRxClass protocolClass)
virtual String getBigFontFilePath(OdGiTextStyle textStyle, OdRxObject pDb)
virtual bool getTTFParamFromFile(String fileName, OdTtfDescriptor descr)
override OdRxClass isA()
OdFontServices(IntPtr cPtr, bool cMemoryOwn)
virtual String iFindFile(String file, OdDbBaseHostAppServices pHostApp)
virtual bool getSystemFontFolders(OdStringArray aDirs, OdDbBaseHostAppServices pHost)
static HandleRef getCPtr(OdGiTextStyle obj)
static HandleRef getCPtr(OdRxClass obj)
Definition: OdRxClass.cs:25
static HandleRef getCPtr(OdRxObject obj)
Definition: OdRxObject.cs:26
static HandleRef getCPtr(OdStringArray obj)
static HandleRef getCPtr(OdTtfDescriptor obj)