#include <moldtool.h>
Inheritance diagram for OpToggleMouldGrid:
Public Member Functions | |
OpToggleMouldGrid () | |
Constructor for toggle mould grid operation. | |
void | Do (OpDescriptor *) |
Static Public Member Functions | |
static BOOL | Init () |
Initialise the toggle mould grid operation so that it can be accessed from the interface. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpToggleMouldGrid state. |
Definition at line 470 of file moldtool.h.
|
Constructor for toggle mould grid operation.
Definition at line 2570 of file moldtool.cpp.
|
|
Reimplemented from Operation. Definition at line 2685 of file moldtool.cpp. 02686 { 02687 // Get a snapshot of the selection 02688 SelRange* Selected = GetApplication()->FindSelection(); 02689 Node* pNode = Selected->FindFirst(); 02690 while (pNode) 02691 { 02692 if (pNode->GetRuntimeClass() == CC_RUNTIME_CLASS(NodeMould)) 02693 { 02694 NodeMould* pMould = (NodeMould*)pNode; 02695 MouldGeometry* pGeometry = pMould->GetGeometry(); 02696 if (pGeometry!=NULL) 02697 { 02698 Spread* pSpread = pNode->FindParentSpread(); 02699 if (pSpread) 02700 pGeometry->ToggleControlBlobs(pSpread); 02701 } 02702 } 02703 pNode = Selected->FindNext(pNode); 02704 } 02705 End(); 02706 }
|
|
For finding the OpToggleMouldGrid state.
Definition at line 2630 of file moldtool.cpp. 02631 { 02632 OpState OpSt; 02633 String_256 DisableReason; 02634 OpSt.Greyed = FALSE; 02635 02636 /* 02637 if (Document::GetCurrent() != NULL) 02638 { 02639 SelRange* Selected = GetApplication()->FindSelection(); 02640 if (Selected) 02641 if (!Selected->FindObject(CC_RUNTIME_CLASS(NodeMould), NULL)) 02642 OpSt.Greyed = TRUE; 02643 } 02644 */ 02645 02646 BOOL Sel = FALSE; 02647 if (Document::GetCurrent() != NULL) 02648 { 02649 SelRange* Selected = GetApplication()->FindSelection(); 02650 if (Selected) 02651 { 02652 Node* pNode = Selected->FindFirst(); 02653 while ((pNode!=NULL) && (!Sel)) 02654 { 02655 if (pNode->GetRuntimeClass() == CC_RUNTIME_CLASS(NodeMould)) 02656 Sel=TRUE; 02657 02658 pNode = Selected->FindNext(pNode); 02659 } 02660 } 02661 } 02662 02663 if (!Sel) 02664 OpSt.Greyed = TRUE; 02665 02666 return (OpSt); 02667 }
|
|
Initialise the toggle mould grid operation so that it can be accessed from the interface.
Reimplemented from SimpleCCObject. Definition at line 2596 of file moldtool.cpp. 02597 { 02598 return (RegisterOpDescriptor(0, // tool ID 02599 _R(IDS_TOGGLEMOULDGRID), // string resource ID 02600 CC_RUNTIME_CLASS(OpToggleMouldGrid), // runtime class for Op 02601 OPTOKEN_TOGGLEMOULDGRID, // Ptr to token string 02602 OpToggleMouldGrid::GetState, // GetState function 02603 0, // help ID 02604 _R(IDBBL_TOGGLEMOULDGRID), // bubble help ID 02605 _R(IDD_MOULDTOOLBAR), // resource ID 02606 _R(IDC_BTN_TOGGLEMOULDGRID), // control ID 02607 SYSTEMBAR_EDIT, // Group bar ID 02608 TRUE, // Receive messages 02609 FALSE, // Smart 02610 FALSE, // Clean 02611 0, // One open Instance ID 02612 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION) 02613 )); 02614 }
|