BevelInfoBarOp Class Reference

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

#include <bevinfo.h>

Inheritance diagram for BevelInfoBarOp:

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

Public Member Functions

 BevelInfoBarOp ()
 Sets the info bars vars to NULL defaults.
MsgResult Message (Msg *Msg)
 Takes a look at the message and if it is for me it responds to it. Here the scroll bar for the freehand tool is Created and closed. It also responds to changes in the sliders position and tells the freehand tool to set its smoothing factor to something appropriate.
void SetToolActiveState (BOOL IsToolActive)
 Allows the info bar to know if it is valid or not.
void SetRetroState (BOOL CanRetroFit)
 Sets the Flag CanRetroFit and gets the infobar to redraw the static text item that says this.
void SetRetroString ()
 Sets the static text item in the freehand info bar to say either 'Retro' or nothing, depending on the state of the flag CanRetroFit.
virtual void UpdateState ()
 Sets the state of button on the bar to keep them up to date.
void UpdateControls ()
 Updates the controls on the info bar.
void SliderUpdate (BOOL bIntoVariables, BOOL bTestMany=TRUE)
 Updates the variables in me depending on the slider position.
void DoBevel ()
 Does the business with the bevelling !
void SetUpBevelInfo (BevelInfo *pBevelInfo)
 Initialises the bevel info class based on the dialog's settings.
void BeginDrag (BevelBlob *pBlob)
 starts the drag on a particular blob Notes: Called by the BevelTool when the user begins a drag on a bevel blob arrowhead
void DragPointerMove (DocCoord PointerPos, ClickModifiers ClickMods, Spread *pSpread, BOOL bSolidDrag)
 Deals with pointer movement messages whilst dragging.
void DragFinished (DocCoord PointerPos, ClickModifiers ClickMods, Spread *pSpread, BOOL Success, BOOL bSolidDrag)
 Finishes or quits the dragging.
BOOL AmDragging ()
BOOL AmDraggingSlider ()
void UpdateInnerOuterButtons (BOOL bMany, BOOL bOuter, BOOL bNoSelection)
 Updates the inner / outer buttons on the info bar.
MILLIPOINT GetSliderDepth ()
 Sets the slider for depth settings (logarithmic).
void SetSliderDepth (MILLIPOINT Depth)
 Sets the slider for depth settings (logarithmic).

Static Public Member Functions

static BevelInfoBarOpGetCurrentBevelInfoBar ()

Public Attributes

BevelTool * pTool
BOOL CanRetroFit
BOOL ControlsExist
INT32 m_Depth
INT32 m_LightAngle
INT32 m_Contrast
INT32 m_SliderComboIndex
INT32 m_LightTilt
BOOL m_BetweenViews

Static Public Attributes

static BevelInfoBarOppCurrentBar = NULL

Private Member Functions

BOOL ConvertValueToString (String_256 &In, const INT32 value, UnitType type=NOTYPE)
 TRUE if the function was able to convert the INT32 to a string.
BOOL ConvertStringToValue (CGadgetID ID, INT32 &value)
 TRUE if the function was able to convert the INT32 to a string See Also: ShadowBarOp::ConvertStringToValue().
void HandleBevelTypeChanged ()
 Updates the bevel type.
void HandleSliderChanged ()
 Updates the bevel type.
void HandleBevelDirectionChanged ()
 Updates the bevel direction.
void HandleBevelDirectionsToInner ()
 Updates the bevel direction.
void HandleBevelDirectionsToOuter ()
 Updates the bevel direction.
void HandleJoinTypeMitreClicked ()
 Handles the user clicking on the mitre join-type button on our infobar.
void HandleJoinTypeRoundClicked ()
 Handles the user clicking on the round join-type button on our infobar.
void HandleJoinTypeBevelClicked ()
 Handles the user clicking on the bevel join-type button on our infobar.
void ChangeJoinType (JointType jt)
 Apply the given join type to the selection.
void UpdateJoinTypeControls ()
 Update our infobar join type buttons. This method is currently called only in response to a SelChanging message.
void EnableDisableJoinTypeControls ()
 Enable/disable the join type buttons on the info bar, according to the contents of the selection.
void RedrawBlobs (BOOL bAngle=TRUE, BOOL bTilt=FALSE)
 Redraws the object blobs.
void SetBlobNodesAngle (INT32 Angle)
void DoBevelAttrChange (BevelInfo *pBI)
 Applies the attributes to the selection.
void LoadBevelTypeComboStrings (BOOL bMany)
 Loads the values into the bevel type combo.
void LoadBevelDirectionComboStrings (BOOL bMany)
 Loads the values into the bevel type combo.

Private Attributes

BOOL m_bControlsEnabled
BOOL m_bComboChanged
BevelBlob * m_pDragBlob
INT32 m_BlobAngle
BOOL m_bAmDragging
BOOL m_bUserSet
INT32 m_UserIndent
BOOL m_bButtonIsInner
BOOL m_bButtonIsOuter
BOOL m_bAmDraggingSlider
MILLIPOINT m_LastDragWidth

Detailed Description

Class for handling the Bevel tool's information bar.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/2/99

Definition at line 119 of file bevinfo.h.


Constructor & Destructor Documentation

BevelInfoBarOp::BevelInfoBarOp  ) 
 

Sets the info bars vars to NULL defaults.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/8/94

Definition at line 222 of file bevinfo.cpp.

00223 {
00224     DlgResID = _R(IDD_BEVELINFOBAR);
00225     // The Controls hasve not been created yet
00226     ControlsExist = FALSE;
00227     
00228     // variable to stop controls from flickering
00229     m_bControlsEnabled = FALSE;
00230 
00231     // slider values
00232     m_Depth = 0;
00233     m_LightAngle = 0;
00234     m_Contrast = 100;
00235     m_SliderComboIndex = 1;
00236     m_bComboChanged = FALSE;
00237     m_bAmDragging = FALSE;
00238     m_pDragBlob = NULL;
00239     m_BlobAngle = 0;
00240     m_bUserSet = FALSE;
00241     m_UserIndent = FALSE;
00242     m_bButtonIsInner = FALSE;
00243     m_bButtonIsOuter = FALSE;
00244     m_bAmDraggingSlider = FALSE;
00245     pTool = NULL;
00246     CanRetroFit = FALSE;
00247     m_LightTilt = 0;
00248     m_LastDragWidth = 0;
00249     m_BetweenViews = FALSE;
00250 }


Member Function Documentation

BOOL BevelInfoBarOp::AmDragging  )  [inline]
 

Definition at line 182 of file bevinfo.h.

00182 { return m_bAmDragging; }

BOOL BevelInfoBarOp::AmDraggingSlider  )  [inline]
 

Definition at line 185 of file bevinfo.h.

00185 { return m_bAmDraggingSlider; }

void BevelInfoBarOp::BeginDrag BevelBlob *  pBlob  ) 
 

starts the drag on a particular blob Notes: Called by the BevelTool when the user begins a drag on a bevel blob arrowhead

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 2379 of file bevinfo.cpp.

02380 {
02381     if (!pBlob)
02382     {
02383         ERROR3("BevelInfoBarOp::BeginDrag - blob passed in is NULL");
02384         return;
02385     }
02386     
02387     m_pDragBlob = pBlob;
02388     m_bAmDragging = TRUE;
02389     m_BlobAngle = pBlob->GetAngle();
02390 
02391     StartDrag( DRAGTYPE_AUTOSCROLL );
02392 }

void BevelInfoBarOp::ChangeJoinType JointType  jt  )  [private]
 

Apply the given join type to the selection.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
11 September 2000
Parameters:
jt the join type to apply to the selection. [INPUTS]
An attribute describing the given join type is applied to the selection. [OUTPUTS]
Returns:
Errors: Shows a warning if we run out of memory.
See also: AttributeManager::AttributeSelected().

Definition at line 2157 of file bevinfo.cpp.

02158 {
02159         // update my variables first
02160     BevelInfo BI;
02161     
02162     SetUpBevelInfo(&BI);
02163 
02164     BI.m_bJointTypeChanged = TRUE;
02165     BI.m_JointType = jt;
02166 
02167     // check for zero selection
02168     Range               Sel(*(GetApplication()->FindSelection()));  
02169     RangeControl        rg = Sel.GetRangeControlFlags();
02170     rg.PromoteToParent = TRUE;
02171     Sel.SetRangeControl(rg);
02172 
02173     AttrJoinType*       pJoinType = NULL;
02174     if (Sel.IsEmpty())
02175     {
02176         // do the default attribute
02177         pJoinType = new AttrJoinType;
02178 
02179         if (!pJoinType)
02180         {
02181             ERROR3("Can't create bevel indent");
02182             return;
02183         }
02184 
02185         pJoinType->Value.JoinType = BI.m_JointType;
02186 
02187         AttributeManager::AttributeSelected( pJoinType );
02188         return;
02189     }
02190 
02191     // get the operation descriptor for the bevel change
02192     DoBevelAttrChange(&BI);
02193 }

BOOL BevelInfoBarOp::ConvertStringToValue CGadgetID  ID,
INT32 &  Value
[private]
 

TRUE if the function was able to convert the INT32 to a string See Also: ShadowBarOp::ConvertStringToValue().

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
The value to convert to a string (In) [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 1522 of file bevinfo.cpp.

01523 {
01524     String_64 Str;
01525     Str.Load(_R(IDS_BEVELSTRING_MANY));
01526 
01527     BOOL Valid = FALSE; // True when a value has been converted
01528 
01529     Spread * CurrentSpread = Document::GetSelectedSpread();
01530 
01531     DimScale* pDimScale = NULL;
01532     String_128 FieldContents;
01533     String_128 NumberString;
01534     INT32 i = 0;
01535     BOOL bUpdate = FALSE;
01536 
01537     // find out if it reads 'many'
01538     FieldContents = GetStringGadgetValue(ID, &Valid);
01539 
01540     if (Str == FieldContents)
01541         return FALSE;
01542 
01543     if (CurrentSpread != NULL)
01544     {
01545         // Get the dimension scaling object (units) associated with the given spread
01546         // and convert to its units.
01547         switch (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)))
01548         {
01549         case 0:
01550             // depth
01551             pDimScale = DimScale::GetPtrDimScale((Node*) CurrentSpread);
01552             //String_128 FieldContents = GetStringGadgetValue(_R(IDC_SOFTSHADOWCENTRE_EDIT_X), &Valid);
01553             FieldContents = GetStringGadgetValue(ID, &Valid);
01554             Valid = pDimScale->ConvertToMillipoints(FieldContents, &Value);
01555 
01556             if (Value > BEVEL_DEPTH_MAX)
01557                 Value = BEVEL_DEPTH_MAX;
01558             break;
01559         case 1:
01560             FieldContents = GetStringGadgetValue(ID, &Valid);
01561             
01562             for (i = 0 ; i < FieldContents.Length(); i++)
01563             {
01564                 if (FieldContents[i] >= '0' && FieldContents[i] <= '9')
01565                 {
01566                     NumberString += FieldContents[i];
01567                 }
01568                 else
01569                 {
01570                     i = FieldContents.Length();
01571                 }
01572             }
01573             
01574             SetStringGadgetValue(ID, NumberString);
01575             Value = GetLongGadgetValue(ID, BEVEL_CONTRAST_MIN, BEVEL_CONTRAST_MAX);
01576             SetStringGadgetValue(ID, FieldContents);
01577             break;
01578         case 2:
01579         case 3:
01580             FieldContents = GetStringGadgetValue(ID, &Valid);
01581             
01582             for (i = 0 ; i < FieldContents.Length(); i++)
01583             {
01584                 if (FieldContents[i] >= '0' && FieldContents[i] <= '9')
01585                 {
01586                     NumberString += FieldContents[i];
01587                 }
01588                 else
01589                 {
01590                     // deal with a negative angle
01591                     if (i == 0 && FieldContents[i] == '-')
01592                     {
01593                         NumberString += FieldContents[i];
01594                     }
01595                     else
01596                     {                       
01597                         i = FieldContents.Length();
01598                     }
01599                 }
01600             }
01601             
01602             SetStringGadgetValue(ID, NumberString);
01603             Value = GetLongGadgetValue(ID, -1000, 1000);
01604             
01605             while (Value < BEVEL_LIGHTANGLE_MIN)
01606             {
01607                 bUpdate = TRUE;
01608                 Value += 360;
01609             }
01610             
01611             while (Value > BEVEL_LIGHTANGLE_MAX)
01612             {
01613                 bUpdate = TRUE;
01614                 Value -= 360;
01615             }
01616             
01617             if (!bUpdate)
01618             {
01619                 SetStringGadgetValue(ID, FieldContents);
01620             }
01621             else
01622             {
01623                 SetLongGadgetValue(ID, Value);
01624                 NumberString = GetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT));
01625                 NumberString += _T(" ");
01626                 SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
01627                     NumberString);
01628             }       
01629             
01630             break;
01631         }
01632     }
01633     else
01634     { 
01635         //TODO ??
01636     }
01637     
01638     return Valid;
01639 }

