1*f8e07b45SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*f8e07b45SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f8e07b45SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f8e07b45SAndrew Rist * distributed with this work for additional information 6*f8e07b45SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f8e07b45SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f8e07b45SAndrew Rist * "License"); you may not use this file except in compliance 9*f8e07b45SAndrew Rist * with the License. You may obtain a copy of the License at 10*f8e07b45SAndrew Rist * 11*f8e07b45SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*f8e07b45SAndrew Rist * 13*f8e07b45SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f8e07b45SAndrew Rist * software distributed under the License is distributed on an 15*f8e07b45SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f8e07b45SAndrew Rist * KIND, either express or implied. See the License for the 17*f8e07b45SAndrew Rist * specific language governing permissions and limitations 18*f8e07b45SAndrew Rist * under the License. 19*f8e07b45SAndrew Rist * 20*f8e07b45SAndrew Rist *************************************************************/ 21*f8e07b45SAndrew Rist 22*f8e07b45SAndrew Rist 23cdf0e10cSrcweir #ifndef __LICENSEDLG_HXX__ 24cdf0e10cSrcweir #define __LICENSEDLG_HXX__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <sal/types.h> 27cdf0e10cSrcweir #include <rtl/string.hxx> 28cdf0e10cSrcweir #include <rtl/ustring.hxx> 29cdf0e10cSrcweir #include <rtl/ustrbuf.hxx> 30cdf0e10cSrcweir #include <tools/string.hxx> 31cdf0e10cSrcweir #include <tools/resmgr.hxx> 32cdf0e10cSrcweir #include <vcl/button.hxx> 33cdf0e10cSrcweir #include <vcl/edit.hxx> 34cdf0e10cSrcweir #include <vcl/fixed.hxx> 35cdf0e10cSrcweir #include <vcl/dialog.hxx> 36cdf0e10cSrcweir #include <vcl/scrbar.hxx> 37cdf0e10cSrcweir #include <svtools/svmedit.hxx> 38cdf0e10cSrcweir #include <svl/lstner.hxx> 39cdf0e10cSrcweir 40cdf0e10cSrcweir namespace framework { 41cdf0e10cSrcweir 42cdf0e10cSrcweir class LicenseView : public MultiLineEdit, public SfxListener 43cdf0e10cSrcweir { 44cdf0e10cSrcweir sal_Bool mbEndReached; 45cdf0e10cSrcweir Link maEndReachedHdl; 46cdf0e10cSrcweir Link maScrolledHdl; 47cdf0e10cSrcweir 48cdf0e10cSrcweir public: 49cdf0e10cSrcweir LicenseView( Window* pParent, const ResId& rResId ); 50cdf0e10cSrcweir ~LicenseView(); 51cdf0e10cSrcweir 52cdf0e10cSrcweir void ScrollDown( ScrollType eScroll ); 53cdf0e10cSrcweir 54cdf0e10cSrcweir sal_Bool IsEndReached() const; EndReached() const55cdf0e10cSrcweir sal_Bool EndReached() const { return mbEndReached; } SetEndReached(sal_Bool bEnd)56cdf0e10cSrcweir void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; } 57cdf0e10cSrcweir SetEndReachedHdl(const Link & rHdl)58cdf0e10cSrcweir void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; } GetAutocompleteHdl() const59cdf0e10cSrcweir const Link& GetAutocompleteHdl() const { return maEndReachedHdl; } 60cdf0e10cSrcweir SetScrolledHdl(const Link & rHdl)61cdf0e10cSrcweir void SetScrolledHdl( const Link& rHdl ) { maScrolledHdl = rHdl; } GetScrolledHdl() const62cdf0e10cSrcweir const Link& GetScrolledHdl() const { return maScrolledHdl; } 63cdf0e10cSrcweir 64cdf0e10cSrcweir using MultiLineEdit::Notify; 65cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 66cdf0e10cSrcweir }; 67cdf0e10cSrcweir 68cdf0e10cSrcweir class LicenseDialog : public ModalDialog 69cdf0e10cSrcweir { 70cdf0e10cSrcweir LicenseView aLicenseML; 71cdf0e10cSrcweir FixedText aInfo1FT; 72cdf0e10cSrcweir FixedText aInfo2FT; 73cdf0e10cSrcweir FixedText aInfo3FT; 74cdf0e10cSrcweir FixedText aInfo2_1FT; 75cdf0e10cSrcweir FixedText aInfo3_1FT; 76cdf0e10cSrcweir FixedLine aFixedLine; 77cdf0e10cSrcweir PushButton aPBPageDown; 78cdf0e10cSrcweir PushButton aPBDecline; 79cdf0e10cSrcweir PushButton aPBAccept; 80cdf0e10cSrcweir FixedImage aArrow; 81cdf0e10cSrcweir String aStrAccept; 82cdf0e10cSrcweir String aStrNotAccept; 83cdf0e10cSrcweir String aOldCancelText; 84cdf0e10cSrcweir sal_Bool bEndReached; 85cdf0e10cSrcweir 86cdf0e10cSrcweir void EnableControls(); 87cdf0e10cSrcweir 88cdf0e10cSrcweir DECL_LINK( PageDownHdl, PushButton * ); 89cdf0e10cSrcweir DECL_LINK( EndReachedHdl, LicenseView * ); 90cdf0e10cSrcweir DECL_LINK( ScrolledHdl, LicenseView * ); 91cdf0e10cSrcweir DECL_LINK( AcceptBtnHdl, PushButton * ); 92cdf0e10cSrcweir DECL_LINK( DeclineBtnHdl, PushButton * ); 93cdf0e10cSrcweir 94cdf0e10cSrcweir public: 95cdf0e10cSrcweir LicenseDialog(const rtl::OUString& aLicense, ResMgr *pResMgr); 96cdf0e10cSrcweir virtual ~LicenseDialog(); 97cdf0e10cSrcweir 98cdf0e10cSrcweir }; 99cdf0e10cSrcweir } 100cdf0e10cSrcweir #endif 101