Class: JLDrill::Gtk::GtkDisplayView

Inherits:
Gtk::Dialog
  • Object
show all
Defined in:
lib/jldrill/oldUI/GtkDisplayView.rb

Instance Method Summary collapse

Constructor Details

#initialize(vocab, parentWindow) ⇒ GtkDisplayView

Returns a new instance of GtkDisplayView.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/jldrill/oldUI/GtkDisplayView.rb', line 9

def initialize(vocab, parentWindow)
    super("Vocabulary Display",
          parentWindow,
          Gtk::Dialog::DESTROY_WITH_PARENT,
          [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL],
          [Gtk::Stock::OK, Gtk::Dialog::RESPONSE_ACCEPT])

    @quizV = GtkVocabView.new(vocab)

    refVocab = Vocabulary.new
    table = Gtk::Table.new(2, 1)
    table.attach(Gtk::Label.new("Quiz Vocab"), 0, 1, 0, 1,
                 0, 0, 10, 10)
    table.attach(@quizV, 0, 1, 1, 2,
                 Gtk::FILL | Gtk::EXPAND, Gtk::FILL, 10, 10)
    self.vbox.add(table)
end

Instance Method Details

#getVocabObject



27
28
29
30
# File 'lib/jldrill/oldUI/GtkDisplayView.rb', line 27

def getVocab
    vocab = @quizV.getVocab()
    return vocab
end