Help:Adding Function Reference

From Vectorworks Developer
Jump to navigation Jump to search

.Help:Contents|Help ..Help:Contents|General Help ..Help:Adding Article|Adding Article ..Help:Adding Function Reference|Adding Function Reference ..Help:Adding General Function Reference|Adding General Function Reference ..Help:Adding VCOM Function Reference|Adding VCOM Function Reference ..Help:Adding VectorScript Function Reference|Adding VectorScript Function Reference

Naming

The actual type of the function reference page (is it VectorScript or SDK or VCOM) is determined by the category in which the page exist.

The category is represented in the name before the semi-colon in the name.

For example "SDK:Something" is a page "Something" in category "SDK".

IMPORTANT Be careful when naming pages. The name is very important!

See Help:Contents#Page Name

Function Reference Page

Function reference page in difference of Article Page is a specific page recognized by the Advanced Search

What makes a page Function Reference Page is that the entire contents of the page is enclosed in <vwDoc> tag:

<vwDoc>
  ...
  page contents
  ...
</vwDoc>

[[Category:SDK:_page_category_plus_name]]

Function Reference Page Contents

Depending on the type of the function reference page there are the following page contents:

The difference of the contents is in different tags used to represent different aspects of the pages.

Those tags also help in overall formatting of the page.

Note If you put test outside predefined tags within 'vwDoc', that text will not be displayed in the page.

Page Tags

There are all the page tags that can be used. Here is a list of all tags with short description. See 'Function Reference Page Contents' above for more detailed information on different function reference page types.

As you can see above every tag there is a line of '-' characters. This is to visually separate the tags when looking at the page source.

If a tag contents is empty, event though the tag exist in the page, the section created by this tag will not be created.

It is good idea to put all necessary tags for the page types, regardless that they are empty. This will not affect the appearance of the page, since those tags will be hidden, but it will simplify future extending of the page.

Description

This tag provides description section of a function or interface.

-----------------------------------------------------------------------------------------------------------
<desc>
   ... the custom description text ...
</desc>

Definition

Definition of the function. Usually this tag contains <funcDef> tag. See Help:Contents#Function Definitions.

-----------------------------------------------------------------------------------------------------------
<def>
   ... the custom definition text ...
</def>

Interface Definition

Defines interface. Normally inside the interface tag there is <code> block to show the actual C++ code that defines the interface. See Help:Contents#Code blocks

-----------------------------------------------------------------------------------------------------------
<interface>
<code lang="cpp">
   .. interface definition C++ code ...
</code>
</interface>

Members of Interface

Block defining the members of an interface. Usually inside there is a list table with two elements.

The list table's first element is a link to the page describing that particular function. The second element is short information of the function.

See Help:Adding VCOM Function Reference.

-----------------------------------------------------------------------------------------------------------
<members>
<lineList ident=1>
<line>
[[link to member function|TheMemberFunction]]
Information on member function
</line>
</members>

Parameters

Block defining a function parameters. Usually inside there is a list table with three elements.

The list table's first element is the name of the parameter.

The second element of the table is the type of the parameter.

And the third one is information about the parameter.

-----------------------------------------------------------------------------------------------------------
<params>
<lineList ident=1>
<line>
objectHd
HANDLE
Handle to object.
</line>
</lineList>
</params>


Return Value

Defines section that explains the return value of the function.

-----------------------------------------------------------------------------------------------------------
<return>
 ... your return information here ...
</return>

Remarks

Defines section that puts remarks for the function reference page.

-----------------------------------------------------------------------------------------------------------
<remark>
  ... your remarks here ...
</remark>

Sample

Defines section providing sample in the function reference page.

-----------------------------------------------------------------------------------------------------------
<sample>
  ... your sample here ...
</sample>

Version

Defines section for providing version information.

-----------------------------------------------------------------------------------------------------------
<version>
  ... your version information here ...
</version>

See Also

Defines section for providing related pages to this function reference page.

-----------------------------------------------------------------------------------------------------------
<seeAlso>
  ... your additional link here ...
</seeAlso>


See Also