LibreOffice Module svx (master) 1
rubydialog.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
20
21#ifndef INCLUDED_SVX_RUBYDIALOG_HXX
22#define INCLUDED_SVX_RUBYDIALOG_HXX
23
24#include <sfx2/childwin.hxx>
25#include <sfx2/basedlgs.hxx>
26#include <vcl/customweld.hxx>
27#include <svx/svxdllapi.h>
28#include <rtl/ref.hxx>
29
30class SvxRubyDialog;
32{
33 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
35
36public:
38 virtual ~RubyPreview() override;
39 void setRubyDialog(SvxRubyDialog* pParentDlg)
40 {
41 m_pParentDlg = pParentDlg;
42 }
43 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
44};
45
47{
48public:
51};
52
54
56{
57 friend class RubyPreview;
58
59
66
67 std::unique_ptr<weld::Entry> m_xLeft1ED;
68 std::unique_ptr<weld::Entry> m_xRight1ED;
69 std::unique_ptr<weld::Entry> m_xLeft2ED;
70 std::unique_ptr<weld::Entry> m_xRight2ED;
71 std::unique_ptr<weld::Entry> m_xLeft3ED;
72 std::unique_ptr<weld::Entry> m_xRight3ED;
73 std::unique_ptr<weld::Entry> m_xLeft4ED;
74 std::unique_ptr<weld::Entry> m_xRight4ED;
75
76 std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
77
78 std::unique_ptr<weld::ComboBox> m_xAdjustLB;
79
80 std::unique_ptr<weld::ComboBox> m_xPositionLB;
81
82 std::unique_ptr<weld::Label> m_xCharStyleFT;
83 std::unique_ptr<weld::ComboBox> m_xCharStyleLB;
84 std::unique_ptr<weld::Button> m_xStylistPB;
85
86 std::unique_ptr<weld::Button> m_xApplyPB;
87 std::unique_ptr<weld::Button> m_xClosePB;
88
89 std::unique_ptr<weld::Container> m_xContentArea;
90 std::unique_ptr<weld::Widget> m_xGrid;
91
92 std::unique_ptr<RubyPreview> m_xPreviewWin;
93 std::unique_ptr<weld::CustomWeld> m_xPreview;
94
95 DECL_LINK(ApplyHdl_Impl, weld::Button&, void);
96 DECL_LINK(CloseHdl_Impl, weld::Button&, void);
97 DECL_LINK(StylistHdl_Impl, weld::Button&, void);
98 DECL_LINK(ScrollHdl_Impl, weld::ScrolledWindow&, void);
99 DECL_LINK(PositionHdl_Impl, weld::ComboBox&, void);
100 DECL_LINK(AdjustHdl_Impl, weld::ComboBox&, void);
101 DECL_LINK(CharStyleHdl_Impl, weld::ComboBox&, void);
102 DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
103 DECL_LINK(EditFocusHdl_Impl, weld::Widget&, void);
104 DECL_LINK(KeyUpDownHdl_Impl, const KeyEvent&, bool);
105 DECL_LINK(KeyUpDownTabHdl_Impl, const KeyEvent&, bool);
106
107 bool EditScrollHdl_Impl(sal_Int32 nParam);
108 bool EditJumpHdl_Impl(sal_Int32 nParam);
109
110 void SetRubyText(sal_Int32 nPos, weld::Entry& rLeft, weld::Entry& rRight);
111 void GetRubyText();
112 void ClearCharStyleList();
113 void AssertOneEntry();
114
115 void Update();
116 virtual void Close() override;
117
119 void SetLastPos(tools::Long nSet) {nLastPos = nSet;}
120
121 bool IsModified() const {return bModified;}
122 void SetModified(bool bSet) {bModified = bSet;}
123
124 void EnableControls(bool bEnable);
125
126 void GetCurrentText(OUString& rBase, OUString& rRuby);
127
128public:
130 virtual ~SvxRubyDialog() override;
131
132 virtual void Activate() override;
133};
134
135#endif // INCLUDED_SVX_RUBYDIALOG_HXX
136
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void setRubyDialog(SvxRubyDialog *pParentDlg)
Definition: rubydialog.hxx:39
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: rubydialog.cxx:835
SvxRubyDialog * m_pParentDlg
Definition: rubydialog.hxx:34
virtual ~RubyPreview() override
Definition: rubydialog.cxx:689
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: rubydialog.cxx:691
SFX_DECL_CHILDWINDOW(SvxRubyChildWindow)
std::unique_ptr< weld::Entry > m_xRight1ED
Definition: rubydialog.hxx:68
std::unique_ptr< weld::Widget > m_xGrid
Definition: rubydialog.hxx:90
tools::Long nCurrentEdit
Definition: rubydialog.hxx:61
std::unique_ptr< weld::Button > m_xStylistPB
Definition: rubydialog.hxx:84
virtual ~SvxRubyDialog() override
Definition: rubydialog.cxx:255
std::unique_ptr< weld::Entry > m_xRight4ED
Definition: rubydialog.hxx:74
std::unique_ptr< weld::Button > m_xClosePB
Definition: rubydialog.hxx:87
rtl::Reference< SvxRubyData_Impl > m_pImpl
Definition: rubydialog.hxx:64
DECL_LINK(ApplyHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Entry > m_xRight3ED
Definition: rubydialog.hxx:72
void EnableControls(bool bEnable)
Definition: rubydialog.cxx:678
std::unique_ptr< weld::Entry > m_xLeft3ED
Definition: rubydialog.hxx:71
virtual void Activate() override
Definition: rubydialog.cxx:273
std::unique_ptr< weld::Entry > m_xLeft2ED
Definition: rubydialog.hxx:69
DECL_LINK(KeyUpDownHdl_Impl, const KeyEvent &, bool)
std::unique_ptr< weld::Entry > m_xLeft1ED
Definition: rubydialog.hxx:67
void GetCurrentText(OUString &rBase, OUString &rRuby)
Definition: rubydialog.cxx:486
bool EditJumpHdl_Impl(sal_Int32 nParam)
Definition: rubydialog.cxx:646
bool IsModified() const
Definition: rubydialog.hxx:121
weld::Entry * aEditArr[8]
Definition: rubydialog.hxx:65
DECL_LINK(PositionHdl_Impl, weld::ComboBox &, void)
void ClearCharStyleList()
Definition: rubydialog.cxx:262
std::unique_ptr< weld::ScrolledWindow > m_xScrolledWindow
Definition: rubydialog.hxx:76
DECL_LINK(EditModifyHdl_Impl, weld::Entry &, void)
bool EditScrollHdl_Impl(sal_Int32 nParam)
Definition: rubydialog.cxx:617
void AssertOneEntry()
Definition: rubydialog.cxx:676
std::unique_ptr< weld::Button > m_xApplyPB
Definition: rubydialog.hxx:86
std::unique_ptr< weld::ComboBox > m_xCharStyleLB
Definition: rubydialog.hxx:83
std::unique_ptr< weld::Container > m_xContentArea
Definition: rubydialog.hxx:89
DECL_LINK(CloseHdl_Impl, weld::Button &, void)
SfxBindings * pBindings
Definition: rubydialog.hxx:63
DECL_LINK(EditFocusHdl_Impl, weld::Widget &, void)
void SetRubyText(sal_Int32 nPos, weld::Entry &rLeft, weld::Entry &rRight)
Definition: rubydialog.cxx:353
DECL_LINK(AdjustHdl_Impl, weld::ComboBox &, void)
DECL_LINK(KeyUpDownTabHdl_Impl, const KeyEvent &, bool)
DECL_LINK(ScrollHdl_Impl, weld::ScrolledWindow &, void)
SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW, weld::Window *pParent)
Definition: rubydialog.cxx:187
std::unique_ptr< weld::Entry > m_xLeft4ED
Definition: rubydialog.hxx:73
DECL_LINK(StylistHdl_Impl, weld::Button &, void)
DECL_LINK(CharStyleHdl_Impl, weld::ComboBox &, void)
std::unique_ptr< weld::CustomWeld > m_xPreview
Definition: rubydialog.hxx:93
virtual void Close() override
Definition: rubydialog.cxx:264
void SetModified(bool bSet)
Definition: rubydialog.hxx:122
std::unique_ptr< weld::ComboBox > m_xPositionLB
Definition: rubydialog.hxx:80
std::unique_ptr< weld::Label > m_xCharStyleFT
Definition: rubydialog.hxx:82
std::unique_ptr< RubyPreview > m_xPreviewWin
Definition: rubydialog.hxx:92
void GetRubyText()
Definition: rubydialog.cxx:381
tools::Long nLastPos
Definition: rubydialog.hxx:60
void SetLastPos(tools::Long nSet)
Definition: rubydialog.hxx:119
tools::Long GetLastPos() const
Definition: rubydialog.hxx:118
std::unique_ptr< weld::Entry > m_xRight2ED
Definition: rubydialog.hxx:70
std::unique_ptr< weld::ComboBox > m_xAdjustLB
Definition: rubydialog.hxx:78
long Long
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28