1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: i18n_status.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SAL_I18N_STATUS_HXX
32 #define _SAL_I18N_STATUS_HXX
34 #include <tools/string.hxx>
35 #include <tools/link.hxx>
36 #include <tools/gen.hxx>
38 #ifndef _RTL_USTRING_HXX
39 #include <rtl/ustring.hxx>
41 #include <vcl/salimestatus.hxx>
50 class SalI18N_InputContext
;
57 class X11ImeStatus
: public SalI18NImeStatus
61 virtual ~X11ImeStatus();
63 virtual bool canToggle();
64 virtual void toggle();
77 StatusWindow
* m_pStatusWindow
;
79 ::std::vector
< ChoiceData
> m_aChoices
;
84 static I18NStatus
* pInstance
;
86 static bool getStatusWindowMode();
89 static I18NStatus
& get();
93 void setParent( SalFrame
* pParent
);
94 SalFrame
* getParent() const { return m_pParent
; }
95 SalFrame
* getStatusFrame() const;
97 void setStatusText( const String
& rText
);
98 String
getStatusText() const;
100 enum ShowReason
{ focus
, presentation
, contextmap
};
101 void show( bool bShow
, ShowReason eReason
);
103 const ::std::vector
< ChoiceData
>& getChoices() const { return m_aChoices
; }
105 void addChoice( const String
&, void* pData
);
109 // for SwitchIMCallback
110 void changeIM( const String
& );
114 /** Return true if the status window can be toggled on and off externally.
116 bool canToggleStatusWindow() const;
118 /** Toggle the status window on or off.
120 This only works if canToggleStatusWindow returns true (otherwise, any
121 calls of this method are ignored).
123 void toggleStatusWindow();
128 #endif // _SAL_I18N_STATUS_HXX