Location: PHPKode > projects > Aukyla Document Management System > doc/html/a00217.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Aukyla PHP Framework</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="StyleSheet" href="auton.css" type="text/css" media="screen">
  </head>

  <body>
    <div id="mainmenu">
      <a href="http://www.auton.nl/" class="home">Home</a>
    </div>
    <div id="submenu">
      <a class="logo" href="http://www.auton.nl/"></a>

      <div class="head">Ads</div>
      <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=116358&amp;type=1" alt="SourceForge.net Logo" style="padding: 2px 4px; width: 88px; height: 31px; border: 0px"></a>
      <a href="http://getfirefox.com/" title="Get Firefox - The Browser, Reloaded."><img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png" alt="Get Firefox" style="width: 110px; height: 32px; border: 0px"></a>
    </div>
    <div id="main">
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">base</a></div>
<h1>GUI.php</h1><div class="fragment"><pre class="fragment">00001 &lt;?php
00002 <span class="comment">/*</span>
00003 <span class="comment">     GUI.php, the main window and other widgets for creating GUI's</span>
00004 <span class="comment">     Copyright (C) 2004 Arend van Beelen, Auton Rijnsburg</span>
00005 <span class="comment"></span>
00006 <span class="comment">     This program is free software; you can redistribute it and/or modify it</span>
00007 <span class="comment">     under the terms of the GNU General Public License as published by the Free</span>
00008 <span class="comment">     Software Foundation; either version 2 of the License, or (at your option)</span>
00009 <span class="comment">     any later version.</span>
00010 <span class="comment"></span>
00011 <span class="comment">     This program is distributed in the hope that it will be useful, but WITHOUT</span>
00012 <span class="comment">     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span>
00013 <span class="comment">     FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for</span>
00014 <span class="comment">     more details.</span>
00015 <span class="comment"></span>
00016 <span class="comment">     You should have received a copy of the GNU General Public License along</span>
00017 <span class="comment">     with this program; if not, write to the Free Software Foundation, Inc.,</span>
00018 <span class="comment">     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
00019 <span class="comment"></span>
00020 <span class="comment">     For any questions, comments or whatever, you may mail me at: hide@address.com</span>
00021 <span class="comment">*/</span>
00022 
00023 require_once('Constants.php');
00024 require_once('<a class="code" href="a00119.html">Locale</a>.php');
00025 require_once('<a class="code" href="a00129.html">Messages</a>.php');
00026 require_once('<a class="code" href="a00134.html">Output</a>.php');
00027 require_once('Widgets.php');
00028 require_once('Windows.php');
00029 
<a name="l00039"></a><a class="code" href="a00125.html">00039</a> <span class="keyword">class </span><a class="code" href="a00125.html">MainWindow</a> <span class="keyword">extends</span> <a class="code" href="a00167.html">Window</a>
00040 {
<a name="l00051"></a><a class="code" href="a00125.html#a0">00051</a>         <span class="keyword">public</span> function <a class="code" href="a00125.html#a0">__construct</a>($title = '')
00052         {
00053                 parent::__construct(null, '', $title);
00054 
00055                 $instance = self::instance();
00056 
00057                 <span class="keywordflow">if</span>($instance !== null)
00058                 {
00059                         die('Only one <a class="code" href="a00125.html">MainWindow</a> <a class="code" href="a00125.html#e0">instance</a> can be created.');
00060                 }
00061                 <span class="keywordflow">else</span>
00062                 {
00063                         self::$instance = $this;
00064                 }
00065 
00066                 $this-&gt;windowTag = 'mainwindow';
00067         }
00068 
<a name="l00075"></a><a class="code" href="a00125.html#e0">00075</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="a00125.html#e0">instance</a>()
00076         {
00077                 <span class="keywordflow">return</span> self::$instance;
00078         }
00079 
<a name="l00080"></a><a class="code" href="a00125.html#p0">00080</a>         <span class="keyword">protected</span> $windowTag;
00081         <span class="keyword">private</span> <span class="keyword">static</span> $instance = null;
00082 }
00083 
<a name="l00087"></a><a class="code" href="a00149.html">00087</a> <span class="keyword">class </span><a class="code" href="a00149.html">Section</a> <span class="keyword">extends</span> <a class="code" href="a00096.html">Container</a>
00088 {
<a name="l00094"></a><a class="code" href="a00149.html#a0">00094</a>         <span class="keyword">public</span> function <a class="code" href="a00149.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent)
00095         {
00096                 parent::__construct($parent);
00097         }
00098 
<a name="l00099"></a><a class="code" href="a00149.html#a1">00099</a>         <span class="keyword">public</span> function <a class="code" href="a00149.html#a1">show</a>()
00100         {
00101                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;section'.$this-&gt;parentProperties().<span class="charliteral">'&gt;'</span>);
00102                 parent::show();
00103                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;/section&gt;');
00104         }
00105 }
00106 
<a name="l00110"></a><a class="code" href="a00088.html">00110</a> <span class="keyword">class </span><a class="code" href="a00088.html">Box</a> <span class="keyword">extends</span> <a class="code" href="a00096.html">Container</a>
00111 {
<a name="l00112"></a><a class="code" href="a00088.html#a0">00112</a>         <span class="keyword">public</span> function <a class="code" href="a00088.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent, $<span class="keywordtype">id</span> = '')
00113         {
00114                 parent::__construct($parent, $<span class="keywordtype">id</span>);
00115         }
00116 
<a name="l00122"></a><a class="code" href="a00088.html#a1">00122</a>         <span class="keyword">public</span> function <a class="code" href="a00088.html#a1">orientation</a>()
00123         {
00124                 <span class="keywordflow">return</span> 'vertical';
00125         }
00126 
<a name="l00130"></a><a class="code" href="a00088.html#a2">00130</a>         <span class="keyword">public</span> function <a class="code" href="a00088.html#a2">setOrientation</a>($orientation)
00131         {
00132         }
00133 
<a name="l00134"></a><a class="code" href="a00088.html#a3">00134</a>         <span class="keyword">public</span> function <a class="code" href="a00088.html#a3">show</a>()
00135         {
00136                 <a class="code" href="a00134.html#e5">Output::write</a>(<span class="stringliteral">"&lt;box"</span>.$this-&gt;parentProperties().<span class="charliteral">'&gt;'</span>);
00137                 parent::show();
00138                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;/box&gt;');
00139         }
00140 }
00141 
<a name="l00145"></a><a class="code" href="a00110.html">00145</a> <span class="keyword">class </span><a class="code" href="a00110.html">Header</a> <span class="keyword">extends</span> <a class="code" href="a00141.html">RawContainer</a>
00146 {
<a name="l00147"></a><a class="code" href="a00110.html#a0">00147</a>         <span class="keyword">public</span> function <a class="code" href="a00110.html#a0">show</a>()
00148         {
00149                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;header'.$this-&gt;parentProperties().<span class="charliteral">'&gt;'</span>);
00150                 parent::show();
00151                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;/header&gt;');
00152         }
00153 }
00154 
<a name="l00158"></a><a class="code" href="a00136.html">00158</a> <span class="keyword">class </span><a class="code" href="a00136.html">Paragraph</a> <span class="keyword">extends</span> <a class="code" href="a00141.html">RawContainer</a>
00159 {
<a name="l00160"></a><a class="code" href="a00136.html#a0">00160</a>         <span class="keyword">public</span> function <a class="code" href="a00136.html#a0">show</a>()
00161         {
00162                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;paragraph'.$this-&gt;parentProperties().<span class="charliteral">'&gt;'</span>);
00163                 parent::show();
00164                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;/paragraph&gt;');
00165         }
00166 }
00167 
<a name="l00171"></a><a class="code" href="a00118.html">00171</a> <span class="keyword">class </span><a class="code" href="a00118.html">Link</a> <span class="keyword">extends</span> <a class="code" href="a00141.html">RawContainer</a>
00172 {
<a name="l00180"></a><a class="code" href="a00118.html#a0">00180</a>         <span class="keyword">public</span> function <a class="code" href="a00118.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent, $url, $text = '')
00181         {
00182                 parent::__construct($parent, $text);
00183 
00184                 $this-&gt;<a class="code" href="a00118.html#a1">url</a> = $url;
00185         }
00186 
<a name="l00194"></a><a class="code" href="a00118.html#a1">00194</a>         <span class="keyword">public</span> function <a class="code" href="a00118.html#a1">url</a>()
00195         {
00196                 <span class="keywordflow">return</span> $this-&gt;url;
00197         }
00198 
<a name="l00206"></a><a class="code" href="a00118.html#a2">00206</a>         <span class="keyword">public</span> function <a class="code" href="a00118.html#a2">setUrl</a>($url)
00207         {
00208                 $this-&gt;<a class="code" href="a00118.html#a1">url</a> = $url;
00209         }
00210 
<a name="l00214"></a><a class="code" href="a00118.html#a3">00214</a>         <span class="keyword">public</span> function <a class="code" href="a00118.html#a3">show</a>()
00215         {
00216                 <a class="code" href="a00134.html#e5">Output::write</a>(<span class="stringliteral">"&lt;link href=\"{$this-&gt;url}\""</span>.$this-&gt;parentProperties().<span class="charliteral">'&gt;'</span>);
00217                 parent::show();
00218                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;/link&gt;');
00219         }
00220 
00221         <span class="keyword">private</span> $url;
00222 }
00223 
<a name="l00230"></a><a class="code" href="a00109.html">00230</a> <span class="keyword">class </span><a class="code" href="a00109.html">GroupBox</a> <span class="keyword">extends</span> <a class="code" href="a00141.html">RawContainer</a>
00231 {
<a name="l00240"></a><a class="code" href="a00109.html#a0">00240</a>         <span class="keyword">public</span> function <a class="code" href="a00109.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent, $label)
00241         {
00242                 parent::__construct($parent);
00243 
00244                 $this-&gt;<a class="code" href="a00109.html#a1">label</a> = $label;
00245         }
00246 
<a name="l00254"></a><a class="code" href="a00109.html#a1">00254</a>         <span class="keyword">public</span> function <a class="code" href="a00109.html#a1">label</a>()
00255         {
00256                 <span class="keywordflow">return</span> $this-&gt;label;
00257         }
00258 
<a name="l00266"></a><a class="code" href="a00109.html#a2">00266</a>         <span class="keyword">public</span> function <a class="code" href="a00109.html#a2">setLabel</a>($label)
00267         {
00268                 $this-&gt;<a class="code" href="a00109.html#a1">label</a> = $label;
00269         }
00270 
<a name="l00271"></a><a class="code" href="a00109.html#a3">00271</a>         <span class="keyword">public</span> function <a class="code" href="a00109.html#a3">show</a>()
00272         {
00273                 <a class="code" href="a00134.html#e5">Output::write</a>(<span class="stringliteral">"&lt;groupbox label=\"{$this-&gt;label}\""</span>.$this-&gt;parentProperties().<span class="charliteral">'&gt;'</span>);
00274                 parent::show();
00275                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;/groupbox&gt;');
00276         }
00277 
00278         <span class="keyword">private</span> $label;
00279 }
00280 
<a name="l00287"></a><a class="code" href="a00113.html">00287</a> <span class="keyword">class </span><a class="code" href="a00113.html">Image</a> <span class="keyword">extends</span> <a class="code" href="a00142.html">RawWidget</a>
00288 {
<a name="l00295"></a><a class="code" href="a00113.html#a0">00295</a>         function <a class="code" href="a00113.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent, $url)
00296         {
00297                 parent::__construct($parent);
00298 
00299                 $this-&gt;title = '';
00300                 $this-&gt;url = $url;
00301         }
00302 
<a name="l00309"></a><a class="code" href="a00113.html#a1">00309</a>         <span class="keyword">public</span> function <a class="code" href="a00113.html#a1">setTitle</a>($title)
00310         {
00311                 $this-&gt;title = $title;
00312         }
00313 
<a name="l00317"></a><a class="code" href="a00113.html#a2">00317</a>         <span class="keyword">public</span> function <a class="code" href="a00113.html#a2">show</a>()
00318         {
00319                 $titleProperty = ($this-&gt;title == '' ? '' : <span class="stringliteral">" title=\"{$this-&gt;title}\""</span>);
00320 
00321                 <a class="code" href="a00134.html#e5">Output::write</a>(<span class="stringliteral">"&lt;image src=\"{$this-&gt;url}\" alt=\"{$this-&gt;text}\"$titleProperty"</span>.$this-&gt;parentProperties().' /&gt;');
00322         }
00323 
<a name="l00324"></a><a class="code" href="a00113.html#p0">00324</a>         <span class="keyword">protected</span> $text;
00325 
00326         <span class="keyword">private</span> $title;
00327         <span class="keyword">private</span> $url;
00328 }
00329 
<a name="l00335"></a><a class="code" href="a00117.html">00335</a> <span class="keyword">class </span><a class="code" href="a00117.html">Line</a> <span class="keyword">extends</span> <a class="code" href="a00141.html">RawContainer</a>
00336 {
<a name="l00343"></a><a class="code" href="a00117.html#a0">00343</a>         <span class="keyword">public</span> function <a class="code" href="a00117.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent, $text = '')
00344         {
00345                 parent::__construct($parent, $text);
00346         }
00347 
<a name="l00348"></a><a class="code" href="a00117.html#a1">00348</a>         <span class="keyword">public</span> function <a class="code" href="a00117.html#a1">show</a>()
00349         {
00350                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;line'.$this-&gt;parentProperties().<span class="charliteral">'&gt;'</span>);
00351                 parent::show();
00352                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;/line&gt;');
00353         }
00354 }
00355 
<a name="l00359"></a><a class="code" href="a00144.html">00359</a> <span class="keyword">class </span><a class="code" href="a00144.html">Ruler</a> <span class="keyword">extends</span> <a class="code" href="a00166.html">Widget</a>
00360 {
<a name="l00361"></a><a class="code" href="a00144.html#a0">00361</a>         <span class="keyword">public</span> function <a class="code" href="a00144.html#a0">show</a>()
00362         {
00363                 <a class="code" href="a00134.html#e5">Output::write</a>('&lt;ruler'.$this-&gt;parentProperties().' /&gt;');
00364         }
00365 }
00366 
<a name="l00381"></a><a class="code" href="a00135.html">00381</a> <span class="keyword">class </span><a class="code" href="a00135.html">PageIcon</a> <span class="keyword">extends</span> <a class="code" href="a00113.html">Image</a>
00382 {
<a name="l00392"></a><a class="code" href="a00135.html#a0">00392</a>         <span class="keyword">public</span> function <a class="code" href="a00135.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent, $icon)
00393         {
00394                 parent::__construct($parent, <span class="stringliteral">"resources/$icon.png"</span>);
00395 
00396                 self::setText(i18n('Page Icon'));
00397                 self::setID('pageicon');
00398 
00399                 $this-&gt;icon = $icon;
00400         }
00401 
<a name="l00410"></a><a class="code" href="a00135.html#e0">00410</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="a00135.html#e0">iconExists</a>($icon)
00411         {
00412                 <span class="keywordflow">return</span> file_exists(AUKYLA_DIR.<span class="stringliteral">"/htdocs/resources/$icon.png"</span>);
00413         }
00414 
<a name="l00415"></a><a class="code" href="a00135.html#a1">00415</a>         <span class="keyword">public</span> function <a class="code" href="a00135.html#a1">show</a>()
00416         {
00417                 <span class="keywordflow">if</span>(<a class="code" href="a00099.html#e2">Decoration::useDecorations</a>() == <span class="keyword">true</span> &amp;&amp; self::iconExists($this-&gt;icon))
00418                 {
00419                         parent::show();
00420                 }
00421         }
00422 
00423         <span class="keyword">private</span> $icon;
00424 }
00425 
<a name="l00439"></a><a class="code" href="a00162.html">00439</a> <span class="keyword">class </span><a class="code" href="a00162.html">Tooltip</a> <span class="keyword">extends</span> <a class="code" href="a00088.html">Box</a>
00440 {
<a name="l00452"></a><a class="code" href="a00162.html#a0">00452</a>         <span class="keyword">public</span> function <a class="code" href="a00162.html#a0">__construct</a>(<a class="code" href="a00096.html">Container</a> $parent, $text)
00453         {
00454                 parent::__construct($parent);
00455 
00456                 self::setCssClass('tooltipbox');
00457                 <span class="keyword">new</span> <a class="code" href="a00136.html">Paragraph</a>($<span class="keyword">this</span>, $text);
00458         }
00459 }
00460 
<a name="l00470"></a><a class="code" href="a00130.html">00470</a> <span class="keyword">class </span><a class="code" href="a00130.html">MessagesWidget</a> <span class="keyword">extends</span> <a class="code" href="a00166.html">Widget</a>
00471 {
<a name="l00472"></a><a class="code" href="a00130.html#a0">00472</a>         <span class="keyword">public</span> function <a class="code" href="a00130.html#a0">show</a>()
00473         {
00474                 Messages::show();
00475         }
00476 }
00477 
00478 ?&gt;
</pre></div>    </div>
  </body>
</html>
Return current item: Aukyla Document Management System