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

FXTabItem.h
1 /********************************************************************************
2 * *
3 * T a b I t e m W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2024 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (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 *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXTABITEM_H
22 #define FXTABITEM_H
23 
24 #ifndef FXLABEL_H
25 #include "FXLabel.h"
26 #endif
27 
28 namespace FX {
29 
30 
32 enum {
33  TAB_TOP = 0, // Top side tabs
34  TAB_LEFT = 0x00800000, // Left side tabs
35  TAB_RIGHT = 0x01000000, // Right side tabs
36  TAB_BOTTOM = 0x01800000, // Bottom side tabs
37  TAB_TOP_NORMAL = JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_TOP|FRAME_RAISED|FRAME_THICK,
38  TAB_BOTTOM_NORMAL= JUSTIFY_NORMAL|ICON_BEFORE_TEXT|TAB_BOTTOM|FRAME_RAISED|FRAME_THICK,
39  TAB_LEFT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_LEFT|FRAME_RAISED|FRAME_THICK,
40  TAB_RIGHT_NORMAL = JUSTIFY_LEFT|JUSTIFY_CENTER_Y|ICON_BEFORE_TEXT|TAB_RIGHT|FRAME_RAISED|FRAME_THICK
41  };
42 
43 
44 class FXTabBar;
45 
46 
55 class FXAPI FXTabItem : public FXLabel {
56  FXDECLARE(FXTabItem)
57 protected:
58  FXTabItem(){}
59 private:
60  FXTabItem(const FXTabItem&);
61  FXTabItem& operator=(const FXTabItem&);
62 public:
63  long onPaint(FXObject*,FXSelector,void*);
64  long onFocusIn(FXObject*,FXSelector,void*);
65  long onFocusOut(FXObject*,FXSelector,void*);
66  long onUngrabbed(FXObject*,FXSelector,void*);
67  long onLeftBtnPress(FXObject*,FXSelector,void*);
68  long onLeftBtnRelease(FXObject*,FXSelector,void*);
69  long onKeyPress(FXObject*,FXSelector,void*);
70  long onKeyRelease(FXObject*,FXSelector,void*);
71  long onHotKeyPress(FXObject*,FXSelector,void*);
72  long onHotKeyRelease(FXObject*,FXSelector,void*);
73 public:
74 
76  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);
77 
79  virtual FXbool canFocus() const;
80 
82  FXuint getTabOrientation() const;
83 
85  void setTabOrientation(FXuint style);
86  };
87 
88 }
89 
90 #endif
A label widget can be used to place a text and/or icon for explanation purposes.
Definition: FXLabel.h:64
The tab bar layout manager arranges tab items side by side, and raises the active tab item above the ...
Definition: FXTabBar.h:53
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
A tab item is placed in a tab bar or tab book.
Definition: FXTabItem.h:55
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:138
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp