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:
parent
4d2261c0f6
commit
a362fb0328
2 changed files with 9 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue