OpTogglePressure Class Reference

#include <pen.h>

Inheritance diagram for OpTogglePressure:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpTogglePressure ()
 Constructs an OpTogglePressure object.
 ~OpTogglePressure ()
 Destructs an OpTogglePressure object.
void Do (OpDescriptor *)
 Actually "DO" a TogglePressure operation.

Static Public Member Functions

static BOOL Init ()
 Create an OpDescriptor for the TogglePressure operation.
static OpState GetState (String_256 *, OpDescriptor *)
 Find the state of the OpTogglePressure operation.

Detailed Description

Definition at line 225 of file pen.h.


Constructor & Destructor Documentation

OpTogglePressure::OpTogglePressure  ) 
 

Constructs an OpTogglePressure object.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/6/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 455 of file pen.cpp.

00455                                    : Operation()
00456 {
00457 
00458 }

OpTogglePressure::~OpTogglePressure  ) 
 

Destructs an OpTogglePressure object.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/6/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 475 of file pen.cpp.

00476 {
00477     // Empty
00478 }


Member Function Documentation

void OpTogglePressure::Do OpDescriptor  )  [virtual]
 

Actually "DO" a TogglePressure operation.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/6/93
Parameters:
Pointer to Operation Descriptor [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 497 of file pen.cpp.

00498 {
00499     PORTNOTETRACE("other","CCPen::Do - do nothing");
00500 #ifndef EXCLUDE_FROM_XARALX
00501     CCPen *pPen = Camelot.GetPressurePen();
00502     if (pPen != NULL)
00503     {
00504         PressureMode NewState = (pPen->IsPressureOn()) ? PressureMode_None : PressureMode_Pen;
00505         pPen->SetPressureMode(NewState);
00506     }
00507 #endif
00508 
00509     End();
00510 }

OpState OpTogglePressure::GetState String_256 UIDescription,
OpDescriptor
[static]
 

Find the state of the OpTogglePressure operation.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/6/94
Parameters:
Pointer to Operation Descriptor [INPUTS] Text Description
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 530 of file pen.cpp.

00531 {
00532     OpState Bob;
00533     PORTNOTETRACE("other","CCPen::GetState - do nothing");
00534 #ifndef EXCLUDE_FROM_XARALX
00535     Bob.Ticked = (Camelot.GetPressurePen())->IsPressureOn();
00536     Bob.Greyed = FALSE;
00537 #endif
00538     return(Bob);
00539 }

BOOL OpTogglePressure::Init void   )  [static]
 

Create an OpDescriptor for the TogglePressure operation.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/6/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from SimpleCCObject.

Definition at line 558 of file pen.cpp.

00559 {
00560 PORTNOTE("other","Removed init stuff")
00561 #ifndef EXCLUDE_FROM_XARALX
00562     return(Operation::RegisterOpDescriptor(
00563                                             0,
00564                                             _R(IDS_TOGGLE_PRESSURE),
00565                                             CC_RUNTIME_CLASS(OpTogglePressure), 
00566                                             OPTOKEN_TOGGLEPRESSURE,
00567                                             OpTogglePressure::GetState,
00568                                             _R(IDS_FREEHANDPRESSURE),       // Help string ID
00569                                             _R(IDBBL_FREEHANDPRESSURE),     // Bubble help ID
00570                                             _R(IDD_FREEHANDTOOL),           // resource ID
00571                                             _R(IDC_FREEHANDPRESSURE),       // control ID
00572                                             SYSTEMBAR_EDIT,             // Bar ID
00573                                             TRUE,                       // Recieve system messages
00574                                             FALSE,                      // No smart duplicate operation
00575                                             TRUE,                       // Clean operation
00576                                             NULL,                       // No vertical counterpart
00577                                             NULL,                       // String for one copy only error
00578                                             0                           // Auto state flags
00579                                         ));
00580 #endif
00581     return false;
00582 }


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