X11workbench Toolkit  1.0
Definitions associated with Text Objects

Definitions associated with Text Objects. More...

Macros

#define HARD_TAB_CHAR   '\xa0'
 
#define DEFAULT_TAB_WIDTH   8
 
#define AUTO_HSCROLL_SIZE   8
 
#define MIN_LINE_SPACING   2
 
#define MIN_BORDER_SPACING   2
 
#define TEXT_OBJECT_TAG   (*((const unsigned int *)"WBTX"))
 The 'tag' for a TEXT_OBJECT structure.
 

Enumerations

enum  e_FileType {
  FileType_PLAIN_TEXT = 0,
  FileType_PROGRAM = 1,
  FileType_RESOURCE = 2,
  FileType_XML = 3,
  FileType_MAKEFILE = 4,
  FileType_CUSTOM_FLAG = 0x80,
  FileType_MASK = 0xff,
  FileType_HARDTAB = 0x10000,
  FileType_RESERVED2 = 0x20000,
  FileType_RESERVED3 = 0x40000,
  FileType_RESERVED4 = 0x80000
}
 file types for TEXT_OBJECT More...
 
enum  e_LineFeed {
  LineFeed_NONE = -1,
  LineFeed_DEFAULT = 0,
  LineFeed_NEWLINE = 1,
  LineFeed_RETURN = 2,
  LineFeed_CRLF = 3,
  LineFeed_LFCR = 4,
  LineFeed_ENTRYCOUNT = 5
}
 line feed (line ending) types for TEXT_OBJECT More...
 
enum  e_SelectMode {
  SelectMode_DEFAULT = 0,
  SelectMode_CHAR = 1,
  SelectMode_LINE = 2,
  SelectMode_BOX = 3
}
 select mode types for TEXT_OBJECT More...
 
enum  e_InsertMode {
  InsertMode_DEFAULT = 0,
  InsertMode_INSERT = 1,
  InsertMode_OVERWRITE = 2
}
 Insert/Overwrite mode for TEXT_OBJECT. More...
 
enum  e_DragState {
  DragState_NONE = 0,
  DragState_CURSOR = 1,
  DragState_MOUSE = 2
}
 State flags for mouse/cursor 'drag' (i.e. selection) More...
 

Detailed Description

Definitions associated with Text Objects.

The definitions associated with Text Objects, including various 'enum' types

Macro Definition Documentation

◆ AUTO_HSCROLL_SIZE

#define AUTO_HSCROLL_SIZE   8

the number of characters to auto-hscroll by to get the cursor inside the viewport

Definition at line 195 of file text_object.h.

◆ DEFAULT_TAB_WIDTH

#define DEFAULT_TAB_WIDTH   8

the default width for a hard tab in a TEXT_OBJECT

Definition at line 191 of file text_object.h.

◆ HARD_TAB_CHAR

#define HARD_TAB_CHAR   '\xa0'

A 'hard tab' is represented internally by this character

Definition at line 187 of file text_object.h.

◆ MIN_BORDER_SPACING

#define MIN_BORDER_SPACING   2

the minimum number of pixels separating the text from the window border (when unspecified)

Definition at line 203 of file text_object.h.

◆ MIN_LINE_SPACING

#define MIN_LINE_SPACING   2

the minimum number of pixels by which lines are separated (normally will be 'descent / 2')

Definition at line 199 of file text_object.h.

Enumeration Type Documentation

◆ e_DragState

State flags for mouse/cursor 'drag' (i.e. selection)

This is a list of acceptable "drag states", maintained internally. See also begin_mouse_drag(), end_mouse_drag() and the use of the 'shift' modifier with cursor keys via begin_highlight() and end_highlight()

Enumerator
DragState_NONE 

no drag in progress

DragState_CURSOR 

cursor 'drag' (select mode)

DragState_MOUSE 

mouse 'drag' (select mode)

Definition at line 178 of file text_object.h.

◆ e_FileType

enum e_FileType

file types for TEXT_OBJECT

A list of supported 'file types' for a Text Object. See also get_filetype(), set_filetype()

Enumerator
FileType_PLAIN_TEXT 

no special handling, no source decorations

FileType_PROGRAM 

program source

FileType_RESOURCE 

'resource' file, text-based format

FileType_XML 

XML data (includes HTML)

FileType_MAKEFILE 

Make Files with special handling (implies 'hard tab', always)

FileType_CUSTOM_FLAG 

'custom' file types - 'or' with custom definition (0-0x7f)

FileType_MASK 

a bitmask for the various file types. Perform a logical 'and' of the file type value with this, and then you can compare it as being equal to one of the other 'FileType_' constants

FileType_HARDTAB 

hard tabs - implied by 'FileType_MAKEFILE', otherwise explicit

FileType_RESERVED2 

reserved 2

FileType_RESERVED3 

reserved 3

FileType_RESERVED4 

reserved 4

Definition at line 110 of file text_object.h.

◆ e_InsertMode

Insert/Overwrite mode for TEXT_OBJECT.

This is a list of acceptable 'insert/overwrite' modes. See also get_insmode(), set_insmode()

Enumerator
InsertMode_DEFAULT 

system default, usually 'insert'

InsertMode_INSERT 

INSERT mode, character inserted at cursor.

InsertMode_OVERWRITE 

OVERWRITE mode, character inserted on top of character to the right of the cursor (if any), else inserted.

Definition at line 165 of file text_object.h.

◆ e_LineFeed

enum e_LineFeed

line feed (line ending) types for TEXT_OBJECT

This is a list of acceptable line ending types. See also get_linefeed(), set_linefeed()

Enumerator
LineFeed_NONE 

single line

LineFeed_DEFAULT 

default for OS

LineFeed_NEWLINE 

POSIX newline 0AH.

LineFeed_RETURN 

OSX return 0DH.

LineFeed_CRLF 

CRLF 0DH,0AH.

LineFeed_LFCR 

LFCR 0AH,0DH.

LineFeed_ENTRYCOUNT 

reserved - specifies custom array, indicating the size of the array containing the character values, excluding negative indices

Definition at line 136 of file text_object.h.

◆ e_SelectMode

select mode types for TEXT_OBJECT

This is a list of acceptable 'select modes', that determine how multi-line text is selected. See also get_selmode(), set_selmode()

Enumerator
SelectMode_DEFAULT 

DEFAULT (typically CHAR)

SelectMode_CHAR 

CHAR (i.e. stream)

SelectMode_LINE 

LINE (always selects entire line when spanning multiple lines)

SelectMode_BOX 

BOX (selects a 'box' using virtual spacing)

Definition at line 152 of file text_object.h.