static void SavePolarShape(SubForm &form, PolarShape &shape) { PolarShapeEditWidget &widget = GetShapeEditor(form); bool changed = false, require_restart = false; widget.Save(changed, require_restart); shape = widget.GetPolarShape(); }
static bool SavePolarShape(SubForm &form, PolarShape &shape) { PolarShapeEditWidget &widget = GetShapeEditor(form); bool changed = false, require_restart = false; if (!widget.Save(changed, require_restart)) return false; shape = widget.GetPolarShape(); return true; }
static void UpdateInvalidLabel() { PolarShapeEditWidget &widget = GetShapeEditor(*dialog); bool changed = false, require_restart = false; bool valid = widget.Save(changed, require_restart) && widget.GetPolarShape().IsValid(); bool visible = !valid; WndFrame *label = ((WndFrame *)dialog->FindByName(_T("InvalidLabel"))); assert(label != NULL); label->SetVisible(visible); }
bool PlanePolarWidget::Save(bool &_changed) { bool changed = false; PolarShapeEditWidget &widget = GetShapeEditor(); if (widget.Save(changed)) { if (widget.GetPolarShape().IsValid()) plane.polar_shape = widget.GetPolarShape(); } changed |= SaveValue(REFERENCE_MASS, plane.reference_mass); changed |= SaveValue(DRY_MASS, plane.dry_mass); _changed |= changed; return true; }
void PlanePolarWidget::UpdateInvalidLabel() { PolarShapeEditWidget &widget = GetShapeEditor(); bool changed = false; bool valid = widget.Save(changed) && widget.GetPolarShape().IsValid(); bool visible = !valid; SetRowVisible(INVALID, visible); if (visible) { TextWidget &widget = (TextWidget &)GetRowWidget(INVALID); widget.SetText(_("Invalid")); widget.SetColor(COLOR_RED); } }
void LoadPolarShape(const PolarShape &shape) { GetShapeEditor().SetPolarShape(shape); }
static void LoadPolarShape(SubForm &form, const PolarShape &shape) { GetShapeEditor(form).SetPolarShape(shape); }