<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Erlang GS Explorations</title>
<link>http://erl.dougedmunds.com</link>
<description>Organized by Doug Edmunds </description>
<language>en-us</language>
<copyright>Copyright 2008 dae</copyright>
<pubDate>Wed, 20 Feb 2008 23:16:02 GMT</pubDate>
<lastBuildDate>Wed, 20 Feb 2008 23:16:02 GMT</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>TiddlyWiki 2.1.3</generator>
<item>
<title>GUI Template</title>
<description>&lt;span class=&quot;marked&quot;&gt;Code notes&lt;/span&gt;&lt;br&gt;This template is a starting point.  If you have suggestions, email me.&lt;br&gt;I have tried to make this template tie in with the format of the tcl&lt;br&gt;code generated by Visual Tcl, using &lt;strong&gt;place manager&lt;/strong&gt; geometry,&lt;br&gt;so you can most easily copy over the values.  By using a process for&lt;br&gt;the window, if the loop ends, the process dies, removing the window.&lt;br&gt;&lt;br&gt;&lt;pre&gt;
-module(gui).
-export([start/0, init/0]).

start() -&amp;gt; spawn (gui,init,[]).

init() -&amp;gt; 
    S = gs:start(),
    create_window(S),
    create_objs(),
    config_objs(),
    loop().

%% look at vtcl section  # CREATING WIDGETS  for &quot;wm geometry&quot; line 
%% There are TWO. Use the second one
%%   which has your window title in the 'wm title'  
%%   wm geometry $top 381x360+423+117; update
%%   use first two numbers: width = 381 height = 360

create_window(S) -&amp;gt;
    gs:create(window,window1,S,
    [{title, &quot;Title of Window here&quot;},{width,381},{height,360}]).

%% Just below the last &quot;wm&quot; line, you will see 'object' lines 
%%   such as button, label, entry etc.
%% Pick out these aspects 1. object name (like 'button1')
%%   and anything that starts with a '-' 
%%   (like -text {add me}, -background white)
%% Include them in the gs:create entry, using tuples
%% You need to use the correct option identifiers: bg, not background

create_objs() -&amp;gt;
    gs:create(label,label1,window1,[{label,{text,&quot;Put label1 text here&quot;}}]),
    gs:create(button,button1,window1,[{label, {text,&quot;add me&quot;}}]),
    gs:create(button,button2,window1,[{label, {text,&quot;exit&quot;}}]),
    gs:create(entry,entry1,window1,[{bg,white}]),
    
    %%for text with scrollbars, use an editor object with vscroll, hscroll
    gs:create(editor,editor1,window1, 
      [{bg, white},{vscroll, right}]),

    true.  %%this avoids missing comma issues

%% Look at the vtcl section # SETTING GEOMETRY
%%   Each object starts with a 'place' line
%%   Match up the line with the right object (lab, ent, but) and
%%   put the x, y, width, height info into the template, as well as 
%%   anything else that shows up there.

config_objs() -&amp;gt;    
    gs:config(label1, [{x,  90}, {y,  20}, {width, 138}, {height,  29}]),
    gs:config(button1,[{x,  90}, {y, 275}, {width,  62}, {height,  36}]),
    gs:config(button2,[{x, 225}, {y, 275}, {width,  60}, {height,  36}]),
    gs:config(entry1, [{x,  46}, {y,  65}, {width, 246}, {height,  44}]),
    %% if you are using scroll bars add about 14 pixels to width and/or height (296 -&amp;gt;310) 
    gs:config(editor1, [{x, 45}, {y, 140}, {width, 310}, {height,  103}]),

    %% Optional: Mask highlightfg with window bg color. Example:
    %% Hide_focus = gs:read(window1,bg),
    %% gs:config(entry1,[{highlightfg, Hide_focus}]),
    
    gs:config(window1, {map,true}).  %%display

loop() -&amp;gt;
    receive
        %% format for button click, copy as needed, then modify
        {gs,button1,click,_,_} -&amp;gt; % button 1 pressed
            io:format(&quot;Button 1 pressed!~n&quot;,[]),
            loop();
        {gs,button2,click,_,_} -&amp;gt; 
            io:format(&quot;Button 2 pressed, closing window ~n&quot;,[]); %process dies   
        {gs,_,destroy,_,_} -&amp;gt; true; % called when window is closed.    
        {end_without_semicolon_message} -&amp;gt; true  %  
    end.

&lt;/pre&gt;</description>
<category>Using Visual Tcl</category>
<link>http://erl.dougedmunds.com#%5B%5BGUI%20Template%5D%5D</link>
<pubDate>Wed, 20 Feb 2008 23:15:42 GMT</pubDate>
</item>
<item>
<title>Using Visual Tcl</title>
<description>Visual Tcl is the next best thing to a GUI builder for Erlang GS.&lt;br&gt;You put objects where you want to see them. VTCL gives you the numbers &lt;br&gt;you need to correctly size and place your objects in an Erlang GS window. &lt;br&gt;You can either work right off the screen or from the file it generates.&lt;br&gt;I have written a &lt;a tiddlylink=&quot;GUI Template&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GUI Template&quot; href=&quot;#GUI%20Template&quot; class=&quot;externalLink&quot;&gt;GUI Template&lt;/a&gt; that ties in with Visual Tcl.&lt;br&gt; &lt;br&gt;Get Visual Tcl at &lt;a target=&quot;_blank&quot; title=&quot;External link to http://vtcl.sourceforge.net/&quot; href=&quot;http://vtcl.sourceforge.net/&quot; class=&quot;externalLink&quot;&gt;SourceForge &lt;/a&gt;.  It's a tcl file itself,&lt;br&gt;so it will on several operating systems.&lt;br&gt;&lt;br&gt;It requires a Tcl/tk 'wish' file.  There is one in the Erlang distribution.&lt;br&gt;   &amp;lt;erlang root&amp;gt;\lib\gs-1.5.7\priv\tcl\bin\wish84s.exe&lt;br&gt;The easiest way to run it in Windows is to associate .tcl files to your 'wish' file.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Working with the GUI Template&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Open Visual Tcl.&lt;/li&gt;&lt;li&gt;Set it to use 'place manager'. &lt;/li&gt;&lt;li&gt;Make a simple window (a label, an entry, a couple of buttons).&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;marked&quot;&gt;Note&lt;/span&gt;: vtcl has more 'object' choices than Erlang GS.  Only use those which have Erlang counterparts.&lt;/li&gt;&lt;li&gt;A tip: vtcl adds objects to the tcl file in the order you add them to the screen.  Putting all of the same kind of objects on the screen (all the buttons, all the labels) groups them that way in the file. I find it easier to copy info to the erl file if I do them by groups (gs:config(button1..., gs:config(button2...).   &lt;/li&gt;&lt;li&gt;Another tip: when adding labels, resize them (drag the edges) to force vtcl to store the height and width. Otherwise it will just store the x and y coordinates.  &lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Save the vtcl file. Close vtcl.&lt;/li&gt;&lt;li&gt;Open the tcl and the &lt;a tiddlylink=&quot;GUI Template&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GUI Template&quot; href=&quot;#GUI%20Template&quot; class=&quot;externalLink&quot;&gt;GUI Template&lt;/a&gt; in a text editor.  &lt;/li&gt;&lt;li&gt;Using the data from the vtcl file, fill in the blanks in the GUI template. &lt;/li&gt;&lt;ul&gt;&lt;li&gt;At this stage you are building the GUI, so don't bother writing any code in the loop.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;    &lt;br&gt;If you fill it in correctly, your Erlang-generated window will look exactly like the vtcl-generated window.&lt;br&gt;&lt;ul&gt;&lt;li&gt;Well, almost exactly.  Here are &lt;a tiddlylink=&quot;vtcl differences&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #vtcl differences&quot; href=&quot;#vtcl%20differences&quot; class=&quot;externalLink&quot;&gt;some differences &lt;/a&gt; noted so far.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;a tiddlylink=&quot;WoW&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #WoW&quot; href=&quot;#WoW&quot; class=&quot;externalLink&quot;&gt;WoW&lt;/a&gt;!!!!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description>
<link>http://erl.dougedmunds.com#%5B%5BUsing%20Visual%20Tcl%5D%5D</link>
<pubDate>Fri, 15 Feb 2008 17:51:00 GMT</pubDate>
</item>
<item>
<title>Visual Tcl file</title>
<description>&lt;span class=&quot;marked&quot;&gt;Code notes&lt;/span&gt;&lt;br&gt;What is so absolutely great about a Visual Tcl file is that &lt;br&gt;&lt;strong&gt;you don't have to write it!&lt;/strong&gt;&lt;br&gt;You paint the screen, then save the file. That's it.&lt;br&gt;Then you take the numbers off it, plug them into the &lt;br&gt;&lt;a tiddlylink=&quot;GUI Template&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GUI Template&quot; href=&quot;#GUI%20Template&quot; class=&quot;externalLink&quot;&gt;GUI Template&lt;/a&gt;, and you can go back to the good stuff. &lt;br&gt;&lt;br&gt;Look at the &lt;a tiddlylink=&quot;GUI Template&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GUI Template&quot; href=&quot;#GUI%20Template&quot; class=&quot;externalLink&quot;&gt;GUI Template&lt;/a&gt; while looking at this file.&lt;br&gt;Auto-generated by Visual Tcl:&lt;br&gt;&lt;pre&gt;#!/bin/sh
# the next line restarts using wish\
exec wish &quot;$0&quot; &quot;$@&quot; 

