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