PenToolInfoBarOp Class Reference

Class for handling the pen tool's information bar. More...

#include <pentool.h>

Inheritance diagram for PenToolInfoBarOp:

InformationBarOp DialogBarOp DialogOp Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 PenToolInfoBarOp ()
MsgResult Message (Msg *)
 Pen tool info bar dialog message handler.

Public Attributes

PenToolpPenTool

Detailed Description

Class for handling the pen tool's information bar.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/9/94

Definition at line 242 of file pentool.h.


Constructor & Destructor Documentation

PenToolInfoBarOp::PenToolInfoBarOp  )  [inline]
 

Definition at line 246 of file pentool.h.

00246 {DlgResID = _R(IDD_PENTOOLBAR);};   // Dummy default constructor for DYNCREATE


Member Function Documentation

MsgResult PenToolInfoBarOp::Message Msg Message  )  [virtual]
 

Pen tool info bar dialog message handler.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/9/94
Parameters:
Message,: The message to handle [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from InformationBarOp.

Definition at line 500 of file pentool.cpp.

00501 {
00502     if (MESSAGE_IS_A(Message,OpMsg))    // Check for undo/redo
00503     {
00504         OpMsg* pOpMsg = (OpMsg*)Message;
00505 
00506         if (pOpMsg->MsgType == OpMsg::AFTER_UNDO)
00507         {
00508             pPenTool->ClearInternalState();
00509         }
00510 
00511         if (pOpMsg->MsgType == OpMsg::END)
00512         {
00513             // an operation has ended, so lets check our own opstate
00514             
00515             if (IS_A(pOpMsg->pOp, OpPenCreateInternal) ||
00516                 IS_A(pOpMsg->pOp, OpPenEditInternal))
00517                 if (pPenTool->GetPenOpState() == OS_EditInternal)
00518                 {
00519                     if (!(pOpMsg->pOp->GetOpFlgs()).Failed)
00520                         pPenTool->SetInternalState();
00521                     pPenTool->ClearOp();
00522                 }
00523 
00524             if (IS_A(pOpMsg->pOp, OpPenCreatePath))
00525                 if (pPenTool->GetPenOpState() == OS_CreatePath)
00526                     {
00527                         if (!(pOpMsg->pOp->GetOpFlgs()).Failed)
00528                             pPenTool->CreateNewPath();
00529                         pPenTool->ClearPath();
00530                         pPenTool->ClearOp();
00531                     }
00532 
00533             if (IS_A(pOpMsg->pOp, OpPenAddElement))
00534                 if (pPenTool->GetPenOpState() == OS_AddElement)
00535                 {
00536                     if (!(pOpMsg->pOp->GetOpFlgs()).Failed)
00537                         pPenTool->AddElementToPath();
00538                     pPenTool->ClearPath();
00539                     pPenTool->ClearOp();
00540                 }
00541 
00542             if (IS_A(pOpMsg->pOp, OpPenClosePath))
00543                 if (pPenTool->GetPenOpState() == OS_ClosePath)
00544                 {
00545                     if (!(pOpMsg->pOp->GetOpFlgs()).Failed)
00546                         pPenTool->CloseWithPath();
00547                     pPenTool->ClearPath();
00548                     pPenTool->ClearOp();
00549                 }
00550         }
00551     }
00552     else if (MESSAGE_IS_A(Message,DocChangingMsg))  // Check for changes in the doc system
00553     {
00554         DocChangingMsg* pDocChangingMsg = (DocChangingMsg*)Message;
00555 //      Document* pDoc = pDocChangingMsg->pChangingDoc;
00556 
00557         switch (pDocChangingMsg->State)
00558         {
00559             case DocChangingMsg::SELCHANGED:
00560             case DocChangingMsg::KILLED:
00561                 pPenTool->ClearInternalState();
00562                 break; 
00563             default:
00564                 break;
00565         }
00566     }
00567 
00568     // Pass the message on
00569     return (DialogBarOp::Message(Message));
00570 }


Member Data Documentation

PenTool* PenToolInfoBarOp::pPenTool
 

Definition at line 252 of file pentool.h.


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