1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 29 #ifndef _IMAPDLG_HXX_ 30 #define _IMAPDLG_HXX_ 31 32 #include <svtools/inettbc.hxx> 33 #include <sfx2/childwin.hxx> 34 #include <sfx2/ctrlitem.hxx> 35 #include <sfx2/basedlgs.hxx> 36 37 #ifndef _FIXED_HXX //autogen 38 #include <vcl/fixed.hxx> 39 #endif 40 41 #ifndef _COMBOBOX_HXX //autogen 42 #include <vcl/combobox.hxx> 43 #endif 44 45 #ifndef _EDIT_HXX //autogen 46 #include <vcl/edit.hxx> 47 #endif 48 49 #ifndef _TOOLBOX_HXX //autogen 50 #include <vcl/toolbox.hxx> 51 #endif 52 53 #ifndef _STATUS_HXX //autogen 54 #include <vcl/status.hxx> 55 #endif 56 #include "svx/svxdllapi.h" 57 58 59 #ifndef _GOMISC_HXX 60 class ImageMap; 61 #endif 62 63 64 /************************************************************************* 65 |* 66 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Float 67 |* 68 \************************************************************************/ 69 70 class Graphic; 71 class TargetList; 72 73 class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow 74 { 75 public: 76 77 SvxIMapDlgChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); 78 79 SFX_DECL_CHILDWINDOW( SvxIMapDlgChildWindow ); 80 81 static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap = NULL, 82 const TargetList* pTargetList = NULL, void* pEditingObj = NULL ); 83 }; 84 85 86 #ifndef _REDUCED_IMAPDLG_HXX_ 87 #define _REDUCED_IMAPDLG_HXX_ 88 89 /************************************************************************* 90 |* 91 |* 92 |* 93 \************************************************************************/ 94 95 class SvxIMapDlg; 96 97 class SvxIMapDlgItem : public SfxControllerItem 98 { 99 SvxIMapDlg& rIMap; 100 101 102 protected: 103 104 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 105 const SfxPoolItem* pState ); 106 107 108 public: 109 110 SvxIMapDlgItem( sal_uInt16 nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings ); 111 }; 112 113 114 /************************************************************************* 115 |* 116 |* 117 |* 118 \************************************************************************/ 119 120 class IMapOwnData; 121 class IMapWindow; 122 123 class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow 124 { 125 friend class IMapOwnData; 126 friend class IMapWindow; 127 using Window::Update; 128 129 ToolBox aTbxIMapDlg1; 130 FixedText aFtURL; 131 SvtURLBox maURLBox; 132 FixedText aFtText; 133 Edit aEdtText; 134 FixedText maFtTarget; 135 ComboBox maCbbTarget; 136 StatusBar aStbStatus; 137 ImageList maImageList; 138 ImageList maImageListH; 139 140 Size aLastSize; 141 IMapWindow* pIMapWnd; 142 IMapOwnData* pOwnData; 143 void* pCheckObj; 144 SvxIMapDlgItem aIMapItem; 145 146 virtual void Resize(); 147 virtual sal_Bool Close(); 148 149 #ifdef _IMAPDLG_PRIVATE 150 151 DECL_LINK( TbxClickHdl, ToolBox* ); 152 DECL_LINK( InfoHdl, IMapWindow* ); 153 DECL_LINK( MousePosHdl, IMapWindow* ); 154 DECL_LINK( GraphSizeHdl, IMapWindow* ); 155 DECL_LINK( URLModifyHdl, void* ); 156 DECL_LINK( URLLoseFocusHdl, void* ); 157 DECL_LINK( UpdateHdl, Timer* ); 158 DECL_LINK( TbxUpdateHdl, Timer* ); 159 DECL_LINK( StateHdl, IMapWindow* ); 160 DECL_LINK( MiscHdl, void* ); 161 162 void DoOpen(); 163 sal_Bool DoSave(); 164 165 #endif 166 167 168 public: 169 170 SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW, 171 Window* pParent, const ResId& rResId ); 172 ~SvxIMapDlg(); 173 174 void SetExecState( sal_Bool bEnable ); 175 176 void SetGraphic( const Graphic& rGraphic ); 177 178 void SetEditingObject( void* pObj ) { pCheckObj = pObj; } 179 const void* GetEditingObject() const { return pCheckObj; } 180 181 void SetImageMap( const ImageMap& rImageMap ); 182 const ImageMap& GetImageMap() const; 183 184 void SetTargetList( const TargetList& rTargetList ); 185 const TargetList& GetTargetList() const; 186 187 void Update( const Graphic& rGraphic, const ImageMap* pImageMap = NULL, 188 const TargetList* pTargetList = NULL, void* pEditingObj = NULL ); 189 190 virtual void KeyInput( const KeyEvent& rKEvt ); 191 192 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 193 void ApplyImageList(); 194 }; 195 196 197 /************************************************************************* 198 |* 199 |* Defines 200 |* 201 \************************************************************************/ 202 203 #define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \ 204 SvxIMapDlgChildWindow::GetChildWindowId() )-> \ 205 GetWindow() ) ) 206 207 208 #endif // _REDUCED_IMAPDLG_HXX_ 209 #endif // _IMAPDLG_HXX_ 210 211 212