"Fossies" - the Fresh Open Source Software Archive

Member "tvnserver-2.0.4/gui/Tab.h" (3 Aug 2011, 1804 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 "Tab.h" 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 #ifndef _TAB_H_
   26 #define _TAB_H_
   27 
   28 #include "BaseDialog.h"
   29 #include "Control.h"
   30 #include "util/StringStorage.h"
   31 
   32 class Tab
   33 {
   34 public:
   35   Tab();
   36   Tab(BaseDialog *dialog, const TCHAR *caption);
   37 
   38   void setCaption(const TCHAR *caption) { m_caption.setString(caption); }
   39 
   40   const TCHAR *getCaption() {
   41     if (m_caption.isNull()) {
   42       m_caption.setString(_T(""));
   43     }
   44     return m_caption.getString();
   45   }
   46 
   47   void setDialog(BaseDialog *dialog) { m_dialog = dialog; }
   48   BaseDialog *getDialog() { return m_dialog; }
   49 
   50   bool isOk() { return m_dialog != NULL; }
   51 
   52   void setVisible(bool visible);
   53 
   54 protected:
   55 
   56   BaseDialog *m_dialog;
   57   StringStorage m_caption;
   58 };
   59 
   60 #endif