mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
parent
094960e386
commit
39eceedd89
1 changed files with 38 additions and 10 deletions
|
@ -650,30 +650,51 @@ class FontCollection : public GdiplusBase
|
||||||
friend class FontFamily;
|
friend class FontFamily;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FontCollection()
|
FontCollection() : nativeFontCollection(NULL), lastStatus(Ok)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~FontCollection()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
GetFamilies(INT numSought, FontFamily *gpfamilies, INT *numFound) const
|
GetFamilies(INT numSought, FontFamily *gpfamilies, INT *numFound) const
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(NotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
INT
|
INT
|
||||||
GetFamilyCount() const
|
GetFamilyCount() const
|
||||||
{
|
{
|
||||||
return 0;
|
INT numFound = 0;
|
||||||
|
lastStatus = DllExports::GdipGetFontCollectionFamilyCount(nativeFontCollection, &numFound);
|
||||||
|
return numFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
GetLastStatus()
|
GetLastStatus() const
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return lastStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
GpFontCollection *nativeFontCollection;
|
||||||
|
mutable Status lastStatus;
|
||||||
|
|
||||||
|
Status
|
||||||
|
SetStatus(Status status) const
|
||||||
|
{
|
||||||
|
if (status != Ok)
|
||||||
|
lastStatus = status;
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GpFontCollection *fontCollection;
|
// FontCollection is not copyable
|
||||||
|
FontCollection(const FontCollection &);
|
||||||
|
FontCollection &
|
||||||
|
operator=(const FontCollection &);
|
||||||
};
|
};
|
||||||
|
|
||||||
class FontFamily : public GdiplusBase
|
class FontFamily : public GdiplusBase
|
||||||
|
@ -687,8 +708,8 @@ class FontFamily : public GdiplusBase
|
||||||
|
|
||||||
FontFamily(const WCHAR *name, const FontCollection *fontCollection)
|
FontFamily(const WCHAR *name, const FontCollection *fontCollection)
|
||||||
{
|
{
|
||||||
status = DllExports::GdipCreateFontFamilyFromName(
|
GpFontCollection *theCollection = fontCollection ? fontCollection->nativeFontCollection : NULL;
|
||||||
name, fontCollection ? fontCollection->fontCollection : NULL, &fontFamily);
|
status = DllExports::GdipCreateFontFamilyFromName(name, theCollection, &fontFamily);
|
||||||
}
|
}
|
||||||
|
|
||||||
FontFamily *
|
FontFamily *
|
||||||
|
@ -809,18 +830,25 @@ class PrivateFontCollection : public FontCollection
|
||||||
public:
|
public:
|
||||||
PrivateFontCollection()
|
PrivateFontCollection()
|
||||||
{
|
{
|
||||||
|
nativeFontCollection = NULL;
|
||||||
|
lastStatus = DllExports::GdipNewPrivateFontCollection(&nativeFontCollection);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~PrivateFontCollection()
|
||||||
|
{
|
||||||
|
DllExports::GdipDeletePrivateFontCollection(&nativeFontCollection);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
AddFontFile(const WCHAR *filename)
|
AddFontFile(const WCHAR *filename)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipPrivateAddFontFile(nativeFontCollection, filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
AddMemoryFont(const VOID *memory, INT length)
|
AddMemoryFont(const VOID *memory, INT length)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipPrivateAddMemoryFont(nativeFontCollection, memory, length));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue