My Project
SallyAPI::GUI::CFileBrowser Class Reference

File browser. More...

#include <FileBrowser.h>

Inheritance diagram for SallyAPI::GUI::CFileBrowser:
SallyAPI::GUI::CForm SallyAPI::GUI::CControl SallyAPI::GUI::CGUIBaseObject SallyAPI::Core::CBaseObject

List of all members.

Public Member Functions

 CFileBrowser (SallyAPI::GUI::CGUIBaseObject *parent, int x, int y, int width, int height, int controlId=0)
 Constructor.
virtual ~CFileBrowser ()
 Destructor.
void SetStartFolders (std::vector< std::string > &startFolders)
 Sets a start folders.
void SetShowSpecialFolders (bool showSpecialFolders)
 Sets a show special folders. Special folders are the users pictures path or the users desktop.
void SetShowRemovableDisk (bool showRemovableDisk)
 Sets if removable disks should be shown.
void SetShowHardDisks (bool showHardDisks)
 Sets if hard disks should be shown.
void SetShowUnkownFiles (bool showUnkonwFiles)
 Sets a show unkown files.
void SetMimetypeList (std::map< std::string, int > &mimetypeList)
 Sets a mimetype list.
void SetShowSubfolders (bool showSubfolders)
 Sets a show subfolders.
void SetActionImageId (int icon)
 Sets an action image id.
void SetActionButtonCommand (int command)
 Sets an action button command.
void SetActionButtonText (const std::string &text)
 Sets an action button text.
void SetActionButtonImage (int icon)
 Sets an action button image.
void SetFolder (std::string &folder, int folderDepth=-1)
 Sets a folder.
void UpdateView ()
 Updates the view.
void Reset ()
 Resets this object.
void ValidateFolder ()
 Validate folder.
SallyAPI::GUI::CListViewExtGetListView ()
 Gets the list view.
virtual void SendMessageToParent (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter=NULL)
 Send message to parent.
virtual void SendMessageToChilds (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter=NULL)
 Send message to childs.
std::string GetCurrentFolder ()
 Gets the current folder.
int GetCurrentFolderDepth ()
 Gets the current folder depth.

Protected Member Functions

void SortFiles ()
 Sort files.
void OnCommandChangeSorting (int reporterId)
 Executes the command change sorting action.
void OnCommandItemClicked (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter)
 Executes the command item clicked action.
void OnCommandActionClicked (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter)
 Executes the command action clicked action.
bool OnCommandOpenFolder (SallyAPI::GUI::SendMessage::CParameterBase *messageParameter)
 Executes the command open folder action.
void OnCommandOpenFolder (std::string &folder)
 Executes the command open folder action.
void OnCommandReset ()
 Executes the command reset action.
void OnCommandCharSelector (SallyAPI::GUI::CGUIBaseObject *reporter)
 Executes the command char selector action.
void OnCommandListviewItemClicked (SallyAPI::GUI::CGUIBaseObject *reporter, int reporterId, int messageId, SallyAPI::GUI::SendMessage::CParameterBase *messageParameter)
 Executes the command listview item clicked action.
void FilewalkerAddFolder (std::string &folder)
 Filewalker add folder.

Protected Attributes

std::vector< std::string > m_vFolders
std::vector< std::string > m_vFiles
std::map< std::string,
std::string > 
m_vFoldersFilesDate
SallyAPI::GUI::CButtonm_pButtonAction
SallyAPI::GUI::CBreadcrumbm_pBreadcrumb
SallyAPI::GUI::CButtonBarm_pMenu
SallyAPI::GUI::CButtonBarButtonm_pButtonRefreshView
SallyAPI::GUI::CButtonBarButtonm_pButtonGoUp
SallyAPI::GUI::CButtonBarButtonm_pMenuSortName
SallyAPI::GUI::CButtonBarButtonm_pMenuSortDate
SallyAPI::GUI::CListViewExtm_pListViewFileWalker
SallyAPI::GUI::CButtonm_pCharSelector [28]
int m_iFolderDepth
std::string m_strCurrentFolderName
std::vector< std::string > m_vStartFolders
bool m_bShowRemovableDisk
std::map< std::string, int > m_mMimetypeList
bool m_bShowSubfolders
bool m_bShowHardDisks
bool m_bShowSpecialFolders
bool m_bShowUnkonwFiles
int m_iActionCommand
std::map< int, int > m_mListViewPages
CHAR_SELECTOR_COUNT m_eCharSelectorCount
char m_cLastCharSelected
bool m_bFolderOpend
int m_iActionImage

