Planeshift
|
#include <pawsfilenavigation.h>
Public Member Functions | |
virtual bool | FillFileList () |
Refreshes the current listing of files based on the current directory. | |
virtual const char * | GetCurrentPath () |
Called to retrieve just the full path of current browsing. | |
virtual const char * | GetFullPathFilename () |
Called to retrieve the full path of the current browsing concatenated with the text in the. | |
virtual int | GetSelectionState () |
Called to retrieve the current selection state of the file navigation box. | |
void | Initialize (const csString &filename, const csString &filter, iOnFileSelectedAction *action) |
virtual bool | OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget) |
Called whenever a button is pressed. | |
virtual bool | OnChange (pawsWidget *widget) |
Called whenever a widget is selected. | |
virtual bool | OnKeyDown (utf32_char keyCode, utf32_char key, int modifiers) |
Process keydown messages. | |
virtual void | OnListAction (pawsListBox *selected, int status) |
Called whenever an item in a child list box is selected. | |
pawsFileNavigation () | |
pawsFileNavigation (const pawsFileNavigation &origin) | |
virtual bool | PostSetup () |
This is called after the widget and all of it's children have been created. | |
virtual void | SetActionButtonText (const char *actiontext) |
Called to set the text of the action/perorm button. | |
virtual bool | SetFileFilters (const char *filename) |
virtual bool | SetSelectedFilename (const char *filename) |
Called to set the selected filename field. | |
virtual void | Show () |
Overridden to reset the selection state on Show() | |
virtual | ~pawsFileNavigation () |
Static Public Member Functions | |
static pawsFileNavigation * | Create (const csString &label, const csString &filter, iOnFileSelectedAction *action, const char *xmlWidget="filenavigation.xml") |
Protected Member Functions | |
virtual bool | DownOnePath (const char *pathstring, int pathlen) |
virtual const char * | GetFilterForSelection () |
virtual bool | RelativeIsFile (const char *filename) |
virtual bool | SetFilterForSelection (const char *filename) |
Called to set the filterfunction. | |
virtual bool | SmartAppendPath (const char *append) |
Appends a section of a path to the current path. Interprets . and .. appropriately. | |
virtual bool | SmartSetPath (const char *path) |
Similar to SmartAppendPath, but a leading / or \ is interpretted from the root. | |
virtual bool | UpOnePath () |
Protected Attributes | |
iOnFileSelectedAction * | action |
csString | current_path |
The current virtual path. | |
pawsListBox * | dirlistbox |
The directory display listbox child of this widget. | |
pawsListBox * | filelistbox |
The file display listbox child of this widget. | |
char * | fullpathandfilename |
A buffer used to construct the full path and file of a selected file. Not always valid. | |
int | selection_state |
Stores the current selection state (none selected, canceled, or perform) | |
csRef< iVFS > | vfs |
A reference to the iVFS for the file system, used for navigation. | |
csArray< csString > | zip_mounts |
Definition at line 43 of file pawsfilenavigation.h.
pawsFileNavigation::pawsFileNavigation | ( | ) |
virtual pawsFileNavigation::~pawsFileNavigation | ( | ) | [virtual] |
pawsFileNavigation::pawsFileNavigation | ( | const pawsFileNavigation & | origin | ) |
static pawsFileNavigation* pawsFileNavigation::Create | ( | const csString & | label, |
const csString & | filter, | ||
iOnFileSelectedAction * | action, | ||
const char * | xmlWidget = "filenavigation.xml" |
||
) | [static] |
virtual bool pawsFileNavigation::DownOnePath | ( | const char * | pathstring, |
int | pathlen | ||
) | [protected, virtual] |
virtual bool pawsFileNavigation::FillFileList | ( | ) | [virtual] |
Refreshes the current listing of files based on the current directory.
virtual const char* pawsFileNavigation::GetCurrentPath | ( | ) | [virtual] |
Called to retrieve just the full path of current browsing.
virtual const char* pawsFileNavigation::GetFilterForSelection | ( | ) | [protected, virtual] |
virtual const char* pawsFileNavigation::GetFullPathFilename | ( | ) | [virtual] |
Called to retrieve the full path of the current browsing concatenated with the text in the.
virtual int pawsFileNavigation::GetSelectionState | ( | ) | [virtual] |
Called to retrieve the current selection state of the file navigation box.
States can be: PAWSFILENAV_SELECTION_UNDETERMINED - The window is still open and neither the perform button nor the cancel button has been pressed. PAWSFILENAV_SELECTION_CANCEL - The cancel button was pressed, or the window was closed. PAWSFILENAV_SELECTION_PERFORM - The perform button was pressed. The cancel button specifically overrides the perform button. The perform button does not override the cancel button.
void pawsFileNavigation::Initialize | ( | const csString & | filename, |
const csString & | filter, | ||
iOnFileSelectedAction * | action | ||
) |
virtual bool pawsFileNavigation::OnButtonPressed | ( | int | button, |
int | keyModifier, | ||
pawsWidget * | widget | ||
) | [virtual] |
Called whenever a button is pressed.
button | The button pressed. |
keyModifier | Modifier key in effect. |
widget | The widget the button belongs to. |
Reimplemented from pawsWidget.
virtual bool pawsFileNavigation::OnChange | ( | pawsWidget * | widget | ) | [virtual] |
Called whenever a widget is selected.
widget | The widget acted upon. |
Reimplemented from pawsWidget.
virtual bool pawsFileNavigation::OnKeyDown | ( | utf32_char | keyCode, |
utf32_char | keyChar, | ||
int | modifiers | ||
) | [virtual] |
Process keydown messages.
keyCode | The code for the pressed key. |
keyChar | The key pressed. |
modifiers | Used to modify tab behavior. |
Reimplemented from pawsWidget.
virtual void pawsFileNavigation::OnListAction | ( | pawsListBox * | selected, |
int | status | ||
) | [virtual] |
Called whenever an item in a child list box is selected.
selected | The listbox that has the item selected. |
status | From listbox when a row is selected. |
Reimplemented from pawsWidget.
virtual bool pawsFileNavigation::PostSetup | ( | ) | [virtual] |
This is called after the widget and all of it's children have been created.
Reimplemented from pawsWidget.
virtual bool pawsFileNavigation::RelativeIsFile | ( | const char * | filename | ) | [protected, virtual] |
virtual void pawsFileNavigation::SetActionButtonText | ( | const char * | actiontext | ) | [virtual] |
Called to set the text of the action/perorm button.
virtual bool pawsFileNavigation::SetFileFilters | ( | const char * | filename | ) | [virtual] |
virtual bool pawsFileNavigation::SetFilterForSelection | ( | const char * | filename | ) | [protected, virtual] |
Called to set the filterfunction.
virtual bool pawsFileNavigation::SetSelectedFilename | ( | const char * | filename | ) | [virtual] |
Called to set the selected filename field.
virtual void pawsFileNavigation::Show | ( | ) | [virtual] |
Overridden to reset the selection state on Show()
Reimplemented from pawsWidget.
virtual bool pawsFileNavigation::SmartAppendPath | ( | const char * | append | ) | [protected, virtual] |
Appends a section of a path to the current path. Interprets . and .. appropriately.
virtual bool pawsFileNavigation::SmartSetPath | ( | const char * | path | ) | [protected, virtual] |
Similar to SmartAppendPath, but a leading / or \ is interpretted from the root.
virtual bool pawsFileNavigation::UpOnePath | ( | ) | [protected, virtual] |
iOnFileSelectedAction* pawsFileNavigation::action [protected] |
Definition at line 127 of file pawsfilenavigation.h.
csString pawsFileNavigation::current_path [protected] |
The current virtual path.
Definition at line 110 of file pawsfilenavigation.h.
pawsListBox* pawsFileNavigation::dirlistbox [protected] |
The directory display listbox child of this widget.
Definition at line 115 of file pawsfilenavigation.h.
pawsListBox* pawsFileNavigation::filelistbox [protected] |
The file display listbox child of this widget.
Definition at line 118 of file pawsfilenavigation.h.
char* pawsFileNavigation::fullpathandfilename [protected] |
A buffer used to construct the full path and file of a selected file. Not always valid.
Definition at line 122 of file pawsfilenavigation.h.
int pawsFileNavigation::selection_state [protected] |
Stores the current selection state (none selected, canceled, or perform)
Definition at line 125 of file pawsfilenavigation.h.
csRef<iVFS> pawsFileNavigation::vfs [protected] |
A reference to the iVFS for the file system, used for navigation.
Definition at line 107 of file pawsfilenavigation.h.
csArray<csString> pawsFileNavigation::zip_mounts [protected] |
Definition at line 112 of file pawsfilenavigation.h.