Maemomm Reference Documentation: hildon-fmmm

Main Page Namespaces Book

# Hildon::FileSelection Class Reference
[Widgets, FileSystem]

Inheritance diagram for Hildon::FileSelection:

List of all members.

## Detailed Description

A file tree widget.

## Public Member Functions
void | clear_multi_selection ()
| Otherwise similar to unselect_all, but keeps the node with cursor selected.
void | dim_current_selection ()
| Appends currently selected paths to set of dimmed paths.
| FileSelection (const Glib::RefPtr<FileSystemModel>& model)
FileSelectionPane | get_active_pane () const
| Gets the pane that either has active focus or (in case of no pane has it) last time had it.
bool | get_column_headers_visible () const
Gtk::TreeModel::iterator | get_current_folder_iter () const
| Retrieves an iterator to match the currently selected item in the navigation pane.
std::string | get_current_folder_uri () const
const Gtk::FileFilter* | get_filter () const
| Get currently active filter set by set_filter.
Gtk::FileFilter* | get_filter ()
| Get currently active filter set by set_filter.
FileSelectionMode | get_mode () const
| Gets Current view mode for file selection widget.
bool | get_select_multiple () const
| Gets state of multiple selection.
GSList* | get_selected_uris ()
void | get_sort_key (FileSelectionSortKey& key, Gtk::SortType& order) const
| Currently active sort settings are stored to user provided pointers.
const HildonFileSelection* | gobj () const
| Provides access to the underlying C GtkObject.
HildonFileSelection* | gobj ()
| Provides access to the underlying C GtkObject.
void | hide_content_pane ()
| Hides the content pane.
void | move_cursor_to_uri (const Glib::ustring& uri)
void | select_all ()
| Selects all files from the content pane.
bool | select_uri (const std::string& uri, std::auto_ptr<Glib::Error>& error)
void | set_column_headers_visible (bool visible=true)
bool | set_current_folder_uri (const std::string& folder, std::auto_ptr<Glib::Error>& error)
void | set_filter (const Gtk::FileFilter& filter)
| Only the files matching the filter will be displayed in content pane.
void | set_mode (FileSelectionMode mode)
| Swithces file selection between list and thumbnail modes.
void | set_select_multiple (bool select_multiple=true)
| If multiple selection is enabled, checkboxes will appear to the last item to the content pane.
void | set_sort_key (FileSelectionSortKey key, Gtk::SortType order)
| Changes sort settings for views.
void | show_content_pane ()
| Shows the content pane.
Glib::SignalProxy0<void> | signal_content_pane_context_menu ()
| Prototype: `void content_pane_context_menu()`
Glib::SignalProxy0<void> | signal_current_folder_changed ()
| Prototype: `void current_folder_changed()`
Glib::SignalProxy0<void> | signal_file_activated ()
| Prototype: `void file_activated()`
Glib::SignalProxy1< void, const Gtk::TreeModel::iterator& > | signal_location_insensitive ()
| Prototype: `void location_insensitive(const Gtk::TreeModel::iterator& iter)`
Glib::SignalProxy0<void> | signal_navigation_pane_context_menu ()
| Prototype: `void navigation_pane_context_menu()`
Glib::SignalProxy0<void> | signal_selection_changed ()
| Prototype: `void selection_changed()`
void | undim_all ()
| Undims all from model that are dimmed by code.
void | unselect_all ()
| Clears current selection from content pane.
void | unselect_uri (const std::string& uri)
virtual | ~FileSelection ()
## Related Functions
(Note that these are not member functions.)
Hildon::FileSelection* | wrap (HildonFileSelection* object, bool take_copy=false)
  | Parameters:
  | object | The C instance

## Constructor & Destructor Documentation

virtual Hildon::FileSelection::~FileSelection | ( |  | ) | `[virtual]`

Hildon::FileSelection::FileSelection | ( | const Glib::RefPtr<FileSystemModel>& | model | ) | `[explicit]`

## Member Function Documentation

void Hildon::FileSelection::clear_multi_selection | ( |  | ) |

Otherwise similar to unselect_all, but keeps the node with cursor selected.

Thus, this function don't have any efect in single selection mode.

void Hildon::FileSelection::dim_current_selection | ( |  | ) |

Appends currently selected paths to set of dimmed paths.

Note that dimmed paths cannot be selected, so selection no longer contains the same paths after this function.

FileSelectionPane Hildon::FileSelection::get_active_pane | ( |  | ) | const

Gets the pane that either has active focus or (in case of no pane has it) last time had it.

Returns:
  Currently active pane.

bool Hildon::FileSelection::get_column_headers_visible | ( |  | ) | const

Gtk::TreeModel::iterator Hildon::FileSelection::get_current_folder_iter | ( |  | ) | const

Retrieves an iterator to match the currently selected item in the navigation pane.

Internally this gets the selection from the tree and then the current iterator from the selection and converts the result accordingly.

Returns:
  A valid iterator, if the given iterator is set, or an invalid iterator if none is set.

std::string Hildon::FileSelection::get_current_folder_uri | ( |  | ) | const

const Gtk::FileFilter* Hildon::FileSelection::get_filter | ( |  | ) | const

Get currently active filter set by set_filter.

Can be `0` if no filter is set.

Returns:
  A Gtk::FileFilter or `0`.

Gtk::FileFilter* Hildon::FileSelection::get_filter | ( |  | ) |

Get currently active filter set by set_filter.

Can be `0` if no filter is set.

Returns:
  A Gtk::FileFilter or `0`.

FileSelectionMode Hildon::FileSelection::get_mode | ( |  | ) | const

Gets Current view mode for file selection widget.

If widget is not shown this will return an invalid mode (-1). This is because of Gtk::Notebook implementation.

Returns:
  Current view mode.

bool Hildon::FileSelection::get_select_multiple | ( |  | ) | const

Gets state of multiple selection.

Returns:
  `true` If multiple selection is currently enabled.

GSList* Hildon::FileSelection::get_selected_uris | ( |  | ) |

void Hildon::FileSelection::get_sort_key | ( | FileSelectionSortKey& | key,
|  | Gtk::SortType & | order |
| ) |  |  | const

Currently active sort settings are stored to user provided pointers.

Parameters:

  | key | A place to store sort key.
  | order | A place to store sort order.

const HildonFileSelection* Hildon::FileSelection::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

HildonFileSelection* Hildon::FileSelection::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

void Hildon::FileSelection::hide_content_pane | ( |  | ) |

Hides the content pane.

This is used in certain file management dialogs.

void Hildon::FileSelection::move_cursor_to_uri | ( | const Glib::ustring & | uri | ) |

void Hildon::FileSelection::select_all | ( |  | ) |

Selects all files from the content pane.

Multiple selection must be enabled before calling this.

bool Hildon::FileSelection::select_uri | ( | const std::string & | uri,
|  | std::auto_ptr< Glib::Error > & | error |
| ) |  |  |

void Hildon::FileSelection::set_column_headers_visible | ( | bool | visible = `true` | ) |

bool Hildon::FileSelection::set_current_folder_uri | ( | const std::string & | folder,
|  | std::auto_ptr< Glib::Error > & | error |
| ) |  |  |

void Hildon::FileSelection::set_filter | ( | const Gtk::FileFilter & | filter | ) |

Only the files matching the filter will be displayed in content pane.

Use `0` to remove filtering.

Parameters:

  | filter | A new Gtk::FileFilter.

void Hildon::FileSelection::set_mode | ( | FileSelectionMode | mode | ) |

Swithces file selection between list and thumbnail modes.

Note that this function works only after widget is shown because of Gtk::Notebook implementation.

Parameters:

  | mode | New mode for current folder.

void Hildon::FileSelection::set_select_multiple | ( | bool | select_multiple = `true` | ) |

If multiple selection is enabled, checkboxes will appear to the last item to the content pane.

Multiple selection must be enabled if one wants to call select_all.

Parameters:

  | select_multiple | Either `true` or `false`.

void Hildon::FileSelection::set_sort_key | ( | FileSelectionSortKey | key,
|  | Gtk::SortType | order |
| ) |  |  |

Changes sort settings for views.

Key only affects content page, navigation pane is always sorted by name.

Parameters:

  | key | New sort key.
  | order | New sort order.

void Hildon::FileSelection::show_content_pane | ( |  | ) |

Shows the content pane.

This is used in certain file management dialogs. The content pane is shown by default. Calling this is needed only if you have hidden

Glib::SignalProxy0< void > Hildon::FileSelection::signal_content_pane_context_menu | ( |  | ) |

Prototype:
  `void content_pane_context_menu()`

Glib::SignalProxy0< void > Hildon::FileSelection::signal_current_folder_changed | ( |  | ) |

Prototype:
  `void current_folder_changed()`

Glib::SignalProxy0< void > Hildon::FileSelection::signal_file_activated | ( |  | ) |

Prototype:
  `void file_activated()`

Glib::SignalProxy1< void,const Gtk::TreeModel::iterator& > Hildon::FileSelection::signal_location_insensitive | ( |  | ) |

Prototype:
  `void location_insensitive(const Gtk::TreeModel::iterator& iter)`

Glib::SignalProxy0< void > Hildon::FileSelection::signal_navigation_pane_context_menu | ( |  | ) |

Prototype:
  `void navigation_pane_context_menu()`

Glib::SignalProxy0< void > Hildon::FileSelection::signal_selection_changed | ( |  | ) |

Prototype:
  `void selection_changed()`

void Hildon::FileSelection::undim_all | ( |  | ) |

Undims all from model that are dimmed by code.

Simply calls Hildon::FileSystemModel::reset_available for underlying model.

void Hildon::FileSelection::unselect_all | ( |  | ) |

Clears current selection from content pane.

void Hildon::FileSelection::unselect_uri | ( | const std::string & | uri | ) |

## Friends And Related Function Documentation

Hildon::FileSelection* wrap | ( | HildonFileSelection * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

Parameters:

  | object | The C instance

Parameters:

  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- file-selection.h