Accounting Software
Small Business Software Estimating Software
Contact SoftwareInventory SoftwareInventory Tracking SoftwareInventory Management SoftwareInventory Control SoftwareCustomer Management SoftwareBusiness Management Software

Interface Preferences (Header)

Link to: source code | prefs directory

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

This class manages interface preferences for the Goldenseal accounting software,
small business management software, construction project management software and
construction estimating software.

class CInterfacePreferences : public DB_DescribedPersistent
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CInterfacePreferences; }

CInterfacePreferences();
virtual ~CInterfacePreferences() {}

virtual NeoID GetDBClassID(void) const { return id_InterfacePrefs; }
virtual NeoSize GetFileLength(const CNeoFormat *aFormat) const;

virtual void CopyFrom(DB_PersistentObject */*source*/, const UInt8 /*copyFlags*/ = 0) {}
// only one object, so we never need to copy

virtual Boolean GetMemberValue(const TagType aTag, const TagType aType,
void *aValue) const;
virtual Boolean SetMemberValue(const TagType aTag, const TagType aType,
const void *aValue);

virtual void ReadObject(CNeoStream *aStream, const TagType aTag);
virtual void WriteObject(CNeoStream *aStream, const TagType aTag);

virtual void FinishNonViewerCreate();
virtual Boolean CanImportEnum(const TagType tag, const SInt32 value) const;

virtual SInt16 GetDefaultFont() { return mDefaultFont; } // TCS 7/6/03
virtual SInt16 GetDefaultPrintFont() { return mDefaultReportFont; }

virtual Boolean NeedsName() const { return false; } // TCS 2/3/01
virtual Boolean ForbidDuplicateNames() const { return false; } // TCS 7/25/01
virtual void SaveLayoutSettings(const DBid editorID, const DBid popupValue,
const DBid layoutID, const Boolean snapToGrid,
const Boolean drawTabs);
virtual Boolean FetchLayoutSettings(const DBid editorID, DBid &popupValue,
DBid &layoutID, Boolean &snapToGrid,
Boolean &drawTabs);

virtual void FillDataReport(CTCS_Table *table, CNeoStream *stream) const;

virtual void SetEndSafetyTag() { mEndSafetyTag = tag_endsafetytag; }

protected:
// array members
TLayoutSettingsArray mLayoutSettingsArray;
// string members
CTextString mCreatorName, // reserved for future password access etc
mValidationString;

// copied data members (we never actually copy, but these are
// separated since there are so many items below)
UInt8 mBillingStartValue,
mJobCostStartFilter,
mJobCostStartDetails,
mDepositBankClass,
mPayrollBankClass,
mPayBillsBankClass,
mPayrollCheckbook,
mPayBillsCheckbook,
mDepositStartFilter,
mEnum10,
mEnum11,
mEnum12,
mEnum13,
mEnum14,
mEnum15,
mEnum16,
mEnum17,
mEnum18,
mEnum19;
// *** NEVER insert members before this bitfield!!!
UInt8 mWarnMissingCalculators:1, // TCS 10/28/02
mAskBeforeAccountChange:1, // TCS 2/5/03
mUseCustomDimensions:1, // TCS 3/10/03
mSortCategoryNames:1, // TCS 7/19/03
mEnum20:4; // default is false

UInt16 mActionTablePrintRows, // TCS 4/10/01 rev 3/23/02
mDefaultFont, // TCS 10/18/02
mDefaultReportFont, // TCS 10/29/02
mShort4;

SInt32 mOverdueCutoff, // TCS 1/1/01
mOverdueCutoff2,
mOverdueCutoff3,
mDepositBankAccount,
mPayrollBankAccount,
mPayBillsBankAccount,
mLong7,
mLong8,
mLong9,
mLong10,
mLong11,
mLong12,
mLong13,
mLong14,
mLong15,
mLong16;

// *** NEVER insert members before this bitfield!!!
UInt8 mPrintInColor:1, // default is false
mAskBeforeTransChange:1, // TCS 2/25/00 moved 1/1/01
mOpenToEmpty:1, // TCS 3/30/00 moved 1/1/01
mShowReminderAlerts:1, // TCS 2/3/01
mStartProjectBillsChecked:1,
mUseRequiredFields:1,
mWarnOfLowMemory:1, // TCS 9/10/01
mAllowListDeletion:1;

// *** NEVER insert members before this bitfield!!!
UInt8 mPlaySounds:1, // default is true
mShowWatermark:1,
mWarnOfUnfinished:1, // TCS 2/2/01
mShowHelpText:1,
mStartPayBillsChecked:1,
mStartPayrollChecked:1,
mStartSaleBillsChecked:1,
mBoolean16:1;

// calculated members
TagType mEndSafetyTag; // TCS 9/8/02

enum
{
cCopyFileLength = 0,

cFileLength = cCopyFileLength +
20*sizeof(UInt8) +
4*sizeof(UInt16) +
16*sizeof(SInt32) +
2*sizeof(UInt8) +
sizeof(TagType)
};
};