Author: gadamopoulos
Date: Mon May 30 20:02:45 2016
New Revision: 71460
URL:
http://svn.reactos.org/svn/reactos?rev=71460&view=rev
Log:
[BROWSEUI]
- CBaseBar, CBaseBarSite: Add an initialization method in order to set the basebar and the
basebar site as vertical.
- CShellBrowser: Create the basebar and the basebar site with the right orientation.
- Part of the work submitted by Sylvain Deverre.
CORE-8814 and CORE-10838
Modified:
trunk/reactos/dll/win32/browseui/basebar.cpp
trunk/reactos/dll/win32/browseui/basebarsite.cpp
trunk/reactos/dll/win32/browseui/shellbrowser.cpp
Modified: trunk/reactos/dll/win32/browseui/basebar.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/basebar…
==============================================================================
--- trunk/reactos/dll/win32/browseui/basebar.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/basebar.cpp [iso-8859-1] Mon May 30 20:02:45 2016
@@ -65,6 +65,8 @@
public:
CBaseBar();
~CBaseBar();
+ HRESULT Initialize(BOOL);
+
public:
HRESULT ReserveBorderSpace();
@@ -172,6 +174,12 @@
{
}
+HRESULT CBaseBar::Initialize(BOOL vert)
+{
+ fVertical = (vert == TRUE);
+ return S_OK;
+}
+
HRESULT CBaseBar::ReserveBorderSpace()
{
CComPtr<IDockingWindowSite> dockingWindowSite;
@@ -512,7 +520,7 @@
return 0;
}
-HRESULT CreateBaseBar(REFIID riid, void **ppv)
-{
- return ShellObjectCreator<CBaseBar>(riid, ppv);
-}
+HRESULT CreateBaseBar(REFIID riid, void **ppv, BOOL vertical)
+{
+ return ShellObjectCreatorInit<CBaseBar, BOOL>(vertical, riid, ppv);
+}
Modified: trunk/reactos/dll/win32/browseui/basebarsite.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/basebar…
==============================================================================
--- trunk/reactos/dll/win32/browseui/basebarsite.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/basebarsite.cpp [iso-8859-1] Mon May 30 20:02:45
2016
@@ -65,9 +65,11 @@
// HWND fRebarWindow; // rebar for top of
window
CComPtr<IUnknown> fDeskBarSite;
DWORD fNextBandID;
+ BOOL fVertical;
public:
CBaseBarSite();
~CBaseBarSite();
+ HRESULT Initialize(BOOL vert) { fVertical = vert; return S_OK; };
private:
HRESULT InsertBar(IUnknown *newBar);
@@ -147,7 +149,7 @@
END_COM_MAP()
};
-CBaseBarSite::CBaseBarSite()
+CBaseBarSite::CBaseBarSite() : fVertical(TRUE)
{
fCurrentActiveBar = NULL;
fNextBandID = 1;
@@ -475,7 +477,7 @@
return 0;
}
-HRESULT CreateBaseBarSite(REFIID riid, void **ppv)
-{
- return ShellObjectCreator<CBaseBarSite>(riid, ppv);
-}
+HRESULT CreateBaseBarSite(REFIID riid, void **ppv, BOOL bVertical)
+{
+ return ShellObjectCreatorInit<CBaseBarSite, BOOL>(bVertical, riid, ppv);
+}
Modified: trunk/reactos/dll/win32/browseui/shellbrowser.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellbr…
==============================================================================
--- trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Mon May 30 20:02:45
2016
@@ -139,8 +139,8 @@
extern HRESULT CreateTravelLog(REFIID riid, void **ppv);
-extern HRESULT CreateBaseBar(REFIID riid, void **ppv);
-extern HRESULT CreateBaseBarSite(REFIID riid, void **ppv);
+extern HRESULT CreateBaseBar(REFIID riid, void **ppv, BOOL vertical);
+extern HRESULT CreateBaseBarSite(REFIID riid, void **ppv, BOOL vertical);
// temporary
extern HRESULT CreateInternetToolbar(REFIID riid, void **ppv);
@@ -1105,10 +1105,10 @@
cache = &fClientBars[BIHorizontalBaseBar].clientBar.p;
if (*cache == NULL)
{
- hResult = CreateBaseBar(IID_PPV_ARG(IUnknown, &newBaseBar));
+ hResult = CreateBaseBar(IID_PPV_ARG(IUnknown, &newBaseBar), vertical);
if (FAILED_UNEXPECTEDLY(hResult))
return hResult;
- hResult = CreateBaseBarSite(IID_PPV_ARG(IUnknown, &newBaseBarSite));
+ hResult = CreateBaseBarSite(IID_PPV_ARG(IUnknown, &newBaseBarSite),
vertical);
if (FAILED_UNEXPECTEDLY(hResult))
return hResult;