09592ec43d
modified: c/CtrlHistoLink.rb modified: c/Main.rb new file: doc/rdoc/CtrlCheckLinks.html new file: doc/rdoc/CtrlHistoLink.html new file: doc/rdoc/Menu.html new file: doc/rdoc/ReadFile.html new file: doc/rdoc/Vue1.html new file: doc/rdoc/VueHisto.html new file: doc/rdoc/VueMenu.html new file: doc/rdoc/VueResult.html new file: doc/rdoc/c/CtrlCheckLinks_rb.html new file: doc/rdoc/c/CtrlHistoLink_rb.html new file: doc/rdoc/c/Main_rb.html new file: doc/rdoc/c/hello_rb.html new file: doc/rdoc/created.rid new file: doc/rdoc/images/brick.png new file: doc/rdoc/images/brick_link.png new file: doc/rdoc/images/bug.png new file: doc/rdoc/images/bullet_black.png new file: doc/rdoc/images/bullet_toggle_minus.png new file: doc/rdoc/images/bullet_toggle_plus.png new file: doc/rdoc/images/date.png new file: doc/rdoc/images/find.png new file: doc/rdoc/images/loadingAnimation.gif new file: doc/rdoc/images/macFFBgHack.png new file: doc/rdoc/images/package.png new file: doc/rdoc/images/page_green.png new file: doc/rdoc/images/page_white_text.png new file: doc/rdoc/images/page_white_width.png new file: doc/rdoc/images/plugin.png new file: doc/rdoc/images/ruby.png new file: doc/rdoc/images/tag_green.png new file: doc/rdoc/images/wrench.png new file: doc/rdoc/images/wrench_orange.png new file: doc/rdoc/images/zoom.png new file: doc/rdoc/index.html new file: doc/rdoc/m/ReadFile_rb.html new file: doc/rdoc/rdoc.css new file: doc/rdoc/v/Vue1_rb.html new file: doc/rdoc/v/VueHisto_rb.html new file: doc/rdoc/v/VueMenu_rb.html new file: doc/rdoc/v/VueResult_rb.html modified: m/ReadFile.rb modified: v/Vue1.rb modified: v/VueHisto.rb modified: v/VueMenu.rb modified: v/VueResult.rb
330 lines
15 KiB
HTML
330 lines
15 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||
<head>
|
||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
||
|
||
<title>Class: VueHisto</title>
|
||
|
||
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
||
|
||
<script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||
<script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
||
<script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
||
<script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
||
|
||
</head>
|
||
<body id="top" class="class">
|
||
|
||
<div id="metadata">
|
||
<div id="home-metadata">
|
||
<div id="home-section" class="section">
|
||
<h3 class="section-header">
|
||
<a href="./index.html">Home</a>
|
||
<a href="./index.html#classes">Classes</a>
|
||
<a href="./index.html#methods">Methods</a>
|
||
</h3>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="file-metadata">
|
||
<div id="file-list-section" class="section">
|
||
<h3 class="section-header">In Files</h3>
|
||
<div class="section-body">
|
||
<ul>
|
||
|
||
<li><a href="./v/VueHisto_rb.html?TB_iframe=true&height=550&width=785"
|
||
class="thickbox" title="v/VueHisto.rb">v/VueHisto.rb</a></li>
|
||
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div id="class-metadata">
|
||
|
||
<!-- Parent Class -->
|
||
<div id="parent-class-section" class="section">
|
||
<h3 class="section-header">Parent</h3>
|
||
|
||
<p class="link">Object</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- Method Quickref -->
|
||
<div id="method-list-section" class="section">
|
||
<h3 class="section-header">Methods</h3>
|
||
<ul class="link-list">
|
||
|
||
<li><a href="#method-c-new">::new</a></li>
|
||
|
||
<li><a href="#method-i-listenerBouton">#listenerBouton</a></li>
|
||
|
||
<li><a href="#method-i-listenerDestroy">#listenerDestroy</a></li>
|
||
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div id="project-metadata">
|
||
|
||
|
||
|
||
<div id="classindex-section" class="section project-section">
|
||
<h3 class="section-header">Class/Module Index
|
||
<span class="search-toggle"><img src="./images/find.png"
|
||
height="16" width="16" alt="[+]"
|
||
title="show/hide quicksearch" /></span></h3>
|
||
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
||
<fieldset>
|
||
<legend>Quicksearch</legend>
|
||
<input type="text" name="quicksearch" value=""
|
||
class="quicksearch-field" />
|
||
</fieldset>
|
||
</form>
|
||
|
||
<ul class="link-list">
|
||
|
||
<li><a href="./CtrlCheckLinks.html">CtrlCheckLinks</a></li>
|
||
|
||
<li><a href="./CtrlHistoLink.html">CtrlHistoLink</a></li>
|
||
|
||
<li><a href="./Menu.html">Menu</a></li>
|
||
|
||
<li><a href="./ReadFile.html">ReadFile</a></li>
|
||
|
||
<li><a href="./Vue1.html">Vue1</a></li>
|
||
|
||
<li><a href="./VueHisto.html">VueHisto</a></li>
|
||
|
||
<li><a href="./VueMenu.html">VueMenu</a></li>
|
||
|
||
<li><a href="./VueResult.html">VueResult</a></li>
|
||
|
||
</ul>
|
||
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div id="documentation">
|
||
<h1 class="class">VueHisto</h1>
|
||
|
||
<div id="description" class="description">
|
||
|
||
<p>Classe creation de la vue permettant d’aceder a l’historique</p>
|
||
|
||
</div><!-- description -->
|
||
|
||
|
||
|
||
|
||
<div id="5Buntitled-5D" class="documentation-section">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- Methods -->
|
||
|
||
<div id="public-class-method-details" class="method-section section">
|
||
<h3 class="section-header">Public Class Methods</h3>
|
||
|
||
|
||
<div id="new-method" class="method-detail ">
|
||
<a name="method-c-new"></a>
|
||
|
||
|
||
<div class="method-heading">
|
||
<span class="method-name">new</span><span
|
||
class="method-args">(ctrl, title)</span>
|
||
<span class="method-click-advice">click to toggle source</span>
|
||
</div>
|
||
|
||
|
||
<div class="method-description">
|
||
|
||
<p><b>Creation de la vue</b></p>
|
||
<ul><li>
|
||
<p>CtrlCheckHisto ctrl : controleur de la vue</p>
|
||
</li><li>
|
||
<p>String title : titre de la vue</p>
|
||
</li></ul>
|
||
|
||
|
||
|
||
<div class="method-source-code" id="new-source">
|
||
<pre>
|
||
<span class="ruby-comment"># File v/VueHisto.rb, line 6</span>
|
||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ctrl</span>, <span class="ruby-identifier">title</span>)
|
||
<span class="ruby-ivar">@ctrl</span> = <span class="ruby-identifier">ctrl</span>
|
||
<span class="ruby-comment">#fenenetre generale</span>
|
||
<span class="ruby-ivar">@window</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Window</span>.<span class="ruby-identifier">new</span>
|
||
<span class="ruby-ivar">@window</span>.<span class="ruby-identifier">set_title</span>(<span class="ruby-identifier">title</span>)
|
||
|
||
<span class="ruby-comment">#declaration des differents widgets</span>
|
||
<span class="ruby-identifier">vb</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">VBox</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">true</span>, <span class="ruby-value">6</span>)
|
||
<span class="ruby-identifier">bot</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">HBox</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">false</span>, <span class="ruby-value">6</span>)
|
||
|
||
<span class="ruby-comment">#creation label pour la saisie</span>
|
||
<span class="ruby-identifier">lab</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Label</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'Chemin du fichier a rejouer :'</span>)
|
||
<span class="ruby-identifier">bot</span>.<span class="ruby-identifier">pack_start</span>(<span class="ruby-identifier">lab</span>, <span class="ruby-keyword">false</span>, <span class="ruby-keyword">true</span>, <span class="ruby-value">6</span>)
|
||
|
||
<span class="ruby-comment">#creation champ de saisie</span>
|
||
<span class="ruby-ivar">@nom</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">FileChooserButton</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">"choisir un fichier"</span>, <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">FileChooser</span><span class="ruby-operator">::</span><span class="ruby-constant">ACTION_OPEN</span>)
|
||
<span class="ruby-ivar">@nom</span>.<span class="ruby-identifier">set_current_folder</span>(<span class="ruby-string">"../sauv"</span>)
|
||
<span class="ruby-identifier">bot</span>.<span class="ruby-identifier">pack_start</span>(<span class="ruby-ivar">@nom</span>, <span class="ruby-keyword">true</span>, <span class="ruby-keyword">true</span>)
|
||
|
||
<span class="ruby-comment">#creation bouton de validation</span>
|
||
<span class="ruby-ivar">@b</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Button</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'OK'</span>)
|
||
<span class="ruby-identifier">bot</span>.<span class="ruby-identifier">pack_start</span>(<span class="ruby-ivar">@b</span>)
|
||
<span class="ruby-identifier">vb</span>.<span class="ruby-identifier">pack_start</span>(<span class="ruby-identifier">bot</span>)
|
||
<span class="ruby-comment">##############################</span>
|
||
|
||
<span class="ruby-ivar">@window</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">vb</span>)
|
||
|
||
<span class="ruby-comment"># Abbonement fenetre au Listener</span>
|
||
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">listenerBouton</span>
|
||
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">listenerDestroy</span>
|
||
<span class="ruby-keyword">end</span></pre>
|
||
</div><!-- new-source -->
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</div><!-- new-method -->
|
||
|
||
|
||
</div><!-- public-class-method-details -->
|
||
|
||
<div id="public-instance-method-details" class="method-section section">
|
||
<h3 class="section-header">Public Instance Methods</h3>
|
||
|
||
|
||
<div id="listenerBouton-method" class="method-detail ">
|
||
<a name="method-i-listenerBouton"></a>
|
||
|
||
|
||
<div class="method-heading">
|
||
<span class="method-name">listenerBouton</span><span
|
||
class="method-args">()</span>
|
||
<span class="method-click-advice">click to toggle source</span>
|
||
</div>
|
||
|
||
|
||
<div class="method-description">
|
||
|
||
<p><b>Listener appuie bouton validation -> test liens fichier </b></p>
|
||
|
||
|
||
|
||
<div class="method-source-code" id="listenerBouton-source">
|
||
<pre>
|
||
<span class="ruby-comment"># File v/VueHisto.rb, line 54</span>
|
||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">listenerBouton</span>
|
||
<span class="ruby-ivar">@chaine</span> = <span class="ruby-string">" "</span>
|
||
<span class="ruby-ivar">@b</span>.<span class="ruby-identifier">signal_connect</span>(<span class="ruby-string">'clicked'</span>){
|
||
<span class="ruby-ivar">@chaine</span> = <span class="ruby-ivar">@nom</span>.<span class="ruby-identifier">filename</span>
|
||
<span class="ruby-keyword">if</span> (<span class="ruby-ivar">@chaine</span> <span class="ruby-operator">==</span><span class="ruby-string">""</span>) <span class="ruby-comment">#gestion saisie vide</span>
|
||
<span class="ruby-identifier">m</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageDialog</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Window</span>.<span class="ruby-identifier">new</span>, <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Dialog</span><span class="ruby-operator">::</span><span class="ruby-constant">DESTROY_WITH_PARENT</span>,
|
||
<span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageDialog</span><span class="ruby-operator">::</span><span class="ruby-constant">ERROR</span>,
|
||
<span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageDialog</span><span class="ruby-operator">::</span><span class="ruby-constant">BUTTONS_CLOSE</span>,
|
||
<span class="ruby-string">"Erreur : Veuillez saisir un fichier !"</span>)
|
||
<span class="ruby-identifier">m</span>.<span class="ruby-identifier">run</span>
|
||
<span class="ruby-identifier">m</span>.<span class="ruby-identifier">destroy</span>
|
||
<span class="ruby-keyword">else</span>
|
||
<span class="ruby-keyword">if</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@chaine</span>)) <span class="ruby-comment">#si c'est un fichier existant utilisation du controleur adéquat</span>
|
||
<span class="ruby-ivar">@ctrl</span>.<span class="ruby-identifier">rejouer</span>(<span class="ruby-ivar">@chaine</span>)
|
||
<span class="ruby-keyword">else</span> <span class="ruby-comment">#gestion saisie invalide</span>
|
||
<span class="ruby-identifier">d</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageDialog</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Window</span>.<span class="ruby-identifier">new</span>, <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Dialog</span><span class="ruby-operator">::</span><span class="ruby-constant">DESTROY_WITH_PARENT</span>,
|
||
<span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageDialog</span><span class="ruby-operator">::</span><span class="ruby-constant">ERROR</span>,
|
||
<span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageDialog</span><span class="ruby-operator">::</span><span class="ruby-constant">BUTTONS_CLOSE</span>,
|
||
<span class="ruby-string">"Erreur : Fichier inexistant !"</span>)
|
||
<span class="ruby-identifier">d</span>.<span class="ruby-identifier">run</span>
|
||
<span class="ruby-identifier">d</span>.<span class="ruby-identifier">destroy</span>
|
||
<span class="ruby-keyword">end</span>
|
||
|
||
<span class="ruby-keyword">end</span>
|
||
}
|
||
<span class="ruby-keyword">end</span></pre>
|
||
</div><!-- listenerBouton-source -->
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</div><!-- listenerBouton-method -->
|
||
|
||
|
||
<div id="listenerDestroy-method" class="method-detail ">
|
||
<a name="method-i-listenerDestroy"></a>
|
||
|
||
|
||
<div class="method-heading">
|
||
<span class="method-name">listenerDestroy</span><span
|
||
class="method-args">()</span>
|
||
<span class="method-click-advice">click to toggle source</span>
|
||
</div>
|
||
|
||
|
||
<div class="method-description">
|
||
|
||
<p><b>Listener fermeture fenetre</b></p>
|
||
|
||
|
||
|
||
<div class="method-source-code" id="listenerDestroy-source">
|
||
<pre>
|
||
<span class="ruby-comment"># File v/VueHisto.rb, line 47</span>
|
||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">listenerDestroy</span>
|
||
<span class="ruby-ivar">@window</span>.<span class="ruby-identifier">signal_connect</span>(<span class="ruby-string">'destroy'</span>) {
|
||
<span class="ruby-ivar">@ctrl</span>.<span class="ruby-identifier">destructionFen</span>
|
||
}
|
||
<span class="ruby-keyword">end</span></pre>
|
||
</div><!-- listenerDestroy-source -->
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</div><!-- listenerDestroy-method -->
|
||
|
||
|
||
</div><!-- public-instance-method-details -->
|
||
|
||
</div><!-- 5Buntitled-5D -->
|
||
|
||
|
||
</div><!-- documentation -->
|
||
|
||
<div id="validator-badges">
|
||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
||
Rdoc Generator</a> 2</small>.</p>
|
||
</div>
|
||
|
||
</body>
|
||
</html>
|
||
|