| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
wx._core.Object --+
|
wx._core.EvtHandler --+
|
wx._core.Window --+
|
wx._core.Control --+
|
wx._controls.TreeCtrl --+
|
FitTree
TreeCtrl designed to organize pdffit fits.
The root of the tree is hidden. Below that there are several levels
which are diagrammed below.
_ fit (*)
|
|____ phase (5)
|____ datset (*)
|____ calculation (*)
Fits are at the top level. Under fits there are phases, datasets, and
calculations (in that order).
It is required that the data for each node is a dictionary. In the 'type'
entry of this dictionary is the node type (fit, phase, dataset,
calculation). Fit items also have a 'cdata' entry in their tree item
dictionary. This is the control center data associated with this node's
branch.
Data members:
control -- The pdfguicontrol object that interfaces between the tree
and the pdffit2 engine. The tree is a mirror of the internal
structure of the control.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=TR_DEFAULT_STYLE,
Validator validator=DefaultValidator,
String name=TreeCtrlNameStr) -> TreeCtrl
|
Get the ids of the children of a given node.
|
Get a list of phase in branch. node is either the fit-root or a node in the fit-branch of interest. |
Get a list of datasets in branch. node is either the fit-root or a node in the fit-branch of interest. |
Get a list of calculations in branch. node is either the fit-root or a node in the fit-branch of interest. |
Get the node type. This is the "type" entry in the data dictionary of the node. |
Get the last phase child of the parent node. This method is helpful in placing datasets and phases into the fit tree. This method depends on the fact that phases are placed before datasets in the fit tree. |
Get the last dataset child of the fit node. If there is no last dataset node, this may return the last phase node. The purpose of getting this node is to know where to place another node, so the actual node type is not important. |
Get the number of phases in a branch. node -- A node in the branch, or the root of the branch. |
Get the number of datasets in a branch. node -- A node in the branch, or the root of the branch. |
Get the index if the node in its subtree. For fits the position is absolute within the tree. For phases, datasets, and calculations, the location is taken to be in reference to the other nodes of its type. This is designed to be compatible with the control center. |
Set the control center data associated with the node. This need only be called for 'fit' nodes. This is the "cdata" entry in the data dictionary of the node. It holds the object with which the right panel interfaces. For example, for a 'phase' node, it contains a Structure object. |
Get the control center data associated with a node. NOTE: The fit-root of a node holds this data. This method makes it convenient to retrieve it. |
Append a new fit tree to the end of the current fits.
fitname -- The name of the fit. This is incremented if it already
exists.
cdata -- Control data for the node. If cdata is None (default),
then the control is asked to create new data.
paste -- Whether or not the cdata is being pasted from another
node (default False).
Returns the id of the new node.
|
Add a new blank Phase to the tree as a child of node.
node -- The parent 'fit' node.
label -- The name of the new node.
insertafter -- The node after which to insert the new phase. If
insertafter is None (default) the new phase is
appended to the end of the phases in the subtree of
the parent node.
filename -- The file from which to load the structure. If this is
None (default), a new structure is created.
makedata -- Tells whether the control needs to make data for the
node (default True).
cdata -- Control data for the node. If cdata is None (default),
then it is assumed that the node already has data in the
control. See ExtendProjectTree and __InsertBranch for
examples of how this is used.
Phases are always placed before DataSets.
Raises:
FitTreeError if node is not a "fit" node.
FitTreeError if insertafter is not a "phase" node.
Returns the id of the new node.
|
Add a new DataSet to the tree as a child of fit.
node -- The parent node of the dataset. Must be 'fit' type.
label -- The label of the new node.
insertafter -- The node after which to insert the new dataset. If
insertafter is None (default) the new dataset is
appended to the end of the datasets in the subtree of
the parent node.
filename -- The name of the file from which to load the data.
makedata -- Tells whether the control needs to make data for the
node (default True). If True, cdata is ignored.
cdata -- Control data for the node. If False cdata is None
(default), then it is assumed that the node already has
data in the control. See ExtendProjectTree and
__InsertBranch for examples of how this is used.
DataSets are always placed after Phases.
Raises:
FitTreeError if node is not a "fit" node.
FitTreeError if insertafter is not a "dataset" node.
Returns the id of the new node.
|
Add a new DataSet to the tree as a child of fit.
node -- The parent node of the calculation. Must be 'fit' type.
label -- The label of the new node.
insertafter -- The node after which to insert the new calculation. If
insertafter is None (default) the new calculation is
appended to the end of the calculation in the subtree of
the parent node.
makedata -- Tells whether the control needs to make data for the
node (default True). If True, cdata is ignored.
cdata -- Control data for the node. If False cdata is None
(default), then it is assumed that the node already has
data in the control. See ExtendProjectTree and
__InsertBranch for examples of how this is used.
Calculations are always placed after datasets.
Raises:
FitTreeError if node is not a "fit" node.
FitTreeError if insertafter is not a "calculation" node.
Returns the id of the new node.
|
Make a copy of a tree branch. The branch is held in the system clipboard so it can be used in another instance of the fittree. |
Get the clipboard data. Returns the controldata in the clipboard, or None if the clipboard is empty or contains the wrong type of data. |
Paste the branch from the clipboard into tree at the given node.
A certain type of branch can only be copied to specific places.
fit - A fit can be pasted to anywhere. This does not overwrite
an existing node, but simply inserts the fit into the
last available slot.
phase - A phase can be pasted from anywhere. If pasted from a
fit, it is placed at the end of the phase section of
that node. If inserted from a dataset or a calculation,
it is placed at the end of the phase section.
dataset - A dataset can be pasted from anywhere. If pasted from a
fit, the dataset is appended at the end of the other
datasets. If pasted from a dataset, the pasted set is
inserted right after that one. If pasted from a phase,
it is placed at the beginning of the dataset section. If
pasted from a calculation, it is placed at the end of
the dataset section.
calculation - A calculation can be pasted to anywhere, but it appears
at the end of the calculation section of the tree. If
pasted from a calculation node, it is inserted after
that node.
Raises:
FitTreeError if the entrypoint and branch type are incompatible.
|
Instert control data into the tree.
cdata -- The control data that goes with the branch
entrypoint -- The subbranch (fit root) to paste into
label -- The label of the new node
insertafter -- A node after which to insert. If insertafter is None
(default), then the new node will be pasted after the
last node of the same type.
prepend -- Prepend to the beginning of the node group (default
False). insertafter takes prescedent over prepend.
Returns the newly inserted node.
|
Select all nodes of same type as passed node.
node -- Node whose type to select. If node is None (default), then
all fit nodes will be selected.
|
Extend the project tree from the treelist.
treelist -- A list of control data returned by
Oraganizer.organization()
clear -- Clear the tree before adding new nodes (default True)
paste -- Whether or not the cdata is being pasted from another
node (default False).
The treelist here is of the type returned from pdfguicontrol.load.
It is a list of fit lists with the following format.
node[0] -- fit object
node[1] -- list of (name, dataset) tuples
node[2] -- list of (name, phase) tuples
node[3] -- list of (name, calculation) tuples
Note that node[1] should be empty if the node is a calculation.
Returns the last insterted fit or calculation node
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Fri Apr 10 19:11:03 2009 | http://epydoc.sourceforge.net |