LCOV - code coverage report
Current view: top level - sw/source/core/uibase/inc - workctrl.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 5 0.0 %
Date: 2014-04-11 Functions: 0 6 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_SW_SOURCE_UI_INC_WORKCTRL_HXX
      20             : #define INCLUDED_SW_SOURCE_UI_INC_WORKCTRL_HXX
      21             : 
      22             : #include <sfx2/tbxctrl.hxx>
      23             : #include <vcl/toolbox.hxx>
      24             : #include <svtools/stdctrl.hxx>
      25             : #include <vcl/button.hxx>
      26             : 
      27             : class PopupMenu;
      28             : class SwView;
      29             : 
      30             : // double entry! hrc and hxx
      31             : // these Ids say what the buttons below the scrollbar are doing
      32             : #define NID_START   20000
      33             : #define NID_NEXT    20000
      34             : #define NID_PREV    20001
      35             : #define NID_TBL     20002
      36             : #define NID_FRM     20003
      37             : #define NID_PGE     20004
      38             : #define NID_DRW     20005
      39             : #define NID_CTRL    20006
      40             : #define NID_REG     20007
      41             : #define NID_BKM     20008
      42             : #define NID_GRF     20009
      43             : #define NID_OLE     20010
      44             : #define NID_OUTL    20011
      45             : #define NID_SEL     20012
      46             : #define NID_FTN     20013
      47             : #define NID_MARK    20014
      48             : #define NID_POSTIT  20015
      49             : #define NID_SRCH_REP 20016
      50             : #define NID_INDEX_ENTRY  20017
      51             : #define NID_TABLE_FORMULA   20018
      52             : #define NID_TABLE_FORMULA_ERROR     20019
      53             : #define NID_COUNT  20
      54             : 
      55             : class SwTbxInsertCtrl : public SfxToolBoxControl
      56             : {
      57             :     sal_uInt16                  nLastSlotId;
      58             : 
      59             :     using SfxToolBoxControl::Select;
      60             :     virtual void            Select( sal_Bool bMod1 = sal_False );
      61             : 
      62             : public:
      63             :     SFX_DECL_TOOLBOX_CONTROL();
      64             : 
      65             :     SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
      66             :     virtual ~SwTbxInsertCtrl();
      67             : 
      68             :     virtual SfxPopupWindowType  GetPopupWindowType() const SAL_OVERRIDE;
      69             :     virtual SfxPopupWindow*     CreatePopupWindow() SAL_OVERRIDE;
      70             :     virtual void                StateChanged( sal_uInt16 nSID,
      71             :                                               SfxItemState eState,
      72             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
      73             : 
      74             :     virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      75             : };
      76             : 
      77             : class SwTbxAutoTextCtrl : public SfxToolBoxControl
      78             : {
      79             :     PopupMenu*              pPopup;
      80             :     SwView*                 pView;
      81             : 
      82             :     void                    DelPopup();
      83             : public:
      84             :     SFX_DECL_TOOLBOX_CONTROL();
      85             : 
      86             :     SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
      87             :     virtual ~SwTbxAutoTextCtrl();
      88             : 
      89             :     virtual SfxPopupWindowType  GetPopupWindowType() const SAL_OVERRIDE;
      90             :     virtual SfxPopupWindow*     CreatePopupWindow() SAL_OVERRIDE;
      91             :     virtual void                StateChanged( sal_uInt16 nSID,
      92             :                                               SfxItemState eState,
      93             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
      94             : 
      95             :     DECL_LINK(PopupHdl, PopupMenu*);
      96             : };
      97             : 
      98             : class SwTbxFieldCtrl : public SfxToolBoxControl
      99             : {
     100             :     PopupMenu*              pPopup;
     101             :     SwView*                 pView;
     102             : 
     103             :     void                    DelPopup();
     104             : public:
     105             :     SFX_DECL_TOOLBOX_CONTROL();
     106             : 
     107             :     SwTbxFieldCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
     108             :     virtual ~SwTbxFieldCtrl();
     109             : 
     110             :     virtual SfxPopupWindowType  GetPopupWindowType() const SAL_OVERRIDE;
     111             :     virtual SfxPopupWindow*     CreatePopupWindow() SAL_OVERRIDE;
     112             :     virtual void                StateChanged( sal_uInt16 nSID,
     113             :                                               SfxItemState eState,
     114             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
     115             : 
     116             :     DECL_LINK(PopupHdl, PopupMenu*);
     117             : };
     118             : 
     119           0 : class SwScrollNaviToolBox : public ToolBox
     120             : {
     121             :     virtual void    MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     122             :     virtual void    RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
     123             : 
     124             :     public:
     125           0 :         SwScrollNaviToolBox(Window* pParent, WinBits nWinStyle ) :
     126           0 :             ToolBox(pParent, nWinStyle ) {}
     127             : };
     128             : 
     129             : class SwScrollNaviPopup : public SfxPopupWindow
     130             : {
     131             :     SwScrollNaviToolBox    aToolBox;
     132             :     FixedLine       aSeparator;
     133             :     FixedInfo       aInfoField;
     134             :     ImageList       aIList;
     135             : 
     136             :     OUString        sQuickHelp[2 * NID_COUNT];
     137             : 
     138             :     void            ApplyImageList();
     139             : 
     140             :     using Window::GetQuickHelpText;
     141             : 
     142             : protected:
     143             :         DECL_LINK(SelectHdl, ToolBox*);
     144             :         virtual void        DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     145             : 
     146             : public:
     147             :         SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window *pParent );
     148             :         virtual ~SwScrollNaviPopup();
     149             : 
     150             :     static OUString         GetQuickHelpText(sal_Bool bNext);
     151             : 
     152             :     virtual SfxPopupWindow* Clone() const SAL_OVERRIDE;
     153           0 :     void                GrabFocus(){aToolBox.GrabFocus();}
     154             : };
     155             : 
     156             : //  ImageButtons have to set the HelpText themselves if needed
     157             : 
     158           0 : class SwHlpImageButton : public ImageButton
     159             : {
     160             :     sal_Bool        bUp;
     161             :     public:
     162             :         SwHlpImageButton(Window* pParent, const ResId& rResId, sal_Bool bUpBtn) :
     163             :             ImageButton(pParent, rResId), bUp(bUpBtn){}
     164             : 
     165             :     virtual void    RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
     166             : 
     167             : };
     168             : 
     169             : class SwPreviewZoomControl : public SfxToolBoxControl
     170             : {
     171             : public:
     172             :     SFX_DECL_TOOLBOX_CONTROL();
     173             : 
     174             :     SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
     175             :     virtual ~SwPreviewZoomControl();
     176             : 
     177             :     virtual void            StateChanged( sal_uInt16 nSID,
     178             :                                               SfxItemState eState,
     179             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
     180             : 
     181             :     virtual Window*         CreateItemWindow( Window *pParent ) SAL_OVERRIDE;
     182             : };
     183             : #endif
     184             : 
     185             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10