update dev300-m58
[ooovba.git] / framework / inc / services / licensedlg.hxx
blob7731455a50aa6dacbce9acee4bbf150362de230e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: licensedlg.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __LICENSEDLG_HXX__
31 #define __LICENSEDLG_HXX__
33 #include <sal/types.h>
34 #include <rtl/string.hxx>
35 #include <rtl/ustring.hxx>
36 #include <rtl/ustrbuf.hxx>
37 #include <tools/string.hxx>
38 #include <tools/resmgr.hxx>
39 #include <vcl/button.hxx>
40 #include <vcl/edit.hxx>
41 #include <vcl/fixed.hxx>
42 #include <vcl/dialog.hxx>
43 #include <vcl/scrbar.hxx>
44 #include <svtools/svmedit.hxx>
45 #include <svtools/lstner.hxx>
47 namespace framework {
49 class LicenseView : public MultiLineEdit, public SfxListener
51 BOOL mbEndReached;
52 Link maEndReachedHdl;
53 Link maScrolledHdl;
55 public:
56 LicenseView( Window* pParent, const ResId& rResId );
57 ~LicenseView();
59 void ScrollDown( ScrollType eScroll );
61 BOOL IsEndReached() const;
62 BOOL EndReached() const { return mbEndReached; }
63 void SetEndReached( BOOL bEnd ) { mbEndReached = bEnd; }
65 void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; }
66 const Link& GetAutocompleteHdl() const { return maEndReachedHdl; }
68 void SetScrolledHdl( const Link& rHdl ) { maScrolledHdl = rHdl; }
69 const Link& GetScrolledHdl() const { return maScrolledHdl; }
71 using MultiLineEdit::Notify;
72 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
75 class LicenseDialog : public ModalDialog
77 LicenseView aLicenseML;
78 FixedText aInfo1FT;
79 FixedText aInfo2FT;
80 FixedText aInfo3FT;
81 FixedText aInfo2_1FT;
82 FixedText aInfo3_1FT;
83 FixedLine aFixedLine;
84 PushButton aPBPageDown;
85 PushButton aPBDecline;
86 PushButton aPBAccept;
87 FixedImage aArrow;
88 String aStrAccept;
89 String aStrNotAccept;
90 String aOldCancelText;
91 BOOL bEndReached;
93 void EnableControls();
95 DECL_LINK( PageDownHdl, PushButton * );
96 DECL_LINK( EndReachedHdl, LicenseView * );
97 DECL_LINK( ScrolledHdl, LicenseView * );
98 DECL_LINK( AcceptBtnHdl, PushButton * );
99 DECL_LINK( DeclineBtnHdl, PushButton * );
101 public:
102 LicenseDialog(const rtl::OUString& aLicense, ResMgr *pResMgr);
103 virtual ~LicenseDialog();
107 #endif