dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

table.cc
Go to the documentation of this file.
1 /*
2  * File: table.cc
3  *
4  * Copyright 2008 Jorge Arellano Cid <jcid@dillo.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  */
11 
12 #include "table.hh"
13 #include "html_common.hh"
14 
15 #include "dw/style.hh"
16 #include "dw/textblock.hh"
17 #include "dw/table.hh"
18 
19 #include "prefs.h"
20 #include "msg.h"
21 #include "css.hh"
22 
23 using namespace dw;
24 using namespace dw::core;
25 using namespace dw::core::style;
26 
27 /*
28  * Forward declarations
29  */
30 
31 static void Html_tag_open_table_cell(DilloHtml *html,
32  const char *tag, int tagsize,
34 static void Html_tag_content_table_cell(DilloHtml *html,
35  const char *tag, int tagsize);
36 
37 /*
38  * <TABLE>
39  */
40 void Html_tag_open_table(DilloHtml *html, const char *tag, int tagsize)
41 {
42  const char *attrbuf;
43  int32_t border = -1, cellspacing = -1, cellpadding = -1, bgcolor = -1;
44  CssLength cssLength;
45 
46  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "border")))
47  border = isdigit(attrbuf[0]) ? strtol (attrbuf, NULL, 10) : 1;
48  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cellspacing"))) {
49  cellspacing = strtol (attrbuf, NULL, 10);
50  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
51  BUG_MSG("<table> cellspacing attribute is obsolete.");
52  }
53 
54  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cellpadding"))) {
55  cellpadding = strtol (attrbuf, NULL, 10);
56  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
57  BUG_MSG("<table> cellpadding attribute is obsolete.");
58  }
59 
60  if (border != -1) {
61  cssLength = CSS_CREATE_LENGTH (border, CSS_LENGTH_TYPE_PX);
63  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
65  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
67  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
69  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
78  }
79 
80  if (cellspacing != -1) {
81  cssLength = CSS_CREATE_LENGTH (cellspacing, CSS_LENGTH_TYPE_PX);
83  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
84  }
85 
86  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "width"))) {
89  a_Html_parse_length (html, attrbuf));
90  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
91  BUG_MSG("<table> width attribute is obsolete.");
92  }
93 
94  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "align"))) {
95  if (dStrAsciiCasecmp (attrbuf, "left") == 0)
98  else if (dStrAsciiCasecmp (attrbuf, "right") == 0)
101  else if (dStrAsciiCasecmp (attrbuf, "center") == 0)
104  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
105  BUG_MSG("<table> align attribute is obsolete.");
106  }
107 
108  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
109  bgcolor = a_Html_color_parse(html, attrbuf, -1);
110  if (bgcolor != -1)
112  CSS_TYPE_COLOR, bgcolor);
113  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
114  BUG_MSG("<table> bgcolor attribute is obsolete.");
115  }
116 
117  html->style (); // evaluate now, so we can build non-css hints for the cells
118 
119  /* The style for the cells */
120  html->styleEngine->clearNonCssHints ();
121  if (border > 0) {
122  cssLength = CSS_CREATE_LENGTH (1, CSS_LENGTH_TYPE_PX);
124  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
126  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
128  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
130  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
139  }
140 
141  if (cellpadding != -1) {
142  cssLength = CSS_CREATE_LENGTH (cellpadding, CSS_LENGTH_TYPE_PX);
144  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
146  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
148  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
150  CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
151  }
152 
153 }
154 void Html_tag_content_table(DilloHtml *html, const char *tag, int tagsize)
155 {
156  dw::core::Widget *table;
157 
158  HT2TB(html)->addParbreak (0, html->wordStyle ());
159  table = new dw::Table(prefs.limit_text_width);
160  HT2TB(html)->addWidget (table, html->style ());
161  HT2TB(html)->addParbreak (0, html->wordStyle ());
162 
163  S_TOP(html)->table_mode = DILLO_HTML_TABLE_MODE_TOP;
164  S_TOP(html)->table_border_mode = DILLO_HTML_TABLE_BORDER_SEPARATE;
165  S_TOP(html)->cell_text_align_set = FALSE;
166  S_TOP(html)->table = table;
167 
168 }
169 
170 /*
171  * <TR>
172  */
173 void Html_tag_open_tr(DilloHtml *html, const char *tag, int tagsize)
174 {
175  const char *attrbuf;
176  int32_t bgcolor = -1;
177 
179 
180  switch (S_TOP(html)->table_mode) {
182  _MSG("Invalid HTML syntax: <tr> outside <table>\n");
183  return;
184 
188 
189  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
190  bgcolor = a_Html_color_parse(html, attrbuf, -1);
191  if (bgcolor != -1)
193  CSS_TYPE_COLOR, bgcolor);
194  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
195  BUG_MSG("<tr> bgcolor attribute is obsolete.");
196  }
197 
198  if (a_Html_get_attr (html, tag, tagsize, "align")) {
199  S_TOP(html)->cell_text_align_set = TRUE;
200  a_Html_tag_set_align_attr (html, tag, tagsize);
201  }
202 
204 
205  if (bgcolor != -1) {
207  CSS_TYPE_COLOR, bgcolor);
208  }
209  a_Html_tag_set_valign_attr (html, tag, tagsize);
210  break;
211  default:
212  break;
213  }
214 }
215 
216 void Html_tag_content_tr(DilloHtml *html, const char *tag, int tagsize)
217 {
218  switch (S_TOP(html)->table_mode) {
220  return;
224  ((dw::Table*)S_TOP(html)->table)->addRow (html->style ());
225  default:
226  break;
227  }
228 
229  S_TOP(html)->table_mode = DILLO_HTML_TABLE_MODE_TR;
230 }
231 
232 /*
233  * <TD>
234  */
235 void Html_tag_open_td(DilloHtml *html, const char *tag, int tagsize)
236 {
237  Html_tag_open_table_cell (html, tag, tagsize,
239 }
240 
241 void Html_tag_content_td(DilloHtml *html, const char *tag, int tagsize)
242 {
243  Html_tag_content_table_cell (html, tag, tagsize);
244 }
245 
246 /*
247  * <TH>
248  */
249 void Html_tag_open_th(DilloHtml *html, const char *tag, int tagsize)
250 {
251  Html_tag_open_table_cell (html, tag, tagsize,
253 }
254 
255 void Html_tag_content_th(DilloHtml *html, const char *tag, int tagsize)
256 {
257  Html_tag_content_table_cell (html, tag, tagsize);
258 }
259 
260 /*
261  * Utilities
262  */
263 
264 /*
265  * The table border model is stored in the table's stack item
266  */
268 {
269  static int i_TABLE = -1;
270  if (i_TABLE == -1)
271  i_TABLE = a_Html_tag_index("table");
272 
273  int s_idx = html->stack->size();
274  while (--s_idx > 0 && html->stack->getRef(s_idx)->tag_idx != i_TABLE)
275  ;
276  return html->stack->getRef(s_idx)->table_border_mode;
277 }
278 
279 /*
280  * Set current table's border model
281  */
284 {
285  int s_idx = html->stack->size(), i_TABLE = a_Html_tag_index("table");
286 
287  while (--s_idx > 0 && html->stack->getRef(s_idx)->tag_idx != i_TABLE) ;
288  if (s_idx > 0)
289  html->stack->getRef(s_idx)->table_border_mode = mode;
290 }
291 
292 /* WORKAROUND: collapsing border model requires moving rendering code from
293  * the cell to the table, and making table-code aware of each
294  * cell style.
295  * This workaround mimics collapsing model within separate model. This is not
296  * a complete emulation but should be enough for most cases.
297  */
299 {
300  dw::core::style::Style *collapseStyle, *tableStyle;
301  dw::core::style::StyleAttrs collapseCellAttrs, collapseTableAttrs;
302  int borderWidth, marginWidth;
303 
304  tableStyle = ((dw::Table*)S_TOP(html)->table)->getStyle ();
305  borderWidth = html->style ()->borderWidth.top;
306  marginWidth = tableStyle->margin.top;
307 
308  collapseCellAttrs = *(html->style ());
309  collapseCellAttrs.margin.setVal (0);
310  collapseCellAttrs.borderWidth.left = 0;
311  collapseCellAttrs.borderWidth.top = 0;
312  collapseCellAttrs.borderWidth.right = borderWidth;
313  collapseCellAttrs.borderWidth.bottom = borderWidth;
314  collapseCellAttrs.hBorderSpacing = 0;
315  collapseCellAttrs.vBorderSpacing = 0;
316  collapseStyle = Style::create(&collapseCellAttrs);
317  col_tb->setStyle (collapseStyle);
318 
321  collapseTableAttrs = *tableStyle;
322  collapseTableAttrs.margin.setVal (marginWidth);
323  collapseTableAttrs.borderWidth.left = borderWidth;
324  collapseTableAttrs.borderWidth.top = borderWidth;
325  collapseTableAttrs.borderWidth.right = 0;
326  collapseTableAttrs.borderWidth.bottom = 0;
327  collapseTableAttrs.hBorderSpacing = 0;
328  collapseTableAttrs.vBorderSpacing = 0;
329  collapseTableAttrs.borderColor = collapseCellAttrs.borderColor;
330  collapseTableAttrs.borderStyle = collapseCellAttrs.borderStyle;
331  /* CSS2 17.6.2: table does not have padding (in collapsing mode) */
332  collapseTableAttrs.padding.setVal (0);
333  collapseStyle = Style::create(&collapseTableAttrs);
334  ((dw::Table*)S_TOP(html)->table)->setStyle (collapseStyle);
335  }
336 }
337 
338 /*
339  * Adjust style for separate border model.
340  * (Dw uses this model internally).
341  */
343 {
344  dw::core::style::Style *separateStyle;
345  dw::core::style::StyleAttrs separateCellAttrs;
346 
347  separateCellAttrs = *(html->style ());
348  /* CSS2 17.5: Internal table elements do not have margins */
349  separateCellAttrs.margin.setVal (0);
350  separateStyle = Style::create(&separateCellAttrs);
351  col_tb->setStyle (separateStyle);
352 }
353 
354 /*
355  * used by <TD> and <TH>
356  */
358  const char *tag, int tagsize,
360 {
361  const char *attrbuf;
362  int32_t bgcolor;
363 
365 
366  switch (S_TOP(html)->table_mode) {
368  return;
369 
371  /* a_Dw_table_add_cell takes care that dillo does not crash. */
372  /* continues */
375  /* text style */
376  if (!S_TOP(html)->cell_text_align_set) {
378  CSS_TYPE_ENUM, text_align);
379  }
380  if (a_Html_get_attr(html, tag, tagsize, "nowrap")) {
381  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
382  BUG_MSG("<t%c> nowrap attribute is obsolete.",
383  (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
386  }
387 
388  a_Html_tag_set_align_attr (html, tag, tagsize);
389 
390  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "width"))) {
393  a_Html_parse_length (html, attrbuf));
394  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
395  BUG_MSG("<t%c> width attribute is obsolete.",
396  (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
397  }
398 
399  a_Html_tag_set_valign_attr (html, tag, tagsize);
400 
401  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
402  bgcolor = a_Html_color_parse(html, attrbuf, -1);
403  if (bgcolor != -1)
405  CSS_TYPE_COLOR, bgcolor);
406  if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
407  BUG_MSG("<t%c> bgcolor attribute is obsolete.",
408  (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
409  }
410 
411  default:
412  /* compiler happiness */
413  break;
414  }
415 }
416 
418  const char *tag, int tagsize)
419 {
420  int colspan = 1, rowspan = 1;
421  const char *attrbuf;
422  Widget *col_tb;
423 
424  switch (S_TOP(html)->table_mode) {
426  BUG_MSG("<t%c> outside <table>.",
427  (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
428  return;
429 
431  BUG_MSG("<t%c> outside <tr>.",
432  (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
433  /* a_Dw_table_add_cell takes care that dillo does not crash. */
434  /* continues */
437  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "colspan"))) {
438  char *invalid;
439  colspan = strtol(attrbuf, &invalid, 10);
440  if ((colspan < 0) || (attrbuf == invalid))
441  colspan = 1;
442  }
443  /* TODO: check errors? */
444  if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "rowspan")))
445  rowspan = MAX(1, strtol (attrbuf, NULL, 10));
446  if (html->style ()->textAlign
448  col_tb = new dw::TableCell (
449  ((dw::Table*)S_TOP(html)->table)->getCellRef (),
451  else
452  col_tb = new Textblock (prefs.limit_text_width);
453 
454  if (html->style()->borderCollapse == BORDER_MODEL_COLLAPSE){
455  Html_set_collapsing_border_model(html, col_tb);
456  } else {
457  Html_set_separate_border_model(html, col_tb);
458  }
459 
460  ((dw::Table*)S_TOP(html)->table)->addCell (col_tb, colspan, rowspan);
461  S_TOP(html)->textblock = html->dw = col_tb;
462  break;
463 
464  default:
465  /* compiler happiness */
466  break;
467  }
468 
469  S_TOP(html)->table_mode = DILLO_HTML_TABLE_MODE_TD;
470 }
CSS_LENGTH_TYPE_PX
Definition: css.hh:79
S_TOP
#define S_TOP(html)
Definition: html_common.hh:29
CSS_CREATE_LENGTH
CssLength CSS_CREATE_LENGTH(float v, CssLengthType t)
Definition: css.hh:90
Html_tag_open_th
void Html_tag_open_th(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:249
dw::Table
A Widget for rendering tables.
Definition: table.hh:316
a_Html_parse_length
CssLength a_Html_parse_length(DilloHtml *html, const char *attr)
Definition: html.cc:1473
dw::core::style::TEXT_ALIGN_LEFT
Definition: style.hh:247
TRUE
#define TRUE
Definition: dlib.h:23
CSS_PROPERTY_BACKGROUND_COLOR
Definition: css.hh:148
DilloHtml::stack
lout::misc::SimpleVector< DilloHtmlState > * stack
Definition: html_common.hh:167
CSS_PROPERTY_BORDER_RIGHT_WIDTH
Definition: css.hh:161
dw::Textblock
A Widget for rendering text blocks, i.e. paragraphs or sequences of paragraphs.
Definition: textblock.hh:149
Html_set_separate_border_model
static void Html_set_separate_border_model(DilloHtml *html, Widget *col_tb)
Definition: table.cc:342
lout::misc::SimpleVector::getRef
T * getRef(int i) const
Return the reference of one element.
Definition: misc.hh:166
CSS_TYPE_ENUM
Definition: css.hh:26
StyleEngine::inheritBackgroundColor
void inheritBackgroundColor()
Use of the background color of the parent style as default. This is only used in table code to allow ...
Definition: styleengine.cc:241
MAX
#define MAX(a, b)
Definition: dlib.h:27
CSS_PROPERTY_BORDER_RIGHT_STYLE
Definition: css.hh:160
dw::TableCell
Definition: tablecell.hh:9
Html_tag_content_th
void Html_tag_content_th(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:255
DilloHtml::DocTypeVersion
float DocTypeVersion
Definition: html_common.hh:162
DT_HTML
Definition: html_common.hh:45
dw::core::style::TextAlignType
TextAlignType
Definition: style.hh:246
BUG_MSG
#define BUG_MSG(...)
Definition: html_common.hh:32
css.hh
dw::core::style::StyleAttrs::margin
Box margin
Definition: style.hh:510
DilloHtml::wordStyle
dw::core::style::Style * wordStyle()
Definition: html_common.hh:232
DILLO_HTML_TABLE_BORDER_SEPARATE
Definition: html_common.hh:66
Html_tag_open_table_cell
static void Html_tag_open_table_cell(DilloHtml *html, const char *tag, int tagsize, dw::core::style::TextAlignType text_align)
Definition: table.cc:357
dw::core::style::StyleAttrs::borderCollapse
BorderCollapse borderCollapse
Definition: style.hh:511
a_Html_get_attr
const char * a_Html_get_attr(DilloHtml *html, const char *tag, int tagsize, const char *attrname)
Definition: html.cc:4164
msg.h
dw::core::style::Style::create
static Style * create(StyleAttrs *attrs)
Definition: style.hh:586
DILLO_HTML_TABLE_BORDER_COLLAPSE
Definition: html_common.hh:67
Html_tag_open_tr
void Html_tag_open_tr(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:173
Html_table_set_border_model
static void Html_table_set_border_model(DilloHtml *html, DilloHtmlTableBorderMode mode)
Definition: table.cc:282
a_Html_tag_set_valign_attr
bool a_Html_tag_set_valign_attr(DilloHtml *html, const char *tag, int tagsize)
Definition: html.cc:332
D_ASCII_TOLOWER
#define D_ASCII_TOLOWER(c)
Definition: dlib.h:37
DILLO_HTML_TABLE_MODE_TD
Definition: html_common.hh:62
DilloHtmlTableBorderMode
DilloHtmlTableBorderMode
Definition: html_common.hh:65
dw::core::style::Box::right
int right
Definition: style.hh:467
CSS_TYPE_COLOR
Definition: css.hh:42
prefs.h
dw::core::style::TEXT_ALIGN_CENTER
Definition: style.hh:249
FALSE
#define FALSE
Definition: dlib.h:19
DilloHtml::styleEngine
StyleEngine * styleEngine
Definition: html_common.hh:168
DILLO_HTML_TABLE_MODE_TOP
Definition: html_common.hh:60
Html_tag_open_td
void Html_tag_open_td(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:235
dw::core::style::BORDER_INSET
Definition: style.hh:230
DilloHtml
Definition: html_common.hh:131
a_Html_tag_set_align_attr
void a_Html_tag_set_align_attr(DilloHtml *html, const char *tag, int tagsize)
Definition: html.cc:287
StyleEngine::inheritNonCssHints
void inheritNonCssHints()
Instruct StyleEngine to use the nonCssHints from parent element This is only used for tables where no...
Definition: styleengine.cc:212
CSS_PROPERTY_BORDER_TOP_WIDTH
Definition: css.hh:165
lout::misc::SimpleVector::size
int size() const
Return the number of elements put into this vector.
Definition: misc.hh:119
CSS_PROPERTY_PADDING_LEFT
Definition: css.hh:208
dw::core::style::TEXT_ALIGN_RIGHT
Definition: style.hh:248
textblock.hh
a_Html_color_parse
int32_t a_Html_color_parse(DilloHtml *html, const char *str, int32_t default_color)
Definition: html.cc:1498
Html_tag_content_tr
void Html_tag_content_tr(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:216
Html_tag_content_table_cell
static void Html_tag_content_table_cell(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:417
StyleEngine::clearNonCssHints
void clearNonCssHints()
Definition: styleengine.cc:228
CSS_PROPERTY_TEXT_ALIGN
Definition: css.hh:214
StyleEngine::setNonCssHint
void setNonCssHint(CssPropertyName name, CssValueType type, CssPropertyValue value)
Definition: styleengine.hh:46
CSS_TYPE_LENGTH_PERCENTAGE
Definition: css.hh:30
CSS_PROPERTY_PADDING_RIGHT
Definition: css.hh:209
dw::core::style::StyleAttrs::borderStyle
struct dw::core::style::StyleAttrs::@14 borderStyle
dw::core::style::StyleAttrs::padding
Box padding
Definition: style.hh:510
DilloHtml::style
dw::core::style::Style * style()
Definition: html_common.hh:230
dw::core::style::StyleAttrs::vBorderSpacing
int vBorderSpacing
Definition: style.hh:507
CSS_PROPERTY_BORDER_LEFT_WIDTH
Definition: css.hh:158
CSS_PROPERTY_BORDER_BOTTOM_WIDTH
Definition: css.hh:154
CSS_PROPERTY_BORDER_BOTTOM_STYLE
Definition: css.hh:153
CSS_PROPERTY_PADDING_BOTTOM
Definition: css.hh:207
dStrAsciiCasecmp
int dStrAsciiCasecmp(const char *s1, const char *s2)
Definition: dlib.c:201
table.hh
DilloHtmlState::table_border_mode
DilloHtmlTableBorderMode table_border_mode
Definition: html_common.hh:107
DilloHtml::dw
dw::core::Widget * dw
Definition: html_common.hh:149
CssLength
int CssLength
Definition: css.hh:75
DILLO_HTML_TABLE_MODE_NONE
Definition: html_common.hh:59
dw::core::style::StyleAttrs::borderColor
struct dw::core::style::StyleAttrs::@13 borderColor
HT2TB
#define HT2TB(html)
Definition: html_common.hh:23
dw::core::style::StyleAttrs::textAlign
TextAlignType textAlign
Definition: style.hh:502
dw::core::style::Box::setVal
void setVal(int val)
Definition: style.hh:469
dw::core::style::BORDER_OUTSET
Definition: style.hh:231
CSS_PROPERTY_BORDER_TOP_STYLE
Definition: css.hh:164
CSS_PROPERTY_BORDER_LEFT_STYLE
Definition: css.hh:157
prefs
DilloPrefs prefs
Definition: prefs.c:31
dw::core::style::StyleAttrs::hBorderSpacing
int hBorderSpacing
Definition: style.hh:507
html_common.hh
dw::core::style::Box::top
int top
Definition: style.hh:467
DilloPrefs::limit_text_width
bool_t limit_text_width
Definition: prefs.h:68
dw::core::style::StyleAttrs::borderWidth
Box borderWidth
Definition: style.hh:510
Html_tag_open_table
void Html_tag_open_table(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:40
Html_table_get_border_model
static int Html_table_get_border_model(DilloHtml *html)
Definition: table.cc:267
CSS_PROPERTY_BORDER_SPACING
Definition: css.hh:162
dw::core::style::WHITE_SPACE_NOWRAP
Definition: style.hh:346
CSS_PROPERTY_WIDTH
Definition: css.hh:224
style.hh
_MSG
#define _MSG(...)
Definition: bookmarks.c:44
Html_tag_content_td
void Html_tag_content_td(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:241
Html_tag_content_table
void Html_tag_content_table(DilloHtml *html, const char *tag, int tagsize)
Definition: table.cc:154
dw::core::style::TEXT_ALIGN_STRING
Definition: style.hh:251
dw::core::style::StyleAttrs
Definition: style.hh:489
dw::core
The core of Dw is defined in this namespace.
Definition: core.hh:20
dw::core::style::Box::bottom
int bottom
Definition: style.hh:467
dw::core::Widget::setStyle
virtual void setStyle(style::Style *style)
Change the style of a widget.
Definition: widget.cc:325
DilloHtmlState::tag_idx
int tag_idx
Definition: html_common.hh:114
dw::core::Widget
The base class of all dillo widgets.
Definition: widget.hh:23
dw::core::style::BORDER_MODEL_COLLAPSE
Definition: style.hh:218
dw
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtextblock.cc:26
dw::core::style
Anything related to Dillo Widget styles is defined here.
Definition: style.cc:35
DilloHtml::DocType
DilloHtmlDocumentType DocType
Definition: html_common.hh:161
a_Html_tag_index
int a_Html_tag_index(const char *tag)
Definition: html.cc:3621
dw::core::style::Box::left
int left
Definition: style.hh:467
Html_set_collapsing_border_model
static void Html_set_collapsing_border_model(DilloHtml *html, Widget *col_tb)
Definition: table.cc:298
dw::core::style::Style
Definition: style.hh:571
CSS_PROPERTY_PADDING_TOP
Definition: css.hh:210
DILLO_HTML_TABLE_MODE_TR
Definition: html_common.hh:61
CSS_PROPERTY_WHITE_SPACE
Definition: css.hh:223