//===============================================================================
// Xe UI toolkit
//
// XeTextField
//  Private header file
//
// AUTHOR:  Gabor Nagy
// DATE:    2023-May-11 03:08:01
//
// Copyright (C) 1996-2026 by Gabor Nagy. All rights reserved.
//===============================================================================
#ifndef _XeTextWidgetP_h
#define _XeTextWidgetP_h

#include <Xe/PrimitiveP.h>
#include <Xe/TextFieldP.h>
#include <Xe/Text.h>

#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
extern "C" {
#endif

//================================
// Class definition
//================================

#define XeTextClassCore\
	XePrimitiveClassCore

typedef struct _XeTextClassRec
{
	XeTextClassCore;
} XeTextClassRec;

extern XeTextClassRec  _XeTextWidget_class;


//================================
// Instance definition
//================================
// Instance part
//================================
typedef struct
{
	XeCallbackList  ConvertToCompoundStringCallback;  // Used for syntax-highlighting etc.

	uint8_t  WordTerminatorsLeft[256 / 8], WordTerminatorsRight[256 / 8];

	EListA(, XeStringLine, Lines);
	EListA(, XeTextHighlight, Highlights);

	EBool           HighlightsUpdated;                // Highlights' internal acceleration data is up-to-date
} XeTextPart;


//================================
// Instance record
//================================
typedef struct _XeTextRec
{
	XeWidgetCore;
	XeBasePart       Base;
	XePrimitivePart  Primitive;
	XeTextFieldPart  TextField;
	XeTextPart       Text;
} XeTextRec;

#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
}	// Close scope of 'extern "C"' declaration
#endif

#endif // _XeTextWidgetP_h
