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 .
20 #ifndef INCLUDED_SVX_IMAPDLG_HXX
21 #define INCLUDED_SVX_IMAPDLG_HXX
23 #include <svtools/inettbc.hxx>
24 #include <sfx2/childwin.hxx>
25 #include <sfx2/ctrlitem.hxx>
26 #include <sfx2/basedlgs.hxx>
27 #include <vcl/fixed.hxx>
28 #include <vcl/combobox.hxx>
29 #include <vcl/edit.hxx>
30 #include <vcl/toolbox.hxx>
31 #include <vcl/status.hxx>
32 #include <svx/svxdllapi.h>
37 /*************************************************************************
39 |* Derivation from SfxChildWindow as "container" for float
41 \************************************************************************/
44 typedef ::std::vector
< OUString
> TargetList
;
46 class SVX_DLLPUBLIC SvxIMapDlgChildWindow
: public SfxChildWindow
50 SvxIMapDlgChildWindow( Window
*, sal_uInt16
, SfxBindings
*, SfxChildWinInfo
* );
52 SFX_DECL_CHILDWINDOW_WITHID( SvxIMapDlgChildWindow
);
54 static void UpdateIMapDlg( const Graphic
& rGraphic
, const ImageMap
* pImageMap
= NULL
,
55 const TargetList
* pTargetList
= NULL
, void* pEditingObj
= NULL
);
61 class SvxIMapDlgItem
: public SfxControllerItem
68 virtual void StateChanged( sal_uInt16 nSID
, SfxItemState eState
,
69 const SfxPoolItem
* pState
) SAL_OVERRIDE
;
74 SvxIMapDlgItem( sal_uInt16 nId
, SvxIMapDlg
& rIMapDlg
, SfxBindings
& rBindings
);
80 class SVX_DLLPUBLIC SvxIMapDlg
: public SfxModelessDialog
// SfxFloatingWindow
82 friend class IMapOwnData
;
83 friend class IMapWindow
;
93 ImageList maImageList
;
97 IMapOwnData
* pOwnData
;
99 SvxIMapDlgItem aIMapItem
;
101 virtual void Resize() SAL_OVERRIDE
;
102 virtual bool Close() SAL_OVERRIDE
;
104 DECL_LINK( TbxClickHdl
, ToolBox
* );
105 DECL_LINK( InfoHdl
, IMapWindow
* );
106 DECL_LINK( MousePosHdl
, IMapWindow
* );
107 DECL_LINK( GraphSizeHdl
, IMapWindow
* );
108 DECL_LINK( URLModifyHdl
, void* );
109 DECL_LINK( URLLoseFocusHdl
, void* );
110 DECL_LINK(UpdateHdl
, void *);
111 DECL_LINK( TbxUpdateHdl
, Timer
* );
112 DECL_LINK( StateHdl
, IMapWindow
* );
113 DECL_LINK( MiscHdl
, void* );
120 SvxIMapDlg( SfxBindings
*pBindings
, SfxChildWindow
*pCW
,
121 Window
* pParent
, const ResId
& rResId
);
122 virtual ~SvxIMapDlg();
124 void SetExecState( bool bEnable
);
126 void SetGraphic( const Graphic
& rGraphic
);
128 void SetEditingObject( void* pObj
) { pCheckObj
= pObj
; }
129 const void* GetEditingObject() const { return pCheckObj
; }
131 void SetImageMap( const ImageMap
& rImageMap
);
132 const ImageMap
& GetImageMap() const;
134 void SetTargetList( const TargetList
& rTargetList
);
136 void UpdateLink( const Graphic
& rGraphic
, const ImageMap
* pImageMap
= NULL
,
137 const TargetList
* pTargetList
= NULL
, void* pEditingObj
= NULL
);
139 virtual void KeyInput( const KeyEvent
& rKEvt
) SAL_OVERRIDE
;
141 virtual void DataChanged( const DataChangedEvent
& rDCEvt
) SAL_OVERRIDE
;
142 void ApplyImageList();
146 /*************************************************************************
150 \************************************************************************/
152 #define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \
153 SvxIMapDlgChildWindow::GetChildWindowId() )-> \
157 #endif // INCLUDED_SVX_IMAPDLG_HXX
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */