LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sfx2 / inc / emojicontrol.hxx
blobb4267fbaf8f6f7bcf85d42ff6130e75f4136828b
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/.
8 */
10 #pragma once
12 #include <sal/config.h>
13 #include <sfx2/dllapi.h>
14 #include <svtools/toolbarmenu.hxx>
15 #include <vcl/customweld.hxx>
17 namespace com::sun::star::frame
19 class XFrame;
22 class EmojiPopup;
23 class EmojiView;
24 class ThumbnailViewItem;
25 enum class FILTER_CATEGORY;
27 class SfxEmojiControl final : public WeldToolbarPopup
30 public:
31 explicit SfxEmojiControl(const EmojiPopup* pControl, weld::Widget* pParent);
32 virtual ~SfxEmojiControl() override;
34 virtual void GrabFocus() override;
36 private:
37 static void ConvertLabelToUnicode(weld::ToggleButton& rBtn);
39 FILTER_CATEGORY getFilter(const weld::Toggleable& rBtn) const;
41 DECL_LINK(ActivatePageHdl, weld::Toggleable&, void);
42 DECL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, void);
44 std::unique_ptr<weld::ToggleButton> mxPeopleBtn;
45 std::unique_ptr<weld::ToggleButton> mxNatureBtn;
46 std::unique_ptr<weld::ToggleButton> mxFoodBtn;
47 std::unique_ptr<weld::ToggleButton> mxActivityBtn;
48 std::unique_ptr<weld::ToggleButton> mxTravelBtn;
49 std::unique_ptr<weld::ToggleButton> mxObjectsBtn;
50 std::unique_ptr<weld::ToggleButton> mxSymbolsBtn;
51 std::unique_ptr<weld::ToggleButton> mxFlagsBtn;
52 std::unique_ptr<weld::ToggleButton> mxUnicode9Btn;
53 std::unique_ptr<EmojiView> mxEmojiView;
54 std::unique_ptr<weld::CustomWeld> mxEmojiWeld;
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */