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.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/watobo/gui/differ_frame.rb', line 46

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



39
40
41
42
43
44
# File 'lib/watobo/gui/differ_frame.rb', line 39

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

#update(info) ⇒ Object



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

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