1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00

Added method FilenameComponent::getCurrentFileText()

This commit is contained in:
jules 2014-06-22 19:20:22 +01:00
parent 4d2261c0f6
commit a362fb0328
2 changed files with 9 additions and 1 deletions

View file

@ -162,9 +162,14 @@ void FilenameComponent::fileDragExit (const StringArray&)
}
//==============================================================================
String FilenameComponent::getCurrentFileText() const
{
return filenameBox.getText();
}
File FilenameComponent::getCurrentFile() const
{
File f (File::getCurrentWorkingDirectory().getChildFile (filenameBox.getText()));
File f (File::getCurrentWorkingDirectory().getChildFile (getCurrentFileText()));
if (enforcedSuffix.isNotEmpty())
f = f.withFileExtension (enforcedSuffix);

View file

@ -103,6 +103,9 @@ public:
/** Returns the currently displayed filename. */
File getCurrentFile() const;
/** Returns the raw text that the user has entered. */
String getCurrentFileText() const;
/** Changes the current filename.
@param newFile the new filename to use