LMMS
Loading...
Searching...
No Matches
juce::Win32NativeFileChooser Class Reference
Inheritance diagram for juce::Win32NativeFileChooser:
juce::Thread

Classes

class  CustomComponentHolder
struct  FreeLPWSTR

Public Types

enum  { charsAvailableForResult = 32768 }

Public Member Functions

 Win32NativeFileChooser (Component *parent, int flags, FilePreviewComponent *previewComp, const File &startingFile, const String &titleToUse, const String &filtersToUse)
 ~Win32NativeFileChooser () override
void open (bool async)
void cancel ()
ComponentgetCustomComponent ()

Public Attributes

Array< URLresults

Private Member Functions

Array< URLopenDialogPreVista (bool async)
Array< URLopenDialog (bool async)
void run () override
void setupFilters ()
DWORD getOpenFilenameFlags (bool async)
String getDefaultFileExtension (const String &filename) const
void initialised (HWND hWnd)
void validateFailed (const String &path)
void initDialog (HWND hdlg)
void destroyDialog (HWND hdlg)
void selectionChanged (HWND hdlg)
Private Member Functions inherited from juce::Thread
 Thread (const String &threadName, size_t threadStackSize=0)
virtual ~Thread ()
void startThread ()
void startThread (int priority)
bool stopThread (int timeOutMilliseconds)
bool isThreadRunning () const
void signalThreadShouldExit ()
bool threadShouldExit () const
bool waitForThreadToExit (int timeOutMilliseconds) const
void addListener (Listener *)
void removeListener (Listener *)
bool setPriority (int priority)
void setAffinityMask (uint32 affinityMask)
bool wait (int timeOutMilliseconds) const
void notify () const
ThreadID getThreadId () const noexcept
const StringgetThreadName () const noexcept

Static Private Member Functions

static HashMap< HWND, Win32NativeFileChooser * > & getNativeDialogList ()
static Win32NativeFileChoosergetNativePointerForDialog (HWND hwnd)
static int CALLBACK browseCallbackProc (HWND hWnd, UINT msg, LPARAM lParam, LPARAM lpData)
static UINT_PTR CALLBACK openCallback (HWND hwnd, UINT uiMsg, WPARAM, LPARAM lParam)
static HWND getDialogFromHWND (HWND hwnd)
Static Private Member Functions inherited from juce::Thread
static void launch (std::function< void()> functionToRun)
static bool currentThreadShouldExit ()
static bool setCurrentThreadPriority (int priority)
static void JUCE_CALLTYPE setCurrentThreadAffinityMask (uint32 affinityMask)
static void JUCE_CALLTYPE sleep (int milliseconds)
static void JUCE_CALLTYPE yield ()
static ThreadID JUCE_CALLTYPE getCurrentThreadId ()
static Thread *JUCE_CALLTYPE getCurrentThread ()
static void JUCE_CALLTYPE setCurrentThreadName (const String &newThreadName)

Private Attributes

const Component::SafePointer< Componentowner
String title
String filtersString
std::unique_ptr< CustomComponentHoldercustomComponent
String initialPath
String returnedString
CriticalSection deletingDialog
bool selectsDirectories
bool isSave
bool warnAboutOverwrite
bool selectMultiple
HeapBlock< WCHAR > files
HeapBlock< WCHAR > filters
Atomic< HWNDnativeDialogRef { nullptr }
bool shouldCancel = false

Additional Inherited Members

Private Types inherited from juce::Thread
enum  { realtimeAudioPriority = -1 }
using ThreadID = void*

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
charsAvailableForResult 

Constructor & Destructor Documentation

◆ Win32NativeFileChooser()

juce::Win32NativeFileChooser::Win32NativeFileChooser ( Component * parent,
int flags,
FilePreviewComponent * previewComp,
const File & startingFile,
const String & titleToUse,
const String & filtersToUse )
inline

◆ ~Win32NativeFileChooser()

juce::Win32NativeFileChooser::~Win32NativeFileChooser ( )
inlineoverride

Member Function Documentation

◆ browseCallbackProc()

int CALLBACK juce::Win32NativeFileChooser::browseCallbackProc ( HWND hWnd,
UINT msg,
LPARAM lParam,
LPARAM lpData )
inlinestaticprivate

◆ cancel()

void juce::Win32NativeFileChooser::cancel ( )
inline

◆ destroyDialog()

void juce::Win32NativeFileChooser::destroyDialog ( HWND hdlg)
inlineprivate

◆ getCustomComponent()

Component * juce::Win32NativeFileChooser::getCustomComponent ( )
inline

◆ getDefaultFileExtension()

String juce::Win32NativeFileChooser::getDefaultFileExtension ( const String & filename) const
inlineprivate

◆ getDialogFromHWND()

HWND juce::Win32NativeFileChooser::getDialogFromHWND ( HWND hwnd)
inlinestaticprivate

◆ getNativeDialogList()

HashMap< HWND, Win32NativeFileChooser * > & juce::Win32NativeFileChooser::getNativeDialogList ( )
inlinestaticprivate

◆ getNativePointerForDialog()

Win32NativeFileChooser * juce::Win32NativeFileChooser::getNativePointerForDialog ( HWND hwnd)
inlinestaticprivate

◆ getOpenFilenameFlags()

DWORD juce::Win32NativeFileChooser::getOpenFilenameFlags ( bool async)
inlineprivate

◆ initDialog()

void juce::Win32NativeFileChooser::initDialog ( HWND hdlg)
inlineprivate

◆ initialised()

void juce::Win32NativeFileChooser::initialised ( HWND hWnd)
inlineprivate

◆ open()

void juce::Win32NativeFileChooser::open ( bool async)
inline

◆ openCallback()

UINT_PTR CALLBACK juce::Win32NativeFileChooser::openCallback ( HWND hwnd,
UINT uiMsg,
WPARAM ,
LPARAM lParam )
inlinestaticprivate

◆ openDialog()

Array< URL > juce::Win32NativeFileChooser::openDialog ( bool async)
inlineprivate

◆ openDialogPreVista()

Array< URL > juce::Win32NativeFileChooser::openDialogPreVista ( bool async)
inlineprivate

◆ run()

void juce::Win32NativeFileChooser::run ( )
inlineoverrideprivatevirtual

Must be implemented to perform the thread's actual code.

Remember that the thread must regularly check the threadShouldExit() method whilst running, and if this returns true it should return from the run() method as soon as possible to avoid being forcibly killed.

See also
threadShouldExit, startThread

Implements juce::Thread.

◆ selectionChanged()

void juce::Win32NativeFileChooser::selectionChanged ( HWND hdlg)
inlineprivate

◆ setupFilters()

void juce::Win32NativeFileChooser::setupFilters ( )
inlineprivate

◆ validateFailed()

void juce::Win32NativeFileChooser::validateFailed ( const String & path)
inlineprivate

Member Data Documentation

◆ customComponent

std::unique_ptr<CustomComponentHolder> juce::Win32NativeFileChooser::customComponent
private

◆ deletingDialog

CriticalSection juce::Win32NativeFileChooser::deletingDialog
private

◆ files

HeapBlock<WCHAR> juce::Win32NativeFileChooser::files
private

◆ filters

HeapBlock<WCHAR> juce::Win32NativeFileChooser::filters
private

◆ filtersString

String juce::Win32NativeFileChooser::filtersString
private

◆ initialPath

String juce::Win32NativeFileChooser::initialPath
private

◆ isSave

bool juce::Win32NativeFileChooser::isSave
private

◆ nativeDialogRef

Atomic<HWND> juce::Win32NativeFileChooser::nativeDialogRef { nullptr }
private

◆ owner

const Component::SafePointer<Component> juce::Win32NativeFileChooser::owner
private

◆ results

Array<URL> juce::Win32NativeFileChooser::results

◆ returnedString

String juce::Win32NativeFileChooser::returnedString
private

◆ selectMultiple

bool juce::Win32NativeFileChooser::selectMultiple
private

◆ selectsDirectories

bool juce::Win32NativeFileChooser::selectsDirectories
private

◆ shouldCancel

bool juce::Win32NativeFileChooser::shouldCancel = false
private

◆ title

String juce::Win32NativeFileChooser::title
private

◆ warnAboutOverwrite

bool juce::Win32NativeFileChooser::warnAboutOverwrite
private

The documentation for this class was generated from the following file: