Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / inc / unx / i18n_status.hxx
blobf8cc4614c811709d64c631fb482e0c24ddf997f2
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 .
20 #ifndef INCLUDED_VCL_INC_UNX_I18N_STATUS_HXX
21 #define INCLUDED_VCL_INC_UNX_I18N_STATUS_HXX
23 #include <rtl/ustring.hxx>
24 #include <salimestatus.hxx>
25 #include <vcl/vclptr.hxx>
27 #include <vector>
29 class SalFrame;
30 class WorkWindow;
31 class ListBox;
32 class FixedText;
33 class PushButton;
34 class SalI18N_InputContext;
36 namespace vcl
39 class StatusWindow;
41 class X11ImeStatus : public SalI18NImeStatus
43 public:
44 X11ImeStatus() {}
45 virtual ~X11ImeStatus() override;
47 virtual bool canToggle() override;
48 virtual void toggle() override;
51 class I18NStatus
53 public:
54 struct ChoiceData
56 OUString aString;
57 void* pData;
59 private:
60 SalFrame* m_pParent;
61 VclPtr<StatusWindow> m_pStatusWindow;
62 OUString m_aCurrentIM;
63 ::std::vector< ChoiceData > m_aChoices;
65 I18NStatus();
66 ~I18NStatus();
68 static bool getStatusWindowMode();
70 public:
71 static I18NStatus& get();
72 static bool exists();
73 static void free();
75 void setParent( SalFrame* pParent );
76 SalFrame* getParent() const { return m_pParent; }
77 SalFrame* getStatusFrame() const;
79 void setStatusText( const OUString& rText );
81 enum ShowReason { focus, presentation, contextmap };
82 void show( bool bShow, ShowReason eReason );
84 const ::std::vector< ChoiceData >& getChoices() const { return m_aChoices; }
86 // External Control:
88 /** Toggle the status window on or off.
90 This only works if canToggleStatusWindow returns true (otherwise, any
91 calls of this method are ignored).
93 void toggleStatusWindow();
96 } // namespace
98 #endif // INCLUDED_VCL_INC_UNX_I18N_STATUS_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */