1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
35 //========================================================================
36 // SvxLineStyleController:
37 //========================================================================
39 class SVX_DLLPUBLIC SvxLineStyleToolBoxControl
: public SfxToolBoxControl
42 XLineStyleItem
* pStyleItem
;
43 XLineDashItem
* pDashItem
;
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
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
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
;
102 XLineEndListRef pLineEndList
;
103 ValueSet aLineEndSet
;
106 sal_uIntPtr nLineEndWidth
;
110 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> mxFrame
;
113 DECL_LINK( SelectHdl
, void * );
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
128 virtual void GetFocus (void);
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
);
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
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();
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */