/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2024, 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-2024 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 _ODDBSMILEYMULTIMODESGRIPPE_INCLUDED #define _ODDBSMILEYMULTIMODESGRIPPE_INCLUDED #include "DbMultiModesGripPE.h" //######################################################################################## //############### OdDbSmileyMultiModesGripPE ############## //######################################################################################## class AsdkSmileyMultiModesGripPE: public OdDbMultiModesGripPE { public: virtual bool getGripModes(const OdDbEntity* pEnt, OdDbGripData* pGripData, OdArray& modes, unsigned int& curMode) const override; virtual unsigned int mode(OdDbEntity* pEnt, OdDbGripData* pGripData) const override; virtual GripMode modeEx(OdDbEntity* pEnt, OdDbGripData* pGripData) const override; virtual bool setMode(OdDbEntity* pEnt, OdDbGripData* pGripData, unsigned int newMode) override; virtual GripType gripType(OdDbEntity* pEnt, OdDbGripData* pGripData) const override; virtual void reset(OdDbEntity* pEnt) override; }; class OdGripSmileyMultiModeAppData : public OdRxObject { public: enum SmileyGripType { CENTER = 0, SMILE_RS = 1, // Right side edge SMILE_TS = 2, // Top side edge SMILE_LS = 3, // Left side edge SMILE_BS = 4, // Bottom side edge MOUTH_LEFT = 5, MOUTH_RIGHT = 6, MOUTH_BOTTOM = 7, MOUTH_MID_TOP = 8, EYE_LEFT = 9, EYE_LEFT_RS = 10, // Right edge of the left eye EYE_LEFT_TS = 11, // Top edge of the left eye EYE_LEFT_LS = 12, // Left edge of the left eye EYE_LEFT_BS = 13, // Bottom edge of the left eye EYE_RIGHT = 14, EYE_RIGHT_RS = 15, // Right edge of the right eye EYE_RIGHT_TS = 16, // Top edge of the right eye EYE_RIGHT_LS = 17, // Left edge of the right eye EYE_RIGHT_BS = 18 // Bottom edge of the right eye }; ODRX_DECLARE_MEMBERS(OdGripSmileyMultiModeAppData); OdGripSmileyMultiModeAppData() = delete; OdGripSmileyMultiModeAppData(const SmileyGripType type) : m_modes(), m_mode(0), m_gripType(OdDbMultiModesGripPE::kPrimary), m_smileyGripType(type) { initGripModes(); } void getGripModes(OdArray& modes); const unsigned int mode() const { return m_mode; } void setMode(unsigned int mode) { m_mode = mode; } OdDbMultiModesGripPE::GripMode gripMode() const { return m_modes.at(m_mode); }; OdDbMultiModesGripPE::GripType gripType() const { return m_gripType; } SmileyGripType lineGripType() const { return m_smileyGripType; } bool getIndices(OdIntArray& indices) const; private: std::map m_modes; unsigned int m_mode; OdDbMultiModesGripPE::GripType m_gripType; const SmileyGripType m_smileyGripType; void initGripModes(); }; typedef OdSmartPtr OdGripSmileyMultiModeAppDataPtr; #endif // _ODDBSMILEYMULTIMODESGRIPPE_INCLUDED