Static Protected Attributes

static std::string m_strMyDocument
static std::string m_strMyMusic
static std::string m_strMyVideos
static std::string m_strMyPictures
static std::string m_strMyDesktop

Detailed Description

File browser.

Author:
Christian Knobloch
Date:
13.09.2010

Constructor & Destructor Documentation

CFileBrowser::CFileBrowser ( SallyAPI::GUI::CGUIBaseObject parent,
int  x,
int  y,
int  width,
int  height,
int  controlId = 0 
)

Constructor.

m_iFolderDepth(0), m_bShowRemovableDisk(true), m_bShowSubfolders(true), m_iActionCommand(0), m_bShowHardDisks(false), m_cLastCharSelected(' '), m_bFolderOpend(false), m_bShowUnkonwFiles(false), m_bShowSpecialFolders(false)

Author:
Christian Knobloch
Date:
18.05.2011
Parameters:
[in,out]parentIf non-null, the parent.
xThe x coordinate.
yThe y coordinate.
widthThe width.
heightThe height.
controlIdIdentifier for the control.

Destructor.

Author:
Christian Knobloch
Date:
09.06.2010

Member Function Documentation

void CFileBrowser::FilewalkerAddFolder ( std::string &  folder) [protected]

Filewalker add folder.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]folderPathname of the folder.
[in,out]foldersThe folders.
[in,out]filesThe files.

Gets the current folder.

Author:
Christian Knobloch
Date:
09.06.2010
Returns:
The current folder.

Gets the current folder depth.

Author:
Christian Knobloch
Date:
18.05.2011
Returns:
The current folder depth.

Gets the list view.

Author:
Christian Knobloch
Date:
09.06.2010
Returns:
null if it fails, else the list view.
void CFileBrowser::OnCommandActionClicked ( SallyAPI::GUI::CGUIBaseObject reporter,
int  reporterId,
int  messageId,
SallyAPI::GUI::SendMessage::CParameterBase messageParameter 
) [protected]

Executes the command action clicked action.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]reporterIf non-null, the reporter.
reporterIdIdentifier for the reporter.
messageIdIdentifier for the message.
[in,out]messageParameterIf non-null, the message parameter.
void CFileBrowser::OnCommandChangeSorting ( int  reporterId) [protected]

Executes the command change sorting action.

Author:
Christian Knobloch
Date:
25.06.2011
Parameters:
reporterIdIdentifier for the reporter.

Executes the command char selector action.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]reporterIf non-null, the reporter.
void CFileBrowser::OnCommandItemClicked ( SallyAPI::GUI::CGUIBaseObject reporter,
int  reporterId,
int  messageId,
SallyAPI::GUI::SendMessage::CParameterBase messageParameter 
) [protected]

Executes the command item clicked action.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]reporterIf non-null, the reporter.
reporterIdIdentifier for the reporter.
messageIdIdentifier for the message.
[in,out]messageParameterIf non-null, the message parameter.
void CFileBrowser::OnCommandListviewItemClicked ( SallyAPI::GUI::CGUIBaseObject reporter,
int  reporterId,
int  messageId,
SallyAPI::GUI::SendMessage::CParameterBase messageParameter 
) [protected]

Executes the command listview item clicked action.

Author:
Christian Knobloch
Date:
26.06.2011
Parameters:
[in,out]reporterIf non-null, the reporter.
reporterIdIdentifier for the reporter.
messageIdIdentifier for the message.
[in,out]messageParameterIf non-null, the message parameter.

Executes the command open folder action.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]messageParameterIf non-null, the message parameter.
Returns:
true if it succeeds, false if it fails.
void CFileBrowser::OnCommandOpenFolder ( std::string &  folder) [protected]

Executes the command open folder action.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]folderPathname of the folder.
void CFileBrowser::OnCommandReset ( ) [protected]

Executes the command reset action.

Author:
Christian Knobloch
Date:
09.06.2010

Resets this object.

Author:
Christian Knobloch
Date:
09.06.2010
void CFileBrowser::SendMessageToChilds ( SallyAPI::GUI::CGUIBaseObject reporter,
int  reporterId,
int  messageId,
SallyAPI::GUI::SendMessage::CParameterBase messageParameter = NULL 
) [virtual]

