Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:54

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 <TColStd_HSequenceOfHAsciiString.hxx>
0027 class Interface_TypedValue;
0028 class IFSelect_EditForm;
0029 class TCollection_HAsciiString;
0030 class Standard_Transient;
0031 class Interface_InterfaceModel;
0032 
0033 class IFSelect_ParamEditor;
0034 DEFINE_STANDARD_HANDLE(IFSelect_ParamEditor, IFSelect_Editor)
0035 
0036 //! A ParamEditor gives access for edition to a list of TypedValue
0037 //! (i.e. of Static too)
0038 //! Its definition is made of the TypedValue to edit themselves,
0039 //! and can add some constants, which can then be displayed but
0040 //! not changed (for instance, system name, processor version ...)
0041 //!
0042 //! I.E. it gives a way of editing or at least displaying
0043 //! parameters as global
0044 class IFSelect_ParamEditor : public IFSelect_Editor
0045 {
0046 
0047 public:
0048 
0049   //! Creates a ParamEditor, empty, with a maximum count of params
0050   //! (default is 100)
0051   //! And a label, by default it will be "Param Editor"
0052   Standard_EXPORT IFSelect_ParamEditor(const Standard_Integer nbmax = 100, const Standard_CString label = "");
0053 
0054   //! Adds a TypedValue
0055   //! By default, its short name equates its complete name, it can be made explicit
0056   Standard_EXPORT void AddValue (const Handle(Interface_TypedValue)& val,
0057                                  const Standard_CString shortname = "");
0058 
0059   //! Adds a Constant Text, it will be Read Only
0060   //! By default, its long name equates its shortname
0061   Standard_EXPORT void AddConstantText (const Standard_CString val, const Standard_CString shortname, const Standard_CString completename = "");
0062   
0063   Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
0064   
0065   Standard_EXPORT Standard_Boolean Recognize (const Handle(IFSelect_EditForm)& form) const Standard_OVERRIDE;
0066   
0067   Standard_EXPORT Handle(TCollection_HAsciiString) StringValue (const Handle(IFSelect_EditForm)& form, const Standard_Integer num) const Standard_OVERRIDE;
0068   
0069   Standard_EXPORT Standard_Boolean Load (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
0070   
0071   Standard_EXPORT Standard_Boolean Apply (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE;
0072   
0073   //! Returns a ParamEditor to work on the Static Parameters of
0074   //! which names are listed in <list>
0075   //! Null Handle if <list> is null or empty
0076   Standard_EXPORT static Handle(IFSelect_ParamEditor) StaticEditor (const Handle(TColStd_HSequenceOfHAsciiString)& list, const Standard_CString label = "");
0077 
0078   DEFINE_STANDARD_RTTIEXT(IFSelect_ParamEditor,IFSelect_Editor)
0079 
0080 private:
0081 
0082   TCollection_AsciiString thelabel;
0083 
0084 };
0085 
0086 #endif // _IFSelect_ParamEditor_HeaderFile