LibreOffice Module svx (master) 1
imapdlg.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SVX_IMAPDLG_HXX
21#define INCLUDED_SVX_IMAPDLG_HXX
22
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>
29
30namespace vcl { class Window; }
31namespace weld { class Button; }
32namespace weld { class ComboBox; }
33namespace weld { class CustomWeld; }
34namespace weld { class Entry; }
35namespace weld { class Label; }
36namespace weld { class Toolbar; }
37namespace weld { class Widget; }
38namespace weld { class Window; }
39
40class ImageMap;
41class SvtURLBox;
42
43/*************************************************************************
44|*
45|* Derivation from SfxChildWindow as "container" for float
46|*
47\************************************************************************/
48
49class Graphic;
50typedef ::std::vector< OUString > TargetList;
51
53{
54 public:
55
57
59
60 static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap,
61 const TargetList* pTargetList, void* pEditingObj );
62};
63
64
65class SvxIMapDlg;
66
68{
70
71 virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
72 const SfxPoolItem* pState ) override;
73
74
75public:
76
77 SvxIMapDlgItem( SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
78};
79
80class IMapOwnData;
81class IMapWindow;
82class GraphCtrl;
83
85{
86 friend class IMapOwnData;
87 friend class IMapWindow;
88
89 std::unique_ptr<IMapOwnData> pOwnData;
90 void* pCheckObj;
92
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<SvtURLBox> 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;
106
107 DECL_DLLPRIVATE_LINK( TbxClickHdl, const OUString&, void );
109 DECL_DLLPRIVATE_LINK( MousePosHdl, GraphCtrl*, void );
110 DECL_DLLPRIVATE_LINK( GraphSizeHdl, GraphCtrl*, void );
111 DECL_DLLPRIVATE_LINK( URLModifyHdl, weld::ComboBox&, void );
112 DECL_DLLPRIVATE_LINK( EntryModifyHdl, weld::Entry&, void );
113 DECL_DLLPRIVATE_LINK( URLLoseFocusHdl, weld::Widget&, void );
114 DECL_DLLPRIVATE_LINK( UpdateHdl, Timer *, void );
115 DECL_DLLPRIVATE_LINK( StateHdl, GraphCtrl*, void );
116 DECL_DLLPRIVATE_LINK( CancelHdl, weld::Button&, void );
117
118 void URLModify();
119 void DoOpen();
120 bool DoSave();
121 void SetActiveTool(std::u16string_view rId);
122
123public:
124
125 SvxIMapDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
126 weld::Window* pParent);
127 virtual ~SvxIMapDlg() override;
128
129 void SetExecState( bool bEnable );
130
131 const void* GetEditingObject() const { return pCheckObj; }
132
133 const ImageMap& GetImageMap() const;
134
135 void SetTargetList( const TargetList& rTargetList );
136
137 void UpdateLink( const Graphic& rGraphic, const ImageMap* pImageMap,
138 const TargetList* pTargetList, void* pEditingObj );
139};
140
142
143#endif // INCLUDED_SVX_IMAPDLG_HXX
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetTargetList(const TargetList &rTargetList)
Definition: imapwnd.cxx:164
const ImageMap & GetImageMap()
Definition: imapwnd.cxx:139
SFX_DECL_CHILDWINDOW_WITHID(SvxIMapDlgChildWindow)
SvxIMapDlg & rIMap
Definition: imapdlg.hxx:69
virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: imapdlg.cxx:69
SvxIMapDlgItem(SvxIMapDlg &rIMapDlg, SfxBindings &rBindings)
Definition: imapdlg.cxx:63
std::unique_ptr< weld::Label > m_xStbStatus1
Definition: imapdlg.hxx:102
DECL_DLLPRIVATE_LINK(InfoHdl, IMapWindow &, void)
std::unique_ptr< weld::Toolbar > m_xTbxIMapDlg1
Definition: imapdlg.hxx:94
std::unique_ptr< weld::CustomWeld > m_xIMapWndWeld
Definition: imapdlg.hxx:105
std::unique_ptr< weld::ComboBox > m_xCbbTarget
Definition: imapdlg.hxx:100
DECL_DLLPRIVATE_LINK(StateHdl, GraphCtrl *, void)
DECL_DLLPRIVATE_LINK(MousePosHdl, GraphCtrl *, void)
std::unique_ptr< IMapWindow > m_xIMapWnd
Definition: imapdlg.hxx:93
DECL_DLLPRIVATE_LINK(EntryModifyHdl, weld::Entry &, void)
std::unique_ptr< weld::Button > m_xCancelBtn
Definition: imapdlg.hxx:101
std::unique_ptr< weld::Label > m_xStbStatus3
Definition: imapdlg.hxx:104
DECL_DLLPRIVATE_LINK(URLLoseFocusHdl, weld::Widget &, void)
std::unique_ptr< weld::Label > m_xFtText
Definition: imapdlg.hxx:97
const void * GetEditingObject() const
Definition: imapdlg.hxx:131
DECL_DLLPRIVATE_LINK(URLModifyHdl, weld::ComboBox &, void)
void * pCheckObj
Definition: imapdlg.hxx:90
SvxIMapDlgItem aIMapItem
Definition: imapdlg.hxx:91
std::unique_ptr< IMapOwnData > pOwnData
Definition: imapdlg.hxx:89
DECL_DLLPRIVATE_LINK(GraphSizeHdl, GraphCtrl *, void)
std::unique_ptr< weld::Label > m_xFtURL
Definition: imapdlg.hxx:95
DECL_DLLPRIVATE_LINK(TbxClickHdl, const OUString &, void)
DECL_DLLPRIVATE_LINK(CancelHdl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xStbStatus2
Definition: imapdlg.hxx:103
std::unique_ptr< SvtURLBox > m_xURLBox
Definition: imapdlg.hxx:96
std::unique_ptr< weld::Entry > m_xEdtText
Definition: imapdlg.hxx:98
DECL_DLLPRIVATE_LINK(UpdateHdl, Timer *, void)
std::unique_ptr< weld::Label > m_xFtTarget
Definition: imapdlg.hxx:99
::std::vector< OUString > TargetList
SVX_DLLPUBLIC SvxIMapDlg * GetIMapDlg()
Definition: imapdlg.cxx:719
::std::vector< OUString > TargetList
Definition: imapdlg.hxx:49
SfxItemState
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28