lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / svx / imapdlg.hxx
blob503cec1e072a4c84d52149fa56aa54c1f02e9007
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
27 #include <memory>
28 #include <vector>
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; }
40 class ImageMap;
41 class URLBox;
43 /*************************************************************************
45 |* Derivation from SfxChildWindow as "container" for float
47 \************************************************************************/
49 class Graphic;
50 typedef ::std::vector< OUString > TargetList;
52 class SVX_DLLPUBLIC SvxIMapDlgChildWindow final : public SfxChildWindow
54 public:
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 );
65 class SvxIMapDlg;
67 class SvxIMapDlgItem final : public SfxControllerItem
69 SvxIMapDlg& rIMap;
71 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
72 const SfxPoolItem* pState ) override;
75 public:
77 SvxIMapDlgItem( SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
80 class IMapOwnData;
81 class IMapWindow;
82 class GraphCtrl;
84 class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialogController
86 friend class IMapOwnData;
87 friend class IMapWindow;
89 std::unique_ptr<IMapOwnData> pOwnData;
90 void* pCheckObj;
91 SvxIMapDlgItem aIMapItem;
93 std::unique_ptr<IMapWindow> m_xIMapWnd;
94 std::unique_ptr<weld::Toolbar> m_xTbxIMapDlg1;
95 std::unique_ptr<weld::Label> m_xFtURL;
96 std::unique_ptr<URLBox> m_xURLBox;
97 std::unique_ptr<weld::Label> m_xFtText;
98 std::unique_ptr<weld::Entry> m_xEdtText;
99 std::unique_ptr<weld::Label> m_xFtTarget;
100 std::unique_ptr<weld::ComboBox> m_xCbbTarget;
101 std::unique_ptr<weld::Button> m_xCancelBtn;
102 std::unique_ptr<weld::Label> m_xStbStatus1;
103 std::unique_ptr<weld::Label> m_xStbStatus2;
104 std::unique_ptr<weld::Label> m_xStbStatus3;
105 std::unique_ptr<weld::CustomWeld> m_xIMapWndWeld;
107 DECL_LINK( TbxClickHdl, const OString&, void );
108 DECL_LINK( InfoHdl, IMapWindow&, void );
109 DECL_LINK( MousePosHdl, GraphCtrl*, void );
110 DECL_LINK( GraphSizeHdl, GraphCtrl*, void );
111 DECL_LINK( URLModifyHdl, weld::ComboBox&, void );
112 DECL_LINK( EntryModifyHdl, weld::Entry&, void );
113 DECL_LINK( URLLoseFocusHdl, weld::Widget&, void );
114 DECL_LINK( UpdateHdl, Timer *, void );
115 DECL_LINK( StateHdl, GraphCtrl*, void );
116 DECL_LINK( CancelHdl, weld::Button&, void );
118 void URLModify();
119 void DoOpen();
120 bool DoSave();
121 void SetActiveTool(const OString& rId);
123 public:
125 SvxIMapDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
126 weld::Window* pParent);
127 virtual ~SvxIMapDlg() override;
129 void SetExecState( bool bEnable );
131 const void* GetEditingObject() const { return pCheckObj; }
133 const ImageMap& GetImageMap() const;
135 void SetTargetList( const TargetList& rTargetList );
137 void UpdateLink( const Graphic& rGraphic, const ImageMap* pImageMap,
138 const TargetList* pTargetList, void* pEditingObj );
141 SVX_DLLPUBLIC SvxIMapDlg* GetIMapDlg();
143 #endif // INCLUDED_SVX_IMAPDLG_HXX
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */