File indexing completed on 2025-01-18 10:03:53
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 <TColStd_Array1OfTransient.hxx>
0025 #include <TColStd_Array1OfAsciiString.hxx>
0026 #include <TColStd_Array1OfInteger.hxx>
0027 #include <Standard_Transient.hxx>
0028 #include <IFSelect_EditValue.hxx>
0029 #include <TColStd_HSequenceOfHAsciiString.hxx>
0030 #include <TCollection_AsciiString.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 class IFSelect_Editor;
0040 DEFINE_STANDARD_HANDLE(IFSelect_Editor, Standard_Transient)
0041
0042
0043
0044
0045
0046
0047
0048 class IFSelect_Editor : public Standard_Transient
0049 {
0050
0051 public:
0052
0053
0054
0055
0056 Standard_EXPORT void SetValue (const Standard_Integer num, const Handle(Interface_TypedValue)& typval, const Standard_CString shortname = "", const IFSelect_EditValue accessmode = IFSelect_Editable);
0057
0058
0059
0060
0061
0062 Standard_EXPORT void SetList (const Standard_Integer num, const Standard_Integer max = 0);
0063
0064
0065 Standard_EXPORT Standard_Integer NbValues() const;
0066
0067
0068 Standard_EXPORT Handle(Interface_TypedValue) TypedValue (const Standard_Integer num) const;
0069
0070
0071 Standard_EXPORT Standard_Boolean IsList (const Standard_Integer num) const;
0072
0073
0074
0075
0076 Standard_EXPORT Standard_Integer MaxList (const Standard_Integer num) const;
0077
0078
0079
0080 Standard_EXPORT Standard_CString Name (const Standard_Integer num, const Standard_Boolean isshort = Standard_False) const;
0081
0082
0083 Standard_EXPORT IFSelect_EditValue EditMode (const Standard_Integer num) const;
0084
0085
0086
0087 Standard_EXPORT Standard_Integer NameNumber (const Standard_CString name) const;
0088
0089 Standard_EXPORT void PrintNames (Standard_OStream& S) const;
0090
0091 Standard_EXPORT void PrintDefs (Standard_OStream& S, const Standard_Boolean labels = Standard_False) const;
0092
0093
0094
0095
0096
0097 Standard_EXPORT Standard_Integer MaxNameLength (const Standard_Integer what) const;
0098
0099
0100 Standard_EXPORT virtual TCollection_AsciiString Label() const = 0;
0101
0102
0103
0104 Standard_EXPORT virtual Handle(IFSelect_EditForm) Form (const Standard_Boolean readonly, const Standard_Boolean undoable = Standard_True) const;
0105
0106
0107
0108 Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(IFSelect_EditForm)& form) const = 0;
0109
0110
0111
0112 Standard_EXPORT virtual Handle(TCollection_HAsciiString) StringValue (const Handle(IFSelect_EditForm)& form, const Standard_Integer num) const = 0;
0113
0114
0115
0116
0117 Standard_EXPORT virtual Handle(IFSelect_ListEditor) ListEditor (const Standard_Integer num) const;
0118
0119
0120
0121
0122
0123 Standard_EXPORT virtual Handle(TColStd_HSequenceOfHAsciiString) ListValue (const Handle(IFSelect_EditForm)& form, const Standard_Integer num) const;
0124
0125
0126
0127
0128
0129
0130 Standard_EXPORT virtual Standard_Boolean Load (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const = 0;
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141 Standard_EXPORT virtual Standard_Boolean Update (const Handle(IFSelect_EditForm)& form, const Standard_Integer num, const Handle(TCollection_HAsciiString)& newval, const Standard_Boolean enforce) const;
0142
0143
0144 Standard_EXPORT virtual Standard_Boolean UpdateList (const Handle(IFSelect_EditForm)& form, const Standard_Integer num, const Handle(TColStd_HSequenceOfHAsciiString)& newlist, const Standard_Boolean enforce) const;
0145
0146
0147
0148
0149
0150
0151 Standard_EXPORT virtual Standard_Boolean Apply (const Handle(IFSelect_EditForm)& form, const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const = 0;
0152
0153
0154
0155
0156 DEFINE_STANDARD_RTTIEXT(IFSelect_Editor,Standard_Transient)
0157
0158 protected:
0159
0160
0161
0162
0163
0164 Standard_EXPORT IFSelect_Editor(const Standard_Integer nbval);
0165
0166
0167
0168
0169 Standard_EXPORT void SetNbValues (const Standard_Integer nbval);
0170
0171
0172
0173 private:
0174
0175
0176 Standard_Integer thenbval;
0177 Standard_Integer themaxsh;
0178 Standard_Integer themaxco;
0179 Standard_Integer themaxla;
0180 NCollection_DataMap<TCollection_AsciiString, Standard_Integer> thenames;
0181 TColStd_Array1OfTransient thevalues;
0182 TColStd_Array1OfAsciiString theshorts;
0183 TColStd_Array1OfInteger themodes;
0184 TColStd_Array1OfInteger thelists;
0185
0186
0187 };
0188
0189
0190
0191
0192
0193
0194
0195 #endif