diff options
-rw-r--r-- | dw/style.hh | 2 | ||||
-rw-r--r-- | dw/textblock.cc | 8 | ||||
-rw-r--r-- | src/styleengine.cc | 8 | ||||
-rw-r--r-- | src/table.cc | 6 | ||||
-rw-r--r-- | test/dw_anchors_test.cc | 8 | ||||
-rw-r--r-- | test/dw_border_test.cc | 6 | ||||
-rw-r--r-- | test/dw_example.cc | 4 | ||||
-rw-r--r-- | test/dw_find_test.cc | 6 | ||||
-rw-r--r-- | test/dw_images_scaled.cc | 4 | ||||
-rw-r--r-- | test/dw_images_scaled2.cc | 8 | ||||
-rw-r--r-- | test/dw_images_simple.cc | 4 | ||||
-rw-r--r-- | test/dw_links.cc | 6 | ||||
-rw-r--r-- | test/dw_links2.cc | 6 | ||||
-rw-r--r-- | test/dw_lists.cc | 6 | ||||
-rw-r--r-- | test/dw_resource_test.cc | 4 | ||||
-rw-r--r-- | test/dw_table.cc | 6 | ||||
-rw-r--r-- | test/dw_table_aligned.cc | 6 | ||||
-rw-r--r-- | test/dw_ui_test.cc | 4 |
18 files changed, 50 insertions, 52 deletions
diff --git a/dw/style.hh b/dw/style.hh index 2422bfa9..cd9012c5 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -529,7 +529,7 @@ protected: void copyAttrs (StyleAttrs *attrs); public: - inline static Style *create (Layout *layout, StyleAttrs *attrs) + inline static Style *create (StyleAttrs *attrs) { Style *style = styleTable->get (attrs); if (style) { diff --git a/dw/textblock.cc b/dw/textblock.cc index 045126d9..7675f55f 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -1914,14 +1914,13 @@ void Textblock::changeLinkColor (int link, int newColor) styleAttrs = *old_style; styleAttrs.color = core::style::Color::create (layout, newColor); - word->style = core::style::Style::create (layout, &styleAttrs); + word->style = core::style::Style::create (&styleAttrs); old_style->unref(); old_style = word->spaceStyle; styleAttrs = *old_style; styleAttrs.color = core::style::Color::create (layout, newColor); - word->spaceStyle = - core::style::Style::create(layout, &styleAttrs); + word->spaceStyle = core::style::Style::create(&styleAttrs); old_style->unref(); break; } @@ -1932,8 +1931,7 @@ void Textblock::changeLinkColor (int link, int newColor) newColor); styleAttrs.setBorderColor( core::style::Color::create (layout, newColor)); - widget->setStyle( - core::style::Style::create (layout, &styleAttrs)); + widget->setStyle(core::style::Style::create (&styleAttrs)); break; } default: diff --git a/src/styleengine.cc b/src/styleengine.cc index 2c7b1d7a..c394887e 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -51,7 +51,7 @@ StyleEngine::StyleEngine (dw::core::Layout *layout) { style_attrs.color = Color::create (layout, 0); style_attrs.backgroundColor = Color::create (layout, 0xffffff); - n->style = Style::create (layout, &style_attrs); + n->style = Style::create (&style_attrs); } StyleEngine::~StyleEngine () { @@ -715,7 +715,7 @@ Style * StyleEngine::backgroundStyle () { assert (attrs.backgroundColor); stack->getRef (stack->size () - 1)->backgroundStyle = - Style::create (layout, &attrs); + Style::create (&attrs); } return stack->getRef (stack->size () - 1)->backgroundStyle; } @@ -757,7 +757,7 @@ Style * StyleEngine::style0 (int i) { postprocessAttrs (&attrs); - stack->getRef (i)->style = Style::create (layout, &attrs); + stack->getRef (i)->style = Style::create (&attrs); return stack->getRef (i)->style; } @@ -771,7 +771,7 @@ Style * StyleEngine::wordStyle0 () { attrs.valign = style ()->valign; - stack->getRef(stack->size() - 1)->wordStyle = Style::create(layout, &attrs); + stack->getRef(stack->size() - 1)->wordStyle = Style::create(&attrs); return stack->getRef (stack->size () - 1)->wordStyle; } diff --git a/src/table.cc b/src/table.cc index 98157e76..41f2b686 100644 --- a/src/table.cc +++ b/src/table.cc @@ -297,7 +297,7 @@ static void Html_set_collapsing_border_model(DilloHtml *html, Widget *col_tb) collapseCellAttrs.borderWidth.bottom = borderWidth; collapseCellAttrs.hBorderSpacing = 0; collapseCellAttrs.vBorderSpacing = 0; - collapseStyle = Style::create(HT2LT(html), &collapseCellAttrs); + collapseStyle = Style::create(&collapseCellAttrs); col_tb->setStyle (collapseStyle); if (Html_table_get_border_model(html) != DILLO_HTML_TABLE_BORDER_COLLAPSE) { @@ -314,7 +314,7 @@ static void Html_set_collapsing_border_model(DilloHtml *html, Widget *col_tb) collapseTableAttrs.borderStyle = collapseCellAttrs.borderStyle; /* CSS2 17.6.2: table does not have padding (in collapsing mode) */ collapseTableAttrs.padding.setVal (0); - collapseStyle = Style::create(HT2LT(html), &collapseTableAttrs); + collapseStyle = Style::create(&collapseTableAttrs); ((dw::Table*)S_TOP(html)->table)->setStyle (collapseStyle); } } @@ -331,7 +331,7 @@ static void Html_set_separate_border_model(DilloHtml *html, Widget *col_tb) separateCellAttrs = *(html->styleEngine->style ()); /* CSS2 17.5: Internal table elements do not have margins */ separateCellAttrs.margin.setVal (0); - separateStyle = Style::create(HT2LT(html), &separateCellAttrs); + separateStyle = Style::create(&separateCellAttrs); col_tb->setStyle (separateStyle); } diff --git a/test/dw_anchors_test.cc b/test/dw_anchors_test.cc index cb839f40..d7201053 100644 --- a/test/dw_anchors_test.cc +++ b/test/dw_anchors_test.cc @@ -130,20 +130,20 @@ int main(int argc, char **argv) styleAttrs.margin.setVal (5); styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - topWidgetStyle = Style::create (layout, &styleAttrs); + topWidgetStyle = Style::create (&styleAttrs); styleAttrs.margin.left = 20; styleAttrs.margin.right = 0; styleAttrs.backgroundColor = NULL; - widgetStyle = Style::create (layout, &styleAttrs); + widgetStyle = Style::create (&styleAttrs); styleAttrs.margin.left = 0; - wordStyle = Style::create (layout, &styleAttrs); + wordStyle = Style::create (&styleAttrs); fontAttrs.size = 28; fontAttrs.weight = 700; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); - headingStyle = Style::create (layout, &styleAttrs); + headingStyle = Style::create (&styleAttrs); Fl::add_timeout (0, textTimeout, NULL); diff --git a/test/dw_border_test.cc b/test/dw_border_test.cc index 988abc33..ec5a09a5 100644 --- a/test/dw_border_test.cc +++ b/test/dw_border_test.cc @@ -65,7 +65,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle1 = Style::create (layout, &styleAttrs); + Style *widgetStyle1 = Style::create (&styleAttrs); styleAttrs.backgroundColor = Color::create (layout, 0xffff80); styleAttrs.margin.setVal (0); @@ -74,7 +74,7 @@ int main(int argc, char **argv) styleAttrs.setBorderStyle (BORDER_SOLID); styleAttrs.padding.setVal (1); - Style *widgetStyle2 = Style::create (layout, &styleAttrs); + Style *widgetStyle2 = Style::create (&styleAttrs); Textblock *textblock1 = new Textblock (false); textblock1->setStyle (widgetStyle1); @@ -87,7 +87,7 @@ int main(int argc, char **argv) styleAttrs.backgroundColor = NULL; styleAttrs.cursor = CURSOR_TEXT; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); const char *words1[] = { "Some", "random", "text.", NULL }; const char *words2[] = { "A", "nested", "paragraph.", NULL }; diff --git a/test/dw_example.cc b/test/dw_example.cc index 52aa2440..259650cf 100644 --- a/test/dw_example.cc +++ b/test/dw_example.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) dw::core::style::Color::create (layout, 0xffffff); dw::core::style::Style *widgetStyle = - dw::core::style::Style::create (layout, &styleAttrs); + dw::core::style::Style::create (&styleAttrs); dw::Textblock *textblock = new dw::Textblock (false); textblock->setStyle (widgetStyle); @@ -72,7 +72,7 @@ int main(int argc, char **argv) styleAttrs.backgroundColor = NULL; dw::core::style::Style *wordStyle = - dw::core::style::Style::create (layout, &styleAttrs); + dw::core::style::Style::create (&styleAttrs); for(int i = 1; i <= 10; i++) { char buf[4]; diff --git a/test/dw_find_test.cc b/test/dw_find_test.cc index e5c79fd3..5bddda10 100644 --- a/test/dw_find_test.cc +++ b/test/dw_find_test.cc @@ -107,15 +107,15 @@ int main(int argc, char **argv) styleAttrs.margin.setVal (10); styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *topWidgetStyle = Style::create (layout, &styleAttrs); + Style *topWidgetStyle = Style::create (&styleAttrs); styleAttrs.margin.setVal (0); styleAttrs.margin.left = 30; styleAttrs.backgroundColor = NULL; - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); styleAttrs.margin.left = 0; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (topWidgetStyle); diff --git a/test/dw_images_scaled.cc b/test/dw_images_scaled.cc index 2f8896e6..34a72c21 100644 --- a/test/dw_images_scaled.cc +++ b/test/dw_images_scaled.cc @@ -120,7 +120,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (widgetStyle); @@ -131,7 +131,7 @@ int main(int argc, char **argv) styleAttrs.margin.setVal (0); styleAttrs.backgroundColor = NULL; - Style *imageStyle = Style::create (layout, &styleAttrs); + Style *imageStyle = Style::create (&styleAttrs); image = new dw::Image (""); textblock->addWidget (image, imageStyle); diff --git a/test/dw_images_scaled2.cc b/test/dw_images_scaled2.cc index 2adb1770..81cdd2e8 100644 --- a/test/dw_images_scaled2.cc +++ b/test/dw_images_scaled2.cc @@ -95,7 +95,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (widgetStyle); @@ -108,7 +108,7 @@ int main(int argc, char **argv) styleAttrs.padding.setVal (0); styleAttrs.backgroundColor = NULL; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); styleAttrs.borderWidth.setVal (1); styleAttrs.setBorderColor (Color::create (layout, 0x000080)); @@ -118,7 +118,7 @@ int main(int argc, char **argv) styleAttrs.width = createPerLength (0.25); styleAttrs.height = createPerLength (0.25); - Style *imageStyle1 = Style::create (layout, &styleAttrs); + Style *imageStyle1 = Style::create (&styleAttrs); image1 = new dw::Image ("A longer ALT Text to demonstrate clipping."); textblock->addWidget (image1, imageStyle1); imageStyle1->unref(); @@ -128,7 +128,7 @@ int main(int argc, char **argv) styleAttrs.width = LENGTH_AUTO; styleAttrs.height = LENGTH_AUTO; - Style *imageStyle2 = Style::create (layout, &styleAttrs); + Style *imageStyle2 = Style::create (&styleAttrs); image2 = new dw::Image ("A longer ALT Text to demonstrate clipping."); textblock->addWidget (image2, imageStyle2); imageStyle2->unref(); diff --git a/test/dw_images_simple.cc b/test/dw_images_simple.cc index 8f00f847..34de20ea 100644 --- a/test/dw_images_simple.cc +++ b/test/dw_images_simple.cc @@ -119,7 +119,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (widgetStyle); @@ -130,7 +130,7 @@ int main(int argc, char **argv) styleAttrs.margin.setVal (0); styleAttrs.backgroundColor = NULL; - Style *imageStyle = Style::create (layout, &styleAttrs); + Style *imageStyle = Style::create (&styleAttrs); image = new dw::Image (""); textblock->addWidget (image, imageStyle); diff --git a/test/dw_links.cc b/test/dw_links.cc index 5622cbd5..79ccbb54 100644 --- a/test/dw_links.cc +++ b/test/dw_links.cc @@ -99,7 +99,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (widgetStyle); @@ -113,7 +113,7 @@ int main(int argc, char **argv) styleAttrs.backgroundColor = NULL; styleAttrs.cursor = CURSOR_TEXT; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); styleAttrs.color = Color::create (layout, 0x0000ff); styleAttrs.textDecoration = TEXT_DECORATION_UNDERLINE; @@ -137,7 +137,7 @@ int main(int argc, char **argv) } styleAttrs.x_link = i; - Style *linkStyle = Style::create (layout, &styleAttrs); + Style *linkStyle = Style::create (&styleAttrs); for(int j = 0; words2[j]; j++) { textblock->addText(words2[j], linkStyle); diff --git a/test/dw_links2.cc b/test/dw_links2.cc index b8e8c55b..acb095f3 100644 --- a/test/dw_links2.cc +++ b/test/dw_links2.cc @@ -128,7 +128,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (widgetStyle); @@ -142,7 +142,7 @@ int main(int argc, char **argv) styleAttrs.backgroundColor = NULL; styleAttrs.cursor = CURSOR_TEXT; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); styleAttrs.color = Color::create (layout, 0x0000ff); styleAttrs.textDecoration = TEXT_DECORATION_UNDERLINE; @@ -166,7 +166,7 @@ int main(int argc, char **argv) } styleAttrs.x_link = i; - Style *linkStyle = Style::create (layout, &styleAttrs); + Style *linkStyle = Style::create (&styleAttrs); for(int j = 0; words2[j]; j++) { textblock->addText (words2[j], linkStyle); diff --git a/test/dw_lists.cc b/test/dw_lists.cc index 12fa1627..2aa0abb7 100644 --- a/test/dw_lists.cc +++ b/test/dw_lists.cc @@ -61,7 +61,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (widgetStyle); @@ -73,7 +73,7 @@ int main(int argc, char **argv) styleAttrs.backgroundColor = NULL; styleAttrs.cursor = CURSOR_TEXT; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); styleAttrs.margin.setVal (5); styleAttrs.padding.setVal (5); @@ -82,7 +82,7 @@ int main(int argc, char **argv) styleAttrs.setBorderStyle (BORDER_SOLID); styleAttrs.borderWidth.setVal (1); - Style *itemStyle = Style::create (layout, &styleAttrs); + Style *itemStyle = Style::create (&styleAttrs); const char *wordsPar[] = { "This", "is", "a", "normal", "paragraph.", "And", diff --git a/test/dw_resource_test.cc b/test/dw_resource_test.cc index a2a26c62..e8a8b227 100644 --- a/test/dw_resource_test.cc +++ b/test/dw_resource_test.cc @@ -62,7 +62,7 @@ int main(int argc, char **argv) styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); - Style *widgetStyle = Style::create (layout, &styleAttrs); + Style *widgetStyle = Style::create (&styleAttrs); Textblock *textblock = new Textblock (false); textblock->setStyle (widgetStyle); @@ -73,7 +73,7 @@ int main(int argc, char **argv) styleAttrs.margin.setVal (0); styleAttrs.backgroundColor = NULL; - widgetStyle = Style::create (layout, &styleAttrs); + widgetStyle = Style::create (&styleAttrs); SelectionResource *res = layout->getResourceFactory()->createListResource (ListResource::SELECTION_AT_MOST_ONE, 4); diff --git a/test/dw_table.cc b/test/dw_table.cc index 75842e60..5416d05b 100644 --- a/test/dw_table.cc +++ b/test/dw_table.cc @@ -66,7 +66,7 @@ int main(int argc, char **argv) fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); - Style *tableStyle = Style::create (layout, &styleAttrs); + Style *tableStyle = Style::create (&styleAttrs); Table *table = new Table (false); table->setStyle (tableStyle); @@ -79,14 +79,14 @@ int main(int argc, char **argv) styleAttrs.margin.setVal (0); styleAttrs.padding.setVal (5); - Style *cellStyle = Style::create (layout, &styleAttrs); + Style *cellStyle = Style::create (&styleAttrs); styleAttrs.borderWidth.setVal (0); styleAttrs.margin.setVal (0); styleAttrs.cursor = CURSOR_TEXT; styleAttrs.textAlignChar = '.'; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); for (int i = 0; i < 4; i++) { table->addRow (wordStyle); diff --git a/test/dw_table_aligned.cc b/test/dw_table_aligned.cc index 022e7026..96cb0602 100644 --- a/test/dw_table_aligned.cc +++ b/test/dw_table_aligned.cc @@ -66,7 +66,7 @@ int main(int argc, char **argv) styleAttrs.hBorderSpacing = 5; styleAttrs.vBorderSpacing = 5; - Style *tableStyle = Style::create (layout, &styleAttrs); + Style *tableStyle = Style::create (&styleAttrs); Table *table = new Table (false); table->setStyle (tableStyle); @@ -77,7 +77,7 @@ int main(int argc, char **argv) styleAttrs.borderWidth.setVal (1); styleAttrs.setBorderStyle (BORDER_INSET); - Style *cellStyle = Style::create (layout, &styleAttrs); + Style *cellStyle = Style::create (&styleAttrs); styleAttrs.borderWidth.setVal (0); styleAttrs.margin.setVal (0); @@ -85,7 +85,7 @@ int main(int argc, char **argv) styleAttrs.cursor = CURSOR_TEXT; styleAttrs.textAlignChar = '.'; - Style *wordStyle = Style::create (layout, &styleAttrs); + Style *wordStyle = Style::create (&styleAttrs); TableCell *ref = NULL; for(int i = 0; i < 10; i++) { diff --git a/test/dw_ui_test.cc b/test/dw_ui_test.cc index 60893f06..2bcee1c5 100644 --- a/test/dw_ui_test.cc +++ b/test/dw_ui_test.cc @@ -65,7 +65,7 @@ int main(int argc, char **argv) fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); - Style *tableStyle = Style::create (layout, &styleAttrs); + Style *tableStyle = Style::create (&styleAttrs); Table *table = new Table (false); table->setStyle (tableStyle); @@ -76,7 +76,7 @@ int main(int argc, char **argv) styleAttrs.backgroundColor = NULL; styleAttrs.margin.setVal (0); - Style *cellStyle = Style::create (layout, &styleAttrs); + Style *cellStyle = Style::create (&styleAttrs); // First of all, the resources. Later, they are embedded into the // widget tree. |