if {![info exists vTcl(sourcing)]} {

    package require Tk
    switch $tcl_platform(platform) {
	windows {
            option add *Button.padY 0
	}
	default {
            option add *Scrollbar.width 10
            option add *Scrollbar.highlightThickness 0
            option add *Scrollbar.elementBorderWidth 2
            option add *Scrollbar.borderWidth 2
	}
    }
    
}

#############################################################################
# Visual Tcl v1.60 Project
#


#################################
# VTCL LIBRARY PROCEDURES
#

if {![info exists vTcl(sourcing)]} {
#############################################################################
## Library Procedure:  Window

proc ::Window {args} {
    ## This procedure may be used free of restrictions.
    ##    Exception added by Christian Gavin on 08/08/02.
    ## Other packages and widget toolkits have different licensing requirements.
    ##    Please read their license agreements for details.

    global vTcl
    foreach {cmd name newname} [lrange $args 0 2] {}
    set rest    [lrange $args 3 end]
    if {$name == &quot;&quot; || $cmd == &quot;&quot;} { return }
    if {$newname == &quot;&quot;} { set newname $name }
    if {$name == &quot;.&quot;} { wm withdraw $name; return }
    set exists [winfo exists $newname]
    switch $cmd {
        show {
            if {$exists} {
                wm deiconify $newname
            } elseif {[info procs vTclWindow$name] != &quot;&quot;} {
                eval &quot;vTclWindow$name $newname $rest&quot;
            }
            if {[winfo exists $newname] &amp;amp;&amp;amp; [wm state $newname] == &quot;normal&quot;} {
                vTcl:FireEvent $newname &amp;lt;&amp;lt;Show&amp;gt;&amp;gt;
            }
        }
        hide    {
            if {$exists} {
                wm withdraw $newname
                vTcl:FireEvent $newname &amp;lt;&amp;lt;Hide&amp;gt;&amp;gt;
                return}
        }
        iconify { if $exists {wm iconify $newname; return} }
        destroy { if $exists {destroy $newname; return} }
    }
}
#############################################################################
## Library Procedure:  vTcl:DefineAlias

proc ::vTcl:DefineAlias {target alias widgetProc top_or_alias cmdalias} {
    ## This procedure may be used free of restrictions.
    ##    Exception added by Christian Gavin on 08/08/02.
    ## Other packages and widget toolkits have different licensing requirements.
    ##    Please read their license agreements for details.

    global widget
    set widget($alias) $target
    set widget(rev,$target) $alias
    if {$cmdalias} {
        interp alias {} $alias {} $widgetProc $target
    }
    if {$top_or_alias != &quot;&quot;} {
        set widget($top_or_alias,$alias) $target
        if {$cmdalias} {
            interp alias {} $top_or_alias.$alias {} $widgetProc $target
        }
    }
}
#############################################################################
## Library Procedure:  vTcl:DoCmdOption

proc ::vTcl:DoCmdOption {target cmd} {
    ## This procedure may be used free of restrictions.
    ##    Exception added by Christian Gavin on 08/08/02.
    ## Other packages and widget toolkits have different licensing requirements.
    ##    Please read their license agreements for details.

    ## menus are considered toplevel windows
    set parent $target
    while {[winfo class $parent] == &quot;Menu&quot;} {
        set parent [winfo parent $parent]
    }

    regsub -all {\%widget} $cmd $target cmd
    regsub -all {\%top} $cmd [winfo toplevel $parent] cmd

    uplevel #0 [list eval $cmd]
}
#############################################################################
## Library Procedure:  vTcl:FireEvent

proc ::vTcl:FireEvent {target event {params {}}} {
    ## This procedure may be used free of restrictions.
    ##    Exception added by Christian Gavin on 08/08/02.
    ## Other packages and widget toolkits have different licensing requirements.
    ##    Please read their license agreements for details.

    ## The window may have disappeared
    if {![winfo exists $target]} return
    ## Process each binding tag, looking for the event
    foreach bindtag [bindtags $target] {
        set tag_events [bind $bindtag]
        set stop_processing 0
        foreach tag_event $tag_events {
            if {$tag_event == $event} {
                set bind_code [bind $bindtag $tag_event]
                foreach rep &quot;\{%W $target\} $params&quot; {
                    regsub -all [lindex $rep 0] $bind_code [lindex $rep 1] bind_code
                }
                set result [catch {uplevel #0 $bind_code} errortext]
                if {$result == 3} {
                    ## break exception, stop processing
                    set stop_processing 1
                } elseif {$result != 0} {
                    bgerror $errortext
                }
                break
            }
        }
        if {$stop_processing} {break}
    }
}
#############################################################################
## Library Procedure:  vTcl:Toplevel:WidgetProc

proc ::vTcl:Toplevel:WidgetProc {w args} {
    ## This procedure may be used free of restrictions.
    ##    Exception added by Christian Gavin on 08/08/02.
    ## Other packages and widget toolkits have different licensing requirements.
    ##    Please read their license agreements for details.

    if {[llength $args] == 0} {
        ## If no arguments, returns the path the alias points to
        return $w
    }
    set command [lindex $args 0]
    set args [lrange $args 1 end]
    switch -- [string tolower $command] {
        &quot;setvar&quot; {
            foreach {varname value} $args {}
            if {$value == &quot;&quot;} {
                return [set ::${w}::${varname}]
            } else {
                return [set ::${w}::${varname} $value]
            }
        }
        &quot;hide&quot; - &quot;show&quot; {
            Window [string tolower $command] $w
        }
        &quot;showmodal&quot; {
            ## modal dialog ends when window is destroyed
            Window show $w; raise $w
            grab $w; tkwait window $w; grab release $w
        }
        &quot;startmodal&quot; {
            ## ends when endmodal called
            Window show $w; raise $w
            set ::${w}::_modal 1
            grab $w; tkwait variable ::${w}::_modal; grab release $w
        }
        &quot;endmodal&quot; {
            ## ends modal dialog started with startmodal, argument is var name
            set ::${w}::_modal 0
            Window hide $w
        }
        default {
            uplevel $w $command $args
        }
    }
}
#############################################################################
## Library Procedure:  vTcl:WidgetProc

proc ::vTcl:WidgetProc {w args} {
    ## This procedure may be used free of restrictions.
    ##    Exception added by Christian Gavin on 08/08/02.
    ## Other packages and widget toolkits have different licensing requirements.
    ##    Please read their license agreements for details.

    if {[llength $args] == 0} {
        ## If no arguments, returns the path the alias points to
        return $w
    }

    set command [lindex $args 0]
    set args [lrange $args 1 end]
    uplevel $w $command $args
}
#############################################################################
## Library Procedure:  vTcl:toplevel

proc ::vTcl:toplevel {args} {
    ## This procedure may be used free of restrictions.
    ##    Exception added by Christian Gavin on 08/08/02.
    ## Other packages and widget toolkits have different licensing requirements.
    ##    Please read their license agreements for details.

    uplevel #0 eval toplevel $args
    set target [lindex $args 0]
    namespace eval ::$target {set _modal 0}
}
}


if {[info exists vTcl(sourcing)]} {

proc vTcl:project:info {} {
    set base .top27
    namespace eval ::widgets::$base {
        set set,origin 1
        set set,size 1
        set runvisible 1
    }
    namespace eval ::widgets::$base.lab29 {
        array set save {-text 1}
    }
    namespace eval ::widgets::$base.but30 {
        array set save {-pady 1 -text 1}
    }
    namespace eval ::widgets::$base.but31 {
        array set save {-pady 1 -text 1}
    }
    namespace eval ::widgets::$base.ent33 {
        array set save {-background 1 -textvariable 1}
    }
    namespace eval ::widgets::$base.tex27 {
        array set save {-background 1 -yscrollcommand 1}
    }
    namespace eval ::widgets::$base.scr29 {
        array set save {-command 1}
    }
    namespace eval ::widgets_bindings {
        set tagslist _TopLevel
    }
    namespace eval ::vTcl::modules::main {
        set procs {
            init
            main
        }
        set compounds {
        }
        set projectType single
    }
}
}

#################################
# USER DEFINED PROCEDURES
#
#############################################################################
## Procedure:  main

proc ::main {argc argv} {}

#############################################################################
## Initialization Procedure:  init

proc ::init {argc argv} {}

init $argc $argv

#################################
# VTCL GENERATED GUI PROCEDURES
#

proc vTclWindow. {base} {
    if {$base == &quot;&quot;} {
        set base .
    }
    ###################
    # CREATING WIDGETS
    ###################
    wm focusmodel $top passive
    wm geometry $top 200x200+88+116; update
    wm maxsize $top 1284 778
    wm minsize $top 115 1
    wm overrideredirect $top 0
    wm resizable $top 1 1
    wm withdraw $top
    wm title $top &quot;vtcl&quot;
    bindtags $top &quot;$top Vtcl all&quot;
    vTcl:FireEvent $top &amp;lt;&amp;lt;Create&amp;gt;&amp;gt;
    wm protocol $top WM_DELETE_WINDOW &quot;vTcl:FireEvent $top &amp;lt;&amp;lt;DeleteWindow&amp;gt;&amp;gt;&quot;

    ###################
    # SETTING GEOMETRY
    ###################

    vTcl:FireEvent $base &amp;lt;&amp;lt;Ready&amp;gt;&amp;gt;
}

proc vTclWindow.top27 {base} {
    if {$base == &quot;&quot;} {
        set base .top27
    }
    if {[winfo exists $base]} {
        wm deiconify $base; return
    }
    set top $base
    ###################
    # CREATING WIDGETS
    ###################
    vTcl:toplevel $top -class Toplevel
    wm focusmodel $top passive
    wm geometry $top 381x360+423+117; update
    wm maxsize $top 1284 778
    wm minsize $top 115 1
    wm overrideredirect $top 0
    wm resizable $top 1 1
    wm deiconify $top
    wm title $top &quot;Title of Window here&quot;
    vTcl:DefineAlias &quot;$top&quot; &quot;window1&quot; vTcl:Toplevel:WidgetProc &quot;&quot; 1
    bindtags $top &quot;$top Toplevel all _TopLevel&quot;
    vTcl:FireEvent $top &amp;lt;&amp;lt;Create&amp;gt;&amp;gt;
    wm protocol $top WM_DELETE_WINDOW &quot;vTcl:FireEvent $top &amp;lt;&amp;lt;DeleteWindow&amp;gt;&amp;gt;&quot;

    label $top.lab29 \
        -text {Put label1 text there} 
    vTcl:DefineAlias &quot;$top.lab29&quot; &quot;label1&quot; vTcl:WidgetProc &quot;window1&quot; 1
    button $top.but30 \
        -pady 0 -text {add me} 
    vTcl:DefineAlias &quot;$top.but30&quot; &quot;button1&quot; vTcl:WidgetProc &quot;window1&quot; 1
    button $top.but31 \
        -pady 0 -text exit 
    vTcl:DefineAlias &quot;$top.but31&quot; &quot;button2&quot; vTcl:WidgetProc &quot;window1&quot; 1
    entry $top.ent33 \
        -background white -textvariable &quot;$top\::ent33&quot; 
    vTcl:DefineAlias &quot;$top.ent33&quot; &quot;entry2&quot; vTcl:WidgetProc &quot;window1&quot; 1
    text $top.tex27 \
        -background white -yscrollcommand {scrollbar2 set} 
    vTcl:DefineAlias &quot;$top.tex27&quot; &quot;text1&quot; vTcl:WidgetProc &quot;window1&quot; 1
    scrollbar $top.scr29 \
        -command {text1 yview} 
    vTcl:DefineAlias &quot;$top.scr29&quot; &quot;scrollbar2&quot; vTcl:WidgetProc &quot;window1&quot; 1
    ###################
    # SETTING GEOMETRY
    ###################
    place $top.lab29 \
        -in $top -x 90 -y 20 -width 138 -height 29 -anchor nw \
        -bordermode ignore 
    place $top.but30 \
        -in $top -x 90 -y 275 -width 62 -height 36 -anchor nw \
        -bordermode ignore 
    place $top.but31 \
        -in $top -x 225 -y 275 -width 60 -height 36 -anchor nw \
        -bordermode ignore 
    place $top.ent33 \
        -in $top -x 46 -y 65 -width 246 -height 44 -anchor nw \
        -bordermode ignore 
    place $top.tex27 \
        -in $top -x 45 -y 140 -width 296 -height 103 -anchor nw \
        -bordermode ignore 
    place $top.scr29 \
        -in $top -x 340 -y 140 -width 17 -height 103 -anchor nw \
        -bordermode ignore 

    vTcl:FireEvent $base &amp;lt;&amp;lt;Ready&amp;gt;&amp;gt;
}

#############################################################################
## Binding tag:  _TopLevel

bind &quot;_TopLevel&quot; &amp;lt;&amp;lt;Create&amp;gt;&amp;gt; {
    if {![info exists _topcount]} {set _topcount 0}; incr _topcount
}
bind &quot;_TopLevel&quot; &amp;lt;&amp;lt;DeleteWindow&amp;gt;&amp;gt; {
    if {[set ::%W::_modal]} {
                vTcl:Toplevel:WidgetProc %W endmodal
            } else {
                destroy %W; if {$_topcount == 0} {exit}
            }
}
bind &quot;_TopLevel&quot; &amp;lt;Destroy&amp;gt; {
    if {[winfo toplevel %W] == &quot;%W&quot;} {incr _topcount -1}
}

Window show .
Window show .top27

main $argc $argv

&lt;/pre&gt;</description>
<category>Using Visual Tcl</category>
<link>http://erl.dougedmunds.com#%5B%5BVisual%20Tcl%20file%5D%5D</link>
<pubDate>Wed, 24 Oct 2007 15:55:00 GMT</pubDate>
</item>
<item>
<title>Introduction</title>
<description>This website focuses on Erlang's Graphic System (gs). &lt;br&gt;If you've not been here before, start with &lt;a tiddlylink=&quot;GS Objects&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Objects&quot; href=&quot;#GS%20Objects&quot; class=&quot;externalLink&quot;&gt;GS Objects&lt;/a&gt;.&lt;br&gt;Do you wish there was a GUI Builder? Click &lt;a tiddlylink=&quot;Using Visual Tcl&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Using Visual Tcl&quot; href=&quot;#Using%20Visual%20Tcl&quot; class=&quot;externalLink&quot;&gt;Using Visual Tcl&lt;/a&gt;. &lt;br&gt;&lt;br&gt;Please &lt;a tiddlylink=&quot;About&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #About&quot; href=&quot;#About&quot; class=&quot;externalLink&quot;&gt;send me an email &lt;/a&gt; if you see an error. &lt;br&gt;&lt;span&gt;—&lt;/span&gt; Doug Edmunds&lt;br&gt;</description>
<link>http://erl.dougedmunds.com#Introduction</link>
<pubDate>Sun, 07 Oct 2007 05:28:00 GMT</pubDate>
</item>
<item>
<title>MainMenu</title>
<description>&lt;a tiddlylink=&quot;GS Objects&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Objects&quot; href=&quot;#GS%20Objects&quot; class=&quot;externalLink&quot;&gt;GS Objects&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;GS Options&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Options&quot; href=&quot;#GS%20Options&quot; class=&quot;externalLink&quot;&gt;GS Options&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;Containers&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Containers&quot; href=&quot;#Containers&quot; class=&quot;externalLink&quot;&gt;Containers&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;GS Events&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Events&quot; href=&quot;#GS%20Events&quot; class=&quot;externalLink&quot;&gt;GS Events&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;GS Messages&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Messages&quot; href=&quot;#GS%20Messages&quot; class=&quot;externalLink&quot;&gt;GS Messages&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;Code from GS User's Guide&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Code from GS User's Guide&quot; href=&quot;#Code%20from%20GS%20User%27s%20Guide&quot; class=&quot;externalLink&quot;&gt;Code &lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;GS Functions&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Functions&quot; href=&quot;#GS%20Functions&quot; class=&quot;externalLink&quot;&gt;GS Functions&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;Using Visual Tcl&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Using Visual Tcl&quot; href=&quot;#Using%20Visual%20Tcl&quot; class=&quot;externalLink&quot;&gt;Visual Tcl &lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;Links&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Links&quot; href=&quot;#Links&quot; class=&quot;externalLink&quot;&gt;Links&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;GettingStarted&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GettingStarted&quot; href=&quot;#GettingStarted&quot; class=&quot;externalLink&quot;&gt;GettingStarted&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;ToDoList&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ToDoList&quot; href=&quot;#ToDoList&quot; class=&quot;externalLink&quot;&gt;ToDoList&lt;/a&gt;</description>
<link>http://erl.dougedmunds.com#MainMenu</link>
<pubDate>Sun, 07 Oct 2007 05:06:00 GMT</pubDate>
</item>
<item>
<title>Code from GS User's Guide</title>
<description>Code is from the examples in the GS Users Guide that comes with the release. &lt;br&gt;&lt;br&gt;I have added notes in front of the code. I have made&lt;br&gt;no changes to the code, except as noted.&lt;br&gt;</description>
<link>http://erl.dougedmunds.com#%5B%5BCode%20from%20GS%20User's%20Guide%5D%5D</link>
<pubDate>Sun, 07 Oct 2007 05:04:00 GMT</pubDate>
</item>
<item>
<title>DefaultTiddlers</title>
<description>&lt;a tiddlylink=&quot;GS Objects&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Objects&quot; href=&quot;#GS%20Objects&quot; class=&quot;externalLink&quot;&gt;GS Objects&lt;/a&gt;&lt;br&gt;&lt;a tiddlylink=&quot;Introduction&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Introduction&quot; href=&quot;#Introduction&quot; class=&quot;externalLink&quot;&gt;Introduction&lt;/a&gt;&lt;br&gt;</description>
<link>http://erl.dougedmunds.com#DefaultTiddlers</link>
<pubDate>Sun, 07 Oct 2007 04:58:00 GMT</pubDate>
</item>
<item>
<title>GS Options</title>
<description>Material here comes from several sources. &lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;marked&quot;&gt;comments&lt;/span&gt; found in the gs src files.  &lt;/li&gt;&lt;li&gt;'defaults' written as &lt;span class=&quot;marked&quot;&gt;code&lt;/span&gt; in gs_widgets.erl.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Always test out code that uses gs.  &lt;br&gt;&lt;strong&gt;Erlang does not check whether options are valid.&lt;/strong&gt;&lt;br&gt;If you type {widht, 10} instead of {width,10} Erlang will compile fine&lt;br&gt;but tcl/tk will either not display the object or crash when you run it.   &lt;br&gt;&lt;br&gt;To find all the options for an object:&lt;br&gt;&lt;ul&gt;&lt;li&gt; Find the object here (i.e., &lt;a tiddlylink=&quot;frame&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #frame&quot; href=&quot;#frame&quot; class=&quot;externalLink&quot;&gt;frame&lt;/a&gt;).  Start with &lt;a tiddlylink=&quot;GS Objects&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Objects&quot; href=&quot;#GS%20Objects&quot; class=&quot;externalLink&quot;&gt;GS Objects&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt; Look at &lt;a tiddlylink=&quot;Generic options&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Generic options&quot; href=&quot;#Generic%20options&quot; class=&quot;externalLink&quot;&gt;Generic options&lt;/a&gt; which apply to lots of objects.&lt;/li&gt;&lt;li&gt; Look at &lt;a tiddlylink=&quot;Default options&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Default options&quot; href=&quot;#Default%20options&quot; class=&quot;externalLink&quot;&gt;Default options&lt;/a&gt; (this info also appears on each object's page).&lt;/li&gt;&lt;li&gt; What many event options do is covered on &lt;a tiddlylink=&quot;GS Events&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Events&quot; href=&quot;#GS%20Events&quot; class=&quot;externalLink&quot;&gt;GS Events&lt;/a&gt;. &lt;/li&gt;&lt;/ul&gt;</description>
<link>http://erl.dougedmunds.com#%5B%5BGS%20Options%5D%5D</link>
<pubDate>Sun, 07 Oct 2007 04:35:00 GMT</pubDate>
</item>
<item>
<title>editor</title>
<description>Parents&lt;br&gt;&lt;ul&gt;&lt;li&gt; &lt;a tiddlylink=&quot;frame&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #frame&quot; href=&quot;#frame&quot; class=&quot;externalLink&quot;&gt;frame&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a tiddlylink=&quot;window&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #window&quot; href=&quot;#window&quot; class=&quot;externalLink&quot;&gt;window&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Children &lt;br&gt;&lt;ul&gt;&lt;li&gt; none&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;default_options(editor)      -&amp;gt; [{height,200}, {width,300}, {x,0}, {y,0}];
&lt;/pre&gt;&lt;br&gt;There is a bug in the gs code related to highlightfg. Attempting to change it has no effect.&lt;br&gt;&lt;br&gt;&lt;pre&gt;%%------------------------------------------------------------------------------
%% 			    EDITOR OPTIONS (says canvas in the src file)
%%
%%  Attributes:
%%	activebg		Color
%%	anchor			n,w,s,e,nw,se,ne,sw,center
%%	bc			Color
%%	bg			Color
%%	bw			Wth
%%	data			Data
%%	fg			Color
%%      font                    Font
%%	height			Int
%%	highlightbg		Color
%%	highlightbw		Wth
%%	highlightfg		Color
%%	hscroll			Bool | top | bottom
%%	insertbg		Color
%%	insertbw		Wth
%%      insertpos               {Row,Col}|'end'  (Row: 1..Max, Col: 0..Max)
%%	justify			left|right|center
%%	padx			Int   (Pixels)
%%	pady			Int   (Pixels)
%%	relief			Relief
%%	scrollbg		Color
%%	scrollfg		Color
%%	selectbg		Color
%%	selectbw		Width
%%	selectfg		Color
%%	vscroll			Bool | left | right
%%	width			Int
%%	wrap			none | char | word
%%	x			Int
%%	y			Int
%%
%%
%%  Commands:
%%	clear
%%	del			{FromIdx, ToIdx} 
%%	enable			Bool
%%	file			String
%%	get			{FromIdx, ToIdx} =&amp;gt; Text
%%	insert			{Index, Text}Index = [insert,{Row,lineend},end,{Row,Col}]
%%	setfocus		Bool
%%
%%  Events:
%%	buttonpress		[Bool | {Bool, Data}]
%%	buttonrelease		[Bool | {Bool, Data}]
%%	destroy			[Bool | {Bool, Data}]
%%	enter			[Bool | {Bool, Data}]
%%	focus			[Bool | {Bool, Data}]
%%	keypress		[Bool | {Bool, Data}]
%%	keyrelease		[Bool | {Bool, Data}]
%%	leave			[Bool | {Bool, Data}]
%%	motion			[Bool | {Bool, Data}]
%%
%%  Read Options:
%%	children
%%	id
%%	parent
%%	type
%%
&lt;/pre&gt;&lt;br&gt;Here is some additional info from official User Guide. &lt;br&gt;&lt;pre&gt;Attributes:

{Option,Value}   			Default   	Description
{hscroll, Bool | top | bottom} 		false 		Horizontal scroll bar.
{insertpos,{row,Col}} 			&amp;lt;unspec&amp;gt; 	The position of the cursor.
{insertpos,'end'} 			&amp;lt;unspec&amp;gt; 	The position of the cursor.
{justify, left| right| center} 		left 		Text justification.
{scrollbg, Color} 			&amp;lt;unspec&amp;gt; 	Background color of scroll bar.
{scrollfg, Color} 			&amp;lt;unspec&amp;gt; 	Foreground color of scroll bar.
{selection, {FromIndex,ToIndex}} 	&amp;lt;unspec&amp;gt; 	The text range that is currently selected.
{vscroll, Bool | left | right} 		false 		Vertical scroll bar.
{vscrollpos, row} 			&amp;lt;unspec&amp;gt; 	The top most visible row in the editor.
{wrap, none|char | word} 		none 		How to wrap text when the line is full.

Editor Config-Only Options 
Config-Only 				Description
clear 					Clears the editor.
{del, {FromIndex, ToIndex}}} 		Deletes text.
{fg, {{FromIndex,ToIndex},Color}} 	Sets the foreground color of a range of text.
{load, FileName} 			Read FileName into the editor.
{insert, {Index, Text}} 		Inserts new text.
{overwrite, {Index, Text}} 		Writes new text at index.
{save, FileName} 			Writes editor contents to file.


Editor Read-Only Options 
Read-Only 			Return 	Description
char_height 			Int 	The height of the editor window measured in characters.
char_width 			Int 	The width of the editor window measured in characters.
{fg,Index} 			Int 	The foreground color of the text at Index.
{get,{FromIndex, ToIndex}} 	Text 	The text between the indices.
size 				Int 	The number of rows in the editor.
&lt;/pre&gt;</description>
<category>GS Objects</category>
<link>http://erl.dougedmunds.com#editor</link>
<pubDate>Sun, 07 Oct 2007 04:10:00 GMT</pubDate>
</item>
<item>
<title>vtcl differences</title>
<description>Here are some differences.  I am sure there are more. E = Erlang V = Visual Tcl&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;background color of E is slightly darker&lt;/li&gt;&lt;li&gt;E editor with vscroll, hscroll and V's text and scrollbars: text area of editor is smaller (The scrollbars use up some of the H and W).&lt;/li&gt;&lt;li&gt;V has  -bordermode ignore, which apparently keeps from creating ugly bold lines around objects that have focus.&lt;/li&gt;&lt;/ul&gt;</description>
<link>http://erl.dougedmunds.com#%5B%5Bvtcl%20differences%5D%5D</link>
<pubDate>Sun, 07 Oct 2007 02:21:00 GMT</pubDate>
</item>
<item>
<title>ex17</title>
<description>&lt;span class=&quot;marked&quot;&gt;Code notes&lt;/span&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;geometry&lt;/li&gt;&lt;li&gt;uses  &lt;a tiddlylink=&quot;gs:ObjType/1/2/3&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #gs:ObjType/1/2/3&quot; href=&quot;#gs:ObjType/1/2/3&quot; class=&quot;externalLink&quot;&gt;gs:ObjType/1/2/3&lt;/a&gt; instead of &lt;a tiddlylink=&quot;gs:create/2/3/4&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #gs:create/2/3/4&quot; href=&quot;#gs:create/2/3/4&quot; class=&quot;externalLink&quot;&gt;gs:create/2/3/4&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;frame object&lt;br&gt;&lt;ul&gt;&lt;li&gt;name =  packer&lt;/li&gt;&lt;li&gt;parent = window (Win&lt;/li&gt;&lt;li&gt;options = [{stretch,1,50},{stretch,2,50},{stretch,1,50}]&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;button objects &lt;br&gt;&lt;ul&gt;&lt;li&gt;use the pack_xy option&lt;/li&gt;&lt;ul&gt;&lt;li&gt;pack_xy takes a 2-tuple value. Example: {pack_xy,{3,1}}&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;editor object &lt;br&gt;&lt;ul&gt;&lt;li&gt;has vscroll and hscroll options.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;vscroll is set at 'true'  &lt;/li&gt;&lt;li&gt;vscroll appears on the left side of the editor window.&lt;/li&gt;&lt;li&gt;use {vscroll, right} &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;pre&gt;-module(ex17).
-copyright('Copyright (c) 1991-97 Ericsson Telecom AB').
-vsn('$Revision: /main/release/1 $ ').

-export([start/0,init/0]).

start() -&amp;gt; spawn(ex17, init, []).

init() -&amp;gt;
    WH = [{width,200},{height,300}],
    Win = gs:window(gs:start(),[{map,true},{configure,true},
                                {title,&quot;Packer Demo&quot;}|WH]),
    gs:frame(packer,Win,[{packer_x,[{stretch,1,50},{stretch,2,50},
                                    {stretch,1,50}]},
                         {packer_y,[{fixed,30},{stretch,1}]}]),
    gs:button(packer,[{label,{text,&quot;left&quot;}},{pack_xy,{1,1}}]),
    gs:button(packer,[{label,{text,&quot;middle&quot;}},{pack_xy,{2,1}}]),
    gs:button(packer,[{label,{text,&quot;right&quot;}},{pack_xy,{3,1}}]),
    gs:editor(packer,[{pack_xy,{{1,3},2}},{vscroll,true},{hscroll,true}]),
    gs:config(packer,WH), % refresh to initial size
    loop().

loop() -&amp;gt;
    receive
        {gs,_Id,destroy,_Data,_Arg} -&amp;gt; bye;
        {gs,_Id,configure,_Data,[W,H|_]} -&amp;gt;
            gs:config(packer,[{width,W},{height,H}]), % repack
            loop();
        Other -&amp;gt;
            io:format(&quot;loop got: ~p~n&quot;,[Other]),
            loop()
    end.
&lt;/pre&gt;</description>
<category>Code from GS User's Guide</category>
<link>http://erl.dougedmunds.com#ex17</link>
<pubDate>Sun, 07 Oct 2007 01:46:00 GMT</pubDate>
</item>
<item>
<title>text</title>
<description>Parents&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a tiddlylink=&quot;canvas&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #canvas&quot; href=&quot;#canvas&quot; class=&quot;externalLink&quot;&gt;canvas&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Children&lt;br&gt;&lt;ul&gt;&lt;li&gt; none&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;span class=&quot;marked&quot;&gt;Note&lt;/span&gt; text does not have scrollbar options &lt;span&gt;—&lt;/span&gt; use editor instead&lt;br&gt;&lt;pre&gt;default_options(text)        -&amp;gt; [{anchor,nw}, {coords,[{0,0}]}, {justify,left}];
&lt;/pre&gt;&lt;pre&gt;%%-----------------------------------------------------------------------------
%% 			    TEXT OPTIONS
%%
%%  Attributes:
%%	anchor			n|w|e|s|nw|sw|ne|se|center
%%	coords			[{X,Y}]
%%	data			Data
%%	fg			Color
%%	font			Font
%%	justify			left | center | right
%%	stipple			Bool
%%	text			String
%%	width			Int	(line length in characters)
%%
%%  Commands:
%%	lower
%%	move			{Dx, Dy}
%%	raise
%%	scale			{Xo, Yo, Sx, Sy}
%%	setfocus		Bool
%%
%%  Events:
%%	buttonpress		[Bool | {Bool, Data}]
%%	buttonrelease		[Bool | {Bool, Data}]
%%	enter			[Bool | {Bool, Data}]
%%	keypress		[Bool | {Bool, Data}]
%%	keyrelease		[Bool | {Bool, Data}]
%%	leave			[Bool | {Bool, Data}]
%%	motion			[Bool | {Bool, Data}]
%%
%%  Read Options:
%%	children
%%	id
%%	parent
%%	type
%%
%%  Not Implemented:
%%	fontfamily		?????? Family
%%	fontsize		?????? Size
%%	style			?????? [bold,italic]
%%
&lt;/pre&gt;</description>
<category>GS Objects</category>
<link>http://erl.dougedmunds.com#text</link>
<pubDate>Sun, 07 Oct 2007 01:18:00 GMT</pubDate>
</item>
<item>
<title>ToDoList</title>
<description>Fix the templates, to include text with scroll bars&lt;br&gt;The location of code is confusing. Widgets group appears twice.&lt;br&gt;&lt;br&gt;Code in &lt;a tiddlylink=&quot;ex12&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ex12&quot; href=&quot;#ex12&quot; class=&quot;externalLink&quot;&gt;ex12&lt;/a&gt; needs commentary.&lt;br&gt;&lt;br&gt;put this somewhere:&lt;br&gt;gs uses tcl/tk to generate windows. The gs code you write gets converted into &lt;br&gt;tcl/tk code by the gs system.  So, if you write something that gs allows, &lt;br&gt;you may still crash in the tcl/tk engine.    &lt;br&gt;&lt;br&gt;&lt;br&gt;put this somewhere:&lt;br&gt;&lt;br&gt;Always include a 'destroy' tuple in the receive loop. &lt;br&gt;Otherwise, Erlang will hang when you close the graphics window. &lt;br&gt;example: {gs,_Id,destroy,_Data,_Arg} -&amp;gt; bye&lt;br&gt;&lt;br&gt;put this somewhere:&lt;br&gt;&lt;br&gt;Always create objects in parent-first order.  You can config them in any order.&lt;br&gt;&lt;br&gt;This page is too long: &lt;a tiddlylink=&quot;General info about options&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #General info about options&quot; href=&quot;#General%20info%20about%20options&quot; class=&quot;externalLink&quot;&gt;General info about options&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description>
<link>http://erl.dougedmunds.com#ToDoList</link>
<pubDate>Sun, 07 Oct 2007 00:19:00 GMT</pubDate>
</item>
<item>
<title>SiteUrl</title>
<description>&lt;a target=&quot;_blank&quot; title=&quot;External link to http://erl.dougedmunds.com&quot; href=&quot;http://erl.dougedmunds.com&quot; class=&quot;externalLink&quot;&gt;http://erl.dougedmunds.com&lt;/a&gt;</description>
<link>http://erl.dougedmunds.com#SiteUrl</link>
<pubDate>Sat, 06 Oct 2007 23:22:00 GMT</pubDate>
</item>
<item>
<title>HideEditingFeatures</title>
<description>config.options.chkHttpReadOnly = true;</description>
<category>systemConfig</category>
<link>http://erl.dougedmunds.com#HideEditingFeatures</link>
<pubDate>Sat, 06 Oct 2007 23:19:00 GMT</pubDate>
</item>
<item>
<title>Links</title>
<description>&lt;ul&gt;&lt;li&gt; &lt;a target=&quot;_blank&quot; title=&quot;External link to  http://erlang.org&quot; href=&quot;%20http://erlang.org&quot; class=&quot;externalLink&quot;&gt;Erlang.org&lt;/a&gt; Get a copy of Erlang&lt;/li&gt;&lt;li&gt; &lt;a target=&quot;_blank&quot; title=&quot;External link to  http://trapexit.org&quot; href=&quot;%20http://trapexit.org&quot; class=&quot;externalLink&quot;&gt;TrapExit.org &lt;/a&gt; Tutorials, forums, help&lt;/li&gt;&lt;li&gt; Like this program? Visit &lt;a target=&quot;_blank&quot; title=&quot;External link to http://mptw.tiddlyspot.com&quot; href=&quot;http://mptw.tiddlyspot.com&quot; class=&quot;externalLink&quot;&gt;MonkeyPirateTiddlyWiki&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a target=&quot;_blank&quot; title=&quot;External link to http://dougedmunds.com/z_erlang_wiki&quot; href=&quot;http://dougedmunds.com/z_erlang_wiki&quot; class=&quot;externalLink&quot;&gt;ets and dets &lt;/a&gt; Explorations on those modules (dokuwiki format).&lt;/li&gt;&lt;li&gt; &lt;a tiddlylink=&quot;About&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #About&quot; href=&quot;#About&quot; class=&quot;externalLink&quot;&gt;About&lt;/a&gt; me and this site.&lt;/li&gt;&lt;/ul&gt;</description>
<link>http://erl.dougedmunds.com#Links</link>
<pubDate>Sat, 06 Oct 2007 23:15:00 GMT</pubDate>
</item>
<item>
<title>AdvancedOptions</title>
<description>&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkGenerateAnRssFeed&quot; type=&quot;checkbox&quot;&gt; &lt;a tiddlylink=&quot;GenerateAnRssFeed&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GenerateAnRssFeed&quot; href=&quot;#GenerateAnRssFeed&quot; class=&quot;externalLink&quot;&gt;GenerateAnRssFeed&lt;/a&gt;&lt;br&gt;&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkOpenInNewWindow&quot; type=&quot;checkbox&quot;&gt; &lt;a tiddlylink=&quot;OpenLinksInNewWindow&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #OpenLinksInNewWindow&quot; href=&quot;#OpenLinksInNewWindow&quot; class=&quot;externalLink&quot;&gt;OpenLinksInNewWindow&lt;/a&gt;&lt;br&gt;&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkSaveEmptyTemplate&quot; type=&quot;checkbox&quot;&gt; &lt;a tiddlylink=&quot;SaveEmptyTemplate&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #SaveEmptyTemplate&quot; href=&quot;#SaveEmptyTemplate&quot; class=&quot;externalLink&quot;&gt;SaveEmptyTemplate&lt;/a&gt;&lt;br&gt;&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkToggleLinks&quot; type=&quot;checkbox&quot;&gt; Clicking on links to tiddlers that are already open causes them to close&lt;br&gt;&lt;sup&gt;(override with Control or other modifier key)&lt;/sup&gt;&lt;br&gt;&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkHttpReadOnly&quot; type=&quot;checkbox&quot;&gt; &lt;a tiddlylink=&quot;HideEditingFeatures&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #HideEditingFeatures&quot; href=&quot;#HideEditingFeatures&quot; class=&quot;externalLink&quot;&gt;HideEditingFeatures&lt;/a&gt; when viewed over HTTP&lt;br&gt;&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkForceMinorUpdate&quot; type=&quot;checkbox&quot;&gt; Treat edits as &lt;a tiddlylink=&quot;MinorChanges&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #MinorChanges&quot; href=&quot;#MinorChanges&quot; class=&quot;externalLink&quot;&gt;MinorChanges&lt;/a&gt; by preserving date and time&lt;br&gt;&lt;sup&gt;(override with Shift key when clicking 'done' or by pressing &lt;a tiddlylink=&quot;Ctrl-Shift-Enter&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Ctrl-Shift-Enter&quot; href=&quot;#Ctrl-Shift-Enter&quot; class=&quot;externalLink&quot;&gt;Ctrl-Shift-Enter&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkConfirmDelete&quot; type=&quot;checkbox&quot;&gt; &lt;a tiddlylink=&quot;ConfirmBeforeDeleting&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ConfirmBeforeDeleting&quot; href=&quot;#ConfirmBeforeDeleting&quot; class=&quot;externalLink&quot;&gt;ConfirmBeforeDeleting&lt;/a&gt;&lt;br&gt;Maximum number of lines in a tiddler edit box: &lt;input class=&quot;txtOptionInput&quot; option=&quot;txtMaxEditRows&quot;&gt;&lt;br&gt;Folder name for backup files: &lt;input class=&quot;txtOptionInput&quot; option=&quot;txtBackupFolder&quot;&gt;&lt;br&gt;&lt;input class=&quot;chkOptionInput&quot; option=&quot;chkInsertTabs&quot; type=&quot;checkbox&quot;&gt; Use tab key to insert tab characters instead of jumping to next field</description>
<link>http://erl.dougedmunds.com#AdvancedOptions</link>
<pubDate>Sat, 06 Oct 2007 23:14:00 GMT</pubDate>
</item>
<item>
<title>GS Messages</title>
<description>Each object/option combination can have a unique message, consisting&lt;br&gt;of two fields:  Data (anything) and Arg (a list). &lt;br&gt;You decide what is held in the Data field, when you create/configure the object.&lt;br&gt;The option (third element in the tuple) controls what is sent in the Arg field. &lt;br&gt;&lt;br&gt;As each Arg is a list, the last item extracted will alway be the 'head of the tail', &lt;br&gt;and the tail will be discarded. E.g., [Something, Head | _ ]. &lt;br&gt;&lt;br&gt;&lt;strong&gt;configure&lt;/strong&gt; &lt;br&gt;&lt;ul&gt;&lt;li&gt;{gs,&lt;a tiddlylink=&quot;ObjectID&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectID&quot; href=&quot;#ObjectID&quot; class=&quot;externalLink&quot;&gt;ObjectID&lt;/a&gt;,configure,Data,[W,H | Rest]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;W = width&lt;/li&gt;&lt;li&gt;H = height &lt;/li&gt;&lt;ul&gt;&lt;li&gt;Applies to many objects, not just window (put configure in the search box to see where)&lt;/li&gt;&lt;li&gt;Tracks size change&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;br&gt;&lt;strong&gt;buttonpress&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt; {gs,&lt;a tiddlylink=&quot;ObjectId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectId&quot; href=&quot;#ObjectId&quot; class=&quot;externalLink&quot;&gt;ObjectId&lt;/a&gt;,buttonpress,Data,[&lt;a tiddlylink=&quot;MouseButton&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #MouseButton&quot; href=&quot;#MouseButton&quot; class=&quot;externalLink&quot;&gt;MouseButton&lt;/a&gt;,X,Y|_]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a tiddlylink=&quot;MouseButton&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #MouseButton&quot; href=&quot;#MouseButton&quot; class=&quot;externalLink&quot;&gt;MouseButton&lt;/a&gt; = 1, 2 or 3&lt;/li&gt;&lt;li&gt;X = coordinate (left-right) of mouse when pressed&lt;/li&gt;&lt;li&gt;Y = coordinate (up-down) of mouse when pressed      &lt;/li&gt;&lt;li&gt;_ = unknown tail content, ignored.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;buttonrelease&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt; {gs,&lt;a tiddlylink=&quot;ObjectId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectId&quot; href=&quot;#ObjectId&quot; class=&quot;externalLink&quot;&gt;ObjectId&lt;/a&gt;,buttonrelease,Data,[&lt;a tiddlylink=&quot;MouseButton&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #MouseButton&quot; href=&quot;#MouseButton&quot; class=&quot;externalLink&quot;&gt;MouseButton&lt;/a&gt;,X,Y|_]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a tiddlylink=&quot;MouseButton&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #MouseButton&quot; href=&quot;#MouseButton&quot; class=&quot;externalLink&quot;&gt;MouseButton&lt;/a&gt; = 1, 2 or 3&lt;/li&gt;&lt;ul&gt;&lt;li&gt;1 = left &lt;/li&gt;&lt;li&gt;2 = right&lt;/li&gt;&lt;li&gt;3 = middle&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;X = coordinate (left-right) of mouse when pressed&lt;/li&gt;&lt;li&gt;Y = coordinate (up-down) of mouse when pressed      &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;enter&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt; {gs,&lt;a tiddlylink=&quot;ObjectId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectId&quot; href=&quot;#ObjectId&quot; class=&quot;externalLink&quot;&gt;ObjectId&lt;/a&gt;,enter, Data,[]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Applied to the mouse pointer. &lt;/li&gt;&lt;li&gt;The event can be trapped, but there is no additional info provided&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;br&gt;&lt;strong&gt;leave&lt;/strong&gt; &lt;br&gt;&lt;ul&gt;&lt;li&gt; {gs,&lt;a tiddlylink=&quot;ObjectId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectId&quot; href=&quot;#ObjectId&quot; class=&quot;externalLink&quot;&gt;ObjectId&lt;/a&gt;,leave, Data,[]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Applied to the mouse pointer. &lt;/li&gt;&lt;li&gt;The event can be trapped, but there is no additional info provided&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;focus&lt;/strong&gt; &lt;br&gt;&lt;ul&gt;&lt;li&gt; {gs,&lt;a tiddlylink=&quot;ObjectId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectId&quot; href=&quot;#ObjectId&quot; class=&quot;externalLink&quot;&gt;ObjectId&lt;/a&gt;,focus, Data,[&lt;a tiddlylink=&quot;FocusFlag&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #FocusFlag&quot; href=&quot;#FocusFlag&quot; class=&quot;externalLink&quot;&gt;FocusFlag&lt;/a&gt;|_]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a tiddlylink=&quot;FocusFlag&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #FocusFlag&quot; href=&quot;#FocusFlag&quot; class=&quot;externalLink&quot;&gt;FocusFlag&lt;/a&gt; = 1 or 0&lt;/li&gt;&lt;ul&gt;&lt;li&gt;1 = object has gained keyboard focus.&lt;/li&gt;&lt;li&gt;0 = object has lost keyboard focus.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Not sure if tab/return automatically cause keyboard focus change&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;keypress&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt; {gs,&lt;a tiddlylink=&quot;ObjectId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectId&quot; href=&quot;#ObjectId&quot; class=&quot;externalLink&quot;&gt;ObjectId&lt;/a&gt;,keypress,Data,[Keysym,Keycode,Shift,Control|_]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Keysym = examples: a,b,c.., 1,2,3..., 'Return', 'Delete', 'Insert', 'Home', '&lt;a tiddlylink=&quot;BackSpace&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #BackSpace&quot; href=&quot;#BackSpace&quot; class=&quot;externalLink&quot;&gt;BackSpace&lt;/a&gt;', 'End'. (single quotes required)&lt;/li&gt;&lt;li&gt;Keycode = keycode number for the key that was pressed&lt;/li&gt;&lt;li&gt;Shift = 1 or 0 &lt;/li&gt;&lt;ul&gt;&lt;li&gt;1 = held down when other key pressed&lt;/li&gt;&lt;li&gt;0 = not held down when other key pressed&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Control = 1 or 0 &lt;/li&gt;&lt;ul&gt;&lt;li&gt;1 = held down when other key pressed&lt;/li&gt;&lt;li&gt;0 = not held down when other key pressed&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;keyrelease&lt;/strong&gt; &lt;br&gt;&lt;ul&gt;&lt;li&gt;not documented&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;motion&lt;/strong&gt; &lt;br&gt;&lt;ul&gt;&lt;li&gt;{gs,&lt;a tiddlylink=&quot;ObjectId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectId&quot; href=&quot;#ObjectId&quot; class=&quot;externalLink&quot;&gt;ObjectId&lt;/a&gt;,motion,Data,[X,Y|_]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;X = position (left-right) of mouse pointer&lt;/li&gt;&lt;li&gt;Y = position (up-down) of mouse pointer&lt;/li&gt;&lt;ul&gt;&lt;li&gt; Run the code in &lt;a tiddlylink=&quot;ex07&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ex07&quot; href=&quot;#ex07&quot; class=&quot;externalLink&quot;&gt;ex07&lt;/a&gt; to see how erlang responds to motion.  Try very fast motion.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;click&lt;/strong&gt; &lt;br&gt;&lt;ul&gt;&lt;li&gt;User guide says Arg is 'object-specific'. &lt;/li&gt;&lt;/ul&gt;click - button examples&lt;br&gt;&lt;ul&gt;&lt;li&gt; {gs,&lt;a tiddlylink=&quot;Any_Rb&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #Any_Rb&quot; href=&quot;#Any_Rb&quot; class=&quot;externalLink&quot;&gt;Any_Rb&lt;/a&gt;,click,Data,[Text, Grp, a | Rest]} &lt;/li&gt;&lt;li&gt; {gs,rb3,click,Data,[Text, Grp, b | Rest]} &lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;strong&gt;doubleclick&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;User guide says Arg is 'object-specific'. &lt;/li&gt;&lt;/ul&gt;&lt;br&gt;click and doubleclick - listbox &lt;br&gt;&lt;ul&gt;&lt;li&gt;{gs, &lt;a tiddlylink=&quot;ListBox&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ListBox&quot; href=&quot;#ListBox&quot; class=&quot;externalLink&quot;&gt;ListBox&lt;/a&gt;, click, Data, [Index, Text,Bool | _]}&lt;/li&gt;&lt;li&gt;{gs, &lt;a tiddlylink=&quot;ListBox&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ListBox&quot; href=&quot;#ListBox&quot; class=&quot;externalLink&quot;&gt;ListBox&lt;/a&gt;, doubleclick, Data, [Index, Text,Bool | _]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Bool = true or false &lt;/li&gt;&lt;ul&gt;&lt;li&gt;true = object is selected&lt;/li&gt;&lt;li&gt;false = object is de-selected.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;See &lt;a tiddlylink=&quot;ex10&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ex10&quot; href=&quot;#ex10&quot; class=&quot;externalLink&quot;&gt;ex10&lt;/a&gt;&lt;br&gt;click and doubleclick are two discrete events&lt;br&gt;&lt;br&gt;click and doubleclick - gridline &lt;br&gt;&lt;ul&gt;&lt;li&gt;{gs, &lt;a tiddlylink=&quot;GridLineId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GridLineId&quot; href=&quot;#GridLineId&quot; class=&quot;externalLink&quot;&gt;GridLineId&lt;/a&gt;, click, Data, [Col, Row, Text | _]}&lt;/li&gt;&lt;li&gt;{gs, &lt;a tiddlylink=&quot;GridLineId&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GridLineId&quot; href=&quot;#GridLineId&quot; class=&quot;externalLink&quot;&gt;GridLineId&lt;/a&gt;, doubleclick, Data, [Col, Row, Text | _]}&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Col = column&lt;/li&gt;&lt;li&gt;Row = row&lt;/li&gt;&lt;li&gt;Text = text&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt; &lt;br&gt;&lt;strong&gt;destroy&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;{gs,&lt;a tiddlylink=&quot;ObjectID&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ObjectID&quot; href=&quot;#ObjectID&quot; class=&quot;externalLink&quot;&gt;ObjectID&lt;/a&gt;,destroy,_,_} &lt;/li&gt;&lt;ul&gt;&lt;li&gt;Applies to many objects, not just window&lt;/li&gt;&lt;li&gt;Be sure to capture the destroy message from window, otherwise erlang may hang.&lt;/li&gt;&lt;li&gt;Does not cause gs to stop. &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;  &lt;br&gt;&lt;hr&gt;&lt;br&gt;&lt;strong&gt;Physical event descriptions&lt;/strong&gt; &lt;br&gt;&lt;br&gt;Args are the last element of the gs message: {gs, &lt;a tiddlylink=&quot;IdOrName&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #IdOrName&quot; href=&quot;#IdOrName&quot; class=&quot;externalLink&quot;&gt;IdOrName&lt;/a&gt;, &lt;a tiddlylink=&quot;EventType&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #EventType&quot; href=&quot;#EventType&quot; class=&quot;externalLink&quot;&gt;EventType&lt;/a&gt;, Data, Args}.  All are lists.&lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;Event   	&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;Args	  	&lt;/td&gt;&lt;td&gt;Description of event&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;buttonpress 	&lt;/td&gt;&lt;td&gt;[&lt;a tiddlylink=&quot;ButtonNo&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ButtonNo&quot; href=&quot;#ButtonNo&quot; class=&quot;externalLink&quot;&gt;ButtonNo&lt;/a&gt;,X,Y&lt;span&gt;|&lt;/span&gt;_] 	&lt;/td&gt;&lt;td&gt;A mouse button was pressed over the object.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;buttonrelease 	&lt;/td&gt;&lt;td&gt;[&lt;a tiddlylink=&quot;ButtonNo&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #ButtonNo&quot; href=&quot;#ButtonNo&quot; class=&quot;externalLink&quot;&gt;ButtonNo&lt;/a&gt;,X,Y&lt;span&gt;|&lt;/span&gt;_] 	&lt;/td&gt;&lt;td&gt;A mouse button was released over the object.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td align=&quot;left&quot;&gt;enter 	&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;[]&lt;/td&gt;&lt;td&gt;Delivered when the mouse pointer enters the objects area.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;focus  	&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;[Int&lt;span&gt;|&lt;/span&gt;_] 	&lt;/td&gt;&lt;td&gt;Keyboard focus has changed. 0 means lost focus. 1 means gained focus.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;keypress 	&lt;/td&gt;&lt;td&gt;[&lt;a tiddlylink=&quot;KeySym&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #KeySym&quot; href=&quot;#KeySym&quot; class=&quot;externalLink&quot;&gt;KeySym&lt;/a&gt;,Keycode, Shift, Control&lt;span&gt;|&lt;/span&gt;_] 	&lt;/td&gt;&lt;td&gt;A key has been pressed.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td align=&quot;left&quot;&gt;leave 	&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;[] 	&lt;/td&gt;&lt;td&gt;Mouse pointer leaves the object.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;motion 	&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;[X,Y&lt;span&gt;|&lt;/span&gt;_] 	&lt;/td&gt;&lt;td&gt;The mouse pointer is moving in the object. Used when tracking the mouse in a window.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td align=&quot;left&quot;&gt;click 	&lt;/td&gt;&lt;td&gt;&amp;lt;object specific&amp;gt; 	&lt;/td&gt;&lt;td&gt;Pressing a button or operating on a object in some predefined way.&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;doubleclick 	&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;&amp;lt;object specific&amp;gt;&lt;/td&gt;&lt;td&gt;Pressing the mouse button twice quickly. Useful with list boxes.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;keyrelease (letting go of the key) no documentation of the Args.&lt;br&gt;configure (resizing of an object) &lt;span&gt;—&lt;/span&gt; see above.&lt;br&gt;&lt;hr&gt;&lt;br&gt;Events aren't much use unless they provide information.  The information is sent&lt;br&gt;in a message when the event occurs.  That message is handled like any&lt;br&gt;other message, typically, by a receive block inside a loop function.&lt;br&gt;&lt;br&gt;It is very likely that the receive block will be handling messages from&lt;br&gt;several different objects in the window. The trick is to pattern match correctly, &lt;br&gt;so that the event eventually triggers the result you want.  This site&lt;br&gt;does not get into pattern matching.  If you don't understand pattern matching,&lt;br&gt;go read the official docs, then come back here later.    &lt;br&gt;&lt;br&gt;Events are sent in gs messages (5-tuple).  &lt;br&gt;&lt;span class=&quot;marked&quot;&gt;{gs, &lt;a tiddlylink=&quot;IdOrName&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #IdOrName&quot; href=&quot;#IdOrName&quot; class=&quot;externalLink&quot;&gt;IdOrName&lt;/a&gt;, &lt;a tiddlylink=&quot;EventType&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #EventType&quot; href=&quot;#EventType&quot; class=&quot;externalLink&quot;&gt;EventType&lt;/a&gt;, Data, Args}&lt;/span&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt; gs is a tag which says it is an event from the gs graphics server.&lt;/li&gt;&lt;li&gt; &lt;a tiddlylink=&quot;IdOrName&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #IdOrName&quot; href=&quot;#IdOrName&quot; class=&quot;externalLink&quot;&gt;IdOrName&lt;/a&gt; contains the object identifier or the name of the object in which the event occurred.&lt;/li&gt;&lt;li&gt; &lt;a tiddlylink=&quot;EventType&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #EventType&quot; href=&quot;#EventType&quot; class=&quot;externalLink&quot;&gt;EventType&lt;/a&gt; contains the type of event which has occurred. In the example shown, it is either click or enter.&lt;/li&gt;&lt;li&gt; Data is a field which the user can set to any Erlang term. It is very useful to have the object store arbitrary data which is delivered with the event.&lt;/li&gt;&lt;li&gt; Args is a list which contains event specific information. In a motion event, the Args argument would contain the x and y coordinates.&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Here is an example. &lt;br&gt;A click event is received from an object named button1:&lt;br&gt;&lt;pre&gt;receive 
{gs,button1,click,Data,Arg} -&amp;gt; do something, using Data and Arg
end
&lt;/pre&gt;If Data wasn't important you could code it like this:&lt;br&gt;&lt;pre&gt;receive 
{gs,button1,click,_Data,Arg} -&amp;gt; do something, using Arg
end
&lt;/pre&gt;&lt;br&gt;</description>
<category>GS Options</category>
<category>GS Events</category>
<link>http://erl.dougedmunds.com#%5B%5BGS%20Messages%5D%5D</link>
<pubDate>Sat, 06 Oct 2007 23:00:00 GMT</pubDate>
</item>
<item>
<title>GS Events</title>
<description>&lt;strong&gt;All the GS Event options&lt;/strong&gt; &lt;br&gt;configure, buttonpress, buttonrelease, enter, leave, focus, keypress, keyrelease, motion, click, doubleclick, destroy&lt;br&gt;&lt;br&gt;&lt;strong&gt;An events analogy&lt;/strong&gt;  &lt;br&gt;The event is 'ring'. The objects are cellphone and toothpick&lt;br&gt;1. Cellphones can ring, toothpicks can't ring.  &lt;br&gt;2. A cellphone doesn't ring unless it is on. &lt;br&gt;3. Someone has to hear it ring.&lt;br&gt;&lt;br&gt;Think object first, event second, message third&lt;br&gt;&lt;ul&gt;&lt;li&gt; &lt;span class=&quot;marked&quot;&gt;Can&lt;/span&gt; this type of object recognize this type of event? &lt;/li&gt;&lt;/ul&gt;For example, a &lt;a tiddlylink=&quot;window&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #window&quot; href=&quot;#window&quot; class=&quot;externalLink&quot;&gt;window&lt;/a&gt; recognizes buttonpress, but not click. &lt;br&gt;&lt;ul&gt;&lt;li&gt;If so, &lt;span class=&quot;marked&quot;&gt;Make the object recognize the event&lt;/span&gt; &lt;/li&gt;&lt;ul&gt;&lt;li&gt; Activate it in the process of creating the object. &lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Finally, &lt;span class=&quot;marked&quot;&gt;do something&lt;/span&gt; with it.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;See &lt;a tiddlylink=&quot;GS Messages&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Messages&quot; href=&quot;#GS%20Messages&quot; class=&quot;externalLink&quot;&gt;GS Messages&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br&gt;Default activation status of certain events.   &lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;{Option,Value}   	&lt;/td&gt;&lt;td&gt;Default&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;{buttonpress, Bool} 	&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;{buttonrelease, Bool} 	&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;{enter, Bool} 	&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;{leave, Bool} 	&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td&gt;{keypress, Bool} 	&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;{motion, Bool} 	&lt;/td&gt;&lt;td&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;If the default setting is false, then the sending object must be configured, for example: &lt;br&gt;&lt;pre&gt;    gs:config(Win,[{configure,true},{keypress,true}]),
    gs:config(Win,[{buttonpress,true},{buttonrelease,true}]),
&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;See &lt;a tiddlylink=&quot;GS Messages&quot; refresh=&quot;link&quot; target=&quot;_blank&quot; title=&quot;External link to #GS Messages&quot; href=&quot;#GS%20Messages&quot; class=&quot;externalLink&quot;&gt;GS Messages&lt;/a&gt; for format and usage of options in message passing.&lt;br&gt;&lt;br&gt;</description>
<category>GS Options</category>
<link>http://erl.dougedmunds.com#%5B%5BGS%20Events%5D%5D</link>
<pubDate>Sat, 06 Oct 2007 22:58:00 GMT</pubDate>
</item>
<item>
<title>About</title>
<description>&lt;strong&gt;Questions? Suggestions? Errors?&lt;/strong&gt; &lt;br&gt;&lt;br&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr class=&quot;evenRow&quot;&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;AT&lt;/td&gt;&lt;td&gt;DOT&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;oddRow&quot;&gt;&lt;td align=&quot;left&quot;&gt;dae&lt;/td&gt;&lt;td align=&quot;left&quot;&gt;douglasedmunds&lt;/td&gt;&lt;td&gt;com&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;&lt;strong&gt;About&lt;/strong&gt;&lt;br&gt;&lt;br&gt;This wiki is based on &lt;a target=&quot;_blank&quot; title=&quot;External link to http://tiddlywiki.com&quot; href=&quot;http://tiddlywiki.com&quot; class=&quot;externalLink&quot;&gt;TiddlyWiki &lt;/a&gt;. The boxes of info are called tiddlers. This site is very hypertext-linked. You can click any bold blue item or use one of the menu choices above for links to other tiddlers. The search box at the right is also very handy.  &lt;br&gt;&lt;br&gt;I am using a slightly modified version available at &lt;a target=&quot;_blank&quot; title=&quot;External link to http://mptw.tiddlyspot.com&quot; href=&quot;http://mptw.tiddlyspot.com&quot; class=&quot;externalLink&quot;&gt;MonkeyPirateTiddlyWiki&lt;/a&gt;.  &lt;br&gt;The site in not writeable (This is not a public wiki like Wikipedia).  You may occasionally get a message about&lt;br&gt;saving changes.  Disregard them.&lt;br&gt;&lt;br&gt;&lt;hr&gt;&lt;strong&gt;I want a local copy!&lt;/strong&gt; &lt;br&gt;Bear in mind that this file is being updated hourly, daily, weekly, regularly, now and then, and occasionally.&lt;br&gt;To download a copy of the most recent version, &lt;a target=&quot;_blank&quot; title=&quot;External link to http://erl.dougedmunds.com/index.html&quot; href=&quot;http://erl.dougedmunds.com/index.html&quot; class=&quot;externalLink&quot;&gt;right-click here &lt;/a&gt;, and save the file to disk. Everything is in that one file.&lt;br&gt;&lt;br&gt;&lt;br&gt;Author: &lt;span class=&quot;marked&quot;&gt;Doug Edmunds&lt;/span&gt;&lt;br&gt;</description>
<category>Introduction</category>
<link>http://erl.dougedmunds.com#About</link>
<pubDate>Sat, 06 Oct 2007 22:50:00 GMT</pubDate>
</item>
</channel>
</rss>