1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
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.
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).
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.
27 ************************************************************************/
29 #ifndef _EXTENSIONS_PRELOAD_OEMWIZ_HXX_
30 #define _EXTENSIONS_PRELOAD_OEMWIZ_HXX_
32 #include <com/sun/star/beans/XPropertySet.hpp>
33 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
34 #include <svtools/wizdlg.hxx>
35 #include <vcl/button.hxx>
36 #include <vcl/tabpage.hxx>
37 #include <vcl/fixed.hxx>
38 #include <svtools/svmedit.hxx>
39 #include <svl/lstner.hxx>
40 #include <vcl/scrbar.hxx>
42 //.........................................................................
47 #define OEM_USERDATA 2
49 //.........................................................................
50 //=====================================================================
52 //=====================================================================
53 struct OEMPreloadDialog_Impl
;
54 class OEMPreloadDialog
: public WizardDialog
58 CancelButton aCancelPB
;
66 OEMPreloadDialog_Impl
* pImpl
;
68 DECL_LINK(NextPrevPageHdl
, PushButton
*);
74 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& _rxObjectModel
,
75 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
79 const String
& GetAcceptString()const {return aAcceptST
;}
80 const String
GetCancelString() const {return aCancelPB
.GetText();}
81 void SetCancelString( const String
& rText
);
83 static sal_Bool
LoadFromLocalFile(const String
& rFileName
, String
& rContent
);
85 class OEMWelcomeTabPage
: public TabPage
89 OEMWelcomeTabPage(Window
* pParent
);
92 class LicenceView
: public MultiLineEdit
, public SfxListener
99 LicenceView( Window
* pParent
, const ResId
& rResId
);
102 void ScrollDown( ScrollType eScroll
);
104 BOOL
IsEndReached() const;
105 BOOL
EndReached() const { return mbEndReached
; }
106 void SetEndReached( BOOL bEnd
) { mbEndReached
= bEnd
; }
108 void SetEndReachedHdl( const Link
& rHdl
) { maEndReachedHdl
= rHdl
; }
109 const Link
& GetAutocompleteHdl() const { return maEndReachedHdl
; }
111 void SetScrolledHdl( const Link
& rHdl
) { maScrolledHdl
= rHdl
; }
112 const Link
& GetScrolledHdl() const { return maScrolledHdl
; }
114 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
116 using MultiLineEdit::Notify
;
118 class OEMLicenseTabPage
: public TabPage
120 LicenceView aLicenseML
;
124 FixedText aInfo2_1FT
;
125 FixedText aInfo3_1FT
;
127 PushButton aPBPageDown
;
130 String aStrNotAccept
;
131 String aOldCancelText
;
134 OEMPreloadDialog
* pPreloadDialog
;
136 void EnableControls();
138 DECL_LINK( AcceptHdl
, CheckBox
* );
139 DECL_LINK( PageDownHdl
, PushButton
* );
140 DECL_LINK( EndReachedHdl
, LicenceView
* );
141 DECL_LINK( ScrolledHdl
, LicenceView
* );
144 OEMLicenseTabPage(OEMPreloadDialog
* pParent
);
145 ~OEMLicenseTabPage();
147 virtual void ActivatePage();
150 //.........................................................................
151 } // namespace preload
152 //.........................................................................
154 #endif // _EXTENSIONS_PRELOAD_OEMWIZ_HXX_
156 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */