LibreOffice Module vcl (master)  1
messagedialog.hxx
Go to the documentation of this file.
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 
10 #ifndef INCLUDED_VCL_INC_MESSAGEDIALOG_HXX
11 #define INCLUDED_VCL_INC_MESSAGEDIALOG_HXX
12 
13 #include <vcl/toolkit/dialog.hxx>
14 #include <vcl/toolkit/vclmedit.hxx>
15 #include <vcl/layout.hxx>
16 #include <vcl/toolkit/fixed.hxx>
17 
18 class MessageDialog final : public Dialog
19 {
20 private:
30  OUString m_sPrimaryString;
32  void create_owned_areas();
33 
34  static void SetMessagesWidths(vcl::Window const* pParent, VclMultiLineEdit* pPrimaryMessage,
35  VclMultiLineEdit* pSecondaryMessage);
36 
37  friend class VclPtr<MessageDialog>;
38  MessageDialog(vcl::Window* pParent, WinBits nStyle);
39 
40  virtual void StateChanged(StateChangedType nType) override;
41 
42 public:
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;
52 
53  void create_message_area();
54  VclContainer* get_message_area() const { return m_pMessageBox.get(); }
55 };
56 
57 #endif
58 
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool set_property(const OString &rKey, const OUString &rValue) override
Definition: layout.cxx:2499
OUString const & get_secondary_text() const
Definition: layout.cxx:2492
static void SetMessagesWidths(vcl::Window const *pParent, VclMultiLineEdit *pPrimaryMessage, VclMultiLineEdit *pSecondaryMessage)
Definition: layout.cxx:2468
VclButtonsType
Definition: vclenum.hxx:242
void create_message_area()
Definition: layout.cxx:2254
virtual void StateChanged(StateChangedType nType) override
Definition: layout.cxx:2572
OUString const & get_primary_text() const
Definition: layout.cxx:2485
VclPtr< VclMultiLineEdit > m_pSecondaryMessage
VclPtr< VclVBox > m_pMessageBox
VclButtonsType m_eButtonsType
VclContainer * get_message_area() const
VclPtr< VclBox > m_pOwnedContentArea
void create_owned_areas()
Definition: layout.cxx:2382
StateChangedType
Definition: window.hxx:289
sal_Int64 WinBits
VclMessageType m_eMessageType
VclMessageType
Definition: vclenum.hxx:252
VclPtr< VclButtonBox > m_pOwnedActionArea
VclPtr< FixedImage > m_pImage
VclPtr< VclGrid > m_pGrid
virtual ~MessageDialog() override
Definition: layout.cxx:2463
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: layout.cxx:2450
VclPtr< VclMultiLineEdit > m_pPrimaryMessage
MessageDialog(vcl::Window *pParent, WinBits nStyle)
Definition: layout.cxx:2397
void set_secondary_text(const OUString &rSecondaryString)
Definition: layout.cxx:2561
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
OUString m_sPrimaryString
void set_primary_text(const OUString &rPrimaryString)
Definition: layout.cxx:2550
OUString m_sSecondaryString