Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

FileInputControl Class Reference

Upon activation, allows user to browse files and select one; stores path in a string. More...

#include <FileInputControl.h>

Inheritance diagram for FileInputControl:

Detailed Description

Upon activation, allows user to browse files and select one; stores path in a string.

Definition at line 9 of file FileInputControl.h.

List of all members.

Public Member Functions

 FileInputControl ()
 Constructor.
 FileInputControl (const std::string &nm, const std::string &desc, const std::string &path, std::string *store=NULL)
 Constructor.
virtual const std::string & getLastInput ()
 returns the path to file last selected; use takeInput() to assign to this
virtual void clearLastInput ()
 clears the last input (i.e. so you can easily tell later if new input is entered)
virtual void setStore (std::string *store)
 pass pointer to an external string you wish to have set when a file is selected; NULL otherwise
virtual void setAcceptNonExistant (bool b)
 sets acceptNonExistant
virtual bool getAcceptNonExistant () const
 returns acceptNonExistant

Protected Member Functions

virtual ControlBaseselectedFile (const std::string &f)
 the big money function - by default calls the parent if it exists, otherwise nothing
virtual ControlBaseinvalidInput (const std::string &msg, bool ambiguous)
 called by takeInput if the input doesn't match any slots or matches multiple slots -- the ControlBase implementation displays an error and returns itself

Protected Attributes

std::string * file
 if we're supposed to store in an external string, this will point to it, otherwise NULL
std::string myfile
 stores last file selected
bool acceptNonExistant
 if true, will set file and myfile to "invalid" inputs as well -- i.e. inputs that don't correspond to any current file (so user can request a new one)

Private Member Functions

 FileInputControl (const FileInputControl &)
 don't call
FileInputControloperator= (const FileInputControl &)
 don't call

Constructor & Destructor Documentation

FileInputControl::FileInputControl (  ) 

Constructor.

Definition at line 12 of file FileInputControl.h.

FileInputControl::FileInputControl ( const std::string &  nm,
const std::string &  desc,
const std::string &  path,
std::string *  store = NULL 
)

Constructor.

Definition at line 17 of file FileInputControl.h.

FileInputControl::FileInputControl ( const FileInputControl  )  [private]

don't call


Member Function Documentation

virtual void FileInputControl::clearLastInput (  )  [virtual]

clears the last input (i.e. so you can easily tell later if new input is entered)

Definition at line 25 of file FileInputControl.h.

Referenced by WaypointWalkControl::refresh(), and PostureEditor::refresh().

virtual bool FileInputControl::getAcceptNonExistant (  )  const [virtual]

returns acceptNonExistant

Definition at line 33 of file FileInputControl.h.

virtual const std::string& FileInputControl::getLastInput (  )  [virtual]

returns the path to file last selected; use takeInput() to assign to this

Definition at line 22 of file FileInputControl.h.

Referenced by WaypointWalkControl::refresh(), WalkCalibration::refresh(), TorqueCalibrate::refresh(), and PostureEditor::refresh().

virtual ControlBase* FileInputControl::invalidInput ( const std::string &  msg,
bool  ambiguous 
) [protected, virtual]

called by takeInput if the input doesn't match any slots or matches multiple slots -- the ControlBase implementation displays an error and returns itself

Parameters:
msg the input originally sent to takeInput()
ambiguous true if the input matched more than one item, false if it didn't match any

Reimplemented from ControlBase.

Definition at line 42 of file FileInputControl.h.

FileInputControl& FileInputControl::operator= ( const FileInputControl  )  [private]

don't call

virtual ControlBase* FileInputControl::selectedFile ( const std::string &   )  [protected, virtual]

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 from FileBrowserControl.

Reimplemented in ConfigurationEditor::LoadSettings, and ConfigurationEditor::SaveSettings.

Definition at line 36 of file FileInputControl.h.

Referenced by clearLastInput(), and invalidInput().

virtual void FileInputControl::setAcceptNonExistant ( bool  b  )  [virtual]
virtual void FileInputControl::setStore ( std::string *  store  )  [virtual]

pass pointer to an external string you wish to have set when a file is selected; NULL otherwise

Definition at line 28 of file FileInputControl.h.


Member Data Documentation

if true, will set file and myfile to "invalid" inputs as well -- i.e. inputs that don't correspond to any current file (so user can request a new one)

Definition at line 50 of file FileInputControl.h.

Referenced by getAcceptNonExistant(), invalidInput(), and setAcceptNonExistant().

std::string* FileInputControl::file [protected]

if we're supposed to store in an external string, this will point to it, otherwise NULL

Definition at line 48 of file FileInputControl.h.

Referenced by selectedFile(), and setStore().

std::string FileInputControl::myfile [protected]

stores last file selected

Definition at line 49 of file FileInputControl.h.

Referenced by getLastInput(), and selectedFile().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:08 2016 by Doxygen 1.6.3