mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[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 svn path=/trunk/; revision=71460
This commit is contained in:
parent
7e3d0a9bbd
commit
9a118725bf
3 changed files with 19 additions and 9 deletions
|
@ -65,6 +65,8 @@ public:
|
|||
public:
|
||||
CBaseBar();
|
||||
~CBaseBar();
|
||||
HRESULT Initialize(BOOL);
|
||||
|
||||
public:
|
||||
HRESULT ReserveBorderSpace();
|
||||
|
||||
|
@ -172,6 +174,12 @@ CBaseBar::~CBaseBar()
|
|||
{
|
||||
}
|
||||
|
||||
HRESULT CBaseBar::Initialize(BOOL vert)
|
||||
{
|
||||
fVertical = (vert == TRUE);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBaseBar::ReserveBorderSpace()
|
||||
{
|
||||
CComPtr<IDockingWindowSite> dockingWindowSite;
|
||||
|
@ -512,7 +520,7 @@ LRESULT CBaseBar::OnCaptureChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
|
|||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CreateBaseBar(REFIID riid, void **ppv)
|
||||
HRESULT CreateBaseBar(REFIID riid, void **ppv, BOOL vertical)
|
||||
{
|
||||
return ShellObjectCreator<CBaseBar>(riid, ppv);
|
||||
return ShellObjectCreatorInit<CBaseBar, BOOL>(vertical, riid, ppv);
|
||||
}
|
||||
|
|
|
@ -65,9 +65,11 @@ private:
|
|||
// 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 @@ BEGIN_COM_MAP(CBaseBarSite)
|
|||
END_COM_MAP()
|
||||
};
|
||||
|
||||
CBaseBarSite::CBaseBarSite()
|
||||
CBaseBarSite::CBaseBarSite() : fVertical(TRUE)
|
||||
{
|
||||
fCurrentActiveBar = NULL;
|
||||
fNextBandID = 1;
|
||||
|
@ -475,7 +477,7 @@ LRESULT CBaseBarSite::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bH
|
|||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CreateBaseBarSite(REFIID riid, void **ppv)
|
||||
HRESULT CreateBaseBarSite(REFIID riid, void **ppv, BOOL bVertical)
|
||||
{
|
||||
return ShellObjectCreator<CBaseBarSite>(riid, ppv);
|
||||
return ShellObjectCreatorInit<CBaseBarSite, BOOL>(bVertical, riid, ppv);
|
||||
}
|
||||
|
|
|
@ -139,8 +139,8 @@ BOOL createNewStuff = false;
|
|||
|
||||
|
||||
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 @@ HRESULT CShellBrowser::GetBaseBar(bool vertical, IUnknown **theBaseBar)
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue