You can subscribe to this list here.
2006 |
Jan
|
Feb
(24) |
Mar
(9) |
Apr
(4) |
May
(7) |
Jun
(13) |
Jul
(19) |
Aug
(1) |
Sep
(12) |
Oct
(20) |
Nov
(1) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(6) |
Mar
(24) |
Apr
(1) |
May
(10) |
Jun
(30) |
Jul
(46) |
Aug
(20) |
Sep
(12) |
Oct
(27) |
Nov
(51) |
Dec
(58) |
2008 |
Jan
(40) |
Feb
(40) |
Mar
(78) |
Apr
(138) |
May
(4) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(2) |
Jul
(10) |
Aug
(1) |
Sep
(11) |
Oct
(31) |
Nov
(7) |
Dec
(1) |
2011 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
2013 |
Jan
(3) |
Feb
(5) |
Mar
(1) |
Apr
|
May
|
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2014 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <arn...@us...> - 2008-03-30 08:15:32
|
Revision: 1088 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1088&view=rev Author: arnetheduck Date: 2008-03-30 01:15:26 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Use sw load/save dialogs Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h dcplusplus/trunk/win32/Appearance2Page.cpp dcplusplus/trunk/win32/CertificatesPage.cpp dcplusplus/trunk/win32/DirectoryListingFrame.cpp dcplusplus/trunk/win32/MainWindow.cpp dcplusplus/trunk/win32/QueueFrame.cpp dcplusplus/trunk/win32/SearchFrame.cpp dcplusplus/trunk/win32/WinUtil.cpp dcplusplus/trunk/win32/WinUtil.h Added Paths: ----------- dcplusplus/trunk/smartwin/source/widgets/LoadDialog.cpp dcplusplus/trunk/smartwin/source/widgets/SaveDialog.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-29 09:16:19.821000099 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-29 11:32:16.434999943 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - + smartwin/source/widgets/LoadDialog.cpp loaddialog.cpp-20080329103151-2zvxbm5b87on29pc-1 smartwin/source/widgets/SaveDialog.cpp savedialog.cpp-20080329103151-2zvxbm5b87on29pc-2 Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja 1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl 1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0 + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja 1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl 1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0 1063 arn...@gm...-20080329103216-hgjzo7ra2zixbztd Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/changelog.txt 2008-03-30 08:15:26 UTC (rev 1088) @@ -12,6 +12,7 @@ * Fixed selection glitches * Both up&downloads are disconnected if evil users quit (thanks poy) * Add average share to status bar (thanks mikejj) +* Minor improvements to load / save dialogs -- 0.705 2008-03-14 -- * Several patches for better *nix compatibility of the core (thanks steven sheehy et al) Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-30 08:15:26 UTC (rev 1088) @@ -254,7 +254,7 @@ /// Creates a LoadFileDialog and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a Load File Dialog */ - LoadDialog createLoadFile(); + LoadDialog createLoadDialog(); /// Creates a SaveFileDialog and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a Save File Dialog @@ -486,7 +486,7 @@ template<typename ContainerWidgetType> typename WidgetFactory< ContainerWidgetType >::LoadDialog -WidgetFactory< ContainerWidgetType >::createLoadFile() +WidgetFactory< ContainerWidgetType >::createLoadDialog() { return LoadDialog ( this ); } Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-30 08:15:26 UTC (rev 1088) @@ -78,6 +78,7 @@ WidgetType& setDefaultExtension(const SmartUtil::tstring& defExt) { itsDefExt = defExt; + return *static_cast<WidgetType*>(this); } /// Returns the active filter of the object Added: dcplusplus/trunk/smartwin/source/widgets/LoadDialog.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/LoadDialog.cpp (rev 0) +++ dcplusplus/trunk/smartwin/source/widgets/LoadDialog.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -0,0 +1,51 @@ +#include "../../include/smartwin/widgets/LoadDialog.h" + +namespace SmartWin { + +bool LoadDialog::open(SmartUtil::tstring& file) +{ + OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure + fillOFN( ofn, OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY ); + + if ( ::GetOpenFileName( & ofn ) ) { + file = ofn.lpstrFile; + return true; + } + return false; +} + +bool LoadDialog::open(std::vector<SmartUtil::tstring>& files) +{ + OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure + fillOFN( ofn, OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT ); + if( ::GetOpenFileName(&ofn) ) + { + // If a single file is selected, the lpstrFile string is just the path terminated by TWO null bytes + // If multiple files are selected, the format of the string returned is: + // DIRECTORY_PATH + '\0' + FILE_NAME_1 + '\0' + FILE_NAME_2 + '\0' + ... + FILE_NAME_N + '\0' + '\0' + // (Note the last file name is terminated by two null bytes) + + SmartUtil::tstring fileName; + SmartUtil::tstring filePath; + SmartUtil::tstring directory; + directory = ofn.lpstrFile; // tstring ends at first null + TCHAR *array_p = ofn.lpstrFile + directory.length() + 1; // set pointer to one position past null + fileName = array_p; // fileName is substring from array_p to next null + if (fileName.length() == 0) // only one file was selected + files.push_back(directory); // string 'directory' contains full path + else + { + while (fileName.length() > 0) + { + filePath = directory + _T("\\") + fileName; + files.push_back(filePath); + array_p = array_p + fileName.length() + 1; // set pointer one position past null + fileName = array_p; // fileName is substring from array_p to next null + } + } + return true; + } + return false; +} + +} Added: dcplusplus/trunk/smartwin/source/widgets/SaveDialog.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/SaveDialog.cpp (rev 0) +++ dcplusplus/trunk/smartwin/source/widgets/SaveDialog.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -0,0 +1,16 @@ +#include "../../include/smartwin/widgets/SaveDialog.h" + +namespace SmartWin { + +bool SaveDialog::open(SmartUtil::tstring& target) { + OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure + fillOFN( ofn, 0 ); + + if ( ::GetSaveFileName( & ofn ) ) { + target = ofn.lpstrFile; + return true; + } + return false; +} + +} Modified: dcplusplus/trunk/win32/Appearance2Page.cpp =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -157,7 +157,7 @@ ::GetDlgItemText(handle(), IDC_BEEPFILE, buf, MAX_PATH); tstring x = buf; - if(WinUtil::browseFile(x, handle(), false) == IDOK) { + if(createLoadDialog().open(x)) { setItemText(IDC_BEEPFILE, x); } } Modified: dcplusplus/trunk/win32/CertificatesPage.cpp =================================================================== --- dcplusplus/trunk/win32/CertificatesPage.cpp 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/CertificatesPage.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -90,13 +90,13 @@ void CertificatesPage::handleBrowsePrivateKeyClicked() { tstring target = privateKeyFile->getText(); - if(WinUtil::browseFile(target, handle(), false, target)) + if(createLoadDialog().setInitialDirectory(target).open(target)) privateKeyFile->setText(target); } void CertificatesPage::handleBrowseCertificateClicked() { tstring target = certificateFile->getText(); - if(WinUtil::browseFile(target, handle(), false, target)) + if(createLoadDialog().setInitialDirectory(target).open(target)) certificateFile->setText(target); } Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp =================================================================== --- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -260,7 +260,7 @@ void DirectoryListingFrame::handleListDiff() { tstring file; - if(WinUtil::browseFile(file, handle(), false, Text::toT(Util::getListPath()), _T("File Lists\0*.xml.bz2\0All Files\0*.*\0"))) { + if(WinUtil::browseFileList(createLoadDialog(), file)) { DirectoryListing dirList(dl->getUser()); try { dirList.loadFile(Text::fromT(file)); @@ -493,7 +493,7 @@ try { if(ii->type == ItemInfo::FILE) { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)) + ii->getText(COLUMN_FILENAME); - if(WinUtil::browseFile(target, handle())) { + if(createSaveDialog().open(target)) { WinUtil::addLastDir(Util::getFilePath(target)); dl->download(ii->file, Text::fromT(target), false, WinUtil::isShift()); } Modified: dcplusplus/trunk/win32/MainWindow.cpp =================================================================== --- dcplusplus/trunk/win32/MainWindow.cpp 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/MainWindow.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -696,11 +696,9 @@ UPnP_TCPConnection = UPnP_UDPConnection = NULL; } -static const TCHAR types[]= _T("File Lists\0*.DcLst;*.xml.bz2\0All Files\0*.*\0"); - void MainWindow::handleOpenFileList() { tstring file; - if (WinUtil::browseFile(file, handle(), false, Text::toT(Util::getListPath()), types)) { + if(WinUtil::browseFileList(createLoadDialog(), file)) { UserPtr u = DirectoryListing::getUserFromFilename(Text::fromT(file)); if (u) { DirectoryListingFrame::openWindow(getMDIParent(), file, Text::toT(Util::emptyString), u, 0); Modified: dcplusplus/trunk/win32/QueueFrame.cpp =================================================================== --- dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -703,23 +703,8 @@ // Single file, get the full filename and move... QueueItemInfo* ii = files->getSelectedData(); tstring target = Text::toT(ii->getTarget()); - tstring ext = Util::getFileExt(target); - tstring ext2; - if (!ext.empty()) - { - ext = ext.substr(1); // remove leading dot so default extension works when browsing for file - ext2 = _T("*.") + ext; - ext2 += (TCHAR)0; - ext2 += _T("*.") + ext; - } - ext2 += _T("*.*"); - ext2 += (TCHAR)0; - ext2 += _T("*.*"); - ext2 += (TCHAR)0; - - tstring path = Text::toT(ii->getPath()); - if(WinUtil::browseFile(target, handle(), true, path, ext2.c_str(), ext.empty() ? NULL : ext.c_str())) { + if(WinUtil::browseSaveFile(createSaveDialog(), target)) { QueueManager::getInstance()->move(ii->getTarget(), Text::fromT(target)); } } else if(n > 1) { Modified: dcplusplus/trunk/win32/SearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -667,7 +667,7 @@ if(sr->getType() == SearchResult::TYPE_FILE) { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)) + si->columns[COLUMN_FILENAME]; - if(WinUtil::browseFile(target, handle())) { + if(WinUtil::browseSaveFile(createSaveDialog(), target)) { WinUtil::addLastDir(Util::getFilePath(target)); results->forEachSelectedT(SearchInfo::DownloadTarget(target)); } Modified: dcplusplus/trunk/win32/WinUtil.cpp =================================================================== --- dcplusplus/trunk/win32/WinUtil.cpp 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/WinUtil.cpp 2008-03-30 08:15:26 UTC (rev 1088) @@ -402,31 +402,26 @@ lastDirs.push_back(dir); } -bool WinUtil::browseFile(tstring& target, HWND owner /* = NULL */, bool save /* = true */, const tstring& initialDir /* = Util::emptyString */, const TCHAR* types /* = NULL */, const TCHAR* defExt /* = NULL */) { - TCHAR buf[MAX_PATH]; - OPENFILENAME ofn = { 0 }; // common dialog box structure - target = Text::toT(Util::validateFileName(Text::fromT(target))); - _tcscpy(buf, target.c_str()); - // Initialize OPENFILENAME - ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; - ofn.hwndOwner = owner; - ofn.lpstrFile = buf; - ofn.lpstrFilter = types; - ofn.lpstrDefExt = defExt; - ofn.nFilterIndex = 1; - - if(!initialDir.empty()) { - ofn.lpstrInitialDir = initialDir.c_str(); +bool WinUtil::browseSaveFile(SmartWin::SaveDialog dlg, tstring& file) { + tstring ext = Util::getFileExt(file); + tstring path = Util::getFilePath(file); + + if(!ext.empty()) { + ext = ext.substr(1); // remove leading dot so default extension works when browsing for file + dlg.addFilter(str(TF_("%1% files") % ext), _T("*.") + ext); + dlg.setDefaultExtension(ext); } - ofn.nMaxFile = sizeof(buf); - ofn.Flags = (save ? 0: OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST); + dlg.addFilter(T_("All files"), _T("*.*")); + dlg.setInitialDirectory(path); + + return dlg.open(file); +} - // Display the Open dialog box. - if ( (save ? ::GetSaveFileName(&ofn) : ::GetOpenFileName(&ofn) ) ==TRUE) { - target = ofn.lpstrFile; - return true; - } - return false; +bool WinUtil::browseFileList(SmartWin::LoadDialog dialog, tstring& file) { + return dialog.addFilter(T_("File Lists"), _T("*.xml.bz2")) + .addFilter(T_("All files"), _T("*.*")) + .setInitialDirectory(Text::toT(Util::getListPath())) + .open(file); } int WinUtil::getOsMajor() { Modified: dcplusplus/trunk/win32/WinUtil.h =================================================================== --- dcplusplus/trunk/win32/WinUtil.h 2008-03-30 08:14:41 UTC (rev 1087) +++ dcplusplus/trunk/win32/WinUtil.h 2008-03-30 08:15:26 UTC (rev 1088) @@ -154,8 +154,9 @@ static void addLastDir(const tstring& dir); static void openLink(const tstring& url); - static bool browseFile(tstring& target, HWND owner = NULL, bool save = true, const tstring& initialDir = Util::emptyStringT, const TCHAR* types = NULL, const TCHAR* defExt = NULL); - + static bool browseSaveFile(SmartWin::SaveDialog dialog, tstring& file); + static bool browseFileList(SmartWin::LoadDialog dialog, tstring& file); + static int getOsMajor(); static int getOsMinor(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-30 08:14:44
|
Revision: 1087 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1087&view=rev Author: arnetheduck Date: 2008-03-30 01:14:41 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Change factory names for load/save Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-29 09:12:53.312000036 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-29 09:16:19.821000099 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja 1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja 1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl 1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0 Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-30 08:14:18 UTC (rev 1086) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-30 08:14:41 UTC (rev 1087) @@ -259,7 +259,7 @@ /// Creates a SaveFileDialog and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a Save File Dialog */ - SaveDialog createSaveFile(); + SaveDialog createSaveDialog(); /// Creates a ColorDialog and returns it. /** Usable to let user choose font from the system installed fonts. @@ -493,7 +493,7 @@ template<typename ContainerWidgetType> typename WidgetFactory< ContainerWidgetType >::SaveDialog -WidgetFactory< ContainerWidgetType >::createSaveFile() +WidgetFactory< ContainerWidgetType >::createSaveDialog() { return SaveDialog ( this ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-30 08:14:24
|
Revision: 1086 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1086&view=rev Author: arnetheduck Date: 2008-03-30 01:14:18 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Update load/save dialogs Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-29 07:15:58.839999914 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-29 09:12:53.312000036 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja 1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-29 08:10:38 UTC (rev 1085) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-30 08:14:18 UTC (rev 1086) @@ -29,8 +29,7 @@ #define AspectFileFilter_h #include "../WindowsHeaders.h" -#include <vector> -#include "SmartUtil.h" +#include "../../SmartUtil.h" #include "../xCeption.h" namespace SmartWin @@ -44,6 +43,7 @@ * Help the LoadDialog and the SaveDialog to add up filters on which file * types to look for! */ +template<typename WidgetType> class AspectFileFilter { public: @@ -52,12 +52,13 @@ * "HTML Files" etc. filter is the actual filter to filter in files to show * normally this would be e.g. "*.html". */ - void addFilter( const SmartUtil::tstring & filterName, const SmartUtil::tstring & filter ) + WidgetType& addFilter( const SmartUtil::tstring & filterName, const SmartUtil::tstring & filter ) { itsFilter.insert( itsFilter.end(), filterName.begin(), filterName.end() ); itsFilter.push_back( '\0' ); itsFilter.insert( itsFilter.end(), filter.begin(), filter.end() ); itsFilter.push_back( '\0' ); + return *static_cast<WidgetType*>(this); } /// Sets the active filter to the specified index @@ -65,21 +66,24 @@ * filter you added will be the active filter. Active filter means the default * filter used when first showing the dialog. */ - void activeFilter( unsigned filterNo ) - { + WidgetType& setActiveFilter( unsigned filterNo ) { if ( filterNo >= itsFilter.size() ) { xCeption x( _T( "Tried to set active filter to more than number of filters in filter..." ) ); throw x; } itsActiveFilter = filterNo; + return *static_cast<WidgetType*>(this); } + + WidgetType& setDefaultExtension(const SmartUtil::tstring& defExt) { + itsDefExt = defExt; + } /// Returns the active filter of the object /** The active filter is the "currently selected" filter of the filter class */ - unsigned getActiveFilter() const - { + unsigned getActiveFilter() const { // Filter index is NOT a zero indexed array... return itsActiveFilter + 1; } @@ -88,73 +92,47 @@ /** If given your dialog will try to start in the given directory, otherwise it * will use the working directory of the process. */ - void setStartDirectory( SmartUtil::tstring startDir ) - { - itsStartDir = startDir; + WidgetType& setInitialDirectory( const SmartUtil::tstring& initialDir ) { + itsInitialDir = initialDir; + return *static_cast<WidgetType*>(this); } - /// Ensure filename meets OS expectations for path separators. - /** We want SaveDialog and LoadDialog to always return a pathname that - * meets the OS expectations. <br> - * Windows wants: C:\dir\dir\file.ext <br> - * and UnixLinux: /dir/dir/file.ext <br> - * - * Wine produces z:\dir\dir\file.exe from GetLoadFileName(&ofn) )and - * GetSaveFileName(&ofn). <br> - * - * So if we are building for wine, we need to convert from the wine output to - * the Linux format. <br> - * IE: convert z:\home\awebb\file.txt to /home/awebb/file.txt <br> - * - * The assumption is that the C++ standard library is Linux native, and thus - * needs / pathnames. - */ - //TODO: use boost filenames - void backslashToForwardSlashForUnix( SmartUtil::tstring & filename ) - { - // wineg++ defines __WINE__ Note we can't use WIN32 because that is also true for wine builds. -#ifdef __WINE__ - if ( 0 != filename.find( "z:" ) ) return; // Not a WINE produced path ?, nothing to do. - filename.erase( 0, 2 ); // Remove "z:" prefix. +protected: + Widget* itsParent; - // Unix file system do not use "\", so convert to "/" - size_t pos_n; - while ( std::string::npos != ( pos_n = filename.find( '\\' ) ) ) - { - filename.replace( pos_n, 1, "/" ); - } -#endif - } + static const int PATH_BUFFER_SIZE = 32768; - -protected: - Widget * itsParent; + TCHAR szFile[PATH_BUFFER_SIZE]; + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } AspectFileFilter(Widget* parent) : itsParent(parent), itsActiveFilter( 0 ) {} - static const int PATH_BUFFER_SIZE = 32768; //really arbitrary, but 32K sounds reasonable. size in number of TCHARS! - // Fills out the common members of the OPENFILENAME struct. // This is called for both LoadDialog and for SaveDialog Widgets - void fillOFN( OPENFILENAME & ofn, HWND parent, int flags ) - { - ofn.hwndOwner = parent; + void fillOFN( OPENFILENAME & ofn, int flags ) { + ofn.hwndOwner = getParentHandle(); ofn.nMaxFile = PATH_BUFFER_SIZE; - ofn.lpstrFilter = itsFilter.c_str(); + ofn.lpstrFile = szFile; + ofn.lpstrDefExt = ifNotEmpty(itsDefExt); + ofn.lpstrInitialDir = ifNotEmpty(itsInitialDir); + ofn.lpstrFilter = ifNotEmpty(itsFilter); ofn.nFilterIndex = this->getActiveFilter(); - ofn.lpstrInitialDir = itsStartDir.c_str(); ofn.Flags = flags; } - private: unsigned int itsActiveFilter; - SmartUtil::tstring itsStartDir; + SmartUtil::tstring itsInitialDir; SmartUtil::tstring itsFilter; + SmartUtil::tstring itsDefExt; + + static const TCHAR* ifNotEmpty(const SmartUtil::tstring& str) { + return str.empty() ? NULL : str.c_str(); + } }; // end namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h 2008-03-29 08:10:38 UTC (rev 1085) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h 2008-03-30 08:14:18 UTC (rev 1086) @@ -45,7 +45,7 @@ * \sa AspectFileFilter */ class LoadDialog - : public AspectFileFilter + : public AspectFileFilter<LoadDialog> { public: /// Class type @@ -64,7 +64,7 @@ * before calling this function, if you wish the dialog to show only certain * types of files. */ - SmartUtil::tstring showDialog(); + bool open(SmartUtil::tstring& file); /// Shows the dialog /** Returns an empty vector if user press cancel. <br> @@ -74,7 +74,7 @@ * before calling this function, if you wish the dialog to show only certain * types of files. */ - std::vector<SmartUtil::tstring> showDialogMultiSelect(); + bool open(std::vector<SmartUtil::tstring>& files); // Constructor Taking pointer to parent explicit LoadDialog( Widget * parent = 0 ); @@ -86,66 +86,9 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline SmartUtil::tstring LoadDialog::showDialog() -{ - TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name - szFile[0] = '\0'; - OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure - fillOFN( ofn, getParentHandle(), OFN_FILEMUSTEXIST ); - ofn.lpstrFile = szFile; - ofn.Flags |= OFN_FILEMUSTEXIST; - - SmartUtil::tstring retVal; - if ( ::GetOpenFileName( & ofn ) ) - { - retVal = ofn.lpstrFile; - backslashToForwardSlashForUnix( retVal ); - } - return retVal; -} - -inline std::vector<SmartUtil::tstring> LoadDialog::showDialogMultiSelect() -{ - TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name - szFile[0] = '\0'; - - OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure - fillOFN( ofn, getParentHandle(), OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT | OFN_EXPLORER ); - ofn.lpstrFile = szFile; - std::vector<SmartUtil::tstring> retVal; - if( ::GetOpenFileName(&ofn) ) - { - // If a single file is selected, the lpstrFile string is just the path terminated by TWO null bytes - // If multiple files are selected, the format of the string returned is: - // DIRECTORY_PATH + '\0' + FILE_NAME_1 + '\0' + FILE_NAME_2 + '\0' + ... + FILE_NAME_N + '\0' + '\0' - // (Note the last file name is terminated by two null bytes) - - SmartUtil::tstring fileName; - SmartUtil::tstring filePath; - SmartUtil::tstring directory; - directory = ofn.lpstrFile; // tstring ends at first null - TCHAR *array_p = ofn.lpstrFile + directory.length() + 1; // set pointer to one position past null - fileName = array_p; // fileName is substring from array_p to next null - if (fileName.length() == 0) // only one file was selected - retVal.push_back(directory); // string 'directory' contains full path - else - { - while (fileName.length() > 0) - { - filePath = directory + _T("\\") + fileName; - backslashToForwardSlashForUnix(filePath); - retVal.push_back(filePath); - array_p = array_p + fileName.length() + 1; // set pointer one position past null - fileName = array_p; // fileName is substring from array_p to next null - } - } - } - return retVal; -} - inline LoadDialog::LoadDialog( Widget * parent ) - : AspectFileFilter( parent ) + : AspectFileFilter<LoadDialog>( parent ) {} // end namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h 2008-03-29 08:10:38 UTC (rev 1085) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h 2008-03-30 08:14:18 UTC (rev 1086) @@ -44,7 +44,7 @@ * \sa AspectFileFilter */ class SaveDialog - : public AspectFileFilter + : public AspectFileFilter<SaveDialog> { public: /// Class type @@ -73,26 +73,9 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline bool SaveDialog::open(SmartUtil::tstring& target) -{ - TCHAR szFile[PATH_BUFFER_SIZE + 1]; // buffer for file name - szFile[0] = '\0'; - OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure - fillOFN( ofn, getParentHandle(), 0 ); - ofn.lpstrFile = szFile; - - if ( ::GetSaveFileName( & ofn ) ) - { - target = ofn.lpstrFile; - backslashToForwardSlashForUnix( target ); - return true; - } - return false; -} - inline SaveDialog::SaveDialog( Widget * parent ) - : AspectFileFilter( parent ) + : AspectFileFilter<SaveDialog>( parent ) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 08:10:41
|
Revision: 1085 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1085&view=rev Author: arnetheduck Date: 2008-03-29 01:10:38 -0700 (Sat, 29 Mar 2008) Log Message: ----------- conflict leftover Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-29 06:56:30.651999950 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-29 07:15:58.839999914 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/widgets/LoadDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetLoadFile.h smartwin/include/smartwin/widgets/SaveDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetSaveFile.h win32/ComboBox.cpp 1023@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetComboBox.cpp win32/ComboBox.h 1023@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetComboBox.h win32/TextBox.cpp 1023@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetTextBox.cpp win32/TextBox.h 753@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetTextBox.h win32/TypedTable.h 846@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FTypedListView.h win32/TypedTree.h 743@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FTypedTreeView.h + Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h 2008-03-29 08:10:17 UTC (rev 1084) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h 2008-03-29 08:10:38 UTC (rev 1085) @@ -79,15 +79,7 @@ // Constructor Taking pointer to parent explicit LoadDialog( Widget * parent = 0 ); -<<<<<<< TREE -<<<<<<< TREE ~LoadDialog() { } -======= - virtual ~WidgetLoadFile() { } ->>>>>>> MERGE-SOURCE -======= - virtual ~LoadDialog() { } ->>>>>>> MERGE-SOURCE private: }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 08:10:19
|
Revision: 1084 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1084&view=rev Author: arnetheduck Date: 2008-03-29 01:10:17 -0700 (Sat, 29 Mar 2008) Log Message: ----------- add local commits Modified Paths: -------------- dcplusplus/trunk/smartwin/SmartUtil/StringConversion.h dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h dcplusplus/trunk/smartwin/source/Application.cpp dcplusplus/trunk/smartwin/source/widgets/Table.cpp dcplusplus/trunk/win32/DirectoryListingFrame.h dcplusplus/trunk/win32/PropPage.cpp dcplusplus/trunk/win32/QueueFrame.h dcplusplus/trunk/win32/SearchFrame.cpp Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h dcplusplus/trunk/win32/ComboBox.cpp dcplusplus/trunk/win32/ComboBox.h dcplusplus/trunk/win32/TextBox.cpp dcplusplus/trunk/win32/TextBox.h dcplusplus/trunk/win32/TypedTable.h dcplusplus/trunk/win32/TypedTree.h Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h dcplusplus/trunk/win32/TypedListView.h dcplusplus/trunk/win32/TypedTreeView.h dcplusplus/trunk/win32/WidgetComboBox.cpp dcplusplus/trunk/win32/WidgetComboBox.h dcplusplus/trunk/win32/WidgetTextBox.cpp dcplusplus/trunk/win32/WidgetTextBox.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-28 22:03:47.832000017 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-29 06:56:30.651999950 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/widgets/CheckBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetCheckBox.h smartwin/include/smartwin/widgets/ComboBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetComboBox.h smartwin/include/smartwin/widgets/CoolBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetCoolbar.h smartwin/include/smartwin/widgets/DateTime.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetDateTimePicker.h smartwin/include/smartwin/widgets/GroupBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetGroupBox.h smartwin/include/smartwin/widgets/Label.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetStatic.h smartwin/include/smartwin/widgets/MDIChild.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMDIChild.h smartwin/include/smartwin/widgets/MDIFrame.h 779@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMDIFrame.h smartwin/include/smartwin/widgets/MDIParent.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMDIParent.h smartwin/include/smartwin/widgets/MessageBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMessageBox.h smartwin/include/smartwin/widgets/ProgressBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetProgressBar.h smartwin/include/smartwin/widgets/RadioButton.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetRadioButton.h smartwin/include/smartwin/widgets/RichTextBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetRichTextBox.h smartwin/include/smartwin/widgets/Slider.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetSlider.h smartwin/include/smartwin/widgets/Spinner.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetSpinner.h smartwin/include/smartwin/widgets/StatusBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetStatusBar.h smartwin/include/smartwin/widgets/TabSheet.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetTabSheet.h smartwin/include/smartwin/widgets/Table.h 876@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetListView.h smartwin/include/smartwin/widgets/TextBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetTextBox.h smartwin/include/smartwin/widgets/ToolBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetToolbar.h smartwin/include/smartwin/widgets/ToolTip.h 809@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetToolTip.h smartwin/include/smartwin/widgets/Tree.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetTreeView.h smartwin/source/widgets/CheckBox.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetCheckBox.cpp smartwin/source/widgets/ComboBox.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetComboBox.cpp smartwin/source/widgets/CoolBar.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetCoolbar.cpp smartwin/source/widgets/DateTime.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetDateTimePicker.cpp smartwin/source/widgets/GroupBox.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetGroupBox.cpp smartwin/source/widgets/Label.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetStatic.cpp smartwin/source/widgets/MDIChild.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetMDIChild.cpp smartwin/source/widgets/MDIFrame.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetMDIFrame.cpp smartwin/source/widgets/MDIParent.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetMDIParent.cpp smartwin/source/widgets/ProgressBar.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetProgressBar.cpp smartwin/source/widgets/RadioButton.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetRadioButton.cpp smartwin/source/widgets/RichTextBox.cpp 821@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetRichTextBox.cpp smartwin/source/widgets/Slider.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetSlider.cpp smartwin/source/widgets/Spinner.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetSpinner.cpp smartwin/source/widgets/TabSheet.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetTabSheet.cpp smartwin/source/widgets/Table.cpp 876@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetListView.cpp smartwin/source/widgets/TextBox.cpp 821@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetTextBox.cpp smartwin/source/widgets/ToolBar.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetToolbar.cpp smartwin/source/widgets/ToolTip.cpp 810@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetToolTip.cpp smartwin/source/widgets/Tree.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetTreeView.cpp + smartwin/include/smartwin/widgets/LoadDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetLoadFile.h smartwin/include/smartwin/widgets/SaveDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetSaveFile.h win32/ComboBox.cpp 1023@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetComboBox.cpp win32/ComboBox.h 1023@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetComboBox.h win32/TextBox.cpp 1023@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetTextBox.cpp win32/TextBox.h 753@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FWidgetTextBox.h win32/TypedTable.h 846@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FTypedListView.h win32/TypedTree.h 743@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:win32%2FTypedTreeView.h Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm Name: bzr:ancestry:v3-trunk1 + arn...@gm...-20080329054606-ubefm4h98xjgvif9 Modified: dcplusplus/trunk/smartwin/SmartUtil/StringConversion.h =================================================================== --- dcplusplus/trunk/smartwin/SmartUtil/StringConversion.h 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/SmartUtil/StringConversion.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -66,7 +66,7 @@ /// Specialized version of UnicodeConverter class for converting FROM UNICODE or wchar_t TO char (std::string) /** It can in many scenarios be useful to be able to convert from wchar_t to char, one good example is when you have a * a filepath and you want to construct a std::fstream object.<br> - * Often you would for instance use a WidgetLoadFile or a WidgetSaveFile Widget to retrieve a path from the user.<br> + * Often you would for instance use a LoadDialog or a SaveDialog Widget to retrieve a path from the user.<br> * These classes returns their file paths in UNICODE format ifi UNICODE is defined.<br> * But the std::fstream constructors cannot take any string types other than char * types for a file path.<br> * Then you can use this class to convert from wchar_t string to char strings. <br> Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -39,13 +39,13 @@ #include "widgets/DateTime.h" #include "widgets/WidgetDialog.h" #include "widgets/GroupBox.h" -#include "widgets/WidgetLoadFile.h" +#include "widgets/LoadDialog.h" #include "widgets/MDIChild.h" #include "widgets/MDIFrame.h" #include "widgets/MDIParent.h" #include "widgets/ProgressBar.h" #include "widgets/RadioButton.h" -#include "widgets/WidgetSaveFile.h" +#include "widgets/SaveDialog.h" #include "widgets/Slider.h" #include "widgets/Spinner.h" #include "widgets/Label.h" @@ -179,10 +179,10 @@ typedef typename RadioButton::ObjectType RadioButtonPtr; /// LoadFileDialog class type. - typedef SmartWin::WidgetLoadFile WidgetLoadFile; + typedef SmartWin::LoadDialog LoadDialog; /// SaveFileDialog class and object type. - typedef SmartWin::WidgetSaveFile WidgetSaveFile; + typedef SmartWin::SaveDialog SaveDialog; /// ColorDialog class and object type. typedef SmartWin::ColorDialog ColorDialog; @@ -254,12 +254,12 @@ /// Creates a LoadFileDialog and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a Load File Dialog */ - WidgetLoadFile createLoadFile(); + LoadDialog createLoadFile(); /// Creates a SaveFileDialog and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a Save File Dialog */ - WidgetSaveFile createSaveFile(); + SaveDialog createSaveFile(); /// Creates a ColorDialog and returns it. /** Usable to let user choose font from the system installed fonts. @@ -485,17 +485,17 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetLoadFile +typename WidgetFactory< ContainerWidgetType >::LoadDialog WidgetFactory< ContainerWidgetType >::createLoadFile() { - return WidgetLoadFile ( this ); + return LoadDialog ( this ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetSaveFile +typename WidgetFactory< ContainerWidgetType >::SaveDialog WidgetFactory< ContainerWidgetType >::createSaveFile() { - return WidgetSaveFile ( this ); + return SaveDialog ( this ); } template<typename ContainerWidgetType> Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -37,11 +37,11 @@ { // begin namespace SmartWin -/// Class for adding a filter to e.g. a WidgetLoadFile dialog. +/// Class for adding a filter to e.g. a LoadDialog dialog. /** \ingroup AspectClasses * Class is an Aspect class which should be realized into classes that needs it. * <br> - * Help the WidgetLoadFile and the WidgetSaveFile to add up filters on which file + * Help the LoadDialog and the SaveDialog to add up filters on which file * types to look for! */ class AspectFileFilter @@ -84,7 +84,7 @@ return itsActiveFilter + 1; } - /// Sets the starting directory of the WidgetLoadFile or WidgetSaveFile Widget + /// Sets the starting directory of the LoadDialog or SaveDialog Widget /** If given your dialog will try to start in the given directory, otherwise it * will use the working directory of the process. */ @@ -94,7 +94,7 @@ } /// Ensure filename meets OS expectations for path separators. - /** We want WidgetSaveFile and WidgetLoadFile to always return a pathname that + /** We want SaveDialog and LoadDialog to always return a pathname that * meets the OS expectations. <br> * Windows wants: C:\dir\dir\file.ext <br> * and UnixLinux: /dir/dir/file.ext <br> @@ -128,30 +128,26 @@ protected: - AspectFileFilter() - : itsActiveFilter( 0 ) + Widget * itsParent; + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } + + AspectFileFilter(Widget* parent) + : itsParent(parent), itsActiveFilter( 0 ) {} static const int PATH_BUFFER_SIZE = 32768; //really arbitrary, but 32K sounds reasonable. size in number of TCHARS! // Fills out the common members of the OPENFILENAME struct. - // This is called for both WidgetLoadFile and for WidgetSaveFile Widgets - void fillOutCommonStructure( OPENFILENAME & ofn, HWND parent, int flags ) + // This is called for both LoadDialog and for SaveDialog Widgets + void fillOFN( OPENFILENAME & ofn, HWND parent, int flags ) { - // Initialize OPENFILENAME - ZeroMemory( & ofn, sizeof( ofn ) ); - ofn.lStructSize = sizeof( OPENFILENAME ); - ofn.hwndOwner = parent; - ofn.hInstance = ::GetModuleHandle( 0 ); ofn.nMaxFile = PATH_BUFFER_SIZE; ofn.lpstrFilter = itsFilter.c_str(); ofn.nFilterIndex = this->getActiveFilter(); - ofn.lpstrFileTitle = NULL; - ofn.nMaxFileTitle = 259; ofn.lpstrInitialDir = itsStartDir.c_str(); - ofn.Flags = flags; // OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; + ofn.Flags = flags; } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -190,7 +190,7 @@ { int txtLength = ::GetWindowTextLength( handle() ); SmartUtil::tstring retVal(txtLength, '\0'); - ::GetWindowText( handle(), &txt[0], txtLength ); + ::GetWindowText( handle(), &retVal[0], txtLength ); return retVal; } Copied: dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h (from rev 1083, dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -0,0 +1,162 @@ +/* + Copyright (c) 2005, Thomas Hansen + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the SmartWin++ nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef LoadDialog_h +#define LoadDialog_h + +#include "../Widget.h" +#include "../../SmartUtil.h" +#include "../aspects/AspectFileFilter.h" +#include <vector> + +namespace SmartWin +{ +// begin namespace SmartWin + +/// LoadFileDialog class +/** \ingroup WidgetControls + * \image html loadfile.PNG + * Class for showing a LoadFileDialog box. <br> + * \sa SaveDialog + * \sa AspectFileFilter + */ +class LoadDialog + : public AspectFileFilter +{ +public: + /// Class type + typedef LoadDialog ThisType; + + /// Object type + /** Note, not a pointer!!!! + */ + typedef ThisType ObjectType; + + /// Shows the dialog + /** Returns string() or "empty string" if user press cancel. <br> + * Returns a "file path" if user presses ok. <br> + * Use the inherited functions AspectFileFilter::addFilter and + * AspectFileFilter::activeFilter <br> + * before calling this function, if you wish the dialog to show only certain + * types of files. + */ + SmartUtil::tstring showDialog(); + + /// Shows the dialog + /** Returns an empty vector if user press cancel. <br> + * Returns a vector of "file paths" if user presses ok. <br> + * Use the inherited functions AspectFileFilter::addFilter and + * AspectFileFilter::activeFilter <br> + * before calling this function, if you wish the dialog to show only certain + * types of files. + */ + std::vector<SmartUtil::tstring> showDialogMultiSelect(); + + // Constructor Taking pointer to parent + explicit LoadDialog( Widget * parent = 0 ); + +<<<<<<< TREE +<<<<<<< TREE + ~LoadDialog() { } +======= + virtual ~WidgetLoadFile() { } +>>>>>>> MERGE-SOURCE +======= + virtual ~LoadDialog() { } +>>>>>>> MERGE-SOURCE +private: +}; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Implementation of class +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +inline SmartUtil::tstring LoadDialog::showDialog() +{ + TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name + szFile[0] = '\0'; + + OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure + fillOFN( ofn, getParentHandle(), OFN_FILEMUSTEXIST ); + ofn.lpstrFile = szFile; + ofn.Flags |= OFN_FILEMUSTEXIST; + + SmartUtil::tstring retVal; + if ( ::GetOpenFileName( & ofn ) ) + { + retVal = ofn.lpstrFile; + backslashToForwardSlashForUnix( retVal ); + } + return retVal; +} + +inline std::vector<SmartUtil::tstring> LoadDialog::showDialogMultiSelect() +{ + TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name + szFile[0] = '\0'; + + OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure + fillOFN( ofn, getParentHandle(), OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT | OFN_EXPLORER ); + ofn.lpstrFile = szFile; + std::vector<SmartUtil::tstring> retVal; + if( ::GetOpenFileName(&ofn) ) + { + // If a single file is selected, the lpstrFile string is just the path terminated by TWO null bytes + // If multiple files are selected, the format of the string returned is: + // DIRECTORY_PATH + '\0' + FILE_NAME_1 + '\0' + FILE_NAME_2 + '\0' + ... + FILE_NAME_N + '\0' + '\0' + // (Note the last file name is terminated by two null bytes) + + SmartUtil::tstring fileName; + SmartUtil::tstring filePath; + SmartUtil::tstring directory; + directory = ofn.lpstrFile; // tstring ends at first null + TCHAR *array_p = ofn.lpstrFile + directory.length() + 1; // set pointer to one position past null + fileName = array_p; // fileName is substring from array_p to next null + if (fileName.length() == 0) // only one file was selected + retVal.push_back(directory); // string 'directory' contains full path + else + { + while (fileName.length() > 0) + { + filePath = directory + _T("\\") + fileName; + backslashToForwardSlashForUnix(filePath); + retVal.push_back(filePath); + array_p = array_p + fileName.length() + 1; // set pointer one position past null + fileName = array_p; // fileName is substring from array_p to next null + } + } + } + return retVal; +} + +inline LoadDialog::LoadDialog( Widget * parent ) + : AspectFileFilter( parent ) +{} + +// end namespace SmartWin +} + +#endif Copied: dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h (from rev 1083, dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/SaveDialog.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -0,0 +1,102 @@ +/* + Copyright (c) 2005, Thomas Hansen + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the SmartWin++ nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef SaveDialog_h +#define SaveDialog_h + +#include "../Widget.h" +#include "../../SmartUtil.h" +#include "../aspects/AspectFileFilter.h" + +namespace SmartWin +{ +// begin namespace SmartWin + +/// SaveFileDialog class +/** \ingroup WidgetControls + * \image html savefile.PNG + * Class for showing a Save File Dialog. + * \sa LoadDialog + * \sa AspectFileFilter + */ +class SaveDialog + : public AspectFileFilter +{ +public: + /// Class type + typedef SaveDialog ThisType; + + /// Object type + /** Note, not a pointer!!!! + */ + typedef ThisType ObjectType; + + /// Shows the dialog + /** Returns string() or "empty string" if user press cancel. <br> + * Returns a "file path" if user presses ok. + */ + bool open(SmartUtil::tstring& target); + + /// Constructor Taking pointer to parent + explicit SaveDialog( Widget * parent = 0 ); + + virtual ~SaveDialog() + {} + +private: +}; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Implementation of class +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +inline bool SaveDialog::open(SmartUtil::tstring& target) +{ + TCHAR szFile[PATH_BUFFER_SIZE + 1]; // buffer for file name + szFile[0] = '\0'; + + OPENFILENAME ofn = { sizeof(OPENFILENAME) }; // common dialog box structure + fillOFN( ofn, getParentHandle(), 0 ); + ofn.lpstrFile = szFile; + + if ( ::GetSaveFileName( & ofn ) ) + { + target = ofn.lpstrFile; + backslashToForwardSlashForUnix( target ); + return true; + } + return false; +} + +inline SaveDialog::SaveDialog( Widget * parent ) + : AspectFileFilter( parent ) +{ +} + +// end namespace SmartWin +} + +#endif Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -25,8 +25,8 @@ OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef Table_h -#define Table_h +#ifndef ListView_h +#define ListView_h #include "../Widget.h" #include "../Point.h" @@ -42,7 +42,7 @@ #include "../aspects/AspectScrollable.h" #include "../aspects/AspectSelection.h" #include "Control.h" -#include "TableEditBox.h" +#include "WidgetListViewEditBox.h" #include <vector> @@ -86,7 +86,7 @@ HeaderDispatcher(const F& f_) : f(f_) { } bool operator()(const MSG& msg, LRESULT& ret) { - LPNMTable p = (LPNMTable) msg.lParam; + LPNMLISTVIEW p = (LPNMLISTVIEW) msg.lParam; f(p->iSubItem); return true; } @@ -472,10 +472,10 @@ virtual ~Table() { } - // Returns the rect for the item per code (wraps Table_GetItemRect) + // Returns the rect for the item per code (wraps ListView_GetItemRect) Rectangle getRect( int item, int code ); - // Returns the rect for the subitem item per code (wraps Table_GetSubItemRect) + // Returns the rect for the subitem item per code (wraps ListView_GetSubItemRect) Rectangle getRect( int item, int subitem, int code ); private: @@ -644,10 +644,10 @@ inline void Table::resort() { if(sortColumn != -1) { if(sortType == SORT_CALLBACK) { - Table_SortItems(this->handle(), &Table::compareFuncCallback, reinterpret_cast<LPARAM>(this)); + ListView_SortItems(this->handle(), &Table::compareFuncCallback, reinterpret_cast<LPARAM>(this)); } else { // Wine 0.9.48 doesn't support this - Table_SortItemsEx(this->handle(), &Table::compareFunc, reinterpret_cast< LPARAM >(this)); + ListView_SortItemsEx(this->handle(), &Table::compareFunc, reinterpret_cast< LPARAM >(this)); } } } @@ -657,11 +657,11 @@ } inline size_t Table::countSelectedImpl() const { - return static_cast<size_t>(Table_GetSelectedCount( this->handle() )); + return static_cast<size_t>(ListView_GetSelectedCount( this->handle() )); } inline void Table::setText( unsigned row, unsigned column, const SmartUtil::tstring & newVal ) { - Table_SetItemText( this->handle(), row, column, const_cast < TCHAR * >( newVal.c_str() ) ); + ListView_SetItemText( this->handle(), row, column, const_cast < TCHAR * >( newVal.c_str() ) ); } inline bool Table::getReadOnly() { @@ -681,16 +681,16 @@ colInfo.mask = LVCF_TEXT; colInfo.cchTextMax = BUFFER_MAX; colInfo.pszText = buffer; - Table_GetColumn( this->handle(), col, & colInfo ); + ListView_GetColumn( this->handle(), col, & colInfo ); return colInfo.pszText; } inline bool Table::isChecked( unsigned row ) { - return Table_GetCheckState( this->handle(), row ) == TRUE; + return ListView_GetCheckState( this->handle(), row ) == TRUE; } inline void Table::setChecked( unsigned row, bool value ) { - Table_SetCheckState( this->handle(), row, value ); + ListView_SetCheckState( this->handle(), row, value ); } inline void Table::setFullRowSelect( bool value ) { @@ -698,7 +698,7 @@ } inline void Table::resize( unsigned size ) { - Table_SetItemCount( this->handle(), size ); + ListView_SetItemCount( this->handle(), size ); } inline void Table::setCheckBoxes( bool value ) { @@ -734,11 +734,11 @@ inline void Table::eraseColumn( unsigned columnNo ) { xAssert( columnNo != 0, _T( "Can't delete the leftmost column" ) ); - Table_DeleteColumn( this->handle(), columnNo ); + ListView_DeleteColumn( this->handle(), columnNo ); } inline void Table::setColumnWidth( unsigned columnNo, int width ) { - if ( Table_SetColumnWidth( this->handle(), columnNo, width ) == FALSE ) + if ( ListView_SetColumnWidth( this->handle(), columnNo, width ) == FALSE ) { xCeption x( _T( "Couldn't resize columns of Table" ) ); throw x; @@ -746,15 +746,15 @@ } inline void Table::clearImpl() { - Table_DeleteAllItems( this->handle() ); + ListView_DeleteAllItems( this->handle() ); } inline void Table::eraseImpl( int row ) { - Table_DeleteItem( this->handle(), row ); + ListView_DeleteItem( this->handle(), row ); } inline size_t Table::sizeImpl() const { - return Table_GetItemCount( this->handle() ); + return ListView_GetItemCount( this->handle() ); } #ifdef PORT_ME @@ -769,14 +769,14 @@ inline Rectangle Table::getRect( int item, int code ) { RECT r; - Table_GetItemRect( this->handle(), item, &r, code ); + ListView_GetItemRect( this->handle(), item, &r, code ); return r; } inline Rectangle Table::getRect( int item, int subitem, int code ) { RECT r; - Table_GetSubItemRect( this->handle(), item, subitem, code, &r ); + ListView_GetSubItemRect( this->handle(), item, subitem, code, &r ); return r; } @@ -797,35 +797,35 @@ } inline void Table::setTableStyle(int style) { - Table_SetExtendedTableStyle(this->handle(), style); + ListView_SetExtendedListViewStyle(this->handle(), style); } inline int Table::getNext(int i, int type) const { - return Table_GetNextItem(this->handle(), i, type); + return ListView_GetNextItem(this->handle(), i, type); } inline int Table::find(const SmartUtil::tstring& b, int start, bool aPartial) { LVFINDINFO fi = { aPartial ? LVFI_PARTIAL : LVFI_STRING, b.c_str() }; - return Table_FindItem(this->handle(), start, &fi); + return ListView_FindItem(this->handle(), start, &fi); } inline int Table::findDataImpl(LPARAM data, int start) { LVFINDINFO fi = { LVFI_PARAM, NULL, data }; - return Table_FindItem(this->handle(), start, &fi); + return ListView_FindItem(this->handle(), start, &fi); } inline void Table::select(int i) { - Table_SetItemState(this->handle(), i, LVIS_SELECTED, LVIS_SELECTED); + ListView_SetItemState(this->handle(), i, LVIS_SELECTED, LVIS_SELECTED); } inline void Table::ensureVisible(int i, bool partial) { - Table_EnsureVisible(this->handle(), i, false); + ListView_EnsureVisible(this->handle(), i, false); } inline void Table::setColorImpl(COLORREF text, COLORREF background) { - Table_SetTextColor(this->handle(), text); - Table_SetTextBkColor(this->handle(), background); - Table_SetBkColor(this->handle(), background); + ListView_SetTextColor(this->handle(), text); + ListView_SetTextBkColor(this->handle(), background); + ListView_SetBkColor(this->handle(), background); } #ifdef PORT_ME @@ -886,7 +886,7 @@ if ( xOffset + r.left < 0 || xOffset + r.left > cr.right ) { int x = xOffset - r.left; - Table_Scroll( this->handle(), x, 0 ); + ListView_Scroll( this->handle(), x, 0 ); r.left -= x; } // Get column alignment @@ -894,7 +894,7 @@ {0 }; lv.mask = LVCF_FMT; - Table_GetColumn( this->handle(), logicalColumn, & lv ); + ListView_GetColumn( this->handle(), logicalColumn, & lv ); DWORD dwStyle; if ( ( lv.fmt & LVCFMT_JUSTIFYMASK ) == LVCFMT_LEFT ) dwStyle = ES_LEFT; @@ -903,14 +903,14 @@ else dwStyle = ES_CENTER; r.left += xOffset + 4; - r.right = r.left + ( Table_GetColumnWidth( this->handle(), itsEditColumn ) - 3 ); + r.right = r.left + ( ListView_GetColumnWidth( this->handle(), itsEditColumn ) - 3 ); if ( r.right > cr.right ) r.right = cr.right; dwStyle |= WS_BORDER | WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL; #endif // Creating text Widget and placing it above cell - HWND editControl = Table_GetEditControl( this->handle() ); + HWND editControl = ListView_GetEditControl( this->handle() ); if ( editControl == 0 ) { xCeption err( _T( "Couldn't attach to List View editcontrol" ) ); @@ -931,7 +931,7 @@ // Getting text of cell and inserting into text Widget const int BUFFER_MAX = 260; // List view cells have a maximum of 260 characters TCHAR buffer[BUFFER_MAX]; - Table_GetItemText( this->handle(), itsEditRow, itsEditColumn, buffer, BUFFER_MAX ); + ListView_GetItemText( this->handle(), itsEditRow, itsEditColumn, buffer, BUFFER_MAX ); text->setText( buffer ); // Select all end give focus @@ -963,14 +963,14 @@ LVHITTESTINFO info; info.pt.x = itsXMousePosition; info.pt.y = itsYMousePosition; - Table_SubItemHitTest( this->handle(), & info ); + ListView_SubItemHitTest( this->handle(), & info ); // User has clicked the Table if ( info.iItem != - 1 ) { // User has clicked an ITEM in Table if ( info.iSubItem >= 0 ) { - UINT state = Table_GetItemState( this->handle(), info.iItem, LVIS_FOCUSED ); + UINT state = ListView_GetItemState( this->handle(), info.iItem, LVIS_FOCUSED ); if ( ! ( state & LVIS_FOCUSED ) ) { //SetFocus( itsHandle ); // TODO: This was catched by devcpp ... what was intended? @@ -982,7 +982,7 @@ { itsEditRow = info.iItem; itsEditColumn = info.iSubItem; - Table_EditLabel( this->handle(), info.iItem ); + ListView_EditLabel( this->handle(), info.iItem ); return 0; // Processed } } Deleted: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -1,175 +0,0 @@ -/* - Copyright (c) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef WidgetLoadFile_h -#define WidgetLoadFile_h - -#include "../Widget.h" -#include "../../SmartUtil.h" -#include "../aspects/AspectFileFilter.h" -#include <vector> - -namespace SmartWin -{ -// begin namespace SmartWin - -/// LoadFileDialog class -/** \ingroup WidgetControls - * \image html loadfile.PNG - * Class for showing a LoadFileDialog box. <br> - * Either derive from it or call WidgetFactory::createLoadFile. <br> - * Related classes - * <ul> - * <li>WidgetSaveFile</li> - * <li>AspectFileFilter</li> - * <li>WidgetFileCommon</li> - * </ul> - * Note! <br> - * 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. <br> - * the complete signature of the function will then be "HWND parent()" - */ -class WidgetLoadFile - : public AspectFileFilter -{ -public: - /// Class type - typedef WidgetLoadFile ThisType; - - /// Object type - /** Note, not a pointer!!!! - */ - typedef ThisType ObjectType; - - /// Shows the dialog - /** Returns string() or "empty string" if user press cancel. <br> - * Returns a "file path" if user presses ok. <br> - * Use the inherited functions AspectFileFilter::addFilter and - * AspectFileFilter::activeFilter <br> - * before calling this function, if you wish the dialog to show only certain - * types of files. - */ - SmartUtil::tstring showDialog(); - - /// Shows the dialog - /** Returns an empty vector if user press cancel. <br> - * Returns a vector of "file paths" if user presses ok. <br> - * Use the inherited functions AspectFileFilter::addFilter and - * AspectFileFilter::activeFilter <br> - * before calling this function, if you wish the dialog to show only certain - * types of files. - */ - std::vector<SmartUtil::tstring> showDialogMultiSelect(); - - // Constructor Taking pointer to parent - explicit WidgetLoadFile( Widget * parent = 0 ); - - virtual ~WidgetLoadFile() { } -private: - Widget * itsParent; - HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Implementation of class -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline SmartUtil::tstring WidgetLoadFile::showDialog() -{ - TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name - szFile[0] = '\0'; - - OPENFILENAME ofn; // common dialog box structure - // Note! - // If this one fizzles you have NOT supplied a parent with a "handle()" - // function... You MUST supply a parent with a function "handle()" which - // returns a HWND! All the Widgetxxx classes (except LoadFile, SaveFile and - // MessageBox) have the "handle()" function... - fillOutCommonStructure( ofn, getParentHandle(), OFN_FILEMUSTEXIST ); - ofn.lpstrFile = szFile; - ofn.Flags |= OFN_FILEMUSTEXIST; - - SmartUtil::tstring retVal; - if ( ::GetOpenFileName( & ofn ) ) - { - retVal = ofn.lpstrFile; - backslashToForwardSlashForUnix( retVal ); - } - return retVal; -} - -inline std::vector<SmartUtil::tstring> WidgetLoadFile::showDialogMultiSelect() -{ - TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name - szFile[0] = '\0'; - - OPENFILENAME ofn; // common dialog box structure - // Note! - // If this one fizzles you have NOT supplied a parent with a "handle()" function... - // You MUST supply a parent with a function "handle()" which returns a HWND! - // All the Widgetxxx classes (except LoadFile, SaveFile and MessageBox) have the "handle()" function... - fillOutCommonStructure( ofn, getParentHandle(), OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT | OFN_EXPLORER ); - ofn.lpstrFile = szFile; - std::vector<SmartUtil::tstring> retVal; - if( ::GetOpenFileName(&ofn) ) - { - // If a single file is selected, the lpstrFile string is just the path terminated by TWO null bytes - // If multiple files are selected, the format of the string returned is: - // DIRECTORY_PATH + '\0' + FILE_NAME_1 + '\0' + FILE_NAME_2 + '\0' + ... + FILE_NAME_N + '\0' + '\0' - // (Note the last file name is terminated by two null bytes) - - SmartUtil::tstring fileName; - SmartUtil::tstring filePath; - SmartUtil::tstring directory; - directory = ofn.lpstrFile; // tstring ends at first null - TCHAR *array_p = ofn.lpstrFile + directory.length() + 1; // set pointer to one position past null - fileName = array_p; // fileName is substring from array_p to next null - if (fileName.length() == 0) // only one file was selected - retVal.push_back(directory); // string 'directory' contains full path - else - { - while (fileName.length() > 0) - { - filePath = directory + _T("\\") + fileName; - backslashToForwardSlashForUnix(filePath); - retVal.push_back(filePath); - array_p = array_p + fileName.length() + 1; // set pointer one position past null - fileName = array_p; // fileName is substring from array_p to next null - } - } - } - return retVal; -} - -inline WidgetLoadFile::WidgetLoadFile( Widget * parent ) - : itsParent( parent ) -{} - -// end namespace SmartWin -} - -#endif Deleted: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h 2008-03-29 08:10:17 UTC (rev 1084) @@ -1,119 +0,0 @@ -/* - Copyright (c) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef WidgetSaveFile_h -#define WidgetSaveFile_h - -#include "../Widget.h" -#include "../../SmartUtil.h" -#include "../aspects/AspectFileFilter.h" - -namespace SmartWin -{ -// begin namespace SmartWin - -/// SaveFileDialog class -/** \ingroup WidgetControls - * \image html savefile.PNG - * Class for showing a Save File Dialog. <br> - * Either derive from it or call WidgetFactory::createSaveFile. <br> - * Related classes - * <ul> - * <li>WidgetLoadFile</li> - * <li>AspectFileFilter</li> - * <li>WidgetFileCommon</li> - * </ul> - * Note!<br> - * 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 an HWND. <br> - * the complete signature of the function will then be "HWND parent();" - */ -class WidgetSaveFile - : public AspectFileFilter -{ -public: - /// Class type - typedef WidgetSaveFile ThisType; - - /// Object type - /** Note, not a pointer!!!! - */ - typedef ThisType ObjectType; - - /// Shows the dialog - /** Returns string() or "empty string" if user press cancel. <br> - * Returns a "file path" if user presses ok. - */ - SmartUtil::tstring showDialog(); - - /// Constructor Taking pointer to parent - explicit WidgetSaveFile( Widget * parent = 0 ); - - virtual ~WidgetSaveFile() - {} - -private: - Widget * itsParent; - HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Implementation of class -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline SmartUtil::tstring WidgetSaveFile::showDialog() -{ - TCHAR szFile[MAX_PATH + 1]; // buffer for file name - szFile[0] = '\0'; - - OPENFILENAME ofn; // common dialog box structure - // Note! - // If this one fizzles you have NOT supplied a parent with a "handle()" - // function... You MUST supply a parent with a function "handle()" which - // returns a HWND! All the Widgetxxx classes (except LoadFile, SaveFile and - // MessageBox) have the "handle()" function... - fillOutCommonStructure( ofn, getParentHandle(), 0 ); // OFN_PATHMUSTEXIST ? - ofn.lpstrFile = szFile; - - SmartUtil::tstring retVal; - if ( ::GetSaveFileName( & ofn ) ) - { - retVal = ofn.lpstrFile; - backslashToForwardSlashForUnix( retVal ); - } - return retVal; -} - -inline WidgetSaveFile::WidgetSaveFile( Widget * parent ) - : itsParent( parent ) -{ -} - -// end namespace SmartWin -} - -#endif Modified: dcplusplus/trunk/smartwin/source/Application.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/Application.cpp 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/source/Application.cpp 2008-03-29 08:10:17 UTC (rev 1084) @@ -105,9 +105,8 @@ #endif // Initializing Common Controls... - INITCOMMONCONTROLSEX init; - init.dwSize = sizeof( INITCOMMONCONTROLSEX ); - init.dwICC = ICC_COOL_CLASSES | ICC_BAR_CLASSES | ICC_Table_CLASSES | ICC_DATE_CLASSES | ICC_PROGRESS_CLASS; + INITCOMMONCONTROLSEX init = { sizeof( INITCOMMONCONTROLSEX ) }; + init.dwICC = ICC_COOL_CLASSES | ICC_BAR_CLASSES | ICC_LISTVIEW_CLASSES | ICC_DATE_CLASSES | ICC_PROGRESS_CLASS | ICC_TREEVIEW_CLASSES; ::InitCommonControlsEx( & init ); #ifdef _MSC_VER Modified: dcplusplus/trunk/smartwin/source/widgets/Table.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/Table.cpp 2008-03-29 08:09:17 UTC (rev 1083) +++ dcplusplus/trunk/smartwin/source/widgets/Table.cpp 2008-03-29 08:10:17 UTC (rev 1084) @@ -11,7 +11,7 @@ bool Table::ComCtl6 = false; Table::Seed::Seed() : - Widget::Seed(WC_Table, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS), + Widget::Seed(WC_LISTVIEW, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS), font(new Font(DefaultGuiFont)), lvStyle(0) { @@ -66,7 +66,7 @@ void Table::updateArrow() { if(ComCtl6) { int flag = isAscending() ? HDF_SORTUP : HDF_SORTDOWN; - HWND header = Table_GetHeader(this->handle()); + HWND header = ListView_GetHeader(this->handle()); int count = Header_GetItemCount(header); for (int i=0; i < count; ++i) { @@ -86,7 +86,7 @@ HBITMAP bitmap = (isAscending() ? upArrow : downArrow)->handle(); - HWND header = Table_GetHeader(this->handle()); + HWND header = ListView_GetHeader(this->handle()); int count = Header_GetItemCount(header); for (int i=0; i < count; ++i) { @@ -106,16 +106,16 @@ } void Table::setSelectedImpl(int item) { - Table_SetItemState(handle(), item, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); + ListView_SetItemState(handle(), item, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); } void Table::clearSelection() { int i = -1; while((i = getNext(i, LVNI_SELECTED)) != -1) { - Table_SetItemState(handle(), i, 0, LVIS_SELECTED | LVIS_FOCUSED); + ListView_SetItemState(handle(), i, 0, LVIS_SELECTED | LVIS_FOCUSED); } while((i = getNext(i, LVNI_FOCUSED)) != -1) { - Table_SetItemState(handle(), i, 0, LVIS_FOCUSED); + ListView_SetItemState(handle(), i, 0, LVIS_FOCUSED); } } @@ -123,7 +123,7 @@ { // Deleting all data clear(); - while ( Table_DeleteColumn( this->handle(), 0 ) == TRUE ); + while ( ListView_DeleteColumn( this->handle(), 0 ) == TRUE ); LVCOLUMN lvColumn = { LVCF_WIDTH | LVCF_TEXT }; @@ -134,7 +134,7 @@ ++idx, ++x ) { lvColumn.pszText = const_cast < TCHAR * >( idx->c_str() ); - if ( Table_InsertColumn( this->handle(), x, & lvColumn ) == - 1 ) + if ( ListView_InsertColumn( this->handle(), x, & lvColumn ) == - 1 ) { xCeption x( _T( "Error while trying to create Columns in list view" ) ); throw x; @@ -145,7 +145,7 @@ int Table::insert(const std::vector< SmartUtil::tstring > & row, LPARAM lPar, int index, int iconIndex) { if (index == - 1) { // Appending at bottom - index = Table_GetItemCount( this->handle() ); + index = ListView_GetItemCount( this->handle() ); } LVITEM lvi = { LVIF_TEXT | LVIF_PARAM }; if (itsNormalImageList || itsSmallImageList ) { @@ -156,7 +156,7 @@ lvi.pszText = const_cast < TCHAR * >(row[0].c_str() ); lvi.lParam = lPar; lvi.iItem = index; - if ( Table_InsertItem( this->handle(), & lvi ) == - 1) { + if ( ListView_InsertItem( this->handle(), & lvi ) == - 1) { xCeption x( _T( "Error while trying to insert row in Table" )); throw x; } @@ -165,7 +165,7 @@ for (std::vector< SmartUtil::tstring >::const_iterator idx = row.begin() + 1; idx != row.end(); ++idx ) { lvi.pszText = const_cast < TCHAR * >(idx->c_str() ); lvi.cchTextMax = static_cast< int >(idx->size() ); - if ( !Table_SetItem( this->handle(), & lvi )) { + if ( !ListView_SetItem( this->handle(), & lvi )) { xCeption x( _T( "Error while trying to insert row in Table" )); throw x; } @@ -182,7 +182,7 @@ item.pszText = const_cast<LPTSTR>(text); item.iImage = image; item.lParam = lparam; - return Table_InsertItem(this->handle(), &item); + return ListView_InsertItem(this->handle(), &item); } ScreenCoordinate Table::getContextMenuPos() { @@ -202,7 +202,7 @@ const int BUFFER_MAX = 2048; TCHAR buffer[BUFFER_MAX + 1]; buffer[0] = '\0'; - Table_GetItemText( this->handle(), row, column, buffer, BUFFER_MAX ); + ListView_GetItemText( this->handle(), row, column, buffer, BUFFER_MAX ); return buffer; } @@ -212,7 +212,7 @@ int tmpIdx = - 1; while ( true ) { - tmpIdx = Table_GetNextItem( this->handle(), tmpIdx, LVNI_SELECTED ); + tmpIdx = ListView_GetNextItem( this->handle(), tmpIdx, LVNI_SELECTED ); if ( tmpIdx == - 1 ) break; retVal.push_back( static_cast< unsigned >( tmpIdx ) ); @@ -221,12 +221,12 @@ } unsigned Table::getColumnCount() { - HWND header = Table_GetHeader(handle()); + HWND header = ListView_GetHeader(handle()); return Header_GetItemCount(header); } void Table::addRemoveTableExtendedStyle( DWORD addStyle, bool add ) { - DWORD newStyle = Table_GetExtendedTableStyle( this->handle() ); + DWORD newStyle = ListView_GetExtendedListViewStyle( this->handle() ); if ( add && ( newStyle & addStyle ) != addStyle ) { newStyle |= addStyle; @@ -235,7 +235,7 @@ { newStyle ^= addStyle; } - Table_SetExtendedTableStyle( this->handle(), newStyle ); + ListView_SetExtendedListViewStyle( this->handle(), newStyle ); } std::vector<int> Table::getColumnOrder() { @@ -264,7 +264,7 @@ LVITEM item = { LVIF_PARAM }; item.iItem = idx; - if(!Table_GetItem(handle(), &item)) { + if(!ListView_GetItem(handle(), &item)) { return 0; } return item.lParam; @@ -275,7 +275,7 @@ item.iItem = idx; item.lParam = data; - Table_SetItem(handle(), &item); + ListView_SetItem(handle(), &item); } void Table::setIcon( unsigned row, int newIconIndex ) { @@ -283,7 +283,7 @@ it.iItem = row; it.iImage = newIconIndex; //Set item - if(Table_SetItem( this->handle(), &it) != TRUE) { + if(ListView_SetItem( this->handle(), &it) != TRUE) { xCeption err( _T( "Something went wrong while trying to change the selected item of the Table" ) ); throw err; } @@ -291,17 +291,17 @@ void Table::setNormalImageList( ImageListPtr imageList ) { itsNormalImageList = imageList; - Table_SetImageList( this->handle(), imageList->getImageList(), LVSIL_NORMAL ); + ListView_SetImageList( this->handle(), imageList->getImageList(), LVSIL_NORMAL ); } void Table::setSmallImageList( ImageListPtr imageList ) { itsSmallImageList = imageList; - Table_SetImageList( this->handle(), imageList->getImageList(), LVSIL_SMALL ); + ListView_SetImageList( this->handle(), imageList->getImageList(), LVSIL_SMALL ); } void Table::setStateImageList( ImageListPtr imageList ) { itsStateImageList = imageList; - Table_SetImageList( this->handle(), imageList->getImageList(), LVSIL_STATE ); + ListView_SetImageList( this->handle(), imageList->getImageList(), LVSIL_STATE ); } void Table::setView( int view ) { @@ -322,7 +322,7 @@ if(lastRow == -1) { lastRow = size(); } - if( Table_RedrawItems( this->handle(), firstRow, lastRow ) == FALSE ) + if( ListView_RedrawItems( this->handle(), firstRow, lastRow ) == FALSE ) { throw xCeption( _T( "Error while redrawing items in Table" ) ); } @@ -357,8 +357,8 @@ if(type == SORT_CALLBACK) { result = p->fun(p->getData(na), p->getData(nb)); } else { - Table_GetItemText(p->handle(), na, p->sortColumn, buf, BUF_SIZE); - Table_GetItemText(p->handle(), nb, p->sortColumn, buf2, BUF_SIZE); + ListView_GetItemText(p->handle(), na, p->sortColumn, buf, BUF_SIZE); + ListView_GetItemText(p->handle(), nb, p->sortColumn, buf2, BUF_SIZE); if(type == SORT_STRING) { result = lstrcmp(buf, buf2); @@ -398,7 +398,7 @@ break; } else - xOffset += Table_GetColumnWidth( hWnd, myArrayOfCols[idx] ); + xOffset += ListView_GetColumnWidth( hWnd, myArrayOfCols[idx] ); } return xOffset; Copied: dcplusplus/trunk/win32/ComboBox.cpp (from rev 1083, dcplusplus/trunk/win32/WidgetComboBox.cpp) =================================================================== --- dcplusplus/trunk/win32/ComboBox.cpp (rev 0) +++ dcplusplus/trunk/win32/ComboBox.cpp 2008-03-29 08:10:17 UTC (rev 1084) @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2001-2008 ... [truncated message content] |
From: <arn...@us...> - 2008-03-29 08:09:19
|
Revision: 1083 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1083&view=rev Author: arnetheduck Date: 2008-03-29 01:09:17 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Rename a bunch of widgets Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/LibraryLoader.h dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBorder.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDblClickable.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFocus.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFont.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectKeyboard.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectScrollable.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSizable.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectUpdate.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectVisible.h dcplusplus/trunk/smartwin/include/smartwin/doxygen.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListViewEditBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetModalDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabView.h dcplusplus/trunk/smartwin/source/Application.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp dcplusplus/trunk/win32/ADLSProperties.h dcplusplus/trunk/win32/ADLSearchFrame.cpp dcplusplus/trunk/win32/ADLSearchFrame.h dcplusplus/trunk/win32/Advanced3Page.cpp dcplusplus/trunk/win32/Appearance2Page.h dcplusplus/trunk/win32/AppearancePage.h dcplusplus/trunk/win32/AspectStatus.h dcplusplus/trunk/win32/CertificatesPage.cpp dcplusplus/trunk/win32/CertificatesPage.h dcplusplus/trunk/win32/CommandDlg.cpp dcplusplus/trunk/win32/CommandDlg.h dcplusplus/trunk/win32/DirectoryListingFrame.cpp dcplusplus/trunk/win32/DirectoryListingFrame.h dcplusplus/trunk/win32/DownloadPage.cpp dcplusplus/trunk/win32/FavHubProperties.cpp dcplusplus/trunk/win32/FavHubProperties.h dcplusplus/trunk/win32/FavHubsFrame.cpp dcplusplus/trunk/win32/FavHubsFrame.h dcplusplus/trunk/win32/FavoriteDirsPage.cpp dcplusplus/trunk/win32/FavoriteDirsPage.h dcplusplus/trunk/win32/FinishedFrameBase.h dcplusplus/trunk/win32/GeneralPage.cpp dcplusplus/trunk/win32/GeneralPage.h dcplusplus/trunk/win32/HashProgressDlg.h dcplusplus/trunk/win32/HubFrame.cpp dcplusplus/trunk/win32/HubFrame.h dcplusplus/trunk/win32/HubListsDlg.cpp dcplusplus/trunk/win32/HubListsDlg.h dcplusplus/trunk/win32/LineDlg.h dcplusplus/trunk/win32/ListViewArrows.h dcplusplus/trunk/win32/LogPage.h dcplusplus/trunk/win32/MDIChildFrame.h dcplusplus/trunk/win32/MagnetDlg.cpp dcplusplus/trunk/win32/MagnetDlg.h dcplusplus/trunk/win32/MainWindow.cpp dcplusplus/trunk/win32/MainWindow.h dcplusplus/trunk/win32/NotepadFrame.cpp dcplusplus/trunk/win32/NotepadFrame.h dcplusplus/trunk/win32/PrivateFrame.cpp dcplusplus/trunk/win32/PrivateFrame.h dcplusplus/trunk/win32/PropPage.cpp dcplusplus/trunk/win32/PublicHubsFrame.cpp dcplusplus/trunk/win32/PublicHubsFrame.h dcplusplus/trunk/win32/QueueFrame.cpp dcplusplus/trunk/win32/QueueFrame.h dcplusplus/trunk/win32/SearchFrame.cpp dcplusplus/trunk/win32/SearchFrame.h dcplusplus/trunk/win32/SettingsDialog.h dcplusplus/trunk/win32/SplashWindow.cpp dcplusplus/trunk/win32/SplashWindow.h dcplusplus/trunk/win32/SpyFrame.cpp dcplusplus/trunk/win32/SpyFrame.h dcplusplus/trunk/win32/SystemFrame.cpp dcplusplus/trunk/win32/SystemFrame.h dcplusplus/trunk/win32/TextFrame.cpp dcplusplus/trunk/win32/TextFrame.h dcplusplus/trunk/win32/TransferView.cpp dcplusplus/trunk/win32/TransferView.h dcplusplus/trunk/win32/TypedListView.h dcplusplus/trunk/win32/TypedTreeView.h dcplusplus/trunk/win32/UCPage.cpp dcplusplus/trunk/win32/UCPage.h dcplusplus/trunk/win32/UploadPage.cpp dcplusplus/trunk/win32/UploadPage.h dcplusplus/trunk/win32/UsersFrame.cpp dcplusplus/trunk/win32/UsersFrame.h dcplusplus/trunk/win32/WaitingUsersFrame.h dcplusplus/trunk/win32/WidgetComboBox.cpp dcplusplus/trunk/win32/WidgetComboBox.h dcplusplus/trunk/win32/WidgetFactory.h dcplusplus/trunk/win32/WidgetTextBox.cpp dcplusplus/trunk/win32/WidgetTextBox.h dcplusplus/trunk/win32/WinUtil.cpp dcplusplus/trunk/win32/WinUtil.h Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/widgets/CheckBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/CoolBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/DateTime.h dcplusplus/trunk/smartwin/include/smartwin/widgets/GroupBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Label.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIChild.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIFrame.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIParent.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MessageBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ProgressBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/RadioButton.h dcplusplus/trunk/smartwin/include/smartwin/widgets/RichTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Slider.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Spinner.h dcplusplus/trunk/smartwin/include/smartwin/widgets/StatusBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/TabSheet.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h dcplusplus/trunk/smartwin/include/smartwin/widgets/TextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolTip.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Tree.h dcplusplus/trunk/smartwin/source/widgets/CheckBox.cpp dcplusplus/trunk/smartwin/source/widgets/ComboBox.cpp dcplusplus/trunk/smartwin/source/widgets/CoolBar.cpp dcplusplus/trunk/smartwin/source/widgets/DateTime.cpp dcplusplus/trunk/smartwin/source/widgets/GroupBox.cpp dcplusplus/trunk/smartwin/source/widgets/Label.cpp dcplusplus/trunk/smartwin/source/widgets/MDIChild.cpp dcplusplus/trunk/smartwin/source/widgets/MDIFrame.cpp dcplusplus/trunk/smartwin/source/widgets/MDIParent.cpp dcplusplus/trunk/smartwin/source/widgets/ProgressBar.cpp dcplusplus/trunk/smartwin/source/widgets/RadioButton.cpp dcplusplus/trunk/smartwin/source/widgets/RichTextBox.cpp dcplusplus/trunk/smartwin/source/widgets/Slider.cpp dcplusplus/trunk/smartwin/source/widgets/Spinner.cpp dcplusplus/trunk/smartwin/source/widgets/TabSheet.cpp dcplusplus/trunk/smartwin/source/widgets/Table.cpp dcplusplus/trunk/smartwin/source/widgets/TextBox.cpp dcplusplus/trunk/smartwin/source/widgets/ToolBar.cpp dcplusplus/trunk/smartwin/source/widgets/ToolTip.cpp dcplusplus/trunk/smartwin/source/widgets/Tree.cpp Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCheckBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetGroupBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMDIChild.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMDIFrame.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMDIParent.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMessageBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRichTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolTip.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h dcplusplus/trunk/smartwin/source/widgets/WidgetCheckBox.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetComboBox.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetCoolbar.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetDateTimePicker.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetGroupBox.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetMDIChild.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetMDIFrame.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetMDIParent.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetProgressBar.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetRadioButton.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetRichTextBox.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetSlider.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetSpinner.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetStatic.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetTabSheet.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetTextBox.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetToolTip.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetToolbar.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-28 21:05:12.553999901 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-28 22:03:47.832000017 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/widgets/FontDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetChooseFont.h smartwin/source/widgets/FontDialog.cpp fontdialog.cpp-20080328195932-jj456z98hdfqyes8-1 + smartwin/include/smartwin/widgets/CheckBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetCheckBox.h smartwin/include/smartwin/widgets/ComboBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetComboBox.h smartwin/include/smartwin/widgets/CoolBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetCoolbar.h smartwin/include/smartwin/widgets/DateTime.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetDateTimePicker.h smartwin/include/smartwin/widgets/GroupBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetGroupBox.h smartwin/include/smartwin/widgets/Label.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetStatic.h smartwin/include/smartwin/widgets/MDIChild.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMDIChild.h smartwin/include/smartwin/widgets/MDIFrame.h 779@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMDIFrame.h smartwin/include/smartwin/widgets/MDIParent.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMDIParent.h smartwin/include/smartwin/widgets/MessageBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetMessageBox.h smartwin/include/smartwin/widgets/ProgressBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetProgressBar.h smartwin/include/smartwin/widgets/RadioButton.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetRadioButton.h smartwin/include/smartwin/widgets/RichTextBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetRichTextBox.h smartwin/include/smartwin/widgets/Slider.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetSlider.h smartwin/include/smartwin/widgets/Spinner.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetSpinner.h smartwin/include/smartwin/widgets/StatusBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetStatusBar.h smartwin/include/smartwin/widgets/TabSheet.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetTabSheet.h smartwin/include/smartwin/widgets/Table.h 876@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetListView.h smartwin/include/smartwin/widgets/TextBox.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetTextBox.h smartwin/include/smartwin/widgets/ToolBar.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetToolbar.h smartwin/include/smartwin/widgets/ToolTip.h 809@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetToolTip.h smartwin/include/smartwin/widgets/Tree.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetTreeView.h smartwin/source/widgets/CheckBox.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetCheckBox.cpp smartwin/source/widgets/ComboBox.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetComboBox.cpp smartwin/source/widgets/CoolBar.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetCoolbar.cpp smartwin/source/widgets/DateTime.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetDateTimePicker.cpp smartwin/source/widgets/GroupBox.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetGroupBox.cpp smartwin/source/widgets/Label.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetStatic.cpp smartwin/source/widgets/MDIChild.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetMDIChild.cpp smartwin/source/widgets/MDIFrame.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetMDIFrame.cpp smartwin/source/widgets/MDIParent.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetMDIParent.cpp smartwin/source/widgets/ProgressBar.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetProgressBar.cpp smartwin/source/widgets/RadioButton.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetRadioButton.cpp smartwin/source/widgets/RichTextBox.cpp 821@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetRichTextBox.cpp smartwin/source/widgets/Slider.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetSlider.cpp smartwin/source/widgets/Spinner.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetSpinner.cpp smartwin/source/widgets/TabSheet.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetTabSheet.cpp smartwin/source/widgets/Table.cpp 876@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetListView.cpp smartwin/source/widgets/TextBox.cpp 821@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetTextBox.cpp smartwin/source/widgets/ToolBar.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetToolbar.cpp smartwin/source/widgets/ToolTip.cpp 810@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetToolTip.cpp smartwin/source/widgets/Tree.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetTreeView.cpp Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o Modified: dcplusplus/trunk/smartwin/include/smartwin/LibraryLoader.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/LibraryLoader.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/LibraryLoader.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -59,7 +59,7 @@ * "%SYSTEM%/x.dll" and "x.dll" though there probably IS no real difference, this is * a potential "hard to track" bug meaning always instantiate this class with the * EXACT SAME arguments! <br> - * See example usage in WidgetRichTextBox.h + * See example usage in RichTextBox.h */ class LibraryLoader { Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -30,36 +30,35 @@ #include "../SmartUtil.h" #include "widgets/Button.h" -#include "widgets/FolderDialog.h" -#include "widgets/WidgetCheckBox.h" #include "widgets/ColorDialog.h" -#include "widgets/WidgetComboBox.h" -#include "widgets/WidgetListView.h" -#include "widgets/WidgetDateTimePicker.h" +#include "widgets/FolderDialog.h" +#include "widgets/MessageBox.h" +#include "widgets/CheckBox.h" +#include "widgets/ComboBox.h" +#include "widgets/Table.h" +#include "widgets/DateTime.h" #include "widgets/WidgetDialog.h" -#include "widgets/WidgetGroupBox.h" +#include "widgets/GroupBox.h" #include "widgets/WidgetLoadFile.h" -#include "widgets/WidgetMDIChild.h" -#include "widgets/WidgetMDIFrame.h" -#include "widgets/WidgetMDIParent.h" -#include "widgets/WidgetMessageBox.h" -#include "widgets/WidgetProgressBar.h" -#include "widgets/WidgetRadioButton.h" +#include "widgets/MDIChild.h" +#include "widgets/MDIFrame.h" +#include "widgets/MDIParent.h" +#include "widgets/ProgressBar.h" +#include "widgets/RadioButton.h" #include "widgets/WidgetSaveFile.h" -#include "widgets/WidgetSlider.h" -#include "widgets/WidgetSpinner.h" -#include "widgets/WidgetStatic.h" -#include "widgets/WidgetStatusBar.h" +#include "widgets/Slider.h" +#include "widgets/Spinner.h" +#include "widgets/Label.h" +#include "widgets/StatusBar.h" #include "widgets/WidgetTabView.h" -#include "widgets/WidgetTabSheet.h" -#include "widgets/WidgetTextBox.h" -#include "widgets/WidgetTreeView.h" -#include "widgets/WidgetToolTip.h" +#include "widgets/TabSheet.h" +#include "widgets/TextBox.h" +#include "widgets/Tree.h" +#include "widgets/ToolTip.h" #include "widgets/WidgetWindow.h" #include "widgets/WidgetWindowBase.h" #include "WidgetFactoryPlatformImplementation.h" #include "WidgetCreator.h" -#include <memory> namespace SmartWin { @@ -105,43 +104,43 @@ /// MessageBox class and object type. - typedef SmartWin::WidgetMessageBox WidgetMessageBox; + typedef SmartWin::MessageBox MessageBox; /// DataGrid class type. - typedef SmartWin::WidgetListView WidgetListView; + typedef SmartWin::Table Table; /// DataGrid object type. - typedef typename WidgetListView::ObjectType WidgetListViewPtr; + typedef typename Table::ObjectType TablePtr; /// TreeView class type. - typedef SmartWin::WidgetTreeView WidgetTreeView; + typedef SmartWin::Tree Tree; /// TreeView object type. - typedef typename WidgetTreeView::ObjectType WidgetTreeViewPtr; + typedef typename Tree::ObjectType TreePtr; /// TextBox class type. - typedef SmartWin::WidgetTextBox WidgetTextBox; + typedef SmartWin::TextBox TextBox; /// TextBox object type. - typedef typename WidgetTextBox::ObjectType WidgetTextBoxPtr; + typedef typename TextBox::ObjectType TextBoxPtr; /// StatusBar class type. - typedef SmartWin::WidgetStatusBar< > WidgetStatusBar; + typedef SmartWin::StatusBar< > StatusBar; /// StatusBar object type. - typedef typename WidgetStatusBar::ObjectType WidgetStatusBarPtr; + typedef typename StatusBar::ObjectType StatusBarPtr; /// StatusBarSections class type. - typedef SmartWin::WidgetStatusBar< Section > WidgetStatusBarSections; + typedef SmartWin::StatusBar< Section > StatusBarSections; /// StatusBarSections object type. - typedef typename WidgetStatusBarSections::ObjectType WidgetStatusBarSectionsPtr; + typedef typename StatusBarSections::ObjectType StatusBarSectionsPtr; /// MDIWindow class type. - typedef SmartWin::WidgetMDIParent WidgetMDIParent; + typedef SmartWin::MDIParent MDIParent; /// MDIWindow object type. - typedef typename WidgetMDIParent::ObjectType WidgetMDIParentPtr; + typedef typename MDIParent::ObjectType MDIParentPtr; /// TabView class type. typedef SmartWin::WidgetTabView WidgetTabView; @@ -150,34 +149,34 @@ typedef typename WidgetTabView::ObjectType WidgetTabViewPtr; /// TabSheet class type. - typedef SmartWin::WidgetTabSheet WidgetTabSheet; + typedef SmartWin::TabSheet TabSheet; /// TabSheet object type. - typedef typename WidgetTabSheet::ObjectType WidgetTabSheetPtr; + typedef typename TabSheet::ObjectType TabSheetPtr; /// Slider class type. - typedef SmartWin::WidgetSlider WidgetSlider; + typedef SmartWin::Slider Slider; /// Slider object type. - typedef typename WidgetSlider::ObjectType WidgetSliderPtr; + typedef typename Slider::ObjectType SliderPtr; /// Spinner class type. - typedef SmartWin::WidgetSpinner WidgetSpinner; + typedef SmartWin::Spinner Spinner; /// Spinner object type. - typedef typename WidgetSpinner::ObjectType WidgetSpinnerPtr; + typedef typename Spinner::ObjectType SpinnerPtr; /// GroupBox class type. - typedef SmartWin::WidgetGroupBox WidgetGroupBox; + typedef SmartWin::GroupBox GroupBox; /// GroupBox object type. - typedef typename WidgetGroupBox::ObjectType WidgetGroupBoxPtr; + typedef typename GroupBox::ObjectType GroupBoxPtr; /// RadioButton class type. - typedef SmartWin::WidgetRadioButton WidgetRadioButton; + typedef SmartWin::RadioButton RadioButton; /// RadioButton object type. - typedef typename WidgetRadioButton::ObjectType WidgetRadioButtonPtr; + typedef typename RadioButton::ObjectType RadioButtonPtr; /// LoadFileDialog class type. typedef SmartWin::WidgetLoadFile WidgetLoadFile; @@ -189,28 +188,28 @@ typedef SmartWin::ColorDialog ColorDialog; /// ComboBox class type. - typedef SmartWin::WidgetComboBox WidgetComboBox; + typedef SmartWin::ComboBox ComboBox; /// ComboBox object type. - typedef typename WidgetComboBox::ObjectType WidgetComboBoxPtr; + typedef typename ComboBox::ObjectType ComboBoxPtr; /// Static class type. - typedef SmartWin::WidgetStatic WidgetStatic; + typedef SmartWin::Label Label; /// Static object type. - typedef typename WidgetStatic::ObjectType WidgetStaticPtr; + typedef typename Label::ObjectType LabelPtr; /// CheckBox class type. - typedef SmartWin::WidgetCheckBox WidgetCheckBox; + typedef SmartWin::CheckBox CheckBox; /// CheckBox object type. - typedef typename WidgetCheckBox::ObjectType WidgetCheckBoxPtr; + typedef typename CheckBox::ObjectType CheckBoxPtr; /// DateTimePicker class type. - typedef SmartWin::WidgetDateTimePicker WidgetDateTimePicker; + typedef SmartWin::DateTime DateTime; /// DateTimePicker object type. - typedef typename WidgetDateTimePicker::ObjectType WidgetDateTimePickerPtr; + typedef typename DateTime::ObjectType DateTimePtr; /// WidgetChildWindow class type. typedef SmartWin::WidgetChildWindow WidgetChildWindow; @@ -224,21 +223,21 @@ /// WidgetWindow object type. typedef typename WidgetWindow::ObjectType WidgetWindowPtr; - /// WidgetMDIFrame class type. - typedef SmartWin::WidgetMDIFrame WidgetMDIFrame; + /// MDIFrame class type. + typedef SmartWin::MDIFrame MDIFrame; /// WidgetWindow object type. - typedef typename WidgetMDIFrame::ObjectType WidgetMDIFramePtr; + typedef typename MDIFrame::ObjectType MDIFramePtr; /// ProgressBar class type. - typedef SmartWin::WidgetProgressBar WidgetProgressBar; + typedef SmartWin::ProgressBar ProgressBar; /// ProgressBar object type. - typedef typename WidgetProgressBar::ObjectType WidgetProgressBarPtr; + typedef typename ProgressBar::ObjectType ProgressBarPtr; - typedef SmartWin::WidgetToolTip WidgetToolTip; + typedef SmartWin::ToolTip ToolTip; - typedef typename WidgetToolTip::ObjectType WidgetToolTipPtr; + typedef typename ToolTip::ObjectType ToolTipPtr; /// Default Constructor creating a factory Widget /** Default Constructor creating a factory Widget without a parent, if you need @@ -271,12 +270,12 @@ /// Creates a Message Box and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a message box */ - WidgetMessageBox createMessageBox(); + MessageBox createMessageBox(); /// Creates a List View and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetListViewPtr createListView( const typename WidgetListView::Seed & cs = WidgetListView::Seed() ); + TablePtr createTable( const typename Table::Seed & cs = Table::Seed() ); /// \ingroup SubclassDialog /// Subclasses a Check Box from the given resource id. @@ -284,12 +283,12 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetListViewPtr attachList( unsigned id ); + TablePtr attachList( unsigned id ); /// Creates a Check Box and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetCheckBoxPtr createCheckBox( const typename WidgetCheckBox::Seed & cs = WidgetCheckBox::Seed() ); + CheckBoxPtr createCheckBox( const typename CheckBox::Seed & cs = CheckBox::Seed() ); /// \ingroup SubclassDialog /// Subclasses a Check Box from the given resource id. @@ -297,7 +296,7 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetCheckBoxPtr attachCheckBox( unsigned id ); + CheckBoxPtr attachCheckBox( unsigned id ); /// Creates a child window and returns a pointer to it. /** DON'T delete the returned pointer!!! @@ -307,7 +306,7 @@ /// Creates a Tree View and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetTreeViewPtr createTreeView( const typename WidgetTreeView::Seed & cs = WidgetTreeView::Seed() ); + TreePtr createTreeView( const typename Tree::Seed & cs = Tree::Seed() ); /// \ingroup SubclassDialog /// Subclasses a Tree View Control from the given resource id. @@ -315,12 +314,12 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetTreeViewPtr attachTreeView( unsigned id ); + TreePtr attachTreeView( unsigned id ); /// Creates a Edit Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetTextBoxPtr createTextBox( const typename WidgetTextBox::Seed & cs = WidgetTextBox::Seed() ); + TextBoxPtr createTextBox( const typename TextBox::Seed & cs = TextBox::Seed() ); /// \ingroup SubclassDialog /// Subclasses a Text Box Control from the given resource id. @@ -328,18 +327,18 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetTextBoxPtr attachTextBox( unsigned id ); + TextBoxPtr attachTextBox( unsigned id ); // TODO: Is there any point in attaching a status bar ? ! ? /// Creates a Status Bar and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetStatusBarPtr createStatusBar( const typename WidgetStatusBar::Seed & cs = WidgetStatusBar::Seed() ); + StatusBarPtr createStatusBar( const typename StatusBar::Seed & cs = StatusBar::Seed() ); /// Creates a Status Bar and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetStatusBarSectionsPtr createStatusBarSections( const typename WidgetStatusBarSections::Seed & cs = WidgetStatusBarSections::Seed() ); + StatusBarSectionsPtr createStatusBarSections( const typename StatusBarSections::Seed & cs = StatusBarSections::Seed() ); /// Creates a Button Control and returns a pointer to it. /** DON'T delete the returned pointer!!! @@ -349,7 +348,7 @@ /// Creates a Button Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetMDIParentPtr createMDIParent( const typename WidgetMDIParent::Seed & cs = WidgetMDIParent::Seed() ); + MDIParentPtr createMDIParent( const typename MDIParent::Seed & cs = MDIParent::Seed() ); /// Creates a Tab View and returns a pointer to it. /** DON'T delete the returned pointer!!! @@ -359,22 +358,22 @@ /// Creates a Tab Sheet and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetTabSheetPtr createTabSheet( const typename WidgetTabSheet::Seed & cs = WidgetTabSheet::Seed() ); + TabSheetPtr createTabSheet( const typename TabSheet::Seed & cs = TabSheet::Seed() ); /// Creates a Slider Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetSliderPtr createSlider( const typename WidgetSlider::Seed & cs = WidgetSlider::Seed() ); + SliderPtr createSlider( const typename Slider::Seed & cs = Slider::Seed() ); /// Creates a Spinner Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetSpinnerPtr createSpinner( const typename WidgetSpinner::Seed & cs = WidgetSpinner::Seed() ); + SpinnerPtr createSpinner( const typename Spinner::Seed & cs = Spinner::Seed() ); /// Creates a Progress Bar Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetProgressBarPtr createProgressBar( const typename WidgetProgressBar::Seed & cs = WidgetProgressBar::Seed() ); + ProgressBarPtr createProgressBar( const typename ProgressBar::Seed & cs = ProgressBar::Seed() ); /// \ingroup SubclassDialog /// Subclasses a Button Control from the given resource id. @@ -388,7 +387,7 @@ /** DON'T delete the returned pointer!!!< br > * Use e.g. the Dialog Designer to design a dialog and attach the controls with this function. */ - WidgetProgressBarPtr attachProgressBar( unsigned id ); + ProgressBarPtr attachProgressBar( unsigned id ); /// \ingroup SubclassDialog /// Subclasses a Slider Control from the given resource id. @@ -396,7 +395,7 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetSliderPtr attachSlider( unsigned id ); + SliderPtr attachSlider( unsigned id ); /// \ingroup SubclassDialog /// Subclasses a Spinner Control from the given resource id. @@ -404,42 +403,42 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetSpinnerPtr attachSpinner( unsigned id ); + SpinnerPtr attachSpinner( unsigned id ); /// Creates a Group Box Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetGroupBoxPtr createGroupBox( const typename WidgetGroupBox::Seed & cs = WidgetGroupBox::Seed() ); + GroupBoxPtr createGroupBox( const typename GroupBox::Seed & cs = GroupBox::Seed() ); /// Subclasses a Group Box Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetGroupBoxPtr attachGroupBox( unsigned id ); + GroupBoxPtr attachGroupBox( unsigned id ); /// Creates a DateTime Picker Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetDateTimePickerPtr createDateTimePicker( const typename WidgetDateTimePicker::Seed & cs = WidgetDateTimePicker::Seed() ); + DateTimePtr createDateTimePicker( const typename DateTime::Seed & cs = DateTime::Seed() ); /// Suvclasses a DateTime Picker Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetDateTimePickerPtr attachDateTimePicker( unsigned id ); + DateTimePtr attachDateTimePicker( unsigned id ); /// Creates a Radio Button Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetRadioButtonPtr createRadioButton( WidgetGroupBoxPtr parent, const typename WidgetRadioButton::Seed & cs = WidgetRadioButton::Seed() ); + RadioButtonPtr createRadioButton( GroupBoxPtr parent, const typename RadioButton::Seed & cs = RadioButton::Seed() ); /// Subclasses a Radio Button Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetRadioButtonPtr attachRadioButton( unsigned id ); + RadioButtonPtr attachRadioButton( unsigned id ); /// Creates a Comb Box and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetComboBoxPtr createComboBox( const typename WidgetComboBox::Seed & cs = WidgetComboBox::Seed() ); + ComboBoxPtr createComboBox( const typename ComboBox::Seed & cs = ComboBox::Seed() ); /// \ingroup SubclassDialog /// Subclasses a ComboBox Control from the given resource id. @@ -447,12 +446,12 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetComboBoxPtr attachComboBox( unsigned id ); + ComboBoxPtr attachComboBox( unsigned id ); /// Creates a Static Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetStaticPtr createStatic( const typename WidgetStatic::Seed & cs = WidgetStatic::Seed() ); + LabelPtr createStatic( const typename Label::Seed & cs = Label::Seed() ); /// \ingroup SubclassDialog /// Subclasses a Static Control from the given resource id. @@ -460,9 +459,9 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetStaticPtr attachStatic( unsigned id ); + LabelPtr attachStatic( unsigned id ); - WidgetToolTipPtr createToolTip( const typename WidgetToolTip::Seed & cs = WidgetToolTip::Seed() ); + ToolTipPtr createToolTip( const typename ToolTip::Seed & cs = ToolTip::Seed() ); protected: // Protected to try to avoid stack creation... virtual ~WidgetFactory() @@ -507,38 +506,38 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetMessageBox +typename WidgetFactory< ContainerWidgetType >::MessageBox WidgetFactory< ContainerWidgetType >::createMessageBox() { - return WidgetMessageBox( this ); + return MessageBox( this ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetListViewPtr -WidgetFactory< ContainerWidgetType >::createListView( const typename WidgetListView::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::TablePtr +WidgetFactory< ContainerWidgetType >::createTable( const typename Table::Seed & cs ) { - return WidgetCreator< WidgetListView >::create( this, cs ); + return WidgetCreator< Table >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetListViewPtr +typename WidgetFactory< ContainerWidgetType >::TablePtr WidgetFactory< ContainerWidgetType >::attachList( unsigned id ) { - return WidgetCreator< WidgetListView >::attach( this, id ); + return WidgetCreator< Table >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetCheckBoxPtr - WidgetFactory< ContainerWidgetType >::createCheckBox( const typename WidgetCheckBox::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::CheckBoxPtr + WidgetFactory< ContainerWidgetType >::createCheckBox( const typename CheckBox::Seed & cs ) { - return WidgetCreator< WidgetCheckBox >::create( this, cs ); + return WidgetCreator< CheckBox >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetCheckBoxPtr +typename WidgetFactory< ContainerWidgetType >::CheckBoxPtr WidgetFactory< ContainerWidgetType >::attachCheckBox( unsigned id ) { - return WidgetCreator< WidgetCheckBox >::attach( this, id ); + return WidgetCreator< CheckBox >::attach( this, id ); } template<typename ContainerWidgetType> @@ -549,45 +548,45 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetTreeViewPtr -WidgetFactory< ContainerWidgetType >::createTreeView( const typename WidgetTreeView::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::TreePtr +WidgetFactory< ContainerWidgetType >::createTreeView( const typename Tree::Seed & cs ) { - return WidgetCreator< WidgetTreeView >::create( this, cs ); + return WidgetCreator< Tree >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetTreeViewPtr +typename WidgetFactory< ContainerWidgetType >::TreePtr WidgetFactory< ContainerWidgetType >::attachTreeView( unsigned id ) { - return WidgetCreator< WidgetTreeView >::attach( this, id ); + return WidgetCreator< Tree >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetTextBoxPtr -WidgetFactory< ContainerWidgetType >::createTextBox( const typename WidgetTextBox::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::TextBoxPtr +WidgetFactory< ContainerWidgetType >::createTextBox( const typename TextBox::Seed & cs ) { - return WidgetCreator< WidgetTextBox >::create( this, cs ); + return WidgetCreator< TextBox >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetTextBoxPtr +typename WidgetFactory< ContainerWidgetType >::TextBoxPtr WidgetFactory< ContainerWidgetType >::attachTextBox( unsigned id ) { - return WidgetCreator< WidgetTextBox >::attach( this, id ); + return WidgetCreator< TextBox >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetStatusBarPtr -WidgetFactory< ContainerWidgetType >::createStatusBar( const typename WidgetStatusBar::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::StatusBarPtr +WidgetFactory< ContainerWidgetType >::createStatusBar( const typename StatusBar::Seed & cs ) { - return WidgetCreator< WidgetStatusBar >::create( this, cs ); + return WidgetCreator< StatusBar >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetStatusBarSectionsPtr -WidgetFactory< ContainerWidgetType >::createStatusBarSections( const typename WidgetStatusBarSections::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::StatusBarSectionsPtr +WidgetFactory< ContainerWidgetType >::createStatusBarSections( const typename StatusBarSections::Seed & cs ) { - return WidgetCreator< WidgetStatusBarSections >::create( this, cs ); + return WidgetCreator< StatusBarSections >::create( this, cs ); } template<typename ContainerWidgetType> @@ -598,10 +597,10 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetMDIParentPtr -WidgetFactory< ContainerWidgetType >::createMDIParent( const typename WidgetMDIParent::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::MDIParentPtr +WidgetFactory< ContainerWidgetType >::createMDIParent( const typename MDIParent::Seed & cs ) { - return WidgetCreator< WidgetMDIParent >::create( this, cs ); + return WidgetCreator< MDIParent >::create( this, cs ); } template<typename ContainerWidgetType> @@ -612,31 +611,31 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetTabSheetPtr -WidgetFactory< ContainerWidgetType >::createTabSheet( const typename WidgetTabSheet::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::TabSheetPtr +WidgetFactory< ContainerWidgetType >::createTabSheet( const typename TabSheet::Seed & cs ) { - return WidgetCreator< WidgetTabSheet >::create( this, cs ); + return WidgetCreator< TabSheet >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetSliderPtr -WidgetFactory< ContainerWidgetType >::createSlider( const typename WidgetSlider::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::SliderPtr +WidgetFactory< ContainerWidgetType >::createSlider( const typename Slider::Seed & cs ) { - return WidgetCreator< WidgetSlider >::create( this, cs ); + return WidgetCreator< Slider >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetSpinnerPtr -WidgetFactory< ContainerWidgetType >::createSpinner( const typename WidgetSpinner::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::SpinnerPtr +WidgetFactory< ContainerWidgetType >::createSpinner( const typename Spinner::Seed & cs ) { - return WidgetCreator< WidgetSpinner >::create( this, cs ); + return WidgetCreator< Spinner >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetProgressBarPtr -WidgetFactory< ContainerWidgetType >::createProgressBar( const typename WidgetProgressBar::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::ProgressBarPtr +WidgetFactory< ContainerWidgetType >::createProgressBar( const typename ProgressBar::Seed & cs ) { - return WidgetCreator< WidgetProgressBar >::create( this, cs ); + return WidgetCreator< ProgressBar >::create( this, cs ); } template<typename ContainerWidgetType> @@ -647,106 +646,106 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetProgressBarPtr +typename WidgetFactory< ContainerWidgetType >::ProgressBarPtr WidgetFactory< ContainerWidgetType >::attachProgressBar( unsigned id ) { - return WidgetCreator< WidgetProgressBar >::attach( this, id ); + return WidgetCreator< ProgressBar >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetSliderPtr +typename WidgetFactory< ContainerWidgetType >::SliderPtr WidgetFactory< ContainerWidgetType >::attachSlider( unsigned id ) { - return WidgetCreator< WidgetSlider >::attach( this, id ); + return WidgetCreator< Slider >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetSpinnerPtr +typename WidgetFactory< ContainerWidgetType >::SpinnerPtr WidgetFactory< ContainerWidgetType >::attachSpinner( unsigned id ) { - return WidgetCreator< WidgetSpinner >::attach( this, id ); + return WidgetCreator< Spinner >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetGroupBoxPtr -WidgetFactory< ContainerWidgetType >::createGroupBox( const typename WidgetGroupBox::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::GroupBoxPtr +WidgetFactory< ContainerWidgetType >::createGroupBox( const typename GroupBox::Seed & cs ) { - return WidgetCreator< WidgetGroupBox >::create( this, cs ); + return WidgetCreator< GroupBox >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetGroupBoxPtr +typename WidgetFactory< ContainerWidgetType >::GroupBoxPtr WidgetFactory< ContainerWidgetType >::attachGroupBox( unsigned id ) { - return WidgetCreator< WidgetGroupBox >::attach( this, id ); + return WidgetCreator< GroupBox >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetDateTimePickerPtr -WidgetFactory< ContainerWidgetType >::createDateTimePicker( const typename WidgetDateTimePicker::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::DateTimePtr +WidgetFactory< ContainerWidgetType >::createDateTimePicker( const typename DateTime::Seed & cs ) { - return WidgetCreator< WidgetDateTimePicker >::create( this, cs ); + return WidgetCreator< DateTime >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetDateTimePickerPtr +typename WidgetFactory< ContainerWidgetType >::DateTimePtr WidgetFactory< ContainerWidgetType >::attachDateTimePicker( unsigned id ) { - return WidgetCreator< WidgetDateTimePicker >::attach( this, id ); + return WidgetCreator< DateTime >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetRadioButtonPtr -WidgetFactory< ContainerWidgetType >::createRadioButton( WidgetGroupBoxPtr parent, const typename WidgetRadioButton::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::RadioButtonPtr +WidgetFactory< ContainerWidgetType >::createRadioButton( GroupBoxPtr parent, const typename RadioButton::Seed & cs ) { #ifdef PORT_ME - WidgetRadioButtonPtr retVal = WidgetCreator< WidgetRadioButton >::create( parent, internal_::getTypedParentOrThrow < EventHandlerClass * >( this ), cs ); + RadioButtonPtr retVal = WidgetCreator< RadioButton >::create( parent, internal_::getTypedParentOrThrow < EventHandlerClass * >( this ), cs ); parent->addChild( retVal ); return retVal; #endif } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetRadioButtonPtr +typename WidgetFactory< ContainerWidgetType >::RadioButtonPtr WidgetFactory< ContainerWidgetType >::attachRadioButton( unsigned id ) { - WidgetRadioButtonPtr retVal = WidgetCreator< WidgetRadioButton >::attach( this, id ); + RadioButtonPtr retVal = WidgetCreator< RadioButton >::attach( this, id ); return retVal; } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetComboBoxPtr -WidgetFactory< ContainerWidgetType >::createComboBox( const typename WidgetComboBox::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::ComboBoxPtr +WidgetFactory< ContainerWidgetType >::createComboBox( const typename ComboBox::Seed & cs ) { - return WidgetCreator< WidgetComboBox >::create( this, cs ); + return WidgetCreator< ComboBox >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetComboBoxPtr +typename WidgetFactory< ContainerWidgetType >::ComboBoxPtr WidgetFactory< ContainerWidgetType >::attachComboBox( unsigned id ) { - return WidgetCreator< WidgetComboBox >::attach( this, id ); + return WidgetCreator< ComboBox >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetStaticPtr -WidgetFactory< ContainerWidgetType >::createStatic( const typename WidgetStatic::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::LabelPtr +WidgetFactory< ContainerWidgetType >::createStatic( const typename Label::Seed & cs ) { - return WidgetCreator< WidgetStatic >::create( this, cs ); + return WidgetCreator< Label >::create( this, cs ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetStaticPtr +typename WidgetFactory< ContainerWidgetType >::LabelPtr WidgetFactory< ContainerWidgetType >::attachStatic( unsigned id ) { - return WidgetCreator< WidgetStatic >::attach( this, id ); + return WidgetCreator< Label >::attach( this, id ); } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetToolTipPtr -WidgetFactory< ContainerWidgetType >::createToolTip( const typename WidgetToolTip::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::ToolTipPtr +WidgetFactory< ContainerWidgetType >::createToolTip( const typename ToolTip::Seed & cs ) { - return WidgetCreator< WidgetToolTip >::create( this, cs ); + return WidgetCreator< ToolTip >::create( this, cs ); } // end namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -30,11 +30,11 @@ #define WidgetFactoryPlatformSmartWinDesktop_h #include "WidgetFactoryPlatformCommon.h" -#include "widgets/WidgetRichTextBox.h" +#include "widgets/RichTextBox.h" #include "widgets/FontDialog.h" #include "widgets/WidgetMenu.h" -#include "widgets/WidgetToolbar.h" -#include "widgets/WidgetCoolbar.h" +#include "widgets/ToolBar.h" +#include "widgets/CoolBar.h" #include "WidgetCreator.h" namespace SmartWin @@ -51,10 +51,10 @@ { public: /// RichEditBox class type. - typedef SmartWin::WidgetRichTextBox WidgetRichTextBox; + typedef SmartWin::RichTextBox RichTextBox; /// RichEditBox object type. - typedef typename WidgetRichTextBox::ObjectType WidgetRichTextBoxPtr; + typedef typename RichTextBox::ObjectType RichTextBoxPtr; /// Menu class type. typedef SmartWin::WidgetMenu WidgetMenu; @@ -66,16 +66,16 @@ typedef SmartWin::FontDialog FontDialog; /// Toolbar class type. - typedef SmartWin::WidgetToolbar WidgetToolbar; + typedef SmartWin::ToolBar ToolBar; /// Toolbar object type. - typedef typename WidgetToolbar::ObjectType WidgetToolbarPtr; + typedef typename ToolBar::ObjectType ToolBarPtr; /// Coolbar class type. - typedef SmartWin::WidgetCoolbar WidgetCoolbar; + typedef SmartWin::CoolBar CoolBar; /// Coolbar object type. - typedef typename WidgetCoolbar::ObjectType WidgetCoolbarPtr; + typedef typename CoolBar::ObjectType CoolBarPtr; /// Constructor taking a pointer to it's parent. /** If you for instance create a WidgetChildWindow then use this Constructor @@ -95,9 +95,9 @@ /// Creates a Rich Edit Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetRichTextBoxPtr createRichTextBox( const typename WidgetRichTextBox::Seed & cs = WidgetRichTextBox::Seed() ) + RichTextBoxPtr createRichTextBox( const typename RichTextBox::Seed & cs = RichTextBox::Seed() ) { - return WidgetCreator< WidgetRichTextBox >::create( this, cs ); + return WidgetCreator< RichTextBox >::create( this, cs ); } /// \ingroup SubclassDialog @@ -106,9 +106,9 @@ * Use e.g. the Dialog Designer to design a dialog and attach the controls * with this function. */ - WidgetRichTextBoxPtr attachRichTextBox( unsigned id ) + RichTextBoxPtr attachRichTextBox( unsigned id ) { - return WidgetCreator< WidgetRichTextBox >::attach( this, id ); + return WidgetCreator< RichTextBox >::attach( this, id ); } /// Creates a Menu @@ -129,17 +129,17 @@ /// Creates a Tool Bar and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetToolbarPtr createToolbar( const typename WidgetToolbar::Seed & cs = WidgetToolbar::Seed() ) + ToolBarPtr createToolbar( const typename ToolBar::Seed & cs = ToolBar::Seed() ) { - return WidgetCreator< WidgetToolbar >::create( this, cs ); + return WidgetCreator< ToolBar >::create( this, cs ); } /// Creates a Cool Bar and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetCoolbarPtr createCoolbar( const typename WidgetCoolbar::Seed & cs = WidgetCoolbar::Seed() ) + CoolBarPtr createCoolbar( const typename CoolBar::Seed & cs = CoolBar::Seed() ) { - return WidgetCreator< WidgetCoolbar >::create( this, cs ); + return WidgetCreator< CoolBar >::create( this, cs ); } }; Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBorder.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBorder.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBorder.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -34,7 +34,7 @@ /// Aspect class used by Widgets that have borders which can have multiple styles. /** \ingroup AspectClasses - * E.g. the WidgetListView have a "border" Aspect therefore it realizes the AspectBorder + * E.g. the Table have a "border" Aspect therefore it realizes the AspectBorder * through inheritance. */ template< class WidgetType > Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -38,7 +38,7 @@ /// Aspect class used by Widgets that have the possibility of handling the /// erase background property /** \ingroup AspectClasses - * E.g. the WidgetWindow has a background Aspect to it, therefore WidgetListView + * E.g. the WidgetWindow has a background Aspect to it, therefore Table * realizes the AspectEnabled through inheritance. */ template<class WidgetType> Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDblClickable.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDblClickable.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDblClickable.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -37,7 +37,7 @@ /// \ingroup AspectClasses /// Aspect class used by Widgets that have the possibility of being "Double /// Clicked". -/** E.g. the WidgetStatic have a "Double Clicked" Aspect therefore it realizes the +/** E.g. the Label have a "Double Clicked" Aspect therefore it realizes the * AspectDblClickable through inheritance. */ template< class WidgetType > Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -37,7 +37,7 @@ /// Aspect class used by Widgets that have the possibility of changing the enabled /// property /** \ingroup AspectClasses - * The WidgetListView has an enabled Aspect to it; therefore it realizes this + * The Table has an enabled Aspect to it; therefore it realizes this * AspectEnabled through inheritance. <br> * When a Widget is enabled it is possible to interact with it in some way, e.g. a * button can be pushed, a ComboBox can change value etc. When the Widget is not Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h 2008-03-29 07:48:13 UTC (rev 1082) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h 2008-03-29 08:09:17 UTC (rev 1083) @@ -38,7 +38,7 @@ /// background property /** \ingroup AspectClasses * E.g. the WidgetWindow have a AspectEraseBackground Aspect to it therefore - * WidgetListView realize the AspectEraseBackground through inheritance. When the + * Table realize the AspectEraseBackground through inheritance. When the * Widget needs to erase its background this event will be called with a Canvas * object which can be used for manipulating the colors etc the s... [truncated message content] |
From: <arn...@us...> - 2008-03-29 07:48:27
|
Revision: 1082 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1082&view=rev Author: arnetheduck Date: 2008-03-29 00:48:13 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Fix fontdialog Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h dcplusplus/trunk/win32/Appearance2Page.cpp Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h dcplusplus/trunk/smartwin/source/widgets/FontDialog.cpp Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-28 09:59:25.875999928 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-28 21:05:12.553999901 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - + smartwin/include/smartwin/widgets/FontDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetChooseFont.h smartwin/source/widgets/FontDialog.cpp fontdialog.cpp-20080328195932-jj456z98hdfqyes8-1 Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-03-29 07:47:37 UTC (rev 1081) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-03-29 07:48:13 UTC (rev 1082) @@ -31,7 +31,7 @@ #include "WidgetFactoryPlatformCommon.h" #include "widgets/WidgetRichTextBox.h" -#include "widgets/WidgetChooseFont.h" +#include "widgets/FontDialog.h" #include "widgets/WidgetMenu.h" #include "widgets/WidgetToolbar.h" #include "widgets/WidgetCoolbar.h" @@ -63,7 +63,7 @@ typedef typename WidgetMenu::ObjectType WidgetMenuPtr; /// ChooseFont class and object type. - typedef SmartWin::WidgetChooseFont WidgetChooseFont; + typedef SmartWin::FontDialog FontDialog; /// Toolbar class type. typedef SmartWin::WidgetToolbar WidgetToolbar; @@ -85,13 +85,11 @@ : ContainerWidgetType( parent ) {} - /// Creates a WidgetChooseFont and returns it. + /// Creates a FontDialog and returns it. /** Usable to let user choose font from the system installed fonts. */ - WidgetChooseFont createChooseFont() - { - WidgetChooseFont retVal( this ); - return retVal; + FontDialog createFontDialog() { + return FontDialog( this ); } /// Creates a Rich Edit Control and returns a pointer to it. Copied: dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h (from rev 1081, dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h 2008-03-29 07:48:13 UTC (rev 1082) @@ -0,0 +1,87 @@ +/* + Copyright ( c ) 2005, Thomas Hansen + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met : + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the SmartWin++ nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef WINCE +#ifndef FontDialog_h +#define FontDialog_h + +#include "../Widget.h" + +namespace SmartWin +{ +// begin namespace SmartWin + +/// ChooseFontDialog class +/** \ingroup WidgetControls + * \image html choosefont.PNG + * Class for showing a common ChooseFontDialog box. <br> + * Either derive from it or call WidgetFactory::createChooseFont. <br> + * Note! <br> + * 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 + * an HWND on the template parameter class. <br> + * the complete signature of the function will then be "HWND parent()" + */ +class FontDialog +{ +public: + /// Class type + typedef FontDialog ThisType; + + /// Object type + /** Note, not a pointer!!!! + */ + typedef ThisType ObjectType; + + /// Shows the dialog + bool open(DWORD dwFlags, LOGFONT& font, DWORD& rgbColors); + + /// Constructor Taking pointer to parent + explicit FontDialog( Widget* parent = 0 ); + + ~FontDialog() { } + +private: + Widget* itsParent; + + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } +}; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Implementation of class +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +inline FontDialog::FontDialog( Widget * parent ) + : itsParent( parent ) +{ +} + +// end namespace SmartWin +} + +#endif +#endif //! WINCE Deleted: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h 2008-03-29 07:47:37 UTC (rev 1081) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h 2008-03-29 07:48:13 UTC (rev 1082) @@ -1,107 +0,0 @@ -/* - Copyright ( c ) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met : - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef WINCE -#ifndef WidgetChooseFont_h -#define WidgetChooseFont_h - -#include "../Widget.h" -#include "../resources/Font.h" - -namespace SmartWin -{ -// begin namespace SmartWin - -/// ChooseFontDialog class -/** \ingroup WidgetControls - * \image html choosefont.PNG - * Class for showing a common ChooseFontDialog box. <br> - * Either derive from it or call WidgetFactory::createChooseFont. <br> - * Note! <br> - * 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 - * an HWND on the template parameter class. <br> - * the complete signature of the function will then be "HWND parent()" - */ -class WidgetChooseFont -{ -public: - /// Class type - typedef WidgetChooseFont ThisType; - - /// Object type - /** Note, not a pointer!!!! - */ - typedef ThisType ObjectType; - - /// Shows the dialog - bool showDialog(DWORD dwFlags, LPLOGFONT lplf, DWORD& rgbColors); - - /// Constructor Taking pointer to parent - explicit WidgetChooseFont( Widget* parent = 0 ); - - virtual ~WidgetChooseFont() - {} - -private: - Widget* itsParent; - - HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Implementation of class -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline bool WidgetChooseFont::showDialog(DWORD dwFlags, LPLOGFONT lplf, DWORD& rgbColors) -{ - CHOOSEFONT cf = { sizeof(CHOOSEFONT) }; - - // Initialize CHOOSEFONT - cf.hwndOwner = getParentHandle(); - cf.Flags = dwFlags | CF_INITTOLOGFONTSTRUCT; - cf.lpLogFont = lplf; - cf.rgbColors = rgbColors; - - if ( ::ChooseFont( & cf ) ) - { - lplf = cf.lpLogFont; - rgbColors = cf.rgbColors; - return true; - } - return false; -} - -inline WidgetChooseFont::WidgetChooseFont( Widget * parent ) - : itsParent( parent ) -{ -} - -// end namespace SmartWin -} - -#endif -#endif //! WINCE Added: dcplusplus/trunk/smartwin/source/widgets/FontDialog.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/FontDialog.cpp (rev 0) +++ dcplusplus/trunk/smartwin/source/widgets/FontDialog.cpp 2008-03-29 07:48:13 UTC (rev 1082) @@ -0,0 +1,23 @@ +#include "../../include/smartwin/widgets/FontDialog.h" + +namespace SmartWin { + +bool FontDialog::open(DWORD dwFlags, LOGFONT& font, DWORD& rgbColors) +{ + CHOOSEFONT cf = { sizeof(CHOOSEFONT) }; + + // Initialize CHOOSEFONT + cf.hwndOwner = getParentHandle(); + cf.Flags = dwFlags | CF_INITTOLOGFONTSTRUCT; + cf.lpLogFont = &font; + cf.rgbColors = rgbColors; + + if ( ::ChooseFont( & cf ) ) + { + rgbColors = cf.rgbColors; + return true; + } + return false; +} + +} Modified: dcplusplus/trunk/win32/Appearance2Page.cpp =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 07:47:37 UTC (rev 1081) +++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 07:48:13 UTC (rev 1082) @@ -127,7 +127,7 @@ void Appearance2Page::handleTextClicked() { LOGFONT logFont_ = logFont; DWORD fg_ = fg; - if(createChooseFont().showDialog(CF_EFFECTS | CF_SCREENFONTS, &logFont_, fg_)) { + if(createFontDialog().open(CF_EFFECTS | CF_SCREENFONTS, logFont_, fg_)) { logFont = logFont_; fg = fg_; font = SmartWin::FontPtr(new SmartWin::Font(::CreateFontIndirect(&logFont), true)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 07:47:38
|
Revision: 1081 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1081&view=rev Author: arnetheduck Date: 2008-03-29 00:47:37 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Small colordialog fixes Modified Paths: -------------- dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-28 00:14:59.124000072 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-28 09:59:25.875999928 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/widgets/ColorDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetChooseColor.h smartwin/source/widgets/ColorDialog.cpp colordialog.cpp-20080327231315-98woy23i6ubb6jui-4 + Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 Modified: dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp 2008-03-29 07:22:00 UTC (rev 1080) +++ dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp 2008-03-29 07:47:37 UTC (rev 1081) @@ -3,10 +3,8 @@ namespace SmartWin { bool ColorDialog::open( ColorParams & colorParams, bool basic, bool allowFullOpen ) { - CHOOSECOLOR cc; - cc.lStructSize = ( DWORD ) sizeof( CHOOSECOLOR ); + CHOOSECOLOR cc = { sizeof( CHOOSECOLOR ) }; cc.hwndOwner = getParentHandle(); - cc.hInstance = NULL; cc.rgbResult = colorParams.itsColor; cc.lpCustColors = itsColorParams.itsCustomColors; cc.Flags = CC_ANYCOLOR | CC_RGBINIT; @@ -14,11 +12,8 @@ cc.Flags |= CC_FULLOPEN; if ( !allowFullOpen ) cc.Flags |= CC_PREVENTFULLOPEN; - cc.lCustData = NULL; - cc.lpfnHook = NULL; - cc.lpTemplateName = NULL; - if(::ChooseColor( & cc ) == TRUE) { + if(::ChooseColor( & cc )) { colorParams.itsColor = cc.rgbResult; return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 07:22:02
|
Revision: 1080 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1080&view=rev Author: arnetheduck Date: 2008-03-29 00:22:00 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Clean up color dialog some Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h dcplusplus/trunk/win32/Appearance2Page.cpp Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/FreeCommonDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-27 22:58:31.127000093 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-28 00:14:59.124000072 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/widgets/FolderDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetChooseFolder.h smartwin/source/widgets/FolderDialog.cpp folderdialog.cpp-20080327215752-664xme4q5cf4ka0s-1 + smartwin/include/smartwin/widgets/ColorDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetChooseColor.h smartwin/source/widgets/ColorDialog.cpp colordialog.cpp-20080327231315-98woy23i6ubb6jui-4 Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf Deleted: dcplusplus/trunk/smartwin/include/smartwin/FreeCommonDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/FreeCommonDialog.h 2008-03-29 07:16:04 UTC (rev 1079) +++ dcplusplus/trunk/smartwin/include/smartwin/FreeCommonDialog.h 2008-03-29 07:22:00 UTC (rev 1080) @@ -1,62 +0,0 @@ -/* - Copyright (c) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef FreeCommonDialog_h -#define FreeCommonDialog_h - -#include "WindowsHeaders.h" - -namespace SmartWin -{ -// begin namespace SmartWin - -/// Helper class for instantiating "free" common dialogs -/** If you need for instance a WidgetChooseColor with no particular parent then use - * this class as the Parent argument... Related classes: - * <ul> - * <li>WidgetChooseColor</li> - * <li>WidgetChooseFont</li> - * <li>WidgetLoadFile</li> - * <li>WidgetSaveFile</li> - * <li>WidgetMessageBox</li> - * </ul> - */ -class FreeCommonDialog -{ - FreeCommonDialog(); // To ensure we never instantiate it! -public: - /// Helper contract function needed by the Common Dialogs which can use this as - /// Parent - HWND handle() - { return 0; - } // Contract to dialog -}; - -// end namespace SmartWin -} - -#endif Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 07:16:04 UTC (rev 1079) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 07:22:00 UTC (rev 1080) @@ -32,7 +32,7 @@ #include "widgets/Button.h" #include "widgets/FolderDialog.h" #include "widgets/WidgetCheckBox.h" -#include "widgets/WidgetChooseColor.h" +#include "widgets/ColorDialog.h" #include "widgets/WidgetComboBox.h" #include "widgets/WidgetListView.h" #include "widgets/WidgetDateTimePicker.h" @@ -185,8 +185,8 @@ /// SaveFileDialog class and object type. typedef SmartWin::WidgetSaveFile WidgetSaveFile; - /// WidgetChooseColor class and object type. - typedef SmartWin::WidgetChooseColor WidgetChooseColor; + /// ColorDialog class and object type. + typedef SmartWin::ColorDialog ColorDialog; /// ComboBox class type. typedef SmartWin::WidgetComboBox WidgetComboBox; @@ -262,10 +262,10 @@ */ WidgetSaveFile createSaveFile(); - /// Creates a WidgetChooseColor and returns it. + /// Creates a ColorDialog and returns it. /** Usable to let user choose font from the system installed fonts. */ - WidgetChooseColor createChooseColor(); + ColorDialog createColorDialog(); // TODO: Update, this isn't an automated collected Widget anymore... /// Creates a Message Box and returns a pointer to it. @@ -500,10 +500,10 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetChooseColor -WidgetFactory< ContainerWidgetType >::createChooseColor() +typename WidgetFactory< ContainerWidgetType >::ColorDialog +WidgetFactory< ContainerWidgetType >::createColorDialog() { - return WidgetChooseColor( this ); + return ColorDialog( this ); } template<typename ContainerWidgetType> Copied: dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h (from rev 1079, dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h 2008-03-29 07:22:00 UTC (rev 1080) @@ -0,0 +1,140 @@ +/* + Copyright ( c ) 2005, Thomas Hansen + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met : + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the SmartWin++ nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef ColorDialog_h +#define ColorDialog_h + +#include "../Widget.h" + +namespace SmartWin +{ +// begin namespace SmartWin + +/// ChooseColorDialog class +/** \ingroup WidgetControls + * \image html choosecolor.png + * Class for showing a common ChooseColorDialog box. <br> + * Either derive from it or call WidgetFactory::createColorDialog. <br> + * Note! <br> + * If you wish to use this class with EventHandlerClass classes other than those from + * SmartWin you need to expose a public function called "parent" taking no arguments + * returning an HWND. <br> + * the complete signature of the function will then be "HWND parent()" <br> + * This is one of few Widgets in SmartWin++ which can be used without linking in the + * actual library! + */ +class ColorDialog +{ +public: + /// Class type + typedef ColorDialog ThisType; + + /// Object type + /** Note, not a pointer!!!! + */ + typedef ThisType ObjectType; + + /// Helper class for ColorDialog + /** Is used as the parameter to the ColorDialog to set the custom colors + * and to set the initially default color + */ + class ColorParams + { + friend class ColorDialog; + COLORREF itsColor; + COLORREF itsCustomColors[16]; + + public: + /// Default constructor + /** Initializes custom colors to "usable colors" and default color to yellow. + */ + ColorParams(); + + /// Overloaded constructor taking only default color + /** Initializes custom colors to "usable colors" and default color to the + * given color. + */ + ColorParams( COLORREF defaultColor ); + + /// Overloaded constructor taking default color and custom color + /** Initializes custom colors and default color to whatever is passed in + */ + ColorParams( COLORREF defaultColor, COLORREF customColors[16] ); + + /// Returns the currently selected color + COLORREF getColor() const; + }; + + /// Shows the Choose Color Dialog + /** Returns a ColorParams object, if user presses Ok the userPressedOk will be + * true, else if user pressed Cancel the userPressedOk obviously will be false. + * <br> + * This dialog "remembers" its state from call to call. If you manipulate the + * Custom Colors, the next time it displays, it will have the same Custom + * Colors. <br> + * Note! <br> + * This is true even across DIFFERENT instances of the dialog!! <br> + * If basic is true dialog will be showed with only basic functionality, if + * allowFullOpen is true dialog will allow the user to show "more info". + */ + bool open( ColorParams& params, bool basic = true, bool allowFullOpen = true ); + + /// Expicit constructor taking pointer to parent + explicit ColorDialog( Widget * parent = 0 ); + + ~ColorDialog() { } + +private: + ColorParams itsColorParams; + Widget* itsParent; + + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } +}; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Implementation of class +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +inline COLORREF ColorDialog::ColorParams::getColor() const +{ + return itsColor; +} + +inline ColorDialog::ColorParams::ColorParams( COLORREF defaultColor, COLORREF customColors[16] ) + : itsColor( defaultColor ) +{ + memcpy(itsCustomColors, customColors, sizeof(itsCustomColors)); +} + +inline ColorDialog::ColorDialog( Widget * parent ) + : itsParent( parent ) +{ +} + +// end namespace SmartWin +} + +#endif Deleted: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h 2008-03-29 07:16:04 UTC (rev 1079) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h 2008-03-29 07:22:00 UTC (rev 1080) @@ -1,263 +0,0 @@ -/* - Copyright ( c ) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met : - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef WidgetChooseColor_h -#define WidgetChooseColor_h - -#include "../Widget.h" - -namespace SmartWin -{ -// begin namespace SmartWin - -/// ChooseColorDialog class -/** \ingroup WidgetControls - * \image html choosecolor.png - * Class for showing a common ChooseColorDialog box. <br> - * Either derive from it or call WidgetFactory::createChooseColor. <br> - * Note! <br> - * If you wish to use this class with EventHandlerClass classes other than those from - * SmartWin you need to expose a public function called "parent" taking no arguments - * returning an HWND. <br> - * the complete signature of the function will then be "HWND parent()" <br> - * This is one of few Widgets in SmartWin++ which can be used without linking in the - * actual library! - */ -class WidgetChooseColor -{ -public: - /// Class type - typedef WidgetChooseColor ThisType; - - /// Object type - /** Note, not a pointer!!!! - */ - typedef ThisType ObjectType; - - /// Helper class for WidgetChooseColor - /** Is used as the parameter to the WidgetChooseColor to set the custom colors - * and to set the initially default color - */ - class ColorParams - { - friend class WidgetChooseColor; - COLORREF itsColor; - COLORREF itsCustomColors[16]; - bool itsUserPressedOk; - - public: - /// Default constructor - /** Initializes custom colors to "usable colors" and default color to yellow. - */ - ColorParams(); - - /// Overloaded constructor taking only default color - /** Initializes custom colors to "usable colors" and default color to the - * given color. - */ - ColorParams( COLORREF defaultColor ); - - /// Overloaded constructor taking default color and custom color - /** Initializes custom colors and default color to whatever is passed in - */ - ColorParams( COLORREF defaultColor, COLORREF customColors[16] ); - - /// Returns the currently selected color - COLORREF getColor() const; - - /// True if user pressed Ok in dialog - /** Use this one to determine if the user action was "OK". If user pressed - * cancel in the dialog this function will return false! - */ - bool userPressedOk() const; - }; - - /// Shows the Choose Color Dialog - /** Returns a ColorParams object, if user presses Ok the userPressedOk will be - * true, else if user pressed Cancel the userPressedOk obviously will be false. - * <br> - * This dialog "remembers" its state from call to call. If you manipulate the - * Custom Colors, the next time it displays, it will have the same Custom - * Colors. <br> - * Note! <br> - * This is true even across DIFFERENT instances of the dialog!! <br> - * If basic is true dialog will be showed with only basic functionality, if - * allowFullOpen is true dialog will allow the user to show "more info". - */ - ColorParams showDialog( bool basic = true, bool allowFullOpen = true ); - - /// Shows the Choose Color Dialog - /** Returns a ColorParams object, if user presses Ok the userPressedOk will be - * true, else if user pressed Cancel the userPressedOk obviously will be false. - * <br> - * Note! <br> - * This function "resets" the remembered state of the dialog meaning if you've - * manipulated the "remembered" state the colorParams object will be the next - * state if you press ok! <br> - * If you press Cancel the "old" state ( either default one or from a previous - * call to this or sibling function will become it's "current state" ) <br> - * If basic is true dialog will be showed with only basic functionality, if - * allowFullOpen is true dialog will allow the user to show "more info". - */ - ColorParams showDialog( const ColorParams & colorParams, bool basic = true, bool allowFullOpen = true ); - - /// Expicit constructor taking pointer to parent - explicit WidgetChooseColor( Widget * parent = 0 ); - - virtual ~WidgetChooseColor() - {} - -private: - ColorParams itsColorParams; - Widget* itsParent; - - HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Implementation of class -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline -WidgetChooseColor::ColorParams::ColorParams() - : itsColor( 0x0000FFFF ) - , itsUserPressedOk( false ) -{ - itsCustomColors[0] = 0x00000000; - itsCustomColors[1] = 0x33333333; - itsCustomColors[2] = 0x66666666; - itsCustomColors[3] = 0x99999999; - itsCustomColors[4] = 0xCCCCCCCC; - itsCustomColors[5] = 0xFFFFFFFF; - itsCustomColors[6] = 0x0000FFFF; - itsCustomColors[7] = 0x000000FF; - itsCustomColors[8] = 0x0000FF00; - itsCustomColors[9] = 0x00FF0000; - itsCustomColors[10] = 0x00FFFF00; - itsCustomColors[11] = 0x00FF00FF; - itsCustomColors[12] = 0x002244BB; - itsCustomColors[13] = 0x0000CC99; - itsCustomColors[14] = 0x00AA7700; - itsCustomColors[15] = 0x00997755; -} - -inline WidgetChooseColor::ColorParams::ColorParams( COLORREF defaultColor ) - : itsColor( defaultColor ) - , itsUserPressedOk( false ) -{ - itsCustomColors[0] = 0x00000000; - itsCustomColors[1] = 0x33333333; - itsCustomColors[2] = 0x66666666; - itsCustomColors[3] = 0x99999999; - itsCustomColors[4] = 0xCCCCCCCC; - itsCustomColors[5] = 0xFFFFFFFF; - itsCustomColors[6] = 0x0000FFFF; - itsCustomColors[7] = 0x000000FF; - itsCustomColors[8] = 0x0000FF00; - itsCustomColors[9] = 0x00FF0000; - itsCustomColors[10] = 0x00FFFF00; - itsCustomColors[11] = 0x00FF00FF; - itsCustomColors[12] = 0x002244BB; - itsCustomColors[13] = 0x0000CC99; - itsCustomColors[14] = 0x00AA7700; - itsCustomColors[15] = 0x00997755; -} - -inline COLORREF WidgetChooseColor::ColorParams::getColor() const -{ - return itsColor; -} - -inline WidgetChooseColor::ColorParams::ColorParams( COLORREF defaultColor, COLORREF customColors[16] ) - : itsColor( defaultColor ) - , itsUserPressedOk( false ) -{ - memcpy(itsCustomColors, customColors, sizeof(itsCustomColors)); -} - -inline bool WidgetChooseColor::ColorParams::userPressedOk() const -{ - return itsUserPressedOk; -} - -inline WidgetChooseColor::ColorParams WidgetChooseColor::showDialog( bool basic, bool allowFullOpen ) -{ - CHOOSECOLOR cc; - cc.lStructSize = ( DWORD ) sizeof( CHOOSECOLOR ); - cc.hwndOwner = getParentHandle(); - cc.hInstance = NULL; - cc.rgbResult = itsColorParams.itsColor; - cc.lpCustColors = itsColorParams.itsCustomColors; - cc.Flags = CC_ANYCOLOR | CC_RGBINIT; - if ( !basic ) - cc.Flags |= CC_FULLOPEN; - if ( !allowFullOpen ) - cc.Flags |= CC_PREVENTFULLOPEN; - cc.lCustData = 0; - cc.lpfnHook = 0; - cc.lpTemplateName = NULL; - - itsColorParams.itsUserPressedOk = ::ChooseColor( & cc ) == TRUE; - if ( itsColorParams.itsUserPressedOk ) - { - itsColorParams.itsColor = cc.rgbResult; - } - return itsColorParams; -} - -inline WidgetChooseColor::ColorParams WidgetChooseColor::showDialog( const ColorParams & colorParams, bool basic, bool allowFullOpen ){ - CHOOSECOLOR cc; - cc.lStructSize = ( DWORD ) sizeof( CHOOSECOLOR ); - cc.hwndOwner = getParentHandle(); - cc.hInstance = NULL; - cc.rgbResult = colorParams.itsColor; - cc.lpCustColors = itsColorParams.itsCustomColors; - cc.Flags = CC_ANYCOLOR | CC_RGBINIT; - if ( !basic ) - cc.Flags |= CC_FULLOPEN; - if ( !allowFullOpen ) - cc.Flags |= CC_PREVENTFULLOPEN; - cc.lCustData = NULL; - cc.lpfnHook = NULL; - cc.lpTemplateName = NULL; - - itsColorParams.itsUserPressedOk = ::ChooseColor( & cc ) == TRUE; - if ( itsColorParams.itsUserPressedOk ) - { - itsColorParams.itsColor = cc.rgbResult; - } - return itsColorParams; -} - -inline WidgetChooseColor::WidgetChooseColor( Widget * parent ) - : itsParent( parent ) -{ -} - -// end namespace SmartWin -} - -#endif Added: dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp (rev 0) +++ dcplusplus/trunk/smartwin/source/widgets/ColorDialog.cpp 2008-03-29 07:22:00 UTC (rev 1080) @@ -0,0 +1,47 @@ +#include "../../include/smartwin/widgets/ColorDialog.h" + +namespace SmartWin { + +bool ColorDialog::open( ColorParams & colorParams, bool basic, bool allowFullOpen ) { + CHOOSECOLOR cc; + cc.lStructSize = ( DWORD ) sizeof( CHOOSECOLOR ); + cc.hwndOwner = getParentHandle(); + cc.hInstance = NULL; + cc.rgbResult = colorParams.itsColor; + cc.lpCustColors = itsColorParams.itsCustomColors; + cc.Flags = CC_ANYCOLOR | CC_RGBINIT; + if ( !basic ) + cc.Flags |= CC_FULLOPEN; + if ( !allowFullOpen ) + cc.Flags |= CC_PREVENTFULLOPEN; + cc.lCustData = NULL; + cc.lpfnHook = NULL; + cc.lpTemplateName = NULL; + + if(::ChooseColor( & cc ) == TRUE) { + colorParams.itsColor = cc.rgbResult; + return true; + } + return false; +} + +COLORREF defaultColors[16] = { + 0x00000000, 0x33333333, 0x66666666, 0x99999999, + 0xCCCCCCCC, 0xFFFFFFFF, 0x0000FFFF, 0x000000FF, + 0x0000FF00, 0x00FF0000, 0x00FFFF00, 0x00FF00FF, + 0x002244BB, 0x0000CC99, 0x00AA7700, 0x00997755 +}; + +ColorDialog::ColorParams::ColorParams() + : itsColor( 0x0000FFFF ) +{ + memcpy(itsCustomColors, defaultColors, sizeof(itsCustomColors)); +} + +ColorDialog::ColorParams::ColorParams( COLORREF defaultColor ) + : itsColor( defaultColor ) +{ + memcpy(itsCustomColors, defaultColors, sizeof(itsCustomColors)); +} + +} Modified: dcplusplus/trunk/win32/Appearance2Page.cpp =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 07:16:04 UTC (rev 1079) +++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 07:22:00 UTC (rev 1080) @@ -116,9 +116,8 @@ } void Appearance2Page::handleBackgroundClicked() { - WidgetChooseColor::ColorParams initialColorParams(bg), - colorParams = createChooseColor().showDialog(initialColorParams); - if(colorParams.userPressedOk()) { + ColorDialog::ColorParams colorParams(bg); + if(createColorDialog().open(colorParams)) { bg = colorParams.getColor(); example->setColor(fg, bg); example->invalidateWidget(); @@ -139,17 +138,17 @@ } void Appearance2Page::handleULClicked() { - WidgetChooseColor::ColorParams initialColorParams(upBar), - colorParams = createChooseColor().showDialog(initialColorParams); - if(colorParams.userPressedOk()) + ColorDialog::ColorParams colorParams(upBar); + if(createColorDialog().open(colorParams)) { upBar = colorParams.getColor(); + } } void Appearance2Page::handleDLClicked() { - WidgetChooseColor::ColorParams initialColorParams(downBar), - colorParams = createChooseColor().showDialog(initialColorParams); - if(colorParams.userPressedOk()) + ColorDialog::ColorParams colorParams(downBar); + if(createColorDialog().open(colorParams)) { downBar = colorParams.getColor(); + } } void Appearance2Page::handleBrowseClicked() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 07:16:09
|
Revision: 1079 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1079&view=rev Author: arnetheduck Date: 2008-03-29 00:16:04 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Sanitize smartwin folder dialog and use it Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp dcplusplus/trunk/win32/CertificatesPage.cpp dcplusplus/trunk/win32/DirectoryListingFrame.cpp dcplusplus/trunk/win32/DownloadPage.cpp dcplusplus/trunk/win32/FavoriteDirsPage.cpp dcplusplus/trunk/win32/LogPage.cpp dcplusplus/trunk/win32/QueueFrame.cpp dcplusplus/trunk/win32/SearchFrame.cpp dcplusplus/trunk/win32/UploadPage.cpp dcplusplus/trunk/win32/WinUtil.cpp dcplusplus/trunk/win32/WinUtil.h Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h dcplusplus/trunk/smartwin/source/widgets/FolderDialog.cpp Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-27 14:07:03.299000025 +0100 committer: zouzou123gen properties: branch-nick: bzr + timestamp: 2008-03-27 22:58:31.127000093 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - help/dialog_adls_properties.html dialog_adls_properti-20080327130650-2gvj3h7gyx1brkrc-1 help/dialog_favorite_hub.html dialog_favorite_hub.-20080327130637-c5ov7rnec0b8vtnl-1 help/links.html 486@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:help%2FLinks.html + smartwin/include/smartwin/widgets/FolderDialog.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Fwidgets%2FWidgetChooseFolder.h smartwin/source/widgets/FolderDialog.cpp folderdialog.cpp-20080327215752-664xme4q5cf4ka0s-1 Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 07:16:04 UTC (rev 1079) @@ -30,9 +30,9 @@ #include "../SmartUtil.h" #include "widgets/Button.h" +#include "widgets/FolderDialog.h" #include "widgets/WidgetCheckBox.h" #include "widgets/WidgetChooseColor.h" -#include "widgets/WidgetChooseFolder.h" #include "widgets/WidgetComboBox.h" #include "widgets/WidgetListView.h" #include "widgets/WidgetDateTimePicker.h" @@ -96,6 +96,14 @@ : public WidgetFactoryPlatformImplementation< ContainerWidgetType, CurrentPlatform > { public: + // Bring widgets into the namespace of the class that inherits from us + + typedef SmartWin::Button Button; + typedef typename Button::ObjectType ButtonPtr; + + typedef SmartWin::FolderDialog FolderDialog; + + /// MessageBox class and object type. typedef SmartWin::WidgetMessageBox WidgetMessageBox; @@ -129,12 +137,6 @@ /// StatusBarSections object type. typedef typename WidgetStatusBarSections::ObjectType WidgetStatusBarSectionsPtr; - /// Button class type. - typedef SmartWin::Button Button; - - /// Button object type. - typedef typename Button::ObjectType ButtonPtr; - /// MDIWindow class type. typedef SmartWin::WidgetMDIParent WidgetMDIParent; @@ -177,9 +179,6 @@ /// RadioButton object type. typedef typename WidgetRadioButton::ObjectType WidgetRadioButtonPtr; - /// WidgetChooseFolder class type. - typedef SmartWin::WidgetChooseFolder WidgetChooseFolder; - /// LoadFileDialog class type. typedef SmartWin::WidgetLoadFile WidgetLoadFile; @@ -251,7 +250,7 @@ /// Creates a ChooseFolderDialog and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a Choose folder Dialog */ - WidgetChooseFolder createChooseFolder(); + FolderDialog createFolderDialog(); /// Creates a LoadFileDialog and returns a pointer to it. /** Use this one to construct a ( stack object ) to show a Load File Dialog @@ -480,10 +479,10 @@ {} template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetChooseFolder -WidgetFactory< ContainerWidgetType >::createChooseFolder() +typename WidgetFactory< ContainerWidgetType >::FolderDialog +WidgetFactory< ContainerWidgetType >::createFolderDialog() { - return WidgetChooseFolder ( this ); + return FolderDialog ( this ); } template<typename ContainerWidgetType> Copied: dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h (from rev 1078, dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h 2008-03-29 07:16:04 UTC (rev 1079) @@ -0,0 +1,122 @@ +/* + Copyright (c) 2005, Thomas Hansen + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the SmartWin++ nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef WidgetChooseFolder_h +#define WidgetChooseFolder_h + +#include "../Widget.h" +#include "../../SmartUtil.h" +#include <shlobj.h> + +namespace SmartWin +{ +// begin namespace SmartWin + +/// ChooseFolderDialog class +/** \ingroup WidgetControls + * \image html ChooseFolder.PNG + * Class for showing a ChooseFolderDialog box. <br> + * Either derive from it or call WidgetFactory::createChooseFolder. <br> + * Note! <br> + * 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. <br> + * the complete signature of the function will then be "HWND parent()" + */ +class FolderDialog +{ +public: + /// Class type + typedef FolderDialog ThisType; + + /// Object type + /** Note, not a pointer!!!! + */ + typedef ThisType ObjectType; + + // Constructor Taking pointer to parent + explicit FolderDialog( Widget * parent = 0 ); + + /// Shows the dialog + /** Returns string() or "empty string" if user press cancel. <br> + * Returns a "folder path" if user presses ok. <br> + * Use the inherited functions AspectfolderFilter::addFilter and + * AspectfolderFilter::activeFilter <br> + * before calling this function, if you wish the dialog to show only certain + * types of folders. + */ + bool open(SmartUtil::tstring& folder); + + /// 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. + */ + FolderDialog& setRoot( const int CSIDL = CSIDL_DESKTOPDIRECTORY ); + + FolderDialog& setTitle( const SmartUtil::tstring& title ); + + ~FolderDialog(); + +private: + static int CALLBACK browseCallbackProc( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData ) + { + if(lpData && uMsg == BFFM_INITIALIZED) { + ::SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData); + } + return 0; + } + + Widget* itsParent; + SmartUtil::tstring itsTitle; + LPITEMIDLIST itsPidlRoot; + + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } + +}; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Implementation of class +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +inline FolderDialog::FolderDialog( Widget * parent ) + : itsParent( parent ), itsPidlRoot(NULL) +{ +} + +inline FolderDialog& FolderDialog::setTitle( const SmartUtil::tstring& title ) { + itsTitle = title; + return *this; +} + +inline FolderDialog::~FolderDialog() { + ::CoTaskMemFree(itsPidlRoot); +} + +// end namespace SmartWin +} + +#endif Deleted: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h 2008-03-29 07:16:04 UTC (rev 1079) @@ -1,165 +0,0 @@ -/* - Copyright (c) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef WidgetChooseFolder_h -#define WidgetChooseFolder_h - -#include "../Widget.h" -#include "../../SmartUtil.h" -#include <shlobj.h> - -namespace SmartWin -{ -// begin namespace SmartWin - -/// ChooseFolderDialog class -/** \ingroup WidgetControls - * \image html ChooseFolder.PNG - * Class for showing a ChooseFolderDialog box. <br> - * Either derive from it or call WidgetFactory::createChooseFolder. <br> - * Note! <br> - * 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. <br> - * the complete signature of the function will then be "HWND parent()" - */ -class WidgetChooseFolder -{ -public: - /// Class type - typedef WidgetChooseFolder ThisType; - - /// Object type - /** Note, not a pointer!!!! - */ - typedef ThisType ObjectType; - - /// Shows the dialog - /** Returns string() or "empty string" if user press cancel. <br> - * Returns a "folder path" if user presses ok. <br> - * Use the inherited functions AspectfolderFilter::addFilter and - * AspectfolderFilter::activeFilter <br> - * before calling this function, if you wish the dialog to show only certain - * types of folders. - */ - SmartUtil::tstring showDialog(); - - // Constructor Taking pointer to parent - explicit WidgetChooseFolder( Widget * parent = 0 ); - - /// 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 setRootDirectory( const int CSIDL = CSIDL_DESKTOPDIRECTORY ) - { - bool ok = false; - ///WARNING: WINDOWSNT SHOULD NOT SUPPORT THIS FUNCTION - if ( itsParent != NULL ) - ok = SUCCEEDED( SHGetSpecialFolderLocation( itsParent->handle(), CSIDL, & itsPidlRoot ) ); - else - ok = SUCCEEDED( SHGetSpecialFolderLocation( NULL, CSIDL, & itsPidlRoot ) ); - if ( !ok ) - itsPidlRoot = NULL; - } - - void setTitleText( SmartUtil::tstring TitleText ) - { - itsTitleText = TitleText; - } - - /// Sets the starting directory selected in the WidgetChooseFolder widget - /** If given your dialog will try to start with the given directory selected. - */ - void setStartDirectory( SmartUtil::tstring startDir ) - { - itsStartDir = startDir; - } - - ~WidgetChooseFolder() - { - ::CoTaskMemFree(itsPidlRoot); - } - -private: - static int CALLBACK browseCallbackProc( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData ) - { - if(lpData && uMsg == BFFM_INITIALIZED) { - ::SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData); - } - return 0; - } - - Widget* itsParent; - SmartUtil::tstring itsTitleText; - LPITEMIDLIST itsPidlRoot; - SmartUtil::tstring itsStartDir; - - HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } - -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Implementation of class -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline SmartUtil::tstring WidgetChooseFolder::showDialog() -{ - SmartUtil::tstring retVal = _T( "" ); - BROWSEINFO bws = { 0 }; - bws.hwndOwner = itsParent->handle(); - bws.pidlRoot = itsPidlRoot; - bws.pszDisplayName = NULL; - bws.lpszTitle = itsTitleText.c_str(); - bws.ulFlags = BIF_USENEWUI; - bws.lpfn = NULL; - bws.lParam = !itsStartDir.empty() ? reinterpret_cast<LPARAM>(itsStartDir.c_str()) : 0; - bws.lpfn = &browseCallbackProc; - - LPITEMIDLIST lpIDL = SHBrowseForFolder( & bws ); - if ( lpIDL ) - { - TCHAR temp_path[MAX_PATH + 1]; - temp_path[0] = _T( '\0' ); - if ( !SHGetPathFromIDList( lpIDL, & temp_path[0] ) ) - temp_path[0] = _T( '\0' ); - else - retVal = temp_path; - - ::CoTaskMemFree(lpIDL); - } - return retVal; -} - -inline WidgetChooseFolder::WidgetChooseFolder( Widget * parent ) - : itsParent( parent ), itsPidlRoot(NULL) -{ -} - -// end namespace SmartWin -} - -#endif Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-29 07:16:04 UTC (rev 1079) @@ -406,7 +406,6 @@ inline void WidgetTreeView::setSelectedImpl(HTREEITEM item) { TreeView_SelectItem( this->handle(), item ); - TreeView_EnsureVisible(this->handle(), item); } inline size_t WidgetTreeView::countSelectedImpl() const { Added: dcplusplus/trunk/smartwin/source/widgets/FolderDialog.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/FolderDialog.cpp (rev 0) +++ dcplusplus/trunk/smartwin/source/widgets/FolderDialog.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -0,0 +1,49 @@ +#include "../../include/smartwin/widgets/FolderDialog.h" + +namespace SmartWin { + +FolderDialog& FolderDialog::setRoot( const int csidl ) { + if (FAILED(SHGetSpecialFolderLocation( getParentHandle(), csidl, &itsPidlRoot ))) { + itsPidlRoot = NULL; + } + return *this; +} + +bool FolderDialog::open(SmartUtil::tstring& folder) { + BROWSEINFO bws = { 0 }; + bws.hwndOwner = getParentHandle(); + bws.pidlRoot = itsPidlRoot; + if(!itsTitle.empty()) { + bws.lpszTitle = itsTitle.c_str(); + } + bws.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS | BIF_EDITBOX; + if(!folder.empty()) { + bws.lParam = reinterpret_cast<LPARAM>(folder.c_str()); + bws.lpfn = &browseCallbackProc; + } + + // Avoid errors about missing cdroms, floppies etc.. + UINT oldErrorMode = ::SetErrorMode(SEM_FAILCRITICALERRORS); + + LPITEMIDLIST lpIDL = SHBrowseForFolder( & bws ); + + ::SetErrorMode(oldErrorMode); + + if(lpIDL) { + TCHAR buf[MAX_PATH + 1]; + if ( ::SHGetPathFromIDList( lpIDL, buf ) ) { + folder = buf; + + if(folder.size() > 0 && folder[folder.size()-1] != _T('\\')) { + folder += _T('\\'); + } + + ::CoTaskMemFree(lpIDL); + return true; + } + ::CoTaskMemFree(lpIDL); + } + return false; +} + +} Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -106,9 +106,7 @@ } void WidgetListView::setSelectedImpl(int item) { - clearSelection(); ListView_SetItemState(handle(), item, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); - ListView_EnsureVisible(handle(), item, FALSE); } void WidgetListView::clearSelection() { Modified: dcplusplus/trunk/win32/CertificatesPage.cpp =================================================================== --- dcplusplus/trunk/win32/CertificatesPage.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/CertificatesPage.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -102,7 +102,7 @@ void CertificatesPage::handleBrowseTrustedPathClicked() { tstring target = trustedCertificatesPath->getText(); - if(WinUtil::browseDirectory(target, handle())) + if(createFolderDialog().open(target)) trustedCertificatesPath->setText(target); } Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp =================================================================== --- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -482,7 +482,7 @@ ItemInfo* ii = dirs->getSelectedData(); if(ii) { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(target, handle())) { + if(createFolderDialog().open(target)) { WinUtil::addLastDir(target); download(ii, Text::fromT(target)); } @@ -499,7 +499,7 @@ } } else { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(target, handle())) { + if(createFolderDialog().open(target)) { WinUtil::addLastDir(target); dl->download(ii->dir, Text::fromT(target), WinUtil::isShift()); } @@ -509,7 +509,7 @@ } } else { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(target, handle())) { + if(createFolderDialog().open(target)) { WinUtil::addLastDir(target); downloadFiles(Text::fromT(target)); } Modified: dcplusplus/trunk/win32/DownloadPage.cpp =================================================================== --- dcplusplus/trunk/win32/DownloadPage.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/DownloadPage.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -120,7 +120,7 @@ void DownloadPage::handleBrowseDir() { tstring dir = Text::toT(SETTING(DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(dir, handle())) + if(createFolderDialog().open(dir)) { // Adjust path string if(dir.size() > 0 && dir[dir.size() - 1] != '\\') @@ -132,7 +132,7 @@ void DownloadPage::handleBrowseTempDir() { tstring dir = Text::toT(SETTING(TEMP_DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(dir, handle())) + if(createFolderDialog().open(dir)) { // Adjust path string if(dir.size() > 0 && dir[dir.size() - 1] != '\\') Modified: dcplusplus/trunk/win32/FavoriteDirsPage.cpp =================================================================== --- dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -149,8 +149,9 @@ void FavoriteDirsPage::handleAddClicked() { tstring target; - if(WinUtil::browseDirectory(target, handle())) + if(createFolderDialog().open(target)) { addDirectory(target); + } } void FavoriteDirsPage::addDirectory(const tstring& aPath) { Modified: dcplusplus/trunk/win32/LogPage.cpp =================================================================== --- dcplusplus/trunk/win32/LogPage.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/LogPage.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -118,12 +118,7 @@ void LogPage::handleBrowseClicked() { tstring dir = Text::toT(SETTING(LOG_DIRECTORY)); - if(WinUtil::browseDirectory(dir, handle())) - { - // Adjust path string - if(dir.size() > 0 && dir[dir.size() - 1] != '\\') - dir += '\\'; - + if(createFolderDialog().open(dir)) { setItemText(IDC_LOG_DIRECTORY, dir); } } Modified: dcplusplus/trunk/win32/QueueFrame.cpp =================================================================== --- dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -727,7 +727,7 @@ if(showTree->getChecked()) { name = Text::toT(curDir); } - if(WinUtil::browseDirectory(name, handle())) { + if(createFolderDialog().open(name)) { int i = -1; while( (i = files->getNext(i, LVNI_SELECTED)) != -1) { QueueItemInfo* ii = files->getData(i); @@ -745,7 +745,7 @@ dcassert(!curDir.empty()); tstring name = Text::toT(curDir); - if(WinUtil::browseDirectory(name, handle())) { + if(createFolderDialog().open(name)) { moveDir(item, Text::fromT(name)); } } Modified: dcplusplus/trunk/win32/SearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -673,14 +673,14 @@ } } else { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(target, handle())) { + if(createFolderDialog().open(target)) { WinUtil::addLastDir(target); results->forEachSelectedT(SearchInfo::Download(target)); } } } else { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(target, handle())) { + if(createFolderDialog().open(target)) { WinUtil::addLastDir(target); results->forEachSelectedT(SearchInfo::Download(target)); } @@ -716,7 +716,7 @@ void SearchFrame::handleDownloadDirTo() { tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)); - if(WinUtil::browseDirectory(target, handle())) { + if(createFolderDialog().open(target)) { WinUtil::addLastDir(target); results->forEachSelectedT(SearchInfo::DownloadWhole(target)); } Modified: dcplusplus/trunk/win32/UploadPage.cpp =================================================================== --- dcplusplus/trunk/win32/UploadPage.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/UploadPage.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -242,7 +242,7 @@ void UploadPage::handleAddClicked() { tstring target; - if(WinUtil::browseDirectory(target, handle())) { + if(createFolderDialog().open(target)) { addDirectory(target); HashProgressDlg(this, true).run(); } Modified: dcplusplus/trunk/win32/WinUtil.cpp =================================================================== --- dcplusplus/trunk/win32/WinUtil.cpp 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/WinUtil.cpp 2008-03-29 07:16:04 UTC (rev 1079) @@ -402,43 +402,6 @@ lastDirs.push_back(dir); } -static int CALLBACK browseCallbackProc(HWND hwnd, UINT uMsg, LPARAM /*lp*/, LPARAM pData) { - switch(uMsg) { - case BFFM_INITIALIZED: - SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData); - break; - } - return 0; -} - -bool WinUtil::browseDirectory(tstring& target, HWND owner /* = NULL */) { - TCHAR buf[MAX_PATH]; - LPMALLOC ma; - - BROWSEINFO bi = { 0 }; - - bi.hwndOwner = owner; - bi.pszDisplayName = buf; - tstring title = T_("Choose folder"); - bi.lpszTitle = title.c_str(); - bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI; - bi.lParam = (LPARAM)target.c_str(); - bi.lpfn = &browseCallbackProc; - LPITEMIDLIST pidl = ::SHBrowseForFolder(&bi); - if(pidl != NULL) { - ::SHGetPathFromIDList(pidl, buf); - target = buf; - - if(target.size() > 0 && target[target.size()-1] != _T('\\')) - target+=_T('\\'); - - ::CoTaskMemFree(pidl); - - return true; - } - return false; -} - bool WinUtil::browseFile(tstring& target, HWND owner /* = NULL */, bool save /* = true */, const tstring& initialDir /* = Util::emptyString */, const TCHAR* types /* = NULL */, const TCHAR* defExt /* = NULL */) { TCHAR buf[MAX_PATH]; OPENFILENAME ofn = { 0 }; // common dialog box structure Modified: dcplusplus/trunk/win32/WinUtil.h =================================================================== --- dcplusplus/trunk/win32/WinUtil.h 2008-03-29 07:15:05 UTC (rev 1078) +++ dcplusplus/trunk/win32/WinUtil.h 2008-03-29 07:16:04 UTC (rev 1079) @@ -155,7 +155,6 @@ static void openLink(const tstring& url); static bool browseFile(tstring& target, HWND owner = NULL, bool save = true, const tstring& initialDir = Util::emptyStringT, const TCHAR* types = NULL, const TCHAR* defExt = NULL); - static bool browseDirectory(tstring& target, HWND owner = NULL); static int getOsMajor(); static int getOsMinor(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 07:15:09
|
Revision: 1078 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1078&view=rev Author: arnetheduck Date: 2008-03-29 00:15:05 -0700 (Sat, 29 Mar 2008) Log Message: ----------- help updates; use AspectDialog more; 1 less ugly icon; update bg preview in settings Modified Paths: -------------- dcplusplus/trunk/.bzrignore dcplusplus/trunk/help/DCPlusPlus.hhp dcplusplus/trunk/help/compile.cmd dcplusplus/trunk/help/credits.html dcplusplus/trunk/help/cshelp.h dcplusplus/trunk/help/cshelp.txt dcplusplus/trunk/help/index.html dcplusplus/trunk/help/resource.h dcplusplus/trunk/help/settings_colors_and_sounds.html dcplusplus/trunk/help/toc.hhc dcplusplus/trunk/help/window_adlsearch.html dcplusplus/trunk/help/window_favorite_hubs.html dcplusplus/trunk/help/window_notepad.html dcplusplus/trunk/help/window_search_spy.html dcplusplus/trunk/help/window_system_log.html dcplusplus/trunk/res/menu/DCPlusPlus.bmp dcplusplus/trunk/win32/ADLSProperties.cpp dcplusplus/trunk/win32/ADLSearchFrame.cpp dcplusplus/trunk/win32/ADLSearchFrame.h dcplusplus/trunk/win32/Appearance2Page.cpp dcplusplus/trunk/win32/CommandDlg.cpp dcplusplus/trunk/win32/DCPlusPlus.rc dcplusplus/trunk/win32/DownloadPage.cpp dcplusplus/trunk/win32/FavHubProperties.cpp dcplusplus/trunk/win32/FavHubsFrame.cpp dcplusplus/trunk/win32/HashProgressDlg.cpp dcplusplus/trunk/win32/LogPage.cpp dcplusplus/trunk/win32/MagnetDlg.cpp dcplusplus/trunk/win32/NetworkPage.cpp dcplusplus/trunk/win32/PropPage.cpp dcplusplus/trunk/win32/PropPage.h dcplusplus/trunk/win32/SpyFrame.cpp Added Paths: ----------- dcplusplus/trunk/help/dialog_adls_properties.html dcplusplus/trunk/help/dialog_favorite_hub.html dcplusplus/trunk/help/links.html Removed Paths: ------------- dcplusplus/trunk/help/Links.html Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-27 13:06:39.479000092 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-27 14:07:03.299000025 +0100 committer: zouzou123gen properties: branch-nick: bzr Name: bzr:file-ids - + help/dialog_adls_properties.html dialog_adls_properti-20080327130650-2gvj3h7gyx1brkrc-1 help/dialog_favorite_hub.html dialog_favorite_hub.-20080327130637-c5ov7rnec0b8vtnl-1 help/links.html 486@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:help%2FLinks.html Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 Modified: dcplusplus/trunk/.bzrignore =================================================================== --- dcplusplus/trunk/.bzrignore 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/.bzrignore 2008-03-29 07:15:05 UTC (rev 1078) @@ -9,4 +9,5 @@ ./htmlhelp/lib/htmlhelp.lib natupnp.h ./help/changelog.html +./help/compile.log ./.pydevproject Modified: dcplusplus/trunk/help/DCPlusPlus.hhp =================================================================== --- dcplusplus/trunk/help/DCPlusPlus.hhp 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/DCPlusPlus.hhp 2008-03-29 07:15:05 UTC (rev 1078) @@ -1,120 +1,124 @@ -[OPTIONS] -Auto Index=Yes -Compatibility=1.1 or later -Compiled file=..\build\help\DCPlusPlus.chm -Contents file=toc.hhc -Default topic=index.html -Display compile progress=Yes -Enhanced decompilation=Yes -Full-text search=Yes -Index file=index.hhk -Language=0x409 Anglais (\xC9tats-Unis) -Title=Help for DC++ - - -[FILES] -cshelp.h -cshelp.txt -office11.css -index.html -changelog.html -settings_advanced.html -settings_appearance.html -settings_downloads.html -settings_general.html -settings_logs.html -settings_sharing.html -settings_user_commands.html -settings_colors_and_sounds.html -settings_expert.html -settings_connection.html -settings_windows.html -settings_queue.html -settings_certs.html -settings_tabs.html -settings_favoritedirs.html -chat_commands.html -non-routable.html -plusplus_tag.html -netiquette.html -credits.html -window_hub.html -window_pm.html -window_directory_listing.html -window_public_hubs.html -window_favorite_hubs.html -window_favorite_users.html -window_download_queue.html -window_finished_downloads.html -window_waiting_users.html -window_finished_uploads.html -window_search.html -window_adlsearch.html -window_search_spy.html -window_notepad.html -window_system_log.html -window_network_stats.html -dialog_indexing_progress.html -dialog_user_command.html -fdl.html -faq_keyboard_commands.html -faq_upnp.html -faq_activemode.html -faq_university.html -faq_nosearch.html -faq_slowdownload.html -faq_different_icons.html -faq_units.html -faq_install.html -faq_secret.html -dev_createpatch.html -dev_applypatch.html -links.html - -[ALIAS] -IDH_STARTPAGE=index.html -IDH_CHANGELOG=changelog.html -IDH_KEYBOARD=faq_keyboard_commands.html -IDH_HUB=window_hub.html -IDH_PM=window_pm.html -IDH_DIRECTORY_LISTING=window_directory_listing.html -IDH_PUBLIC_HUBS=window_public_hubs.html -IDH_FAVORITE_HUBS=window_favorite_hubs.html -IDH_FAVUSERS=window_favorite_users.html -IDH_QUEUE=window_download_queue.html -IDH_FINISHED_DL=window_finished_downloads.html -IDH_WAITING_USERS=window_waiting_users.html -IDH_FINISHED_UL=window_finished_uploads.html -IDH_SEARCH=window_search.html -IDH_ADL_SEARCH=window_adlsearch.html -IDH_SEARCH_SPY=window_search_spy.html -IDH_NOTEPAD=window_notepad.html -IDH_SYSTEM_LOG=window_system_log.html -IDH_NET_STATS=window_network_stats.html -IDH_HASH_PROGRESS=dialog_indexing_progress.html -IDH_USER_COMMAND=dialog_user_command.html -IDH_ADVANCED3PAGE=settings_expert.html -IDH_ADVANCEDPAGE=settings_advanced.html -IDH_APPEARANCE2PAGE=settings_colors_and_sounds.html -IDH_APPEARANCEPAGE=settings_appearance.html -IDH_DOWNLOADPAGE=settings_downloads.html -IDH_FAVORITE_DIRSPAGE=settings_favoritedirs.html -IDH_GENERALPAGE=settings_general.html -IDH_LOGPAGE=settings_logs.html -IDH_NETWORKPAGE=settings_connection.html -IDH_QUEUEPAGE=settings_queue.html -IDH_UCPAGE=settings_user_commands.html -IDH_UPLOADPAGE=settings_sharing.html -IDH_WINDOWSPAGE=settings_windows.html -IDH_CERTIFICATESPAGE=settings_certs.html -IDH_TABSPAGE=settings_tabs.html - -[MAP] -#include resource.h - -[TEXT POPUPS] -cshelp.h -cshelp.txt - -[INFOTYPES] - +[OPTIONS] +Auto Index=Yes +Compatibility=1.1 or later +Compiled file=..\build\help\DCPlusPlus.chm +Contents file=toc.hhc +Default topic=index.html +Display compile progress=Yes +Enhanced decompilation=Yes +Full-text search=Yes +Index file=index.hhk +Language=0x409 Anglais (\xC9tats-Unis) +Title=Help for DC++ + + +[FILES] +cshelp.h +cshelp.txt +office11.css +index.html +changelog.html +settings_advanced.html +settings_appearance.html +settings_downloads.html +settings_general.html +settings_logs.html +settings_sharing.html +settings_user_commands.html +settings_colors_and_sounds.html +settings_expert.html +settings_connection.html +settings_windows.html +settings_queue.html +settings_certs.html +settings_tabs.html +settings_favoritedirs.html +chat_commands.html +non-routable.html +plusplus_tag.html +netiquette.html +credits.html +window_hub.html +window_pm.html +window_directory_listing.html +window_public_hubs.html +window_favorite_hubs.html +window_favorite_users.html +window_download_queue.html +window_finished_downloads.html +window_waiting_users.html +window_finished_uploads.html +window_search.html +window_adlsearch.html +window_search_spy.html +window_notepad.html +window_system_log.html +window_network_stats.html +dialog_indexing_progress.html +dialog_user_command.html +dialog_favorite_hub.html +dialog_adls_properties.html +fdl.html +faq_keyboard_commands.html +faq_upnp.html +faq_activemode.html +faq_university.html +faq_nosearch.html +faq_slowdownload.html +faq_different_icons.html +faq_units.html +faq_install.html +faq_secret.html +dev_createpatch.html +dev_applypatch.html +links.html + +[ALIAS] +IDH_STARTPAGE=index.html +IDH_CHANGELOG=changelog.html +IDH_KEYBOARD=faq_keyboard_commands.html +IDH_HUB=window_hub.html +IDH_PM=window_pm.html +IDH_DIRECTORY_LISTING=window_directory_listing.html +IDH_PUBLIC_HUBS=window_public_hubs.html +IDH_FAVORITE_HUBS=window_favorite_hubs.html +IDH_FAVUSERS=window_favorite_users.html +IDH_QUEUE=window_download_queue.html +IDH_FINISHED_DL=window_finished_downloads.html +IDH_WAITING_USERS=window_waiting_users.html +IDH_FINISHED_UL=window_finished_uploads.html +IDH_SEARCH=window_search.html +IDH_ADL_SEARCH=window_adlsearch.html +IDH_SEARCH_SPY=window_search_spy.html +IDH_NOTEPAD=window_notepad.html +IDH_SYSTEM_LOG=window_system_log.html +IDH_NET_STATS=window_network_stats.html +IDH_HASH_PROGRESS=dialog_indexing_progress.html +IDH_USER_COMMAND=dialog_user_command.html +IDH_FAVORITE_HUB=dialog_favorite_hub.html +IDH_ADLSP=dialog_adls_properties.html +IDH_ADVANCED3PAGE=settings_expert.html +IDH_ADVANCEDPAGE=settings_advanced.html +IDH_APPEARANCE2PAGE=settings_colors_and_sounds.html +IDH_APPEARANCEPAGE=settings_appearance.html +IDH_DOWNLOADPAGE=settings_downloads.html +IDH_FAVORITE_DIRSPAGE=settings_favoritedirs.html +IDH_GENERALPAGE=settings_general.html +IDH_LOGPAGE=settings_logs.html +IDH_NETWORKPAGE=settings_connection.html +IDH_QUEUEPAGE=settings_queue.html +IDH_UCPAGE=settings_user_commands.html +IDH_UPLOADPAGE=settings_sharing.html +IDH_WINDOWSPAGE=settings_windows.html +IDH_CERTIFICATESPAGE=settings_certs.html +IDH_TABSPAGE=settings_tabs.html + +[MAP] +#include resource.h + +[TEXT POPUPS] +cshelp.h +cshelp.txt + +[INFOTYPES] + Deleted: dcplusplus/trunk/help/Links.html =================================================================== --- dcplusplus/trunk/help/Links.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/Links.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -1,54 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>Links</title> - <meta content="text/html; charset=us-ascii" http-equiv="content-type"> - <link type="text/css" rel="stylesheet" href="office11.css"> -</head> -<body> -<h1>Links</h1> -<dl> -</dl> -<span style="font-weight: bold;"></span> -<table style="text-align: left;" border="0" cellpadding="2" cellspacing="2"> - <tbody> - <tr> - <td><span style="font-weight: bold;"></span>Homepage</td> - <td><a href="http://dcplusplus.sourceforge.net" target="_blank" class="external">http://dcplusplus.sourceforge.net</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - <tr> - <td><span style="font-weight: bold;"></span>Forum</td> - <td><a href="http://dcpp.net/forum/" target="_blank" class="external">http://dcpp.net/forum/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - <tr> - <td><span style="font-weight: bold;"></span>Report bugs</td> - <td><a href="http://dcpp.net/bugzilla/" target="_blank" class="external">http://dcpp.net/bugzilla/</a> - <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - <tr> - <td><span style="font-weight: bold;"></span>Request features</td> - <td><a href="http://dcpp.net/bugzilla/" target="_blank" class="external">http://dcpp.net/bugzilla/</a> - <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - <tr> - <td>Documentation Wiki</td> - <td><a href="http://dcpp.net/wiki/" target="_blank" class="external">http://dcpp.net/wiki/</a> - <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - <tr> - <td><span style="font-weight: bold;"></span><a name="languagefiles">Download language files</td> - <td><a href="http://sourceforge.net/tracker/?atid=460289&group_id=40287&func=browse" target="_blank" class="external">http://sourceforge.net/tracker/?atid=460289&group_id=40287&func=browse</a> - <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - <tr> - <td><span style="font-weight: bold;"></span>Get newest version</td> - <td><a href="http://dcplusplus.sourceforge.net/index.php?t=2&s=1" target="_blank" class="external">http://dcplusplus.sourceforge.net/index.php?t=2&s=1</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - <tr> - <td><span style="font-weight: bold;"></span><a name="geoip"></a>GeoIP database update</td> - <td><a href="http://www.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip" target="_blank" class="external">http://www.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> - </tr> - </tbody> -</table> -</body> -</html> Modified: dcplusplus/trunk/help/compile.cmd =================================================================== --- dcplusplus/trunk/help/compile.cmd 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/compile.cmd 2008-03-29 07:15:05 UTC (rev 1078) @@ -4,8 +4,6 @@ copy ..\res\users.bmp . mkdir ..\build\help -hhc.exe DCPlusPlus.hhp +hhc.exe DCPlusPlus.hhp > compile.log del users.bmp - -pause Modified: dcplusplus/trunk/help/credits.html =================================================================== --- dcplusplus/trunk/help/credits.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/credits.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -23,7 +23,8 @@ <li>TheParanoidOne</li> <li>Henrik Engström (by proxy)</li> <li>BSOD2600</li> - <li>TheParanoidOne</li> + <li>poy</li> + <li>MikeJJ</li> </ul> </body> </html> Modified: dcplusplus/trunk/help/cshelp.h =================================================================== --- dcplusplus/trunk/help/cshelp.h 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/cshelp.h 2008-03-29 07:15:05 UTC (rev 1078) @@ -106,7 +106,7 @@ #define IDH_USER_COMMAND_NICK 11100 #define IDH_USER_COMMAND_ONCE 11101 #define IDH_FAVORITE_HUBS_CONNECT 11102 -#define IDH_FAVORITE_HUBS_ADD 11103 +#define IDH_FAVORITE_HUBS_NEW 11103 #define IDH_FAVORITE_HUBS_PROPERTIES 11104 #define IDH_FAVORITE_HUBS_MOVE_UP 11105 #define IDH_FAVORITE_HUBS_MOVE_DOWN 11106 @@ -121,5 +121,25 @@ #define IDH_SEARCH_TYPE 11115 #define IDH_SEARCH_SLOTS 11116 #define IDH_SEARCH_HUBS 11117 +#define IDH_ADLS_NEW 11118 +#define IDH_ADLS_PROPERTIES 11119 +#define IDH_ADLS_MOVE_UP 11120 +#define IDH_ADLS_MOVE_DOWN 11121 +#define IDH_ADLS_REMOVE 11122 +#define IDH_ADLSP_SEARCH_STRING 11123 +#define IDH_ADLSP_SOURCE_TYPE 11124 +#define IDH_ADLSP_MIN_FILE_SIZE 11125 +#define IDH_ADLSP_MAX_FILE_SIZE 11126 +#define IDH_ADLSP_SIZE_TYPE 11127 +#define IDH_ADLSP_DEST_DIR 11128 +#define IDH_ADLSP_ENABLED 11129 +#define IDH_ADLSP_AUTOQUEUE 11130 +#define IDH_SPY_IGNORE_TTH 11131 +#define IDH_FAVORITE_HUB_NAME 11132 +#define IDH_FAVORITE_HUB_ADDRESS 11133 +#define IDH_FAVORITE_HUB_DESC 11134 +#define IDH_FAVORITE_HUB_NICK 11135 +#define IDH_FAVORITE_HUB_PASSWORD 11136 +#define IDH_FAVORITE_HUB_USER_DESC 11137 #endif Modified: dcplusplus/trunk/help/cshelp.txt =================================================================== --- dcplusplus/trunk/help/cshelp.txt 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/cshelp.txt 2008-03-29 07:15:05 UTC (rev 1078) @@ -204,7 +204,7 @@ Send only once per user from search frame, regardless of how many files you've selected from that user .topic IDH_FAVORITE_HUBS_CONNECT Connect to selected hubs. -.topic IDH_FAVORITE_HUBS_ADD +.topic IDH_FAVORITE_HUBS_NEW Create a new favorite hub. .topic IDH_FAVORITE_HUBS_PROPERTIES Change pre-existing hub properties for the selected hub. @@ -234,3 +234,43 @@ Filter away files depending on the user's free slots. .topic IDH_SEARCH_HUBS Search only selected hubs. +.topic IDH_ADLS_NEW +Create a new ADLSearch entry. +.topic IDH_ADLS_PROPERTIES +Change pre-existing ADLSearch properties for the selected entries. +.topic IDH_ADLS_MOVE_UP +Move up selected ADLSearch entries in the list. +.topic IDH_ADLS_MOVE_DOWN +Move down selected ADLSearch entries in the list. +.topic IDH_ADLS_REMOVE +Removes selected ADLSearch entries from the list. +.topic IDH_ADLSP_SEARCH_STRING +This is the set of search strings to search for. +.topic IDH_ADLSP_SOURCE_TYPE +"Filename": Matches search against filename; "Directory": Matches against current subdirectory and places the whole structure in the special folder; "Full Path": Matches against whole directory + filename. +.topic IDH_ADLSP_MIN_FILE_SIZE +Sets the lower limits for file size. This is unused for Directory searches. +.topic IDH_ADLSP_MAX_FILE_SIZE +Sets the upper limits for file size. This is unused for Directory searches. +.topic IDH_ADLSP_SIZE_TYPE +Sets the units for the search sizes. +.topic IDH_ADLSP_DEST_DIR +Sets the output folder for a search. Multiple folders with different names can exist simultaneously. Each folder name gets wrapped in <<< and >>>. +.topic IDH_ADLSP_ENABLED +Marks the search as active or inactive. +.topic IDH_ADLSP_AUTOQUEUE +When checked, matches to this search will be put into your Download Queue. +.topic IDH_SPY_IGNORE_TTH +Check this checkbox to filter out TTH searches. Note that DC++ will still respond to them; you will just not see them in this window. +.topic IDH_FAVORITE_HUB_NAME +Specifies what name the hub has. +.topic IDH_FAVORITE_HUB_ADDRESS +The address for the hub. +.topic IDH_FAVORITE_HUB_DESC +Description of the hub. +.topic IDH_FAVORITE_HUB_NICK +If you would like to use a special nick for a specific hub. Leave this blank for default. +.topic IDH_FAVORITE_HUB_PASSWORD +If you have a password attached together with your nick. Used for operators or other registered people. +.topic IDH_FAVORITE_HUB_USER_DESC +If you would like to use a special user description (shown in the user list) for a specific hub. Leave this blank for default. Added: dcplusplus/trunk/help/dialog_adls_properties.html =================================================================== --- dcplusplus/trunk/help/dialog_adls_properties.html (rev 0) +++ dcplusplus/trunk/help/dialog_adls_properties.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -0,0 +1,42 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta content="text/html; charset=us-ascii" http-equiv="content-type"> + <link type="text/css" rel="stylesheet" href="office11.css"> + <title>ADLSearch Properties</title> +</head> +<body> +<h1>ADLSearch Properties</h1> +<dl style="margin-left: 40px;"> + <dt>Search String</dt> + <dd>This is the set of search strings to search for.</dd> + <dt>Source Type</dt> + <dd><p>One of following values:</p> +<dl style="margin-left: 40px;"> + <dt>Filename</dt> + <dd>Matches search against filename.</dd> + <dt><a name="directory"></a>Directory</dt> + <dd>Matches against current subdirectory and places the whole +structure in the special folder.</dd> + <dt>Full Path</dt> + <dd>Matches against whole directory + filename.</dd> +</dl> +</dd> + <dt>Min FileSize</dt> + <dd>Sets the lower limits for file size. This is unused for <a href="#directory">Directory</a> searches.</dd> + <dt>Max FileSize</dt> + <dd>Sets the upper limits for file size. This is unused for <a href="#directory">Directory</a> searches.</dd> + <dt>Size Type</dt> + <dd>Sets the units for the search sizes.</dd> + <dt>Destination Directory</dt> + <dd>Sets the output folder for a search. Multiple folders with +different names can exist simultaneously. Each folder name gets wrapped +in <<< and >>>.</dd> + <dt>Enabled</dt> + <dd>Marks the search as active or inactive.</dd> + <dt>Download Matches</dt> + <dd>When checked, matches to this search will be put into your +<a href="window_download_queue.html">Download Queue</a>.</dd> +</dl> +</body> +</html> Added: dcplusplus/trunk/help/dialog_favorite_hub.html =================================================================== --- dcplusplus/trunk/help/dialog_favorite_hub.html (rev 0) +++ dcplusplus/trunk/help/dialog_favorite_hub.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -0,0 +1,29 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta content="text/html; charset=us-ascii" http-equiv="content-type"> + <link type="text/css" rel="stylesheet" href="office11.css"> + <title>Favorite Hub Properties</title> +</head> +<body> +<h1>Favorite Hub Properties</h1> +<h2>Hub</h2> +<dl style="margin-left: 40px;"> + <dt>Name</dt> + <dd>Specifies what name the hub has.</dd> + <dt>Address</dt> + <dd>The address for the hub.</dd> + <dt>Description</dt> + <dd>Description of the hub.</dd> +</dl> +<h2>Identification (leave blank for defaults)</h2> +<dl style="margin-left: 40px;"> + <dt>Nick</dt> + <dd>If you would like to use a special nick for a specific hub. Leave this blank for default.</dd> + <dt>Password</dt> + <dd>If you have a password attached together with your nick. Used for operators or other registered people.</dd> + <dt>Description</dt> + <dd>If you would like to use a special user description (shown in the user list) for a specific hub. Leave this blank for default.</dd> +</dl> +</body> +</html> Modified: dcplusplus/trunk/help/index.html =================================================================== --- dcplusplus/trunk/help/index.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/index.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -56,6 +56,8 @@ <div style="margin-left: 40px;"> <a href="dialog_indexing_progress.html">Indexing progress</a><br> <a href="dialog_user_command.html">User Command</a><br> +<a href="dialog_favorite_hub.html">Favorite Hub Properties</a><br> +<a href="dialog_adls_properties.html">ADLSearch Properties</a><br> </div> <h2>Frequently Asked Questions</h2> <div style="margin-left: 40px;"> <a href="faq_activemode.html">How to Copied: dcplusplus/trunk/help/links.html (from rev 1077, dcplusplus/trunk/help/Links.html) =================================================================== --- dcplusplus/trunk/help/links.html (rev 0) +++ dcplusplus/trunk/help/links.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -0,0 +1,51 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <title>Links</title> + <meta content="text/html; charset=us-ascii" http-equiv="content-type"> + <link type="text/css" rel="stylesheet" href="office11.css"> +</head> +<body> +<h1>Links</h1> +<table style="text-align: left;" border="0" cellpadding="2" cellspacing="2"> + <tbody> + <tr> + <td>DC++ Homepage</td> + <td><a href="http://dcplusplus.sourceforge.net/" target="_blank" class="external">http://dcplusplus.sourceforge.net/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td>Downloads</td> + <td><a href="http://dcplusplus.sourceforge.net/download/" target="_blank" class="external">http://dcplusplus.sourceforge.net/download/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td><a name="geoip"></a>GeoIP database update</td> + <td><a href="http://www.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip" target="_blank" class="external">http://www.maxmind.com/ ...</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td>Frequently asked questions</td> + <td><a href="http://dcplusplus.sourceforge.net/faq/" target="_blank" class="external">http://dcplusplus.sourceforge.net/faq/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td>Help forum</td> + <td><a href="http://dcplusplus.sourceforge.net/help/" target="_blank" class="external">http://dcplusplus.sourceforge.net/help/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td>DC++ discussion forum</td> + <td><a href="http://dcplusplus.sourceforge.net/discussion/" target="_blank" class="external">http://dcplusplus.sourceforge.net/discussion/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td>Request a feature</td> + <td><a href="http://dcplusplus.sourceforge.net/featurereq/" target="_blank" class="external">http://dcplusplus.sourceforge.net/featurereq/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td>Report a bug</td> + <td><a href="http://dcplusplus.sourceforge.net/bugs/" target="_blank" class="external">http://dcplusplus.sourceforge.net/bugs/</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + <tr> + <td>Donate (paypal)</td> + <td><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=arnetheduck%40gmail%2ecom&item_name=DCPlusPlus&no_shipping=1&return=http%3a%2f%2fdcplusplus%2esf%2enet%2f&cancel_return=http%3a%2f%2fdcplusplus%2esf%2enet%2f&cn=Greeting&tax=0¤cy_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" class="external">https://www.paypal.com/ ...</a> <img title="External Link" src="external.png" border="0" height="10" width="10"></td> + </tr> + </tbody> +</table> +</body> +</html> Modified: dcplusplus/trunk/help/resource.h =================================================================== --- dcplusplus/trunk/help/resource.h 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/resource.h 2008-03-29 07:15:05 UTC (rev 1078) @@ -30,6 +30,8 @@ // dialogs #define IDH_HASH_PROGRESS 10200 #define IDH_USER_COMMAND 10201 +#define IDH_FAVORITE_HUB 10202 +#define IDH_ADLSP 10203 // settings pages #define IDH_ADVANCED3PAGE 10300 Modified: dcplusplus/trunk/help/settings_colors_and_sounds.html =================================================================== --- dcplusplus/trunk/help/settings_colors_and_sounds.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/settings_colors_and_sounds.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -23,7 +23,7 @@ <dd>This will set the coloring for the upload progress bars, if you have them enabled in <a href="settings_advanced.html#progressbar">Advanced</a>. (default: RGB(205, 60, 55))</dd> - <dt>Download</dt> + <dt>Downloads</dt> <dd>This will set the coloring for the download progress bars, if you have them enabled in <a href="settings_advanced.html#progressbar">Advanced</a>. (default: RGB(55, 170, 85))</dd> Modified: dcplusplus/trunk/help/toc.hhc =================================================================== --- dcplusplus/trunk/help/toc.hhc 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/toc.hhc 2008-03-29 07:15:05 UTC (rev 1078) @@ -1,247 +1,255 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<HTML> -<HEAD> -<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1"> -<!-- Sitemap 1.0 --> -</HEAD><BODY> -<OBJECT type="text/site properties"> - <param name="ImageType" value="Folder"> -</OBJECT> -<UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Overview"> - <param name="Local" value="index.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Changelog"> - <param name="Local" value="changelog.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Chat Commands"> - <param name="Local" value="chat_commands.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Windows"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Hub"> - <param name="Local" value="window_hub.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Private Message"> - <param name="Local" value="window_pm.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="File List"> - <param name="Local" value="window_directory_listing.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Public Hubs"> - <param name="Local" value="window_public_hubs.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Favorite Hubs"> - <param name="Local" value="window_favorite_hubs.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Favorite Users"> - <param name="Local" value="window_favorite_users.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Download queue"> - <param name="Local" value="window_download_queue.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Finished downloads"> - <param name="Local" value="window_finished_downloads.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Waiting users"> - <param name="Local" value="window_waiting_users.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Finished uploads"> - <param name="Local" value="window_finished_uploads.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Search"> - <param name="Local" value="window_search.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="ADLSearch"> - <param name="Local" value="window_adlsearch.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Search spy"> - <param name="Local" value="window_search_spy.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Notepad"> - <param name="Local" value="window_notepad.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="System log"> - <param name="Local" value="window_system_log.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Network statistics"> - <param name="Local" value="window_network_stats.html"> - </OBJECT> - </UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Dialogs"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Indexing progress"> - <param name="Local" value="dialog_indexing_progress.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="User Command"> - <param name="Local" value="dialog_user_command.html"> - </OBJECT> - </UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Frequently Asked Questions"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="How to set up active mode?"> - <param name="Local" value="faq_activemode.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="How to set up UPnP?"> - <param name="Local" value="faq_upnp.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="My University blocks DC++"> - <param name="Local" value="faq_university.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Why don't I get any search results?"> - <param name="Local" value="faq_nosearch.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Why am I getting slow download speeds?"> - <param name="Local" value="faq_slowdownload.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Which keyboard commands can I use?"> - <param name="Local" value="faq_keyboard_commands.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="What do the different icons mean?"> - <param name="Local" value="faq_different_icons.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="What do the units mean?"> - <param name="Local" value="faq_units.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="How do I install/uninstall/upgrade DC++?"> - <param name="Local" value="faq_install.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="What secret stuff are there?"> - <param name="Local" value="faq_secret.html"> - </OBJECT> - </UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Settings"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Personal information"> - <param name="Local" value="settings_general.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Connection settings"> - <param name="Local" value="settings_connection.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Downloads"> - <param name="Local" value="settings_downloads.html"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Favorites"> - <param name="Local" value="settings_favoritedirs.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Queue"> - <param name="Local" value="settings_queue.html"> - </OBJECT> - </UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Sharing"> - <param name="Local" value="settings_sharing.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Appearance"> - <param name="Local" value="settings_appearance.html"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Colors and sounds"> - <param name="Local" value="settings_colors_and_sounds.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Tabs"> - <param name="Local" value="settings_tabs.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Windows"> - <param name="Local" value="settings_windows.html"> - </OBJECT> - </UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Advanced"> - <param name="Local" value="settings_advanced.html"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Logs"> - <param name="Local" value="settings_logs.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Experts only"> - <param name="Local" value="settings_expert.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="User Commands"> - <param name="Local" value="settings_user_commands.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Security Certificates"> - <param name="Local" value="settings_certs.html"> - </OBJECT> - </UL> - </UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Development"> - </OBJECT> - <UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Applying patches"> - <param name="Local" value="dev_applypatch.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Creating patches"> - <param name="Local" value="dev_createpatch.html"> - </OBJECT> - </UL> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Etiquette"> - <param name="Local" value="netiquette.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Links"> - <param name="Local" value="links.html"> - </OBJECT> - <LI> <OBJECT type="text/sitemap"> - <param name="Name" value="Help File Credits"> - <param name="Local" value="credits.html"> - </OBJECT> -</UL> -</BODY></HTML> +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<HTML> +<HEAD> +<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1"> +<!-- Sitemap 1.0 --> +</HEAD><BODY> +<OBJECT type="text/site properties"> + <param name="ImageType" value="Folder"> +</OBJECT> +<UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Overview"> + <param name="Local" value="index.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Changelog"> + <param name="Local" value="changelog.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Chat Commands"> + <param name="Local" value="chat_commands.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Windows"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Hub"> + <param name="Local" value="window_hub.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Private Message"> + <param name="Local" value="window_pm.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="File List"> + <param name="Local" value="window_directory_listing.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Public Hubs"> + <param name="Local" value="window_public_hubs.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Favorite Hubs"> + <param name="Local" value="window_favorite_hubs.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Favorite Users"> + <param name="Local" value="window_favorite_users.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Download queue"> + <param name="Local" value="window_download_queue.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Finished downloads"> + <param name="Local" value="window_finished_downloads.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Waiting users"> + <param name="Local" value="window_waiting_users.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Finished uploads"> + <param name="Local" value="window_finished_uploads.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Search"> + <param name="Local" value="window_search.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="ADLSearch"> + <param name="Local" value="window_adlsearch.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Search spy"> + <param name="Local" value="window_search_spy.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Notepad"> + <param name="Local" value="window_notepad.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="System log"> + <param name="Local" value="window_system_log.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Network statistics"> + <param name="Local" value="window_network_stats.html"> + </OBJECT> + </UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Dialogs"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Indexing progress"> + <param name="Local" value="dialog_indexing_progress.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="User Command"> + <param name="Local" value="dialog_user_command.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Favorite Hub Properties"> + <param name="Local" value="dialog_favorite_hub.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="ADLSearch Properties"> + <param name="Local" value="dialog_adls_properties.html"> + </OBJECT> + </UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Frequently Asked Questions"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="How to set up active mode?"> + <param name="Local" value="faq_activemode.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="How to set up UPnP?"> + <param name="Local" value="faq_upnp.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="My University blocks DC++"> + <param name="Local" value="faq_university.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Why don't I get any search results?"> + <param name="Local" value="faq_nosearch.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Why am I getting slow download speeds?"> + <param name="Local" value="faq_slowdownload.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Which keyboard commands can I use?"> + <param name="Local" value="faq_keyboard_commands.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="What do the different icons mean?"> + <param name="Local" value="faq_different_icons.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="What do the units mean?"> + <param name="Local" value="faq_units.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="How do I install/uninstall/upgrade DC++?"> + <param name="Local" value="faq_install.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="What secret stuff are there?"> + <param name="Local" value="faq_secret.html"> + </OBJECT> + </UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Settings"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Personal information"> + <param name="Local" value="settings_general.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Connection settings"> + <param name="Local" value="settings_connection.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Downloads"> + <param name="Local" value="settings_downloads.html"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Favorites"> + <param name="Local" value="settings_favoritedirs.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Queue"> + <param name="Local" value="settings_queue.html"> + </OBJECT> + </UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Sharing"> + <param name="Local" value="settings_sharing.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Appearance"> + <param name="Local" value="settings_appearance.html"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Colors and sounds"> + <param name="Local" value="settings_colors_and_sounds.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Tabs"> + <param name="Local" value="settings_tabs.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Windows"> + <param name="Local" value="settings_windows.html"> + </OBJECT> + </UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Advanced"> + <param name="Local" value="settings_advanced.html"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Logs"> + <param name="Local" value="settings_logs.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Experts only"> + <param name="Local" value="settings_expert.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="User Commands"> + <param name="Local" value="settings_user_commands.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Security Certificates"> + <param name="Local" value="settings_certs.html"> + </OBJECT> + </UL> + </UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Development"> + </OBJECT> + <UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Applying patches"> + <param name="Local" value="dev_applypatch.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Creating patches"> + <param name="Local" value="dev_createpatch.html"> + </OBJECT> + </UL> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Etiquette"> + <param name="Local" value="netiquette.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Links"> + <param name="Local" value="links.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Help File Credits"> + <param name="Local" value="credits.html"> + </OBJECT> +</UL> +</BODY></HTML> Modified: dcplusplus/trunk/help/window_adlsearch.html =================================================================== --- dcplusplus/trunk/help/window_adlsearch.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/window_adlsearch.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -13,14 +13,13 @@ 'avi' as search string for example. When you download a directory listing from a user, all avi-files will be placed in a special folder called <span style="font-weight: bold;"><<<ADLSearch>>></span>. -<h2>Search Options</h2> +<h2>Columns</h2> <dl style="margin-left: 40px;"> - <dt>Search String</dt> - <dd>This is the set of search strings to search for.</dd> + <dt>Enabled / Search String</dt> + <dd>This is the set of search strings to search for. The checkbox indicates whether the search is active (box checked) or inactive (box unchecked).</dd> <dt>Source Type</dt> - <dd>One of following values:</dd> -</dl> -<dl style="margin-left: 80px;"> + <dd><p>One of following values:</p> +<dl style="margin-left: 40px;"> <dt>Filename</dt> <dd>Matches search against filename.</dd> <dt><a name="directory"></a>Directory</dt> @@ -29,22 +28,31 @@ <dt>Full Path</dt> <dd>Matches against whole directory + filename.</dd> </dl> -<dl style="margin-left: 40px;"> - <dt>Min/Max Filesize</dt> - <dd>Sets the upper and lower limits for file size. This is unused for - <a href="#directory">Directory</a> searches.</dd> - <dt>Size Type</dt> - <dd>Sets the units for the search sizes.</dd> +</dd> <dt>Destination Directory</dt> <dd>Sets the output folder for a search. Multiple folders with different names can exist simultaneously. Each folder name gets wrapped in <<< and >>>.</dd> - <dt>Enabled</dt> - <dd>Marks the search as active or inactive.</dd> - <dt>Download Matches</dt> - <dd>When checked, matches to this search will be put into your -Download Queue.</dd> + <dt>Min Size</dt> + <dd>Sets the lower limits for file size. This is unused for <a href="#directory">Directory</a> searches.</dd> + <dt>Max Size</dt> + <dd>Sets the upper limits for file size. This is unused for <a href="#directory">Directory</a> searches.</dd> </dl> +<h2>Buttons</h2> +<dl style="margin-left: 40px;"> + <dt>New</dt> + <dd>Create a new ADLSearch entry.</dd> + <dt>Properties</dt> + <dd>Change pre-existing ADLSearch properties for the selected entries.</dd> + <dt>Move up</dt> + <dd>Move up selected ADLSearch entries in the list.</dd> + <dt>Move down</dt> + <dd>Move down selected ADLSearch entries in the list.</dd> + <dt>Remove</dt> + <dd>Removes selected ADLSearch entries from the list.</dd> + <dt>Help</dt> + <dd>Launch this help file.</dd> +</dl> <h2>Extra Features</h2> <ol> <li>There is a new option in the context menu (right-click) for Modified: dcplusplus/trunk/help/window_favorite_hubs.html =================================================================== --- dcplusplus/trunk/help/window_favorite_hubs.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/window_favorite_hubs.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -12,15 +12,15 @@ <dt><a name="autoconnect"></a>Auto connect / name</dt> <dd>Specifies what name the hub has. The checkbox indicates if DC++ should auto connect to the hub on startup. If the box is checked, DC++ will automatically connect to the hub on startup.</dd> <dt>Description</dt> - <dd>A brief description of the hub.</dd> + <dd>Description of the hub.</dd> <dt>Nick</dt> <dd>If you would like to use a special nick for a specific hub. Leave this blank for default.</dd> <dt>Password</dt> - <dd>If you have a password attached together with your nick. Used for operators och other registered people.</dd> + <dd>If you have a password attached together with your nick. Used for operators or other registered people.</dd> <dt>Server</dt> - <dd>The IP or DNS for the hub.</dd> + <dd>The address for the hub.</dd> <dt>User Description</dt> - <dd>Brief description of the user account.</dd> + <dd>If you would like to use a special user description (shown in the user list) for a specific hub. Leave this blank for default.</dd> </dl> <h2>Buttons</h2> <dl style="margin-left: 40px;"> Modified: dcplusplus/trunk/help/window_notepad.html =================================================================== --- dcplusplus/trunk/help/window_notepad.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/window_notepad.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -7,6 +7,6 @@ </head> <body> <h1>Notepad</h1> -This is a notepad for your use. The information you write on this page is stored in the "notepad.txt" file, in the folder you've instructed DC++ to store settings. +This is a notepad for your use. The information you write on this page is stored in the "Notepad.txt" file, in the root folder of DC++. </body> </html> Modified: dcplusplus/trunk/help/window_search_spy.html =================================================================== --- dcplusplus/trunk/help/window_search_spy.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/window_search_spy.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -25,12 +25,12 @@ <h2>Status bar</h2> <dl style="margin-left: 40px;"> <dt>Ignore TTH searches</dt> - <dd>This will filter out TTH searches. Note that DC++ will still respond to them; You will just not see them in this window.</dd> + <dd>Check this checkbox to filter out TTH searches. Note that DC++ will still respond to them; you will just not see them in this window.</dd> <dt>Total</dt> <dd>The amount of total searches performed.</dd> <dt>Avarage/s</dt> <dd>The amount of searches performed divided by the amount of seconds you have had this window open.</dd> - <dt>Hits/dt> + <dt>Hits</dt> <dd>The amount of search results your copy of DC++ has sent out in response to the searches you see in this window.</dd> <dt>Hit ratio</dt> <dd>Ratio between the total amount of searches versus the amount of hits.</dd> Modified: dcplusplus/trunk/help/window_system_log.html =================================================================== --- dcplusplus/trunk/help/window_system_log.html 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/help/window_system_log.html 2008-03-29 07:15:05 UTC (rev 1078) @@ -7,6 +7,6 @@ </head> <body> <h1>System log</h1> -This window display important and current information about DC++ and your interactions with the program. If DC++ behave unexpectadly, look in this window for a possible explanation. +This window displays important and current information about DC++ and your interactions with the program. If DC++ behaves unexpectedly, look in this window for a possible explanation. </body> </html> Modified: dcplusplus/trunk/res/menu/DCPlusPlus.bmp =================================================================== (Binary files differ) Modified: dcplusplus/trunk/win32/ADLSProperties.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSProperties.cpp 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/win32/ADLSProperties.cpp 2008-03-29 07:15:05 UTC (rev 1078) @@ -24,7 +24,28 @@ #include <dcpp/ADLSearch.h> #include <dcpp/FavoriteManager.h> +#include "WinUtil.h" +static const WinUtil::HelpItem helpItems[] = { + { IDC_ADLSP_SEARCH, IDH_ADLSP_SEARCH_STRING }, + { IDC_SEARCH_STRING, IDH_ADLSP_SEARCH_STRING }, + { IDC_ADLSP_TYPE, IDH_ADLSP_SOURCE_TYPE }, + { IDC_SOURCE_TYPE, IDH_ADLSP_SOURCE_TYPE }, + { IDC_ADLSP_SIZE_MIN, IDH_ADLSP_MIN_FILE_SIZE }, + { IDC_MIN_FILE_SIZE, IDH_ADLSP_MIN_FILE_SIZE }, + { IDC_ADLSP_SIZE_MAX, IDH_ADLSP_MAX_FILE_SIZE }, + { IDC_MAX_FILE_SIZE, IDH_ADLSP_MAX_FILE_SIZE }, + { IDC_ADLSP_UNITS, IDH_ADLSP_SIZE_TYPE }, + { IDC_SIZE_TYPE, IDH_ADLSP_SIZE_TYPE }, + { IDC_ADLSP_DESTINATION, IDH_ADLSP_DEST_DIR }, + { IDC_DEST_DIR, IDH_ADLSP_DEST_DIR }, + { IDC_IS_ACTIVE, IDH_ADLSP_ENABLED }, + { IDC_AUTOQUEUE, IDH_ADLSP_AUTOQUEUE }, + { IDOK, IDH_DCPP_OK }, + { IDCANCEL, IDH_DCPP_CANCEL }, + { 0, 0 } +}; + ADLSProperties::ADLSProperties(SmartWin::Widget* parent, ADLSearch *_search) : WidgetFactory<SmartWin::WidgetModalDialog>(parent), searchString(0), @@ -45,14 +66,18 @@ } bool ADLSProperties::handleInitDialog() { + setHelpId(IDH_ADLSP); + + WinUtil::setHelpIds(this, helpItems); + // Translate dialog setText(T_("ADLSearch Properties")); - ::SetDlgItemText(handle(), IDC_ADLSP_SEARCH, CT_("Search String")); - ::SetDlgItemText(handle(), IDC_ADLSP_TYPE, CT_("Search Type")); - ::SetDlgItemText(handle(), IDC_ADLSP_SIZE_MIN, CT_("Min FileSize")); - ::SetDlgItemText(handle(), IDC_ADLSP_SIZE_MAX, CT_("Max FileSize")); - ::SetDlgItemText(handle(), IDC_ADLSP_UNITS, CT_("Size Type")); - ::SetDlgItemText(handle(), IDC_ADLSP_DESTINATION, CT_("Destination Directory")); + setItemText(IDC_ADLSP_SEARCH, T_("Search String")); + setItemText(IDC_ADLSP_TYPE, T_("Source Type")); + setItemText(IDC_ADLSP_SIZE_MIN, T_("Min FileSize")); + setItemText(IDC_ADLSP_SIZE_MAX, T_("Max FileSize")); + setItemText(IDC_ADLSP_UNITS, T_("Size Type")); + setItemText(IDC_ADLSP_DESTINATION, T_("Destination Directory")); searchString = attachTextBox(IDC_SEARCH_STRING); searchString->setText(Text::toT(search->searchString)); Modified: dcplusplus/trunk/win32/ADLSearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-29 07:15:05 UTC (rev 1078) @@ -57,7 +57,7 @@ items->onDblClicked(std::tr1::bind(&ADLSearchFrame::handleDoubleClick, this)); items->onKeyDown(std::tr1::bind(&ADLSearchFrame::handleKeyDown, this, _1)); - items->onRaw(std::tr1::bind(&ADLSearchFrame::handleItemChanged, this, _1, _2), SmartWin::Message(WM_NOTIFY, LVN_ITEMCHANGED)); + items->onRaw(std::tr1::bind(&ADLSearchFrame::handleItemChanged, this, _2), SmartWin::Message(WM_NOTIFY, LVN_ITEMCHANGED)); items->onContextMenu(std::tr1::bind(&ADLSearchFrame::handleContextMenu, this, _1)); } @@ -66,31 +66,37 @@ cs.caption = T_("&New..."); add = createButton(cs); + add->setHelpId(IDH_ADLS_NEW); add->onClicked(std::tr1::bind(&ADLSearchFrame::handleAdd, this)); addWidget(add); cs.caption = T_("&Properties"); properties = createButton(cs); + properties->setHelpId(IDH_ADLS_PROPERTIES); properties->onClicked(std::tr1::bind(&ADLSearchFrame::handleProperties, this)); addWidget(properties); cs.caption = T_("Move &Up"); up = createButton(cs); + up->setHelpId(IDH_ADLS_MOVE_UP); up->onClicked(std::tr1::bind(&ADLSearchFrame::handleUp, this)); addWidget(up); cs.caption = T_("Move &Down"); down = createButton(cs); + down->setHelpId(IDH_ADLS_MOVE_DOWN); down->onClicked(std::tr1::bind(&ADLSearchFrame::handleDown, this)); addWidget(down); cs.caption = T_("&Remove"); remove = createButton(cs); + remove->setHelpId(IDH_ADLS_REMOVE); remove->onClicked(std::tr1::bind(&ADLSearchFrame::handleRemove, this)); addWidget(remove); cs.caption = T_("&Help"); help = createButton(cs); + help->setHelpId(IDH_DCPP_HELP); help->onClicked(std::tr1::bind(&WinUtil::help, handle(), IDH_ADL_SEARCH)); addWidget(help); } @@ -257,7 +263,7 @@ return false; } -LRESULT ADLSearchFrame::handleItemChanged(WPARAM /*wParam*/, LPARAM lParam) { +LRESULT ADLSearchFrame::handleItemChanged(LPARAM lParam) { LPNMITEMACTIVATE item = reinterpret_cast<LPNMITEMACTIVATE>(lParam); if((item->uChanged & LVIF_STATE) == 0) Modified: dcplusplus/trunk/win32/ADLSearchFrame.h =================================================================== --- dcplusplus/trunk/win32/ADLSearchFrame.h 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/win32/ADLSearchFrame.h 2008-03-29 07:15:05 UTC (rev 1078) @@ -71,7 +71,7 @@ void handleRemove(); void handleDoubleClick(); bool handleKeyDown(int c); - LRESULT handleItemChanged(WPARAM /*wParam*/, LPARAM lParam); + LRESULT handleItemChanged(LPARAM lParam); bool handleContextMenu(SmartWin::ScreenCoordinate sc); void addEntry(ADLSearch& search, int index = -1); Modified: dcplusplus/trunk/win32/Appearance2Page.cpp =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 07:13:41 UTC (rev 1077) +++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 07:15:05 UTC (rev 1078) @@ -121,6 +121,7 @@ if(colorParams.userPressedOk()) { bg = colorParams.getColor(); example->setColor(fg, bg); + example->invalidateWidget(); } } @@ -133,6 +134,7 @@ font = SmartWin::FontPtr(new SmartWin::Font(::CreateFontIndirect(&logFont), true)); example->setColor(fg, bg); example-... [truncated message content] |
From: <arn...@us...> - 2008-03-29 07:13:45
|
Revision: 1077 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1077&view=rev Author: arnetheduck Date: 2008-03-29 00:13:41 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Detempletize common dialogs Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMessageBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h dcplusplus/trunk/smartwin/source/LibraryLoader.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp dcplusplus/trunk/win32/WinUtil.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-27 09:21:21.841000080 +0100 committer: arn...@gm... properties: branch-nick: dcplusplus + timestamp: 2008-03-27 13:06:39.479000092 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -178,16 +178,16 @@ typedef typename WidgetRadioButton::ObjectType WidgetRadioButtonPtr; /// WidgetChooseFolder class type. - typedef SmartWin::WidgetChooseFolder< SmartWin::Widget > WidgetChooseFolder; + typedef SmartWin::WidgetChooseFolder WidgetChooseFolder; /// LoadFileDialog class type. - typedef SmartWin::WidgetLoadFile< SmartWin::Widget > WidgetLoadFile; + typedef SmartWin::WidgetLoadFile WidgetLoadFile; /// SaveFileDialog class and object type. - typedef SmartWin::WidgetSaveFile< SmartWin::Widget > WidgetSaveFile; + typedef SmartWin::WidgetSaveFile WidgetSaveFile; /// WidgetChooseColor class and object type. - typedef SmartWin::WidgetChooseColor< SmartWin::Widget > WidgetChooseColor; + typedef SmartWin::WidgetChooseColor WidgetChooseColor; /// ComboBox class type. typedef SmartWin::WidgetComboBox WidgetComboBox; Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -63,7 +63,7 @@ typedef typename WidgetMenu::ObjectType WidgetMenuPtr; /// ChooseFont class and object type. - typedef SmartWin::WidgetChooseFont< SmartWin::Widget > WidgetChooseFont; + typedef SmartWin::WidgetChooseFont WidgetChooseFont; /// Toolbar class type. typedef SmartWin::WidgetToolbar WidgetToolbar; Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFileFilter.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -37,12 +37,6 @@ { // begin namespace SmartWin -// DEVELOPERS RENOTE! -// This class is INTENTIONALLY inlined since some users might want to include this -// class without including the whole library! This way you can use the -// WidgetLoadFile && the WidgetSaveFile dialogs WITHOUT being forced to link -// against the COMPLETE library!! DON'T put this class into a library .cpp file!!! - /// Class for adding a filter to e.g. a WidgetLoadFile dialog. /** \ingroup AspectClasses * Class is an Aspect class which should be realized into classes that needs it. @@ -90,29 +84,6 @@ return itsActiveFilter + 1; } -protected: - AspectFileFilter() - : itsActiveFilter( 0 ) - {} - - SmartUtil::tstring filter() const - { - SmartUtil::tstring filter( itsFilter.begin(), itsFilter.end() ); - return filter; - } - -private: - std::vector< TCHAR > itsFilter; - unsigned int itsActiveFilter; -}; - -// Class that contains common things between the different WidgetXXXXFile classes. -// Among other things we have specializations that have lots of commonalities. -/// Class containing commonalities between WidgetLoadFile and WidgetSaveFile Widgets. -class WidgetFileCommon - : public virtual AspectFileFilter -{ -public: /// Sets the starting directory of the WidgetLoadFile or WidgetSaveFile Widget /** If given your dialog will try to start in the given directory, otherwise it * will use the working directory of the process. @@ -155,7 +126,12 @@ #endif } + protected: + AspectFileFilter() + : itsActiveFilter( 0 ) + {} + static const int PATH_BUFFER_SIZE = 32768; //really arbitrary, but 32K sounds reasonable. size in number of TCHARS! // Fills out the common members of the OPENFILENAME struct. @@ -170,7 +146,6 @@ ofn.hInstance = ::GetModuleHandle( 0 ); ofn.nMaxFile = PATH_BUFFER_SIZE; - itsFilter = this->filter(); // Remember that the filter needs to be accessible _after_ we return from this function... ofn.lpstrFilter = itsFilter.c_str(); ofn.nFilterIndex = this->getActiveFilter(); ofn.lpstrFileTitle = NULL; @@ -179,7 +154,9 @@ ofn.Flags = flags; // OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; } + private: + unsigned int itsActiveFilter; SmartUtil::tstring itsStartDir; SmartUtil::tstring itsFilter; }; Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseColor.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -28,9 +28,7 @@ #ifndef WidgetChooseColor_h #define WidgetChooseColor_h -#include "../WindowsHeaders.h" -#include "../FreeCommonDialog.h" -#include <memory> +#include "../Widget.h" namespace SmartWin { @@ -49,12 +47,11 @@ * This is one of few Widgets in SmartWin++ which can be used without linking in the * actual library! */ -template< class Parent > class WidgetChooseColor { public: /// Class type - typedef WidgetChooseColor< Parent > ThisType; + typedef WidgetChooseColor ThisType; /// Object type /** Note, not a pointer!!!! @@ -67,7 +64,7 @@ */ class ColorParams { - friend class WidgetChooseColor< Parent >; + friend class WidgetChooseColor; COLORREF itsColor; COLORREF itsCustomColors[16]; bool itsUserPressedOk; @@ -129,34 +126,23 @@ ColorParams showDialog( const ColorParams & colorParams, bool basic = true, bool allowFullOpen = true ); /// Expicit constructor taking pointer to parent - explicit WidgetChooseColor( Parent * parent = 0 ); + explicit WidgetChooseColor( Widget * parent = 0 ); virtual ~WidgetChooseColor() {} private: - Parent * itsParent; - - // Note! - // This one is STATIC which normally would be potentially dangerous in e.g. - // Multi Threaded environments, but since ColorParams is immutable in addition - // to that two different threads should never be allowed to manipulate GUI in - // Windows API this isn't dangerous after all... - static ColorParams itsColorParams; + ColorParams itsColorParams; + Widget* itsParent; + + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } }; -template< class Parent > -typename WidgetChooseColor< Parent >::ColorParams WidgetChooseColor< Parent >::itsColorParams; - -/// \ingroup GlobalStuff -/// A Free WidgetChooseColor dialog is a dialog which isn't "owned" by another Widget -typedef WidgetChooseColor< FreeCommonDialog > WidgetChooseColorFree; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -template< class Parent > -WidgetChooseColor< Parent >::ColorParams::ColorParams() +inline +WidgetChooseColor::ColorParams::ColorParams() : itsColor( 0x0000FFFF ) , itsUserPressedOk( false ) { @@ -178,8 +164,7 @@ itsCustomColors[15] = 0x00997755; } -template< class Parent > -WidgetChooseColor< Parent >::ColorParams::ColorParams( COLORREF defaultColor ) +inline WidgetChooseColor::ColorParams::ColorParams( COLORREF defaultColor ) : itsColor( defaultColor ) , itsUserPressedOk( false ) { @@ -201,32 +186,28 @@ itsCustomColors[15] = 0x00997755; } -template< class Parent > -COLORREF WidgetChooseColor< Parent >::ColorParams::getColor() const +inline COLORREF WidgetChooseColor::ColorParams::getColor() const { return itsColor; } -template< class Parent > -WidgetChooseColor< Parent >::ColorParams::ColorParams( COLORREF defaultColor, COLORREF customColors[16] ) +inline WidgetChooseColor::ColorParams::ColorParams( COLORREF defaultColor, COLORREF customColors[16] ) : itsColor( defaultColor ) , itsUserPressedOk( false ) { - itsCustomColors = customColors; + memcpy(itsCustomColors, customColors, sizeof(itsCustomColors)); } -template< class Parent > -bool WidgetChooseColor< Parent >::ColorParams::userPressedOk() const +inline bool WidgetChooseColor::ColorParams::userPressedOk() const { return itsUserPressedOk; } -template< class Parent > -typename WidgetChooseColor< Parent >::ColorParams WidgetChooseColor< Parent >::showDialog( bool basic, bool allowFullOpen ) +inline WidgetChooseColor::ColorParams WidgetChooseColor::showDialog( bool basic, bool allowFullOpen ) { CHOOSECOLOR cc; cc.lStructSize = ( DWORD ) sizeof( CHOOSECOLOR ); - cc.hwndOwner = itsParent->handle(); + cc.hwndOwner = getParentHandle(); cc.hInstance = NULL; cc.rgbResult = itsColorParams.itsColor; cc.lpCustColors = itsColorParams.itsCustomColors; @@ -247,12 +228,10 @@ return itsColorParams; } -template< class Parent > -typename WidgetChooseColor< Parent >::ColorParams WidgetChooseColor< Parent >::showDialog( const ColorParams & colorParams, bool basic, bool allowFullOpen ) -{ +inline WidgetChooseColor::ColorParams WidgetChooseColor::showDialog( const ColorParams & colorParams, bool basic, bool allowFullOpen ){ CHOOSECOLOR cc; cc.lStructSize = ( DWORD ) sizeof( CHOOSECOLOR ); - cc.hwndOwner = itsParent->handle(); + cc.hwndOwner = getParentHandle(); cc.hInstance = NULL; cc.rgbResult = colorParams.itsColor; cc.lpCustColors = itsColorParams.itsCustomColors; @@ -273,8 +252,7 @@ return itsColorParams; } -template< class Parent > -WidgetChooseColor< Parent >::WidgetChooseColor( Parent * parent ) +inline WidgetChooseColor::WidgetChooseColor( Widget * parent ) : itsParent( parent ) { } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFolder.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -28,9 +28,8 @@ #ifndef WidgetChooseFolder_h #define WidgetChooseFolder_h -#include "../WindowsHeaders.h" +#include "../Widget.h" #include "../../SmartUtil.h" -#include "../FreeCommonDialog.h" #include <shlobj.h> namespace SmartWin @@ -48,12 +47,11 @@ * and HWND in the Parent template parameter. <br> * the complete signature of the function will then be "HWND parent()" */ -template< class Parent > class WidgetChooseFolder { public: /// Class type - typedef WidgetChooseFolder< Parent > ThisType; + typedef WidgetChooseFolder ThisType; /// Object type /** Note, not a pointer!!!! @@ -71,7 +69,7 @@ SmartUtil::tstring showDialog(); // Constructor Taking pointer to parent - explicit WidgetChooseFolder( Parent * parent = 0 ); + explicit WidgetChooseFolder( Widget * parent = 0 ); /// Sets the root directory in the WidgetChooseFolder Widget /** If given your dialog will try to start with the given directory as root, otherwise it @@ -102,60 +100,46 @@ itsStartDir = startDir; } - virtual ~WidgetChooseFolder() + ~WidgetChooseFolder() { + ::CoTaskMemFree(itsPidlRoot); } private: static int CALLBACK browseCallbackProc( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData ) { - switch( uMsg ) - { - case BFFM_INITIALIZED: - ThisType* p = (ThisType*) lpData; - if( p->itsStartDir.size() > 0 ) - SendMessage( hwnd, BFFM_SETSELECTION, TRUE, (LPARAM) p->itsStartDir.c_str() ); - break; + if(lpData && uMsg == BFFM_INITIALIZED) { + ::SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData); } return 0; } - Parent * itsParent; + Widget* itsParent; SmartUtil::tstring itsTitleText; LPITEMIDLIST itsPidlRoot; SmartUtil::tstring itsStartDir; + + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } + }; -typedef WidgetChooseFolder< FreeCommonDialog > WidgetChooseFolderFree; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -template< class Parent > -SmartUtil::tstring WidgetChooseFolder< Parent >::showDialog() +inline SmartUtil::tstring WidgetChooseFolder::showDialog() { - // WARNING! - // If you ONLY include THIS file then you must explicitly link to comctl32.lib - // since you won't get the default linking inclusion by the whole library!! - CoInitialize( 0 ); SmartUtil::tstring retVal = _T( "" ); - BROWSEINFO bws; - ZeroMemory( & bws, sizeof( bws ) ); + BROWSEINFO bws = { 0 }; bws.hwndOwner = itsParent->handle(); bws.pidlRoot = itsPidlRoot; bws.pszDisplayName = NULL; bws.lpszTitle = itsTitleText.c_str(); -#ifdef __WINE__ - bws.ulFlags = 0; // Wine 0.9.10 does not support the BIF_USENEWUI flag yet. -#else bws.ulFlags = BIF_USENEWUI; -#endif bws.lpfn = NULL; - bws.lParam = (LPARAM) this; + bws.lParam = !itsStartDir.empty() ? reinterpret_cast<LPARAM>(itsStartDir.c_str()) : 0; bws.lpfn = &browseCallbackProc; - LPITEMIDLIST lpIDL = NULL; - lpIDL = SHBrowseForFolder( & bws ); + LPITEMIDLIST lpIDL = SHBrowseForFolder( & bws ); if ( lpIDL ) { TCHAR temp_path[MAX_PATH + 1]; @@ -165,24 +149,14 @@ else retVal = temp_path; - LPMALLOC mal = NULL; - if ( SHGetMalloc( & mal ) == E_FAIL || !mal ) - free( lpIDL ); - else - { - mal->Free( lpIDL ); - mal->Release(); - } + ::CoTaskMemFree(lpIDL); } return retVal; } -template< class Parent > -WidgetChooseFolder< Parent >::WidgetChooseFolder( Parent * parent ) - : itsParent( parent ) +inline WidgetChooseFolder::WidgetChooseFolder( Widget * parent ) + : itsParent( parent ), itsPidlRoot(NULL) { - itsTitleText = _T( "" ); - itsPidlRoot = NULL; } // end namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetChooseFont.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -29,10 +29,8 @@ #ifndef WidgetChooseFont_h #define WidgetChooseFont_h -#include "../WindowsHeaders.h" +#include "../Widget.h" #include "../resources/Font.h" -#include "../FreeCommonDialog.h" -#include <memory> namespace SmartWin { @@ -49,12 +47,11 @@ * an HWND on the template parameter class. <br> * the complete signature of the function will then be "HWND parent()" */ -template< class Parent > class WidgetChooseFont { public: /// Class type - typedef WidgetChooseFont< Parent > ThisType; + typedef WidgetChooseFont ThisType; /// Object type /** Note, not a pointer!!!! @@ -65,31 +62,26 @@ bool showDialog(DWORD dwFlags, LPLOGFONT lplf, DWORD& rgbColors); /// Constructor Taking pointer to parent - explicit WidgetChooseFont( Parent * parent = 0 ); + explicit WidgetChooseFont( Widget* parent = 0 ); virtual ~WidgetChooseFont() {} private: - Parent * itsParent; + Widget* itsParent; + + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } }; -/// \ingroup GlobalStuff -/// A Free WidgetChooseFont dialog is a dialog which isn't "owned" by another Widget -typedef WidgetChooseFont< FreeCommonDialog > WidgetChooseFontFree; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -template< class Parent > -bool WidgetChooseFont< Parent >::showDialog(DWORD dwFlags, LPLOGFONT lplf, DWORD& rgbColors) +inline bool WidgetChooseFont::showDialog(DWORD dwFlags, LPLOGFONT lplf, DWORD& rgbColors) { - CHOOSEFONT cf; + CHOOSEFONT cf = { sizeof(CHOOSEFONT) }; // Initialize CHOOSEFONT - ZeroMemory( & cf, sizeof( CHOOSEFONT ) ); - cf.lStructSize = sizeof( CHOOSEFONT ); - cf.hwndOwner = itsParent->handle(); + cf.hwndOwner = getParentHandle(); cf.Flags = dwFlags | CF_INITTOLOGFONTSTRUCT; cf.lpLogFont = lplf; cf.rgbColors = rgbColors; @@ -103,8 +95,7 @@ return false; } -template< class Parent > -WidgetChooseFont< Parent >::WidgetChooseFont( Parent * parent ) +inline WidgetChooseFont::WidgetChooseFont( Widget * parent ) : itsParent( parent ) { } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetLoadFile.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -28,9 +28,8 @@ #ifndef WidgetLoadFile_h #define WidgetLoadFile_h -#include "../WindowsHeaders.h" +#include "../Widget.h" #include "../../SmartUtil.h" -#include "../FreeCommonDialog.h" #include "../aspects/AspectFileFilter.h" #include <vector> @@ -55,14 +54,12 @@ * and HWND in the Parent template parameter. <br> * the complete signature of the function will then be "HWND parent()" */ -template< class Parent > class WidgetLoadFile - : public virtual AspectFileFilter, - public WidgetFileCommon + : public AspectFileFilter { public: /// Class type - typedef WidgetLoadFile< Parent > ThisType; + typedef WidgetLoadFile ThisType; /// Object type /** Note, not a pointer!!!! @@ -90,23 +87,18 @@ std::vector<SmartUtil::tstring> showDialogMultiSelect(); // Constructor Taking pointer to parent - explicit WidgetLoadFile( Parent * parent = 0 ); + explicit WidgetLoadFile( Widget * parent = 0 ); - virtual ~WidgetLoadFile() - {} + virtual ~WidgetLoadFile() { } private: - Parent * itsParent; + Widget * itsParent; + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } }; -/// \ingroup GlobalStuff -/// A Free WidgetLoadFile dialog is a dialog which isn't "owned" by another Widget -typedef WidgetLoadFile< FreeCommonDialog > WidgetLoadFileFree; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -template< class Parent > -SmartUtil::tstring WidgetLoadFile< Parent >::showDialog() +inline SmartUtil::tstring WidgetLoadFile::showDialog() { TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name szFile[0] = '\0'; @@ -117,7 +109,7 @@ // function... You MUST supply a parent with a function "handle()" which // returns a HWND! All the Widgetxxx classes (except LoadFile, SaveFile and // MessageBox) have the "handle()" function... - fillOutCommonStructure( ofn, itsParent->handle(), OFN_FILEMUSTEXIST ); + fillOutCommonStructure( ofn, getParentHandle(), OFN_FILEMUSTEXIST ); ofn.lpstrFile = szFile; ofn.Flags |= OFN_FILEMUSTEXIST; @@ -130,8 +122,7 @@ return retVal; } -template< class Parent > -std::vector<SmartUtil::tstring> WidgetLoadFile<Parent>::showDialogMultiSelect() +inline std::vector<SmartUtil::tstring> WidgetLoadFile::showDialogMultiSelect() { TCHAR szFile[PATH_BUFFER_SIZE]; // buffer for file name szFile[0] = '\0'; @@ -141,7 +132,7 @@ // If this one fizzles you have NOT supplied a parent with a "handle()" function... // You MUST supply a parent with a function "handle()" which returns a HWND! // All the Widgetxxx classes (except LoadFile, SaveFile and MessageBox) have the "handle()" function... - fillOutCommonStructure( ofn, itsParent->handle(), OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT | OFN_EXPLORER ); + fillOutCommonStructure( ofn, getParentHandle(), OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT | OFN_EXPLORER ); ofn.lpstrFile = szFile; std::vector<SmartUtil::tstring> retVal; if( ::GetOpenFileName(&ofn) ) @@ -174,8 +165,7 @@ return retVal; } -template< class Parent > -WidgetLoadFile< Parent >::WidgetLoadFile( Parent * parent ) +inline WidgetLoadFile::WidgetLoadFile( Widget * parent ) : itsParent( parent ) {} Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMessageBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMessageBox.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMessageBox.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -117,7 +117,7 @@ * in the upper left corner ) */ RetVal show( const SmartUtil::tstring & body, - const SmartUtil::tstring & header = _T( "SmartWinMessageBox" ), + const SmartUtil::tstring & header = _T( "Message" ), Buttons buttons = BOX_OK, Icon icon = BOX_ICONINFORMATION ); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSaveFile.h 2008-03-29 07:13:41 UTC (rev 1077) @@ -28,9 +28,8 @@ #ifndef WidgetSaveFile_h #define WidgetSaveFile_h -#include "../WindowsHeaders.h" +#include "../Widget.h" #include "../../SmartUtil.h" -#include "../FreeCommonDialog.h" #include "../aspects/AspectFileFilter.h" namespace SmartWin @@ -54,14 +53,12 @@ * arguments returning an HWND. <br> * the complete signature of the function will then be "HWND parent();" */ -template< class Parent > class WidgetSaveFile - : public virtual AspectFileFilter, - public WidgetFileCommon + : public AspectFileFilter { public: /// Class type - typedef WidgetSaveFile< Parent > ThisType; + typedef WidgetSaveFile ThisType; /// Object type /** Note, not a pointer!!!! @@ -75,24 +72,20 @@ SmartUtil::tstring showDialog(); /// Constructor Taking pointer to parent - explicit WidgetSaveFile( Parent * parent = 0 ); + explicit WidgetSaveFile( Widget * parent = 0 ); virtual ~WidgetSaveFile() {} private: - Parent * itsParent; + Widget * itsParent; + HWND getParentHandle() { return itsParent ? itsParent->handle() : NULL; } }; -/// \ingroup GlobalStuff -/// A Free WidgetSaveFile dialog is a dialog which isn't "owned" by another Widget -typedef WidgetSaveFile< FreeCommonDialog > WidgetSaveFileFree; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -template< class Parent > -SmartUtil::tstring WidgetSaveFile< Parent >::showDialog() +inline SmartUtil::tstring WidgetSaveFile::showDialog() { TCHAR szFile[MAX_PATH + 1]; // buffer for file name szFile[0] = '\0'; @@ -103,7 +96,7 @@ // function... You MUST supply a parent with a function "handle()" which // returns a HWND! All the Widgetxxx classes (except LoadFile, SaveFile and // MessageBox) have the "handle()" function... - fillOutCommonStructure( ofn, itsParent->handle(), 0 ); // OFN_PATHMUSTEXIST ? + fillOutCommonStructure( ofn, getParentHandle(), 0 ); // OFN_PATHMUSTEXIST ? ofn.lpstrFile = szFile; SmartUtil::tstring retVal; @@ -115,8 +108,7 @@ return retVal; } -template< class Parent > -WidgetSaveFile< Parent >::WidgetSaveFile( Parent * parent ) +inline WidgetSaveFile::WidgetSaveFile( Widget * parent ) : itsParent( parent ) { } Modified: dcplusplus/trunk/smartwin/source/LibraryLoader.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/LibraryLoader.cpp 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/source/LibraryLoader.cpp 2008-03-29 07:13:41 UTC (rev 1077) @@ -120,9 +120,7 @@ LibraryLoader lib(_T("comctl32.dll")); DLLGETVERSIONPROC pDllGetVersion = (DLLGETVERSIONPROC)lib.getProcAddress(_T("DllGetVersion")); if(pDllGetVersion) { - DLLVERSIONINFO dvi; - ZeroMemory(&dvi, sizeof(dvi)); - dvi.cbSize = sizeof(dvi); + DLLVERSIONINFO dvi = { sizeof(dvi) }; if(SUCCEEDED((*pDllGetVersion)(&dvi))) return PACK_COMCTL_VERSION(dvi.dwMajorVersion, dvi.dwMinorVersion); } Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp 2008-03-29 07:13:41 UTC (rev 1077) @@ -22,8 +22,7 @@ tv.hParent = parent; tv.hInsertAfter = TVI_LAST; - TVITEMEX t; - ZeroMemory( & t, sizeof( TVITEM ) ); + TVITEMEX t = { 0 }; t.mask = TVIF_TEXT; if ( param != 0 ) { Modified: dcplusplus/trunk/win32/WinUtil.cpp =================================================================== --- dcplusplus/trunk/win32/WinUtil.cpp 2008-03-29 07:12:57 UTC (rev 1076) +++ dcplusplus/trunk/win32/WinUtil.cpp 2008-03-29 07:13:41 UTC (rev 1077) @@ -413,10 +413,9 @@ bool WinUtil::browseDirectory(tstring& target, HWND owner /* = NULL */) { TCHAR buf[MAX_PATH]; - BROWSEINFO bi; LPMALLOC ma; - ZeroMemory(&bi, sizeof(bi)); + BROWSEINFO bi = { 0 }; bi.hwndOwner = owner; bi.pszDisplayName = buf; @@ -433,10 +432,8 @@ if(target.size() > 0 && target[target.size()-1] != _T('\\')) target+=_T('\\'); - if(::SHGetMalloc(&ma) != E_FAIL) { - ma->Free(pidl); - ma->Release(); - } + ::CoTaskMemFree(pidl); + return true; } return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 07:12:59
|
Revision: 1076 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1076&view=rev Author: arnetheduck Date: 2008-03-29 00:12:57 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Count fix Modified Paths: -------------- dcplusplus/trunk/win32/HubFrame.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 22:52:56.621000051 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-27 09:21:21.841000080 +0100 committer: arn...@gm... properties: branch-nick: dcplusplus Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd Modified: dcplusplus/trunk/win32/HubFrame.cpp =================================================================== --- dcplusplus/trunk/win32/HubFrame.cpp 2008-03-29 07:12:33 UTC (rev 1075) +++ dcplusplus/trunk/win32/HubFrame.cpp 2008-03-29 07:12:57 UTC (rev 1076) @@ -930,9 +930,9 @@ tstring HubFrame::getStatusAverageShared() const { int64_t available; size_t userCount = 0; - if (users->getSelectedCount() > 1) { + if (users->countSelected() > 1) { available = users->forEachSelectedT(CountAvailable()).available; - userCount = users->getSelectedCount(); + userCount = users->countSelected(); } else { available = std::for_each(userMap.begin(), userMap.end(), CountAvailable()).available; for(UserMap::const_iterator i = userMap.begin(); i != userMap.end(); ++i){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 07:12:37
|
Revision: 1075 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1075&view=rev Author: arnetheduck Date: 2008-03-29 00:12:33 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Average share added Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/win32/HubFrame.cpp dcplusplus/trunk/win32/HubFrame.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 22:43:13.706000090 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-26 22:52:56.621000051 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2008-03-29 06:26:29 UTC (rev 1074) +++ dcplusplus/trunk/changelog.txt 2008-03-29 07:12:33 UTC (rev 1075) @@ -11,6 +11,7 @@ * Fixed background color of drop-down controls * Fixed selection glitches * Both up&downloads are disconnected if evil users quit (thanks poy) +* Add average share to status bar (thanks mikejj) -- 0.705 2008-03-14 -- * Several patches for better *nix compatibility of the core (thanks steven sheehy et al) Modified: dcplusplus/trunk/win32/HubFrame.cpp =================================================================== --- dcplusplus/trunk/win32/HubFrame.cpp 2008-03-29 06:26:29 UTC (rev 1074) +++ dcplusplus/trunk/win32/HubFrame.cpp 2008-03-29 07:12:33 UTC (rev 1075) @@ -243,6 +243,7 @@ void HubFrame::updateStatus() { setStatus(STATUS_USERS, getStatusUsers()); setStatus(STATUS_SHARED, getStatusShared()); + setStatus(STATUS_AVERAGE_SHARED, getStatusAverageShared()); } void HubFrame::initSecond() { @@ -926,7 +927,24 @@ return textForUsers + str(TFN_("%1% user", "%1% users", userCount) % userCount); } +tstring HubFrame::getStatusAverageShared() const { + int64_t available; + size_t userCount = 0; + if (users->getSelectedCount() > 1) { + available = users->forEachSelectedT(CountAvailable()).available; + userCount = users->getSelectedCount(); + } else { + available = std::for_each(userMap.begin(), userMap.end(), CountAvailable()).available; + for(UserMap::const_iterator i = userMap.begin(); i != userMap.end(); ++i){ + UserInfo* ui = i->second; + if(!ui->isHidden()) + userCount++; + } + } + return str(TF_("Average: %1%") % Text::toT(Util::formatBytes(userCount > 0 ? available / userCount : 0))); +} + void HubFrame::on(FavoriteManagerListener::UserAdded, const FavoriteUser& /*aUser*/) throw() { resortForFavsFirst(); } Modified: dcplusplus/trunk/win32/HubFrame.h =================================================================== --- dcplusplus/trunk/win32/HubFrame.h 2008-03-29 06:26:29 UTC (rev 1074) +++ dcplusplus/trunk/win32/HubFrame.h 2008-03-29 07:12:33 UTC (rev 1075) @@ -47,6 +47,7 @@ STATUS_STATUS, STATUS_USERS, STATUS_SHARED, + STATUS_AVERAGE_SHARED, STATUS_SHOW_USERS, STATUS_LAST }; @@ -208,6 +209,7 @@ tstring getStatusUsers() const; tstring getStatusShared() const; + tstring getStatusAverageShared() const; void updateStatus(); void initSecond(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:26:33
|
Revision: 1074 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1074&view=rev Author: arnetheduck Date: 2008-03-28 23:26:29 -0700 (Fri, 28 Mar 2008) Log Message: ----------- Update DI handling Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/dcpp/AdcHub.cpp dcplusplus/trunk/dcpp/AdcHub.h dcplusplus/trunk/dcpp/ClientManager.cpp dcplusplus/trunk/dcpp/ClientManager.h dcplusplus/trunk/dcpp/ConnectionManager.cpp dcplusplus/trunk/dcpp/ConnectionManager.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 22:32:57.963999987 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-26 22:43:13.706000090 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/widgets/Button.h 844@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Faspects%2FAspectButton.h smartwin/source/widgets/Button.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetButton.cpp + Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2008-03-29 06:25:50 UTC (rev 1073) +++ dcplusplus/trunk/changelog.txt 2008-03-29 06:26:29 UTC (rev 1074) @@ -10,6 +10,7 @@ * Upgraded to bzip2 1.0.5 (thanks mikejj) * Fixed background color of drop-down controls * Fixed selection glitches +* Both up&downloads are disconnected if evil users quit (thanks poy) -- 0.705 2008-03-14 -- * Several patches for better *nix compatibility of the core (thanks steven sheehy et al) Modified: dcplusplus/trunk/dcpp/AdcHub.cpp =================================================================== --- dcplusplus/trunk/dcpp/AdcHub.cpp 2008-03-29 06:25:50 UTC (rev 1073) +++ dcplusplus/trunk/dcpp/AdcHub.cpp 2008-03-29 06:26:29 UTC (rev 1074) @@ -88,7 +88,7 @@ return 0; } -void AdcHub::putUser(const uint32_t aSID) { +void AdcHub::putUser(const uint32_t aSID, bool disconnect) { OnlineUser* ou = 0; { Lock l(cs); @@ -100,7 +100,7 @@ } if(aSID != AdcCommand::HUB_SID) - ClientManager::getInstance()->putOffline(ou); + ClientManager::getInstance()->putOffline(ou, disconnect); fire(ClientListener::UserRemoved(), this, *ou); delete ou; @@ -286,12 +286,8 @@ fire(ClientListener::StatusMessage(), this, tmp, ClientListener::FLAG_IS_SPAM); } - if(c.hasFlag("DI", 1)) { - ConnectionManager::getInstance()->disconnect(victim->getUser(), false); - } + putUser(s, c.getParam("DI", 1, tmp)); - putUser(s); - if(s == sid) { if(c.getParam("TL", 1, tmp)) { if(tmp == "-1") { Modified: dcplusplus/trunk/dcpp/AdcHub.h =================================================================== --- dcplusplus/trunk/dcpp/AdcHub.h 2008-03-29 06:25:50 UTC (rev 1073) +++ dcplusplus/trunk/dcpp/AdcHub.h 2008-03-29 06:26:29 UTC (rev 1074) @@ -89,7 +89,7 @@ OnlineUser& getUser(const uint32_t aSID, const CID& aCID); OnlineUser* findUser(const uint32_t sid) const; OnlineUser* findUser(const CID& cid) const; - void putUser(const uint32_t sid); + void putUser(const uint32_t sid, bool disconnect); void clearUsers(); Modified: dcplusplus/trunk/dcpp/ClientManager.cpp =================================================================== --- dcplusplus/trunk/dcpp/ClientManager.cpp 2008-03-29 06:25:50 UTC (rev 1073) +++ dcplusplus/trunk/dcpp/ClientManager.cpp 2008-03-29 06:26:29 UTC (rev 1074) @@ -23,6 +23,7 @@ #include "ShareManager.h" #include "SearchManager.h" +#include "ConnectionManager.h" #include "CryptoManager.h" #include "FavoriteManager.h" #include "SimpleXML.h" @@ -258,7 +259,7 @@ } } -void ClientManager::putOffline(OnlineUser* ou) throw() { +void ClientManager::putOffline(OnlineUser* ou, bool disconnect) throw() { bool lastUser = false; { Lock l(cs); @@ -275,8 +276,11 @@ } if(lastUser) { - ou->getUser()->unsetFlag(User::ONLINE); - fire(ClientManagerListener::UserDisconnected(), ou->getUser()); + UserPtr& u = ou->getUser(); + u->unsetFlag(User::ONLINE); + if(disconnect) + ConnectionManager::getInstance()->disconnect(u); + fire(ClientManagerListener::UserDisconnected(), u); } } Modified: dcplusplus/trunk/dcpp/ClientManager.h =================================================================== --- dcplusplus/trunk/dcpp/ClientManager.h 2008-03-29 06:25:50 UTC (rev 1073) +++ dcplusplus/trunk/dcpp/ClientManager.h 2008-03-29 06:26:29 UTC (rev 1074) @@ -75,7 +75,7 @@ CID makeCid(const string& nick, const string& hubUrl) const throw(); void putOnline(OnlineUser* ou) throw(); - void putOffline(OnlineUser* ou) throw(); + void putOffline(OnlineUser* ou, bool disconnect = false) throw(); UserPtr& getMe(); Modified: dcplusplus/trunk/dcpp/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/dcpp/ConnectionManager.cpp 2008-03-29 06:25:50 UTC (rev 1073) +++ dcplusplus/trunk/dcpp/ConnectionManager.cpp 2008-03-29 06:26:29 UTC (rev 1074) @@ -679,6 +679,15 @@ putConnection(aSource); } +void ConnectionManager::disconnect(const UserPtr& aUser) { + Lock l(cs); + for(UserConnectionList::iterator i = userConnections.begin(); i != userConnections.end(); ++i) { + UserConnection* uc = *i; + if(uc->getUser() == aUser) + uc->disconnect(true); + } +} + void ConnectionManager::disconnect(const UserPtr& aUser, int isDownload) { Lock l(cs); for(UserConnectionList::iterator i = userConnections.begin(); i != userConnections.end(); ++i) { Modified: dcplusplus/trunk/dcpp/ConnectionManager.h =================================================================== --- dcplusplus/trunk/dcpp/ConnectionManager.h 2008-03-29 06:25:50 UTC (rev 1073) +++ dcplusplus/trunk/dcpp/ConnectionManager.h 2008-03-29 06:26:29 UTC (rev 1074) @@ -108,6 +108,7 @@ void getDownloadConnection(const UserPtr& aUser); void force(const UserPtr& aUser); + void disconnect(const UserPtr& aUser); // disconnect downloads and uploads void disconnect(const UserPtr& aUser, int isDownload); void shutdown(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:25:52
|
Revision: 1073 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1073&view=rev Author: arnetheduck Date: 2008-03-28 23:25:50 -0700 (Fri, 28 Mar 2008) Log Message: ----------- Make buttons inherit differently Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectClickable.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCheckBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetGroupBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h dcplusplus/trunk/win32/ADLSProperties.cpp dcplusplus/trunk/win32/ADLSearchFrame.cpp dcplusplus/trunk/win32/ADLSearchFrame.h dcplusplus/trunk/win32/Appearance2Page.cpp dcplusplus/trunk/win32/CommandDlg.cpp dcplusplus/trunk/win32/DirectoryListingFrame.cpp dcplusplus/trunk/win32/DirectoryListingFrame.h dcplusplus/trunk/win32/FavHubProperties.cpp dcplusplus/trunk/win32/FavHubsFrame.cpp dcplusplus/trunk/win32/FavHubsFrame.h dcplusplus/trunk/win32/HashProgressDlg.cpp dcplusplus/trunk/win32/HubListsDlg.cpp dcplusplus/trunk/win32/MagnetDlg.cpp dcplusplus/trunk/win32/PublicHubsFrame.cpp dcplusplus/trunk/win32/PublicHubsFrame.h dcplusplus/trunk/win32/SearchFrame.cpp dcplusplus/trunk/win32/SearchFrame.h dcplusplus/trunk/win32/SettingsDialog.cpp dcplusplus/trunk/win32/UploadPage.cpp dcplusplus/trunk/win32/WinUtil.cpp dcplusplus/trunk/win32/WinUtil.h Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h dcplusplus/trunk/smartwin/source/widgets/Button.cpp Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetButton.h dcplusplus/trunk/smartwin/source/widgets/WidgetButton.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 18:28:21.986000061 +0100 committer: zouzou123gen properties: branch-nick: bzr + timestamp: 2008-03-26 22:32:57.963999987 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - + smartwin/include/smartwin/widgets/Button.h 844@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Faspects%2FAspectButton.h smartwin/source/widgets/Button.cpp 800@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Fsource%2Fwidgets%2FWidgetButton.cpp Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -29,7 +29,7 @@ #define WidgetFactory_h #include "../SmartUtil.h" -#include "widgets/WidgetButton.h" +#include "widgets/Button.h" #include "widgets/WidgetCheckBox.h" #include "widgets/WidgetChooseColor.h" #include "widgets/WidgetChooseFolder.h" @@ -76,8 +76,8 @@ * MessageMapPolicyNormalWidget, if this is a Widget constructed from a dialog * resource, you must state so by adding SmartWin::MessageMapPolicyDialogWidget and * if it is a MDI Child you must add SmartWin::MessageMapPolicyMDIChildWidget as the - * third argument Then when you need e.g. a WidgetButton you would create that - * button by calling createWidgetButton. Class contains type defs for your + * third argument Then when you need e.g. a Button you would create that + * button by calling createButton. Class contains type defs for your * convenience for all Widget types that exists in the SmartWin library.< /p > Note! * <br> * It is CRUCIAL that you DON'T explicitly delete any of the objects returned from @@ -130,10 +130,10 @@ typedef typename WidgetStatusBarSections::ObjectType WidgetStatusBarSectionsPtr; /// Button class type. - typedef SmartWin::WidgetButton WidgetButton; + typedef SmartWin::Button Button; /// Button object type. - typedef typename WidgetButton::ObjectType WidgetButtonPtr; + typedef typename Button::ObjectType ButtonPtr; /// MDIWindow class type. typedef SmartWin::WidgetMDIParent WidgetMDIParent; @@ -345,7 +345,7 @@ /// Creates a Button Control and returns a pointer to it. /** DON'T delete the returned pointer!!! */ - WidgetButtonPtr createButton( const typename WidgetButton::Seed & cs = WidgetButton::Seed() ); + ButtonPtr createButton( const typename Button::Seed & cs = Button::Seed() ); /// Creates a Button Control and returns a pointer to it. /** DON'T delete the returned pointer!!! @@ -382,7 +382,7 @@ /** DON'T delete the returned pointer!!!< br > * Use e.g. the Dialog Designer to design a dialog and attach the controls with this function. */ - WidgetButtonPtr attachButton( unsigned id ); + ButtonPtr attachButton( unsigned id ); /// \ingroup SubclassDialog /// Subclasses a Progress Bar Control from the given resource id. @@ -592,10 +592,10 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetButtonPtr - WidgetFactory< ContainerWidgetType >::createButton( const typename WidgetButton::Seed & cs ) +typename WidgetFactory< ContainerWidgetType >::ButtonPtr + WidgetFactory< ContainerWidgetType >::createButton( const Button::Seed & cs ) { - return WidgetCreator< WidgetButton >::create( this, cs ); + return WidgetCreator< Button >::create( this, cs ); } template<typename ContainerWidgetType> @@ -641,10 +641,10 @@ } template<typename ContainerWidgetType> -typename WidgetFactory< ContainerWidgetType >::WidgetButtonPtr +typename WidgetFactory< ContainerWidgetType >::ButtonPtr WidgetFactory< ContainerWidgetType >::attachButton( unsigned id ) { - return WidgetCreator< WidgetButton >::attach( this, id ); + return WidgetCreator< Button >::attach( this, id ); } template<typename ContainerWidgetType> Deleted: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -1,75 +0,0 @@ -#ifndef ASPECTBUTTON_H_ -#define ASPECTBUTTON_H_ - -#include "AspectColor.h" -#include "AspectClickable.h" -#include "AspectDblClickable.h" -#include "AspectFocus.h" -#include "AspectFont.h" -#include "AspectPainting.h" -#include "AspectText.h" -#include "../widgets/Control.h" - -namespace SmartWin { -/** Common stuff for all buttons */ -template<typename WidgetType> -class AspectButton : - public AspectClickable<WidgetType>, - public AspectColor<WidgetType>, - public AspectColorCtlImpl<WidgetType>, - public Control, - public AspectDblClickable<WidgetType>, - public AspectFocus< WidgetType >, - public AspectFont< WidgetType >, - public AspectPainting< WidgetType >, - public AspectText< WidgetType > -{ - WidgetType& W() { return *static_cast<WidgetType*>(this); } -public: - /// Class type - typedef WidgetType ThisType; - - /// Object type - typedef ThisType* ObjectType; - - // Contract needed by AspectClickable Aspect class - Message getClickMessage(); - - // Contract needed by AspectDblClickable Aspect class - Message getDblClickMessage(); - - template<typename SeedType> - void create(const SeedType& cs); - -protected: - typedef AspectButton<WidgetType> ButtonType; - - AspectButton(Widget* parent); -}; - -template<typename WidgetType> -Message AspectButton<WidgetType>::getClickMessage() { - return Message( WM_COMMAND, MAKEWPARAM(static_cast<WidgetType*>(this)->getControlId(), BN_CLICKED) ); -} - -template<typename WidgetType> -Message AspectButton<WidgetType>::getDblClickMessage() { - return Message( WM_COMMAND, MAKEWPARAM(static_cast<WidgetType*>(this)->getControlId(), BN_DBLCLK) ); -} - -template<typename WidgetType> -AspectButton<WidgetType>::AspectButton(Widget* parent) : ControlType(parent) { - -} - -template<typename WidgetType> -template<typename SeedType> -void AspectButton<WidgetType>::create( const SeedType & cs ) { - ControlType::create(cs); - if(cs.font) - setFont( cs.font ); -} - -} - -#endif /*ASPECTBUTTON_H_*/ Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectClickable.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectClickable.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectClickable.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -36,7 +36,7 @@ /// Aspect class used by Widgets that have the possibility of being "clicked". /** \ingroup AspectClasses - * E.g. the WidgetButton have a "clicked" Aspect therefore it realizes the + * E.g. the Button have a "clicked" Aspect therefore it realizes the * AspectClickable through inheritance. When you click a Widget which realizes this * Aspect the onClicked event will be raised. */ Copied: dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h (from rev 1072, dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -0,0 +1,88 @@ +#ifndef ASPECTBUTTON_H_ +#define ASPECTBUTTON_H_ + +#include "../aspects/AspectColor.h" +#include "../aspects/AspectClickable.h" +#include "../aspects/AspectDblClickable.h" +#include "../aspects/AspectFocus.h" +#include "../aspects/AspectFont.h" +#include "../aspects/AspectPainting.h" +#include "../aspects/AspectText.h" +#include "Control.h" + +namespace SmartWin { + +// Forward declaring friends +template< class WidgetType > +class WidgetCreator; + +/** Common stuff for all buttons */ +class Button : + public Control, + public AspectClickable<Button>, + public AspectColor<Button>, + public AspectColorCtlImpl<Button>, + public AspectDblClickable<Button>, + public AspectFocus< Button >, + public AspectFont< Button >, + public AspectPainting< Button >, + public AspectText< Button > +{ + friend class WidgetCreator<Button>; +public: + /// Class type + typedef Button ThisType; + + /// Object type + typedef ThisType* ObjectType; + + /// Seed class + /** This class contains all of the values needed to create the widget. It also + * knows the type of the class whose seed values it contains. Every widget + * should define one of these. + */ + class Seed : public Widget::Seed { + public: + FontPtr font; + + /// Fills with default parameters + Seed(const SmartUtil::tstring& caption_ = SmartUtil::tstring()); + }; + + // Contract needed by AspectClickable Aspect class + Message getClickMessage(); + + // Contract needed by AspectDblClickable Aspect class + Message getDblClickMessage(); + + template<typename SeedType> + void create(const SeedType& cs); + +protected: + typedef Button ButtonType; + + Button(Widget* parent); +}; + +inline Message Button::getClickMessage() { + return Message( WM_COMMAND, MAKEWPARAM(getControlId(), BN_CLICKED) ); +} + +inline Message Button::getDblClickMessage() { + return Message( WM_COMMAND, MAKEWPARAM(getControlId(), BN_DBLCLK) ); +} + +inline Button::Button(Widget* parent) : ControlType(parent) { + +} + +template<typename SeedType> +void Button::create( const SeedType & cs ) { + ControlType::create(cs); + if(cs.font) + setFont( cs.font ); +} + +} + +#endif /*ASPECTBUTTON_H_*/ Deleted: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetButton.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetButton.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -1,90 +0,0 @@ -/* - Copyright ( c ) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met : - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef WidgetButton_h -#define WidgetButton_h - -#include "../Widget.h" -#include "../aspects/AspectButton.h" - -namespace SmartWin -{ -// begin namespace SmartWin - -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - -/// Button Control class -/** \ingroup WidgetControls - * \WidgetUsageInfo - * \image html button.PNG - * Class for creating a button control Widget. <br> - * A button is a Widget which can be pressed, it can contain descriptive text etc. - */ -class WidgetButton : - // Aspects - public AspectButton< WidgetButton > -{ - friend class WidgetCreator< WidgetButton >; -public: - /// Seed class - /** This class contains all of the values needed to create the widget. It also - * knows the type of the class whose seed values it contains. Every widget - * should define one of these. - */ - class Seed : public Widget::Seed { - public: - FontPtr font; - - /// Fills with default parameters - Seed(const SmartUtil::tstring& caption_ = SmartUtil::tstring()); - }; - -protected: - /// Constructor Taking pointer to parent - explicit WidgetButton( Widget * parent ); - - // Protected to avoid direct instantiation, you can inherit and use - // WidgetCreator class which is friend - virtual ~WidgetButton() - {} -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Implementation of class -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -inline WidgetButton::WidgetButton( Widget * parent ) - : ButtonType( parent ) -{ -} - -// end namespace SmartWin -} - -#endif Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCheckBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCheckBox.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCheckBox.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -29,7 +29,7 @@ #define WidgetCheckBox_h #include "../Widget.h" -#include "../aspects/AspectButton.h" +#include "Button.h" namespace SmartWin { @@ -50,17 +50,22 @@ */ class WidgetCheckBox : // Aspect classes - public AspectButton< WidgetCheckBox > + public Button { friend class WidgetCreator< WidgetCheckBox >; public: + /// Class type + typedef WidgetCheckBox ThisType; + + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget - * should define one of these. + * should define one of these. */ - class Seed : public Widget::Seed - { + class Seed : public Widget::Seed { public: FontPtr font; Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -38,7 +38,7 @@ #include "../aspects/AspectSizable.h" #include "../aspects/AspectVisible.h" #include "../xCeption.h" -#include "WidgetButton.h" +#include "Button.h" #include "WidgetCheckBox.h" #include "WidgetComboBox.h" #include "WidgetDateTimePicker.h" @@ -47,6 +47,7 @@ #include "WidgetSpinner.h" #include "WidgetTextBox.h" #include "WidgetTreeView.h" +#include "WidgetRadioButton.h" namespace SmartWin { @@ -121,7 +122,7 @@ typedef WidgetTextBox::ObjectType WidgetTextBoxPtr; /// Button object type. - typedef WidgetButton::ObjectType WidgetButtonPtr; + typedef Button::ObjectType ButtonPtr; /// Button object type. typedef WidgetTreeView::ObjectType WidgetTreeViewPtr; Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetGroupBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetGroupBox.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetGroupBox.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -29,11 +29,8 @@ #define WidgetGroupBox_h #include "../Widget.h" -#include "../aspects/AspectButton.h" -#include "WidgetRadioButton.h" +#include "Button.h" -#include <vector> - namespace SmartWin { // begin namespace SmartWin @@ -53,19 +50,22 @@ * add up your WidgetRadioButtons into an object of this type */ class WidgetGroupBox : - // Aspects - public AspectButton< WidgetGroupBox > + public Button { friend class WidgetCreator< WidgetGroupBox >; public: + /// Class type + typedef WidgetGroupBox ThisType; + + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget - * should define one of these. + * should define one of these. */ - class Seed - : public Widget::Seed - { + class Seed : public Widget::Seed { public: FontPtr font; @@ -73,57 +73,25 @@ Seed(const SmartUtil::tstring& caption_ = SmartUtil::tstring()); }; - /// Add a radio button to the group box - void addChild( WidgetRadioButton::ObjectType btn ); - protected: /// Constructor Taking pointer to parent - explicit WidgetGroupBox( SmartWin::Widget * parent ); + explicit WidgetGroupBox( Widget * parent ); // Protected to avoid direct instantiation, you can inherit and use // WidgetFactory class which is friend virtual ~WidgetGroupBox() {} -private: - std::vector< WidgetRadioButton::ObjectType > itsChildrenBtns; }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline WidgetGroupBox::WidgetGroupBox( SmartWin::Widget * parent ) +inline WidgetGroupBox::WidgetGroupBox( Widget * parent ) : ButtonType( parent ) { } - -inline void WidgetGroupBox::addChild( WidgetRadioButton::ObjectType btn ) -{ - itsChildrenBtns.push_back( btn ); -} - -#ifdef PORT_ME - -LRESULT WidgetGroupBox::sendWidgetMessage( HWND hWnd, UINT msg, WPARAM & wPar, LPARAM & lPar ) -{ - switch ( msg ) - { - // Checking to see if it's a click event which should be routed to one of the children - case WM_COMMAND : - { - for ( typename std::list< typename WidgetRadioButton::ObjectType >::iterator idx = itsChildrenBtns.begin(); - idx != itsChildrenBtns.end(); - ++idx ) - { - if ( reinterpret_cast< HANDLE >( lPar ) == ( * idx )->handle() ) - return ( * idx )->sendWidgetMessage( hWnd, msg, wPar, lPar ); - } - } - } - return MessageMapType::sendWidgetMessage( hWnd, msg, wPar, lPar ); -} -#endif // end namespace SmartWin } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -29,7 +29,7 @@ #define WidgetRadioButton_h #include "../Widget.h" -#include "../aspects/AspectButton.h" +#include "Button.h" namespace SmartWin { @@ -54,18 +54,22 @@ */ class WidgetRadioButton : // Aspects - public AspectButton< WidgetRadioButton > + public Button { friend class WidgetCreator< WidgetRadioButton >; public: + /// Class type + typedef WidgetRadioButton ThisType; + + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget * should define one of these. */ - class Seed - : public Widget::Seed - { + class Seed : public Widget::Seed { public: FontPtr font; Copied: dcplusplus/trunk/smartwin/source/widgets/Button.cpp (from rev 1072, dcplusplus/trunk/smartwin/source/widgets/WidgetButton.cpp) =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/Button.cpp (rev 0) +++ dcplusplus/trunk/smartwin/source/widgets/Button.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -0,0 +1,11 @@ +#include "../../include/smartwin/widgets/Button.h" + +namespace SmartWin { + +Button::Seed::Seed(const SmartUtil::tstring& caption) : + Widget::Seed(WC_BUTTON, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, caption), + font(new Font(DefaultGuiFont)) +{ +} + +} Deleted: dcplusplus/trunk/smartwin/source/widgets/WidgetButton.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/WidgetButton.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/smartwin/source/widgets/WidgetButton.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -1,11 +0,0 @@ -#include "../../include/smartwin/widgets/WidgetButton.h" - -namespace SmartWin { - -WidgetButton::Seed::Seed(const SmartUtil::tstring& caption) : - Widget::Seed(WC_BUTTON, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, caption), - font(new Font(DefaultGuiFont)) -{ -} - -} Modified: dcplusplus/trunk/win32/ADLSProperties.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSProperties.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/ADLSProperties.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -88,7 +88,7 @@ autoQueue->setText(T_("Download Matches")); autoQueue->setChecked(search->isAutoQueue); - WidgetButtonPtr button = attachButton(IDOK); + ButtonPtr button = attachButton(IDOK); button->onClicked(std::tr1::bind(&ADLSProperties::handleOKClicked, this)); button = attachButton(IDCANCEL); Modified: dcplusplus/trunk/win32/ADLSearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -62,7 +62,7 @@ } { - WidgetButton::Seed cs = WinUtil::Seeds::button; + Button::Seed cs = WinUtil::Seeds::button; cs.caption = T_("&New..."); add = createButton(cs); Modified: dcplusplus/trunk/win32/ADLSearchFrame.h =================================================================== --- dcplusplus/trunk/win32/ADLSearchFrame.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/ADLSearchFrame.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -57,12 +57,12 @@ static int columnIndexes[COLUMN_LAST]; WidgetListViewPtr items; - WidgetButtonPtr add; - WidgetButtonPtr properties; - WidgetButtonPtr up; - WidgetButtonPtr down; - WidgetButtonPtr remove; - WidgetButtonPtr help; + ButtonPtr add; + ButtonPtr properties; + ButtonPtr up; + ButtonPtr down; + ButtonPtr remove; + ButtonPtr help; void handleAdd(); void handleProperties(); Modified: dcplusplus/trunk/win32/Appearance2Page.cpp =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -82,7 +82,7 @@ example->setColor(fg, bg); example->setFont(font); - WidgetButtonPtr button = attachButton(IDC_SELWINCOLOR); + ButtonPtr button = attachButton(IDC_SELWINCOLOR); button->onClicked(std::tr1::bind(&Appearance2Page::handleBackgroundClicked, this)); button = attachButton(IDC_SELTEXT); Modified: dcplusplus/trunk/win32/CommandDlg.cpp =================================================================== --- dcplusplus/trunk/win32/CommandDlg.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/CommandDlg.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -148,7 +148,7 @@ openHelp->setChecked(bOpenHelp); { - WidgetButtonPtr button = attachButton(IDOK); + ButtonPtr button = attachButton(IDOK); button->setText(T_("OK")); button->onClicked(std::tr1::bind(&CommandDlg::handleOKClicked, this)); Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp =================================================================== --- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -153,7 +153,7 @@ } { - WidgetButton::Seed cs = WinUtil::Seeds::button; + Button::Seed cs = WinUtil::Seeds::button; cs.caption = T_("Find"); find = createButton(cs); Modified: dcplusplus/trunk/win32/DirectoryListingFrame.h =================================================================== --- dcplusplus/trunk/win32/DirectoryListingFrame.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/DirectoryListingFrame.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -137,10 +137,10 @@ WidgetFilesPtr files; WidgetVPanedPtr paned; - WidgetButtonPtr find; - WidgetButtonPtr findNext; - WidgetButtonPtr listDiff; - WidgetButtonPtr matchQueue; + ButtonPtr find; + ButtonPtr findNext; + ButtonPtr listDiff; + ButtonPtr matchQueue; int64_t speed; /**< Speed at which this file list was downloaded */ Modified: dcplusplus/trunk/win32/FavHubProperties.cpp =================================================================== --- dcplusplus/trunk/win32/FavHubProperties.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/FavHubProperties.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -79,7 +79,7 @@ userDescription->setTextLimit(35); userDescription->setText(Text::toT(entry->getUserDescription())); - WidgetButtonPtr button = attachButton(IDOK); + ButtonPtr button = attachButton(IDOK); button->onClicked(std::tr1::bind(&FavHubProperties::handleOKClicked, this)); button = attachButton(IDCANCEL); Modified: dcplusplus/trunk/win32/FavHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -66,7 +66,7 @@ } { - WidgetButton::Seed cs = WinUtil::Seeds::button; + Button::Seed cs = WinUtil::Seeds::button; cs.caption = T_("&Connect"); connect = createButton(cs); Modified: dcplusplus/trunk/win32/FavHubsFrame.h =================================================================== --- dcplusplus/trunk/win32/FavHubsFrame.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/FavHubsFrame.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -63,12 +63,12 @@ static int columnIndexes[COLUMN_LAST]; WidgetListViewPtr hubs; - WidgetButtonPtr connect; - WidgetButtonPtr add; - WidgetButtonPtr properties; - WidgetButtonPtr up; - WidgetButtonPtr down; - WidgetButtonPtr remove; + ButtonPtr connect; + ButtonPtr add; + ButtonPtr properties; + ButtonPtr up; + ButtonPtr down; + ButtonPtr remove; bool nosave; Modified: dcplusplus/trunk/win32/HashProgressDlg.cpp =================================================================== --- dcplusplus/trunk/win32/HashProgressDlg.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/HashProgressDlg.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -46,7 +46,7 @@ progress = attachProgressBar(IDC_HASH_PROGRESS); progress->setRange(0, 10000); - WidgetButtonPtr ok = attachButton(IDOK); + ButtonPtr ok = attachButton(IDOK); ok->setText(T_("Run in background")); ok->onClicked(std::tr1::bind(&HashProgressDlg::endDialog, this, IDOK)); Modified: dcplusplus/trunk/win32/HubListsDlg.cpp =================================================================== --- dcplusplus/trunk/win32/HubListsDlg.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/HubListsDlg.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -59,7 +59,7 @@ hubLists->onDblClicked(std::tr1::bind(&HubListsDlg::handleDoubleClick, this)); hubLists->onKeyDown(std::tr1::bind(&HubListsDlg::handleKeyDown, this, _1)); - WidgetButtonPtr button = attachButton(IDC_LIST_ADD); + ButtonPtr button = attachButton(IDC_LIST_ADD); button->setText(T_("&Add")); button->onClicked(std::tr1::bind(&HubListsDlg::handleAddClicked, this)); Modified: dcplusplus/trunk/win32/MagnetDlg.cpp =================================================================== --- dcplusplus/trunk/win32/MagnetDlg.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/MagnetDlg.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -68,7 +68,7 @@ ::CheckRadioButton(handle(), IDC_MAGNET_1_QUEUE, IDC_MAGNET_3_NOTHING, IDC_MAGNET_2_SEARCH); - WidgetButtonPtr button = attachButton(IDOK); + ButtonPtr button = attachButton(IDOK); button->onClicked(std::tr1::bind(&MagnetDlg::handleOKClicked, this)); button = attachButton(IDCANCEL); Modified: dcplusplus/trunk/win32/PublicHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -147,7 +147,7 @@ } { - WidgetButton::Seed cs = WinUtil::Seeds::button; + Button::Seed cs = WinUtil::Seeds::button; cs.caption = T_("&Configure"); configure = createButton(cs); Modified: dcplusplus/trunk/win32/PublicHubsFrame.h =================================================================== --- dcplusplus/trunk/win32/PublicHubsFrame.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/PublicHubsFrame.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -96,10 +96,10 @@ typedef WidgetHubs* WidgetHubsPtr; WidgetHubsPtr hubs; - WidgetButtonPtr configure; - WidgetButtonPtr refresh; - WidgetButtonPtr lists; - WidgetButtonPtr filterDesc; + ButtonPtr configure; + ButtonPtr refresh; + ButtonPtr lists; + ButtonPtr filterDesc; WidgetTextBoxPtr filter; WidgetComboBoxPtr pubLists; WidgetComboBoxPtr filterSel; Modified: dcplusplus/trunk/win32/SearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -144,7 +144,7 @@ } { - WidgetButton::Seed cs = WinUtil::Seeds::button; + Button::Seed cs = WinUtil::Seeds::button; cs.caption = T_("Purge"); purge = createButton(cs); purge->setHelpId(IDH_SEARCH_PURGE); Modified: dcplusplus/trunk/win32/SearchFrame.h =================================================================== --- dcplusplus/trunk/win32/SearchFrame.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/SearchFrame.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -156,7 +156,7 @@ WidgetStaticPtr searchLabel; WidgetComboBoxPtr searchBox; - WidgetButtonPtr purge; + ButtonPtr purge; WidgetStaticPtr sizeLabel; WidgetComboBoxPtr mode; @@ -175,7 +175,7 @@ typedef WidgetHubs* WidgetHubsPtr; WidgetHubsPtr hubs; - WidgetButtonPtr doSearch; + ButtonPtr doSearch; typedef TypedListView<SearchInfo> WidgetResults; typedef WidgetResults* WidgetResultsPtr; Modified: dcplusplus/trunk/win32/SettingsDialog.cpp =================================================================== --- dcplusplus/trunk/win32/SettingsDialog.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/SettingsDialog.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -74,7 +74,7 @@ pageTree->onSelectionChanged(std::tr1::bind(&SettingsDialog::selectionChanged, this)); { - WidgetButtonPtr button = attachButton(IDOK); + ButtonPtr button = attachButton(IDOK); button->setText(T_("OK")); button->onClicked(std::tr1::bind(&SettingsDialog::handleOKClicked, this)); Modified: dcplusplus/trunk/win32/UploadPage.cpp =================================================================== --- dcplusplus/trunk/win32/UploadPage.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/UploadPage.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -111,7 +111,7 @@ total = attachStatic(IDC_TOTAL); total->setText(Text::toT(Util::formatBytes(ShareManager::getInstance()->getShareSize()))); - WidgetButtonPtr button = attachButton(IDC_RENAME); + ButtonPtr button = attachButton(IDC_RENAME); button->onClicked(std::tr1::bind(&UploadPage::handleRenameClicked, this)); button = attachButton(IDC_REMOVE); Modified: dcplusplus/trunk/win32/WinUtil.cpp =================================================================== --- dcplusplus/trunk/win32/WinUtil.cpp 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/WinUtil.cpp 2008-03-29 06:25:50 UTC (rev 1073) @@ -58,7 +58,7 @@ WinUtil::ImageMap WinUtil::fileIndexes; DWORD WinUtil::helpCookie = 0; -const SmartWin::WidgetButton::Seed WinUtil::Seeds::button; +const SmartWin::Button::Seed WinUtil::Seeds::button; const SmartWin::WidgetComboBox::Seed WinUtil::Seeds::comboBoxStatic; const SmartWin::WidgetComboBox::Seed WinUtil::Seeds::comboBoxEdit; const SmartWin::WidgetListView::Seed WinUtil::Seeds::listView; @@ -120,7 +120,7 @@ } // Const so that noone else will change them after they've been initialized - //SmartWin::WidgetButton::Seed& xbutton = const_cast<SmartWin::WidgetButton::Seed&>(Seeds::button); + //SmartWin::Button::Seed& xbutton = const_cast<SmartWin::Button::Seed&>(Seeds::button); SmartWin::WidgetComboBox::Seed& xcomboBoxEdit = const_cast<SmartWin::WidgetComboBox::Seed&>(Seeds::comboBoxEdit); SmartWin::WidgetComboBox::Seed& xcomboBoxStatic = const_cast<SmartWin::WidgetComboBox::Seed&>(Seeds::comboBoxStatic); SmartWin::WidgetListView::Seed& xlistView = const_cast<SmartWin::WidgetListView::Seed&>(Seeds::listView); Modified: dcplusplus/trunk/win32/WinUtil.h =================================================================== --- dcplusplus/trunk/win32/WinUtil.h 2008-03-29 06:24:22 UTC (rev 1072) +++ dcplusplus/trunk/win32/WinUtil.h 2008-03-29 06:25:50 UTC (rev 1073) @@ -67,7 +67,7 @@ static ImageMap fileIndexes; struct Seeds { - static const SmartWin::WidgetButton::Seed button; + static const SmartWin::Button::Seed button; static const SmartWin::WidgetComboBox::Seed comboBoxStatic; static const SmartWin::WidgetComboBox::Seed comboBoxEdit; static const SmartWin::WidgetListView::Seed listView; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:24:26
|
Revision: 1072 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1072&view=rev Author: arnetheduck Date: 2008-03-28 23:24:22 -0700 (Fri, 28 Mar 2008) Log Message: ----------- cshelp in search, make static controls send click messages Modified Paths: -------------- dcplusplus/trunk/help/cshelp.h dcplusplus/trunk/help/cshelp.txt dcplusplus/trunk/help/window_search.html dcplusplus/trunk/smartwin/source/widgets/WidgetStatic.cpp dcplusplus/trunk/win32/PublicHubsFrame.cpp dcplusplus/trunk/win32/SearchFrame.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 18:04:38.267999887 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-26 18:28:21.986000061 +0100 committer: zouzou123gen properties: branch-nick: bzr Name: bzr:file-ids - smartwin/include/smartwin/widgets/Control.h 844@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Faspects%2FAspectControl.h + Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv Modified: dcplusplus/trunk/help/cshelp.h =================================================================== --- dcplusplus/trunk/help/cshelp.h 2008-03-29 06:11:15 UTC (rev 1071) +++ dcplusplus/trunk/help/cshelp.h 2008-03-29 06:24:22 UTC (rev 1072) @@ -114,5 +114,12 @@ #define IDH_PUBLIC_HUBS_FILTER 11108 #define IDH_PUBLIC_HUBS_LISTS 11109 #define IDH_PUBLIC_HUBS_REFRESH 11110 +#define IDH_SEARCH_SEARCH_FOR 11111 +#define IDH_SEARCH_PURGE 11112 +#define IDH_SEARCH_SEARCH 11113 +#define IDH_SEARCH_SIZE 11114 +#define IDH_SEARCH_TYPE 11115 +#define IDH_SEARCH_SLOTS 11116 +#define IDH_SEARCH_HUBS 11117 #endif Modified: dcplusplus/trunk/help/cshelp.txt =================================================================== --- dcplusplus/trunk/help/cshelp.txt 2008-03-29 06:11:15 UTC (rev 1071) +++ dcplusplus/trunk/help/cshelp.txt 2008-03-29 06:24:22 UTC (rev 1072) @@ -220,3 +220,17 @@ In the dropdown, you may select different hublists you want to see. If you click on 'Configure', you will be able to change, add and remove hublists. The order in 'Configured Public Hub lists' determines the order hublists are displayed in the dropdown mentioned above. .topic IDH_PUBLIC_HUBS_REFRESH Download a fresh version of the hublist. +.topic IDH_SEARCH_SEARCH_FOR +This is the set of search strings to search for. Words beginning with "-" will be filtered away. +.topic IDH_SEARCH_PURGE +Clear the contents of the search history. +.topic IDH_SEARCH_SEARCH +Start searching for the set of search strings defined above. Note; you may not start too many searches in a small amount of time. +.topic IDH_SEARCH_SIZE +Filter away files depending on their file size. +.topic IDH_SEARCH_TYPE +Filter away files depending on their file type (extension). +.topic IDH_SEARCH_SLOTS +Filter away files depending on the user's free slots. +.topic IDH_SEARCH_HUBS +Search only selected hubs. Modified: dcplusplus/trunk/help/window_search.html =================================================================== --- dcplusplus/trunk/help/window_search.html 2008-03-29 06:11:15 UTC (rev 1071) +++ dcplusplus/trunk/help/window_search.html 2008-03-29 06:24:22 UTC (rev 1072) @@ -12,13 +12,15 @@ <dt>Search for</dt> <dd>This is the set of search strings to search for. Words beginning with "-" will be filtered away.</dd> <dt>Purge</dt> - <dd>Will remove <a href="settings_experts_only#searchhistory">search history</a>.</dd> + <dd>Clear the contents of the <a href="settings_expert.html#searchhistory">search history</a>.</dd> + <dt>Search</dt> + <dd>Start searching for the set of search strings defined above. Note; you may not start too many searches in a small amount of time.</dd> <dt>Size</dt> <dd>Filter away files depending on their file size.</dd> <dt>File type</dt> <dd>Filter away files depending on their file type (extension).</dd> <dt>Only users with free slots</dt> - <dd>Filter away files depending on the users free slots</dd> + <dd>Filter away files depending on the user's free slots.</dd> <dt>Hubs</dt> <dd>Search only selected hubs.</dd> </dl> Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetStatic.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/WidgetStatic.cpp 2008-03-29 06:11:15 UTC (rev 1071) +++ dcplusplus/trunk/smartwin/source/widgets/WidgetStatic.cpp 2008-03-29 06:24:22 UTC (rev 1072) @@ -3,7 +3,7 @@ namespace SmartWin { WidgetStatic::Seed::Seed(const SmartUtil::tstring& caption) : - Widget::Seed(_T("Static"), WS_CHILD | WS_VISIBLE, 0, caption), + Widget::Seed(WC_STATIC, WS_CHILD | WS_VISIBLE | SS_NOTIFY, 0, caption), font(new Font(DefaultGuiFont)) { Modified: dcplusplus/trunk/win32/PublicHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-29 06:11:15 UTC (rev 1071) +++ dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-29 06:24:22 UTC (rev 1072) @@ -159,9 +159,9 @@ cs.caption = T_("&Refresh"); refresh = createButton(cs); refresh->setHelpId(IDH_PUBLIC_HUBS_REFRESH); - refresh->onClicked(std::tr1::bind(&PublicHubsFrame::handleRefresh, this)); refresh->setFont(WinUtil::font); addWidget(refresh); + refresh->onClicked(std::tr1::bind(&PublicHubsFrame::handleRefresh, this)); cs.style = WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_GROUPBOX; cs.exStyle = WS_EX_TRANSPARENT; Modified: dcplusplus/trunk/win32/SearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-29 06:11:15 UTC (rev 1071) +++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-29 06:24:22 UTC (rev 1072) @@ -111,26 +111,30 @@ { WidgetStatic::Seed cs; cs.exStyle = WS_EX_TRANSPARENT; - + + cs.caption = T_("Search for"); searchLabel = createStatic(cs); - searchLabel->setText(T_("Search for")); + searchLabel->setHelpId(IDH_SEARCH_SEARCH_FOR); + cs.caption = T_("Size"); sizeLabel = createStatic(cs); - sizeLabel->setText(T_("Size")); - + sizeLabel->setHelpId(IDH_SEARCH_SIZE); + + cs.caption = T_("File type"); typeLabel = createStatic(cs); - typeLabel->setText(T_("File type")); + typeLabel->setHelpId(IDH_SEARCH_TYPE); - optionLabel = createStatic(); - optionLabel->setText(T_("Search options")); + cs.caption = T_("Search options"); + optionLabel = createStatic(cs); - hubsLabel = createStatic(); - hubsLabel->setText(T_("Hubs")); - + cs.caption = T_("Hubs"); + hubsLabel = createStatic(cs); + hubsLabel->setHelpId(IDH_SEARCH_HUBS); } { searchBox = createComboBox(WinUtil::Seeds::comboBoxEdit); + searchBox->setHelpId(IDH_SEARCH_SEARCH_FOR); addWidget(searchBox); for(TStringIter i = lastSearches.begin(); i != lastSearches.end(); ++i) { @@ -141,15 +145,21 @@ { WidgetButton::Seed cs = WinUtil::Seeds::button; + cs.caption = T_("Purge"); + purge = createButton(cs); + purge->setHelpId(IDH_SEARCH_PURGE); + purge->onClicked(std::tr1::bind(&SearchFrame::handlePurgeClicked, this)); + cs.style |= BS_DEFPUSHBUTTON; cs.caption = T_("Search"); doSearch = createButton(cs); - + doSearch->setHelpId(IDH_SEARCH_SEARCH); doSearch->onClicked(std::tr1::bind(&SearchFrame::runSearch, this)); } { mode = createComboBox(WinUtil::Seeds::comboBoxStatic); + mode->setHelpId(IDH_SEARCH_SIZE); addWidget(mode); mode->addValue(T_("Normal")); @@ -159,13 +169,15 @@ { WidgetTextBox::Seed cs = WinUtil::Seeds::textBox; - cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_NUMBER; + cs.style |= ES_AUTOHSCROLL | ES_NUMBER; size = createTextBox(cs); + size->setHelpId(IDH_SEARCH_SIZE); addWidget(size); } { sizeMode = createComboBox(WinUtil::Seeds::comboBoxStatic); + sizeMode->setHelpId(IDH_SEARCH_SIZE); addWidget(sizeMode); sizeMode->addValue(T_("B")); @@ -177,6 +189,7 @@ { fileType = createComboBox(WinUtil::Seeds::comboBoxStatic); + fileType->setHelpId(IDH_SEARCH_TYPE); addWidget(fileType); fileType->addValue(T_("Any")); @@ -193,6 +206,7 @@ { WidgetCheckBox::Seed cs(T_("Only users with free slots")); slots = createCheckBox(cs); + slots->setHelpId(IDH_SEARCH_SLOTS); slots->setChecked(onlyFree); slots->onClicked(std::tr1::bind(&SearchFrame::handleSlotsClicked, this)) ; @@ -203,6 +217,7 @@ cs.style |= LVS_NOCOLUMNHEADER; cs.lvStyle |= LVS_EX_CHECKBOXES; hubs = SmartWin::WidgetCreator<WidgetHubs>::create(this, cs); + hubs->setHelpId(IDH_SEARCH_HUBS); addWidget(hubs); TStringList dummy; @@ -231,15 +246,6 @@ } { - WidgetButton::Seed cs = WinUtil::Seeds::button; - cs.caption = T_("Purge"); - purge = createButton(cs); - - purge->onClicked(std::tr1::bind(&SearchFrame::handlePurgeClicked, this)); - } - - - { WidgetCheckBox::Seed cs(_T("+/-")); showUI = createCheckBox(cs); showUI->setChecked(bShowUI); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:11:16
|
Revision: 1071 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1071&view=rev Author: arnetheduck Date: 2008-03-28 23:11:15 -0700 (Fri, 28 Mar 2008) Log Message: ----------- Move AspectControl to widgets Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 17:48:01.759999990 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-26 18:04:38.267999887 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - + smartwin/include/smartwin/widgets/Control.h 844@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Faspects%2FAspectControl.h Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -3,12 +3,12 @@ #include "AspectColor.h" #include "AspectClickable.h" -#include "AspectControl.h" #include "AspectDblClickable.h" #include "AspectFocus.h" #include "AspectFont.h" #include "AspectPainting.h" #include "AspectText.h" +#include "../widgets/Control.h" namespace SmartWin { /** Common stuff for all buttons */ @@ -17,7 +17,7 @@ public AspectClickable<WidgetType>, public AspectColor<WidgetType>, public AspectColorCtlImpl<WidgetType>, - public AspectControl, + public Control, public AspectDblClickable<WidgetType>, public AspectFocus< WidgetType >, public AspectFont< WidgetType >, @@ -54,7 +54,7 @@ template<typename WidgetType> Message AspectButton<WidgetType>::getDblClickMessage() { - return Message( WM_COMMAND, MAKEWPARAM(static_cast<WidgetType*>(this)->getControlId(), BN_CLICKED) ); + return Message( WM_COMMAND, MAKEWPARAM(static_cast<WidgetType*>(this)->getControlId(), BN_DBLCLK) ); } template<typename WidgetType> Deleted: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -1,59 +0,0 @@ -#ifndef ASPECTCONTROL_H_ -#define ASPECTCONTROL_H_ - -#include "../Policies.h" -#include "../xCeption.h" - -#include "AspectBorder.h" -#include "AspectContextMenu.h" -#include "AspectEnabled.h" -#include "AspectHelp.h" -#include "AspectKeyboard.h" -#include "AspectMouse.h" -#include "AspectRaw.h" -#include "AspectSizable.h" -#include "AspectVisible.h" - -namespace SmartWin { - -/** This class is for all windows common controls */ - -class AspectControl : - public MessageMapPolicy< Policies::Subclassed >, - - public AspectBorder<AspectControl>, - public AspectContextMenu<AspectControl>, - public AspectEnabled<AspectControl>, - public AspectHelp<AspectControl>, - public AspectKeyboard<AspectControl>, - public AspectMouse<AspectControl>, - public AspectRaw<AspectControl>, - public AspectSizable<AspectControl>, - public AspectVisible<AspectControl> -{ -public: - unsigned int getControlId(); - - virtual HWND create(const Seed& cs); -protected: - typedef AspectControl ControlType; - - AspectControl(Widget* parent); -}; - -inline AspectControl::AspectControl(Widget* parent) : PolicyType(parent) { - xAssert( parent, _T( "Common Controls must have a parent" ) ); -} - -inline HWND AspectControl::create(const Seed& cs) { - xAssert((cs.style & WS_CHILD) == WS_CHILD, _T("Common controls must have WS_CHILD style")); - return PolicyType::create(cs); -} - -inline unsigned int AspectControl::getControlId() { - return static_cast<unsigned int>(::GetWindowLongPtr(handle(), GWLP_ID)); -} - -} - -#endif /*ASPECTCONTROL_H_*/ Copied: dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h (from rev 1070, dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -0,0 +1,59 @@ +#ifndef CONTROL_H_ +#define CONTROL_H_ + +#include "../Policies.h" +#include "../xCeption.h" + +#include "../aspects/AspectBorder.h" +#include "../aspects/AspectContextMenu.h" +#include "../aspects/AspectEnabled.h" +#include "../aspects/AspectHelp.h" +#include "../aspects/AspectKeyboard.h" +#include "../aspects/AspectMouse.h" +#include "../aspects/AspectRaw.h" +#include "../aspects/AspectSizable.h" +#include "../aspects/AspectVisible.h" + +namespace SmartWin { + +/** Base class is for windows common controls */ + +class Control : + public MessageMapPolicy< Policies::Subclassed >, + + public AspectBorder<Control>, + public AspectContextMenu<Control>, + public AspectEnabled<Control>, + public AspectHelp<Control>, + public AspectKeyboard<Control>, + public AspectMouse<Control>, + public AspectRaw<Control>, + public AspectSizable<Control>, + public AspectVisible<Control> +{ +public: + unsigned int getControlId(); + + virtual HWND create(const Seed& cs); +protected: + typedef Control ControlType; + + Control(Widget* parent); +}; + +inline Control::Control(Widget* parent) : PolicyType(parent) { + xAssert( parent, _T( "Common Controls must have a parent" ) ); +} + +inline HWND Control::create(const Seed& cs) { + xAssert((cs.style & WS_CHILD) == WS_CHILD, _T("Common controls must have WS_CHILD style")); + return PolicyType::create(cs); +} + +inline unsigned int Control::getControlId() { + return static_cast<unsigned int>(::GetWindowLongPtr(handle(), GWLP_ID)); +} + +} + +#endif /*CONTROL_H_*/ Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -32,13 +32,13 @@ #include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectDblClickable.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectSelection.h" #include "../aspects/AspectText.h" +#include "Control.h" namespace SmartWin { @@ -62,7 +62,7 @@ public AspectCollection<WidgetComboBox, int>, public AspectColor< WidgetComboBox >, public AspectColorCtlImpl<WidgetComboBox>, - public AspectControl, + public Control, public AspectDblClickable< WidgetComboBox >, public AspectFocus< WidgetComboBox >, public AspectFont< WidgetComboBox >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -30,10 +30,10 @@ #include "../Widget.h" #include "../aspects/AspectClickable.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectPainting.h" +#include "Control.h" namespace SmartWin { @@ -54,9 +54,9 @@ * declare a point in time within 1800 - 2100 */ class WidgetDateTimePicker : + public Control, // Aspects public AspectClickable< WidgetDateTimePicker >, - public AspectControl, public AspectFocus< WidgetDateTimePicker >, public AspectFont< WidgetDateTimePicker >, public AspectPainting< WidgetDateTimePicker > Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -35,13 +35,13 @@ #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" #include "../aspects/AspectColor.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectData.h" #include "../aspects/AspectDblClickable.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectScrollable.h" #include "../aspects/AspectSelection.h" +#include "Control.h" #include "WidgetListViewEditBox.h" #include <vector> @@ -68,11 +68,11 @@ * to "map" an LPARAM value to a physical rownumber and vice versa. */ class WidgetListView : + public Control, // Aspect classes public AspectClickable< WidgetListView >, public AspectCollection<WidgetListView, int>, public AspectColor<WidgetListView>, - public AspectControl, public AspectData<WidgetListView, int>, public AspectDblClickable< WidgetListView >, public AspectFocus< WidgetListView >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -29,8 +29,8 @@ #define WidgetProgressBar_h #include "../Widget.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectPainting.h" +#include "Control.h" namespace SmartWin { @@ -51,8 +51,8 @@ * jobs, often used when downloading from internet or installing applications etc. */ class WidgetProgressBar : + public Control, // Aspects - public AspectControl, public AspectPainting< WidgetProgressBar > { friend class WidgetCreator< WidgetProgressBar >; Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -29,10 +29,10 @@ #define WidgetSlider_h #include "../Widget.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectScrollable.h" +#include "Control.h" namespace SmartWin { @@ -56,8 +56,8 @@ * the WidgetSpinner control, but have another visual appearance. */ class WidgetSlider : + public Control, // Aspects - public AspectControl, public AspectFocus< WidgetSlider >, public AspectPainting< WidgetSlider >, public AspectScrollable< WidgetSlider > Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -29,10 +29,10 @@ #define WidgetSpinner_h #include "../Widget.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectScrollable.h" +#include "Control.h" namespace SmartWin { @@ -54,8 +54,8 @@ * other for softer. */ class WidgetSpinner : + public Control, // Aspects - public AspectControl, public AspectFocus< WidgetSpinner >, public AspectPainting< WidgetSpinner >, public AspectScrollable< WidgetSpinner > Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -31,13 +31,13 @@ #include "../Widget.h" #include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectDblClickable.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectText.h" #include "../resources/Bitmap.h" +#include "Control.h" namespace SmartWin { @@ -60,11 +60,11 @@ * It can load a bitmap. */ class WidgetStatic : + public Control, // Aspects public AspectClickable< WidgetStatic >, public AspectColor< WidgetStatic >, public AspectColorCtlImpl<WidgetStatic>, - public AspectControl, public AspectDblClickable< WidgetStatic >, public AspectFocus< WidgetStatic >, public AspectFont< WidgetStatic >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -30,11 +30,11 @@ #include "../Widget.h" #include "../aspects/AspectClickable.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectDblClickable.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectText.h" +#include "Control.h" namespace SmartWin { @@ -104,10 +104,10 @@ template< class TypeOfStatusBar = NoSection > class WidgetStatusBar : public TypeOfStatusBar, + public Control, // Aspects public AspectClickable< WidgetStatusBar< TypeOfStatusBar > >, - public AspectControl, public AspectDblClickable< WidgetStatusBar< TypeOfStatusBar > >, public AspectFont< WidgetStatusBar< TypeOfStatusBar > >, public AspectPainting< WidgetStatusBar< TypeOfStatusBar > > Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -32,12 +32,12 @@ #include "../resources/ImageList.h" #include "../Rectangle.h" #include "../aspects/AspectCollection.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectSelection.h" #include "../aspects/AspectText.h" +#include "Control.h" namespace SmartWin { @@ -63,9 +63,9 @@ * has. */ class WidgetTabSheet : + public Control, // Aspects public AspectCollection<WidgetTabSheet, int>, - public AspectControl, public AspectFocus< WidgetTabSheet >, public AspectFont< WidgetTabSheet >, public AspectPainting< WidgetTabSheet >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -30,12 +30,12 @@ #include "../Widget.h" #include "../aspects/AspectColor.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectScrollable.h" #include "../aspects/AspectText.h" #include "../aspects/AspectUpdate.h" +#include "Control.h" namespace SmartWin { @@ -64,10 +64,10 @@ * < ul > < li >WidgetRichTextBox< /li > < /ul > */ class WidgetTextBoxBase : + public Control, // Aspect classes public AspectColor< WidgetTextBoxBase >, public AspectColorCtlImpl<WidgetTextBoxBase>, - public AspectControl, public AspectFocus< WidgetTextBoxBase >, public AspectFont< WidgetTextBoxBase >, public AspectScrollable< WidgetTextBoxBase >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -33,10 +33,10 @@ #include "../Widget.h" #include "../Rectangle.h" #include "../Dispatchers.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../resources/ImageList.h" +#include "Control.h" namespace SmartWin { @@ -57,8 +57,8 @@ * to view the log of URL's you have been to etc... */ class WidgetToolbar : + public Control, // Aspects - public AspectControl, public AspectFocus< WidgetToolbar >, public AspectFont< WidgetToolbar > { Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-29 06:10:14 UTC (rev 1070) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-29 06:11:15 UTC (rev 1071) @@ -34,12 +34,12 @@ #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" #include "../aspects/AspectColor.h" -#include "../aspects/AspectControl.h" #include "../aspects/AspectData.h" #include "../aspects/AspectDblClickable.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectSelection.h" +#include "Control.h" namespace SmartWin { @@ -61,11 +61,11 @@ */ class WidgetTreeView : + public Control, // Aspects public AspectClickable< WidgetTreeView >, public AspectCollection<WidgetTreeView, HTREEITEM>, public AspectColor<WidgetTreeView>, - public AspectControl, public AspectData<WidgetTreeView, HTREEITEM>, public AspectDblClickable< WidgetTreeView >, public AspectFocus< WidgetTreeView >, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:10:16
|
Revision: 1070 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1070&view=rev Author: arnetheduck Date: 2008-03-28 23:10:14 -0700 (Fri, 28 Mar 2008) Log Message: ----------- AspectControl doesn't need template parameter Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 17:20:31.842000008 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-26 17:48:01.759999990 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/aspects/AspectMinMax.h aspectminmax.h-20080326161823-8s7owo1xy79ij3ve-1 + Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -17,7 +17,7 @@ public AspectClickable<WidgetType>, public AspectColor<WidgetType>, public AspectColorCtlImpl<WidgetType>, - public AspectControl<WidgetType>, + public AspectControl, public AspectDblClickable<WidgetType>, public AspectFocus< WidgetType >, public AspectFont< WidgetType >, @@ -26,7 +26,12 @@ { WidgetType& W() { return *static_cast<WidgetType*>(this); } public: - + /// Class type + typedef WidgetType ThisType; + + /// Object type + typedef ThisType* ObjectType; + // Contract needed by AspectClickable Aspect class Message getClickMessage(); @@ -53,14 +58,14 @@ } template<typename WidgetType> -AspectButton<WidgetType>::AspectButton(Widget* parent) : AspectControl<WidgetType>(parent) { +AspectButton<WidgetType>::AspectButton(Widget* parent) : ControlType(parent) { } template<typename WidgetType> template<typename SeedType> void AspectButton<WidgetType>::create( const SeedType & cs ) { - WidgetType::ControlType::create(cs); + ControlType::create(cs); if(cs.font) setFont( cs.font ); } Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -17,50 +17,41 @@ namespace SmartWin { /** This class is for all windows common controls */ -template<typename WidgetType > + class AspectControl : public MessageMapPolicy< Policies::Subclassed >, - public AspectBorder<WidgetType>, - public AspectContextMenu<WidgetType>, - public AspectEnabled<WidgetType>, - public AspectHelp<WidgetType>, - public AspectKeyboard<WidgetType>, - public AspectMouse<WidgetType>, - public AspectRaw<WidgetType>, - public AspectSizable<WidgetType>, - public AspectVisible<WidgetType> + public AspectBorder<AspectControl>, + public AspectContextMenu<AspectControl>, + public AspectEnabled<AspectControl>, + public AspectHelp<AspectControl>, + public AspectKeyboard<AspectControl>, + public AspectMouse<AspectControl>, + public AspectRaw<AspectControl>, + public AspectSizable<AspectControl>, + public AspectVisible<AspectControl> { public: - /// Class type - typedef WidgetType ThisType; - - /// Object type - typedef ThisType* ObjectType; - unsigned int getControlId(); virtual HWND create(const Seed& cs); protected: - typedef AspectControl<WidgetType> ControlType; + typedef AspectControl ControlType; AspectControl(Widget* parent); }; -template<typename WidgetType> -AspectControl<WidgetType>::AspectControl(Widget* parent) : PolicyType(parent) { +inline AspectControl::AspectControl(Widget* parent) : PolicyType(parent) { xAssert( parent, _T( "Common Controls must have a parent" ) ); } -template<typename WidgetType> -HWND AspectControl<WidgetType>::create(const Seed& cs) { +inline HWND AspectControl::create(const Seed& cs) { xAssert((cs.style & WS_CHILD) == WS_CHILD, _T("Common controls must have WS_CHILD style")); return PolicyType::create(cs); } -template<typename WidgetType> -unsigned int AspectControl<WidgetType>::getControlId() { - return static_cast<unsigned int>(::GetWindowLongPtr(static_cast<WidgetType*>(this)->handle(), GWLP_ID)); +inline unsigned int AspectControl::getControlId() { + return static_cast<unsigned int>(::GetWindowLongPtr(handle(), GWLP_ID)); } } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -62,7 +62,7 @@ public AspectCollection<WidgetComboBox, int>, public AspectColor< WidgetComboBox >, public AspectColorCtlImpl<WidgetComboBox>, - public AspectControl<WidgetComboBox>, + public AspectControl, public AspectDblClickable< WidgetComboBox >, public AspectFocus< WidgetComboBox >, public AspectFont< WidgetComboBox >, @@ -75,7 +75,12 @@ friend class AspectColor<WidgetComboBox>; friend class AspectSelection<WidgetComboBox, int>; public: + /// Class type + typedef WidgetComboBox ThisType; + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDateTimePicker.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -56,7 +56,7 @@ class WidgetDateTimePicker : // Aspects public AspectClickable< WidgetDateTimePicker >, - public AspectControl<WidgetDateTimePicker>, + public AspectControl, public AspectFocus< WidgetDateTimePicker >, public AspectFont< WidgetDateTimePicker >, public AspectPainting< WidgetDateTimePicker > @@ -76,8 +76,11 @@ }; public: + /// Class type + typedef WidgetDateTimePicker ThisType; - typedef MessageMapPolicy<Policies::Subclassed> PolicyType; + /// Object type + typedef ThisType* ObjectType; friend class WidgetCreator< WidgetDateTimePicker >; Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -72,7 +72,7 @@ public AspectClickable< WidgetListView >, public AspectCollection<WidgetListView, int>, public AspectColor<WidgetListView>, - public AspectControl<WidgetListView>, + public AspectControl, public AspectData<WidgetListView, int>, public AspectDblClickable< WidgetListView >, public AspectFocus< WidgetListView >, @@ -102,6 +102,12 @@ friend class AspectSelection<WidgetListView, int>; public: + /// Class type + typedef WidgetListView ThisType; + + /// Object type + typedef ThisType* ObjectType; + typedef std::tr1::function<int (LPARAM a, LPARAM b)> SortFunction; /// Seed class Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -52,11 +52,16 @@ */ class WidgetProgressBar : // Aspects - public AspectControl<WidgetProgressBar>, + public AspectControl, public AspectPainting< WidgetProgressBar > { friend class WidgetCreator< WidgetProgressBar >; public: + /// Class type + typedef WidgetProgressBar ThisType; + + /// Object type + typedef ThisType* ObjectType; /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -57,15 +57,19 @@ */ class WidgetSlider : // Aspects - public AspectControl<WidgetSlider>, + public AspectControl, public AspectFocus< WidgetSlider >, public AspectPainting< WidgetSlider >, public AspectScrollable< WidgetSlider > { friend class WidgetCreator< WidgetSlider >; public: - typedef MessageMapPolicy<Policies::Subclassed> PolicyType; + /// Class type + typedef WidgetSlider ThisType; + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -55,13 +55,18 @@ */ class WidgetSpinner : // Aspects - public AspectControl<WidgetSpinner>, + public AspectControl, public AspectFocus< WidgetSpinner >, public AspectPainting< WidgetSpinner >, public AspectScrollable< WidgetSpinner > { friend class WidgetCreator< WidgetSpinner >; public: + /// Class type + typedef WidgetSpinner ThisType; + + /// Object type + typedef ThisType* ObjectType; /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -64,7 +64,7 @@ public AspectClickable< WidgetStatic >, public AspectColor< WidgetStatic >, public AspectColorCtlImpl<WidgetStatic>, - public AspectControl<WidgetStatic>, + public AspectControl, public AspectDblClickable< WidgetStatic >, public AspectFocus< WidgetStatic >, public AspectFont< WidgetStatic >, @@ -73,6 +73,12 @@ { friend class WidgetCreator< WidgetStatic >; public: + /// Class type + typedef WidgetStatic ThisType; + + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -107,13 +107,19 @@ // Aspects public AspectClickable< WidgetStatusBar< TypeOfStatusBar > >, - public AspectControl<WidgetStatusBar< TypeOfStatusBar > >, + public AspectControl, public AspectDblClickable< WidgetStatusBar< TypeOfStatusBar > >, public AspectFont< WidgetStatusBar< TypeOfStatusBar > >, public AspectPainting< WidgetStatusBar< TypeOfStatusBar > > { friend class WidgetCreator< WidgetStatusBar >; public: + /// Class type + typedef WidgetStatusBar<TypeOfStatusBar> ThisType; + + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget @@ -229,14 +235,14 @@ template< class TypeOfStatusBar > WidgetStatusBar< TypeOfStatusBar >::WidgetStatusBar( SmartWin::Widget * parent ) - : AspectControl<WidgetStatusBar< TypeOfStatusBar > >( parent ) + : ControlType( parent ) { } template< class TypeOfStatusBar > void WidgetStatusBar< TypeOfStatusBar >::create( const Seed & cs ) { - AspectControl<WidgetStatusBar< TypeOfStatusBar > >::create(cs); + ControlType::create(cs); if(cs.font) setFont( cs.font ); } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -65,7 +65,7 @@ class WidgetTabSheet : // Aspects public AspectCollection<WidgetTabSheet, int>, - public AspectControl<WidgetTabSheet>, + public AspectControl, public AspectFocus< WidgetTabSheet >, public AspectFont< WidgetTabSheet >, public AspectPainting< WidgetTabSheet >, @@ -110,8 +110,12 @@ friend class WidgetCreator< WidgetTabSheet >; public: - typedef MessageMapPolicy<Policies::Subclassed> PolicyType; + /// Class type + typedef WidgetTabSheet ThisType; + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -67,7 +67,7 @@ // Aspect classes public AspectColor< WidgetTextBoxBase >, public AspectColorCtlImpl<WidgetTextBoxBase>, - public AspectControl< WidgetTextBoxBase >, + public AspectControl, public AspectFocus< WidgetTextBoxBase >, public AspectFont< WidgetTextBoxBase >, public AspectScrollable< WidgetTextBoxBase >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetToolbar.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -58,7 +58,7 @@ */ class WidgetToolbar : // Aspects - public AspectControl< WidgetToolbar >, + public AspectControl, public AspectFocus< WidgetToolbar >, public AspectFont< WidgetToolbar > { @@ -67,8 +67,12 @@ friend class WidgetCreator< WidgetToolbar >; friend class SmartWin::AspectSizable<WidgetToolbar>; public: - typedef MessageMapPolicy<Policies::Subclassed> PolicyType; + /// Class type + typedef WidgetToolbar ThisType; + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-29 06:09:14 UTC (rev 1069) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-29 06:10:14 UTC (rev 1070) @@ -65,7 +65,7 @@ public AspectClickable< WidgetTreeView >, public AspectCollection<WidgetTreeView, HTREEITEM>, public AspectColor<WidgetTreeView>, - public AspectControl<WidgetTreeView>, + public AspectControl, public AspectData<WidgetTreeView, HTREEITEM>, public AspectDblClickable< WidgetTreeView >, public AspectFocus< WidgetTreeView >, @@ -100,6 +100,12 @@ friend class AspectSelection<WidgetTreeView, HTREEITEM>; public: + /// Class type + typedef WidgetTreeView ThisType; + + /// Object type + typedef ThisType* ObjectType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:09:17
|
Revision: 1069 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1069&view=rev Author: arnetheduck Date: 2008-03-28 23:09:14 -0700 (Fri, 28 Mar 2008) Log Message: ----------- Split off min/max Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/Policies.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSizable.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindowBase.h Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 13:43:45.282999992 +0100 committer: zouzou123gen properties: branch-nick: bzr + timestamp: 2008-03-26 17:20:31.842000008 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - + smartwin/include/smartwin/aspects/AspectMinMax.h aspectminmax.h-20080326161823-8s7owo1xy79ij3ve-1 Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 Modified: dcplusplus/trunk/smartwin/include/smartwin/Policies.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/Policies.h 2008-03-29 06:08:36 UTC (rev 1068) +++ dcplusplus/trunk/smartwin/include/smartwin/Policies.h 2008-03-29 06:09:14 UTC (rev 1069) @@ -37,6 +37,8 @@ template<typename Policy> class MessageMapPolicy : public Policy { public: + typedef MessageMapPolicy<Policy> PolicyType; + MessageMapPolicy(Widget* parent) : Policy(parent) { } static LRESULT CALLBACK wndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-29 06:08:36 UTC (rev 1068) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-29 06:09:14 UTC (rev 1069) @@ -37,9 +37,6 @@ /// Object type typedef ThisType* ObjectType; - - /// Policy type - typedef MessageMapPolicy<Policies::Subclassed> PolicyType; unsigned int getControlId(); Added: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h 2008-03-29 06:09:14 UTC (rev 1069) @@ -0,0 +1,115 @@ +/* + Copyright (c) 2005, Thomas Hansen + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the SmartWin++ nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef AspectMinMax_h +#define AspectMinMax_h + +#include "../Widget.h" +#include "../Place.h" +#include "../xCeption.h" +#include "../Dispatchers.h" +#include "../Events.h" + +namespace SmartWin +{ +// begin namespace SmartWin + +/// \ingroup AspectClasses +/// \ingroup WidgetLayout +/// Aspect class used by Widgets that have the possibility of setting and getting a +/// "size" property of their objects. +/** E.g. the WidgetTextBox have a "size" Aspect therefore it realizes the + * AspectMinMax through inheritance. <br> + * Note! <br> + * All coordinates have zenith top-left corner of either the desktop display or the + * client area of the parent Widget. <br> + * Note! <br> + * There are two different ways to calculate the position of a Widget, one is in + * screen coordinates which starts top left of the desktop window, the other way is + * relative to its parent Widget which starts at the top left of the parent Widgets + * client area which is the total area of the Widget after the border, menu, toolbar + * etc have been taken away. <br> + * In addition all bounding Rectangles dealt with through this class are giving + * their down right coordinates in SIZES and not in POSITIONS! + */ +template< class WidgetType > +class AspectMinMax +{ + WidgetType& W() { return *static_cast<WidgetType*>(this); } + const WidgetType& W() const { return *static_cast<const WidgetType*>(this); } + + HWND H() const { return W().handle(); } + +public: + /// Maximize your window + /** This will make the window fill the whole area that the window has available. + * <br> + * This function cannot be called for any Widget types other than those derived + * from WidgetWindowBase. + */ + void maximize(); + + /// Minimize your window + /** This will make the window become minimized. <br> + * This function cannot be called for any Widget types other than those derived + * from WidgetWindowBase. + */ + void minimize(); + + /// Restores your window + /** This will make the window become restored. <br> + * This function cannot be called for any Widget types other than those derived + * from WidgetWindowBase. + */ + void restore(); + +protected: + virtual ~AspectMinMax() { } +}; + +template< class WidgetType > +void AspectMinMax< WidgetType >::maximize() +{ + ::ShowWindow(H(), SW_SHOWMAXIMIZED ); +} + +template< class WidgetType > +void AspectMinMax< WidgetType >::minimize() +{ + ::ShowWindow(H(), SW_MINIMIZE ); +} + +template< class WidgetType > +void AspectMinMax< WidgetType >::restore() +{ + ::ShowWindow(H(), SW_RESTORE ); +} + +// end namespace SmartWin +} + +#endif Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSizable.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSizable.h 2008-03-29 06:08:36 UTC (rev 1068) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSizable.h 2008-03-29 06:09:14 UTC (rev 1069) @@ -196,28 +196,6 @@ */ Point getTextSize( const SmartUtil::tstring & text ); - /// Maximize your window - /** This will make the window fill the whole area that the window has available. - * <br> - * This function cannot be called for any Widget types other than those derived - * from WidgetWindowBase. - */ - void maximize(); - - /// Minimize your window - /** This will make the window become minimized. <br> - * This function cannot be called for any Widget types other than those derived - * from WidgetWindowBase. - */ - void minimize(); - - /// Restores your window - /** This will make the window become restored. <br> - * This function cannot be called for any Widget types other than those derived - * from WidgetWindowBase. - */ - void restore(); - /// Brings the widget to the front /** Makes the widget become the front most widget meaning it will not be obscured * by other widgets which are contained in the same container widget. <br> @@ -416,7 +394,6 @@ return this->getBounds().pos; } - template< class WidgetType > Point AspectSizable< WidgetType >::getScreenPosition() const { @@ -425,8 +402,6 @@ return Point( rc.left, rc.top ); } - - template< class WidgetType > Point AspectSizable< WidgetType >::getClientAreaSize() const { @@ -456,48 +431,6 @@ } template< class WidgetType > -void AspectSizable< WidgetType >::maximize() -{ - // Magic Enum construct!! - // If you get a compile time error in the next line you are trying to maximize - // a window which doesn't support being maximized, e.g. a WidgetButton or WidgetTreeView -#ifdef _MSC_VER - typename WidgetType::MaxiMiniRestorable; -#else - typename WidgetType::MaxiMiniRestorable checker; -#endif - ::ShowWindow(H(), SW_SHOWMAXIMIZED ); -} - -template< class WidgetType > -void AspectSizable< WidgetType >::minimize() -{ - // Magic Enum construct!! - // If you get a compile time error in the next line you are trying to minimize - // a window which soesn't support being minimized, e.g. a WidgetButton or WidgetTreeView -#ifdef _MSC_VER - typename WidgetType::MaxiMiniRestorable; -#else - typename WidgetType::MaxiMiniRestorable checker; -#endif - ::ShowWindow(H(), SW_MINIMIZE ); -} - -template< class WidgetType > -void AspectSizable< WidgetType >::restore() -{ - // Magic Enum construct!! - // If you get a compile time error in the next line you are trying to restore - // a window which soesn't support being restored, e.g. a WidgetButton or WidgetTreeView -#ifdef _MSC_VER - typename WidgetType::MaxiMiniRestorable; -#else - typename WidgetType::MaxiMiniRestorable checker; -#endif - ::ShowWindow(H(), SW_RESTORE ); -} - -template< class WidgetType > void AspectSizable< WidgetType >::bringToFront() { ::SetWindowPos(H(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindowBase.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindowBase.h 2008-03-29 06:08:36 UTC (rev 1068) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindowBase.h 2008-03-29 06:09:14 UTC (rev 1069) @@ -42,6 +42,7 @@ #include "../aspects/AspectFont.h" #include "../aspects/AspectHelp.h" #include "../aspects/AspectKeyboard.h" +#include "../aspects/AspectMinMax.h" #include "../aspects/AspectMouse.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectRaw.h" @@ -96,6 +97,7 @@ public AspectFont< WidgetWindowBase< Policy > >, public AspectHelp< WidgetWindowBase< Policy > >, public AspectKeyboard< WidgetWindowBase< Policy > >, + public AspectMinMax<WidgetWindowBase<Policy> >, public AspectMouse< WidgetWindowBase< Policy > >, public AspectPainting< WidgetWindowBase< Policy > >, public AspectRaw< WidgetWindowBase< Policy > >, @@ -151,14 +153,6 @@ typedef MessageMapPolicy< Policy > PolicyType; - // The next line must be included in Widgets that are supposed to support being - // Maximized, Minimized or Restored. It's a Magic Enum construct and can be - // read about at - // http://blog.notus.no/thomas/PermaLink.aspx?guid=c311fe7e-40d5-48a2-baa3-f69957d5f313 - // The enum is dereferenced in AspectSizable::restore/minimize/maximize - enum MaxiMiniRestorable - {}; - // TODO: Outfactor into WidgetClosable /// Event Handler setter for the Closing Event /** If supplied event handler is called before the window is closed. <br> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:08:38
|
Revision: 1068 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1068&view=rev Author: arnetheduck Date: 2008-03-28 23:08:36 -0700 (Fri, 28 Mar 2008) Log Message: ----------- update preview when the text color is changed Modified Paths: -------------- dcplusplus/trunk/win32/Appearance2Page.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 13:36:31.392999887 +0100 committer: zouzou123gen properties: branch-nick: bzr + timestamp: 2008-03-26 13:43:45.282999992 +0100 committer: zouzou123gen properties: branch-nick: bzr Name: bzr:file-ids - res/menu/Help.bmp help.bmp-20080325183834-j5s9rcvwudqgd4mz-1 + Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r Modified: dcplusplus/trunk/win32/Appearance2Page.cpp =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 06:08:10 UTC (rev 1067) +++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-29 06:08:36 UTC (rev 1068) @@ -131,6 +131,7 @@ logFont = logFont_; fg = fg_; font = SmartWin::FontPtr(new SmartWin::Font(::CreateFontIndirect(&logFont), true)); + example->setColor(fg, bg); example->setFont(font); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-29 06:08:14
|
Revision: 1067 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1067&view=rev Author: arnetheduck Date: 2008-03-28 23:08:10 -0700 (Fri, 28 Mar 2008) Log Message: ----------- real help icons, more help updates, changelog update Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/help/cshelp.h dcplusplus/trunk/help/cshelp.txt dcplusplus/trunk/help/window_favorite_users.html dcplusplus/trunk/help/window_public_hubs.html dcplusplus/trunk/res/toolbar20-highlight.bmp dcplusplus/trunk/res/toolbar20.bmp dcplusplus/trunk/win32/DCPlusPlus.rc dcplusplus/trunk/win32/MainWindow.cpp dcplusplus/trunk/win32/PublicHubsFrame.cpp dcplusplus/trunk/win32/UsersFrame.cpp dcplusplus/trunk/win32/UsersFrame.h dcplusplus/trunk/win32/resource.h Added Paths: ----------- dcplusplus/trunk/res/menu/Help.bmp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-26 09:41:10.022000074 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-26 13:36:31.392999887 +0100 committer: zouzou123gen properties: branch-nick: bzr Name: bzr:file-ids - + res/menu/Help.bmp help.bmp-20080325183834-j5s9rcvwudqgd4mz-1 Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2008-03-26 14:25:11 UTC (rev 1066) +++ dcplusplus/trunk/changelog.txt 2008-03-29 06:08:10 UTC (rev 1067) @@ -5,8 +5,11 @@ * Fixed out of focus window when restoring from icon (poy) * [L#203865] Fixed multiple instances (poy) * Context-sensitive help (poy) +* Updated help files (poy) * Fixed toolbar separators (poy) * Upgraded to bzip2 1.0.5 (thanks mikejj) +* Fixed background color of drop-down controls +* Fixed selection glitches -- 0.705 2008-03-14 -- * Several patches for better *nix compatibility of the core (thanks steven sheehy et al) Modified: dcplusplus/trunk/help/cshelp.h =================================================================== --- dcplusplus/trunk/help/cshelp.h 2008-03-26 14:25:11 UTC (rev 1066) +++ dcplusplus/trunk/help/cshelp.h 2008-03-29 06:08:10 UTC (rev 1067) @@ -111,5 +111,8 @@ #define IDH_FAVORITE_HUBS_MOVE_UP 11105 #define IDH_FAVORITE_HUBS_MOVE_DOWN 11106 #define IDH_FAVORITE_HUBS_REMOVE 11107 +#define IDH_PUBLIC_HUBS_FILTER 11108 +#define IDH_PUBLIC_HUBS_LISTS 11109 +#define IDH_PUBLIC_HUBS_REFRESH 11110 #endif Modified: dcplusplus/trunk/help/cshelp.txt =================================================================== --- dcplusplus/trunk/help/cshelp.txt 2008-03-26 14:25:11 UTC (rev 1066) +++ dcplusplus/trunk/help/cshelp.txt 2008-03-29 06:08:10 UTC (rev 1067) @@ -214,3 +214,9 @@ Move down selected hubs in the list. If several hubs have auto connect enabled, the lowest hub will be connected to last. .topic IDH_FAVORITE_HUBS_REMOVE Removes selected hubs from the favorite hubs list. +.topic IDH_PUBLIC_HUBS_FILTER +Here, you can filter the hublist so you will only see specific hubs in the hublist. Eg, selecting 'address' in the drop down, and writing "foo" in the filter, will only display hubs that have "foo" in their address. +.topic IDH_PUBLIC_HUBS_LISTS +In the dropdown, you may select different hublists you want to see. If you click on 'Configure', you will be able to change, add and remove hublists. The order in 'Configured Public Hub lists' determines the order hublists are displayed in the dropdown mentioned above. +.topic IDH_PUBLIC_HUBS_REFRESH +Download a fresh version of the hublist. Modified: dcplusplus/trunk/help/window_favorite_users.html =================================================================== --- dcplusplus/trunk/help/window_favorite_users.html 2008-03-26 14:25:11 UTC (rev 1066) +++ dcplusplus/trunk/help/window_favorite_users.html 2008-03-29 06:08:10 UTC (rev 1067) @@ -10,14 +10,14 @@ <dl style="margin-left: 40px;"> <dt>Auto grant slot / Nick</dt> <dd>Specifies the nick of the user. The checkbox indicates if DC++ should auto grant the user a slot. If the box is checked, DC++ will automatically grant the user a slot.</dd> - <dt>Status</dt> - <dd>Displays if the user is online or offline.</dd> - <dt>Hub (last seen on if offline)</dt> + <dt>Hub (last seen in, if offline)</dt> <dd>Which hub you saw this user the last time.</dd> <dt>Time last seen</dt> - <dd>Which specific date and time you saw this user the last time.</dd> + <dd>Which specific date and time you saw this user the last time; or "Online" if the user is currently online.</dd> <dt>Description</dt> - <dd>Brief description of the user.</dd> + <dd>Brief description of the user. You can change this description by either right-clicking and selecting "Description", or by pressing the Enter key.</dd> + <dt>CID</dt> + <dd>Client ID of the user.</dd> </dl> </body> </html> Modified: dcplusplus/trunk/help/window_public_hubs.html =================================================================== --- dcplusplus/trunk/help/window_public_hubs.html 2008-03-26 14:25:11 UTC (rev 1066) +++ dcplusplus/trunk/help/window_public_hubs.html 2008-03-29 06:08:10 UTC (rev 1067) @@ -37,10 +37,12 @@ <h2>Filter</h2> Here, you can filter the hublist so you will only see specific hubs in the hublist. Eg, selecting 'address' in the drop down, and writing "foo" in the filter, will only display hubs that have "foo" in their address. <h2>Configured Public Hub lists</h2> -In the dropdown, you may select different hublists you want to see. Press the 'Refresh' button to download a fresh version of the hublist. +In the dropdown, you may select different hublists you want to see. <br> -If you click on 'Configure', you will be able to change, add and remove hublists. The order in 'Configured Public Hub lists' determine the order hublists are displayed in the dropdown mentioned above. +If you click on 'Configure', you will be able to change, add and remove hublists. The order in 'Configured Public Hub lists' determines the order hublists are displayed in the dropdown mentioned above. <a href="http://dcpp.net/hublist" target="_blank" class="external">List of alternative hublists.</a> <img title="External Link" src="external.png" border="0" height="10" width="10" alt="External Link"> +<h2>Refresh</h2> +Download a fresh version of the hublist. </body> </html> Added: dcplusplus/trunk/res/menu/Help.bmp =================================================================== --- dcplusplus/trunk/res/menu/Help.bmp (rev 0) +++ dcplusplus/trunk/res/menu/Help.bmp 2008-03-29 06:08:10 UTC (rev 1067) @@ -0,0 +1 @@ +BM6 |
From: <arn...@us...> - 2008-03-26 14:25:14
|
Revision: 1066 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1066&view=rev Author: arnetheduck Date: 2008-03-26 07:25:11 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Generalize aspectselection Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp dcplusplus/trunk/win32/ADLSProperties.cpp dcplusplus/trunk/win32/ADLSearchFrame.cpp dcplusplus/trunk/win32/AppearancePage.cpp dcplusplus/trunk/win32/DirectoryListingFrame.cpp dcplusplus/trunk/win32/FavHubsFrame.cpp dcplusplus/trunk/win32/FavoriteDirsPage.cpp dcplusplus/trunk/win32/FinishedFrameBase.h dcplusplus/trunk/win32/GeneralPage.cpp dcplusplus/trunk/win32/HubFrame.cpp dcplusplus/trunk/win32/HubListsDlg.cpp dcplusplus/trunk/win32/LogPage.cpp dcplusplus/trunk/win32/PublicHubsFrame.cpp dcplusplus/trunk/win32/QueueFrame.cpp dcplusplus/trunk/win32/SearchFrame.cpp dcplusplus/trunk/win32/SpyFrame.cpp dcplusplus/trunk/win32/TransferView.cpp dcplusplus/trunk/win32/TypedListView.h dcplusplus/trunk/win32/TypedTreeView.h dcplusplus/trunk/win32/UCPage.cpp dcplusplus/trunk/win32/UploadPage.cpp dcplusplus/trunk/win32/UsersFrame.cpp dcplusplus/trunk/win32/WaitingUsersFrame.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-25 22:17:47.410000086 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-26 09:41:10.022000074 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h 2008-03-26 14:25:11 UTC (rev 1066) @@ -28,6 +28,8 @@ #ifndef AspectSelection_h #define AspectSelection_h +#include "../Dispatchers.h" + namespace SmartWin { // begin namespace SmartWin @@ -38,26 +40,12 @@ * E.g. the WidgetComboBox have a "selected" Aspect therefore it realizes the * AspectSelection through inheritance. */ -template< class WidgetType > -class AspectSelection -{ +template< class WidgetType, typename IndexType > +class AspectSelection { WidgetType& W() { return *static_cast<WidgetType*>(this); } + const WidgetType& W() const { return *static_cast<const WidgetType*>(this); } - struct Dispatcher - { - typedef std::tr1::function<void ()> F; - - Dispatcher(const F& f_) : f(f_) { } - - bool operator()(const MSG& msg, LRESULT& ret) { - if ( !WidgetType::isValidSelectionChanged( msg.lParam ) ) - return false; - f(); - return true; - } - - F f; - }; + typedef Dispatchers::VoidVoid<> Dispatcher; public: /// \ingroup EventHandlersAspectSelection /// Setting the event handler for the "selection changed" event @@ -74,7 +62,7 @@ * selected item. You must add the items before you set the selected * index. */ - virtual void setSelectedIndex( int idx ) = 0; + void setSelected( IndexType item ); /// Return the selected index of the Widget /** The return value is the selected items index of the Widget, if no item is @@ -83,13 +71,36 @@ * Some Widgets have the possibillity of selecting multiple items, if so you * should not use this function but rather the multiple selection value getter. */ - virtual int getSelectedIndex() const = 0; + IndexType getSelected() const; + + size_t countSelected() const; + + bool hasSelected() const; protected: - virtual ~AspectSelection() - {} + virtual ~AspectSelection() { } }; +template< class WidgetType, typename IndexType > +IndexType AspectSelection<WidgetType, IndexType>::getSelected() const { + return W().getSelectedImpl(); +} + +template< class WidgetType, typename IndexType > +void AspectSelection<WidgetType, IndexType>::setSelected(IndexType item) { + W().setSelectedImpl(item); +} + +template< class WidgetType, typename IndexType > +size_t AspectSelection<WidgetType, IndexType>::countSelected() const { + return W().countSelectedImpl(); +} + +template< class WidgetType, typename IndexType > +bool AspectSelection<WidgetType, IndexType>::hasSelected() const { + return countSelected() > 0; +} + // end namespace SmartWin } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-26 14:25:11 UTC (rev 1066) @@ -31,6 +31,7 @@ #include "../Widget.h" #include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" +#include "../aspects/AspectCollection.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectDblClickable.h" #include "../aspects/AspectFocus.h" @@ -58,6 +59,7 @@ class WidgetComboBox : // Aspects public AspectClickable< WidgetComboBox >, + public AspectCollection<WidgetComboBox, int>, public AspectColor< WidgetComboBox >, public AspectColorCtlImpl<WidgetComboBox>, public AspectControl<WidgetComboBox>, @@ -65,12 +67,13 @@ public AspectFocus< WidgetComboBox >, public AspectFont< WidgetComboBox >, public AspectPainting< WidgetComboBox >, - public AspectSelection< WidgetComboBox >, + public AspectSelection< WidgetComboBox, int >, public AspectText< WidgetComboBox > { friend class WidgetCreator< WidgetComboBox >; + friend class AspectCollection<WidgetComboBox, int>; friend class AspectColor<WidgetComboBox>; - + friend class AspectSelection<WidgetComboBox, int>; public: /// Seed class @@ -100,25 +103,11 @@ // Aspect expectation implementation Message getDblClickMessage(); - // Commented in AspectSelection - int getSelectedIndex() const; - - // Commented in AspectSelection - void setSelectedIndex( int idx ); - /// Return the selected value of the ComboBox /** If no item is actually selected the return value is "". */ SmartUtil::tstring getSelectedValue(); - /// Removes all items from the ComboBox - /** After this call there will be zero items in the ComboBox. - */ - void removeAllItems(); - - /// Remove an item from the ComboBox - void removeItem( int index ); - /// Appends a value to the ComboBox. /** The return value is the index of the new item appended. */ @@ -129,11 +118,6 @@ */ int insertValue(int pos, const SmartUtil::tstring & val ); - /// Returns the number of items present in the ComboBox. - /** Returns the number of items present in the ComboBox. - */ - int getCount(); - /// Returns the string at the zero - based index of the items present in the /// ComboBox. /** Returns the string of the ComboBox at the given index. <br> @@ -148,10 +132,6 @@ */ void create( const Seed & cs = Seed() ); - static bool isValidSelectionChanged( LPARAM lPar ) - { return true; - } - protected: /// Constructor Taking pointer to parent explicit WidgetComboBox( Widget * parent ); @@ -160,6 +140,18 @@ // WidgetFactory class which is friend virtual ~WidgetComboBox() {} + +private: + + // AspectSelection + int getSelectedImpl() const; + void setSelectedImpl( int idx ); + + // AspectCollection + void eraseImpl( int row ); + void clearImpl(); + size_t sizeImpl() const; + }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -181,14 +173,11 @@ return Message( WM_COMMAND, MAKEWPARAM(this->getControlId(), CBN_DBLCLK) ); } -inline int WidgetComboBox::getSelectedIndex() const -{ - int retVal = ComboBox_GetCurSel( handle() ); - return retVal; +inline int WidgetComboBox::getSelectedImpl() const { + return ComboBox_GetCurSel( handle() ); } -inline void WidgetComboBox::setSelectedIndex( int idx ) -{ +inline void WidgetComboBox::setSelectedImpl( int idx ) { ComboBox_SetCurSel( handle(), idx ); } @@ -202,12 +191,12 @@ return retVal; } -inline void WidgetComboBox::removeAllItems() +inline void WidgetComboBox::clearImpl() { ComboBox_ResetContent( handle() ); } -inline void WidgetComboBox::removeItem( int index ) +inline void WidgetComboBox::eraseImpl( int index ) { ComboBox_DeleteString( handle(), index ); } @@ -234,9 +223,8 @@ return newIdx; } -inline int WidgetComboBox::getCount() -{ - return ComboBox_GetCount( handle() ); // Number of items present. +inline size_t WidgetComboBox::sizeImpl() const { + return static_cast<size_t>(ComboBox_GetCount( handle() )); // Number of items present. } inline SmartUtil::tstring WidgetComboBox::getValue( int index ) Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h 2008-03-26 14:25:11 UTC (rev 1066) @@ -159,6 +159,7 @@ parent->addChild( retVal ); return retVal; #endif + return NULL; } /// Creates a Widget using its CreationalInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-26 14:25:11 UTC (rev 1066) @@ -78,7 +78,7 @@ public AspectFocus< WidgetListView >, public AspectFont< WidgetListView >, public AspectScrollable< WidgetListView >, - public AspectSelection< WidgetListView > + public AspectSelection< WidgetListView, int > { struct HeaderDispatcher { typedef std::tr1::function<void (int)> F; @@ -99,6 +99,7 @@ friend class AspectCollection<WidgetListView, int>; friend class AspectColor<WidgetListView>; friend class AspectData<WidgetListView, int>; + friend class AspectSelection<WidgetListView, int>; public: typedef std::tr1::function<int (LPARAM a, LPARAM b)> SortFunction; @@ -213,12 +214,6 @@ */ void setText( unsigned row, unsigned column, const SmartUtil::tstring & newVal ); - /// Returns true if grid has got a "current selected item" - /** If the List View has got a "currently selected" row, this function will - * return true, if no row is selected it will return false. - */ - bool hasSelection(); - /// Returns a vector containing all the selected rows of the grid. /** The return vector contains unsigned integer values, each value defines a row * in the grid that is selected. <br> @@ -226,24 +221,8 @@ * getSelectedRow function. <br> * If grid does NOT have any selected items the return vector is empty. */ - std::vector< unsigned > getSelected(); + std::vector< unsigned > getSelection() const; - /// Returns an unsigned integer which is the selected row of the grid. - /** The return value defines the row in the grid that is selected. <br> - * If the grid is in "multiple selection mode" you should rather use the - * getSelected function. <br> - * If grid does NOT have a selected item the return value is - 1. <br> - * Note! <br> - * This returns the ROW of the selected item and NOT the lparam given when - * inserted items meaning if you sort the grid or something this function will - * return another number for the same item if its position has moved due to the - * sort etc. - */ - int getSelectedIndex() const; - - // Commented in AspectSelection - void setSelectedIndex( int idx ); - /// Clears the selection of the grid. void clearSelection(); @@ -454,8 +433,6 @@ */ void redraw( int firstRow = 0, int lastRow = -1 ); - int getSelectedCount(); - void setListViewStyle(int style); int insert(int mask, int i, LPCTSTR text, UINT state, UINT stateMask, int image, LPARAM lparam); @@ -480,8 +457,6 @@ // Constructor Taking pointer to parent explicit WidgetListView( SmartWin::Widget * parent ); - static bool isValidSelectionChanged( LPARAM lPar ); - protected: /// Adds or Removes extended list view styles from the list view void addRemoveListViewExtendedStyle( DWORD addStyle, bool add ); @@ -548,6 +523,11 @@ // AspectColor void setColorImpl(COLORREF text, COLORREF background); + // AspectSelection + int getSelectedImpl() const; + void setSelectedImpl( int idx ); + size_t countSelectedImpl() const; + }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -560,21 +540,6 @@ return retVal; } -inline bool WidgetListView::isValidSelectionChanged( LPARAM lPar ) -{ - //TODO: Make support for CHOOSING how onSelectedChanged is supposed to behave, - //TODO: make non static function and pure abstract in base class and override - //TODO: and add enum param to event handler setter which MUST have default - //TODO: value to be backwards compatible - NMLISTVIEW * tmp = reinterpret_cast< NMLISTVIEW * >( lPar ); - if ( ( tmp->uChanged & LVIF_STATE ) == LVIF_STATE && - ( tmp->uNewState & LVIS_SELECTED ) == LVIS_SELECTED && - ( tmp->uOldState & LVIS_SELECTED ) != LVIS_SELECTED && - ( tmp->uOldState & LVIS_FOCUSED ) != LVIS_FOCUSED ) - return true; - return false; -} - inline const Message & WidgetListView::getClickMessage() { static const Message retVal( WM_NOTIFY, NM_CLICK ); @@ -681,12 +646,12 @@ } } -inline bool WidgetListView::hasSelection() { - return ListView_GetSelectedCount( this->handle() ) > 0; +inline int WidgetListView::getSelectedImpl() const { + return getNext(-1, LVNI_SELECTED); } -inline int WidgetListView::getSelectedIndex() const { - return getNext(-1, LVNI_SELECTED); +inline size_t WidgetListView::countSelectedImpl() const { + return static_cast<size_t>(ListView_GetSelectedCount( this->handle() )); } inline void WidgetListView::setText( unsigned row, unsigned column, const SmartUtil::tstring & newVal ) { @@ -825,10 +790,6 @@ return ::SendMessage(this->handle(), LVM_SETCOLUMNORDERARRAY, static_cast<WPARAM>(columns.size()), reinterpret_cast<LPARAM>(&columns[0])) > 0; } -inline int WidgetListView::getSelectedCount() { - return ListView_GetSelectedCount(this->handle()); -} - inline void WidgetListView::setListViewStyle(int style) { ListView_SetExtendedListViewStyle(this->handle(), style); } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-26 14:25:11 UTC (rev 1066) @@ -31,6 +31,7 @@ #include "../Widget.h" #include "../resources/ImageList.h" #include "../Rectangle.h" +#include "../aspects/AspectCollection.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" @@ -63,13 +64,17 @@ */ class WidgetTabSheet : // Aspects + public AspectCollection<WidgetTabSheet, int>, public AspectControl<WidgetTabSheet>, public AspectFocus< WidgetTabSheet >, public AspectFont< WidgetTabSheet >, public AspectPainting< WidgetTabSheet >, - public AspectSelection< WidgetTabSheet >, + public AspectSelection< WidgetTabSheet, int >, public AspectText< WidgetTabSheet > { + friend class AspectCollection<WidgetTabSheet, int>; + friend class AspectSelection<WidgetTabSheet, int>; + struct ChangingDispatcher { typedef std::tr1::function<bool (unsigned)> F; @@ -125,9 +130,6 @@ // AspectSelection expectation implementation static const Message & getSelectionChangedMessage(); - // Commented in AspectSelection - int getSelectedIndex() const; - SmartUtil::tstring getText(unsigned idx) const; void setText(unsigned idx, const SmartUtil::tstring& text); @@ -151,9 +153,6 @@ ); } - // Commented in AspectSelection - void setSelectedIndex( int idx ); - /// Appends a "page" to the Tab Sheet /** The return value is the index of the new item appended. The input index is * where you wish to put the new page @@ -228,22 +227,10 @@ */ void setFlatSeparators( bool value = true ); - static bool isValidSelectionChanged( LPARAM lPar ) - { return true; - } - void setImageList(const ImageListPtr& imageList); const ImageListPtr& getImageList() const; - size_t size() { - return static_cast<size_t>(TabCtrl_GetItemCount(this->handle())); - } - - void erase(size_t i) { - TabCtrl_DeleteItem(this->handle(), i); - } - int hitTest(const ScreenCoordinate& pt); /// Get the area not used by the tabs @@ -251,7 +238,7 @@ * the tabs can be calculated accurately. It returns coordinates respect to the * TabControl, this is, you have to adjust for the position of the control itself. */ - SmartWin::Rectangle getUsableArea(bool cutBorders = false) const; + Rectangle getUsableArea(bool cutBorders = false) const; protected: // Constructor Taking pointer to parent explicit WidgetTabSheet( Widget * parent ); @@ -264,6 +251,16 @@ private: // Keep a copy so it won't get deallocated... ImageListPtr imageList; + + // AspectCollection + void eraseImpl( int row ); + void clearImpl(); + size_t sizeImpl() const; + + // AspectSelection + int getSelectedImpl() const; + void setSelectedImpl( int idx ); + }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -276,10 +273,8 @@ return retVal; } -inline int WidgetTabSheet::getSelectedIndex() const -{ - int retVal = TabCtrl_GetCurSel( this->handle() ); - return retVal; +inline int WidgetTabSheet::getSelectedImpl() const { + return TabCtrl_GetCurSel( this->handle() ); } inline int WidgetTabSheet::getImage(unsigned idx) const @@ -312,8 +307,7 @@ return item.lParam; } -inline void WidgetTabSheet::setSelectedIndex( int idx ) -{ +inline void WidgetTabSheet::setSelectedImpl( int idx ) { TabCtrl_SetCurSel( this->handle(), idx ); } @@ -397,7 +391,18 @@ return TabCtrl_HitTest(handle(), &tci); } +inline void WidgetTabSheet::eraseImpl(int i) { + TabCtrl_DeleteItem(this->handle(), i); +} +inline void WidgetTabSheet::clearImpl() { + TabCtrl_DeleteAllItems(handle()); +} + +inline size_t WidgetTabSheet::sizeImpl() const { + return static_cast<size_t>(TabCtrl_GetItemCount(this->handle())); +} + // end namespace SmartWin } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-26 14:25:11 UTC (rev 1066) @@ -70,7 +70,7 @@ public AspectDblClickable< WidgetTreeView >, public AspectFocus< WidgetTreeView >, public AspectFont< WidgetTreeView >, - public AspectSelection< WidgetTreeView > + public AspectSelection< WidgetTreeView, HTREEITEM > { protected: struct Dispatcher @@ -97,6 +97,7 @@ friend class AspectCollection<WidgetTreeView, HTREEITEM>; friend class AspectColor<WidgetTreeView>; friend class AspectData<WidgetTreeView, HTREEITEM>; + friend class AspectSelection<WidgetTreeView, HTREEITEM>; public: /// Seed class @@ -140,16 +141,12 @@ HTREEITEM getParent(HTREEITEM node); - HTREEITEM getSelection(); - HTREEITEM getRoot(); ScreenCoordinate getContextMenuPos(); void expand(HTREEITEM node); - void select(HTREEITEM item); - void select(const ScreenCoordinate& pt); HTREEITEM hitTest(const ScreenCoordinate& pt); @@ -227,24 +224,6 @@ */ SmartUtil::tstring getText( HTREEITEM node ); - /// Returns the param of the current selected node - /** The return value is a unique application defined unsigned number ( optionally - * ) given when inserting nodes. <br> - * Note! <br> - * It is pointless calling this function if no param was given when inserting - * the nodes. <br> - * 0 is special case indicating failure - */ - virtual int getSelectedIndex() const; - - /// Sets the currently selected node - /** The parameter given is the param given when inserting the nodes <br> - * Note! <br> - * It is pointless calling this function if no param was given when inserting - * the nodes. - */ - virtual void setSelectedIndex( int idx ); - /// \ingroup EventHandlersWidgetTreeView /// Sets the event handler for what function to be called when a label is edited. /** Event handler signature is must be "bool foo( WidgetTreeView *, @@ -279,10 +258,6 @@ */ void create( const Seed & cs = Seed() ); - static bool isValidSelectionChanged( LPARAM lPar ) - { return true; - } - protected: // Constructor Taking pointer to parent explicit WidgetTreeView( Widget * parent ); @@ -308,6 +283,11 @@ // AspectColor void setColorImpl(COLORREF text, COLORREF background); + // AspectSelection + HTREEITEM getSelectedImpl() const; + void setSelectedImpl( HTREEITEM item ); + size_t countSelectedImpl() const; + }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -339,10 +319,6 @@ TreeView_SetBkColor(this->handle(), background); } -inline void WidgetTreeView::select(HTREEITEM item) { - TreeView_SelectItem(this->handle(), item); -} - inline Rectangle WidgetTreeView::getItemRect(HTREEITEM item) { RECT rc; TreeView_GetItemRect(this->handle(), item, &rc, TRUE); @@ -355,10 +331,6 @@ return TreeView_HitTest(this->handle(), &tvhti); } -inline HTREEITEM WidgetTreeView::getSelection() { - return TreeView_GetSelection(this->handle()); -} - inline void WidgetTreeView::expand(HTREEITEM node) { TreeView_Expand(this->handle(), node, TVE_EXPAND); } @@ -422,6 +394,19 @@ return retVal; } +inline HTREEITEM WidgetTreeView::getSelectedImpl() const { + return TreeView_GetSelection( this->handle() ); +} + +inline void WidgetTreeView::setSelectedImpl(HTREEITEM item) { + TreeView_SelectItem( this->handle(), item ); + TreeView_EnsureVisible(this->handle(), item); +} + +inline size_t WidgetTreeView::countSelectedImpl() const { + return getSelected() == NULL ? 0 : 1; +} + inline WidgetTreeView::WidgetTreeView( Widget * parent ) : ControlType( parent ) { Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/source/widgets/WidgetListView.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -105,41 +105,20 @@ } } -void WidgetListView::setSelectedIndex( int idx ) -{ - // TODO: Check if this is working right... - LVITEM it = { LVIF_STATE }; - it.iItem = idx; - it.state = LVIS_SELECTED | LVIS_FOCUSED; - it.stateMask = LVIS_SELECTED | LVIS_FOCUSED; - if ( ListView_SetItem( this->handle(), & it ) != TRUE ) - { - xCeption err( _T( "Something went wrong while trying to set the selected property of the ListView" ) ); - throw err; - } - if ( ListView_EnsureVisible( this->handle(), idx, FALSE ) != TRUE ) - { - xCeption err( _T( "Something went wrong while trying to scroll selected item into view in setSelectedIndex" ) ); - throw err; - } +void WidgetListView::setSelectedImpl(int item) { + clearSelection(); + ListView_SetItemState(handle(), item, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); + ListView_EnsureVisible(handle(), item, FALSE); } -void WidgetListView::clearSelection() -{ - LVITEM it = { LVIF_STATE }; - it.stateMask = LVIS_SELECTED; - it.state = 0; - std::vector< unsigned > selectedItems = getSelected(); - - for ( std::vector< unsigned >::iterator iter = selectedItems.begin(); iter != selectedItems.end(); ++iter ) - { - it.iItem = * iter; - if ( ListView_SetItem( this->handle(), & it ) != TRUE ) - { - xCeption err( _T( "Something went wrong while trying to unset the selected property of the ListView" ) ); - throw err; - } +void WidgetListView::clearSelection() { + int i = -1; + while((i = getNext(i, LVNI_SELECTED)) != -1) { + ListView_SetItemState(handle(), i, 0, LVIS_SELECTED | LVIS_FOCUSED); } + while((i = getNext(i, LVNI_FOCUSED)) != -1) { + ListView_SetItemState(handle(), i, 0, LVIS_FOCUSED); + } } void WidgetListView::createColumns( const std::vector< SmartUtil::tstring > & colNames ) @@ -229,7 +208,7 @@ return buffer; } -std::vector< unsigned > WidgetListView::getSelected() +std::vector< unsigned > WidgetListView::getSelection() const { std::vector< unsigned > retVal; int tmpIdx = - 1; Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -68,7 +68,7 @@ } WidgetChildWindow* WidgetTabView::getActive() { - TabInfo* ti = getTabInfo(tab->getSelectedIndex()); + TabInfo* ti = getTabInfo(tab->getSelected()); return ti ? ti->w : 0; } @@ -77,7 +77,7 @@ setActive(*(--(--viewOrder.end()))); } - WidgetChildWindow* cur = getTabInfo(tab->getSelectedIndex())->w; + WidgetChildWindow* cur = getTabInfo(tab->getSelected())->w; viewOrder.remove(w); @@ -115,7 +115,7 @@ if(i == -1) return; - tab->setSelectedIndex(i); + tab->setSelected(i); handleTabSelected(); } @@ -137,7 +137,7 @@ } void WidgetTabView::handleTabSelected() { - int i = tab->getSelectedIndex(); + int i = tab->getSelected(); if(i == active) { return; } @@ -162,7 +162,7 @@ void WidgetTabView::mark(WidgetChildWindow* w) { int i = findTab(w); - if(i != -1 && i != tab->getSelectedIndex()) { + if(i != -1 && i != tab->getSelected()) { tab->setHighlight(i, true); } } @@ -210,7 +210,7 @@ void WidgetTabView::layout() { Rectangle tmp = tab->getUsableArea(true); if(!(tmp == clientSize)) { - int i = tab->getSelectedIndex(); + int i = tab->getSelected(); if(i != -1) { ::MoveWindow(getTabInfo(i)->w->handle(), tmp.x(), tmp.y(), tmp.width(), tmp.height(), TRUE); } @@ -340,7 +340,7 @@ tab->addPage(formatTitle(ti->w->getText()), dropPos, reinterpret_cast<LPARAM>(ti), image); - active = tab->getSelectedIndex(); + active = tab->getSelected(); layout(); } @@ -349,7 +349,7 @@ bool WidgetTabView::handleContextMenu(ScreenCoordinate pt) { TabInfo* ti = 0; if(pt.x() == -1 && pt.y() == -1) { - int i = tab->getSelectedIndex(); + int i = tab->getSelected(); RECT rc; if(i == -1 || !TabCtrl_GetItemRect(tab->handle(), i, &rc)) { @@ -385,7 +385,7 @@ if(msg.message == WM_KEYUP && msg.wParam == VK_CONTROL) { inTab = false; - TabInfo* ti = getTabInfo(tab->getSelectedIndex()); + TabInfo* ti = getTabInfo(tab->getSelected()); if(ti) { setTop(ti->w); } @@ -400,7 +400,7 @@ bool WidgetTabView::tryFire(const MSG& msg, LRESULT& retVal) { bool handled = PolicyType::tryFire(msg, retVal); if(!handled && msg.message == WM_COMMAND && getTab()) { - TabInfo* ti = getTabInfo(getTab()->getSelectedIndex()); + TabInfo* ti = getTabInfo(getTab()->getSelected()); if(ti) { handled = ti->w->tryFire(msg, retVal); } Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/smartwin/source/widgets/WidgetTreeView.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -96,30 +96,6 @@ TreeView_SetImageList( this->Widget::handle(), imageList->getImageList(), TVSIL_STATE ); } -int WidgetTreeView::getSelectedIndex() const -{ - HTREEITEM hSelItem = TreeView_GetSelection( this->handle() ); - TVITEM item; - ZeroMemory( & item, sizeof( TVITEM ) ); - item.mask = TVIF_HANDLE | TVIF_PARAM; - item.hItem = hSelItem; - if ( TreeView_GetItem( this->handle(), & item ) ) - return static_cast< unsigned >( item.lParam ); - return 0; -} - -void WidgetTreeView::setSelectedIndex( int idx ) -{ - TVITEM item; - item.mask = TVIF_PARAM; - item.lParam = idx; - if ( TreeView_GetItem( this->handle(), & item ) == FALSE ) - { - throw xCeption( _T( "Couldn't find given item" ) ); - } - TreeView_Select( this->handle(), item.hItem, TVGN_FIRSTVISIBLE ); -} - LPARAM WidgetTreeView::getDataImpl(HTREEITEM item) { TVITEM tvitem = { TVIF_PARAM | TVIF_HANDLE }; tvitem.hItem = item; @@ -137,7 +113,7 @@ } ScreenCoordinate WidgetTreeView::getContextMenuPos() { - HTREEITEM item = getSelection(); + HTREEITEM item = getSelected(); POINT pt = { 0 }; if(item) { RECT trc = this->getItemRect(item); @@ -149,8 +125,8 @@ void WidgetTreeView::select(const ScreenCoordinate& pt) { HTREEITEM ht = this->hitTest(pt); - if(ht != NULL && ht != this->getSelection()) { - this->select(ht); + if(ht != NULL && ht != this->getSelected()) { + this->setSelected(ht); } } Modified: dcplusplus/trunk/win32/ADLSProperties.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSProperties.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/ADLSProperties.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -62,7 +62,7 @@ searchType->addValue(T_("Filename")); searchType->addValue(T_("Directory")); searchType->addValue(T_("Full Path")); - searchType->setSelectedIndex(search->sourceType); + searchType->setSelected(search->sourceType); minSize = attachTextBox(IDC_MIN_FILE_SIZE); minSize->setText((search->minFileSize > 0) ? Text::toT(Util::toString(search->minFileSize)) : Util::emptyStringT); @@ -75,7 +75,7 @@ sizeType->addValue(T_("KiB")); sizeType->addValue(T_("MiB")); sizeType->addValue(T_("GiB")); - sizeType->setSelectedIndex(search->typeFileSize); + sizeType->setSelected(search->typeFileSize); destDir = attachTextBox(IDC_DEST_DIR); destDir->setText(Text::toT(search->destDir)); @@ -106,7 +106,7 @@ void ADLSProperties::handleOKClicked() { search->searchString = Text::fromT(searchString->getText()); - search->sourceType = (ADLSearch::SourceType)searchType->getSelectedIndex(); + search->sourceType = ADLSearch::SourceType(searchType->getSelected()); tstring minFileSize = minSize->getText(); search->minFileSize = minFileSize.empty() ? -1 : Util::toInt64(Text::fromT(minFileSize)); @@ -114,7 +114,7 @@ tstring maxFileSize = maxSize->getText(); search->maxFileSize = maxFileSize.empty() ? -1 : Util::toInt64(Text::fromT(maxFileSize)); - search->typeFileSize = (ADLSearch::SizeType)sizeType->getSelectedIndex(); + search->typeFileSize = ADLSearch::SizeType(sizeType->getSelected()); search->destDir = Text::fromT(destDir->getText()); Modified: dcplusplus/trunk/win32/ADLSearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -160,8 +160,8 @@ int index; // Add new search to the end or if selected, just before - if(items->getSelectedCount() == 1) { - index = items->getSelectedIndex(); + if(items->countSelected() == 1) { + index = items->getSelected(); collection.insert(collection.begin() + index, search); } else { index = -1; @@ -174,7 +174,7 @@ void ADLSearchFrame::handleProperties() { // Get selection info - std::vector<unsigned> selected = items->getSelected(); + std::vector<unsigned> selected = items->getSelection(); for(std::vector<unsigned>::const_iterator i = selected.begin(); i != selected.end(); ++i) { // Edit existing ADLSearchManager::SearchCollection& collection = ADLSearchManager::getInstance()->collection; @@ -198,7 +198,7 @@ void ADLSearchFrame::handleUp() { ADLSearchManager::SearchCollection& collection = ADLSearchManager::getInstance()->collection; HoldRedraw hold(items); - std::vector<unsigned> selected = items->getSelected(); + std::vector<unsigned> selected = items->getSelection(); for(std::vector<unsigned>::const_iterator i = selected.begin(); i != selected.end(); ++i) { if(*i > 0) { ADLSearch search = collection[*i]; @@ -213,7 +213,7 @@ void ADLSearchFrame::handleDown() { ADLSearchManager::SearchCollection& collection = ADLSearchManager::getInstance()->collection; HoldRedraw hold(items); - std::vector<unsigned> selected = items->getSelected(); + std::vector<unsigned> selected = items->getSelection(); for(std::vector<unsigned>::reverse_iterator i = selected.rbegin(); i != selected.rend(); ++i) { if(*i < items->size() - 1) { ADLSearch search = collection[*i]; @@ -235,7 +235,7 @@ } void ADLSearchFrame::handleDoubleClick() { - if(items->hasSelection()) { + if(items->hasSelected()) { handleProperties(); } else { handleAdd(); @@ -287,7 +287,7 @@ contextMenu->appendItem(IDC_EDIT, T_("&Properties"), std::tr1::bind(&ADLSearchFrame::handleProperties, this)); contextMenu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&ADLSearchFrame::handleRemove, this)); - bool status = items->hasSelection(); + bool status = items->hasSelected(); contextMenu->setItemEnabled(IDC_EDIT, false, status); contextMenu->setItemEnabled(IDC_REMOVE, false, status); Modified: dcplusplus/trunk/win32/AppearancePage.cpp =================================================================== --- dcplusplus/trunk/win32/AppearancePage.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/AppearancePage.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -108,7 +108,7 @@ } } - languages->setSelectedIndex(selected); + languages->setSelected(selected); attachTextBox(IDC_DEFAULT_AWAY_MESSAGE); attachTextBox(IDC_TIME_STAMPS_FORMAT); Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp =================================================================== --- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -289,10 +289,10 @@ } updateTree(d, ht); - dirs->select(NULL); + dirs->setSelected(NULL); selectItem(root); - dcdebug("selected"); + dcdebug("setSelecteded"); dirs->expand(treeRoot); } @@ -389,12 +389,12 @@ bool DirectoryListingFrame::handleFilesContextMenu(SmartWin::ScreenCoordinate pt) { WidgetMenuPtr contextMenu; - if(files->hasSelection()) { + if(files->hasSelected()) { if(pt.x() == -1 && pt.y() == -1) { pt = files->getContextMenuPos(); } - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { ItemInfo* ii = files->getSelectedData(); if(BOOLSETTING(SHOW_SHELL_MENU) && (dl->getUser() == ClientManager::getInstance()->getMe()) && ii->type == ItemInfo::FILE) { string path; @@ -432,7 +432,7 @@ dirs->select(pt); } - if(dirs->getSelection()) { + if(dirs->getSelected()) { WidgetMenuPtr contextMenu = makeDirMenu(); usingDirMenu = true; contextMenu->trackPopupMenu(pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON); @@ -488,7 +488,7 @@ } } } else { - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { ItemInfo* ii = files->getSelectedData(); try { if(ii->type == ItemInfo::FILE) { @@ -540,7 +540,7 @@ return; } - if(files->getSelectedCount() != 1) { + if(files->countSelected() != 1) { return; } @@ -555,7 +555,7 @@ void DirectoryListingFrame::handleGoToDirectory() { - if(files->getSelectedCount() != 1) + if(files->countSelected() != 1) return; tstring fullPath; @@ -586,7 +586,7 @@ download(ii, target); } } else { - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { ItemInfo* ii = files->getSelectedData(); download(ii, target); } else { @@ -617,7 +617,7 @@ HTREEITEM ht = findItem(treeRoot, name); if(ht != NULL) { dirs->ensureVisible(ht); - dirs->select(ht); + dirs->setSelected(ht); } } @@ -638,7 +638,7 @@ void DirectoryListingFrame::updateStatus() { if(!searching && !updating) { - int cnt = files->getSelectedCount(); + int cnt = files->countSelected(); int64_t total = 0; if(cnt == 0) { cnt = files->size(); @@ -713,13 +713,13 @@ } void DirectoryListingFrame::up() { - HTREEITEM t = dirs->getSelection(); + HTREEITEM t = dirs->getSelected(); if(t == NULL) return; t = dirs->getParent(t); if(t == NULL) return; - dirs->select(t); + dirs->setSelected(t); } void DirectoryListingFrame::back() { @@ -811,24 +811,24 @@ // Do a search int foundFile = -1, skipHitsTmp = skipHits; - HTREEITEM const oldDir = dirs->getSelection(); + HTREEITEM const oldDir = dirs->getSelected(); HTREEITEM const foundDir = findFile(StringSearch(findStr), treeRoot, foundFile, skipHitsTmp); if(foundDir) { // Highlight the directory tree and list if the parent dir/a matched dir was found if(foundFile >= 0) { // SelectItem won't update the list if SetRedraw was set to FALSE and then - // to TRUE and the item selected is the same as the last one... workaround: + // to TRUE and the item setSelecteded is the same as the last one... workaround: if(oldDir == foundDir) - dirs->select(NULL); + dirs->setSelected(NULL); - dirs->select(foundDir); + dirs->setSelected(foundDir); } else { - // Got a dir; select its parent directory in the tree if there is one + // Got a dir; setSelected its parent directory in the tree if there is one HTREEITEM parentItem = dirs->getParent(foundDir); if(parentItem) { // Go to parent file list - dirs->select(parentItem); + dirs->setSelected(parentItem); // Locate the dir in the file list DirectoryListing::Directory* dir = dirs->getData(foundDir)->dir; @@ -836,25 +836,25 @@ foundFile = files->find(Text::toT(dir->getName()), -1, false); } else { // If no parent exists, just the dir tree item and skip the list highlighting - dirs->select(foundDir); + dirs->setSelected(foundDir); } } - // Remove prev. selection from file list - if(files->hasSelection()) { + // Remove prev. setSelectedion from file list + if(files->hasSelected()) { files->clearSelection(); } // Highlight and focus the dir/file if possible if(foundFile >= 0) { files->setFocus(); - files->setSelectedIndex(foundFile); + files->setSelected(foundFile); files->ensureVisible(foundFile); } else { dirs->setFocus(); } } else { - dirs->select(oldDir); + dirs->setSelected(oldDir); createMessageBox().show(T_("No matches"), T_("Search for file")); } } @@ -904,8 +904,8 @@ void DirectoryListingFrame::handleDoubleClickFiles() { - HTREEITEM t = dirs->getSelection(); - int i = files->getSelectedIndex(); + HTREEITEM t = dirs->getSelected(); + int i = files->getSelected(); if(t != NULL && i != -1) { ItemInfo* ii = files->getData(i); @@ -919,7 +919,7 @@ HTREEITEM ht = dirs->getChild(t); while(ht != NULL) { if(dirs->getData(ht)->dir == ii->dir) { - dirs->select(ht); + dirs->setSelected(ht); break; } ht = dirs->getNextSibling(ht); @@ -954,13 +954,13 @@ return true; } if(c == VK_RETURN) { - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { ItemInfo* ii = files->getSelectedData(); if(ii->type == ItemInfo::DIRECTORY) { - HTREEITEM ht = dirs->getChild(dirs->getSelection()); + HTREEITEM ht = dirs->getChild(dirs->getSelected()); while(ht != NULL) { if(dirs->getData(ht)->dir == ii->dir) { - dirs->select(ht); + dirs->setSelected(ht); break; } ht = dirs->getNextSibling(ht); Modified: dcplusplus/trunk/win32/FavHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -181,8 +181,8 @@ } void FavHubsFrame::handleProperties() { - if(hubs->getSelectedCount() == 1) { - int i = hubs->getSelectedIndex(); + if(hubs->countSelected() == 1) { + int i = hubs->getSelected(); FavoriteHubEntryPtr e = reinterpret_cast<FavoriteHubEntryPtr>(hubs->getData(i)); dcassert(e != NULL); FavHubProperties dlg(this, e); @@ -201,7 +201,7 @@ nosave = true; FavoriteHubEntryList& fh = FavoriteManager::getInstance()->getFavoriteHubs(); HoldRedraw hold(hubs); - std::vector<unsigned> selected = hubs->getSelected(); + std::vector<unsigned> selected = hubs->getSelection(); for(std::vector<unsigned>::const_iterator i = selected.begin(); i != selected.end(); ++i) { if(*i > 0) { FavoriteHubEntryPtr e = fh[*i]; @@ -219,7 +219,7 @@ nosave = true; FavoriteHubEntryList& fh = FavoriteManager::getInstance()->getFavoriteHubs(); HoldRedraw hold(hubs); - std::vector<unsigned> selected = hubs->getSelected(); + std::vector<unsigned> selected = hubs->getSelection(); for(std::vector<unsigned>::reverse_iterator i = selected.rbegin(); i != selected.rend(); ++i) { if(*i < hubs->size() - 1) { FavoriteHubEntryPtr e = fh[*i]; @@ -234,7 +234,7 @@ } void FavHubsFrame::handleRemove() { - if(hubs->hasSelection() && (!BOOLSETTING(CONFIRM_HUB_REMOVAL) || createMessageBox().show(T_("Really remove?"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == WidgetMessageBox::RETBOX_YES)) { + if(hubs->hasSelected() && (!BOOLSETTING(CONFIRM_HUB_REMOVAL) || createMessageBox().show(T_("Really remove?"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == WidgetMessageBox::RETBOX_YES)) { int i; while((i = hubs->getNext(-1, LVNI_SELECTED)) != -1) FavoriteManager::getInstance()->removeFavorite(reinterpret_cast<FavoriteHubEntryPtr>(hubs->getData(i))); @@ -242,7 +242,7 @@ } void FavHubsFrame::handleDoubleClick() { - if(hubs->hasSelection()) { + if(hubs->hasSelected()) { openSelected(); } else { handleAdd(); @@ -290,7 +290,7 @@ menu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&FavHubsFrame::handleRemove, this)); menu->setDefaultItem(IDC_CONNECT); - bool status = hubs->hasSelection(); + bool status = hubs->hasSelected(); menu->setItemEnabled(IDC_CONNECT, false, status); menu->setItemEnabled(IDC_EDIT, false, status); menu->setItemEnabled(IDC_MOVE_UP, false, status); @@ -318,7 +318,7 @@ } void FavHubsFrame::openSelected() { - if(!hubs->hasSelection()) + if(!hubs->hasSelected()) return; if(SETTING(NICK).empty()) { @@ -326,7 +326,7 @@ return; } - std::vector<unsigned> items = hubs->getSelected(); + std::vector<unsigned> items = hubs->getSelection(); for(std::vector<unsigned>::iterator i = items.begin(); i != items.end(); ++i) { FavoriteHubEntryPtr entry = reinterpret_cast<FavoriteHubEntryPtr>(hubs->getData(*i)); HubFrame::openWindow(getParent(), entry->getServer()); Modified: dcplusplus/trunk/win32/FavoriteDirsPage.cpp =================================================================== --- dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -92,7 +92,7 @@ } void FavoriteDirsPage::handleDoubleClick() { - if(directories->hasSelection()) { + if(directories->hasSelected()) { handleRenameClicked(); } else { handleAddClicked(); @@ -112,9 +112,9 @@ } LRESULT FavoriteDirsPage::handleItemChanged(WPARAM wParam, LPARAM lParam) { - BOOL hasSelection = directories->hasSelection() ? TRUE : FALSE; - ::EnableWindow(::GetDlgItem(handle(), IDC_RENAME), hasSelection); - ::EnableWindow(::GetDlgItem(handle(), IDC_REMOVE), hasSelection); + BOOL hasSelected = directories->hasSelected() ? TRUE : FALSE; + ::EnableWindow(::GetDlgItem(handle(), IDC_RENAME), hasSelected); + ::EnableWindow(::GetDlgItem(handle(), IDC_REMOVE), hasSelected); return 0; } Modified: dcplusplus/trunk/win32/FinishedFrameBase.h =================================================================== --- dcplusplus/trunk/win32/FinishedFrameBase.h 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/FinishedFrameBase.h 2008-03-26 14:25:11 UTC (rev 1066) @@ -194,7 +194,7 @@ } void handleDoubleClick() { - if(items->hasSelection()) + if(items->hasSelected()) items->getSelectedData()->openFile(); } @@ -207,12 +207,12 @@ } bool handleContextMenu(SmartWin::ScreenCoordinate pt) { - if(items->hasSelection()) { + if(items->hasSelected()) { if(pt.x() == -1 && pt.y() == -1) { pt = items->getContextMenuPos(); } - if(BOOLSETTING(SHOW_SHELL_MENU) && items->getSelectedCount() == 1) { + if(BOOLSETTING(SHOW_SHELL_MENU) && items->countSelected() == 1) { string path = items->getSelectedData()->entry->getTarget(); if(File::getSize(path) != -1) { CShellContextMenu shellMenu; Modified: dcplusplus/trunk/win32/GeneralPage.cpp =================================================================== --- dcplusplus/trunk/win32/GeneralPage.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/GeneralPage.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -75,7 +75,7 @@ } } - connections->setSelectedIndex(selected); + connections->setSelected(selected); nick = attachTextBox(IDC_NICK); nick->setTextLimit(35); Modified: dcplusplus/trunk/win32/HubFrame.cpp =================================================================== --- dcplusplus/trunk/win32/HubFrame.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/HubFrame.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -117,7 +117,7 @@ filterType->addValue(T_(columnNames[j])); } filterType->addValue(T_("Any")); - filterType->setSelectedIndex(COLUMN_LAST); + filterType->setSelected(COLUMN_LAST); filterType->onSelectionChanged(std::tr1::bind(&HubFrame::updateUserList, this, (UserInfo*)0)); } @@ -902,7 +902,7 @@ tstring HubFrame::getStatusShared() const { int64_t available; - if (users->getSelectedCount() > 1) { + if (users->countSelected() > 1) { available = users->forEachSelectedT(CountAvailable()).available; } else { available = std::for_each(userMap.begin(), userMap.end(), CountAvailable()).available; @@ -919,8 +919,8 @@ } tstring textForUsers; - if (users->getSelectedCount() > 1) - textForUsers += Text::toT(Util::toString(users->getSelectedCount()) + "/"); + if (users->countSelected() > 1) + textForUsers += Text::toT(Util::toString(users->countSelected()) + "/"); if (showUsers->getChecked() && users->size() < userCount) textForUsers += Text::toT(Util::toString(users->size()) + "/"); return textForUsers + str(TFN_("%1% user", "%1% users", userCount) % userCount); @@ -1037,7 +1037,7 @@ int64_t size = -1; FilterModes mode = NONE; - int sel = filterType->getSelectedIndex(); + int sel = filterType->getSelected(); bool doSizeCompare = parseFilter(mode, size) && sel == COLUMN_SHARED; @@ -1130,7 +1130,7 @@ int pos = users->find(txt); if(pos != -1) { users->clearSelection(); - users->setSelectedIndex(pos); + users->setSelected(pos); users->ensureVisible(pos); doMenu = true; } @@ -1140,7 +1140,7 @@ } bool HubFrame::handleUsersContextMenu(SmartWin::ScreenCoordinate pt) { - if(users->hasSelection()) { + if(users->hasSelected()) { if(pt.x() == -1 || pt.y() == -1) { pt = users->getContextMenuPos(); } @@ -1217,7 +1217,7 @@ } void HubFrame::handleDoubleClickUsers() { - if(users->hasSelection()) { + if(users->hasSelected()) { users->getSelectedData()->getList(); } } @@ -1335,7 +1335,7 @@ // Maybe it found a unique match. If userlist showing, highlight. if (showUsers->getChecked() && tabCompleteNicks.size() == 2) { int i = users->find(Text::toT(tabCompleteNicks[1])); - users->setSelectedIndex(i); + users->setSelected(i); users->ensureVisible(i); } Modified: dcplusplus/trunk/win32/HubListsDlg.cpp =================================================================== --- dcplusplus/trunk/win32/HubListsDlg.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/HubListsDlg.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -93,7 +93,7 @@ } void HubListsDlg::handleDoubleClick() { - if(hubLists->hasSelection()) { + if(hubLists->hasSelected()) { handleEditClicked(); } } @@ -119,7 +119,7 @@ void HubListsDlg::handleMoveUpClicked() { HoldRedraw hold(hubLists); - std::vector<unsigned> selected = hubLists->getSelected(); + std::vector<unsigned> selected = hubLists->getSelection(); for(std::vector<unsigned>::const_iterator i = selected.begin(); i != selected.end(); ++i) { if(*i > 0) { tstring selText = hubLists->getText(*i, 0); @@ -132,7 +132,7 @@ void HubListsDlg::handleMoveDownClicked() { HoldRedraw hold(hubLists); - std::vector<unsigned> selected = hubLists->getSelected(); + std::vector<unsigned> selected = hubLists->getSelection(); for(std::vector<unsigned>::reverse_iterator i = selected.rbegin(); i != selected.rend(); ++i) { if(*i < hubLists->size() - 1) { tstring selText = hubLists->getText(*i, 0); Modified: dcplusplus/trunk/win32/LogPage.cpp =================================================================== --- dcplusplus/trunk/win32/LogPage.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/LogPage.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -131,7 +131,7 @@ LRESULT LogPage::handleItemChanged() { getValues(); - int sel = dataGrid->getSelectedIndex(); + int sel = dataGrid->getSelected(); if(sel >= 0 && sel < LogManager::LAST) { bool checkState = dataGrid->isChecked(sel); Modified: dcplusplus/trunk/win32/PublicHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -135,7 +135,7 @@ filterSel->addValue(T_(columnNames[j])); } filterSel->addValue(T_("Any")); - filterSel->setSelectedIndex(COLUMN_LAST); + filterSel->setSelected(COLUMN_LAST); filterSel->onSelectionChanged(std::tr1::bind(&PublicHubsFrame::updateList, this)); pubLists = createComboBox(WinUtil::Seeds::comboBoxStatic); @@ -272,12 +272,12 @@ } void PublicHubsFrame::updateDropDown() { - pubLists->removeAllItems(); + pubLists->clear(); StringList lists(FavoriteManager::getInstance()->getHubLists()); for(StringList::iterator idx = lists.begin(); idx != lists.end(); ++idx) { pubLists->addValue(Text::toT(*idx).c_str()); } - pubLists->setSelectedIndex(FavoriteManager::getInstance()->getSelectedHubList()); + pubLists->setSelected(FavoriteManager::getInstance()->getSelectedHubList()); } void PublicHubsFrame::updateList() { @@ -290,7 +290,7 @@ double size = -1; FilterModes mode = NONE; - int sel = filterSel->getSelectedIndex(); + int sel = filterSel->getSelected(); bool doSizeCompare = parseFilter(mode, size); @@ -438,7 +438,7 @@ } bool PublicHubsFrame::handleContextMenu(SmartWin::ScreenCoordinate pt) { - if(hubs->hasSelection()) { + if(hubs->hasSelected()) { if(pt.x() == -1 && pt.y() == -1) { pt = hubs->getContextMenuPos(); } @@ -471,7 +471,7 @@ if(!checkNick()) return; - if(hubs->hasSelection() == 1) { + if(hubs->hasSelected() == 1) { HubFrame::openWindow(getParent(), hubs->getSelectedData()->entry->getServer()); } } @@ -480,13 +480,13 @@ if(!checkNick()) return; - if(hubs->hasSelection()) { + if(hubs->hasSelected()) { FavoriteManager::getInstance()->addFavorite(*hubs->getSelectedData()->entry); } } void PublicHubsFrame::handleCopyHub() { - if(hubs->hasSelection()) { + if(hubs->hasSelected()) { WinUtil::setClipboard(Text::toT(hubs->getSelectedData()->entry->getServer())); } } @@ -504,7 +504,7 @@ if(!checkNick()) return; - if(hubs->hasSelection()) { + if(hubs->hasSelected()) { HubFrame::openWindow(getParent(), hubs->getSelectedData()->entry->getServer()); } } @@ -518,7 +518,7 @@ } void PublicHubsFrame::handleListSelChanged() { - FavoriteManager::getInstance()->setHubList(pubLists->getSelectedIndex()); + FavoriteManager::getInstance()->setHubList(pubLists->getSelected()); entries = FavoriteManager::getInstance()->getPublicHubs(); updateList(); } Modified: dcplusplus/trunk/win32/QueueFrame.cpp =================================================================== --- dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -260,7 +260,7 @@ void QueueFrame::updateStatus() { int64_t total = 0; - int cnt = files->getSelectedCount(); + int cnt = files->countSelected(); if(cnt < 2) { cnt = files->size(); if(showTree->getChecked()) { @@ -694,11 +694,11 @@ void QueueFrame::removeSelectedDir() { if(!BOOLSETTING(CONFIRM_ITEM_REMOVAL) || createMessageBox().show(T_("Really remove?"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == IDYES) - removeDir(dirs->getSelection()); + removeDir(dirs->getSelected()); } void QueueFrame::moveSelected() { - int n = files->getSelectedCount(); + int n = files->countSelected(); if(n == 1) { // Single file, get the full filename and move... QueueItemInfo* ii = files->getSelectedData(); @@ -738,14 +738,15 @@ } void QueueFrame::moveSelectedDir() { - if(dirs->getSelection() == NULL) + HTREEITEM item = dirs->getSelected(); + if(!item) return; dcassert(!curDir.empty()); tstring name = Text::toT(curDir); if(WinUtil::browseDirectory(name, handle())) { - moveDir(dirs->getSelection(), Text::fromT(name)); + moveDir(item, Text::fromT(name)); } } @@ -768,7 +769,7 @@ void QueueFrame::handleBrowseList(const UserPtr& user) { - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { try { QueueManager::getInstance()->addList(user, QueueItem::FLAG_CLIENT_VIEW); } catch(const Exception&) { @@ -778,7 +779,7 @@ void QueueFrame::handleReadd(const UserPtr& user) { - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { QueueItemInfo* ii = files->getSelectedData(); if(!user) { @@ -806,7 +807,7 @@ void QueueFrame::handleRemoveSource(const UserPtr& user) { - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { QueueItemInfo* ii = files->getSelectedData(); if(!user) { @@ -824,7 +825,7 @@ } void QueueFrame::handlePM(const UserPtr& user) { - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { PrivateFrame::openWindow(getParent(), user); } } @@ -843,9 +844,9 @@ } if(usingDirMenu) { - setPriority(dirs->getSelection(), p); + setPriority(dirs->getSelected(), p); } else { - std::vector<size_t> selected = files->getSelected(); + std::vector<size_t> selected = files->getSelection(); for(std::vector<size_t>::iterator i = selected.begin(); i != selected.end(); ++i) { QueueManager::getInstance()->setPriority(files->getData(*i)->getTarget(), p); } @@ -871,7 +872,7 @@ * @param inc True = increase, False = decrease */ void QueueFrame::changePriority(bool inc){ - std::vector<size_t> selected = files->getSelected(); + std::vector<size_t> selected = files->getSelection(); for(std::vector<size_t>::iterator i = selected.begin(); i != selected.end(); ++i) { QueueItemInfo* ii = files->getData(*i); QueueItem::Priority p = ii->getPriority(); @@ -1053,7 +1054,7 @@ } bool QueueFrame::handleFilesContextMenu(SmartWin::ScreenCoordinate pt) { - if(files->getSelectedCount() > 0) { + if(files->countSelected() > 0) { if(pt.x() == -1 || pt.y() == -1) { pt = files->getContextMenuPos(); } @@ -1061,7 +1062,7 @@ usingDirMenu = false; WidgetMenuPtr contextMenu; - if(files->getSelectedCount() == 1) { + if(files->countSelected() == 1) { QueueItemInfo* ii = files->getSelectedData(); contextMenu = makeSingleMenu(ii); } else { @@ -1081,7 +1082,7 @@ dirs->select(pt); } - if(dirs->getSelection()) { + if(dirs->hasSelected()) { usingDirMenu = true; WidgetMenuPtr contextMenu = makeDirMenu(); contextMenu->trackPopupMenu(pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON); Modified: dcplusplus/trunk/win32/SearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-26 14:19:33 UTC (rev 1065) +++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-26 14:25:11 UTC (rev 1066) @@ -172,7 +172,7 @@ sizeMode->addValue(T_("KiB")); sizeMode->addValue(T_("MiB")); sizeMode->addValue(T_("GiB")); - sizeMode->setSelectedIndex((initialSize == 0) ? 2 : 0); + sizeMode->setSelected((initialSize == 0) ? 2 : 0); } { @@ -275,14 +275,14 @@ if(!initialString.empty()) { lastSearches.push_back(initialString); searchBox->insertValue(0, initialString); - searchBox->setSelectedIndex(0); - mode->setSelectedIndex(initialMode); + searchBox->setSelected(0); + mode->setSelected(initialMode); size->setText(Text::toT(Util::toString(initialSize))); - fileType->setSelectedIndex(initialType); + fileType->setSelected(initialType); runSearch(); } else { - mode->setSelectedIndex(1); - fileType->setSelectedIndex(SETTING(LAST_SEARCH_TYPE)); + mode->setSelected(1); + fileType->setSelected(SETTING(LAST_SEARCH_TYPE)); } searchBox->setFocus(); } @@ -583,7 +583,7 @@ } void SearchFrame::handlePurgeClicked() { - searchBox->removeAllItems(); + searchBox->clear(); lastSearches.clear(); } @@ -623,7 +623,7 @@ } bool SearchFrame::handleContextMenu(SmartWin::ScreenCoordinate pt) { - if(results->getSelectedCount() > 0) { + if(results->countSelected() > 0) { if(pt.x() == -1 && pt.y() == -1) { pt = results->getContextMenuPos(); } @@ -653,7 +653,7 @@ } void SearchFrame::handleDownloadTo() { - if(resul... [truncated message content] |
From: <arn...@us...> - 2008-03-26 14:19:35
|
Revision: 1065 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1065&view=rev Author: arnetheduck Date: 2008-03-26 07:19:33 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Move AspectBorder to AspectControl Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-25 22:01:37.789999962 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-03-25 22:17:47.410000086 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - smartwin/include/smartwin/aspects/AspectColor.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Faspects%2FAspectBackgroundColor.h + Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -1,7 +1,6 @@ #ifndef ASPECTBUTTON_H_ #define ASPECTBUTTON_H_ -#include "AspectBorder.h" #include "AspectColor.h" #include "AspectClickable.h" #include "AspectControl.h" @@ -15,7 +14,6 @@ /** Common stuff for all buttons */ template<typename WidgetType> class AspectButton : - public AspectBorder< WidgetType >, public AspectClickable<WidgetType>, public AspectColor<WidgetType>, public AspectColorCtlImpl<WidgetType>, Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectControl.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -4,6 +4,7 @@ #include "../Policies.h" #include "../xCeption.h" +#include "AspectBorder.h" #include "AspectContextMenu.h" #include "AspectEnabled.h" #include "AspectHelp.h" @@ -20,6 +21,7 @@ class AspectControl : public MessageMapPolicy< Policies::Subclassed >, + public AspectBorder<WidgetType>, public AspectContextMenu<WidgetType>, public AspectEnabled<WidgetType>, public AspectHelp<WidgetType>, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -29,7 +29,6 @@ #define WidgetComboBox_h #include "../Widget.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectControl.h" @@ -58,7 +57,6 @@ */ class WidgetComboBox : // Aspects - public AspectBorder< WidgetComboBox >, public AspectClickable< WidgetComboBox >, public AspectColor< WidgetComboBox >, public AspectColorCtlImpl<WidgetComboBox>, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -32,7 +32,6 @@ #include "../Point.h" #include "../Rectangle.h" #include "../resources/ImageList.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" #include "../aspects/AspectColor.h" @@ -70,7 +69,6 @@ */ class WidgetListView : // Aspect classes - public AspectBorder< WidgetListView >, public AspectClickable< WidgetListView >, public AspectCollection<WidgetListView, int>, public AspectColor<WidgetListView>, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetProgressBar.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -29,10 +29,8 @@ #define WidgetProgressBar_h #include "../Widget.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectPainting.h" -#include "../aspects/AspectScrollable.h" namespace SmartWin { @@ -54,7 +52,6 @@ */ class WidgetProgressBar : // Aspects - public AspectBorder< WidgetProgressBar >, public AspectControl<WidgetProgressBar>, public AspectPainting< WidgetProgressBar > { Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSlider.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -29,7 +29,6 @@ #define WidgetSlider_h #include "../Widget.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectPainting.h" @@ -58,7 +57,6 @@ */ class WidgetSlider : // Aspects - public AspectBorder< WidgetSlider >, public AspectControl<WidgetSlider>, public AspectFocus< WidgetSlider >, public AspectPainting< WidgetSlider >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetSpinner.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -29,7 +29,6 @@ #define WidgetSpinner_h #include "../Widget.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectPainting.h" @@ -56,7 +55,6 @@ */ class WidgetSpinner : // Aspects - public AspectBorder< WidgetSpinner >, public AspectControl<WidgetSpinner>, public AspectFocus< WidgetSpinner >, public AspectPainting< WidgetSpinner >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -29,7 +29,6 @@ #define WidgetStatic_h #include "../Widget.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectControl.h" @@ -62,7 +61,6 @@ */ class WidgetStatic : // Aspects - public AspectBorder< WidgetStatic >, public AspectClickable< WidgetStatic >, public AspectColor< WidgetStatic >, public AspectColorCtlImpl<WidgetStatic>, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatusBar.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -29,7 +29,6 @@ #define WidgetStatusBar_h #include "../Widget.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectDblClickable.h" @@ -107,7 +106,6 @@ public TypeOfStatusBar, // Aspects - public AspectBorder< WidgetStatusBar< TypeOfStatusBar > >, public AspectClickable< WidgetStatusBar< TypeOfStatusBar > >, public AspectControl<WidgetStatusBar< TypeOfStatusBar > >, public AspectDblClickable< WidgetStatusBar< TypeOfStatusBar > >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -31,7 +31,6 @@ #include "../Widget.h" #include "../resources/ImageList.h" #include "../Rectangle.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" @@ -64,7 +63,6 @@ */ class WidgetTabSheet : // Aspects - public AspectBorder< WidgetTabSheet >, public AspectControl<WidgetTabSheet>, public AspectFocus< WidgetTabSheet >, public AspectFont< WidgetTabSheet >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -29,7 +29,6 @@ #define WidgetTextBox_h #include "../Widget.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectColor.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" @@ -66,7 +65,6 @@ */ class WidgetTextBoxBase : // Aspect classes - public AspectBorder< WidgetTextBoxBase >, public AspectColor< WidgetTextBoxBase >, public AspectColorCtlImpl<WidgetTextBoxBase>, public AspectControl< WidgetTextBoxBase >, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-26 14:14:56 UTC (rev 1064) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-26 14:19:33 UTC (rev 1065) @@ -31,7 +31,6 @@ #include "../Widget.h" #include "../Rectangle.h" #include "../resources/ImageList.h" -#include "../aspects/AspectBorder.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" #include "../aspects/AspectColor.h" @@ -63,7 +62,6 @@ class WidgetTreeView : // Aspects - public AspectBorder< WidgetTreeView >, public AspectClickable< WidgetTreeView >, public AspectCollection<WidgetTreeView, HTREEITEM>, public AspectColor<WidgetTreeView>, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arn...@us...> - 2008-03-26 14:15:01
|
Revision: 1064 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1064&view=rev Author: arnetheduck Date: 2008-03-26 07:14:56 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Single interface for color setting Modified Paths: -------------- dcplusplus/trunk/changelog.txt dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h dcplusplus/trunk/win32/ADLSearchFrame.cpp dcplusplus/trunk/win32/Appearance2Page.cpp dcplusplus/trunk/win32/Appearance2Page.h dcplusplus/trunk/win32/DirectoryListingFrame.cpp dcplusplus/trunk/win32/FavHubsFrame.cpp dcplusplus/trunk/win32/FinishedFrameBase.h dcplusplus/trunk/win32/HubFrame.cpp dcplusplus/trunk/win32/MDIChildFrame.h dcplusplus/trunk/win32/PublicHubsFrame.cpp dcplusplus/trunk/win32/QueueFrame.cpp dcplusplus/trunk/win32/SearchFrame.cpp dcplusplus/trunk/win32/SpyFrame.cpp dcplusplus/trunk/win32/UsersFrame.cpp dcplusplus/trunk/win32/WaitingUsersFrame.cpp Added Paths: ----------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h Removed Paths: ------------- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBackgroundColor.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-03-25 18:52:16.157999992 +0100 committer: zouzou123gen properties: branch-nick: bzr + timestamp: 2008-03-25 22:01:37.789999962 +0100 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus Name: bzr:file-ids - + smartwin/include/smartwin/aspects/AspectColor.h 712@f586c4b0-9d0d-0410-bc51-f1fe239209fc:dcplusplus%2Ftrunk:smartwin%2Finclude%2Fsmartwin%2Faspects%2FAspectBackgroundColor.h Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/changelog.txt 2008-03-26 14:14:56 UTC (rev 1064) @@ -6,6 +6,7 @@ * [L#203865] Fixed multiple instances (poy) * Context-sensitive help (poy) * Fixed toolbar separators (poy) +* Upgraded to bzip2 1.0.5 (thanks mikejj) -- 0.705 2008-03-14 -- * Several patches for better *nix compatibility of the core (thanks steven sheehy et al) Deleted: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBackgroundColor.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBackgroundColor.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBackgroundColor.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -1,77 +0,0 @@ -/* - Copyright (c) 2005, Thomas Hansen - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the SmartWin++ nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef AspectBackgroundColor_h -#define AspectBackgroundColor_h - -#include "../resources/Brush.h" -#include "../CanvasClasses.h" - -namespace SmartWin -{ -// begin namespace SmartWin - -/// Aspect class used by Widgets that have the possibility of handling the -/// erase background property -/** \ingroup AspectClasses - * E.g. the WidgetWindow has a background Aspect to it, therefore WidgetListView - * realizes the AspectEnabled through inheritance. - */ -template< class WidgetType > -class AspectCtlColor { - WidgetType& W() { return *static_cast<WidgetType*>(this); } - - struct Dispatcher { - Dispatcher(const BrushPtr& brush_, COLORREF text_, COLORREF bg_) : brush(brush_), text(text_), bg(bg_) { } - - bool operator()(const MSG& msg, LRESULT& ret) { - HDC dc = (HDC) msg.wParam; - ::SetTextColor(dc, text); - ::SetBkColor(dc, bg); - ret = brush ? reinterpret_cast< LRESULT >( brush->handle() ) : 0; - return true; - } - - BrushPtr brush; - COLORREF text; - COLORREF bg; - }; - -public: - /// Set the background, text and text colors - void setColor(const BrushPtr& brush, COLORREF text, COLORREF textBackground) { - W().setCallback(Message(WM_CTLCOLOR), Dispatcher( brush, text, textBackground )); - } - -protected: - virtual ~AspectCtlColor() { } -}; - -// end namespace SmartWin -} - -#endif Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectButton.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -1,8 +1,8 @@ #ifndef ASPECTBUTTON_H_ #define ASPECTBUTTON_H_ -#include "AspectBackgroundColor.h" #include "AspectBorder.h" +#include "AspectColor.h" #include "AspectClickable.h" #include "AspectControl.h" #include "AspectDblClickable.h" @@ -15,9 +15,10 @@ /** Common stuff for all buttons */ template<typename WidgetType> class AspectButton : - public AspectCtlColor<WidgetType>, public AspectBorder< WidgetType >, public AspectClickable<WidgetType>, + public AspectColor<WidgetType>, + public AspectColorCtlImpl<WidgetType>, public AspectControl<WidgetType>, public AspectDblClickable<WidgetType>, public AspectFocus< WidgetType >, Copied: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h (from rev 1063, dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectBackgroundColor.h) =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h (rev 0) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -0,0 +1,91 @@ +/* + Copyright (c) 2005, Thomas Hansen + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the SmartWin++ nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef AspectColor_h +#define AspectColor_h + +#include "../resources/Brush.h" +#include "../CanvasClasses.h" + +namespace SmartWin +{ +// begin namespace SmartWin + +/// Aspect class used by Widgets that have the possibility of handling the +/// erase background property +/** \ingroup AspectClasses + * E.g. the WidgetWindow has a background Aspect to it, therefore WidgetListView + * realizes the AspectEnabled through inheritance. + */ +template<class WidgetType> +class AspectColor { + WidgetType& W() { return *static_cast<WidgetType*>(this); } +public: + void setColor(COLORREF text, COLORREF background) { + W().setColorImpl(text, background); + } + +protected: + virtual ~AspectColor() { } +}; + +template< class WidgetType > +class AspectColorCtlImpl { + friend class AspectColor<WidgetType>; + + WidgetType& W() { return *static_cast<WidgetType*>(this); } + + struct Dispatcher { + Dispatcher(COLORREF text_, COLORREF bg_) : brush(new Brush(bg_)), text(text_), bg(bg_) { } + + bool operator()(const MSG& msg, LRESULT& ret) { + HDC dc = (HDC) msg.wParam; + ::SetTextColor(dc, text); + ::SetBkColor(dc, bg); + ret = brush ? reinterpret_cast< LRESULT >( brush->handle() ) : 0; + return true; + } + + BrushPtr brush; + COLORREF text; + COLORREF bg; + }; + + /// Set the background, text and text colors + void setColorImpl(COLORREF text, COLORREF background) { + W().setCallback(Message(WM_CTLCOLOR), Dispatcher(text, background)); + } + +protected: + virtual ~AspectColorCtlImpl() { } +}; + + +// end namespace SmartWin +} + +#endif Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetComboBox.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -30,7 +30,7 @@ #include "../Widget.h" #include "../aspects/AspectBorder.h" -#include "../aspects/AspectBackgroundColor.h" +#include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectDblClickable.h" @@ -58,9 +58,10 @@ */ class WidgetComboBox : // Aspects - public AspectCtlColor< WidgetComboBox >, public AspectBorder< WidgetComboBox >, public AspectClickable< WidgetComboBox >, + public AspectColor< WidgetComboBox >, + public AspectColorCtlImpl<WidgetComboBox>, public AspectControl<WidgetComboBox>, public AspectDblClickable< WidgetComboBox >, public AspectFocus< WidgetComboBox >, @@ -70,6 +71,8 @@ public AspectText< WidgetComboBox > { friend class WidgetCreator< WidgetComboBox >; + friend class AspectColor<WidgetComboBox>; + public: /// Seed class @@ -99,9 +102,6 @@ // Aspect expectation implementation Message getDblClickMessage(); - // Aspect expectation implementation - static const Message & getBackgroundColorMessage(); - // Commented in AspectSelection int getSelectedIndex() const; @@ -183,12 +183,6 @@ return Message( WM_COMMAND, MAKEWPARAM(this->getControlId(), CBN_DBLCLK) ); } -inline const Message & WidgetComboBox::getBackgroundColorMessage() -{ - static const Message retVal( WM_CTLCOLORLISTBOX ); - return retVal; -} - inline int WidgetComboBox::getSelectedIndex() const { int retVal = ComboBox_GetCurSel( handle() ); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -35,6 +35,7 @@ #include "../aspects/AspectBorder.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" +#include "../aspects/AspectColor.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectData.h" #include "../aspects/AspectDblClickable.h" @@ -72,6 +73,7 @@ public AspectBorder< WidgetListView >, public AspectClickable< WidgetListView >, public AspectCollection<WidgetListView, int>, + public AspectColor<WidgetListView>, public AspectControl<WidgetListView>, public AspectData<WidgetListView, int>, public AspectDblClickable< WidgetListView >, @@ -97,6 +99,7 @@ // Need to be friend to access private data... friend class WidgetCreator< WidgetListView >; friend class AspectCollection<WidgetListView, int>; + friend class AspectColor<WidgetListView>; friend class AspectData<WidgetListView, int>; public: @@ -469,8 +472,6 @@ void ensureVisible(int i, bool partial = false); - void setColor(COLORREF text, COLORREF background); - /// Actually creates the Data Grid Control /** You should call WidgetFactory::createListView if you instantiate class * directly. <br> @@ -545,6 +546,10 @@ void eraseImpl( int row ); void clearImpl(); size_t sizeImpl() const; + + // AspectColor + void setColorImpl(COLORREF text, COLORREF background); + }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -852,7 +857,7 @@ ListView_EnsureVisible(this->handle(), i, false); } -inline void WidgetListView::setColor(COLORREF text, COLORREF background) { +inline void WidgetListView::setColorImpl(COLORREF text, COLORREF background) { ListView_SetTextColor(this->handle(), text); ListView_SetTextBkColor(this->handle(), background); ListView_SetBkColor(this->handle(), background); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetStatic.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -29,8 +29,8 @@ #define WidgetStatic_h #include "../Widget.h" -#include "../aspects/AspectBackgroundColor.h" #include "../aspects/AspectBorder.h" +#include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectDblClickable.h" @@ -62,9 +62,10 @@ */ class WidgetStatic : // Aspects - public AspectCtlColor< WidgetStatic >, public AspectBorder< WidgetStatic >, public AspectClickable< WidgetStatic >, + public AspectColor< WidgetStatic >, + public AspectColorCtlImpl<WidgetStatic>, public AspectControl<WidgetStatic>, public AspectDblClickable< WidgetStatic >, public AspectFocus< WidgetStatic >, @@ -92,9 +93,6 @@ // Contract needed by AspectClickable Aspect class Message getClickMessage(); - // Contract needed by AspectBackgroundColor Aspect class - static const Message & getBackgroundColorMessage(); - // Contract needed by AspectDblClickable Aspect class Message getDblClickMessage(); @@ -126,21 +124,11 @@ void setBitmap( HBITMAP bitmap ); }; -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Implementation of class -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline Message WidgetStatic::getClickMessage() { return Message( WM_COMMAND, MAKEWPARAM(this->getControlId(), STN_CLICKED) ); } -inline const Message & WidgetStatic::getBackgroundColorMessage() -{ - static const Message retVal( WM_CTLCOLORSTATIC ); - return retVal; -} - inline Message WidgetStatic::getDblClickMessage() { return Message( WM_COMMAND, MAKEWPARAM(this->getControlId(), STN_DBLCLK) ); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTextBox.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -29,8 +29,8 @@ #define WidgetTextBox_h #include "../Widget.h" -#include "../aspects/AspectBackgroundColor.h" #include "../aspects/AspectBorder.h" +#include "../aspects/AspectColor.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" @@ -66,8 +66,9 @@ */ class WidgetTextBoxBase : // Aspect classes - public AspectCtlColor< WidgetTextBoxBase >, public AspectBorder< WidgetTextBoxBase >, + public AspectColor< WidgetTextBoxBase >, + public AspectColorCtlImpl<WidgetTextBoxBase>, public AspectControl< WidgetTextBoxBase >, public AspectFocus< WidgetTextBoxBase >, public AspectFont< WidgetTextBoxBase >, @@ -83,9 +84,6 @@ // Contract needed by AspectUpdate Aspect class Message getUpdateMessage(); - // Contract needed by AspectBackgroundColor Aspect class - const Message & getBackgroundColorMessage(); - /// Sets the current selection of the Edit Control /** Start means the offset of where the current selection shall start, if it is * omitted it defaults to 0. <br> @@ -289,15 +287,6 @@ return Message( WM_COMMAND, MAKEWPARAM(this->getControlId(), EN_UPDATE) ); } -inline const Message & WidgetTextBoxBase::getBackgroundColorMessage() -{ - // TODO What if readonly status changes? - static const Message rw = Message( WM_CTLCOLOREDIT ); - static const Message ro = Message( WM_CTLCOLORSTATIC ); - - return this->isReadOnly() ? ro : rw; -} - inline void WidgetTextBoxBase::setSelection( long start, long end ) { this->sendMessage(EM_SETSEL, start, end ); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTreeView.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -34,6 +34,7 @@ #include "../aspects/AspectBorder.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" +#include "../aspects/AspectColor.h" #include "../aspects/AspectControl.h" #include "../aspects/AspectData.h" #include "../aspects/AspectDblClickable.h" @@ -65,6 +66,7 @@ public AspectBorder< WidgetTreeView >, public AspectClickable< WidgetTreeView >, public AspectCollection<WidgetTreeView, HTREEITEM>, + public AspectColor<WidgetTreeView>, public AspectControl<WidgetTreeView>, public AspectData<WidgetTreeView, HTREEITEM>, public AspectDblClickable< WidgetTreeView >, @@ -95,6 +97,7 @@ friend class WidgetCreator< WidgetTreeView >; friend class AspectCollection<WidgetTreeView, HTREEITEM>; + friend class AspectColor<WidgetTreeView>; friend class AspectData<WidgetTreeView, HTREEITEM>; public: @@ -143,8 +146,6 @@ HTREEITEM getRoot(); - void setColor(COLORREF text, COLORREF background); - ScreenCoordinate getContextMenuPos(); void expand(HTREEITEM node); @@ -305,6 +306,9 @@ void eraseImpl( HTREEITEM node ); void clearImpl(); size_t sizeImpl() const; + + // AspectColor + void setColorImpl(COLORREF text, COLORREF background); }; @@ -332,7 +336,7 @@ return TreeView_GetRoot(this->handle()); } -inline void WidgetTreeView::setColor(COLORREF text, COLORREF background) { +inline void WidgetTreeView::setColorImpl(COLORREF text, COLORREF background) { TreeView_SetTextColor(this->handle(), text); TreeView_SetBkColor(this->handle(), background); } Modified: dcplusplus/trunk/win32/ADLSearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -54,7 +54,6 @@ items->createColumns(WinUtil::getStrings(columnNames)); items->setColumnOrder(WinUtil::splitTokens(SETTING(ADLSEARCHFRAME_ORDER), columnIndexes)); items->setColumnWidths(WinUtil::splitTokens(SETTING(ADLSEARCHFRAME_WIDTHS), columnSizes)); - items->setColor(WinUtil::textColor, WinUtil::bgColor); items->onDblClicked(std::tr1::bind(&ADLSearchFrame::handleDoubleClick, this)); items->onKeyDown(std::tr1::bind(&ADLSearchFrame::handleKeyDown, this, _1)); Modified: dcplusplus/trunk/win32/Appearance2Page.cpp =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -75,13 +75,11 @@ upBar = SETTING(UPLOAD_BAR_COLOR); downBar = SETTING(DOWNLOAD_BAR_COLOR); - bgBrush = SmartWin::BrushPtr(new SmartWin::Brush(bg)); - WinUtil::decodeFont(Text::toT(SETTING(TEXT_FONT)), logFont); font = SmartWin::FontPtr(new SmartWin::Font(::CreateFontIndirect(&logFont), true)); example = attachStatic(IDC_COLOREXAMPLE); - example->setColor(bgBrush, fg, bg); + example->setColor(fg, bg); example->setFont(font); WidgetButtonPtr button = attachButton(IDC_SELWINCOLOR); @@ -122,8 +120,7 @@ colorParams = createChooseColor().showDialog(initialColorParams); if(colorParams.userPressedOk()) { bg = colorParams.getColor(); - bgBrush = SmartWin::BrushPtr(new SmartWin::Brush(bg)); - example->setColor(bgBrush, fg, bg); + example->setColor(fg, bg); } } Modified: dcplusplus/trunk/win32/Appearance2Page.h =================================================================== --- dcplusplus/trunk/win32/Appearance2Page.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/Appearance2Page.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -36,7 +36,6 @@ WidgetStaticPtr example; COLORREF fg, bg, upBar, downBar; - SmartWin::BrushPtr bgBrush; SmartWin::FontPtr font; LOGFONT logFont; Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp =================================================================== --- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -130,7 +130,6 @@ dirs = SmartWin::WidgetCreator<WidgetDirs>::create(this, WinUtil::Seeds::treeView); addWidget(dirs); paned->setFirst(dirs); - dirs->setColor(WinUtil::textColor, WinUtil::bgColor); dirs->setNormalImageList(WinUtil::fileImages); dirs->onSelectionChanged(std::tr1::bind(&DirectoryListingFrame::handleSelectionChanged, this)); dirs->onContextMenu(std::tr1::bind(&DirectoryListingFrame::handleDirsContextMenu, this, _1)); @@ -145,7 +144,6 @@ files->createColumns(WinUtil::getStrings(columnNames)); files->setColumnOrder(WinUtil::splitTokens(SETTING(QUEUEFRAME_ORDER), columnIndexes)); files->setColumnWidths(WinUtil::splitTokens(SETTING(QUEUEFRAME_WIDTHS), columnSizes)); - files->setColor(WinUtil::textColor, WinUtil::bgColor); files->setSort(COLUMN_FILENAME); files->onSelectionChanged(std::tr1::bind(&DirectoryListingFrame::updateStatus, this)); Modified: dcplusplus/trunk/win32/FavHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -58,7 +58,6 @@ hubs->createColumns(WinUtil::getStrings(columnNames)); hubs->setColumnOrder(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_ORDER), columnIndexes)); hubs->setColumnWidths(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_WIDTHS), columnSizes)); - hubs->setColor(WinUtil::textColor, WinUtil::bgColor); hubs->onDblClicked(std::tr1::bind(&FavHubsFrame::handleDoubleClick, this)); hubs->onKeyDown(std::tr1::bind(&FavHubsFrame::handleKeyDown, this, _1)); Modified: dcplusplus/trunk/win32/FinishedFrameBase.h =================================================================== --- dcplusplus/trunk/win32/FinishedFrameBase.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/FinishedFrameBase.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -66,7 +66,6 @@ items->setColumnWidths(WinUtil::splitTokens(SettingsManager::getInstance()->get(in_UL ? SettingsManager::FINISHED_UL_WIDTHS : SettingsManager::FINISHED_WIDTHS), columnSizes)); items->setSort(COLUMN_DONE); - items->setColor(WinUtil::textColor, WinUtil::bgColor); items->setSmallImageList(WinUtil::fileImages); items->onDblClicked(std::tr1::bind(&ThisType::handleDoubleClick, this)); Modified: dcplusplus/trunk/win32/HubFrame.cpp =================================================================== --- dcplusplus/trunk/win32/HubFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/HubFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -140,7 +140,6 @@ users->createColumns(WinUtil::getStrings(columnNames)); users->setColumnOrder(WinUtil::splitTokens(SETTING(HUBFRAME_ORDER), columnIndexes)); users->setColumnWidths(WinUtil::splitTokens(SETTING(HUBFRAME_WIDTHS), columnSizes)); - users->setColor(WinUtil::textColor, WinUtil::bgColor); users->setSort(COLUMN_NICK); users->onSelectionChanged(std::tr1::bind(&HubFrame::updateStatus, this)); Modified: dcplusplus/trunk/win32/MDIChildFrame.h =================================================================== --- dcplusplus/trunk/win32/MDIChildFrame.h 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/MDIChildFrame.h 2008-03-26 14:14:56 UTC (rev 1064) @@ -145,15 +145,15 @@ } void addColor(WidgetComboBox* widget) { - widget->setColor(WinUtil::bgBrush, WinUtil::textColor, WinUtil::bgColor); + widget->setColor(WinUtil::textColor, WinUtil::bgColor); WidgetTextBox* text = widget->getTextBox(); if(text) - text->setColor(WinUtil::bgBrush, WinUtil::textColor, WinUtil::bgColor); + text->setColor(WinUtil::textColor, WinUtil::bgColor); } template<typename A> - void addColor(SmartWin::AspectCtlColor<A>* widget) { - widget->setColor(WinUtil::bgBrush, WinUtil::textColor, WinUtil::bgColor); + void addColor(SmartWin::AspectColor<A>* widget) { + widget->setColor(WinUtil::textColor, WinUtil::bgColor); } // Catch-rest for the above Modified: dcplusplus/trunk/win32/PublicHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -111,7 +111,6 @@ hubs->createColumns(WinUtil::getStrings(columnNames)); hubs->setColumnOrder(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_ORDER), columnIndexes)); hubs->setColumnWidths(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_WIDTHS), columnSizes)); - hubs->setColor(WinUtil::textColor, WinUtil::bgColor); hubs->setSort(COLUMN_USERS, false); hubs->onDblClicked(std::tr1::bind(&PublicHubsFrame::openSelected, this)); Modified: dcplusplus/trunk/win32/QueueFrame.cpp =================================================================== --- dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -72,7 +72,6 @@ addWidget(dirs); paned->setFirst(dirs); - dirs->setColor(WinUtil::textColor, WinUtil::bgColor); dirs->setNormalImageList(WinUtil::fileImages); dirs->onSelectionChanged(std::tr1::bind(&QueueFrame::updateFiles, this)); @@ -89,7 +88,6 @@ files->createColumns(WinUtil::getStrings(columnNames)); files->setColumnOrder(WinUtil::splitTokens(SETTING(QUEUEFRAME_ORDER), columnIndexes)); files->setColumnWidths(WinUtil::splitTokens(SETTING(QUEUEFRAME_WIDTHS), columnSizes)); - files->setColor(WinUtil::textColor, WinUtil::bgColor); files->setSort(COLUMN_TARGET); files->onKeyDown(std::tr1::bind(&QueueFrame::handleKeyDownFiles, this, _1)); Modified: dcplusplus/trunk/win32/SearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -209,14 +209,10 @@ dummy.push_back(Util::emptyStringT); hubs->createColumns(dummy); - hubs->setColor(WinUtil::textColor, WinUtil::bgColor); - hubs->onRaw(std::tr1::bind(&SearchFrame::handleHubItemChanged, this, _1, _2), SmartWin::Message(WM_NOTIFY, LVN_ITEMCHANGED)); hubs->insert(new HubInfo(Util::emptyStringT, T_("Only where I'm op"), false)); hubs->setChecked(0, false); - - } { @@ -227,7 +223,6 @@ results->setColumnOrder(WinUtil::splitTokens(SETTING(SEARCHFRAME_ORDER), columnIndexes)); results->setColumnWidths(WinUtil::splitTokens(SETTING(SEARCHFRAME_WIDTHS), columnSizes)); - results->setColor(WinUtil::textColor, WinUtil::bgColor); results->setSmallImageList(WinUtil::fileImages); results->onDblClicked(std::tr1::bind(&SearchFrame::handleDoubleClick, this)); Modified: dcplusplus/trunk/win32/SpyFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SpyFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/SpyFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -56,10 +56,8 @@ searches->setColumnOrder(WinUtil::splitTokens(SETTING(SPYFRAME_ORDER), columnIndexes)); searches->setColumnWidths(WinUtil::splitTokens(SETTING(SPYFRAME_WIDTHS), columnSizes)); searches->setSort(COLUMN_COUNT, SmartWin::WidgetListView::SORT_INT, false); - searches->setColor(WinUtil::textColor, WinUtil::bgColor); searches->onColumnClick(std::tr1::bind(&SpyFrame::handleColumnClick, this, _1)); searches->onContextMenu(std::tr1::bind(&SpyFrame::handleContextMenu, this, _1)); - } { Modified: dcplusplus/trunk/win32/UsersFrame.cpp =================================================================== --- dcplusplus/trunk/win32/UsersFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/UsersFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -49,7 +49,6 @@ users->setColumnOrder(WinUtil::splitTokens(SETTING(HUBFRAME_ORDER), columnIndexes)); users->setColumnWidths(WinUtil::splitTokens(SETTING(HUBFRAME_WIDTHS), columnSizes)); users->setSort(COLUMN_NICK); - users->setColor(WinUtil::textColor, WinUtil::bgColor); users->onDblClicked(std::tr1::bind(&UsersFrame::handleGetList, this)); users->onKeyDown(std::tr1::bind(&UsersFrame::handleKeyDown, this, _1)); Modified: dcplusplus/trunk/win32/WaitingUsersFrame.cpp =================================================================== --- dcplusplus/trunk/win32/WaitingUsersFrame.cpp 2008-03-26 14:13:06 UTC (rev 1063) +++ dcplusplus/trunk/win32/WaitingUsersFrame.cpp 2008-03-26 14:14:56 UTC (rev 1064) @@ -38,7 +38,6 @@ { queued = createTreeView(WinUtil::Seeds::treeView); addWidget(queued); - queued->setColor(WinUtil::textColor, WinUtil::bgColor); queued->onContextMenu(std::tr1::bind(&WaitingUsersFrame::handleContextMenu, this, _1)); queued->onChar(std::tr1::bind(&WaitingUsersFrame::handleChar, this, _1)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |