1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
24 #include <svtools/inettbc.hxx>
25 #include <sfx2/childwin.hxx>
26 #include <sfx2/ctrlitem.hxx>
27 #include <sfx2/basedlgs.hxx>
29 #include <vcl/fixed.hxx>
31 #include <vcl/combobox.hxx>
33 #include <vcl/edit.hxx>
35 #include <vcl/toolbox.hxx>
37 #include <vcl/status.hxx>
38 #include "svx/svxdllapi.h"
47 /*************************************************************************
49 |* Derivation from SfxChildWindow as "container" for float
51 \************************************************************************/
54 typedef ::std::vector
< String
* > TargetList
;
56 class SVX_DLLPUBLIC SvxIMapDlgChildWindow
: public SfxChildWindow
60 SvxIMapDlgChildWindow( Window
*, sal_uInt16
, SfxBindings
*, SfxChildWinInfo
* );
62 SFX_DECL_CHILDWINDOW_WITHID( SvxIMapDlgChildWindow
);
64 static void UpdateIMapDlg( const Graphic
& rGraphic
, const ImageMap
* pImageMap
= NULL
,
65 const TargetList
* pTargetList
= NULL
, void* pEditingObj
= NULL
);
69 #ifndef _REDUCED_IMAPDLG_HXX_
70 #define _REDUCED_IMAPDLG_HXX_
74 class SvxIMapDlgItem
: public SfxControllerItem
81 virtual void StateChanged( sal_uInt16 nSID
, SfxItemState eState
,
82 const SfxPoolItem
* pState
);
87 SvxIMapDlgItem( sal_uInt16 nId
, SvxIMapDlg
& rIMapDlg
, SfxBindings
& rBindings
);
93 class SVX_DLLPUBLIC SvxIMapDlg
: public SfxModelessDialog
// SfxFloatingWindow
95 friend class IMapOwnData
;
96 friend class IMapWindow
;
104 FixedText maFtTarget
;
105 ComboBox maCbbTarget
;
106 StatusBar aStbStatus
;
107 ImageList maImageList
;
110 IMapWindow
* pIMapWnd
;
111 IMapOwnData
* pOwnData
;
113 SvxIMapDlgItem aIMapItem
;
115 virtual void Resize();
116 virtual sal_Bool
Close();
118 #ifdef _IMAPDLG_PRIVATE
120 DECL_LINK( TbxClickHdl
, ToolBox
* );
121 DECL_LINK( InfoHdl
, IMapWindow
* );
122 DECL_LINK( MousePosHdl
, IMapWindow
* );
123 DECL_LINK( GraphSizeHdl
, IMapWindow
* );
124 DECL_LINK( URLModifyHdl
, void* );
125 DECL_LINK( URLLoseFocusHdl
, void* );
126 DECL_LINK(UpdateHdl
, void *);
127 DECL_LINK( TbxUpdateHdl
, Timer
* );
128 DECL_LINK( StateHdl
, IMapWindow
* );
129 DECL_LINK( MiscHdl
, void* );
139 SvxIMapDlg( SfxBindings
*pBindings
, SfxChildWindow
*pCW
,
140 Window
* pParent
, const ResId
& rResId
);
143 void SetExecState( sal_Bool bEnable
);
145 void SetGraphic( const Graphic
& rGraphic
);
147 void SetEditingObject( void* pObj
) { pCheckObj
= pObj
; }
148 const void* GetEditingObject() const { return pCheckObj
; }
150 void SetImageMap( const ImageMap
& rImageMap
);
151 const ImageMap
& GetImageMap() const;
153 void SetTargetList( const TargetList
& rTargetList
);
155 void Update( const Graphic
& rGraphic
, const ImageMap
* pImageMap
= NULL
,
156 const TargetList
* pTargetList
= NULL
, void* pEditingObj
= NULL
);
158 virtual void KeyInput( const KeyEvent
& rKEvt
);
160 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
161 void ApplyImageList();
165 /*************************************************************************
169 \************************************************************************/
171 #define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \
172 SvxIMapDlgChildWindow::GetChildWindowId() )-> \
176 #endif // _REDUCED_IMAPDLG_HXX_
177 #endif // _IMAPDLG_HXX_
180 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */