LCOV - code coverage report
Current view: top level - sfx2/source/appl - newhelp.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 61 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 40 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : #ifndef INCLUDED_SFX2_SOURCE_APPL_NEWHELP_HXX
      20             : #define INCLUDED_SFX2_SOURCE_APPL_NEWHELP_HXX
      21             : 
      22             : #include <cppuhelper/implbase1.hxx>
      23             : #include <com/sun/star/uno/Reference.h>
      24             : #include <com/sun/star/frame/XDispatchResultListener.hpp>
      25             : #include <com/sun/star/frame/XDispatch.hpp>
      26             : #include <com/sun/star/frame/XFrame2.hpp>
      27             : 
      28             : namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
      29             : namespace com { namespace sun { namespace star { namespace i18n { class XBreakIterator; } } } }
      30             : namespace com { namespace sun { namespace star { namespace text { class XTextRange; } } } }
      31             : 
      32             : #include <vcl/window.hxx>
      33             : #include <vcl/idle.hxx>
      34             : #include <vcl/toolbox.hxx>
      35             : #include <vcl/tabpage.hxx>
      36             : #include <vcl/splitwin.hxx>
      37             : #include <vcl/tabctrl.hxx>
      38             : #include <vcl/combobox.hxx>
      39             : #include <vcl/fixed.hxx>
      40             : #include <vcl/button.hxx>
      41             : #include <vcl/lstbox.hxx>
      42             : #include <vcl/dialog.hxx>
      43             : #include <svtools/treelistbox.hxx>
      44             : #include <unotools/moduleoptions.hxx>
      45             : 
      46             : #include "srchdlg.hxx"
      47             : 
      48             : // ContentListBox_Impl ---------------------------------------------------
      49             : 
      50             : class ContentListBox_Impl : public SvTreeListBox
      51             : {
      52             : private:
      53             :     Image           aOpenBookImage;
      54             :     Image           aClosedBookImage;
      55             :     Image           aDocumentImage;
      56             : 
      57             :     void            InitRoot();
      58             :     void            ClearChildren( SvTreeListEntry* pParent );
      59             : 
      60             : public:
      61             :     ContentListBox_Impl(vcl::Window* pParent, WinBits nStyle);
      62             :     virtual ~ContentListBox_Impl();
      63             :     virtual void dispose() SAL_OVERRIDE;
      64             : 
      65             :     virtual void    RequestingChildren( SvTreeListEntry* pParent ) SAL_OVERRIDE;
      66             :     virtual bool    Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
      67             : 
      68           0 :     inline void     SetOpenHdl( const Link<>& rLink ) { SetDoubleClickHdl( rLink ); }
      69             :     OUString        GetSelectEntry() const;
      70             : };
      71             : 
      72             : // class HelpTabPage_Impl ------------------------------------------------
      73             : 
      74             : class SfxHelpIndexWindow_Impl;
      75             : 
      76             : class HelpTabPage_Impl : public TabPage
      77             : {
      78             : protected:
      79             :     VclPtr<SfxHelpIndexWindow_Impl>    m_pIdxWin;
      80             : 
      81             : public:
      82             :     HelpTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin,
      83             :         const OString& rID, const OUString& rUIXMLDescription);
      84             :     virtual ~HelpTabPage_Impl();
      85             :     virtual void dispose() SAL_OVERRIDE;
      86             : 
      87             :     virtual Control*    GetLastFocusControl() = 0;
      88             : };
      89             : 
      90             : // class ContentTabPage_Impl ---------------------------------------------
      91             : 
      92             : class ContentTabPage_Impl : public HelpTabPage_Impl
      93             : {
      94             : private:
      95             :     VclPtr<ContentListBox_Impl> m_pContentBox;
      96             : 
      97             : public:
      98             :     ContentTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin);
      99             :     virtual ~ContentTabPage_Impl();
     100             :     virtual void dispose() SAL_OVERRIDE;
     101             : 
     102             :     virtual void        ActivatePage() SAL_OVERRIDE;
     103             :     virtual Control*    GetLastFocusControl() SAL_OVERRIDE;
     104             : 
     105           0 :     void     SetOpenHdl( const Link<>& rLink ) { m_pContentBox->SetOpenHdl( rLink ); }
     106           0 :     OUString GetSelectEntry() const { return m_pContentBox->GetSelectEntry(); }
     107           0 :     void     SetFocusOnBox() { m_pContentBox->GrabFocus(); }
     108             : };
     109             : 
     110             : // class IndexTabPage_Impl -----------------------------------------------
     111             : 
     112           0 : class IndexBox_Impl : public ComboBox
     113             : {
     114             : public:
     115             :     IndexBox_Impl(vcl::Window* pParent, WinBits nStyle);
     116             : 
     117             :     virtual void        UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
     118             :     virtual bool        Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     119             : 
     120             :     void                SelectExecutableEntry();
     121             : };
     122             : 
     123             : class IndexTabPage_Impl : public HelpTabPage_Impl
     124             : {
     125             : private:
     126             :     VclPtr<IndexBox_Impl>      m_pIndexCB;
     127             :     VclPtr<PushButton>         m_pOpenBtn;
     128             : 
     129             :     Idle                aFactoryIdle;
     130             :     Timer               aKeywordTimer;
     131             :     Link<>              aKeywordLink;
     132             : 
     133             :     OUString            sFactory;
     134             :     OUString            sKeyword;
     135             : 
     136             :     bool                bIsActivated;
     137             : 
     138             :     void                InitializeIndex();
     139             :     void                ClearIndex();
     140             : 
     141             :     DECL_LINK(OpenHdl, void *);
     142             :     DECL_LINK_TYPED(IdleHdl, Idle*, void);
     143             :     DECL_LINK_TYPED(TimeoutHdl, Timer*, void);
     144             : 
     145             : public:
     146             :     IndexTabPage_Impl( vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
     147             :     virtual ~IndexTabPage_Impl();
     148             :     virtual void dispose() SAL_OVERRIDE;
     149             : 
     150             :     virtual void        ActivatePage() SAL_OVERRIDE;
     151             :     virtual Control*    GetLastFocusControl() SAL_OVERRIDE;
     152             : 
     153             :     void                SetDoubleClickHdl( const Link<>& rLink );
     154             :     void                SetFactory( const OUString& rFactory );
     155           0 :     inline OUString     GetFactory() const { return sFactory; }
     156             :     OUString            GetSelectEntry() const;
     157           0 :     inline void         SetFocusOnBox() { m_pIndexCB->GrabFocus(); }
     158           0 :     inline bool     HasFocusOnEdit() const { return m_pIndexCB->HasChildPathFocus(); }
     159             : 
     160           0 :     inline void         SetKeywordHdl( const Link<>& rLink ) { aKeywordLink = rLink; }
     161             :     void                SetKeyword( const OUString& rKeyword );
     162             :     bool            HasKeyword() const;
     163             :     bool            HasKeywordIgnoreCase();
     164             :     void                OpenKeyword();
     165             : 
     166           0 :     inline void         SelectExecutableEntry() { m_pIndexCB->SelectExecutableEntry(); }
     167             : };
     168             : 
     169             : // class SearchTabPage_Impl ----------------------------------------------
     170             : 
     171           0 : class SearchBox_Impl : public ComboBox
     172             : {
     173             : private:
     174             :     Link<>              aSearchLink;
     175             : 
     176             : public:
     177           0 :     SearchBox_Impl(vcl::Window* pParent, WinBits nStyle)
     178           0 :         : ComboBox(pParent, nStyle)
     179             :     {
     180           0 :         SetDropDownLineCount(5);
     181           0 :     }
     182             : 
     183             :     virtual bool        PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     184             :     virtual void        Select() SAL_OVERRIDE;
     185             : 
     186           0 :     inline void         SetSearchLink( const Link<>& rLink ) { aSearchLink = rLink; }
     187             : };
     188             : 
     189           0 : class SearchResultsBox_Impl : public ListBox
     190             : {
     191             : public:
     192           0 :     SearchResultsBox_Impl(vcl::Window* pParent, WinBits nStyle)
     193           0 :         : ListBox(pParent, nStyle)
     194             :     {
     195           0 :     }
     196             : 
     197             :     virtual bool    Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     198             : };
     199             : 
     200             : class SearchTabPage_Impl : public HelpTabPage_Impl
     201             : {
     202             : private:
     203             :     VclPtr<SearchBox_Impl>         m_pSearchED;
     204             :     VclPtr<PushButton>             m_pSearchBtn;
     205             :     VclPtr<CheckBox>               m_pFullWordsCB;
     206             :     VclPtr<CheckBox>               m_pScopeCB;
     207             :     VclPtr<SearchResultsBox_Impl>  m_pResultsLB;
     208             :     VclPtr<PushButton>             m_pOpenBtn;
     209             : 
     210             :     OUString                aFactory;
     211             : 
     212             :     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
     213             :                             xBreakIterator;
     214             : 
     215             :     void                ClearSearchResults();
     216             :     void                RememberSearchText( const OUString& rSearchText );
     217             : 
     218             :     DECL_LINK(SearchHdl, void *);
     219             :     DECL_LINK(OpenHdl, void *);
     220             :     DECL_LINK(ModifyHdl, void *);
     221             : 
     222             : public:
     223             :     SearchTabPage_Impl( vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
     224             :     virtual ~SearchTabPage_Impl();
     225             :     virtual void dispose() SAL_OVERRIDE;
     226             : 
     227             :     virtual void        ActivatePage() SAL_OVERRIDE;
     228             :     virtual Control*    GetLastFocusControl() SAL_OVERRIDE;
     229             : 
     230             :     void                SetDoubleClickHdl( const Link<>& rLink );
     231           0 :     inline void         SetFactory( const OUString& rFactory ) { aFactory = rFactory; }
     232             :     OUString            GetSelectEntry() const;
     233             :     void                ClearPage();
     234           0 :     inline void         SetFocusOnBox() { m_pResultsLB->GrabFocus(); }
     235           0 :     inline bool     HasFocusOnEdit() const { return m_pSearchED->HasChildPathFocus(); }
     236           0 :     inline OUString     GetSearchText() const { return m_pSearchED->GetText(); }
     237           0 :     inline bool     IsFullWordSearch() const { return m_pFullWordsCB->IsChecked(); }
     238             :     bool            OpenKeyword( const OUString& rKeyword );
     239             : };
     240             : 
     241             : // class BookmarksTabPage_Impl -------------------------------------------
     242             : 
     243             : class BookmarksBox_Impl : public ListBox
     244             : {
     245             : private:
     246             :     void                DoAction( sal_uInt16 nAction );
     247             : 
     248             : public:
     249             :     BookmarksBox_Impl(vcl::Window* pParent, WinBits nStyle);
     250             :     virtual ~BookmarksBox_Impl();
     251             :     virtual void dispose() SAL_OVERRIDE;
     252             : 
     253             :     virtual bool        Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     254             : };
     255             : 
     256             : class BookmarksTabPage_Impl : public HelpTabPage_Impl
     257             : {
     258             : private:
     259             :     VclPtr<BookmarksBox_Impl>  m_pBookmarksBox;
     260             :     VclPtr<PushButton>         m_pBookmarksPB;
     261             : 
     262             :     DECL_LINK(OpenHdl, void *);
     263             : 
     264             : public:
     265             :     BookmarksTabPage_Impl( vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
     266             :     virtual ~BookmarksTabPage_Impl();
     267             :     virtual void dispose() SAL_OVERRIDE;
     268             : 
     269             :     virtual void        ActivatePage() SAL_OVERRIDE;
     270             :     virtual Control*    GetLastFocusControl() SAL_OVERRIDE;
     271             : 
     272             :     void                SetDoubleClickHdl( const Link<>& rLink );
     273             :     OUString            GetSelectEntry() const;
     274             :     void                AddBookmarks( const OUString& rTitle, const OUString& rURL );
     275           0 :     void                SetFocusOnBox() { m_pBookmarksBox->GrabFocus(); }
     276             : };
     277             : 
     278             : // class SfxHelpIndexWindow_Impl -----------------------------------------
     279             : 
     280             : class SfxHelpWindow_Impl;
     281             : 
     282             : class SfxHelpIndexWindow_Impl : public vcl::Window, public VclBuilderContainer
     283             : {
     284             : private:
     285             :     VclPtr<ListBox>            m_pActiveLB;
     286             :     VclPtr<TabControl>         m_pTabCtrl;
     287             : 
     288             :     Idle                aIdle;
     289             : 
     290             :     Link<>              aSelectFactoryLink;
     291             :     Link<>              aPageDoubleClickLink;
     292             :     Link<>              aIndexKeywordLink;
     293             :     OUString            sKeyword;
     294             : 
     295             :     VclPtr<SfxHelpWindow_Impl>     pParentWin;
     296             : 
     297             :     VclPtr<ContentTabPage_Impl>    pCPage;
     298             :     VclPtr<IndexTabPage_Impl>      pIPage;
     299             :     VclPtr<SearchTabPage_Impl>     pSPage;
     300             :     VclPtr<BookmarksTabPage_Impl>  pBPage;
     301             : 
     302             :     long                nMinWidth;
     303             :     bool                bWasCursorLeftOrRight;
     304             :     bool                bIsInitDone;
     305             : 
     306             :     void                Initialize();
     307             :     void                SetActiveFactory();
     308             :     HelpTabPage_Impl*   GetCurrentPage( sal_uInt16& rCurId );
     309             : 
     310             :     inline ContentTabPage_Impl*     GetContentPage();
     311             :     inline IndexTabPage_Impl*       GetIndexPage();
     312             :     inline SearchTabPage_Impl*      GetSearchPage();
     313             :     inline BookmarksTabPage_Impl*   GetBookmarksPage();
     314             : 
     315             :     DECL_LINK(          ActivatePageHdl, TabControl* );
     316             :     DECL_LINK(SelectHdl, void *);
     317             :     DECL_LINK_TYPED(InitHdl, Idle *, void);
     318             :     DECL_LINK_TYPED(SelectFactoryHdl, Idle *, void);
     319             :     DECL_LINK(KeywordHdl, void *);
     320             : 
     321             : public:
     322             :     SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* pParent );
     323             :     virtual ~SfxHelpIndexWindow_Impl();
     324             :     virtual void dispose() SAL_OVERRIDE;
     325             : 
     326             :     virtual void        Resize() SAL_OVERRIDE;
     327             :     virtual Size        GetOptimalSize() const SAL_OVERRIDE;
     328             :     virtual bool        PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     329             :     virtual void        DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     330             : 
     331             :     void                SetDoubleClickHdl( const Link<>& rLink );
     332           0 :     inline void         SetSelectFactoryHdl( const Link<>& rLink ) { aSelectFactoryLink = rLink; }
     333             :     void                SetFactory( const OUString& rFactory, bool bActive );
     334           0 :     inline OUString     GetFactory() const { return pIPage->GetFactory(); }
     335             :     OUString            GetSelectEntry() const;
     336             :     void                AddBookmarks( const OUString& rTitle, const OUString& rURL );
     337             :     bool                IsValidFactory( const OUString& _rFactory );
     338           0 :     inline OUString     GetActiveFactoryTitle() const { return m_pActiveLB->GetSelectEntry(); }
     339             :     inline void         UpdateTabControl() { m_pTabCtrl->Invalidate(); }
     340             :     void                ClearSearchPage();
     341             :     void                GrabFocusBack();
     342             :     bool            HasFocusOnEdit() const;
     343             :     OUString            GetSearchText() const;
     344             :     bool            IsFullWordSearch() const;
     345             :     void                OpenKeyword( const OUString& rKeyword );
     346             :     void                SelectExecutableEntry();
     347             :     inline bool         WasCursorLeftOrRight();
     348             : };
     349             : 
     350             : // inlines ---------------------------------------------------------------
     351             : 
     352           0 : ContentTabPage_Impl* SfxHelpIndexWindow_Impl::GetContentPage()
     353             : {
     354           0 :     if ( !pCPage )
     355             :     {
     356           0 :         pCPage = VclPtr<ContentTabPage_Impl>::Create( m_pTabCtrl, this );
     357           0 :         pCPage->SetOpenHdl( aPageDoubleClickLink );
     358             :     }
     359           0 :     return pCPage;
     360             : }
     361           0 : IndexTabPage_Impl* SfxHelpIndexWindow_Impl::GetIndexPage()
     362             : {
     363           0 :     if ( !pIPage )
     364             :     {
     365           0 :         pIPage = VclPtr<IndexTabPage_Impl>::Create( m_pTabCtrl, this );
     366           0 :         pIPage->SetDoubleClickHdl( aPageDoubleClickLink );
     367           0 :         pIPage->SetKeywordHdl( aIndexKeywordLink );
     368             :     }
     369           0 :     return pIPage;
     370             : }
     371             : 
     372           0 : SearchTabPage_Impl* SfxHelpIndexWindow_Impl::GetSearchPage()
     373             : {
     374           0 :     if ( !pSPage )
     375             :     {
     376           0 :         pSPage = VclPtr<SearchTabPage_Impl>::Create( m_pTabCtrl, this );
     377           0 :         pSPage->SetDoubleClickHdl( aPageDoubleClickLink );
     378             :     }
     379           0 :     return pSPage;
     380             : }
     381             : 
     382           0 : BookmarksTabPage_Impl* SfxHelpIndexWindow_Impl::GetBookmarksPage()
     383             : {
     384           0 :     if ( !pBPage )
     385             :     {
     386           0 :         pBPage = VclPtr<BookmarksTabPage_Impl>::Create( m_pTabCtrl, this );
     387           0 :         pBPage->SetDoubleClickHdl( aPageDoubleClickLink );
     388             :     }
     389           0 :     return pBPage;
     390             : }
     391             : 
     392           0 : bool SfxHelpIndexWindow_Impl::WasCursorLeftOrRight()
     393             : {
     394           0 :     bool bRet = bWasCursorLeftOrRight;
     395           0 :     bWasCursorLeftOrRight = false;
     396           0 :     return bRet;
     397             : }
     398             : 
     399             : // class TextWin_Impl ----------------------------------------------------
     400             : 
     401           0 : class TextWin_Impl : public DockingWindow
     402             : {
     403             : public:
     404             :                             TextWin_Impl( vcl::Window* pParent );
     405             : 
     406             :     virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     407             : };
     408             : 
     409             : // class SfxHelpTextWindow_Impl ------------------------------------------
     410             : 
     411             : class SvtMiscOptions;
     412             : class SfxHelpWindow_Impl;
     413             : 
     414             : class SfxHelpTextWindow_Impl : public vcl::Window
     415             : {
     416             : private:
     417             :     VclPtr<ToolBox>         aToolBox;
     418             :     VclPtr<CheckBox>        aOnStartupCB;
     419             :     Idle                    aSelectIdle;
     420             :     Image                   aIndexOnImage;
     421             :     Image                   aIndexOffImage;
     422             :     OUString                aIndexOnText;
     423             :     OUString                aIndexOffText;
     424             :     OUString                aSearchText;
     425             :     OUString                aOnStartupText;
     426             :     OUString                sCurrentFactory;
     427             : 
     428             :     VclPtr<SfxHelpWindow_Impl>     pHelpWin;
     429             :     VclPtr<vcl::Window>            pTextWin;
     430             :     VclPtr<sfx2::SearchDialog>     pSrchDlg;
     431             :     ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     432             :                             xFrame;
     433             :     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
     434             :                             xBreakIterator;
     435             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
     436             :                             xConfiguration;
     437             :     long                    nMinPos;
     438             :     bool                    bIsDebug;
     439             :     bool                    bIsIndexOn;
     440             :     bool                    bIsInClose;
     441             :     bool                    bIsFullWordSearch;
     442             : 
     443             :     bool                    HasSelection() const;
     444             :     void                    InitToolBoxImages();
     445             :     void                    InitOnStartupBox( bool bOnlyText );
     446             :     void                    SetOnStartupBoxPosition();
     447             : 
     448             :     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
     449             :                             GetBreakIterator();
     450             :     ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >
     451             :                             getCursor() const;
     452             :     bool                    isHandledKey( const vcl::KeyCode& _rKeyCode );
     453             : 
     454             :     DECL_LINK_TYPED(SelectHdl, Idle *, void);
     455             :     DECL_LINK(              NotifyHdl, SvtMiscOptions* );
     456             :     DECL_LINK(              FindHdl, sfx2::SearchDialog* );
     457             :     DECL_LINK(              CloseHdl, sfx2::SearchDialog* );
     458             :     DECL_LINK(              CheckHdl, CheckBox* );
     459             : 
     460             : public:
     461             :     SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent );
     462             :     virtual ~SfxHelpTextWindow_Impl();
     463             :     virtual void dispose() SAL_OVERRIDE;
     464             : 
     465             :     virtual void            Resize() SAL_OVERRIDE;
     466             :     virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     467             :     virtual void            GetFocus() SAL_OVERRIDE;
     468             :     virtual void            DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     469             : 
     470             :     inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     471           0 :                             getFrame() const { return xFrame; }
     472             : 
     473           0 :     inline void             SetSelectHdl( const Link<ToolBox *, void>& rLink ) { aToolBox->SetSelectHdl( rLink ); }
     474             :     void                    ToggleIndex( bool bOn );
     475             :     void                    SelectSearchText( const OUString& rSearchText, bool _bIsFullWordSearch );
     476             :     void                    SetPageStyleHeaderOff() const;
     477           0 :     inline ToolBox&         GetToolBox() { return *aToolBox.get(); }
     478             :      void                   CloseFrame();
     479             :     void                    DoSearch();
     480             : };
     481             : 
     482             : // class SfxHelpWindow_Impl ----------------------------------------------
     483             : 
     484             : class HelpInterceptor_Impl;
     485             : class HelpListener_Impl;
     486             : class SfxHelpWindow_Impl : public SplitWindow
     487             : {
     488             : private:
     489             : friend class SfxHelpIndexWindow_Impl;
     490             : 
     491             :     ::com::sun::star::uno::Reference < ::com::sun::star::awt::XWindow >
     492             :                                 xWindow;
     493             :     ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchResultListener >
     494             :                                 xOpenListener;
     495             :     ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     496             :                                 xFrame;
     497             : 
     498             :     VclPtr<SfxHelpIndexWindow_Impl>    pIndexWin;
     499             :     VclPtr<SfxHelpTextWindow_Impl>     pTextWin;
     500             :     HelpInterceptor_Impl*       pHelpInterceptor;
     501             :     HelpListener_Impl*          pHelpListener;
     502             : 
     503             :     sal_Int32           nExpandWidth;
     504             :     sal_Int32           nCollapseWidth;
     505             :     sal_Int32           nHeight;
     506             :     long                nIndexSize;
     507             :     long                nTextSize;
     508             :     bool            bIndex;
     509             :     bool            bGrabFocusToToolBox;
     510             :     Point               aWinPos;
     511             :     OUString            sTitle;
     512             : 
     513             :     virtual void        Resize() SAL_OVERRIDE;
     514             :     virtual void        Split() SAL_OVERRIDE;
     515             :     virtual void        GetFocus() SAL_OVERRIDE;
     516             : 
     517             :     void                MakeLayout();
     518             :     void                InitSizes();
     519             :     void                LoadConfig();
     520             :     void                SaveConfig();
     521             :     void                ShowStartPage();
     522             : 
     523             :     DECL_LINK_TYPED(    SelectHdl, ToolBox*, void );
     524             :     DECL_LINK(OpenHdl, void *);
     525             :     DECL_LINK(          SelectFactoryHdl, SfxHelpIndexWindow_Impl* );
     526             :     DECL_LINK(          ChangeHdl, HelpListener_Impl* );
     527             : 
     528             : public:
     529             :     SfxHelpWindow_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >& rFrame,
     530             :                         vcl::Window* pParent, WinBits nBits );
     531             :     virtual ~SfxHelpWindow_Impl();
     532             :     virtual void dispose() SAL_OVERRIDE;
     533             : 
     534             :     virtual bool        PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     535             : 
     536             :     void                setContainerWindow(
     537             :                             ::com::sun::star::uno::Reference < ::com::sun::star::awt::XWindow > xWin );
     538             :     inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     539           0 :                         getTextFrame() const { return pTextWin->getFrame(); }
     540             :     inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchResultListener >
     541             :                         getOpenListener() const { return xOpenListener; }
     542             : 
     543             :     void                SetFactory( const OUString& rFactory );
     544             :     void                SetHelpURL( const OUString& rURL );
     545             :     void                DoAction( sal_uInt16 nActionId );
     546             :     void                CloseWindow();
     547             : 
     548             :     void                UpdateToolbox();
     549           0 :     inline void         OpenKeyword( const OUString& rKeyword ) { pIndexWin->OpenKeyword( rKeyword ); }
     550             :     inline OUString     GetFactory() const { return pIndexWin->GetFactory(); }
     551             : 
     552             :     bool            HasHistoryPredecessor() const;      // forward to interceptor
     553             :     bool            HasHistorySuccessor() const;        // forward to interceptor
     554             : 
     555             :     void                openDone(const OUString& sURL    ,
     556             :                                        bool         bSuccess);
     557             : 
     558             :     static OUString  buildHelpURL(const OUString& sFactory        ,
     559             :                                          const OUString& sContent        ,
     560             :                                          const OUString& sAnchor         ,
     561             :                                                bool         bUseQuestionMark);
     562             : 
     563             :     void                loadHelpContent(const OUString& sHelpURL                ,
     564             :                                               bool         bAddToHistory = true);
     565             : };
     566             : 
     567             : class SfxAddHelpBookmarkDialog_Impl : public ModalDialog
     568             : {
     569             : private:
     570             :     VclPtr<Edit> m_pTitleED;
     571             : public:
     572             :     SfxAddHelpBookmarkDialog_Impl( vcl::Window* pParent, bool bRename = true );
     573             :     virtual ~SfxAddHelpBookmarkDialog_Impl();
     574             :     virtual void dispose() SAL_OVERRIDE;
     575             : 
     576             :     void SetTitle( const OUString& rTitle );
     577           0 :     OUString GetTitle() const { return m_pTitleED->GetText(); }
     578             : };
     579             : 
     580             : /// Appends ?Language=xy&System=abc to the help URL in rURL
     581             : void AppendConfigToken(OUStringBuffer& rURL, bool bQuestionMark, const OUString &rLang = OUString());
     582             : 
     583             : #endif // INCLUDED_SFX2_SOURCE_APPL_NEWHELP_HXX
     584             : 
     585             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11