LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/vcl - msgbox.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 8 0.0 %
Date: 2012-08-25 Functions: 0 12 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 8 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _SV_MSGBOX_HXX
      30                 :            : #define _SV_MSGBOX_HXX
      31                 :            : 
      32                 :            : #include <tools/solar.h>
      33                 :            : #include <vcl/dllapi.h>
      34                 :            : #include <vcl/btndlg.hxx>
      35                 :            : #include <vcl/image.hxx>
      36                 :            : #include <vcl/bitmap.hxx>
      37                 :            : class VCLMultiLineEdit;
      38                 :            : class FixedImage;
      39                 :            : class CheckBox;
      40                 :            : 
      41                 :            : // -----------------
      42                 :            : // - MessBox-Types -
      43                 :            : // -----------------
      44                 :            : 
      45                 :            : // Return-Werte von Execute
      46                 :            : //!!! bei Aenderungen \basic\source\runtime\methods.cxx msgbox anpassen
      47                 :            : 
      48                 :            : #define RET_OK               sal_True
      49                 :            : #define RET_CANCEL           sal_False
      50                 :            : #define RET_YES              2
      51                 :            : #define RET_NO               3
      52                 :            : #define RET_RETRY            4
      53                 :            : #define RET_IGNORE           5
      54                 :            : 
      55                 :            : #define BUTTONID_OK          RET_OK
      56                 :            : #define BUTTONID_CANCEL      RET_CANCEL
      57                 :            : #define BUTTONID_YES         RET_YES
      58                 :            : #define BUTTONID_NO          RET_NO
      59                 :            : #define BUTTONID_RETRY       RET_RETRY
      60                 :            : #define BUTTONID_IGNORE      RET_IGNORE
      61                 :            : #define BUTTONID_HELP        10
      62                 :            : 
      63                 :            : // -----------
      64                 :            : // - MessBox -
      65                 :            : // -----------
      66                 :            : 
      67                 :            : class VCL_DLLPUBLIC MessBox : public ButtonDialog
      68                 :            : {
      69                 :            : protected:
      70                 :            :     VCLMultiLineEdit*   mpVCLMultiLineEdit;
      71                 :            :     FixedImage*         mpFixedImage;
      72                 :            :     XubString           maMessText;
      73                 :            :     Image               maImage;
      74                 :            :     sal_Bool                mbHelpBtn;
      75                 :            :     CheckBox*           mpCheckBox;
      76                 :            :     XubString           maCheckBoxText;
      77                 :            :     sal_Bool                mbCheck;
      78                 :            : 
      79                 :            :     SAL_DLLPRIVATE void ImplInitMessBoxData();
      80                 :            :     SAL_DLLPRIVATE void ImplInitButtons();
      81                 :            :     SAL_DLLPRIVATE void ImplPosControls();
      82                 :            : 
      83                 :            : protected:
      84                 :            :     SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
      85                 :            : 
      86                 :            : public:
      87                 :            :                         MessBox( Window* pParent, WinBits nStyle,
      88                 :            :                                  const XubString& rTitle, const XubString& rMessage );
      89                 :            :                         MessBox( Window* pParent, const ResId& rResId );
      90                 :            :                         ~MessBox();
      91                 :            : 
      92                 :            :     virtual void        StateChanged( StateChangedType nStateChange );
      93                 :            : 
      94                 :          0 :     void                SetMessText( const XubString& rText ) { maMessText = rText; }
      95                 :          0 :     const XubString&    GetMessText() const { return maMessText; }
      96                 :            : 
      97                 :          0 :     void                SetImage( const Image& rImage ) { maImage = rImage; }
      98                 :            :     const Image&        GetImage() const { return maImage; }
      99                 :            : 
     100                 :          0 :     void                SetCheckBoxText( const XubString& rText ) { maCheckBoxText = rText;}
     101                 :            :     const XubString&    GetCheckBoxText() const { return maCheckBoxText;}
     102                 :            :     void                SetCheckBoxState( sal_Bool bCheck );
     103                 :            :     sal_Bool                GetCheckBoxState() const;
     104                 :            : 
     105                 :            :     virtual Size        GetOptimalSize(WindowSizeType eType) const;
     106                 :            : };
     107                 :            : 
     108                 :            : // -----------
     109                 :            : // - InfoBox -
     110                 :            : // -----------
     111                 :            : 
     112         [ #  # ]:          0 : class VCL_DLLPUBLIC InfoBox : public MessBox
     113                 :            : {
     114                 :            : private:
     115                 :            :     SAL_DLLPRIVATE void ImplInitInfoBoxData();
     116                 :            : 
     117                 :            : public:
     118                 :            :                         InfoBox( Window* pParent, const XubString& rMessage );
     119                 :            :                         InfoBox( Window* pParent, const ResId & rResId );
     120                 :            : 
     121                 :            :     static Image        GetStandardImage();
     122                 :            : };
     123                 :            : 
     124                 :            : // --------------
     125                 :            : // - WarningBox -
     126                 :            : // --------------
     127                 :            : 
     128         [ #  # ]:          0 : class VCL_DLLPUBLIC WarningBox : public MessBox
     129                 :            : {
     130                 :            : private:
     131                 :            :     SAL_DLLPRIVATE void ImplInitWarningBoxData();
     132                 :            : 
     133                 :            : public:
     134                 :            :                         WarningBox( Window* pParent, WinBits nStyle,
     135                 :            :                                     const XubString& rMessage );
     136                 :            :                         WarningBox( Window* pParent, const ResId& rResId );
     137                 :            : 
     138                 :            :     void                SetDefaultCheckBoxText();
     139                 :            : 
     140                 :            :     static Image        GetStandardImage();
     141                 :            : };
     142                 :            : 
     143                 :            : // ------------
     144                 :            : // - ErrorBox -
     145                 :            : // ------------
     146                 :            : 
     147         [ #  # ]:          0 : class VCL_DLLPUBLIC ErrorBox : public MessBox
     148                 :            : {
     149                 :            : private:
     150                 :            :     SAL_DLLPRIVATE void ImplInitErrorBoxData();
     151                 :            : 
     152                 :            : public:
     153                 :            :                         ErrorBox( Window* pParent, WinBits nStyle,
     154                 :            :                                   const XubString& rMessage );
     155                 :            :                         ErrorBox( Window* pParent, const ResId& rResId );
     156                 :            : 
     157                 :            :     static Image        GetStandardImage();
     158                 :            : };
     159                 :            : 
     160                 :            : // ------------
     161                 :            : // - QueryBox -
     162                 :            : // ------------
     163                 :            : 
     164         [ #  # ]:          0 : class VCL_DLLPUBLIC QueryBox : public MessBox
     165                 :            : {
     166                 :            : private:
     167                 :            :     SAL_DLLPRIVATE void ImplInitQueryBoxData();
     168                 :            : 
     169                 :            : public:
     170                 :            :                         QueryBox( Window* pParent, WinBits nStyle,
     171                 :            :                                   const XubString& rMessage );
     172                 :            :                         QueryBox( Window* pParent, const ResId& rResId );
     173                 :            : 
     174                 :            :     void                SetDefaultCheckBoxText();
     175                 :            : 
     176                 :            :     static Image        GetStandardImage();
     177                 :            : };
     178                 :            : 
     179                 :            : #endif  // _SV_MSGBOX_HXX
     180                 :            : 
     181                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10