#ifndef TEXT_H #define TEXT_H #include #include #include "structures.h" #include "textinput.h" // Arguments typedef struct TEXT_ARGS { char *text; char *voidStr; int maxChars; int dRows; // displayed rows BOOL isEditable; nSDL_Font *font; TextBody body; int length; int cChar; int yRow; int cRow; int cCharInRow; BOOL scrollbar; BOOL isActive; // 0= non-actif, 1= survolé, 2= sélectionné } TextArgs; Widget *wText(const char *text, int dRows, int maxChars); Widget *wExText(const char *text, int dRows, int maxChars, nSDL_Font *f, const char *voidStr); Widget *wUnEditableText(const char *text, int dRows); Widget *wExUnEditableText(const char *text, int dRows, nSDL_Font *f, const char *voidStr); void DrawText(Widget *w); int ActivateText(Widget *w); void CloseText(Widget *w); // Méthodes void wText_SetVoidStr(Widget *w, const char *voidStr); void wText_SetText(Widget *w, const char *t); void wText_SetFont(Widget *w, nSDL_Font *f); void wText_SetMaxChars(Widget *w, int maxChars); void wText_SetEditable(Widget *w); void wText_SetUnEditable(Widget *w); BOOL wText_IsEditable(Widget *w); char *wText_GetText(Widget *w); char *wText_GetAllocatedText(Widget *w); #endif