Inheritance diagram for os::FileRequester:
Public Types | |
enum | file_req_mode_t { LOAD_REQ, SAVE_REQ } |
enum | { NODE_FILE = 0x01, NODE_DIR = 0x02 } |
Public Member Functions | |
FileRequester (file_req_mode_t nMode=LOAD_REQ, Messenger *pcTarget=NULL, String cStartPath="", uint32 nNodeType=NODE_FILE, bool bMultiSelect=true, Message *pcMessage=NULL, FileFilter *pcFilter=NULL, bool bModal=false, bool bHideWhenDone=true, String cOkLabel="", String cCancelLabel="") | |
Constructor. | |
virtual | ~FileRequester () |
void | Show (bool bMakeVisible=true) |
Hide/Unhide the window. | |
virtual void | HandleMessage (Message *pcMessage) |
Handle a message targeted at this handler. | |
virtual void | FrameSized (const Point &cDelta) |
virtual bool | OkToQuit (void) |
Check if it is ok to break the loop. | |
void | SetPath (const String &cPath) |
Sets a new path. | |
String | GetPath () const |
Returns the current path. | |
Classes | |
class | Private |
FileRequester::FileRequester | ( | file_req_mode_t | nMode = LOAD_REQ , |
|
Messenger * | pcTarget = NULL , |
|||
String | cStartPath = "" , |
|||
uint32 | nNodeType = NODE_FILE , |
|||
bool | bMultiSelect = true , |
|||
Message * | pcMessage = NULL , |
|||
FileFilter * | pcFilter = NULL , |
|||
bool | bModal = false , |
|||
bool | bHideWhenDone = true , |
|||
String | cOkLabel = "" , |
|||
String | cCancelLabel = "" | |||
) |
nMode | - Whether the filerequester is used to load or save files. | |
zName | - The target of the messages. | |
pzStartPath | - The start path. Default is the home directory of the user. | |
nNodeType | - When NODE_DIR is given, also directories can be opened. | |
bMultiSelect | - Whether multiple files can be selected. | |
pcMessage | - A message which overrieds M_LOAD_REQUESTED/M_SAVE_REQUESTED. | |
pcFilter | - A file filter. NOT SUPPORTED YET. | |
bModal | - NOT SUPPORTED YET. | |
bHideWhenDone | - NOT SUPPORTED YET. | |
cOKLabel | - Overrides "Load" or "Save". | |
cCancelLabel | - Overrides "Cancel". |
FileRequester::~FileRequester | ( | ) | [virtual] |
void FileRequester::Show | ( | bool | bMakeVisible = true |
) |
You can nest calls to Show(false). It will then require the same numbers of Show(true) calls to make the window visible.
bMakeVisible | - Set to true to make the window visible, and false to hide it. |
Reimplemented from os::Window.
void FileRequester::HandleMessage | ( | Message * | pcMessage | ) | [virtual] |
pcMessage
is also available through os::Looper::GetCurrentMessage() and os::Looper::DetachCurrentMessage() until this member returns. This is normally not very usefull for HandleMessage() itself but it can be convinient for other members called from HandleMessage() in case they need data from the message that was not passed on from HandleMessage(). pcMessage | The message that should be handled. This message will be deleted by the looper when HandleMessage() returns unless you detach it with os::Looper::DetachCurrentMessage(), |
Reimplemented from os::Handler.
void FileRequester::FrameSized | ( | const Point & | cDelta | ) | [virtual] |
Reimplemented from os::Window.
bool FileRequester::OkToQuit | ( | void | ) | [virtual] |
Reimplemented from os::Looper.
void FileRequester::SetPath | ( | const String & | cNewPath | ) |
cNewPath | - The new path. |
String FileRequester::GetPath | ( | ) | const |