1 /* 2 * Copyright (C) 2002 - David W. Durham 3 * 4 * This file is part of ReZound, an audio editing application. 5 * 6 * ReZound is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published 8 * by the Free Software Foundation; either version 2 of the License, 9 * or (at your option) any later version. 10 * 11 * ReZound is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 19 */ 20 21 #ifndef __FXPopupHint_H__ 22 #define __FXPopupHint_H__ 23 24 #include "../../config/common.h" 25 #include "fox_compat.h" 26 27 /* 28 * This class derives from FXToolTip except it intercepts the 29 * SEL_UPDATE events and keeps FXToolTip from hiding itself 30 * upon that event. 31 * It also makes autoplace public 32 */ 33 34 class FXPopupHint : public FXToolTip 35 { 36 FXDECLARE(FXPopupHint) 37 public: 38 FXPopupHint(FXApp *app) : 39 FXToolTip(app,TOOLTIP_PERMANENT) 40 { 41 } 42 43 virtual ~FXPopupHint() 44 { 45 } 46 47 FXPopupHint() {} 48 49 long onUpdate(FXObject* sender,FXSelector sel,void* ptr){ 50 FXWindow::onUpdate(sender,sel,ptr); 51 return 1; 52 } 53 54 void autoplace() 55 { 56 FXToolTip::autoplace(); 57 } 58 59 private: 60 }; 61 62 FXDEFMAP(FXPopupHint) FXPopupHintMap[]= 63 { 64 FXMAPFUNC(SEL_UPDATE,0,FXPopupHint::onUpdate), 65 }; 66 FXIMPLEMENT(FXPopupHint,FXToolTip,FXPopupHintMap,ARRAYNUMBER(FXPopupHintMap)) 67 68 #endif 69