LCOV - code coverage report
Current view: top level - libreoffice/vcl/inc/unx - i18n_status.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 4 0.0 %
Date: 2012-12-27 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef _SAL_I18N_STATUS_HXX
      21             : #define _SAL_I18N_STATUS_HXX
      22             : 
      23             : #include <tools/string.hxx>
      24             : #include <tools/gen.hxx>
      25             : 
      26             : #include <rtl/ustring.hxx>
      27             : #include <salimestatus.hxx>
      28             : 
      29             : #include <vector>
      30             : 
      31             : class SalFrame;
      32             : class WorkWindow;
      33             : class ListBox;
      34             : class FixedText;
      35             : class PushButton;
      36             : class SalI18N_InputContext;
      37             : 
      38             : namespace vcl
      39             : {
      40             : 
      41             : class StatusWindow;
      42             : 
      43             : class X11ImeStatus : public SalI18NImeStatus
      44             : {
      45             : public:
      46           0 :     X11ImeStatus() {}
      47             :     virtual ~X11ImeStatus();
      48             : 
      49             :     virtual bool canToggle();
      50             :     virtual void toggle();
      51             : };
      52             : 
      53             : class I18NStatus
      54             : {
      55             : public:
      56           0 :     struct ChoiceData
      57             :     {
      58             :         String  aString;
      59             :         void*   pData;
      60             :     };
      61             : private:
      62             :     SalFrame*                       m_pParent;
      63             :     StatusWindow*                   m_pStatusWindow;
      64             :     String                          m_aCurrentIM;
      65             :     ::std::vector< ChoiceData >     m_aChoices;
      66             : 
      67             :     I18NStatus();
      68             :     ~I18NStatus();
      69             : 
      70             :     static I18NStatus* pInstance;
      71             : 
      72             :     static bool getStatusWindowMode();
      73             : 
      74             : public:
      75             :     static I18NStatus& get();
      76             :     static bool exists();
      77             :     static void free();
      78             : 
      79             :     void setParent( SalFrame* pParent );
      80           0 :     SalFrame* getParent() const { return  m_pParent; }
      81             :     SalFrame* getStatusFrame() const;
      82             : 
      83             :     void setStatusText( const String& rText );
      84             : 
      85             :     enum ShowReason { focus, presentation, contextmap };
      86             :     void show( bool bShow, ShowReason eReason );
      87             : 
      88           0 :     const ::std::vector< ChoiceData >& getChoices() const { return m_aChoices; }
      89             : 
      90             :     // for SwitchIMCallback
      91             :     void changeIM( const String& );
      92             : 
      93             :     // External Control:
      94             : 
      95             :     /** Return true if the status window can be toggled on and off externally.
      96             :      */
      97             :     bool canToggleStatusWindow() const;
      98             : 
      99             :     /** Toggle the status window on or off.
     100             : 
     101             :         This only works if canToggleStatusWindow returns true (otherwise, any
     102             :         calls of this method are ignored).
     103             :      */
     104             :     void toggleStatusWindow();
     105             : };
     106             : 
     107             : } // namespace
     108             : 
     109             : #endif // _SAL_I18N_STATUS_HXX
     110             : 
     111             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10