root/nodebox/branches/try-qt/Resources/Scripting.r

Revision 1, 13.4 kB (checked in by fdb, 2 years ago)

nodebox initial

Line 
1#include <Carbon/Carbon.r>
2
3#define Reserved8   reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved
4#define Reserved12  Reserved8, reserved, reserved, reserved, reserved
5#define Reserved13  Reserved12, reserved
6#define dp_none__   noParams, "", directParamOptional, singleItem, notEnumerated, Reserved13
7#define reply_none__   noReply, "", replyOptional, singleItem, notEnumerated, Reserved13
8#define synonym_verb__ reply_none__, dp_none__, { }
9#define plural__    "", {"", kAESpecialClassProperties, cType, "", reserved, singleItem, notEnumerated, readOnly, Reserved8, noApostrophe, notFeminine, notMasculine, plural}, {}
10
11resource 'aete' (0, "Dictionary") {
12        0x1,  // major version
13        0x0,  // minor version
14        english,
15        roman,
16        {
17                "Standard Suite",
18                "Common classes and commands for most applications.",
19                '????',
20                1,
21                1,
22                {
23                        /* Events */
24
25                        "open",
26                        "Open an object.",
27                        'aevt', 'odoc',
28                        reply_none__,
29                        'file',
30                        "The file(s) to be opened.",
31                        directParamRequired,
32                        singleItem, notEnumerated, Reserved13,
33                        {
34
35                        },
36
37                        "print",
38                        "Print an object.",
39                        'aevt', 'pdoc',
40                        reply_none__,
41                        'file',
42                        "The file(s) or document(s) to be printed.",
43                        directParamRequired,
44                        singleItem, notEnumerated, Reserved13,
45                        {
46
47                        },
48
49                        "quit",
50                        "Quit an application.",
51                        'aevt', 'quit',
52                        reply_none__,
53                        dp_none__,
54                        {
55                                "saving", 'savo', 'savo',
56                                "Specifies whether changes should be saved before quitting.",
57                                optional,
58                                singleItem, enumerated, Reserved13
59                        },
60
61                        "close",
62                        "Close an object.",
63                        'core', 'clos',
64                        reply_none__,
65                        'obj ',
66                        "the object to close",
67                        directParamRequired,
68                        singleItem, notEnumerated, Reserved13,
69                        {
70                                "saving", 'savo', 'savo',
71                                "Specifies whether changes should be saved before closing.",
72                                optional,
73                                singleItem, enumerated, Reserved13,
74                                "saving in", 'kfil', 'file',
75                                "The file in which to save the object.",
76                                optional,
77                                singleItem, notEnumerated, Reserved13
78                        },
79
80                        "count",
81                        "Return the number of elements of a particular class within an object.",
82                        'core', 'cnte',
83                        'long',
84                        "the number of elements",
85                        replyRequired, singleItem, notEnumerated, Reserved13,
86                        'obj ',
87                        "the object whose elements are to be counted",
88                        directParamRequired,
89                        singleItem, notEnumerated, Reserved13,
90                        {
91                                "each", 'kocl', 'type',
92                                "The class of objects to be counted.",
93                                optional,
94                                singleItem, notEnumerated, Reserved13
95                        },
96
97                        "delete",
98                        "Delete an object.",
99                        'core', 'delo',
100                        reply_none__,
101                        'obj ',
102                        "the object to delete",
103                        directParamRequired,
104                        singleItem, notEnumerated, Reserved13,
105                        {
106
107                        },
108
109                        "duplicate",
110                        "Copy object(s) and put the copies at a new location.",
111                        'core', 'clon',
112                        reply_none__,
113                        'obj ',
114                        "the object(s) to duplicate",
115                        directParamRequired,
116                        singleItem, notEnumerated, Reserved13,
117                        {
118                                "to", 'insh', 'insl',
119                                "The location for the new object(s).",
120                                required,
121                                singleItem, notEnumerated, Reserved13,
122                                "with properties", 'prdt', 'reco',
123                                "Properties to be set in the new duplicated object(s).",
124                                optional,
125                                singleItem, notEnumerated, Reserved13
126                        },
127
128                        "exists",
129                        "Verify if an object exists.",
130                        'core', 'doex',
131                        'bool',
132                        "true if it exists, false if not",
133                        replyRequired, singleItem, notEnumerated, Reserved13,
134                        'obj ',
135                        "the object in question",
136                        directParamRequired,
137                        singleItem, notEnumerated, Reserved13,
138                        {
139
140                        },
141
142                        "get",
143                        "Get the data for an object.",
144                        'core', 'getd',
145                        '****',
146                        "",
147                        replyRequired, singleItem, notEnumerated, Reserved13,
148                        'obj ',
149                        "",
150                        directParamRequired,
151                        singleItem, notEnumerated, Reserved13,
152                        {
153
154                        },
155
156                        "make",
157                        "Make a new object.",
158                        'core', 'crel',
159                        'obj ',
160                        "to the new object",
161                        replyRequired, singleItem, notEnumerated, Reserved13,
162                        dp_none__,
163                        {
164                                "new", 'kocl', 'type',
165                                "The class of the new object.",
166                                required,
167                                singleItem, notEnumerated, Reserved13,
168                                "at", 'insh', 'insl',
169                                "The location at which to insert the object.",
170                                optional,
171                                singleItem, notEnumerated, Reserved13,
172                                "with data", 'data', '****',
173                                "The initial data for the object.",
174                                optional,
175                                singleItem, notEnumerated, Reserved13,
176                                "with properties", 'prdt', 'reco',
177                                "The initial values for properties of the object.",
178                                optional,
179                                singleItem, notEnumerated, Reserved13
180                        },
181
182                        "move",
183                        "Move object(s) to a new location.",
184                        'core', 'move',
185                        reply_none__,
186                        'obj ',
187                        "the object(s) to move",
188                        directParamRequired,
189                        singleItem, notEnumerated, Reserved13,
190                        {
191                                "to", 'insh', 'insl',
192                                "The new location for the object(s).",
193                                required,
194                                singleItem, notEnumerated, Reserved13
195                        },
196
197                        "save",
198                        "Save an object.",
199                        'core', 'save',
200                        reply_none__,
201                        'obj ',
202                        "the object to save, usually a document or window",
203                        directParamRequired,
204                        singleItem, notEnumerated, Reserved13,
205                        {
206                                "in", 'kfil', 'file',
207                                "The file in which to save the object.",
208                                optional,
209                                singleItem, notEnumerated, Reserved13,
210                                "as", 'fltp', 'ctxt',
211                                "The file type in which to save the data.",
212                                optional,
213                                singleItem, notEnumerated, Reserved13
214                        },
215
216                        "set",
217                        "Set an object's data.",
218                        'core', 'setd',
219                        reply_none__,
220                        'obj ',
221                        "",
222                        directParamRequired,
223                        singleItem, notEnumerated, Reserved13,
224                        {
225                                "to", 'data', '****',
226                                "The new value.",
227                                required,
228                                singleItem, notEnumerated, Reserved13
229                        }
230                },
231                {
232                        /* Classes */
233
234                        "item", 'cobj',
235                        "A scriptable object.",
236                        {
237                                "class", 'pcls', 'type',
238                                "The class of the object.",
239                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
240
241                                "properties", 'pALL', 'reco',
242                                "All of the object's properties.",
243                                reserved, singleItem, notEnumerated, readWrite, Reserved12
244                        },
245                        {
246                        },
247                        "items", 'cobj', plural__,
248
249                        "application", 'capp',
250                        "An application's top level scripting object.",
251                        {
252                                "name", 'pnam', 'ctxt',
253                                "The name of the application.",
254                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
255
256                                "frontmost", 'pisf', 'bool',
257                                "Is this the frontmost (active) application?",
258                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
259
260                                "version", 'vers', 'ctxt',
261                                "The version of the application.",
262                                reserved, singleItem, notEnumerated, readOnly, Reserved12
263                        },
264                        {
265                                'docu', { },
266                                'cwin', { }
267                        },
268                        "applications", 'capp', plural__,
269
270                        "color", 'colr',
271                        "A color.",
272                        {
273                        },
274                        {
275                        },
276                        "colors", 'colr', plural__,
277
278                        "document", 'docu',
279                        "A document.",
280                        {
281                                "path", 'ppth', 'ctxt',
282                                "The document's path.",
283                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
284
285                                "modified", 'imod', 'bool',
286                                "Has the document been modified since the last save?",
287                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
288
289                                "name", 'pnam', 'ctxt',
290                                "The document's name.",
291                                reserved, singleItem, notEnumerated, readWrite, Reserved12
292                        },
293                        {
294                        },
295                        "documents", 'docu', plural__,
296
297                        "window", 'cwin',
298                        "A window.",
299                        {
300                                "name", 'pnam', 'ctxt',
301                                "The full title of the window.",
302                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
303
304                                "id", 'ID  ', 'nmbr',
305                                "The unique identifier of the window.",
306                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
307
308                                "bounds", 'pbnd', 'qdrt',
309                                "The bounding rectangle of the window.",
310                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
311
312                                "document", 'docu', 'docu',
313                                "The document whose contents are being displayed in the window.",
314                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
315
316                                "closeable", 'hclb', 'bool',
317                                "Whether the window has a close box.",
318                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
319
320                                "titled", 'ptit', 'bool',
321                                "Whether the window has a title bar.",
322                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
323
324                                "index", 'pidx', 'nmbr',
325                                "The index of the window in the back-to-front window ordering.",
326                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
327
328                                "floating", 'isfl', 'bool',
329                                "Whether the window floats.",
330                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
331
332                                "miniaturizable", 'ismn', 'bool',
333                                "Whether the window can be miniaturized.",
334                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
335
336                                "miniaturized", 'pmnd', 'bool',
337                                "Whether the window is currently miniaturized.",
338                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
339
340                                "modal", 'pmod', 'bool',
341                                "Whether the window is the application's current modal window.",
342                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
343
344                                "resizable", 'prsz', 'bool',
345                                "Whether the window can be resized.",
346                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
347
348                                "visible", 'pvis', 'bool',
349                                "Whether the window is currently visible.",
350                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
351
352                                "zoomable", 'iszm', 'bool',
353                                "Whether the window can be zoomed.",
354                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
355
356                                "zoomed", 'pzum', 'bool',
357                                "Whether the window is currently zoomed.",
358                                reserved, singleItem, notEnumerated, readWrite, Reserved12
359                        },
360                        {
361                        },
362                        "windows", 'cwin', plural__
363                },
364                {
365                        /* Comparisons */
366                },
367                {
368                        /* Enumerations */
369                        'savo',
370                        {
371                                "yes", 'yes ', "Save the file.",
372                                "no", 'no  ', "Do not save the file.",
373                                "ask", 'ask ', "Ask the user whether or not to save the file."
374                        }
375                },
376
377                "Text Suite",
378                "A set of basic classes for text processing.",
379                '????',
380                1,
381                1,
382                {
383                        /* Events */
384
385                },
386                {
387                        /* Classes */
388
389                        "text", 'ctxt',
390                        "Rich (styled) text",
391                        {
392                                "color", 'colr', 'colr',
393                                "The color of the first character.",
394                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
395
396                                "font", 'font', 'ctxt',
397                                "The name of the font of the first character.",
398                                reserved, singleItem, notEnumerated, readWrite, Reserved12,
399
400                                "size", 'ptsz', 'nmbr',
401                                "The size in points of the first character.",
402                                reserved, singleItem, notEnumerated, readWrite, Reserved12
403                        },
404                        {
405                                'cpar', { },
406                                'cwor', { },
407                                'cha ', { },
408                                'catr', { },
409                                'atts', { }
410                        },
411                        "text", 'ctxt', plural__,
412
413                        "attachment", 'atts',
414                        "Represents an inline text attachment.  This class is used mainly for make commands.",
415                        {
416                                "<Inheritance>", pInherits, 'ctxt',
417                                "inherits elements and properties of the text class.",
418                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
419
420                                "file name", 'atfn', 'ctxt',
421                                "The path to the file for the attachment",
422                                reserved, singleItem, notEnumerated, readWrite, Reserved12
423                        },
424                        {
425                        },
426                        "attachments", 'atts', plural__,
427
428                        "paragraph", 'cpar',
429                        "This subdivides the text into paragraphs.",
430                        {
431                                "<Inheritance>", pInherits, 'ctxt',
432                                "inherits elements and properties of the text class.",
433                                reserved, singleItem, notEnumerated, readOnly, Reserved12
434                        },
435                        {
436                        },
437                        "paragraphs", 'cpar', plural__,
438
439                        "word", 'cwor',
440                        "This subdivides the text into words.",
441                        {
442                                "<Inheritance>", pInherits, 'ctxt',
443                                "inherits elements and properties of the text class.",
444                                reserved, singleItem, notEnumerated, readOnly, Reserved12
445                        },
446                        {
447                        },
448                        "words", 'cwor', plural__,
449
450                        "character", 'cha ',
451                        "This subdivides the text into characters.",
452                        {
453                                "<Inheritance>", pInherits, 'ctxt',
454                                "inherits elements and properties of the text class.",
455                                reserved, singleItem, notEnumerated, readOnly, Reserved12
456                        },
457                        {
458                        },
459                        "characters", 'cha ', plural__,
460
461                        "attribute run", 'catr',
462                        "This subdivides the text into chunks that all have the same attributes.",
463                        {
464                                "<Inheritance>", pInherits, 'ctxt',
465                                "inherits elements and properties of the text class.",
466                                reserved, singleItem, notEnumerated, readOnly, Reserved12
467                        },
468                        {
469                        },
470                        "attribute runs", 'catr', plural__
471                },
472                {
473                        /* Comparisons */
474                },
475                {
476                        /* Enumerations */
477                },
478
479                "NodeBox",
480                "NodeBox Script Suite",
481                'ndbx',
482                1,
483                1,
484                {
485                        /* Events */
486
487                        "run",
488                        "Run a document.",
489                        'ndbx', 'runs',
490                        reply_none__,
491                        'docu',
492                        "The document(s) or window(s) to run.",
493                        directParamRequired,
494                        singleItem, notEnumerated, Reserved13,
495                        {
496
497                        },
498
499                        "export",
500                        "Export a document.",
501                        'ndbx', 'expt',
502                        reply_none__,
503                        'docu',
504                        "The document(s) or window(s) to export.",
505                        directParamRequired,
506                        singleItem, notEnumerated, Reserved13,
507                        {
508                                "in", 'kfil', 'file',
509                                "The file in which to save the document",
510                                required,
511                                singleItem, notEnumerated, Reserved13,
512                                "as", 'extp', 'extp',
513                                "The type of file to export",
514                                required,
515                                singleItem, enumerated, Reserved13,
516                                "pages", 'expg', 'long',
517                                "The amount of pages to export for PDF documents",
518                                required,
519                                singleItem, notEnumerated, Reserved13,
520                                "frames", 'exfs', 'long',
521                                "The amount of frames to export for QuickTime movies",
522                                required,
523                                singleItem, notEnumerated, Reserved13,
524                                "framerate", 'exfr', 'long',
525                                "The framerate for QuickTime movies",
526                                required,
527                                singleItem, notEnumerated, Reserved13
528                        }
529                },
530                {
531                        /* Classes */
532
533                        "document", 'docu',
534                        "A NodeBox document",
535                        {
536                                "<Inheritance>", pInherits, 'docu',
537                                "inherits elements and properties of the document class.",
538                                reserved, singleItem, notEnumerated, readOnly, Reserved12,
539
540                                "source", 'psrc', 'ctxt',
541                                "The source file for this script.",
542                                reserved, singleItem, notEnumerated, readWrite, Reserved12
543                        },
544                        {
545                        },
546                        "documents", 'docu', plural__
547                },
548                {
549                        /* Comparisons */
550                },
551                {
552                        /* Enumerations */
553                        'extp',
554                        {
555                                "QuickTime", 'qtxx', "Export as QuickTime.",
556                                "PDF", 'pdfx', "Export as PDF."
557                        }
558                }
559        }
560};
Note: See TracBrowser for help on using the browser.