X11 Work Bench Toolkit  1.0
_text_object_ Struct Reference

'base class' structure for TEXT_OBJECT More...

#include <text_object.h>

Data Fields

const TEXT_OBJECT_VTABLEvtable
 method function pointers (similar to C++ virtual member functions)
 
unsigned int ulTag
 tag word, always assigned to TEXT_OBJECT_TAG
 
Window wIDOwner
 owner window (cached from paint/expose handling and/or cursor blink)
 
WB_RECT rctSel
 select boundary in characters, {0,0,0,0} implies NONE, {-1,x,x,x} implies ALL. if top == bottom, assume single-line
 
WB_RECT rctHighLight
 highlight rect {0,0,0,0} implies NONE
 
XColor clrHFG
 highlight FG color
 
XColor clrHBG
 highlight BG color
 
int iFileType
 file type - -1=Makefile, 0=plain text, others are 'file type' constants, bit flags to preserve hard tabs, etc.
 
enum _LineFeed_ iLineFeed
 linefeed type (see enum). LineFeed_NONE implies SINGLE LINE
 
int iInsMode
 insert mode - 0=overwrite, 1=insert
 
int iSelMode
 selection mode - 0=normal, 1=line, 2=box
 
int iScrollMode
 scroll mode - 0=normal, 1='scroll lock'
 
int iTab
 tab width in characters (0 = system default)
 
int iRow
 current row (cursor)
 
int iCol
 current col (cursor)
 
int iPos
 position within buffer (reserved, MBCS may require it)
 
int iCursorX
 X position of cursor as last drawn in expose event.
 
int iCursorY
 Y position of cursor as last drawn in expose event (top of cursor)
 
int iCursorHeight
 height of cursor as last drawn in expose event (always 1 if 'overwrite' cursor)
 
int iBlinkState
 cursor blink state
 
int iDragState
 if '1' bit is set, cursor drag. if '2' bit is set, mouse drag
 
int iAsc
 font height ascension
 
int iDesc
 font height descension
 
int iFontWidth
 width of font in pixels (fixed pitch) - assigned by 'expose' handler
 
WB_RECT rctView
 viewport, in characters (rctView.top is the top visible line, always)
 
WB_RECT rctWinView
 viewport, in window coordinates, or 'empty' if unknown
 
void * pText
 pointer to (abstracted) object containing the text. void pointer allows abstraction. member functions must handle correctly
 
void * pUndo
 pointer to 'undo' buffer. NULL if empty.
 
void * pRedo
 pointer to 'redo' buffer. NULL if empty.
 

Detailed Description

'base class' structure for TEXT_OBJECT

typedef struct _text_object_
{
const TEXT_OBJECT_VTABLE *vtable; // method function pointers (similar to C++ virtual members)
unsigned int ulTag; // tag word, always assigned to TEXT_OBJECT_TAG
Window wIDOwner; // owner window (cached from paint/expose handling and/or cursor blink)
WB_RECT rctSel; // select boundary in characters
WB_RECT rctHighLight; // highlight rect
XColor clrHFG; // highlight FG color
XColor clrHBG; // highlight BG color
int iFileType; // file type - -1=Makefile, 0=plain text, others are 'file type' constants
enum _LineFeed_ iLineFeed; // linefeed type (see enum)
int iInsMode; // insert mode - 0=overwrite, 1=insert
int iSelMode; // selection mode - 0=normal, 1=line, 2=box
int iScrollMode; // scroll mode - 0=normal, 1='scroll lock'
int iTab; // tab width in characters (0 = system default)
// cursor position
int iRow; // current row (cursor)
int iCol; // current col (cursor)
int iPos; // position within buffer
int iCursorX; // X position of cursor as last drawn in expose event
int iCursorY; // Y position of cursor as last drawn in expose event (top of cursor)
int iCursorHeight; // height of cursor as last drawn in expose event
int iBlinkState; // cursor blink state
int iDragState; // if '1' bit is set, cursor drag. if '2' bit is set, mouse drag
int iAsc; // font height ascension (cached)
int iDesc; // font height descension (cached)
int iFontWidth; // width of font in pixels (fixed pitch) - cached by 'expose' handler
// viewport
WB_RECT rctView; // viewport, in characters
WB_RECT rctWinView; // viewport, in window coordinates, or 'empty' if unknown
// the data
void *pText; // pointer to (abstracted) object containing the text. void pointer
// allows abstraction. member functions must handle correctly
void *pUndo; // pointer to 'undo' buffer. NULL if empty.
void *pRedo; // pointer to 'redo' buffer. NULL if empty.

Definition at line 848 of file text_object.h.


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