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 10 #pragma once 11 12 #include <sal/config.h> 13 #include <sfx2/dllapi.h> 14 #include <svtools/toolbarmenu.hxx> 15 #include <vcl/customweld.hxx> 16 17 namespace com::sun::star::frame 18 { 19 class XFrame; 20 } 21 22 class EmojiPopup; 23 class EmojiView; 24 class ThumbnailViewItem; 25 enum class FILTER_CATEGORY; 26 27 class SfxEmojiControl final : public WeldToolbarPopup 28 29 { 30 public: 31 explicit SfxEmojiControl(const EmojiPopup* pControl, weld::Widget* pParent); 32 virtual ~SfxEmojiControl() override; 33 34 virtual void GrabFocus() override; 35 36 private: 37 static void ConvertLabelToUnicode(weld::ToggleButton& rBtn); 38 39 FILTER_CATEGORY getFilter(const weld::Toggleable& rBtn) const; 40 41 DECL_LINK(ActivatePageHdl, weld::Toggleable&, void); 42 DECL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, void); 43 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; 55 }; 56 57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 58