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/dialog.hxx>
14 #include <vcl/layout.hxx>
15 #include <vcl/fixed.hxx>
16 
17 class MessageDialog : public Dialog
18 {
19 private:
29  OUString m_sPrimaryString;
31  void create_owned_areas();
32 
33  static void SetMessagesWidths(vcl::Window const* pParent, VclMultiLineEdit* pPrimaryMessage,
34  VclMultiLineEdit* pSecondaryMessage);
35 
36  friend class VclPtr<MessageDialog>;
37  MessageDialog(vcl::Window* pParent, WinBits nStyle);
38 
39  virtual void StateChanged(StateChangedType nType) override;
40 
41 public:
42  MessageDialog(vcl::Window* pParent, const OUString& rMessage, VclMessageType eMessageType,
43  VclButtonsType eButtonsType);
44  virtual bool set_property(const OString& rKey, const OUString& rValue) override;
45  OUString const& get_primary_text() const;
46  OUString const& get_secondary_text() const;
47  void set_primary_text(const OUString& rPrimaryString);
48  void set_secondary_text(const OUString& rSecondaryString);
49  virtual ~MessageDialog() override;
50  virtual void dispose() override;
51 
52  void create_message_area();
53  VclContainer* get_message_area() const { return m_pMessageBox.get(); }
54 };
55 
56 #endif
57 
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool set_property(const OString &rKey, const OUString &rValue) override
Definition: layout.cxx:2262
OUString const & get_secondary_text() const
Definition: layout.cxx:2255
static void SetMessagesWidths(vcl::Window const *pParent, VclMultiLineEdit *pPrimaryMessage, VclMultiLineEdit *pSecondaryMessage)
Definition: layout.cxx:2231
VclButtonsType
Definition: vclenum.hxx:243
void create_message_area()
Definition: layout.cxx:2022
virtual void StateChanged(StateChangedType nType) override
Definition: layout.cxx:2333
OUString const & get_primary_text() const
Definition: layout.cxx:2248
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:2148
StateChangedType
Definition: window.hxx:311
sal_Int64 WinBits
VclMessageType m_eMessageType
VclMessageType
Definition: vclenum.hxx:253
VclPtr< VclButtonBox > m_pOwnedActionArea
VclPtr< FixedImage > m_pImage
VclPtr< VclGrid > m_pGrid
virtual ~MessageDialog() override
Definition: layout.cxx:2226
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: layout.cxx:2213
VclPtr< VclMultiLineEdit > m_pPrimaryMessage
MessageDialog(vcl::Window *pParent, WinBits nStyle)
Definition: layout.cxx:2163
void set_secondary_text(const OUString &rSecondaryString)
Definition: layout.cxx:2322
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
OUString m_sPrimaryString
void set_primary_text(const OUString &rPrimaryString)
Definition: layout.cxx:2311
OUString m_sSecondaryString