OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Derived from TFont, TGadgetWindowFont is the default font used by TGadgetWindow. More...
#include <owl/gadgetwi.h>
Public Member Functions | |
TGadgetWindowFont () | |
Constructs a font based on TDefaultGuiFont. | |
TGadgetWindowFont (int pointSize, bool bold=false, bool italic=false) | |
Constructs a font with the given size, boldness and italics style. | |
Public Member Functions inherited from owl::TFont | |
TFont (HFONT handle, TAutoDelete autoDelete=NoAutoDelete) | |
TFont encapsulates an HFONT. | |
TFont (const tstring &facename=tstring(), int height=0, int width=0, int escapement=0, int orientation=0, int weight=FW_NORMAL, uint8 pitchAndFamily=DEFAULT_PITCH|FF_DONTCARE, uint8 italic=false, uint8 underline=false, uint8 strikeout=false, uint8 charSet=1, uint8 outputPrecision=OUT_DEFAULT_PRECIS, uint8 clipPrecision=CLIP_DEFAULT_PRECIS, uint8 quality=DEFAULT_QUALITY) | |
Creates a TFont object with the given values. | |
TFont (int height, int width, int escapement=0, int orientation=0, int weight=FW_NORMAL, uint8 italic=false, uint8 underline=false, uint8 strikeout=false, uint8 charSet=1, uint8 outputPrecision=OUT_DEFAULT_PRECIS, uint8 clipPrecision=CLIP_DEFAULT_PRECIS, uint8 quality=DEFAULT_QUALITY, uint8 pitchAndFamily=DEFAULT_PITCH|FF_DONTCARE, const tstring &facename=tstring()) | |
Creates a TFont object with the given values. | |
TFont (const LOGFONT &logFont) | |
Creates a TFont object from the given LOGFONT. | |
TFont (const TFont &src) | |
Creates an object that shares the source object's font handle. | |
HFONT | GetHandle () const |
Returns the handle of the font with type HFONT. | |
operator HFONT () const | |
Typecasting operator that converts this font's Handle to type HFONT (the data type representing the handle to a physical font). | |
operator LOGFONT () const | |
TEXTMETRIC | GetTextMetrics (TDC &dc) const |
Retrieves information about this font when selected in the specified dc. | |
void | GetTextMetrics (TEXTMETRIC &tm, TDC &dc) const |
Retrieves information about this font when selected in the specified dc. | |
TEXTMETRIC | GetTextMetrics () const |
Retrieves information about this font when selected in a screen DC. | |
void | GetTextMetrics (TEXTMETRIC &tm) const |
Retrieves information about this font when selected in a screen DC. | |
int | GetHeight () const |
Returns the height of the font. | |
int | GetHeight (TDC &dc) const |
Returns the height of the font if selected into the DC. | |
int | GetAveWidth () const |
Returns the average width of the characters in the font. | |
int | GetAveWidth (TDC &dc) const |
Returns the average width of the characters in the font if selected into the DC. | |
int | GetMaxWidth () const |
Returns the maximum width of the characters in the font. | |
int | GetMaxWidth (TDC &dc) const |
Returns the maximum width of the characters in the font if selected into the DC. | |
TSize | GetTextExtent (const tstring &text) const |
Returns the extent of a given string using this particular font. | |
TSize | GetTextExtent (TDC &dc, const tstring &text) const |
Returns the extent of a given string using this particular font in a particular DC. | |
tstring | GetFaceName () const |
Returns the font's name. | |
uint8 | GetPitchAndFamily () const |
Returns the pitch and family flags for this logical font. | |
LOGFONT | GetObject () const |
Returns information about this font object. | |
Public Member Functions inherited from owl::TGdiObject | |
~TGdiObject () | |
Decrement the reference count on this object. | |
HGDIOBJ | GetGdiHandle () const |
Returns the handle of the GDI object. | |
operator HGDIOBJ () const | |
Typecasting operator that converts this GDI object handle to type HGDIOBJ. | |
int | GetObject (int count, void *object) const |
Retrieve the object's attributes into a buffer. | |
bool | operator== (const TGdiObject &other) const |
Returns true if the handles are equal. This is a binary compare. | |
bool | operator< (const TGdiObject &other) const |
not implemented just to make happy STL | |
bool | IsGDIObject () const |
Returns true if this represents a real GDI object. | |
uint32 | GetObjectType () const |
Returns the type of the GDI object. | |
auto | IsHandleOwner () const -> bool |
Returns true if handle lifetime is managed. | |
Additional Inherited Members | |
Public Types inherited from owl::TFont | |
typedef HFONT | THandle |
Public Types inherited from owl::TGdiObject | |
enum | TType { None , Pen , Brush , Font , Palette , Bitmap , TextBrush } |
This enumeration is used to store the object type in the struct TObjInfo. More... | |
typedef HGDIOBJ | THandle |
TGdiObject encapsulates an HGDIOBJ. | |
Static Public Member Functions inherited from owl::TGdiObject | |
static TObjInfo * | RefFind (HANDLE object) |
Searches for the given object handle. | |
static void | RefAdd (HANDLE handle, TType type) |
RefAdd adds a reference entry for the object with the given handle and type. | |
static void | RefRemove (HANDLE handle) |
Removes the reference entry to the object with the given handle. | |
static void | RefInc (HANDLE handle) |
Increments by 1 the reference count of the object associated with the given handle. | |
static void | RefDec (HANDLE handle, bool wantDelete) |
Decrements this object's reference count by 1 and deletes the object when the reference count reaches zero. | |
static int | RefCount (HANDLE handle) |
Returns this object's current reference count or -1 if the object is not found. | |
Protected Member Functions inherited from owl::TGdiObject | |
TGdiObject () | |
This default constructor sets Handle to 0 and ShouldDelete to true. | |
TGdiObject (HANDLE handle, TAutoDelete autoDelete=NoAutoDelete) | |
Create a wrapper for a given GDI object. | |
void | CheckValid (uint resId=IDS_GDIFAILURE) |
Static Protected Member Functions inherited from owl::TGdiObject | |
static void | _CheckValid (HANDLE handle, uint resId=IDS_GDIFAILURE) |
Protected Attributes inherited from owl::TGdiObject | |
HANDLE | Handle |
GDI handle of this object. | |
bool | ShouldDelete |
Should object delete GDI handle in dtor? | |
Derived from TFont, TGadgetWindowFont is the default font used by TGadgetWindow.
The font is based on TDefaultGuiFont, but you can specify the point size, boldness and italics style in the constructor.
Definition at line 92 of file gadgetwi.h.
owl::TGadgetWindowFont::TGadgetWindowFont | ( | ) |
Constructs a font based on TDefaultGuiFont.
Definition at line 79 of file gadgetwi.cpp.
|
explicit |
Constructs a font with the given size, boldness and italics style.
Note that the size should be given in points, not pixels. The font is based on the system font encapsulated by TDefaultGuiFont.
Definition at line 88 of file gadgetwi.cpp.