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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <o3tl/typed_flags_set.hxx>
21 #include <helper/btndlg.hxx>
22 #include <vcl/toolkit/fixed.hxx>
23 #include <vcl/toolkit/vclmedit.hxx>
25 // Window-Bits for MessageBoxen
26 enum class MessBoxStyle
35 DefaultCancel
= 0x0040,
36 DefaultRetry
= 0x0080,
39 AbortRetryIgnore
= 0x1000,
40 DefaultIgnore
= 0x2000,
44 template <> struct typed_flags
<MessBoxStyle
> : is_typed_flags
<MessBoxStyle
, 0x33ff>
49 class MessBox
: public ButtonDialog
51 VclPtr
<VclMultiLineEdit
> mpVCLMultiLineEdit
;
52 VclPtr
<FixedImage
> mpFixedImage
;
55 MessBoxStyle mnMessBoxStyle
;
59 void ImplInitButtons();
60 void ImplPosControls();
63 MessBox(vcl::Window
* pParent
, MessBoxStyle nMessBoxStyle
, WinBits n
, const OUString
& rTitle
,
65 virtual ~MessBox() override
;
66 virtual void dispose() override
;
68 virtual void StateChanged(StateChangedType nStateChange
) override
;
70 void SetMessText(const OUString
& rText
) { maMessText
= rText
; }
71 const OUString
& GetMessText() const { return maMessText
; }
73 void SetImage(const Image
& rImage
) { maImage
= rImage
; }
75 virtual Size
GetOptimalSize() const override
;
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */