diff options
author | Björn Gustavsson <[email protected]> | 2016-06-27 11:48:03 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-06-27 11:49:57 +0200 |
commit | 6931dce17580d097351dd7be09ce7c9ed3f72827 (patch) | |
tree | 2456845e95ed0112c2f08ed8ab6e867686b91d7a /lib/gs/doc/src/gs_chapter6.xmlsrc | |
parent | dfccd57cb2b69fc3ab01acd0ccbfc894a8403358 (diff) | |
download | otp-6931dce17580d097351dd7be09ce7c9ed3f72827.tar.gz otp-6931dce17580d097351dd7be09ce7c9ed3f72827.tar.bz2 otp-6931dce17580d097351dd7be09ce7c9ed3f72827.zip |
Remove the gs application
The gs application ws deprecated in R15B01.
Diffstat (limited to 'lib/gs/doc/src/gs_chapter6.xmlsrc')
-rw-r--r-- | lib/gs/doc/src/gs_chapter6.xmlsrc | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/gs/doc/src/gs_chapter6.xmlsrc b/lib/gs/doc/src/gs_chapter6.xmlsrc deleted file mode 100644 index ecb891ad6f..0000000000 --- a/lib/gs/doc/src/gs_chapter6.xmlsrc +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE chapter SYSTEM "chapter.dtd"> - -<chapter> - <header> - <copyright> - <year>2000</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>Default Values</title> - <prepared></prepared> - <docno></docno> - <date></date> - <rev></rev> - <file>gs_chapter6.xml</file> - </header> - - <section> - <title>The Default Value Model</title> - <p>When a new object is created, a set of options is provided by the application. Options which are not explicitly given are taken care of by the parent (the container object).</p> - <code type="none"><![CDATA[ -B=gs:create(button,Win,[{x,0},{label,{text,"press Me"}}]). - ]]></code> - <p>In the example shown above, the window provides default values for options like location and background color. If an application cannot use the default values provided by GS, new ones can be configured. For example, the following code creates a red button at location y=30.</p> - <code type="none"><![CDATA[ -gs:config(Win,[{default,button,{y,30}}, -{default,button,{font,{courier,18}}}]), -B=gs:create(button,Win,[{x,0},{label,{text,"press Me"}}]). - ]]></code> - <p>The syntax for the default option is <c><![CDATA[{default,Objecttype,{Option,DefaultValue}}]]></c>, where <c><![CDATA[Objecttype]]></c> is the name of any GS object. The special keywords <c><![CDATA[all]]></c> or <c><![CDATA[buttons]]></c> which denote button, radio button, and check button can be used.</p> - <p>The semantics for the default option can be expressed as follows: If an object of kind <c><![CDATA[Objecttype]]></c> is created and no value for <c><![CDATA[Option]]></c> is given, then use <c><![CDATA[DefaultValue]]></c> as the value. Only options of <c><![CDATA[{Key,Value}]]></c> syntax can be given a default values. Default values may be inherited in several steps. In the following example, the button will show the text "Cancel".</p> - <code type="none"><![CDATA[ -gs:config(Win,[{default,button,{label,{text,"Cancel"}}}]), -F=gs:create(frame,Win,[]), -B=gs:create(button,F,[]). - ]]></code> - <p>Default values are inherited so that changed default values only affect new objects, not existing objects.</p> - <p>Default values only have meaning when creating child objects, since objects which cannot have children cannot have default options. An example is buttons.</p> - <p>The following example illustrates how default options can be used:</p> - <marker id="gs_fig7"></marker> - <image file="images/ex16.gif"> - <icaption>Example of Default Options</icaption> - </image> - <codeinclude file="examples/ex16.erl" tag="" type="erl"></codeinclude> - </section> -</chapter> - |