// Suppress compiler warning about rcsid being unused, yet prevent assembler
// code for this function from being produced.
inline extern const char *suppressCompilerWarning(void)
{
    static const char *rcsid = "$Id$ cc: "__FILE__" "__DATE__" "__TIME__;

    return rcsid;
}

//
// ------------- MiscTabSwitchViewPalette Class Implementation ----------------
//
// MiscTabSwitchViewPalette IBPalette subclass.  Configures the tab matrix on
// the palette.
//
// Written by Art Isbell.
// Copyright 1996 by Art Isbell.
// Version 1.0.  All rights reserved.
//
// This notice may not be removed from this source code.
//
// This object is included in the MiscKit by permission from the author
// and its use is governed by the MiscKit license, found in the file
// "License.rtf" in the MiscKit distribution.  Please refer to that file
// for a list of all applicable permissions and restrictions.
//	
// ----------------------------------------------------------------------------
//

// ----------------------------- Header Files ---------------------------------

#import <AppKit/AppKit.h>
#import <InterfaceBuilder/InterfaceBuilder.h>

#ifndef NOMISC
#import <misckit/MiscTabSwitchViewPalette.h>
#import <misckit/MiscTabCell.h>

#else NOMISC

#import "MiscTabSwitchViewPalette.h"
#import "MiscTabCell.h"
#endif NOMISC

// ---------------- Typedef, Struct, and Union Declarations -------------------

// --------------------- Constant and Enum Definitions ------------------------

// ------------------------- Function Declarations ----------------------------

@interface MiscTabSwitchViewPalette(Private)
// ---------------------- Private Method Declarations -------------------------

@end

@implementation MiscTabSwitchViewPalette
// ---------------------- Factory Method Definitions --------------------------

// ---------------- Overridden Instance Method Definitions --------------------

- (void)finishInstantiate
{
    MiscTabCell *prototype = [[MiscTabCell allocWithZone:[self zone]] init];

    // IB doesn't seem to be happy when setCellClass: is used rather than
    // setPrototype:
    [matrix setPrototype:prototype];
    [prototype release];
    prototype = nil;
    [matrix renewRows:1 columns:2];
    [matrix setMode:NSRadioModeMatrix];

    // Make the background color of matrix transparent.
    [matrix setBackgroundColor:[NSColor clearColor]];

    // Set the autosizing and autoscrolling attributes of the matrix.
    [matrix setAutoresizingMask:NSViewWidthSizable];
    [matrix setAutoscroll:YES];
    [matrix setAutosizesCells:YES];
    [matrix setSelectionByRect:NO];

    // Mark matrix for display.
    [matrix setNeedsDisplay:YES];
}

// -------------------- New Instance Method Definitions -----------------------

// ----------------- Delegate Instance Method Definitions ---------------------

@end

@implementation MiscTabSwitchViewPalette(Private)
// ---------------------- Private Method Definitions --------------------------

@end

@implementation MiscSwitchView(IBInspector)

- (NSString *)inspectorClassName
{
    return @"MiscSwitchViewInspector";
}

- (NSString *)connectInspectorClassName
{
    // If object was Shift-clicked to inspect its connections,
    // use super's connectInspectorClassName.
    if (([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) ==
        NSShiftKeyMask)
    {
        return [super connectInspectorClassName];
    }
    // Object wasn't Shift-clicked, so use MiscSwitchViewConnectInspector.
    else
    {
        return @"MiscSwitchViewConnectInspector";
    }
}

@end

// ------------------------- Function Definitions -----------------------------
