author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 23 Jan 2017 12:42:33 +0000 | |
branch | jv |
changeset 3855 | 1db7742d33ad |
parent 2222 | e376d56f37a5 |
permissions | -rw-r--r-- |
3855
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
1 |
" |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
2 |
COPYRIGHT (c) Claus Gittinger / 2006 by eXept Software AG |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
3 |
All Rights Reserved |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
4 |
|
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
5 |
This software is furnished under a license and may be used |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
10 |
hereby transferred. |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
11 |
" |
2222 | 12 |
"{ Package: 'stx:libview2' }" |
13 |
||
3855
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
15 |
|
90 | 16 |
ValueHolder subclass:#ConvertedValue |
258 | 17 |
instanceVariableNames:'conversion' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Support-Models' |
|
90 | 21 |
! |
22 |
||
23 |
!ConvertedValue class methodsFor:'documentation'! |
|
24 |
||
3855
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
25 |
copyright |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
26 |
" |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
27 |
COPYRIGHT (c) Claus Gittinger / 2006 by eXept Software AG |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
28 |
All Rights Reserved |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
29 |
|
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
30 |
This software is furnished under a license and may be used |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
31 |
only in accordance with the terms of that license and with the |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
32 |
inclusion of the above copyright notice. This software may not |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
33 |
be provided or otherwise made available to, or used by, any |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
34 |
other person. No title to or ownership of the software is |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
35 |
hereby transferred. |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
36 |
" |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
37 |
! |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
38 |
|
90 | 39 |
documentation |
40 |
" |
|
41 |
a ConvertedValue translates changes on input via a conversion block |
|
42 |
to the output. For example, if you want to have a toggle to change the |
|
43 |
color inputs of some other labels, use a convertedValue which translates |
|
44 |
true/false into colors: |
|
45 |
||
46 |
|toggle label converter| |
|
47 |
||
48 |
converter := ConvertedValue new |
|
49 |
conversion:[:input | input == true |
|
50 |
ifTrue:[Color red] |
|
51 |
ifFalse:[Color blue]]; |
|
52 |
value:false. |
|
2222 | 53 |
|
90 | 54 |
|
55 |
toggle := Toggle label:'change color'. |
|
56 |
toggle controller pressChannel:converter. |
|
57 |
||
58 |
label := Label label:'see me changing'. |
|
59 |
label foregroundChannel:converter. |
|
60 |
||
61 |
toggle open. |
|
62 |
label open. |
|
63 |
" |
|
64 |
! |
|
65 |
||
66 |
examples |
|
67 |
" |
|
68 |
examples to be added. |
|
69 |
" |
|
70 |
! ! |
|
71 |
||
72 |
!ConvertedValue methodsFor:'accessing'! |
|
73 |
||
2222 | 74 |
conversion:aBlock |
90 | 75 |
conversion := aBlock |
76 |
! |
|
77 |
||
78 |
initialValue:someValue |
|
79 |
self value:someValue |
|
80 |
! |
|
81 |
||
82 |
value:input |
|
83 |
^ super value:(conversion value:input) |
|
84 |
! ! |
|
258 | 85 |
|
86 |
!ConvertedValue class methodsFor:'documentation'! |
|
87 |
||
88 |
version |
|
2222 | 89 |
^ '$Header: /cvs/stx/stx/libview2/ConvertedValue.st,v 1.5 2006-09-15 18:02:35 cg Exp $' |
3855
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
90 |
! |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
91 |
|
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
92 |
version_HG |
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
93 |
|
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
94 |
^ '$Changeset: <not expanded> $' |
258 | 95 |
! ! |
3855
1db7742d33ad
Win32: Build libjpeg in its own directory, out-of-source-tree.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2222
diff
changeset
|
96 |