comparison test/dw_ui_test.cc @ 2016:8cf59505bd0a

tests cleanup
author corvid <corvid@lavabit.com>
date Sat, 14 May 2011 06:45:42 +0000
parents bfb8bc9ddf62
children
comparison
equal deleted inserted replaced
2015:025c664fa44f 2016:8cf59505bd0a
60 fontAttrs.name = "Helvetica"; 60 fontAttrs.name = "Helvetica";
61 fontAttrs.size = 14; 61 fontAttrs.size = 14;
62 fontAttrs.weight = 400; 62 fontAttrs.weight = 400;
63 fontAttrs.style = FONT_STYLE_NORMAL; 63 fontAttrs.style = FONT_STYLE_NORMAL;
64 fontAttrs.letterSpacing = 0; 64 fontAttrs.letterSpacing = 0;
65 fontAttrs.fontVariant = FONT_VARIANT_NORMAL;
65 styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); 66 styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs);
66 67
67 Style *tableStyle = Style::create (layout, &styleAttrs); 68 Style *tableStyle = Style::create (layout, &styleAttrs);
68 69
69 Table *table = new Table (false); 70 Table *table = new Table (false);
118 form->addTextResource ("val2", entryres2); 119 form->addTextResource ("val2", entryres2);
119 form->addTextResource ("text", textres); 120 form->addTextResource ("text", textres);
120 const char *radiovalues[] = { "radio1", "radio2", NULL }; 121 const char *radiovalues[] = { "radio1", "radio2", NULL };
121 form->addRadioButtonResource ("val3", radiores1, radiovalues); 122 form->addRadioButtonResource ("val3", radiores1, radiovalues);
122 form->addCheckButtonResource ("check", checkres); 123 form->addCheckButtonResource ("check", checkres);
123 const char *selvalues[] = { "i1", "i11", "i12", "i13", "i2", 124 const char *selvalues[] = { "i1", "g1", "i11", "i12", "i13", "i2", "g2",
124 "i21", "i22", "i23", "i3", NULL }; 125 "i21", "i22", "i23", "i3", NULL };
125 form->addSelectionResource ("val4", selres[0], selvalues); 126 form->addSelectionResource ("val4", selres[0], selvalues);
126 form->addSelectionResource ("val5", selres[1], selvalues); 127 form->addSelectionResource ("val5", selres[1], selvalues);
127 form->addButtonResource ("button", buttonres, "Run!"); 128 form->addButtonResource ("button", buttonres, "Run!");
128 form->addButtonResource ("cbutton", cbuttonres, "cbuttonval"); 129 form->addButtonResource ("cbutton", cbuttonres, "cbuttonval");
206 selres[i]->addItem("item 1/1", true, false); 207 selres[i]->addItem("item 1/1", true, false);
207 selres[i]->addItem("item 1/2", true, true); 208 selres[i]->addItem("item 1/2", true, true);
208 selres[i]->addItem("item 1/3", false, false); 209 selres[i]->addItem("item 1/3", false, false);
209 selres[i]->popGroup(); 210 selres[i]->popGroup();
210 211
211 selres[i]->addItem("item 2", true, i == 1); 212 selres[i]->addItem("item 2", false, i == 1);
212 213
213 selres[i]->pushGroup("group 2", false); 214 selres[i]->pushGroup("group 2", true);
214 selres[i]->addItem("item 2/1", true, false); 215 selres[i]->addItem("item 2/1", true, false);
215 selres[i]->addItem("item 2/2", true, false); 216 selres[i]->addItem("item 2/2", true, false);
216 selres[i]->addItem("item 2/3", false, false); 217 selres[i]->addItem("item 2/3", false, false);
217 selres[i]->popGroup(); 218 selres[i]->popGroup();
218 219