OpendTect-6_4  6.4
uitabstack.h
Go to the documentation of this file.
1 #ifndef uitabstack_h
2 #define uitabstack_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Lammertink
9  Date: 17/01/2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uibasemod.h"
16 #include "uigroup.h"
17 
18 class uiTabBar;
19 
20 
21 /* \brief Provides a way to create tabs with associated uiGroups.
22 
23  uiTabBar provides only the tabs. uiTabStack forms a system that
24  combines such a tab-bar with uiGroups by which selection of a tab
25  automatically makes the associated uiGroup visible.
26 
27  uiGroups that are to be added to the stack, *must* use the
28  tabGroup() as a parent. Otherwise, you will get a programmer error
29  message complaining that the added group "Must be child or
30  child-of-child."
31 
32 */
33 mExpClass(uiBase) uiTabStack : public uiGroup
34 {
35 public:
36  uiTabStack(uiParent*,const char* nm,
37  bool manage=true);
38 
39  // use this as parent for groups to add
40  uiGroup* tabGroup() { return tabgrp_; }
41 
42  void addTab(uiGroup*,
44  void removeTab(uiGroup*);
45 
46  void setTabEnabled(uiGroup*,bool);
47  bool isTabEnabled(uiGroup*) const;
48 
49  void setCurrentPage(int id);
50  void setCurrentPage(uiGroup*);
51  void setCurrentPage(const char* grpnm);
52 
53  uiGroup* currentPage() const;
54  uiGroup* page(int idx) const;
55  int indexOf(uiGroup*) const;
56  int currentPageId() const;
57 
58  int size() const;
59 
60  NotifierAccess& selChange();
61 
62 protected:
63 
65  uiGroup* tabgrp_;
66 
67  void tabSel(CallBacker* cb);
68 };
69 
70 
71 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Interface class for Notifier. See comments there.
Definition: callback.h:161
TabBar widget only. Normally you'd want to use the uiTabStack class.
Definition: uitabbar.h:25
uiGroup * tabGroup()
Definition: uitabstack.h:40
static const uiString & emptyString()
Definition: uistring.h:109
uiGroup * page(int idx) const
Definition: uistring.h:89
Definition: uiparent.h:26
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
uiGroup * tabgrp_
Definition: uitabstack.h:65
void removeTab(uiTab *)
uiTabBar * tabbar_
Definition: uitabstack.h:64
int size() const
Definition: uitabstack.h:33
friend class uiTabStack
Definition: uitabbar.h:28
void setTabEnabled(int idx, bool)
int addTab(uiTab *)
bool isTabEnabled(int idx) const

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019