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...

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
}
enum  HFControllerMovementDirection {
  HFControllerDirectionLeft,
  HFControllerDirectionRight
}
enum  HFControllerSelectionTransformation {
  HFControllerDiscardSelection,
  HFControllerShiftSelection,
  HFControllerExtendSelection
}
enum  HFControllerMovementGranularity {
  HFControllerMovementByte,
  HFControllerMovementColumn,
  HFControllerMovementLine,
  HFControllerMovementPage,
  HFControllerMovementDocument
}

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.
HFPrepareForChangeInFileNotification keys
NSString *const HFChangeInFileByteArrayKey
 A key in the HFPrepareForChangeInFileNotification specifying the byte array that will be written.
NSString *const HFChangeInFileModifiedRangesKey
 A key in the HFPrepareForChangeInFileNotification specifying the array of HFRangeWrappers indicating which parts of the file will be modified.
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.
NSString *const HFChangeInFileHintKey
 The hint parameter that you may pass to clearDependenciesOnRanges:inFile:hint:.


Enumeration Type Documentation

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.

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 

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.

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


Variable Documentation

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.

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.

NSString* const HFChangeInFileByteArrayKey

NSString* const HFChangeInFileHintKey


Generated on Thu Dec 8 10:06:34 2011 for HexFiend by  doxygen 1.5.9