lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / sfx2 / emojiview.hxx
blob8a08e1d8c75dd42a5a4f435264a3d924bee28a61
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 #ifndef INCLUDED_SFX2_SOURCE_INC_EMOJIVIEW_HXX
11 #define INCLUDED_SFX2_SOURCE_INC_EMOJIVIEW_HXX
13 #include <sfx2/thumbnailview.hxx>
15 //unicode item defines
16 #define ITEM_MAX_WIDTH 30
17 #define ITEM_MAX_HEIGHT 30
18 #define ITEM_PADDING 5
19 #define ITEM_MAX_TEXT_LENGTH 10
21 enum class FILTER_CATEGORY
23 PEOPLE,
24 NATURE,
25 FOOD,
26 ACTIVITY,
27 TRAVEL,
28 OBJECTS,
29 SYMBOLS,
30 FLAGS,
31 UNICODE9
34 // Display unicode emojis depending on the category
35 class ViewFilter_Category final
37 public:
39 ViewFilter_Category (FILTER_CATEGORY rCategory)
40 : mCategory(rCategory)
43 bool operator () (const ThumbnailViewItem *pItem);
45 static bool isFilteredCategory(FILTER_CATEGORY filter, const OUString &rCategory);
47 private:
49 FILTER_CATEGORY const mCategory;
53 class EmojiView final : public ThumbnailView
55 public:
56 EmojiView ( vcl::Window* pParent);
58 virtual ~EmojiView () override;
60 // Fill view with emojis
61 void Populate ();
63 void setInsertEmojiHdl (const Link<ThumbnailViewItem*, void> &rLink);
65 void AppendItem(const OUString &rTitle, const OUString &rCategory, const OUString &rName );
67 private:
68 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
70 virtual void KeyInput( const KeyEvent& rKEvt ) override;
72 virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
74 std::string msJSONData;
76 Link<ThumbnailViewItem*, void> maInsertEmojiHdl;
79 #endif // INCLUDED_SFX2_SOURCE_INC_EMOJIVIEW_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */