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_MSGBOX_HXX
21 : #define INCLUDED_VCL_MSGBOX_HXX
22 :
23 : #include <vcl/dllapi.h>
24 : #include <vcl/btndlg.hxx>
25 : #include <vcl/image.hxx>
26 : #include <vcl/bitmap.hxx>
27 :
28 : class VclMultiLineEdit;
29 : class FixedImage;
30 : class CheckBox;
31 :
32 : class VCL_DLLPUBLIC MessBox : public ButtonDialog
33 : {
34 : protected:
35 : VclMultiLineEdit* mpVCLMultiLineEdit;
36 : FixedImage* mpFixedImage;
37 : OUString maMessText;
38 : Image maImage;
39 : bool mbHelpBtn;
40 : CheckBox* mpCheckBox;
41 : OUString maCheckBoxText;
42 : bool mbCheck;
43 :
44 : SAL_DLLPRIVATE void ImplInitMessBoxData();
45 : SAL_DLLPRIVATE void ImplInitButtons();
46 : SAL_DLLPRIVATE void ImplPosControls();
47 :
48 : public:
49 : MessBox( vcl::Window* pParent, WinBits nStyle,
50 : const OUString& rTitle, const OUString& rMessage );
51 : virtual ~MessBox();
52 :
53 : virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
54 :
55 0 : void SetMessText( const OUString& rText ) { maMessText = rText; }
56 0 : const OUString& GetMessText() const { return maMessText; }
57 :
58 0 : void SetImage( const Image& rImage ) { maImage = rImage; }
59 : const Image& GetImage() const { return maImage; }
60 :
61 0 : void SetCheckBoxText( const OUString& rText ) { maCheckBoxText = rText;}
62 : const OUString& GetCheckBoxText() const { return maCheckBoxText;}
63 : void SetCheckBoxState( bool bCheck );
64 : bool GetCheckBoxState() const;
65 :
66 : virtual Size GetOptimalSize() const SAL_OVERRIDE;
67 : };
68 :
69 0 : class VCL_DLLPUBLIC InfoBox : public MessBox
70 : {
71 : private:
72 : SAL_DLLPRIVATE void ImplInitInfoBoxData();
73 :
74 : public:
75 : InfoBox( vcl::Window* pParent, const OUString& rMessage );
76 : InfoBox( vcl::Window* pParent, WinBits nStyle,
77 : const OUString& rMessage );
78 :
79 : static Image GetStandardImage();
80 : };
81 :
82 0 : class VCL_DLLPUBLIC WarningBox : public MessBox
83 : {
84 : private:
85 : SAL_DLLPRIVATE void ImplInitWarningBoxData();
86 :
87 : public:
88 : WarningBox( vcl::Window* pParent, WinBits nStyle,
89 : const OUString& rMessage );
90 :
91 : void SetDefaultCheckBoxText();
92 :
93 : static Image GetStandardImage();
94 : };
95 :
96 0 : class VCL_DLLPUBLIC ErrorBox : public MessBox
97 : {
98 : private:
99 : SAL_DLLPRIVATE void ImplInitErrorBoxData();
100 :
101 : public:
102 : ErrorBox( vcl::Window* pParent, WinBits nStyle,
103 : const OUString& rMessage );
104 :
105 : static Image GetStandardImage();
106 : };
107 :
108 0 : class VCL_DLLPUBLIC QueryBox : public MessBox
109 : {
110 : private:
111 : SAL_DLLPRIVATE void ImplInitQueryBoxData();
112 :
113 : public:
114 : QueryBox( vcl::Window* pParent, WinBits nStyle,
115 : const OUString& rMessage );
116 :
117 : void SetDefaultCheckBoxText();
118 :
119 : static Image GetStandardImage();
120 : };
121 :
122 : #endif // INCLUDED_VCL_MSGBOX_HXX
123 :
124 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|