1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 25 #ifndef _IMAPDLG_HXX_ 26 #define _IMAPDLG_HXX_ 27 28 #include <svtools/inettbc.hxx> 29 #include <sfx2/childwin.hxx> 30 #include <sfx2/ctrlitem.hxx> 31 #include <sfx2/basedlgs.hxx> 32 33 #ifndef _FIXED_HXX //autogen 34 #include <vcl/fixed.hxx> 35 #endif 36 37 #ifndef _COMBOBOX_HXX //autogen 38 #include <vcl/combobox.hxx> 39 #endif 40 41 #ifndef _EDIT_HXX //autogen 42 #include <vcl/edit.hxx> 43 #endif 44 45 #ifndef _TOOLBOX_HXX //autogen 46 #include <vcl/toolbox.hxx> 47 #endif 48 49 #ifndef _STATUS_HXX //autogen 50 #include <vcl/status.hxx> 51 #endif 52 #include "svx/svxdllapi.h" 53 54 55 #ifndef _GOMISC_HXX 56 class ImageMap; 57 #endif 58 59 60 /************************************************************************* 61 |* 62 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Float 63 |* 64 \************************************************************************/ 65 66 class Graphic; 67 class TargetList; 68 69 class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow 70 { 71 public: 72 73 SvxIMapDlgChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); 74 75 SFX_DECL_CHILDWINDOW( SvxIMapDlgChildWindow ); 76 77 static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap = NULL, 78 const TargetList* pTargetList = NULL, void* pEditingObj = NULL ); 79 }; 80 81 82 #ifndef _REDUCED_IMAPDLG_HXX_ 83 #define _REDUCED_IMAPDLG_HXX_ 84 85 /************************************************************************* 86 |* 87 |* 88 |* 89 \************************************************************************/ 90 91 class SvxIMapDlg; 92 93 class SvxIMapDlgItem : public SfxControllerItem 94 { 95 SvxIMapDlg& rIMap; 96 97 98 protected: 99 100 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 101 const SfxPoolItem* pState ); 102 103 104 public: 105 106 SvxIMapDlgItem( sal_uInt16 nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings ); 107 }; 108 109 110 /************************************************************************* 111 |* 112 |* 113 |* 114 \************************************************************************/ 115 116 class IMapOwnData; 117 class IMapWindow; 118 119 class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow 120 { 121 friend class IMapOwnData; 122 friend class IMapWindow; 123 using Window::Update; 124 125 ToolBox aTbxIMapDlg1; 126 FixedText aFtURL; 127 SvtURLBox maURLBox; 128 FixedText aFtText; 129 Edit aEdtText; 130 FixedText maFtTarget; 131 ComboBox maCbbTarget; 132 StatusBar aStbStatus; 133 ImageList maImageList; 134 ImageList maImageListH; 135 136 Size aLastSize; 137 IMapWindow* pIMapWnd; 138 IMapOwnData* pOwnData; 139 void* pCheckObj; 140 SvxIMapDlgItem aIMapItem; 141 142 virtual void Resize(); 143 virtual sal_Bool Close(); 144 145 #ifdef _IMAPDLG_PRIVATE 146 147 DECL_LINK( TbxClickHdl, ToolBox* ); 148 DECL_LINK( InfoHdl, IMapWindow* ); 149 DECL_LINK( MousePosHdl, IMapWindow* ); 150 DECL_LINK( GraphSizeHdl, IMapWindow* ); 151 DECL_LINK( URLModifyHdl, void* ); 152 DECL_LINK( URLLoseFocusHdl, void* ); 153 DECL_LINK( UpdateHdl, Timer* ); 154 DECL_LINK( TbxUpdateHdl, Timer* ); 155 DECL_LINK( StateHdl, IMapWindow* ); 156 DECL_LINK( MiscHdl, void* ); 157 158 void DoOpen(); 159 sal_Bool DoSave(); 160 161 #endif 162 163 164 public: 165 166 SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW, 167 Window* pParent, const ResId& rResId ); 168 ~SvxIMapDlg(); 169 170 void SetExecState( sal_Bool bEnable ); 171 172 void SetGraphic( const Graphic& rGraphic ); 173 SetEditingObject(void * pObj)174 void SetEditingObject( void* pObj ) { pCheckObj = pObj; } GetEditingObject() const175 const void* GetEditingObject() const { return pCheckObj; } 176 177 void SetImageMap( const ImageMap& rImageMap ); 178 const ImageMap& GetImageMap() const; 179 180 void SetTargetList( const TargetList& rTargetList ); 181 const TargetList& GetTargetList() const; 182 183 void Update( const Graphic& rGraphic, const ImageMap* pImageMap = NULL, 184 const TargetList* pTargetList = NULL, void* pEditingObj = NULL ); 185 186 virtual void KeyInput( const KeyEvent& rKEvt ); 187 188 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 189 void ApplyImageList(); 190 }; 191 192 193 /************************************************************************* 194 |* 195 |* Defines 196 |* 197 \************************************************************************/ 198 199 #define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \ 200 SvxIMapDlgChildWindow::GetChildWindowId() )-> \ 201 GetWindow() ) ) 202 203 204 #endif // _REDUCED_IMAPDLG_HXX_ 205 #endif // _IMAPDLG_HXX_ 206 207 208