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
68 lines
1.6 KiB
Ruby
68 lines
1.6 KiB
Ruby
#Classe creation vue du menu
|
|
class VueMenu
|
|
# <b>Creation de la vue</b>
|
|
# * Menu ctrl : controleur de la vue
|
|
# * String title : titre de la vue
|
|
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
|
|
|
|
def getWindow #:nodoc:#
|
|
return @window
|
|
end
|
|
# <b>Listener appuie bouton nouvelle vérification de 1 fichier</b>
|
|
def listenerBoutonNewFile
|
|
@newFile.signal_connect('clicked'){
|
|
@ctrl.newVerifFile
|
|
}
|
|
end
|
|
# <b>Listener appuie bouton validation nouvelle vérification de 1 dossier</b>
|
|
def listenerBoutonNewDossier
|
|
@newDoss.signal_connect('clicked'){
|
|
@ctrl.newVerifDossier
|
|
}
|
|
end
|
|
# <b>Listener appuie bouton validation pour rejouer un fichier dans de l'historique</b>
|
|
def listenerBoutonHisto
|
|
@histo.signal_connect('clicked'){
|
|
@ctrl.histo
|
|
}
|
|
end
|
|
# <b>Listener fermeture fenetre Menu</b>
|
|
def listenerDestroy
|
|
@window.signal_connect('destroy') {
|
|
@ctrl.destructionMenu
|
|
}
|
|
end
|
|
|
|
|
|
|
|
end |