15b190011SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
35b190011SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
45b190011SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
55b190011SAndrew Rist  * distributed with this work for additional information
65b190011SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
75b190011SAndrew Rist  * to you under the Apache License, Version 2.0 (the
85b190011SAndrew Rist  * "License"); you may not use this file except in compliance
95b190011SAndrew Rist  * with the License.  You may obtain a copy of the License at
105b190011SAndrew Rist  *
115b190011SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
125b190011SAndrew Rist  *
135b190011SAndrew Rist  * Unless required by applicable law or agreed to in writing,
145b190011SAndrew Rist  * software distributed under the License is distributed on an
155b190011SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165b190011SAndrew Rist  * KIND, either express or implied.  See the License for the
175b190011SAndrew Rist  * specific language governing permissions and limitations
185b190011SAndrew Rist  * under the License.
195b190011SAndrew Rist  *
205b190011SAndrew Rist  *************************************************************/
215b190011SAndrew Rist 
225b190011SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sd.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "NavigatorChildWindow.hxx"
28cdf0e10cSrcweir #include "navigatr.hxx"
29cdf0e10cSrcweir #include "app.hrc"
30cdf0e10cSrcweir #include "navigatr.hrc"
31cdf0e10cSrcweir #include <sfx2/app.hxx>
32*62024513SAndre Fischer #include <sfx2/bindings.hxx>
33*62024513SAndre Fischer #include <sfx2/dispatch.hxx>
34*62024513SAndre Fischer #include <svl/eitem.hxx>
35*62024513SAndre Fischer #include <boost/bind.hpp>
36*62024513SAndre Fischer 
37cdf0e10cSrcweir 
38cdf0e10cSrcweir namespace sd {
39cdf0e10cSrcweir 
SFX_IMPL_CHILDWINDOWCONTEXT(NavigatorChildWindow,SID_NAVIGATOR)40cdf0e10cSrcweir SFX_IMPL_CHILDWINDOWCONTEXT(NavigatorChildWindow, SID_NAVIGATOR)
41cdf0e10cSrcweir 
42*62024513SAndre Fischer void RequestNavigatorUpdate (SfxBindings* pBindings)
43*62024513SAndre Fischer {
44*62024513SAndre Fischer     if (pBindings != NULL
45*62024513SAndre Fischer         && pBindings->GetDispatcher() != NULL)
46*62024513SAndre Fischer     {
47*62024513SAndre Fischer         SfxBoolItem aItem (SID_NAVIGATOR_INIT, sal_True);
48*62024513SAndre Fischer         pBindings->GetDispatcher()->Execute(
49*62024513SAndre Fischer             SID_NAVIGATOR_INIT,
50*62024513SAndre Fischer             SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
51*62024513SAndre Fischer             &aItem,
52*62024513SAndre Fischer             0L);
53*62024513SAndre Fischer     }
54*62024513SAndre Fischer }
55*62024513SAndre Fischer 
56*62024513SAndre Fischer 
NavigatorChildWindow(::Window * pParent,sal_uInt16 nId,SfxBindings * pBindings,SfxChildWinInfo *)57cdf0e10cSrcweir NavigatorChildWindow::NavigatorChildWindow (
58cdf0e10cSrcweir     ::Window* pParent,
59cdf0e10cSrcweir     sal_uInt16 nId,
60cdf0e10cSrcweir     SfxBindings* pBindings,
61cdf0e10cSrcweir     SfxChildWinInfo* )
62cdf0e10cSrcweir     : SfxChildWindowContext( nId )
63cdf0e10cSrcweir {
64*62024513SAndre Fischer 	SdNavigatorWin* pNavWin = new SdNavigatorWin(
65*62024513SAndre Fischer         pParent,
66*62024513SAndre Fischer         this,
67*62024513SAndre Fischer         SdResId( FLT_NAVIGATOR ),
68*62024513SAndre Fischer         pBindings,
69*62024513SAndre Fischer         ::boost::bind(RequestNavigatorUpdate, pBindings));
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	SetWindow( pNavWin );
72cdf0e10cSrcweir }
73cdf0e10cSrcweir 
74cdf0e10cSrcweir } // end of namespace sd
75