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 <sfx2/childwin.hxx>
24 #include <sfx2/ctrlitem.hxx>
25 #include <sfx2/basedlgs.hxx>
26 #include <svx/svxdllapi.h>
30 namespace vcl
{ class Window
; }
31 namespace weld
{ class Button
; }
32 namespace weld
{ class ComboBox
; }
33 namespace weld
{ class CustomWeld
; }
34 namespace weld
{ class Entry
; }
35 namespace weld
{ class Label
; }
36 namespace weld
{ class Toolbar
; }
37 namespace weld
{ class Widget
; }
38 namespace weld
{ class Window
; }
43 /*************************************************************************
45 |* Derivation from SfxChildWindow as "container" for float
47 \************************************************************************/
50 typedef ::std::vector
< OUString
> TargetList
;
52 class SVX_DLLPUBLIC SvxIMapDlgChildWindow
: public SfxChildWindow
56 SvxIMapDlgChildWindow( vcl::Window
*, sal_uInt16
, SfxBindings
*, SfxChildWinInfo
const * );
58 SFX_DECL_CHILDWINDOW_WITHID( SvxIMapDlgChildWindow
);
60 static void UpdateIMapDlg( const Graphic
& rGraphic
, const ImageMap
* pImageMap
,
61 const TargetList
* pTargetList
, void* pEditingObj
);
67 class SvxIMapDlgItem
: public SfxControllerItem
74 virtual void StateChanged( sal_uInt16 nSID
, SfxItemState eState
,
75 const SfxPoolItem
* pState
) override
;
80 SvxIMapDlgItem( SvxIMapDlg
& rIMapDlg
, SfxBindings
& rBindings
);
87 class SVX_DLLPUBLIC SvxIMapDlg
: public SfxModelessDialogController
89 friend class IMapOwnData
;
90 friend class IMapWindow
;
92 std::unique_ptr
<IMapOwnData
> pOwnData
;
94 SvxIMapDlgItem aIMapItem
;
96 std::unique_ptr
<IMapWindow
> m_xIMapWnd
;
97 std::unique_ptr
<weld::Toolbar
> m_xTbxIMapDlg1
;
98 std::unique_ptr
<weld::Label
> m_xFtURL
;
99 std::unique_ptr
<URLBox
> m_xURLBox
;
100 std::unique_ptr
<weld::Label
> m_xFtText
;
101 std::unique_ptr
<weld::Entry
> m_xEdtText
;
102 std::unique_ptr
<weld::Label
> m_xFtTarget
;
103 std::unique_ptr
<weld::ComboBox
> m_xCbbTarget
;
104 std::unique_ptr
<weld::Button
> m_xCancelBtn
;
105 std::unique_ptr
<weld::Label
> m_xStbStatus1
;
106 std::unique_ptr
<weld::Label
> m_xStbStatus2
;
107 std::unique_ptr
<weld::Label
> m_xStbStatus3
;
108 std::unique_ptr
<weld::CustomWeld
> m_xIMapWndWeld
;
110 DECL_LINK( TbxClickHdl
, const OString
&, void );
111 DECL_LINK( InfoHdl
, IMapWindow
&, void );
112 DECL_LINK( MousePosHdl
, GraphCtrl
*, void );
113 DECL_LINK( GraphSizeHdl
, GraphCtrl
*, void );
114 DECL_LINK( URLModifyHdl
, weld::ComboBox
&, void );
115 DECL_LINK( EntryModifyHdl
, weld::Entry
&, void );
116 DECL_LINK( URLModifyComboBoxHdl
, weld::ComboBox
&, void );
117 DECL_LINK( URLLoseFocusHdl
, weld::Widget
&, void );
118 DECL_LINK( UpdateHdl
, Timer
*, void );
119 DECL_LINK( StateHdl
, GraphCtrl
*, void );
120 DECL_LINK( CancelHdl
, weld::Button
&, void );
125 void SetActiveTool(const OString
& rId
);
129 SvxIMapDlg(SfxBindings
*pBindings
, SfxChildWindow
*pCW
,
130 weld::Window
* pParent
);
131 virtual ~SvxIMapDlg() override
;
133 void SetExecState( bool bEnable
);
135 const void* GetEditingObject() const { return pCheckObj
; }
137 const ImageMap
& GetImageMap() const;
139 void SetTargetList( const TargetList
& rTargetList
);
141 void UpdateLink( const Graphic
& rGraphic
, const ImageMap
* pImageMap
,
142 const TargetList
* pTargetList
, void* pEditingObj
);
145 SVX_DLLPUBLIC SvxIMapDlg
* GetIMapDlg();
147 #endif // INCLUDED_SVX_IMAPDLG_HXX
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */