/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _DbBlockLinearParameter_h_Included_ #define _DbBlockLinearParameter_h_Included_ #include "DbBlock2PtParameter.h" #include "DbBlockParamValueSet.h" class OdDbBlockLinearGrip; typedef OdSmartPtr OdDbBlockLinearGripPtr; /** \details Block parameter representing a distance between 2 points */ class DYNBLOCKS_EXPORT OdDbBlockLinearParameter : public OdDbBlock2PtParameter { public: ODDB_EVAL_DECLARE_MEMBERS(OdDbBlockLinearParameter); /** \details Default constructor */ OdDbBlockLinearParameter(); /** \details Returns the name of the main value of the parameter */ OdString distanceName() const; /** \details Sets the name of the main value of the parameter */ void setDistanceName(const OdString&); /** \details Returns the tooltip for the distance */ OdString distanceDescription() const; /** \details Sets the tooltip for the distance */ void setDistanceDescription(const OdString&); /** \details Returns the grip point associated with one of the parameter components (either "Base" or "End") \remarks Only linear grip points are valid for the linear parameter */ OdDbBlockLinearGripPtr getAssociatedLinearGrip(OdDbBlockParameter::ParameterComponent, OdDb::OpenMode); /** \details Returns the offset of the parameter label from the line connecting definition points in the block editor */ double offset() const; /** \details Sets the offset of the parameter label from the line connecting definition points in the block editor */ void setOffset(double); /** \details Directly sets the updated value of the parameter. \returns eInvalidInput if the new distance is negative */ OdResult setUpdatedDistance(double); /** \details Returns the set of the allowed values for the parameter. (Unrestricted by default) */ OdDbBlockParamValueSetPtr valueSet() const; /** \details Sets the set of the allowed values for the parameter. */ void setValueSet(const OdDbBlockParamValueSet&); }; typedef OdSmartPtr OdDbBlockLinearParameterPtr; #endif //_DbBlockLinearParameter_h_Included_