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