/////////////////////////////////////////////////////////////////////////////
// Name: filectrl.h
-// Purpose: documentation for wxFileCtrl class
+// Purpose: interface of wxFileCtrl
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
@library{wxbase}
@category{FIXME}
- @seealso
- wxGenericDirCtrl
+ @see wxGenericDirCtrl
*/
class wxFileCtrl : public wxWindow
{
//@{
/**
@param parent
- Parent window, must not be non-@NULL.
-
+ Parent window, must not be non-@NULL.
@param id
- The identifier for the control.
-
+ The identifier for the control.
@param defaultDirectory
- The initial directory shown in the control. Must be
- a valid path to a directory or the empty string.
- In case it is the empty string, the current working directory is used.
-
+ The initial directory shown in the control. Must be
+ a valid path to a directory or the empty string.
+ In case it is the empty string, the current working directory is used.
@param defaultFilename
- The default filename, or the empty string.
-
+ The default filename, or the empty string.
@param wildcard
- A wildcard specifying which files can be selected,
- such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
-
+ A wildcard specifying which files can be selected,
+ such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
@param style
- The window style, see wxFC_* flags.
-
+ The window style, see wxFC_* flags.
@param pos
- Initial position.
-
+ Initial position.
@param size
- Initial size.
-
+ Initial size.
@param name
- Control name.
-
+ Control name.
+
@returns @true if the control was successfully created or @false if
- creation failed.
+ creation failed.
*/
wxFileCtrl();
- wxFileCtrl(wxWindow * parent, wxWindowID id,
+ wxFileCtrl(wxWindow* parent, wxWindowID id,
const wxString& defaultDirectory = wxEmptyString,
const wxString& defaultFilename = wxEmptyString,
const wxPoint& wildCard = wxFileSelectorDefaultWildcardStr,
/**
Create function for two-step construction. See wxFileCtrl() for details.
*/
- bool Create(wxWindow * parent, wxWindowID id,
+ bool Create(wxWindow* parent, wxWindowID id,
const wxString& defaultDirectory = wxEmptyString,
const wxString& defaultFilename = wxEmptyString,
const wxPoint& wildCard = wxFileSelectorDefaultWildcardStr,
Returns the current directory of the file control (i.e. the directory shown by
it).
*/
- wxString GetDirectory();
+ wxString GetDirectory() const;
/**
Returns the currently selected filename.
For the controls having the @c wxFC_MULTIPLE style, use GetFilenames()
instead
*/
- wxString GetFilename();
+ wxString GetFilename() const;
/**
- Fills the array @e filenames with the filenames only of selected items. This
+ Fills the array @a filenames with the filenames only of selected items. This
function should only be used with the controls having the @c wxFC_MULTIPLE
style,
use GetFilename() for the others.
-
+
@remarks filenames is emptied first.
*/
- void GetFilenames(wxArrayString& filenames);
+ void GetFilenames(wxArrayString& filenames) const;
/**
Returns the zero-based index of the currently selected filter.
*/
- int GetFilterIndex();
+ int GetFilterIndex() const;
/**
Returns the full path (directory and filename) of the currently selected file.
For the controls having the @c wxFC_MULTIPLE style, use GetPaths()
instead
*/
- wxString GetPath();
+ wxString GetPath() const;
/**
- Fills the array @e paths with the full paths of the files chosen. This
+ Fills the array @a paths with the full paths of the files chosen. This
function should be used with the controls having the @c wxFC_MULTIPLE style,
use GetPath() otherwise.
-
+
@remarks paths is emptied first.
*/
- void GetPaths(wxArrayString& paths);
+ void GetPaths(wxArrayString& paths) const;
/**
Returns the current wildcard.
*/
- wxString GetWildcard();
+ wxString GetWildcard() const;
/**
Sets(changes) the current directory displayed in the control.
-
+
@returns Returns @true on success, @false otherwise.
*/
bool SetDirectory(const wxString& directory);
/**
Selects a certain file.
-
+
@returns Returns @true on success, @false otherwise
*/
bool SetFilename(const wxString& filename);
/**
Sets the wildcard, which can contain multiple file types, for example:
-
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
*/
void SetWildcard(const wxString& wildCard);
};
+
/**
@class wxFileCtrlEvent
@wxheader{filectrl.h}
In case of a @b EVT_FILECTRL_FOLDERCHANGED, this method returns the new
directory.
*/
- wxString GetDirectory();
+ wxString GetDirectory() const;
/**
Returns the file selected(assuming it is only one file).
*/
- wxString GetFile();
+ wxString GetFile() const;
/**
Returns the files selected.
In case of a @b EVT_FILECTRL_SELECTIONCHANGED, this method returns the
files selected after the event.
*/
- wxArrayString GetFiles();
+ wxArrayString GetFiles() const;
/**
Sets the files changed by this event.
*/
wxFileCtrlEvent::SetFiles(const wxArrayString files);
};
+