extensions.st
author alkurz
Tue, 02 Jul 2019 14:10:25 +0200
changeset 4287 9e5dc8a88380
parent 4139 6dffe5499f3b
permissions -rw-r--r--
#FEATURE by alkurz class: ApplicationModel openDialogInterface:withBindings: accepts an already decoded spec as argument
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3138
Claus Gittinger <cg@exept.de>
parents: 2759
diff changeset
     1
"{ Package: 'stx:libview2' }"!
2728
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
     2
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
     3
!CharacterArray methodsFor:'converting'!
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
     4
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
     5
asMimeType
4089
a64828e69680 class: CharacterArray
Claus Gittinger <cg@exept.de>
parents: 3144
diff changeset
     6
    "return myself as a mimeType instance"
a64828e69680 class: CharacterArray
Claus Gittinger <cg@exept.de>
parents: 3144
diff changeset
     7
2728
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
     8
    ^ MIMETypes mimeTypeFromString:self string
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
     9
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
    10
    "
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
    11
     'text/html' asMimeType isTextType
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
    12
     'text/html' asMimeType isImage
2759
668d1637f50c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2728
diff changeset
    13
     'image/gif' asMimeType isImage
4089
a64828e69680 class: CharacterArray
Claus Gittinger <cg@exept.de>
parents: 3144
diff changeset
    14
     'image/gif' asMimeType asMimeType
2728
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
    15
    "
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
    16
! !
9d97da90730c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
    17
4139
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    18
!Point methodsFor:'converting'!
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    19
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    20
asFractionalLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    21
    "return a LayoutOrigin from the receiver,
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    22
     treating the receiver coordinates as fractional parts
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    23
     (i.e. relative to superview).
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    24
     Notice: in 10.5.x LayoutOrigin is not yet officially released."
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    25
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    26
    ^ LayoutOrigin fractionalFromPoint:self
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    27
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    28
    "
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    29
     (0@0.5) asFractionalLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    30
     (0@0.5) asLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    31
     (0@10) asLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    32
     (0@10) asOffsetLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    33
    "
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    34
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    35
! !
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    36
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    37
!Point methodsFor:'converting'!
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    38
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    39
asLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    40
    "return a LayoutOrigin from the receiver.
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    41
     If the receiver coordinates are between 0 and 1, take
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    42
     them as fractional parts (relative to superview).
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    43
     Otherwise, treat them as absolute offsets.
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    44
     Notice: in 10.5.x LayoutOrigin is not yet released."
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    45
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    46
    ^ LayoutOrigin fromPoint:self
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    47
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    48
    "
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    49
     (0@0.5) asFractionalLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    50
     (0@0.5) asLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    51
     (0@10) asLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    52
     (0@10) asOffsetLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    53
    "
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    54
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    55
! !
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    56
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    57
!Point methodsFor:'converting'!
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    58
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    59
asOffsetLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    60
    "return a LayoutOrigin from the receiver,
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    61
     treating the receiver coordinates as absolute offsets.
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    62
     Notice: in 10.5.x LayoutOrigin is not yet released."
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    63
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    64
    ^ LayoutOrigin offsetFromPoint:self
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    65
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    66
    "
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    67
     (0@0.5) asFractionalLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    68
     (0@0.5) asLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    69
     (0@10) asLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    70
     (0@10) asOffsetLayout
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    71
    "
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    72
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    73
! !
6dffe5499f3b move methods accessing LayoutFrame to libview2
Stefan Vogel <sv@exept.de>
parents: 4089
diff changeset
    74
2759
668d1637f50c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2728
diff changeset
    75
!stx_libview2 class methodsFor:'documentation'!
668d1637f50c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2728
diff changeset
    76
668d1637f50c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2728
diff changeset
    77
extensionsVersion_CVS
4089
a64828e69680 class: CharacterArray
Claus Gittinger <cg@exept.de>
parents: 3144
diff changeset
    78
    ^ '$Header$'
2759
668d1637f50c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2728
diff changeset
    79
! !
3144
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    80
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    81
!stx_libview2 class methodsFor:'documentation'!
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    82
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    83
extensionsVersion_SVN
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    84
    ^ 'Id:'
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    85
! !
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
    86