1 /* 2 * =========================== 3 * VDK Visual Development Kit 4 * Version 0.4 5 * October 1998 6 * =========================== 7 * 8 * Copyright (C) 1998, Mario Motta 9 * Developed by Mario Motta <mmotta@guest.net> 10 * 11 * This library is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU Library General Public 13 * License as published by the Free Software Foundation; either 14 * version 2 of the License, or (at your option) any later version. 15 * 16 * This library is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * Library General Public License for more details. 20 * 21 * You should have received a copy of the GNU Library General Public 22 * License along with this library; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 24 * 02111-1307, USA. 25 */ 26 27 #ifndef TOOLTIPS_H 28 #define TOOLTIPS_H 29 30 #include <vdk/vdkobj.h> 31 class VDKColor; 32 /*! 33 \class VDKTooltip 34 \brief Provides a tooltip 35 */ 36 class VDKTooltip: public VDKObject 37 { 38 char* tip; 39 GtkTooltips* tooltip; 40 VDKObject* tipped; 41 int delay; 42 public: 43 /*! 44 Constructor. 45 \param owner 46 \param tipped object 47 \param tip 48 \param delay 49 */ 50 VDKTooltip(VDKForm* owner,VDKObject *tipped, 51 const char* tip, int delay = 0); 52 /*! 53 Destructor 54 */ 55 ~VDKTooltip(); 56 /*! 57 This does not work at all ! 58 \par TIP 59 Tip background should be customized via an rc file like this: 60 \code 61 style "tooltip" 62 { 63 bg[NORMAL] = {1.0, 1.0, 0.0} 64 fg[NORMAL] = {0.0, 1.0, 0.0} 65 } 66 widget "gtk-tooltips*" style "tooltip" 67 \endcode 68 Recall that almost all gtk themes except default one override 69 your tip settings. 70 */ 71 virtual void SetColors(int fred, int fgreen, int fblue, 72 int bred, int bgreen, int bblue); 73 /*! 74 Change tip 75 */ 76 void SetTip(const char* ); 77 /*! 78 Sets delay time in msecs 79 */ 80 void SetDelay(int delay); 81 }; 82 #endif 83