Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

FileInputControl Class Reference

#include <FileInputControl.h>

Inheritance diagram for FileInputControl:

Inheritance graph
[legend]
List of all members.

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.

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


Member Function Documentation

virtual ControlBase* FileInputControl::invalidInput ( const std::string &  msg,
bool  ambiguous 
) [inline, 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.

virtual ControlBase* FileInputControl::selectedFile ( const std::string &  f  )  [inline, 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().


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

Tekkotsu v3.0
Generated Fri May 11 20:08:09 2007 by Doxygen 1.4.7