WidgetChooseFolder Class Template Reference
[Widgets]

ChooseFolderDialog class. More...

List of all members.

Public Types

typedef WidgetChooseFolder<
Parent > 
ObjectType
 Object type.
typedef WidgetChooseFolder<
Parent > 
ThisType
 Class type.

Public Member Functions

void setRootDirectory (const int CSIDL=CSIDL_DESKTOPDIRECTORY)
 Sets the root directory in the WidgetChooseFolder Widget.
void setStartDirectory (SmartUtil::tstring startDir)
 Sets the starting directory selected in the WidgetChooseFolder widget.
SmartUtil::tstring showDialog ()
 Shows the dialog.


Detailed Description

template<class Parent>
class SmartWin::WidgetChooseFolder< Parent >

ChooseFolderDialog class.

ChooseFolder.PNG
Class for showing a ChooseFolderDialog box.
Either derive from it or call WidgetFactory::createChooseFolder.
Note!
If you wish to use this class with Parent classes other than those from SmartWin you need to expose a public function called "parent" taking no arguments returning and HWND in the Parent template parameter.
the complete signature of the function will then be "HWND parent()"


Member Typedef Documentation

typedef WidgetChooseFolder< Parent > ObjectType

Object type.

Note, not a pointer!!!!


Member Function Documentation

void setRootDirectory ( const int  CSIDL = CSIDL_DESKTOPDIRECTORY  ) 

Sets the root directory in the WidgetChooseFolder Widget.

If given your dialog will try to start with the given directory as root, otherwise it will use the desktop directory.

void setStartDirectory ( SmartUtil::tstring  startDir  ) 

Sets the starting directory selected in the WidgetChooseFolder widget.

If given your dialog will try to start with the given directory selected.

SmartUtil::tstring showDialog (  ) 

Shows the dialog.

Returns string() or "empty string" if user press cancel.
Returns a "folder path" if user presses ok.
Use the inherited functions AspectfolderFilter::addFilter and AspectfolderFilter::activeFilter
before calling this function, if you wish the dialog to show only certain types of folders.

Back to SmartWin website
SourceForge.net Logo