LCOV - code coverage report
Current view: top level - sw/source/uibase/inc - workctrl.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 5 0.0 %
Date: 2014-11-03 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_UIBASE_INC_WORKCTRL_HXX
      20             : #define INCLUDED_SW_SOURCE_UIBASE_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             :     virtual void            Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE;
      60             : 
      61             : public:
      62             :     SFX_DECL_TOOLBOX_CONTROL();
      63             : 
      64             :     SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
      65             :     virtual ~SwTbxInsertCtrl();
      66             : 
      67             :     virtual SfxPopupWindowType  GetPopupWindowType() const SAL_OVERRIDE;
      68             :     virtual SfxPopupWindow*     CreatePopupWindow() SAL_OVERRIDE;
      69             :     virtual void                StateChanged( sal_uInt16 nSID,
      70             :                                               SfxItemState eState,
      71             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
      72             : 
      73             :     virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      74             : };
      75             : 
      76             : class SwTbxAutoTextCtrl : public SfxToolBoxControl
      77             : {
      78             :     PopupMenu*              pPopup;
      79             : 
      80             :     void                    DelPopup();
      81             : public:
      82             :     SFX_DECL_TOOLBOX_CONTROL();
      83             : 
      84             :     SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
      85             :     virtual ~SwTbxAutoTextCtrl();
      86             : 
      87             :     virtual SfxPopupWindowType  GetPopupWindowType() const SAL_OVERRIDE;
      88             :     virtual SfxPopupWindow*     CreatePopupWindow() SAL_OVERRIDE;
      89             :     virtual void                StateChanged( sal_uInt16 nSID,
      90             :                                               SfxItemState eState,
      91             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
      92             : 
      93             :     DECL_LINK(PopupHdl, PopupMenu*);
      94             : };
      95             : 
      96             : class SwTbxFieldCtrl : public SfxToolBoxControl
      97             : {
      98             : public:
      99             :     SFX_DECL_TOOLBOX_CONTROL();
     100             : 
     101             :     SwTbxFieldCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
     102             :     virtual ~SwTbxFieldCtrl();
     103             : 
     104             :     virtual SfxPopupWindowType  GetPopupWindowType() const SAL_OVERRIDE;
     105             :     virtual SfxPopupWindow*     CreatePopupWindow() SAL_OVERRIDE;
     106             :     virtual void                StateChanged( sal_uInt16 nSID,
     107             :                                               SfxItemState eState,
     108             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
     109             : 
     110             :     DECL_LINK(PopupHdl, PopupMenu*);
     111             : };
     112             : 
     113           0 : class SwScrollNaviToolBox : public ToolBox
     114             : {
     115             :     virtual void    MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
     116             :     virtual void    RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
     117             : 
     118             :     public:
     119           0 :         SwScrollNaviToolBox(vcl::Window* pParent, WinBits nWinStyle ) :
     120           0 :             ToolBox(pParent, nWinStyle ) {}
     121             : };
     122             : 
     123             : class SwScrollNaviPopup : public SfxPopupWindow
     124             : {
     125             :     SwScrollNaviToolBox* m_pToolBox;
     126             :     FixedText*           m_pInfoField;
     127             :     ImageList       aIList;
     128             : 
     129             :     OUString        sQuickHelp[2 * NID_COUNT];
     130             : 
     131             :     void            ApplyImageList();
     132             : 
     133             :     using Window::GetQuickHelpText;
     134             : 
     135             : protected:
     136             :         DECL_LINK(SelectHdl, ToolBox*);
     137             :         virtual void        DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     138             : 
     139             : public:
     140             :         SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window *pParent );
     141             :         virtual ~SwScrollNaviPopup();
     142             : 
     143             :     static OUString         GetQuickHelpText(bool bNext);
     144             : 
     145             :     virtual SfxPopupWindow* Clone() const SAL_OVERRIDE;
     146           0 :     void                GrabFocus() { m_pToolBox->GrabFocus(); }
     147             : };
     148             : 
     149             : //  ImageButtons have to set the HelpText themselves if needed
     150             : 
     151           0 : class SwHlpImageButton : public ImageButton
     152             : {
     153             :     bool        bUp;
     154             :     public:
     155             :         SwHlpImageButton(vcl::Window* pParent, const ResId& rResId, bool bUpBtn) :
     156             :             ImageButton(pParent, rResId), bUp(bUpBtn){}
     157             : 
     158             :     virtual void    RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
     159             : 
     160             : };
     161             : 
     162             : class SwPreviewZoomControl : public SfxToolBoxControl
     163             : {
     164             : public:
     165             :     SFX_DECL_TOOLBOX_CONTROL();
     166             : 
     167             :     SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
     168             :     virtual ~SwPreviewZoomControl();
     169             : 
     170             :     virtual void            StateChanged( sal_uInt16 nSID,
     171             :                                               SfxItemState eState,
     172             :                                               const SfxPoolItem* pState ) SAL_OVERRIDE;
     173             : 
     174             :     virtual vcl::Window*         CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE;
     175             : };
     176             : #endif
     177             : 
     178             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10