gwenhywfar  4.99.8beta
o_word.c
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Sat Feb 20 2010
3  copyright : (C) 2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * Please see toplevel file COPYING for license details *
8  ***************************************************************************/
9 
10 #ifdef HAVE_CONFIG_H
11 # include <config.h>
12 #endif
13 
14 #define DISABLE_DEBUGLOG
15 
16 
17 #include "o_word_l.h"
18 #include "htmlctx_l.h"
19 
20 #include <gwenhywfar/debug.h>
21 
22 
23 
25  const char *s;
26  int w=0;
27  int h=0;
28 
29  s=HtmlObject_GetText(o);
30  if (s) {
31  HTML_PROPS *pr;
32  HTML_FONT *fnt;
33 
35  assert(pr);
36  fnt=HtmlProps_GetFont(pr);
39  }
40 
41  HtmlObject_SetWidth(o, w);
43  return 0;
44 }
45 
46 
47 
49  HTML_OBJECT *o;
50 
52  HtmlObject_SetText(o, s);
54 
55  return o;
56 }
57 
58 
int HtmlFont_GetFontSize(const HTML_FONT *fnt)
Definition: htmlfont.c:82
const char * HtmlObject_GetText(const HTML_OBJECT *o)
Definition: htmlobject.c:213
HTML_PROPS * HtmlObject_GetProperties(const HTML_OBJECT *o)
Definition: htmlobject.c:98
void HtmlObject_SetHeight(HTML_OBJECT *o, int i)
Definition: htmlobject.c:173
struct HTML_FONT HTML_FONT
Definition: htmlfont_be.h:23
HTML_OBJECT * HtmlObject_new(GWEN_XML_CONTEXT *ctx, HTML_OBJECT_TYPE t)
Definition: htmlobject.c:31
struct HTML_PROPS HTML_PROPS
Definition: htmlprops_be.h:15
HTML_FONT * HtmlProps_GetFont(const HTML_PROPS *pr)
Definition: htmlprops.c:78
HTML_OBJECT * HtmlObject_Word_new(GWEN_XML_CONTEXT *ctx, const char *s)
Definition: o_word.c:48
static int HtmlObject_Word_Layout(HTML_OBJECT *o)
Definition: o_word.c:24
int HtmlCtx_GetTextHeight(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s)
Definition: htmlctx.c:576
HTML_OBJECT_LAYOUT_FN HtmlObject_SetLayoutFn(HTML_OBJECT *o, HTML_OBJECT_LAYOUT_FN fn)
Definition: htmlobject.c:281
void HtmlObject_SetText(HTML_OBJECT *o, const char *s)
Definition: htmlobject.c:221
int HtmlCtx_GetTextWidth(GWEN_XML_CONTEXT *ctx, HTML_FONT *fnt, const char *s)
Definition: htmlctx.c:559
GWEN_XML_CONTEXT * HtmlObject_GetXmlCtx(const HTML_OBJECT *o)
Definition: htmlobject.c:74
void HtmlObject_SetWidth(HTML_OBJECT *o, int i)
Definition: htmlobject.c:157
struct GWEN_XML_CONTEXT GWEN_XML_CONTEXT
Definition: xmlctx.h:39
struct HTML_OBJECT HTML_OBJECT
Definition: htmlobject_be.h:25