Sample Components/SampleCode.r

/*
    File:       SampleCode.r
 
    Contains:   
 
    Written by: Peter Hoddie    
 
    Copyright:  Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
 
                You may incorporate this Apple sample source code into your program(s) without
                restriction. This Apple sample source code has been provided "AS IS" and the
                responsibility for its operation is yours. You are not permitted to redistribute
                this Apple sample source code as "Apple sample source code" after having made
                changes. If you're going to re-distribute the source, we require that you make
                it clear in the source that the code was descended from Apple sample source
                code, but that you've made changes.
 
    Change History (most recent first):
                7/28/1999   Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
                
 
*/
 
#include "Types.r"
 
#define SystemSevenOrLater
 
type 'thng' {
    hex longint type;
    hex longint subType;
    hex longint manufacturer;
    hex longint flags;
    hex longint flagsMask;
    hex longint thingResType;   
    int thingResID;
    hex longint  thingNameResType;
    int thingNameResID;
    hex longint  thingInfoResType;
    int thingInfoResID;
    hex longint  thingIconResType;
    int thingIconResID;
};
 
#define canMovieImportHandles 1
#define canMovieImportFiles 2
#define hasMovieImportUserInterface 4
#define canMovieExportHandles 8
#define canMovieExportFiles 16
#define hasMovieExportUserInterface 32
#define dontAutoFileMovieImport 64
 
#define mediaHandlerFlagBaseClient 1
 
#define pnotComponentWantsEvents 1
#define pnotComponentNeedsNoCache 2
 
 
resource 'thng' (128,  "Pict Media Handler") {
    'mhlr',
    'PICT',
    'appl',
    mediaHandlerFlagBaseClient,
    0,
    'mhlr',
    128,
    'STR ',
    128,
    'STR ',
    228,
    0,
    0
};
 
resource 'STR ' (128) {
    "PICT Media Handler"
};
 
resource 'STR ' (228) {
    "Plays PICTs in QuickTime movies"
};
 
resource 'thng' (129,  "SGChannel Pict") {
    'sgch',
    'PICT',
    'appl',
    0,
    0,
    'sgch',
    128,
    'STR ',
    129,
    'STR ',
    229,
    0,
    0
};
 
resource 'STR ' (129) {
    "SGChannel PICT"
};
 
resource 'STR ' (229) {
    "Captures PICTs from screen into QuickTime movies"
};
 
resource 'thng' (130,  "SGPictPanel") {
    'sgpn',
    'PICT',
    'thng',
    0,
    0,
    'sgpn',
    128,
    'STR ',
    130,
    'STR ',
    230,
    0,
    0
};
 
resource 'STR ' (130) {
    "Settings"
};
 
resource 'STR ' (230) {
    "Configure PICT capture channel"
};
 
resource 'thng' (131,  "Export PICS") {
    'spit',
    'PICS',
    0,
    canMovieExportFiles,
    0,
    'eat ',
    128,
    'STR ',
    131,
    'STR ',
    231,
    0,
    0
};
 
resource 'STR ' (131) {
    "PICS"
};
 
resource 'STR ' (231) {
    "Exports QuickTime movies as PICS files"
};
 
resource 'thng' (132,  "ImportScrapbook") {
    'eat ',
    'scbk',
    'PICT',
    canMovieImportFiles,
    0,
    'eat ',
    129,
    'STR ',
    132,
    'STR ',
    232,
    0,
    0
};
 
resource 'STR ' (132) {
    "Scrapbook"
};
 
resource 'STR ' (232) {
    "Import Scrapbook files into QuickTime movies"
};
 
resource 'thng' (133,  "PreviewPICS") {
    'pnot',
    'PICS',
    'appl',
    pnotComponentNeedsNoCache,
    0,
    'pnot',
    128,
    'STR ',
    133,
    'STR ',
    233,
    0,
    0
};
 
resource 'STR ' (133) {
    "Preview PICS"
};
 
resource 'STR ' (233) {
    "Preview PICS files"
};
 
resource 'DITL' (7000, "Pict Channel Panel") {
    {   /* array DITLarray: 1 elements */
        /* [1] */
        {4, 6, 90, 143},
        UserItem {
            disabled
        }
    }
};
 
resource 'DITL' (7001, "Pict Panel") {
    {   /* array DITLarray: 1 elements */
        /* [1] */
        {11, 15, 31, 132},
        CheckBox {
            enabled,
            "Capture Ticks"
        }
    }
};