OpChangeLineCapOpDesc Class Reference

OpDescriptor to allow the user to change the join-type of all selected objects, or to set the AttributeManager's current join-type attribute if no objects are selected. More...

#include <lattrops.h>

Inheritance diagram for OpChangeLineCapOpDesc:

OpChangeLineAttribOpDesc UndoableOpDescriptor OpDescriptor MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpChangeLineCapOpDesc ()

Static Public Member Functions

static BOOL Init ()
 Registers the OpChangeLineCapOpDesc operation descriptor.

Private Member Functions

virtual CCRuntimeClassGetAttribRuntimeClass () const
virtual UINT32 ConvertAttribToStringID (NodeAttribute *pAttr) const
 Called by the OpChangeLineAttribOpDesc base class when it wants to get a string describing the given attribute.
virtual UINT32 GetItemStringID (INT32 nIndex) const
 Called by the OpChangeLineAttribOpDesc base class when it wants the string to insert at the given position in the combo.
virtual NodeAttributeGetNewAttrib (INT32 nItemIndex) const
 Called by the OpChangeLineAttribOpDesc base class when it wants to create an attribute.

Detailed Description

OpDescriptor to allow the user to change the join-type of all selected objects, or to set the AttributeManager's current join-type attribute if no objects are selected.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/3/95

Definition at line 162 of file lattrops.h.


Constructor & Destructor Documentation

OpChangeLineCapOpDesc::OpChangeLineCapOpDesc  ) 
 

Definition at line 321 of file lattrops.cpp.

00322   : OpChangeLineAttribOpDesc(_R(IDS_CHANGE_LINE_CAP),
00323                              OPTOKEN_CHANGE_LINE_CAP,
00324                              _R(IDBBL_CHANGE_LINE_CAP),
00325                              _R(IDLB_LINECAP_LIST_BOX))
00326 {
00327     // Empty.
00328 }


Member Function Documentation

UINT32 OpChangeLineCapOpDesc::ConvertAttribToStringID NodeAttribute pAttr  )  const [private, virtual]
 

Called by the OpChangeLineAttribOpDesc base class when it wants to get a string describing the given attribute.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/4/95
Parameters:
pAttr the attribute to "convert" [INPUTS]
- [OUTPUTS]
Returns:
A string ID describing the given attribute.

Errors: -

See also:
-

Implements OpChangeLineAttribOpDesc.

Definition at line 366 of file lattrops.cpp.

00367 {
00368     UINT32 nTxtID;
00369     switch (((AttrStartCap*) pAttr)->Value.StartCap)
00370     {
00371     case LineCapButt:
00372         nTxtID = _R(IDS_CAPTYPE_BUTT);
00373         break;
00374 
00375     case LineCapRound:
00376         nTxtID = _R(IDS_CAPTYPE_ROUND);
00377         break;
00378 
00379     case LineCapSquare:
00380         nTxtID = _R(IDS_CAPTYPE_SQUARE);
00381         break;
00382 
00383     default:
00384         nTxtID = 0;
00385         break;
00386     }
00387     
00388     return nTxtID;
00389 }

CCRuntimeClass * OpChangeLineCapOpDesc::GetAttribRuntimeClass  )  const [private, virtual]
 

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The run-time class of the AttrJoinType line attribute.

Errors: -

See also:
-

Implements OpChangeLineAttribOpDesc.

Definition at line 345 of file lattrops.cpp.

00346 {
00347     return CC_RUNTIME_CLASS(AttrStartCap);
00348 }

UINT32 OpChangeLineCapOpDesc::GetItemStringID INT32  nItemIndex  )  const [private, virtual]
 

Called by the OpChangeLineAttribOpDesc base class when it wants the string to insert at the given position in the combo.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/4/95
Parameters:
A combo-box position index (ie. 0, 1, 2, 3, ...) [INPUTS]
- [OUTPUTS]
Returns:
The string ID of the item in the combo at the given position, or 0 if there isn't one.

Errors: -

See also:
-

Implements OpChangeLineAttribOpDesc.

Definition at line 408 of file lattrops.cpp.

00409 {
00410     static UINT32 nStringID[] =
00411     {
00412         _R(IDS_CAPTYPE_BUTT),
00413         _R(IDS_CAPTYPE_ROUND),
00414         _R(IDS_CAPTYPE_SQUARE),
00415         0
00416     };
00417 
00418     return nStringID[nItemIndex];
00419 }

NodeAttribute * OpChangeLineCapOpDesc::GetNewAttrib INT32  nItemIndex  )  const [private, virtual]
 

Called by the OpChangeLineAttribOpDesc base class when it wants to create an attribute.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/4/95
Parameters:
nItemIndex the index position within the combo the user has selected [INPUTS]
- [OUTPUTS]
Returns:
A pointer to an attribute corresponding to the given index position.

Errors: -

See also:
-

Implements OpChangeLineAttribOpDesc.

Definition at line 437 of file lattrops.cpp.

00438 {
00439     AttrStartCap* pAttr = new AttrStartCap;
00440     if (pAttr != NULL) pAttr->Value.StartCap = (LineCapType) nItemIndex;
00441     return pAttr;
00442 }

BOOL OpChangeLineCapOpDesc::Init void   )  [static]
 

Registers the OpChangeLineCapOpDesc operation descriptor.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
LineSGallery::Init

Reimplemented from SimpleCCObject.

Definition at line 301 of file lattrops.cpp.

00302 {
00303     return (new OpChangeLineCapOpDesc) != NULL;
00304 }


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