1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_MSGBOX_HXX
21 #define INCLUDED_VCL_MSGBOX_HXX
23 #include <vcl/dllapi.h>
24 #include <vcl/btndlg.hxx>
25 #include <vcl/image.hxx>
26 #include <vcl/bitmap.hxx>
28 class VclMultiLineEdit
;
32 class VCL_DLLPUBLIC MessBox
: public ButtonDialog
35 VclPtr
<VclMultiLineEdit
> mpVCLMultiLineEdit
;
36 VclPtr
<FixedImage
> mpFixedImage
;
40 VclPtr
<CheckBox
> mpCheckBox
;
41 OUString maCheckBoxText
;
44 SAL_DLLPRIVATE
void ImplInitMessBoxData();
45 SAL_DLLPRIVATE
void ImplInitButtons();
46 SAL_DLLPRIVATE
void ImplPosControls();
49 MessBox( vcl::Window
* pParent
, WinBits nStyle
,
50 const OUString
& rTitle
, const OUString
& rMessage
);
52 virtual void dispose() SAL_OVERRIDE
;
54 virtual void StateChanged( StateChangedType nStateChange
) SAL_OVERRIDE
;
56 void SetMessText( const OUString
& rText
) { maMessText
= rText
; }
57 const OUString
& GetMessText() const { return maMessText
; }
59 void SetImage( const Image
& rImage
) { maImage
= rImage
; }
60 const Image
& GetImage() const { return maImage
; }
62 void SetCheckBoxText( const OUString
& rText
) { maCheckBoxText
= rText
;}
63 const OUString
& GetCheckBoxText() const { return maCheckBoxText
;}
64 void SetCheckBoxState( bool bCheck
);
65 bool GetCheckBoxState() const;
67 virtual Size
GetOptimalSize() const SAL_OVERRIDE
;
70 class VCL_DLLPUBLIC InfoBox
: public MessBox
73 SAL_DLLPRIVATE
void ImplInitInfoBoxData();
76 InfoBox( vcl::Window
* pParent
, const OUString
& rMessage
);
77 InfoBox( vcl::Window
* pParent
, WinBits nStyle
,
78 const OUString
& rMessage
);
80 static Image
GetStandardImage();
83 class VCL_DLLPUBLIC WarningBox
: public MessBox
86 SAL_DLLPRIVATE
void ImplInitWarningBoxData();
89 WarningBox( vcl::Window
* pParent
, WinBits nStyle
,
90 const OUString
& rMessage
);
92 void SetDefaultCheckBoxText();
94 static Image
GetStandardImage();
97 class VCL_DLLPUBLIC ErrorBox
: public MessBox
100 SAL_DLLPRIVATE
void ImplInitErrorBoxData();
103 ErrorBox( vcl::Window
* pParent
, WinBits nStyle
,
104 const OUString
& rMessage
);
106 static Image
GetStandardImage();
109 class VCL_DLLPUBLIC QueryBox
: public MessBox
112 SAL_DLLPRIVATE
void ImplInitQueryBoxData();
115 QueryBox( vcl::Window
* pParent
, WinBits nStyle
,
116 const OUString
& rMessage
);
118 void SetDefaultCheckBoxText();
120 static Image
GetStandardImage();
123 #endif // INCLUDED_VCL_MSGBOX_HXX
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */