#pragma once
#if 1

// ----------------------------------------------------------------
// forward definition using a typedef
// the actual structure 

// typedef struct RICHTEXTEDITOBJECT  RICHTEXTEDITOBJECT;
// ----------------------------------------------------------------
// do NOT alter the following
// It is overlaid on a SOBDATA structure so they MUST be the same

typedef struct RICHTEXTEDITOBJECT
{
    GENERICSOB
} RICHTEXTEDITOBJECT;

// ----------------------------------------------------------------
// forward definition using a typedef for
// OBJECT (in this case RICHTEXTEDIT) specific functional prototypes
// that operate on an  OBJECT

typedef myUInt RICHTEXTEDITFNC_SHAKE(RICHTEXTEDITOBJECT*);

typedef TCHAR* RICHTEXTEDITFNC_GETTEXT(RICHTEXTEDITOBJECT*);
typedef myUInt RICHTEXTEDITFNC_SETTEXT(RICHTEXTEDITOBJECT*,   TCHAR*);

typedef myUInt RICHTEXTEDITFNC_SETVALUE(RICHTEXTEDITOBJECT*, myUInt);
typedef myUInt RICHTEXTEDITFNC_SETEVENTHANDLER(RICHTEXTEDITOBJECT*, EVENTHANDLER);
typedef RICHTEXTEDITOBJECT* RICHTEXTEDITFNC_GETLAST( ); 


// typedef RICHTEXTEDITOBJECT * RICHTEXTEDITFNC_GETOBJECT(TCHAR* );   // some CREATORs only need the new objects "title"
 typedef RICHTEXTEDITOBJECT* RICHTEXTEDITFNC_GETOBJECT(TCHAR* , int nbr); // some need a integer usually to help define the objects height
 
// ----------------------------------------------------------------

typedef struct RICHTEXTEDITCVTBL_ {
 
    // ---------------------------------
    // must haves:
    RICHTEXTEDITFNC_GETOBJECT* Create;
    RICHTEXTEDITFNC_SHAKE* Delete;

    RICHTEXTEDITFNC_SETVALUE* SetShow;

    // ---------------------------------
    // helpfuls:

    RICHTEXTEDITFNC_GETTEXT* GetType;

    RICHTEXTEDITFNC_GETTEXT* GetTitle;
    RICHTEXTEDITFNC_SETTEXT* SetTitle;

    RICHTEXTEDITFNC_SETEVENTHANDLER * SetEventHandler;

    // ---------------------------------
    // object specifics:
    RICHTEXTEDITFNC_SETVALUE* SetRGB;

    RICHTEXTEDITFNC_SETTEXT* AddText;
    RICHTEXTEDITFNC_SHAKE* Empty;

    RICHTEXTEDITFNC_SETTEXT* AddBold;
    RICHTEXTEDITFNC_SETTEXT* AddRTF;


    RICHTEXTEDITFNC_SHAKE* SetDefault;

    RICHTEXTEDITFNC_GETLAST* LastWidget;


    // RICHTEXTEDITFNC_SETVALUE* SetState;
    // RICHTEXTEDITFNC_SHAKE* ToggleState;
    // RICHTEXTEDITFNC_SHAKE* GetState;

} RICHTEXTEDITCVTBL;

// ----------------------------------------------------------------
// functional prototype for the  "external" methods of this OBJECT
 
extern RICHTEXTEDITCVTBL  RICHTEXTEDIT;



extern HWND rtEditHWND;
 

void addText(TCHAR* txt);
void addTextBold(TCHAR* txt);
void clearText();
void ReportError(TCHAR* txt);

 

#endif
