OpChangeLineJoinOpDesc 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 OpChangeLineJoinOpDesc:

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

Public Member Functions

 OpChangeLineJoinOpDesc ()

Static Public Member Functions

static BOOL Init ()
 Registers the OpChangeLineJoinOpDesc 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 132 of file lattrops.h.


Constructor & Destructor Documentation

OpChangeLineJoinOpDesc::OpChangeLineJoinOpDesc  ) 
 

Definition at line 163 of file lattrops.cpp.

00164   : OpChangeLineAttribOpDesc(_R(IDS_CHANGE_LINE_JOIN),
00165                              OPTOKEN_CHANGE_LINE_JOIN,
00166                              _R(IDBBL_CHANGE_LINE_JOIN),
00167                              _R(IDLB_JOINTYPE_LIST_BOX))
00168 {
00169     // Empty.
00170 }


Member Function Documentation

UINT32 OpChangeLineJoinOpDesc::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 208 of file lattrops.cpp.

00209 {
00210     UINT32 nTxtID;
00211     switch (((AttrJoinType*) pAttr)->Value.JoinType)
00212     {
00213     case MitreJoin:
00214         nTxtID = _R(IDS_JOINTYPE_MITRE);
00215         break;
00216 
00217     case RoundJoin:
00218         nTxtID = _R(IDS_JOINTYPE_ROUND);
00219         break;
00220 
00221     case BevelledJoin:
00222         nTxtID = _R(IDS_JOINTYPE_BEVEL);
00223         break;
00224 
00225     default:
00226         nTxtID = 0;
00227         break;
00228     }
00229     
00230     return nTxtID;
00231 }

CCRuntimeClass * OpChangeLineJoinOpDesc::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 187 of file lattrops.cpp.

00188 {
00189     return CC_RUNTIME_CLASS(AttrJoinType);
00190 }

UINT32 OpChangeLineJoinOpDesc::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 250 of file lattrops.cpp.

00251 {
00252     static UINT32 nStringID[] =
00253     {
00254         _R(IDS_JOINTYPE_MITRE),
00255         _R(IDS_JOINTYPE_ROUND),
00256         _R(IDS_JOINTYPE_BEVEL),
00257         0
00258     };
00259 
00260     return nStringID[nItemIndex];
00261 }

NodeAttribute * OpChangeLineJoinOpDesc::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 279 of file lattrops.cpp.

00280 {
00281     AttrJoinType* pAttr = new AttrJoinType;
00282     if (pAttr != NULL) pAttr->Value.JoinType = (JointType) nItemIndex;
00283     return pAttr;
00284 }

BOOL OpChangeLineJoinOpDesc::Init void   )  [static]
 

Registers the OpChangeLineJoinOpDesc 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 143 of file lattrops.cpp.

00144 {
00145     return (new OpChangeLineJoinOpDesc) != NULL;
00146 }


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