#include <fileopen.h>
Public Member Functions | |
FileOpen (std::string t) throw (YAPETUI::UIException) | |
std::string | getFilepath () |
bool | isCanceled () const |
void | refresh () throw (YAPETUI::UIException) |
void | resize () throw (YAPETUI::UIException) |
void | run () throw (YAPETUI::UIException) |
virtual | ~FileOpen () |
Protected Member Functions | |
void | cd (const YAPETUI::secstring d) throw (YAPETUI::UIException) |
void | getcwd () throw (YAPETUI::UIException) |
void | getEntries (std::list< YAPETUI::secstring > &d, std::list< YAPETUI::secstring > &f) throw (YAPETUI::UIException) |
Private Types | |
enum | { FALLBACK_PATH_MAX = 255 } |
Private Member Functions | |
void | createWindows () throw (YAPETUI::UIException) |
FileOpen (const FileOpen &) | |
const FileOpen & | operator= (const FileOpen &) |
void | printCWD () throw (YAPETUI::UIException) |
void | printTitle () throw (YAPETUI::UIException) |
int | startX () |
int | startY () |
int | windowHeight () |
int | windowWidth () |
Private Attributes | |
YAPETUI::Button * | cancelbutton |
bool | canceled |
YAPETUI::ListWidget < YAPETUI::secstring > * | dir |
YAPETUI::secstring | directory |
YAPETUI::secstring | filename |
YAPETUI::ListWidget < YAPETUI::secstring > * | files |
YAPETUI::InputWidget * | input |
YAPETUI::Button * | okbutton |
std::string | title |
WINDOW * | window |
.pet.
getFilepath()
always ends with
.pet. Definition at line 55 of file fileopen.h.
anonymous enum [private] |
FALLBACK_PATH_MAX |
The max filename length.
This is only used if we are unable to determine the max length of the filename by other means. |
Definition at line 57 of file fileopen.h.
FileOpen::FileOpen | ( | const FileOpen & | ) | [inline, private] |
Definition at line 78 of file fileopen.h.
FileOpen::FileOpen | ( | std::string | t | ) | throw (YAPETUI::UIException) |
Definition at line 182 of file fileopen.cc.
FileOpen::~FileOpen | ( | ) | [virtual] |
Definition at line 196 of file fileopen.cc.
References cancelbutton, dir, files, input, okbutton, and window.
void FileOpen::cd | ( | const YAPETUI::secstring | d | ) | throw (YAPETUI::UIException) [protected] |
void FileOpen::createWindows | ( | ) | throw (YAPETUI::UIException) [private] |
Definition at line 57 of file fileopen.cc.
References cancelbutton, dir, files, getEntries(), input, okbutton, startX(), startY(), window, windowHeight(), and windowWidth().
Referenced by resize().
void FileOpen::getcwd | ( | ) | throw (YAPETUI::UIException) [protected] |
void FileOpen::getEntries | ( | std::list< YAPETUI::secstring > & | d, | |
std::list< YAPETUI::secstring > & | f | |||
) | throw (YAPETUI::UIException) [protected] |
Definition at line 94 of file fileopen.cc.
References endswith().
Referenced by createWindows(), and run().
std::string FileOpen::getFilepath | ( | ) |
Definition at line 345 of file fileopen.cc.
References directory, endswith(), and filename.
Referenced by MainWindow::run().
bool FileOpen::isCanceled | ( | ) | const [inline] |
Definition at line 79 of file fileopen.h.
void FileOpen::printCWD | ( | ) | throw (YAPETUI::UIException) [private] |
void FileOpen::printTitle | ( | ) | throw (YAPETUI::UIException) [private] |
void FileOpen::refresh | ( | ) | throw (YAPETUI::UIException) [virtual] |
Implements YAPETUI::BaseWindow.
Definition at line 299 of file fileopen.cc.
References box(), cancelbutton, dir, files, input, YAPETUI::MESSAGEBOX, okbutton, printCWD(), printTitle(), YAPETUI::Button::refresh(), YAPETUI::InputWidget::refresh(), YAPETUI::ListWidget< T >::refresh(), YAPETUI::Colors::setcolor(), and window.
Referenced by run().
void FileOpen::resize | ( | ) | throw (YAPETUI::UIException) [virtual] |
Implements YAPETUI::BaseWindow.
Definition at line 323 of file fileopen.cc.
References cancelbutton, createWindows(), dir, files, input, okbutton, and window.
void FileOpen::run | ( | ) | throw (YAPETUI::UIException) |
Definition at line 207 of file fileopen.cc.
References cancelbutton, canceled, cd(), dir, filename, files, YAPETUI::Button::focus(), YAPETUI::InputWidget::focus(), YAPETUI::ListWidget< T >::focus(), getEntries(), YAPETUI::ListWidget< T >::getSelectedItem(), YAPETUI::InputWidget::getText(), input, okbutton, printCWD(), refresh(), YAPETUI::BaseWindow::resizeAll(), YAPETUI::MessageBox::run(), YAPETUI::ListWidget< T >::setList(), YAPETUI::InputWidget::setText(), and YAPETUI::UIException::what().
Referenced by MainWindow::run().
int FileOpen::startX | ( | ) | [inline, private] |
Definition at line 92 of file fileopen.h.
References YAPETUI::BaseWindow::minX().
Referenced by createWindows().
int FileOpen::startY | ( | ) | [inline, private] |
Definition at line 96 of file fileopen.h.
References YAPETUI::BaseWindow::minY().
Referenced by createWindows().
int FileOpen::windowHeight | ( | ) | [inline, private] |
Definition at line 88 of file fileopen.h.
References YAPETUI::BaseWindow::maxY().
Referenced by createWindows().
int FileOpen::windowWidth | ( | ) | [inline, private] |
Definition at line 84 of file fileopen.h.
References YAPETUI::BaseWindow::maxX().
Referenced by createWindows(), and printCWD().
YAPETUI::Button* FileOpen::cancelbutton [private] |
Definition at line 73 of file fileopen.h.
Referenced by createWindows(), refresh(), resize(), run(), and ~FileOpen().
bool FileOpen::canceled [private] |
YAPETUI::ListWidget<YAPETUI::secstring>* FileOpen::dir [private] |
Definition at line 69 of file fileopen.h.
Referenced by createWindows(), refresh(), resize(), run(), and ~FileOpen().
YAPETUI::secstring FileOpen::directory [private] |
YAPETUI::secstring FileOpen::filename [private] |
YAPETUI::ListWidget<YAPETUI::secstring>* FileOpen::files [private] |
Definition at line 70 of file fileopen.h.
Referenced by createWindows(), refresh(), resize(), run(), and ~FileOpen().
YAPETUI::InputWidget* FileOpen::input [private] |
Definition at line 71 of file fileopen.h.
Referenced by createWindows(), refresh(), resize(), run(), and ~FileOpen().
YAPETUI::Button* FileOpen::okbutton [private] |
Definition at line 72 of file fileopen.h.
Referenced by createWindows(), refresh(), resize(), run(), and ~FileOpen().
std::string FileOpen::title [private] |
WINDOW* FileOpen::window [private] |
Definition at line 68 of file fileopen.h.
Referenced by createWindows(), printCWD(), printTitle(), refresh(), resize(), and ~FileOpen().