Sha256: 72cbf4cfb00c4ec84e7e9803abcc646921147414828d3063469fd6467aa6bab3

Contents?: true

Size: 1004 Bytes

Versions: 47

Compression:

Stored size: 1004 Bytes

Contents

#This class holds various methods for message-box-functionality and debugging.
class Knj::Gtk2::Msgbox
  #This hash contains various data like the currently shown message-box.
  DATA = {}
  
  #Returns the label of the currently shown message-box.
  def self.cur_label
    raise "No message-box currentl shown." if !Knj::Gtk2::Msgbox::DATA[:current]
    return Knj::Gtk2::Msgbox::DATA[:current].children.first.children.first.children.last.label
  end
  
  #Send a response to the currently shown message-box.
  def self.cur_respond(response)
    raise "No message-box currentl shown." if !Knj::Gtk2::Msgbox::DATA[:current]
    id = Knj::Gtk2::Msgbox::DATA[:current].__id__
    Knj::Gtk2::Msgbox::DATA[:current].response(response)
    Thread.pass while Knj::Gtk2::Msgbox::DATA[:current] and Knj::Gtk2::Msgbox::DATA[:current].__id__ == id
    nil
  end
  
  #Returns true if a message-box is currently shown.
  def self.shown?
    return true if Knj::Gtk2::Msgbox::DATA[:current]
    return false
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
knjrbfw-0.0.116 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.115 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.114 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.113 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.111 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.110 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.109 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.108 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.107 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.105 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.104 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.103 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.102 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.101 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.100 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.99 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.98 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.97 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.96 lib/knj/gtk2_msgbox.rb
knjrbfw-0.0.95 lib/knj/gtk2_msgbox.rb