MultiViewToolApplication.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 04 Apr 2023 17:00:56 +0200
branchjv
changeset 19645 346f10c81090
parent 19629 8cdd7e139669
permissions -rw-r--r--
`ChangeSetBrowser2`: fix for composite refactory changes
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
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
     3
 COPYRIGHT (c) 2022 LabWare
6179
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     4
              All Rights Reserved
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     5
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     6
 This software is furnished under a license and may be used
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     7
 only in accordance with the terms of that license and with the
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     8
 inclusion of the above copyright notice.   This software may not
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
     9
 be provided or otherwise made available to, or used by, any
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    10
 other person.  No title to or ownership of the software is
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    11
 hereby transferred.
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    12
"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"{ Package: 'stx:libtool' }"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
15407
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
    15
"{ NameSpace: Smalltalk }"
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
    16
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
ToolApplicationModel subclass:#MultiViewToolApplication
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	instanceVariableNames:'workspaces tabList selectedWorkspaceIndexHolder workspaceHolder'
8615
3407696ae28f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8576
diff changeset
    19
	classVariableNames:'DefaultInfoVisible DefaultEditToolBarVisible
3407696ae28f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8576
diff changeset
    20
		DefaultToolBarVisible'
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	category:'Interface-Smalltalk'
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
!MultiViewToolApplication class methodsFor:'documentation'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
6179
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    27
copyright
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    28
"
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    29
 COPYRIGHT (c) 2004 by eXept Software AG
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
    30
 COPYRIGHT (c) 2022 LabWare
6179
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    31
              All Rights Reserved
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    32
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    33
 This software is furnished under a license and may be used
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    34
 only in accordance with the terms of that license and with the
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    35
 inclusion of the above copyright notice.   This software may not
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    36
 be provided or otherwise made available to, or used by, any
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    37
 other person.  No title to or ownership of the software is
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    38
 hereby transferred.
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    39
"
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    40
!
182d948dcf05 copyright
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
    41
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
documentation
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
"
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
    44
    Common code for multiView applications (Workspace, Terminal app and maybe more later)
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    [author:]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
        Claus Gittinger
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    51
!MultiViewToolApplication class methodsFor:'defaults'!
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    52
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
    53
defaultEditToolbarVisible
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
    54
    ^ DefaultEditToolBarVisible ? false
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
    55
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
    56
    "Created: / 14-07-2007 / 16:38:47 / cg"
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
    57
!
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
    58
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    59
defaultInfoVisible
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    60
    ^ DefaultInfoVisible ? true
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    61
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    62
    "Created: / 14-07-2007 / 16:38:32 / cg"
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    63
!
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
defaultToolbarVisible
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    66
    ^ DefaultToolBarVisible ? false
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    67
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    68
    "Created: / 14-07-2007 / 16:38:47 / cg"
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    69
! !
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
    70
9143
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    71
!MultiViewToolApplication class methodsFor:'help specs'!
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    72
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    73
flyByHelpSpec
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    74
    <resource: #help>
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    75
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    76
    ^ super flyByHelpSpec addPairsFrom:#(
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    77
10221
f3fcf030f6b4 useless code removed
Claus Gittinger <cg@exept.de>
parents: 9694
diff changeset
    78
#addWorkspace
f3fcf030f6b4 useless code removed
Claus Gittinger <cg@exept.de>
parents: 9694
diff changeset
    79
'Add another page (tab)'
f3fcf030f6b4 useless code removed
Claus Gittinger <cg@exept.de>
parents: 9694
diff changeset
    80
9143
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    81
#hideToolBar
12482
e801a369d243 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 11727
diff changeset
    82
'Hide the toolbar. Show again via the "View"-menu'
9143
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    83
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    84
#hideEditToolBar
12482
e801a369d243 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 11727
diff changeset
    85
'Hide the edit-toolbar. Show again via the "View"-menu'
9143
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    86
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    87
)
10221
f3fcf030f6b4 useless code removed
Claus Gittinger <cg@exept.de>
parents: 9694
diff changeset
    88
f3fcf030f6b4 useless code removed
Claus Gittinger <cg@exept.de>
parents: 9694
diff changeset
    89
    "Modified: / 06-07-2011 / 18:08:57 / cg"
9143
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    90
! !
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
    91
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    92
!MultiViewToolApplication class methodsFor:'image specs'!
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
hideToolBarIcon
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    95
    <resource: #programImage>
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    96
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    97
    ^ ToolbarIconLibrary hideToolBarIcon
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    98
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
    99
    "Created: / 18-02-2007 / 14:53:38 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   100
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   101
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
!MultiViewToolApplication class methodsFor:'interface specs'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
windowSpec
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   105
    "This resource specification was automatically generated
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   106
     by the UIPainter of ST/X."
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
    "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
   109
     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
   110
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   111
    "
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   112
     UIPainter new openOnClass:MultiViewToolApplication andSelector:#windowSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   113
     MultiViewToolApplication new openInterface:#windowSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   114
     MultiViewToolApplication open
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   115
    "
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
    <resource: #canvas>
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   119
    ^ 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   120
     #(FullSpec
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   121
        name: windowSpec
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   122
        window: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   123
       (WindowSpec
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   124
          label: 'Workspace'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   125
          name: 'Workspace'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   126
          min: (Point 10 10)
13858
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   127
          bounds: (Rectangle 0 0 640 480)
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   128
          menu: mainMenu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   129
        )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   130
        component: 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   131
       (SpecCollection
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   132
          collection: (
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   133
           (ViewSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   134
              name: 'ToolBar'
8231
50ce5026cb72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8196
diff changeset
   135
              layout: (LayoutFrame 0 0 0 0 0 1 32 0)
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   136
              visibilityChannel: toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   137
              component: 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   138
             (SpecCollection
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   139
                collection: (
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   140
                 (ActionButtonSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   141
                    label: 'hideToolBarIcon'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   142
                    name: 'HideToolBarButton'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   143
                    layout: (LayoutFrame 0 0 0 0 13 0 0 1)
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   144
                    activeHelpKey: hideToolBar
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   145
                    hasCharacterOrientedLabel: false
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   146
                    translateLabel: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   147
                    model: hideToolbar
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   148
                    postBuildCallback: hideToolBarButtonCreated:
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   149
                  )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   150
                 (MenuPanelSpec
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   151
                    name: 'ToolBarMenu'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   152
                    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
   153
                    visibilityChannel: toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   154
                    menu: toolBarMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   155
                    textDefault: true
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
                 )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   158
               
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   159
              )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   160
            )
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   161
           (ViewSpec
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   162
              name: 'EditToolBar'
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   163
              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
   164
              visibilityChannel: editToolBarVisibleHolder
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   165
              component: 
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   166
             (SpecCollection
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   167
                collection: (
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   168
                 (ActionButtonSpec
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   169
                    label: 'hideToolBarIcon'
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   170
                    name: 'HideEditToolBarButton'
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   171
                    layout: (LayoutFrame 0 0 0 0 13 0 0 1)
9143
Claus Gittinger <cg@exept.de>
parents: 9058
diff changeset
   172
                    activeHelpKey: hideEditToolBar
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   173
                    hasCharacterOrientedLabel: false
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   174
                    translateLabel: true
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   175
                    model: hideEditToolbar
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   176
                    postBuildCallback: hideToolBarButtonCreated:
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   177
                  )
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   178
                 (MenuPanelSpec
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   179
                    name: 'EditToolBar1'
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   180
                    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
   181
                    visibilityChannel: editToolBarVisibleHolder
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   182
                    menu: editToolBarMenu
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   183
                    textDefault: true
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
                 )
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   186
               
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   187
              )
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   188
            )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   189
           (NoteBookViewSpec
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   190
              name: 'NoteBook'
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   191
              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
   192
              model: selectedWorkspaceIndexHolder
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   193
              menu: tabList
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   194
              useIndex: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   195
              accessTabMenuAction: tabMenuAt:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   196
              destroyTabAction: destroyTab:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   197
              canvas: workspaceHolder
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   198
              canvasInset: 0
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   199
              keepCanvasAlive: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   200
              tabLevel: 1
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
           )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   203
         
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   204
        )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   205
      )
13858
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   206
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   207
    "Modified: / 11-05-2012 / 11:43:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
!MultiViewToolApplication class methodsFor:'menu specs'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   212
editToolBarMenu
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   213
    "This resource specification was automatically generated
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   214
     by the MenuEditor of ST/X."
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   215
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   216
    "Do not manually edit this!! If it is corrupted,
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   217
     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
   218
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   219
    "
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   220
     MenuEditor new openOnClass:MultiViewToolApplication andSelector:#toolBarMenu
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   221
     (Menu new fromLiteralArrayEncoding:(MultiViewToolApplication toolBarMenu)) startUp
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   222
    "
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
    <resource: #menu>
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   225
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   226
    ^ 
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   227
     #(Menu
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
         )
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   230
        nil
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   231
        nil
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   232
      )
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   233
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   234
    "Modified: / 18-02-2007 / 14:59:21 / cg"
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   235
!
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   236
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
mainMenu
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   238
    "This resource specification was automatically generated
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   239
     by the MenuEditor of ST/X."
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   240
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   241
    "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
   242
     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
   243
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   244
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   245
    "
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   246
     MenuEditor new openOnClass:MultiViewToolApplication andSelector:#mainMenu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   247
     (Menu new fromLiteralArrayEncoding:(MultiViewToolApplication mainMenu)) startUp
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
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   250
    <resource: #menu>
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   252
    ^ 
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   253
     #(Menu (
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   254
         (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   255
            label: 'File'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   256
            isVisible: true
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   257
            submenu: 
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   258
           (Menu (
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   259
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   260
                  label: 'New Editor'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   261
                  itemValue: newWorkspace
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   262
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   263
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   264
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   265
                  label: '-'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   266
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   267
               )
7475
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: 'Load File...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   270
                  itemValue: menuLoad
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   271
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   272
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   273
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   274
                  label: '-'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   275
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   276
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   277
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   278
                  label: 'Save As...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   279
                  itemValue: menuSaveAs
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   280
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   281
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   282
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   283
                  enabled: hasMultipleBuffersHolder
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   284
                  label: 'Save all As...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   285
                  itemValue: menuSaveAllAs
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   286
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   287
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   288
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   289
                  label: '-'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   290
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   291
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   292
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   293
                  label: 'Print...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   294
                  itemValue: menuPrint
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   295
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   296
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   297
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   298
                  label: '-'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   299
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   300
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   301
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   302
                  label: 'Exit'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   303
                  itemValue: closeRequest
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   304
                  isVisible: true
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   305
               )
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   306
             ) nil
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   307
              nil
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   308
           )
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   309
         )
7475
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: 'Buffers'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   312
            nameKey: Buffer
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   313
            isVisible: true
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   314
            submenu: 
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   315
           (Menu (
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   316
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   317
                  label: 'Add Buffer'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   318
                  itemValue: addWorkspace
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   319
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   320
                  shortcutKey: AddTab
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   321
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   322
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   323
                  label: '-'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   324
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   325
               )
7475
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
                  label: 'Rename...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   328
                  itemValue: renameWorkspace
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   329
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   330
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   331
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   332
                  label: '-'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   333
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   334
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   335
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   336
                  enabled: canRemoveWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   337
                  label: 'Remove Buffer'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   338
                  itemValue: removeWorkspace
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   339
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   340
                  shortcutKey: CloseTab
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   341
               )
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   342
             ) nil
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   343
              nil
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   344
           )
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   345
         )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   346
         (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   347
            label: 'Edit'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   348
            isVisible: true
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   349
            submenu: 
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   350
           (Menu (
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   351
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   352
                  enabled: hasSelectionInActiveWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   353
                  label: 'Cut'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   354
                  itemValue: cutSelection
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   355
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   356
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   357
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   358
                  enabled: hasSelectionInActiveWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   359
                  label: 'Copy'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   360
                  itemValue: copySelection
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   361
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   362
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   363
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   364
                  label: 'Paste'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   365
                  itemValue: paste
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   366
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   367
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   368
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   369
                  label: '-'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   370
                  isVisible: true
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   371
               )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   372
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   373
                  label: 'Select All'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   374
                  itemValue: selectAll
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   375
                  isVisible: true
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   376
               )
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   377
             ) nil
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   378
              nil
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   379
           )
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   380
         )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   381
         (MenuItem
8500
1a3066fb8ed7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8498
diff changeset
   382
            label: 'View'
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   383
            isVisible: true
8500
1a3066fb8ed7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8498
diff changeset
   384
            submenuChannel: viewMenu
1a3066fb8ed7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8498
diff changeset
   385
            keepLinkedMenu: true
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   386
         )
8500
1a3066fb8ed7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8498
diff changeset
   387
         (MenuItem
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   388
            label: 'MENU_Help'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   389
            startGroup: conditionalRight
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   390
            isVisible: true
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   391
            submenu: 
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   392
           (Menu (
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   393
               (MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   394
                  label: 'About this Application...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   395
                  itemValue: openAboutThisApplication
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   396
                  isVisible: true
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   397
               )
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   398
             ) nil
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   399
              nil
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   400
           )
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   401
         )
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   402
       ) nil
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   403
        nil
19629
8cdd7e139669 Use `#AddTab` and `#CloseTab` shortcuts for adding/removing tabs
Jan Vrany <jan.vrany@labware.com>
parents: 18832
diff changeset
   404
     )
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
tabMenu
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   408
    "This resource specification was automatically generated
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   409
     by the MenuEditor of ST/X."
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
    "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
   412
     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
   413
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
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#tabMenu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   416
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication tabMenu)) startUp
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   417
    "
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
    <resource: #menu>
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   421
    ^
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   422
     #(#Menu
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   423
        #(
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   424
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   425
            #label: 'Add Tab'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   426
            #translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   427
            "/ #triggerOnDown: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   428
            #value: #addWorkspace
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: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   432
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   433
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   434
            #label: 'Remove Tab'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   435
            #translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   436
            "/ #triggerOnDown: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   437
            #value: #removeWorkspace:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   438
            #enabled: #canRemoveWorkspace:
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
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   441
            #label: 'Remove all other Tabs'
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   442
            #translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   443
            "/ #triggerOnDown: true
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   444
            #value: #removeAllWorkspacesExcept:
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   445
            #enabled: #canRemoveAllWorkspacesExcept:
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   446
          )
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   447
         #(#MenuItem
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   448
            #label: '-'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   449
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   450
         #(#MenuItem
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   451
            #label: 'Rename...'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   452
            #translateLabel: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   453
            "/ #triggerOnDown: true
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   454
            #value: #renameWorkspace:
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   455
          )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   456
         )
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   457
        nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   458
        nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   459
      )
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   460
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   461
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   462
toolBarMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   463
    "This resource specification was automatically generated
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   464
     by the MenuEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   467
     the MenuEditor may not be able to read the specification."
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
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   470
     MenuEditor new openOnClass:MultiViewToolApplication andSelector:#toolBarMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   471
     (Menu new fromLiteralArrayEncoding:(MultiViewToolApplication toolBarMenu)) startUp
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   472
    "
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   473
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   474
    <resource: #menu>
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   475
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   476
    ^ 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   477
     #(Menu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   478
        (
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   479
         (MenuItem
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   480
            label: ''
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   481
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   482
         (MenuItem
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   483
"/            activeHelpKey: addWorkspace
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   484
            label: 'Add Buffer'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   485
            itemValue: addWorkspace
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   486
            translateLabel: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   487
            isButton: true
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   488
            labelImage: (ResourceRetriever ToolbarIconLibrary addBufferIcon)
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   489
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   490
         )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   491
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   492
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   493
      )
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
    "Modified: / 18-02-2007 / 14:59:21 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   496
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   497
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   498
viewMenu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   499
    "This resource specification was automatically generated
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   500
     by the MenuEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   503
     the MenuEditor may not be able to read the specification."
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   504
14279
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
   505
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   506
    "
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   507
     MenuEditor new openOnClass:MultiViewToolApplication andSelector:#viewMenu
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   508
     (Menu new fromLiteralArrayEncoding:(MultiViewToolApplication viewMenu)) startUp
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   509
    "
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
    <resource: #menu>
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   512
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   513
    ^ 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   514
     #(Menu
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   515
        (
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   516
         (MenuItem
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   517
            label: 'Toolbar'
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   518
            hideMenuOnActivated: false
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   519
            indication: toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   520
          )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   521
         (MenuItem
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   522
            label: 'Editor Toolbar'
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   523
            isVisible: hasEditToolBar
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   524
            hideMenuOnActivated: false
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   525
            indication: editToolBarVisibleHolder
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   526
          )
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   527
         (MenuItem
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   528
            label: 'Info'
9380
346a2a59c410 added: #hasInfoLabel
Claus Gittinger <cg@exept.de>
parents: 9143
diff changeset
   529
            isVisible: hasInfoLabel
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   530
            hideMenuOnActivated: false
7653
71f20b5aab8d Do not refer to non-existant aspect
Stefan Vogel <sv@exept.de>
parents: 7650
diff changeset
   531
            indication: infoVisibleHolder
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   532
          )
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   533
         (MenuItem
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   534
            label: '-'
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   535
          )
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   536
         (MenuItem
14279
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
   537
            label: 'Font...'
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
   538
            itemValue: openFontDialog
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
   539
          )
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
   540
         (MenuItem
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   541
            label: 'Settings...'
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   542
            itemValue: openSettingsDialog
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
   543
          )
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   544
         )
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   545
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   546
        nil
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   547
      )
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
!MultiViewToolApplication class methodsFor:'queries'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
15945
06616f490bf6 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15408
diff changeset
   552
isAbstract
06616f490bf6 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15408
diff changeset
   553
    ^ self == MultiViewToolApplication
06616f490bf6 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15408
diff changeset
   554
!
06616f490bf6 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15408
diff changeset
   555
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
isVisualStartable
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
    "return true, if this application can be started via #open.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
     (to allow start of a change browser via double-click in the browser)"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
5303
fe0d2165b716 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5302
diff changeset
   560
    self == MultiViewToolApplication ifTrue:[^false].
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
    ^ super isVisualStartable
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
!MultiViewToolApplication methodsFor:'accessing'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
selectedWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
    |wsIndex|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
    workspaces isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
        workspaces := OrderedCollection new.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
    wsIndex := self selectedWorkspaceIndexHolder value.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
    wsIndex == 0 ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
        ^ nil
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
    workspaces size < wsIndex ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
        workspaces grow:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
        workspaces at:wsIndex put:(self createWorkspace).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
    ^ workspaces at:wsIndex
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
13858
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   584
selectedWorkspaceApplication
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   585
    "Return an aoplication of selected workspace or nil,
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   586
     is currently selected workspace is not an embedded
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   587
     ApplicationModel"
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   588
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   589
    | ws |
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   590
    ws := self selectedWorkspace.
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   591
    ^(ws notNil and:[ws isApplicationSubView]) ifTrue:[
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   592
        ws application
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   593
    ] ifFalse:[
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   594
        nil
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   595
    ]
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   596
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   597
    "Created: / 11-05-2012 / 09:38:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   598
!
2e691a1ec8b2 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 12482
diff changeset
   599
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
tabMenuAt:index
6244
548f6707f59c *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6179
diff changeset
   601
    <resource: #programMenu>
548f6707f59c *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6179
diff changeset
   602
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
    |m i ws|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
    m := self class tabMenu.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
    m := m decodeAsLiteralArray.
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   607
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
    i := m detectItem:[:item | item value == #removeWorkspace:] ifNone:nil.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
    i notNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
        i argument:index.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
        index ~~ self selectedWorkspaceIndexHolder value ifTrue:[
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   612
            "/ for now: if that buffer is modified, do not allow removing.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
            "/ (must be brought to front, in order for check-for-modification to work)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
            ws := workspaces at:index.
11727
667a6bfb5c64 Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11626
diff changeset
   615
            ws isScrollWrapper ifTrue:[
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
                ws := ws scrolledView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
            ].
11727
667a6bfb5c64 Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11626
diff changeset
   618
            (ws isTextView not
667a6bfb5c64 Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11626
diff changeset
   619
             or:[ ws modified ]) ifTrue:[
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
                i disable
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
            ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   622
        ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
    ].
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   624
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   625
    i := m detectItem:[:item | item value == #removeAllWorkspacesExcept:] ifNone:nil.
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   626
    i notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   627
        i argument:index.
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   628
        "/ for now: if any buffer is modified, do not allow removing.
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   629
        "/ (must be brought to front, in order for check-for-modification to work)
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   630
        workspaces doWithIndex:[:wsArg :idx |
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   631
            |ws|
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   632
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   633
            idx ~~ index ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   634
                ws := wsArg.
11727
667a6bfb5c64 Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11626
diff changeset
   635
                ws isScrollWrapper ifTrue:[
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   636
                    ws := ws scrolledView
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   637
                ].
11727
667a6bfb5c64 Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11626
diff changeset
   638
                (ws isTextView and:[ ws modified ]) ifTrue:[
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   639
                    i disable
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   640
                ].
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   641
            ].
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   642
        ].
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   643
    ].
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   644
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   645
    i := m detectItem:[:item | item value == #renameWorkspace:] ifNone:nil.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   646
    i notNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   647
        i argument:index.
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
    m findGuiResourcesIn:self.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
    ^ m
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
workspaceHolder
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
    workspaceHolder isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
        workspaceHolder := ValueHolder with:(self selectedWorkspace).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   658
    ^ workspaceHolder
7852
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   659
!
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   660
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   661
workspaces
18832
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
   662
    workspaces isNil ifTrue:[ 
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
   663
        workspaces := OrderedCollection new.
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
   664
    ].
7852
1cd1001247d9 *** empty log message ***
ab
parents: 7824
diff changeset
   665
    ^ workspaces
18832
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
   666
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
   667
    "Modified: / 20-06-2019 / 18:01:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   668
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   669
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   670
!MultiViewToolApplication methodsFor:'aspects'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   671
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   672
editToolBarVisibleHolder
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   673
    |holder|
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   674
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   675
    (holder := builder bindingAt:#editToolBarVisibleHolder) isNil ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   676
        holder := self class defaultEditToolbarVisible asValue.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   677
        builder aspectAt:#editToolBarVisibleHolder put: holder.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   678
        holder addDependent:self.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   679
    ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   680
    ^ holder
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   681
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   682
    "Created: / 18-02-2007 / 14:43:39 / cg"
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   683
    "Modified: / 14-07-2007 / 16:39:55 / cg"
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   684
!
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   685
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   686
hasEditToolBar
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   687
    ^ (self menuFor:#editToolBarMenu) decodeAsLiteralArray hasItems 
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   688
!
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   689
9380
346a2a59c410 added: #hasInfoLabel
Claus Gittinger <cg@exept.de>
parents: 9143
diff changeset
   690
hasInfoLabel
346a2a59c410 added: #hasInfoLabel
Claus Gittinger <cg@exept.de>
parents: 9143
diff changeset
   691
    ^ false
346a2a59c410 added: #hasInfoLabel
Claus Gittinger <cg@exept.de>
parents: 9143
diff changeset
   692
!
346a2a59c410 added: #hasInfoLabel
Claus Gittinger <cg@exept.de>
parents: 9143
diff changeset
   693
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   694
infoVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   695
    |holder|
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   696
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   697
    (holder := builder bindingAt:#infoVisibleHolder) isNil ifTrue:[
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   698
        holder := self class defaultInfoVisible asValue.
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   699
        builder aspectAt:#infoVisibleHolder put: holder.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   700
        holder addDependent:self.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   701
    ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   702
    ^ holder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   703
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   704
    "Created: / 18-02-2007 / 15:01:05 / cg"
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   705
    "Modified: / 14-07-2007 / 16:39:20 / cg"
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   706
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   707
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   708
selectedWorkspaceIndexHolder
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
    selectedWorkspaceIndexHolder isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
        selectedWorkspaceIndexHolder := 1 asValue.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
        selectedWorkspaceIndexHolder onChangeSend:#workspaceSelectionChanged to:self.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
    ^ selectedWorkspaceIndexHolder.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
tabList
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
    tabList isNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
        tabList := List new.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
    ^ tabList.
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   721
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   722
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   723
toolBarVisibleHolder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   724
    |holder|
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   725
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   726
    (holder := builder bindingAt:#toolBarVisibleHolder) isNil ifTrue:[
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   727
        holder := self class defaultToolbarVisible asValue.
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   728
        builder aspectAt:#toolBarVisibleHolder put: holder.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   729
        holder addDependent:self.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   730
    ].
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   731
    ^ holder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   732
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   733
    "Created: / 18-02-2007 / 14:43:39 / cg"
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   734
    "Modified: / 14-07-2007 / 16:39:55 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   735
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   736
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   737
!MultiViewToolApplication methodsFor:'aspects-queries'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   739
canRemoveAllWorkspacesExcept:idx
15408
ff62d43d5a1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 15407
diff changeset
   740
    ^ [ self tabList size > 1 ]
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   741
!
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
   742
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   743
canRemoveWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   744
    ^ self canRemoveWorkspace:(self selectedWorkspaceIndexHolder value)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   745
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   746
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
canRemoveWorkspace:idx
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
    ^ self tabList size > 1
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   749
"/       and:[ (self workspacesTextViewAt:(self selectedWorkspaceIndexHolder value))
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
hasMultipleBuffersHolder
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   753
    ^ [ workspaces size > 1 ]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
hasSelectionInActiveWorkspace
6424
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   757
    |v|
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   758
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   759
    v := self selectedWorkspacesTextView.
57dbbc6ff912 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6408
diff changeset
   760
    ^ v notNil and:[v selectionAsString size > 0]
8528
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   761
!
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   762
17198
551129abfddb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 15945
diff changeset
   763
hasSelectionInActiveWorkspaceAndEditorIsNotReadonly
551129abfddb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 15945
diff changeset
   764
    |v|
551129abfddb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 15945
diff changeset
   765
551129abfddb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 15945
diff changeset
   766
    v := self selectedWorkspacesTextView.
551129abfddb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 15945
diff changeset
   767
    ^ v notNil and:[v enabled and:[v selectionAsString size > 0]]
551129abfddb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 15945
diff changeset
   768
!
551129abfddb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 15945
diff changeset
   769
8528
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   770
hasTextInActiveWorkspace
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   771
    |v|
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   772
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   773
    v := self selectedWorkspacesTextView.
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   774
    ^ v notNil 
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   775
      and:[v list notEmptyOrNil 
cfb56a882e81 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8509
diff changeset
   776
      and:[v list contains:[:l | l notEmptyOrNil]]] 
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   777
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   778
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   779
!MultiViewToolApplication methodsFor:'change & update'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   780
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   781
infoVisibilityChanged
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   782
    |visible cFrame bottomOffset|
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   783
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   784
    visible := self infoVisibleHolder value.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   785
9380
346a2a59c410 added: #hasInfoLabel
Claus Gittinger <cg@exept.de>
parents: 9143
diff changeset
   786
    cFrame := builder findComponentAt:#NoteBook. "/ #CodeView.
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   787
    cFrame notNil ifTrue:[    
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   788
        visible ifFalse:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   789
            bottomOffset := 0.   
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   790
        ] ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   791
            bottomOffset := -25.   
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   792
        ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   793
        cFrame layout bottomOffset:bottomOffset.   
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   794
        cFrame container notNil ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   795
            cFrame containerChangedSize.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   796
        ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   797
    ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   798
    DefaultInfoVisible := visible
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   799
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   800
    "Created: / 18-02-2007 / 15:01:55 / cg"
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   801
!
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   802
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   803
toolBarVisibilityChanged
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   804
    |toolBarVisible editToolBarVisible toolBar editToolBar noteBook topOffset|
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   805
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   806
    topOffset := 0.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   807
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   808
    toolBar := self componentAt:#ToolBar.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   809
    toolBar notNil ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   810
        toolBarVisible := self toolBarVisibleHolder value.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   811
        DefaultToolBarVisible := toolBarVisible.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   812
        toolBarVisible ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   813
            topOffset := topOffset + toolBar height.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   814
        ]
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   815
    ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   816
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   817
    editToolBar := self componentAt:#EditToolBar.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   818
    editToolBar notNil ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   819
        editToolBar layout 
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   820
            topOffset:topOffset bottomOffset:(topOffset + editToolBar height).
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   821
        "/ force it to recompute its dimension
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   822
        editToolBar container notNil ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   823
            editToolBar containerChangedSize.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   824
        ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   825
        editToolBarVisible := self editToolBarVisibleHolder value.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   826
        DefaultEditToolBarVisible := editToolBarVisible.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   827
        editToolBarVisible ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   828
            topOffset := topOffset + editToolBar height.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   829
        ]
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   830
    ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   831
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   832
    noteBook := self componentAt:#NoteBook.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   833
    noteBook notNil ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   834
        noteBook layout topOffset:topOffset.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   835
        "/ force it to recompute its dimension
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   836
        noteBook container notNil ifTrue:[
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   837
            noteBook containerChangedSize.
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   838
        ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   839
    ].
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   840
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   841
    "Created: / 18-02-2007 / 14:46:22 / cg"
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   842
!
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   843
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   844
update:something with:aParameter from:changedObject
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   845
    ((changedObject == self toolBarVisibleHolder)
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   846
    or:[ changedObject == self editToolBarVisibleHolder ]) ifTrue:[
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   847
        self toolBarVisibilityChanged.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   848
        ^ self
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   849
    ].
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   850
    changedObject == self infoVisibleHolder ifTrue:[
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   851
        self infoVisibilityChanged.
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   852
        ^ self
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   853
    ].
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   854
    ^ super update:something with:aParameter from:changedObject
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   855
7824
09995d9a889d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7745
diff changeset
   856
    "Modified: / 14-07-2007 / 16:46:14 / cg"
14175
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   857
!
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   858
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   859
windowLabelPrefix
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   860
    |nm|
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   861
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   862
    nm := self class nameWithoutPrefix.
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   863
    (nm endsWith:'Application') ifTrue:[
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   864
        nm := nm copyButLast:'Application' size
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   865
    ].
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   866
    ^ nm
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   867
!
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   868
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   869
workspaceSelectionChanged
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   870
    |wsIndex windowLabel v prefix|
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   871
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   872
    "/ self selected
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   873
    self workspaceHolder value:(v := self selectedWorkspace).
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   874
    wsIndex := self selectedWorkspaceIndexHolder value.
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   875
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   876
    wsIndex ~~ 0 ifTrue:[
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   877
        prefix := self windowLabelPrefix.
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   878
        windowLabel := tabList at:wsIndex ifAbsent:nil.
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   879
        windowLabel notNil ifTrue:[self window label:prefix,': ',windowLabel].
61dceb4984c4 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 13858
diff changeset
   880
    ].
15408
ff62d43d5a1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 15407
diff changeset
   881
ff62d43d5a1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 15407
diff changeset
   882
    v notNil ifTrue:[ v takeFocusWhenMapped:true ]
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   883
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   884
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   885
!MultiViewToolApplication methodsFor:'defaults'!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   886
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   887
defaultFileNameForLoad
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   888
   ^ 'file.txt'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   889
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   890
    "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
   891
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   892
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   893
defaultFileNameForSave
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   894
    ^ 'file.txt'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   895
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   896
    "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
   897
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   898
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   899
defaultFileNameForSaveAll
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   900
   ^ 'file.txt'
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   901
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   902
    "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
   903
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   904
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   905
defaultPatternLoad
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   906
   ^ '*.txt'
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
    "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
   909
! !
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   910
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   911
!MultiViewToolApplication methodsFor:'initialization'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   912
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   913
hideToolBarButtonCreated:aButton
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   914
    aButton passiveLevel:(MenuPanel defaultLevel). 
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   915
"/    aButton passiveLevel:1.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   916
    aButton activeLevel:-1.
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   917
    aButton backgroundColor:(MenuPanel defaultBackgroundColor).
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   918
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   919
    "Created: / 18-02-2007 / 14:48:28 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   920
!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   921
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   922
postBuildWith:aBuilder
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   923
    super postBuildWith:aBuilder.
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   924
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   925
    self infoVisibleHolder value ifTrue:[ self infoVisibilityChanged ].
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   926
    (self toolBarVisibleHolder value 
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
   927
    or:[ self editToolBarVisibleHolder value ]) ifTrue:[ self toolBarVisibilityChanged ].
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   928
9694
eb3dff842677 changed:
Claus Gittinger <cg@exept.de>
parents: 9664
diff changeset
   929
    self workspaceSelectionChanged.
eb3dff842677 changed:
Claus Gittinger <cg@exept.de>
parents: 9664
diff changeset
   930
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   931
    "Created: / 18-02-2007 / 15:03:08 / cg"
9694
eb3dff842677 changed:
Claus Gittinger <cg@exept.de>
parents: 9664
diff changeset
   932
    "Modified: / 22-01-2011 / 11:46:35 / cg"
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   933
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
   934
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   935
!MultiViewToolApplication methodsFor:'menu-actions'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   936
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   937
addWindow:aWindow named:name
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   938
    ^ self addWindow:aWindow named:name asFirst:false
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   939
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   940
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   941
addWindow:aWindow named:name asFirst:asFirst
14805
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   942
    ^ self addWindow:aWindow named:name tabIcon:nil asFirst:asFirst
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   943
!
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   944
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   945
addWindow:aWindow named:name tabIcon:iconOrNil
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   946
    ^ self addWindow:aWindow named:name tabIcon:iconOrNil asFirst:false
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   947
!
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   948
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   949
addWindow:aWindow named:name tabIcon:iconOrNil asFirst:asFirst
15407
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   950
    |tabList tabItem wsIndex newSelectedIndex initialFocusView|
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   951
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   952
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   953
    wsIndex := tabList size + 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   954
    wsIndex == 1 ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   955
        "/ first - add a name for the first tab
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   956
        tabList add:(self window label). "/ 'Workspace'.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   957
        wsIndex := wsIndex + 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   958
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   959
14805
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   960
    tabItem := name bindWith:wsIndex.
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   961
    iconOrNil notNil ifTrue:[
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   962
        tabItem := LabelAndIcon icon:iconOrNil string:tabItem.
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   963
    ].
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   964
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   965
    workspaces grow:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   966
    asFirst ifTrue:[
14805
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   967
        tabList addFirst:tabItem.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   968
        workspaces replaceFrom:2 to:wsIndex with:workspaces startingAt:1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   969
        newSelectedIndex := 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   970
    ] ifFalse:[
14805
3e0fc4db20cf class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14557
diff changeset
   971
        tabList addLast:tabItem.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   972
        newSelectedIndex := wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   973
    ].
9664
a4a6072afcf8 changed:
Claus Gittinger <cg@exept.de>
parents: 9636
diff changeset
   974
15407
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   975
    (aWindow isKeyboardConsumer) ifTrue:[
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   976
        initialFocusView := aWindow.
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   977
    ] ifFalse:[
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   978
        (aWindow scrolledView isKeyboardConsumer) ifTrue:[
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   979
            initialFocusView := aWindow scrolledView
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   980
        ] ifFalse:[
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   981
            initialFocusView := aWindow scrolledView allSubViewsDetect:[:v | v isKeyboardConsumer] ifNone:nil.
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   982
        ]
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   983
    ].
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   984
    (initialFocusView notNil "and:[w isKeyboardConsumer]") ifTrue:[
7c5e7b454c1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14805
diff changeset
   985
        initialFocusView takeFocusWhenMapped:true.
9664
a4a6072afcf8 changed:
Claus Gittinger <cg@exept.de>
parents: 9636
diff changeset
   986
    ].
a4a6072afcf8 changed:
Claus Gittinger <cg@exept.de>
parents: 9636
diff changeset
   987
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   988
    workspaces at:newSelectedIndex put:aWindow.
9694
eb3dff842677 changed:
Claus Gittinger <cg@exept.de>
parents: 9664
diff changeset
   989
    self selectedWorkspaceIndexHolder value:newSelectedIndex.
eb3dff842677 changed:
Claus Gittinger <cg@exept.de>
parents: 9664
diff changeset
   990
    self workspaceSelectionChanged.
eb3dff842677 changed:
Claus Gittinger <cg@exept.de>
parents: 9664
diff changeset
   991
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   992
"/    workspaceHolder value:aWindow.
9664
a4a6072afcf8 changed:
Claus Gittinger <cg@exept.de>
parents: 9636
diff changeset
   993
9694
eb3dff842677 changed:
Claus Gittinger <cg@exept.de>
parents: 9664
diff changeset
   994
    "Modified: / 22-01-2011 / 12:02:59 / cg"
10252
6bc6fc141f49 Merged with JV's branch
vrany
parents: 10221
diff changeset
   995
    "Modified: / 11-06-2011 / 00:05:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   996
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   997
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   998
addWorkspace
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
   999
    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
  1000
!
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1001
6458
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
  1002
destroyTab:tabIndex
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
  1003
    self removeWorkspace:tabIndex
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
  1004
!
abf7db73fa79 destroy tabs
Claus Gittinger <cg@exept.de>
parents: 6424
diff changeset
  1005
8576
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1006
doIt
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1007
    |v|
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1008
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1009
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1010
        v doIt.
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1011
    ]
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1012
!
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1013
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1014
loadFile:aFileName 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1015
    self loadFile:aFileName encoding:nil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1016
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1017
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1018
loadFile:aFileName encoding:encodingSymbolOrNil
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1019
    |lbl|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1020
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1021
    lbl := aFileName asFilename withoutSuffix baseName.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1022
    self loadFile:aFileName encoding:encodingSymbolOrNil label:lbl.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1023
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1024
18832
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1025
loadFile:file encoding: encodingSymbolOrNil into:textView
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1026
    "Load contents of `file` into `textView`"
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1027
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1028
    | contents |
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1029
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1030
    contents := file contents.
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1031
    encodingSymbolOrNil notNil ifTrue:[
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1032
        contents := contents encodeFrom:encodingSymbolOrNil into:#unicode.
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1033
        textView externalEncoding:encodingSymbolOrNil.
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1034
    ].
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1035
    textView contents:contents.
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1036
    textView defaultFileNameForFileDialog:file pathName.
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1037
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1038
    "Modified (comment): / 21-06-2019 / 10:42:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1039
!
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1040
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1041
loadFile:aFileName encoding:encodingSymbolOrNil label:label 
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1042
    | file  ws |
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1043
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1044
    file := aFileName asFilename.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1045
    ws := self selectedWorkspacesTextView.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1046
    [
18832
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1047
        self 
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1048
            loadFile:file
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1049
            encoding:encodingSymbolOrNil
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1050
            into:ws
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1051
    ] on:StreamError do:[:ex | 
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1052
        Dialog warn:(resources stringWithCRs:'Cannot open "%1":\\%2'
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1053
                                        with:file asString
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1054
                                        with:ex description).
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1055
        ^ self
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1056
    ].
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1057
    ws modified:false.
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1058
    self setLabel:label.
18832
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1059
74115b507c3d Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 18273
diff changeset
  1060
    "Modified: / 21-06-2019 / 10:40:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1061
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1062
7745
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1063
loadFile:aFileName label:lbl
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1064
    |encoding|
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1065
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1066
    encoding := CharacterEncoder guessEncodingOfFile:aFileName.
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1067
    (encoding == #'iso8859-1' or:[encoding == #'ascii']) ifTrue:[
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1068
        encoding := nil
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1069
    ].
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1070
    self loadFile:aFileName encoding:encoding label:lbl.
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1071
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1072
    "Created: / 15-03-2007 / 11:52:21 / cg"
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1073
!
de4f256227cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7663
diff changeset
  1074
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1075
menuLoad
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1076
    |file|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1077
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1078
    (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
  1079
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1080
    file := Dialog 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1081
                requestFileName:(resources string:'Load file') 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1082
                default:(self defaultFileNameForLoad) 
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1083
                pattern:(self defaultPatternLoad).
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1084
    file size ~~ 0 ifTrue:[
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1085
        self loadFile:file
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1086
    ]
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1087
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1088
    "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
  1089
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1090
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1091
menuPrint
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1092
    |ws|
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1093
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1094
    ws := self selectedWorkspacesTextView.
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1095
    ws doPrint
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1096
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1097
    "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
  1098
!
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1099
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1100
menuSaveAllAs
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1101
    self 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1102
        askForFile:'Save all Buffers into:' 
8196
29ed5a2bf16d fixed saveAll
Claus Gittinger <cg@exept.de>
parents: 8033
diff changeset
  1103
        default:(self defaultFileNameForSaveAll)
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1104
        thenDo:[:file :doAppend |
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1105
            |ws append|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1106
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1107
            append := doAppend.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1108
            workspaces do:[:subView |
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1109
                |ws|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1110
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1111
                ws := self workspaceViewOfView:subView.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1112
                ws notNil ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1113
                    ws saveAs:file doAppend:append.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1114
                    ws modified:false.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1115
                ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1116
                append := 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
        ]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1119
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1120
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1121
menuSaveAs
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1122
    self 
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1123
        askForFile:'Save Buffer into:'
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1124
        default:(self defaultFileNameForSave)
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1125
        thenDo:[:file :doAppend |
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1126
            |ws lbl|
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1127
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1128
            ws := self selectedWorkspacesTextView.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1129
            ws saveAs:file doAppend:doAppend.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1130
            ws modified:false.
8395
3596ebae2d90 changed #defaultFileNameForSave
Claus Gittinger <cg@exept.de>
parents: 8368
diff changeset
  1131
            "/ ws defaultFileNameForFileDialog:file asFilename baseName.
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1132
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1133
            lbl := file asFilename withoutSuffix baseName.
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1134
            self setLabel:lbl.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1135
        ]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1136
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1137
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1138
newWorkspace
6863
4e2e267622eb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6634
diff changeset
  1139
    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
  1140
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1141
    "Modified: / 25-10-2006 / 14:39:15 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1142
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1143
14279
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
  1144
openFontDialog
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
  1145
    self selectedWorkspace changeFont
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
  1146
!
9214ed746ffd class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14175
diff changeset
  1147
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1148
openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1149
    "opens the top documentation file"
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1150
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1151
    self openHTMLDocument: 'TOP.html'
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1152
!
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1153
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1154
openSettingsDialog
14557
f2fbe336969a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14279
diff changeset
  1155
    |settingsList|
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1156
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1157
    settingsList := 
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1158
        #(
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1159
           #('Keyboard Mappings'    #'AbstractSettingsApplication::KbdMappingSettingsAppl'          )
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1160
"/           #('Debugger'             #'AbstractSettingsApplication::DebuggerSettingsAppl'            )
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1161
           #('Editor'               #'AbstractSettingsApplication::EditSettingsAppl'                )
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1162
"/           #('Syntax Color'         #'AbstractSettingsApplication::SyntaxColorSettingsAppl'         )
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1163
"/           #('Code Format'          #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl'    )
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1164
        ).
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1165
14557
f2fbe336969a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14279
diff changeset
  1166
    SettingsDialog 
f2fbe336969a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14279
diff changeset
  1167
        openWithList:settingsList 
f2fbe336969a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 14279
diff changeset
  1168
        label:(resources string:'Settings').
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1169
!
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1170
8576
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1171
printIt
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1172
!
d8906424444d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8528
diff changeset
  1173
8772
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1174
removeAllWorkspacesExcept:wsIndex
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1175
    tabList size downTo:wsIndex+1 do:[:idx |
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1176
        self removeWorkspace:idx.
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1177
    ].
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1178
    1 to:wsIndex-1 do:[:idx |
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1179
        self removeWorkspace:1.
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1180
    ].
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1181
!
Claus Gittinger <cg@exept.de>
parents: 8615
diff changeset
  1182
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1183
removeWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1184
    self removeWorkspace:(self selectedWorkspaceIndexHolder value)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1185
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1186
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1187
removeWorkspace:wsIndex
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1188
    |tabList newWsIndex|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1189
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1190
    wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[
6509
bcaae26df254 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6458
diff changeset
  1191
        (self askIfModified:'Text was modified. Remove buffer anyway ?' yesButton:'Remove Buffer') ifFalse:[
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1192
            ^ self
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1193
        ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1194
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1195
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1196
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1197
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1198
    wsIndex == tabList size ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1199
        newWsIndex := wsIndex - 1.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1200
    ] ifFalse:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1201
        newWsIndex := wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1202
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1203
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1204
    tabList removeIndex:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1205
    (workspaces at:wsIndex) destroy.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1206
    workspaces removeIndex:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1207
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1208
    tabList size == 1 ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1209
        self window label:(tabList at:1).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1210
        tabList removeIndex:1
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1211
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1212
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1213
    workspaceHolder value:(workspaces at:newWsIndex).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1214
    self selectedWorkspaceIndexHolder value:newWsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1215
    "/ to force change (update workspaceHolder - even if same index)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1216
    self selectedWorkspaceIndexHolder changed:#value.   
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1217
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1218
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1219
renameWorkspace
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1220
    self renameWorkspace:(self selectedWorkspaceIndexHolder value)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1221
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1222
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1223
renameWorkspace:wsIndex
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1224
    |tabList oldName newName|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1225
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1226
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1227
    tabList isEmpty ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1228
        oldName := self window label
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1229
    ] ifFalse:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1230
        oldName := tabList at:wsIndex.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1231
    ].
11626
fb8ca9aad4a3 changed: #renameWorkspace:
Claus Gittinger <cg@exept.de>
parents: 11482
diff changeset
  1232
    newName := Dialog request:(resources string:'New Name for "%1":' with:oldName) initialAnswer:oldName.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1233
    newName size == 0 ifTrue:[ ^ self].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1234
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1235
    self renameWorkspace:wsIndex to:newName.
11626
fb8ca9aad4a3 changed: #renameWorkspace:
Claus Gittinger <cg@exept.de>
parents: 11482
diff changeset
  1236
fb8ca9aad4a3 changed: #renameWorkspace:
Claus Gittinger <cg@exept.de>
parents: 11482
diff changeset
  1237
    "Modified: / 20-07-2012 / 10:21:29 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1238
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1239
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1240
renameWorkspace:wsIndex to:newName
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1241
    |tabList|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1242
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1243
    tabList := self tabList.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1244
    tabList notEmpty ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1245
        tabList at:wsIndex put:newName.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1246
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1247
    wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1248
        self window label:newName.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1249
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1250
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1251
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1252
!MultiViewToolApplication methodsFor:'menu-actions-editing'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1253
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1254
copySelection
8498
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1255
    |v|
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1256
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1257
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1258
        v copySelection
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1259
    ]
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1260
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1261
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1262
cutSelection
8498
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1263
    |v|
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1264
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1265
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1266
        v cutSelection
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1267
    ].
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1268
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1269
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1270
paste
8498
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1271
    |v|
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1272
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1273
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
18273
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1274
        v pasteOrReplace
8498
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1275
    ]
18273
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1276
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1277
    "Modified: / 18-07-2018 / 14:35:49 / jv"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1278
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1279
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1280
paste:aString
9634
c09155118873 changed: #paste:
Claus Gittinger <cg@exept.de>
parents: 9633
diff changeset
  1281
    |v|
9633
cbd9b7c06f28 changed: #paste:
Claus Gittinger <cg@exept.de>
parents: 9380
diff changeset
  1282
9634
c09155118873 changed: #paste:
Claus Gittinger <cg@exept.de>
parents: 9633
diff changeset
  1283
    v := (workspaceHolder value) ? (self selectedWorkspacesTextView).
11482
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1284
    [
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1285
        v perform:#paste: with:aString.
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1286
    ] on:MessageNotUnderstood do:[:ex|
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1287
        "special code, to catch exeception sent from a scrolled view,
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1288
         which has a different receiver tha v"
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1289
        (ex selector ~~ #paste:) ifTrue:[
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1290
            ex reject.
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1291
        ].
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1292
        "else ignore it"
e945c7253f9b changed: #paste:
Stefan Vogel <sv@exept.de>
parents: 10252
diff changeset
  1293
    ].
9634
c09155118873 changed: #paste:
Claus Gittinger <cg@exept.de>
parents: 9633
diff changeset
  1294
9636
8593b50b09dc changed: #paste:
Claus Gittinger <cg@exept.de>
parents: 9634
diff changeset
  1295
    "Modified: / 16-11-2010 / 15:27:39 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1296
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1297
8509
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1298
redo
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1299
    |v|
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1300
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1301
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1302
        v redo.
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1303
    ]
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1304
!
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1305
8498
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1306
search
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1307
    |v|
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1308
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1309
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1310
        v search.
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1311
    ]
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1312
!
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1313
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1314
selectAll
8498
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1315
    |v|
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1316
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1317
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1318
        v selectAll.
3f0be0fbfbec support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8497
diff changeset
  1319
    ]
8509
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1320
!
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1321
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1322
undo
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1323
    |v|
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1324
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1325
    (v := self selectedWorkspacesTextView) notNil ifTrue:[
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1326
        v undo.
2b395fdbab78 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8507
diff changeset
  1327
    ]
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1328
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1329
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1330
!MultiViewToolApplication methodsFor:'private'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1331
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1332
askForFile:question default:defaultFilename thenDo:aBlock
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1333
    Dialog
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1334
        requestSaveFileName:(resources string:question) 
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1335
        default:defaultFilename 
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1336
        fromDirectory:nil 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1337
        action:[:fileName | aBlock value:fileName value:false] 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1338
        appendAction:[:fileName | aBlock value:fileName value:true]
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1339
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1340
"/    |file doAppend|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1341
"/
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1342
"/    doAppend := false.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1343
"/    Dialog aboutToOpenBoxNotificationSignal handle:[:n |
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1344
"/        |box|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1345
"/
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1346
"/        box := n parameter.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1347
"/        box addButton:(Button label:'Append' action:[doAppend := true. box okPressed]).
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1348
"/        n proceed.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1349
"/    ] do:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1350
"/        file := Dialog requestFileName:question default:'file.wsp'. 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1351
"/    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1352
"/    file isEmptyOrNil ifFalse:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1353
"/        aBlock value:file value:doAppend
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1354
"/    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1355
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1356
6408
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1357
askForFile:question thenDo:aBlock
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1358
    ^ self
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1359
        askForFile:question default:'file.wsp' thenDo:aBlock
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1360
!
e0f701a20cae remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents: 6354
diff changeset
  1361
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1362
askIfAnyModified:arg1 yesButton:arg2 
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1363
    "raise an error: must be redefined in concrete subclass(es)"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1364
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1365
    ^ self subclassResponsibility
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1366
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1367
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1368
askIfModified:question yesButton:yesButtonText
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1369
    "tell user, that code has been modified - let her confirm"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1370
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1371
    |textView|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1372
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1373
    textView := self selectedWorkspace.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1374
    (self isModifiedWorkspace:textView) ifFalse:[^ true].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1375
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1376
    (Dialog 
6354
08a483e3beda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6244
diff changeset
  1377
        confirm:(resources stringWithCRs:question)
6634
a94d8a07247d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6509
diff changeset
  1378
        yesLabel:(resources string:yesButtonText)
a94d8a07247d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6509
diff changeset
  1379
        noLabel:(resources string:'Cancel'))
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1380
    ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1381
        "/ reset modified flag so question is asked only once
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1382
        textView modified:false.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1383
        ^ true
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1384
    ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1385
    ^ false
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1386
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1387
    "Modified: 2.10.1997 / 14:23:47 / stefan"
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1388
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1389
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1390
createWorkspace
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1391
    |ws|
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1392
7475
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1393
    ws := (HVScrollableView for:EditTextView).
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1394
    ^ ws
54b889153fc7 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 6863
diff changeset
  1395
9664
a4a6072afcf8 changed:
Claus Gittinger <cg@exept.de>
parents: 9636
diff changeset
  1396
    "Modified: / 09-12-2010 / 10:55:25 / cg"
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1397
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1398
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1399
isModifiedWorkspace:aView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1400
    self subclassResponsibility
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1401
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1402
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1403
selectedWorkspacesTextView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1404
    ^ self workspaceViewOfView:(self selectedWorkspace)
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1405
!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1406
8033
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1407
setLabel:label
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1408
    tabList size > 1 ifTrue:[
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1409
        tabList at:self selectedWorkspaceIndexHolder value put:label
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1410
    ].
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1411
    self window label:label.
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1412
!
233d210c526a label handling after load
Claus Gittinger <cg@exept.de>
parents: 7852
diff changeset
  1413
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1414
workspaceViewOfView:aView
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1415
    |view|
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1416
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1417
    view := aView.
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1418
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1419
    (view isScrollWrapper) ifTrue:[
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1420
        view := view scrolledView.
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1421
        view isNil ifTrue:[^ nil].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1422
    ].
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1423
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1424
    (view isTextView) ifFalse:[
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1425
        (view isKindOf:InspectorView) ifTrue:[
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1426
            view := view workspace.
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1427
            (view isScrollWrapper) ifTrue:[
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1428
                view := view scrolledView
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1429
            ].
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1430
        ].
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1431
    ].
7663
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1432
    (view isTextView) ifTrue:[^ view].
c11efe4cbcf3 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7653
diff changeset
  1433
    ^ view allSubViewsDetect:[:v| v name = #Workspace] ifNone:nil.
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1434
! !
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1435
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1436
!MultiViewToolApplication methodsFor:'user actions'!
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1437
8497
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
  1438
hideEditToolbar
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
  1439
    self editToolBarVisibleHolder value:false
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
  1440
!
08a96ef8a3c4 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8395
diff changeset
  1441
7650
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1442
hideToolbar
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1443
    self toolBarVisibleHolder value:false
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1444
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1445
    "Created: / 18-02-2007 / 14:55:54 / cg"
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1446
! !
12fcca896ba0 workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7475
diff changeset
  1447
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1448
!MultiViewToolApplication class methodsFor:'documentation'!
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1449
15408
ff62d43d5a1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 15407
diff changeset
  1450
version
15945
06616f490bf6 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15408
diff changeset
  1451
    ^ '$Header$'
15408
ff62d43d5a1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 15407
diff changeset
  1452
!
ff62d43d5a1a class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 15407
diff changeset
  1453
9058
Claus Gittinger <cg@exept.de>
parents: 8772
diff changeset
  1454
version_CVS
15945
06616f490bf6 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15408
diff changeset
  1455
    ^ '$Header$'
18273
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1456
!
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1457
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1458
version_HG
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1459
c46e9ab3000c Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  1460
    ^ '$Changeset: <not expanded> $'
5302
615a0020e15c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1461
! !
12482
e801a369d243 class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents: 11727
diff changeset
  1462