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