Bump version to 6.4-15
[LibreOffice.git] / include / svx / fntctrl.hxx
blobc84289ac90179aa9baef658cf71f910d7f996d4a
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_FNTCTRL_HXX
20 #define INCLUDED_SVX_FNTCTRL_HXX
22 #include <memory>
23 #include <editeng/svxfont.hxx>
24 #include <rtl/ustring.hxx>
25 #include <svx/svxdllapi.h>
26 #include <vcl/customweld.hxx>
28 class SfxItemSet;
29 class FontPrevWin_Impl;
31 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontPrevWindow final : public weld::CustomWidgetController
33 private:
34 std::unique_ptr<FontPrevWin_Impl> pImpl;
36 SVX_DLLPRIVATE static void ApplySettings(vcl::RenderContext& rRenderContext);
37 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
38 SVX_DLLPRIVATE static void SetFontSize(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
39 SVX_DLLPRIVATE static void SetFontLang(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
41 public:
42 SvxFontPrevWindow();
43 virtual ~SvxFontPrevWindow() override;
45 SvxFont& GetFont();
46 const SvxFont& GetFont() const;
47 void SetFont( const SvxFont& rNormalFont, const SvxFont& rCJKFont, const SvxFont& rCTLFont );
48 SvxFont& GetCJKFont();
49 SvxFont& GetCTLFont();
50 void SetColor( const Color& rColor );
51 void ResetColor();
52 void SetBackColor( const Color& rColor );
53 void SetTextLineColor(const Color& rColor);
54 void SetOverlineColor(const Color& rColor);
55 void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override;
57 bool IsTwoLines() const;
58 void SetTwoLines(bool bSet);
60 void SetBrackets(sal_Unicode cStart, sal_Unicode cEnd);
62 void SetFontWidthScale( sal_uInt16 nScaleInPercent );
64 void AutoCorrectFontColor();
66 void SetPreviewText( const OUString& rString );
67 void SetFontNameAsPreviewText();
69 void SetFromItemSet( const SfxItemSet &rSet,
70 bool bPreviewBackgroundToCharacter );
73 #endif // INCLUDED_SVX_FNTCTRL_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */