OpGBrush Class Reference

Operation to toggle GBrush setting Notes: Will be on a dialog somewhere eventually. More...

#include <gbrushop.h>

Inheritance diagram for OpGBrush:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpGBrush ()
 Constructor for OpGBrush operation. It is not undoable.
void Do (OpDescriptor *)
 Toggles state of GBrush flag then forces a redraw.

Static Public Member Functions

static BOOL Init ()
 Declares a preference that allows you to clear memory in delete().
static OpState GetState (String_256 *, OpDescriptor *)
 This item is always available.

Detailed Description

Operation to toggle GBrush setting Notes: Will be on a dialog somewhere eventually.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94

Definition at line 118 of file gbrushop.h.


Constructor & Destructor Documentation

OpGBrush::OpGBrush  ) 
 

Constructor for OpGBrush operation. It is not undoable.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: None

Definition at line 652 of file gbrush.cpp.

00653 {
00654 }


Member Function Documentation

void OpGBrush::Do OpDescriptor  )  [virtual]
 

Toggles state of GBrush flag then forces a redraw.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94
Parameters:
None [INPUTS]
None [OUTPUTS]
Returns:
None

Errors: None

Reimplemented from Operation.

Definition at line 606 of file gbrush.cpp.

00607 {
00608     WantBetterBrushes ^= TRUE;
00609 
00610     // Iterate over all the documents, forcing a redraw of all the views.
00611     ListItem* pItem = Camelot.Documents.GetHead();
00612     while (pItem != NULL)
00613     {
00614         ((Document*) pItem)->ForceRedraw();
00615         pItem = Camelot.Documents.GetNext(pItem);
00616     }
00617 
00618     // invalidate current brushes
00619     GBrush::NewBrushState();
00620 
00621 #ifndef STANDALONE
00622     // This is not likely to remain an interactively-alterable option,
00623     // so for now we just poke at the colour bar to make it redraw itself
00624     // in the new mode.
00625     PORTNOTETRACE("other","OpGBrush::Do - removed call to RedrawGBrushAreas");
00626 #ifndef EXCLUDE_FROM_XARALX
00627     CColourBar::RedrawGBrushAreas();
00628 #endif
00629     // We should also do this for galleries (e.g. colour gallery) but
00630     // as this can only be done in debug builds it's not worth the effort.
00631 #endif
00632 
00633     End();
00634 }

OpState OpGBrush::GetState String_256 ,
OpDescriptor
[static]
 

This item is always available.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/4/94
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: None

Definition at line 672 of file gbrush.cpp.

00673 {
00674     OpState OpSt;
00675 
00676     if (WantBetterBrushes)
00677         OpSt.Ticked = TRUE;
00678 
00679     return OpSt;
00680 }

static BOOL OpGBrush::Init void   )  [static]
 

Declares a preference that allows you to clear memory in delete().

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/94
Returns:
TRUE if it worked OK, FALSE if not

Reimplemented from SimpleCCObject.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:58:14 2007 for Camelot by  doxygen 1.4.4