2014-01-17 09:20:36 +01:00
<?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: Vue1< / 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/Vue1_rb.html?TB_iframe=true&height=550&width=785"
class="thickbox" title="v/Vue1.rb">v/Vue1.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" > Vue1< / h1 >
< div id = "description" class = "description" >
< p > Classe creation de la vue de sélection de fichier ou dossier< / 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, type)< / 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 > < a href = "CtrlCheckLinks.html" > CtrlCheckLinks< / a > ctrl : controleur de la
vue< / p >
< / li > < li >
< p > String title : titre de la vue< / p >
< / li > < li >
< p > int type : vue pour un fichier (==1) sinon pour un dossier< / p >
< / li > < / ul >
< div class = "method-source-code" id = "new-source" >
< pre >
< span class = "ruby-comment" > # File v/Vue1.rb, line 7< / 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-identifier" > type< / 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 de 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 :'< / 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 du champ de saisie< / span >
< span class = "ruby-comment" > #@nom = Gtk::Entry.new< / span >
< span class = "ruby-keyword" > if< / span > (< span class = "ruby-identifier" > type< / span > < span class = "ruby-operator" > ==< / span > < span class = "ruby-value" > 1< / 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-keyword" > else< / 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 dossier " < / 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_SELECT_FOLDER< / span > )
< span class = "ruby-keyword" > end< / span >
< span class = "ruby-ivar" > @nom< / span > .< span class = "ruby-identifier" > set_current_folder< / span > (< span class = "ruby-string" > " ../fichier" < / 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/Vue1.rb, line 60< / 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 ou dossier !" < / 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" > directory?< / span > (< span class = "ruby-ivar" > @chaine< / span > )) < span class = "ruby-comment" > #si c'est un dossier -> utilisation du controleur adéquat< / span >
< span class = "ruby-ivar" > @ctrl< / span > .< span class = "ruby-identifier" > recupUrlsDoss< / span > (< span class = "ruby-ivar" > @chaine< / 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 >
2014-01-17 10:55:18 +01:00
< span class = "ruby-keyword" > if< / span > (< span class = "ruby-constant" > File< / span > .< span class = "ruby-identifier" > extname< / span > (< span class = "ruby-ivar" > @chaine< / span > )< span class = "ruby-operator" > ==< / span > < span class = "ruby-string" > " .txt" < / span > < span class = "ruby-operator" > ||< / span > < span class = "ruby-constant" > File< / span > .< span class = "ruby-identifier" > extname< / span > (< span class = "ruby-ivar" > @chaine< / span > )< span class = "ruby-operator" > ==< / span > < span class = "ruby-string" > " .html" < / span > )
< span class = "ruby-ivar" > @ctrl< / span > .< span class = "ruby-identifier" > recupUrls< / span > (< span class = "ruby-ivar" > @chaine< / span > )
< span class = "ruby-keyword" > else< / span >
< span class = "ruby-identifier" > i< / 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 extension invalide !" < / span > )
< span class = "ruby-identifier" > i< / span > .< span class = "ruby-identifier" > run< / span >
< span class = "ruby-identifier" > i< / span > .< span class = "ruby-identifier" > destroy< / span >
< span class = "ruby-keyword" > end< / span >
2014-01-17 09:20:36 +01:00
< 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 ou dossier 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 >
}
< 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/Vue1.rb, line 53< / 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 >