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

FXTabBook.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * T a b B o o k W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXTabBook.h,v 1.10 2006/01/22 17:58:10 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXTABBOOK_H
25 #define FXTABBOOK_H
26 
27 #ifndef FXTABBAR_H
28 #include "FXTabBar.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /**
35 * The tab book layout manager arranges pairs of children;
36 * the even numbered children (0,2,4,...) are usually tab items,
37 * and are placed on the top. The odd numbered children are
38 * usually layout managers, and are placed below; all the odd
39 * numbered children are placed on top of each other, similar
40 * to the switcher widget. When the user presses one of the
41 * tab items, the tab item is raised above the neighboring tabs,
42 * and the corresponding panel is raised to the top.
43 * Thus, a tab book can be used to present many GUI controls
44 * in a small space by placing several panels on top of each
45 * other and using tab items to select the desired panel.
46 * When one of the tab items is pressed, the tab book's setCurrent()
47 * is called with notify=TRUE. Thus causes the tab book to send a
48 * SEL_COMMAND message to its target.
49 */
50 class FXAPI FXTabBook : public FXTabBar {
52 protected:
53  FXTabBook(){}
54 private:
55  FXTabBook(const FXTabBook&);
56  FXTabBook& operator=(const FXTabBook&);
57 public:
58  long onPaint(FXObject*,FXSelector,void*);
59  long onFocusNext(FXObject*,FXSelector,void*);
60  long onFocusPrev(FXObject*,FXSelector,void*);
61  long onFocusUp(FXObject*,FXSelector,void*);
62  long onFocusDown(FXObject*,FXSelector,void*);
63  long onFocusLeft(FXObject*,FXSelector,void*);
64  long onFocusRight(FXObject*,FXSelector,void*);
65  long onCmdOpenItem(FXObject*,FXSelector,void*);
66 public:
67 
68  /// Construct tab book
70 
71  /// Perform layout
72  virtual void layout();
73 
74  /// Return default width
75  virtual FXint getDefaultWidth();
76 
77  /// Return default height
78  virtual FXint getDefaultHeight();
79  };
80 
81 }
82 
83 #endif
unsigned int FXuint
Definition: fxdefs.h:389
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
The tab bar layout manager arranges tab items side by side, and raises the active tab item above the ...
Definition: FXTabBar.h:63
Base composite.
Definition: FXComposite.h:35
#define NULL
Definition: fxdefs.h:41
Normal tabs.
Definition: FXTabBar.h:44
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:390
Definition: FXPacker.h:38
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
The tab book layout manager arranges pairs of children; the even numbered children (0...
Definition: FXTabBook.h:50
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp