#include <filltool.h>
Inheritance diagram for TranspTool:
Public Member Functions | |
TranspTool () | |
Constructs a Transparency Tool. | |
~TranspTool () | |
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. Notes: Changed by Gerry (8/96) to use new CycleSelection call. | |
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. | |
Private Member Functions | |
CC_DECLARE_MEMDUMP (TranspTool) | |
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 * | pTranspCursor |
Cursor * | pTranspPointCursor |
INT32 | CurrentCursorID |
AttrFillGeometry * | EditingFill |
BOOL | DoubleClicked |
BOOL | OpBusy |
Static Private Attributes | |
static TCHAR * | FamilyName = _T("Fill Tools") |
static TCHAR * | ToolName = _T("Transparency Tool") |
static TCHAR * | Purpose = _T("Alter the transparency of objects") |
static TCHAR * | Author = _T("Will") |
static UINT32 | LastStatusID |
static BOOL | CurrentTool |
static TranspInfoBarOp * | pTranspInfoBarOp |
static BOOL | NudgeFills = FALSE |
Definition at line 359 of file filltool.h.
|
Constructs a Transparency Tool.
Definition at line 1560 of file filltool.cpp. 01561 { 01562 ClickStart = DocCoord(0,0); 01563 IsSelection = FALSE; 01564 StartSpread = NULL; 01565 pTranspCursor = NULL; 01566 CurrentCursorID = 0; 01567 01568 CurrentTool = FALSE; 01569 NudgeFills = FALSE; 01570 }
|
|
Destructor. Does nothing.
Definition at line 1582 of file filltool.cpp.
|
|
|
|
Allows the tool manager to extract information about the tool.
Reimplemented from Tool_v1. Definition at line 1658 of file filltool.cpp. 01659 { 01660 // Cast structure into the latest one we understand. 01661 ToolInfo_v1 *Info = (ToolInfo_v1 *) InfoPtr; 01662 01663 Info -> InfoVersion = 1; 01664 01665 Info -> InterfaceVersion = GetToolInterfaceVersion(); // You should always have this line. 01666 01667 // These are all arbitrary at present. 01668 Info -> Version = 1; 01669 Info -> ID = GetID(); 01670 Info -> TextID = _R(IDS_TRANSP_TOOL); 01671 Info -> BubbleID = _R(IDBBL_TRANSP_TOOL); 01672 01673 Info -> Family = FamilyName; 01674 Info -> Name = ToolName; 01675 Info -> Purpose = Purpose; 01676 Info -> Author = Author; 01677 01678 Info -> InfoBarDialog = 0; 01679 }
|
|
|
Displays the given status help string in the status bar.
Definition at line 2537 of file filltool.cpp. 02538 { 02539 String_256 StatusMsg(""); 02540 StatusMsg.Load(StatusID); 02541 GetApplication()->UpdateStatusBarText(&StatusMsg); 02542 LastStatusID = StatusID; 02543 }
|
|
|
Definition at line 2392 of file filltool.cpp. 02394 { 02395 // Setup defaults 02396 UINT32 Status; 02397 Cursor* pNewCursor = pTranspCursor; 02398 02399 // Is the mouse over any of our fill control points ? 02400 if ( AttrFillGeometry::CheckForFillControlHit(Pos, &Status) ) 02401 { 02402 // Status will have been updated 02403 02404 // Change the cursor, to indicate the mouse is over a control point 02405 pNewCursor = pTranspPointCursor; 02406 } 02407 else 02408 { 02409 INT32 Index = pTranspInfoBarOp->CurrentGeometryIndex; 02410 02411 if (TempGeometryIndex != -1) 02412 Index = TempGeometryIndex; 02413 02414 // Check our menu status 02415 switch (Index) 02416 { 02417 // If fill controls are selected then we indicate 02418 // that a click will deselect them. 02419 // Otherwise we just show what kind of fill will 02420 // be created when the user drags. 02421 02422 case (FGMENU_NOTRANSP): 02423 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02424 Status = _R(IDS_TS_CREATELINEAR_S); 02425 else 02426 Status = _R(IDS_TS_CREATELINEAR); 02427 break; 02428 02429 case (FGMENU_FLATTRANSP): 02430 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02431 Status = _R(IDS_TS_CREATELINEAR_S); 02432 else 02433 Status = _R(IDS_TS_CREATELINEAR); 02434 break; 02435 02436 case (FGMENU_LINEARTRANSP): 02437 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02438 Status = _R(IDS_TS_CREATELINEAR_S); 02439 else 02440 Status = _R(IDS_TS_CREATELINEAR); 02441 break; 02442 02443 case (FGMENU_CIRCULARTRANSP): 02444 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02445 Status = _R(IDS_TS_CREATECIRCLE_S); 02446 else 02447 Status = _R(IDS_TS_CREATECIRCLE); 02448 break; 02449 02450 case (FGMENU_RADIALTRANSP): 02451 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02452 Status = _R(IDS_TS_CREATEELLIP_S); 02453 else 02454 Status = _R(IDS_TS_CREATEELLIP); 02455 break; 02456 02457 case (FGMENU_CONICALTRANSP): 02458 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02459 Status = _R(IDS_TS_CREATECONICAL_S); 02460 else 02461 Status = _R(IDS_TS_CREATECONICAL); 02462 break; 02463 02464 case (FGMENU_SQUARETRANSP): 02465 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02466 Status = _R(IDS_TS_CREATESQUARE_S); 02467 else 02468 Status = _R(IDS_TS_CREATESQUARE); 02469 break; 02470 02471 case (FGMENU_THREECOLTRANSP): 02472 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02473 Status = _R(IDS_TS_CREATETHREECOL_S); 02474 else 02475 Status = _R(IDS_TS_CREATETHREECOL); 02476 break; 02477 02478 case (FGMENU_FOURCOLTRANSP): 02479 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02480 Status = _R(IDS_TS_CREATEFOURCOL_S); 02481 else 02482 Status = _R(IDS_TS_CREATEFOURCOL); 02483 break; 02484 02485 case (FGMENU_BITMAPTRANSP): 02486 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02487 Status = _R(IDS_TS_CREATEBITMAP_S); 02488 else 02489 Status = _R(IDS_TS_CREATEBITMAP); 02490 break; 02491 02492 case (FGMENU_FRACTALTRANSP): 02493 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02494 Status = _R(IDS_TS_CREATEFRACTAL_S); 02495 else 02496 Status = _R(IDS_TS_CREATEFRACTAL); 02497 break; 02498 02499 case (FGMENU_NOISETRANSP): 02500 if ( AttrFillGeometry::FillSelectionCount() > 0 ) 02501 Status = _R(IDS_TS_CREATENOISE_S); 02502 else 02503 Status = _R(IDS_TS_CREATENOISE); 02504 break; 02505 02506 default: 02507 // Er .. Dunno what kind of fill this is ? 02508 Status = _R(IDS_TS_CREATELINEAR); 02509 break; 02510 } 02511 } 02512 02513 if (pStatus != NULL) 02514 { 02515 pStatus->Load(Status); 02516 LastStatusID = Status; 02517 } 02518 02519 if (pCursor != NULL) 02520 *pCursor = pNewCursor; 02521 }
|
|
Reimplemented from Tool_v1. Definition at line 369 of file filltool.h. 00369 { return TOOLID_TRANSP; };
|
|
generate up-to-date text for the status line (called on idles)
Reimplemented from Tool_v1. Definition at line 2366 of file filltool.cpp. 02368 { 02369 ERROR3IF(ptext==NULL,"TranspTool::GetStatusLineText() - ptext passed as null"); 02370 02371 if (ClickMods.Adjust) 02372 TempGeometryIndex = FGMENU_CIRCULARTRANSP; 02373 else 02374 TempGeometryIndex = -1; 02375 02376 GetCursorAndStatus(DocPos, pSpread, NULL, ptext); 02377 02378 return TRUE; 02379 }
|
|
Used to check if the Tool was properly constructed.
Reimplemented from Tool_v1. Definition at line 1599 of file filltool.cpp. 01600 { 01601 BOOL ok = TRUE; 01602 01603 ok = OpChangeTranspFillProfile::Declare(); 01604 01605 #if 0 01606 if (ok) 01607 { 01608 CCResTextFile file; // Resource File 01609 TranspInfoBarOpCreate BarCreate; // Object that creates TranspInfoBarOp objects 01610 01611 ok = file.open(_R(IDM_TRANSP_BAR), _R(IDT_INFO_BAR_RES)); // Open resource 01612 if (ok) ok = DialogBarOp::ReadBarsFromFile(file,BarCreate); // Read and create info bar 01613 if (ok) file.close(); // Close resource 01614 01615 ENSURE(ok,"Unable to load transbar.ini from resource\n"); 01616 01617 // Info bar now exists. Now get a pointer to it 01618 String_32 str = String_32(_R(IDS_FILLTOOL_TRANINFOBARNAME)); 01619 DialogBarOp* pDialogBarOp = DialogBarOp::FindDialogBarOp(str); 01620 01621 } 01622 #endif 01623 if (ok) 01624 { 01625 pTranspInfoBarOp = new TranspInfoBarOp(_R(IDD_TRANFILLDLG)); 01626 01627 if (pTranspInfoBarOp) 01628 { 01629 // Set our default menu items 01630 pTranspInfoBarOp->CurrentGeometryIndex = FGMENU_LINEARTRANSP; 01631 pTranspInfoBarOp->CurrentMappingIndex = FMMENU_SIMPLE; 01632 pTranspInfoBarOp->CurrentTypeIndex = FTMENU_REFLECT; 01633 } else 01634 ok=FALSE; 01635 01636 ENSURE(ok,"Unable to load transbar.ini from resource\n"); 01637 01638 } 01639 01640 return (ok); 01641 }
|
|
Definition at line 380 of file filltool.h. 00380 { return CurrentTool; }
|
|
Checks for to see if the fill nudging is currently enabled or not.
Definition at line 2345 of file filltool.cpp. 02346 { 02347 return NudgeFills; 02348 }
|
|
To handle a Mouse Click event for the Selector Tool. It starts up a Selector Operation.
Reimplemented from DragTool. Definition at line 1846 of file filltool.cpp. 01848 { 01849 if (ClickMods.Menu) return; // Don't do anything if the user clicked the Menu button 01850 01851 // See if there is already a drag going on 01852 if (Operation::GetCurrentDragOp()!=NULL) 01853 return; 01854 01855 if ( AttrFillGeometry::CheckAttrClick(PointerPos, Click, ClickMods, pSpread) ) 01856 { 01857 return; // An Attribute claimed the click 01858 } 01859 01860 // Make sure this click is one that we want 01861 if ( Click == CLICKTYPE_SINGLE ) 01862 { 01863 StartPos = PointerPos; 01864 StartSpread = pSpread; 01865 DoubleClicked = FALSE; 01866 } 01867 01868 // Make sure this click is one that we want 01869 if ( Click == CLICKTYPE_UP ) 01870 { 01871 StartPos = DocCoord(0,0); 01872 StartSpread = NULL; 01873 DoubleClicked = FALSE; 01874 } 01875 01876 if ( Click == CLICKTYPE_DOUBLE ) 01877 { 01878 DoubleClicked = TRUE; 01879 } 01880 01881 if ( Click == CLICKTYPE_DRAG ) 01882 { 01883 // is there a shadow node in the selection ? if so, don't start a drag 01884 // DMc - check for nodes which transparency can't be applied to 01885 BOOL allowed = TRUE; 01886 01887 Range Sel(*(GetApplication()->FindSelection())); 01888 01889 INT32 Count = Sel.Count(); 01890 INT32 ShadCount = 0; 01891 01892 Node * pNode = Sel.FindFirst(FALSE); 01893 01894 while (pNode) 01895 { 01896 if (pNode->IsKindOf(CC_RUNTIME_CLASS(NodeShadow))) 01897 { 01898 allowed = FALSE; 01899 ((NodeShadow*)pNode)->DeSelect(TRUE); 01900 ShadCount ++; 01901 } 01902 01903 pNode = Sel.FindNext(pNode, FALSE); 01904 } 01905 01906 if (!allowed && Count == ShadCount) 01907 { 01908 return; 01909 } 01910 01911 if (!allowed) 01912 { 01913 GetApplication()->UpdateSelection(); 01914 } 01915 01916 if (StartSpread == NULL) 01917 return; 01918 01919 // Just what we wanted - Someone is dragging the mouse about 01920 // We need to make an operation to perform the drag with 01921 // OpCreateFill* pOp = new OpCreateFill; 01922 OpEditFill* pOp = new OpEditFill; 01923 if (pOp == NULL) 01924 { 01925 // Inform the person doing the clicking that life is not looking so good 01926 InformError(); 01927 } 01928 else 01929 { 01930 AttrFillGeometry* Fill = NULL; 01931 // Start the drag operation and pass in the Anchor Point to the push operation 01932 01933 if (ClickMods.Adjust) 01934 { 01935 Fill = new AttrRadialTranspFill; 01936 if (Fill != NULL) 01937 ((AttrRadialFill*)Fill)->MakeCircular(); 01938 } 01939 #ifndef WEBSTER 01940 else if (DoubleClicked) 01941 { 01942 //this could never be executed anyway even in Camelot - MAB 20/03/97 01943 Fill = new AttrConicalTranspFill; 01944 } 01945 #endif //WEBSTER 01946 else 01947 { 01948 switch (pTranspInfoBarOp->CurrentGeometryIndex) 01949 { 01950 case (FGMENU_NOTRANSP): 01951 Fill = new AttrLinearTranspFill; 01952 break; 01953 01954 case (FGMENU_FLATTRANSP): 01955 Fill = new AttrLinearTranspFill; 01956 break; 01957 01958 case (FGMENU_LINEARTRANSP): 01959 Fill = new AttrLinearTranspFill; 01960 break; 01961 01962 case (FGMENU_CIRCULARTRANSP): 01963 Fill = new AttrRadialTranspFill; 01964 if (Fill != NULL) 01965 ((AttrRadialFill*)Fill)->MakeCircular(); 01966 break; 01967 01968 case (FGMENU_RADIALTRANSP): 01969 Fill = new AttrRadialTranspFill; 01970 break; 01971 01972 case (FGMENU_CONICALTRANSP): 01973 Fill = new AttrConicalTranspFill; 01974 break; 01975 01976 case (FGMENU_SQUARETRANSP): 01977 Fill = new AttrSquareTranspFill; 01978 break; 01979 01980 case (FGMENU_THREECOLTRANSP): 01981 Fill = new AttrThreeColTranspFill; 01982 break; 01983 01984 case (FGMENU_FOURCOLTRANSP): 01985 Fill = new AttrFourColTranspFill; 01986 break; 01987 01988 case (FGMENU_BITMAPTRANSP): 01989 { 01990 Fill = new AttrBitmapTranspFill; 01991 01992 KernelBitmap* Default = NULL; 01993 Default = KernelBitmap::MakeKernelBitmap(); 01994 if (Default == NULL) 01995 { 01996 InformError(); 01997 delete Fill; 01998 return; 01999 } 02000 02001 Fill->AttachBitmap(Default); 02002 Fill->SetTesselation(pTranspInfoBarOp->CurrentMappingIndex+1); 02003 break; 02004 } 02005 02006 case (FGMENU_FRACTALTRANSP): 02007 Fill = new AttrFractalTranspFill; 02008 Fill->SetTesselation(pTranspInfoBarOp->CurrentMappingIndex+1); 02009 break; 02010 02011 case (FGMENU_NOISETRANSP): 02012 Fill = new AttrNoiseTranspFill; 02013 Fill->SetTesselation(pTranspInfoBarOp->CurrentMappingIndex+1); 02014 break; 02015 02016 default: 02017 // Er .. Dunno what kind of fill this is ? 02018 Fill = new AttrLinearTranspFill; 02019 break; 02020 } 02021 } 02022 02023 if (Fill == NULL) 02024 { 02025 InformError(); 02026 delete pOp; 02027 return; 02028 } 02029 02030 Fill->SetTranspType(pTranspInfoBarOp->GetTranspType()); 02031 02032 // pOp->DoDrag(Fill, StartSpread, StartPos); 02033 pOp->DoCreate(StartPos, StartSpread, Fill); 02034 } 02035 02036 StartPos = DocCoord(0,0); 02037 StartSpread = NULL; 02038 DoubleClicked = FALSE; 02039 return; 02040 } 02041 02042 // call the base class .... 02043 02044 DragTool::OnClick (PointerPos, Click, ClickMods, pSpread); 02045 }
|
|
Checks for fill tool keys.
Reimplemented from Tool_v1. Definition at line 2099 of file filltool.cpp. 02100 { 02101 if (pKeyPress->GetVirtKey() == CAMKEY(TAB) && 02102 !pKeyPress->IsRelease() && 02103 !pKeyPress->IsRepeat()) 02104 { 02105 // Toggle the selection state of all visible fill control points 02106 ToggleControlPoints(pKeyPress->IsAdjust()); 02107 02108 return TRUE; 02109 } 02110 02111 if ( IsFillNudgeEnabled() && 02112 (pKeyPress->GetVirtKey() == CAMKEY(UP) || 02113 pKeyPress->GetVirtKey() == CAMKEY(DOWN) || 02114 pKeyPress->GetVirtKey() == CAMKEY(LEFT) || 02115 pKeyPress->GetVirtKey() == CAMKEY(RIGHT)) ) 02116 { 02117 // If we are nudging, then stop the Attribute manager from sending 02118 // tons of messages, until the nudge stops. 02119 if (pKeyPress->IsRelease()) 02120 AttributeManager::SendMessages = TRUE; 02121 else 02122 AttributeManager::SendMessages = FALSE; 02123 02124 // Pass on the nudge keys 02125 return FALSE; 02126 } 02127 return FALSE; 02128 }
|
|
Called whenever the mouse position changes. We use this to update the cursor and status messages.
Reimplemented from Tool_v1. Definition at line 2060 of file filltool.cpp. 02061 { 02062 // Setup defaults 02063 Cursor* pCursor = pTranspCursor; 02064 String_256 Status; 02065 02066 if (ClickMods.Adjust) 02067 TempGeometryIndex = FGMENU_CIRCULARTRANSP; 02068 else 02069 TempGeometryIndex = -1; 02070 02071 GetCursorAndStatus(Pos, pSpread, &pCursor, &Status); 02072 02073 if (pCursor != pCurrentCursor) 02074 { 02075 // We're using the wrong shape!! 02076 pCurrentCursor = pCursor; 02077 CursorStack::GSetTop(pCurrentCursor, CurrentCursorID); 02078 } 02079 02080 // Display the status text 02081 GetApplication()->UpdateStatusBarText(&Status); 02082 }
|
|
Creates/destroys/pushes/pops the rectangle tool's cursor.
Reimplemented from Tool_v1. Definition at line 1698 of file filltool.cpp. 01699 { 01700 if (isSelected) 01701 { 01702 // This tool has just been selected. Create an appropriate cursor, in this case 01703 // we can use the operating system-provided crosshair cursor. 01704 pTranspCursor = new Cursor(this, _R(IDC_TRANSPTOOLCURSOR)); 01705 pTranspPointCursor = new Cursor(this, _R(IDC_TRANSPPOINTCURSOR)); 01706 01707 // Did the cursor create ok ? 01708 if (!pTranspCursor || !pTranspCursor->IsValid()) 01709 { 01710 return; 01711 } 01712 01713 // Did the cursor create ok ? 01714 if (!pTranspPointCursor || !pTranspPointCursor->IsValid()) 01715 { 01716 return; 01717 } 01718 01719 pCurrentCursor = pTranspCursor; 01720 CurrentCursorID = CursorStack::GPush(pTranspCursor, FALSE); // Push cursor, but don't display now 01721 01722 // Create and display the tool's info bar 01723 CurrentTool = FALSE; 01724 AttrFillGeometry::SetTranspMeshesVisible(FALSE); 01725 01726 BlobManager* BlobMgr = GetApplication()->GetBlobManager(); 01727 01728 BlobStyle MyBlobs = BlobMgr->GetCurrentInterest(); 01729 if (MyBlobs.Fill) 01730 { 01731 MyBlobs.Fill = FALSE; 01732 MyBlobs.Effect = FALSE; 01733 BlobMgr->ToolInterest(MyBlobs); 01734 } 01735 01736 CurrentTool = TRUE; 01737 AttrFillGeometry::SetTranspMeshesVisible(TRUE); 01738 01739 SelRange *Selected = GetApplication()->FindSelection(); 01740 01741 BlobStyle ToolBlobs; 01742 ToolBlobs.Fill = TRUE; 01743 ToolBlobs.Tiny = TRUE; 01744 ToolBlobs.Effect = TRUE; 01745 BlobMgr->ToolInterest(ToolBlobs); 01746 01747 // Re-Count the number of selected fill control points 01748 AttrFillGeometry::SetSelectionCount(AttrFillGeometry::CountSelectionControlPoints()); 01749 01750 pTranspInfoBarOp->Create(); 01751 01752 if (AttrFillGeometry::SelectionCount > 0) 01753 EnableFillNudge(); 01754 01755 TempGeometryIndex = -1; 01756 01757 // There is a selection if there is a document, and it has some selected object(s) 01758 IsSelection = (Document::GetCurrent() != NULL && Selected->Count() > 0); 01759 01760 if (IsSelection) 01761 { 01762 SelectionBox = Selected->GetBoundingRect(); 01763 01764 Node* Current = Selected->FindFirst(); 01765 if (Current != NULL) 01766 { 01767 Spread *pSpread = Current->FindParentSpread(); 01768 RenderToolBlobs(pSpread, NULL); 01769 } 01770 } 01771 } 01772 else 01773 { 01774 DisableFillNudge(); 01775 01776 // Deselection - destroy the tool's cursor, if there is one. 01777 if (pTranspCursor) 01778 { 01779 CursorStack::GPop(CurrentCursorID); 01780 delete pTranspCursor; 01781 delete pTranspPointCursor; 01782 01783 pCurrentCursor = NULL; 01784 CurrentCursorID = 0; 01785 } 01786 01787 pTranspInfoBarOp->CloseProfileDialog(pTranspInfoBarOp->m_BiasGainGadget); 01788 01789 pTranspInfoBarOp->Delete(); 01790 01791 CurrentTool = TRUE; 01792 AttrFillGeometry::SetTranspMeshesVisible(TRUE); 01793 01794 BlobManager* BlobMgr = GetApplication()->GetBlobManager(); 01795 01796 BlobStyle MyBlobs = BlobMgr->GetCurrentInterest(); 01797 MyBlobs.Fill = FALSE; 01798 MyBlobs.Effect = FALSE; 01799 BlobMgr->ToolInterest(MyBlobs); 01800 01801 CurrentTool = FALSE; 01802 AttrFillGeometry::SetTranspMeshesVisible(FALSE); 01803 01804 // If needed, draw the [tool blobs? OK, who forgot to finish the comment?!] 01805 if (IsSelection && Document::GetCurrent()!=NULL) 01806 { 01807 SelRange *Selected = GetApplication()->FindSelection(); 01808 Node *Current = Selected->FindFirst(); 01809 01810 if (Current!=NULL) 01811 { 01812 Spread *pSpread = Current->FindParentSpread(); 01813 RenderToolBlobs(pSpread, NULL); 01814 } 01815 } 01816 01817 // ensure any tool object blobs are removed. 01818 BlobStyle bsRemoves; 01819 bsRemoves.ToolObject = TRUE; 01820 BlobMgr->RemoveInterest(bsRemoves); 01821 } 01822 }
|
|
Toggles the selection state of all visible fill control blobs. Notes: Changed by Gerry (8/96) to use new CycleSelection call.
Definition at line 2142 of file filltool.cpp. 02143 { 02144 // Switch control points 02145 AttrFillGeometry::LastRenderedStartBlob = DocCoord(0,0); 02146 AttrFillGeometry::LastRenderedEndBlob = DocCoord(0,0); 02147 AttrFillGeometry::LastRenderedEnd2Blob = DocCoord(0,0); 02148 AttrFillGeometry::LastRenderedEnd3Blob = DocCoord(0,0); 02149 02150 AttrFillGeometry* pAttrNode = AttrFillGeometry::FindFirstSelectedAttr(CC_RUNTIME_CLASS(AttrTranspFillGeometry)); 02151 02152 // Return if there aren't any 02153 if (pAttrNode == NULL) 02154 return; 02155 02156 // We only toggle if there are some points selected 02157 BOOL DoToggle = AttrFillGeometry::FillSelectionCount() > 0; 02158 02159 while (pAttrNode != NULL) 02160 { 02161 if (pAttrNode->IsATranspFill()) 02162 { 02163 if (DoToggle) 02164 { 02165 // We're going to toggle the selected control points. 02166 if (pAttrNode->GetSelectionCount() > 0) 02167 { 02168 pAttrNode->CycleSelection(Reverse); 02169 } 02170 } 02171 else 02172 { 02173 // There were no points selected, so we'll just 02174 // select all the start points. 02175 pAttrNode->SelectBlob(FILLCONTROL_STARTPOINT); 02176 } 02177 } 02178 02179 // Check the next fill 02180 pAttrNode = AttrFillGeometry::FindNextSelectedAttr(CC_RUNTIME_CLASS(AttrTranspFillGeometry)); 02181 } 02182 02183 BROADCAST_TO_ALL(SelChangingMsg(SelChangingMsg::COLOURATTCHANGED)); 02184 }
|
|
Reimplemented from DragTool. Definition at line 392 of file filltool.h. |
|
Definition at line 401 of file filltool.h. |
|
Definition at line 416 of file filltool.h. |
|
Definition at line 398 of file filltool.h. |
|
Definition at line 421 of file filltool.h. |
|
Definition at line 420 of file filltool.h. |
|
Reimplemented from DragTool. Definition at line 389 of file filltool.h. |
|
Definition at line 409 of file filltool.h. |
|
Definition at line 396 of file filltool.h. |
|
Definition at line 424 of file filltool.h. |
|
Definition at line 422 of file filltool.h. |
|
Definition at line 412 of file filltool.h. |
|
Definition at line 413 of file filltool.h. |
|
Definition at line 418 of file filltool.h. |
|
Definition at line 414 of file filltool.h. |
|
Reimplemented from DragTool. Definition at line 391 of file filltool.h. |
|
Definition at line 406 of file filltool.h. |
|
Definition at line 402 of file filltool.h. |
|
Definition at line 403 of file filltool.h. |
|
Reimplemented from DragTool. Definition at line 390 of file filltool.h. |