Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / itemwin.hxx
blobe09c811e553bf641a82aa895d0a329856f899faa
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/bitmap.hxx>
24 #include <svx/dlgctrl.hxx>
25 #include <svx/svxdllapi.h>
27 // forward ---------------------------------------------------------------
29 class XLineColorItem;
30 class XLineWidthItem;
31 class SfxObjectShell;
33 // class SvxLineBox ------------------------------------------------------
35 class SvxLineBox : public LineLB
37 sal_uInt16 nCurPos;
38 Timer aDelayTimer;
39 Size aLogicalSize;
40 bool bRelease;
41 SfxObjectShell* mpSh;
42 css::uno::Reference< css::frame::XFrame > mxFrame;
44 DECL_LINK(DelayHdl_Impl, Timer *, void);
46 void ReleaseFocus_Impl();
48 public:
49 SvxLineBox( vcl::Window* pParent,
50 const css::uno::Reference< css::frame::XFrame >& rFrame );
52 void FillControl();
54 protected:
55 virtual void Select() override;
56 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
57 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
58 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
62 // class SvxMetricField --------------------------------------------------
63 class SVX_DLLPUBLIC SvxMetricField : public MetricField
65 using Window::Update;
67 OUString aCurTxt;
68 MapUnit ePoolUnit;
69 FieldUnit eDlgUnit;
70 Size aLogicalSize;
71 css::uno::Reference< css::frame::XFrame > mxFrame;
73 static void ReleaseFocus_Impl();
75 protected:
76 virtual void Modify() override;
78 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
79 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
80 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
82 public:
83 SvxMetricField( vcl::Window* pParent,
84 const css::uno::Reference< css::frame::XFrame >& rFrame );
86 void Update( const XLineWidthItem* pItem );
87 void SetCoreUnit( MapUnit eUnit );
88 void RefreshDlgUnit();
91 // class SvxFillTypeBox --------------------------------------------------
93 class SVX_DLLPUBLIC SvxFillTypeBox : public FillTypeLB
95 public:
96 SvxFillTypeBox( vcl::Window* pParent );
98 void Selected() { bSelect = true; }
100 protected:
101 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
102 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
104 private:
105 sal_uInt16 nCurPos;
106 bool bSelect;
107 bool bRelease;
109 static void ReleaseFocus_Impl();
112 // class SvxFillAttrBox --------------------------------------------------
114 class SVX_DLLPUBLIC SvxFillAttrBox : public FillAttrLB
116 public:
117 SvxFillAttrBox( vcl::Window* pParent );
119 protected:
120 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
121 virtual bool EventNotify( NotifyEvent& rNEvt ) override;
123 private:
124 sal_uInt16 nCurPos;
125 bool bRelease;
127 static void ReleaseFocus_Impl();
130 #endif // INCLUDED_SVX_ITEMWIN_HXX
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */