File: gs.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (142 lines) | stat: -rw-r--r-- 2,991 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.TH gs 3 "gs  1.5.9" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
gs \- The Graphics System for Erlang\&.
.SH DESCRIPTION
.LP
The Graphics System, GS, is easy to learn and designed to be portable to many different platforms\&.
.LP
In the description below, the type \fIgsobj()\fR 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 \fI{error, Reason}\fR if an error occurs\&.
.LP
Please refer to the GS User\&'s Guide for a description of the different object types and possible options\&.

.SH EXPORTS
.LP
.B
config(GSObj, Options) -> ok
.br
.RS
.TP
Types
GSOBj = gsobj()
.br
Options = [Option] | Option
.br
Option = {Key, Value}
.br
.RE
.RS
.LP
Configures a graphical object according to the specified options\&.
.RE
.LP
.B
create(ObjType, Parent) -> ObjId
.br
.B
create(ObjType, Parent, Options) -> ObjId
.br
.B
create(ObjType, Name, Parent, Options) -> ObjId
.br
.RS
.TP
Types
ObjType = atom()
.br
Parent = gsobj()
.br
Name = atom()
.br
Options = [Option] | Option
.br
Option = {Key, Value}
.br
.RE
.RS
.LP
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\&.
.LP
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\&.
.LP
The following object types exist: \fIwindow | button | radiobutton | checkbutton | label | frame | entry | listbox | canvas | arc | image | line | oval | polygon | rectangle | text | menubar | menubutton | menu | menuitem | grid | gridline | editor | scale\fR
.RE
.LP
.B
create_tree(Parent, Tree) -> ok
.br
.RS
.TP
Types
Parent = gsobj()
.br
Tree = [Object]
.br
Object = {ObjType, Options} | {ObjType, Options, Tree} | {ObjType, Name, Options, Tree}
.br
.RE
.RS
.LP
Creates a hierarchy of graphical objects\&.
.RE
.LP
.B
destroy(GSObj) -> void()
.br
.RS
.TP
Types
GSObj = gsobj()
.br
.RE
.RS
.LP
Destroys a graphical object and all its children\&.
.RE
.LP
.B
ObjType(Parent)
.br
.B
ObjType(Parent, Options)
.br
.B
ObjType(Name, Parent, Options)
.br
.RS
.LP
These functions are shorthand equivalents of \fIcreate/2\fR, \fIcreate/3\fR, and \fIcreate/4\fR, respectively\&.
.RE
.LP
.B
read(GSObj, Key) -> Value
.br
.RS
.TP
Types
GSObj = gsobj()
.br
Key = atom()
.br
Value = term()
.br
.RE
.RS
.LP
Returns the value of an option key for the specified graphical object\&.
.RE
.LP
.B
start() -> ObjId
.br
.RS
.LP
Starts GS, unless it is already started, and returns its object identifier\&.
.RE
.LP
.B
stop() -> void()
.br
.RS
.LP
Stops GS and closes all windows\&. This function is not the opposite of \fIstart/0\fR as it will cause \fIall\fR applications to lose their GS objects\&.
.RE