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

FXTabItem.h

00001 /******************************************************************************** 00002 * * 00003 * T a b I t e m W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,2005 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.8 2005/01/16 16:06:06 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 00034 /// Tab Item orientations which affect border 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 00050 /** 00051 * A tab item is placed in a tab bar or tab book. 00052 * When selected, the tab item sends a message to its 00053 * parent, and causes itself to become the active tab, 00054 * and raised slightly above the other tabs. 00055 * In the tab book, activating a tab item also causes 00056 * the corresponding panel to be raised to the top. 00057 */ 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 00078 /// Construct a tab item 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 00081 /// Returns true because a tab item can receive focus 00082 virtual FXbool canFocus() const; 00083 00084 /// Return current tab item orientation 00085 FXuint getTabOrientation() const; 00086 00087 /// Change tab item orientation 00088 void setTabOrientation(FXuint style); 00089 }; 00090 00091 } 00092 00093 #endif

Copyright © 1997-2005 Jeroen van der Zijp