File indexing completed on 2026-09-28 09:20:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _IFSelect_Editor_HeaderFile
0018 #define _IFSelect_Editor_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <Standard_Integer.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <TCollection_AsciiString.hxx>
0027 #include <IFSelect_EditValue.hxx>
0028 #include <TCollection_HAsciiString.hxx>
0029 #include <NCollection_Sequence.hxx>
0030 #include <NCollection_HSequence.hxx>
0031 #include <NCollection_DataMap.hxx>
0032 class Interface_TypedValue;
0033 class IFSelect_EditForm;
0034 class TCollection_HAsciiString;
0035 class IFSelect_ListEditor;
0036 class Interface_InterfaceModel;
0037
0038
0039
0040
0041
0042
0043
0044 class IFSelect_Editor : public Standard_Transient
0045 {
0046
0047 public:
0048
0049
0050 Standard_EXPORT void SetValue(const int num,
0051 const occ::handle<Interface_TypedValue>& typval,
0052 const char* const shortname = "",
0053 const IFSelect_EditValue accessmode = IFSelect_Editable);
0054
0055
0056
0057
0058
0059 Standard_EXPORT void SetList(const int num, const int max = 0);
0060
0061
0062 Standard_EXPORT int NbValues() const;
0063
0064
0065 Standard_EXPORT occ::handle<Interface_TypedValue> TypedValue(const int num) const;
0066
0067
0068 Standard_EXPORT bool IsList(const int num) const;
0069
0070
0071
0072
0073 Standard_EXPORT int MaxList(const int num) const;
0074
0075
0076
0077 Standard_EXPORT const char* Name(const int num, const bool isshort = false) const;
0078
0079
0080 Standard_EXPORT IFSelect_EditValue EditMode(const int num) const;
0081
0082
0083
0084 Standard_EXPORT int NameNumber(const char* const name) const;
0085
0086 Standard_EXPORT void PrintNames(Standard_OStream& S) const;
0087
0088 Standard_EXPORT void PrintDefs(Standard_OStream& S, const bool labels = false) const;
0089
0090
0091
0092
0093
0094 Standard_EXPORT int MaxNameLength(const int what) const;
0095
0096
0097 Standard_EXPORT virtual TCollection_AsciiString Label() const = 0;
0098
0099
0100
0101 Standard_EXPORT virtual occ::handle<IFSelect_EditForm> Form(const bool readonly,
0102 const bool undoable = true) const;
0103
0104
0105
0106 Standard_EXPORT virtual bool Recognize(const occ::handle<IFSelect_EditForm>& form) const = 0;
0107
0108
0109
0110 Standard_EXPORT virtual occ::handle<TCollection_HAsciiString> StringValue(
0111 const occ::handle<IFSelect_EditForm>& form,
0112 const int num) const = 0;
0113
0114
0115
0116
0117 Standard_EXPORT virtual occ::handle<IFSelect_ListEditor> ListEditor(const int num) const;
0118
0119
0120
0121
0122
0123 Standard_EXPORT virtual occ::handle<NCollection_HSequence<occ::handle<TCollection_HAsciiString>>>
0124 ListValue(const occ::handle<IFSelect_EditForm>& form, const int num) const;
0125
0126
0127
0128
0129
0130
0131 Standard_EXPORT virtual bool Load(const occ::handle<IFSelect_EditForm>& form,
0132 const occ::handle<Standard_Transient>& ent,
0133 const occ::handle<Interface_InterfaceModel>& model) const = 0;
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144 Standard_EXPORT virtual bool Update(const occ::handle<IFSelect_EditForm>& form,
0145 const int num,
0146 const occ::handle<TCollection_HAsciiString>& newval,
0147 const bool enforce) const;
0148
0149
0150 Standard_EXPORT virtual bool UpdateList(
0151 const occ::handle<IFSelect_EditForm>& form,
0152 const int num,
0153 const occ::handle<NCollection_HSequence<occ::handle<TCollection_HAsciiString>>>& newlist,
0154 const bool enforce) const;
0155
0156
0157
0158
0159
0160
0161 Standard_EXPORT virtual bool Apply(const occ::handle<IFSelect_EditForm>& form,
0162 const occ::handle<Standard_Transient>& ent,
0163 const occ::handle<Interface_InterfaceModel>& model) const = 0;
0164
0165 DEFINE_STANDARD_RTTIEXT(IFSelect_Editor, Standard_Transient)
0166
0167 protected:
0168
0169
0170
0171 Standard_EXPORT IFSelect_Editor(const int nbval);
0172
0173
0174
0175
0176 Standard_EXPORT void SetNbValues(const int nbval);
0177
0178 private:
0179 int thenbval;
0180 int themaxsh;
0181 int themaxco;
0182 int themaxla;
0183 NCollection_DataMap<TCollection_AsciiString, int> thenames;
0184 NCollection_Array1<occ::handle<Standard_Transient>> thevalues;
0185 NCollection_Array1<TCollection_AsciiString> theshorts;
0186 NCollection_Array1<int> themodes;
0187 NCollection_Array1<int> thelists;
0188 };
0189
0190 #endif