My Project
|
#include <FileBrowser.h>
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::CListViewExt * | GetListView () |
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::CButton * | m_pButtonAction |
SallyAPI::GUI::CBreadcrumb * | m_pBreadcrumb |
SallyAPI::GUI::CButtonBar * | m_pMenu |
SallyAPI::GUI::CButtonBarButton * | m_pButtonRefreshView |
SallyAPI::GUI::CButtonBarButton * | m_pButtonGoUp |
SallyAPI::GUI::CButtonBarButton * | m_pMenuSortName |
SallyAPI::GUI::CButtonBarButton * | m_pMenuSortDate |
SallyAPI::GUI::CListViewExt * | m_pListViewFileWalker |
SallyAPI::GUI::CButton * | m_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 |
File browser.
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)
[in,out] | parent | If non-null, the parent. |
x | The x coordinate. | |
y | The y coordinate. | |
width | The width. | |
height | The height. | |
controlId | Identifier for the control. |
CFileBrowser::~CFileBrowser | ( | ) | [virtual] |
Destructor.
void CFileBrowser::FilewalkerAddFolder | ( | std::string & | folder | ) | [protected] |
Filewalker add folder.
[in,out] | folder | Pathname of the folder. |
[in,out] | folders | The folders. |
[in,out] | files | The files. |
std::string CFileBrowser::GetCurrentFolder | ( | ) |
Gets the current folder.
Gets the current folder depth.
Gets 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.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
messageId | Identifier for the message. | |
[in,out] | messageParameter | If non-null, the message parameter. |
void CFileBrowser::OnCommandChangeSorting | ( | int | reporterId | ) | [protected] |
Executes the command change sorting action.
reporterId | Identifier for the reporter. |
void CFileBrowser::OnCommandCharSelector | ( | SallyAPI::GUI::CGUIBaseObject * | reporter | ) | [protected] |
Executes the command char selector action.
[in,out] | reporter | If 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.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
messageId | Identifier for the message. | |
[in,out] | messageParameter | If 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.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
messageId | Identifier for the message. | |
[in,out] | messageParameter | If non-null, the message parameter. |
bool CFileBrowser::OnCommandOpenFolder | ( | SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter | ) | [protected] |
Executes the command open folder action.
[in,out] | messageParameter | If non-null, the message parameter. |
void CFileBrowser::OnCommandOpenFolder | ( | std::string & | folder | ) | [protected] |
Executes the command open folder action.
[in,out] | folder | Pathname of the folder. |
void CFileBrowser::OnCommandReset | ( | ) | [protected] |
Executes the command reset action.
void CFileBrowser::Reset | ( | ) |
Resets this object.
void CFileBrowser::SendMessageToChilds | ( | SallyAPI::GUI::CGUIBaseObject * | reporter, |
int | reporterId, | ||
int | messageId, | ||
SallyAPI::GUI::SendMessage::CParameterBase * | messageParameter = NULL |
||
) | [virtual] |
Send message to childs.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
messageId | Identifier for the message. | |
[in,out] | messageParameter | If 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.
[in,out] | reporter | If non-null, the reporter. |
reporterId | Identifier for the reporter. | |
messageId | Identifier for the message. | |
[in,out] | messageParameter | If non-null, the message parameter. |
Reimplemented from SallyAPI::GUI::CForm.
void CFileBrowser::SetActionButtonCommand | ( | int | command | ) |
Sets an action button command.
command | The command. |
void CFileBrowser::SetActionButtonImage | ( | int | icon | ) |
Sets an action button image.
icon | The icon. |
void CFileBrowser::SetActionButtonText | ( | const std::string & | text | ) |
Sets an action button text.
text | The text. |
void CFileBrowser::SetActionImageId | ( | int | icon | ) |
Sets an action image id.
icon | The icon. |
void CFileBrowser::SetFolder | ( | std::string & | folder, |
int | folderDepth = -1 |
||
) |
Sets a folder.
[in,out] | folder | Pathname of the folder. |
folderDepth | Depth of the folder. |
void CFileBrowser::SetMimetypeList | ( | std::map< std::string, int > & | mimetypeList | ) |
Sets a mimetype list.
[in,out] | mimetypeList | List of mimetypes. |
void CFileBrowser::SetShowHardDisks | ( | bool | showHardDisks | ) |
Sets if hard disks should be shown.
showHardDisks | true to show, false to hide the hard disks. |
void CFileBrowser::SetShowRemovableDisk | ( | bool | showRemovableDisk | ) |
Sets if removable disks should be shown.
showRemovableDisk | true 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.
showSpecialFolders | true to show, false to hide the special folders. |
void CFileBrowser::SetShowSubfolders | ( | bool | showSubfolders | ) |
Sets a show subfolders.
showSubfolders | true to show, false to hide the subfolders. |
void CFileBrowser::SetShowUnkownFiles | ( | bool | showUnkonwFiles | ) |
Sets a show unkown files.
showUnkonwFiles | true to show, false to hide the unkonw files. |
void CFileBrowser::SetStartFolders | ( | std::vector< std::string > & | startFolders | ) |
Sets a start folders.
[in,out] | startFolders | The start folders. |
void CFileBrowser::SortFiles | ( | ) | [protected] |
Sort files.
void CFileBrowser::UpdateView | ( | ) |
Updates the view.
void CFileBrowser::ValidateFolder | ( | ) |
Validate folder.
bool SallyAPI::GUI::CFileBrowser::m_bFolderOpend [protected] |
bool SallyAPI::GUI::CFileBrowser::m_bShowHardDisks [protected] |
bool SallyAPI::GUI::CFileBrowser::m_bShowRemovableDisk [protected] |
bool SallyAPI::GUI::CFileBrowser::m_bShowSpecialFolders [protected] |
bool SallyAPI::GUI::CFileBrowser::m_bShowSubfolders [protected] |
bool SallyAPI::GUI::CFileBrowser::m_bShowUnkonwFiles [protected] |
char SallyAPI::GUI::CFileBrowser::m_cLastCharSelected [protected] |
int SallyAPI::GUI::CFileBrowser::m_iActionCommand [protected] |
int SallyAPI::GUI::CFileBrowser::m_iActionImage [protected] |
int SallyAPI::GUI::CFileBrowser::m_iFolderDepth [protected] |
std::map<int, int> SallyAPI::GUI::CFileBrowser::m_mListViewPages [protected] |
std::map<std::string, int> SallyAPI::GUI::CFileBrowser::m_mMimetypeList [protected] |
SallyAPI::GUI::CButton* SallyAPI::GUI::CFileBrowser::m_pCharSelector[28] [protected] |
std::string SallyAPI::GUI::CFileBrowser::m_strCurrentFolderName [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] |