HexFiend
Classes | Typedefs | Enumerations | Variables
HFController.h File Reference

Go to the source code of this file.

Classes

class  HFController
 A central class that acts as the controller layer for HexFiend.framework. More...
 

Typedefs

typedef enum HFControllerPropertyBits HFControllerPropertyBits
 
typedef enum HFControllerMovementDirection HFControllerMovementDirection
 
typedef enum HFControllerSelectionTransformation HFControllerSelectionTransformation
 
typedef enum HFControllerMovementGranularity HFControllerMovementGranularity
 
typedef enum HFEditMode HFEditMode
 

Enumerations

enum  HFControllerPropertyBits {
  HFControllerContentValue = 1 << 0,
  HFControllerContentLength = 1 << 1,
  HFControllerDisplayedLineRange = 1 << 2,
  HFControllerSelectedRanges = 1 << 3,
  HFControllerSelectionPulseAmount = 1 << 4,
  HFControllerBytesPerLine = 1 << 5,
  HFControllerBytesPerColumn = 1 << 6,
  HFControllerEditable = 1 << 7,
  HFControllerFont = 1 << 8,
  HFControllerAntialias = 1 << 9,
  HFControllerLineHeight = 1 << 10,
  HFControllerViewSizeRatios = 1 << 11,
  HFControllerByteRangeAttributes = 1 << 12,
  HFControllerByteGranularity = 1 << 13,
  HFControllerBookmarks = 1 << 14,
  HFControllerColorBytes = 1 << 15,
  HFControllerShowCallouts = 1 << 16,
  HFControllerHideNullBytes = 1 << 17
}
 
enum  HFControllerMovementDirection {
  HFControllerDirectionLeft,
  HFControllerDirectionRight
}
 
enum  HFControllerSelectionTransformation {
  HFControllerDiscardSelection,
  HFControllerShiftSelection,
  HFControllerExtendSelection
}
 
enum  HFControllerMovementGranularity {
  HFControllerMovementByte,
  HFControllerMovementColumn,
  HFControllerMovementLine,
  HFControllerMovementPage,
  HFControllerMovementDocument
}
 
enum  HFEditMode {
  HFInsertMode,
  HFOverwriteMode,
  HFReadOnlyMode
}
 

Variables

NSString *const HFControllerDidChangePropertiesNotification
 
NSString *const HFPrepareForChangeInFileNotification
 
HFControllerDidChangePropertiesNotification keys
NSString *const HFControllerChangedPropertiesKey
 A key in the HFControllerDidChangeProperties containing a bitmask of the changed properties, as a HFControllerPropertyBits. More...
 
HFPrepareForChangeInFileNotification keys
NSString *const HFChangeInFileByteArrayKey
 A key in the HFPrepareForChangeInFileNotification specifying the byte array that will be written. More...
 
NSString *const HFChangeInFileModifiedRangesKey
 A key in the HFPrepareForChangeInFileNotification specifying the array of HFRangeWrappers indicating which parts of the file will be modified. More...
 
NSString *const HFChangeInFileShouldCancelKey
 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. More...
 
NSString *const HFChangeInFileHintKey
 The hint parameter that you may pass to clearDependenciesOnRanges:inFile:hint: More...
 

Typedef Documentation

§ HFControllerPropertyBits

§ HFControllerMovementDirection

§ HFControllerSelectionTransformation

§ HFControllerMovementGranularity

§ HFEditMode

typedef enum HFEditMode HFEditMode

Enumeration Type Documentation

§ HFControllerPropertyBits

The HFControllerPropertyBits bitmask is used to inform the HFRepresenters of a change in the current state that they may need to react to. A bitmask of the changed properties is passed to representerChangedProperties:. It is common for multiple properties to be included in such a bitmask.

Enumerator
HFControllerContentValue 

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 

Indicates that the length of the ByteArray has changed.

HFControllerDisplayedLineRange 

Indicates that the displayedLineRange property of the document has changed (e.g. the user scrolled).

HFControllerSelectedRanges 

Indicates that the selectedContentsRanges property of the document has changed (e.g. the user selected some other range).

HFControllerSelectionPulseAmount 

Indicates that the amount of "pulse" to show in the Find pulse indicator has changed.

HFControllerBytesPerLine 

Indicates that the number of bytes to show per line has changed.

HFControllerBytesPerColumn 

Indicates that the number of bytes per column (byte grouping) has changed.

HFControllerEditable 

Indicates that the document has become (or is no longer) editable.

HFControllerFont 

Indicates that the font property has changed.

HFControllerAntialias 

Indicates that the shouldAntialias property has changed.

HFControllerLineHeight 

Indicates that the lineHeight property has changed.

HFControllerViewSizeRatios 

Indicates that the optimum size for each view may have changed; used by HFLayoutController after font changes.

HFControllerByteRangeAttributes 

Indicates that some attributes of the ByteArray has changed within the document. There is no indication as to what the change is.

HFControllerByteGranularity 

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 

Indicates that a bookmark has been added or removed.

HFControllerColorBytes 

Indicates that the shouldColorBytes property has changed.

HFControllerShowCallouts 

Indicates that the shouldShowCallouts property has changed.

HFControllerHideNullBytes 

Indicates that the shouldHideNullBytes property has changed.

§ HFControllerMovementDirection

The HFControllerMovementDirection enum is used to specify a direction (either left or right) in various text editing APIs. HexFiend does not support left-to-right languages.

Enumerator
HFControllerDirectionLeft 
HFControllerDirectionRight 

§ HFControllerSelectionTransformation

The HFControllerSelectionTransformation enum is used to specify what happens to the selection in various APIs. This is mainly interesting for text-editing style Representers.

Enumerator
HFControllerDiscardSelection 

The selection should be discarded.

HFControllerShiftSelection 

The selection should be moved, without changing its length.

HFControllerExtendSelection 

The selection should be extended, changing its length.

§ HFControllerMovementGranularity

The HFControllerMovementGranularity enum is used to specify the granularity of text movement in various APIs. This is mainly interesting for text-editing style Representers.

Enumerator
HFControllerMovementByte 

Move by individual bytes

HFControllerMovementColumn 

Move by a column

HFControllerMovementLine 

Move by lines

HFControllerMovementPage 

Move by pages

HFControllerMovementDocument 

Move by the whole document

§ HFEditMode

enum HFEditMode

HFEditMode enumerates the different edit modes that a document might be in.

Enumerator
HFInsertMode 
HFOverwriteMode 
HFReadOnlyMode 

Variable Documentation

§ HFControllerDidChangePropertiesNotification

NSString* const HFControllerDidChangePropertiesNotification

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.

§ HFControllerChangedPropertiesKey

NSString* const HFControllerChangedPropertiesKey

§ HFPrepareForChangeInFileNotification

NSString* const HFPrepareForChangeInFileNotification

A notification posted from prepareForChangeInFile:fromWritingByteArray: because we are about to write a ByteArray to a file. The object is the FileReference. Currently, HFControllers do not listen for this notification. This is because under GC there is no way of knowing whether the controller is live or not. However, pasteboard owners do listen for it, because as long as we own a pasteboard we are guaranteed to be live.

§ HFChangeInFileByteArrayKey

NSString* const HFChangeInFileByteArrayKey

§ HFChangeInFileModifiedRangesKey

NSString* const HFChangeInFileModifiedRangesKey

§ HFChangeInFileShouldCancelKey

NSString* const HFChangeInFileShouldCancelKey

§ HFChangeInFileHintKey

NSString* const HFChangeInFileHintKey