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

FXTabBook.h

00001 /******************************************************************************** 00002 * * 00003 * T a b B o o k W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1997,2004 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: FXTabBook.h,v 1.7 2004/02/08 17:17:34 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXTABBOOK_H 00025 #define FXTABBOOK_H 00026 00027 #ifndef FXTABBAR_H 00028 #include "FXTabBar.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 /** 00035 * The tab book layout manager arranges pairs of children; 00036 * the even numbered children (0,2,4,...) are usually tab items, 00037 * and are placed on the top. The odd numbered children are 00038 * usually layout managers, and are placed below; all the odd 00039 * numbered children are placed on top of each other, similar 00040 * to the switcher widget. When the user presses one of the 00041 * tab items, the tab item is raised above the neighboring tabs, 00042 * and the corresponding panel is raised to the top. 00043 * Thus, a tab book can be used to present many GUI controls 00044 * in a small space by placing several panels on top of each 00045 * other and using tab items to select the desired panel. 00046 */ 00047 class FXAPI FXTabBook : public FXTabBar { 00048 FXDECLARE(FXTabBook) 00049 protected: 00050 FXTabBook(){} 00051 private: 00052 FXTabBook(const FXTabBook&); 00053 FXTabBook& operator=(const FXTabBook&); 00054 public: 00055 long onPaint(FXObject*,FXSelector,void*); 00056 long onFocusNext(FXObject*,FXSelector,void*); 00057 long onFocusPrev(FXObject*,FXSelector,void*); 00058 long onFocusUp(FXObject*,FXSelector,void*); 00059 long onFocusDown(FXObject*,FXSelector,void*); 00060 long onFocusLeft(FXObject*,FXSelector,void*); 00061 long onFocusRight(FXObject*,FXSelector,void*); 00062 long onCmdOpenItem(FXObject*,FXSelector,void*); 00063 public: 00064 00065 /// Construct tab book 00066 FXTabBook(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=TABBOOK_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING); 00067 00068 /// Perform layout 00069 virtual void layout(); 00070 00071 /// Return default width 00072 virtual FXint getDefaultWidth(); 00073 00074 /// Return default height 00075 virtual FXint getDefaultHeight(); 00076 }; 00077 00078 } 00079 00080 #endif

Copyright © 1997-2004 Jeroen van der Zijp