author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 30 May 2018 09:34:26 +0100 | |
branch | jv |
changeset 5814 | 70d07365a2d4 |
parent 4770 | 6634b540fea2 |
permissions | -rw-r--r-- |
343 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
1118
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
3 |
All Rights Reserved |
343 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2531 | 12 |
"{ Package: 'stx:libwidg2' }" |
13 |
||
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
15 |
|
1401 | 16 |
NoteBookView subclass:#TabView |
17 |
instanceVariableNames:'' |
|
550 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'Views-Interactors' |
|
343 | 21 |
! |
22 |
||
23 |
!TabView class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
1118
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
28 |
All Rights Reserved |
343 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
implements the tabs-view component of a noteBook. |
|
43 |
May also be used on its own (without a surrounding noteBook). |
|
44 |
||
45 |
The functionality is basically the same as provided by a |
|
46 |
PopUpList or SelectionInListView, in that a valueHolder |
|
47 |
gets a value assigned corresponding to the selected tab |
|
48 |
from a list of possible tabs. |
|
49 |
||
50 |
[author:] |
|
1118
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
51 |
Claus Atzkern |
343 | 52 |
|
53 |
[see also:] |
|
1118
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
54 |
NoteBookView |
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
55 |
SelectionInListView PopUpList ValueHolder TabWidget |
343 | 56 |
" |
57 |
||
58 |
! |
|
59 |
||
60 |
examples |
|
61 |
" |
|
367 | 62 |
tabs at top of a view |
3902 | 63 |
[exBegin] |
64 |
|top tab| |
|
367 | 65 |
|
3902 | 66 |
top := StandardSystemView new label:'tabs at bottom'; extent:250@100. |
67 |
tab := TabView origin:(0.0 @ 0.0) corner:(1.0 @ 0.0)in:top. |
|
367 | 68 |
tab direction:#top. |
69 |
tab list:#( 'Foo' 'Bar' 'Baz' ). |
|
3902 | 70 |
tab action:[:anIndex| Transcript showCR:anIndex ]. |
71 |
tab bottomInset:(tab preferredExtent y negated). |
|
367 | 72 |
top open. |
2531 | 73 |
[exEnd] |
343 | 74 |
|
3902 | 75 |
tabs at bottom a view |
2531 | 76 |
[exBegin] |
3902 | 77 |
|top tab| |
367 | 78 |
|
79 |
top := StandardSystemView new label:'tabs at bottom'; extent:250@100. |
|
3902 | 80 |
tab := TabView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0)in:top. |
367 | 81 |
tab direction:#bottom. |
82 |
tab list:#( 'Foo' 'Bar' 'Baz' ). |
|
3902 | 83 |
tab action:[:anIndex| Transcript showCR:anIndex ]. |
84 |
tab topInset:(tab preferredExtent y negated). |
|
367 | 85 |
top open. |
2531 | 86 |
[exEnd] |
343 | 87 |
|
367 | 88 |
tabs at right of a view |
2531 | 89 |
[exBegin] |
3902 | 90 |
|top tab| |
367 | 91 |
|
92 |
top := StandardSystemView new label:'tabs at right'; extent:100@250. |
|
3902 | 93 |
tab := TabView origin:1.0 @ 0.0 corner:1.0 @ 1.0 in:top. |
367 | 94 |
|
95 |
tab direction:#right. |
|
96 |
tab list:#( 'Foo' 'Bar' 'Baz' ). |
|
97 |
tab action:[:aName|Transcript showCR:aName]. |
|
3902 | 98 |
tab leftInset:(tab preferredExtent x negated). |
343 | 99 |
top open. |
2531 | 100 |
[exEnd] |
343 | 101 |
|
367 | 102 |
tabs at left of a view |
2531 | 103 |
[exBegin] |
367 | 104 |
|top tab view inset| |
105 |
||
106 |
top := StandardSystemView new label:'tabs at left'; extent:100@250. |
|
3902 | 107 |
tab := TabView origin:0.0 @ 0.0 corner:0.0 @ 1.0 in:top. |
343 | 108 |
|
367 | 109 |
tab direction:#left. |
110 |
tab list:#( 'Foo' 'Bar' 'Baz' ). |
|
111 |
tab action:[:aName|Transcript showCR:aName]. |
|
3902 | 112 |
tab rightInset:(tab preferredExtent x negated). |
367 | 113 |
top open. |
2531 | 114 |
[exEnd] |
343 | 115 |
|
3902 | 116 |
using icons and text |
2531 | 117 |
[exBegin] |
367 | 118 |
|top tab view list| |
119 |
||
3902 | 120 |
top := StandardSystemView new label:'using icons, text, ..'; extent:300@100. |
121 |
tab := TabView origin:0.0 @ 0.0 corner:1.0 @ 0.0 in:top. |
|
122 |
list := OrderedCollection new. |
|
123 |
list add:( LabelAndIcon icon:(ToolbarIconLibrary workspace24x24Icon2) string:'Workspace' ). |
|
124 |
list add:( ToolbarIconLibrary workspace24x24Icon2 ). |
|
125 |
list add:( 'Workspace' ). |
|
126 |
list add:( 'Workspace' allBold ). |
|
343 | 127 |
|
3902 | 128 |
tab list:list. |
129 |
tab hasScrollButtons:true. |
|
130 |
tab action:[:indexOrNil| Transcript showCR:indexOrNil ]. |
|
131 |
tab bottomInset:(tab preferredExtent y negated). |
|
343 | 132 |
top open. |
2531 | 133 |
[exEnd] |
343 | 134 |
" |
135 |
! ! |
|
136 |
||
1401 | 137 |
!TabView methodsFor:'initialization'! |
387 | 138 |
|
1118
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
139 |
initStyle |
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
140 |
"setup style attributes |
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
141 |
" |
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
142 |
|
a49afa5a9f10
fixed font setup in initStyle.
Claus Gittinger <cg@exept.de>
parents:
913
diff
changeset
|
143 |
super initStyle. |
1401 | 144 |
tabModus := true. |
367 | 145 |
|
343 | 146 |
|
147 |
! ! |
|
148 |
||
149 |
!TabView class methodsFor:'documentation'! |
|
150 |
||
151 |
version |
|
3902 | 152 |
^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.48 2010-05-11 11:43:14 ca Exp $' |
153 |
! |
|
154 |
||
155 |
version_CVS |
|
156 |
^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.48 2010-05-11 11:43:14 ca Exp $' |
|
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
157 |
! |
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
158 |
|
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
159 |
version_HG |
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
160 |
|
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
161 |
^ '$Changeset: <not expanded> $' |
343 | 162 |
! ! |
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3902
diff
changeset
|
163 |