SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
HexFiend/HFLineCountingRepresenter.h
1 //
2 // HFLineCountingRepresenter.h
3 // HexFiend_2
4 //
5 // Copyright 2007 ridiculous_fish. All rights reserved.
6 //
7
8 #import <HexFiend/HFRepresenter.h>
9
10 /*! @enum HFLineNumberFormat
11 HFLineNumberFormat is a simple enum used to determine whether line numbers are in decimal or hexadecimal format.
12 */
13 typedef NS_ENUM(NSUInteger, HFLineNumberFormat) {
14 HFLineNumberFormatDecimal, //!< Decimal line numbers
15 HFLineNumberFormatHexadecimal, //!< Hexadecimal line numbers
16 HFLineNumberFormatMAXIMUM //!< One more than the maximum valid line number format, so that line number formats can be cycled through easily
17 };
18
19 /*! @class HFLineCountingRepresenter
20 @brief The HFRepresenter used to show the "line number gutter."
21
22 HFLineCountingRepresenter is the HFRepresenter used to show the "line number gutter." HFLineCountingRepresenter makes space for a certain number of digits.
23 */
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
34 /// The minimum digit count. The receiver will always ensure it is big enough to display at least the minimum digit count. The default is 2.
35 @property (nonatomic) NSUInteger minimumDigitCount;
36
37 /// The number of digits we are making space for.
38 @property (readonly) NSUInteger digitCount;
39
40 /// The current width that the HFRepresenter prefers to be laid out with.
41 @property (readonly) CGFloat preferredWidth;
42
43 /// The line number format.
44 @property (nonatomic) HFLineNumberFormat lineNumberFormat;
45
46 /// Switches to the next line number format. This is called from the view.
47 - (void)cycleLineNumberFormat;
48
49 /// The edge (as an NSRectEdge) on which the view draws an interior shadow. -1 means no edge.
50 @property (nonatomic) NSInteger interiorShadowEdge;
51
52 /// The border color used at the edges specified by -borderedEdges.
53 @property (nonatomic, copy) NSColor *borderColor;
54
55 /*! The edges on which borders are drawn. The edge returned by interiorShadowEdge always has a border drawn. The edges are specified by a bitwise or of 1 left shifted by the NSRectEdge values. For example, to draw a border on the min x and max y edges use: (1 << NSMinXEdge) | (1 << NSMaxYEdge). 0 (or -1) specfies no edges. */
56 @property (nonatomic) NSInteger borderedEdges;
57
58 /// The background color
59 @property (nonatomic, copy) NSColor *backgroundColor;
60
61 @property NSUInteger valueOffset;
62
63 @end
64
65 /*! Notification posted when the HFLineCountingRepresenter's width has changed because the number of digits it wants to show has increased or decreased. The object is the HFLineCountingRepresenter; there is no user info.
66 */
67 extern NSString *const HFLineCountingRepresenterMinimumViewWidthChanged;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.