Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:20:41

0001 // Created on: 1998-07-30
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IFSelect_ParamEditor_HeaderFile
0018 #define _IFSelect_ParamEditor_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TCollection_AsciiString.hxx>
0024 #include <IFSelect_Editor.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TCollection_HAsciiString.hxx>
0027 #include <NCollection_Sequence.hxx>
0028 #include <NCollection_HSequence.hxx>
0029 class Interface_TypedValue;
0030 class IFSelect_EditForm;
0031 class TCollection_HAsciiString;
0032 class Standard_Transient;
0033 class Interface_InterfaceModel;
0034 
0035 //! A ParamEditor gives access for edition to a list of TypedValue
0036 //! (i.e. of Static too)
0037 //! Its definition is made of the TypedValue to edit themselves,
0038 //! and can add some constants, which can then be displayed but
0039 //! not changed (for instance, system name, processor version ...)
0040 //!
0041 //! I.E. it gives a way of editing or at least displaying
0042 //! parameters as global
0043 class IFSelect_ParamEditor : public IFSelect_Editor
0044 {
0045 
0046 public:
0047   //! Creates a ParamEditor, empty, with a maximum count of params
0048   //! (default is 100)
0049   //! And a label, by default it will be "Param Editor"
0050   Standard_EXPORT IFSelect_ParamEditor(const int nbmax = 100, const char* const label = "");
0051 
0052   //! Adds a TypedValue
0053   //! By default, its short name equates its complete name, it can be made explicit
0054   Standard_EXPORT void AddValue(const occ::handle<Interface_TypedValue>& val,
0055                                 const char* const                        shortname = "");
0056 
0057   //! Adds a Constant Text, it will be Read Only
0058   //! By default, its long name equates its shortname
0059   Standard_EXPORT void AddConstantText(const char* const val,
0060                                        const char* const shortname,
0061                                        const char* const completename = "");
0062 
0063   Standard_EXPORT TCollection_AsciiString Label() const override;
0064 
0065   Standard_EXPORT bool Recognize(const occ::handle<IFSelect_EditForm>& form) const override;
0066 
0067   Standard_EXPORT occ::handle<TCollection_HAsciiString> StringValue(
0068     const occ::handle<IFSelect_EditForm>& form,
0069     const int                             num) const override;
0070 
0071   Standard_EXPORT bool Load(const occ::handle<IFSelect_EditForm>&        form,
0072                             const occ::handle<Standard_Transient>&       ent,
0073                             const occ::handle<Interface_InterfaceModel>& model) const override;
0074 
0075   Standard_EXPORT bool Apply(const occ::handle<IFSelect_EditForm>&        form,
0076                              const occ::handle<Standard_Transient>&       ent,
0077                              const occ::handle<Interface_InterfaceModel>& model) const override;
0078 
0079   //! Returns a ParamEditor to work on the Static Parameters of
0080   //! which names are listed in <list>
0081   //! Null Handle if <list> is null or empty
0082   Standard_EXPORT static occ::handle<IFSelect_ParamEditor> StaticEditor(
0083     const occ::handle<NCollection_HSequence<occ::handle<TCollection_HAsciiString>>>& list,
0084     const char* const                                                                label = "");
0085 
0086   DEFINE_STANDARD_RTTIEXT(IFSelect_ParamEditor, IFSelect_Editor)
0087 
0088 private:
0089   TCollection_AsciiString thelabel;
0090 };
0091 
0092 #endif // _IFSelect_ParamEditor_HeaderFile