diff --git a/c/CtrlCheckLinks.rb b/c/CtrlCheckLinks.rb index 040c03f..5ab2b21 100644 --- a/c/CtrlCheckLinks.rb +++ b/c/CtrlCheckLinks.rb @@ -1,22 +1,25 @@ -# Controleur de la vérification de la validité des liens ainsi que les vues correspondantes +# Controleur de la vérification de la validité des liens ainsi que la vue Vue1 et VueResult class CtrlCheckLinks - #Controleur de la saisie pour vérification de lien - def saisie(type) - @v1 = Vue1.new(self, 'Saisie nom fichier', type) #creation vue principal + # Controleur de la saisie pour vérification de lien, controleur Vue1 + # * int type : permet de modifier la vue si 1 -> fichier sinon dossier + # * string title : titre fenetre de la vue qui va etre genere + # * return : String des urls trouvés + def saisie(type, title) + @v1 = Vue1.new(self, title, type) #creation vue principal @v1.getWindow.show_all # affichage Gtk.main - return @urls end - #Controleur recuperation et verification de liens dans 1 fichiers + # Controleur de recuperation et verification de liens dans 1 fichiers + # * string str : chemin d'accès au fichier à traiter def recupUrls(str) f = ReadFile.new(str) @urls = f.getUrls self.vueResult(self.verifLiens(@urls), str) s = CtrlHistoLink.new #on enregistre dans l'histo le verif du lien s.sauv(str, @urls) - return @urls end - #Controleur recuperation et verification de liens dans 1 dossier + # Controleur de recuperation et verification de liens dans 1 dossier + # * string str : chemin d'accès au fichier à traiter def recupUrlsDoss(str) d = Dir.open(str) liste_exclus = [".", ".."] @@ -27,12 +30,14 @@ class CtrlCheckLinks end } end - #Controleur permettant de detruire la vue principal + # Controleur permettant de detruire la vue Vue1 def destructionFen @v1.getWindow.destroy Gtk.main_quit end - #Controleur de verification de liens + # Controleur de verification de liens + # * string[] : tableau des urls à vérifier + # * return : string contenant le resultat des pings def verifLiens(urls) resultats = "" urls.each { |n| # pour chaque urls on realise un ping -> mise des resultats en chaine de caractere @@ -44,13 +49,13 @@ class CtrlCheckLinks end } return resultats - end - #Controleur permettant d'afficher la vue secondaire d'affichage de resultat + # Controleur permettant d'afficher la vue secondaire d'affichage de resultats, controleur VueResult + # * string resultats : contient les resultats à affiché + # * string nom : nom du fichier qui contient les urls traités def vueResult(resultats, nom) v = VueResult.new(resultats, nom) v.getWindow.show_all Gtk.main - end end \ No newline at end of file diff --git a/c/CtrlHistoLink.rb b/c/CtrlHistoLink.rb index 4c79215..8696b56 100644 --- a/c/CtrlHistoLink.rb +++ b/c/CtrlHistoLink.rb @@ -1,27 +1,29 @@ -#Classe permettant de g"rer l'historique de fichier traité +#Classe permettant de gzrer l'historique de fichier traité et la vue VueHisto class CtrlHistoLink - #Saisie pour vérification de lien stocké en historique + # Saisie pour vérification de lien stocké en historique, controleur VueHisto def saisie @v = VueHisto.new(self,"Historique") #creation vue @v.getWindow.show_all # affichage Gtk.main - return @urls end - #Sauvegarde les liens dans un fichier pour historique - def sauv(fileName, urls) - fileName = File.basename(fileName) - f = File.new("../sauv/#{fileName}", "w+") + # Sauvegarde les liens dans un fichier pour historique + # * String pathName : chemin du fichier à mettre en historique + # * String urls : liste urls à sauver dans l'historique + def sauv(pathName, urls) + pathName = File.basename(pathName) + f = File.new("../sauv/#{pathName}", "w+") f.write(urls) f.close end - #Permet de rejouer les liens d'un fichier - def rejouer(fileName) + # Permet de rejouer les liens d'un fichier + # * Sting pathName : chemin du fichier de l'historique à rejouer + def rejouer(pathName) r = CtrlCheckLinks.new - @urls = r.recupUrls(fileName) + @urls = r.recupUrls(pathName) end - #Controleur permettant de detruire la vue historique + # Controleur permettant de detruire la vue historique def destructionFen @v.getWindow.destroy Gtk.main_quit diff --git a/c/Main.rb b/c/Main.rb index 3d9374d..68a0536 100755 --- a/c/Main.rb +++ b/c/Main.rb @@ -13,35 +13,40 @@ require '../v/VueResult' require '../v/VueMenu' require '../v/VueHisto' -#Classe principal du controleur main -class Main - # Controleur du menu de départ - def menu - +#Controleur du menu principal de l'application +class Menu + # Controleur du menu d'acceuil VueMenu + def initialize @v = VueMenu.new(self,"Menu") @v.getWindow.show_all # affichage Gtk.main end - # Controleur historique + # Acces au controleur CtrlHistoLink def histo + @v.getWindow.hide_all #cache le menu c = CtrlHistoLink.new urls = c.saisie + @v.getWindow.show_all #reaffiche le menu end - # Controleur vérification d'un fichier + # Acces au controleur vérification d'un fichier CtrlCheckLinks def newVerifFile + @v.getWindow.hide_all #cache le menu c = CtrlCheckLinks.new - urls = c.saisie(1) + urls = c.saisie(1, 'Saisie nom fichier') + @v.getWindow.show_all #reaffiche le menu end - # Controleur vérification d'un dossier + # Acces au controleur vérification d'un dossier CtrlCheckLinks def newVerifDossier + @v.getWindow.hide_all #cache le menu c = CtrlCheckLinks.new - urls = c.saisie(0) + urls = c.saisie(0, 'Saisie nom dossier') + @v.getWindow.show_all #reaffiche le menu end - # Controleur permettant de detruire la vue menu + # Controleur permettant de detruire la VueMenu def destructionMenu @v.getWindow.destroy Gtk.main_quit @@ -49,7 +54,6 @@ class Main end -c = Main.new -c.menu +Menu.new print "Termine\n" \ No newline at end of file diff --git a/doc/rdoc/CtrlCheckLinks.html b/doc/rdoc/CtrlCheckLinks.html new file mode 100644 index 0000000..3f01594 --- /dev/null +++ b/doc/rdoc/CtrlCheckLinks.html @@ -0,0 +1,422 @@ + + + + + + + Class: CtrlCheckLinks + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

CtrlCheckLinks

+ +
+ +

Controleur de la vérification de la validité des liens ainsi que la vue Vue1 et VueResult

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ destructionFen() + click to toggle source +
+ + +
+ +

Controleur permettant de detruire la vue Vue1

+ + + +
+
+# File c/CtrlCheckLinks.rb, line 34
+def destructionFen 
+  @v1.getWindow.destroy
+  Gtk.main_quit
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ recupUrls(str) + click to toggle source +
+ + +
+ +

Controleur de recuperation et verification de liens dans 1 fichiers

+
  • +

    string str : chemin d’accès au fichier à traiter

    +
+ + + +
+
+# File c/CtrlCheckLinks.rb, line 14
+def recupUrls(str) 
+  f = ReadFile.new(str)
+  @urls = f.getUrls
+  self.vueResult(self.verifLiens(@urls), str)
+  s = CtrlHistoLink.new #on enregistre dans l'histo le verif du lien
+  s.sauv(str, @urls)
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ recupUrlsDoss(str) + click to toggle source +
+ + +
+ +

Controleur de recuperation et verification de liens dans 1 dossier

+
  • +

    string str : chemin d’accès au fichier à traiter

    +
+ + + +
+
+# File c/CtrlCheckLinks.rb, line 23
+def recupUrlsDoss(str) 
+  d = Dir.open(str)
+  liste_exclus = [".", ".."]
+  liste_dir = d.sort - liste_exclus
+  liste_dir.each { |fichier| #pour chaque fichier touvé
+    if (File.ftype(str + "/" + fichier) == "file")
+        self.recupUrls(str + "/" + fichier)
+    end
+   }             
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ saisie(type, title) + click to toggle source +
+ + +
+ +

Controleur de la saisie pour vérification de lien, controleur Vue1

+
  • +

    int type : permet de modifier la vue si 1 -> fichier sinon dossier

    +
  • +

    string title : titre fenetre de la vue qui va etre genere

    +
  • +

    return : String des urls trouvés

    +
+ + + +
+
+# File c/CtrlCheckLinks.rb, line 7
+def saisie(type, title) 
+  @v1 = Vue1.new(self, title, type) #creation vue principal
+  @v1.getWindow.show_all # affichage
+  Gtk.main
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ verifLiens(urls) + click to toggle source +
+ + +
+ +

Controleur de verification de liens

+
  • +

    string[] : tableau des urls à vérifier

    +
  • +

    return : string contenant le resultat des pings

    +
+ + + +
+
+# File c/CtrlCheckLinks.rb, line 41
+def verifLiens(urls) 
+  resultats = "" 
+  urls.each { |n| # pour chaque urls on realise un ping -> mise des resultats en chaine de caractere
+  p = Net::Ping::HTTP.new n , 80, 5
+  if p.ping?
+    resultats +=  "#{n} est vivant\n" 
+  else
+    resultats += "#{n} est mort\n"
+  end
+  }
+  return resultats    
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vueResult(resultats, nom) + click to toggle source +
+ + +
+ +

Controleur permettant d'afficher la vue secondaire d'affichage de +resultats, controleur VueResult

+
  • +

    string resultats : contient les resultats à affiché

    +
  • +

    string nom : nom du fichier qui contient les urls traités

    +
+ + + +
+
+# File c/CtrlCheckLinks.rb, line 56
+def vueResult(resultats, nom) 
+  v = VueResult.new(resultats, nom)
+  v.getWindow.show_all
+  Gtk.main
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/CtrlHistoLink.html b/doc/rdoc/CtrlHistoLink.html new file mode 100644 index 0000000..0eef329 --- /dev/null +++ b/doc/rdoc/CtrlHistoLink.html @@ -0,0 +1,317 @@ + + + + + + + Class: CtrlHistoLink + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

CtrlHistoLink

+ +
+ +

Classe permettant de gzrer l’historique de fichier traité et la vue VueHisto

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ destructionFen() + click to toggle source +
+ + +
+ +

Controleur permettant de detruire la vue historique

+ + + +
+
+# File c/CtrlHistoLink.rb, line 27
+def destructionFen  
+@v.getWindow.destroy
+Gtk.main_quit
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ rejouer(pathName) + click to toggle source +
+ + +
+ +

Permet de rejouer les liens d'un fichier

+
  • +

    Sting pathName : chemin du fichier de l’historique à rejouer

    +
+ + + +
+
+# File c/CtrlHistoLink.rb, line 21
+def rejouer(pathName)
+        r = CtrlCheckLinks.new
+        @urls = r.recupUrls(pathName)
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ saisie() + click to toggle source +
+ + +
+ +

Saisie pour vérification de lien stocké en historique, controleur VueHisto

+ + + +
+
+# File c/CtrlHistoLink.rb, line 4
+def saisie 
+        @v = VueHisto.new(self,"Historique") #creation vue 
+        @v.getWindow.show_all # affichage
+        Gtk.main
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ sauv(pathName, urls) + click to toggle source +
+ + +
+ +

Sauvegarde les liens dans un fichier pour historique

+
  • +

    String pathName : chemin du fichier à mettre en historique

    +
  • +

    String urls : liste urls à sauver dans l’historique

    +
+ + + +
+
+# File c/CtrlHistoLink.rb, line 12
+def sauv(pathName, urls)  
+        pathName = File.basename(pathName)
+        f = File.new("../sauv/#{pathName}", "w+")
+        f.write(urls)
+        f.close
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/Menu.html b/doc/rdoc/Menu.html new file mode 100644 index 0000000..99a8a52 --- /dev/null +++ b/doc/rdoc/Menu.html @@ -0,0 +1,356 @@ + + + + + + + Class: Menu + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

Menu

+ +
+ +

Controleur du menu principal de l’application

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ new() + click to toggle source +
+ + +
+ +

Controleur du menu d'acceuil VueMenu

+ + + +
+
+# File c/Main.rb, line 19
+def initialize
+        @v = VueMenu.new(self,"Menu")
+        @v.getWindow.show_all # affichage
+    Gtk.main
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ destructionMenu() + click to toggle source +
+ + +
+ +

Controleur permettant de detruire la VueMenu

+ + + +
+
+# File c/Main.rb, line 50
+def destructionMenu
+@v.getWindow.destroy
+Gtk.main_quit
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ histo() + click to toggle source +
+ + +
+ +

Acces au controleur CtrlHistoLink

+ + + +
+
+# File c/Main.rb, line 26
+def histo 
+        @v.getWindow.hide_all #cache le menu
+        c = CtrlHistoLink.new
+        urls = c.saisie
+        @v.getWindow.show_all #reaffiche le menu
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ newVerifDossier() + click to toggle source +
+ + +
+ +

Acces au controleur vérification d’un dossier CtrlCheckLinks

+ + + +
+
+# File c/Main.rb, line 42
+def newVerifDossier 
+        @v.getWindow.hide_all #cache le menu
+        c = CtrlCheckLinks.new
+        urls = c.saisie(0, 'Saisie nom dossier')
+        @v.getWindow.show_all #reaffiche le menu
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ newVerifFile() + click to toggle source +
+ + +
+ +

Acces au controleur vérification d’un fichier CtrlCheckLinks

+ + + +
+
+# File c/Main.rb, line 34
+def newVerifFile 
+        @v.getWindow.hide_all #cache le menu
+        c = CtrlCheckLinks.new
+        urls = c.saisie(1, 'Saisie nom fichier')
+        @v.getWindow.show_all #reaffiche le menu
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/ReadFile.html b/doc/rdoc/ReadFile.html new file mode 100644 index 0000000..8b0e54e --- /dev/null +++ b/doc/rdoc/ReadFile.html @@ -0,0 +1,284 @@ + + + + + + + Class: ReadFile + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

