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