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 INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_WRAPPROPERTYPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_WRAPPROPERTYPANEL_HXX
22 #include <svx/sidebar/PanelLayout.hxx>
23 #include <vcl/button.hxx>
24 #include <vcl/image.hxx>
25 #include <vcl/fixed.hxx>
26 #include <sfx2/sidebar/ControllerItem.hxx>
27 #include <com/sun/star/frame/XFrame.hpp>
28 #include <vcl/lstbox.hxx>
29 #include <svx/spacinglistbox.hxx>
31 namespace sw
{ namespace sidebar
{
33 class WrapPropertyPanel
35 , public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
38 static VclPtr
<vcl::Window
> Create(
40 const css::uno::Reference
< css::frame::XFrame
>& rxFrame
,
41 SfxBindings
* pBindings
);
43 // interface of ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
44 virtual void NotifyItemUpdate(
45 const sal_uInt16 nSId
,
46 const SfxItemState eState
,
47 const SfxPoolItem
* pState
,
48 const bool bIsEnabled
) override
;
50 virtual ~WrapPropertyPanel() override
;
51 virtual void dispose() override
;
55 const css::uno::Reference
< css::frame::XFrame
>& rxFrame
,
56 SfxBindings
* pBindings
);
58 css::uno::Reference
< css::frame::XFrame
> mxFrame
;
59 SfxBindings
* mpBindings
;
61 VclPtr
<RadioButton
> mpRBNoWrap
;
62 VclPtr
<RadioButton
> mpRBWrapLeft
;
63 VclPtr
<RadioButton
> mpRBWrapRight
;
64 VclPtr
<RadioButton
> mpRBWrapParallel
;
65 VclPtr
<RadioButton
> mpRBWrapThrough
;
66 VclPtr
<RadioButton
> mpRBIdealWrap
;
67 VclPtr
<Button
> mpEditContour
;
68 VclPtr
<CheckBox
> mpEnableContour
;
69 VclPtr
<SpacingListBox
> mpSpacingLB
;
70 VclPtr
<FixedText
> mpCustomEntry
;
79 OUString aCustomEntry
;
82 ::sfx2::sidebar::ControllerItem maSwNoWrapControl
;
83 ::sfx2::sidebar::ControllerItem maSwWrapLeftControl
;
84 ::sfx2::sidebar::ControllerItem maSwWrapRightControl
;
85 ::sfx2::sidebar::ControllerItem maSwWrapParallelControl
;
86 ::sfx2::sidebar::ControllerItem maSwWrapThroughControl
;
87 ::sfx2::sidebar::ControllerItem maSwWrapIdealControl
;
88 ::sfx2::sidebar::ControllerItem maSwEnableContourControl
;
89 ::sfx2::sidebar::ControllerItem maSwLRSpacingControl
;
90 ::sfx2::sidebar::ControllerItem maSwULSpacingControl
;
93 void UpdateEditContour();
94 void UpdateSpacingLB();
96 DECL_LINK(WrapTypeHdl
, Button
*, void);
97 DECL_LINK(EnableContourHdl
, Button
*, void);
98 DECL_LINK(EditContourHdl
, Button
*, void);
99 DECL_LINK(SpacingLBHdl
, ListBox
&, void);
102 } } // end of namespace ::sw::sidebar
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */