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

FXTabItem.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * T a b I t e m 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: FXTabItem.h,v 1.10 2006/01/22 17:58:10 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXTABITEM_H
25 #define FXTABITEM_H
26 
27 #ifndef FXLABEL_H
28 #include "FXLabel.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /// Tab Item orientations which affect border
35 enum {
36  TAB_TOP = 0, // Top side tabs
37  TAB_LEFT = 0x00800000, // Left side tabs
38  TAB_RIGHT = 0x01000000, // Right side tabs
39  TAB_BOTTOM = 0x01800000, // Bottom side tabs
44  };
45 
46 
47 class FXTabBar;
48 
49 
50 /**
51 * A tab item is placed in a tab bar or tab book.
52 * When selected, the tab item sends a message to its
53 * parent, and causes itself to become the active tab,
54 * and raised slightly above the other tabs.
55 * In the tab book, activating a tab item also causes
56 * the corresponding panel to be raised to the top.
57 */
58 class FXAPI FXTabItem : public FXLabel {
60 protected:
61  FXTabItem(){}
62 private:
63  FXTabItem(const FXTabItem&);
64  FXTabItem& operator=(const FXTabItem&);
65 public:
66  long onPaint(FXObject*,FXSelector,void*);
67  long onFocusIn(FXObject*,FXSelector,void*);
68  long onFocusOut(FXObject*,FXSelector,void*);
69  long onUngrabbed(FXObject*,FXSelector,void*);
70  long onLeftBtnPress(FXObject*,FXSelector,void*);
71  long onLeftBtnRelease(FXObject*,FXSelector,void*);
72  long onKeyPress(FXObject*,FXSelector,void*);
73  long onKeyRelease(FXObject*,FXSelector,void*);
74  long onHotKeyPress(FXObject*,FXSelector,void*);
75  long onHotKeyRelease(FXObject*,FXSelector,void*);
76 public:
77 
78  /// Construct a tab item
80 
81  /// Returns true because a tab item can receive focus
82  virtual bool canFocus() const;
83 
84  /// Return current tab item orientation
85  FXuint getTabOrientation() const;
86 
87  /// Change tab item orientation
88  void setTabOrientation(FXuint style);
89  };
90 
91 }
92 
93 #endif
A label widget can be used to place a text and/or icon for explanation purposes.
Definition: FXLabel.h:79
unsigned int FXuint
Definition: fxdefs.h:389
Right side tabs.
Definition: FXTabItem.h:41
Definition: FXFrame.h:56
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
Left side tabs.
Definition: FXTabItem.h:40
Top side tabs.
Definition: FXTabItem.h:39
Definition: FXTabItem.h:43
Definition: FXTabItem.h:44
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:390
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:45
Contents left-justified.
Definition: FXFrame.h:41
Bottom side tabs.
Definition: FXTabItem.h:42
Raised border.
Definition: FXWindow.h:77
Definition: FXTabItem.h:46
A tab item is placed in a tab bar or tab book.
Definition: FXTabItem.h:65
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
Thick border.
Definition: FXWindow.h:78
Definition: FXTabItem.h:45
Icon appears before text (to its left)
Definition: FXLabel.h:41
Default justification is centered text.
Definition: FXFrame.h:39
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92
Contents centered vertically.
Definition: FXFrame.h:44
FXString provides essential string manipulation capabilities.
Definition: FXString.h:33

Copyright © 1997-2005 Jeroen van der Zijp