OpendTect  6.3
uitabstack.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Lammertink
8  Date: 17/01/2002
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "uibasemod.h"
14 #include "uigroup.h"
15 
16 class uiTabBar;
17 
18 
19 /* \brief Provides a way to create tabs with associated uiGroups.
20 
21  uiTabBar provides only the tabs. uiTabStack forms a system that
22  combines such a tab-bar with uiGroups by which selection of a tab
23  automatically makes the associated uiGroup visible.
24 
25  uiGroups that are to be added to the stack, *must* use the
26  tabGroup() as a parent. Otherwise, you will get a programmer error
27  message complaining that the added group "Must be child or
28  child-of-child."
29 
30 */
31 mExpClass(uiBase) uiTabStack : public uiGroup
32 {
33 public:
34  uiTabStack(uiParent*,const char* nm,
35  bool manage=true);
36 
37  // use this as parent for groups to add
38  uiGroup* tabGroup() { return tabgrp_; }
39 
40  void addTab(uiGroup*,
42  void removeTab(uiGroup*);
43 
44  void setTabEnabled(uiGroup*,bool);
45  bool isTabEnabled(uiGroup*) const;
46 
47  void setCurrentPage(int id);
48  void setCurrentPage(uiGroup*);
49  void setCurrentPage(const char* grpnm);
50  void setTabIcon(int id,const char* icnnm);
51  void setTabIcon(uiGroup*,const char* icnnm);
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 };
Definition: uigroup.h:53
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
Interface class for Notifier. See comments there.
Definition: notify.h:20
TabBar widget only. Normally you'd want to use the uiTabStack class.
Definition: uitabbar.h:23
uiGroup * tabGroup()
Definition: uitabstack.h:38
static const uiString & emptyString()
Definition: uistring.h:107
uiGroup * page(int idx) const
Definition: uistring.h:88
Definition: uiparent.h:24
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:173
uiGroup * tabgrp_
Definition: uitabstack.h:65
void removeTab(uiTab *)
uiTabBar * tabbar_
Definition: uitabstack.h:64
int size() const
Definition: uitabstack.h:31
friend class uiTabStack
Definition: uitabbar.h:26
void setTabIcon(int idx, const char *)
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. 2017