Public Member Functions | |
XFileList () | |
XFileList (const Glib::RefPtr< Gtk::TreeModel > &model) | |
virtual | ~XFileList () |
virtual std::string | getFilename (const Gtk::TreeIter &line) const |
virtual void | setFilename (Gtk::TreeIter &line, const std::string &file) |
Static Public Member Functions | |
static Glib::RefPtr< Gdk::Pixbuf > | getIcon4File (const YGP::File &file) |
Protected Member Functions | |
virtual bool | on_event (GdkEvent *event) |
void | startInTerm (const char *file, Gtk::TreeIter line) |
void | startProgram (const char *file, Gtk::TreeIter line) |
void | executeProgram (const char *file, Gtk::TreeIter line) |
bool | execProgram (const char *file, const char *const args[], bool sync) |
virtual void | addMenus (Gtk::Menu &menu, const Gtk::TreeIter &line) |
void | move (Gtk::TreeIter line) |
void | remove (Gtk::TreeIter line) |
Protected Attributes | |
Gtk::Menu * | pMenuPopAction |
The model to display should depend on the column-records specified above.
XGP::XFileList::XFileList | ( | ) | [inline] |
Constructor of the XFileList widget.
XGP::XFileList::XFileList | ( | const Glib::RefPtr< Gtk::TreeModel > & | model | ) | [inline] |
Constructor of the XFileList widget; passing a model to display.
XGP::XFileList::~XFileList | ( | ) | [virtual] |
Destructor.
void XGP::XFileList::addMenus | ( | Gtk::Menu & | menu, | |
const Gtk::TreeIter & | line | |||
) | [protected, virtual] |
Method to add menus to the popup menu activated with the right mouse button (button 3).
Adds further menus to the default popup-menu.
Menu | where to add some entries to | |
Line | for which to add entries |
bool XGP::XFileList::execProgram | ( | const char * | file, | |
const char *const | args[], | |||
bool | sync | |||
) | [protected] |
Starts the passed program with argument.
file | File to execute | |
args | Arguments for the program | |
sync | Flag, if file should be executed synchron or not |
void XGP::XFileList::executeProgram | ( | const char * | file, | |
Gtk::TreeIter | line | |||
) | [protected] |
Starts the passed program in the foreground with argument as argument.
file | File to execute | |
line | Line in list of file to pass as argument |
std::string XGP::XFileList::getFilename | ( | const Gtk::TreeIter & | line | ) | const [virtual] |
Retrieves the file name of the passed line; which is considered to be stored in the column 1.
line | Line in list to get the filename from |
Glib::RefPtr< Gdk::Pixbuf > XGP::XFileList::getIcon4File | ( | const YGP::File & | file | ) | [static] |
Searches for and sets an icon for the passed file The icon for the file is calculated according the following algorithm: - Use special (predifined) ones for directories or executeables.
file | Files to use as icon-files |
void XGP::XFileList::move | ( | Gtk::TreeIter | line | ) | [protected] |
Moves the file in line to another location/name.
line | Line in list of file to pass as argument |
bool XGP::XFileList::on_event | ( | GdkEvent * | event | ) | [protected, virtual] |
Callback after clicking in list; if its by button 3: Display menu.
event | Datails about the event |
void XGP::XFileList::remove | ( | Gtk::TreeIter | line | ) | [protected] |
Removes the passed file; both from the system and from the list.
line | Line in list of file to pass as argument |
void XGP::XFileList::setFilename | ( | Gtk::TreeIter & | line, | |
const std::string & | file | |||
) | [virtual] |
Sets the file name of the passed line; which is considered to be stored in the column 1.
line | Line in list to get the filename from | |
file | Filename to set |
void XGP::XFileList::startInTerm | ( | const char * | file, | |
Gtk::TreeIter | line | |||
) | [protected] |
Starts the passed program in a terminal with argument as argument.
file | File to execute | |
line | Line in list of file to pass as argument |
void XGP::XFileList::startProgram | ( | const char * | file, | |
Gtk::TreeIter | line | |||
) | [protected] |
Starts the passed program in the background with argument as argument.
file | File to execute | |
line | Line in list of file to pass as argument |
Gtk::Menu* XGP::XFileList::pMenuPopAction [protected] |
Popup menu after pressing button 3.