|
Open CASCADE Technology
6.7.1
|
An Editor defines a set of values and a way to edit them, on
an entity or on the model (e.g. on its header)
Each Value is controlled by a TypedValue, with a number (it is
an Integer) and a name under two forms (complete and short)
and an edit mode
More...
#include <IFSelect_Editor.hxx>

Public Member Functions | |
| void | SetValue (const Standard_Integer num, const Handle< Interface_TypedValue > &typval, const Standard_CString shortname="", const IFSelect_EditValue accessmode=IFSelect_Editable) |
| Sets a Typed Value for a given ident and short name, with an Edit Mode More... | |
| void | SetList (const Standard_Integer num, const Standard_Integer max=0) |
| Sets a parameter to be a List max < 0 : not for a list (set when starting) max = 0 : list with no length limit (default for SetList) max > 0 : list limited to <max> items More... | |
| Standard_Integer | NbValues () const |
| Returns the count of Typed Values More... | |
| Handle_Interface_TypedValue | TypedValue (const Standard_Integer num) const |
| Returns a Typed Value from its ident More... | |
| Standard_Boolean | IsList (const Standard_Integer num) const |
| Tells if a parameter is a list More... | |
| Standard_Integer | MaxList (const Standard_Integer num) const |
| Returns max length allowed for a list = 0 means : list with no limit < 0 means : not a list More... | |
| Standard_CString | Name (const Standard_Integer num, const Standard_Boolean isshort=Standard_False) const |
| Returns the name of a Value (complete or short) from its ident Short Name can be empty More... | |
| IFSelect_EditValue | EditMode (const Standard_Integer num) const |
| Returns the edit mode of a Value More... | |
| Standard_Integer | NameNumber (const Standard_CString name) const |
| Returns the number (ident) of a Value, from its name, short or complete. If not found, returns 0 More... | |
| void | PrintNames (const Handle< Message_Messenger > &S) const |
| void | PrintDefs (const Handle< Message_Messenger > &S, const Standard_Boolean labels=Standard_False) const |
| Standard_Integer | MaxNameLength (const Standard_Integer what) const |
| Returns the MaxLength of, according to what : <what> = -1 : length of short names <what> = 0 : length of complete names <what> = 1 : length of values labels More... | |
| virtual TCollection_AsciiString | Label () const =0 |
| Returns the specific label More... | |
| virtual Handle_IFSelect_EditForm | Form (const Standard_Boolean readonly, const Standard_Boolean undoable=Standard_True) const |
| Builds and Returns an EditForm, empty (no data yet) Can be redefined to return a specific type of EditForm More... | |
| virtual Standard_Boolean | Recognize (const Handle< IFSelect_EditForm > &form) const =0 |
| Tells if this Editor can work on this EditForm and its content (model, entity ?) More... | |
| virtual Handle_TCollection_HAsciiString | StringValue (const Handle< IFSelect_EditForm > &form, const Standard_Integer num) const =0 |
| Returns the value of an EditForm, for a given item (if not a list. for a list, a Null String may be returned) More... | |
| virtual Handle_IFSelect_ListEditor | ListEditor (const Standard_Integer num) const |
| Returns a ListEditor for a parameter which is a List Default returns a basic ListEditor for a List, a Null Handle if <num> is not for a List. Can be redefined More... | |
| virtual Handle_TColStd_HSequenceOfHAsciiString | ListValue (const Handle< IFSelect_EditForm > &form, const Standard_Integer num) const |
| Returns the value of an EditForm as a List, for a given item If not a list, a Null Handle should be returned Default returns a Null Handle, because many Editors have no list to edit. To be redefined as required More... | |
| virtual Standard_Boolean | Load (const Handle< IFSelect_EditForm > &form, const Handle< Standard_Transient > &ent, const Handle< Interface_InterfaceModel > &model) const =0 |
| Loads original values from some data, to an EditForm Remark: <ent> may be Null, this means all <model> is concerned Also <model> may be Null, if no context applies for <ent> And both <ent> and <model> may be Null, for a full static editor More... | |
| virtual Standard_Boolean | Update (const Handle< IFSelect_EditForm > &form, const Standard_Integer num, const Handle< TCollection_HAsciiString > &newval, const Standard_Boolean enforce) const |
Updates the EditForm when a parameter is modified <br>
I.E. default does nothing, can be redefined, as follows : <br>
Returns True when done (even if does nothing), False in case <br>
of refuse (for instance, if the new value is not suitable) <br>
<num> is the rank of the parameter for the EDITOR itself <br>
<enforce> True means that protected parameters can be touched <br>
| |
| virtual Standard_Boolean | UpdateList (const Handle< IFSelect_EditForm > &form, const Standard_Integer num, const Handle< TColStd_HSequenceOfHAsciiString > &newlist, const Standard_Boolean enforce) const |
| Acts as Update, but when the value is a list More... | |
| virtual Standard_Boolean | Apply (const Handle< IFSelect_EditForm > &form, const Handle< Standard_Transient > &ent, const Handle< Interface_InterfaceModel > &model) const =0 |
| Applies modified values of the EditForm with some data Remark: <ent> may be Null, this means all <model> is concerned Also <model> may be Null, if no context applies for <ent> And both <ent> and <model> may be Null, for a full static editor More... | |
Public Member Functions inherited from MMgt_TShared | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. More... | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. More... | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. More... | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More... | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. More... | |
| virtual void | ShallowDump (Standard_OStream &) const |
| virtual const Handle_Standard_Type & | DynamicType () const |
| Returns a type information object about this object. More... | |
| Standard_Boolean | IsInstance (const Handle_Standard_Type &theType) const |
| Returns a true value if this is an instance of Type. More... | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More... | |
| Standard_Boolean | IsKind (const Handle_Standard_Type &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| virtual Handle_Standard_Transient | This () const |
| Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
| Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More... | |
Protected Member Functions | |
| IFSelect_Editor (const Standard_Integer nbval) | |
| Prepares the list of Typed Values (gives its count) This count can be tuned later, to a LOWER value, this allows to initialize with a "maximum reservation" then cut the extra More... | |
| void | SetNbValues (const Standard_Integer nbval) |
| Adjusts the true count of values. It can be LOWER or equal to the initial size (which then acts as a reservation), but never greater More... | |
An Editor defines a set of values and a way to edit them, on
an entity or on the model (e.g. on its header)
Each Value is controlled by a TypedValue, with a number (it is
an Integer) and a name under two forms (complete and short)
and an edit mode
|
protected |
Prepares the list of Typed Values (gives its count)
This count can be tuned later, to a LOWER value, this allows
to initialize with a "maximum reservation" then cut the extra
|
pure virtual |
Applies modified values of the EditForm with some data
Remark: <ent> may be Null, this means all <model> is concerned
Also <model> may be Null, if no context applies for <ent>
And both <ent> and <model> may be Null, for a full static
editor
Implemented in IFSelect_ParamEditor, IGESSelect_EditDirPart, IGESSelect_EditHeader, STEPEdit_EditContext, STEPEdit_EditSDR, and APIHeaderSection_EditHeader.
| IFSelect_EditValue IFSelect_Editor::EditMode | ( | const Standard_Integer | num | ) | const |
Returns the edit mode of a Value
|
virtual |
Builds and Returns an EditForm, empty (no data yet)
Can be redefined to return a specific type of EditForm
| Standard_Boolean IFSelect_Editor::IsList | ( | const Standard_Integer | num | ) | const |
Tells if a parameter is a list
|
pure virtual |
Returns the specific label
Implemented in IFSelect_ParamEditor, STEPEdit_EditContext, STEPEdit_EditSDR, IGESSelect_EditDirPart, IGESSelect_EditHeader, and APIHeaderSection_EditHeader.
|
virtual |
Returns a ListEditor for a parameter which is a List
Default returns a basic ListEditor for a List, a Null Handle
if <num> is not for a List. Can be redefined
|
virtual |
Returns the value of an EditForm as a List, for a given item
If not a list, a Null Handle should be returned
Default returns a Null Handle, because many Editors have
no list to edit. To be redefined as required
|
pure virtual |
Loads original values from some data, to an EditForm
Remark: <ent> may be Null, this means all <model> is concerned
Also <model> may be Null, if no context applies for <ent>
And both <ent> and <model> may be Null, for a full static
editor
Implemented in IFSelect_ParamEditor, STEPEdit_EditContext, STEPEdit_EditSDR, APIHeaderSection_EditHeader, IGESSelect_EditDirPart, and IGESSelect_EditHeader.
| Standard_Integer IFSelect_Editor::MaxList | ( | const Standard_Integer | num | ) | const |
Returns max length allowed for a list
= 0 means : list with no limit
< 0 means : not a list
| Standard_Integer IFSelect_Editor::MaxNameLength | ( | const Standard_Integer | what | ) | const |
Returns the MaxLength of, according to what :
<what> = -1 : length of short names
<what> = 0 : length of complete names
<what> = 1 : length of values labels
| Standard_CString IFSelect_Editor::Name | ( | const Standard_Integer | num, |
| const Standard_Boolean | isshort = Standard_False |
||
| ) | const |
Returns the name of a Value (complete or short) from its ident
Short Name can be empty
| Standard_Integer IFSelect_Editor::NameNumber | ( | const Standard_CString | name | ) | const |
Returns the number (ident) of a Value, from its name, short or
complete. If not found, returns 0
| Standard_Integer IFSelect_Editor::NbValues | ( | ) | const |
Returns the count of Typed Values
| void IFSelect_Editor::PrintDefs | ( | const Handle< Message_Messenger > & | S, |
| const Standard_Boolean | labels = Standard_False |
||
| ) | const |
| void IFSelect_Editor::PrintNames | ( | const Handle< Message_Messenger > & | S | ) | const |
|
pure virtual |
Tells if this Editor can work on this EditForm and its content
(model, entity ?)
Implemented in IFSelect_ParamEditor, STEPEdit_EditContext, STEPEdit_EditSDR, IGESSelect_EditDirPart, IGESSelect_EditHeader, and APIHeaderSection_EditHeader.
| void IFSelect_Editor::SetList | ( | const Standard_Integer | num, |
| const Standard_Integer | max = 0 |
||
| ) |
Sets a parameter to be a List
max < 0 : not for a list (set when starting)
max = 0 : list with no length limit (default for SetList)
max > 0 : list limited to <max> items
|
protected |
Adjusts the true count of values. It can be LOWER or equal to
the initial size (which then acts as a reservation), but never
greater
| void IFSelect_Editor::SetValue | ( | const Standard_Integer | num, |
| const Handle< Interface_TypedValue > & | typval, | ||
| const Standard_CString | shortname = "", |
||
| const IFSelect_EditValue | accessmode = IFSelect_Editable |
||
| ) |
Sets a Typed Value for a given ident and short name, with an
Edit Mode
|
pure virtual |
Returns the value of an EditForm, for a given item
(if not a list. for a list, a Null String may be returned)
Implemented in IFSelect_ParamEditor, STEPEdit_EditContext, STEPEdit_EditSDR, IGESSelect_EditDirPart, IGESSelect_EditHeader, and APIHeaderSection_EditHeader.
| Handle_Interface_TypedValue IFSelect_Editor::TypedValue | ( | const Standard_Integer | num | ) | const |
Returns a Typed Value from its ident
|
virtual |
Updates the EditForm when a parameter is modified <br>
I.E. default does nothing, can be redefined, as follows : <br>
Returns True when done (even if does nothing), False in case <br>
of refuse (for instance, if the new value is not suitable) <br>
<num> is the rank of the parameter for the EDITOR itself <br>
<enforce> True means that protected parameters can be touched <br>
If a parameter commands the value of other ones, when it is
modified, it is necessary to touch them by Touch from EditForm
Reimplemented in IGESSelect_EditDirPart, and IGESSelect_EditHeader.
|
virtual |
Acts as Update, but when the value is a list
1.8.5