HFControllerContentValue=1<<0,/*!< Indicates that the contents of the ByteArray has changed within the document. There is no indication as to what the change is. If redisplaying everything is expensive, Representers should cache their displayed data and compute any changes manually. */
HFControllerContentLength=1<<1,/*!< Indicates that the length of the ByteArray has changed. */
HFControllerDisplayedLineRange=1<<2,/*!< Indicates that the displayedLineRange property of the document has changed (e.g. the user scrolled). */
HFControllerSelectedRanges=1<<3,/*!< Indicates that the selectedContentsRanges property of the document has changed (e.g. the user selected some other range). */
HFControllerSelectionPulseAmount=1<<4,/*!< Indicates that the amount of "pulse" to show in the Find pulse indicator has changed. */
HFControllerBytesPerLine=1<<5,/*!< Indicates that the number of bytes to show per line has changed. */
HFControllerBytesPerColumn=1<<6,/*!< Indicates that the number of bytes per column (byte grouping) has changed. */
HFControllerEditable=1<<7,/*!< Indicates that the document has become (or is no longer) editable. */
HFControllerFont=1<<8,/*!< Indicates that the font property has changed. */
HFControllerAntialias=1<<9,/*!< Indicates that the shouldAntialias property has changed. */
HFControllerLineHeight=1<<10,/*!< Indicates that the lineHeight property has changed. */
HFControllerViewSizeRatios=1<<11,/*!< Indicates that the optimum size for each view may have changed; used by HFLayoutController after font changes. */
HFControllerByteRangeAttributes=1<<12,/*!< Indicates that some attributes of the ByteArray has changed within the document. There is no indication as to what the change is. */
HFControllerByteGranularity=1<<13,/*!< Indicates that the byte granularity has changed. For example, when moving from ASCII to UTF-16, the byte granularity increases from 1 to 2. */
HFControllerBookmarks=1<<14,/*!< Indicates that a bookmark has been added or removed. */
HFControllerColorBytes=1<<15,/*!< Indicates that the shouldColorBytes property has changed. */
HFControllerShowCallouts=1<<16,/*!< Indicates that the shouldShowCallouts property has changed. */
HFControllerHideNullBytes=1<<17,/*!< Indicates that the shouldHideNullBytes property has changed. */
/*! Begins delaying property change transactions. Returns a token that should be passed to endPropertyChangeTransactions:. */
-(NSUInteger)beginPropertyChangeTransaction;
/*! Pass a token returned from beginPropertyChangeTransaction to this method to pop the transaction off the stack and, if the stack is empty, to notify Representers of all collected changes. Tokens cannot be popped out of order - they are used strictly as a correctness check. */
/*! The byte array must be non-nil. In general, HFRepresenters should not use this to determine what bytes to display. Instead they should use copyBytes:range: or dataForRange: below. */
@property(nonatomic,strong)HFByteArray*byteArray;
/*! Replaces the entire byte array with a new one, preserving as much of the selection as possible. Unlike setByteArray:, this method is undoable, and intended to be used from representers that make a global change (such as Replace All). */
-(void)replaceByteArray:(HFByteArray*)newArray;
//@}
/*! @name Properties shared between all representers
/*! Returns the number of lines on which the cursor may be placed. This is always at least 1, and is equivalent to (unsigned long long)(HFRoundUpToNextMultiple(contentsLength, bytesPerLine) / bytesPerLine) */
-(unsignedlonglong)totalLineCount;
/*! Indicates the number of bytes per line, which is a global property among all the line-oriented representers. */
-(NSUInteger)bytesPerLine;
/*! Returns the height of a line, in points. This is generally determined by the font. Representers that wish to align things to lines should use this. */
/*! Begins selection pulsing (e.g. following a successful Find operation). Representers will receive callbacks indicating that HFControllerSelectionPulseAmount has changed. */
-(void)pulseSelection;
/*! Return the amount that the "Find pulse indicator" should show. 0 means no pulse, 1 means maximum pulse. This is useful for Representers that support find and replace. */
/*! Returns the smallest value in the selected contents ranges, or the insertion location if the selection is empty. */
-(unsignedlonglong)minimumSelectionLocation;
/*! Returns the largest HFMaxRange of the selected contents ranges, or the insertion location if the selection is empty. */
-(unsignedlonglong)maximumSelectionLocation;
/*! Convenience method for creating a byte array containing all of the selected bytes. If the selection has length 0, this returns an empty byte array. */
/*! Get the current displayed line range. The displayed line range is an HFFPRange (range of long doubles) containing the lines that are currently displayed.
/*! Modify the displayedLineRange so that as much of the given range as can fit is visible. If possible, moves by as little as possible so that the visible ranges before and afterward intersect with each other. */
/*! Modify the displayedLineRange as to center the given contents range. If the range is near the bottom or top, this will center as close as possible. If contents range is too large to fit, it centers the top of the range. contentsRange may be empty. */
-(void)centerContentsRange:(HFRange)range;
//@}
/*! The current font. */
@property(nonatomic,copy)NSFont*font;
/*! The undo manager. If no undo manager is set, then undo is not supported. By default the undo manager is nil.
/*! Callback for a representer-initiated change to some property. For example, if some property of a view changes that would cause the number of bytes per line to change, then the representer should call this method which will trigger the HFController to recompute the relevant properties. */
/*! Trigger scrolling by the given number of lines. If lines is positive, then the document is scrolled down; otherwise it is scrolled up. */
-(void)scrollByLines:(longdouble)lines;
//@}
/*! @name Keyboard navigation
Supportforchagingtheselectionviathekeyboard
*/
/*! General purpose navigation function. Modify the selection in the given direction by the given number of bytes. The selection is modifed according to the given transformation. If useAnchor is set, then anchored selection is used; otherwise any anchor is discarded.
/*! Replaces the selection with the given data. For something like a hex view representer, it takes two keypresses to create a whole byte; the way this is implemented, the first keypress goes into the data as a complete byte, and the second one (if any) replaces it. If previousByteCount > 0, then that many prior bytes are replaced, without breaking undo coalescing. For previousByteCount to be > 0, the following must be true: There is only one selected range, and it is of length 0, and its location >= previousByteCount
/*! Deletes the selection. This operation is undoable. */
-(void)deleteSelection;
/*! If the selection is empty, deletes one byte in a given direction, which must be HFControllerDirectionLeft or HFControllerDirectionRight; if the selection is not empty, deletes the selection. Undoable. */
/*! Returns an NSData representing the given HFRange. The length of the HFRange must be of a size that can reasonably be fit in memory. This method may cache the result. */
-(NSData*)dataForRange:(HFRange)range;
/*! Copies data within the given HFRange into an in-memory buffer. This is equivalent to [[controller byteArray] copyBytes:bytes range:range]. */
/*! A notification posted whenever any of the HFController's properties change. The object is the HFController. The userInfo contains one key, HFControllerChangedPropertiesKey, which contains an NSNumber with the changed properties as a HFControllerPropertyBits bitmask. This is useful for external objects to be notified of changes. HFRepresenters added to the HFController are notified via the controllerDidChange: message.
externNSString*constHFControllerChangedPropertiesKey;//!< A key in the HFControllerDidChangeProperties containing a bitmask of the changed properties, as a HFControllerPropertyBits
//@}
/*! A notification posted from prepareForChangeInFile:fromWritingByteArray: because we are about to write a ByteArray to a file. The object is the FileReference.
externNSString*constHFChangeInFileByteArrayKey;//!< A key in the HFPrepareForChangeInFileNotification specifying the byte array that will be written
externNSString*constHFChangeInFileModifiedRangesKey;//!< A key in the HFPrepareForChangeInFileNotification specifying the array of HFRangeWrappers indicating which parts of the file will be modified
externNSString*constHFChangeInFileShouldCancelKey;//!< A key in the HFPrepareForChangeInFileNotification specifying an NSValue containing a pointer to a BOOL. If set to YES, then someone was unable to prepare and the file should not be saved. It's a good idea to check if this value points to YES; if so your notification handler does not have to do anything.
externNSString*constHFChangeInFileHintKey;//!< The hint parameter that you may pass to clearDependenciesOnRanges:inFile:hint: