.TH gs 3erl "gs 1.6.2" "Ericsson AB" "Erlang Module Definition" .SH NAME gs \- The Graphics System for Erlang. .SH DESCRIPTION .LP .RS -4 .B Warning: .RE GS is not recommended for use in new applications\&. Instead we recommend WX for applications that need a graphical user interface\&. .LP GS is deprecated and will be removed in the 18\&.0 release\&. .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 .LP Types: .RS 3 GSOBj = gsobj() .br Options = [Option] | Option .br Option = {Key,Value} .br .RE .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 .LP Types: .RS 3 ObjType = atom() .br Parent = gsobj() .br Name = atom() .br Options = [Option] | Option .br Option = {Key,Value} .br .RE .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 .LP Types: .RS 3 Parent = gsobj() .br Tree = [Object] .br Object = {ObjType,Options} | {ObjType,Options,Tree} | {ObjType,Name,Options,Tree} .br .RE .RE .RS .LP Creates a hierarchy of graphical objects\&. .RE .LP .B destroy(GSObj) -> void() .br .RS .LP Types: .RS 3 GSObj = gsobj() .br .RE .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 .LP Types: .RS 3 GSObj = gsobj() .br Key = atom() .br Value = term() .br .RE .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