ReadFile

+ +
+ +

Classe permettant l’acces et la recuperation des données dans les fichiers

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ new(pFic) + click to toggle source +
+ + +
+ +

Ouverture d'un fichier en lecture

+
  • +

    String pFic : chemin de fichier à ouvrir

    +
+ + + +
+
+# File m/ReadFile.rb, line 5
+def initialize(pFic) 
+  @fic = File.open(pFic, "r")
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ getALL() + click to toggle source +
+ + +
+ +

Revoit tout le contenu d'un fichier sous forme d'une chaine de +caractere

+
  • +

    return : string contenant tout le texte du fichier

    +
+ + + +
+
+# File m/ReadFile.rb, line 10
+def getALL 
+  all = @fic.read
+  return all
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ getUrls() + click to toggle source +
+ + +
+ +

Sort les URLs d'un fichier

+
  • +

    return : string[] contenant tout les liens http/https du fichier

    +
+ + + +
+
+# File m/ReadFile.rb, line 16
+def getUrls 
+  txt = self.getALL
+  url = URI::extract(txt, /http(s)?/)
+  return url
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/Vue1.html b/doc/rdoc/Vue1.html new file mode 100644 index 0000000..9a1e665 --- /dev/null +++ b/doc/rdoc/Vue1.html @@ -0,0 +1,340 @@ + + + + + + + Class: Vue1 + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

Vue1

+ +
+ +

Classe creation de la vue de sélection de fichier ou dossier

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ new(ctrl, title, type) + click to toggle source +
+ + +
+ +

Creation de la vue

+
  • +

    CtrlCheckLinks ctrl : controleur de la +vue

    +
  • +

    String title : titre de la vue

    +
  • +

    int type : vue pour un fichier (==1) sinon pour un dossier

    +
+ + + +
+
+# File v/Vue1.rb, line 7
+def initialize(ctrl, title, type)
+  @ctrl = ctrl
+  #fenenetre generale
+  @window = Gtk::Window.new
+  @window.set_title(title)
+  
+  #declaration des differents widgets
+  vb = Gtk::VBox.new(true, 6)
+  bot = Gtk::HBox.new(false, 6)
+  
+  #creation de label pour la saisie
+  lab = Gtk::Label.new('Chemin :')
+  bot.pack_start(lab, false, true, 6)
+  
+  #creation du champ de saisie
+  #@nom = Gtk::Entry.new
+  if (type == 1)
+    @nom = Gtk::FileChooserButton.new("choisir un fichier", Gtk::FileChooser::ACTION_OPEN)
+  else
+    @nom = Gtk::FileChooserButton.new("choisir un dossier ", Gtk::FileChooser::ACTION_SELECT_FOLDER)
+  end
+  @nom.set_current_folder("../fichier")
+  bot.pack_start(@nom, true, true)
+  
+  #creation bouton de validation
+  @b = Gtk::Button.new('OK')
+  bot.pack_start(@b)
+  vb.pack_start(bot)
+  ##############################
+  
+  @window.add(vb)
+  
+  # Abbonement fenetre au Listener
+  self.listenerBouton
+  self.listenerDestroy
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ listenerBouton() + click to toggle source +
+ + +
+ +

Listener appuie bouton validation -> test liens fichier

+ + + +
+
+# File v/Vue1.rb, line 60
+def listenerBouton 
+  @chaine = " "
+  @b.signal_connect('clicked'){ 
+  @chaine = @nom.filename
+  if (@chaine =="") #gestion saisie vide
+    m = Gtk::MessageDialog.new(Gtk::Window.new, Gtk::Dialog::DESTROY_WITH_PARENT,
+                          Gtk::MessageDialog::ERROR,
+                          Gtk::MessageDialog::BUTTONS_CLOSE,
+                          "Erreur : Veuillez saisir un fichier ou dossier !")
+           m.run
+           m.destroy  
+  else
+    if(File.directory?(@chaine)) #si c'est un dossier -> utilisation du controleur adéquat
+        @ctrl.recupUrlsDoss(@chaine)
+    else
+      if(File.exist?(@chaine))  #si c'est un fichier -> existant utilisation du controleur adéquat
+        @ctrl.recupUrls(@chaine)
+      else #gestion saisie invalide
+        d = Gtk::MessageDialog.new(Gtk::Window.new, Gtk::Dialog::DESTROY_WITH_PARENT,
+                            Gtk::MessageDialog::ERROR,
+                            Gtk::MessageDialog::BUTTONS_CLOSE,
+                            "Erreur :  Fichier ou dossier inexistant !")
+        d.run
+        d.destroy  
+             end
+    end
+  end
+  }
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ listenerDestroy() + click to toggle source +
+ + +
+ +

Listener fermeture fenetre

+ + + +
+
+# File v/Vue1.rb, line 53
+def listenerDestroy 
+  @window.signal_connect('destroy') {
+    @ctrl.destructionFen
+  }
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/VueHisto.html b/doc/rdoc/VueHisto.html new file mode 100644 index 0000000..075bd14 --- /dev/null +++ b/doc/rdoc/VueHisto.html @@ -0,0 +1,329 @@ + + + + + + + Class: VueHisto + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

VueHisto

+ +
+ +

Classe creation de la vue permettant d’aceder a l’historique

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ new(ctrl, title) + click to toggle source +
+ + +
+ +

Creation de la vue

+
  • +

    CtrlCheckHisto ctrl : controleur de la vue

    +
  • +

    String title : titre de la vue

    +
+ + + +
+
+# File v/VueHisto.rb, line 6
+def initialize(ctrl, title)
+  @ctrl = ctrl
+  #fenenetre generale
+  @window = Gtk::Window.new
+  @window.set_title(title)
+  
+  #declaration des differents widgets
+  vb = Gtk::VBox.new(true, 6)
+  bot = Gtk::HBox.new(false, 6)
+  
+  #creation label pour la saisie
+  lab = Gtk::Label.new('Chemin du fichier a rejouer :')
+  bot.pack_start(lab, false, true, 6)
+  
+  #creation champ de saisie
+  @nom = Gtk::FileChooserButton.new("choisir un fichier", Gtk::FileChooser::ACTION_OPEN)
+  @nom.set_current_folder("../sauv")
+  bot.pack_start(@nom, true, true)
+  
+  #creation bouton de validation
+  @b = Gtk::Button.new('OK')
+  bot.pack_start(@b)
+  vb.pack_start(bot)
+  ##############################
+  
+  @window.add(vb)
+  
+  # Abbonement fenetre au Listener
+  self.listenerBouton
+  self.listenerDestroy
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ listenerBouton() + click to toggle source +
+ + +
+ +

Listener appuie bouton validation -> test liens fichier

+ + + +
+
+# File v/VueHisto.rb, line 54
+def listenerBouton 
+  @chaine = " "
+  @b.signal_connect('clicked'){ 
+  @chaine = @nom.filename
+  if (@chaine =="") #gestion saisie vide
+    m = Gtk::MessageDialog.new(Gtk::Window.new, Gtk::Dialog::DESTROY_WITH_PARENT,
+                          Gtk::MessageDialog::ERROR,
+                          Gtk::MessageDialog::BUTTONS_CLOSE,
+                          "Erreur : Veuillez saisir un fichier !")
+           m.run
+           m.destroy  
+  else
+      if(File.exist?(@chaine))  #si c'est un fichier existant utilisation du controleur adéquat
+        @ctrl.rejouer(@chaine)
+      else #gestion saisie invalide
+        d = Gtk::MessageDialog.new(Gtk::Window.new, Gtk::Dialog::DESTROY_WITH_PARENT,
+                            Gtk::MessageDialog::ERROR,
+                            Gtk::MessageDialog::BUTTONS_CLOSE,
+                            "Erreur :  Fichier inexistant !")
+        d.run
+        d.destroy  
+     end
+    
+  end
+  }
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ listenerDestroy() + click to toggle source +
+ + +
+ +

Listener fermeture fenetre

+ + + +
+
+# File v/VueHisto.rb, line 47
+def listenerDestroy 
+  @window.signal_connect('destroy') {
+    @ctrl.destructionFen
+  }
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/VueMenu.html b/doc/rdoc/VueMenu.html new file mode 100644 index 0000000..65e2882 --- /dev/null +++ b/doc/rdoc/VueMenu.html @@ -0,0 +1,383 @@ + + + + + + + Class: VueMenu + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + + + + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

VueMenu

+ +
+ +

Classe creation vue du menu

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ new(ctrl, title) + click to toggle source +
+ + +
+ +

Creation de la vue

+
  • +

    Menu ctrl : controleur de la vue

    +
  • +

    String title : titre de la vue

    +
+ + + +
+
+# File v/VueMenu.rb, line 6
+      def initialize(ctrl, title)
+      @ctrl = ctrl
+  #fenenetre generale
+  @window = Gtk::Window.new
+  @window.set_title(title)
+  
+  #declaration des differents widgets
+  vb = Gtk::VBox.new(true, 6)
+  top = Gtk::HBox.new(false, 6)
+  
+  
+  
+  #creation boutons
+  @newFile = Gtk::Button.new('Nouveau test fichier')
+  @newDoss = Gtk::Button.new('Nouveau test dossier')
+  @histo = Gtk::Button.new('Histo')
+ 
+  top.pack_start(@newFile)
+  top.pack_start(@newDoss)
+  top.pack_start(@histo)
+  vb.pack_start(top)
+  ##############################
+  
+  @window.add(vb)
+  
+  # Abbonement fenetre au Listener
+  self.listenerBoutonNewFile
+  self.listenerBoutonNewDossier
+  self.listenerBoutonHisto
+  self.listenerDestroy
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ listenerBoutonHisto() + click to toggle source +
+ + +
+ +

Listener appuie bouton validation pour rejouer un fichier dans de +l'historique

+ + + +
+
+# File v/VueMenu.rb, line 54
+def listenerBoutonHisto
+      @histo.signal_connect('clicked'){ 
+              @ctrl.histo
+      }
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ listenerBoutonNewDossier() + click to toggle source +
+ + +
+ +

Listener appuie bouton validation nouvelle vérification de 1 dossier

+ + + +
+
+# File v/VueMenu.rb, line 48
+def listenerBoutonNewDossier
+      @newDoss.signal_connect('clicked'){ 
+              @ctrl.newVerifDossier
+      }
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ listenerBoutonNewFile() + click to toggle source +
+ + +
+ +

Listener appuie bouton nouvelle vérification de 1 fichier

+ + + +
+
+# File v/VueMenu.rb, line 42
+def listenerBoutonNewFile
+      @newFile.signal_connect('clicked'){ 
+              @ctrl.newVerifFile
+      }
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ listenerDestroy() + click to toggle source +
+ + +
+ +

Listener fermeture fenetre Menu

+ + + +
+
+# File v/VueMenu.rb, line 60
+def listenerDestroy 
+  @window.signal_connect('destroy') {
+     @ctrl.destructionMenu
+  }
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/VueResult.html b/doc/rdoc/VueResult.html new file mode 100644 index 0000000..aea5ac2 --- /dev/null +++ b/doc/rdoc/VueResult.html @@ -0,0 +1,263 @@ + + + + + + + Class: VueResult + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + + +
+

Class/Module Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

VueResult

+ +
+ +

Classe creation de la vue des resultats

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ new(liste_result, title) + click to toggle source +
+ + +
+ +

Creation de la vue

+
  • +

    String liste_result : contient les resultats a afficher

    +
  • +

    String title : titre de la vue

    +
+ + + +
+
+# File v/VueResult.rb, line 6
+def initialize(liste_result, title)
+  #fenenetre generale
+  @window = Gtk::Window.new
+  @window.set_title(title)
+  
+  #declaration des differents widgets
+  vb = Gtk::VBox.new(true, 6)
+  vh = Gtk::HBox.new(false, 6)
+  
+  #creation label resultat
+  if(liste_result != "")
+    res = Gtk::Label.new(liste_result)
+  else
+    res = Gtk::Label.new("Pas de liens trouves")
+  end
+  vh.pack_start(res, false, true, 6)
+  vb.pack_start(vh)
+  
+  # Abbonement fenetre au Listener
+  @window.add(vb)
+  self.listenerDestroy
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ listenerDestroy() + click to toggle source +
+ + +
+ +

Listener fermeture Resultat

+ + + +
+
+# File v/VueResult.rb, line 34
+def listenerDestroy 
+  @window.signal_connect('destroy') {
+    @window.destroy
+    Gtk.main_quit
+  }
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/rdoc/c/CtrlCheckLinks_rb.html b/doc/rdoc/c/CtrlCheckLinks_rb.html new file mode 100644 index 0000000..f2f24dc --- /dev/null +++ b/doc/rdoc/c/CtrlCheckLinks_rb.html @@ -0,0 +1,55 @@ + + + + + + + + File: CtrlCheckLinks.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:14:28 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Controleur de la vérification de la validité des liens ainsi que la vue Vue1 et VueResult

+ +
+ +
+ + + diff --git a/doc/rdoc/c/CtrlHistoLink_rb.html b/doc/rdoc/c/CtrlHistoLink_rb.html new file mode 100644 index 0000000..2a9b9d2 --- /dev/null +++ b/doc/rdoc/c/CtrlHistoLink_rb.html @@ -0,0 +1,55 @@ + + + + + + + + File: CtrlHistoLink.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:14:51 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Classe permettant de gzrer l’historique de fichier traité et la vue VueHisto

+ +
+ +
+ + + diff --git a/doc/rdoc/c/Main_rb.html b/doc/rdoc/c/Main_rb.html new file mode 100644 index 0000000..6f59990 --- /dev/null +++ b/doc/rdoc/c/Main_rb.html @@ -0,0 +1,72 @@ + + + + + + + + File: Main.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:15:20 +0100
+ + +
Requires
+
+
    + +
  • gtk2
  • + +
  • net/ping
  • + +
  • ./CtrlCheckLinks
  • + +
  • ./CtrlHistoLink
  • + +
  • ../m/ReadFile
  • + +
  • ../v/Vue1
  • + +
  • ../v/VueResult
  • + +
  • ../v/VueMenu
  • + +
  • ../v/VueHisto
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

