#ifndef NEDIT_TEXTP_H_INCLUDED
#define NEDIT_TEXTP_H_INCLUDED
#include "textBuf.h"
#include "textDisp.h"
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <X11/X.h>
#include <Xm/XmP.h>
#include <Xm/PrimitiveP.h>
#include <X11/CoreP.h>
#include <X11/Xft/Xft.h>
#define TEXTWIDGET_XIM_LOOKUP_BUFSIZE 512
enum dragStates {
NOT_CLICKED,
PRIMARY_CLICKED,
SECONDARY_CLICKED,
CLICKED_IN_SELECTION,
PRIMARY_DRAG,
PRIMARY_RECT_DRAG,
SECONDARY_DRAG,
SECONDARY_RECT_DRAG,
PRIMARY_BLOCK_DRAG,
DRAG_CANCELED,
MOUSE_PAN};
enum multiClickStates {
NO_CLICKS,
ONE_CLICK,
TWO_CLICKS,
THREE_CLICKS};
typedef struct _TextClassPart{
int ignore;
} TextClassPart;
typedef struct _TextClassRec{
CoreClassPart core_class;
XmPrimitiveClassPart primitive_class;
TextClassPart text_class;
} TextClassRec;
extern TextClassRec nTextClassRec;
typedef struct _TextPart {
Pixel selectFGPixel, selectBGPixel, highlightFGPixel, highlightBGPixel;
Pixel cursorFGPixel, lineNumFGPixel, lineNumBGPixel, calltipFGPixel, calltipBGPixel, lineHighlightBGPixel;
NFont *font;
NFont *boldFont;
NFont *italicFont;
NFont *boldItalicFont;
Boolean pendingDelete;
Boolean autoShowInsertPos;
Boolean autoWrap;
Boolean autoWrapPastedText;
Boolean continuousWrap;
Boolean autoIndent;
Boolean smartIndent;
Boolean overstrike;
Boolean heavyCursor;
Boolean readOnly;
Boolean hidePointer;
int rows, columns;
int marginWidth, marginHeight;
int cursorBlinkRate;
int wrapMargin;
int emulateTabs;
int lineNumCols;
char *delimiters;
Cardinal cursorVPadding;
Widget hScrollBar, vScrollBar;
XtCallbackList focusInCB;
XtCallbackList focusOutCB;
XtCallbackList cursorCB;
XtCallbackList dragStartCB;
XtCallbackList dragEndCB;
XtCallbackList smartIndentCB;
textDisp *textD;
int anchor, rectAnchor;
int dragState;
int multiClickState;
int btnDownX, btnDownY;
Time lastBtnDown;
int mouseX, mouseY;
int selectionOwner;
int motifDestOwner;
int emTabsBeforeCursor;
XtIntervalId autoScrollProcID;
XtIntervalId cursorBlinkProcID;
textBuffer *dragOrigBuf;
int dragXOffset, dragYOffset;
int dragType;
int dragInsertPos;
int dragRectStart;
int dragInserted;
int dragDeleted;
int dragSourceDeletePos;
int dragSourceInserted;
int dragSourceDeleted;
int dragNLines;
XmString backlightCharTypes;
Boolean highlightCursorLine;
Boolean indentRainbow;
Boolean ansiColors;
XftColor *ansiColorList;
XIM xim;
XIC xic;
unsigned long last_keyevent_serial;
unsigned int last_keyevent_keycode;
Time last_keyevent_time;
char xim_lookup_cache[
TEXTWIDGET_XIM_LOOKUP_BUFSIZE];
int xim_lookup_nchars;
Status xim_lookup_status;
KeySym xim_lookup_keysym;
} TextPart;
typedef struct _TextRec {
CorePart core;
XmPrimitivePart primitive;
TextPart text;
} TextRec;
#endif