LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/vcl - msgbox.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 8 0.0 %
Date: 2012-12-27 Functions: 0 12 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 _SV_MSGBOX_HXX
      21             : #define _SV_MSGBOX_HXX
      22             : 
      23             : #include <tools/solar.h>
      24             : #include <vcl/dllapi.h>
      25             : #include <vcl/btndlg.hxx>
      26             : #include <vcl/image.hxx>
      27             : #include <vcl/bitmap.hxx>
      28             : class VclMultiLineEdit;
      29             : class FixedImage;
      30             : class CheckBox;
      31             : 
      32             : // -----------------
      33             : // - MessBox-Types -
      34             : // -----------------
      35             : 
      36             : // Return-Werte von Execute
      37             : //!!! bei Aenderungen \basic\source\runtime\methods.cxx msgbox anpassen
      38             : 
      39             : #define RET_CANCEL           0
      40             : #define RET_OK               1
      41             : #define RET_YES              2
      42             : #define RET_NO               3
      43             : #define RET_RETRY            4
      44             : #define RET_IGNORE           5
      45             : 
      46             : #define BUTTONID_OK          RET_OK
      47             : #define BUTTONID_CANCEL      RET_CANCEL
      48             : #define BUTTONID_YES         RET_YES
      49             : #define BUTTONID_NO          RET_NO
      50             : #define BUTTONID_RETRY       RET_RETRY
      51             : #define BUTTONID_IGNORE      RET_IGNORE
      52             : #define BUTTONID_HELP        10
      53             : 
      54             : // -----------
      55             : // - MessBox -
      56             : // -----------
      57             : 
      58             : class VCL_DLLPUBLIC MessBox : public ButtonDialog
      59             : {
      60             : protected:
      61             :     VclMultiLineEdit*   mpVCLMultiLineEdit;
      62             :     FixedImage*         mpFixedImage;
      63             :     XubString           maMessText;
      64             :     Image               maImage;
      65             :     sal_Bool                mbHelpBtn;
      66             :     CheckBox*           mpCheckBox;
      67             :     XubString           maCheckBoxText;
      68             :     sal_Bool                mbCheck;
      69             : 
      70             :     SAL_DLLPRIVATE void ImplInitMessBoxData();
      71             :     SAL_DLLPRIVATE void ImplInitButtons();
      72             :     SAL_DLLPRIVATE void ImplPosControls();
      73             : 
      74             : protected:
      75             :     SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
      76             : 
      77             : public:
      78             :                         MessBox( Window* pParent, WinBits nStyle,
      79             :                                  const XubString& rTitle, const XubString& rMessage );
      80             :                         MessBox( Window* pParent, const ResId& rResId );
      81             :                         ~MessBox();
      82             : 
      83             :     virtual void        StateChanged( StateChangedType nStateChange );
      84             : 
      85           0 :     void                SetMessText( const XubString& rText ) { maMessText = rText; }
      86           0 :     const XubString&    GetMessText() const { return maMessText; }
      87             : 
      88           0 :     void                SetImage( const Image& rImage ) { maImage = rImage; }
      89             :     const Image&        GetImage() const { return maImage; }
      90             : 
      91           0 :     void                SetCheckBoxText( const XubString& rText ) { maCheckBoxText = rText;}
      92             :     const XubString&    GetCheckBoxText() const { return maCheckBoxText;}
      93             :     void                SetCheckBoxState( sal_Bool bCheck );
      94             :     sal_Bool                GetCheckBoxState() const;
      95             : 
      96             :     virtual Size        GetOptimalSize(WindowSizeType eType) const;
      97             : };
      98             : 
      99             : // -----------
     100             : // - InfoBox -
     101             : // -----------
     102             : 
     103           0 : class VCL_DLLPUBLIC InfoBox : public MessBox
     104             : {
     105             : private:
     106             :     SAL_DLLPRIVATE void ImplInitInfoBoxData();
     107             : 
     108             : public:
     109             :                         InfoBox( Window* pParent, const XubString& rMessage );
     110             :                         InfoBox( Window* pParent, const ResId & rResId );
     111             : 
     112             :     static Image        GetStandardImage();
     113             : };
     114             : 
     115             : // --------------
     116             : // - WarningBox -
     117             : // --------------
     118             : 
     119           0 : class VCL_DLLPUBLIC WarningBox : public MessBox
     120             : {
     121             : private:
     122             :     SAL_DLLPRIVATE void ImplInitWarningBoxData();
     123             : 
     124             : public:
     125             :                         WarningBox( Window* pParent, WinBits nStyle,
     126             :                                     const XubString& rMessage );
     127             :                         WarningBox( Window* pParent, const ResId& rResId );
     128             : 
     129             :     void                SetDefaultCheckBoxText();
     130             : 
     131             :     static Image        GetStandardImage();
     132             : };
     133             : 
     134             : // ------------
     135             : // - ErrorBox -
     136             : // ------------
     137             : 
     138           0 : class VCL_DLLPUBLIC ErrorBox : public MessBox
     139             : {
     140             : private:
     141             :     SAL_DLLPRIVATE void ImplInitErrorBoxData();
     142             : 
     143             : public:
     144             :                         ErrorBox( Window* pParent, WinBits nStyle,
     145             :                                   const XubString& rMessage );
     146             :                         ErrorBox( Window* pParent, const ResId& rResId );
     147             : 
     148             :     static Image        GetStandardImage();
     149             : };
     150             : 
     151             : // ------------
     152             : // - QueryBox -
     153             : // ------------
     154             : 
     155           0 : class VCL_DLLPUBLIC QueryBox : public MessBox
     156             : {
     157             : private:
     158             :     SAL_DLLPRIVATE void ImplInitQueryBoxData();
     159             : 
     160             : public:
     161             :                         QueryBox( Window* pParent, WinBits nStyle,
     162             :                                   const XubString& rMessage );
     163             :                         QueryBox( Window* pParent, const ResId& rResId );
     164             : 
     165             :     void                SetDefaultCheckBoxText();
     166             : 
     167             :     static Image        GetStandardImage();
     168             : };
     169             : 
     170             : #endif  // _SV_MSGBOX_HXX
     171             : 
     172             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10