LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/basctl/source/inc - basidesh.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 11 0.0 %
Date: 2013-07-09 Functions: 0 11 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 BASCTL_BASIDESH_HXX
      20             : #define BASCTL_BASIDESH_HXX
      21             : 
      22             : #include "doceventnotifier.hxx"
      23             : #include "sbxitem.hxx"
      24             : #include "../basicide/objdlg.hxx"
      25             : 
      26             : #include <com/sun/star/container/XContainerListener.hpp>
      27             : #include <sfx2/viewsh.hxx>
      28             : #include <svx/ifaceids.hxx>
      29             : #include <vcl/scrbar.hxx>
      30             : #include <map>
      31             : #include <boost/scoped_ptr.hpp>
      32             : 
      33             : class SfxViewFactory;
      34             : class SdrView;
      35             : class TabBar;
      36             : class SbxObject;
      37             : class SbModule;
      38             : class StarBASIC;
      39             : 
      40             : namespace basctl
      41             : {
      42             : //----------------------------------------------------------------------------
      43             : 
      44             : const sal_uLong BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001;
      45             : 
      46             : //----------------------------------------------------------------------------
      47             : 
      48             : class Layout;
      49             : class ModulWindow;
      50             : class ModulWindowLayout;
      51             : class DialogWindow;
      52             : class DialogWindowLayout;
      53             : class TabBar;
      54             : class BaseWindow;
      55             : class LocalizationMgr;
      56             : 
      57             : bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName );
      58             : 
      59             : class Shell :
      60             :     public SfxViewShell,
      61             :     public DocumentEventListener
      62             : {
      63             : public:
      64             :     typedef std::map<sal_uInt16, BaseWindow*> WindowTable;
      65             :     typedef WindowTable::const_iterator WindowTableIt;
      66             : 
      67             : private:
      68             :     friend class JavaDebuggingListenerImpl;
      69             :     friend class LocalizationMgr;
      70             :     friend bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocument& rDocument, const OUString& aLibName ); // defined in baside3.cxx
      71             : 
      72             :     WindowTable         aWindowTable;
      73             :     sal_uInt16          nCurKey;
      74             :     BaseWindow*         pCurWin;
      75             :     ScriptDocument      m_aCurDocument;
      76             :     OUString            m_aCurLibName;
      77             :     boost::shared_ptr<LocalizationMgr> m_pCurLocalizationMgr;
      78             : 
      79             :     ScrollBar           aHScrollBar;
      80             :     ScrollBar           aVScrollBar;
      81             :     ScrollBarBox        aScrollBarBox;
      82             :     boost::scoped_ptr<TabBar> pTabBar; // basctl::TabBar
      83             :     bool                bTabBarSplitted;
      84             :     bool                bCreatingWindow;
      85             :     // layout windows
      86             :     boost::scoped_ptr<ModulWindowLayout> pModulLayout;
      87             :     boost::scoped_ptr<DialogWindowLayout> pDialogLayout;
      88             :     // the active layout window
      89             :     Layout* pLayout;
      90             :     // common object catalog window
      91             :     ObjectCatalog aObjectCatalog;
      92             : 
      93             :     bool                m_bAppBasicModified;
      94             :     DocumentEventNotifier m_aNotifier;
      95             :     friend class ContainerListenerImpl;
      96             :     ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener > m_xLibListener;
      97             : 
      98             :     void                Init();
      99             :     void                InitTabBar();
     100             :     void                InitScrollBars();
     101             :     void                CheckWindows();
     102             :     void                RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName, bool bDestroy );
     103             :     void                UpdateWindows();
     104             :     void                InvalidateBasicIDESlots();
     105             :     void                StoreAllWindowData( bool bPersistent = true );
     106             :     void                SetMDITitle();
     107             :     void                EnableScrollbars( bool bEnable );
     108             :     void                SetCurLib( const ScriptDocument& rDocument, OUString aLibName, bool bUpdateWindows = true , bool bCheck = true );
     109             :     void                SetCurLibForLocalization( const ScriptDocument& rDocument, OUString aLibName );
     110             : 
     111             :     void                ImplStartListening( StarBASIC* pBasic );
     112             : 
     113             :     DECL_LINK( TabBarHdl, TabBar* );
     114             :     DECL_LINK( TabBarSplitHdl, TabBar * );
     115             : 
     116             :     static unsigned nShellCount;
     117             : 
     118             : private:
     119             :     virtual void        AdjustPosSizePixel( const Point &rPos, const Size &rSize );
     120             :     virtual void        OuterResizePixel( const Point &rPos, const Size &rSize );
     121             :     sal_uInt16              InsertWindowInTable (BaseWindow* pNewWin);
     122             :     virtual sal_uInt16      PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing );
     123             : 
     124             :     void                SetCurWindow (BaseWindow* pNewWin, bool bUpdateTabBar = false, bool bRememberAsCurrent = true);
     125             :     void                ManageToolbars();
     126             :     void                ArrangeTabBar();
     127             : 
     128             :     ModulWindow*        CreateBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName );
     129             :     DialogWindow*       CreateDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName );
     130             : 
     131             :     ModulWindow*        ShowActiveModuleWindow( StarBASIC* pBasic );
     132             : 
     133             :     virtual void        SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
     134             :                                 const SfxHint& rHint, const TypeId& rHintType );
     135             : 
     136             :     virtual void        Activate(sal_Bool bMDI);
     137             :     virtual void        Deactivate(sal_Bool bMDI);
     138             : 
     139             :     virtual void        Move();
     140             :     virtual void        ShowCursor( bool bOn = true );
     141             : 
     142             :     // DocumentEventListener
     143             :     virtual void onDocumentCreated( const ScriptDocument& _rDocument );
     144             :     virtual void onDocumentOpened( const ScriptDocument& _rDocument );
     145             :     virtual void onDocumentSave( const ScriptDocument& _rDocument );
     146             :     virtual void onDocumentSaveDone( const ScriptDocument& _rDocument );
     147             :     virtual void onDocumentSaveAs( const ScriptDocument& _rDocument );
     148             :     virtual void onDocumentSaveAsDone( const ScriptDocument& _rDocument );
     149             :     virtual void onDocumentClosed( const ScriptDocument& _rDocument );
     150             :     virtual void onDocumentTitleChanged( const ScriptDocument& _rDocument );
     151             :     virtual void onDocumentModeChanged( const ScriptDocument& _rDocument );
     152             : 
     153             : public:
     154             :     TYPEINFO();
     155           0 :     SFX_DECL_INTERFACE( SVX_INTERFACE_BASIDE_VIEWSH )
     156           0 :     SFX_DECL_VIEWFACTORY(Shell);
     157             : 
     158             :     Shell( SfxViewFrame *pFrame, SfxViewShell *pOldSh );
     159             :     ~Shell();
     160             : 
     161           0 :     BaseWindow*      GetCurWindow() const    { return pCurWin; }
     162           0 :     ScriptDocument const& GetCurDocument() const { return m_aCurDocument; }
     163           0 :     OUString const&  GetCurLibName() const { return m_aCurLibName; }
     164           0 :     boost::shared_ptr<LocalizationMgr> GetCurLocalizationMgr() const { return m_pCurLocalizationMgr; }
     165             : 
     166             :     ScrollBar&          GetHScrollBar()         { return aHScrollBar; }
     167             :     ScrollBar&          GetVScrollBar()         { return aVScrollBar; }
     168             :     ScrollBarBox&       GetScrollBarBox()       { return aScrollBarBox; }
     169           0 :     TabBar&             GetTabBar()             { return *pTabBar; }
     170           0 :     WindowTable&        GetWindowTable()        { return aWindowTable; }
     171             :     sal_uInt16          GetWindowId (BaseWindow const* pWin) const;
     172             : 
     173             :     SdrView*            GetCurDlgView() const;
     174             : 
     175             :     svl::IUndoManager*  GetUndoManager();
     176             : 
     177             :     virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable();
     178             : 
     179             :     // virtual sal_uInt16           Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog = 0 );
     180             :     virtual SfxPrinter*     GetPrinter( sal_Bool bCreate );
     181             :     virtual sal_uInt16      SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
     182             :     virtual String          GetSelectionText( sal_Bool bCompleteWords );
     183             :     virtual sal_Bool        HasSelection( sal_Bool bText ) const;
     184             : 
     185             :     void                GetState( SfxItemSet& );
     186             :     void                ExecuteGlobal( SfxRequest& rReq );
     187             :     void                ExecuteCurrent( SfxRequest& rReq );
     188             :     void                ExecuteBasic( SfxRequest& rReq );
     189             :     void                ExecuteDialog( SfxRequest& rReq );
     190             : 
     191             :     virtual sal_Bool    HasUIFeature( sal_uInt32 nFeature );
     192             : 
     193             :     long                CallBasicErrorHdl( StarBASIC* pBasic );
     194             :     long                CallBasicBreakHdl( StarBASIC* pBasic );
     195             : 
     196             :     BaseWindow*         FindWindow( const ScriptDocument& rDocument, const OUString& rLibName = OUString(), const OUString& rName = OUString(), ItemType nType = TYPE_UNKNOWN, bool bFindSuspended = false );
     197             :     DialogWindow*       FindDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, bool bCreateIfNotExist = false, bool bFindSuspended = false );
     198             :     ModulWindow*        FindBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName, bool bCreateIfNotExist = false, bool bFindSuspended = false );
     199             :     BaseWindow*         FindApplicationWindow();
     200             :     bool                NextPage( bool bPrev = false );
     201             : 
     202           0 :     bool                IsAppBasicModified () const { return m_bAppBasicModified; }
     203           0 :     void                SetAppBasicModified (bool bModified = true) { m_bAppBasicModified = bModified; }
     204             : 
     205             :     // For Dialog Drag&Drop in Dialog Organizer:
     206             :     // (defined in moduldlg.cxx)
     207             :     static void CopyDialogResources(
     208             :         ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& io_xISP,
     209             :         const ScriptDocument& rSourceDoc, const OUString& rSourceLibName, const ScriptDocument& rDestDoc,
     210             :         const OUString& rDestLibName, const OUString& rDlgName );
     211             : 
     212             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
     213             :                         GetCurrentDocument() const;
     214             : 
     215           0 :     void UpdateObjectCatalog () { aObjectCatalog.UpdateEntries(); }
     216             : 
     217             :     void RemoveWindow (BaseWindow* pWindow, bool bDestroy, bool bAllowChangeCurWindow = true);
     218             : };
     219             : 
     220             : } // namespace basctl
     221             : 
     222             : // This typedef helps baside.sdi,
     223             : // because I don't know how to use nested names in it.
     224             : typedef basctl::Shell basctl_Shell;
     225             : 
     226             : #endif // BASCTL_BASIDESH_HXX
     227             : 
     228             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10