#include <filltool.h>
Inheritance diagram for GradFillTool:
Public Member Functions | |
GradFillTool () | |
Constructs a Fill Tool. | |
~GradFillTool () | |
Destructor. Does nothing. | |
BOOL | Init () |
Used to check if the Tool was properly constructed. | |
void | Describe (void *InfoPtr) |
Allows the tool manager to extract information about the tool. | |
UINT32 | GetID () |
virtual void | SelectChange (BOOL) |
Creates/destroys/pushes/pops the rectangle tool's cursor. | |
virtual void | OnClick (DocCoord, ClickType, ClickModifiers, Spread *) |
To handle a Mouse Click event for the Selector Tool. It starts up a Selector Operation. | |
virtual void | OnMouseMove (DocCoord Pos, Spread *pSpread, ClickModifiers ClickMods) |
Called whenever the mouse position changes. We use this to update the cursor and status messages. | |
virtual BOOL | OnKeyPress (KeyPress *pKeyPress) |
Checks for fill tool keys. | |
virtual BOOL | GetStatusLineText (String_256 *, Spread *, DocCoord, ClickModifiers) |
generate up-to-date text for the status line (called on idles) | |
void | GetCursorAndStatus (DocCoord, Spread *, Cursor **, String_256 *) |
void | ToggleControlPoints (BOOL Reverse) |
Toggles the selection state of all visible fill control blobs. | |
Static Public Member Functions | |
static BOOL | IsCurrentTool () |
static void | EnableFillNudge () |
Enables the fill control point nudging. | |
static void | DisableFillNudge () |
Disables the fill control point nudging. | |
static BOOL | IsFillNudgeEnabled () |
Checks for to see if the fill nudging is currently enabled or not. | |
Static Public Attributes | |
static BOOL | AllowFillNudges = TRUE |
Private Member Functions | |
CC_DECLARE_MEMDUMP (GradFillTool) | |
Static Private Member Functions | |
static void | DisplayStatusBarHelp (UINT32 StatusID) |
Displays the given status help string in the status bar. | |
Private Attributes | |
DocCoord | ClickStart |
DocCoord | StartPos |
Spread * | StartSpread |
DocRect | SelectionBox |
BOOL | IsSelection |
Cursor * | pCurrentCursor |
Cursor * | pGradFillCursor |
Cursor * | pGradPointCursor |
INT32 | CurrentCursorID |
AttrFillGeometry * | EditingFill |
BOOL | DoubleClicked |
BOOL | OpBusy |
Static Private Attributes | |
static TCHAR * | FamilyName = _T("Fill Tools") |
static TCHAR * | ToolName = _T("Graduated Fill Tool") |
static TCHAR * | Purpose = _T("Graduated Filling of Objects") |
static TCHAR * | Author = _T("Will") |
static UINT32 | LastStatusID |
static BOOL | CurrentTool |
static GradInfoBarOp * | pGradInfoBarOp |
static TranspInfoBarOp * | pTranspInfoBarOp |
static BOOL | NudgeFills = FALSE |
Definition at line 277 of file filltool.h.
|
Constructs a Fill Tool.
Definition at line 593 of file filltool.cpp. 00594 { 00595 ClickStart = DocCoord(0,0); 00596 IsSelection = FALSE; 00597 StartSpread = NULL; 00598 pGradFillCursor = NULL; 00599 CurrentCursorID = 0; 00600 00601 NudgeFills = FALSE; 00602 }
|
|
Destructor. Does nothing.
Definition at line 614 of file filltool.cpp.
|
|
|
|
Allows the tool manager to extract information about the tool.
Reimplemented from Tool_v1. Definition at line 689 of file filltool.cpp. 00690 { 00691 // Cast structure into the latest one we understand. 00692 ToolInfo_v1 *Info = (ToolInfo_v1 *) InfoPtr; 00693 00694 Info -> InfoVersion = 1; 00695 00696 Info -> InterfaceVersion = GetToolInterfaceVersion(); // You should always have this line. 00697 00698 // These are all arbitrary at present. 00699 Info -> Version = 1; 00700 Info -> ID = GetID(); 00701 Info -> TextID = _R(IDS_GRADFILL_TOOL); 00702 Info -> BubbleID = _R(IDBBL_FILL_TOOL); 00703 00704 Info -> Family = FamilyName; 00705 Info -> Name = ToolName; 00706 Info -> Purpose = Purpose; 00707 Info -> Author = Author; 00708 00709 Info -> InfoBarDialog = 0; 00710 }
|
|
|
Displays the given status help string in the status bar.
Definition at line 1530 of file filltool.cpp. 01531 { 01532 String_256 StatusMsg(""); 01533 StatusMsg.Load(StatusID); 01534 GetApplication()->UpdateStatusBarText(&StatusMsg); 01535 LastStatusID = StatusID; 01536 }
|
|
|
Definition at line 1388 of file filltool.cpp. 01390 { 01391 // Setup defaults 01392 UINT32 Status; 01393 Cursor* pNewCursor = pGradFillCursor; 01394 01395 AttrFillGeometry::DoCheckOnFillRampMesh = FALSE; // disable this feature 01396 01397 // Is the mouse over any of our fill control points ? 01398 if ( AttrFillGeometry::CheckForFillControlHit(Pos, &Status) ) 01399 { 01400 // Status will have been updated 01401 01402 // Change the cursor, to indicate the mouse is over a control point 01403 pNewCursor = pGradPointCursor; 01404 } 01405 else 01406 { 01407 INT32 Index = pGradInfoBarOp->CurrentGeometryIndex; 01408 01409 if (TempGeometryIndex != -1) 01410 Index = TempGeometryIndex; 01411 01412 // Check our menu status 01413 switch (Index) 01414 { 01415 // If fill controls are selected then we indicate 01416 // that a click will deselect them. 01417 // Otherwise we just show what kind of fill will 01418 // be created when the user drags. 01419 01420 case (FGMENU_FLAT): 01421 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01422 Status = _R(IDS_FS_CREATELINEAR_S); 01423 else 01424 Status = _R(IDS_FS_CREATELINEAR); 01425 break; 01426 01427 case (FGMENU_LINEAR): 01428 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01429 Status = _R(IDS_FS_CREATELINEAR_S); 01430 else 01431 Status = _R(IDS_FS_CREATELINEAR); 01432 break; 01433 01434 case (FGMENU_CIRCULAR): 01435 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01436 Status = _R(IDS_FS_CREATECIRCLE_S); 01437 else 01438 Status = _R(IDS_FS_CREATECIRCLE); 01439 break; 01440 01441 case (FGMENU_RADIAL): 01442 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01443 Status = _R(IDS_FS_CREATEELLIP_S); 01444 else 01445 Status = _R(IDS_FS_CREATEELLIP); 01446 break; 01447 01448 case (FGMENU_CONICAL): 01449 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01450 Status = _R(IDS_FS_CREATECONICAL_S); 01451 else 01452 Status = _R(IDS_FS_CREATECONICAL); 01453 break; 01454 01455 case (FGMENU_SQUARE): 01456 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01457 Status = _R(IDS_FS_CREATESQUARE_S); 01458 else 01459 Status = _R(IDS_FS_CREATESQUARE); 01460 break; 01461 01462 case (FGMENU_THREECOL): 01463 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01464 Status = _R(IDS_FS_CREATETHREECOL_S); 01465 else 01466 Status = _R(IDS_FS_CREATETHREECOL); 01467 break; 01468 01469 case (FGMENU_FOURCOL): 01470 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01471 Status = _R(IDS_FS_CREATEFOURCOL_S); 01472 else 01473 Status = _R(IDS_FS_CREATEFOURCOL); 01474 break; 01475 01476 case (FGMENU_BITMAP): 01477 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01478 Status = _R(IDS_FS_CREATEBITMAP_S); 01479 else 01480 Status = _R(IDS_FS_CREATEBITMAP); 01481 break; 01482 01483 case (FGMENU_FRACTAL): 01484 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01485 Status = _R(IDS_FS_CREATEFRACTAL_S); 01486 else 01487 Status = _R(IDS_FS_CREATEFRACTAL); 01488 break; 01489 01490 case (FGMENU_NOISE): 01491 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 01492 Status = _R(IDS_FS_CREATENOISE_S); 01493 else 01494 Status = _R(IDS_FS_CREATENOISE); 01495 break; 01496 01497 default: 01498 // Er .. Dunno what kind of fill this is ? 01499 Status = _R(IDS_FS_CREATELINEAR); 01500 break; 01501 } 01502 } 01503 01504 if (pStatus != NULL) 01505 { 01506 pStatus->Load(Status); 01507 LastStatusID = Status; 01508 } 01509 01510 if (pCursor != NULL) 01511 *pCursor = pNewCursor; 01512 01513 AttrFillGeometry::DoCheckOnFillRampMesh = TRUE; // enable again 01514 }
|
|
Reimplemented from Tool_v1. Definition at line 287 of file filltool.h. 00287 { return TOOLID_GRADFILL; };
|
|
generate up-to-date text for the status line (called on idles)
Reimplemented from Tool_v1. Definition at line 1362 of file filltool.cpp. 01364 { 01365 ERROR3IF(ptext==NULL,"GradFillTool::GetStatusLineText() - ptext passed as null"); 01366 01367 if (ClickMods.Adjust) 01368 TempGeometryIndex = FGMENU_CIRCULAR; 01369 else 01370 TempGeometryIndex = -1; 01371 01372 GetCursorAndStatus(DocPos, pSpread, NULL, ptext); 01373 01374 return TRUE; 01375 }
|
|
Used to check if the Tool was properly constructed.
Reimplemented from Tool_v1. Definition at line 631 of file filltool.cpp. 00632 { 00633 BOOL ok = TRUE; 00634 00635 ok = OpChangeFillProfile::Declare(); 00636 00637 #if 0 00638 if (ok) 00639 { 00640 // Is everything ok so far ? 00641 CCResTextFile file; // Resource File 00642 GradInfoBarOpCreate BarCreate; // Object that creates GradInfoBarOp objects 00643 00644 ok = file.open(_R(IDM_GRAD_BAR), _R(IDT_INFO_BAR_RES)); // Open resource 00645 if (ok) ok = DialogBarOp::ReadBarsFromFile(file,BarCreate); // Read and create info bar 00646 if (ok) file.close(); // Close resource 00647 00648 ENSURE(ok,"Unable to load gradbar.ini from resource\n"); 00649 String_32 str = String_32(_R(IDS_FILLTOOL_FILLINFOBARNAME)); 00650 DialogBarOp* pDialogBarOp = DialogBarOp::FindDialogBarOp(str); 00651 } 00652 #endif 00653 00654 if (ok) 00655 { 00656 // Info bar now exists. Now get a pointer to it 00657 pGradInfoBarOp = new GradInfoBarOp(_R(IDD_GRADFILLDLG)); 00658 00659 if (pGradInfoBarOp) 00660 { 00661 // Set our default menu items 00662 pGradInfoBarOp->CurrentGeometryIndex = FGMENU_LINEAR; 00663 pGradInfoBarOp->CurrentMappingIndex = FMMENU_SIMPLE; 00664 pGradInfoBarOp->CurrentEffectIndex = FEMENU_FADE; 00665 } else 00666 ok=FALSE; 00667 00668 ENSURE(ok,"Couldn't find grad tool info bar"); 00669 } 00670 00671 return (ok); 00672 }
|
|
Definition at line 298 of file filltool.h. 00298 { return CurrentTool; }
|
|
Checks for to see if the fill nudging is currently enabled or not.
Definition at line 1341 of file filltool.cpp. 01342 { 01343 return NudgeFills; 01344 }
|
|
To handle a Mouse Click event for the Selector Tool. It starts up a Selector Operation.
Reimplemented from DragTool. Definition at line 866 of file filltool.cpp. 00868 { 00869 if (ClickMods.Menu) return; // Don't do anything if the user clicked the Menu button 00870 00871 // See if there is already a drag going on 00872 if (Operation::GetCurrentDragOp()!=NULL) 00873 return; 00874 00875 if ( AttrFillGeometry::CheckAttrClick(PointerPos, Click, ClickMods, pSpread) ) 00876 { 00877 // nastiness ALERT !!!!! 00878 00879 // since we can now double click to insert a multi-stage fill blob, we also MUST 00880 // select that blob once it is created. ONLY problem is that we cannot do this 00881 // (since it dosen't exist) UNTIL we have redrawn the screen .... 00882 00883 if ( Click == CLICKTYPE_DOUBLE ) 00884 { 00885 SelRange *Selected = GetApplication()->FindSelection(); 00886 Node *Current = Selected->FindFirst(); 00887 00888 if (Current!=NULL) 00889 { 00890 Spread *pSpread2 = Current->FindParentSpread(); 00891 RenderToolBlobs(pSpread2, NULL); 00892 00893 // the only sensible way to select the new blob is to fake a mouse click on it .... 00894 00895 AttrFillGeometry::CheckAttrClick(PointerPos, CLICKTYPE_SINGLE, ClickMods, pSpread2); 00896 00897 // now fake an onmousemove to get our cursor/status line to change as well! 00898 00899 OnMouseMove (PointerPos, pSpread, ClickMods); 00900 } 00901 } 00902 00903 return; // An Attribute claimed the click 00904 } 00905 00906 // Make sure this click is one that we want 00907 if ( Click == CLICKTYPE_SINGLE ) 00908 { 00909 StartPos = PointerPos; 00910 StartSpread = pSpread; 00911 DoubleClicked = FALSE; 00912 } 00913 00914 if ( Click == CLICKTYPE_UP ) 00915 { 00916 StartPos = DocCoord(0,0); 00917 StartSpread = NULL; 00918 DoubleClicked = FALSE; 00919 } 00920 00921 if ( Click == CLICKTYPE_DOUBLE ) 00922 { 00923 DoubleClicked = TRUE; 00924 } 00925 00926 if ( Click == CLICKTYPE_DRAG ) 00927 { 00928 if (StartSpread == NULL) 00929 return; 00930 00931 // Just what we wanted - Someone is dragging the mouse about 00932 // We need to make an operation to perform the drag with 00933 // OpCreateFill* pOp = new OpCreateFill; 00934 OpEditFill* pOp = new OpEditFill; 00935 if (pOp == NULL) 00936 { 00937 // Inform the person doing the clicking that life is not looking so good 00938 InformError(); 00939 } 00940 else 00941 { 00942 AttrFillGeometry* Fill = NULL; 00943 // Start the drag operation and pass in the Anchor Point to the push operation 00944 00945 if (ClickMods.Adjust) 00946 { 00947 Fill = new AttrRadialColourFill; 00948 if (Fill != NULL) 00949 ((AttrRadialFill*)Fill)->MakeCircular(); 00950 } 00951 #ifndef WEBSTER 00952 else if (DoubleClicked) 00953 { 00954 Fill = new AttrConicalColourFill; 00955 } 00956 #endif //WEBSTER 00957 else 00958 { 00959 switch (pGradInfoBarOp->CurrentGeometryIndex) 00960 { 00961 case (FGMENU_FLAT): 00962 // DMc changed - for the multiple colour fills 00963 Fill = new AttrLinearColourFill; 00964 break; 00965 00966 case (FGMENU_LINEAR): 00967 Fill = new AttrLinearColourFill; 00968 break; 00969 00970 case (FGMENU_CIRCULAR): 00971 Fill = new AttrRadialColourFill; 00972 if (Fill != NULL) 00973 ((AttrRadialFill*)Fill)->MakeCircular(); 00974 break; 00975 00976 case (FGMENU_RADIAL): 00977 Fill = new AttrRadialColourFill; 00978 break; 00979 00980 case (FGMENU_CONICAL): 00981 Fill = new AttrConicalColourFill; 00982 break; 00983 00984 case (FGMENU_SQUARE): 00985 Fill = new AttrSquareColourFill; 00986 break; 00987 00988 case (FGMENU_THREECOL): 00989 Fill = new AttrThreeColColourFill; 00990 break; 00991 00992 case (FGMENU_FOURCOL): 00993 Fill = new AttrFourColColourFill; 00994 break; 00995 00996 case (FGMENU_BITMAP): 00997 Fill = new AttrBitmapColourFill; 00998 00999 Fill->AttachBitmap(NULL); 01000 Fill->SetTesselation(pGradInfoBarOp->CurrentMappingIndex+1); 01001 break; 01002 01003 case (FGMENU_FRACTAL): 01004 Fill = new AttrFractalColourFill; 01005 Fill->SetTesselation(pGradInfoBarOp->CurrentMappingIndex+1); 01006 break; 01007 01008 case (FGMENU_NOISE): 01009 Fill = new AttrNoiseColourFill; 01010 Fill->SetTesselation(pGradInfoBarOp->CurrentMappingIndex+1); 01011 break; 01012 01013 default: 01014 // Er .. Dunno what kind of fill this is ? 01015 Fill = new AttrLinearColourFill; 01016 break; 01017 } 01018 } 01019 01020 if (Fill == NULL) 01021 { 01022 InformError(); 01023 return; 01024 } 01025 01026 pOp->DoCreate(StartPos, StartSpread, Fill); 01027 } 01028 01029 StartPos = DocCoord(0,0); 01030 StartSpread = NULL; 01031 DoubleClicked = FALSE; 01032 return; 01033 } 01034 01035 // call the base class .... 01036 01037 DragTool::OnClick (PointerPos, Click, ClickMods, pSpread); 01038 }
|
|
Checks for fill tool keys.
Reimplemented from Tool_v1. Definition at line 1092 of file filltool.cpp. 01093 { 01094 if (pKeyPress->GetVirtKey() == CAMKEY(TAB) && 01095 !pKeyPress->IsRelease() && 01096 !pKeyPress->IsRepeat()) 01097 { 01098 // Toggle the selection state of all visible fill control points 01099 ToggleControlPoints(pKeyPress->IsAdjust()); 01100 01101 return TRUE; 01102 } 01103 01104 if ( IsFillNudgeEnabled() && 01105 (pKeyPress->GetVirtKey() == CAMKEY(UP) || 01106 pKeyPress->GetVirtKey() == CAMKEY(DOWN) || 01107 pKeyPress->GetVirtKey() == CAMKEY(LEFT) || 01108 pKeyPress->GetVirtKey() == CAMKEY(RIGHT)) ) 01109 { 01110 // If we are nudging, then stop the Attribute manager from sending 01111 // tons of messages, until the nudge stops. 01112 if (pKeyPress->IsRelease()) 01113 AttributeManager::SendMessages = TRUE; 01114 else 01115 AttributeManager::SendMessages = FALSE; 01116 01117 // Pass on the nudge keys 01118 return FALSE; 01119 } 01120 return FALSE; 01121 }
|
|
Called whenever the mouse position changes. We use this to update the cursor and status messages.
Reimplemented from Tool_v1. Definition at line 1053 of file filltool.cpp. 01054 { 01055 // Setup defaults 01056 Cursor* pCursor = pGradFillCursor; 01057 String_256 Status; 01058 01059 if (ClickMods.Adjust) 01060 TempGeometryIndex = FGMENU_CIRCULAR; 01061 else 01062 TempGeometryIndex = -1; 01063 01064 GetCursorAndStatus(Pos, pSpread, &pCursor, &Status); 01065 01066 if (pCursor != pCurrentCursor) 01067 { 01068 // We're using the wrong shape!! 01069 pCurrentCursor = pCursor; 01070 CursorStack::GSetTop(pCurrentCursor, CurrentCursorID); 01071 } 01072 01073 // Display the status text 01074 GetApplication()->UpdateStatusBarText(&Status); 01075 }
|
|
Creates/destroys/pushes/pops the rectangle tool's cursor.
Reimplemented from Tool_v1. Definition at line 729 of file filltool.cpp. 00730 { 00731 if (isSelected) 00732 { 00733 // This tool has just been selected. Create an appropriate cursor, in this case 00734 // we can use the operating system-provided crosshair cursor. 00735 pGradFillCursor = new Cursor(this, _R(IDC_GRADTOOLCURSOR)); 00736 pGradPointCursor = new Cursor(this, _R(IDC_GRADPOINTCURSOR)); 00737 00738 // Did the cursor create ok ? 00739 if (!pGradFillCursor || !pGradFillCursor->IsValid()) 00740 { 00741 return; 00742 } 00743 00744 // Did the cursor create ok ? 00745 if (!pGradPointCursor || !pGradPointCursor->IsValid()) 00746 { 00747 return; 00748 } 00749 00750 pCurrentCursor = pGradFillCursor; 00751 CurrentCursorID = CursorStack::GPush(pGradFillCursor, FALSE); // Push cursor, but don't display now 00752 00753 // Create and display the tool's info bar 00754 CurrentTool = TRUE; 00755 AttrFillGeometry::SetTranspMeshesVisible(FALSE); 00756 00757 // Which blobs do I want displayed 00758 BlobManager* BlobMgr = GetApplication()->GetBlobManager(); 00759 if (BlobMgr != NULL) 00760 { 00761 // Decide which blobs to display 00762 BlobStyle MyBlobs; 00763 MyBlobs.Tiny = TRUE; 00764 MyBlobs.Fill = TRUE; 00765 00766 // tell the blob manager 00767 BlobMgr->ToolInterest(MyBlobs); 00768 } 00769 00770 // Re-Count the number of selected fill control points 00771 AttrFillGeometry::SetSelectionCount(AttrFillGeometry::CountSelectionControlPoints()); 00772 00773 pGradInfoBarOp->Create(); 00774 pGradInfoBarOp->EnableControls (); 00775 00776 if (AttrFillGeometry::SelectionCount > 0) 00777 EnableFillNudge(); 00778 00779 TempGeometryIndex = -1; 00780 //CurrentGeometryIndex = ; 00781 00782 SelRange *Selected = GetApplication()->FindSelection(); 00783 00784 // There is a selection if there is a document, and it has some selected object(s) 00785 IsSelection = (Document::GetCurrent() != NULL && Selected->Count() > 0); 00786 00787 if (IsSelection) 00788 { 00789 SelectionBox = Selected->GetBoundingRect(); 00790 00791 Node* Current = Selected->FindFirst(); 00792 if (Current != NULL) 00793 { 00794 Spread *pSpread = Current->FindParentSpread(); 00795 RenderToolBlobs(pSpread, NULL); 00796 } 00797 } 00798 } 00799 else 00800 { 00801 // pGradInfoBarOp->ResetHiddenGadgetStates (); 00802 00803 DisableFillNudge(); 00804 00805 // Deselection - destroy the tool's cursor, if there is one. 00806 if (pGradFillCursor) 00807 { 00808 CursorStack::GPop(CurrentCursorID); 00809 delete pGradFillCursor; 00810 delete pGradPointCursor; 00811 00812 pCurrentCursor = NULL; 00813 CurrentCursorID = 0; 00814 } 00815 00816 pGradInfoBarOp->CloseProfileDialog (pGradInfoBarOp->m_BiasGainGadget); 00817 00818 pGradInfoBarOp->Delete(); 00819 00820 CurrentTool = FALSE; 00821 00822 // If needed, draw the [tool blobs? OK, who forgot to finish the comment?!] 00823 if (IsSelection && Document::GetCurrent()!=NULL) 00824 { 00825 SelRange *Selected = GetApplication()->FindSelection(); 00826 Node *Current = Selected->FindFirst(); 00827 00828 if (Current!=NULL) 00829 { 00830 Spread *pSpread = Current->FindParentSpread(); 00831 RenderToolBlobs(pSpread, NULL); 00832 } 00833 } 00834 00835 // ensure any tool object blobs are removed. 00836 BlobManager* BlobMgr = GetApplication()->GetBlobManager(); 00837 if (BlobMgr != NULL) 00838 { 00839 BlobStyle bsRemoves; 00840 bsRemoves.ToolObject = TRUE; 00841 BlobMgr->RemoveInterest(bsRemoves); 00842 } 00843 } 00844 }
|
|
Toggles the selection state of all visible fill control blobs.
Definition at line 1134 of file filltool.cpp. 01135 { 01136 // Switch control points 01137 AttrFillGeometry::LastRenderedStartBlob = DocCoord(0,0); 01138 AttrFillGeometry::LastRenderedEndBlob = DocCoord(0,0); 01139 AttrFillGeometry::LastRenderedEnd2Blob = DocCoord(0,0); 01140 AttrFillGeometry::LastRenderedEnd3Blob = DocCoord(0,0); 01141 01142 AttrFillGeometry* pAttrNode = AttrFillGeometry::FindFirstSelectedAttr(); 01143 01144 // Return if there aren't any 01145 if (pAttrNode == NULL) 01146 return; 01147 01148 // We only toggle if there are some points selected 01149 BOOL DoToggle = AttrFillGeometry::FillSelectionCount() > 0; 01150 01151 while (pAttrNode != NULL) 01152 { 01153 if (pAttrNode->IsAColourFill()) 01154 { 01155 if (DoToggle) 01156 { 01157 // We're going to toggle the selected control points. 01158 if (pAttrNode->GetSelectionCount() > 0) 01159 { 01160 pAttrNode->CycleSelection(Reverse); 01161 } 01162 } 01163 else 01164 { 01165 // There were no points selected, so we'll just 01166 // select all the start points. 01167 pAttrNode->SelectBlob(FILLCONTROL_STARTPOINT); 01168 } 01169 } 01170 01171 // Check the next fill 01172 pAttrNode = AttrFillGeometry::FindNextSelectedAttr(); 01173 } 01174 01175 BROADCAST_TO_ALL(SelChangingMsg(SelChangingMsg::COLOURATTCHANGED)); 01176 }
|
|
Definition at line 307 of file filltool.h. |
|
Reimplemented from DragTool. Definition at line 313 of file filltool.h. |
|
Definition at line 322 of file filltool.h. |
|
Definition at line 337 of file filltool.h. |
|
Definition at line 319 of file filltool.h. |
|
Definition at line 343 of file filltool.h. |
|
Definition at line 342 of file filltool.h. |
|
Reimplemented from DragTool. Definition at line 310 of file filltool.h. |
|
Definition at line 330 of file filltool.h. |
|
Definition at line 317 of file filltool.h. |
|
Definition at line 346 of file filltool.h. |
|
Definition at line 344 of file filltool.h. |
|
Definition at line 333 of file filltool.h. |
|
Definition at line 334 of file filltool.h. |
|
Definition at line 339 of file filltool.h. |
|
Definition at line 335 of file filltool.h. |
|
Definition at line 340 of file filltool.h. |
|
Reimplemented from DragTool. Definition at line 312 of file filltool.h. |
|
Definition at line 327 of file filltool.h. |
|
Definition at line 323 of file filltool.h. |
|
Definition at line 324 of file filltool.h. |
|
Reimplemented from DragTool. Definition at line 311 of file filltool.h. |