#include "camtypes.h"
#include "toollist.h"
#include "attrappl.h"
#include "optsmsgs.h"
#include "qualattr.h"
#include "nodetext.h"
#include "helpuser.h"
#include "filltool.h"
#include "ndoptmz.h"
#include "colormgr.h"
#include "attrmap.h"
#include "isetattr.h"
#include "strkattr.h"
#include "unicdman.h"
#include "fontman.h"
#include "userattr.h"
#include "webattr.h"
#include "nodeshad.h"
#include "attrbev.h"
#include "brshattr.h"
#include "fthrattr.h"
#include "clipattr.h"
#include "lineattr.h"
#include "coldlog.h"
#include "cxftags.h"
#include "ophist.h"
Go to the source code of this file.
Defines | |
#define | COL_ACCURACY (0.001) |
Used in initialisation of default attributes, and when ensuring no current attributes use deleted colour(s), to find a suitable default colour to use. Two default colours are currently provided, accessed by passing in NameResID of _R(IDS_WHITENAME), _R(IDS_BLACKNAME), in order to get the default white or black colour respectively. | |
#define | TSIZE(C) (AttributeTableSize * sizeof(C)) |
Functions | |
DECLARE_SOURCE ("$Revision: 1445 $") | |
CC_IMPLEMENT_DYNAMIC (CurrentAttrChangedMsg, Msg) const INT32 AttributeTableGranularity | |
static BOOL | UpdateDeletedColour (ColourList *ColList, DocColour *TheColour, IndexedColour **NewDefault) |
static function called by UpdateForDeletedColours. Ensures that the given DocColour is a safe colour to use (does not reference a deleted IndexedColour). If it needs to be fixed, a default colour will be found (or created if necessary) in the given colour list and the colour will be made to reference the new default. | |
Variables | |
static BOOL | UseLastAttrApplied = FALSE |
|
Used in initialisation of default attributes, and when ensuring no current attributes use deleted colour(s), to find a suitable default colour to use. Two default colours are currently provided, accessed by passing in NameResID of _R(IDS_WHITENAME), _R(IDS_BLACKNAME), in order to get the default white or black colour respectively. static void AttributeManager::FindDefaultColour(ColourList *ColList, UINT32 NameResID, DocColour *Result)
Definition at line 235 of file attrmgr.cpp. |
|
Definition at line 1983 of file attrmgr.cpp. |
|
|
|
|
|
static function called by UpdateForDeletedColours. Ensures that the given DocColour is a safe colour to use (does not reference a deleted IndexedColour). If it needs to be fixed, a default colour will be found (or created if necessary) in the given colour list and the colour will be made to reference the new default.
NewDefault - NULL, or a pointer to the default colour returned from a previous call to this function. This makes fixing several colours in a row a lot more efficient.
The NewDefault value should be set to NULL before the first call to this function. On subsequent calls, pass in the same value; if a change is made, this allows the system to be more efficient, and guarantees all changed colours reference the correct default colour. Scope: private static function
Definition at line 1632 of file attrmgr.cpp. 01634 { 01635 if (TheColour == NULL) // No colour to fix! 01636 return FALSE; 01637 01638 IndexedColour *RefColour = TheColour->FindParentIndexedColour(); 01639 if( RefColour == NULL || // Not referencing an IndexedColour, so nothing to fix 01640 !RefColour->IsDeleted() ) // Not deleted, so doesn't need fixing 01641 return FALSE; 01642 01643 // Inform the SelRange that attributes have changed (or will do very shortly) 01644 // This will flush the cache of common attributes which could contain an indexed 01645 // colour which has or will be deleted. 01646 SelRange* Sel = GetApplication()->FindSelection(); 01647 if (Sel) 01648 Sel->AttrsHaveChanged(); 01649 01650 // We've got a dead colour on our hands! Medic! Medic! 01651 // If the passed-in NewDefault already points at an appropriate attribute, 01652 // then use it, else call FindDefaultColour to find/create one for us 01653 if (*NewDefault != NULL) 01654 TheColour->MakeRefToIndexedColour(*NewDefault); 01655 else 01656 { 01657 AttributeManager::FindDefaultColour(ColList, _R(IDS_BLACKNAME), TheColour); 01658 *NewDefault = TheColour->FindParentIndexedColour(); 01659 } 01660 01661 return TRUE; 01662 }
|
|
Definition at line 197 of file attrmgr.cpp. |