Difference between revisions of "API Component.Clone"

From Flowcode Help
Jump to navigationJump to search
(XML import of API auto-gen)
(XML import)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
<sidebar>API Contents</sidebar>
 
Clones an existing object to another position on the panel
 
Clones an existing object to another position on the panel
  
 +
<div style="width:25%; float:right" class="toc">
 +
====Class hierarchy====
 +
[[API Component|Component]]
 +
:[[API Component|Clone]]
 +
</div>
 +
__TOC__
  
===Parameters===
+
==Parameters==
''[[Variable types|HANDLE]] Source''
+
[[Variable Types|HANDLE]] ''Source''
 
:The object to copy
 
:The object to copy
  
''[[Variable types|HANDLE]] DestParent''
+
[[Variable Types|HANDLE]] ''DestParent''
 
:The parent to link the cloned object to
 
:The parent to link the cloned object to
  
''[[Variable types|HANDLE]] NewPosition''
+
[[Variable Types|HANDLE]] ''NewPosition''
 
:A position to move the object to
 
:A position to move the object to
  
===Return value===
 
[[Variable types|HANDLE]]
 
  
No additional information
+
==Return value==
 +
[[Variable Types|HANDLE]]
  
===Detailed description===
+
A handle to the newly created component, 0 if the call failed.
''No additional information''
 
  
===Examples===
+
 
====Calling in a calculation====
+
==Detailed description==
 +
This creates an identical copy of the object which may be inserted at any point in the component tree.
 +
 
 +
 
 +
The root object may not be cloned, but other to that any object (even a [[API Component.GetOriginal|definition]]) may be cloned.
 +
 
 +
 
 +
==Examples==
 +
===Calling in a calculation===
 
* Declare a variable 'result' of type HANDLE
 
* Declare a variable 'result' of type HANDLE
* Add to a calculation icon: <pre class="brush:[C]">result = ::Component.Clone(source, destparent, newposition)</pre>
+
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Clone(source, destparent, newposition)</pre>
 +
 
 +
''<span style="color:red;">No additional examples</span>''

Latest revision as of 15:57, 16 January 2014

<sidebar>API Contents</sidebar> Clones an existing object to another position on the panel

Class hierarchy

Component

Clone

Parameters

HANDLE Source

The object to copy

HANDLE DestParent

The parent to link the cloned object to

HANDLE NewPosition

A position to move the object to


Return value

HANDLE

A handle to the newly created component, 0 if the call failed.


Detailed description

This creates an identical copy of the object which may be inserted at any point in the component tree.


The root object may not be cloned, but other to that any object (even a definition) may be cloned.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Component.Clone(source, destparent, newposition)

No additional examples