xref: /trunk/main/cui/source/inc/linkdlg.hxx (revision c4eee24d)
1*c4eee24dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c4eee24dSAndrew Rist  * distributed with this work for additional information
6*c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9*c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c4eee24dSAndrew Rist  *
11*c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c4eee24dSAndrew Rist  *
13*c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15*c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18*c4eee24dSAndrew Rist  * under the License.
19*c4eee24dSAndrew Rist  *
20*c4eee24dSAndrew Rist  *************************************************************/
21*c4eee24dSAndrew Rist 
22*c4eee24dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _LINKDLG_HXX
25cdf0e10cSrcweir #define _LINKDLG_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen
28cdf0e10cSrcweir #include <vcl/lstbox.hxx>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <vcl/dialog.hxx>
32cdf0e10cSrcweir #include <vcl/fixed.hxx>
33cdf0e10cSrcweir #include <vcl/button.hxx>
34cdf0e10cSrcweir #include <vcl/edit.hxx>
35cdf0e10cSrcweir #include <vcl/lstbox.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #include <svtools/svmedit.hxx>	// MultiLineEdit
38cdf0e10cSrcweir #include <svtools/svtabbx.hxx>  // MultiLineEdit
39cdf0e10cSrcweir 
40cdf0e10cSrcweir /********************** SvUpdateLinksDialog ******************************
41cdf0e10cSrcweir *************************************************************************/
42cdf0e10cSrcweir namespace sfx2
43cdf0e10cSrcweir {
44cdf0e10cSrcweir     class LinkManager;
45cdf0e10cSrcweir     class SvBaseLink;
46cdf0e10cSrcweir }
47cdf0e10cSrcweir 
48cdf0e10cSrcweir class SvBaseLinksDlg : public ModalDialog
49cdf0e10cSrcweir {
50cdf0e10cSrcweir 	using Window::SetType;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir     FixedText aFtFiles;
53cdf0e10cSrcweir     FixedText aFtLinks;
54cdf0e10cSrcweir     FixedText aFtType;
55cdf0e10cSrcweir     FixedText aFtStatus;
56cdf0e10cSrcweir     SvTabListBox aTbLinks;
57cdf0e10cSrcweir     FixedText aFtFiles2;
58cdf0e10cSrcweir     FixedText aFtFullFileName;
59cdf0e10cSrcweir     FixedText aFtSource2;
60cdf0e10cSrcweir     FixedText aFtFullSourceName;
61cdf0e10cSrcweir     FixedText aFtType2;
62cdf0e10cSrcweir     FixedText aFtFullTypeName;
63cdf0e10cSrcweir     FixedText aFtUpdate;
64cdf0e10cSrcweir     RadioButton aRbAutomatic;
65cdf0e10cSrcweir     RadioButton aRbManual;
66cdf0e10cSrcweir     CancelButton aCancelButton1;
67cdf0e10cSrcweir     HelpButton aHelpButton1;
68cdf0e10cSrcweir     PushButton aPbUpdateNow;
69cdf0e10cSrcweir     PushButton aPbOpenSource;
70cdf0e10cSrcweir     PushButton aPbChangeSource;
71cdf0e10cSrcweir     PushButton aPbBreakLink;
72cdf0e10cSrcweir     String aStrAutolink;
73cdf0e10cSrcweir     String aStrManuallink;
74cdf0e10cSrcweir     String aStrBrokenlink;
75cdf0e10cSrcweir     String aStrGraphiclink;
76cdf0e10cSrcweir     String aStrButtonclose;
77cdf0e10cSrcweir     String aStrCloselinkmsg;
78cdf0e10cSrcweir     String aStrCloselinkmsgMulti;
79cdf0e10cSrcweir     String aStrWaitinglink;
80cdf0e10cSrcweir     sfx2::LinkManager*  pLinkMgr;
81cdf0e10cSrcweir 	sal_Bool 			bHtmlMode;
82cdf0e10cSrcweir 	Timer aUpdateTimer;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir #if _SOLAR__PRIVATE
85cdf0e10cSrcweir 	DECL_LINK( LinksSelectHdl, SvTabListBox * );
86cdf0e10cSrcweir 	DECL_LINK( LinksDoubleClickHdl, SvTabListBox * );
87cdf0e10cSrcweir 	DECL_LINK( AutomaticClickHdl, RadioButton * );
88cdf0e10cSrcweir 	DECL_LINK( ManualClickHdl, RadioButton * );
89cdf0e10cSrcweir 	DECL_LINK( UpdateNowClickHdl, PushButton * );
90cdf0e10cSrcweir 	DECL_LINK( OpenSourceClickHdl, PushButton * );
91cdf0e10cSrcweir 	DECL_LINK( ChangeSourceClickHdl, PushButton * );
92cdf0e10cSrcweir 	DECL_LINK( BreakLinkClickHdl, PushButton * );
93cdf0e10cSrcweir     DECL_LINK( UpdateWaitingHdl, Timer * );
94cdf0e10cSrcweir     DECL_LINK( EndEditHdl, sfx2::SvBaseLink* );
95cdf0e10cSrcweir     sfx2::SvBaseLink* GetSelEntry( sal_uInt16* pPos );
96cdf0e10cSrcweir     String ImplGetStateStr( const sfx2::SvBaseLink& );
97cdf0e10cSrcweir     void SetType( sfx2::SvBaseLink& rLink, sal_uInt16 nPos, sal_uInt16 nType );
98cdf0e10cSrcweir     void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uInt16 nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False);
99cdf0e10cSrcweir #endif
100cdf0e10cSrcweir 
StartUpdateTimer()101cdf0e10cSrcweir 	void StartUpdateTimer()			{ aUpdateTimer.Start(); }
102cdf0e10cSrcweir 
Links()103cdf0e10cSrcweir 	SvTabListBox&	  Links()		{ return aTbLinks; }
FileName()104cdf0e10cSrcweir 	FixedText&		FileName()		{ return aFtFullFileName; }
SourceName()105cdf0e10cSrcweir 	FixedText&		SourceName()	{ return aFtFullSourceName; }
TypeName()106cdf0e10cSrcweir 	FixedText&		TypeName()		{ return aFtFullTypeName; }
Automatic()107cdf0e10cSrcweir 	RadioButton&	Automatic() 	{ return aRbAutomatic; }
Manual()108cdf0e10cSrcweir 	RadioButton&	Manual()		{ return aRbManual; }
UpdateNow()109cdf0e10cSrcweir 	PushButton& 	UpdateNow() 	{ return aPbUpdateNow; }
OpenSource()110cdf0e10cSrcweir 	PushButton& 	OpenSource()	{ return aPbOpenSource; }
ChangeSource()111cdf0e10cSrcweir 	PushButton& 	ChangeSource()	{ return aPbChangeSource; }
BreakLink()112cdf0e10cSrcweir 	PushButton& 	BreakLink() 	{ return aPbBreakLink; }
113cdf0e10cSrcweir 
Autolink()114cdf0e10cSrcweir 	String& 		Autolink()		{ return aStrAutolink; }
Manuallink()115cdf0e10cSrcweir 	String& 		Manuallink()	{ return aStrManuallink; }
Brokenlink()116cdf0e10cSrcweir 	String& 		Brokenlink()	{ return aStrBrokenlink; }
Graphiclink()117cdf0e10cSrcweir 	String& 		Graphiclink()	{ return aStrGraphiclink; }
Buttonclose()118cdf0e10cSrcweir 	String& 		Buttonclose()	{ return aStrButtonclose; }
Closelinkmsg()119cdf0e10cSrcweir 	String& 		Closelinkmsg()	{ return aStrCloselinkmsg; }
CloselinkmsgMulti()120cdf0e10cSrcweir 	String& 		CloselinkmsgMulti()	{ return aStrCloselinkmsgMulti; }
Waitinglink()121cdf0e10cSrcweir 	String& 		Waitinglink()	{ return aStrWaitinglink; }
122cdf0e10cSrcweir     void SetManager( sfx2::LinkManager* );
123cdf0e10cSrcweir 
124cdf0e10cSrcweir public:
125cdf0e10cSrcweir     SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, sal_Bool bHtml = sal_False );
126cdf0e10cSrcweir     ~SvBaseLinksDlg();
127cdf0e10cSrcweir     void SetActLink( sfx2::SvBaseLink * pLink );
128cdf0e10cSrcweir };
129cdf0e10cSrcweir 
130cdf0e10cSrcweir #endif // _LINKDLG_HXX
131