Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreMessage.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_MESSAGE__
8 #define __HDI_CORE_MESSAGE__
9 
10 #include <vector>
11 
12 #include "hdicoreAngle.h"
13 #include "hdicoreArtboardPoint.h"
14 #include "hdicoreFileFormat.h"
15 #include "hdicoreRect.h"
16 #include "hdicoreTypes.h"
17 
18 namespace hdi
19 {
20  namespace core
21  {
22  class Annotator;
23  class Art;
24  class Artboard;
25  class DocumentView;
26  class FileFormat;
27  class MenuItem;
28  class Notification;
29  class Notifier;
30  class Timer;
31  class Tool;
32 
36  class Message
37  {
38  public:
44  virtual ~Message();
45 
53  virtual MessageType type() const;
54 
55 
56  protected:
60  void* _data;
61 
67  Message();
68 
74  Message(const Message&);
75 
81  Message& operator=(const Message&);
82  };
83 
87  class ActionMessage : public Message
88  {
89  public:
95  virtual ~ActionMessage();
96 
97 
98  private:
99  // Only Dispatcher can construct an ActionMessage object
100  friend class Dispatcher;
101 
107  ActionMessage(const MessageType, void*);
108 
115 
122  };
123 
129  class AdapterMessage : public Message
130  {
131  public:
137  virtual ~AdapterMessage();
138 
139 
140  private:
141  // Only Dispatcher can construct an AdapterMessage object
142  friend class Dispatcher;
143 
149  AdapterMessage(const MessageType, void*);
150 
157 
164  };
165 
169  class AnnotatorMessage : public Message
170  {
171  public:
172  typedef std::vector<Rect> RectVector;
173 
174  typedef AIAnnotatorDrawer* ContextPtr;
175 
181  virtual ~AnnotatorMessage();
182 
190  Annotator* const annotator() const;
191 
201  const ContextPtr context() const;
202 
210  DocumentView* const docView() const;
211 
219  bool triggeredByDragScroll() const;
220 
228  bool showEdges() const;
229 
240  RectVector* const invalidationRects() const;
241 
242 
243  private:
244  // Only Dispatcher can construct an AnnotatorMessage object
245  friend class Dispatcher;
246 
252  AnnotatorMessage(const Annotator&, const MessageType, void*);
253 
260 
267  };
268 
273  class ClipboardMessage : public Message
274  {
275  public:
281  virtual ~ClipboardMessage();
282 
283 
284  private:
285  // Only Dispatcher can construct a ClipboardMessage object
286  friend class Dispatcher;
287 
293  ClipboardMessage(const MessageType, void*);
294 
301 
308  };
309 
310  class CommandMessage : public Message
311  {
312  public:
318  virtual ~CommandMessage();
319 
320 
321  private:
322  // Only Dispatcher can construct a CommandMessage object
323  friend class Dispatcher;
324 
330  CommandMessage(const MessageType, void*);
331 
338 
345  };
346 
350  class CustomMessage : public Message
351  {
352  public:
358  virtual ~CustomMessage();
359 
367  std::string caller() const;
368 
376  std::string selector() const;
377 
387  void* data() const;
388 
389 
390  private:
391  // Only Dispatcher can construct a CustomMessage object
392  friend class Dispatcher;
393 
399  CustomMessage(const std::string&, const std::string&, const MessageType, void*);
400 
407 
414  };
415 
420  class FileFormatMessage : public Message
421  {
422  public:
423  typedef std::vector< Artboard* > ArtboardVector;
424 
430  virtual ~FileFormatMessage();
431 
439  FileFormat* const fileFormat() const;
440 
448  FileFormat::Options operation() const;
449 
457  FileFormat::ExtendedOptions extendedOperation() const;
458 
466  std::string filePath() const;
467 
475  void setFilePath(const std::string& path_);
476 
485  void* actionParam() const;
486 
497  ArtboardVector artboards() const;
498 
499 
500  private:
501  // Only Dispatcher can construct a FileFormatMessage object
502  friend class Dispatcher;
503 
509  FileFormatMessage(const MessageType, void*);
510 
517 
524  };
525 
529  class FilterMessage : public Message
530  {
531  public:
537  virtual ~FilterMessage();
538 
539 
540  private:
541  // Only Dispatcher can construct a FilterMessage object
542  friend class Dispatcher;
543 
549  FilterMessage(const MessageType, void*);
550 
557 
564  };
565 
569  class LayerListMessage : public Message
570  {
571  public:
577  virtual ~LayerListMessage();
578 
579 
580  private:
581  // Only Dispatcher can construct a LayerListMessage object
582  friend class Dispatcher;
583 
589  LayerListMessage(const MessageType, void*);
590 
597 
604  };
605 
609  class LiveEffectMessage : public Message
610  {
611  public:
617  virtual ~LiveEffectMessage();
618 
619 
620  protected:
626  LiveEffectMessage(const MessageType, void*);
627 
634 
641  };
642 
647  {
648  public:
654  virtual ~LiveEffectGoMessage();
655 
656 
657  private:
658  // Only Dispatcher can construct a LiveEffectGoMessage object
659  friend class Dispatcher;
660 
666  LiveEffectGoMessage(const MessageType, void*);
667 
674 
681  };
682 
687  {
688  public:
694  virtual ~LiveEffectEditParamsMessage();
695 
696 
697  private:
698  // Only Dispatcher can construct a LiveEffectEditParamsMessage object
699  friend class Dispatcher;
700 
707 
714 
721  };
722 
727  {
728  public:
734  virtual ~LiveEffectInterpolateMessage();
735 
736 
737  private:
738  // Only Dispatcher can construct a LiveEffectInterpolateMessage object
739  friend class Dispatcher;
740 
747 
754 
761  };
762 
767  {
768  public:
774  virtual ~LiveEffectInputMessage();
775 
776 
777  private:
778  // Only Dispatcher can construct a LiveEffectInputMessage object
779  friend class Dispatcher;
780 
786  LiveEffectInputMessage(const MessageType, void*);
787 
794 
801  };
802 
807  {
808  public:
815 
816 
817  private:
818  // Only Dispatcher can construct a LiveEffectConvertColorSpaceMessage object
819  friend class Dispatcher;
820 
827 
834 
841  };
842 
847  {
848  public:
855 
856 
857  private:
858  // Only Dispatcher can construct a LiveEffectAdjustColorsMessage object
859  friend class Dispatcher;
860 
867 
874 
881  };
882 
887  {
888  public:
894  virtual ~LiveEffectScaleParamsMessage();
895 
896 
897  private:
898  // Only Dispatcher can construct a LiveEffectScaleParamsMessage object
899  friend class Dispatcher;
900 
907 
914 
921  };
922 
927  {
928  public:
934  virtual ~LiveEffectMergeMessage();
935 
936 
937  private:
938  // Only Dispatcher can construct a LiveEffectMergeMessage object
939  friend class Dispatcher;
940 
946  LiveEffectMergeMessage(const MessageType, void*);
947 
954 
961  };
962 
967  {
968  public:
975 
976 
977  private:
978  // Only Dispatcher can construct a LiveEffectGetSVGFilterMessage object
979  friend class Dispatcher;
980 
987 
994 
1001  };
1002 
1007  {
1008  public:
1014  virtual ~LiveEffectIsCompatibleMessage();
1015 
1016 
1017  private:
1018  // Only Dispatcher can construct a LiveEffectIsCompatibleMessage object
1019  friend class Dispatcher;
1020 
1027 
1034 
1041  };
1042 
1046  class MenuMessage : public Message
1047  {
1048  public:
1054  virtual ~MenuMessage();
1055 
1063  MenuItem* const menuItem() const;
1064 
1065 
1066  private:
1067  // Only Dispatcher can construct a MenuMessage object
1068  friend class Dispatcher;
1069 
1075  MenuMessage(const MenuItem&, const MessageType, void*);
1076 
1082  MenuMessage(const MenuMessage&);
1083 
1090  };
1091 
1095  class NotifyMessage : public Message
1096  {
1097  public:
1103  virtual ~NotifyMessage();
1104 
1112  Notifier* const notifier() const;
1113 
1121  Notification* const notification() const;
1122 
1123 
1124  private:
1125  // Only Dispatcher can construct a NotifyMessage object
1126  friend class Dispatcher;
1127 
1133  NotifyMessage(const Notifier&, const MessageType, void*);
1134 
1140  NotifyMessage(const NotifyMessage&);
1141 
1148  };
1149 
1156  class ObjectSetMessage : public Message
1157  {
1158  public:
1164  virtual ~ObjectSetMessage();
1165 
1166 
1167  private:
1168  // Only Dispatcher can construct a ObjectSetMessage object
1169  friend class Dispatcher;
1170 
1176  ObjectSetMessage(const MessageType, void*);
1177 
1184 
1191  };
1192 
1196  class PluginMessage : public Message
1197  {
1198  public:
1204  virtual ~PluginMessage();
1205 
1206 
1207  private:
1208  // Only Dispatcher can construct a PluginMessage object
1209  friend class Dispatcher;
1210 
1216  PluginMessage(const MessageType, void*);
1217 
1223  PluginMessage(const PluginMessage&);
1224 
1231  };
1232 
1241  class CustomArtMessage : public Message
1242  {
1243  public:
1249  virtual ~CustomArtMessage();
1250 
1260  std::auto_ptr<Art> customArt() const;
1261 
1262 
1263  private:
1264  // Only Dispatcher can construct a CustomArtMessage object
1265  friend class Dispatcher;
1266 
1272  CustomArtMessage(const MessageType, void*);
1273 
1280 
1287  };
1288 
1294  {
1295  public:
1301  virtual ~PreferencesMessage();
1302 
1303 
1304  private:
1305  // Only Dispatcher can construct a PreferencesMessage object
1306  friend class Dispatcher;
1307 
1313  PreferencesMessage(const MessageType, void*);
1314 
1321 
1328  };
1329 
1334  {
1335  public:
1341  virtual ~PropertiesMessage();
1342 
1343 
1344  private:
1345  // Only Dispatcher can construct a PropertiesMessage object
1346  friend class Dispatcher;
1347 
1353  PropertiesMessage(const MessageType, void*);
1354 
1361 
1368  };
1369 
1373  class TimerMessage : public Message
1374  {
1375  public:
1381  virtual ~TimerMessage();
1382 
1390  Timer* const timer() const;
1391 
1392 
1393  private:
1394  // Only Dispatcher can construct a TimerMessage object
1395  friend class Dispatcher;
1396 
1402  TimerMessage(const Timer&, const MessageType, void*);
1403 
1409  TimerMessage(const TimerMessage&);
1410 
1417  };
1418 
1426  class ToolMessage : public Message
1427  {
1428  public:
1432  static const double normalPressure;
1433 
1441  static Angle normalTilt();
1442 
1450  static Angle normalBearing();
1451 
1459  static Angle normalRotation();
1460 
1466  virtual ~ToolMessage();
1467 
1475  Tool* const tool() const;
1476 
1484  ArtboardPoint cursor() const;
1485 
1494  double pressure() const;
1495 
1504  double stylusWheel() const;
1505 
1513  Angle tilt() const;
1514 
1522  Angle bearing() const;
1523 
1531  Angle rotation() const;
1532 
1540  ModifierKey modifiers() const;
1541 
1542 
1543  private:
1544  // Only Dispatcher can construct a ToolMessage object
1545  friend class Dispatcher;
1546 
1552  ToolMessage(const Tool&, const MessageType, void*);
1553 
1559  ToolMessage(const ToolMessage&);
1560 
1567  };
1568 
1576  class ToolboxMessage : public Message
1577  {
1578  public:
1584  virtual ~ToolboxMessage();
1585 
1586 
1587  private:
1588  // Only Dispatcher can construct a ToolboxMessage object
1589  friend class Dispatcher;
1590 
1596  ToolboxMessage(const MessageType, void*);
1597 
1604 
1611  };
1612 
1617  {
1618  public:
1624  virtual ~TransformAgainMessage();
1625 
1626 
1627  private:
1628  // Only Dispatcher can construct a TransformAgainMessage object
1629  friend class Dispatcher;
1630 
1636  TransformAgainMessage(const MessageType, void*);
1637 
1644 
1651  };
1652 
1656  class WorkspaceMessage : public Message
1657  {
1658  public:
1664  virtual ~WorkspaceMessage();
1665 
1666 
1667  private:
1668  // Only Dispatcher can construct a WorkspaceMessage object
1669  friend class Dispatcher;
1670 
1676  WorkspaceMessage(const MessageType, void*);
1677 
1684 
1691  };
1692  }
1693 }
1694 
1695 #endif
1696 // __HDI_CORE_MESSAGE__
Received for LiveEffectInputMessageType.
Definition: hdicoreMessage.h:766
Received for MenuGoMessageType and MenuUpdateMessageType.
Definition: hdicoreMessage.h:1046
Received for LiveEffectGetSVGFilterMessageType.
Definition: hdicoreMessage.h:966
Received for LiveEffectConvertColorSpaceMessageType.
Definition: hdicoreMessage.h:806
Header file for describing angles.
void * _data
Stores private implementation data.
Definition: hdicoreMessage.h:60
Base class for all *Notification subclasses.
Definition: hdicoreNotification.h:24
Header file for describing rectangles.
MessageType
Describes the types of Illustrator messages for which subscriptions are available.
Definition: hdicoreTypes.h:752
Received for PreferencesInitMessageType, PreferencesOKMessageType, PreferencesCancelMessageType, and PreferencesUpdateMessageType.
Definition: hdicoreMessage.h:1293
Deals with annotator registration and drawing callbacks.
Definition: hdicoreAnnotator.h:26
Deals with timer registration and callbacks.
Definition: hdicoreTimer.h:28
Message()
Internal use only.
Header file for Illustrator file format manipulation.
Received for FileFormatGetParamsMessageType, FileFormatSetParamsMessageType, FileFormatGoMessageType...
Definition: hdicoreMessage.h:420
Received for LayerListPushMessageType, LayerListPopMessageType, and LayerListDeleteMessageType.
Definition: hdicoreMessage.h:569
Base class for all LiveEffect*Message subclasses.
Definition: hdicoreMessage.h:609
virtual ~Message()
Destructs a Message object.
Received for TimerGoMessageType.
Definition: hdicoreMessage.h:1373
Received for NotifyMessageType.
Definition: hdicoreMessage.h:1095
ModifierKey
Describes various modifier keys.
Definition: hdicoreTypes.h:570
Message & operator=(const Message &)
Unused.
Wraps around an Illustrator menu item to allow for selection callbacks, en/disabling, setting text, grouping, etc.
Definition: hdicoreMenuItem.h:23
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Received for AnnotationDrawMessageType and AnnotationInvalidateMessageType.
Definition: hdicoreMessage.h:169
Describes a file format that Illustrator can either read or write.
Definition: hdicoreFileFormat.h:21
Header file for geometric point manipulation on the Illustrator artboard.
Allow for interacting the document views (windows)
Definition: hdicoreDocumentView.h:27
Received for ActionGoMessageType.
Definition: hdicoreMessage.h:87
Definition: hdicoreMessage.h:310
Received for PropertiesAcquireMessageType and PropertiesReleaseMessageType.
Definition: hdicoreMessage.h:1333
Received for ObjectSetDisposeContentsMessageType, ObjectSetMarkUsageMessageType, ObjectSetUpdateInter...
Definition: hdicoreMessage.h:1156
Received for ToolEditMessageType, ToolTrackMessageType, ToolMouseDownMessageType, ToolMouseDragMessag...
Definition: hdicoreMessage.h:1426
Received for CustomArtNotifyEditsMessageType, CustomArtUpdateViewableArtMessageType, CustomArtCanShowContentsMessageType, CustomArtInterpolateDataMessageType, CustomArtReplaceSymbolMessageType, CustomArtDisallowsArtTypeQueryMessageType, CustomArtPerformCustomHitTestMessageType, CustomArtCollectPaintStylesMessageType, CustomArtApplyPaintStylesMessageType, CustomArtAdjustColorsMessageType, and CustomArtShowContentsMessageType.
Definition: hdicoreMessage.h:1241
Definition: hdicoreaiArray.h:12
Received for TransformAgainMessageType.
Definition: hdicoreMessage.h:1616
Base class for all tools; stores hit data, cursor loc, dialogs, etc.; receives tool-related messages...
Definition: hdicoreTool.h:32
Received for ClipboardGoMessageType, ClipboardCanCopyMessageType, ClipboardCloneMessageType and Clipb...
Definition: hdicoreMessage.h:273
Received for LiveEffectEditParamsMessageType.
Definition: hdicoreMessage.h:686
Received for any custom messages (i.e. custom caller/selector pairs)
Definition: hdicoreMessage.h:350
ExtendedOptions
Used to specify the extended capabilities of a file format.
Definition: hdicoreFileFormat.h:151
Received for LiveEffectScaleParamsMessageType.
Definition: hdicoreMessage.h:886
static const double normalPressure
Normal/default tool pressure value (tool pressure values are in the range [0.0, 1.0])
Definition: hdicoreMessage.h:1432
Base class for all *Message subclasses.
Definition: hdicoreMessage.h:36
Received for LiveEffectIsCompatibleMessageType.
Definition: hdicoreMessage.h:1006
Received for LiveEffectInterpolateMessageType.
Definition: hdicoreMessage.h:726
Received for LiveEffectAdjustColorsMessageType.
Definition: hdicoreMessage.h:846
Received for AdaptersStartupMessageType, AdaptersShutdownMessageType, AdaptersDisposeInfoMessageType...
Definition: hdicoreMessage.h:129
Acts as a receiver for specific notifications, passing them along to caller-supplied callbacks...
Definition: hdicoreNotifier.h:21
Received for LiveEffectMergeMessageType.
Definition: hdicoreMessage.h:926
Received for PluginReloadMessageType, PluginPurgeCachesMessageType, and PluginUnloadMessageType.
Definition: hdicoreMessage.h:1196
virtual MessageType type() const
Gets the type of message data the target object represents.
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:25
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:28
Received for FilterGetParamsMessageType and FilterGoMessageType.
Definition: hdicoreMessage.h:529
Class through which all messages ultimately pass; holds registered callbacks for messages, notifiers, timers, etc. and calls them at the proper time.
Definition: hdicoreDispatcher.h:29
Received for ToolboxStartMessageType, ToolboxEndMessageType, ToolboxStartGroupMessageType, ToolboxEndGroupMessageType, ToolboxStartSetMessageType, ToolboxEndSetMessageType, ToolboxAddToolMessageType, ToolboxAddToolRolloverMessageType, ToolboxToolSelectedMessageType, ToolboxToolAlternateActionSelectedMessageType, ToolboxCycleToolMessageType, and ToolboxSoftCycleToolMessageType.
Definition: hdicoreMessage.h:1576
Received for LiveEffectGoMessageType.
Definition: hdicoreMessage.h:646
Received for WorkspaceWriteMessageType, WorkspaceRestoreMessageType, and WorkspaceDefaultMessageType...
Definition: hdicoreMessage.h:1656
Options
Used to specify the capabilities of a file format.
Definition: hdicoreFileFormat.h:40