Send message to childs.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]reporterIf non-null, the reporter.
reporterIdIdentifier for the reporter.
messageIdIdentifier for the message.
[in,out]messageParameterIf non-null, the message parameter.

Reimplemented from SallyAPI::GUI::CForm.

void CFileBrowser::SendMessageToParent ( SallyAPI::GUI::CGUIBaseObject reporter,
int  reporterId,
int  messageId,
SallyAPI::GUI::SendMessage::CParameterBase messageParameter = NULL 
) [virtual]

Send message to parent.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]reporterIf non-null, the reporter.
reporterIdIdentifier for the reporter.
messageIdIdentifier for the message.
[in,out]messageParameterIf non-null, the message parameter.

Reimplemented from SallyAPI::GUI::CForm.

void CFileBrowser::SetActionButtonCommand ( int  command)

Sets an action button command.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
commandThe command.

Sets an action button image.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
iconThe icon.
void CFileBrowser::SetActionButtonText ( const std::string &  text)

Sets an action button text.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
textThe text.
void CFileBrowser::SetActionImageId ( int  icon)

Sets an action image id.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
iconThe icon.
void CFileBrowser::SetFolder ( std::string &  folder,
int  folderDepth = -1 
)

Sets a folder.

Author:
Christian Knobloch
Date:
18.05.2011
Parameters:
[in,out]folderPathname of the folder.
folderDepthDepth of the folder.
void CFileBrowser::SetMimetypeList ( std::map< std::string, int > &  mimetypeList)

Sets a mimetype list.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]mimetypeListList of mimetypes.
void CFileBrowser::SetShowHardDisks ( bool  showHardDisks)

Sets if hard disks should be shown.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
showHardDiskstrue to show, false to hide the hard disks.
void CFileBrowser::SetShowRemovableDisk ( bool  showRemovableDisk)

Sets if removable disks should be shown.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
showRemovableDisktrue to show, false to hide the removable disk.
void CFileBrowser::SetShowSpecialFolders ( bool  showSpecialFolders)

Sets a show special folders. Special folders are the users pictures path or the users desktop.

Author:
Christian Knobloch
Date:
18.05.2011
Parameters:
showSpecialFolderstrue to show, false to hide the special folders.
void CFileBrowser::SetShowSubfolders ( bool  showSubfolders)

Sets a show subfolders.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
showSubfolderstrue to show, false to hide the subfolders.
void CFileBrowser::SetShowUnkownFiles ( bool  showUnkonwFiles)

Sets a show unkown files.

Author:
Christian Knobloch
Date:
29.03.2011
Parameters:
showUnkonwFilestrue to show, false to hide the unkonw files.
void CFileBrowser::SetStartFolders ( std::vector< std::string > &  startFolders)

Sets a start folders.

Author:
Christian Knobloch
Date:
09.06.2010
Parameters:
[in,out]startFoldersThe start folders.
void CFileBrowser::SortFiles ( ) [protected]

Sort files.

Author:
Christian Knobloch
Date:
25.06.2011

Updates the view.

Author:
Christian Knobloch
Date:
09.06.2010

Validate folder.

Author:
Christian Knobloch
Date:
23.12.2011

Member Data Documentation

std::map<int, int> SallyAPI::GUI::CFileBrowser::m_mListViewPages [protected]
std::map<std::string, int> SallyAPI::GUI::CFileBrowser::m_mMimetypeList [protected]
std::string SallyAPI::GUI::CFileBrowser::m_strMyDesktop [static, protected]
std::string SallyAPI::GUI::CFileBrowser::m_strMyDocument [static, protected]
std::string SallyAPI::GUI::CFileBrowser::m_strMyMusic [static, protected]
std::string SallyAPI::GUI::CFileBrowser::m_strMyPictures [static, protected]
std::string SallyAPI::GUI::CFileBrowser::m_strMyVideos [static, protected]
std::vector<std::string> SallyAPI::GUI::CFileBrowser::m_vFiles [protected]
std::vector<std::string> SallyAPI::GUI::CFileBrowser::m_vFolders [protected]
std::map<std::string, std::string> SallyAPI::GUI::CFileBrowser::m_vFoldersFilesDate [protected]
std::vector<std::string> SallyAPI::GUI::CFileBrowser::m_vStartFolders [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines