Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

EditFileFolder

 

class EditFileFolder : public EditString

 

As seen in layout designer:

 

 

As seen in program:

 

 

EditFileFolder is a field to introduce a folder path. It is used indirectly through subclasses EditFile and EditFolder.

 

 

Constructor Detail

 

EditFileFolder()

Initializes EditFileFolder.

 

 

Public Member List


 

void Init()

Inits EditFileFolder data. Called by the constructor.

 

 


 

void ClearTypes()

Removes all file types from FileSel.

 


 

void Type(const char *name, const char *ext)

Adds a file type displayed as name. ext contains a set of file masks separated by spaces. Example: Type("Source files", "*.c *.h").

 


 

void ActiveType(int type)

Sets the active file type .

 


 

void AllFilesType()

Same as Type("All files", "*.*").

 


 

void ActiveDir(const String& d)

Sets the active directory of file selector (directory where file selector starts).

 


 

void MkDirOption(bool b)

Makes "Make directory" button visible. Default is true.

 


 

void BaseDir(const char *dir)

Sets dir to be the base directory. If used, files can be selected only inside this base directory (or its subdirectories) and selected file paths are relative to it.

 


 

String Get() const

Gets path in field.

 


 

operator const char *() const

Same as Get().

 


 

String operator~() const

Same as Get().

 


 

operator String() const

Same as Get()

 


 

void Set(const String& s)

Sets path in field with s.

 


 

EditFileFolder &operator=(const char *s)

Same as Set().

 


 

void operator<<=(const String& s)

Same as Set().

 


 

void operator=(const String& s)

Same as Set().

 


 

bool IsEmpty()

Returns true if field is empty.

 


 

EditFileFolder &NotNull(bool b)

If b is set to true null paths are not admitted.

 


 

EditFileFolder &SelLoad(bool load)

If load is true, path is searched for loading. If it is false, path is searched for saving.

 


 

EditFileFolder &SetTitle(const char *title)

title is the String that will appear as title of the FileSel window.

 


 

EditFileFolder &UseOpenFolder(bool use = true)

If use is true, it shows a button to open the folder in the path in a file browser.

 


 

EditFileFolder &UseBrowse(bool use = true)

If use is true, it shows a left button to search the path.

 


 

EditFileFolder &UseBrowseRight(bool use = true)

If use is true, it shows a right button to search the path.

 


 

EditFileFolder &BrowseRightWidth(int w)

Sets the width w of the right browse button.

 


 

EditFileFolder &BrowseOpenFolderWidth(int w)

Sets the width w of the open folder button.

 


 

EditFileFolder &UseDropping(bool use = true)

If use is true, it shows a drop button to show the use history.

 


 

EditFileFolder &BrowseDroppingWidth(int w)

Sets the width of the drop down list to w .

 


 

Function<bool ()> WhenChange

Function to be called when path has been selected with FileSel window, right button is pressed or ENTER key is entered with cursor into field.

If WhenChange returns false, the path is not added to drop list.

 


 

virtual void Serialize(Stream& s)

EditFileFolder serialization with s.

 


 

virtual void Jsonize(JsonIO& jio)

EditFileFolder serialization through JSON with jio.

 


 

void Xmlize(XmlIO &xml)

EditFileFolder serialization through XML with xml.

 

 

Do you want to contribute?