1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sfx2/navigat.hxx>
21 #include <sfx2/sfx.hrc>
22 #include <sfx2/app.hxx>
23 #include "sfx2/sfxresid.hxx"
26 SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper
, SID_NAVIGATOR
);
28 SfxNavigatorWrapper::SfxNavigatorWrapper( Window
* pParentWnd
,
30 SfxBindings
* pBindings
,
31 SfxChildWinInfo
* pInfo
)
32 : SfxChildWindow( pParentWnd
, nId
)
34 pWindow
= new SfxNavigator( pBindings
, this, pParentWnd
,
35 WB_STDDOCKWIN
| WB_CLIPCHILDREN
| WB_SIZEABLE
| WB_3DLOOK
| WB_ROLLABLE
);
36 eChildAlignment
= SFX_ALIGN_NOALIGNMENT
;
38 pWindow
->SetHelpId ( HID_NAVIGATOR_WINDOW
);
39 pWindow
->SetOutputSizePixel( Size( 270, 240 ) );
41 ( ( SfxDockingWindow
* ) pWindow
)->Initialize( pInfo
);
42 SetHideNotDelete( sal_True
);
45 SfxNavigator::SfxNavigator( SfxBindings
* pBind
,
46 SfxChildWindow
* pChildWin
,
49 : SfxDockingWindow( pBind
,
53 , pWrapper( pChildWin
)
55 SetText( SfxResId(SID_NAVIGATOR
).toString() );
58 void SfxNavigator::Resize()
60 SfxDockingWindow::Resize();
61 if ( pWrapper
->GetContextWindow() )
62 pWrapper
->GetContextWindow()->SetSizePixel( GetOutputSizePixel() );
65 void SfxNavigator::Resizing( Size
&rSize
)
67 SfxDockingWindow::Resizing( rSize
);
69 SfxChildWindowContext
*pCon
= GetChildWindow_Impl()->GetContext_Impl();
70 DBG_ASSERT( pCon
, "No Context!" );
72 pCon
->Resizing( rSize
);
75 sal_Bool
SfxNavigator::Close()
77 SfxChildWindowContext
*pCon
= GetChildWindow_Impl()->GetContext_Impl();
78 DBG_ASSERT( pCon
, "No Context!" );
79 if ( !pCon
|| pCon
->Close() )
80 return SfxDockingWindow::Close();
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */