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 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_sw.hxx" 26 27 28 29 #ifndef _CMDID_H 30 #include <cmdid.h> 31 #endif 32 #include <swtypes.hxx> 33 #include <popbox.hxx> 34 #include <navipi.hxx> 35 36 37 // --- class SwHelpToolBox --------------------------------------------- 38 39 40 SwHelpToolBox::SwHelpToolBox( SwNavigationPI* pParent, const ResId& rResId ) 41 : ToolBox( pParent, rResId ), 42 DropTargetHelper( this ) 43 { 44 } 45 46 47 void SwHelpToolBox::MouseButtonDown(const MouseEvent &rEvt) 48 { 49 // Zuerst DoubleClick-Link auswerten 50 // Dessen Returnwert entscheidet ueber andere Verarbeitung 51 // Doppelclickhandler nur, wenn nicht auf einen Button geclickt wurde 52 if(rEvt.GetButtons() == MOUSE_RIGHT && 53 0 == GetItemId(rEvt.GetPosPixel())) 54 { 55 aRightClickLink.Call((MouseEvent *)&rEvt); 56 } 57 else 58 ToolBox::MouseButtonDown(rEvt); 59 } 60 61 62 long SwHelpToolBox::DoubleClick( ToolBox* pCaller ) 63 { 64 // kein Doppelklick auf einen Button 65 if( 0 == pCaller->GetCurItemId() && aDoubleClickLink.Call(0) ) 66 return sal_True; 67 return sal_False; 68 } 69 70 /*-----------------26.02.94 00:36------------------- 71 dtor ueberladen 72 --------------------------------------------------*/ 73 74 75 SwHelpToolBox::~SwHelpToolBox() {} 76 77 sal_Int8 SwHelpToolBox::AcceptDrop( const AcceptDropEvent& rEvt ) 78 { 79 return ((SwNavigationPI*)GetParent())->AcceptDrop( rEvt ); 80 } 81 82 sal_Int8 SwHelpToolBox::ExecuteDrop( const ExecuteDropEvent& rEvt ) 83 { 84 return ((SwNavigationPI*)GetParent())->ExecuteDrop( rEvt ); 85 } 86 87 88