Class: Gtk::Dialog
- Inherits:
- 
      Object
      
        - Object
- Gtk::Dialog
 
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/gtk3/dialog.rb,
 lib/gtk3/deprecated.rb
Instance Method Summary collapse
- #add_button(text, response_id) ⇒ Object
- #add_button_raw ⇒ Object
- #add_buttons(*buttons) ⇒ Object
- #get_widget_for_response(response_id) ⇒ Object
- #get_widget_for_response_raw ⇒ Object
- 
  
    
      #initialize(options = {})  ⇒ Dialog 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Dialog. 
- #initialize_raw ⇒ Object
- #run ⇒ Object
- #run_raw ⇒ Object
- #set_default_response(response_id) ⇒ Object (also: #default_response=)
- #set_default_response_raw ⇒ Object
- #use_header_bar? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Dialog
Returns a new instance of Dialog.
| 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # File 'lib/gtk3/dialog.rb', line 20 def initialize(={}) initialize_raw title = [:title] parent = [:parent] flags = [:flags] = [: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 (*) if end | 
Instance Method Details
#add_button(text, response_id) ⇒ Object
| 58 59 60 | # File 'lib/gtk3/dialog.rb', line 58 def (text, response_id) (text, ResponseType.resolve(response_id)) end | 
#add_button_raw ⇒ Object
| 57 | # File 'lib/gtk3/dialog.rb', line 57 alias_method :add_button_raw, :add_button | 
#add_buttons(*buttons) ⇒ Object
| 51 52 53 54 55 | # File 'lib/gtk3/dialog.rb', line 51 def (*) .each do |text, response_id| (text, response_id) end end | 
#get_widget_for_response(response_id) ⇒ Object
| 63 64 65 | # File 'lib/gtk3/dialog.rb', line 63 def (response_id) (ResponseType.resolve(response_id)) end | 
#get_widget_for_response_raw ⇒ Object
| 62 | # File 'lib/gtk3/dialog.rb', line 62 alias_method :get_widget_for_response_raw, :get_widget_for_response | 
#initialize_raw ⇒ Object
| 19 | # File 'lib/gtk3/dialog.rb', line 19 alias_method :initialize_raw, :initialize | 
#run ⇒ Object
| 42 43 44 45 46 47 48 49 | # 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 | 
#run_raw ⇒ Object
| 41 | # File 'lib/gtk3/dialog.rb', line 41 alias_method :run_raw, :run | 
#set_default_response(response_id) ⇒ Object Also known as: default_response=
| 68 69 70 | # 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 ⇒ Object
| 67 | # File 'lib/gtk3/dialog.rb', line 67 alias_method :set_default_response_raw, :set_default_response | 
#use_header_bar? ⇒ Boolean
| 77 78 79 | # File 'lib/gtk3/dialog.rb', line 77 def != 0 end |