Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

106 lines (90 sloc) 3.03 kb
//
// PSMTabBarCell.h
// PSMTabBarControl
//
// Created by John Pannell on 10/13/05.
// Copyright 2005 Positive Spin Media. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PSMTabBarControl.h"
@class PSMTabBarControl;
@class PSMProgressIndicator;
@interface PSMTabBarCell : NSActionCell {
// sizing
NSRect _frame;
NSSize _stringSize;
int _currentStep;
BOOL _isPlaceholder;
// state
int _tabState;
NSTrackingRectTag _closeButtonTrackingTag; // left side tracking, if dragging
NSTrackingRectTag _cellTrackingTag; // right side tracking, if dragging
BOOL _closeButtonOver;
BOOL _closeButtonPressed;
PSMProgressIndicator *_indicator;
BOOL _isInOverflowMenu;
BOOL _hasCloseButton;
BOOL _isCloseButtonSuppressed;
BOOL _hasIcon;
int _count;
NSString *_toolTip;
}
// creation/destruction
- (id)initWithControlView:(PSMTabBarControl *)controlView;
- (id)initPlaceholderWithFrame:(NSRect)frame expanded:(BOOL)value inControlView:(PSMTabBarControl *)controlView;
- (void)dealloc;
// accessors
- (id)controlView;
- (void)setControlView:(id)view;
- (NSTrackingRectTag)closeButtonTrackingTag;
- (void)setCloseButtonTrackingTag:(NSTrackingRectTag)tag;
- (NSTrackingRectTag)cellTrackingTag;
- (void)setCellTrackingTag:(NSTrackingRectTag)tag;
- (float)width;
- (NSRect)frame;
- (void)setFrame:(NSRect)rect;
- (void)setStringValue:(NSString *)aString;
- (NSSize)stringSize;
- (NSAttributedString *)attributedStringValue;
- (int)tabState;
- (void)setTabState:(int)state;
- (NSProgressIndicator *)indicator;
- (BOOL)isInOverflowMenu;
- (void)setIsInOverflowMenu:(BOOL)value;
- (BOOL)closeButtonPressed;
- (void)setCloseButtonPressed:(BOOL)value;
- (BOOL)closeButtonOver;
- (void)setCloseButtonOver:(BOOL)value;
- (BOOL)hasCloseButton;
- (void)setHasCloseButton:(BOOL)set;
- (void)setCloseButtonSuppressed:(BOOL)suppress;
- (BOOL)isCloseButtonSuppressed;
- (BOOL)hasIcon;
- (void)setHasIcon:(BOOL)value;
- (int)count;
- (void)setCount:(int)value;
- (BOOL)isPlaceholder;
- (void)setIsPlaceholder:(BOOL)value;
- (int)currentStep;
- (void)setCurrentStep:(int)value;
- (NSString *)toolTip;
- (void)setToolTip:(NSString *)tip;
// component attributes
- (NSRect)indicatorRectForFrame:(NSRect)cellFrame;
- (NSRect)closeButtonRectForFrame:(NSRect)cellFrame;
- (float)minimumWidthOfCell;
- (float)desiredWidthOfCell;
// drawing
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
// tracking the mouse
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
// drag support
- (NSImage*)dragImageForRect:(NSRect)cellFrame;
// archiving
- (void)encodeWithCoder:(NSCoder *)aCoder;
- (id)initWithCoder:(NSCoder *)aDecoder;
@end
@interface PSMTabBarControl (CellAccessors)
- (id<PSMTabStyle>)psmTabStyle;
@end
Jump to Line
Something went wrong with that request. Please try again.