NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CGlBitmapFont Class Reference

Search Toolkit Book for CGlBitmapFont

#include <gui/opengl/glbitmapfont.hpp>

+ Inheritance diagram for CGlBitmapFont:
+ Collaboration diagram for CGlBitmapFont:

Public Types

enum  EFontSize {
  eFontSize_6 = 6 , eFontSize_8 = 8 , eFontSize_10 = 10 , eFontSize_12 = 12 ,
  eFontSize_14 = 14 , eFontSize_18 = 18 , eFontSize_20 = 20 , eFontSize_24 = 24
}
 
enum  EFontFace {
  eFontFace_Bitmap = 0x0100 , eFontFace_Helvetica = 0x0200 , eFontFace_Lucida = 0x0300 , eFontFace_Courier = 0x0400 ,
  eFontFace_Clean = 0x0500 , eFontFace_Fixed = 0x0600 , eFontFace_TimesRoman = 0x0700
}
 
enum  EFontRotate {
  eFontRotate_0 , eFontRotate_90_Cap , eFontRotate_90_Base , eFontRotate_180_Cap ,
  eFontRotate_180_Base , eFontRotate_270_Cap , eFontRotate_270_Base , eFontRotate_90 = eFontRotate_90_Cap ,
  eFontRotate_180 = eFontRotate_180_Cap , eFontRotate_270 = eFontRotate_270_Base
}
 
enum  EFont {
  eBitmap5x7 = eFontFace_Bitmap | 8 , eBitmap8x13 = eFontFace_Bitmap | 12 , eBitmap9x15 = eFontFace_Bitmap | 14 , eBitmap10x20 = eFontFace_Bitmap | 18 ,
  eBitmap12x24 = eFontFace_Bitmap | 24 , eHelvetica6 = eFontFace_Helvetica | 6 , eHelvetica8 = eFontFace_Helvetica | 8 , eHelvetica10 = eFontFace_Helvetica | 10 ,
  eHelvetica12 = eFontFace_Helvetica | 12 , eHelvetica14 = eFontFace_Helvetica | 14 , eHelvetica18 = eFontFace_Helvetica | 18 , eHelvetica20 = eFontFace_Helvetica | 20 ,
  eHelvetica24 = eFontFace_Helvetica | 24 , eLucida6 = eFontFace_Lucida | 6 , eLucida8 = eFontFace_Lucida | 8 , eLucida10 = eFontFace_Lucida | 10 ,
  eLucida12 = eFontFace_Lucida | 12 , eLucida14 = eFontFace_Lucida | 14 , eLucida18 = eFontFace_Lucida | 18 , eLucida20 = eFontFace_Lucida | 20 ,
  eLucida24 = eFontFace_Lucida | 24 , eCourier6 = eFontFace_Courier | 6 , eCourier8 = eFontFace_Courier | 8 , eCourier10 = eFontFace_Courier | 10 ,
  eCourier12 = eFontFace_Courier | 12 , eCourier14 = eFontFace_Courier | 14 , eCourier18 = eFontFace_Courier | 18 , eCourier20 = eFontFace_Courier | 20 ,
  eCourier24 = eFontFace_Courier | 24 , eClean6 = eFontFace_Clean | 6 , eClean8 = eFontFace_Clean | 8 , eClean10 = eFontFace_Clean | 10 ,
  eClean12 = eFontFace_Clean | 12 , eClean14 = eFontFace_Clean | 14 , eClean18 = eFontFace_Clean | 18 , eClean20 = eFontFace_Clean | 20 ,
  eClean24 = eFontFace_Clean | 24 , eFixed6 = eFontFace_Fixed | 6 , eFixed8 = eFontFace_Fixed | 8 , eFixed10 = eFontFace_Fixed | 10 ,
  eFixed12 = eFontFace_Fixed | 12 , eFixed14 = eFontFace_Fixed | 14 , eFixed18 = eFontFace_Fixed | 18 , eFixed20 = eFontFace_Fixed | 20 ,
  eFixed24 = eFontFace_Fixed | 24 , eTimesRoman6 = eFontFace_TimesRoman | 6 , eTimesRoman8 = eFontFace_TimesRoman | 8 , eTimesRoman10 = eFontFace_TimesRoman | 10 ,
  eTimesRoman12 = eFontFace_TimesRoman | 12 , eTimesRoman14 = eFontFace_TimesRoman | 14 , eTimesRoman18 = eFontFace_TimesRoman | 18 , eTimesRoman20 = eFontFace_TimesRoman | 20 ,
  eTimesRoman24 = eFontFace_TimesRoman | 24
}
 
