Accounting Software
Small Business Software Estimating Software
Project Management SoftwareProject Estimating SoftwareProject Tracking SoftwareInventory Tracking SoftwareCustomer Tracking SoftwareCustomer Management SoftwareBusiness Management Software

Text Info (Header)

Link to: source code | other interface directory

Copyright Turtle Creek Software 1996-2006. All Rights Reserved.

This class manages text info in the
Goldenseal small business accounting software,
project management software, construction accounting software
and construction software.

class CTCS_TextInfo
{
public:

static CTCS_TextInfo sDefaultTextInfo,
sSystemTextInfo,
sFieldTitleTextInfo; // TCS 8/13/00
static void SetPortTextInfo(const CTCS_TextInfo &inTextInfo);

static char SysJustToTCSJust(const SInt32 just);
static SInt32 TCSJustToSysJust(const char just);
static char SysStyleToTCSStyle(const SInt32 just);
static SInt32 TCSStyleToSysStyle(const char just);

static SInt16 GetDefaultFont(const Boolean isPrinting = false);

static void UpdateSysTextHandle(const CTCS_TextInfo &textInfo,
TCS_Handle sysTextH);

// construction/destruction
CTCS_TextInfo();
CTCS_TextInfo(const SInt16 font, const ColorIndexT inColor,
const char fontSize, const char fontJust, const char fontStyle);
CTCS_TextInfo(const CTCS_TextInfo &src) { *this = src; };
~CTCS_TextInfo() {};

// operator overloads

CTCS_TextInfo& operator=(const CTCS_TextInfo &inTextInfo);

void SetTextFont(const SInt16 font) // renamed most of these TCS 12/17/00
{ mFont = font; };
void SetTextSize(const char fontSize)
{ mSize = fontSize; };
void SetTextJust(const char fontJust);
void AssignTextStyle(const char fontStyle);
void ToggleTextStyle(const char fontStyle);
void SetTextStyle(const char fontStyle, const Boolean inValue = true);
void SetTextColor(const ColorIndexT inColor)
{ mColorIndex = inColor; };

// accessors/setters

SInt16 GetDisplayTextFont() const;
inline SInt16 GetTextFont() const { return mFont; };
inline ColorIndexT GetTextColor() const
{ return mColorIndex; };
inline char GetTextSize() const { return mSize; };
inline char GetTextJust() const { return mJustification; };
char GetTETextJust() const;
char GetHorizontalJust() const;
inline char GetTextStyle() const { return mStyle; };

void Assign(const SInt16 font, const ColorIndexT inColor,
const char fontSize, const char fontJust,
const char fontStyle)
{
SetTextFont(font);
SetTextColor(inColor);
SetTextSize(fontSize);
SetTextJust(fontJust);
AssignTextStyle(fontStyle);
};

void AssignFromTXTR(const ResIDT textTraitsID);

protected:

SInt16 mFont;
ColorIndexT mColorIndex;
char mSize,
mJustification,
mStyle;
};