123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649 |
- //
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- // Copyright 2015 Autodesk, Inc. All rights reserved.
- //
- // Use of this software is subject to the terms of the Autodesk license
- // agreement provided at the time of installation or download, or which
- // otherwise accompanies this software in either electronic or hard copy form.
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- #ifndef __ACDBDETAILVIEWSTYLE_H__
- #define __ACDBDETAILVIEWSTYLE_H__
- #pragma once
- #include "dbModelDocViewStyle.h"
- class ACDB_PORT AcDbDetailViewStyle : public AcDbModelDocViewStyle
- {
- public:
- /// <summary>
- /// Enumeration defining label and identifier placement
- /// </summary>
- enum IdentifierPlacement {
- kOutsideBoundary=0,
- kOutsideBoundaryWithLeader,
- kOnBoundary,
- kOnBoundaryWithLeader,
- };
- enum ModelEdge {
- kSmooth = 0,
- kSmoothWithBorder,
- kSmoothWithConnectionLine,
- kJagged,
- };
- AcDbDetailViewStyle();
- ~AcDbDetailViewStyle();
- ACDB_DECLARE_MEMBERS(AcDbDetailViewStyle);
- /// <summary>
- /// Returns the text style objectId of the identifier.
- /// </summary>
- ///
- /// <returns>
- /// Returns the text style objectId of the identifier.
- /// </returns>
- AcDbObjectId identifierStyleId () const;
- /// <summary>
- /// Sets the identifier to use specified text style.
- /// </summary>
- ///
- /// <param name="objId">
- /// ObjectId of text style to use for the identifier.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setIdentifierStyleId (const AcDbObjectId &objId);
- /// <summary>
- /// Returns the color of the identifier.
- /// </summary>
- ///
- /// <returns>
- /// Returns the color of the identifier.
- /// </returns>
- AcCmColor identifierColor () const;
- /// <summary>
- /// Sets the identifier to use specified color.
- /// </summary>
- ///
- /// <param name="color">
- /// Color to use for the identifier.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setIdentifierColor (const AcCmColor& color);
- /// <summary>
- /// Returns the height of the identifier.
- /// </summary>
- ///
- /// <returns>
- /// Returns the height of the identifier.
- /// </returns>
- double identifierHeight () const;
- /// <summary>
- /// Sets the text height the identifier.
- /// </summary>
- ///
- /// <param name="height">
- /// Text height to use for the identifier.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setIdentifierHeight (double height);
- /// <summary>
- /// Returns the offset between arrow line and extension line.
- /// The value is relative in range <0, 1>, where 0 means that
- /// arrow touches extension line at beginning and 1.0 means
- /// means that arrow touches the extension line at the end.
- /// </summary>
- ///
- /// <returns>
- /// Returns the offset between arrow line and extension line in
- /// relative form.
- /// </returns>
- double identifierOffset () const;
- /// <summary>
- /// Sets the offset between arrow line and extension line.
- /// The value is relative in range <0, 1>, where 0 means that
- /// arrow touches extension line at beginning and 1.0 means
- /// means that arrow touches the extension line at the end.
- /// </summary>
- ///
- /// <returns>
- /// Sets the offset between arrow line and extension line in relative
- /// form.
- /// </returns>
- Acad::ErrorStatus setIdentifierOffset (double offset);
- /// <summary>
- /// Returns the label and identifier placement flags.
- /// </summary>
- ///
- /// <returns>
- /// Returns the bit coded flags defining label and identifier placement.
- /// </returns>
- AcDbDetailViewStyle::IdentifierPlacement identifierPlacement () const;
- /// <summary>
- /// Sets the label and identifier placement flags.
- /// Use bit coded flags defined by identifierPlacement enumeration.
- /// </summary>
- ///
- /// <param name="placement">
- /// Bit coded flags defining label and identifier placement.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setIdentifierPlacement (AcDbDetailViewStyle::IdentifierPlacement placement);
- /// <summary>
- /// Returns the objectId of arrow start symbol.
- /// </summary>
- ///
- /// <returns>
- /// Returns the objectId of arrow start symbol.
- /// </returns>
- AcDbObjectId arrowSymbolId () const;
- /// <summary>
- /// Sets the arrow start symbol to use specified block table record.
- /// </summary>
- ///
- /// <param name="objId">
- /// ObjectId of block table record to use for arrow start symbol
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setArrowSymbolId (const AcDbObjectId &arrowSymbolId);
- /// <summary>
- /// Returns the color of arrow symbol.
- /// </summary>
- ///
- /// <returns>
- /// Returns the color of arrow symbol.
- /// </returns>
- AcCmColor arrowSymbolColor () const;
- /// <summary>
- /// Sets the arrow symbol to use specified color.
- /// </summary>
- ///
- /// <param name="color">
- /// Color to use for arrow symbol
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setArrowSymbolColor (const AcCmColor& color);
- /// <summary>
- /// Returns the size of arrow symbol.
- /// </summary>
- ///
- /// <returns>
- /// Returns the size of arrow symbol.
- /// </returns>
- double arrowSymbolSize () const;
- /// <summary>
- /// Sets the size of arrow symbol.
- /// </summary>
- ///
- /// <param name="size">
- /// Size of arrow symbol
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setArrowSymbolSize (double size);
- /// <summary>
- /// Returns boolean value indicating if to show arrowheads.
- /// </summary>
- ///
- /// <returns>
- /// true if to show arrowheads is on, false otherwise.
- /// </returns>
- bool showArrows () const;
- Acad::ErrorStatus setShowArrows (bool bValue);
- /// <summary>
- /// Returns the line weight of Boundary line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the line weight of Boundary line.
- /// </returns>
- AcDb::LineWeight boundaryLineWeight () const;
- /// <summary>
- /// Sets the Boundary line to use specified line weight.
- /// </summary>
- ///
- /// <param name="color">
- /// Line weight to use.for Boundary.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setBoundaryLineWeight (AcDb::LineWeight lineweight);
- /// <summary>
- /// Returns the color of Boundary line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the color of Boundary line.
- /// </returns>
- AcCmColor boundaryLineColor () const;
- /// <summary>
- /// Sets the Boundary line to use specified color.
- /// </summary>
- ///
- /// <param name="color">
- /// Color to use for Boundary.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setBoundaryLineColor (const AcCmColor& color);
- /// <summary>
- /// Returns the linetype objectId of Boundary line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the linetype objectId of Boundary line.
- /// </returns>
- AcDbObjectId boundaryLineTypeId () const;
- /// <summary>
- /// Sets the Boundary line to use specified linetype.
- /// </summary>
- ///
- /// <param name="objId">
- /// ObjectId of the linetype to use.for Boundary.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setBoundaryLineTypeId (const AcDbObjectId &objId);
- /// <summary>
- /// Returns the line weight of Connection line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the line weight of Connection line.
- /// </returns>
- AcDb::LineWeight connectionLineWeight () const;
- /// <summary>
- /// Sets the Connection line to use specified line weight.
- /// </summary>
- ///
- /// <param name="color">
- /// Line weight to use.for Connection.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setConnectionLineWeight (AcDb::LineWeight lineweight);
- /// <summary>
- /// Returns the color of Connection line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the color of Connection line.
- /// </returns>
- AcCmColor connectionLineColor () const;
- /// <summary>
- /// Sets the Connection line to use specified color.
- /// </summary>
- ///
- /// <param name="color">
- /// Color to use for Connection.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setConnectionLineColor (const AcCmColor& color);
- /// <summary>
- /// Returns the linetype objectId of Connection line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the linetype objectId of Connection line.
- /// </returns>
- AcDbObjectId connectionLineTypeId () const;
- /// <summary>
- /// Sets the Connection line to use specified linetype.
- /// </summary>
- ///
- /// <param name="objId">
- /// ObjectId of the linetype to use.for Connection.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setConnectionLineTypeId (const AcDbObjectId &objId);
- /// <summary>
- /// Returns the text style objectId of view label.
- /// </summary>
- ///
- /// <returns>
- /// Returns the text style objectId of view label.
- /// </returns>
- AcDbObjectId viewLabelTextStyleId () const;
- /// <summary>
- /// Sets the text style of the view label text.
- /// </summary>
- ///
- /// <param name="objId">
- /// length of end and bend line.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setViewLabelTextStyleId (const AcDbObjectId &objId);
- /// <summary>
- /// Returns the color of view label.
- /// </summary>
- ///
- /// <returns>
- /// Returns the color of view label.
- /// </returns>
- AcCmColor viewLabelTextColor () const;
- /// <summary>
- /// Sets the view label to use specified color.
- /// </summary>
- ///
- /// <param name="color">
- /// Color to use for view label
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setViewLabelTextColor (const AcCmColor& color);
- /// <summary>
- /// Returns the text height of view label.
- /// </summary>
- ///
- /// <returns>
- /// Returns the text height of view label.
- /// </returns>
- double viewLabelTextHeight () const;
- Acad::ErrorStatus setViewLabelTextHeight (double height);
- /// <summary>
- /// Returns the offset of view label.
- /// </summary>
- ///
- /// <returns>
- /// Returns the offset of view label.
- /// </returns>
- double viewLabelOffset () const;
- /// <summary>
- /// Sets the offset for view label.
- /// </summary>
- ///
- /// <param name="offset">
- /// offset for view label
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setViewLabelOffset (double offset);
- /// <summary>
- /// Returns the attachment of view label.
- /// </summary>
- ///
- /// <returns>
- /// Returns the attachment of view label.
- /// </returns>
- AcDbModelDocViewStyle::AttachmentPoint viewLabelAttachment () const;
- /// <summary>
- /// Sets the attachment for view label.
- /// </summary>
- ///
- /// <param name="attachment">
- /// attachment of view label
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setViewLabelAttachment (AcDbModelDocViewStyle::AttachmentPoint attachment);
- /// <summary>
- /// Returns the text alignment of view label.
- /// </summary>
- ///
- /// <returns>
- /// Returns the text alignment of view label.
- /// </returns>
- AcDbModelDocViewStyle::TextAlignment viewLabelAlignment () const;
- /// <summary>
- /// Sets the text alignment for view label.
- /// </summary>
- ///
- /// <param name="attachment">
- /// text alignment for view label
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setViewLabelAlignment (AcDbModelDocViewStyle::TextAlignment alignment);
- /// <summary>
- /// Returns the pattern of view label.
- /// </summary>
- ///
- /// <returns>
- /// Returns the pattern of view label.
- /// </returns>
- const ACHAR * viewLabelPattern () const;
- /// <summary>
- /// Gets the pattern for view label. If 'pField' parameter is specified and label
- /// pattern is currently using fields, the master field will be copied to 'pField'
- /// including child fields.
- /// </summary>
- ///
- /// <param name="pattern">
- /// pattern for view label
- /// </param>
- /// <param name="pField">
- /// If this optional parameter is specified and the pattern label is currently
- /// using fields, the master field will be copied to 'pField'. Child fields
- /// are also copied.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus getViewLabelPattern (AcString &pattern,
- AcDbField *pField = NULL) const;
- /// <summary>
- /// Sets the pattern for view label. If 'pField' parameter is specified and
- /// contains child fields, then label pattern will be acquired from the field.
- /// Otherwise 'pattern' is used.
- /// </summary>
- ///
- /// <param name="pattern"> pattern for view label
- /// </param>
- /// <param name="pField">
- /// If 'pField' parameter is specified and contains child fields, then label
- /// pattern will be acquired from the field, rather than from 'pattern'.
- /// The master field including child fields are also copied to view style's field.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setViewLabelPattern (const ACHAR* pattern,
- const AcDbField *pField = NULL);
- /// <summary>
- /// Returns boolean value indicating if to show view label.
- /// </summary>
- ///
- /// <returns>
- /// true if to show view label is on, false otherwise.
- /// </returns>
- bool showViewLabel () const;
- Acad::ErrorStatus setShowViewLabel (bool bValue);
- /// <summary>
- /// Returns the label and model edge flags.
- /// </summary>
- ///
- /// <returns>
- /// Returns the bit coded flags defining label and identifier placement.
- /// </returns>
- AcDbDetailViewStyle::ModelEdge modelEdge () const;
- /// <summary>
- /// Sets the label and identifier placement flags.
- /// Use bit coded flags defined by modelEdge enumeration.
- /// </summary>
- ///
- /// <param name="placement">
- /// Bit coded flags defining label and identifier placement.
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setModelEdge (AcDbDetailViewStyle::ModelEdge placement);
- /// <summary>
- /// Returns the line weight of Border line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the line weight of Border line.
- /// </returns>
- AcDb::LineWeight borderLineWeight () const;
- /// <summary>
- /// Sets the Border line to use specified line weight.
- /// </summary>
- ///
- /// <param name="color">
- /// Line weight to use.for Border.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setBorderLineWeight (AcDb::LineWeight lineweight);
- /// <summary>
- /// Returns the color of Border line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the color of Border line.
- /// </returns>
- AcCmColor borderLineColor () const;
- /// <summary>
- /// Sets the Border line to use specified color.
- /// </summary>
- ///
- /// <param name="color">
- /// Color to use for Border.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setBorderLineColor (const AcCmColor& color);
- /// <summary>
- /// Returns the linetype objectId of Border line.
- /// </summary>
- ///
- /// <returns>
- /// Returns the linetype objectId of Border line.
- /// </returns>
- AcDbObjectId borderLineTypeId () const;
- /// <summary>
- /// Sets the Border line to use specified linetype.
- /// </summary>
- ///
- /// <param name="objId">
- /// ObjectId of the linetype to use.for Border.line
- /// </param>
- ///
- /// <returns>
- /// Return Acad::eOk if Successful
- /// </returns>
- Acad::ErrorStatus setBorderLineTypeId (const AcDbObjectId &objId);
- protected:
- // For internal use only
- virtual Acad::ErrorStatus subDeepClone(AcDbObject* pOwner, AcDbObject*& pClonedObject,
- AcDbIdMapping& idMap, Adesk::Boolean isPrimary = true) const;
- virtual Acad::ErrorStatus subWblockClone(AcRxObject* pOwner, AcDbObject*& pClonedObject,
- AcDbIdMapping& idMap, Adesk::Boolean isPrimary = true) const;
- };
- #endif //__ACDBDETAILVIEWSTYLE_H__
|