Update ooo320-m1
[ooovba.git] / svx / inc / imapdlg.hxx
blob8ec9224d0668547a7e71bb64f03a65674c77cfd0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: imapdlg.hxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #ifndef _IMAPDLG_HXX_
33 #define _IMAPDLG_HXX_
35 #include <svtools/inettbc.hxx>
36 #include <sfx2/childwin.hxx>
37 #include <sfx2/ctrlitem.hxx>
38 #include <sfx2/basedlgs.hxx>
40 #ifndef _FIXED_HXX //autogen
41 #include <vcl/fixed.hxx>
42 #endif
44 #ifndef _COMBOBOX_HXX //autogen
45 #include <vcl/combobox.hxx>
46 #endif
48 #ifndef _EDIT_HXX //autogen
49 #include <vcl/edit.hxx>
50 #endif
52 #ifndef _TOOLBOX_HXX //autogen
53 #include <vcl/toolbox.hxx>
54 #endif
56 #ifndef _STATUS_HXX //autogen
57 #include <vcl/status.hxx>
58 #endif
59 #include "svx/svxdllapi.h"
62 #ifndef _GOMISC_HXX
63 class ImageMap;
64 #endif
67 /*************************************************************************
69 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Float
71 \************************************************************************/
73 class Graphic;
74 class TargetList;
76 class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow
78 public:
80 SvxIMapDlgChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
82 SFX_DECL_CHILDWINDOW( SvxIMapDlgChildWindow );
84 static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap = NULL,
85 const TargetList* pTargetList = NULL, void* pEditingObj = NULL );
89 #ifndef _REDUCED_IMAPDLG_HXX_
90 #define _REDUCED_IMAPDLG_HXX_
92 /*************************************************************************
96 \************************************************************************/
98 class SvxIMapDlg;
100 class SvxIMapDlgItem : public SfxControllerItem
102 SvxIMapDlg& rIMap;
105 protected:
107 virtual void StateChanged( USHORT nSID, SfxItemState eState,
108 const SfxPoolItem* pState );
111 public:
113 SvxIMapDlgItem( USHORT nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
117 /*************************************************************************
121 \************************************************************************/
123 class IMapOwnData;
124 class IMapWindow;
126 class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
128 friend class IMapOwnData;
129 friend class IMapWindow;
130 using Window::Update;
132 ToolBox aTbxIMapDlg1;
133 FixedText aFtURL;
134 SvtURLBox maURLBox;
135 FixedText aFtText;
136 Edit aEdtText;
137 FixedText maFtTarget;
138 ComboBox maCbbTarget;
139 StatusBar aStbStatus;
140 ImageList maImageList;
141 ImageList maImageListH;
143 Size aLastSize;
144 IMapWindow* pIMapWnd;
145 IMapOwnData* pOwnData;
146 void* pCheckObj;
147 SvxIMapDlgItem aIMapItem;
149 virtual void Resize();
150 virtual BOOL Close();
152 #ifdef _IMAPDLG_PRIVATE
154 DECL_LINK( TbxClickHdl, ToolBox* );
155 DECL_LINK( InfoHdl, IMapWindow* );
156 DECL_LINK( MousePosHdl, IMapWindow* );
157 DECL_LINK( GraphSizeHdl, IMapWindow* );
158 DECL_LINK( URLModifyHdl, void* );
159 DECL_LINK( URLLoseFocusHdl, void* );
160 DECL_LINK( UpdateHdl, Timer* );
161 DECL_LINK( TbxUpdateHdl, Timer* );
162 DECL_LINK( StateHdl, IMapWindow* );
163 DECL_LINK( MiscHdl, void* );
165 void DoOpen();
166 BOOL DoSave();
168 #endif
171 public:
173 SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
174 Window* pParent, const ResId& rResId );
175 ~SvxIMapDlg();
177 void SetExecState( BOOL bEnable );
179 void SetGraphic( const Graphic& rGraphic );
181 void SetEditingObject( void* pObj ) { pCheckObj = pObj; }
182 const void* GetEditingObject() const { return pCheckObj; }
184 void SetImageMap( const ImageMap& rImageMap );
185 const ImageMap& GetImageMap() const;
187 void SetTargetList( const TargetList& rTargetList );
188 const TargetList& GetTargetList() const;
190 void Update( const Graphic& rGraphic, const ImageMap* pImageMap = NULL,
191 const TargetList* pTargetList = NULL, void* pEditingObj = NULL );
193 virtual void KeyInput( const KeyEvent& rKEvt );
195 virtual void DataChanged( const DataChangedEvent& rDCEvt );
196 void ApplyImageList();
200 /*************************************************************************
202 |* Defines
204 \************************************************************************/
206 #define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \
207 SvxIMapDlgChildWindow::GetChildWindowId() )-> \
208 GetWindow() ) )
211 #endif // _REDUCED_IMAPDLG_HXX_
212 #endif // _IMAPDLG_HXX_