class Knj::Gtk2::Msgbox

This class holds various methods for message-box-functionality and debugging.

Constants

DATA

This hash contains various data like the currently shown message-box.

Public Class Methods

cur_label() click to toggle source

Returns the label of the currently shown message-box.

# File lib/knj/gtk2_msgbox.rb, line 7
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
cur_respond(response) click to toggle source

Send a response to the currently shown message-box.

# File lib/knj/gtk2_msgbox.rb, line 13
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
shown?() click to toggle source

Returns true if a message-box is currently shown.

# File lib/knj/gtk2_msgbox.rb, line 22
def self.shown?
  return true if Knj::Gtk2::Msgbox::DATA[:current]
  return false
end