Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
MacCalendar.r
/* |
File: MacCalendar.r |
Contains: Resource definitions for the control strip module. |
Written by: Martin Minow |
Copyright: © 1994-1997 by Apple Computer, Inc., all rights reserved. |
Change History (most recent first): |
You may incorporate this sample code into your applications without |
restriction, though the sample code has been provided "AS IS" and the |
responsibility for its operation is 100% yours. However, what you are |
not permitted to do is to redistribute the source as "DSC Sample 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 Code, but that you've made changes. |
*/ |
///////////////////////////////////////////////////////////////////////// |
#define REZ |
///////////////////////////////////////////////////////////////////////// |
// Pick up resource constants common to both control strip |
// module and application. |
#include "MacCalendarCommon.h" |
///////////////////////////////////////////////////////////////////////// |
// Pick up resource constants common to both C and Rez for |
// the control strip module. |
#include "MacCalendar.h" |
///////////////////////////////////////////////////////////////////////// |
// Pick up system resource types. |
#include "Pict.r" |
#include "Types.r" |
#include "SysTypes.r" |
#include "BalloonTypes.r" |
resource 'vers' (1) { |
kVersionMajor, kVersionMinor, kVersionStage, kVersionRelease, verUS, |
kVersionIdent, |
kVersionString |
}; |
// The STRN_Info resource holds various strings resources needed |
// by the control strip module, including the default settings as |
// far as it is concerned. Note that the application |
// also has a copy of these default settings, also held as |
// a STR# resource, but with a slightly different format, ie |
// the string indexes are different! -- Quinn |
resource 'STR#' (STRN_Info) { |
{ |
"MacCalendar\n\n" |
"This Control Strip module displays the current monthÕs calendar", |
kDefaultFontStr, /* Font name */ |
kDefaultSizeStr, /* Font size */ |
kDefaultFirstDayStr, /* 1 == Sunday, 2 == Monday */ |
kDefaultDayNamesStr, /* Day name string */ |
} |
}; |
///////////////////////////////////////////////////////////////////////// |
// Arrow picture to signal a popup menu (actually, we don't have one). This must |
// be a polygon so the background color shows around the arrow itself. |
resource 'PICT' (PICT_RightArrow) { |
{0, 0, 8, 6}, VersionOne { |
{ |
ClipRgn {{0, 0, 8, 6}, $""}; |
FillPoly {{0, 0, 8, 6}, {{0, 2}, {4, 6}, {8, 2}, {0, 2}}}; |
} |
} |
}; |
///////////////////////////////////////////////////////////////////////// |
// Define the bundle and Finder help. |
#define ICON_Calendar 128 |
#define FREF_Calendar 128 |
#define BNDL_Calendar 128 |
type kControlStripCreator as 'STR '; |
resource kControlStripCreator (0) { |
"MacCalendar: " kVersionString |
}; |
resource 'BNDL' (BNDL_Calendar) { |
kControlStripCreator, 0, |
{ |
'FREF', {0, FREF_Calendar}; |
'ICN#', {0, ICON_Calendar}; |
} |
}; |
resource 'FREF' (FREF_Calendar) { |
'sdev', 0, "" |
}; |
resource 'hfdr' (kHMHelpID) { |
HelpMgrVersion, hmDefaultOptions, 0, 0, |
{ |
HMStringItem { |
"MacCalendar\n\n" |
"This Control Strip module draws this monthÕs calendar. To use this" |
" file, place it into the Control Strip folder in the System Folder" |
" and restart the computer." |
}; |
} |
}; |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14