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

FXTabBar.h
1 /********************************************************************************
2 * *
3 * T a b B a r W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2017 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 FXTABBAR_H
22 #define FXTABBAR_H
23 
24 #ifndef FXPACKER_H
25 #include "FXPacker.h"
26 #endif
27 
28 namespace FX {
29 
30 
32 enum {
33  TABBOOK_TOPTABS = 0,
34  TABBOOK_BOTTOMTABS = 0x00020000,
35  TABBOOK_SIDEWAYS = 0x00040000,
36  TABBOOK_LEFTTABS = TABBOOK_SIDEWAYS|TABBOOK_TOPTABS,
37  TABBOOK_RIGHTTABS = TABBOOK_SIDEWAYS|TABBOOK_BOTTOMTABS,
38  TABBOOK_NORMAL = TABBOOK_TOPTABS
39  };
40 
41 
42 
54 class FXAPI FXTabBar : public FXPacker {
55  FXDECLARE(FXTabBar)
56 protected:
57  FXint current; // Current tab index
58  FXint shift; // Shift amount
59 protected:
60  FXTabBar(){}
61 private:
62  FXTabBar(const FXTabBar&);
63  FXTabBar& operator=(const FXTabBar&);
64 public:
65  long onPaint(FXObject*,FXSelector,void*);
66  long onFocusNext(FXObject*,FXSelector,void*);
67  long onFocusPrev(FXObject*,FXSelector,void*);
68  long onFocusUp(FXObject*,FXSelector,void*);
69  long onFocusDown(FXObject*,FXSelector,void*);
70  long onFocusLeft(FXObject*,FXSelector,void*);
71  long onFocusRight(FXObject*,FXSelector,void*);
72  long onCmdOpenItem(FXObject*,FXSelector,void*);
73  long onCmdSetValue(FXObject*,FXSelector,void*);
74  long onCmdSetIntValue(FXObject*,FXSelector,void*);
75  long onCmdGetIntValue(FXObject*,FXSelector,void*);
76  long onCmdOpen(FXObject*,FXSelector,void*);
77  long onUpdOpen(FXObject*,FXSelector,void*);
78 public:
79  enum {
80  ID_OPEN_ITEM=FXPacker::ID_LAST,
83  ID_OPEN_THIRD,
84  ID_OPEN_FOURTH,
85  ID_OPEN_FIFTH,
86  ID_OPEN_SIXTH,
87  ID_OPEN_SEVENTH,
88  ID_OPEN_EIGHTH,
89  ID_OPEN_NINETH,
90  ID_OPEN_TENTH,
91  ID_OPEN_LAST=ID_OPEN_FIRST+100,
92  ID_LAST
93  };
94 public:
95 
97  FXTabBar(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);
98 
100  virtual FXint getDefaultWidth();
101 
103  virtual FXint getDefaultHeight();
104 
106  virtual void layout();
107 
114  virtual void setCurrent(FXint index,FXbool notify=false);
115 
117  FXint getCurrent() const { return current; }
118 
120  FXuint getTabStyle() const;
121 
123  void setTabStyle(FXuint style);
124 
126  virtual void save(FXStream& store) const;
127 
129  virtual void load(FXStream& store);
130  };
131 
132 }
133 
134 #endif

Copyright © 1997-2016 Jeroen van der Zijp