xref: /aoo41x/main/svx/inc/svx/imapdlg.hxx (revision 3334a7e6)
1*3334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*3334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*3334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*3334a7e6SAndrew Rist  * distributed with this work for additional information
6*3334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*3334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*3334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
9*3334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*3334a7e6SAndrew Rist  *
11*3334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*3334a7e6SAndrew Rist  *
13*3334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*3334a7e6SAndrew Rist  * software distributed under the License is distributed on an
15*3334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*3334a7e6SAndrew Rist  * specific language governing permissions and limitations
18*3334a7e6SAndrew Rist  * under the License.
19*3334a7e6SAndrew Rist  *
20*3334a7e6SAndrew Rist  *************************************************************/
21*3334a7e6SAndrew Rist 
22*3334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #ifndef _IMAPDLG_HXX_
26cdf0e10cSrcweir #define _IMAPDLG_HXX_
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <svtools/inettbc.hxx>
29cdf0e10cSrcweir #include <sfx2/childwin.hxx>
30cdf0e10cSrcweir #include <sfx2/ctrlitem.hxx>
31cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
34cdf0e10cSrcweir #include <vcl/fixed.hxx>
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #ifndef _COMBOBOX_HXX //autogen
38cdf0e10cSrcweir #include <vcl/combobox.hxx>
39cdf0e10cSrcweir #endif
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #ifndef _EDIT_HXX //autogen
42cdf0e10cSrcweir #include <vcl/edit.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir 
45cdf0e10cSrcweir #ifndef _TOOLBOX_HXX //autogen
46cdf0e10cSrcweir #include <vcl/toolbox.hxx>
47cdf0e10cSrcweir #endif
48cdf0e10cSrcweir 
49cdf0e10cSrcweir #ifndef _STATUS_HXX //autogen
50cdf0e10cSrcweir #include <vcl/status.hxx>
51cdf0e10cSrcweir #endif
52cdf0e10cSrcweir #include "svx/svxdllapi.h"
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 
55cdf0e10cSrcweir #ifndef _GOMISC_HXX
56cdf0e10cSrcweir class ImageMap;
57cdf0e10cSrcweir #endif
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 
60cdf0e10cSrcweir /*************************************************************************
61cdf0e10cSrcweir |*
62cdf0e10cSrcweir |* Ableitung vom SfxChildWindow als "Behaelter" fuer Float
63cdf0e10cSrcweir |*
64cdf0e10cSrcweir \************************************************************************/
65cdf0e10cSrcweir 
66cdf0e10cSrcweir class Graphic;
67cdf0e10cSrcweir class TargetList;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow
70cdf0e10cSrcweir {
71cdf0e10cSrcweir  public:
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 	SvxIMapDlgChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 	SFX_DECL_CHILDWINDOW( SvxIMapDlgChildWindow );
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap = NULL,
78cdf0e10cSrcweir 							   const TargetList* pTargetList = NULL, void* pEditingObj = NULL );
79cdf0e10cSrcweir };
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 
82cdf0e10cSrcweir #ifndef _REDUCED_IMAPDLG_HXX_
83cdf0e10cSrcweir #define _REDUCED_IMAPDLG_HXX_
84cdf0e10cSrcweir 
85cdf0e10cSrcweir /*************************************************************************
86cdf0e10cSrcweir |*
87cdf0e10cSrcweir |*
88cdf0e10cSrcweir |*
89cdf0e10cSrcweir \************************************************************************/
90cdf0e10cSrcweir 
91cdf0e10cSrcweir class SvxIMapDlg;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir class SvxIMapDlgItem : public SfxControllerItem
94cdf0e10cSrcweir {
95cdf0e10cSrcweir 	SvxIMapDlg&	rIMap;
96cdf0e10cSrcweir 
97cdf0e10cSrcweir 
98cdf0e10cSrcweir protected:
99cdf0e10cSrcweir 
100cdf0e10cSrcweir 	virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
101cdf0e10cSrcweir 							   const SfxPoolItem* pState );
102cdf0e10cSrcweir 
103cdf0e10cSrcweir 
104cdf0e10cSrcweir public:
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 	SvxIMapDlgItem( sal_uInt16 nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
107cdf0e10cSrcweir };
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 
110cdf0e10cSrcweir /*************************************************************************
111cdf0e10cSrcweir |*
112cdf0e10cSrcweir |*
113cdf0e10cSrcweir |*
114cdf0e10cSrcweir \************************************************************************/
115cdf0e10cSrcweir 
116cdf0e10cSrcweir class IMapOwnData;
117cdf0e10cSrcweir class IMapWindow;
118cdf0e10cSrcweir 
119cdf0e10cSrcweir class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
120cdf0e10cSrcweir {
121cdf0e10cSrcweir 	friend class IMapOwnData;
122cdf0e10cSrcweir 	friend class IMapWindow;
123cdf0e10cSrcweir 	using Window::Update;
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 	ToolBox				aTbxIMapDlg1;
126cdf0e10cSrcweir 	FixedText			aFtURL;
127cdf0e10cSrcweir 	SvtURLBox			maURLBox;
128cdf0e10cSrcweir 	FixedText			aFtText;
129cdf0e10cSrcweir 	Edit				aEdtText;
130cdf0e10cSrcweir 	FixedText			maFtTarget;
131cdf0e10cSrcweir 	ComboBox			maCbbTarget;
132cdf0e10cSrcweir 	StatusBar			aStbStatus;
133cdf0e10cSrcweir 	ImageList			maImageList;
134cdf0e10cSrcweir 	ImageList			maImageListH;
135cdf0e10cSrcweir 
136cdf0e10cSrcweir 	Size				aLastSize;
137cdf0e10cSrcweir 	IMapWindow*			pIMapWnd;
138cdf0e10cSrcweir 	IMapOwnData*		pOwnData;
139cdf0e10cSrcweir 	void*				pCheckObj;
140cdf0e10cSrcweir 	SvxIMapDlgItem		aIMapItem;
141cdf0e10cSrcweir 
142cdf0e10cSrcweir 	virtual	void		Resize();
143cdf0e10cSrcweir 	virtual sal_Bool 		Close();
144cdf0e10cSrcweir 
145cdf0e10cSrcweir #ifdef _IMAPDLG_PRIVATE
146cdf0e10cSrcweir 
147cdf0e10cSrcweir 						DECL_LINK( TbxClickHdl, ToolBox* );
148cdf0e10cSrcweir 						DECL_LINK( InfoHdl, IMapWindow* );
149cdf0e10cSrcweir 						DECL_LINK( MousePosHdl, IMapWindow* );
150cdf0e10cSrcweir 						DECL_LINK( GraphSizeHdl, IMapWindow* );
151cdf0e10cSrcweir 						DECL_LINK( URLModifyHdl, void* );
152cdf0e10cSrcweir 						DECL_LINK( URLLoseFocusHdl, void* );
153cdf0e10cSrcweir 						DECL_LINK( UpdateHdl, Timer* );
154cdf0e10cSrcweir 						DECL_LINK( TbxUpdateHdl, Timer* );
155cdf0e10cSrcweir 						DECL_LINK( StateHdl, IMapWindow* );
156cdf0e10cSrcweir 						DECL_LINK( MiscHdl, void* );
157cdf0e10cSrcweir 
158cdf0e10cSrcweir 	void				DoOpen();
159cdf0e10cSrcweir 	sal_Bool				DoSave();
160cdf0e10cSrcweir 
161cdf0e10cSrcweir #endif
162cdf0e10cSrcweir 
163cdf0e10cSrcweir 
164cdf0e10cSrcweir public:
165cdf0e10cSrcweir 
166cdf0e10cSrcweir 						SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
167cdf0e10cSrcweir 									Window* pParent, const ResId& rResId );
168cdf0e10cSrcweir 						~SvxIMapDlg();
169cdf0e10cSrcweir 
170cdf0e10cSrcweir 	void				SetExecState( sal_Bool bEnable );
171cdf0e10cSrcweir 
172cdf0e10cSrcweir 	void				SetGraphic( const Graphic& rGraphic );
173cdf0e10cSrcweir 
SetEditingObject(void * pObj)174cdf0e10cSrcweir 	void				SetEditingObject( void* pObj ) { pCheckObj = pObj; }
GetEditingObject() const175cdf0e10cSrcweir 	const void*			GetEditingObject() const { return pCheckObj; }
176cdf0e10cSrcweir 
177cdf0e10cSrcweir 	void				SetImageMap( const ImageMap& rImageMap );
178cdf0e10cSrcweir 	const ImageMap&		GetImageMap() const;
179cdf0e10cSrcweir 
180cdf0e10cSrcweir 	void				SetTargetList( const TargetList& rTargetList );
181cdf0e10cSrcweir 	const TargetList&	GetTargetList() const;
182cdf0e10cSrcweir 
183cdf0e10cSrcweir 	void				Update( const Graphic& rGraphic, const ImageMap* pImageMap = NULL,
184cdf0e10cSrcweir 								const TargetList* pTargetList = NULL, void* pEditingObj = NULL );
185cdf0e10cSrcweir 
186cdf0e10cSrcweir 	virtual void		KeyInput( const KeyEvent& rKEvt );
187cdf0e10cSrcweir 
188cdf0e10cSrcweir 	virtual void DataChanged( const DataChangedEvent& rDCEvt );
189cdf0e10cSrcweir 	void ApplyImageList();
190cdf0e10cSrcweir };
191cdf0e10cSrcweir 
192cdf0e10cSrcweir 
193cdf0e10cSrcweir /*************************************************************************
194cdf0e10cSrcweir |*
195cdf0e10cSrcweir |* Defines
196cdf0e10cSrcweir |*
197cdf0e10cSrcweir \************************************************************************/
198cdf0e10cSrcweir 
199cdf0e10cSrcweir #define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( 		\
200cdf0e10cSrcweir 						SvxIMapDlgChildWindow::GetChildWindowId() )-> 	\
201cdf0e10cSrcweir 						GetWindow() ) )
202cdf0e10cSrcweir 
203cdf0e10cSrcweir 
204cdf0e10cSrcweir #endif // _REDUCED_IMAPDLG_HXX_
205cdf0e10cSrcweir #endif // _IMAPDLG_HXX_
206cdf0e10cSrcweir 
207cdf0e10cSrcweir 
208