BOOL BevelInfoBarOp::ConvertValueToString String_256 In,
const INT32  value,
UnitType  type = NOTYPE
[private]
 

TRUE if the function was able to convert the INT32 to a string.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/12/96
Parameters:
The value to convert to a string (In) [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 1483 of file bevinfo.cpp.

01484 {
01485     BOOL Converted = FALSE; // True when a value has been converted
01486     
01487     Spread * CurrentSpread = Document::GetSelectedSpread();
01488 
01489     if (CurrentSpread)
01490     {
01491         // Get the dimension scaling object (units) associated with the given spread
01492         // and convert to its units.
01493         DimScale* pDimScale = DimScale::GetPtrDimScale((Node*) CurrentSpread);
01494         pDimScale->ConvertToUnits((INT32)value , &In);
01495         Converted = TRUE;
01496     }
01497 
01498     if (In.Length() == 0)
01499     {
01500         In = _T("0");
01501     }
01502 
01503     return Converted;
01504         
01505 }

void BevelInfoBarOp::DoBevel  ) 
 

Does the business with the bevelling !

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/1/99
Parameters:
- [INPUTS]

Definition at line 1019 of file bevinfo.cpp.

01020 {
01021     // create a bevel
01022     BevelInfo BI;
01023 
01024     OpDescriptor* pOpDesc = NULL;
01025 
01026     if(m_Depth == 0)
01027     {
01028         SetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO),0);
01029     }
01030 
01031     BI.m_BevelType = BevelTypes[GetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO))].TypeNum;
01032     BI.m_bBevelTypeChanged = TRUE;
01033     BI.m_LightAngle = m_LightAngle;
01034     BI.m_Indent = m_Depth;
01035 
01036     if (pTool->AreManyBevelTypes())
01037     {
01038         // ok, 'many' is selected so alter the type accordingly
01039         BI.m_BevelType = BevelTypes[GetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO)) - 1].TypeNum;
01040     }
01041 
01042     TRACEUSER( "DavidM", _T("Bevel type change %d\n"), BI.m_BevelType);
01043 
01044     BlobManager* BlobMgr = GetApplication()->GetBlobManager();
01045 
01046     BI.m_bOuter = GetBoolGadgetSelected(_R(IDC_BTN_BEVELOUTER));
01047     BI.m_Contrast   = m_Contrast;
01048     BI.m_bCreateNewBevels = TRUE;
01049 
01050     Spread * pSpread = Document::GetSelectedSpread();
01051 
01052     if (BI.m_BevelType >= 0)
01053     {
01054         pOpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(OpCreateBevel));
01055         
01056         if (pTool && pSpread && BlobMgr)
01057         {
01058             pTool->RenderToolBlobs(pSpread, NULL);
01059             pTool->SetBlobRendering(FALSE);
01060         }
01061         
01062         if (pOpDesc)
01063         {
01064             pOpDesc->Invoke(&BI);
01065         }
01066 
01067         if (pTool && pSpread && BlobMgr)
01068         {
01069             pTool->SetupBlobList();
01070             pTool->SetBlobRendering(TRUE);
01071             pTool->RenderToolBlobs(pSpread, NULL);
01072         }
01073     }
01074     else
01075     {
01076         // do a remove bevel operation !
01077         // tell my tool to remove its blobs
01078         pOpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(OpRemoveBevel));
01079         
01080         // tell my tool to update its blobs
01081     
01082         if (pTool && pSpread && BlobMgr)
01083         {
01084             // turn off all the tool blobs
01085             pTool->RenderToolBlobs(pSpread, NULL);
01086             pTool->SetBlobRendering(FALSE);
01087         }   
01088     
01089         if (pOpDesc)
01090         {
01091             pOpDesc->Invoke();
01092         }
01093 
01094         if (pTool && pSpread && BlobMgr)
01095         {
01096             pTool->SetBlobRendering(TRUE);
01097             pTool->SetupBlobList();
01098             pTool->RenderToolBlobs(pSpread, NULL);
01099         }   
01100     
01101     }
01102 
01103     UpdateControls();
01104 }

void BevelInfoBarOp::DoBevelAttrChange BevelInfo *  pBevParam  )  [private]
 

Applies the attributes to the selection.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 1680 of file bevinfo.cpp.

01681 {
01682     // use the create bevel (which is kinda an universal function) to change all the
01683     // indents in the selection
01684     Spread * pSpread = Document::GetSelectedSpread();
01685 
01686     pBevParam->m_bCreateNewBevels = FALSE;
01687 
01688     // render the tool blobs off
01689     if (pTool && pSpread)
01690     {
01691         pTool->RenderToolBlobs(pSpread, NULL);
01692         pTool->SetBlobRendering(FALSE);
01693     }       
01694 
01695     OpDescriptor * pOpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(OpCreateBevel));
01696     
01697     if (pOpDesc)
01698     {
01699         pOpDesc->Invoke(pBevParam);
01700     }   
01701 
01702     // render them back on
01703     // render the tool blobs off
01704     if (pTool && pSpread)
01705     {
01706         pTool->SetBlobRendering(TRUE);
01707         pTool->SetupBlobList();
01708         pTool->RenderToolBlobs(pSpread, NULL);
01709     }       
01710 
01711     
01712 }

void BevelInfoBarOp::DragFinished DocCoord  PointerPos,
ClickModifiers  ClickMods,
Spread pSpread,
BOOL  Success,
BOOL  bSolidDrag
[virtual]
 

Finishes or quits the dragging.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Reimplemented from Operation.

Definition at line 2452 of file bevinfo.cpp.

02454 {
02455     if (!pTool || !m_pDragBlob)
02456     {
02457         EndDrag();
02458         return;
02459     }
02460     
02461 //  AttrBevelLightAngle * pAttr = NULL;
02462 //  NodeListItem * pItem = NULL;
02463 
02464     BlobManager* pBlobMgr = GetApplication()->GetBlobManager();
02465 
02466     if (!pBlobMgr)
02467     {
02468         ERROR3("DragFinished - no blob manager\n");
02469         return;
02470     }
02471 
02472     OpDescriptor * pOpDesc = NULL;
02473 
02474     OpChangeLightAnglesParam Param;
02475     
02476     if (!Success)
02477     {
02478         // user clicked ESC or some other reason for the drag to not complete properly
02479         // restore the blob's angle
02480         pTool->RenderBlob(m_pDragBlob);
02481         m_pDragBlob->SetAngle(m_BlobAngle);
02482 
02483         // re-render the bitmaps back to what they were
02484         NodeListItem * pItem = (NodeListItem *)m_pDragBlob->GetList()->GetHead();
02485 
02486         Document * pDoc = Document::GetCurrent();
02487 
02488         while (pItem)
02489         {
02490             ((NodeBevelController *)pItem->pNode)->RegenerateNode(NULL, FALSE);
02491             ((NodeBevelController *)pItem->pNode)->ReleaseCached();
02492 
02493             pItem = (NodeListItem *)m_pDragBlob->GetList()->GetNext(pItem);
02494         }
02495         
02496         if (pDoc)
02497         {
02498             if (pSpread)
02499             {
02500                 pDoc->ForceRedraw(pSpread, 
02501                     m_pDragBlob->GetRect());
02502             }
02503             else
02504             {
02505                 pSpread = Document::GetSelectedSpread();
02506 
02507                 pDoc->ForceRedraw(pSpread, 
02508                     m_pDragBlob->GetRect());
02509             }
02510         }       
02511 
02512         pTool->RenderBlob(m_pDragBlob);
02513 
02514         // GetApplication()->ServiceRendering();
02515     }
02516     else
02517     {
02518         // success ! replace all attributes in the blob's list with the new angle
02519         // get the operation descriptor for the bevel change
02520         pOpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(OpChangeBevelLightAngle));
02521 
02522         Param.pNodes         = m_pDragBlob->GetList();
02523         Param.NewLightAngle  = m_pDragBlob->GetAngle();
02524         Param.OldLightAngle  = m_BlobAngle;
02525 
02526         if (pTool)
02527         {
02528             pTool->RenderToolBlobs(pSpread, NULL);
02529             pTool->SetBlobRendering(FALSE);
02530         }
02531 
02532         // invoke the op
02533         if (pOpDesc)
02534         {
02535             pOpDesc->Invoke(&Param);
02536         }
02537         
02538         if (pTool)
02539         {
02540             pTool->SetBlobRendering(TRUE);
02541             pTool->SetupBlobList();
02542             pTool->RenderToolBlobs(pSpread, NULL);
02543         }
02544     }
02545 
02546     m_bAmDragging = FALSE;
02547 
02548     EndDrag();
02549 }

void BevelInfoBarOp::DragPointerMove DocCoord  PointerPos,
ClickModifiers  ClickMods,
Spread pSpread,
BOOL  bSolidDrag
[virtual]
 

Deals with pointer movement messages whilst dragging.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Reimplemented from Operation.

Definition at line 2409 of file bevinfo.cpp.

02411 {
02412     // first, render my blob off
02413     if (!pTool || !m_pDragBlob)
02414         return;
02415 
02416     // now, get the blob to recalculate its angle
02417     m_pDragBlob->CalculateAngle(PointerPos, ClickMods.Constrain);
02418 
02419     m_pDragBlob->RenderNodes();
02420 
02421     Document * pDoc = Document::GetCurrent();
02422 
02423     if (pDoc)
02424     {
02425         pDoc->ForceRedraw(pSpread, m_pDragBlob->GetRect());
02426     }
02427     
02428     GetApplication()->ServiceRendering();
02429     
02430     // update our controls
02431 //  m_LightAngle = m_pDragBlob->GetAngle();
02432     m_LightAngle = BEVEL_LIGHTANGLE_MAX - m_pDragBlob->GetAngle();
02433 
02434     SliderUpdate(FALSE);
02435 }

void BevelInfoBarOp::EnableDisableJoinTypeControls  )  [private]
 

Enable/disable the join type buttons on the info bar, according to the contents of the selection.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
12 September 2000

Definition at line 2297 of file bevinfo.cpp.

