Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

/home/jeroen/FOX/fox/fox-1.7.33/include/FXTabItem.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                           T a b   I t e m    W i d g e t                      *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXTABITEM_H
00022 #define FXTABITEM_H
00023 
00024 #ifndef FXLABEL_H
00025 #include "FXLabel.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00032 enum {
00033   TAB_TOP          = 0,           // Top side tabs
00034   TAB_LEFT         = 0x00800000,  // Left side tabs
00035   TAB_RIGHT        = 0x01000000,  // Right side tabs
00036   TAB_BOTTOM       = 0x01800000,  // Bottom side tabs
00037   TAB_TOP_NORMAL   = JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_TOP|FRAME_RAISED|FRAME_THICK,
00038   TAB_BOTTOM_NORMAL= JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_BOTTOM|FRAME_RAISED|FRAME_THICK,
00039   TAB_LEFT_NORMAL  = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_LEFT|FRAME_RAISED|FRAME_THICK,
00040   TAB_RIGHT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_RIGHT|FRAME_RAISED|FRAME_THICK
00041   };
00042 
00043 
00044 class FXTabBar;
00045 
00046 
00055 class FXAPI FXTabItem : public FXLabel {
00056   FXDECLARE(FXTabItem)
00057 protected:
00058   FXTabItem(){}
00059 private:
00060   FXTabItem(const FXTabItem&);
00061   FXTabItem& operator=(const FXTabItem&);
00062 public:
00063   long onPaint(FXObject*,FXSelector,void*);
00064   long onFocusIn(FXObject*,FXSelector,void*);
00065   long onFocusOut(FXObject*,FXSelector,void*);
00066   long onUngrabbed(FXObject*,FXSelector,void*);
00067   long onLeftBtnPress(FXObject*,FXSelector,void*);
00068   long onLeftBtnRelease(FXObject*,FXSelector,void*);
00069   long onKeyPress(FXObject*,FXSelector,void*);
00070   long onKeyRelease(FXObject*,FXSelector,void*);
00071   long onHotKeyPress(FXObject*,FXSelector,void*);
00072   long onHotKeyRelease(FXObject*,FXSelector,void*);
00073 public:
00074 
00076   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);
00077 
00079   virtual FXbool canFocus() const;
00080 
00082   FXuint getTabOrientation() const;
00083 
00085   void setTabOrientation(FXuint style);
00086   };
00087 
00088 }
00089 
00090 #endif

Copyright © 1997-2011 Jeroen van der Zijp