MultiViewToolApplication.st
author Claus Gittinger <cg@exept.de>
Wed, 20 Aug 2008 21:38:07 +0200
changeset 8231 50ce5026cb72
parent 8196 29ed5a2bf16d
child 8368 fd864b68c591
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6179
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     1
"
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     2
 COPYRIGHT (c) 2004 by eXept Software AG
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     3
              All Rights Reserved
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     4
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     5
 This software is furnished under a license and may be used
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     6
 only in accordance with the terms of that license and with the
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     8
 be provided or otherwise made available to, or used by, any
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     9
 other person.  No title to or ownership of the software is
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    10
 hereby transferred.
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    11
"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libtool' }"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
ToolApplicationModel subclass:#MultiViewToolApplication
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:'workspaces tabList selectedWorkspaceIndexHolder workspaceHolder'
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    16
	classVariableNames:'DefaultInfoVisible'
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Interface-Smalltalk'
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!MultiViewToolApplication class methodsFor:'documentation'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
6179
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    23
copyright
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    24
"
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    25
 COPYRIGHT (c) 2004 by eXept Software AG
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    26
              All Rights Reserved
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    27
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    28
 This software is furnished under a license and may be used
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    29
 only in accordance with the terms of that license and with the
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    31
 be provided or otherwise made available to, or used by, any
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    32
 other person.  No title to or ownership of the software is
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    33
 hereby transferred.
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    34
"
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    35
!
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    36
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
documentation
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
    Common code for multiView applications (Workspace and Terminal app)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    [author:]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
        Claus Gittinger
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    46
!MultiViewToolApplication class methodsFor:'defaults'!
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    47
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    48
defaultInfoVisible
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    49
    ^ DefaultInfoVisible ? true
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    50
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    51
    "Created: / 14-07-2007 / 16:38:32 / cg"
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    52
!
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    53
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    54
defaultToolbarVisible
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    55
    ^ DefaultToolBarVisible ? false
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    56
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    57
    "Created: / 14-07-2007 / 16:38:47 / cg"
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    58
! !
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    59
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    60
!MultiViewToolApplication class methodsFor:'help specs'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    61
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    62
helpSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    63
    "This resource specification was automatically generated
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    64
     by the UIHelpTool of ST/X."
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    65
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    66
    "Do not manually edit this!! If it is corrupted,
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    67
     the UIHelpTool may not be able to read the specification."
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    68
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    69
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    70
     UIHelpTool openOnClass:MultiViewToolApplication    
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    71
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    72
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    73
    <resource: #help>
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    74
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    75
    ^ super helpSpec addPairsFrom:#(
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    76
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    77
#hideToolBar
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    78
''
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    79
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    80
)
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    81
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    82
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    83
!MultiViewToolApplication class methodsFor:'image specs'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    84
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    85
hideToolBarIcon
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    86
    <resource: #programImage>
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    87
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    88
    ^ ToolbarIconLibrary hideToolBarIcon
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    89
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    90
    "Created: / 18-02-2007 / 14:53:38 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    91
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    92
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
!MultiViewToolApplication class methodsFor:'interface specs'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
windowSpec
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
    96
    "This resource specification was automatically generated
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
    97
     by the UIPainter of ST/X."
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
    98
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
    99
    "Do not manually edit this!! If it is corrupted,
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   100
     the UIPainter may not be able to read the specification."
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   101
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   102
    "
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   103
     UIPainter new openOnClass:MultiViewToolApplication andSelector:#windowSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   104
     MultiViewToolApplication new openInterface:#windowSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   105
     MultiViewToolApplication open
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   106
    "
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   107
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   108
    <resource: #canvas>
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   110
    ^ 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   111
     #(FullSpec
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   112
        name: windowSpec
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   113
        window: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   114
       (WindowSpec
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   115
          label: 'Workspace'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   116
          name: 'Workspace'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   117
          min: (Point 10 10)
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   118
          bounds: (Rectangle 0 0 432 241)
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   119
          menu: mainMenu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   120
        )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   121
        component: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   122
       (SpecCollection
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   123
          collection: (
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   124
           (ViewSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   125
              name: 'ToolBar'
8231
50ce5026cb72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8196
diff changeset
   126
              layout: (LayoutFrame 0 0 0 0 0 1 32 0)
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   127
              visibilityChannel: toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   128
              component: 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   129
             (SpecCollection
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   130
                collection: (
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   131
                 (ActionButtonSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   132
                    label: 'hideToolBarIcon'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   133
                    name: 'HideToolBarButton'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   134
                    layout: (LayoutFrame 0 0 0 0 13 0 0 1)
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   135
                    activeHelpKey: hideToolBar
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   136
                    hasCharacterOrientedLabel: false
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   137
                    translateLabel: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   138
                    model: hideToolbar
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   139
                    postBuildCallback: hideToolBarButtonCreated:
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   140
                  )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   141
                 (MenuPanelSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   142
                    name: 'ToolBarMenu'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   143
                    layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0)
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   144
                    visibilityChannel: toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   145
                    menu: toolBarMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   146
                    textDefault: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   147
                  )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   148
                 )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   149
               
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   150
              )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   151
            )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   152
           (NoteBookViewSpec
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   153
              name: 'NoteBook'
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   154
              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   155
              model: selectedWorkspaceIndexHolder
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   156
              menu: tabList
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   157
              useIndex: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   158
              accessTabMenuAction: tabMenuAt:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   159
              destroyTabAction: destroyTab:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   160
              canvas: workspaceHolder
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   161
              canvasInset: 0
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   162
              keepCanvasAlive: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   163
              tabLevel: 1
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   164
            )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   165
           )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   166
         
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   167
        )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   168
      )
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
!MultiViewToolApplication class methodsFor:'menu specs'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
mainMenu
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   174
    "This resource specification was automatically generated
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   175
     by the MenuEditor of ST/X."
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   176
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   177
    "Do not manually edit this!! If it is corrupted,
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   178
     the MenuEditor may not be able to read the specification."
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   179
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   180
    "
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   181
     MenuEditor new openOnClass:MultiViewToolApplication andSelector:#mainMenu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   182
     (Menu new fromLiteralArrayEncoding:(MultiViewToolApplication mainMenu)) startUp
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   183
    "
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   184
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   185
    <resource: #menu>
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   187
    ^ 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   188
     #(Menu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   189
        (
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   190
         (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   191
            label: 'File'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   192
            translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   193
            submenu: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   194
           (Menu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   195
              (
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   196
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   197
                  label: 'New Editor'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   198
                  itemValue: newWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   199
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   200
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   201
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   202
                  label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   203
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   204
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   205
                  label: 'Load File...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   206
                  itemValue: menuLoad
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   207
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   208
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   209
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   210
                  label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   211
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   212
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   213
                  label: 'Save As...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   214
                  itemValue: menuSaveAs
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   215
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   216
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   217
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   218
                  enabled: hasMultipleBuffersHolder
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   219
                  label: 'Save all As...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   220
                  itemValue: menuSaveAllAs
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   221
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   222
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   223
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   224
                  label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   225
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   226
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   227
                  label: 'Print...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   228
                  itemValue: menuPrint
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   229
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   230
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   231
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   232
                  label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   233
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   234
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   235
                  label: 'Exit'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   236
                  itemValue: closeRequest
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   237
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   238
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   239
               )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   240
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   241
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   242
            )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   243
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   244
         (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   245
            label: 'Buffers'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   246
            nameKey: Buffer
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   247
            translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   248
            submenu: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   249
           (Menu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   250
              (
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   251
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   252
                  label: 'Add Buffer'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   253
                  itemValue: addWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   254
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   255
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   256
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   257
                  label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   258
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   259
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   260
                  label: 'Rename...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   261
                  itemValue: renameWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   262
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   263
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   264
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   265
                  label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   266
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   267
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   268
                  enabled: canRemoveWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   269
                  label: 'Remove Buffer'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   270
                  itemValue: removeWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   271
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   272
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   273
               )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   274
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   275
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   276
            )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   277
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   278
         (MenuItem
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   279
            label: 'View'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   280
            translateLabel: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   281
            submenuChannel: viewMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   282
            keepLinkedMenu: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   283
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   284
         (MenuItem
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   285
            label: 'Edit'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   286
            translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   287
            submenu: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   288
           (Menu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   289
              (
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   290
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   291
                  enabled: hasSelectionInActiveWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   292
                  label: 'Cut'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   293
                  itemValue: cutSelection
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   294
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   295
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   296
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   297
                  enabled: hasSelectionInActiveWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   298
                  label: 'Copy'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   299
                  itemValue: copySelection
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   300
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   301
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   302
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   303
                  label: 'Paste'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   304
                  itemValue: paste
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   305
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   306
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   307
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   308
                  label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   309
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   310
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   311
                  label: 'Select All'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   312
                  itemValue: selectAll
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   313
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   314
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   315
               )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   316
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   317
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   318
            )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   319
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   320
         (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   321
            label: 'MENU_Help'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   322
            translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   323
            startGroup: conditionalRight
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   324
            submenu: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   325
           (Menu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   326
              (
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   327
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   328
                  label: 'About this Application...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   329
                  itemValue: openAboutThisApplication
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   330
                  translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   331
                )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   332
               )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   333
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   334
              nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   335
            )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   336
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   337
         )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   338
        nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   339
        nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   340
      )
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   341
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   342
    "Modified: / 18-02-2007 / 15:18:25 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
tabMenu
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   346
    "This resource specification was automatically generated
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   347
     by the MenuEditor of ST/X."
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   348
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   349
    "Do not manually edit this!! If it is corrupted,
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   350
     the MenuEditor may not be able to read the specification."
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   351
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   352
    "
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   353
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#tabMenu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   354
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication tabMenu)) startUp
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   355
    "
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   356
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   357
    <resource: #menu>
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   359
    ^
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   360
     #(#Menu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   361
        #(
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   362
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   363
            #label: 'Add Tab'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   364
            #translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   365
            "/ #triggerOnDown: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   366
            #value: #addWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   367
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   368
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   369
            #label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   370
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   371
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   372
            #label: 'Remove Tab'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   373
            #translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   374
            "/ #triggerOnDown: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   375
            #value: #removeWorkspace:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   376
            #enabled: #canRemoveWorkspace:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   377
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   378
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   379
            #label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   380
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   381
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   382
            #label: 'Rename...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   383
            #translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   384
            "/ #triggerOnDown: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   385
            #value: #renameWorkspace:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   386
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   387
         )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   388
        nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   389
        nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   390
      )
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   391
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   392
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   393
toolBarMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   394
    "This resource specification was automatically generated
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   395
     by the MenuEditor of ST/X."
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   396
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   397
    "Do not manually edit this!! If it is corrupted,
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   398
     the MenuEditor may not be able to read the specification."
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   399
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   400
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   401
     MenuEditor new openOnClass:MultiViewToolApplication andSelector:#toolBarMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   402
     (Menu new fromLiteralArrayEncoding:(MultiViewToolApplication toolBarMenu)) startUp
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   403
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   404
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   405
    <resource: #menu>
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   406
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   407
    ^ 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   408
     #(Menu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   409
        (
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   410
         (MenuItem
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   411
            label: ''
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   412
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   413
         (MenuItem
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   414
"/            activeHelpKey: addWorkspace
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   415
            label: 'Add Buffer'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   416
            itemValue: addWorkspace
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   417
            translateLabel: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   418
            isButton: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   419
            labelImage: (ResourceRetriever ToolbarIconLibrary addBufferIcon)
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   420
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   421
         )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   422
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   423
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   424
      )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   425
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   426
    "Modified: / 18-02-2007 / 14:59:21 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   427
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   428
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   429
viewMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   430
    "This resource specification was automatically generated
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   431
     by the MenuEditor of ST/X."
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   432
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   433
    "Do not manually edit this!! If it is corrupted,
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   434
     the MenuEditor may not be able to read the specification."
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   435
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   436
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   437
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#viewMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   438
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication viewMenu)) startUp
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   439
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   440
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   441
    <resource: #menu>
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   442
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   443
    ^ 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   444
     #(Menu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   445
        (
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   446
         (MenuItem
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   447
            label: 'Toolbar'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   448
            translateLabel: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   449
            hideMenuOnActivated: false
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   450
            indication: toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   451
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   452
         (MenuItem
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   453
            label: 'Info'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   454
            translateLabel: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   455
            isVisible: false
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   456
            hideMenuOnActivated: false
7653
71f20b5aab8d Do not refer to non-existant aspect
Stefan Vogel <sv@exept.de>
parents: 7650
diff changeset
   457
            indication: infoVisibleHolder
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   458
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   459
         )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   460
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   461
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   462
      )
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   463
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   464
    "Modified: / 14-07-2007 / 16:49:04 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
!MultiViewToolApplication class methodsFor:'queries'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
isVisualStartable
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
    "return true, if this application can be started via #open.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
     (to allow start of a change browser via double-click in the browser)"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
5303
fe0d2165b716 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5302
diff changeset
   473
    self == MultiViewToolApplication ifTrue:[^false].
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
    ^ super isVisualStartable
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
!MultiViewToolApplication methodsFor:'accessing'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
selectedWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
    |wsIndex|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
    workspaces isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
        workspaces := OrderedCollection new.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
    wsIndex := self selectedWorkspaceIndexHolder value.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
    wsIndex == 0 ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
        ^ nil
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
    workspaces size < wsIndex ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
        workspaces grow:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
        workspaces at:wsIndex put:(self createWorkspace).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
    ^ workspaces at:wsIndex
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
tabMenuAt:index
6244
548f6707f59c *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6179
diff changeset
   498
    <resource: #programMenu>
548f6707f59c *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6179
diff changeset
   499
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
    |m i ws|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
    m := self class tabMenu.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
    m := m decodeAsLiteralArray.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
    i := m detectItem:[:item | item value == #removeWorkspace:] ifNone:nil.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
    i notNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
        i argument:index.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
        index ~~ self selectedWorkspaceIndexHolder value ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
            "/ for now: if that buffer is modified,
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
            "/ do not allow removing.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
            "/ (must be brought to front, in order for check-for-modification to work)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
            ws := workspaces at:index.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
            (ws isKindOf:ScrollableView) ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
                ws := ws scrolledView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
            ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
            ((ws isKindOf:TextView) not
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
            or:[ ws modified ])
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
            ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
                i disable
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
            ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
        ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
    i := m detectItem:[:item | item value == #renameWorkspace:] ifNone:nil.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
    i notNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
        i argument:index.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
    m findGuiResourcesIn:self.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
    ^ m
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
workspaceHolder
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
    workspaceHolder isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
        workspaceHolder := ValueHolder with:(self selectedWorkspace).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
    ^ workspaceHolder
7852
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   536
!
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   537
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   538
workspaces
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   539
    ^ workspaces
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
!MultiViewToolApplication methodsFor:'aspects'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   544
infoVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   545
    |holder|
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   546
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   547
    (holder := builder bindingAt:#infoVisibleHolder) isNil ifTrue:[
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   548
        holder := self class defaultInfoVisible asValue.
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   549
        builder aspectAt:#infoVisibleHolder put: holder.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   550
        holder addDependent:self.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   551
    ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   552
    ^ holder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   553
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   554
    "Created: / 18-02-2007 / 15:01:05 / cg"
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   555
    "Modified: / 14-07-2007 / 16:39:20 / cg"
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   556
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   557
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
selectedWorkspaceIndexHolder
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
    selectedWorkspaceIndexHolder isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
        selectedWorkspaceIndexHolder := 1 asValue.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
        selectedWorkspaceIndexHolder onChangeSend:#workspaceSelectionChanged to:self.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
    ^ selectedWorkspaceIndexHolder.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
tabList
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
    tabList isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
        tabList := List new.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
    ^ tabList.
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   571
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   572
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   573
toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   574
    |holder|
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   575
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   576
    (holder := builder bindingAt:#toolBarVisibleHolder) isNil ifTrue:[
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   577
        holder := self class defaultToolbarVisible asValue.
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   578
        builder aspectAt:#toolBarVisibleHolder put: holder.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   579
        holder addDependent:self.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   580
    ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   581
    ^ holder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   582
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   583
    "Created: / 18-02-2007 / 14:43:39 / cg"
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   584
    "Modified: / 14-07-2007 / 16:39:55 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
!MultiViewToolApplication methodsFor:'aspects-queries'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
canRemoveWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
    ^ self canRemoveWorkspace:(self selectedWorkspaceIndexHolder value)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
canRemoveWorkspace:idx
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
    ^ self tabList size > 1
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
"/       and:[ (self workspacesTextViewAt:(self selectedWorkspaceIndexHolder value))
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
hasMultipleBuffersHolder
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
    ^ [ workspaces size > 1 ]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
hasSelectionInActiveWorkspace
6424
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   603
    |v|
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   604
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   605
    v := self selectedWorkspacesTextView.
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   606
    ^ v notNil and:[v selectionAsString size > 0]
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   609
!MultiViewToolApplication methodsFor:'change & update'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   610
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   611
update:something with:aParameter from:changedObject
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   612
    changedObject == self toolBarVisibleHolder ifTrue:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   613
        self toolBarVisibilityChanged.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   614
        ^ self
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   615
    ].
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   616
    changedObject == self infoVisibleHolder ifTrue:[
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   617
        self infoVisibilityChanged.
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   618
        ^ self
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   619
    ].
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   620
    ^ super update:something with:aParameter from:changedObject
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   621
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   622
    "Modified: / 14-07-2007 / 16:46:14 / cg"
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   623
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   624
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   625
!MultiViewToolApplication methodsFor:'defaults'!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   626
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   627
defaultFileNameForLoad
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   628
   ^ 'file.txt'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   629
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   630
    "Created: / 25-10-2006 / 14:56:19 / cg"
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   631
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   632
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   633
defaultFileNameForSave
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   634
    ^ 'file.txt'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   635
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   636
    "Modified: / 25-10-2006 / 14:54:13 / cg"
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   637
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   638
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   639
defaultFileNameForSaveAll
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   640
   ^ 'file.txt'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   641
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   642
    "Modified: / 25-10-2006 / 14:55:50 / cg"
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   643
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   644
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   645
defaultPatternLoad
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   646
   ^ '*.txt'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   647
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   648
    "Created: / 25-10-2006 / 14:57:18 / cg"
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   649
! !
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   650
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   651
!MultiViewToolApplication methodsFor:'initialization'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   652
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   653
hideToolBarButtonCreated:aButton
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   654
    aButton passiveLevel:(MenuPanel defaultLevel). 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   655
"/    aButton passiveLevel:1.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   656
    aButton activeLevel:-1.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   657
    aButton backgroundColor:(MenuPanel defaultBackgroundColor).
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   658
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   659
    "Created: / 18-02-2007 / 14:48:28 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   660
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   661
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   662
postBuildWith:aBuilder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   663
    super postBuildWith:aBuilder.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   664
    self infoVisibleHolder value ifTrue:[ self infoVisibilityChanged ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   665
    self toolBarVisibleHolder value ifTrue:[ self toolBarVisibilityChanged ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   666
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   667
    "Created: / 18-02-2007 / 15:03:08 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   668
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   669
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   670
!MultiViewToolApplication methodsFor:'menu-actions'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   671
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   672
addWindow:aWindow named:name
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   673
    ^ self addWindow:aWindow named:name asFirst:false
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   674
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   675
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   676
addWindow:aWindow named:name asFirst:asFirst
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   677
    |tabList wsIndex newSelectedIndex|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   678
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   679
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
    wsIndex := tabList size + 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   681
    wsIndex == 1 ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
        "/ first - add a name for the first tab
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   683
        tabList add:(self window label). "/ 'Workspace'.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   684
        wsIndex := wsIndex + 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   685
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   687
    workspaces grow:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   688
    asFirst ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   689
        tabList addFirst:(name bindWith:wsIndex).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   690
        workspaces replaceFrom:2 to:wsIndex with:workspaces startingAt:1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   691
        newSelectedIndex := 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
    ] ifFalse:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
        tabList addLast:(name bindWith:wsIndex).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   694
        newSelectedIndex := wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
    workspaces at:newSelectedIndex put:aWindow.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   697
    self selectedWorkspaceIndexHolder value:newSelectedIndex.   
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   698
"/    workspaceHolder value:aWindow.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   699
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   700
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   701
addWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   702
    self addWindow:(self createWorkspace) named:'Workspace%1'
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   703
!
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   704
6458
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
   705
destroyTab:tabIndex
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
   706
    self removeWorkspace:tabIndex
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
   707
!
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
   708
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   709
loadFile:aFileName 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   710
    self loadFile:aFileName encoding:nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   711
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   712
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   713
loadFile:aFileName encoding:encodingSymbolOrNil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   714
    |lbl|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   715
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   716
    lbl := aFileName asFilename withoutSuffix baseName.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   717
    self loadFile:aFileName encoding:encodingSymbolOrNil label:lbl.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   718
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   719
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   720
loadFile:aFileName encoding:encodingSymbolOrNil label:label
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   721
    |file ws|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   722
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   723
    file := aFileName asFilename.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   724
    ws := self selectedWorkspacesTextView.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   725
    [
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   726
        |contents|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   727
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   728
        contents := file contents.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   729
        encodingSymbolOrNil notNil ifTrue:[
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   730
            contents := contents encodeFrom:encodingSymbolOrNil into:#'unicode'.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   731
            ws externalEncoding:encodingSymbolOrNil.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   732
        ].
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   733
        ws contents:contents.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   734
        ws defaultFileNameForFileDialog:file pathName.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   735
    ] on:StreamError do:[:ex|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   736
        Dialog warn:(resources string:'Cannot open %1: %2' with:file asString with:ex description).
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   737
        ^ self
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   738
    ].
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   739
    ws modified:false.
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   740
    self setLabel:label.
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   741
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   742
7745
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   743
loadFile:aFileName label:lbl
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   744
    |encoding|
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   745
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   746
    encoding := CharacterEncoder guessEncodingOfFile:aFileName.
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   747
    (encoding == #'iso8859-1' or:[encoding == #'ascii']) ifTrue:[
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   748
        encoding := nil
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   749
    ].
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   750
    self loadFile:aFileName encoding:encoding label:lbl.
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   751
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   752
    "Created: / 15-03-2007 / 11:52:21 / cg"
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   753
!
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
   754
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   755
menuLoad
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   756
    |file|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   757
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   758
    (self askIfModified:'Text was modified. Load anyway ?' yesButton:'Load') ifFalse:[ ^ self].
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   759
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   760
    file := Dialog 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   761
                requestFileName:(resources string:'Load file') 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   762
                default:(self defaultFileNameForLoad) 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   763
                pattern:(self defaultPatternLoad).
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   764
    file size ~~ 0 ifTrue:[
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   765
        self loadFile:file
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   766
    ]
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   767
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   768
    "Modified: / 25-10-2006 / 14:57:34 / cg"
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   769
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   770
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   771
menuPrint
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   772
    |ws|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   773
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   774
    ws := self selectedWorkspacesTextView.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   775
    ws doPrint
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   776
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   777
    "Created: / 25-10-2006 / 15:01:51 / cg"
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   778
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   779
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   780
menuSaveAllAs
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   781
    self 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   782
        askForFile:'Save all Buffers into:' 
8196
29ed5a2bf16d fixed saveAll
Claus Gittinger <cg@exept.de>
parents: 8033
diff changeset
   783
        default:(self defaultFileNameForSaveAll)
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   784
        thenDo:[:file :doAppend |
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   785
            |ws append|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   786
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   787
            append := doAppend.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   788
            workspaces do:[:subView |
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   789
                |ws|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   790
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   791
                ws := self workspaceViewOfView:subView.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
                ws notNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
                    ws saveAs:file doAppend:append.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   794
                    ws modified:false.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   795
                ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
                append := true.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
            ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
        ]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
menuSaveAs
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
    self 
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   803
        askForFile:'Save Buffer into:'
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   804
        default:(self defaultFileNameForSave)
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
        thenDo:[:file :doAppend |
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   806
            |ws lbl|
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
            ws := self selectedWorkspacesTextView.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
            ws saveAs:file doAppend:doAppend.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
            ws modified:false.
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   811
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   812
            lbl := file asFilename withoutSuffix baseName.
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   813
            self setLabel:lbl.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
        ]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
newWorkspace
6863
4e2e267622eb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6634
diff changeset
   818
    self class new openWithExtent:(self builder window extent).
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   819
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   820
    "Modified: / 25-10-2006 / 14:39:15 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   821
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   822
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   823
removeWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   824
    self removeWorkspace:(self selectedWorkspaceIndexHolder value)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   825
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   826
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   827
removeWorkspace:wsIndex
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
    |tabList newWsIndex|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
    wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[
6509
bcaae26df254 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6458
diff changeset
   831
        (self askIfModified:'Text was modified. Remove buffer anyway ?' yesButton:'Remove Buffer') ifFalse:[
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
            ^ self
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
        ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   837
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   838
    wsIndex == tabList size ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   839
        newWsIndex := wsIndex - 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   840
    ] ifFalse:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
        newWsIndex := wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
    tabList removeIndex:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
    (workspaces at:wsIndex) destroy.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   846
    workspaces removeIndex:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   847
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   848
    tabList size == 1 ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   849
        self window label:(tabList at:1).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   850
        tabList removeIndex:1
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   851
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   853
    workspaceHolder value:(workspaces at:newWsIndex).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   854
    self selectedWorkspaceIndexHolder value:newWsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   855
    "/ to force change (update workspaceHolder - even if same index)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   856
    self selectedWorkspaceIndexHolder changed:#value.   
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
renameWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   860
    self renameWorkspace:(self selectedWorkspaceIndexHolder value)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   861
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
renameWorkspace:wsIndex
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
    |tabList oldName newName|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   867
    tabList isEmpty ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
        oldName := self window label
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   869
    ] ifFalse:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   870
        oldName := tabList at:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
    newName := Dialog request:(resources string:'New Name for %1:' with:oldName) initialAnswer:oldName.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
    newName size == 0 ifTrue:[ ^ self].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   874
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   875
    self renameWorkspace:wsIndex to:newName.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   876
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   877
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   878
renameWorkspace:wsIndex to:newName
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   879
    |tabList|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   880
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   881
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   882
    tabList notEmpty ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   883
        tabList at:wsIndex put:newName.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   884
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   885
    wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   886
        self window label:newName.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   887
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   888
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   889
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   890
!MultiViewToolApplication methodsFor:'menu-actions-editing'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   891
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   892
copySelection
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   893
    self selectedWorkspacesTextView copySelection
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   894
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   895
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   896
cutSelection
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   897
    self selectedWorkspacesTextView cutSelection
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   898
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   899
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   900
paste
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   901
    self selectedWorkspacesTextView paste
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   902
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   903
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   904
paste:aString
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   905
    self selectedWorkspacesTextView paste:aString.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   906
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   907
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   908
selectAll
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   909
    self selectedWorkspacesTextView selectAll.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   910
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   911
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   912
!MultiViewToolApplication methodsFor:'private'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   913
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   914
askForFile:question default:defaultFilename thenDo:aBlock
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   915
    Dialog
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   916
        requestSaveFileName:(resources string:question) 
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   917
        default:defaultFilename 
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   918
        fromDirectory:nil 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   919
        action:[:fileName | aBlock value:fileName value:false] 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   920
        appendAction:[:fileName | aBlock value:fileName value:true]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   921
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   922
"/    |file doAppend|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   923
"/
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   924
"/    doAppend := false.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   925
"/    Dialog aboutToOpenBoxNotificationSignal handle:[:n |
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   926
"/        |box|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   927
"/
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   928
"/        box := n parameter.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   929
"/        box addButton:(Button label:'Append' action:[doAppend := true. box okPressed]).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   930
"/        n proceed.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   931
"/    ] do:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   932
"/        file := Dialog requestFileName:question default:'file.wsp'. 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   933
"/    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   934
"/    file isEmptyOrNil ifFalse:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   935
"/        aBlock value:file value:doAppend
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   936
"/    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   937
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   938
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   939
askForFile:question thenDo:aBlock
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   940
    ^ self
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   941
        askForFile:question default:'file.wsp' thenDo:aBlock
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   942
!
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
   943
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   944
askIfAnyModified:arg1 yesButton:arg2 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   945
    "raise an error: must be redefined in concrete subclass(es)"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   946
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   947
    ^ self subclassResponsibility
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   948
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   949
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   950
askIfModified:question yesButton:yesButtonText
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   951
    "tell user, that code has been modified - let her confirm"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   952
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   953
    |textView|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   954
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   955
    textView := self selectedWorkspace.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   956
    (self isModifiedWorkspace:textView) ifFalse:[^ true].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   957
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   958
    (Dialog 
6354
08a483e3beda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6244
diff changeset
   959
        confirm:(resources stringWithCRs:question)
6634
a94d8a07247d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6509
diff changeset
   960
        yesLabel:(resources string:yesButtonText)
a94d8a07247d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6509
diff changeset
   961
        noLabel:(resources string:'Cancel'))
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   962
    ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   963
        "/ reset modified flag so question is asked only once
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   964
        textView modified:false.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   965
        ^ true
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   966
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   967
    ^ false
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   968
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   969
    "Modified: 2.10.1997 / 14:23:47 / stefan"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   970
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   971
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   972
createWorkspace
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   973
    |ws|
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   974
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   975
    ws := (HVScrollableView for:EditTextView).
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   976
    ^ ws
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   977
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   978
    "Modified: / 25-10-2006 / 14:34:19 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   979
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   980
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   981
isModifiedWorkspace:aView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   982
    self subclassResponsibility
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   983
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   984
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   985
selectedWorkspacesTextView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   986
    ^ self workspaceViewOfView:(self selectedWorkspace)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   987
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   988
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   989
setLabel:label
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   990
    tabList size > 1 ifTrue:[
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   991
        tabList at:self selectedWorkspaceIndexHolder value put:label
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   992
    ].
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   993
    self window label:label.
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   994
!
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
   995
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   996
workspaceSelectionChanged
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   997
    |wsIndex windowLabel v|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   998
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   999
    "/ self selected
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1000
    self workspaceHolder value:(v := self selectedWorkspace).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1001
    wsIndex := self selectedWorkspaceIndexHolder value.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1002
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1003
    wsIndex ~~ 0 ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1004
        windowLabel := tabList at:wsIndex ifAbsent:nil.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1005
        windowLabel notNil ifTrue:[self window label:windowLabel].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1006
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1007
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1008
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1009
workspaceViewOfView:aView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1010
    |view|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1011
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1012
    view := aView.
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1013
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1014
    (view isScrollWrapper) ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1015
        view := view scrolledView.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1016
        view isNil ifTrue:[^ nil].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1017
    ].
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1018
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1019
    (view isTextView) ifFalse:[
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1020
        (view isKindOf:InspectorView) ifTrue:[
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1021
            view := view workspace.
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1022
            (view isScrollWrapper) ifTrue:[
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1023
                view := view scrolledView
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1024
            ].
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1025
        ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1026
    ].
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1027
    (view isTextView) ifTrue:[^ view].
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1028
    ^ view allSubViewsDetect:[:v| v name = #Workspace] ifNone:nil.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1029
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1030
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1031
!MultiViewToolApplication methodsFor:'user actions'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1032
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1033
hideToolbar
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1034
    self toolBarVisibleHolder value:false
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1035
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1036
    "Created: / 18-02-2007 / 14:55:54 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1037
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1038
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1039
infoVisibilityChanged
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1040
    |visible cFrame bottomOffset|
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1041
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1042
    visible := self infoVisibleHolder value.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1043
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1044
    cFrame := builder findComponentAt:#EditorNoteBook. "/ #CodeView.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1045
    cFrame notNil ifTrue:[    
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1046
        visible ifFalse:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1047
            bottomOffset := 0.   
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1048
        ] ifTrue:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1049
            bottomOffset := -25.   
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1050
        ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1051
        cFrame layout bottomOffset:bottomOffset.   
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1052
        cFrame container notNil ifTrue:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1053
            cFrame containerChangedSize.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1054
        ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1055
    ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1056
    DefaultInfoVisible := visible
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1057
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1058
    "Created: / 18-02-2007 / 15:01:55 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1059
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1060
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1061
toolBarVisibilityChanged
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1062
    |visible toolBar noteBook topOffset|
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1063
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1064
    toolBar := self componentAt:#ToolBar.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1065
    toolBar isNil ifTrue:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1066
        topOffset := 0.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1067
    ] ifFalse:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1068
        visible := self toolBarVisibleHolder value.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1069
        DefaultToolBarVisible := visible.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1070
        visible ifTrue:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1071
            topOffset := toolBar height.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1072
        ]
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1073
    ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1074
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1075
    noteBook := self componentAt:#NoteBook.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1076
    noteBook notNil ifTrue:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1077
        noteBook layout topOffset:topOffset.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1078
        noteBook container notNil ifTrue:[
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1079
            noteBook containerChangedSize.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1080
        ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1081
    ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1082
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1083
    "Created: / 18-02-2007 / 14:46:22 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1084
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1085
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1086
!MultiViewToolApplication class methodsFor:'documentation'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1087
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1088
version
8231
50ce5026cb72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8196
diff changeset
  1089
    ^ '$Header: /cvs/stx/stx/libtool/MultiViewToolApplication.st,v 1.21 2008-08-20 19:38:07 cg Exp $'
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1090
! !