HexFiend: HFLineCountingRepresenter.h Source File

HexFiend

HFLineCountingRepresenter.h
Go to the documentation of this file.
1 //
2 // HFLineCountingRepresenter.h
3 // HexFiend_2
4 //
5 // Copyright 2007 ridiculous_fish. All rights reserved.
6 //
7
8 #import <HexFiend/HFRepresenter.h>
9
13 typedef NS_ENUM(NSUInteger, HFLineNumberFormat) {
14 HFLineNumberFormatDecimal,
15 HFLineNumberFormatHexadecimal,
16 HFLineNumberFormatMAXIMUM
17 };
18
24 @interface HFLineCountingRepresenter : HFRepresenter {
25 CGFloat lineHeight;
26 NSUInteger digitsToRepresentContentsLength;
27 NSUInteger minimumDigitCount;
28 HFLineNumberFormat lineNumberFormat;
29 NSInteger interiorShadowEdge;
30 CGFloat preferredWidth;
31 CGFloat digitAdvance;
32 }
33
35 @property (nonatomic) NSUInteger minimumDigitCount;
36
38 @property (readonly) NSUInteger digitCount;
39
41 @property (readonly) CGFloat preferredWidth;
42
44 @property (nonatomic) HFLineNumberFormat lineNumberFormat;
45
47 - (void)cycleLineNumberFormat;
48
50 @property (nonatomic) NSInteger interiorShadowEdge;
51
53 @property (nonatomic, copy) NSColor *borderColor;
54
56 @property (nonatomic) NSInteger borderedEdges;
57
59 @property (nonatomic, copy) NSColor *backgroundColor;
60
61 @end
62
65 extern NSString *const HFLineCountingRepresenterMinimumViewWidthChanged;
HFLineCountingRepresenter
The HFRepresenter used to show the "line number gutter.".
Definition: HFLineCountingRepresenter.h:24
HFLineCountingRepresenter::borderedEdges
NSInteger borderedEdges
Definition: HFLineCountingRepresenter.h:48
HFLineCountingRepresenter::digitCount
NSUInteger digitCount
The number of digits we are making space for.
Definition: HFLineCountingRepresenter.h:30
HFLineCountingRepresenter::minimumDigitCount
NSUInteger minimumDigitCount
The minimum digit count. The receiver will always ensure it is big enough to display at least the min...
Definition: HFLineCountingRepresenter.h:27
HFLineCountingRepresenter::borderColor
NSColor * borderColor
The border color used at the edges specified by -borderedEdges.
Definition: HFLineCountingRepresenter.h:45
HFRepresenter
The principal view class of Hex Fiend&#39;s MVC architecture.
Definition: HFRepresenter.h:29
HFLineNumberFormat
HFLineNumberFormat
Definition: HFLineCountingRepresenter.h:13
HFLineCountingRepresenter::preferredWidth
CGFloat preferredWidth
The current width that the HFRepresenter prefers to be laid out with.
Definition: HFLineCountingRepresenter.h:33
HFLineNumberFormatHexadecimal
Hexadecimal line numbers.
Definition: HFLineCountingRepresenter.h:15
HFLineCountingRepresenter::lineNumberFormat
HFLineNumberFormat lineNumberFormat
The line number format.
Definition: HFLineCountingRepresenter.h:36
HFLineCountingRepresenter::interiorShadowEdge
NSInteger interiorShadowEdge
The edge (as an NSRectEdge) on which the view draws an interior shadow. -1 means no edge...
Definition: HFLineCountingRepresenter.h:42
HFLineNumberFormatMAXIMUM
One more than the maximum valid line number format, so that line number formats can be cycled through...
Definition: HFLineCountingRepresenter.h:16
HFLineCountingRepresenter::backgroundColor
NSColor * backgroundColor
The background color.
Definition: HFLineCountingRepresenter.h:51
-[HFLineCountingRepresenter cycleLineNumberFormat]
void cycleLineNumberFormat()
Switches to the next line number format. This is called from the view.
HFLineNumberFormatDecimal
Decimal line numbers.
Definition: HFLineCountingRepresenter.h:14
HFLineCountingRepresenterMinimumViewWidthChanged
NSString *const HFLineCountingRepresenterMinimumViewWidthChanged