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 
53 #define NID_LINE_COUNT 10
54 
56 {
57 public:
59 
60  SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
61  virtual ~SwTbxAutoTextCtrl() override;
62 
63  virtual void CreatePopupWindow() override;
64  virtual void StateChanged( sal_uInt16 nSID,
65  SfxItemState eState,
66  const SfxPoolItem* pState ) override;
67 
68  DECL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu*, bool);
69 };
70 
71 class SwScrollNaviPopup final : public DockingWindow
72 {
76 
77  sal_uInt16 GetCurItemId() const;
78  OUString GetItemText(sal_uInt16 nItemId) const;
79  void SetItemText(sal_uInt16 nItemId, const OUString& rText);
80  void CheckItem(sal_uInt16 nItemId, bool bOn);
81 
82  OUString sQuickHelp[2 * NID_COUNT];
83 
84  DECL_LINK(SelectHdl, ToolBox*, void);
85 
86 public:
88  virtual ~SwScrollNaviPopup() override;
89  virtual void dispose() override;
90 
91  static OUString GetToolTip(bool bNext);
92 
93  void syncFromDoc();
94 };
95 
97 {
98 public:
100 
101  SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
102  virtual ~SwPreviewZoomControl() override;
103 
104  virtual void StateChanged( sal_uInt16 nSID,
105  SfxItemState eState,
106  const SfxPoolItem* pState ) override;
107 
108  virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) override;
109 };
110 
112 {
113 public:
115 
116  SwJumpToSpecificPageControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
117  virtual ~SwJumpToSpecificPageControl() override;
118 
119  virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) override;
120 };
121 #endif
122 
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual VclPtr< vcl::Window > CreateItemWindow(vcl::Window *pParent) override
Definition: workctrl.cxx:753
virtual void dispose() override
Definition: workctrl.cxx:345
DECL_STATIC_LINK(SwTbxAutoTextCtrl, PopupHdl, Menu *, bool)
virtual ~SwTbxAutoTextCtrl() override
Definition: workctrl.cxx:78
void CheckItem(sal_uInt16 nItemId, bool bOn)
Definition: workctrl.cxx:522
DECL_LINK(SelectHdl, ToolBox *, void)
SwScrollNaviPopup(vcl::Window *pParent)
Definition: workctrl.cxx:309
sal_Int16 nId
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: workctrl.cxx:679
static OUString GetToolTip(bool bNext)
Definition: workctrl.cxx:371
OUString GetItemText(sal_uInt16 nItemId) const
Definition: workctrl.cxx:499
virtual ~SwJumpToSpecificPageControl() override
Definition: workctrl.cxx:750
virtual void CreatePopupWindow() override
Definition: workctrl.cxx:82
SwTbxAutoTextCtrl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:69
void SetItemText(sal_uInt16 nItemId, const OUString &rText)
Definition: workctrl.cxx:509
virtual ~SwScrollNaviPopup() override
Definition: workctrl.cxx:340
VclPtr< ToolBox > m_xToolBox2
Definition: workctrl.hxx:74
VclPtr< ToolBox > m_xToolBox1
Definition: workctrl.hxx:73
virtual ~SwPreviewZoomControl() override
Definition: workctrl.cxx:675
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: workctrl.cxx:129
SwPreviewZoomControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:667
OUString sQuickHelp[2 *NID_COUNT]
Definition: workctrl.hxx:82
VclPtr< FixedText > m_xInfoField
Definition: workctrl.hxx:75
SfxItemState
sal_uInt16 GetCurItemId() const
Definition: workctrl.cxx:491
virtual VclPtr< vcl::Window > CreateItemWindow(vcl::Window *pParent) override
Definition: workctrl.cxx:695
#define NID_COUNT
Definition: workctrl.hxx:51
Definition: view.hxx:146
SwJumpToSpecificPageControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx)
Definition: workctrl.cxx:743