1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: imapdlg.hxx,v $
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 ************************************************************************/
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>
44 #ifndef _COMBOBOX_HXX //autogen
45 #include <vcl/combobox.hxx>
48 #ifndef _EDIT_HXX //autogen
49 #include <vcl/edit.hxx>
52 #ifndef _TOOLBOX_HXX //autogen
53 #include <vcl/toolbox.hxx>
56 #ifndef _STATUS_HXX //autogen
57 #include <vcl/status.hxx>
59 #include "svx/svxdllapi.h"
67 /*************************************************************************
69 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Float
71 \************************************************************************/
76 class SVX_DLLPUBLIC SvxIMapDlgChildWindow
: public SfxChildWindow
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 \************************************************************************/
100 class SvxIMapDlgItem
: public SfxControllerItem
107 virtual void StateChanged( USHORT nSID
, SfxItemState eState
,
108 const SfxPoolItem
* pState
);
113 SvxIMapDlgItem( USHORT nId
, SvxIMapDlg
& rIMapDlg
, SfxBindings
& rBindings
);
117 /*************************************************************************
121 \************************************************************************/
126 class SVX_DLLPUBLIC SvxIMapDlg
: public SfxModelessDialog
// SfxFloatingWindow
128 friend class IMapOwnData
;
129 friend class IMapWindow
;
130 using Window::Update
;
132 ToolBox aTbxIMapDlg1
;
137 FixedText maFtTarget
;
138 ComboBox maCbbTarget
;
139 StatusBar aStbStatus
;
140 ImageList maImageList
;
141 ImageList maImageListH
;
144 IMapWindow
* pIMapWnd
;
145 IMapOwnData
* pOwnData
;
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* );
173 SvxIMapDlg( SfxBindings
*pBindings
, SfxChildWindow
*pCW
,
174 Window
* pParent
, const ResId
& rResId
);
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 /*************************************************************************
204 \************************************************************************/
206 #define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \
207 SvxIMapDlgChildWindow::GetChildWindowId() )-> \
211 #endif // _REDUCED_IMAPDLG_HXX_
212 #endif // _IMAPDLG_HXX_