LibreOffice Module svx (master)  1
itemwin.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SVX_ITEMWIN_HXX
20 #define INCLUDED_SVX_ITEMWIN_HXX
21 
23 #include <svtools/toolbarmenu.hxx>
24 #include <svx/dlgctrl.hxx>
25 #include <svx/svxdllapi.h>
26 
27 class XLineWidthItem;
28 class SfxObjectShell;
29 class ValueSet;
31 
32 class SvxLineBox final : public WeldToolbarPopup
33 {
35  std::unique_ptr<ValueSet> mxLineStyleSet;
36  std::unique_ptr<weld::CustomWeld> mxLineStyleSetWin;
37 
38  void FillControl();
39  void Fill(const XDashListRef &pList);
40 
41  DECL_LINK(SelectHdl, ValueSet*, void);
42 
43  virtual void GrabFocus() override;
44 
45 public:
46  SvxLineBox(SvxLineStyleToolBoxControl* pControl, weld::Widget* pParent, int nInitialIndex);
47  virtual ~SvxLineBox() override;
48 };
49 
50 class SvxMetricField final : public InterimItemWindow
51 {
52 private:
53  std::unique_ptr<weld::MetricSpinButton> m_xWidget;
54  int nCurValue;
57  css::uno::Reference< css::frame::XFrame > mxFrame;
58 
59  DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
60  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
61  DECL_LINK(FocusInHdl, weld::Widget&, void);
62 
63  static void ReleaseFocus_Impl();
64 
65  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
66 
67  virtual void GetFocus() override;
68 
69 public:
70  SvxMetricField( vcl::Window* pParent,
71  const css::uno::Reference< css::frame::XFrame >& rFrame );
72  virtual void dispose() override;
73  virtual ~SvxMetricField() override;
74 
75  void Update( const XLineWidthItem* pItem );
76  void SetCoreUnit( MapUnit eUnit );
77  void RefreshDlgUnit();
78 
79  void set_sensitive(bool bSensitive);
80 };
81 
82 namespace SvxFillTypeBox
83 {
84  SVX_DLLPUBLIC void Fill(weld::ComboBox& rListBox);
85 }
86 
87 namespace SvxFillAttrBox
88 {
89  SVX_DLLPUBLIC void Fill(weld::ComboBox&, const XHatchListRef &pList);
91  SVX_DLLPUBLIC void Fill(weld::ComboBox&, const XBitmapListRef &pList);
92  SVX_DLLPUBLIC void Fill(weld::ComboBox&, const XPatternListRef &pList);
93 }
94 
95 #endif // INCLUDED_SVX_ITEMWIN_HXX
96 
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SvxLineBox() override
Definition: linectrl.cxx:523
FieldUnit eDlgUnit
Definition: itemwin.hxx:56
std::unique_ptr< weld::MetricSpinButton > m_xWidget
Definition: itemwin.hxx:53
FieldUnit
SvxMetricField(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame)
Definition: itemwin.cxx:46
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: itemwin.cxx:157
virtual ~SvxMetricField() override
Definition: itemwin.cxx:71
SVX_DLLPUBLIC void Fill(weld::ComboBox &, const XHatchListRef &pList)
Definition: itemwin.cxx:245
virtual void GetFocus() override
Definition: itemwin.cxx:168
virtual void dispose() override
Definition: itemwin.cxx:65
static void ReleaseFocus_Impl()
Definition: itemwin.cxx:110
void Fill(const XDashListRef &pList)
Definition: linectrl.cxx:529
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
DECL_LINK(ModifyHdl, weld::MetricSpinButton &, void)
void set_sensitive(bool bSensitive)
Definition: itemwin.cxx:76
void FillControl()
Definition: linectrl.cxx:624
std::unique_ptr< weld::CustomWeld > mxLineStyleSetWin
Definition: itemwin.hxx:36
css::uno::Reference< css::frame::XFrame > mxFrame
Definition: itemwin.hxx:57
std::unique_ptr< ValueSet > mxLineStyleSet
Definition: itemwin.hxx:35
SVX_DLLPUBLIC void Fill(weld::ComboBox &rListBox)
Definition: itemwin.cxx:175
MapUnit ePoolUnit
Definition: itemwin.hxx:55
rtl::Reference< SvxLineStyleToolBoxControl > mxControl
Definition: itemwin.hxx:34
void Update(const XLineWidthItem *pItem)
Definition: itemwin.cxx:84
SvxLineBox(SvxLineStyleToolBoxControl *pControl, weld::Widget *pParent, int nInitialIndex)
Definition: linectrl.cxx:503
void SetCoreUnit(MapUnit eUnit)
Definition: itemwin.cxx:120
void RefreshDlgUnit()
Definition: itemwin.cxx:125
virtual void GrabFocus() override
Definition: linectrl.cxx:518
DECL_LINK(SelectHdl, ValueSet *, void)
MapUnit