TabItem.st
author Claus Gittinger <cg@exept.de>
Fri, 02 Nov 2007 15:16:58 +0100
changeset 3268 cdc4a1749cb9
parent 3191 a5bb500a135a
child 3296 cbd5655f3905
permissions -rw-r--r--
changed #destroyCanvas
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     1
"
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     3
              All Rights Reserved
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     4
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e065c08b2a69 initial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    11
"
1777
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
    12
"{ Package: 'stx:libwidg2' }"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
    13
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    14
Model subclass:#TabItem
3191
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
    15
	instanceVariableNames:'view rawLabel label enabled argument canvas activeHelpText
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
    16
		translateLabel shortcutKey majorKey minorKey miniScrollerVertical
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
    17
		miniScrollerHorizontal hasVerticalScrollBar
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
    18
		hasHorizontalScrollBar foregroundColor createNewBuilder
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
    19
		autoHideScrollBars accessCharacterPosition activeHelpKey builder'
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    20
	classVariableNames:''
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    21
	poolDictionaries:''
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    22
	category:'Views-Support'
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    23
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    24
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    25
!TabItem class methodsFor:'documentation'!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    26
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    27
copyright
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    28
"
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    29
 COPYRIGHT (c) 1997 by eXept Software AG
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    30
              All Rights Reserved
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    31
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    32
 This software is furnished under a license and may be used
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    33
 only in accordance with the terms of that license and with the
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    35
 be provided or otherwise made available to, or used by, any
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    36
 other person.  No title to or ownership of the software is
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    37
 hereby transferred.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    38
"
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    39
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    40
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    41
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    42
documentation
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    43
"
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    44
    describes one tab entry; could be used for tabs instead of a string. Whenever
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    45
    a value changed, a change notification is raised
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    46
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    47
    [see also:]
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    48
        TabItemEditor
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    49
        TabView
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    50
        NoteBookView
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    51
        UIPainter
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    52
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    53
    [author:]
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    54
        Claus Atzkern
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    55
"
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    56
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    57
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    58
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    59
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    60
examples
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    61
"
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    62
    labels derived from item
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    63
                                                                                [exBegin]                                      
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    64
    |top tab|
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    65
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    66
    top := StandardSystemView new label:'tabs at top'; extent:250@100.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    67
    tab  := TabView origin:0.0 @ 0.0 corner:1.0 @ 0.5 in:top.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    68
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    69
    tab direction:#top.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    70
    tab list:(#( 'Foo' 'Bar' 'Baz' ) collect:[:l| TabItem label:l ]).
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    71
    tab action:[:aName|Transcript showCR:aName].
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    72
    top open.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    73
                                                                                [exEnd]
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    74
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    75
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    76
    testing tab configuration and change notifications
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    77
                                                                                [exBegin]                                      
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    78
    |top tab list idx label|
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    79
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    80
    top := StandardSystemView new label:'tabs at top'; extent:250@100.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    81
    tab  := TabView origin:0.0 @ 0.0 corner:1.0 @ 0.5 in:top.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    82
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    83
    tab direction:#top.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    84
    list := (#( 'Foo' 'Bar' 'Baz' ) collect:[:l| TabItem label:l ]).
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    85
    tab list:list.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    86
    tab action:[:aName|Transcript showCR:aName].
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    87
    top openAndWait.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    88
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    89
    [
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    90
        idx := 0.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    91
        label := LabelAndIcon icon:(Image fromFile:('xpmBitmaps/document_images/tiny_yellow_dir.xpm' ))
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    92
                            string:'Test Tab'.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    93
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    94
        [top shown] whileTrue:[
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    95
            |aTab lbl|
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    96
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    97
            (idx := idx + 1) > list size ifTrue:[idx := 1].
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    98
e065c08b2a69 initial checkin
ca
parents:
diff changeset
    99
            aTab := list at:idx.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   100
            lbl  := aTab label.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   101
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   102
            Delay waitForSeconds:0.5. aTab label:label.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   103
            Delay waitForSeconds:0.5. aTab enabled:false.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   104
            Delay waitForSeconds:0.5. aTab enabled:true.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   105
            Delay waitForSeconds:0.5. aTab foregroundColor:(Color red).
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   106
            Delay waitForSeconds:0.5. aTab foregroundColor:nil.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   107
            aTab label:lbl.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   108
        ]
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   109
    ] forkAt:1.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   110
                                                                                [exEnd]
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   111
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   112
"
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   113
! !
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   114
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   115
!TabItem class methodsFor:'instance creation'!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   116
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   117
label:aLabel
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   118
    ^ self new label:aLabel
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   119
! !
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   120
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   121
!TabItem class methodsFor:'tests'!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   122
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   123
test
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   124
    |top tab list item|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   125
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   126
    top := StandardSystemView new label:'tabs at top'; extent:400@400.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   127
    tab  := NoteBookView origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:top.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   128
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   129
    tab direction:#top.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   130
    list := #( 'Foo' 'Bar' 'Baz' ) collect:[:l| TabItem label:l ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   131
    item := list at:1.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   132
    item majorKey:ClockView.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   133
    item := list at:2.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   134
    item majorKey:CodingExamples_GUI::GUIDemoNoteBook.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   135
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   136
    item := list at:3.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   137
    item majorKey:CodingExamples_GUI::GUIDemoMenu.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   138
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   139
    tab list:list.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   140
    top open.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   141
! !
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   142
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   143
!TabItem methodsFor:'accessing'!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   144
1671
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   145
accessCharacterPosition
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   146
    "get the index of the access character in the label text or string, or 0 if none"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   147
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   148
    ^ accessCharacterPosition ? 0
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   149
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   150
    "Modified: / 06-09-2006 / 14:57:08 / cg"
1671
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   151
!
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   152
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   153
accessCharacterPosition:anIndex
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   154
    "set the index of the access character in the label"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   155
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   156
    accessCharacterPosition := anIndex
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   157
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   158
    "Modified: / 06-09-2006 / 14:57:44 / cg"
1671
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   159
!
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   160
716
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   161
argument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   162
    "returns a user defined argument or nil
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   163
    "
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   164
    ^ argument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   165
!
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   166
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   167
argument:anArgument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   168
    "set a user defined argument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   169
    "
1674
042a8f089e77 add inputGroup
ca
parents: 1671
diff changeset
   170
    (anArgument isString and:[anArgument isEmpty]) ifTrue:[
042a8f089e77 add inputGroup
ca
parents: 1671
diff changeset
   171
        argument := nil
042a8f089e77 add inputGroup
ca
parents: 1671
diff changeset
   172
    ] ifFalse:[
042a8f089e77 add inputGroup
ca
parents: 1671
diff changeset
   173
        argument := anArgument
042a8f089e77 add inputGroup
ca
parents: 1671
diff changeset
   174
    ].
716
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   175
    argument := anArgument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   176
!
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   177
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   178
createNewBuilder
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   179
    "returns true if a new builder is used to create the canvas;
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   180
     the default is true"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   181
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   182
    ^ createNewBuilder ? true
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   183
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   184
    "Modified: / 06-09-2006 / 14:58:58 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   185
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   186
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   187
createNewBuilder:aBool
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   188
    "set/clear the flag which controls if a new ui-builder is used to create the canvas;
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   189
     the default is true. This affects if the bindings will be shared or not between tabs."
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   190
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   191
    createNewBuilder := aBool
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   192
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   193
    "Modified: / 06-09-2006 / 15:00:04 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   194
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   195
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   196
enabled
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   197
    "get the enabled state of the tab
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   198
    "
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   199
    ^ enabled ? true
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   200
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   201
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   202
enabled:aState
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   203
    "set the enabled state of the tab
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   204
    "
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   205
    |s|
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   206
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   207
    s := aState ? true.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   208
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   209
    self enabled ~~ s ifTrue:[
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   210
        enabled := s.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   211
        self changed:#enabled
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   212
    ]
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   213
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   214
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   215
foregroundColor
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   216
    "get the label color or nil"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   217
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   218
    ^ foregroundColor
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   219
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   220
    "Modified: / 06-09-2006 / 15:14:46 / cg"
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   221
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   222
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   223
foregroundColor:aColor
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   224
    "set the label color or nil"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   225
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   226
    foregroundColor ~= aColor ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   227
        foregroundColor := aColor.
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   228
        self changed:#foregroundColor
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   229
    ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   230
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   231
    "Modified: / 06-09-2006 / 15:00:31 / cg"
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   232
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   233
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   234
label
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   235
    "get the label or selector to access a label/bitmap. To get the label to be shown
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   236
     use: #rawLabel
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   237
    "
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   238
    ^ label
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   239
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   240
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   241
label:aLabel
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   242
    "set the label or selector to access the label/bitmap"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   243
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   244
    label := aLabel.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   245
1936
ce9aa6069889 in #label: treat label as different, if emphasis is.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
   246
    (aLabel ~= rawLabel
ce9aa6069889 in #label: treat label as different, if emphasis is.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
   247
    or:[aLabel isString 
ce9aa6069889 in #label: treat label as different, if emphasis is.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
   248
        and:[rawLabel isString
ce9aa6069889 in #label: treat label as different, if emphasis is.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
   249
        and:[(aLabel sameStringAndEmphasisAs:rawLabel) not]]])
ce9aa6069889 in #label: treat label as different, if emphasis is.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
   250
ce9aa6069889 in #label: treat label as different, if emphasis is.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
   251
    ifTrue:[
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   252
        rawLabel := aLabel.
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   253
        self changed
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   254
    ]
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   255
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   256
    "Modified: / 06-09-2006 / 15:54:13 / cg"
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   257
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   258
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   259
labelForegroundColor
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   260
    "get the label color or nil
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   261
    "
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   262
    ^ self foregroundColor
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   263
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   264
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   265
labelForegroundColor:aColor
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   266
    "set the label color or nil
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   267
    "
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   268
    self foregroundColor:aColor
1671
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   269
!
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   270
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   271
shortcutKey
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   272
    "get the key to press to select the tab item from the keyboard; a symbol or nil"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   273
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   274
    ^ shortcutKey
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   275
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   276
    "Modified: / 06-09-2006 / 15:09:18 / cg"
1671
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   277
!
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   278
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   279
shortcutKey:aKeyOrNil
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   280
    "set the key to press to select the tab item from the keyboard; a symbol or nil"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   281
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   282
    |key|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   283
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   284
    aKeyOrNil size ~~ 0 ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   285
        key := aKeyOrNil asSymbol
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   286
    ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   287
    shortcutKey := key
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   288
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   289
    "Modified: / 06-09-2006 / 15:09:31 / cg"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   290
!
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   291
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   292
view:aView
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   293
    aView isNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   294
        view := aView.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   295
        ^ self.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   296
    ].
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   297
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   298
    view notNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   299
        aView ~~ view ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   300
            self error:'TabItems cannot be reused'.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   301
        ].
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   302
    ].
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   303
    view := aView.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   304
    self setAttributesWithBuilder:view application builder.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   305
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   306
    "Modified: / 06-09-2006 / 17:58:58 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   307
! !
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   308
2404
2b7591c982ac category change
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
   309
!TabItem methodsFor:'accessing-canvas'!
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   310
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   311
canvas
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   312
    "returns the application or nil
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   313
    "
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   314
    |view cls wsel classNameKey oldBuilder usedBuilder appl|
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   315
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   316
    canvas notNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   317
        ^ canvas
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   318
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   319
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   320
    (classNameKey := majorKey) notNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   321
        oldBuilder := builder.
1891
ab8801a1c22d subapps always got a new builder (even if one was already present)
tm
parents: 1777
diff changeset
   322
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   323
        (oldBuilder notNil
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   324
        and:[(appl := oldBuilder application) notNil]) ifTrue:[
2848
a6f481effd99 subApplicationFor
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   325
            canvas := appl subApplicationFor:majorKey.
a6f481effd99 subApplicationFor
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   326
            canvas isNil ifTrue:[
a6f481effd99 subApplicationFor
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   327
                cls := appl resolveName:classNameKey.
1777
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   328
            ]
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   329
        ] ifFalse:[
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   330
            "/ cls := Smalltalk resolveName:classNameKey inClass:self class.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   331
            cls := Smalltalk classNamed:classNameKey.
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   332
        ].
1777
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   333
        canvas isNil ifTrue:[
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   334
            cls isNil ifTrue:[
2491
10f86a3c5342 do NOT catch errors !!!!!
martin
parents: 2439
diff changeset
   335
                self error:('no canvas for majorKey: ' , classNameKey) mayProceed:true.
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   336
                "/ self majorKey:nil.
2491
10f86a3c5342 do NOT catch errors !!!!!
martin
parents: 2439
diff changeset
   337
                ^ nil
1777
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   338
            ].
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   339
            canvas := cls new.
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   340
        ].
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   341
2723
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   342
        self isCanvasApplicationModel ifTrue:[
2794
80afa90b592d *** empty log message ***
penk
parents: 2723
diff changeset
   343
            view := ApplicationSubView new.
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   344
            wsel := minorKey ? #windowSpec.
1777
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   345
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   346
            (usedBuilder := canvas builder) isNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   347
                (usedBuilder := oldBuilder) isNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   348
                    usedBuilder := canvas createBuilder.
1891
ab8801a1c22d subapps always got a new builder (even if one was already present)
tm
parents: 1777
diff changeset
   349
                ] ifFalse:[
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   350
                    canvas builder:usedBuilder.
1891
ab8801a1c22d subapps always got a new builder (even if one was already present)
tm
parents: 1777
diff changeset
   351
                ].
1777
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   352
            ].
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   353
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   354
            (appl notNil and:[canvas masterApplication isNil]) ifTrue:[
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   355
                canvas masterApplication:appl
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   356
            ].
1943
c90153998d43 set new application in builder if builder is created
martin
parents: 1936
diff changeset
   357
            self createNewBuilder ifTrue:[
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   358
                usedBuilder application:canvas
1943
c90153998d43 set new application in builder if builder is created
martin
parents: 1936
diff changeset
   359
            ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   360
            view client:canvas spec:wsel builder:usedBuilder.
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   361
            canvas window:(self setupCanvasView:view).
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   362
        ] ifFalse:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   363
            canvas := self setupCanvasView:canvas
1943
c90153998d43 set new application in builder if builder is created
martin
parents: 1936
diff changeset
   364
        ]
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   365
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   366
    ^ canvas
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   367
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   368
    "Modified: / 06-09-2006 / 15:07:55 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   369
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   370
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   371
canvasView
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   372
    "returns the view the canvas is running in or nil if no canvas
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   373
     specified or not yet created
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   374
    "
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   375
    |canvas|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   376
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   377
    (canvas := self canvas) notNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   378
        ^ canvas perform:#window ifNotUnderstood:[canvas]
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   379
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   380
    ^ nil
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   381
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   382
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   383
destroyCanvas
3268
cdc4a1749cb9 changed #destroyCanvas
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   384
    |canvasView|
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   385
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   386
    canvas notNil ifTrue:[
2723
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   387
        self isCanvasApplicationModel ifTrue:[
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   388
            canvas releaseAsSubCanvas.
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   389
        ].
3268
cdc4a1749cb9 changed #destroyCanvas
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   390
        (canvasView := self canvasView) notNil ifTrue:[
cdc4a1749cb9 changed #destroyCanvas
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   391
            canvasView destroy.
cdc4a1749cb9 changed #destroyCanvas
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   392
        ].
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   393
        canvas := nil
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   394
    ].
3268
cdc4a1749cb9 changed #destroyCanvas
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   395
cdc4a1749cb9 changed #destroyCanvas
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   396
    "Modified: / 02-11-2007 / 14:54:47 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   397
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   398
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   399
majorKey
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   400
    ^ majorKey
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   401
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   402
    "Modified: / 06-09-2006 / 15:01:14 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   403
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   404
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   405
majorKey:aMajorKey
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   406
    |key|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   407
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   408
    aMajorKey notNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   409
        aMajorKey isBehavior ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   410
            key := aMajorKey name asSymbol
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   411
        ] ifFalse:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   412
            aMajorKey size ~~ 0 ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   413
                key := aMajorKey asSymbol
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   414
            ]
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   415
        ]
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   416
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   417
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   418
    self majorKey ~~ key ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   419
        self destroyCanvas
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   420
    ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   421
    majorKey := key.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   422
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   423
    "Modified: / 06-09-2006 / 15:01:22 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   424
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   425
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   426
minorKey
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   427
    ^ minorKey
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   428
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   429
    "Modified: / 06-09-2006 / 15:01:58 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   430
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   431
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   432
minorKey:aMinorKey
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   433
    minorKey := aMinorKey.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   434
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   435
    "Modified: / 06-09-2006 / 15:02:04 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   436
!
1671
0564c18a4ea4 support accelerator and accessCharacter
ca
parents: 716
diff changeset
   437
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   438
setupCanvasView:aView
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   439
    |frame isV isH auto|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   440
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   441
    isH := self hasHorizontalScrollBar.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   442
    isV := self hasVerticalScrollBar.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   443
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   444
    (isH or:[isV]) ifFalse:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   445
        frame := aView
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   446
    ] ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   447
        frame := ScrollableView for:ViewScroller.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   448
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   449
        frame horizontalScrollable:isH.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   450
        frame verticalScrollable:isV.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   451
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   452
        isH ifTrue:[frame horizontalMini:(self miniScrollerHorizontal)].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   453
        isV ifTrue:[frame verticalMini:(self miniScrollerVertical)].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   454
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   455
        (auto := self autoHideScrollBars) notNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   456
            frame autoHideScrollBars:auto
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   457
        ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   458
        frame scrolledView scrolledView:aView.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   459
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   460
    frame objectAttributeAt:#isTabItem put:true.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   461
  ^ frame
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   462
! !
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   463
2404
2b7591c982ac category change
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
   464
!TabItem methodsFor:'accessing-scrollbars'!
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   465
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   466
autoHideScrollBars
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   467
    ^ autoHideScrollBars
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   468
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   469
    "Modified: / 06-09-2006 / 14:58:38 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   470
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   471
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   472
autoHideScrollBars:aBoolOrNil
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   473
    autoHideScrollBars := aBoolOrNil
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   474
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   475
    "Modified: / 06-09-2006 / 14:58:45 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   476
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   477
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   478
hasHorizontalScrollBar
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   479
    ^ hasHorizontalScrollBar ? false
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   480
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   481
    "Modified: / 06-09-2006 / 15:00:39 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   482
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   483
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   484
hasHorizontalScrollBar:aBool
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   485
    |flag|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   486
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   487
    aBool == true ifTrue:[flag := true]
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   488
                 ifFalse:[self miniScrollerHorizontal:false].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   489
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   490
    hasHorizontalScrollBar := flag
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   491
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   492
    "Modified: / 06-09-2006 / 15:00:58 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   493
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   494
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   495
hasVerticalScrollBar
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   496
    ^ hasVerticalScrollBar ? false
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   497
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   498
    "Modified: / 06-09-2006 / 15:01:03 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   499
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   500
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   501
hasVerticalScrollBar:aBool
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   502
    |flag|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   503
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   504
    aBool == true ifTrue:[flag := true]
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   505
                 ifFalse:[self miniScrollerVertical:false].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   506
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   507
    hasVerticalScrollBar := flag
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   508
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   509
    "Modified: / 06-09-2006 / 15:01:10 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   510
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   511
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   512
miniScrollerHorizontal
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   513
    ^ miniScrollerHorizontal ? false
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   514
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   515
    "Modified: / 06-09-2006 / 15:01:29 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   516
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   517
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   518
miniScrollerHorizontal:aBool
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   519
    miniScrollerHorizontal := aBool
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   520
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   521
    "Modified: / 06-09-2006 / 15:01:40 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   522
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   523
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   524
miniScrollerVertical
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   525
    ^ miniScrollerVertical ? false
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   526
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   527
    "Modified: / 06-09-2006 / 15:01:45 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   528
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   529
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   530
miniScrollerVertical:aBool
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   531
    miniScrollerVertical := aBool
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   532
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   533
    "Modified: / 06-09-2006 / 15:01:55 / cg"
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   534
! !
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   535
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   536
!TabItem methodsFor:'building'!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   537
716
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   538
editAgument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   539
    "used by TabItemEditor to get the argument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   540
    "
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   541
    ^ argument isSymbol ifTrue:['#', argument] ifFalse:[argument]
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   542
!
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   543
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   544
editAgument:anArgument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   545
    "used by TabItemEditor to set the argument
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   546
    "
2439
5bc545c13f51 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 2438
diff changeset
   547
    |size|
716
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   548
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   549
    anArgument size ~~ 0 ifTrue:[
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   550
        argument := anArgument withoutSeparators.
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   551
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   552
        (size := argument size) == 0 ifTrue:[
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   553
            argument := nil
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   554
        ] ifFalse:[
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   555
            (argument startsWith:$#) ifTrue:[
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   556
                size > 1 ifTrue:[
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   557
                    argument := (argument copyFrom:2) asSymbol
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   558
                ] ifFalse:[
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   559
                    argument := nil
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   560
                ]
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   561
            ]
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   562
        ]
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   563
    ] ifFalse:[
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   564
        argument := nil
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   565
    ]
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   566
!
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   567
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   568
rawLabel
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   569
    "returns the label to be shown
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   570
    "
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   571
    ^ rawLabel ? ' '
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   572
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   573
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   574
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   575
702
cf639897acfd support of TabItemEditor
ca
parents: 701
diff changeset
   576
setAttributesFromClass:aClass
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   577
    "setup attributes from aClass 
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   578
     Ugly: used only with the tabListEditor."
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   579
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   580
    |spec cls|
1761
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   581
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   582
    rawLabel := nil.
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   583
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   584
    cls := aClass.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   585
    cls isBehavior not ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   586
        self halt.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   587
        cls := Smalltalk classNamed:aClass
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   588
    ].
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   589
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   590
    cls notNil ifTrue:[
1761
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   591
        (self translateLabel and:[label isString]) ifTrue:[
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   592
            rawLabel := cls perform:(label asSymbol) ifNotUnderstood:nil
702
cf639897acfd support of TabItemEditor
ca
parents: 701
diff changeset
   593
        ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   594
        (majorKey isNil and:[minorKey notNil]) ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   595
"/            Error handle:[:ex|
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   596
"/            ] do:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   597
                "/ spec := cls perform:(minorKey asSymbol) ifNotUnderstood:nil.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   598
                "/ spec notNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   599
                    canvas := ApplicationSubView new.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   600
                    canvas client:nil spec:minorKey "spec" builder:(UIBuilder new).
1761
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   601
                    canvas := self setupCanvasView:canvas.
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   602
                "/ ].
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   603
"/            ]
1761
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   604
        ]        
702
cf639897acfd support of TabItemEditor
ca
parents: 701
diff changeset
   605
    ].
1761
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   606
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   607
    rawLabel isNil ifTrue:[
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   608
        rawLabel := label isNil ifTrue:[''] ifFalse:[label printString]
631af8bb3076 *** empty log message ***
ca
parents: 1760
diff changeset
   609
    ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   610
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   611
    "Modified: / 06-09-2006 / 17:48:37 / cg"
702
cf639897acfd support of TabItemEditor
ca
parents: 701
diff changeset
   612
!
cf639897acfd support of TabItemEditor
ca
parents: 701
diff changeset
   613
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   614
setAttributesWithBuilder:aBuilder
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   615
    "setup attributes dependent on the builder
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   616
    "
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   617
    |appl usedBuilder |
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   618
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   619
    usedBuilder := self createNewBuilder ifTrue:[UIBuilder new] ifFalse:[aBuilder].
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   620
    builder := usedBuilder.
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   621
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   622
    (self translateLabel and:[label isString]) ifTrue:[
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   623
        rawLabel := aBuilder labelFor:(label asSymbol).
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   624
    ].
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   625
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   626
    rawLabel isNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   627
        rawLabel := label printString.
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   628
    ].
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   629
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   630
    (aBuilder isEditing or:[(appl := aBuilder application) isNil]) ifFalse:[
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   631
        activeHelpKey notNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   632
            activeHelpText := appl helpTextForKey:activeHelpKey.
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   633
        ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   634
        usedBuilder application isNil ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   635
            usedBuilder application:appl
1777
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   636
        ].
1c09f7e0a18a set masterApplication ... in case of an ApplicationModel
tm
parents: 1761
diff changeset
   637
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   638
        (majorKey isNil and:[minorKey notNil]) ifTrue:[
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   639
            canvas := ApplicationSubView new.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   640
            canvas client:appl spec:minorKey builder:usedBuilder.
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   641
            canvas := self setupCanvasView:canvas.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   642
        ]
1891
ab8801a1c22d subapps always got a new builder (even if one was already present)
tm
parents: 1777
diff changeset
   643
    ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   644
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   645
    "Modified: / 06-09-2006 / 17:47:46 / cg"
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   646
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   647
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   648
translateLabel
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   649
    "returns true if the label derives from the application"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   650
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   651
    ^ translateLabel ? false
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   652
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   653
    "Modified: / 06-09-2006 / 15:09:40 / cg"
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   654
!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   655
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   656
translateLabel:aBool
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   657
    "set/clear the flag which controls if the label is translated to a national language
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   658
     via the applications resources"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   659
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   660
    |flag|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   661
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   662
    aBool == true ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   663
        flag := true.
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   664
    ].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   665
    translateLabel := flag.
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   666
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   667
    "Modified: / 06-09-2006 / 15:11:16 / cg"
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   668
! !
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   669
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   670
!TabItem methodsFor:'converting'!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   671
3191
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   672
skippedInLiteralEncoding
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   673
    |skipped|
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   674
3191
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   675
    skipped := super skippedInLiteralEncoding asOrderedCollection.
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   676
3191
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   677
    skipped add:#view.
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   678
    skipped add:#rawLabel.
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   679
    skipped add:#canvas.
716
ed0ed44d8cfb add user defined argument
ca
parents: 702
diff changeset
   680
3191
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   681
    self enabled                      ifTrue:[ skipped add:#enabled ].
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   682
    self accessCharacterPosition == 0 ifTrue:[ skipped add:#accessCharacterPosition ].
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   683
    self createNewBuilder             ifTrue:[ skipped add:#createNewBuilder ].
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   684
    self miniScrollerVertical        ifFalse:[ skipped add:#miniScrollerVertical ].
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   685
    self miniScrollerHorizontal      ifFalse:[ skipped add:#miniScrollerHorizontal ].
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   686
3191
a5bb500a135a literal encoding
ca
parents: 3068
diff changeset
   687
    ^ skipped
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   688
! !
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   689
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   690
!TabItem methodsFor:'displaying'!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   691
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   692
displayOn:aGC x:x y:y
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   693
    |s|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   694
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   695
    (s := rawLabel ? label) isNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   696
        ^ self
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   697
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   698
    s isNumber ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   699
        s := s printString
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   700
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   701
    s displayOn:aGC x:x y:y
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   702
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   703
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   704
heightOn:aGC
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   705
    |s|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   706
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   707
    (s := rawLabel ? label) isNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   708
        ^ aGC font height
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   709
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   710
    ^ s heightOn:aGC
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   711
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   712
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   713
widthOn:aGC
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   714
    |s|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   715
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   716
    (s := rawLabel ? label) isNil ifTrue:[
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   717
        ^ 4
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   718
    ].
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   719
    ^ s widthOn:aGC
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   720
! !
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   721
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   722
!TabItem methodsFor:'help'!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   723
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   724
activeHelpKey
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   725
    ^ activeHelpKey
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   726
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   727
    "Modified: / 06-09-2006 / 14:58:11 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   728
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   729
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   730
activeHelpKey:aKey
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   731
    |key|
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   732
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   733
    aKey size > 0 ifTrue:[key := aKey asSymbol].
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   734
    activeHelpKey := key
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   735
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   736
    "Modified: / 06-09-2006 / 14:58:32 / cg"
1759
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   737
!
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   738
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   739
activeHelpText
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   740
    ^ activeHelpText
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   741
! !
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   742
a8b1d1fad2f1 add more functionality; canvas and help
ca
parents: 1674
diff changeset
   743
!TabItem methodsFor:'queries'!
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   744
2723
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   745
isCanvasApplicationModel
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   746
    "returns true if the canvas is an application model"
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   747
2723
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   748
    canvas notNil ifTrue:[
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   749
        ^ canvas isKindOf:ApplicationModel.
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   750
    ].
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   751
    ^ false.
3068
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   752
ae56b8c3c7a6 that code sucked - it still does, but less so.
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   753
    "Modified: / 06-09-2006 / 15:11:50 / cg"
2723
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   754
!
8532bbba673b call #releaseAsSubCanvas on destroyed applications
ca
parents: 2491
diff changeset
   755
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   756
isEnabled
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   757
    ^ self enabled
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   758
! !
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   759
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   760
!TabItem class methodsFor:'documentation'!
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   761
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   762
version
3268
cdc4a1749cb9 changed #destroyCanvas
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   763
    ^ '$Header: /cvs/stx/stx/libwidg2/TabItem.st,v 1.23 2007-11-02 14:16:58 cg Exp $'
696
e065c08b2a69 initial checkin
ca
parents:
diff changeset
   764
! !