HexFiend: HFTextView Class Reference

HexFiend

Properties | List of all members
HFTextView Class Reference
High Level

A high-level view class analagous to NSTextView. More...

Inheritance diagram for HFTextView:

## Properties
id | delegate
| The delegate, which may implement the methods in HFTextViewDelegate. Initially nil. More...
NSData * | data
Accessing MVC components
HFController * | controller
| The HFController for the receiver. Useful for adding or removing HFRepresenters from the text view at runtime. An HFTextView comes with its own HFController, but you can replace it. More...
HFLayoutRepresenter * | layoutRepresenter
| The HFLayoutRepresenter for the receiver. An HFTextView comes with its own HFLayoutRepresenter, but you can replace it. More...
HFByteArray * | byteArray
| Returns the HFByteArray for the receiver. This is equivalent to `[[self controller] byteArray]`. More...
Display configuration
NSArray * | backgroundColors
| The array of background colors for the receiver. More...
BOOL | bordered
| Whether the receiver draws a border. More...

## Detailed Description

HFTextField encapsulates a HFController and HFRepresenters into a single "do it all" NSControl analagous to NSTextView.

## Property Documentation

## § controller

- (HFController*) controller
| readwritenonatomicstrong

## § layoutRepresenter

- (HFLayoutRepresenter*) layoutRepresenter
| readwritenonatomicstrong

## § byteArray

- (HFByteArray*) byteArray
| readwritenonatomicstrong

## § backgroundColors

- (NSArray*) backgroundColors
| readwritenonatomiccopy

Sets the arry of background colors for the receiver. The background colors are used in sequence to draw each row.

## § bordered

- (BOOL) bordered
| readwritenonatomicassign

## § delegate

- (id) delegate
| readwritenonatomicassign

## § data

- (NSData*) data
| readwritenonatomiccopy

Access the contents of the HFTextView's HFByteArray as an NSData. When setting, the data is copied via the `-copy` message, so prefer to pass an immutable `NSData` when possible. When getting, the NSData proxies an HFByteArray, and therefore it is usually more efficient than naively copying all of the bytes. However, access to the `-byte` method will necessitate copying, a potentially expensive operation. Furthermore, the NSData API is inherently 32 bit in a 32 bit process. Lastly, there is no protection if the backing file for the data disappears.

For those reasons, this should only be used when its convenience outweighs the downside (e.g. some bindings scenarios). For most use cases, it is better to use the `-byteArray` method above.

The documentation for this class was generated from the following file:

- HFTextView.h