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/.
10 #ifndef INCLUDED_VCL_INC_MESSAGEDIALOG_HXX
11 #define INCLUDED_VCL_INC_MESSAGEDIALOG_HXX
13 #include <vcl/toolkit/dialog.hxx>
14 #include <vcl/toolkit/vclmedit.hxx>
15 #include <vcl/layout.hxx>
16 #include <vcl/toolkit/fixed.hxx>
18 class MessageDialog
: public Dialog
21 VclButtonsType m_eButtonsType
;
22 VclMessageType m_eMessageType
;
23 VclPtr
<VclBox
> m_pOwnedContentArea
;
24 VclPtr
<VclButtonBox
> m_pOwnedActionArea
;
25 VclPtr
<VclGrid
> m_pGrid
;
26 VclPtr
<VclVBox
> m_pMessageBox
;
27 VclPtr
<FixedImage
> m_pImage
;
28 VclPtr
<VclMultiLineEdit
> m_pPrimaryMessage
;
29 VclPtr
<VclMultiLineEdit
> m_pSecondaryMessage
;
30 OUString m_sPrimaryString
;
31 OUString m_sSecondaryString
;
32 void create_owned_areas();
34 static void SetMessagesWidths(vcl::Window
const* pParent
, VclMultiLineEdit
* pPrimaryMessage
,
35 VclMultiLineEdit
* pSecondaryMessage
);
37 friend class VclPtr
<MessageDialog
>;
38 MessageDialog(vcl::Window
* pParent
, WinBits nStyle
);
40 virtual void StateChanged(StateChangedType nType
) override
;
43 MessageDialog(vcl::Window
* pParent
, const OUString
& rMessage
, VclMessageType eMessageType
,
44 VclButtonsType eButtonsType
);
45 virtual bool set_property(const OString
& rKey
, const OUString
& rValue
) override
;
46 OUString
const& get_primary_text() const;
47 OUString
const& get_secondary_text() const;
48 void set_primary_text(const OUString
& rPrimaryString
);
49 void set_secondary_text(const OUString
& rSecondaryString
);
50 virtual ~MessageDialog() override
;
51 virtual void dispose() override
;
53 void create_message_area();
54 VclContainer
* get_message_area() const { return m_pMessageBox
.get(); }
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */