build fix
[LibreOffice.git] / include / svx / imapdlg.hxx
blobb5e48d861be64aad172f7f4105e8d162d652425a
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 <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>
33 #include <vector>
35 class ImageMap;
37 /*************************************************************************
39 |* Derivation from SfxChildWindow as "container" for float
41 \************************************************************************/
43 class Graphic;
44 typedef ::std::vector< OUString > TargetList;
46 class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow
48 public:
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 );
59 class SvxIMapDlg;
61 class SvxIMapDlgItem : public SfxControllerItem
63 SvxIMapDlg& rIMap;
66 protected:
68 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
69 const SfxPoolItem* pState ) override;
72 public:
74 SvxIMapDlgItem( SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
77 class IMapOwnData;
78 class IMapWindow;
79 class GraphCtrl;
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;
95 sal_uInt16 mnApplyId;
96 sal_uInt16 mnOpenId;
97 sal_uInt16 mnSaveAsId;
98 sal_uInt16 mnSelectId;
99 sal_uInt16 mnRectId;
100 sal_uInt16 mnCircleId;
101 sal_uInt16 mnPolyId;
102 sal_uInt16 mnFreePolyId;
103 sal_uInt16 mnPolyEditId;
104 sal_uInt16 mnPolyMoveId;
105 sal_uInt16 mnPolyInsertId;
106 sal_uInt16 mnPolyDeleteId;
107 sal_uInt16 mnUndoId;
108 sal_uInt16 mnRedoId;
109 sal_uInt16 mnActiveId;
110 sal_uInt16 mnMacroId;
111 sal_uInt16 mnPropertyId;
113 Size aLastSize;
114 VclPtr<IMapWindow> pIMapWnd;
115 IMapOwnData* pOwnData;
116 void* pCheckObj;
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 );
132 void DoOpen();
133 bool DoSave();
134 void SetActiveTool( sal_uInt16 nId );
136 public:
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: */