LibreOffice Module sc (master)  1
AlignmentPropertyPanel.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 #pragma once
20 
23 #include <sfx2/weldutils.hxx>
25 #include <vcl/EnumContext.hxx>
26 
27 namespace sc::sidebar {
28 
30 : public PanelLayout,
33 {
34 public:
35  static std::unique_ptr<PanelLayout> Create(
36  weld::Widget* pParent,
37  const css::uno::Reference<css::frame::XFrame>& rxFrame,
38  SfxBindings* pBindings);
39 
40  virtual void HandleContextChange(
41  const vcl::EnumContext& rContext) override;
42 
43  virtual void NotifyItemUpdate(
44  const sal_uInt16 nSId,
45  const SfxItemState eState,
46  const SfxPoolItem* pState) override;
47 
48  virtual void GetControlState(
49  const sal_uInt16 /*nSId*/,
50  boost::property_tree::ptree& /*rState*/) override {};
51 
53 
54  // constructor/destructor
56  weld::Widget* pParent,
57  const css::uno::Reference<css::frame::XFrame>& rxFrame,
58  SfxBindings* pBindings);
59  virtual ~AlignmentPropertyPanel() override;
60 
61 private:
62  //ui controls
63  std::unique_ptr<weld::Label> mxFTLeftIndent;
64  std::unique_ptr<weld::MetricSpinButton> mxMFLeftIndent;
65  std::unique_ptr<weld::CheckButton> mxCBXWrapText;
66  std::unique_ptr<weld::CheckButton> mxCBXMergeCell;
67  std::unique_ptr<weld::Label> mxFtRotate;
68  std::unique_ptr<weld::MetricSpinButton> mxMtrAngle;
69  std::unique_ptr<weld::ToggleButton> mxRefEdgeBottom;
70  std::unique_ptr<weld::ToggleButton> mxRefEdgeTop;
71  std::unique_ptr<weld::ToggleButton> mxRefEdgeStd;
72  std::unique_ptr<weld::CheckButton> mxCBStacked;
73  std::unique_ptr<weld::Widget> mxTextOrientBox;
74 
75  std::unique_ptr<weld::Toolbar> mxHorizontalAlign;
76  std::unique_ptr<ToolbarUnoDispatcher> mxHorizontalAlignDispatch;
77 
78  std::unique_ptr<weld::Toolbar> mxVertAlign;
79  std::unique_ptr<ToolbarUnoDispatcher> mxVertAlignDispatch;
80 
81  std::unique_ptr<weld::Toolbar> mxWriteDirection;
82  std::unique_ptr<ToolbarUnoDispatcher> mxWriteDirectionDispatch;
83 
84  std::unique_ptr<weld::Toolbar> mxIndentButtons;
85  std::unique_ptr<ToolbarUnoDispatcher> mxIndentButtonsDispatch;
86 
94 
95  bool mbMultiDisable : 1;
96 
99 
100  DECL_LINK( MFLeftIndentMdyHdl, weld::MetricSpinButton&, void );
101  DECL_LINK( CBOXMergnCellClkHdl, weld::Toggleable&, void );
102  DECL_LINK( CBOXWrapTextClkHdl, weld::Toggleable&, void );
103  DECL_LINK( AngleModifiedHdl, weld::MetricSpinButton&, void );
104  DECL_LINK( ClickStackHdl, weld::Toggleable&, void );
105  DECL_LINK( ReferenceEdgeHdl, weld::Button&, void );
106 
107  void Initialize();
108 };
109 
110 } // end of namespace ::sc::sidebar
111 
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void HandleContextChange(const vcl::EnumContext &rContext) override
::sfx2::sidebar::ControllerItem maRefEdgeControl
DECL_LINK(MFLeftIndentMdyHdl, weld::MetricSpinButton &, void)
::sfx2::sidebar::ControllerItem maAlignHorControl
std::unique_ptr< weld::ToggleButton > mxRefEdgeStd
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
std::unique_ptr< weld::CheckButton > mxCBXWrapText
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< ToolbarUnoDispatcher > mxWriteDirectionDispatch
std::unique_ptr< weld::Label > mxFtRotate
std::unique_ptr< ToolbarUnoDispatcher > mxHorizontalAlignDispatch
::sfx2::sidebar::ControllerItem maVrtStackControl
std::unique_ptr< weld::CheckButton > mxCBXMergeCell
std::unique_ptr< weld::Toolbar > mxVertAlign
std::unique_ptr< ToolbarUnoDispatcher > mxVertAlignDispatch
std::unique_ptr< weld::Toolbar > mxHorizontalAlign
::sfx2::sidebar::ControllerItem maLeftIndentControl
std::unique_ptr< weld::CheckButton > mxCBStacked
std::unique_ptr< weld::ToggleButton > mxRefEdgeBottom
std::unique_ptr< weld::Toolbar > mxWriteDirection
std::unique_ptr< weld::Label > mxFTLeftIndent
std::unique_ptr< ToolbarUnoDispatcher > mxIndentButtonsDispatch
SfxItemState
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
::sfx2::sidebar::ControllerItem maWrapTextControl
::sfx2::sidebar::ControllerItem maMergeCellControl
std::unique_ptr< weld::MetricSpinButton > mxMFLeftIndent
std::unique_ptr< weld::Toolbar > mxIndentButtons
AlignmentPropertyPanel(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
std::unique_ptr< weld::ToggleButton > mxRefEdgeTop
std::unique_ptr< weld::Widget > mxTextOrientBox
std::unique_ptr< weld::MetricSpinButton > mxMtrAngle
::sfx2::sidebar::ControllerItem maAngleControl