aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs/doc/src/gs.xml
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
committerErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
commit84adefa331c4159d432d22840663c38f155cd4c1 (patch)
treebff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/gs/doc/src/gs.xml
downloadotp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz
otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2
otp-84adefa331c4159d432d22840663c38f155cd4c1.zip
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/gs/doc/src/gs.xml')
-rw-r--r--lib/gs/doc/src/gs.xml147
1 files changed, 147 insertions, 0 deletions
diff --git a/lib/gs/doc/src/gs.xml b/lib/gs/doc/src/gs.xml
new file mode 100644
index 0000000000..b1c7e505dc
--- /dev/null
+++ b/lib/gs/doc/src/gs.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2000</year>
+ <year>2007</year>
+ <holder>Ericsson AB, All Rights Reserved</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ The Initial Developer of the Original Code is Ericsson AB.
+ </legalnotice>
+
+ <title>gs</title>
+ <prepared>Gunilla Hugosson</prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <module>gs</module>
+ <modulesummary>The Graphics System for Erlang.</modulesummary>
+ <description>
+ <p>The Graphics System, GS, is easy to learn and
+ designed to be portable to many different platforms.</p>
+ <p>In the description below, the type <c><![CDATA[gsobj()]]></c> denotes a
+ reference to a graphical object created with GS. Such a reference
+ is either a GS object identifier or the name of the object (an atom),
+ if such a name exists.
+ The functions all return the specified values or <c><![CDATA[{error,Reason}]]></c>
+ if an error occurs.</p>
+ <p>Please refer to the GS User's Guide for a description of
+ the different object types and possible options.</p>
+ </description>
+ <funcs>
+ <func>
+ <name>config(GSObj, Options) -> ok</name>
+ <fsummary>Configure a graphical object.</fsummary>
+ <type>
+ <v>GSOBj = gsobj()</v>
+ <v>Options = [Option] | Option</v>
+ <v>&nbsp;Option = {Key,Value}</v>
+ </type>
+ <desc>
+ <p>Configures a graphical object according to the specified
+ options.</p>
+ </desc>
+ </func>
+ <func>
+ <name>create(ObjType, Parent) -> ObjId</name>
+ <name>create(ObjType, Parent, Options) -> ObjId</name>
+ <name>create(ObjType, Name, Parent, Options) -> ObjId</name>
+ <fsummary>Create a new graphical object.</fsummary>
+ <type>
+ <v>ObjType = atom()</v>
+ <v>Parent = gsobj()</v>
+ <v>Name = atom()</v>
+ <v>Options = [Option] | Option</v>
+ <v>&nbsp;Option = {Key,Value}</v>
+ </type>
+ <desc>
+ <p>Creates a new graphical object of the specified type as a child
+ to the specified parent object. The object is configured according
+ to the options and its identifier is returned. If no options
+ are provided, default option values are used.</p>
+ <p>If a name is provided, this name can be used to reference
+ the object instead of the object identifier. The name is local
+ to the process which creates the object.</p>
+ <p>The following object types exist: <c><![CDATA[window | button | radiobutton | checkbutton | label | frame | entry | listbox | canvas | arc | image | line | oval | polygon | rectangle | text | menubar | menubutton | menu | menuitem | grid | gridline | editor | scale]]></c></p>
+ </desc>
+ </func>
+ <func>
+ <name>create_tree(Parent, Tree) -> ok</name>
+ <fsummary>Create a hierarchy of graphical objects.</fsummary>
+ <type>
+ <v>Parent = gsobj()</v>
+ <v>Tree = [Object]</v>
+ <v>&nbsp;Object = {ObjType,Options} | {ObjType,Options,Tree} | {ObjType,Name,Options,Tree}</v>
+ </type>
+ <desc>
+ <p>Creates a hierarchy of graphical objects.</p>
+ </desc>
+ </func>
+ <func>
+ <name>destroy(GSObj) -> void()</name>
+ <fsummary>Destroy a graphical object.</fsummary>
+ <type>
+ <v>GSObj = gsobj()</v>
+ </type>
+ <desc>
+ <p>Destroys a graphical object and all its children.</p>
+ </desc>
+ </func>
+ <func>
+ <name>ObjType(Parent)</name>
+ <name>ObjType(Parent, Options)</name>
+ <name>ObjType(Name, Parent, Options)</name>
+ <fsummary>Shorthand equivalents of <c><![CDATA[create]]></c>.</fsummary>
+ <desc>
+ <p>These functions are shorthand equivalents of <c><![CDATA[create/2]]></c>,
+ <c><![CDATA[create/3]]></c>, and <c><![CDATA[create/4]]></c>, respectively.</p>
+ </desc>
+ </func>
+ <func>
+ <name>read(GSObj, Key) -> Value</name>
+ <fsummary>Return the value of an object option.</fsummary>
+ <type>
+ <v>GSObj = gsobj()</v>
+ <v>Key = atom()</v>
+ <v>Value = term()</v>
+ </type>
+ <desc>
+ <p>Returns the value of an option key for the specified graphical
+ object.</p>
+ </desc>
+ </func>
+ <func>
+ <name>start() -> ObjId</name>
+ <fsummary>Start GS.</fsummary>
+ <desc>
+ <p>Starts GS, unless it is already started, and returns its object
+ identifier.</p>
+ </desc>
+ </func>
+ <func>
+ <name>stop() -> void()</name>
+ <fsummary>Stop GS.</fsummary>
+ <desc>
+ <p>Stops GS and closes all windows. This function is not the opposite
+ of <c><![CDATA[start/0]]></c> as it will cause <em>all</em> applications
+ to lose their GS objects.</p>
+ </desc>
+ </func>
+ </funcs>
+</erlref>
+