1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: oemwiz.hxx,v $
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 ************************************************************************/
31 #ifndef _EXTENSIONS_PRELOAD_OEMWIZ_HXX_
32 #define _EXTENSIONS_PRELOAD_OEMWIZ_HXX_
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 #include <svtools/wizdlg.hxx>
37 #ifndef _SV_BUTTON_HXX
38 #include <vcl/button.hxx>
40 #include <vcl/tabpage.hxx>
41 #include <vcl/fixed.hxx>
42 #include <svtools/svmedit.hxx>
43 #include <svtools/lstner.hxx>
44 #include <vcl/scrbar.hxx>
46 //.........................................................................
51 #define OEM_USERDATA 2
53 //.........................................................................
54 //=====================================================================
56 //=====================================================================
57 struct OEMPreloadDialog_Impl
;
58 class OEMPreloadDialog
: public WizardDialog
62 CancelButton aCancelPB
;
70 OEMPreloadDialog_Impl
* pImpl
;
72 DECL_LINK(NextPrevPageHdl
, PushButton
*);
78 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& _rxObjectModel
,
79 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
83 const String
& GetAcceptString()const {return aAcceptST
;}
84 const String
GetCancelString() const {return aCancelPB
.GetText();}
85 void SetCancelString( const String
& rText
);
87 static sal_Bool
LoadFromLocalFile(const String
& rFileName
, String
& rContent
);
89 class OEMWelcomeTabPage
: public TabPage
93 OEMWelcomeTabPage(Window
* pParent
);
96 class LicenceView
: public MultiLineEdit
, public SfxListener
103 LicenceView( Window
* pParent
, const ResId
& rResId
);
106 void ScrollDown( ScrollType eScroll
);
108 BOOL
IsEndReached() const;
109 BOOL
EndReached() const { return mbEndReached
; }
110 void SetEndReached( BOOL bEnd
) { mbEndReached
= bEnd
; }
112 void SetEndReachedHdl( const Link
& rHdl
) { maEndReachedHdl
= rHdl
; }
113 const Link
& GetAutocompleteHdl() const { return maEndReachedHdl
; }
115 void SetScrolledHdl( const Link
& rHdl
) { maScrolledHdl
= rHdl
; }
116 const Link
& GetScrolledHdl() const { return maScrolledHdl
; }
118 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
120 using MultiLineEdit::Notify
;
122 class OEMLicenseTabPage
: public TabPage
124 LicenceView aLicenseML
;
128 FixedText aInfo2_1FT
;
129 FixedText aInfo3_1FT
;
131 PushButton aPBPageDown
;
134 String aStrNotAccept
;
135 String aOldCancelText
;
138 OEMPreloadDialog
* pPreloadDialog
;
140 void EnableControls();
142 DECL_LINK( AcceptHdl
, CheckBox
* );
143 DECL_LINK( PageDownHdl
, PushButton
* );
144 DECL_LINK( EndReachedHdl
, LicenceView
* );
145 DECL_LINK( ScrolledHdl
, LicenceView
* );
148 OEMLicenseTabPage(OEMPreloadDialog
* pParent
);
149 ~OEMLicenseTabPage();
151 virtual void ActivatePage();
154 //.........................................................................
155 } // namespace preload
156 //.........................................................................
158 #endif // _EXTENSIONS_PRELOAD_OEMWIZ_HXX_