Public Member Functions | |
CBofText (const CBofRect *pRect, int nJustify=0, uint32 nFormatFlags=((0x00000000|0x00000000)|0x00000010)) | |
ErrorCode | setupText (const CBofRect *pRect, int nJustify=0, uint32 nFormatFlags=((0x00000000|0x00000000)|0x00000010)) |
ErrorCode | setupTextOpt (const CBofRect *pRect, int nJustify=0, uint32 nFormatFlags=((0x00000000|0x00000000)|0x00000010)) |
void | setText (const CBofString &cString) |
void | setColor (const RGBCOLOR cColor) |
void | SetSize (const int nSize) |
void | setWeight (const int nWeight) |
void | setShadowColor (const RGBCOLOR cColor) |
void | setShadowSize (int nDX, int nDY) |
CBofString | getText () const |
RGBCOLOR | getColor () const |
int | getSize () const |
int | getWeight () const |
ErrorCode | erase (CBofWindow *pWnd) |
ErrorCode | erase (CBofBitmap *pBmp) |
ErrorCode | display (CBofWindow *pWnd) |
ErrorCode | display (CBofBitmap *pBmp) |
ErrorCode | display (CBofWindow *pWnd, const char *pszText, int nSize, int nWeight, RGBCOLOR cColor=RGB(0, 0, 0), int nFont=0) |
ErrorCode | display (CBofBitmap *pBmp, const char *pszText, int nSize, int nWeight, RGBCOLOR cColor=RGB(0, 0, 0), int nFont=0) |
ErrorCode | displayShadowed (CBofWindow *pWnd, const char *pszText, int nSize, int nWeight, RGBCOLOR cColor, RGBCOLOR cShadow=RGB(0, 0, 0), int nDX=2, int nDY=2, int nFont=0) |
void | flushBackground () |
ErrorCode | displayTextEx (CBofBitmap *pBmp, const char *pszText, CBofRect *pRect, int nSize, int nWeight, bool bShadowed, int nFont=0) |
Public Member Functions inherited from Bagel::CBofError | |
void | reportError (ErrorCode errCode, const char *format,...) |
bool | errorOccurred () const |
ErrorCode | getErrorCode () const |
void | clearError () |
Static Public Member Functions | |
static ErrorCode | initialize () |
static ErrorCode | shutdown () |
static Graphics::Font * | getFont (int nFont, int nSize, int nWeight) |
Static Public Member Functions inherited from Bagel::CBofObject | |
static bool | isValidObject (const CBofObject *pObject) |
Static Public Member Functions inherited from Bagel::CBofError | |
static void | fatalError (ErrorCode errCode, const char *format,...) |
static void | initialize () |
static int | getErrorCount () |
Protected Attributes | |
CBofString | _cCurString |
CBofRect | _cRect |
CBofPoint | _cPosition |
CBofSize | _cSize |
RGBCOLOR | _cTextColor |
RGBCOLOR | _cShadowColor |
CBofBitmap * | _pBackground |
CBofBitmap * | _pWork |
int | _nCurSize |
int | _nCurWeight |
int | _nJustify |
int | _nShadow_DX |
int | _nShadow_DY |
uint32 | _nFormatFlags |
bool | _bMultiLine |
bool | _bSaved |
Protected Attributes inherited from Bagel::CBofError | |
ErrorCode | _errCode |
Static Protected Attributes | |
static Graphics::Font * | _defaultFonts [32] |
static Graphics::Font * | _fixedFonts [32] |
static bool | _initialized |
static int | _tabStop |
Static Protected Attributes inherited from Bagel::CBofError | |
static int | _count |
Additional Inherited Members | |
Protected Member Functions inherited from Bagel::CBofError | |
virtual void | bofMessageBox (const Common::String &content, const Common::String &title) |
ErrorCode Bagel::CBofText::setupText | ( | const CBofRect * | pRect, |
int | nJustify = 0 , |
||
uint32 | nFormatFlags = ((0x00000000|0x00000000)|0x00000010) |
||
) |
Build primary data objects and work areas; text will be displayed centered within the defined rectangular area, hence it is up to the caller to ensure that the text fits (excess is cropped).
pRect | Rectangular area encompassed by the text object |
nJustify | Alignment of text in the rectangle |
nFormatFlags | Format flag |
ErrorCode Bagel::CBofText::erase | ( | CBofWindow * | pWnd | ) |
Restores the background behind current text on screen
pWnd | Window to erase text from |
ErrorCode Bagel::CBofText::erase | ( | CBofBitmap * | pBmp | ) |
Restores the background behind current text offscreen
pBmp | Offscreen bitmap to erase text from |
ErrorCode Bagel::CBofText::display | ( | CBofWindow * | pWnd | ) |
Re-displays current text, formatted with current attribs
pWnd | Window to paint into |
ErrorCode Bagel::CBofText::display | ( | CBofBitmap * | pBmp | ) |
Re-displays current text, formatted with current attribs
pBmp | Bitmap to paint into |
ErrorCode Bagel::CBofText::display | ( | CBofWindow * | pWnd, |
const char * | pszText, | ||
int | nSize, | ||
int | nWeight, | ||
RGBCOLOR | cColor = RGB(0, 0, 0) , |
||
int | nFont = 0 |
||
) |
Display a text string, formatted in the current text area
pWnd | Window to paint into |
pszText | Point to text string to be displayed |
nSize | Point size of the text to be used |
nWeight | Weighting of the font (FW_ identifier) |
cColor | Color that the text will be |
nFont | Font used (default or mono) |
ErrorCode Bagel::CBofText::display | ( | CBofBitmap * | pBmp, |
const char * | pszText, | ||
int | nSize, | ||
int | nWeight, | ||
RGBCOLOR | cColor = RGB(0, 0, 0) , |
||
int | nFont = 0 |
||
) |
Display a text string, formatted in the current text area
pBmp | Bitmap to paint into |
pszText | Point to text string to be displayed |
nSize | Point size of the text to be used |
nWeight | Weighting of the font (FW_ identifier) |
cColor | Color that the text will be |
nFont | Font used (default or mono) |
ErrorCode Bagel::CBofText::displayShadowed | ( | CBofWindow * | pWnd, |
const char * | pszText, | ||
int | nSize, | ||
int | nWeight, | ||
RGBCOLOR | cColor, | ||
RGBCOLOR | cShadow = RGB(0, 0, 0) , |
||
int | nDX = 2 , |
||
int | nDY = 2 , |
||
int | nFont = 0 |
||
) |
Display a shadowed text string into the current text area
pWnd | Window to paint into |
pszText | Point to text string to be displayed |
nSize | Point size of the text to be used |
nWeight | Weighting of the font (FW_ identifier) |
cColor | Color that the text will be |
cShadow | Color that the text's shadow will be |
nDX | Shadow DX |
nDY | Shadow DY |
nFont | Font used (default or mono) |
ErrorCode Bagel::CBofText::displayTextEx | ( | CBofBitmap * | pBmp, |
const char * | pszText, | ||
CBofRect * | pRect, | ||
int | nSize, | ||
int | nWeight, | ||
bool | bShadowed, | ||
int | nFont = 0 |
||
) |
Displays specified text onto specified bitmap
pBmp | Bitmap to paint text onto |
pszText | Pointer to text string to be displayed |
pRect | Area to paint text to |
nSize | Point size of the text to be used |
nWeight | Weighting of the font (FW_ identifier) |
bShadowed | Whether the text is shadowed |
nFont | Font used (default or mono) |