LCOV - code coverage report
Current view: top level - sd/source/ui/inc - navigatr.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-08-25 Functions: 0 9 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef SD_NAVIGATOR_HXX
      30                 :            : #define SD_NAVIGATOR_HXX
      31                 :            : 
      32                 :            : #include <vcl/window.hxx>
      33                 :            : #include <vcl/lstbox.hxx>
      34                 :            : #include <vcl/toolbox.hxx>
      35                 :            : #include <sfx2/ctrlitem.hxx>
      36                 :            : #include "sdtreelb.hxx"
      37                 :            : #include "pres.hxx"
      38                 :            : 
      39                 :            : #define NAVSTATE_NONE           0x00000000
      40                 :            : 
      41                 :            : #define NAVBTN_PEN_ENABLED      0x00000010
      42                 :            : #define NAVBTN_PEN_DISABLED     0x00000020
      43                 :            : #define NAVBTN_PEN_CHECKED      0x00000040
      44                 :            : #define NAVBTN_PEN_UNCHECKED    0x00000080
      45                 :            : 
      46                 :            : #define NAVTLB_UPDATE           0x00000100
      47                 :            : 
      48                 :            : #define NAVBTN_FIRST_ENABLED    0x00001000
      49                 :            : #define NAVBTN_FIRST_DISABLED   0x00002000
      50                 :            : #define NAVBTN_PREV_ENABLED     0x00004000
      51                 :            : #define NAVBTN_PREV_DISABLED    0x00008000
      52                 :            : 
      53                 :            : #define NAVBTN_LAST_ENABLED     0x00010000
      54                 :            : #define NAVBTN_LAST_DISABLED    0x00020000
      55                 :            : #define NAVBTN_NEXT_ENABLED     0x00040000
      56                 :            : #define NAVBTN_NEXT_DISABLED    0x00080000
      57                 :            : 
      58                 :            : // forward
      59                 :            : namespace sd {
      60                 :            : class DrawDocShell;
      61                 :            : class NavigatorChildWindow;
      62                 :            : }
      63                 :            : class Menu;
      64                 :            : class SdNavigatorControllerItem;
      65                 :            : class SdPageNameControllerItem;
      66                 :            : 
      67                 :            : //------------------------------------------------------------------------
      68                 :            : 
      69                 :            : class NavDocInfo
      70                 :            : {
      71                 :            : public:
      72                 :          0 :             NavDocInfo() { mpDocShell = NULL; }
      73                 :            : 
      74                 :          0 :     sal_Bool    HasName() { return( (sal_Bool) bName ); }
      75                 :          0 :     sal_Bool    IsActive() { return( (sal_Bool) bActive ); }
      76                 :            : 
      77                 :          0 :     void    SetName( sal_Bool bOn = sal_True ) { bName = bOn; }
      78                 :          0 :     void    SetActive( sal_Bool bOn = sal_True ) { bActive = bOn; }
      79                 :            : 
      80                 :            : private:
      81                 :            :     friend class SdNavigatorWin;
      82                 :            :     sal_Bool            bName   : 1;
      83                 :            :     sal_Bool            bActive : 1;
      84                 :            :     ::sd::DrawDocShell* mpDocShell;
      85                 :            : };
      86                 :            : 
      87                 :            : //------------------------------------------------------------------------
      88                 :            : 
      89                 :            : class SdNavigatorWin
      90                 :            :     : public Window
      91                 :            : {
      92                 :            : public:
      93                 :            :     SdNavigatorWin(
      94                 :            :         ::Window* pParent,
      95                 :            :         ::sd::NavigatorChildWindow* pChildWinContext,
      96                 :            :         const SdResId& rSdResId,
      97                 :            :         SfxBindings* pBindings );
      98                 :            :     virtual ~SdNavigatorWin();
      99                 :            : 
     100                 :            :     virtual void                KeyInput( const KeyEvent& rKEvt );
     101                 :            : 
     102                 :            :     void                        InitTreeLB( const SdDrawDocument* pDoc );
     103                 :            :     void                        RefreshDocumentLB( const String* pDocName = NULL );
     104                 :            : 
     105                 :            :     sal_Bool                        InsertFile(const String& rFileName);
     106                 :            : 
     107                 :            :     NavigatorDragType           GetNavigatorDragType();
     108                 :            :     void                        SetNavigatorDragType(NavigatorDragType eType) { meDragType = eType; }
     109                 :            : 
     110                 :            : protected:
     111                 :            :     virtual void                Resize();
     112                 :            :     virtual long                Notify(NotifyEvent& rNEvt);
     113                 :            : 
     114                 :            : 
     115                 :            : private:
     116                 :            :     friend class ::sd::NavigatorChildWindow;
     117                 :            :     friend class SdNavigatorControllerItem;
     118                 :            :     friend class SdPageNameControllerItem;
     119                 :            : 
     120                 :            :     ToolBox                     maToolbox;
     121                 :            :     SdPageObjsTLB               maTlbObjects;
     122                 :            :     ListBox                     maLbDocs;
     123                 :            : 
     124                 :            :     ::sd::NavigatorChildWindow*     mpChildWinContext;
     125                 :            :     Size                        maSize;
     126                 :            :     Size                        maMinSize;
     127                 :            :     sal_Bool                        mbDocImported;
     128                 :            :     String                      maDropFileName;
     129                 :            :     NavigatorDragType           meDragType;
     130                 :            :     std::vector<NavDocInfo>     maDocList;
     131                 :            :     SfxBindings*                mpBindings;
     132                 :            :     SdNavigatorControllerItem*  mpNavigatorCtrlItem;
     133                 :            :     SdPageNameControllerItem*   mpPageNameCtrlItem;
     134                 :            : 
     135                 :            :     ImageList                   maImageList;
     136                 :            : 
     137                 :            :     /** This flag controls whether all shapes or only the named shapes are
     138                 :            :         shown.
     139                 :            :     */
     140                 :            :     bool                        mbShowAllShapes;
     141                 :            : 
     142                 :            :     sal_uInt16                      GetDragTypeSdResId( NavigatorDragType eDT, sal_Bool bImage = sal_False );
     143                 :            :     NavDocInfo*                 GetDocInfo();
     144                 :            : 
     145                 :            :                                 DECL_LINK( GetFocusObjectsHdl, void * );
     146                 :            :                                 DECL_LINK( SelectToolboxHdl, void * );
     147                 :            :                                 DECL_LINK(ClickToolboxHdl, void *);
     148                 :            :                                 DECL_LINK( DropdownClickToolBoxHdl, ToolBox * );
     149                 :            :                                 DECL_LINK( ClickPageHdl, void * );
     150                 :            :                                 DECL_LINK( ClickObjectHdl, void * );
     151                 :            :                                 DECL_LINK( SelectDocumentHdl, void * );
     152                 :            :                                 DECL_LINK( MenuSelectHdl, Menu * );
     153                 :            :                                 DECL_LINK( ShapeFilterCallback, Menu * );
     154                 :            : 
     155                 :            :     virtual void                DataChanged( const DataChangedEvent& rDCEvt );
     156                 :            :     void                        SetDragImage();
     157                 :            :     void                        ApplyImageList();
     158                 :            : };
     159                 :            : 
     160                 :            : 
     161                 :            : 
     162                 :            : 
     163                 :            : /*************************************************************************
     164                 :            : |*
     165                 :            : |* ControllerItem fuer Navigator
     166                 :            : |*
     167                 :            : \************************************************************************/
     168                 :            : 
     169         [ #  # ]:          0 : class SdNavigatorControllerItem : public SfxControllerItem
     170                 :            : {
     171                 :            : public:
     172                 :            :     SdNavigatorControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings* );
     173                 :            : 
     174                 :            : protected:
     175                 :            :     virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
     176                 :            :                                 const SfxPoolItem* pState );
     177                 :            : 
     178                 :            : private:
     179                 :            :     SdNavigatorWin* pNavigatorWin;
     180                 :            : };
     181                 :            : 
     182                 :            : 
     183                 :            : 
     184                 :            : /*************************************************************************
     185                 :            : |*
     186                 :            : |* ControllerItem fuer Navigator zum Anzeigen der Seite in der TreeLB
     187                 :            : |*
     188                 :            : \************************************************************************/
     189                 :            : 
     190         [ #  # ]:          0 : class SdPageNameControllerItem : public SfxControllerItem
     191                 :            : {
     192                 :            : public:
     193                 :            :     SdPageNameControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings* );
     194                 :            : 
     195                 :            : protected:
     196                 :            :     virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
     197                 :            :                                 const SfxPoolItem* pState );
     198                 :            : 
     199                 :            : private:
     200                 :            :     SdNavigatorWin* pNavigatorWin;
     201                 :            : };
     202                 :            : 
     203                 :            : #endif
     204                 :            : 
     205                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10