Bump version to 6.4-15
[LibreOffice.git] / include / svx / itemwin.hxx
blobcbfaf30553399dfba64ad89ec2e6e61a1f1df057
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 INCLUDED_SVX_ITEMWIN_HXX
20 #define INCLUDED_SVX_ITEMWIN_HXX
22 #include <vcl/field.hxx>
24 #include <svx/dlgctrl.hxx>
25 #include <svx/svxdllapi.h>
27 class XLineWidthItem;
28 class SfxObjectShell;
30 class SvxLineBox final : public ListBox
32 sal_uInt16 nCurPos;
33 Timer aDelayTimer;
34 Size const aLogicalSize;
35 bool bRelease;
36 SfxObjectShell* mpSh;
37 css::uno::Reference< css::frame::XFrame > mxFrame;
39 DECL_LINK(DelayHdl_Impl, Timer *, void);
41 void ReleaseFocus_Impl();
43 public:
44 SvxLineBox( vcl::Window* pParent,
45 const css::uno::Reference< css::frame::XFrame >& rFrame );
47 void FillControl();
49 void Fill(const XDashListRef &pList);
51 private:
52 virtual void Select() override;
53 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
54 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
55 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
59 class SVX_DLLPUBLIC SvxMetricField : public MetricField
61 using Window::Update;
63 OUString aCurTxt;
64 MapUnit eDestPoolUnit;
65 FieldUnit eDlgUnit;
66 Size aLogicalSize;
67 css::uno::Reference< css::frame::XFrame > mxFrame;
69 static void ReleaseFocus_Impl();
71 protected:
72 virtual void Modify() override;
74 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
75 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
76 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
78 public:
79 SvxMetricField( vcl::Window* pParent,
80 const css::uno::Reference< css::frame::XFrame >& rFrame );
82 void Update( const XLineWidthItem* pItem );
83 void SetDestCoreUnit( MapUnit eUnit );
84 void RefreshDlgUnit();
87 class SVX_DLLPUBLIC SvxFillTypeBox final : public FillTypeLB
89 public:
90 SvxFillTypeBox( vcl::Window* pParent );
92 void Selected() { bSelect = true; }
93 virtual boost::property_tree::ptree DumpAsPropertyTree() override;
95 private:
96 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
97 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
99 sal_uInt16 nCurPos;
100 bool bSelect;
102 static void ReleaseFocus_Impl();
105 class SVX_DLLPUBLIC SvxFillAttrBox final : public ListBox
107 public:
108 SvxFillAttrBox( vcl::Window* pParent );
110 void Fill( const XHatchListRef &pList );
111 void Fill( const XGradientListRef &pList );
112 void Fill( const XBitmapListRef &pList );
113 void Fill( const XPatternListRef &pList );
115 private:
116 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
117 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
119 sal_uInt16 nCurPos;
120 BitmapEx maBitmapEx;
122 static void ReleaseFocus_Impl();
125 #endif // INCLUDED_SVX_ITEMWIN_HXX
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */