home *** CD-ROM | disk | FTP | other *** search
- #include "PICS_PreferencesPanes.h"
-
- enum {
- // Composite pane
- kCompositePane_PreviewCompositeBtn = kPrefsDlog_LastItem,
-
- kCompositePane_LineSeparator,
- kCompositePane_Box
- };
-
- // ---------------------------------------------------------------------------
-
- void PrefsDialogSetupCompositePane(DialogPtr prefsDlog) {
- // Set composite preview checkbox
- if ((**sPrefsData->prefs).compositePreview) {
- SetDlogCtlValue(prefsDlog, kCompositePane_PreviewCompositeBtn, 1);
- }
- else {
- SetDlogCtlValue(prefsDlog, kCompositePane_PreviewCompositeBtn, 0);
- }
- } // END PrefsDialogSetupCompositePane
-
- // ---------------------------------------------------------------------------
-
- Boolean PrefsDialogGetCompositePaneSettings(DialogPtr prefsDlog) {
- (**sPrefsData->prefs).compositePreview =
- GetDlogCtlValue(prefsDlog, kCompositePane_PreviewCompositeBtn);
- return(true);
- } // END PrefsDialogGetCompositePaneSettings
-
- // ---------------------------------------------------------------------------
-
- void PrefsDialogCompositePaneHit(DialogPtr prefsDlog, short itemHit) {
- switch(itemHit) {
- case kCompositePane_PreviewCompositeBtn:
- FlipCtlValue(prefsDlog, itemHit);
- break;
- }
- } // END PrefsDialogCompositePaneHit
-
- // ---------------------------------------------------------------------------
-
- void PrefsDialogCompositePaneUpdate(
- DialogPtr prefsDlog,
- EventRecord *theEvt,
- Boolean frontMost) {
-
- Rect lineRect;
-
- GetDItemRect(prefsDlog, kCompositePane_Box, &lineRect);
- GrayDrawShadowBox(&lineRect, NULL);
-
- GetDItemRect(prefsDlog, kCompositePane_LineSeparator, &lineRect);
- GrayDrawShadowLine(&lineRect, NULL);
- } // END PrefsDialogCompositePaneUpdate
-
- // ---------------------------------------------------------------------------
-
- void PrefsDialogCompositePaneActivate(DialogPtr prefsDlog, Boolean activate) {
- short hiliteMode = activate ? 0 : 255;
-
- for (short i = kCompositePane_PreviewCompositeBtn;
- i <= kCompositePane_PreviewCompositeBtn; i++) {
- HiliteControl((ControlHandle)GetDItemHdl(prefsDlog, i), hiliteMode);
- }
- } // END PrefsDialogCompositePanActivate
-