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

Generated by: LCOV version 1.11