FXTabItem.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                           T a b   I t e m    W i d g e t                      *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXTabItem.h,v 1.10 2006/01/22 17:58:10 fox Exp $                          *
00023 ********************************************************************************/
00024 #ifndef FXTABITEM_H
00025 #define FXTABITEM_H
00026 
00027 #ifndef FXLABEL_H
00028 #include "FXLabel.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00035 enum {
00036   TAB_TOP          = 0,           // Top side tabs
00037   TAB_LEFT         = 0x00800000,  // Left side tabs
00038   TAB_RIGHT        = 0x01000000,  // Right side tabs
00039   TAB_BOTTOM       = 0x01800000,  // Bottom side tabs
00040   TAB_TOP_NORMAL   = JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_TOP|FRAME_RAISED|FRAME_THICK,
00041   TAB_BOTTOM_NORMAL= JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_BOTTOM|FRAME_RAISED|FRAME_THICK,
00042   TAB_LEFT_NORMAL  = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_LEFT|FRAME_RAISED|FRAME_THICK,
00043   TAB_RIGHT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_RIGHT|FRAME_RAISED|FRAME_THICK
00044   };
00045 
00046 
00047 class FXTabBar;
00048 
00049 
00058 class FXAPI FXTabItem : public FXLabel {
00059   FXDECLARE(FXTabItem)
00060 protected:
00061   FXTabItem(){}
00062 private:
00063   FXTabItem(const FXTabItem&);
00064   FXTabItem& operator=(const FXTabItem&);
00065 public:
00066   long onPaint(FXObject*,FXSelector,void*);
00067   long onFocusIn(FXObject*,FXSelector,void*);
00068   long onFocusOut(FXObject*,FXSelector,void*);
00069   long onUngrabbed(FXObject*,FXSelector,void*);
00070   long onLeftBtnPress(FXObject*,FXSelector,void*);
00071   long onLeftBtnRelease(FXObject*,FXSelector,void*);
00072   long onKeyPress(FXObject*,FXSelector,void*);
00073   long onKeyRelease(FXObject*,FXSelector,void*);
00074   long onHotKeyPress(FXObject*,FXSelector,void*);
00075   long onHotKeyRelease(FXObject*,FXSelector,void*);
00076 public:
00077 
00079   FXTabItem(FXTabBar* p,const FXString& text,FXIcon* ic=0,FXuint opts=TAB_TOP_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
00080 
00082   virtual bool canFocus() const;
00083 
00085   FXuint getTabOrientation() const;
00086 
00088   void setTabOrientation(FXuint style);
00089   };
00090 
00091 }
00092 
00093 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:24 2009 for TnFOX by doxygen v1.4.7