/// @brief Update work style void DialogStyleEditor::UpdateWorkStyle() { work->font = FontName->GetValue(); FontSize->GetValue().ToDouble(&(work->fontsize)); ScaleX->GetValue().ToDouble(&(work->scalex)); ScaleY->GetValue().ToDouble(&(work->scaley)); long templ = 0; Encoding->GetValue().BeforeFirst('-').ToLong(&templ); work->encoding = templ; Angle->GetValue().ToDouble(&(work->angle)); Spacing->GetValue().ToDouble(&(work->spacing)); work->borderstyle = OutlineType->IsChecked() ? 3 : 1; Shadow->GetValue().ToDouble(&(work->shadow_w)); Outline->GetValue().ToDouble(&(work->outline_w)); work->alignment = ControlToAlign(Alignment->GetSelection()); for (size_t i = 0; i < 3; ++i) work->Margin[i] = margin[i]->GetValue(); work->primary.a = colorAlpha[0]->GetValue(); work->secondary.a = colorAlpha[1]->GetValue(); work->outline.a = colorAlpha[2]->GetValue(); work->shadow.a = colorAlpha[3]->GetValue(); work->bold = BoxBold->IsChecked(); work->italic = BoxItalic->IsChecked(); work->underline = BoxUnderline->IsChecked(); work->strikeout = BoxStrikeout->IsChecked(); }
void DialogStyleEditor::UpdateWorkStyle() { updating = true; TransferDataFromWindow(); updating = false; work->font = from_wx(FontName->GetValue()); long templ = 0; Encoding->GetValue().BeforeFirst('-').ToLong(&templ); work->encoding = templ; work->borderstyle = OutlineType->IsChecked() ? 3 : 1; work->alignment = ControlToAlign(Alignment->GetSelection()); for (size_t i = 0; i < 3; ++i) work->Margin[i] = margin[i]->GetValue(); work->bold = BoxBold->IsChecked(); work->italic = BoxItalic->IsChecked(); work->underline = BoxUnderline->IsChecked(); work->strikeout = BoxStrikeout->IsChecked(); }