diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-19 20:42:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-20 09:51:45 +0100 |
commit | 0ee398cf33077ec366a572c76267a3f40bcf08fd (patch) | |
tree | 96dd1e32b9b06e7c2c913f3e39c965b03179bef0 /vcl/inc/messagedialog.hxx | |
parent | 0c69f9c627f6eb25f1df26fb63bc511bbac4667a (diff) |
weld SwSendWarningBox
and then MessageDialog can become a vcl internal
Change-Id: I8bf1f963971420b11f6c4163f624be26603cc942
Reviewed-on: https://gerrit.libreoffice.org/51601
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc/messagedialog.hxx')
-rw-r--r-- | vcl/inc/messagedialog.hxx | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/vcl/inc/messagedialog.hxx b/vcl/inc/messagedialog.hxx new file mode 100644 index 000000000000..09d3a909fece --- /dev/null +++ b/vcl/inc/messagedialog.hxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_VCL_INC_MESSAGEDIALOG_HXX +#define INCLUDED_VCL_INC_MESSAGEDIALOG_HXX + +#include <vcl/dialog.hxx> +#include <vcl/layout.hxx> + +class MessageDialog : public Dialog +{ +private: + VclButtonsType m_eButtonsType; + VclMessageType m_eMessageType; + VclPtr<VclBox> m_pOwnedContentArea; + VclPtr<VclButtonBox> m_pOwnedActionArea; + VclPtr<VclGrid> m_pGrid; + VclPtr<VclVBox> m_pMessageBox; + VclPtr<FixedImage> m_pImage; + VclPtr<VclMultiLineEdit> m_pPrimaryMessage; + VclPtr<VclMultiLineEdit> m_pSecondaryMessage; + OUString m_sPrimaryString; + OUString m_sSecondaryString; + void create_owned_areas(); + + static void SetMessagesWidths(vcl::Window const* pParent, VclMultiLineEdit* pPrimaryMessage, + VclMultiLineEdit* pSecondaryMessage); + + friend class VclPtr<MessageDialog>; + MessageDialog(vcl::Window* pParent, WinBits nStyle); + +public: + MessageDialog(vcl::Window* pParent, const OUString& rMessage, + VclMessageType eMessageType = VclMessageType::Error, + VclButtonsType eButtonsType = VclButtonsType::Ok); + MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription); + virtual bool set_property(const OString& rKey, const OUString& rValue) override; + OUString const& get_primary_text() const; + OUString const& get_secondary_text() const; + void set_primary_text(const OUString& rPrimaryString); + void set_secondary_text(const OUString& rSecondaryString); + virtual ~MessageDialog() override; + virtual void dispose() override; + + void create_message_area(); + VclContainer* get_message_area() const { return m_pMessageBox.get(); } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |