libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
GtkCRN::FileSelecter Class Reference

A widget that displays the files in a directory and allows to select one. More...

#include <GtkCRNFileSelecter.h>

+ Inheritance diagram for GtkCRN::FileSelecter:
+ Collaboration diagram for GtkCRN::FileSelecter:

Public Member Functions

 FileSelecter (const crn::Path &p)
 Constructor. More...
 
virtual ~FileSelecter () override
 
void set_path (const crn::Path &p)
 Sets the path of the directory to display. More...
 
const crn::Pathget_path () const
 Gets the path of the displayed directory. More...
 
bool set_selection (const crn::Path &p)
 Sets the selected file. More...
 
crn::Path get_selection () const
 Gets the selected file. More...
 
sigc::signal< void, crn::Pathsignal_selection_changed ()
 Signals when a file was selected. Connect to void on_new_file_selected(crn::Path relative_filename) More...
 
sigc::signal< void, crn::Pathsignal_selection_activated ()
 Signals when a file was double clicked. Connect to void on_double_click(crn::Path relative_filename) More...
 

Detailed Description

A widget that displays the files in a directory and allows to select one.

A widget that displays the files in a directory and allows to select one.

Definition at line 36 of file GtkCRNFileSelecter.h.

Constructor & Destructor Documentation

FileSelecter::FileSelecter ( const crn::Path p)

Constructor.

Constructor

Parameters
[in]pthe path to the directory to display

Definition at line 33 of file GtkCRNFileSelecter.cpp.

virtual GtkCRN::FileSelecter::~FileSelecter ( )
inlineoverridevirtual

Definition at line 41 of file GtkCRNFileSelecter.h.

Member Function Documentation

const crn::Path& GtkCRN::FileSelecter::get_path ( ) const
inline

Gets the path of the displayed directory.

Definition at line 46 of file GtkCRNFileSelecter.h.

crn::Path FileSelecter::get_selection ( ) const

Gets the selected file.

Gets the selected file

Returns
a void string if nothing is selected, the selected (relative) filename else

Definition at line 87 of file GtkCRNFileSelecter.cpp.

void FileSelecter::set_path ( const crn::Path p)

Sets the path of the directory to display.

Sets the path of the directory to display

Parameters
[in]pthe path to the directory to display

Definition at line 60 of file GtkCRNFileSelecter.cpp.

bool FileSelecter::set_selection ( const crn::Path p)

Sets the selected file.

Sets the selected file

Parameters
pthe (relative) filename to select
Returns
true if the file exists, false else

Definition at line 71 of file GtkCRNFileSelecter.cpp.

sigc::signal<void, crn::Path> GtkCRN::FileSelecter::signal_selection_activated ( )
inline

Signals when a file was double clicked. Connect to void on_double_click(crn::Path relative_filename)

Definition at line 56 of file GtkCRNFileSelecter.h.

sigc::signal<void, crn::Path> GtkCRN::FileSelecter::signal_selection_changed ( )
inline

Signals when a file was selected. Connect to void on_new_file_selected(crn::Path relative_filename)

Definition at line 54 of file GtkCRNFileSelecter.h.


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