LibreOffice Module svx (master)  1
LineWidthPopup.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_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX
20 #define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX
21 
22 #include <tools/mapunit.hxx>
23 #include <vcl/customweld.hxx>
24 #include <vcl/image.hxx>
25 #include <vcl/weld.hxx>
26 #include <svtools/toolbarmenu.hxx>
27 #include <array>
28 
29 class ValueSet;
30 
31 namespace svx::sidebar
32 {
33 class LinePropertyPanelBase;
34 class LineWidthValueSet;
35 
36 class LineWidthPopup final : public WeldToolbarPopup
37 {
38 public:
41 
42  void SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit);
43 
44  weld::Container* getTopLevel() const { return m_xTopLevel.get(); }
45 
46  virtual void GrabFocus() override;
47 
48 private:
50  std::array<OUString, 9> maStrUnits;
51  OUString m_sPt;
53  bool m_bVSFocus;
54  bool m_bCustom;
58 
59  std::unique_ptr<weld::MetricSpinButton> m_xMFWidth;
60  std::unique_ptr<LineWidthValueSet> m_xVSWidth;
61  std::unique_ptr<weld::CustomWeld> m_xVSWidthWin;
62 
63  DECL_LINK(VSSelectHdl, ValueSet*, void);
64  DECL_LINK(MFModifyHdl, weld::MetricSpinButton&, void);
65 };
66 
67 } // end of namespace svx::sidebar
68 
69 #endif
70 
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Long
std::unique_ptr< weld::MetricSpinButton > m_xMFWidth
void SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit)
std::array< OUString, 9 > maStrUnits
weld::Container * getTopLevel() const
LinePropertyPanelBase & m_rParent
std::unique_ptr< weld::Container > m_xTopLevel
DECL_LINK(VSSelectHdl, ValueSet *, void)
LineWidthPopup(weld::Widget *pParent, LinePropertyPanelBase &rParent)
virtual void GrabFocus() override
std::unique_ptr< weld::CustomWeld > m_xVSWidthWin
MapUnit
std::unique_ptr< LineWidthValueSet > m_xVSWidth