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

Generated by: LCOV version 1.10