statline.cpp File Reference

(r1785/r1404)

#include "camtypes.h"
#include "csrstack.h"
#include "camelot.h"
#include "statline.h"
#include "optsmsgs.h"
#include "ccolbar.h"
#include "basebar.h"
#include "colpick.h"
#include "rulers.h"
#include "colcontx.h"
#include "colormgr.h"
#include "opimgset.h"
#include "camview.h"
#include "prncamvw.h"

Go to the source code of this file.

Defines

#define new   CAM_DEBUG_NEW

Functions

 DECLARE_SOURCE ("$Revision: 1404 $")
 CC_IMPLEMENT_DYNCREATE (StatusLine, StandardBar)
BOOL SafeAppendString (StringBase *, const StringBase &, BOOL=TRUE)
 update the status line with the given text, prefixed with the selection description (if valid to do so)

Variables

const String_8 SelDescSuffix (_T(":: "))
const String_8 TruncChar (_T(";"))
const INT32 TextDelay = 1000
const INT32 RenderDelay = 200
static UINT32 RenderAnimation [] = { _R(IDB_SL_REND1), _R(IDB_SL_REND2), _R(IDB_SL_REND3) }


Define Documentation

#define new   CAM_DEBUG_NEW
 

Definition at line 138 of file statline.cpp.


Function Documentation

CC_IMPLEMENT_DYNCREATE StatusLine  ,
StandardBar 
 

DECLARE_SOURCE "$Revision: 1404 $"   ) 
 

BOOL SafeAppendString StringBase pstrAppendum,
const StringBase strAppendee,
BOOL  fAddSep = TRUE
 

update the status line with the given text, prefixed with the selection description (if valid to do so)

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/7/95
Parameters:
pstrAppendum pointer to the string to append to [INPUTS] strAppendee the string to append fAddSep if TRUE (the default) will append a space after strAppendee string.
pstrAppendum the appended string [OUTPUTS]
Returns:
TRUE if it was trivial to append, FALSE if the string to be appended had to be truncated.
See also:
SelRange::LayerDescription

Definition at line 5070 of file range.cpp.

05071 {
05072     INT32 nTotal = pstrAppendum->Length() + strAppendee.Length() + (fAddSep != 0);
05073     INT32 nMax = pstrAppendum->MaxLength();
05074     BOOL fNoTrunc= (nTotal < nMax);
05075     if (fNoTrunc)
05076     {
05077         // We can append without fear of overflow . . .
05078         *pstrAppendum += strAppendee;
05079         if (fAddSep) *pstrAppendum += TEXT(" ");
05080     }
05081     else
05082     {
05083         // We have to truncate the string to append, to avoid overflow . . .
05084         INT32 nTruncCount = strAppendee.Length() - (nTotal - nMax);
05085         if (nTruncCount > 0)
05086         {
05087             // We have some room for more text, so append the truncated string.
05088             String_256 strTrunc;
05089             strAppendee.Left(&strTrunc, nTruncCount);
05090             *pstrAppendum += strTrunc;
05091             if (fAddSep) *pstrAppendum += TEXT(" ");
05092         }
05093     }
05094 
05095     // Return FALSE if we had to truncate.
05096     return fNoTrunc;
05097 }


Variable Documentation

UINT32 RenderAnimation[] = { _R(IDB_SL_REND1), _R(IDB_SL_REND2), _R(IDB_SL_REND3) } [static]
 

Definition at line 154 of file statline.cpp.

const INT32 RenderDelay = 200
 

Definition at line 144 of file statline.cpp.

const String_8 SelDescSuffix(_T(":: "))
 

const INT32 TextDelay = 1000
 

Definition at line 143 of file statline.cpp.

const String_8 TruncChar(_T(";"))
 


Generated on Sat Nov 10 03:49:21 2007 for Camelot by  doxygen 1.4.4