- Public Types inherited from IGlFont
enum  ETruncate { eTruncate_None , eTruncate_Empty , eTruncate_Ellipsis }
 
enum  EMetric {
  eMetric_CharHeight , eMetric_FullCharHeight , eMetric_AvgCharWidth , eMetric_MaxCharWidth ,
  eMetric_TextWidth , eMetric_FullTextWidth , eMetric_Descender
}
 
enum  EAlignMode {
  eAlign_HorizMask = 0x000f , eAlign_Left = 0x0001 , eAlign_HCenter = 0x0002 , eAlign_Right = 0x0004 ,
  eAlign_VertMask = 0x00f0 , eAlign_Top = 0x0010 , eAlign_VCenter = 0x0020 , eAlign_Bottom = 0x0040 ,
  eAlign_Center = eAlign_HCenter | eAlign_VCenter
}
 alignment modes More...
 
typedef int TAlign
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CGlBitmapFont (void)
 
 CGlBitmapFont (EFont font)
 
CGlBitmapFontoperator= (const CGlBitmapFont &)
 
 ~CGlBitmapFont ()
 
void SetFont (EFont font)
 
EFont GetFont () const
 
void SetFontFace (EFontFace face)
 
EFontFace GetFontFace () const
 
void SetFontSize (EFontSize size)
 
EFontSize GetFontSize () const
 
void SetFontRotate (EFontRotate rot)
 
EFontRotate GetFontRotate (void) const
 
void SetCondensed (bool condensed)
 
bool IsCondensed (void) const
 
virtual void TextOut (const char *text) const
 
virtual void TextOut (TModelUnit x, TModelUnit y, const char *text) const
 
void TextOut (TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2, const char *text, TAlign align=eAlign_Center, ETruncate trunc=eTruncate_Ellipsis, TModelUnit scale_x=1.0, TModelUnit scale_y=1.0) const
 
string Truncate (const char *, TModelUnit w, ETruncate trunc=eTruncate_Ellipsis) const
 
string Truncate (const string &str, TModelUnit w, ETruncate trunc=eTruncate_Ellipsis) const
 
void ArrayTextOut (TModelUnit x, TModelUnit y, TModelUnit dx, TModelUnit dy, const char *text, const vector< CRgbaColor * > *colors=NULL, TModelUnit scale_x=1.0f, TModelUnit scale_y=1.0f) const
 prints array of characters in positions (x + i*dx, y + i*dy) where "i" is index of a character in the given string More...
 
virtual TModelUnit TextWidth (const char *text) const
 compute the length of a null-terminated string More...
 
virtual TModelUnit TextWidth (const char *text, int n) const
 
virtual TModelUnit TextHeight (void) const
 compute the height of a string More...
 
virtual TModelUnit GetFontDescender () const
 
TModelUnit GetAdvance (char c) const
 
virtual TModelUnit GetMetric (EMetric metric, const char *text_start=NULL, int len=-1) const
 
string ToString () const
 
void FromString (const string &value)
 
- Public Member Functions inherited from IGlFont
 IGlFont (void)
 
virtual ~IGlFont (void)
 
virtual bool IsBitmapFont () const
 This is needed by pdf but really on for gltexture font subclass since those may be either texture or (for clarity at small screen size) bitmap. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Static Public Member Functions

static string FaceToString (EFontFace face)
 
static EFontFace FaceFromString (const string &str)
 
static string SizeToString (EFontSize size)
 
static EFontSize SizeFromString (const string &str)
 
static EFontSize SizeFromInt (int i)
 
static void GetAllFaces (vector< string > &faces)
 
static void GetAllSizes (vector< string > &sizes)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 

Protected Member Functions

const void * GetFontPtr (const CGlBitmapFont::EFontRotate rot) const
 
const void * GetFontPtr () const
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Member Functions

int x_Truncate (const char *text, TModelUnit w, ETruncate trunc, string *str=NULL) const
 

Private Attributes

EFont m_Font
 
EFontRotate m_FontRotate
 The font - combination of face and size. More...
 
bool m_Condensed
 rotation state of the font More...
 

Additional Inherited Members

- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

Definition at line 49 of file glbitmapfont.hpp.


The documentation for this class was generated from the following files:
Modified on Mon Jul 22 05:02:10 2024 by modify_doxy.py rev. 669887