Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef __LICENSEDLG_HXX__
29 : : #define __LICENSEDLG_HXX__
30 : :
31 : : #include <sal/types.h>
32 : : #include <rtl/string.hxx>
33 : : #include <rtl/ustring.hxx>
34 : : #include <rtl/ustrbuf.hxx>
35 : : #include <tools/string.hxx>
36 : : #include <tools/resmgr.hxx>
37 : : #include <vcl/button.hxx>
38 : : #include <vcl/edit.hxx>
39 : : #include <vcl/fixed.hxx>
40 : : #include <vcl/dialog.hxx>
41 : : #include <vcl/scrbar.hxx>
42 : : #include <svtools/svmedit.hxx>
43 : : #include <svl/lstner.hxx>
44 : :
45 : : namespace framework {
46 : :
47 : : class LicenseView : public MultiLineEdit, public SfxListener
48 : : {
49 : : sal_Bool mbEndReached;
50 : : Link maEndReachedHdl;
51 : : Link maScrolledHdl;
52 : :
53 : : public:
54 : : LicenseView( Window* pParent, const ResId& rResId );
55 : : ~LicenseView();
56 : :
57 : : void ScrollDown( ScrollType eScroll );
58 : :
59 : : sal_Bool IsEndReached() const;
60 : 0 : sal_Bool EndReached() const { return mbEndReached; }
61 : : void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; }
62 : :
63 : 0 : void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; }
64 : : const Link& GetAutocompleteHdl() const { return maEndReachedHdl; }
65 : :
66 : 0 : void SetScrolledHdl( const Link& rHdl ) { maScrolledHdl = rHdl; }
67 : : const Link& GetScrolledHdl() const { return maScrolledHdl; }
68 : :
69 : : using MultiLineEdit::Notify;
70 : : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
71 : : };
72 : :
73 : : class LicenseDialog : public ModalDialog
74 : : {
75 : : LicenseView aLicenseML;
76 : : FixedText aInfo1FT;
77 : : FixedText aInfo2FT;
78 : : FixedText aInfo3FT;
79 : : FixedText aInfo2_1FT;
80 : : FixedText aInfo3_1FT;
81 : : FixedLine aFixedLine;
82 : : PushButton aPBPageDown;
83 : : PushButton aPBDecline;
84 : : PushButton aPBAccept;
85 : : FixedImage aArrow;
86 : : String aStrAccept;
87 : : String aStrNotAccept;
88 : : String aOldCancelText;
89 : : sal_Bool bEndReached;
90 : :
91 : : void EnableControls();
92 : :
93 : : DECL_LINK(PageDownHdl, void *);
94 : : DECL_LINK(EndReachedHdl, void *);
95 : : DECL_LINK(ScrolledHdl, void *);
96 : : DECL_LINK(AcceptBtnHdl, void *);
97 : : DECL_LINK(DeclineBtnHdl, void *);
98 : :
99 : : public:
100 : : LicenseDialog(const rtl::OUString& aLicense, ResMgr *pResMgr);
101 : : virtual ~LicenseDialog();
102 : :
103 : : };
104 : : }
105 : : #endif
106 : :
107 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|