LibreOffice Module sw (master)  1
workctrl.hxx
Go to the documentation of this file.
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 <vcl/button.hxx>
25 
26 class PopupMenu;
27 class SwView;
28 
29 // double entry! hrc and hxx
30 // these Ids say what the buttons below the scrollbar are doing
31 #define NID_START 20000
32 #define NID_NEXT 20000
33 #define NID_PREV 20001
34 #define NID_TBL 20002
35 #define NID_FRM 20003
36 #define NID_PGE 20004
37 #define NID_DRW 20005
38 #define NID_CTRL 20006
39 #define NID_REG 20007
40 #define NID_BKM 20008
41 #define NID_GRF 20009
42 #define NID_OLE 20010
43 #define NID_OUTL 20011
44 #define NID_SEL 20012
45 #define NID_FTN 20013
46 #define NID_MARK 20014
47 #define NID_POSTIT 20015
48 #define NID_SRCH_REP 20016
49 #define NID_INDEX_ENTRY 20017
50 #define NID_TABLE_FORMULA 20018
51 #define NID_TABLE_FORMULA_ERROR 20019
52 #define NID_COUNT 20
53 
55 {
56 public:
58 
59  SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
60  virtual ~SwTbxAutoTextCtrl() override;
61 
62  virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override;
63  virtual void StateChanged( sal_uInt16 nSID,
64  SfxItemState eState,
65  const SfxPoolItem* pState ) override;
66 
67  DECL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu*, bool);
68 };
69 
70 class SwScrollNaviPopup;
71 
73 {
75 
76  virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
77  virtual void RequestHelp( const HelpEvent& rHEvt ) override;
78 
79 public:
80  SwScrollNaviToolBox(vcl::Window* pParent, SwScrollNaviPopup* pNaviPopup, WinBits nWinStyle)
81  : ToolBox(pParent, nWinStyle)
82  , m_pNaviPopup(pNaviPopup)
83  {
84  }
85  virtual ~SwScrollNaviToolBox() override;
86  virtual void dispose() override;
87 };
88 
90 {
93 
94  OUString sQuickHelp[2 * NID_COUNT];
95 
96 protected:
97  DECL_LINK(SelectHdl, ToolBox*, void);
98 
99 public:
100  SwScrollNaviPopup( sal_uInt16 nId, const css::uno::Reference< css::frame::XFrame >& rFrame, vcl::Window *pParent );
101  virtual ~SwScrollNaviPopup() override;
102  virtual void dispose() override;
103 
104  static OUString GetToolTip(bool bNext);
105 
106  void GrabFocus() { m_pToolBox->GrabFocus(); }
107 
108  virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
109 };
110 
112 {
113 public:
115 
116  SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
117  virtual ~SwPreviewZoomControl() override;
118 
119  virtual void StateChanged( sal_uInt16 nSID,
120  SfxItemState eState,
121  const SfxPoolItem* pState ) override;
122 
123  virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) override;
124 };
125 
127 {
128 public:
130 
131  SwJumpToSpecificPageControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
132  virtual ~SwJumpToSpecificPageControl() override;
133 
134  virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) override;
135 };
136 #endif
137 
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual VclPtr< vcl::Window > CreateItemWindow(vcl::Window *pParent) override
Definition: workctrl.cxx:655
virtual void dispose() override
Definition: workctrl.cxx:366
virtual ~SwScrollNaviToolBox() override
Definition: workctrl.cxx:394
DECL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu *, bool)
virtual ~SwTbxAutoTextCtrl() override
Definition: workctrl.cxx:85
DECL_LINK(SelectHdl, ToolBox *, void)
sal_Int16 nId
virtual void statusChanged(const css::frame::FeatureStateEvent &rEvent) override
Definition: workctrl.cxx:428
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: workctrl.cxx:585
static OUString GetToolTip(bool bNext)
Definition: workctrl.cxx:419
virtual ~SwJumpToSpecificPageControl() override
Definition: workctrl.cxx:652
sal_Int64 WinBits
SwTbxAutoTextCtrl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:76
SwScrollNaviPopup(sal_uInt16 nId, const css::uno::Reference< css::frame::XFrame > &rFrame, vcl::Window *pParent)
Definition: workctrl.cxx:317
virtual ~SwScrollNaviPopup() override
Definition: workctrl.cxx:361
VclPtr< SwScrollNaviPopup > m_pNaviPopup
Definition: workctrl.hxx:74
virtual void dispose() override
Definition: workctrl.cxx:399
virtual ~SwPreviewZoomControl() override
Definition: workctrl.cxx:581
void GrabFocus()
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: workctrl.cxx:137
VclPtr< SwScrollNaviToolBox > m_pToolBox
Definition: workctrl.hxx:91
SwPreviewZoomControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:573
OUString sQuickHelp[2 *NID_COUNT]
Definition: workctrl.hxx:94
SfxItemState
virtual void RequestHelp(const HelpEvent &rHEvt) override
Definition: workctrl.cxx:412
SwScrollNaviToolBox(vcl::Window *pParent, SwScrollNaviPopup *pNaviPopup, WinBits nWinStyle)
Definition: workctrl.hxx:80
virtual VclPtr< vcl::Window > CreateItemWindow(vcl::Window *pParent) override
Definition: workctrl.cxx:601
virtual VclPtr< SfxPopupWindow > CreatePopupWindow() override
Definition: workctrl.cxx:89
#define NID_COUNT
Definition: workctrl.hxx:52
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: workctrl.cxx:405
Definition: view.hxx:146
SwJumpToSpecificPageControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:645
VclPtr< FixedText > m_pInfoField
Definition: workctrl.hxx:92