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