"Fossies" - the Fresh Open Source Software Archive

Member "tvnserver-2.0.4/gui/BalloonTip.cpp" (3 Aug 2011, 1989 Bytes) of archive /windows/misc/tvnserver-2.0.4-src.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "BalloonTip.cpp" see the Fossies "Dox" file reference documentation.

    1 // Copyright (C) 2008, 2009, 2010 GlavSoft LLC.
    2 // All rights reserved.
    3 //
    4 //-------------------------------------------------------------------------
    5 // This file is part of the TightVNC software.  Please visit our Web site:
    6 //
    7 //                       http://www.tightvnc.com/
    8 //
    9 // This program is free software; you can redistribute it and/or modify
   10 // it under the terms of the GNU General Public License as published by
   11 // the Free Software Foundation; either version 2 of the License, or
   12 // (at your option) any later version.
   13 //
   14 // This program is distributed in the hope that it will be useful,
   15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
   16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17 // GNU General Public License for more details.
   18 //
   19 // You should have received a copy of the GNU General Public License along
   20 // with this program; if not, write to the Free Software Foundation, Inc.,
   21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   22 //-------------------------------------------------------------------------
   23 //
   24 
   25 #include "BalloonTip.h"
   26 
   27 BalloonTip::BalloonTip(const TCHAR *text, const TCHAR *caption)
   28 {
   29   setText(text);
   30   setTitle(caption);
   31 }
   32 
   33 BalloonTip::BalloonTip()
   34 {
   35   setText(_T(""));
   36   setTitle(_T(""));
   37 }
   38 
   39 BalloonTip::~BalloonTip()
   40 {
   41 }
   42 
   43 void BalloonTip::showTooltip(Control *control)
   44 {
   45   MessageBox(control->getWindow(), m_text.getString(), m_title.getString(), MB_OK | MB_ICONWARNING);
   46 }
   47 
   48 void BalloonTip::setText(const TCHAR *text)
   49 {
   50   m_text.setString(text);
   51 }
   52 
   53 void BalloonTip::setTitle(const TCHAR *title)
   54 {
   55   m_title.setString(title);
   56 }
   57 
   58 void BalloonTip::getText(StringStorage *text) const
   59 {
   60   text->setString(m_text.getString());
   61 }
   62 
   63 void BalloonTip::getTitle(StringStorage *title) const
   64 {
   65   title->setString(m_title.getString());
   66 }
   67 
   68 void BalloonTip::setIconType(int iconType)
   69 {
   70 }
   71 
   72 int BalloonTip::getIconType() const
   73 {
   74   return 0;
   75 }