Hooks » History » Version 4
Version 3 (murth murth, 08/07/2009 06:26 AM) → Version 4/47 (Anonymous, 08/07/2009 04:03 PM)
h1. Hooks\015\012\015\012Here is a list of the existing Hooks\015\012\015\012Currently there exist only three types of hooks, although more are planned. Every feature of [[Subtlext]] can be used inside these hooks without instantiating a subtle object first - just omit it:\015\012\015\012<pre><code class="ruby">\015\012clients.each { |c| puts c.name }\015\012\015\012find_tag("subtle")\015\012</code></pre>\015\012\015\012The hooks.\015\012The following hooks exist so far:\015\012\015\012{{>toc}}\015\012\015\012h2. far:\015\012\015\012h2. Create\015\012\015\012Triggers on creation of new clients\015\012<pre><code class="ruby">\015\012:HookCreate clients and has the new client as parameter:\015\012<pre>"HookCreate" => { |c| puts c.name }\015\012</code></pre>\015\012\015\012h2. }</pre>\015\012\015\012h2. Jump\015\012\015\012Triggers on view jumps and has the active view as parameter:\015\012<pre><code class="ruby">\015\012:HookJump parameter:\015\012<pre>"HookJump" => { |v| puts v.name }\015\012</code></pre>\015\012\015\012h2. }</pre>\015\012\015\012h3. Focus\015\012\015\012Triggers when a client gets focus and has the focussed client as parameter:\015\012<pre><code class="ruby">\015\012:HookFocus parameter:\015\012<pre>"HookFocus" => { |c| puts c.name }\015\012</code></pre>\015\012\015\012h2. Gravity\015\012\015\012Triggers when a client gets a new gravtiy\015\012<pre><code class="ruby">\015\012:HookGravity => { |c| puts c.name }\015\012</code></pre> }</pre>\015\012