xref: /aoo41x/main/cui/source/inc/linkdlg.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _LINKDLG_HXX
29 #define _LINKDLG_HXX
30 
31 #ifndef _LSTBOX_HXX //autogen
32 #include <vcl/lstbox.hxx>
33 #endif
34 
35 #include <vcl/dialog.hxx>
36 #include <vcl/fixed.hxx>
37 #include <vcl/button.hxx>
38 #include <vcl/edit.hxx>
39 #include <vcl/lstbox.hxx>
40 
41 #include <svtools/svmedit.hxx>	// MultiLineEdit
42 #include <svtools/svtabbx.hxx>  // MultiLineEdit
43 
44 /********************** SvUpdateLinksDialog ******************************
45 *************************************************************************/
46 namespace sfx2
47 {
48     class LinkManager;
49     class SvBaseLink;
50 }
51 
52 class SvBaseLinksDlg : public ModalDialog
53 {
54 	using Window::SetType;
55 
56     FixedText aFtFiles;
57     FixedText aFtLinks;
58     FixedText aFtType;
59     FixedText aFtStatus;
60     SvTabListBox aTbLinks;
61     FixedText aFtFiles2;
62     FixedText aFtFullFileName;
63     FixedText aFtSource2;
64     FixedText aFtFullSourceName;
65     FixedText aFtType2;
66     FixedText aFtFullTypeName;
67     FixedText aFtUpdate;
68     RadioButton aRbAutomatic;
69     RadioButton aRbManual;
70     CancelButton aCancelButton1;
71     HelpButton aHelpButton1;
72     PushButton aPbUpdateNow;
73     PushButton aPbOpenSource;
74     PushButton aPbChangeSource;
75     PushButton aPbBreakLink;
76     String aStrAutolink;
77     String aStrManuallink;
78     String aStrBrokenlink;
79     String aStrGraphiclink;
80     String aStrButtonclose;
81     String aStrCloselinkmsg;
82     String aStrCloselinkmsgMulti;
83     String aStrWaitinglink;
84     sfx2::LinkManager*  pLinkMgr;
85 	sal_Bool 			bHtmlMode;
86 	Timer aUpdateTimer;
87 
88 #if _SOLAR__PRIVATE
89 	DECL_LINK( LinksSelectHdl, SvTabListBox * );
90 	DECL_LINK( LinksDoubleClickHdl, SvTabListBox * );
91 	DECL_LINK( AutomaticClickHdl, RadioButton * );
92 	DECL_LINK( ManualClickHdl, RadioButton * );
93 	DECL_LINK( UpdateNowClickHdl, PushButton * );
94 	DECL_LINK( OpenSourceClickHdl, PushButton * );
95 	DECL_LINK( ChangeSourceClickHdl, PushButton * );
96 	DECL_LINK( BreakLinkClickHdl, PushButton * );
97     DECL_LINK( UpdateWaitingHdl, Timer * );
98     DECL_LINK( EndEditHdl, sfx2::SvBaseLink* );
99     sfx2::SvBaseLink* GetSelEntry( sal_uInt16* pPos );
100     String ImplGetStateStr( const sfx2::SvBaseLink& );
101     void SetType( sfx2::SvBaseLink& rLink, sal_uInt16 nPos, sal_uInt16 nType );
102     void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uInt16 nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False);
103 #endif
104 
105 	void StartUpdateTimer()			{ aUpdateTimer.Start(); }
106 
107 	SvTabListBox&	  Links()		{ return aTbLinks; }
108 	FixedText&		FileName()		{ return aFtFullFileName; }
109 	FixedText&		SourceName()	{ return aFtFullSourceName; }
110 	FixedText&		TypeName()		{ return aFtFullTypeName; }
111 	RadioButton&	Automatic() 	{ return aRbAutomatic; }
112 	RadioButton&	Manual()		{ return aRbManual; }
113 	PushButton& 	UpdateNow() 	{ return aPbUpdateNow; }
114 	PushButton& 	OpenSource()	{ return aPbOpenSource; }
115 	PushButton& 	ChangeSource()	{ return aPbChangeSource; }
116 	PushButton& 	BreakLink() 	{ return aPbBreakLink; }
117 
118 	String& 		Autolink()		{ return aStrAutolink; }
119 	String& 		Manuallink()	{ return aStrManuallink; }
120 	String& 		Brokenlink()	{ return aStrBrokenlink; }
121 	String& 		Graphiclink()	{ return aStrGraphiclink; }
122 	String& 		Buttonclose()	{ return aStrButtonclose; }
123 	String& 		Closelinkmsg()	{ return aStrCloselinkmsg; }
124 	String& 		CloselinkmsgMulti()	{ return aStrCloselinkmsgMulti; }
125 	String& 		Waitinglink()	{ return aStrWaitinglink; }
126     void SetManager( sfx2::LinkManager* );
127 
128 public:
129     SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, sal_Bool bHtml = sal_False );
130     ~SvBaseLinksDlg();
131     void SetActLink( sfx2::SvBaseLink * pLink );
132 };
133 
134 #endif // _LINKDLG_HXX
135