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