textwidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: textwidget.h,v $
00003                              -------------------
00004     cvs         : $Id: textwidget.h,v 1.1 2004/08/06 06:28:48 aquamaniac Exp $
00005     begin       : Mon Feb 09 2004
00006     copyright   : (C) 2004 by Martin Preuss
00007     email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 #ifndef GWEN_UI_TEXTWIDGET_H
00029 #define GWEN_UI_TEXTWIDGET_H
00030 
00031 #include <gwenhywfar/ui/widget.h>
00032 #include <gwenhywfar/xml.h>
00033 #include <gwenhywfar/buffer.h>
00034 
00035 
00036 typedef struct GWEN_TW_LINE GWEN_TW_LINE;
00037 GWEN_LIST_FUNCTION_DEFS(GWEN_TW_LINE, GWEN_TWLine)
00038 
00039 
00040 #define GWEN_TEXTWIDGET_FLAGS_BREAKLINES  0x00010000
00041 #define GWEN_TEXTWIDGET_FLAGS_LINEMODE    0x00020000
00042 #define GWEN_TEXTWIDGET_FLAGS_HIGHLIGHT   0x00040000
00043 #define GWEN_TEXTWIDGET_FLAGS_DATACHANGE  0x00080000
00044 #define GWEN_TEXTWIDGET_FLAGS_FIXED       0x00100000
00045 #define GWEN_TEXTWIDGET_FLAGS_CONST       0x00200000
00046 
00047 
00048 GWEN_WIDGET *GWEN_TextWidget_new(GWEN_WIDGET *parent,
00049                                  GWEN_TYPE_UINT32 flags,
00050                                  const char *name,
00051                                  const char *text,
00052                                  int x, int y,
00053                                  int width, int height);
00054 
00055 void GWEN_TextWidget_SetVirtualSize(GWEN_WIDGET *w,
00056                                     int vwidth,
00057                                     int vheight);
00058 
00059 int GWEN_TextWidget_GetVirtualWidth(const GWEN_WIDGET *w);
00060 int GWEN_TextWidget_GetVirtualHeight(const GWEN_WIDGET *w);
00061 
00062 int GWEN_TextWidget_GetMaxWidth(const GWEN_WIDGET *w);
00063 
00064 
00065 GWEN_TW_LINE *GWEN_TextWidget_LineOpen(GWEN_WIDGET *w, int n, int cre);
00066 int GWEN_TextWidget_LineClose(GWEN_WIDGET *w,
00067                               GWEN_TW_LINE *l,
00068                               int force);
00069 int GWEN_TextWidget_LineSetBorders(GWEN_WIDGET *w,
00070                                    GWEN_TW_LINE *l,
00071                                    int leftBorder,
00072                                    int rightBorder);
00073 
00074 int GWEN_TextWidget_LineSetInsert(GWEN_WIDGET *w,
00075                                   GWEN_TW_LINE *l,
00076                                   int insert);
00077 int GWEN_TextWidget_LineSetAttributes(GWEN_WIDGET *w,
00078                                       GWEN_TW_LINE *l,
00079                                       GWEN_TYPE_UINT32 atts);
00080 int GWEN_TextWidget_LineSetPos(GWEN_WIDGET *w, GWEN_TW_LINE *l, int pos);
00081 int GWEN_TextWidget_LineClear(GWEN_WIDGET *w, GWEN_TW_LINE *l);
00082 int GWEN_TextWidget_LineDelete(GWEN_WIDGET *w, GWEN_TW_LINE *l, int n);
00083 int GWEN_TextWidget_LineRedraw(GWEN_WIDGET *w, GWEN_TW_LINE *l);
00084 int GWEN_TextWidget_LineWriteText(GWEN_WIDGET *w,
00085                                   GWEN_TW_LINE *l,
00086                                   const char *text,
00087                                   int len);
00088 
00089 int GWEN_TextWidget_EnsureVisible(GWEN_WIDGET *w,
00090                                   int x, int y,
00091                                   int width, int height);
00092 
00093 int GWEN_TextWidget_GetLeft(const GWEN_WIDGET *w);
00094 int GWEN_TextWidget_GetTop(const GWEN_WIDGET *w);
00095 
00096 
00097 GWEN_TW_LINE_LIST *GWEN_TextWidget_XMLToLines(GWEN_XMLNODE *n,
00098                                               int leftBorder,
00099                                               int rightBorder);
00100 GWEN_TW_LINE_LIST *GWEN_TextWidget_TextToLines(const char *s,
00101                                                int leftBorder,
00102                                                int rightBorder);
00103 
00104 int GWEN_TextWidget_SetPreparedText(GWEN_WIDGET *w,
00105                                     GWEN_TW_LINE_LIST *ll,
00106                                     GWEN_EVENT_SETTEXT_MODE m);
00107 
00108 int GWEN_TextWidget_GetMaxListWidth(GWEN_TW_LINE_LIST *ll);
00109 int GWEN_TextWidget_SetPos(GWEN_WIDGET *w, int n);
00110 
00111 GWEN_BUFFER *GWEN_TextWidget_GetText(const GWEN_WIDGET *w, int asAscii);
00112 
00113 void GWEN_TextWidget_Clear(GWEN_WIDGET *w);
00114 
00115 
00116 
00117 #endif
00118 
00119 

Generated on Thu Mar 9 17:30:14 2006 for gwenhywfar by  doxygen 1.4.6