Class: Watobo::Gui::SelectionInfo

Inherits:
FXVerticalFrame
  • Object
show all
Defined in:
lib/watobo/gui/differ_frame.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner, opts) ⇒ SelectionInfo

Returns a new instance of SelectionInfo.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/watobo/gui/differ_frame.rb', line 25

def initialize(owner, opts)
  super(owner, opts)
  frame = FXHorizontalFrame.new(self, :opts => FRAME_NONE|LAYOUT_FILL_X, :padding => 0)
  FXLabel.new(frame, "History-ID: ")
  @hid_label = FXLabel.new(frame, " - ")

  frame = FXHorizontalFrame.new(self, :opts => FRAME_NONE|LAYOUT_FILL_X, :padding => 0)
  FXLabel.new(frame, "URL: ")
  @url_label = FXLabel.new(frame, " - ")

  frame = FXHorizontalFrame.new(self, :opts => FRAME_NONE|LAYOUT_FILL_X, :padding => 0)
  FXLabel.new(frame, "Length: ")
  @length_label = FXLabel.new(frame, " - ")

  frame = FXHorizontalFrame.new(self, :opts => FRAME_NONE|LAYOUT_FILL_X, :padding => 0)
  FXLabel.new(frame, "Status: ")
  @status_label = FXLabel.new(frame, " - ")
end

Instance Method Details

#clearObject



18
19
20
21
22
23
# File 'lib/watobo/gui/differ_frame.rb', line 18

def clear()
  @hid_label.text = "-"
  @url_label.text = "-"
  @length_label.text = "-"
  @status_label.text = "-"
end

#update(info) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/watobo/gui/differ_frame.rb', line 5

def update(info)
  begin
    @hid_label.text = info[:hid] || "-"
    @url_label.text = info[:url] || "-"
    @length_label.text = info[:length] || "-"
    @status_label.text = info[:status] || "-"

  rescue => bang
    puts "!!! Could not update SelectionInfo"
    puts bang
  end
end