02298 {
02299     // our join type buttons act only upon the selection.
02300     SelRange* pSel = GetApplication()->FindSelection();
02301     if (pSel == NULL || pSel->IsEmpty())
02302     {
02303         EnableGadget(_R(IDC_BEVELJOINTYPEMITRE), FALSE);
02304         EnableGadget(_R(IDC_BEVELJOINTYPEROUND), FALSE);
02305         EnableGadget(_R(IDC_BEVELJOINTYPEBEVEL), FALSE);
02306     }
02307     else
02308     {
02309         EnableGadget(_R(IDC_BEVELJOINTYPEMITRE), TRUE);
02310         EnableGadget(_R(IDC_BEVELJOINTYPEROUND), TRUE);
02311         EnableGadget(_R(IDC_BEVELJOINTYPEBEVEL), TRUE);
02312     }
02313 }

static BevelInfoBarOp* BevelInfoBarOp::GetCurrentBevelInfoBar  )  [inline, static]
 

Definition at line 168 of file bevinfo.h.

00168 { return pCurrentBar; }

MILLIPOINT BevelInfoBarOp::GetSliderDepth  ) 
 

Sets the slider for depth settings (logarithmic).

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/7/99
Parameters:
[INPUTS] 
Depth in millipoints [OUTPUTS]
Returns:
-

Definition at line 2705 of file bevinfo.cpp.

02706 {
02707     SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_DEPTH_MIN, BEVEL_DEPTH_MAX);
02708     MILLIPOINT Value = GetLongGadgetValue(_R(IDC_BEVELSLIDER), BEVEL_DEPTH_MIN,
02709         BEVEL_DEPTH_MAX);
02710     
02711     // make the value appear between 0 and 1
02712     if (Value > BEVEL_DEPTH_MAX)
02713         Value = BEVEL_DEPTH_MAX;
02714 
02715     double dValue = Value - BEVEL_DEPTH_MIN;
02716     dValue /= (double)(BEVEL_DEPTH_MAX - BEVEL_DEPTH_MIN);
02717     // dValue = 1.0 - dValue;
02718 
02719     // change the profile
02720     BevelSliderProfile.SetBias(-BevelSliderProfile.GetBias());
02721     double dSliderValue = BevelSliderProfile.MapZeroToOne((AFp)dValue);
02722     BevelSliderProfile.SetBias(-BevelSliderProfile.GetBias());
02723         
02724     dSliderValue *= (double)(BEVEL_DEPTH_MAX - BEVEL_DEPTH_MIN);
02725     dSliderValue += BEVEL_DEPTH_MIN;
02726 
02727     return (INT32)dSliderValue;
02728 }

void BevelInfoBarOp::HandleBevelDirectionChanged  )  [private]
 

Updates the bevel direction.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 1983 of file bevinfo.cpp.

01984 {
01985     // check for 'many' being selected
01986     /*
01987     if (pTool->AreManyBevelDirections())
01988     {
01989         if (GetSelectedValueIndex(_R(IDC_BEVEL_INNER_COMBO)) == 0)
01990         {
01991             // do nothing - '<Many>' has been selected again
01992             return;
01993         }
01994     }
01995     */
01996     
01997     // update my variables first
01998     BevelInfo BI;
01999     
02000     SetUpBevelInfo(&BI);
02001 
02002     BI.m_bBevelDirectionChanged = TRUE;
02003 
02004     // check for zero selection
02005     Range Sel(*(GetApplication()->FindSelection()));
02006     RangeControl rg = Sel.GetRangeControlFlags();
02007     rg.PromoteToParent = TRUE;
02008     Sel.SetRangeControl(rg);
02009 
02010     AttrBevelIndent * pIndent = NULL;
02011     if (Sel.IsEmpty())
02012     {
02013         // do the default attribute
02014         pIndent = new AttrBevelIndent;
02015 
02016         if (!pIndent)
02017         {
02018             ERROR3("Can't create bevel indent");
02019             return;
02020         }
02021 
02022         pIndent->Value.m_Indent = BI.m_Indent;
02023 
02024         m_bUserSet = TRUE;
02025         m_UserIndent = BI.m_Indent;
02026 
02027         if (BI.m_bOuter)
02028         {
02029             pIndent->Value.m_Indent = -BI.m_Indent;
02030             m_UserIndent = -m_UserIndent;
02031         }
02032 
02033         AttributeManager::AttributeSelected(pIndent);
02034 
02035         return;
02036     }
02037 
02038     // get the operation descriptor for the bevel change
02039     DoBevelAttrChange(&BI);
02040 }

void BevelInfoBarOp::HandleBevelDirectionsToInner  )  [private]
 

Updates the bevel direction.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 1920 of file bevinfo.cpp.

01921 {
01922     // update my variables first
01923     BevelInfo BI;
01924     
01925     SetUpBevelInfo(&BI);
01926 
01927     BI.m_bBevelDirectionChanged = TRUE;
01928     BI.m_bOuter = FALSE;
01929 
01930     // check for zero selection
01931     Range Sel(*(GetApplication()->FindSelection()));    
01932     RangeControl rg = Sel.GetRangeControlFlags();
01933     rg.PromoteToParent = TRUE;
01934     Sel.SetRangeControl(rg);
01935 
01936     AttrBevelIndent * pIndent = NULL;
01937     if (Sel.IsEmpty())
01938     {
01939         // do the default attribute
01940         pIndent = new AttrBevelIndent;
01941         if (!pIndent)
01942         {
01943             ERROR3("Can't create bevel indent");
01944             return ;
01945         }
01946 
01947         pIndent->Value.m_Indent = BI.m_Indent;
01948 
01949         m_bUserSet = TRUE;
01950         m_UserIndent = BI.m_Indent;
01951 
01952         if (BI.m_bOuter)
01953         {
01954             pIndent->Value.m_Indent = -BI.m_Indent;
01955             m_UserIndent = -m_UserIndent;
01956         }
01957 
01958         AttributeManager::AttributeSelected(pIndent);
01959 
01960         return;
01961     }
01962 
01963     // get the operation descriptor for the bevel change
01964     DoBevelAttrChange(&BI);
01965 }

void BevelInfoBarOp::HandleBevelDirectionsToOuter  )  [private]
 

Updates the bevel direction.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 1859 of file bevinfo.cpp.

01860 {
01861         // update my variables first
01862     BevelInfo BI;
01863     
01864     SetUpBevelInfo(&BI);
01865 
01866     BI.m_bBevelDirectionChanged = TRUE;
01867     BI.m_bOuter = TRUE;
01868 
01869     // check for zero selection
01870     Range Sel(*(GetApplication()->FindSelection()));    
01871     RangeControl rg = Sel.GetRangeControlFlags();
01872     rg.PromoteToParent = TRUE;
01873     Sel.SetRangeControl(rg);
01874 
01875     AttrBevelIndent * pIndent = NULL;
01876     if (Sel.IsEmpty())
01877     {
01878         // do the default attribute
01879         pIndent = new AttrBevelIndent;
01880 
01881         if (!pIndent)
01882         {
01883             ERROR3("Can't create bevel indent");
01884             return;
01885         }
01886 
01887         pIndent->Value.m_Indent = BI.m_Indent;
01888 
01889         m_bUserSet = TRUE;
01890         m_UserIndent = BI.m_Indent;
01891 
01892         if (BI.m_bOuter)
01893         {
01894             pIndent->Value.m_Indent = -BI.m_Indent;
01895             m_UserIndent = -m_UserIndent;
01896         }
01897 
01898         AttributeManager::AttributeSelected(pIndent);
01899 
01900         return;
01901     }
01902 
01903     // get the operation descriptor for the bevel change
01904     DoBevelAttrChange(&BI);
01905 
01906 }

void BevelInfoBarOp::HandleBevelTypeChanged  )  [private]
 

Updates the bevel type.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 1654 of file bevinfo.cpp.

01655 {
01656     if (!pTool)
01657         return;
01658     
01659     if(m_Depth == 0)
01660     {
01661         m_Depth = 3000;
01662         SetBoolGadgetSelected(_R(IDC_BTN_BEVELOUTER),TRUE);
01663     }
01664 
01665     DoBevel();
01666 }

void BevelInfoBarOp::HandleJoinTypeBevelClicked  )  [private]
 

Handles the user clicking on the bevel join-type button on our infobar.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
08 September 2000
Parameters:
We ensure that all objects in the selection have a bevel join type. [OUTPUTS]
Notes: This method assumes that an object must have a join type; ie if none of the other join types apply to the selection, then the whole selection must have this join type, so there is no point in reapplying it in this case.

Definition at line 2125 of file bevinfo.cpp.

02126 {
02127     BOOL fRound = GetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEROUND));
02128     BOOL fMitre = GetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEMITRE));
02129 
02130     // only bother changing to a mitre join type if any selected objects
02131     // use the other join types.
02132     if (fRound || fMitre)
02133         ChangeJoinType(BevelledJoin);
02134     else
02135         SetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEBEVEL), TRUE);
02136 }

void BevelInfoBarOp::HandleJoinTypeMitreClicked  )  [private]
 

Handles the user clicking on the mitre join-type button on our infobar.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
08 September 2000
Parameters:
We ensure that all objects in the selection have a mitre join type. [OUTPUTS]
Notes: This method assumes that an object must have a join type; ie if none of the other join types apply to the selection, then the whole selection must have this join type, so there is no point in reapplying it in this case.

Definition at line 2061 of file bevinfo.cpp.

02062 {
02063     BOOL fRound = GetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEROUND));
02064     BOOL fBevel = GetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEBEVEL));
02065 
02066     // only bother changing to a mitre join type if any selected objects
02067     // use the other join types.
02068     if (fRound || fBevel)
02069         ChangeJoinType(MitreJoin);
02070     else
02071         SetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEMITRE), TRUE);
02072 }

void BevelInfoBarOp::HandleJoinTypeRoundClicked  )  [private]
 

Handles the user clicking on the round join-type button on our infobar.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
08 September 2000
Parameters:
We ensure that all objects in the selection have a round join type. [OUTPUTS]
Notes: This method assumes that an object must have a join type; ie if none of the other join types apply to the selection, then the whole selection must have this join type, so there is no point in reapplying it in this case.

Definition at line 2093 of file bevinfo.cpp.

02094 {
02095     BOOL fMitre = GetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEMITRE));
02096     BOOL fBevel = GetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEBEVEL));
02097 
02098     // only bother changing to a mitre join type if any selected objects
02099     // use the other join types.
02100     if (fMitre || fBevel)
02101         ChangeJoinType(RoundJoin);
02102     else
02103         SetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEROUND), TRUE);
02104 }

void BevelInfoBarOp::HandleSliderChanged  )  [private]
 

Updates the bevel type.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 1727 of file bevinfo.cpp.

