Class: Gtk::FileChooserButton

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#dialog=(dialog) ⇒ Gtk::FileChooser

Instance of the Gtk::FileChooserDialog associated with the button.

Parameters:

Returns:

#focus_on_clickTrueClass

Returns whether the button grabs focus when it is clicked with the mouse. See gtk_file_chooser_button_set_focus_on_click().

Returns:

  • (TrueClass)

    true if the button grabs focus when it is clicked with the mouse.

#focus_on_click=(focus_on_click) ⇒ nil

Sets whether the button will grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.

Parameters:

  • focus_on_click (TrueClass)

    whether the button grabs focus when clicked with the mouse

Returns:

  • (nil)

#new(title, action) ⇒ Gtk::Widget

Creates a new file-selecting button widget.

Parameters:

  • title (String)

    the title of the browse dialog.

  • action (Gtk::FileChooserAction)

    the open mode for the widget.

Returns:

#new_with_dialog(dialog) ⇒ Gtk::Widget

Creates a Gtk::FileChooserButton widget which uses dialog as its file-picking window.

Note that dialog must be a Gtk::Dialog (or subclass) which implements the Gtk::FileChooser interface and must not have %GTK_DIALOG_DESTROY_WITH_PARENT set.

Also note that the dialog needs to have its confirmative button added with response %GTK_RESPONSE_ACCEPT or %GTK_RESPONSE_OK in order for the button to take over the file selected in the dialog.

Parameters:

Returns:

#titleString

Title to put on the Gtk::FileChooserDialog associated with the button.

Returns:

  • (String)

    title

#title=(title) ⇒ String

Title to put on the Gtk::FileChooserDialog associated with the button.

Parameters:

  • title (String)

Returns:

  • (String)

    title

  • (String)

    title

#width_charsInteger

The width of the entry and label inside the button, in characters.

Returns:

  • (Integer)

    width-chars

#width_chars=(width_chars) ⇒ Integer

The width of the entry and label inside the button, in characters.

Parameters:

  • width_chars (Integer)

Returns:

  • (Integer)

    width-chars

  • (Integer)

    width-chars