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 
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; }
39 
40 class ImageMap;
41 class SvtURLBox;
42 
43 /*************************************************************************
44 |*
45 |* Derivation from SfxChildWindow as "container" for float
46 |*
47 \************************************************************************/
48 
49 class Graphic;
50 typedef ::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 
65 class SvxIMapDlg;
66 
67 class SvxIMapDlgItem final : public SfxControllerItem
68 {
70 
71  virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
72  const SfxPoolItem* pState ) override;
73 
74 
75 public:
76 
77  SvxIMapDlgItem( SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
78 };
79 
80 class IMapOwnData;
81 class IMapWindow;
82 class 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_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 );
117 
118  void URLModify();
119  void DoOpen();
120  bool DoSave();
121  void SetActiveTool(const OString& rId);
122 
123 public:
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: */
std::unique_ptr< IMapOwnData > pOwnData
Definition: imapdlg.hxx:89
std::unique_ptr< IMapWindow > m_xIMapWnd
Definition: imapdlg.hxx:93
std::unique_ptr< weld::Label > m_xFtText
Definition: imapdlg.hxx:97
std::unique_ptr< weld::Label > m_xStbStatus3
Definition: imapdlg.hxx:104
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
SVX_DLLPUBLIC SvxIMapDlg * GetIMapDlg()
Definition: imapdlg.cxx:725
DECL_LINK(UpdateHdl, Timer *, void)
void * pCheckObj
Definition: imapdlg.hxx:90
std::unique_ptr< weld::Label > m_xFtTarget
Definition: imapdlg.hxx:99
SvxIMapDlgItem(SvxIMapDlg &rIMapDlg, SfxBindings &rBindings)
Definition: imapdlg.cxx:63
std::unique_ptr< weld::ComboBox > m_xCbbTarget
Definition: imapdlg.hxx:100
SvxIMapDlg & rIMap
Definition: imapdlg.hxx:69
std::unique_ptr< weld::Label > m_xStbStatus1
Definition: imapdlg.hxx:102
std::unique_ptr< weld::CustomWeld > m_xIMapWndWeld
Definition: imapdlg.hxx:105
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
Definition: imapdlg.cxx:69
std::unique_ptr< SvtURLBox > m_xURLBox
Definition: imapdlg.hxx:96
const void * GetEditingObject() const
Definition: imapdlg.hxx:131
std::unique_ptr< weld::Label > m_xFtURL
Definition: imapdlg.hxx:95
const ImageMap & GetImageMap()
Definition: imapwnd.cxx:140
SfxItemState
void SetTargetList(TargetList &rTargetList)
Definition: imapwnd.cxx:165
std::unique_ptr< weld::Label > m_xStbStatus2
Definition: imapdlg.hxx:103
std::unique_ptr< weld::Entry > m_xEdtText
Definition: imapdlg.hxx:98
#define SFX_DECL_CHILDWINDOW_WITHID(Class)
::std::vector< OUString > TargetList
std::unique_ptr< weld::Button > m_xCancelBtn
Definition: imapdlg.hxx:101
std::unique_ptr< weld::Toolbar > m_xTbxIMapDlg1
Definition: imapdlg.hxx:94
::std::vector< OUString > TargetList
Definition: imapdlg.hxx:49
SvxIMapDlgItem aIMapItem
Definition: imapdlg.hxx:91