01728 {
01729     // has the edit field got 'many' in it ? if so, exit
01730     String_64 Str;
01731 
01732     // find out if the selection is null
01733     Range Sel(*(GetApplication()->FindSelection()));
01734     RangeControl rg = Sel.GetRangeControlFlags();
01735     rg.PromoteToParent = TRUE;
01736     Sel.SetRangeControl(rg);
01737 
01738     // update sliders & member variables first
01739     BevelInfo BI;
01740     
01741     SetUpBevelInfo(&BI);
01742 
01743 //  AttrBevelIndent     *pIndent      = NULL;
01744 //  AttrBevelType       *pType        = NULL;
01745 //  AttrBevelContrast   * pContrast   = NULL;
01746 //  AttrBevelLightAngle * pLightAngle = NULL;
01747 
01748     switch (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)))
01749     {
01750     case 0:
01751         // are there no bevels in the selection ? if so, make it an outer flat bevel
01752         if (!(NodeBevelController::SelectionHasBevelNode() ||
01753             NodeBevelController::SelectionHasBevelInkNode()) ||
01754             m_Depth == 0)
01755         {
01756             if(m_Depth > 0 && BevelTypes[GetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO))].TypeNum == -1)
01757             {
01758                 SetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO),1);
01759                 UpdateInnerOuterButtons(FALSE,TRUE,FALSE);
01760             }
01761 
01762             DoBevel();
01763             return;
01764         }
01765         
01766         // the depth/indent setting
01767         BI.m_bBevelIndentChanged = TRUE;
01768         m_bUserSet = TRUE;
01769         m_UserIndent = BI.m_Indent;
01770         
01771         if (BI.m_bOuter)
01772         {
01773             m_UserIndent = -m_UserIndent;
01774         }
01775         
01776         break;
01777     case 1:
01778         // the contrast setting
01779         BI.m_bBevelContrastChanged = TRUE;
01780         break;
01781     case 2:
01782         BI.m_bBevelLightAngleChanged = TRUE;
01783         break;
01784     case 3:
01785         BI.m_bBevelLightTiltChanged = TRUE;
01786         break;
01787     default:
01788         ERROR3("Bevel infobar slider combo has invalid value");
01789         return;
01790     }   
01791     
01792     // render the blobs off
01793 //  Spread * pSpread = Document::GetSelectedSpread();
01794 
01795     DoBevelAttrChange(&BI); 
01796 }

void BevelInfoBarOp::LoadBevelDirectionComboStrings BOOL  bMany  )  [private]
 

Loads the values into the bevel type combo.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/7/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 2607 of file bevinfo.cpp.

02608 {
02609     // first, clear the combo
02610     /*
02611     DeleteAllValues( _R(IDC_BEVEL_INNER_COMBO));
02612     
02613     // now load in the combo text entries
02614     String_64 Str;
02615 
02616     INT32 Offset = 0;
02617 
02618     // have we a many ??
02619     if (bMany)
02620     {
02621         Str.Load( _R(IDS_BEVELSTRING_MANY) );
02622         SetStringGadgetValue(_R(IDC_BEVEL_INNER_COMBO), &Str, TRUE, 0);
02623         Offset = 1;
02624     }
02625                 
02626     // load the direction combo strings
02627     for (INT32 i=0; i<NumInnerTypes; i++)
02628     {
02629         Str.Load( InnerTypes[i] );
02630         SetStringGadgetValue(_R(IDC_BEVEL_INNER_COMBO), &Str, TRUE, i + Offset);
02631     }
02632                 
02633     SetComboListLength(_R(IDC_BEVEL_INNER_COMBO));              
02634     */
02635 }

void BevelInfoBarOp::LoadBevelTypeComboStrings BOOL  bMany  )  [private]
 

Loads the values into the bevel type combo.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/7/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 2565 of file bevinfo.cpp.

02566 {
02567     // first, clear the combo
02568     DeleteAllValues( _R(IDC_BEVEL_TYPE_COMBO));
02569     
02570     // now load in the combo text entries
02571     String_64 Str;
02572 
02573     INT32 Offset = 0;
02574 
02575     // have we a many ??
02576     if (bMany)
02577     {
02578         Str.Load( _R(IDS_BEVELSTRING_MANY) );
02579         SetStringGadgetValue(_R(IDC_BEVEL_TYPE_COMBO), Str, TRUE, 0);
02580         Offset = 1;
02581     }
02582                 
02583     // load the bevel types
02584     for ( INT32 i=0; i<NumBevelTypes; i++ )
02585     {
02586         Str.Load( BevelTypes[i].StringID );
02587         SetStringGadgetValue(_R(IDC_BEVEL_TYPE_COMBO), Str, TRUE, i + Offset);
02588     }
02589                 
02590     SetComboListLength(_R(IDC_BEVEL_TYPE_COMBO));
02591 }

MsgResult BevelInfoBarOp::Message Msg Message  )  [virtual]
 

Takes a look at the message and if it is for me it responds to it. Here the scroll bar for the freehand tool is Created and closed. It also responds to changes in the sliders position and tells the freehand tool to set its smoothing factor to something appropriate.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/5/94
Parameters:
Message - A dialog message [INPUTS]
Returns:
The result of the message

Reimplemented from InformationBarOp.

Definition at line 270 of file bevinfo.cpp.

00271 {
00272 //  NodeBevelController * pBevel = NULL;
00273     INT32 value = 0;
00274 
00275     if (IS_OUR_DIALOG_MSG(Message))
00276     {
00277         DialogMsg* Msg = (DialogMsg*)Message;
00278 
00279         // Check if the message is a CANCEL
00280         if (Msg->DlgMsg == DIM_CANCEL)
00281         {
00282             // Close the dialog 
00283             Close();
00284             m_bComboChanged = FALSE;
00285         }
00286         else if (Msg->DlgMsg == DIM_CREATE)
00287         {
00288             m_BetweenViews = FALSE;
00289             // Initialise the controls
00290             // go see if there is an info bar to use
00291             if (WindowID!=NULL)
00292             {
00293                 // Mark the controls as existing
00294                 ControlsExist = TRUE;
00295 
00296                 String_64 Str;
00297 
00298                 // set the combos                   
00299 //              SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), m_SliderComboIndex, FALSE, -1);
00300                 SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), 0, FALSE, -1);
00301 
00302                 // first, clear the combo
00303                 DeleteAllValues( _R(IDC_BEVEL_SLIDER_COMBO));
00304                 
00305                 // now the slider combo
00306                 for ( INT32 i=0; i<NumSliderTypes; i++ )
00307                 {
00308                     Str.Load( SliderTypes[i] );
00309                     SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_COMBO), Str, TRUE, i);
00310                 }
00311                 
00312                 SetComboListLength(_R(IDC_BEVEL_SLIDER_COMBO));
00313 
00314                 LoadBevelTypeComboStrings(FALSE);
00315                 LoadBevelDirectionComboStrings(FALSE);
00316 
00317                 UpdateControls();
00318                 UpdateJoinTypeControls();
00319                 
00320                 SetGadgetBitmaps(_R(IDC_BEVELSLIDER), _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER));
00321 
00322                 m_bComboChanged = FALSE;
00323             }
00324 
00325         }
00326         else
00327         {
00328             // Messages to all the controls, handled indivdually
00329             if (ControlsExist)
00330             {
00331                 if (WindowID!=NULL)
00332                 {
00333                     if (FALSE) {}
00334                     else if (Msg->GadgetID == _R(IDC_BEVEL_TYPE_COMBO))
00335                     {
00336                         if (Msg->DlgMsg == DIM_SELECTION_CHANGED)
00337                         {
00338                             // ensure values are updated
00339                             HandleBevelTypeChanged();
00340                         }
00341                     }
00342                     else if (Msg->GadgetID == _R(IDC_BEVEL_SLIDER_COMBO))
00343                     {   
00344                         if (Msg->DlgMsg == DIM_SELECTION_CHANGED)
00345                         {
00346                             // ensure values are updated
00347                             SliderUpdate(FALSE);
00348                         }
00349                     }
00350                         /*
00351                     else if (Msg->GadgetID == _R(IDC_BEVEL_INNER_COMBO))
00352                     {
00353                         if (Msg->DlgMsg == DIM_SELECTION_CHANGED)
00354                         {
00355                             // ensure values are updated
00356                             HandleBevelDirectionChanged();
00357                     
00358                         }
00359                     }
00360                         */
00361                     else if (Msg->GadgetID == _R(IDC_BEVELSLIDER))
00362                     {
00363                         // on drop of slider, change the bevel (if there is one selected !)
00364                         if (Msg->DlgMsg == DIM_SLIDER_POS_SET)
00365                         {
00366                             if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 0)
00367                             {
00368                                 pTool->m_pDragBevelOp->RenderDragBlobs(m_LastDragWidth,
00369                                     Document::GetSelectedSpread());
00370                             }
00371                             
00372                             HandleSliderChanged();
00373                             m_bAmDraggingSlider = FALSE;
00374                         }
00375                         else if (Msg->DlgMsg == DIM_SLIDER_POS_CHANGING)
00376                         {
00377                             // start the drag on the tool's drag info bar so we
00378                             // can render blobs
00379                             if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 0)
00380                             {
00381                                 if (!m_bAmDraggingSlider)
00382                                 {
00383                                     pTool->m_pDragBevelOp->SetupDragInfo();
00384                                     m_bAmDraggingSlider = TRUE;
00385                                 }
00386                                 else
00387                                 {
00388                                     // if we've already dragged, then remove the drag
00389                                     // blobs which are present
00390                                     pTool->m_pDragBevelOp->RenderDragBlobs(m_LastDragWidth,
00391                                         Document::GetSelectedSpread());
00392                                 }
00393                             }
00394                                         
00395                             // is there a 'many' setting ?
00396                             m_bAmDraggingSlider = TRUE;
00397                             if (pTool->AreManyBevelLightAngles() &&
00398                                 GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 2)
00399                             {
00400                                 // set all the blob angles to be the same, and update
00401                                 MsgResult Result = InformationBarOp::Message(Message);
00402                                 SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_LIGHTANGLE_MIN, BEVEL_LIGHTANGLE_MAX);
00403                 
00404                                 INT32 Angle = GetLongGadgetValue(_R(IDC_BEVELSLIDER),
00405                                                         BEVEL_LIGHTANGLE_MIN,
00406                                                         BEVEL_LIGHTANGLE_MAX);
00407 
00408                                 // change the angle for the slider stuff
00409                                 // Angle = BEVEL_LIGHTANGLE_MAX - Angle;
00410 
00411                                 // change the blob angles
00412                                 pTool->ChangeBlobAngles(Angle);
00413                                 
00414                                 // update the slider/edit control
00415                                 SliderUpdate(TRUE);
00416 
00417                                 return Result;
00418                             }
00419                             if (pTool->AreManyBevelLightTilts() &&
00420                                 GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 3)
00421                             {
00422                                 // set all the blob angles to be the same, and update
00423                                 MsgResult Result = InformationBarOp::Message(Message);
00424                                 SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_LIGHTTILT_MIN, BEVEL_LIGHTTILT_MAX);
00425                 
00426                                 INT32 Angle = GetLongGadgetValue(_R(IDC_BEVELSLIDER),
00427                                                         BEVEL_LIGHTTILT_MIN,
00428                                                         BEVEL_LIGHTTILT_MAX);
00429 
00430                                 // change the angle for the slider stuff
00431                                 // Angle = BEVEL_LIGHTTILT_MAX - Angle;
00432 
00433                                 // change the blob angles
00434                                 pTool->ChangeBlobTilts(Angle);
00435                                 
00436                                 // update the slider/edit control
00437                                 SliderUpdate(TRUE);
00438 
00439                                 return Result;
00440                             }
00441                             else
00442                             {
00443                                 SliderUpdate(TRUE);
00444                                 
00445                                 if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 3)
00446                                 {
00447                                     RedrawBlobs(FALSE, TRUE);
00448                                 }
00449                                 else
00450                                 {
00451                                     RedrawBlobs(TRUE, FALSE);
00452                                 }
00453 
00454                                 // render the width drag blobs if necessary
00455                                 if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 0)
00456                                 {
00457                                     INT32 Width = m_Depth;
00458 
00459                                     if(!m_bButtonIsInner)
00460                                         Width = -Width;
00461 
00462                                     pTool->m_pDragBevelOp->RenderDragBlobs(Width,Document::GetSelectedSpread());
00463                                     m_LastDragWidth = Width;
00464                                 }
00465                             }
00466 
00467                             // repaint the editable control now
00468                             PaintGadgetNow(_R(IDC_BEVEL_SLIDER_EDIT));
00469                         }
00470                     }   
00471                     else if (Msg->GadgetID == _R(IDC_BEVEL_SLIDER_EDIT))
00472                     {
00473                         if (Msg->DlgMsg == DIM_SELECTION_CHANGED)
00474                         {
00475                             if (ConvertStringToValue(_R(IDC_BEVEL_SLIDER_EDIT), value))
00476                             {
00477                                 
00478                                 if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 0)
00479                                 {
00480                                     m_Depth = value;
00481                                 }
00482                                 else if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 1)
00483                                 {
00484                                     m_Contrast = value;
00485                                 }
00486                                 else if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 2)
00487                                 {
00488                                     m_LightAngle = value;
00489                                 }
00490                                 else if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 3)
00491                                 {
00492                                     if (value < 0 || value > 90)
00493                                     {
00494                                         SliderUpdate(FALSE);
00495                                         goto sliderout;
00496                                     }
00497 
00498                                     m_LightTilt = value;
00499                                 }
00500                             }
00501                             
00502                             SliderUpdate(FALSE);
00503                             HandleSliderChanged();
00504                             sliderout: {}
00505                         }
00506                     }
00507                     else if (Msg->GadgetID == _R(IDC_BTN_BEVELOUTER))
00508                     {
00509                         if (Msg->DlgMsg == DIM_LFT_BN_CLICKED)
00510                         {
00511                             if (!m_bButtonIsOuter)
00512                             {
00513                                 // make all outer
00514                                 HandleBevelDirectionsToOuter();
00515                             }
00516                             else
00517                             {
00518                                 UpdateControls();
00519                             }
00520                         }
00521                     }
00522                     else if (Msg->GadgetID == _R(IDC_BTN_BEVELINNER))
00523                     {
00524                         if (Msg->DlgMsg == DIM_LFT_BN_CLICKED)
00525                         {
00526                             if (!m_bButtonIsInner)
00527                             {
00528                                 // make all outer
00529                                 HandleBevelDirectionsToInner();
00530                             }
00531                             else
00532                             {
00533                                 UpdateControls();
00534                             }
00535                         }
00536                     }
00537                     else if (Msg->GadgetID == _R(IDC_BEVELJOINTYPEMITRE))
00538                     {
00539                         if (Msg->DlgMsg == DIM_LFT_BN_CLICKED)
00540                         {
00541                             HandleJoinTypeMitreClicked();
00542                         }
00543                     }
00544                     else if (Msg->GadgetID == _R(IDC_BEVELJOINTYPEROUND))
00545                     {
00546                         if (Msg->DlgMsg == DIM_LFT_BN_CLICKED)
00547                         {
00548                             HandleJoinTypeRoundClicked();
00549                         }
00550                     }
00551                     else if (Msg->GadgetID == _R(IDC_BEVELJOINTYPEBEVEL))
00552                     {
00553                         if (Msg->DlgMsg == DIM_LFT_BN_CLICKED)
00554                         {
00555                             HandleJoinTypeBevelClicked();
00556                         }
00557                     }
00558                 }
00559             }
00560         }
00561     }
00562     else
00563     {
00564         if (Tool::GetCurrentID() == TOOLID_BEVELTOOL)
00565         {
00566             if (MESSAGE_IS_A(Message, DocViewMsg))
00567             {
00568                 // re-render the blobs
00569                 DocViewMsg* msg = (DocViewMsg*) Message;
00570 
00571                 // Render the tool blobs off the old view just before it changes
00572                 if ((msg->State == DocViewMsg::SELABOUTTOCHANGE || msg->State == DocViewMsg::SELCHANGED ) 
00573                     && msg->pOldDocView && !GetApplication()->CamelotIsDying())
00574                 {
00575                     // Do additional checks here to avoid ensures!
00576                     CCamView* pOilView = msg->pOldDocView->GetConnectionToOilView();
00577                     BlobManager* pBlobManager = GetApplication()->GetBlobManager();
00578                     ENSURE(pBlobManager, "Can't get BlobManager");
00579 
00580                     PORTNOTE("other", "Removed IsScreenCamView test");
00581                     if (pOilView!=NULL /*&& pOilView->IsScreenCamView()*/)
00582                     {
00583                         // handle the view will/has changed msgs and do NOT process and selection changes msgs between times (sjk 22/11/00)
00584                         if (msg->State == DocViewMsg::SELABOUTTOCHANGE)
00585                         {
00586                             pBlobManager->RenderToolBlobsOff(pTool, msg->pOldDocView->GetVisibleSpread(), NULL);
00587                             pTool->ClearToolBlobList();
00588                             //TRACE( _T("View about to change\n"));
00589                             m_BetweenViews = TRUE;
00590                         }
00591                         else
00592                         {
00593                             pTool->SetupSelectionBlobs();
00594                             pBlobManager->RenderToolBlobsOn(pTool, msg->pOldDocView->GetVisibleSpread(), NULL);
00595                             //TRACE( _T("View has just changed\n"));
00596                             m_BetweenViews = FALSE;
00597                         }
00598                     }
00599                 }
00600             }
00601             else if (MESSAGE_IS_A(Message, OpMsg))
00602             {
00603                 if (((OpMsg *)Message)->MsgType == OpMsg::AFTER_UNDO ||
00604                     ((OpMsg *)Message)->MsgType == OpMsg::AFTER_REDO)
00605                 {
00606                     // cope with blob rendering
00607                     if (pTool && BevelTool::AmActive())
00608                     {
00609                         // render blobs back on
00610                         pTool->SetBlobRendering(TRUE);
00611                         pTool->SetupBlobList();
00612                         pTool->RenderToolBlobs(Document::GetSelectedSpread(), NULL);
00613                     }
00614                 }
00615                 else if (((OpMsg *)Message)->MsgType == OpMsg::BEFORE_UNDO ||
00616                     ((OpMsg *)Message)->MsgType == OpMsg::BEFORE_REDO)
00617                 {
00618                     // cope with blob rendering
00619                     if (pTool && BevelTool::AmActive())
00620                     {
00621                         // render off blobs
00622                         pTool->RenderToolBlobs(Document::GetSelectedSpread(), NULL);
00623                         pTool->SetBlobRendering(FALSE);
00624                     }
00625                 }
00626                 else if (((OpMsg *)Message)->pOp->IsKindOf(CC_RUNTIME_CLASS(SelectAllOp)))
00627                 {
00628                     // TRACEUSER( "DavidM", _T("Select all op\n"));
00629                     pTool->InvalidateToolBlobs();
00630                 }
00631                 else if (((OpMsg *)Message)->pOp->IsKindOf(CC_RUNTIME_CLASS(SelectNoneOp)))
00632                 {
00633                     pTool->InvalidateToolBlobs();
00634                 }
00635                 else if (((OpMsg *)Message)->pOp->IsKindOf(CC_RUNTIME_CLASS(OpDelete)))
00636                 {
00637                     pTool->InvalidateToolBlobs();
00638                 }
00639             }
00640             else if (MESSAGE_IS_A(Message, OptionsChangingMsg))
00641             {
00642                 OptionsChangingMsg* Msg = (OptionsChangingMsg*)Message;
00643 
00644                 if(Msg->State == OptionsChangingMsg::NEWUNITS)
00645                 {       
00646                     // update all controls
00647                     UpdateControls();
00648                 }
00649             }
00650             else if (MESSAGE_IS_A(Message, SelChangingMsg))
00651             {
00652                 UpdateControls();
00653                 SelChangingMsg* pSelChangeMsg = (SelChangingMsg*)Message;
00654                 if (pSelChangeMsg->State == SelChangingMsg::SELECTIONCHANGED && pTool && !m_BetweenViews)
00655                 {   
00656 //                  Spread * pSpread = Document::GetSelectedSpread();
00657                     
00658                     if (!pSelChangeMsg->InDifferentDocument)
00659                     {
00660                         pTool->InvalidateToolBlobs();
00661 /*                      pTool->RenderToolBlobsOff(pSpread, NULL);
00662                         pTool->ClearToolBlobList();
00663                         pTool->SetupBlobList();
00664                         // render the blobs back on
00665                         pTool->RenderToolBlobsOn(pSpread, NULL);
00666 */                  }
00667 
00668                 }
00669 
00670                 // Karim 12/09/2000
00671                 // Update our join-type buttons for certain selection changes.
00672                 if (pSelChangeMsg->State == SelChangingMsg::SELECTIONCHANGED ||
00673                     pSelChangeMsg->State == SelChangingMsg::NONCOLOURATTCHANGED)
00674                     UpdateJoinTypeControls();
00675                     EnableDisableJoinTypeControls();
00676             }
00677         }
00678     }
00679 
00680     return (InformationBarOp::Message(Message)); 
00681 }    

void BevelInfoBarOp::RedrawBlobs BOOL  bAngle = TRUE,
BOOL  bTilt = FALSE
[private]
 

Redraws the object blobs.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
bAngle = To do change in light angles [INPUTS] bTilt = To do change in tilts
- [OUTPUTS]
Returns:
-

Definition at line 1811 of file bevinfo.cpp.

01812 {
01813     if (bAngle)
01814     {   
01815         if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) != 2)
01816             return;
01817         
01818         INT32 LightAngle = 0;
01819         LightAngle = GetLongGadgetValue(_R(IDC_BEVELSLIDER), BEVEL_LIGHTANGLE_MIN,
01820             BEVEL_LIGHTANGLE_MAX);
01821 
01822         // LightAngle = BEVEL_LIGHTANGLE_MAX - LightAngle;
01823         
01824         if (pTool)
01825         {
01826             pTool->ChangeBlobAngles(LightAngle);
01827         }
01828     }
01829     else if (bTilt)
01830     {
01831         if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) != 3)
01832             return;
01833 
01834         INT32 Tilt = 0;
01835 
01836         Tilt = GetLongGadgetValue(_R(IDC_BEVELSLIDER), BEVEL_LIGHTTILT_MIN,
01837             BEVEL_LIGHTTILT_MAX);
01838         // Tilt = BEVEL_LIGHTTILT_MAX - Tilt;
01839         
01840         if (pTool)
01841         {
01842             pTool->ChangeBlobTilts(Tilt);
01843         }
01844     }
01845 }

void BevelInfoBarOp::SetBlobNodesAngle INT32  Angle  )  [private]
 

void BevelInfoBarOp::SetRetroState BOOL  CanFit  ) 
 

Sets the Flag CanRetroFit and gets the infobar to redraw the static text item that says this.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/8/94
Parameters:
CanRetroFit - TRUE if we can currently retro fit the path, FALSE if not [INPUTS]

Definition at line 1139 of file bevinfo.cpp.

01140 {
01141     // Set the Retro field to be empty by default
01142     CanRetroFit = CanFit;
01143 
01144     // Set the string in the info bar now
01145     SetRetroString();
01146 }

void BevelInfoBarOp::SetRetroString  ) 
 

Sets the static text item in the freehand info bar to say either 'Retro' or nothing, depending on the state of the flag CanRetroFit.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/8/94
See also:
BevelInfoBarOp::SetRetroState

Definition at line 1161 of file bevinfo.cpp.

01162 {
01163     // go see if there is an info bar to use
01164     /*
01165     if (WindowID!=NULL)
01166     {
01167         if (CanRetroFit)
01168         {
01169             // Make the word Retro appear
01170             String_64 RetroWord;
01171             if (RetroWord.Load(_R(IDS_FHANDRETROTEXT)))
01172             {
01173                 // Set the contents of the field to indicate retro is possible
01174                 SetStringGadgetValue(_R(IDC_FREEHANDRETRO), &RetroWord);
01175             }
01176         }
01177         else
01178         {
01179             // make the word retro not appear
01180             String_8 RetroWord("");
01181             SetStringGadgetValue(_R(IDC_FREEHANDRETRO), &RetroWord);
01182         }
01183     }
01184     */
01185 }

void BevelInfoBarOp::SetSliderDepth MILLIPOINT  Value  ) 
 

Sets the slider for depth settings (logarithmic).

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/7/99
Parameters:
[INPUTS] 
Depth in millipoints [OUTPUTS]
Returns:
-

Definition at line 2743 of file bevinfo.cpp.

02744 {
02745     // make the value appear between 0 and 1
02746     if (Value > BEVEL_DEPTH_MAX)
02747         Value = BEVEL_DEPTH_MAX;
02748 
02749     if (Value < BEVEL_DEPTH_MIN)
02750         Value = BEVEL_DEPTH_MIN;
02751 
02752     double dValue = Value - BEVEL_DEPTH_MIN;
02753     dValue /= (double)(BEVEL_DEPTH_MAX - BEVEL_DEPTH_MIN);
02754 
02755     // change the profile
02756     double dSliderValue = 0;
02757     
02758     dSliderValue = BevelSliderProfile.MapZeroToOne((AFp)(dValue));
02759     // dSliderValue = 1.0 - dSliderValue;
02760         
02761     dSliderValue *= (double)(BEVEL_DEPTH_MAX - BEVEL_DEPTH_MIN);
02762     dSliderValue += BEVEL_DEPTH_MIN;
02763 
02764     SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_DEPTH_MIN, BEVEL_DEPTH_MAX);
02765 
02766     SetLongGadgetValue(_R(IDC_BEVELSLIDER), (INT32)dSliderValue);
02767 }

void BevelInfoBarOp::SetToolActiveState BOOL  IsToolActive  ) 
 

Allows the info bar to know if it is valid or not.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/8/94
Parameters:
IsToolActive - TRUE if the tool is becoming active, FALSE if it not [INPUTS]

Definition at line 1117 of file bevinfo.cpp.

01118 {
01119     // Set the control state
01120     m_bComboChanged = FALSE;
01121     ControlsExist = IsToolActive;
01122         
01123 }

void BevelInfoBarOp::SetUpBevelInfo BevelInfo *  pInfo  ) 
 

Initialises the bevel info class based on the dialog's settings.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/2/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 2329 of file bevinfo.cpp.

02330 {
02331     pInfo->m_BevelType  = BevelTypes[GetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO))].TypeNum;
02332 
02333     pInfo->m_LightAngle = m_LightAngle;
02334     pInfo->m_Contrast   = m_Contrast;
02335     pInfo->m_Indent     = m_Depth;
02336     pInfo->m_Tilt       = m_LightTilt;
02337 
02338     INT32 DirectionIndex = 0 ;
02339 
02340     if (m_bButtonIsOuter)
02341         DirectionIndex = 1;
02342 
02343     if (pTool->AreManyBevelTypes())
02344     {
02345         pInfo->m_BevelType  = BevelTypes[GetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO))-1].TypeNum;
02346     }
02347 
02348     // have we a many situation ?
02349     if (pTool->AreManyBevelDirections())
02350     {
02351         DirectionIndex -= 1;
02352     }
02353 
02354     // depth is negative for outer bevels (in the attribute)
02355     if (DirectionIndex == 0)
02356     {
02357         pInfo->m_bOuter = FALSE;
02358     }
02359     else
02360     {
02361         pInfo->m_bOuter = TRUE;
02362     }
02363 }

void BevelInfoBarOp::SliderUpdate BOOL  bSetVariables,
BOOL  bTestMany = TRUE
 

Updates the variables in me depending on the slider position.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/1/99
Parameters:
- [INPUTS]

Definition at line 694 of file bevinfo.cpp.

00695 {
00696     if (!ControlsExist)
00697         return;
00698 
00699     List ContourList;
00700     BevelTools::BuildListOfSelectedNodes(&ContourList, CC_RUNTIME_CLASS(NodeContourController));
00701     
00702     if (!ContourList.IsEmpty())
00703     {
00704         ContourList.DeleteAll();
00705         EnableGadget(_R(IDC_BEVEL_SLIDER_COMBO), FALSE);
00706         EnableGadget(_R(IDC_BEVELSLIDER), FALSE);
00707         EnableGadget(_R(IDC_BEVEL_SLIDER_EDIT), FALSE);
00708         EnableGadget(_R(IDC_BEVEL_TYPE_COMBO), FALSE);
00709         return;
00710     }
00711 
00712     TRACEUSER( "DavidM", _T("Slider update !\n"));
00713 
00714     INT32 value = 0;
00715 
00716     String_256 Str;
00717 
00718     TRACEUSER( "DavidM", _T("Slider update\n"));
00719 
00720 //  TCHAR unit[] = _T("Units");
00721 
00722     if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) < 0 ||
00723         GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) > NumSliderTypes-1)
00724     {
00725         SetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO), 1);
00726     }
00727 
00728     // set the variables from the slider's position
00729     if (bSetVariables)
00730     {
00731         switch (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)))
00732         {
00733         case 0:
00734             // bevel depth update
00735             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_DEPTH_MIN, BEVEL_DEPTH_MAX);
00736             
00737             value = GetSliderDepth();
00738             m_Depth = value;
00739             ConvertValueToString(Str,
00740                                  value,
00741                                  PIXELS);
00742             // Str += _T(" pix");
00743             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00744                                  Str);
00745             m_SliderComboIndex = 0;
00746             
00747             break;
00748         case 1:
00749             // bevel contrast update
00750             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_CONTRAST_MIN, BEVEL_CONTRAST_MAX);
00751             value = GetLongGadgetValue(_R(IDC_BEVELSLIDER), BEVEL_CONTRAST_MIN,
00752                 BEVEL_CONTRAST_MAX);
00753             // value = BEVEL_CONTRAST_MAX - value;
00754             m_Contrast = value;
00755             SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), value);
00756             Str = GetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT));
00757             Str += _T(" %");
00758             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00759                                  Str);
00760 
00761             m_SliderComboIndex = 1;
00762 
00763             if (pTool)
00764                 pTool->ChangeContrastAndReRender(m_Contrast);
00765         
00766             break;
00767         case 2:
00768             // bevel light angle update
00769             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_LIGHTANGLE_MIN, BEVEL_LIGHTANGLE_MAX);
00770             value = GetLongGadgetValue(_R(IDC_BEVELSLIDER), BEVEL_LIGHTANGLE_MIN,
00771                 BEVEL_LIGHTANGLE_MAX);
00772 
00773             // value = BEVEL_LIGHTANGLE_MAX - value;
00774 
00775             m_LightAngle = value;
00776             SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), value);
00777             Str = GetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT));
00778             Str += _T(" ");
00779             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00780                                  Str);
00781 
00782             m_SliderComboIndex = 2;
00783             
00784             break;
00785         case 3:
00786             // bevel light tilt update
00787             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_LIGHTTILT_MIN, BEVEL_LIGHTTILT_MAX);
00788             value = GetLongGadgetValue(_R(IDC_BEVELSLIDER), BEVEL_LIGHTTILT_MIN,
00789                 BEVEL_LIGHTTILT_MAX);
00790             // value = BEVEL_LIGHTTILT_MAX - value;
00791             m_LightTilt = value;
00792             SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), value);
00793             Str = GetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT));
00794             Str += _T(" ");
00795             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00796                                  Str);
00797 
00798             m_SliderComboIndex = 3;
00799             break;
00800         }
00801     }
00802     else
00803     {
00804         // set the slider's position from the variables
00805         switch (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)))
00806         {
00807         case 0:
00808             // bevel depth update
00809             // now, check for multiple depths of bevels
00810             // if so, then set the value appropriately
00811             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_DEPTH_MIN, BEVEL_DEPTH_MAX);
00812 
00813             SetSliderDepth(abs(m_Depth));
00814             
00815             if (pTool->AreManyBevelIndents() && bTestMany)
00816             {
00817                 Str.Load(_R(IDS_BEVELSTRING_MANY));
00818             }
00819             else
00820             {
00821                 ConvertValueToString(Str,
00822                     m_Depth,
00823                     PIXELS);
00824             }
00825             
00826             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00827                                  Str);
00828 
00829             PaintGadgetNow(_R(IDC_BEVELSLIDER));
00830             PaintGadgetNow(_R(IDC_BEVEL_SLIDER_EDIT));      
00831 
00832             m_SliderComboIndex = 0;
00833             
00834             break;
00835         case 1:
00836             // bevel contrast update
00837             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_CONTRAST_MIN, BEVEL_CONTRAST_MAX);
00838             value = m_Contrast;
00839             //value = BEVEL_CONTRAST_MAX - value;
00840                 
00841             SetLongGadgetValue(_R(IDC_BEVELSLIDER), value);
00842 
00843             
00844             if (pTool->AreManyBevelContrasts() && bTestMany)
00845             {
00846                 Str.Load(_R(IDS_BEVELSTRING_MANY));
00847             }
00848             else
00849             {
00850                 SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), m_Contrast);
00851                 Str = GetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT));
00852                 Str += _T(" %");
00853 
00854                 // find all selected bevel contrast 
00855             }
00856 
00857             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00858                                  Str);
00859 
00860             m_SliderComboIndex = 1;
00861 
00862             PaintGadgetNow(_R(IDC_BEVELSLIDER));
00863             PaintGadgetNow(_R(IDC_BEVEL_SLIDER_EDIT));      
00864             
00865             break;
00866         case 2:
00867             // bevel light angle update
00868             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_LIGHTANGLE_MIN, BEVEL_LIGHTANGLE_MAX);
00869 
00870             value = m_LightAngle;
00871                 
00872             SetLongGadgetValue(_R(IDC_BEVELSLIDER), value);
00873             
00874             if (pTool->AreManyBevelLightAngles() && bTestMany)
00875             {
00876                 Str.Load(_R(IDS_BEVELSTRING_MANY));
00877             }
00878             else
00879             {           
00880                 SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), BEVEL_LIGHTANGLE_MAX - value);
00881                 Str = GetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT));
00882                 Str += _T(" ");
00883             }
00884             
00885             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00886                                  Str);
00887 
00888             m_SliderComboIndex = 2;         
00889 
00890             PaintGadgetNow(_R(IDC_BEVELSLIDER));
00891             PaintGadgetNow(_R(IDC_BEVEL_SLIDER_EDIT));      
00892             
00893             break;
00894         case 3:
00895             // bevel light angle update
00896             SetGadgetRange(_R(IDC_BEVELSLIDER), BEVEL_LIGHTTILT_MIN, BEVEL_LIGHTTILT_MAX);
00897 
00898             value = m_LightTilt;
00899             // value = BEVEL_LIGHTTILT_MAX - value;
00900                 
00901             SetLongGadgetValue(_R(IDC_BEVELSLIDER), value);
00902             
00903             if (pTool->AreManyBevelLightTilts() && bTestMany)
00904             {
00905                 Str.Load(_R(IDS_BEVELSTRING_MANY));
00906             }
00907             else
00908             {           
00909                 SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), m_LightTilt);
00910                 Str = GetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT));
00911                 Str += _T(" ");
00912             }
00913             
00914             SetStringGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT),
00915                                  Str);
00916 
00917             m_SliderComboIndex = 3;         
00918 
00919             PaintGadgetNow(_R(IDC_BEVELSLIDER));
00920             PaintGadgetNow(_R(IDC_BEVEL_SLIDER_EDIT));      
00921             
00922             break;
00923         }
00924     }
00925 
00926     // activate & deactivate gadgets dending on bevel type
00927     Document* pDoc = Document::GetCurrent();
00928 
00929     if (pDoc)
00930     {
00931         if (GetApplication()->FindSelection()->IsEmpty())
00932         {
00933             EnableGadget(_R(IDC_BEVEL_SLIDER_COMBO), FALSE);
00934             EnableGadget(_R(IDC_BEVELSLIDER), FALSE);
00935             EnableGadget(_R(IDC_BEVEL_SLIDER_EDIT), FALSE);
00936             EnableGadget(_R(IDC_BEVEL_TYPE_COMBO), FALSE);
00937         }
00938         else
00939         {
00940             // enable the join-type controls whenever the selection is non-empty.
00941 
00942             if (NodeBevelController::SelectionHasBevelNode() ||
00943                 NodeBevelController::SelectionHasBevelInkNode())
00944             {
00945                 EnableGadget(_R(IDC_BEVEL_SLIDER_COMBO), TRUE);
00946                 EnableGadget(_R(IDC_BEVELSLIDER), TRUE);
00947                 EnableGadget(_R(IDC_BEVEL_SLIDER_EDIT), TRUE);
00948                 EnableGadget(_R(IDC_BEVEL_TYPE_COMBO), TRUE);
00949             }
00950             else
00951             {
00952                 EnableGadget(_R(IDC_BEVEL_SLIDER_COMBO), TRUE);
00953 
00954                 if (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)) == 0)
00955                 {
00956                     EnableGadget(_R(IDC_BEVELSLIDER), TRUE);
00957                     EnableGadget(_R(IDC_BEVEL_SLIDER_EDIT), TRUE);
00958                 }
00959                 else
00960                 {
00961                     EnableGadget(_R(IDC_BEVELSLIDER), FALSE);
00962                     EnableGadget(_R(IDC_BEVEL_SLIDER_EDIT), FALSE);
00963                 }
00964 
00965                 if (OpCreateBevel::GetState(NULL, NULL).Greyed)
00966                 {
00967                     EnableGadget(_R(IDC_BEVEL_TYPE_COMBO), FALSE);
00968                 }
00969                 else
00970                 {
00971                     EnableGadget(_R(IDC_BEVEL_TYPE_COMBO), TRUE);
00972                 }
00973             }
00974         }
00975     }
00976     else
00977     {
00978         EnableGadget(_R(IDC_BEVEL_SLIDER_COMBO), FALSE);
00979         EnableGadget(_R(IDC_BEVELSLIDER), FALSE);
00980         EnableGadget(_R(IDC_BEVEL_SLIDER_EDIT), FALSE);
00981         EnableGadget(_R(IDC_BEVEL_TYPE_COMBO), FALSE);
00982     }
00983 
00984     // do bubble help
00985     switch (GetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO)))
00986     {
00987     case 0:
00988         SetGadgetHelp(_R(IDC_BEVELSLIDER), _R(IDBBL_BEVELSLIDERDEPTH), _R(IDS_BEVELSLIDERDEPTHID));
00989         SetGadgetHelp(_R(IDC_BEVEL_SLIDER_EDIT), _R(IDBBL_BEVELSLIDERDEPTH), _R(IDS_BEVELSLIDERDEPTHID));
00990         break;
00991     case 1:
00992         SetGadgetHelp(_R(IDC_BEVELSLIDER), _R(IDBBL_BEVELSLIDERCONTRAST), _R(IDS_BEVELSLIDERCONTRASTID));
00993         SetGadgetHelp(_R(IDC_BEVEL_SLIDER_EDIT), _R(IDBBL_BEVELSLIDERCONTRAST), _R(IDS_BEVELSLIDERCONTRASTID));
00994         break;
00995     case 2:
00996         SetGadgetHelp(_R(IDC_BEVELSLIDER), _R(IDBBL_BEVELSLIDERLIGHTANGLE), _R(IDS_BEVELSLIDERLIGHTANGLEID));
00997         SetGadgetHelp(_R(IDC_BEVEL_SLIDER_EDIT), _R(IDBBL_BEVELSLIDERLIGHTANGLE), _R(IDS_BEVELSLIDERLIGHTANGLEID));
00998         break;
00999     case 3:
01000         SetGadgetHelp(_R(IDC_BEVELSLIDER), _R(IDBBL_BEVELSLIDERTILT), _R(IDS_BEVELSLIDERTILTID));
01001         SetGadgetHelp(_R(IDC_BEVEL_SLIDER_EDIT), _R(IDBBL_BEVELSLIDERTILT), _R(IDS_BEVELSLIDERTILTID));
01002         break;
01003     }
01004 
01005     SetGadgetHelp(_R(IDC_BEVEL_TYPE_COMBO), _R(IDBBL_BEVELTYPECOMBO), _R(IDS_BEVELTYPECOMBO));
01006     SetGadgetHelp(_R(IDC_BEVEL_SLIDER_COMBO), _R(IDBBL_BEVELSLIDERCOMBO), _R(IDS_BEVELSLIDERCOMBO));
01007 }

void BevelInfoBarOp::UpdateControls  ) 
 

Updates the controls on the info bar.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/2/99

Definition at line 1198 of file bevinfo.cpp.

01199 {
01200     // Check to see if we`ve got any contours in the selection!
01201     BOOL HaveGotContours = FALSE;
01202     List ContourList;
01203     BevelTools::BuildListOfSelectedNodes(&ContourList, CC_RUNTIME_CLASS(NodeContourController));
01204     
01205     if (!ContourList.IsEmpty())
01206     {
01207         ContourList.DeleteAll();
01208         HaveGotContours = TRUE;
01209     }
01210 
01211     if (!ControlsExist || !pTool)
01212         return;
01213 
01214     // these two MUST be done in this order otherwise camelot falls over on entry
01215     if (!HasWindow())
01216         return;
01217 
01218     TRACEUSER( "DavidM", _T("Update controls\n"));
01219 
01220     NodeBevel           * pBevel    = NULL;
01221 //  NodeAttribute       * pNode     = NULL;
01222     AttrBevelIndent     * pIndent   = NULL;
01223     AttrBevelLightAngle * pLightAngle = NULL;
01224     AttrBevelType       * pType     = NULL;
01225     AttrBevelContrast   * pContrast = NULL;
01226     AttrBevelLightTilt * pTilt = NULL;
01227 
01228     // Obtain the current selections 
01229     Range Sel(*(GetApplication()->FindSelection()));
01230     RangeControl rg = Sel.GetRangeControlFlags();
01231     rg.PromoteToParent = TRUE;
01232     Sel.SetRangeControl(rg);
01233 
01234     // the attribute list
01235     List NodeList;
01236     NodeListItem * pItem = NULL;
01237 
01238     // build a list of all the bevel attribute nodes in the selection
01239     BevelTools::BuildListOfSelectedNodes(&NodeList,
01240                             CC_RUNTIME_CLASS(NodeBevel), TRUE);
01241 
01242     AttrBevelIndent     * pCurrentIndent            = NULL;
01243     AttrBevelLightAngle * pCurrentLightAngle        = NULL;
01244     AttrBevelContrast   * pCurrentContrast          = NULL;
01245 //  AttrBevelType       * pCurrentType              = NULL;
01246     AttrBevelLightTilt  * pCurrentTilt              = NULL;
01247 
01248 //  NodeBevelController * pController = NULL;
01249 
01250     Document* pDoc = Document::GetCurrent();
01251 
01252     if (NodeList.IsEmpty() || HaveGotContours)
01253     {
01254         // means we need to do the default attributes
01255         if (pDoc)
01256         {
01257             // reset the 'many'
01258             LoadBevelTypeComboStrings(FALSE);
01259             LoadBevelDirectionComboStrings(FALSE);
01260             
01261             // has the user set the variables ??
01262 
01263             pCurrentIndent = (AttrBevelIndent *)pDoc->GetAttributeMgr().GetCurrentAttribute(
01264                 CC_RUNTIME_CLASS(NodeRenderableInk),
01265                 CC_RUNTIME_CLASS(AttrBevelIndent));
01266             
01267             if (pCurrentIndent)
01268             {
01269                 m_Depth = pCurrentIndent->Value.m_Indent;
01270                 
01271                 // just do this the first time
01272                 m_bUserSet = TRUE;
01273                 m_UserIndent = m_Depth;
01274             }
01275         
01276             if (m_Depth < 0)
01277                 m_Depth = - m_Depth;
01278             
01279             pCurrentLightAngle = (AttrBevelLightAngle *)pDoc->GetAttributeMgr().GetCurrentAttribute(
01280                             CC_RUNTIME_CLASS(NodeRenderableInk),
01281                             CC_RUNTIME_CLASS(AttrBevelLightAngle));
01282 
01283             if (pCurrentLightAngle)
01284             {
01285                 m_LightAngle = pCurrentLightAngle->Value.m_LightAngle;
01286             }
01287             
01288             SetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO), 
01289                 0);
01290             
01291             pCurrentContrast = (AttrBevelContrast *)pDoc->GetAttributeMgr().GetCurrentAttribute(
01292                 CC_RUNTIME_CLASS(NodeRenderableInk),
01293                 CC_RUNTIME_CLASS(AttrBevelContrast));
01294             
01295             if (pCurrentContrast)
01296             {
01297                 m_Contrast = pCurrentContrast->Value.m_Contrast;
01298             }
01299 
01300             pCurrentTilt = (AttrBevelLightTilt *)pDoc->GetAttributeMgr().GetCurrentAttribute(
01301                 CC_RUNTIME_CLASS(NodeRenderableInk),
01302                 CC_RUNTIME_CLASS(AttrBevelLightTilt));
01303 
01304             if (pCurrentTilt)
01305             {
01306                 m_LightTilt = pCurrentTilt->Value.m_LightTilt;
01307             }
01308         }
01309 
01310         UpdateInnerOuterButtons(FALSE, FALSE, TRUE);
01311         //UpdateJoinTypeButtons () ....
01312         EnableGadget(_R(IDC_BEVELJOINTYPEMITRE), FALSE);
01313         EnableGadget(_R(IDC_BEVELJOINTYPEROUND), FALSE);
01314         EnableGadget(_R(IDC_BEVELJOINTYPEBEVEL), FALSE);
01315     }
01316     else
01317     {
01318         m_bControlsEnabled = TRUE;
01319         
01320         pIndent     = NULL;
01321         pLightAngle = NULL;
01322         pContrast   = NULL;
01323         pType       = NULL;
01324 
01325         // get the head of the list
01326         pItem = (NodeListItem *)NodeList.GetHead();
01327         
01328         // get all the applied attributes of the first node
01329         if (pItem && (!pIndent || !pLightAngle || !pType || !pContrast))
01330         {
01331             if (pItem->pNode)
01332             {
01333                 pBevel = (NodeBevel *)pItem->pNode;
01334                 
01335                 pBevel->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrBevelIndent),
01336                     (NodeAttribute **)(&pIndent));
01337 
01338                 pBevel->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrBevelLightAngle),
01339                     (NodeAttribute **)(&pLightAngle));
01340 
01341                 pBevel->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrBevelContrast),
01342                     (NodeAttribute **)(&pContrast));
01343 
01344                 pBevel->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrBevelType),
01345                     (NodeAttribute **)(&pType));
01346 
01347                 pBevel->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrBevelLightTilt),
01348                     (NodeAttribute **)(&pTilt));
01349             }
01350             
01351             pItem = (NodeListItem *)NodeList.GetNext(pItem);
01352         }
01353         
01354         // set up the gadgets
01355         if (pType)
01356         {
01357             // have we a 'many' setting ?
01358             if (pTool->AreManyBevelTypes())
01359             {
01360                 LoadBevelTypeComboStrings(TRUE);
01361                 SetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO), 0);
01362             }
01363             else
01364             {
01365                 LoadBevelTypeComboStrings(FALSE);
01366                 for (INT32 i = 0 ; i < NumBevelTypes; i++)
01367                 {
01368                     if (pType->Value.m_Type == BevelTypes[i].TypeNum)
01369                         SetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO), i);
01370                 }
01371             }
01372         }
01373         else
01374         {
01375             // no type found so set to "none"
01376             LoadBevelTypeComboStrings(FALSE);
01377             SetSelectedValueIndex(_R(IDC_BEVEL_TYPE_COMBO), 0);
01378         }
01379         
01380         if (pIndent)
01381         {
01382             if (pTool->AreManyBevelDirections())
01383             {
01384                 UpdateInnerOuterButtons(TRUE, FALSE, FALSE);
01385             }
01386             else
01387             {               
01388                 if (pIndent->Value.m_Indent < 0)
01389                 {
01390                     UpdateInnerOuterButtons(FALSE, TRUE, FALSE);
01391                 }
01392                 else
01393                 {
01394                     UpdateInnerOuterButtons(FALSE, FALSE, FALSE);
01395                 }
01396             }
01397             
01398             SetLongGadgetValue(_R(IDC_BEVEL_SLIDER_EDIT), abs(pIndent->Value.m_Indent), FALSE, -1);
01399         }
01400         
01401         SetSelectedValueIndex(_R(IDC_BEVEL_SLIDER_COMBO), m_SliderComboIndex);
01402         
01403         if (pIndent)
01404         {
01405             m_Depth = abs(pIndent->Value.m_Indent);
01406         }
01407         else
01408         {
01409             m_Depth = 0;
01410         }
01411         
01412         if (pLightAngle)
01413         {
01414             // take it from the attribute
01415 //          m_LightAngle = pLightAngle->Value.m_LightAngle;
01416             m_LightAngle = BEVEL_LIGHTANGLE_MAX - pLightAngle->Value.m_LightAngle;
01417         }
01418         
01419         if (pContrast)
01420         {
01421             m_Contrast = pContrast->Value.m_Contrast;
01422         }
01423         else
01424         {
01425             m_Contrast = 0;
01426         }
01427 
01428         if (pTilt)
01429         {
01430             m_LightTilt = pTilt->Value.m_LightTilt;
01431         }
01432         else
01433         {
01434             m_LightTilt = 45;
01435         }
01436     }
01437 
01438     // clean up the list
01439     NodeList.DeleteAll();
01440 
01441     SliderUpdate(FALSE);
01442 }

void BevelInfoBarOp::UpdateInnerOuterButtons BOOL  bMany,
BOOL  bOuter,
BOOL  bNoSelection
 

Updates the inner / outer buttons on the info bar.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/7/99
Parameters:
[INPUTS] 
- [OUTPUTS]
Returns:
-

Definition at line 2651 of file bevinfo.cpp.

02652 {
02653     m_bButtonIsInner = FALSE;
02654     m_bButtonIsOuter = FALSE;
02655 
02656     if (bNoSelection)
02657     {
02658         EnableGadget(_R(IDC_BTN_BEVELOUTER), FALSE);
02659         EnableGadget(_R(IDC_BTN_BEVELINNER), FALSE);
02660         SetBoolGadgetSelected(_R(IDC_BTN_BEVELOUTER), FALSE);
02661         SetBoolGadgetSelected(_R(IDC_BTN_BEVELINNER), FALSE);
02662     }
02663     else if (bMany)
02664     {
02665         EnableGadget(_R(IDC_BTN_BEVELOUTER), TRUE);
02666         EnableGadget(_R(IDC_BTN_BEVELINNER), TRUE);
02667 
02668         SetBoolGadgetSelected(_R(IDC_BTN_BEVELOUTER), FALSE);
02669         SetBoolGadgetSelected(_R(IDC_BTN_BEVELINNER), FALSE);
02670     }
02671     else if (bOuter)
02672     {
02673         EnableGadget(_R(IDC_BTN_BEVELOUTER), TRUE);
02674         EnableGadget(_R(IDC_BTN_BEVELINNER), TRUE);
02675 
02676         SetBoolGadgetSelected(_R(IDC_BTN_BEVELOUTER), TRUE);
02677         SetBoolGadgetSelected(_R(IDC_BTN_BEVELINNER), FALSE);
02678         m_bButtonIsOuter = TRUE;
02679     }
02680     else
02681     {
02682         EnableGadget(_R(IDC_BTN_BEVELOUTER), TRUE);
02683         EnableGadget(_R(IDC_BTN_BEVELINNER), TRUE);
02684 
02685         SetBoolGadgetSelected(_R(IDC_BTN_BEVELOUTER), FALSE);
02686         SetBoolGadgetSelected(_R(IDC_BTN_BEVELINNER), TRUE);
02687         m_bButtonIsInner = TRUE;
02688     }
02689 }

void BevelInfoBarOp::UpdateJoinTypeControls  )  [private]
 

Update our infobar join type buttons. This method is currently called only in response to a SelChanging message.

Author:
Karim_MacDonald (Xara Group Ltd) <camelotdev@xara.com>
Date:
11 September 2000
Parameters:
The join type buttons on the infobar are updated to reflect the join types [OUTPUTS] contained in the selection.

Definition at line 2211 of file bevinfo.cpp.

02212 {
02213 // DEBUG:
02214 //  TRACEUSER( "Karim", _T("BevelInfoBarOp::UpdateJoinTypeControls\n"));
02215 
02216     if (!ControlsExist || !HasWindow())
02217         return;
02218 
02219     // the check for join types is possibly time-consuming, as we may need to scan the
02220     // selection if there are multiple join types in use on selected objects.
02221 
02222     // Determine if there is a common attribute.
02223     NodeAttribute* pAttr;
02224     SelRange::CommonAttribResult eResult;
02225     eResult = GetApplication()->
02226                  FindSelection()->
02227                      FindCommonAttribute(CC_RUNTIME_CLASS(AttrJoinType), &pAttr);
02228 
02229     // initialise all button-states to FALSE - they will be set to TRUE appropriately below.
02230     BOOL fMitre = FALSE;
02231     BOOL fRound = FALSE;
02232     BOOL fBevel = FALSE;
02233 
02234     switch (eResult)
02235     {
02236         // uncheck all buttons.
02237         case SelRange::ATTR_NONE:
02238             break;
02239 
02240         // only check the common join type.
02241         case SelRange::ATTR_COMMON:
02242             if (pAttr != NULL)
02243             {
02244                 fMitre = ( ((AttrJoinType*)pAttr)->Value.JoinType == MitreJoin );
02245                 fRound = ( ((AttrJoinType*)pAttr)->Value.JoinType == RoundJoin );
02246                 fBevel = ( ((AttrJoinType*)pAttr)->Value.JoinType == BevelledJoin );
02247             }
02248             break;
02249 
02250         // test the selection for all common line attr types.
02251         case SelRange::ATTR_MANY:
02252             {
02253                 // scan the selection, quitting as soon as all three states get set.
02254                 SelRange* pSel = GetApplication()->FindSelection();
02255                 for (Node*  pSelNode =  pSel->FindFirst();
02256                             pSelNode != NULL && !(fMitre && fRound && fBevel);
02257                             pSelNode =  pSel->FindNext(pSelNode))
02258                 {
02259                     if (!pSelNode->IsAnObject())
02260                         continue;
02261 
02262                     ((NodeRenderableInk*)pSelNode)->
02263                         FindAppliedAttribute(CC_RUNTIME_CLASS(AttrJoinType), &pAttr);
02264                     if (pAttr != NULL)
02265                     {
02266                         fMitre |= ( ((AttrJoinType*)pAttr)->Value.JoinType == MitreJoin );
02267                         fRound |= ( ((AttrJoinType*)pAttr)->Value.JoinType == RoundJoin );
02268                         fBevel |= ( ((AttrJoinType*)pAttr)->Value.JoinType == BevelledJoin );
02269                     }
02270                 }
02271             }
02272             break;
02273 
02274         // error - unrecognised return option from FindCommonAttribute().
02275         default:
02276             ERROR3("BevelInfoBarOp::UpdateJoinTypeControls; invalid result from FindCommonAttribute()");
02277             break;
02278     }
02279 
02280     SetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEMITRE), fMitre);
02281     SetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEROUND), fRound);
02282     SetBoolGadgetSelected(_R(IDC_BEVELJOINTYPEBEVEL), fBevel);
02283 }

void BevelInfoBarOp::UpdateState  )  [virtual]
 

Sets the state of button on the bar to keep them up to date.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/1/97

Reimplemented from DialogBarOp.

Definition at line 1455 of file bevinfo.cpp.

01456 {
01457     // Don't try to set our controls when they're not there!
01458     TRACEUSER( "DavidM", _T("BevelInfoBarOp::UpdateState\n"));
01459 
01460     if (!ControlsExist)
01461         return;
01462 
01463     UpdateControls();
01464 
01465     return;
01466 
01467 }


Member Data Documentation

BOOL BevelInfoBarOp::CanRetroFit
 

Definition at line 145 of file bevinfo.h.

BOOL BevelInfoBarOp::ControlsExist
 

Definition at line 149 of file bevinfo.h.

BOOL BevelInfoBarOp::m_bAmDragging [private]
 

Definition at line 234 of file bevinfo.h.

BOOL BevelInfoBarOp::m_bAmDraggingSlider [private]
 

Definition at line 252 of file bevinfo.h.

BOOL BevelInfoBarOp::m_bButtonIsInner [private]
 

Definition at line 249 of file bevinfo.h.

BOOL BevelInfoBarOp::m_bButtonIsOuter [private]
 

Definition at line 250 of file bevinfo.h.

BOOL BevelInfoBarOp::m_bComboChanged [private]
 

Definition at line 225 of file bevinfo.h.

BOOL BevelInfoBarOp::m_bControlsEnabled [private]
 

Definition at line 224 of file bevinfo.h.

BOOL BevelInfoBarOp::m_BetweenViews
 

Definition at line 196 of file bevinfo.h.

INT32 BevelInfoBarOp::m_BlobAngle [private]
 

Definition at line 232 of file bevinfo.h.

BOOL BevelInfoBarOp::m_bUserSet [private]
 

Definition at line 242 of file bevinfo.h.

INT32 BevelInfoBarOp::m_Contrast
 

Definition at line 158 of file bevinfo.h.

INT32 BevelInfoBarOp::m_Depth
 

Definition at line 156 of file bevinfo.h.

MILLIPOINT BevelInfoBarOp::m_LastDragWidth [private]
 

Definition at line 254 of file bevinfo.h.

INT32 BevelInfoBarOp::m_LightAngle
 

Definition at line 157 of file bevinfo.h.

INT32 BevelInfoBarOp::m_LightTilt
 

Definition at line 160 of file bevinfo.h.

BevelBlob* BevelInfoBarOp::m_pDragBlob [private]
 

Definition at line 229 of file bevinfo.h.

INT32 BevelInfoBarOp::m_SliderComboIndex
 

Definition at line 159 of file bevinfo.h.

INT32 BevelInfoBarOp::m_UserIndent [private]
 

Definition at line 243 of file bevinfo.h.

BevelInfoBarOp * BevelInfoBarOp::pCurrentBar = NULL [static]
 

Definition at line 194 of file bevinfo.h.

BevelTool* BevelInfoBarOp::pTool
 

Definition at line 144 of file bevinfo.h.


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