Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <FileBrowserControl.h>
Inheritance diagram for FileBrowserControl:
Causes the selectedFile() function to be called on the root FileBrowserControl with the selected file
Definition at line 11 of file FileBrowserControl.h.
Public Member Functions | |
Constructors/Destructors | |
constructor | |
FileBrowserControl () | |
FileBrowserControl (const std::string &nm, const std::string &desc, const std::string &path) | |
constructor pass name and root path | |
ControlBase Inheritance | |
virtual ControlBase * | activate (MotionManager::MC_ID display, Socket *gui) |
Called when the control is activated (or the control system is reactivating). | |
virtual ControlBase * | doSelect () |
when the user has trigger an "open selection" - default is to return the hilighted control | |
Accessors | |
void | setRecurse (bool r) |
sets recurse | |
bool | getRecurse () const |
returns recurse | |
void | setRoot (const std::string &path) |
sets root | |
std::string | getRoot () const |
returns root | |
void | setPath (const std::string &path) |
sets paths | |
void | setFilter (const std::string &filt) |
sets filter; remember can only use one wildcard, e.g. *.ext or filename.ext or filename* | |
Protected Member Functions | |
virtual ControlBase * | selectedFile (const std::string &) |
the big money function - by default calls the parent if it exists, otherwise nothing | |
std::string | makePath () |
returns the path from root as a string, with no trailing '/' | |
std::string | makePath (const std::string &filename) |
returns the path from root as a string, appends filename | |
void | rebuildmenu () |
rescans current directory and builds menus | |
void | init (std::string path) |
sets a junk menu item to mark this as having submenus, and sets root to path | |
Static Protected Member Functions | |
bool | match (const std::string &file, const std::string &filt) |
returns true if file matches filt | |
Protected Attributes | |
bool | recurse |
if true (default), will show directories; if false, subdirectories are hidden | |
std::string | root |
the path to browse, default "/" | |
std::vector< std::string > | paths |
list of directories from root | |
std::string | filter |
default "*", only display matching files; only can use one wildcard, e.g. *.ext or filename.ext or filename* |
|
Definition at line 15 of file FileBrowserControl.h. |
|
constructor pass name and root path
Definition at line 17 of file FileBrowserControl.h. |
|
Called when the control is activated (or the control system is reactivating). Takes the id number of a LedMC which the control should use, maintained by Controller. Controls share the display which is passed, and may use the socket gui to communicate with the GUI controller, if it is connected.
Reimplemented from ControlBase. Definition at line 7 of file FileBrowserControl.cc. References ControlBase::activate(), and rebuildmenu(). |
|
when the user has trigger an "open selection" - default is to return the hilighted control
Reimplemented from ControlBase. Definition at line 12 of file FileBrowserControl.cc. References ControlBase::doSelect(), ControlBase::getName(), ControlBase::hilights, makePath(), ControlBase::options, paths, rebuildmenu(), ControlBase::refresh(), and selectedFile(). |
|
returns recurse
Definition at line 27 of file FileBrowserControl.h. References recurse. |
|
returns root
Definition at line 30 of file FileBrowserControl.h. References root. |
|
sets a junk menu item to mark this as having submenus, and sets root to path
Definition at line 56 of file FileBrowserControl.h. References ControlBase::pushSlot(), and setRoot(). |
|
returns the path from root as a string, appends filename
Definition at line 66 of file FileBrowserControl.cc. References makePath(). |
|
returns the path from root as a string, with no trailing '/'
Definition at line 56 of file FileBrowserControl.cc. |
|
returns true if file matches filt
Definition at line 73 of file FileBrowserControl.cc. |
|
rescans current directory and builds menus
Definition at line 98 of file FileBrowserControl.cc. References ControlBase::clearSlots(), ControlBase::ControlBase(), filter, ControlBase::hilights, makePath(), match(), ControlBase::options, paths, ControlBase::pushSlot(), and recurse. |
|
the big money function - by default calls the parent if it exists, otherwise nothing returning NULL means deactivate, this (default) to stay put, or a different Control if you want a submenu Reimplemented in DumpFileControl, LoadPostureControl, LoadWalkControl, PlaySoundControl, and RunSequenceControl< SequenceSize >. Definition at line 41 of file FileBrowserControl.h. |
|
sets filter; remember can only use one wildcard, e.g. *.ext or filename.ext or filename*
Definition at line 34 of file FileBrowserControl.h. References filter. |
|
sets paths
Definition at line 47 of file FileBrowserControl.cc. References paths. |
|
sets recurse
Definition at line 26 of file FileBrowserControl.h. References recurse. |
|
sets root
Definition at line 39 of file FileBrowserControl.cc. |
|
default "*", only display matching files; only can use one wildcard, e.g. *.ext or filename.ext or filename*
Definition at line 62 of file FileBrowserControl.h. |
|
list of directories from root
Definition at line 60 of file FileBrowserControl.h. |
|
if true (default), will show directories; if false, subdirectories are hidden
Definition at line 58 of file FileBrowserControl.h. |
|
the path to browse, default "/"
Definition at line 59 of file FileBrowserControl.h. |
Tekkotsu v1.4 |
Generated Sat Jul 19 00:08:57 2003 by Doxygen 1.3.2 |