rxattrib.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. #pragma once
  12. #include "acbasedefs.h"
  13. #include "adesk.h"
  14. #include "acadstrc.h"
  15. #include "pimplapi.h"
  16. #include "rxvalue.h"
  17. class AcRxAttributeImp;
  18. class AcRxAttributeCollectionImp;
  19. class AcRxMember;
  20. class AcRxPropertyBase;
  21. //*************************************************************************
  22. // AcRxAttribute
  23. //*************************************************************************
  24. /// <summary>
  25. /// Abstract base class for all attribute classes
  26. /// </summary>
  27. ///
  28. class ADESK_NO_VTABLE AcRxAttribute : public Pimpl::ApiPart<AcRxObject, AcRxAttributeImp>
  29. {
  30. public:
  31. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxAttribute, ACBASE_PORT);
  32. /// <summary>
  33. /// Destructor
  34. /// </summary>
  35. ///
  36. ACBASE_PORT virtual ~AcRxAttribute() = 0;
  37. protected:
  38. ACBASE_PORT AcRxAttribute(AcRxAttributeImp*);
  39. };
  40. //*************************************************************************
  41. // AcRxAttributeCollection
  42. //*************************************************************************
  43. /// <summary>
  44. /// This class is a collection of AcRxAttribute objects
  45. /// </summary>
  46. ///
  47. class AcRxAttributeCollection : public Pimpl::ApiPart<void, AcRxAttributeCollectionImp>
  48. {
  49. public:
  50. /// <summary>
  51. /// Constructor
  52. /// </summary>
  53. ///
  54. ACBASE_PORT AcRxAttributeCollection();
  55. /// <summary>
  56. /// This method returns the number of AcRxAttribute objects in the collection.
  57. /// </summary>
  58. ///
  59. /// <returns> The number of attributes in the collection </returns>
  60. ///
  61. ACBASE_PORT int count() const;
  62. /// <summary>
  63. /// This method returns a pointer to AcRxAttribute object at the passed
  64. /// in index.
  65. /// </summary>
  66. ///
  67. /// <param name="index">
  68. /// Passed in index of interest
  69. /// </param>
  70. ///
  71. /// <returns> Returns a pointer to an AcRxAttribute object if successful, NULL on failure</returns>
  72. ///
  73. ACBASE_PORT const AcRxAttribute* getAt(int index) const;
  74. ACBASE_PORT AcRxAttribute* getAt(int index);
  75. /// <summary>
  76. /// This method returns a pointer to AcRxAttribute object of the type that
  77. /// is passed. Using this method we can search for an atribute given the type.
  78. /// </summary>
  79. ///
  80. /// <param name="type">
  81. /// Input the class descriptor of the attribute.
  82. /// </param>
  83. ///
  84. /// <returns> Returns a pointer to an AcRxAttribute object if successful, NULL on failure </returns>
  85. ///
  86. ACBASE_PORT const AcRxAttribute* get(const AcRxClass* type) const;
  87. ACBASE_PORT AcRxAttribute* get(const AcRxClass* type);
  88. /// <summary>
  89. /// This method method adds the attribute object to the collection.
  90. ///
  91. /// </summary>
  92. ///
  93. /// <param name="attribute">
  94. /// Input attribute object to add to the collection
  95. /// </param>
  96. ///
  97. /// <returns> Returns Acad::eOk if successful, otherwise, returns an AutoCAD error status</returns>
  98. ///
  99. ACBASE_PORT Acad::ErrorStatus add(const AcRxAttribute* attribute);
  100. /// <summary>
  101. /// This method method overides the attribute (adds it if it doesn't exist, or replaces if it already exists)
  102. ///
  103. /// </summary>
  104. ///
  105. /// <param name="attribute">
  106. /// Input attribute object to add to the collection
  107. /// </param>
  108. ///
  109. /// <returns> Returns Acad::eOk if successful, otherwise, returns an AutoCAD error status</returns>
  110. ///
  111. ACBASE_PORT Acad::ErrorStatus override(const AcRxAttribute* attribute);
  112. /// <summary>
  113. /// This method method removes the attribute object from the collection.
  114. ///
  115. /// </summary>
  116. ///
  117. /// <param name="attribute">
  118. /// Input attribute object to be removed.
  119. /// </param>
  120. ///
  121. /// <returns> Returns Acad::eOk if successful, otherwise, returns an AutoCAD error status </returns>
  122. ///
  123. ACBASE_PORT Acad::ErrorStatus remove(const AcRxAttribute* attribute);
  124. };
  125. //*************************************************************************
  126. // AcRxResourceLoader
  127. //*************************************************************************
  128. /// <summary>
  129. /// This is a protocol extension base class that is used to get the
  130. /// string from a resource.
  131. /// </summary>
  132. ///
  133. class ADESK_NO_VTABLE AcRxResourceLoader : public AcRxObject
  134. {
  135. /// <summary>
  136. /// The derived class must override this method and return the resource string.
  137. ///
  138. /// </summary>
  139. ///
  140. /// <param name="id">
  141. /// Resource identifier
  142. /// </param>
  143. ///
  144. /// <param name="sourceHint">
  145. /// Caller may pass a hint that may be useful in locating the resource files, and
  146. /// loading the resource.
  147. /// </param>
  148. ///
  149. /// <param name="result">
  150. /// Output reference to AcString object to receive the resource string.
  151. /// </param>
  152. ///
  153. /// <returns> Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status. </returns>
  154. ///
  155. virtual Acad::ErrorStatus subLoadString(unsigned int id, unsigned int sourceHint, AcString& result) = 0;
  156. public:
  157. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxResourceLoader, ACBASE_PORT);
  158. /// <summary>
  159. /// The function tries to load the resource string from the protocol extension
  160. /// object attached to the input class.
  161. ///
  162. /// </summary>
  163. ///
  164. /// <param name="pClass">
  165. /// Input pointer to the AcRxObject that implements the AcRxResourceLoader protocol extension.
  166. /// </param>
  167. ///
  168. /// <param name="id">
  169. /// Resource identifier
  170. /// </param>
  171. ///
  172. /// <param name="sourceHint">
  173. /// Caller may pass a hint that may be useful in locating the resource files, and
  174. /// loading the resource.
  175. /// </param>
  176. ///
  177. /// <param name="result">
  178. /// Output reference to AcString object to receive the resource string.
  179. /// </param>
  180. ///
  181. /// <returns> Returns Acad::eOk if successful; otherwise, returns an AutoCAD error status. </returns>
  182. ///
  183. ACBASE_PORT static Acad::ErrorStatus loadString(const AcRxObject* pClass,unsigned int id, unsigned int sourceHint, AcString& result);
  184. };
  185. //*************************************************************************
  186. // AcRxLocalizedNameAttribute
  187. //*************************************************************************
  188. /// <summary>
  189. /// This class provides the resource identifier and the resource hint that
  190. /// is used to load the resource string. This attribute is used to get the
  191. /// localized name of an AcRxMember object.
  192. /// </summary>
  193. ///
  194. class AcRxLocalizedNameAttribute : public AcRxAttribute
  195. {
  196. public:
  197. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxLocalizedNameAttribute, ACBASE_PORT);
  198. /// <summary>
  199. /// Constructor
  200. /// </summary>
  201. ///
  202. /// <param name="id">
  203. /// Resource identifier
  204. /// </param>
  205. ///
  206. ACBASE_PORT AcRxLocalizedNameAttribute(unsigned int id);
  207. /// <summary>
  208. /// Constructor
  209. /// </summary>
  210. ///
  211. /// <param name="id">
  212. /// Resource identifier
  213. /// </param>
  214. ///
  215. /// <param name="sourceHint">
  216. /// Hint that may be useful in locating the resource file, and
  217. /// loading the resource string.
  218. /// </param>
  219. ///
  220. ACBASE_PORT AcRxLocalizedNameAttribute(unsigned int id, unsigned int sourceHint);
  221. ACBASE_PORT static AcString getLocalizedName(const AcRxObject* pO);
  222. /// <summary>
  223. /// Returns the id passed to the constructor
  224. /// </summary>
  225. /// <returns> Returns the ide passed to the constructor </returns>
  226. //
  227. ACBASE_PORT unsigned int id() const;
  228. /// <summary>
  229. /// Returns the sourceHint passed to the constructor
  230. /// </summary>
  231. /// <seealso>AcRxResourceLoader</seealso>
  232. /// <returns> Returns the ide passed to the constructor </returns>
  233. //
  234. ACBASE_PORT unsigned int sourceHint() const;
  235. };
  236. //*************************************************************************
  237. // AcRxLocalizedNameAttribute
  238. //*************************************************************************
  239. /// <summary>
  240. /// This class provides the resource identifier and the resource hint that
  241. /// is used to load an alternative resource string. This attribute is used
  242. /// to get the localized name of an AcRxMember object. There are instances
  243. /// where a member name needs to be displayed using an alternate resource
  244. /// string. This attribute would be useful in those circumstances.
  245. /// </summary>
  246. ///
  247. class AcRxAlternateLocalizedNameAttribute : public AcRxLocalizedNameAttribute
  248. {
  249. public:
  250. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxAlternateLocalizedNameAttribute, ACBASE_PORT);
  251. /// <summary>
  252. /// Constructor
  253. /// </summary>
  254. ///
  255. /// <param name="id">
  256. /// Resource identifier
  257. /// </param>
  258. ///
  259. ACBASE_PORT AcRxAlternateLocalizedNameAttribute(unsigned int id);
  260. /// <summary>
  261. /// Constructor
  262. /// </summary>
  263. ///
  264. /// <param name="id">
  265. /// Resource identifier
  266. /// </param>
  267. ///
  268. /// <param name="sourceHint">
  269. /// Hint that may be useful in locating the resource file, and
  270. /// loading the resource string.
  271. /// </param>
  272. ///
  273. ACBASE_PORT AcRxAlternateLocalizedNameAttribute(unsigned int id, unsigned int sourceHint);
  274. };
  275. //*************************************************************************
  276. // AcRxUiPlacementAttribute
  277. //*************************************************************************
  278. /// <summary>
  279. /// This class can be used to categorize a member object.
  280. /// </summary>
  281. ///
  282. class AcRxUiPlacementAttribute : public AcRxAttribute
  283. {
  284. public:
  285. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxUiPlacementAttribute, ACBASE_PORT);
  286. /// <summary>
  287. /// Constructor
  288. /// </summary>
  289. ///
  290. /// <param name="category">
  291. /// Name of the category
  292. /// </param>
  293. /// <param name="weight">
  294. /// The weight that is passed can be used to sort the members.
  295. /// </param>
  296. ///
  297. ACBASE_PORT AcRxUiPlacementAttribute(const ACHAR* category, unsigned int weight);
  298. /// <summary>
  299. /// Returns the name of the category
  300. /// </summary>
  301. /// <param name="member">
  302. /// Input pointer to a member object from which to get the category.
  303. /// </param>
  304. ///
  305. /// <returns> Returns const ACHAR* that points to the category name</returns>
  306. ///
  307. ACBASE_PORT static const ACHAR* getCategory(const AcRxObject* member);
  308. /// <summary>
  309. /// Returns the weight as specified by the AcRxUiPlacementAttribute
  310. /// for promoted properties it returns the calculated weight
  311. /// </summary>
  312. ///
  313. /// <param name="member">
  314. /// Input pointer to a member object from which to get the weight.
  315. /// </param>
  316. ///
  317. /// <returns> Returns the weight as a float </returns>
  318. ///
  319. ACBASE_PORT static float getWeight(const AcRxObject* member);
  320. };
  321. //*************************************************************************
  322. // AcRxDescriptionAttribute
  323. //*************************************************************************
  324. /// <summary>
  325. /// This class can be used to describe a member object. The description can
  326. /// come from a resource file.
  327. /// </summary>
  328. ///
  329. class AcRxDescriptionAttribute : public AcRxAttribute
  330. {
  331. public:
  332. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxDescriptionAttribute, ACBASE_PORT);
  333. /// <summary>
  334. /// Constructor
  335. /// </summary>
  336. ///
  337. /// <param name="desc">
  338. /// Description text
  339. /// </param>
  340. ///
  341. ACBASE_PORT AcRxDescriptionAttribute(const ACHAR* desc);
  342. /// <summary>
  343. /// Constructor
  344. /// </summary>
  345. ///
  346. /// <param name="id">
  347. /// Resource identifier of the description text
  348. /// </param>
  349. ///
  350. ACBASE_PORT AcRxDescriptionAttribute(unsigned int id);
  351. /// <summary>
  352. /// Constructor
  353. /// </summary>
  354. ///
  355. /// <param name="id">
  356. /// Resource identifier of the description text
  357. /// </param>
  358. ///
  359. /// <param name="sourceHint">
  360. /// Hint that may be useful in locating the resource file, and
  361. /// loading the resource string.
  362. /// </param>
  363. ///
  364. ACBASE_PORT AcRxDescriptionAttribute(unsigned int id, unsigned int sourceHint);
  365. /// <summary>
  366. /// Returns the description string. The description string from a resource
  367. /// file is returned, if the resource identifier is available.
  368. /// </summary>
  369. ///
  370. /// <param name="pO">
  371. /// Input pointer to an AcRxObject (AcRxMember or AcRxClass)
  372. /// for which to obtain the description
  373. /// </param>
  374. ///
  375. /// <returns> Returns the description as AcString </returns>
  376. ///
  377. ACBASE_PORT static AcString getDescription(const AcRxObject* pO);
  378. /// <summary>
  379. /// Returns the id passed to the constructor
  380. /// </summary>
  381. /// <returns> Returns the ide passed to the constructor </returns>
  382. //
  383. ACBASE_PORT unsigned int id() const;
  384. /// <summary>
  385. /// Returns the sourceHint passed to the constructor
  386. /// </summary>
  387. /// <seealso>AcRxResourceLoader</seealso>
  388. /// <returns> Returns the ide passed to the constructor </returns>
  389. //
  390. ACBASE_PORT unsigned int sourceHint() const;
  391. };
  392. typedef const AcRxPropertyBase* (*FindPropertyCallback)(const AcRxObject* pObject, const ACHAR* pszPropName);
  393. typedef bool (*ConvertValueCallback)(const AcRxPropertyBase* pProperty, AcRxValue& value);
  394. //*************************************************************************
  395. // AcRxRefersToAttribute
  396. //*************************************************************************
  397. /// <summary>
  398. /// This class can be used to provide additional information to describe the member.
  399. /// The common usecase is to set the path that refers to the container. For example
  400. /// the layer property can have the refers attribute set to /LayerTableId/Items,
  401. /// which indicates that it is an item in the LayerTable.
  402. /// </summary>
  403. ///
  404. class AcRxRefersToAttribute : public AcRxAttribute
  405. {
  406. public:
  407. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxRefersToAttribute, ACBASE_PORT);
  408. /// <summary>
  409. /// Constructor
  410. /// </summary>
  411. ///
  412. /// <param name="path">
  413. /// Input path.
  414. /// </param>
  415. ///
  416. ACBASE_PORT AcRxRefersToAttribute(const ACHAR* path);
  417. /// <summary>
  418. /// Returns the path that was specified in the constructor
  419. /// </summary>
  420. ///
  421. /// <returns> Returns const ACHAR* that points to the path </returns>
  422. ///
  423. ACBASE_PORT const ACHAR* path() const;
  424. /// <summary>
  425. /// Returns the last property in the path
  426. /// </summary>
  427. ACBASE_PORT static const AcRxPropertyBase* parseReference(const ACHAR* path, const AcRxObject* pObject, FindPropertyCallback find = NULL, ConvertValueCallback convert = NULL);
  428. };
  429. //*************************************************************************
  430. // AcRxDisplayAsAttribute
  431. //*************************************************************************
  432. /// <summary>
  433. /// This class can be used to inform that a member can be substituted
  434. /// by a different one. The common use case is to set this attribute on
  435. /// properties that return object id. A more meaningful property like the name
  436. /// can be displayed, instead of displaying the object id.
  437. /// </summary>
  438. ///
  439. class AcRxDisplayAsAttribute : public AcRxAttribute
  440. {
  441. public:
  442. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxDisplayAsAttribute, ACBASE_PORT);
  443. /// <summary>
  444. /// Constructor
  445. /// </summary>
  446. ///
  447. /// <param name="name">
  448. /// Input member name
  449. /// </param>
  450. ///
  451. ACBASE_PORT AcRxDisplayAsAttribute(const ACHAR* name);
  452. /// <summary>
  453. /// Returns the name of the property that was specified in the constructor
  454. /// </summary>
  455. ///
  456. /// <returns> Returns const ACHAR* that points to the name </returns>
  457. ///
  458. ACBASE_PORT const ACHAR* path() const;
  459. };
  460. //*************************************************************************
  461. // AcRxCOMAttribute
  462. //*************************************************************************
  463. /// <summary>
  464. /// This class can be used to provide the COM name for a member incase it
  465. /// is different from the member name. This will be useful in areas of
  466. /// computation where a member is used instead of an equivalent COM property.
  467. /// </summary>
  468. ///
  469. class AcRxCOMAttribute : public AcRxAttribute
  470. {
  471. public:
  472. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxCOMAttribute, ACBASE_PORT);
  473. /// <summary>
  474. /// Constructor
  475. /// </summary>
  476. ///
  477. /// <param name="name">
  478. /// COM name
  479. /// </param>
  480. ///
  481. ACBASE_PORT AcRxCOMAttribute(const ACHAR* name);
  482. /// <summary>
  483. /// Returns the COM name that was specified in the constructor
  484. /// </summary>
  485. ///
  486. /// <returns> Returns const ACHAR* that points to the name </returns>
  487. ///
  488. ACBASE_PORT const ACHAR* name() const;
  489. };
  490. //*************************************************************************
  491. // AcRxFilePathAttribute
  492. //*************************************************************************
  493. /// <summary>
  494. /// This class can be used to indicate that the value of a member is a
  495. /// file path.
  496. /// </summary>
  497. class AcRxFilePathAttribute : public AcRxAttribute
  498. {
  499. public:
  500. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxFilePathAttribute, ACBASE_PORT);
  501. /// <summary>
  502. /// Constructor
  503. /// </summary>
  504. ///
  505. ACBASE_PORT AcRxFilePathAttribute();
  506. };
  507. //*************************************************************************
  508. // AcRxFlagsAttribute
  509. //*************************************************************************
  510. /// <summary>
  511. /// This class can be used to indicate that the value of a member is
  512. /// a bitwise flag.
  513. /// </summary>
  514. ///
  515. class AcRxFlagsAttribute : public AcRxAttribute
  516. {
  517. public:
  518. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxFlagsAttribute, ACBASE_PORT);
  519. /// <summary>
  520. /// Constructor
  521. /// </summary>
  522. ///
  523. ACBASE_PORT AcRxFlagsAttribute();
  524. };
  525. //*************************************************************************
  526. // AcRxUnitTypeAttribute
  527. //*************************************************************************
  528. /// <summary>
  529. /// This class can be used to indicate that the unit of a type
  530. /// </summary>
  531. ///
  532. class AcRxUnitTypeAttribute : public AcRxAttribute
  533. {
  534. public:
  535. enum UnitType
  536. {
  537. kUnitless = 0,
  538. kDistance = (0x1 << 0),
  539. kAngle = (0x1 << 1),
  540. kArea = (0x1 << 2),
  541. kVolume = (0x1 << 3),
  542. kCurrency = (0x1 << 4),
  543. kPercentage = (0x1 << 5),
  544. kAngleNotTransformed = (0x1 << 16),
  545. };
  546. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxUnitTypeAttribute, ACBASE_PORT);
  547. /// <summary>
  548. /// Constructor
  549. /// </summary>
  550. ///
  551. /// <param name="unitType">
  552. /// Input unit type
  553. /// </param>
  554. ///
  555. ACBASE_PORT AcRxUnitTypeAttribute(UnitType unitType);
  556. /// <summary>
  557. /// Returns the unit type that was specified in the constructor.
  558. /// </summary>
  559. ///
  560. /// <returns> Returns unit type as AcValue::UnitType </returns>
  561. ///
  562. ACBASE_PORT UnitType unitType() const;
  563. };
  564. //*************************************************************************
  565. // AcRxGenerateDynamicPropertiesAttribute
  566. //*************************************************************************
  567. /// <summary>
  568. /// This class can be used to indicate that the properties of an AcRxClass
  569. /// or an individual AcRxProperty should have IDynamicProperty2 wrappers
  570. /// generated for it whenever it is examined by COM property inspectors.
  571. /// </summary>
  572. class AcRxGenerateDynamicPropertiesAttribute : public AcRxAttribute
  573. {
  574. public:
  575. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxGenerateDynamicPropertiesAttribute, ACBASE_PORT);
  576. /// <summary>
  577. /// Constructor
  578. /// </summary>
  579. ///
  580. ACBASE_PORT AcRxGenerateDynamicPropertiesAttribute();
  581. };
  582. //*************************************************************************
  583. // AcRxUseDialogForReferredCollectionAttribute
  584. //*************************************************************************
  585. /// <summary>
  586. /// This class can be used to indicate that a dialog is displayed for
  587. /// the member.
  588. /// </summary>
  589. ///
  590. class AcRxUseDialogForReferredCollectionAttribute : public AcRxAttribute
  591. {
  592. public:
  593. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxUseDialogForReferredCollectionAttribute, ACBASE_PORT);
  594. /// <summary>
  595. /// Constructor
  596. /// </summary>
  597. ///
  598. ACBASE_PORT AcRxUseDialogForReferredCollectionAttribute();
  599. };
  600. //*************************************************************************
  601. // AcRxUiCascadingContextMenuAttribute
  602. //*************************************************************************
  603. /// <summary>
  604. /// This class can be used to indicate that if a member is related to a
  605. /// context menu, the menu is cascading and may have sub-menus. Otherwise,
  606. /// the enum-based context menu generation logic will be used.
  607. /// </summary>
  608. ///
  609. class AcRxUiCascadingContextMenuAttribute: public AcRxAttribute
  610. {
  611. public:
  612. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxUiCascadingContextMenuAttribute, ACBASE_PORT);
  613. /// <summary>
  614. /// Constructor
  615. /// </summary>
  616. ///
  617. ACBASE_PORT AcRxUiCascadingContextMenuAttribute();
  618. };
  619. //*************************************************************************
  620. // AcRxCumulativeAttribute
  621. //*************************************************************************
  622. /// <summary>
  623. /// This class can be used to caculate the cumulative area for multiple selection.
  624. /// </summary>
  625. ///
  626. class AcRxCumulativeAttribute : public AcRxAttribute
  627. {
  628. public:
  629. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxCumulativeAttribute, ACBASE_PORT);
  630. /// <summary>
  631. /// Constructor
  632. /// </summary>
  633. ///
  634. /// <param name="type">
  635. /// Cumulative type, (area, length, etc)
  636. /// </param>
  637. ///
  638. ACBASE_PORT AcRxCumulativeAttribute(const ACHAR* type);
  639. /// <summary>
  640. /// Returns the type name that was specified in the constructor
  641. /// </summary>
  642. ///
  643. /// <returns> Returns const ACHAR* that points to the type </returns>
  644. ///
  645. ACBASE_PORT const ACHAR* type() const;
  646. };
  647. //*************************************************************************
  648. // AcRxAffinityAttribute
  649. //*************************************************************************
  650. /// <summary>
  651. /// This class can be used to identify the affinite and pass the array
  652. /// of AcRxObject into AcRxProperty::getValue as parameters.
  653. /// </summary>
  654. ///
  655. class AcRxAffinityAttribute : public AcRxAttribute
  656. {
  657. public:
  658. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxAffinityAttribute, ACBASE_PORT);
  659. /// <summary>
  660. /// Constructor
  661. /// </summary>
  662. ///
  663. /// <param name="name">
  664. /// Affinite name, (SelectionContext, etc)
  665. /// </param>
  666. ///
  667. ACBASE_PORT AcRxAffinityAttribute(const ACHAR* name);
  668. /// <summary>
  669. /// Returns the type name that was specified in the constructor
  670. /// </summary>
  671. ///
  672. /// <returns> Returns const ACHAR* that points to the name of affinite </returns>
  673. ///
  674. ACBASE_PORT const ACHAR* name() const;
  675. };
  676. class AcRxTypePromotionAttribute : public AcRxAttribute
  677. {
  678. public:
  679. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxTypePromotionAttribute, ACBASE_PORT);
  680. ACBASE_PORT AcRxTypePromotionAttribute(const ACHAR* properties);
  681. ACBASE_PORT const ACHAR* properties() const;
  682. };
  683. class AcRxDefaultValueAttribute : public AcRxAttribute
  684. {
  685. public:
  686. ACRX_DECLARE_MEMBERS_EXPIMP(AcRxDefaultValueAttribute, ACBASE_PORT);
  687. ACBASE_PORT AcRxDefaultValueAttribute(const AcRxValue& value);
  688. ACBASE_PORT const AcRxValue& value() const;
  689. };