![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * T a b I t e m W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,2009 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 * $Id: FXTabItem.h,v 1.16 2009/01/06 13:07:28 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXTABITEM_H 00024 #define FXTABITEM_H 00025 00026 #ifndef FXLABEL_H 00027 #include "FXLabel.h" 00028 #endif 00029 00030 namespace FX { 00031 00032 00033 /// Tab Item orientations which affect border 00034 enum { 00035 TAB_TOP = 0, // Top side tabs 00036 TAB_LEFT = 0x00800000, // Left side tabs 00037 TAB_RIGHT = 0x01000000, // Right side tabs 00038 TAB_BOTTOM = 0x01800000, // Bottom side tabs 00039 TAB_TOP_NORMAL = JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_TOP|FRAME_RAISED|FRAME_THICK, 00040 TAB_BOTTOM_NORMAL= JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_BOTTOM|FRAME_RAISED|FRAME_THICK, 00041 TAB_LEFT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_LEFT|FRAME_RAISED|FRAME_THICK, 00042 TAB_RIGHT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_RIGHT|FRAME_RAISED|FRAME_THICK 00043 }; 00044 00045 00046 class FXTabBar; 00047 00048 00049 /** 00050 * A tab item is placed in a tab bar or tab book. 00051 * When selected, the tab item sends a message to its 00052 * parent, and causes itself to become the active tab, 00053 * and raised slightly above the other tabs. 00054 * In the tab book, activating a tab item also causes 00055 * the corresponding panel to be raised to the top. 00056 */ 00057 class FXAPI FXTabItem : public FXLabel { 00058 FXDECLARE(FXTabItem) 00059 protected: 00060 FXTabItem(){} 00061 private: 00062 FXTabItem(const FXTabItem&); 00063 FXTabItem& operator=(const FXTabItem&); 00064 public: 00065 long onPaint(FXObject*,FXSelector,void*); 00066 long onFocusIn(FXObject*,FXSelector,void*); 00067 long onFocusOut(FXObject*,FXSelector,void*); 00068 long onUngrabbed(FXObject*,FXSelector,void*); 00069 long onLeftBtnPress(FXObject*,FXSelector,void*); 00070 long onLeftBtnRelease(FXObject*,FXSelector,void*); 00071 long onKeyPress(FXObject*,FXSelector,void*); 00072 long onKeyRelease(FXObject*,FXSelector,void*); 00073 long onHotKeyPress(FXObject*,FXSelector,void*); 00074 long onHotKeyRelease(FXObject*,FXSelector,void*); 00075 public: 00076 00077 /// Construct a tab item 00078 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); 00079 00080 /// Returns true because a tab item can receive focus 00081 virtual FXbool canFocus() const; 00082 00083 /// Return current tab item orientation 00084 FXuint getTabOrientation() const; 00085 00086 /// Change tab item orientation 00087 void setTabOrientation(FXuint style); 00088 }; 00089 00090 } 00091 00092 #endif
![]() |