lib

+ +
+ +
+ + + diff --git a/doc/rdoc/c/hello_rb.html b/doc/rdoc/c/hello_rb.html new file mode 100644 index 0000000..a9b2a97 --- /dev/null +++ b/doc/rdoc/c/hello_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: hello.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-12-20 08:13:20 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/rdoc/created.rid b/doc/rdoc/created.rid new file mode 100644 index 0000000..0434c74 --- /dev/null +++ b/doc/rdoc/created.rid @@ -0,0 +1,10 @@ +Fri, 17 Jan 2014 09:17:21 +0100 +./m/ReadFile.rb Fri, 17 Jan 2014 09:15:38 +0100 +./c/Main.rb Fri, 17 Jan 2014 09:15:20 +0100 +./c/hello.rb Fri, 20 Dec 2013 08:13:20 +0100 +./c/CtrlCheckLinks.rb Fri, 17 Jan 2014 09:14:28 +0100 +./c/CtrlHistoLink.rb Fri, 17 Jan 2014 09:14:51 +0100 +./v/Vue1.rb Fri, 17 Jan 2014 09:16:01 +0100 +./v/VueHisto.rb Fri, 17 Jan 2014 09:16:27 +0100 +./v/VueResult.rb Fri, 17 Jan 2014 09:17:09 +0100 +./v/VueMenu.rb Fri, 17 Jan 2014 09:16:56 +0100 diff --git a/doc/rdoc/images/brick.png b/doc/rdoc/images/brick.png new file mode 100644 index 0000000..7851cf3 Binary files /dev/null and b/doc/rdoc/images/brick.png differ diff --git a/doc/rdoc/images/brick_link.png b/doc/rdoc/images/brick_link.png new file mode 100644 index 0000000..f71c370 Binary files /dev/null and b/doc/rdoc/images/brick_link.png differ diff --git a/doc/rdoc/images/bug.png b/doc/rdoc/images/bug.png new file mode 100644 index 0000000..fd20978 Binary files /dev/null and b/doc/rdoc/images/bug.png differ diff --git a/doc/rdoc/images/bullet_black.png b/doc/rdoc/images/bullet_black.png new file mode 100644 index 0000000..5761970 Binary files /dev/null and b/doc/rdoc/images/bullet_black.png differ diff --git a/doc/rdoc/images/bullet_toggle_minus.png b/doc/rdoc/images/bullet_toggle_minus.png new file mode 100644 index 0000000..b47ce55 Binary files /dev/null and b/doc/rdoc/images/bullet_toggle_minus.png differ diff --git a/doc/rdoc/images/bullet_toggle_plus.png b/doc/rdoc/images/bullet_toggle_plus.png new file mode 100644 index 0000000..9ab4a89 Binary files /dev/null and b/doc/rdoc/images/bullet_toggle_plus.png differ diff --git a/doc/rdoc/images/date.png b/doc/rdoc/images/date.png new file mode 100644 index 0000000..ce6656f Binary files /dev/null and b/doc/rdoc/images/date.png differ diff --git a/doc/rdoc/images/find.png b/doc/rdoc/images/find.png new file mode 100644 index 0000000..0a4aebd Binary files /dev/null and b/doc/rdoc/images/find.png differ diff --git a/doc/rdoc/images/loadingAnimation.gif b/doc/rdoc/images/loadingAnimation.gif new file mode 100644 index 0000000..82290f4 Binary files /dev/null and b/doc/rdoc/images/loadingAnimation.gif differ diff --git a/doc/rdoc/images/macFFBgHack.png b/doc/rdoc/images/macFFBgHack.png new file mode 100644 index 0000000..f11f6c4 Binary files /dev/null and b/doc/rdoc/images/macFFBgHack.png differ diff --git a/doc/rdoc/images/package.png b/doc/rdoc/images/package.png new file mode 100644 index 0000000..8bafc7a Binary files /dev/null and b/doc/rdoc/images/package.png differ diff --git a/doc/rdoc/images/page_green.png b/doc/rdoc/images/page_green.png new file mode 100644 index 0000000..de8e003 Binary files /dev/null and b/doc/rdoc/images/page_green.png differ diff --git a/doc/rdoc/images/page_white_text.png b/doc/rdoc/images/page_white_text.png new file mode 100644 index 0000000..813f712 Binary files /dev/null and b/doc/rdoc/images/page_white_text.png differ diff --git a/doc/rdoc/images/page_white_width.png b/doc/rdoc/images/page_white_width.png new file mode 100644 index 0000000..1eb8809 Binary files /dev/null and b/doc/rdoc/images/page_white_width.png differ diff --git a/doc/rdoc/images/plugin.png b/doc/rdoc/images/plugin.png new file mode 100644 index 0000000..6187b15 Binary files /dev/null and b/doc/rdoc/images/plugin.png differ diff --git a/doc/rdoc/images/ruby.png b/doc/rdoc/images/ruby.png new file mode 100644 index 0000000..0c65010 Binary files /dev/null and b/doc/rdoc/images/ruby.png differ diff --git a/doc/rdoc/images/tag_green.png b/doc/rdoc/images/tag_green.png new file mode 100644 index 0000000..e865090 Binary files /dev/null and b/doc/rdoc/images/tag_green.png differ diff --git a/doc/rdoc/images/wrench.png b/doc/rdoc/images/wrench.png new file mode 100644 index 0000000..8c84186 Binary files /dev/null and b/doc/rdoc/images/wrench.png differ diff --git a/doc/rdoc/images/wrench_orange.png b/doc/rdoc/images/wrench_orange.png new file mode 100644 index 0000000..843f3a2 Binary files /dev/null and b/doc/rdoc/images/wrench_orange.png differ diff --git a/doc/rdoc/images/zoom.png b/doc/rdoc/images/zoom.png new file mode 100644 index 0000000..a158b99 Binary files /dev/null and b/doc/rdoc/images/zoom.png differ diff --git a/doc/rdoc/index.html b/doc/rdoc/index.html new file mode 100644 index 0000000..40936b8 --- /dev/null +++ b/doc/rdoc/index.html @@ -0,0 +1,125 @@ + + + + + + + + RDoc Documentation + + + + + + + + + + + + +

RDoc Documentation

+ + +

This is the API documentation for 'RDoc Documentation'.

+ + + + + +

Classes/Modules

+ + +

Methods

+ + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + diff --git a/doc/rdoc/m/ReadFile_rb.html b/doc/rdoc/m/ReadFile_rb.html new file mode 100644 index 0000000..78ce7a0 --- /dev/null +++ b/doc/rdoc/m/ReadFile_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: ReadFile.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:15:38 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Classe permettant l’acces et la recuperation des données dans les fichiers

+ +
+ +
+ + + diff --git a/doc/rdoc/rdoc.css b/doc/rdoc/rdoc.css new file mode 100644 index 0000000..ea91421 --- /dev/null +++ b/doc/rdoc/rdoc.css @@ -0,0 +1,763 @@ +/* + * "Darkfish" Rdoc CSS + * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $ + * + * Author: Michael Granger + * + */ + +/* Base Green is: #6C8C22 */ + +*{ padding: 0; margin: 0; } + +body { + background: #efefef; + font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; +} +body.class, body.module, body.file { + margin-left: 40px; +} +body.file-popup { + font-size: 90%; + margin-left: 0; +} + +h1 { + font-size: 300%; + text-shadow: rgba(135,145,135,0.65) 2px 2px 3px; + color: #6C8C22; +} +h2,h3,h4 { margin-top: 1.5em; } + +:link, +:visited { + color: #6C8C22; + text-decoration: none; +} +:link:hover, +:visited:hover { + border-bottom: 1px dotted #6C8C22; +} + +pre { + background: #ddd; + padding: 0.5em 0; +} + + +/* @group Generic Classes */ + +.initially-hidden { + display: none; +} + +.quicksearch-field { + width: 98%; + background: #ddd; + border: 1px solid #aaa; + height: 1.5em; + -webkit-border-radius: 4px; +} +.quicksearch-field:focus { + background: #f1edba; +} + +.missing-docs { + font-size: 120%; + background: white url(images/wrench_orange.png) no-repeat 4px center; + color: #ccc; + line-height: 2em; + border: 1px solid #d00; + opacity: 1; + padding-left: 20px; + text-indent: 24px; + letter-spacing: 3px; + font-weight: bold; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; +} + +.target-section { + border: 2px solid #dcce90; + border-left-width: 8px; + padding: 0 1em; + background: #fff3c2; +} + +/* @end */ + + +/* @group Index Page, Standalone file pages */ +body.indexpage { + margin: 1em 3em; +} +body.indexpage p, +body.indexpage div, +body.file p { + margin: 1em 0; +} + +.indexpage .rdoc-list p, .file .rdoc-list p { + margin: 0em 0; +} + +.indexpage ol, +.file #documentation ol { + line-height: 160%; +} + +.indexpage ul, +.file #documentation ul { + line-height: 160%; + list-style: none; +} +.indexpage ul :link, +.indexpage ul :visited { + font-size: 16px; +} + +.indexpage li, +.file #documentation li { + padding-left: 20px; +} + +.indexpage ol, +.file #documentation ol { + margin-left: 20px; +} + +.indexpage ol > li, +.file #documentation ol > li { + padding-left: 0; +} + +.indexpage ul > li, +.file #documentation ul > li { + background: url(images/bullet_black.png) no-repeat left 4px; +} +.indexpage li.module { + background: url(images/package.png) no-repeat left 4px; +} +.indexpage li.class { + background: url(images/ruby.png) no-repeat left 4px; +} +.indexpage li.file { + background: url(images/page_white_text.png) no-repeat left 4px; +} +.file li p, +.indexpage li p { + margin: 0 0; +} + +/* @end */ + +/* @group Top-Level Structure */ + +.class #metadata, +.file #metadata, +.module #metadata { + float: left; + width: 260px; +} + +.class #documentation, +.file #documentation, +.module #documentation { + margin: 2em 1em 5em 300px; + min-width: 340px; +} + +.file #metadata { + margin: 0.8em; +} + +#validator-badges { + clear: both; + margin: 1em 1em 2em; +} + +/* @end */ + +/* @group Metadata Section */ +#metadata .section { + background-color: #dedede; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 1px solid #aaa; + margin: 0 8px 16px; + font-size: 90%; + overflow: hidden; +} +#metadata h3.section-header { + margin: 0; + padding: 2px 8px; + background: #ccc; + color: #666; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-bottom: 1px solid #aaa; +} +#metadata #home-section h3.section-header { + border-bottom: 0; +} + +#metadata ul, +#metadata dl, +#metadata p { + padding: 8px; + list-style: none; +} + +#file-metadata ul { + padding-left: 28px; + list-style-image: url(images/page_green.png); +} + +dl.svninfo { + color: #666; + margin: 0; +} +dl.svninfo dt { + font-weight: bold; +} + +ul.link-list li { + white-space: nowrap; +} +ul.link-list .type { + font-size: 8px; + text-transform: uppercase; + color: white; + background: #969696; + padding: 2px 4px; + -webkit-border-radius: 5px; +} + +/* @end */ + + +/* @group Project Metadata Section */ +#project-metadata { + margin-top: 3em; +} + +.file #project-metadata { + margin-top: 0em; +} + +#project-metadata .section { + border: 1px solid #aaa; +} +#project-metadata h3.section-header { + border-bottom: 1px solid #aaa; + position: relative; +} +#project-metadata h3.section-header .search-toggle { + position: absolute; + right: 5px; +} + + +#project-metadata form { + color: #777; + background: #ccc; + padding: 8px 8px 16px; + border-bottom: 1px solid #bbb; +} +#project-metadata fieldset { + border: 0; +} + +#no-class-search-results { + margin: 0 auto 1em; + text-align: center; + font-size: 14px; + font-weight: bold; + color: #aaa; +} + +/* @end */ + + +/* @group Documentation Section */ +.description { + font-size: 100%; + color: #333; +} + +.description p { + margin: 1em 0.4em; +} + +.description li p { + margin: 0; +} + +.description ul { + margin-left: 1.5em; +} +.description ul li { + line-height: 1.4em; +} + +.description dl, +#documentation dl { + margin: 8px 1.5em; + border: 1px solid #ccc; +} +.description dl { + font-size: 14px; +} + +.description dt, +#documentation dt { + padding: 2px 4px; + font-weight: bold; + background: #ddd; +} +.description dd, +#documentation dd { + padding: 2px 12px; +} +.description dd + dt, +#documentation dd + dt { + margin-top: 0.7em; +} + +#documentation .section { + font-size: 90%; +} + +#documentation h2.section-header { + margin-top: 2em; + padding: 0.75em 0.5em; + background: #ccc; + color: #333; + font-size: 175%; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +#documentation h3.section-header { + margin-top: 2em; + padding: 0.25em 0.5em; + background-color: #dedede; + color: #333; + font-size: 150%; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +#constants-list > dl, +#attributes-list > dl { + margin: 1em 0 2em; + border: 0; +} +#constants-list > dl dt, +#attributes-list > dl dt { + padding-left: 0; + font-weight: bold; + font-family: Monaco, "Andale Mono"; + background: inherit; +} +#constants-list > dl dt a, +#attributes-list > dl dt a { + color: inherit; +} +#constants-list > dl dd, +#attributes-list > dl dd { + margin: 0 0 1em 0; + padding: 0; + color: #666; +} + +.documentation-section h2 { + position: relative; +} + +.documentation-section h2 a { + position: absolute; + top: 8px; + right: 10px; + font-size: 12px; + color: #9b9877; + visibility: hidden; +} + +.documentation-section h2:hover a { + visibility: visible; +} + +/* @group Method Details */ + +#documentation .method-source-code { + display: none; +} + +#documentation .method-detail { + margin: 0.5em 0; + padding: 0.5em 0; + cursor: pointer; +} +#documentation .method-detail:hover { + background-color: #f1edba; +} +#documentation .method-heading { + position: relative; + padding: 2px 4px 0 20px; + font-size: 125%; + font-weight: bold; + color: #333; + background: url(images/brick.png) no-repeat left bottom; +} +#documentation .method-heading :link, +#documentation .method-heading :visited { + color: inherit; +} +#documentation .method-click-advice { + position: absolute; + top: 2px; + right: 5px; + font-size: 10px; + color: #9b9877; + visibility: hidden; + padding-right: 20px; + line-height: 20px; + background: url(images/zoom.png) no-repeat right top; +} +#documentation .method-detail:hover .method-click-advice { + visibility: visible; +} + +#documentation .method-alias .method-heading { + color: #666; + background: url(images/brick_link.png) no-repeat left bottom; +} + +#documentation .method-description, +#documentation .aliases { + margin: 0 20px; + color: #666; +} + +#documentation .method-description p, +#documentation .aliases p { + line-height: 1.2em; +} + +#documentation .aliases { + padding-top: 4px; + font-style: italic; + cursor: default; +} +#documentation .method-description p { + padding: 0; +} +#documentation .method-description p + p { + margin-bottom: 0.5em; +} +#documentation .method-description ul { + margin-left: 1.5em; +} + +#documentation .attribute-method-heading { + background: url(images/tag_green.png) no-repeat left bottom; +} +#documentation #attribute-method-details .method-detail:hover { + background-color: transparent; + cursor: default; +} +#documentation .attribute-access-type { + font-size: 60%; + text-transform: uppercase; + vertical-align: super; + padding: 0 2px; +} +/* @end */ + +/* @end */ + + + +/* @group Source Code */ + +div.method-source-code { + background: #262626; + color: #efefef; + margin: 1em; + padding: 0.5em; + border: 1px dashed #999; + overflow: hidden; +} + +div.method-source-code pre { + background: inherit; + padding: 0; + color: white; + overflow: auto; +} + +/* @group Ruby keyword styles */ + +.ruby-constant { color: #7fffd4; background: transparent; } +.ruby-keyword { color: #00ffff; background: transparent; } +.ruby-ivar { color: #eedd82; background: transparent; } +.ruby-operator { color: #00ffee; background: transparent; } +.ruby-identifier { color: #ffdead; background: transparent; } +.ruby-node { color: #ffa07a; background: transparent; } +.ruby-comment { color: #b22222; font-weight: bold; background: transparent; } +.ruby-regexp { color: #ffa07a; background: transparent; } +.ruby-value { color: #7fffd4; background: transparent; } + +/* @end */ +/* @end */ + + +/* @group File Popup Contents */ + +.file #metadata, +.file-popup #metadata { +} + +.file-popup dl { + font-size: 80%; + padding: 0.75em; + background-color: #dedede; + color: #333; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} +.file dt { + font-weight: bold; + padding-left: 22px; + line-height: 20px; + background: url(images/page_white_width.png) no-repeat left top; +} +.file dt.modified-date { + background: url(images/date.png) no-repeat left top; +} +.file dt.requires { + background: url(images/plugin.png) no-repeat left top; +} +.file dt.scs-url { + background: url(images/wrench.png) no-repeat left top; +} + +.file dl dd { + margin: 0 0 1em 0; +} +.file #metadata dl dd ul { + list-style: circle; + margin-left: 20px; + padding-top: 0; +} +.file #metadata dl dd ul li { +} + + +.file h2 { + margin-top: 2em; + padding: 0.75em 0.5em; + background-color: #dedede; + color: #333; + font-size: 120%; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +/* @end */ + + + + +/* @group ThickBox Styles */ +#TB_window { + font: 12px Arial, Helvetica, sans-serif; + color: #333333; +} + +#TB_secondLine { + font: 10px Arial, Helvetica, sans-serif; + color:#666666; +} + +#TB_window :link, +#TB_window :visited { color: #666666; } +#TB_window :link:hover, +#TB_window :visited:hover { color: #000; } +#TB_window :link:active, +#TB_window :visited:active { color: #666666; } +#TB_window :link:focus, +#TB_window :visited:focus { color: #666666; } + +#TB_overlay { + position: fixed; + z-index:100; + top: 0px; + left: 0px; + height:100%; + width:100%; +} + +.TB_overlayMacFFBGHack {background: url(images/macFFBgHack.png) repeat;} +.TB_overlayBG { + background-color:#000; + filter:alpha(opacity=75); + -moz-opacity: 0.75; + opacity: 0.75; +} + +* html #TB_overlay { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_window { + position: fixed; + background: #ffffff; + z-index: 102; + color:#000000; + display:none; + border: 4px solid #525252; + text-align:left; + top:50%; + left:50%; +} + +* html #TB_window { /* ie6 hack */ + position: absolute; + margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_window img#TB_Image { + display:block; + margin: 15px 0 0 15px; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + border-top: 1px solid #666; + border-left: 1px solid #666; +} + +#TB_caption{ + height:25px; + padding:7px 30px 10px 25px; + float:left; +} + +#TB_closeWindow{ + height:25px; + padding:11px 25px 10px 0; + float:right; +} + +#TB_closeAjaxWindow{ + padding:7px 10px 5px 0; + margin-bottom:1px; + text-align:right; + float:right; +} + +#TB_ajaxWindowTitle{ + float:left; + padding:7px 0 5px 10px; + margin-bottom:1px; + font-size: 22px; +} + +#TB_title{ + background-color: #6C8C22; + color: #dedede; + height:40px; +} +#TB_title :link, +#TB_title :visited { + color: white !important; + border-bottom: 1px dotted #dedede; +} + +#TB_ajaxContent{ + clear:both; + padding:2px 15px 15px 15px; + overflow:auto; + text-align:left; + line-height:1.4em; +} + +#TB_ajaxContent.TB_modal{ + padding:15px; +} + +#TB_ajaxContent p{ + padding:5px 0px 5px 0px; +} + +#TB_load{ + position: fixed; + display:none; + height:13px; + width:208px; + z-index:103; + top: 50%; + left: 50%; + margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ +} + +* html #TB_load { /* ie6 hack */ + position: absolute; + margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_HideSelect{ + z-index:99; + position:fixed; + top: 0; + left: 0; + background-color:#fff; + border:none; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + height:100%; + width:100%; +} + +* html #TB_HideSelect { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_iframeContent{ + clear:both; + border:none; + margin-bottom:-1px; + margin-top:1px; + _margin-bottom:1px; +} + +/* @end */ + +/* @group Debugging Section */ + +#debugging-toggle { + text-align: center; +} +#debugging-toggle img { + cursor: pointer; +} + +#rdoc-debugging-section-dump { + display: none; + margin: 0 2em 2em; + background: #ccc; + border: 1px solid #999; +} + + + +/* @end */ diff --git a/doc/rdoc/v/Vue1_rb.html b/doc/rdoc/v/Vue1_rb.html new file mode 100644 index 0000000..37813c7 --- /dev/null +++ b/doc/rdoc/v/Vue1_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: Vue1.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:16:01 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Classe creation de la vue de sélection de fichier ou dossier

+ +
+ +
+ + + diff --git a/doc/rdoc/v/VueHisto_rb.html b/doc/rdoc/v/VueHisto_rb.html new file mode 100644 index 0000000..a9e5848 --- /dev/null +++ b/doc/rdoc/v/VueHisto_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: VueHisto.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:16:27 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Classe creation de la vue permettant d’aceder a l’historique

+ +
+ +
+ + + diff --git a/doc/rdoc/v/VueMenu_rb.html b/doc/rdoc/v/VueMenu_rb.html new file mode 100644 index 0000000..7a9509a --- /dev/null +++ b/doc/rdoc/v/VueMenu_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: VueMenu.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:16:56 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Classe creation vue du menu

+ +
+ +
+ + + diff --git a/doc/rdoc/v/VueResult_rb.html b/doc/rdoc/v/VueResult_rb.html new file mode 100644 index 0000000..e59362f --- /dev/null +++ b/doc/rdoc/v/VueResult_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: VueResult.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2014-01-17 09:17:09 +0100
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Classe creation de la vue des resultats

+ +
+ +
+ + + diff --git a/m/ReadFile.rb b/m/ReadFile.rb index e6af677..34892aa 100644 --- a/m/ReadFile.rb +++ b/m/ReadFile.rb @@ -1,15 +1,18 @@ #Classe permettant l'acces et la recuperation des données dans les fichiers class ReadFile - #Ouverture d'un fichier en lecture + # Ouverture d'un fichier en lecture + # * String pFic : chemin de fichier à ouvrir def initialize(pFic) @fic = File.open(pFic, "r") end - #Revoit tout le contenu d'un fichier sous forme d'une chaine de caractere + # Revoit tout le contenu d'un fichier sous forme d'une chaine de caractere + # * return : string contenant tout le texte du fichier def getALL all = @fic.read return all end - #Sort les URLs d'un fichier + # Sort les URLs d'un fichier + # * return : string[] contenant tout les liens http/https du fichier def getUrls txt = self.getALL url = URI::extract(txt, /http(s)?/) diff --git a/v/Vue1.rb b/v/Vue1.rb index 673609a..53229bf 100644 --- a/v/Vue1.rb +++ b/v/Vue1.rb @@ -1,6 +1,9 @@ # Classe creation de la vue de sélection de fichier ou dossier class Vue1 - # Creation de la vue + # Creation de la vue + # * CtrlCheckLinks ctrl : controleur de la vue + # * String title : titre de la vue + # * int type : vue pour un fichier (==1) sinon pour un dossier def initialize(ctrl, title, type) @ctrl = ctrl #fenenetre generale @@ -11,11 +14,11 @@ class Vue1 vb = Gtk::VBox.new(true, 6) bot = Gtk::HBox.new(false, 6) - #creation label pour la saisie + #creation de label pour la saisie lab = Gtk::Label.new('Chemin :') bot.pack_start(lab, false, true, 6) - #creation champ de saisie + #creation du champ de saisie #@nom = Gtk::Entry.new if (type == 1) @nom = Gtk::FileChooserButton.new("choisir un fichier", Gtk::FileChooser::ACTION_OPEN) @@ -46,14 +49,14 @@ class Vue1 return @chaine end - # Listener fermeture fenetre + # Listener fermeture fenetre def listenerDestroy @window.signal_connect('destroy') { @ctrl.destructionFen } end - #Listener appuie bouton validation + # Listener appuie bouton validation -> test liens fichier def listenerBouton @chaine = " " @b.signal_connect('clicked'){ @@ -66,10 +69,10 @@ class Vue1 m.run m.destroy else - if(File.directory?(@chaine)) #si c'est un dossier utilisation du controleur adéquat + if(File.directory?(@chaine)) #si c'est un dossier -> utilisation du controleur adéquat @ctrl.recupUrlsDoss(@chaine) else - if(File.exist?(@chaine)) #si c'est un fichier existant utilisation du controleur adéquat + if(File.exist?(@chaine)) #si c'est un fichier -> existant utilisation du controleur adéquat @ctrl.recupUrls(@chaine) else #gestion saisie invalide d = Gtk::MessageDialog.new(Gtk::Window.new, Gtk::Dialog::DESTROY_WITH_PARENT, diff --git a/v/VueHisto.rb b/v/VueHisto.rb index aec9486..990c30d 100644 --- a/v/VueHisto.rb +++ b/v/VueHisto.rb @@ -1,6 +1,8 @@ # Classe creation de la vue permettant d'aceder a l'historique class VueHisto - # Creation de la vue + # Creation de la vue + # * CtrlCheckHisto ctrl : controleur de la vue + # * String title : titre de la vue def initialize(ctrl, title) @ctrl = ctrl #fenenetre generale @@ -41,14 +43,14 @@ class VueHisto return @chaine end - # Listener fermeture fenetre + # Listener fermeture fenetre def listenerDestroy @window.signal_connect('destroy') { @ctrl.destructionFen } end - #Listener appuie bouton validation + # Listener appuie bouton validation -> test liens fichier def listenerBouton @chaine = " " @b.signal_connect('clicked'){ diff --git a/v/VueMenu.rb b/v/VueMenu.rb index 179c0b8..3d65f48 100644 --- a/v/VueMenu.rb +++ b/v/VueMenu.rb @@ -1,6 +1,8 @@ #Classe creation vue du menu class VueMenu - # Creation de la vue + # Creation de la vue + # * Menu ctrl : controleur de la vue + # * String title : titre de la vue def initialize(ctrl, title) @ctrl = ctrl #fenenetre generale @@ -36,25 +38,25 @@ class VueMenu def getWindow #:nodoc:# return @window end - #Listener appuie bouton nouvelle vérification de 1 fichier + # Listener appuie bouton nouvelle vérification de 1 fichier def listenerBoutonNewFile @newFile.signal_connect('clicked'){ @ctrl.newVerifFile } end - #Listener appuie bouton validation nouvelle vérification de 1 dossier + # Listener appuie bouton validation nouvelle vérification de 1 dossier def listenerBoutonNewDossier @newDoss.signal_connect('clicked'){ @ctrl.newVerifDossier } end - #Listener appuie bouton validation pour rejouer un fichier dans de l'historique + # Listener appuie bouton validation pour rejouer un fichier dans de l'historique def listenerBoutonHisto - @histo.signal_connect('clicke d'){ + @histo.signal_connect('clicked'){ @ctrl.histo } end - # Listener fermeture fenetre Menu + # Listener fermeture fenetre Menu def listenerDestroy @window.signal_connect('destroy') { @ctrl.destructionMenu diff --git a/v/VueResult.rb b/v/VueResult.rb index 41dd848..78d7761 100644 --- a/v/VueResult.rb +++ b/v/VueResult.rb @@ -1,10 +1,12 @@ # Classe creation de la vue des resultats class VueResult - # Creation de la vue - def initialize(liste_result, nom) + # Creation de la vue + # * String liste_result : contient les resultats a afficher + # * String title : titre de la vue + def initialize(liste_result, title) #fenenetre generale @window = Gtk::Window.new - @window.set_title(nom) + @window.set_title(title) #declaration des differents widgets vb = Gtk::VBox.new(true, 6) @@ -28,7 +30,7 @@ return @window end - # Listener fermeture Resultat + # Listener fermeture Resultat def listenerDestroy @window.signal_connect('destroy') { @window.destroy