1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <IFSelect_ModifEditForm.ixx>
16 IFSelect_ModifEditForm::IFSelect_ModifEditForm
17 (const Handle(IFSelect_EditForm)& editform)
18 : IFSelect_Modifier (Standard_False) { theedit = editform; }
20 Handle(IFSelect_EditForm) IFSelect_ModifEditForm::EditForm () const
24 void IFSelect_ModifEditForm::Perform
25 (IFSelect_ContextModif& ctx,
26 const Handle(Interface_InterfaceModel)& target,
27 const Handle(Interface_Protocol)& /*protocol*/,
28 Interface_CopyTool& /*TC*/) const
30 for (ctx.Start(); ctx.More(); ctx.Next()) {
31 Standard_Boolean done = theedit->ApplyData(ctx.ValueResult(),target);
32 if (done) ctx.Trace();
33 else ctx.AddWarning (ctx.ValueResult(),"EditForm could not be applied");
37 TCollection_AsciiString IFSelect_ModifEditForm::Label () const
39 Standard_CString editlab = theedit->Label();
40 TCollection_AsciiString lab ("Apply EditForm");
41 if (editlab && editlab[0] != '\0') {
42 lab.AssignCat (" : ");
43 lab.AssignCat (editlab);