merged tag LIBREOFFICE_3_2_99_3
[LibreOffice.git] / extensions / source / preload / oemwiz.hxx
blobe7b0c36db46bc581991f30d814766024e2d45cd4
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 //.........................................................................
43 namespace preload
45 #define OEM_WELCOME 0
46 #define OEM_LICENSE 1
47 #define OEM_USERDATA 2
49 //.........................................................................
50 //=====================================================================
51 //= OEMPreloadDialog
52 //=====================================================================
53 struct OEMPreloadDialog_Impl;
54 class OEMPreloadDialog : public WizardDialog
56 PushButton aPrevPB;
57 PushButton aNextPB;
58 CancelButton aCancelPB;
60 String aNextST;
61 String aAcceptST;
62 String aFinishST;
63 String aDlgTitle;
64 String aLicense;
65 String aUserData;
66 OEMPreloadDialog_Impl* pImpl;
68 DECL_LINK(NextPrevPageHdl, PushButton*);
69 protected:
71 public:
72 OEMPreloadDialog(
73 Window* _pParent,
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
77 ~OEMPreloadDialog();
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
87 FixedText aInfoFT;
88 public:
89 OEMWelcomeTabPage(Window* pParent);
90 ~OEMWelcomeTabPage();
92 class LicenceView : public MultiLineEdit, public SfxListener
94 BOOL mbEndReached;
95 Link maEndReachedHdl;
96 Link maScrolledHdl;
98 public:
99 LicenceView( Window* pParent, const ResId& rResId );
100 ~LicenceView();
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 );
115 private:
116 using MultiLineEdit::Notify;
118 class OEMLicenseTabPage : public TabPage
120 LicenceView aLicenseML;
121 FixedText aInfo1FT;
122 FixedText aInfo2FT;
123 FixedText aInfo3FT;
124 FixedText aInfo2_1FT;
125 FixedText aInfo3_1FT;
126 CheckBox aCBAccept;
127 PushButton aPBPageDown;
128 FixedImage aArrow;
129 String aStrAccept;
130 String aStrNotAccept;
131 String aOldCancelText;
132 BOOL bEndReached;
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 * );
143 public:
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: */