Contents > Introduction > Concepts > Cursor
Previous | Next

1.3.4 Cursor

Every mode adheres to the same concept of the file cursor:

In Edit Mode the cursor will point to a file offset, where the next operation takes place. In Insert Mode new data is inserted at the cursor position and data right of the cursor will be moved further out to the right. In Overwrite Mode data from the cursor position is overwritten with new data. If the file end is reached, the file will grow.

Selections can be Linear or Rectangular. In Linear Selection Mode data in the file is selected with a start offset and a length. In Rectangular Selection Mode, data in the file selected with a start offset, a byte width, a line stride in bytes, and a line count.

Switching between Hex and RawGfx mode will preserve the cursor offset and selection if possible.

A selection is preserved, if the selected file area can be represented in a meaningful way in the target mode, that is data alignment constratins are compatible. If not, the selection will be discarded and the cursor will be set into Edit Mode and placed to the start offset of the previously selected area.

The preservation of cursor position and selection during mode switches is a neat feature. It can be used for example to find out the byte representation or the file offset for a group of pixels in a surface.


http://datahammer.de
Previous | Next