class Gtk::Dialog

Public Class Methods

new(options={}) click to toggle source
# File lib/gtk3/dialog.rb, line 20
def initialize(options={})
  initialize_raw

  title   = options[:title]
  parent  = options[:parent]
  flags   = options[:flags]
  buttons = options[:buttons]

  set_title(title) if title
  set_transient_for(parent) if parent
  if flags
    unless flags.is_a?(DialogFlags)
      flags = DialogFlags.new(flags)
    end
    set_modal(true) if flags.modal?
    set_destroy_with_parent(true) if flags.destroy_with_parent?
  end

  add_buttons(*buttons) if buttons
end
Also aliased as: initialize_raw

Public Instance Methods

add_button(text, response_id) click to toggle source
# File lib/gtk3/dialog.rb, line 58
def add_button(text, response_id)
  add_button_raw(text, ResponseType.resolve(response_id))
end
Also aliased as: add_button_raw
add_button_raw(text, response_id)
Alias for: add_button
add_buttons(*buttons) click to toggle source
# File lib/gtk3/dialog.rb, line 51
def add_buttons(*buttons)
  buttons.each do |text, response_id|
    add_button(text, response_id)
  end
end
default_response=(response_id)
Also aliased as: default_response_raw=
default_response_raw=(response_id)
Alias for: default_response=
get_widget_for_response(response_id) click to toggle source
# File lib/gtk3/dialog.rb, line 63
def get_widget_for_response(response_id)
  get_widget_for_response_raw(ResponseType.resolve(response_id))
end
Also aliased as: get_widget_for_response_raw
get_widget_for_response_raw(response_id)
initialize_raw(options={})
Alias for: new
run() click to toggle source
# File lib/gtk3/dialog.rb, line 42
def run
  response_id = run_raw
  if response_id < 0
    ResponseType.new(response_id)
  else
    response_id
  end
end
Also aliased as: run_raw
run_raw()
Alias for: run
set_default_response(response_id) click to toggle source
# File lib/gtk3/dialog.rb, line 68
def set_default_response(response_id)
  set_default_response_raw(ResponseType.resolve(response_id))
end
set_default_response_raw(response_id)
use_header_bar?() click to toggle source
# File lib/gtk3/dialog.rb, line 77
def use_header_bar?
  use_header_bar_raw != 0
end