bump product version to 4.1.6.2
[LibreOffice.git] / include / svx / linectrl.hxx
blob4d09d55183a479419539e37e47e87875a341ee78
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef _SVX_LINECTRL_HXX
20 #define _SVX_LINECTRL_HXX
23 #include <svtools/valueset.hxx>
24 #include <svl/lstner.hxx>
25 #include <sfx2/tbxctrl.hxx>
26 #include <svx/svxdllapi.h>
27 #include <svx/xtable.hxx>
29 class XLineStyleItem;
30 class XLineDashItem;
31 class SvxLineBox;
32 class SvxMetricField;
33 class SvxColorBox;
35 //========================================================================
36 // SvxLineStyleController:
37 //========================================================================
39 class SVX_DLLPUBLIC SvxLineStyleToolBoxControl : public SfxToolBoxControl
41 private:
42 XLineStyleItem* pStyleItem;
43 XLineDashItem* pDashItem;
45 sal_Bool bUpdate;
47 public:
48 SFX_DECL_TOOLBOX_CONTROL();
50 SvxLineStyleToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
51 ~SvxLineStyleToolBoxControl();
53 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
54 const SfxPoolItem* pState );
55 void Update( const SfxPoolItem* pState );
56 virtual Window* CreateItemWindow( Window *pParent );
59 //========================================================================
60 // SvxLineWidthController:
61 //========================================================================
63 class SVX_DLLPUBLIC SvxLineWidthToolBoxControl : public SfxToolBoxControl
65 public:
66 SFX_DECL_TOOLBOX_CONTROL();
68 SvxLineWidthToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
69 ~SvxLineWidthToolBoxControl();
71 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
72 const SfxPoolItem* pState );
73 virtual Window* CreateItemWindow( Window *pParent );
76 //========================================================================
77 // SvxLineColorController:
78 //========================================================================
80 class SVX_DLLPUBLIC SvxLineColorToolBoxControl : public SfxToolBoxControl
82 public:
83 SFX_DECL_TOOLBOX_CONTROL();
85 SvxLineColorToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
86 ~SvxLineColorToolBoxControl();
88 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
89 const SfxPoolItem* pState );
90 void Update( const SfxPoolItem* pState );
91 virtual Window* CreateItemWindow( Window *pParent );
94 //========================================================================
95 // class SvxLineEndWindow
96 //========================================================================
97 class SvxLineEndWindow : public SfxPopupWindow
99 using FloatingWindow::StateChanged;
101 private:
102 XLineEndListRef pLineEndList;
103 ValueSet aLineEndSet;
104 sal_uInt16 nCols;
105 sal_uInt16 nLines;
106 sal_uIntPtr nLineEndWidth;
107 Size aBmpSize;
108 sal_Bool bPopupMode;
109 bool mbInResize;
110 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
113 DECL_LINK( SelectHdl, void * );
114 void FillValueSet();
115 void SetSize();
116 void implInit();
118 protected:
119 virtual void Resizing( Size& rSize );
120 virtual void Resize();
121 virtual sal_Bool Close();
122 virtual void PopupModeEnd();
124 /** This function is called when the window gets the focus. It grabs
125 the focus to the line ends value set so that it can be controlled with
126 the keyboard.
128 virtual void GetFocus (void);
130 public:
131 SvxLineEndWindow( sal_uInt16 nId,
132 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
133 const String& rWndTitle );
134 SvxLineEndWindow( sal_uInt16 nId,
135 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
136 Window* pParentWindow,
137 const String& rWndTitle );
138 ~SvxLineEndWindow();
140 void StartSelection();
142 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
143 const SfxPoolItem* pState );
144 virtual SfxPopupWindow* Clone() const;
147 //========================================================================
148 // class SvxLineEndToolBoxControl
149 //========================================================================
151 class SVX_DLLPUBLIC SvxLineEndToolBoxControl : public SfxToolBoxControl
153 public:
154 SFX_DECL_TOOLBOX_CONTROL();
155 SvxLineEndToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
156 ~SvxLineEndToolBoxControl();
158 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
159 const SfxPoolItem* pState );
160 virtual SfxPopupWindowType GetPopupWindowType() const;
161 virtual SfxPopupWindow* CreatePopupWindow();
166 #endif
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */