forked from ff6347/mpolauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MPOLnch.fr
548 lines (474 loc) · 16.2 KB
/
MPOLnch.fr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
//========================================================================================
//
// $File: //depot/indesign_6.0/highprofile/source/sdksamples/mpolauncher/MPOLnch.fr $
//
// Owner: Adobe Developer Technologies
//
// $Author: pmbuilder $
//
// $DateTime: 2008/08/19 04:03:07 $
//
// $Revision: #1 $
//
// $Change: 643572 $
//
// Copyright 1997-2008 Adobe Systems Incorporated. All rights reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
// with the terms of the Adobe license agreement accompanying it. If you have received
// this file from a source other than Adobe, then your use, modification, or
// distribution of it requires the prior written permission of Adobe.
//
//
// Umbrella include file for all the .fr files in the plug-in.
//
//========================================================================================
//===========================
// General includes:
//===========================
#include "MenuDef.fh"
#include "ActionDef.fh"
#include "ActionDefs.h"
#include "AdobeMenuPositions.h"
#include "LocaleIndex.h"
#include "PMLocaleIds.h"
#include "StringTable.fh"
//#include "OMTypes.h"
#include "objectmodeltypes.fh"
#include "ShuksanID.h"
#include "ActionID.h"
#include "CommandID.h"
#include "WorkspaceID.h"
#include "widgetid.h"
#include "BuildNumber.h"
#include "PanelList.fh"
#include "Widgets.fh" // for PalettePanelWidget
#include "InterfaceColorDefines.h"
#include "IControlViewDefs.h"
#include "SysControlIds.h"
#include "AboutBoxID.h" // for kAboutBoxStaticTextViewImpl
#include "TreeViewDefs.h"
// Project includes:
#include "MPOLnchID.h"
#include "MPOLnchRezDefs.h"
#include "MPOLnchpng.fr"
#ifdef __ODFRC__
//================================================================================
// Plugin version definition.
//================================================================================
resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kMPOLnchPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kMPOLnchCurrentMajorFormatNumber, kMPOLnchCurrentMinorFormatNumber,
{ kInDesignProduct, kInCopyProduct },
{ kWildFS },
kMPOLnchVersion
};
//================================================================================
// Boss class definition.
//================================================================================
resource ClassDescriptionTable(kSDKDefClassDescriptionTableResourceID)
{{{
/**
This boss class provides the actions invoked by this plug-in's
sub-menu items.
@ingroup mpolauncher
*/
Class
{
kMPOLnchActionComponentBoss,
kBaseActionComponentBoss,
{
/** Handle the actions from the menu.
*/
IID_IACTIONCOMPONENT, kMPOLnchActionComponentImpl,
}
},
/**
Controls addition of a pop-up menu to the panel.
@ingroup mpolauncher
*/
Class
{
kMPOLnchPanelWidgetBoss,
kPalettePanelWidgetBoss,
{
/** An implementation of ITextControlData, but with interface
identifier of IID_IPANELMENUDATA, serves to name the popout panel menu.
Implementation provided by the API.
*/
IID_IPANELMENUDATA, kCPanelMenuDataImpl,
}
},
/**
Gives a list-box (tree view) that has additional observer added...
to get selection change notifications
@ingroup mpolauncher
*/
Class
{
kMPOLnchListBoxWidgetBoss,
kTreeViewWidgetBoss,
{
/** Furnishes application framework with widgets as needed */
IID_ITREEVIEWWIDGETMGR, kMPOLnchTVWidgetMgrImpl,
/** Adapts our data model to the needs of the application framework */
IID_ITREEVIEWHIERARCHYADAPTER, kMPOLnchTVHierarchyAdapterImpl,
/** Hold names of the list item */
IID_ISTRINGLISTDATA, kStringListDataImpl,
/** Display selection message */
IID_IOBSERVER, kMPOLnchListBoxObserverImpl,
}
},
/**
Text Widget boss.
*/
Class
{
kMPOLnchTextWidgetBoss,
kInfoStaticTextWidgetBoss,
{
// Add the following interfaces for a white background (they'd override the default.)
// IID_ICONTROLVIEW, kAboutBoxStaticTextViewImpl,
// IID_IBOOLDATA, kPersistBoolDataImpl,
}
}
/**
Adds observer to the 'eyeball' button.
@ingroup mpolauncher
*/
Class
{
kMPOLnchEyeballWidgetBoss,
kRollOverIconButtonBoss,
{
/**
Receive Update messages from the application core when end-user clicks on the eyeball iconic button.
*/
IID_IOBSERVER, kMPOLnchEyeballObserverImpl,
}
},
/**
Adds observer to the 'Pen' button
@ingroup mpolauncher
*/
Class
{
kMPOLnchPenWidgetBoss,
kRollOverIconButtonBoss,
{
/**
Receive Update messages from the application core when end-user clicks on the pen iconic button.
*/
IID_IOBSERVER, kMPOLnchPenObserverImpl,
}
},
}}};
//================================================================================
// Implementation definition.
//================================================================================
resource FactoryList (kSDKDefFactoryListResourceID)
{
kImplementationIDSpace,
{
#include "MPOLnchFactoryList.h"
}
};
//================================================================================
// Menu definition.
//================================================================================
resource MenuDef (kSDKDefMenuResourceID)
{
{
// The About Plug-ins sub-menu item for this plug-in.
kMPOLnchAboutActionID, // ActionID (kInvalidActionID for positional entries)
kMPOLnchAboutMenuPath, // Menu Path.
kSDKDefAlphabeticPosition, // Menu Position.
kSDKDefIsNotDynamicMenuFlag, // kSDKDefIsNotDynamicMenuFlag or kSDKDefIsDynamicMenuFlag.
kMPOLnchAddItemActionID,
kMPOLnchTargetMenuPath,
kMPOLnchAddItemMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
kMPOLnchFCQueriesActionID, // this is the FC Stuff
kMPOLnchTargetMenuPath,
kMPOLnchFCQueriesMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
kMPOLnchHelpActionID, // this is the FC Stuff
kMPOLnchTargetMenuPath,
kMPOLnchHelpMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
kMPOLnchShowScriptsActionID, // this is show scripts Stuff
kMPOLnchTargetMenuPath,
kMPOLnchShowScriptsMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
kMPOLnchShowFCActionID, // this is show FC Stuff
kMPOLnchTargetMenuPath,
kMPOLnchShowFCMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
kMPOLnchRemoveItemActionID,
kMPOLnchTargetMenuPath,
kMPOLnchRemoveItemMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
// Separator for the popup menu on the panel
kMPOLnchSeparator1ActionID,
kMPOLnchInternalPopupMenuNameKey kSDKDefDelimiterAndSeparatorPath, // :- to mark an item as a separator.
kMPOLnchSeparator1MenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
// About this plugin submenu for the popup menu on the panel
kMPOLnchPopupAboutThisActionID,
kMPOLnchTargetMenuPath
kMPOLnchAboutThisMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
}
};
//================================================================================
// Action definition.
//================================================================================
resource ActionDef (kSDKDefActionResourceID)
{
{
kMPOLnchActionComponentBoss, // ClassID of boss class that implements the ActionID.
kMPOLnchAboutActionID, // ActionID.
kMPOLnchAboutMenuKey, // Sub-menu string.
kHelpMenuActionArea, // Area name (see ActionDefs.h).
kNormalAction, // Type of action (see ActionDefs.h).
kDisableIfLowMem, // Enabling type (see ActionDefs.h).
kInvalidInterfaceID, // Selection InterfaceID this action cares about or kInvalidInterfaceID.
kSDKDefInvisibleInKBSCEditorFlag, // kSDKDefVisibleInKBSCEditorFlag or kSDKDefInvisibleInKBSCEditorFlag.
kMPOLnchActionComponentBoss,
kMPOLnchAddItemActionID,
kMPOLnchAddItemMenuItemKey,
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
kMPOLnchActionComponentBoss, // FCQueries stuff
kMPOLnchFCQueriesActionID,
kMPOLnchFCQueriesMenuItemKey,
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
kMPOLnchActionComponentBoss, // Help stuff
kMPOLnchHelpActionID,
kMPOLnchHelpMenuItemKey,
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
kMPOLnchActionComponentBoss, // ShowScripts stuff
kMPOLnchShowScriptsActionID,
kMPOLnchShowScriptsMenuItemKey,
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
kMPOLnchActionComponentBoss, // ShowScripts stuff
kMPOLnchShowFCActionID,
kMPOLnchShowFCMenuItemKey,
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
kMPOLnchActionComponentBoss,
kMPOLnchRemoveItemActionID,
kMPOLnchRemoveItemMenuItemKey,
kOtherActionArea,
kNormalAction,
kCustomEnabling, // so that UpdateActionStates will get called
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
kMPOLnchActionComponentBoss,
kMPOLnchPopupAboutThisActionID,
kSDKDefAboutThisPlugInMenuKey, // Key to the name of this action
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
}
};
//================================================================================
// LocaleIndex
// The LocaleIndex should have indicies that point at your
// localizations for each language system that you are
// localized for.
//================================================================================
//------------------------------------------------------------
// String LocaleIndex.
//------------------------------------------------------------
resource LocaleIndex (kSDKDefStringsResourceID)
{
kStringTableRsrcType,
{
kWildFS, k_enUS, kSDKDefStringsResourceID + index_enUS
kWildFS, k_jaJP, kSDKDefStringsResourceID + index_jaJP
kWildFS, k_deDE, kSDKDefStringsResourceID + index_deDE
kWildFS, k_Wild, kSDKDefStringsResourceID + index_enUS
}
};
resource LocaleIndex (kSDKDefStringsNoTransResourceID)
{
kStringTableRsrcType,
{
kWildFS, k_Wild, kSDKDefStringsNoTransResourceID + index_enUS
}
};
// added to support the list elements in the list box
resource LocaleIndex (kMPOLnchListElementRsrcID)
{
kViewRsrcType,
{
kWildFS, k_Wild, kMPOLnchListElementRsrcID + index_enUS
}
};
resource StringTable (kSDKDefStringsNoTransResourceID + index_enUS)
{
k_enUS, // Locale Id
kEuropeanMacToWinEncodingConverter, // Character encoding converter
{
// No-Translate strings go here:
kMPOLnchInternalPopupMenuNameKey, kMPOLnchInternalPopupMenuNameKey, // No need to translate, internal menu name.
}
};
//------------------------------------------------------------
// Panel LocaleIndex.
//------------------------------------------------------------
resource LocaleIndex (kSDKDefPanelResourceID)
{
kViewRsrcType,
{
kWildFS, k_Wild, kSDKDefPanelResourceID + index_enUS
}
};
//========================================================================================
// Type definition.
//========================================================================================
type MPOLnchPanelWidget(kViewRsrcType) : PalettePanelWidget(ClassID = kMPOLnchPanelWidgetBoss)
{
CPanelMenuData;
};
type MPOLnchListBox (kViewRsrcType) : TreeViewWidget (ClassID = kMPOLnchListBoxWidgetBoss) { };
type MPOLnchNodeWidget(kViewRsrcType) : PrimaryResourcePanelWidget(ClassID = kTreeNodeWidgetBoss)
{
};
type MPOLnchTextWidget (kViewRsrcType) : InfoStaticTextWidget (ClassID = kMPOLnchTextWidgetBoss) { };
type MPOLnchEyeballWidget (kViewRsrcType) : RollOverIconButtonWidget (ClassID = kMPOLnchEyeballWidgetBoss) {};
type MPOLnchPenWidget (kViewRsrcType) : RollOverIconButtonWidget (ClassID = kMPOLnchPenWidgetBoss) {};
//================================================================================
// PanelList definition.
//================================================================================
resource PanelList (kSDKDefPanelResourceID)
{
{
// 1st panel in the list
kSDKDefPanelResourceID, // Resource ID for this panel (use SDK default rsrc ID)
kMPOLnchPluginID, // ID of plug-in that owns this panel
kIsResizable,
kMPOLnchPanelWidgetActionID, // Action ID to show/hide the panel
kMPOLnchPanelTitleKey, // Shows up in the Window list.
"", // Alternate menu path of the form "Main:Foo" if you want your palette menu item in a second place
0.0, // Alternate Menu position Alternate Menu position for determining menu order
kMPOLnchUIPanelIconRsrcID,kMPOLnchPluginID, // Rsrc ID, Plugin ID for a PNG icon resource to use for this palette
c_Panel
}
};
//================================================================================
// PanelView definition.
// The view is not currently localised: therefore, it can reside here.
// However, if you wish to localise it, it is recommended to locate it in one of
// the localised framework resource files (i.e. MPOLnch_enUS.fr etc.).
//================================================================================
resource MPOLnchPanelWidget(kSDKDefPanelResourceID + index_enUS)
{
__FILE__, __LINE__, // Localization macro
kMPOLnchPanelWidgetID, // WidgetID
kPMRsrcID_None, // RsrcID
kBindNone, // Binding (0=none)
0, 0, 207, 200, // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kFalse, // Erase background
kInterfacePaletteFill, // Erase to color
kFalse, // Draw dropshadow
kMPOLnchPanelTitleKey, // Panel name
{
MPOLnchListBox //Tree view
(
kMPOLnchListBoxWidgetID, kPMRsrcID_None, // WidgetId, RsrcId
kBindAll, // Frame binding
Frame(-1,0,208,183) // Frame
kTrue, kTrue, // Visible, Enabled
kTrue, // EraseBeforeDraw
kInterfacePaletteFill, // InterfaceColor
"",
kHideRootNode | kDrawEndLine, // Options. Display root node
kFalse, // Use H Scroll bar
kTrue, // Use V scroll bar
20, // fVScrollButtonIncrement
20, // fVThumbScrollIncrement
0, // fHScrollButtonIncrement
0, // fHThumbScrollIncrement
0, // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection
kFalse, // Allow children from multiple parents to be selected
kTrue, // Allow discontiguous selection
{
//The tree view is dynamically created.
},
),
}
kMPOLnchInternalPopupMenuNameKey // Popup menu name (internal)
};
resource MPOLnchNodeWidget (kMPOLnchListElementRsrcID + index_enUS)
{
__FILE__, __LINE__,
kMPOLnchListParentWidgetId, kPMRsrcID_None, // WidgetId, RsrcId
kBindLeft | kBindRight, // Frame binding
Frame(0, 0, 194, 35), // // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
"", // Panel name
{
// the Run button
MPOLnchEyeballWidget
(
kMPOLnchListElementEyeballWidgetID, kMPOLnchPNGIconRsrcID, kMPOLnchPluginID, // WidgetId, RsrcId
kBindLeft, // Frame binding
Frame(2,3,32,33) // // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kADBEIconSuiteButtonType,
),
// the help button
MPOLnchPenWidget
(
kMPOLnchListElementPenWidgetID, kMPOLnchPNGHelpIconRsrcID, kMPOLnchPluginID, // WidgetId, RsrcId
kBindLeft, // Frame binding
Frame(35,3,65,33) // // Frame: left, top, right, bottom.
kTrue, kTrue, // Visible, Enabled
kADBEIconSuiteButtonType,
),
// Just a info-static text widget with about-box text view to get white bg.
MPOLnchTextWidget
(
kMPOLnchTextWidgetID, kPMRsrcID_None, // WidgetId, RsrcId
kBindLeft | kBindRight, // Frame binding
Frame(70,3,194,33) // // Frame: left, top, right, bottom.
kTrue, kTrue, kAlignLeft,kEllipsizeEnd,kTrue, // Visible, Enabled, ellipsize style, convert ampersands
"", // Initial text
0, // Associated widget for focus
kPaletteWindowFontId, // default font
kPaletteWindowHiliteFontId, // for highlight state.
),
}
};
#endif // __ODFRC__
#include "MPOLnch_enUS.fr"
#include "MPOLnch_deDE.fr"
#include "MPOLnch_jaJP.fr"
// End, MPOLnch.fr.