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( vcl::Window
*, sal_uInt16
, SfxBindings
*, SfxChildWinInfo
* );
52 SFX_DECL_CHILDWINDOW_WITHID( SvxIMapDlgChildWindow
);
54 static void UpdateIMapDlg( const Graphic
& rGraphic
, const ImageMap
* pImageMap
,
55 const TargetList
* pTargetList
, void* pEditingObj
= nullptr );
61 class SvxIMapDlgItem
: public SfxControllerItem
68 virtual void StateChanged( sal_uInt16 nSID
, SfxItemState eState
,
69 const SfxPoolItem
* pState
) override
;
74 SvxIMapDlgItem( SvxIMapDlg
& rIMapDlg
, SfxBindings
& rBindings
);
81 class SVX_DLLPUBLIC SvxIMapDlg
: public SfxModelessDialog
// SfxFloatingWindow
83 friend class IMapOwnData
;
84 friend class IMapWindow
;
86 VclPtr
<ToolBox
> m_pTbxIMapDlg1
;
87 VclPtr
<FixedText
> m_pFtURL
;
88 VclPtr
<SvtURLBox
> m_pURLBox
;
89 VclPtr
<FixedText
> m_pFtText
;
90 VclPtr
<Edit
> m_pEdtText
;
91 VclPtr
<FixedText
> m_pFtTarget
;
92 VclPtr
<ComboBox
> m_pCbbTarget
;
93 VclPtr
<StatusBar
> m_pStbStatus
;
97 sal_uInt16 mnSaveAsId
;
98 sal_uInt16 mnSelectId
;
100 sal_uInt16 mnCircleId
;
102 sal_uInt16 mnFreePolyId
;
103 sal_uInt16 mnPolyEditId
;
104 sal_uInt16 mnPolyMoveId
;
105 sal_uInt16 mnPolyInsertId
;
106 sal_uInt16 mnPolyDeleteId
;
109 sal_uInt16 mnActiveId
;
110 sal_uInt16 mnMacroId
;
111 sal_uInt16 mnPropertyId
;
114 VclPtr
<IMapWindow
> pIMapWnd
;
115 IMapOwnData
* pOwnData
;
117 SvxIMapDlgItem aIMapItem
;
119 virtual bool Close() override
;
121 DECL_LINK( TbxClickHdl
, ToolBox
*, void );
122 DECL_LINK( InfoHdl
, IMapWindow
&, void );
123 DECL_LINK( MousePosHdl
, GraphCtrl
*, void );
124 DECL_LINK( GraphSizeHdl
, GraphCtrl
*, void );
125 DECL_LINK( URLModifyHdl
, Edit
&, void );
126 DECL_LINK( URLModifyComboBoxHdl
, ComboBox
&, void );
127 DECL_LINK( URLLoseFocusHdl
, Control
&, void );
128 DECL_LINK( UpdateHdl
, Idle
*, void );
129 DECL_LINK( StateHdl
, GraphCtrl
*, void );
130 DECL_LINK( MiscHdl
, LinkParamNone
*, void );
134 void SetActiveTool( sal_uInt16 nId
);
138 SvxIMapDlg( SfxBindings
*pBindings
, SfxChildWindow
*pCW
,
139 vcl::Window
* pParent
);
140 virtual ~SvxIMapDlg() override
;
141 virtual void dispose() override
;
143 void SetExecState( bool bEnable
);
145 const void* GetEditingObject() const { return pCheckObj
; }
147 const ImageMap
& GetImageMap() const;
149 void SetTargetList( const TargetList
& rTargetList
);
151 void UpdateLink( const Graphic
& rGraphic
, const ImageMap
* pImageMap
,
152 const TargetList
* pTargetList
, void* pEditingObj
= nullptr );
155 SVX_DLLPUBLIC SvxIMapDlg
* GetIMapDlg();
157 #endif // INCLUDED_SVX_IMAPDLG_HXX
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */