Package elementary :: Module c_elementary :: Class FileselectorButton
[hide private]
[frames] | no frames]

Class FileselectorButton

        object --+                
                 |                
evas.c_evas.Object --+            
                     |            
                Object --+        
                         |        
               LayoutClass --+    
                             |    
                        Button --+
                                 |
                                FileselectorButton

This is a button that, when clicked, creates an Elementary window (or inner window) with a Fileselector "file selector widget" within.

When a file is chosen, the (inner) window is closed and the button emits a signal having the selected file as it's event_info.

This widget encapsulates operations on its internal file selector on its own API. There is less control over its file selector than that one would have instantiating one directly.

The following styles are available for this button:

This widget emits the following signals, besides the ones sent from Button:

Default text parts of the fileselector_button widget that you can use for are:

Default content parts of the fileselector_button widget that you can use for are:

Instance Methods [hide private]
Object
__init__(...)
Add a new file selector button widget to the given parent Elementary (container) object
a new object with type S, a subtype of T
__new__(T, S, ...)
bool
expandable_get(...)
Get whether tree view is enabled for the given file selector button widget's internal file selector
 
expandable_set(...)
Enable/disable a tree view in the given file selector button widget's internal file selector
bool
folder_only_get(...)
Get whether a given file selector button widget's internal file selector is displaying folders only or the directory contents, as well.
 
folder_only_set(...)
Set whether a given file selector button widget's internal file selector is to display folders only or the directory contents, as well.
 
inwin_mode_get(...)
Get whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window.
 
inwin_mode_set(...)
Set whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window.
bool
is_save_get(...)
Get whether the given file selector button widget's internal file selector is in "saving dialog" mode
 
is_save_set(...)
Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector button widget's internal file selector.
string
path_get(...)
Get the initial file system path set for a given file selector button widget
 
path_set(...)
Set the initial file system path for a given file selector button widget
tuple of Evas_Coords (int)
window_size_get(...)
Get the size of a given file selector button widget's window, holding the file selector itself.
 
window_size_set(...)
Set the size of a given file selector button widget's window, holding the file selector itself.
string
window_title_get(...)
Get the title for a given file selector button widget's window
 
window_title_set(...)
Set the title for a given file selector button widget's window

Inherited from Button: autorepeat_gap_timeout_get, autorepeat_gap_timeout_set, autorepeat_get, autorepeat_initial_timeout_get, autorepeat_initial_timeout_set, autorepeat_set

Inherited from LayoutClass: box_append, box_insert_at, box_insert_before, box_prepend, box_remove, box_remove_all, data_get, edje_get, end_get, end_set, file_set, icon_get, icon_set, part_cursor_engine_only_get, part_cursor_engine_only_set, part_cursor_get, part_cursor_set, part_cursor_style_get, part_cursor_style_set, part_cursor_unset, sizing_eval, table_clear, table_pack, table_unpack, theme_set

Inherited from Object: tree_focus_allow_get, tree_focus_allow_set

Inherited from evas.c_evas.Object: __repr__, __str__, bottom_center_get, bottom_center_set, clipees_get, evas_get, left_center_get, left_center_set, map_enabled_get, map_enabled_set, map_get, map_set, name_get, name_set, parent_get, right_center_get, right_center_set, size_hint_align_get, size_hint_align_set, size_hint_aspect_get, size_hint_aspect_set, size_hint_max_get, size_hint_max_set, size_hint_min_get, size_hint_min_set, size_hint_padding_get, size_hint_padding_set, size_hint_request_get, size_hint_request_set, size_hint_weight_get, size_hint_weight_set, static_clip_get, static_clip_set, top_center_get, top_center_set, type_get

Inherited from evas.c_evas.Object (private): _set_common_params, _set_evas

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

    General

Inherited from LayoutClass: signal_emit

Inherited from Object: access_info_set, content_get, content_set, content_unset, domain_translatable_text_part_set, domain_translatable_text_set, elm_event_callback_add, elm_event_callback_del, name_find, part_content_get, part_content_set, part_content_unset, part_text_get, part_text_set, text_get, text_set, translatable_text_get, translatable_text_part_get, translatable_text_set

    Styles

Inherited from Object: disabled_get, disabled_set, style_get, style_set

    Widget Tree Navigation

Inherited from Object: parent_widget_get, top_widget_get, widget_check, widget_type_get

    Cursors

Inherited from Object: cursor_get, cursor_set, cursor_style_get, cursor_style_set, cursor_theme_search_enabled_get, cursor_theme_search_enabled_set, cursor_unset

    Focus

Inherited from Object: focus_allow_get, focus_allow_set, focus_custom_chain_append, focus_custom_chain_get, focus_custom_chain_prepend, focus_custom_chain_set, focus_custom_chain_unset, focus_get, focus_set

    Mirroring

Inherited from Object: mirrored_automatic_get, mirrored_automatic_set, mirrored_get, mirrored_set

    Widget Scaling

Inherited from Object: scale_get, scale_set

    Scrollhints

Inherited from Object: scroll_freeze_pop, scroll_freeze_push, scroll_hold_pop, scroll_hold_push, scroll_lock_x_get, scroll_lock_x_set, scroll_lock_y_get, scroll_lock_y_set

    Tooltips

Inherited from Object: tooltip_content_cb_set, tooltip_domain_translatable_text_set, tooltip_hide, tooltip_show, tooltip_style_get, tooltip_style_set, tooltip_text_set, tooltip_translatable_text_set, tooltip_unset, tooltip_window_mode_get, tooltip_window_mode_set

    Callbacks
 
callback_file_chosen_add(...)
The user has selected a path which comes as the event_info data.
 
callback_file_chosen_del(...)

Inherited from Button: callback_clicked_add, callback_clicked_del, callback_pressed_add, callback_pressed_del, callback_repeated_add, callback_repeated_del, callback_unpressed_add, callback_unpressed_del

Inherited from LayoutClass: callback_theme_changed_add, callback_theme_changed_del

    State manipulation

Inherited from evas.c_evas.Object: clip_get, clip_set, clip_unset, color_get, color_set, delete, hide, is_deleted, show, visible_get, visible_set

    Positioning

Inherited from evas.c_evas.Object: bottom_left_get, bottom_left_set, bottom_right_get, bottom_right_set, center_get, center_set, geometry_get, geometry_set, move, move_relative, pos_get, pos_set, resize, size_get, size_set, top_left_get, top_left_set, top_right_get, top_right_set

    Layer & Stack manipulation

Inherited from evas.c_evas.Object: above_get, below_get, bottom_get, layer_get, layer_set, lower, raise_, stack_above, stack_below, top_get

    Event processing control

Inherited from evas.c_evas.Object: pass_events_get, pass_events_set, propagate_events_get, propagate_events_set, repeat_events_get, repeat_events_set

    Event callbacks

Inherited from evas.c_evas.Object: event_callback_add, event_callback_del, on_changed_size_hints_add, on_changed_size_hints_del, on_del_add, on_del_del, on_focus_in_add, on_focus_in_del, on_focus_out_add, on_focus_out_del, on_free_add, on_free_del, on_hide_add, on_hide_del, on_hold_add, on_hold_del, on_key_down_add, on_key_down_del, on_key_up_add, on_key_up_del, on_mouse_down_add, on_mouse_down_del, on_mouse_in_add, on_mouse_in_del, on_mouse_move_add, on_mouse_move_del, on_mouse_out_add, on_mouse_out_del, on_mouse_up_add, on_mouse_up_del, on_mouse_wheel_add, on_mouse_wheel_del, on_move_add, on_move_del, on_resize_add, on_resize_del, on_restack_add, on_restack_del, on_show_add, on_show_del

    Often unused

Inherited from evas.c_evas.Object: anti_alias_get, anti_alias_set, pointer_mode_get, pointer_mode_set, render_op_get, render_op_set

Instance Variables [hide private]

Inherited from evas.c_evas.Object: data, evas

Properties [hide private]
bool expandable
Enable/disable a tree view in the given file selector button widget's internal file selector
bool folder_only
Whether a given file selector button widget's internal file selector is to display folders only or the directory contents, as well.
bool inwin_mode
Whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window.
bool is_save
Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector button widget's internal file selector.
string path
The initial file system path for a given file selector button widget
tuple of Evas_Coords (int) window_size
The size of a given file selector button widget's window, holding the file selector itself.
string window_title
The title for a given file selector button widget's window

Inherited from Button: autorepeat, autorepeat_gap_timeout, autorepeat_initial_timeout

Inherited from LayoutClass: edje, end, file, icon, theme

Inherited from Object: content, cursor, mirrored, parent_widget, scale, style, top_widget, tree_focus_allow, widget_type

Inherited from evas.c_evas.Object: bottom_center, clipees, left_center, map, map_enabled, name, parent, rect, right_center, size_hint_align, size_hint_aspect, size_hint_max, size_hint_min, size_hint_padding, size_hint_request, size_hint_weight, static_clip, top_center, type

Inherited from object: __class__

    General

Inherited from Object: text, translatable_text

    Styles

Inherited from Object: disabled

    Cursors

Inherited from Object: cursor_style, cursor_theme_search_enabled

    Focus

Inherited from Object: focus_allow, focus_custom_chain

    Mirroring

Inherited from Object: mirrored_automatic

    Scrollhints

Inherited from Object: scroll_lock_x, scroll_lock_y

    Tooltips

Inherited from Object: tooltip_style, tooltip_window_mode

    State manipulation

Inherited from evas.c_evas.Object: clip, color, visible

    Positioning

Inherited from evas.c_evas.Object: bottom_left, bottom_right, center, geometry, pos, size, top_left, top_right

    Layer & Stack manipulation

Inherited from evas.c_evas.Object: above, below, bottom, layer, top

    Event processing control

Inherited from evas.c_evas.Object: focus, pass_events, propagate_events, repeat_events

    Often unused

Inherited from evas.c_evas.Object: anti_alias, pointer_mode, render_op

Method Details [hide private]

__init__(...)
(Constructor)

 

Add a new file selector button widget to the given parent Elementary (container) object

Parameters:
  • parent (Object) - The parent object
Returns: Object
a new file selector button widget handle or None, on errors
Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

expandable_get(...)

 

Get whether tree view is enabled for the given file selector button widget's internal file selector

Returns: bool
True if widget's internal file selector is in tree view, False otherwise (and on errors)

See Also: expandable_set() for more details

expandable_set(...)

 

Enable/disable a tree view in the given file selector button widget's internal file selector

This has the same effect as Fileselector.expandable_set(), but now applied to a file selector button's internal file selector.

Parameters:
  • value (bool) - True to enable tree view, False to disable

Note: There's no way to put a file selector button's internal file selector in "grid mode", as one may do with "pure" file selectors.

See Also: expandable_get()

folder_only_get(...)

 

Get whether a given file selector button widget's internal file selector is displaying folders only or the directory contents, as well.

Returns: bool
True if widget's internal file selector is only displaying directories, False if files are being displayed in it too (and on errors)

See Also: folder_only_set() for more details

folder_only_set(...)

 

Set whether a given file selector button widget's internal file selector is to display folders only or the directory contents, as well.

This has the same effect as Fileselector.folder_only_set(), but now applied to a file selector button's internal file selector.

Parameters:
  • value (bool) - True to make widget's internal file selector only display directories, False to make files to be displayed in it too

See Also: folder_only_get()

inwin_mode_get(...)

 

Get whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window.

Returns:
True if will use an inner window, False if it will use a dedicated window

See Also: inwin_mode_set() for more details

inwin_mode_set(...)

 

Set whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window. By default, it won't.

Parameters:
  • value (bool) - True to make it use an inner window, False to make it use a dedicated window
See Also:
InnerWindow for more information on inner windows, inwin_mode_get()

is_save_get(...)

 

Get whether the given file selector button widget's internal file selector is in "saving dialog" mode

Returns: bool
True, if widget's internal file selector is in "saving dialog" mode, False otherwise (and on errors)

See Also: is_save_set() for more details

is_save_set(...)

 

Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector button widget's internal file selector.

This has the same effect as Fileselector.is_save_set(), but now applied to a file selector button's internal file selector.

Parameters:
  • value (bool) - True to make widget's internal file selector a "saving dialog", False otherwise

See Also: is_save_get()

path_get(...)

 

Get the initial file system path set for a given file selector button widget

Returns: string
The path string

See Also: path_set() for more details

path_set(...)

 

Set the initial file system path for a given file selector button widget

It must be a directory path, which will have the contents displayed initially in the file selector's view. The default initial path is the "HOME" environment variable's value.

Parameters:
  • path (string) - The path string

See Also: path_get()

window_size_get(...)

 

Get the size of a given file selector button widget's window, holding the file selector itself.

Returns: tuple of Evas_Coords (int)
Width and height of the window

See Also: window_size_set(), for more details

window_size_set(...)

 

Set the size of a given file selector button widget's window, holding the file selector itself.

Parameters:
  • width (Evas_Coord (int)) - The window's width
  • height (Evas_Coord (int)) - The window's height

Note: it will only take any effect if the file selector button widget is not under "inwin mode". The default size for the window (when applicable) is 400x400 pixels.

See Also: window_size_get()

window_title_get(...)

 

Get the title for a given file selector button widget's window

Returns: string
Title of the file selector button's window

See Also: window_title_get() for more details

window_title_set(...)

 

Set the title for a given file selector button widget's window

This will change the popup window's title, when the file selector pops out after a click on the button. Those windows have the default (unlocalized) value of "Select a file" as titles.

Parameters:
  • title (string) - The title string

Note: It will only take effect if the file selector button widget is not under "inwin mode".

See Also: window_title_get()


Property Details [hide private]

expandable

Enable/disable a tree view in the given file selector button widget's internal file selector

This has the same effect as Fileselector.expandable, but now applied to a file selector button's internal file selector.

Type:
bool

Note: There's no way to put a file selector button's internal file selector in "grid mode", as one may do with "pure" file selectors.

folder_only

Whether a given file selector button widget's internal file selector is to display folders only or the directory contents, as well.

This has the same effect as Fileselector.folder_only_set(), but now applied to a file selector button's internal file selector.

Type:
bool

inwin_mode

Whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window. By default, it won't.

Type:
bool

See Also: InnerWindow for more information on inner windows

is_save

Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector button widget's internal file selector.

This has the same effect as Fileselector.is_save, but now applied to a file selector button's internal file selector.

Type:
bool

path

The initial file system path for a given file selector button widget

It must be a directory path, which will have the contents displayed initially in the file selector's view. The default initial path is the "HOME" environment variable's value.

Type:
string

window_size

The size of a given file selector button widget's window, holding the file selector itself.

Type:
tuple of Evas_Coords (int)

Note: Setting this will only take any effect if the file selector button widget is not under "inwin mode". The default size for the window (when applicable) is 400x400 pixels.

window_title

The title for a given file selector button widget's window

This is the popup window's title, when the file selector pops out after a click on the button. Those windows have the default (unlocalized) value of "Select a file" as titles.

Type:
string

Note: Setting this will only take effect if the file selector button widget is not under "inwin mode".