StandardSystemView.st
author Claus Gittinger <cg@exept.de>
Tue, 23 Apr 2019 16:30:55 +0200
changeset 8674 e29a561c0fbe
parent 8486 387d14379058
child 8712 c776d7612ed1
permissions -rw-r--r--
#FEATURE by cg class: SimpleView added: #isDialogBox
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8486
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
     1
"{ Encoding: utf8 }"
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
     2
0
48194c26a46c Initial revision
claus
parents:
diff changeset
     3
"
6
7ee0cfde237d *** empty log message ***
claus
parents: 5
diff changeset
     4
 COPYRIGHT (c) 1989 by Claus Gittinger
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
     5
	      All Rights Reserved
0
48194c26a46c Initial revision
claus
parents:
diff changeset
     6
48194c26a46c Initial revision
claus
parents:
diff changeset
     7
 This software is furnished under a license and may be used
48194c26a46c Initial revision
claus
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
48194c26a46c Initial revision
claus
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
48194c26a46c Initial revision
claus
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
48194c26a46c Initial revision
claus
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
48194c26a46c Initial revision
claus
parents:
diff changeset
    12
 hereby transferred.
48194c26a46c Initial revision
claus
parents:
diff changeset
    13
"
3210
250f55f80683 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3152
diff changeset
    14
"{ Package: 'stx:libview' }"
250f55f80683 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3152
diff changeset
    15
6721
63e784a23e49 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6646
diff changeset
    16
"{ NameSpace: Smalltalk }"
63e784a23e49 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6646
diff changeset
    17
135
claus
parents: 132
diff changeset
    18
TopView subclass:#StandardSystemView
1539
fcd8fc807c0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1538
diff changeset
    19
	instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
    20
		application windowEventsForApplication deviceIcon labelChannel'
7398
6d085e759693 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 7263
diff changeset
    21
	classVariableNames:'DefaultExtent DefaultIcon DefaultMinExtent IncludeHostNameInLabel
6d085e759693 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 7263
diff changeset
    22
		TimedRaiseAction WindowLabelFormat'
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
    23
	poolDictionaries:''
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
    24
	category:'Views-Basic'
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    25
!
48194c26a46c Initial revision
claus
parents:
diff changeset
    26
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    27
!StandardSystemView class methodsFor:'documentation'!
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    28
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    29
copyright
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    30
"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    31
 COPYRIGHT (c) 1989 by Claus Gittinger
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    32
	      All Rights Reserved
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    33
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    34
 This software is furnished under a license and may be used
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    35
 only in accordance with the terms of that license and with the
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    36
 inclusion of the above copyright notice.   This software may not
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    37
 be provided or otherwise made available to, or used by, any
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    38
 other person.  No title to or ownership of the software is
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    39
 hereby transferred.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    40
"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    41
!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    42
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    43
documentation
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    44
"
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
    45
    I represent standard application topViews
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
    46
    i.e. those views which have a title-label, an icon etc.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    47
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    48
    The name `StandardSystemView' is probably misleading and
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    49
    results from ST-80 (rel2.x) compatibility reasons.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    50
    Think of it as an ApplicationWindow.
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    51
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    52
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    53
    In ST/X, StandardSystemViews were subclassed for special views
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    54
    in the past (for example: FileBrowser, ChangesBrowser etc.).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    55
    Although this worked, it may lead to the following
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    56
    problems and inconveniences:
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    57
        - applications inherit a big number of methods through the
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    58
          SimpleView->View->TopView->StandardSystemView hierarchy.
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    59
          There is quite a danger that by accident, some method gets
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    60
          redefined which is required by one of those classes.
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    61
          (typical candidates are: terminate, destroy, open ...)
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    62
          This may lead to strange effects, which may not be obvious to
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    63
          non experts ...
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    64
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    65
        - applications with multiple topViews are difficult to implement
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    66
          and manage.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    67
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    68
        - use of a windowBuilder is difficult.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    69
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    70
    For all those reasons, we HIGHLY recommend to NOT define applications
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    71
    as subclasses of StandardSystemView, but instead base them on
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    72
    ApplicationModel, and reference the topView(s) as instance variables of
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    73
    if (if at all).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    74
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    75
    [instance variables:]
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    76
        label                   <String>    the label in the windows title
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    77
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    78
        icon                    <Form>      the icon
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    79
                                            [ignored if the display does not
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    80
                                             support icons]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    81
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    82
        iconView                <View>      an optional icon-view (for animated icons)
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    83
                                            [ignored if the display does not
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    84
                                             supports this]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    85
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    86
        iconLabel               <String>    the label in the icon
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    87
                                            [ignored if the display does not
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    88
                                             support label-tabs with icons]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    89
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    90
        minExtent               <Point>     the minimum size
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    91
                                            No limit, if nil
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    92
                                            [the window manager may have its own
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    93
                                             limit; typically some small area]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    94
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    95
        maxExtent               <Point>     the maximum size
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    96
                                            No limit, if nil.
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    97
                                            [the window manager may have its own
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
    98
                                             limit; typically the screen size]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
    99
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   100
        sizeFixed               <Boolean>   prevents the view from resizing itself
8058
e65234fc45e0 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7985
diff changeset
   101
                                            (especially to freeze a dialog's size)
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   102
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   103
        application             <AppModel>  if nonNil, that's the application
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   104
                                            Many requests (such as open/close etc.
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   105
                                            are forwarded to it, if present.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   106
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   107
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   108
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   109
     [class variables:]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   110
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   111
        DefaultIcon             <Form>      cached default icon
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   112
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   113
        TakeFocusWhenMapped     <Boolean>   if true, views grab the keyboard
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   114
                                            focus (convenient with some stupid
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   115
                                            windowManagers)
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   116
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   117
        IncludeHostNameInLabel  <Boolean>   if true, the windows title shall
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   118
                                            include the hostname.
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   119
                                            (convenient if you have many remote
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   120
                                            views open simultaneously)
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   121
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   122
        WindowLabelFormat       <Boolean>   specifies the format for windowLabels
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   123
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   124
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   125
    [author:]
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   126
        Claus Gittinger
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   127
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   128
    [see also:]
7587
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   129
        WindowGroup
f112f13cdaf6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7562
diff changeset
   130
        ApplicationModel
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   131
"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   132
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   133
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   134
examples
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   135
"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   136
    simple, empty topView:
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   137
									[exBegin]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   138
	|topView|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   139
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   140
	topView := StandardSystemView new.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   141
	topView label:'my first view'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   142
	topView extent:200 @ 200.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   143
	topView open.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   144
									[exEnd]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   145
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   146
    with an icon & iconLabel:
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   147
									[exBegin]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   148
	|topView|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   149
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   150
	topView := StandardSystemView extent:200 @ 200.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   151
	topView label:'Hello world'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   152
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   153
	topView icon:(Image fromFile:'hello_world.icon').
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   154
	topView open.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   155
									[exEnd]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   156
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   157
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   158
    with an animated iconView [not supported on all display devices]:
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   159
									[exBegin]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   160
	|iconView topView|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   161
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   162
	iconView := ClockView new.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   163
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   164
	topView := StandardSystemView extent:200 @ 200.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   165
	topView label:'Hello world'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   166
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   167
	topView iconView:iconView.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   168
	topView open.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   169
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   170
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   171
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   172
    placing a subView into it:
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   173
									[exBegin]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   174
	|topView button|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   175
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   176
	topView := StandardSystemView new.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   177
	topView label:'my second view'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   178
	topView extent:200 @ 200.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   179
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   180
	button := Button label:'close' in:topView.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   181
	button action:[topView destroy].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   182
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   183
	topView open.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   184
									[exEnd]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   185
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   186
    same, relative sized subview:
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   187
									[exBegin]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   188
	|topView button|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   189
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   190
	topView := StandardSystemView new.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   191
	topView label:'my second view'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   192
	topView extent:200 @ 200.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   193
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   194
	button := Button label:'close' in:topView.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   195
	button action:[topView destroy].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   196
	button origin:0.25 @ 0.25 corner:0.75 @ 0.75.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   197
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   198
	topView open.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   199
									[exEnd]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   200
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   201
    multiple buttons in a panel in a topView:
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   202
									[exBegin]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   203
	|topView panel button1 button2 button3|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   204
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   205
	topView := StandardSystemView new.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   206
	topView label:'my second view'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   207
	topView extent:200 @ 200.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   208
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   209
	panel := HorizontalPanelView origin:0.0@0.0 corner:1.0@1.0 in:topView.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   210
	panel inset:10.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   211
	panel level:-1.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   212
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   213
	button1 := Button label:'one' in:panel.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   214
	button1 action:[Transcript showCR:'one pressed'].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   215
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   216
	button2 := Button label:'two' in:panel.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   217
	button2 action:[Transcript showCR:'two pressed'].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   218
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   219
	button3 := Button label:'three' in:panel.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   220
	button3 action:[Transcript showCR:'three pressed'].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   221
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   222
	topView open.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   223
									[exEnd]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   224
"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   225
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   226
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   227
!StandardSystemView class methodsFor:'instance creation'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   228
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   229
extent:anExtent label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   230
    "create a new topView and define its extent, label and icon"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   231
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   232
    ^ self origin:nil extent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   233
	   label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   234
	   minExtent:nil maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   235
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   236
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   237
extent:anExtent label:aLabel icon:aForm minExtent:minExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   238
    ^ self origin:nil extent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   239
	   label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   240
	   minExtent:minExtent maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   241
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   242
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   243
extent:anExtent label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   244
    ^ self origin:nil extent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   245
	   label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   246
	   minExtent:minExtent maxExtent:maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   247
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   248
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   249
extent:anExtent label:aLabel minExtent:minExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   250
    "create a new topView and define its extent, label and minumum extent"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   251
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   252
    ^ self origin:nil extent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   253
	   label:aLabel icon:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   254
	   minExtent:minExtent maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   255
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   256
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   257
label:aLabel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   258
    "create a new topView and define its label"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   259
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   260
    ^ self origin:nil extent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   261
	   label:aLabel icon:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   262
	   minExtent:nil maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   263
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   264
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   265
label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   266
    "create a new topView and define its label and icon"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   267
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   268
    ^ self origin:nil extent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   269
	   label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   270
	   minExtent:nil maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   271
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   272
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   273
label:aLabel icon:aForm minExtent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   274
    "create a new topView and define its label, icon and minumum extent"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   275
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   276
    ^ self origin:nil extent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   277
	   label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   278
	   minExtent:anExtent maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   279
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   280
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   281
label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   282
    "create a new topView and define its label, icon, min and max extents"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   283
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   284
    ^ self origin:nil extent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   285
	   label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   286
	   minExtent:minExtent maxExtent:maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   287
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   288
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   289
label:aLabel minExtent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   290
    "create a new topView and define its label and minimum extent"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   291
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   292
    ^ self origin:nil extent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   293
	   label:aLabel icon:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   294
	   minExtent:anExtent maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   295
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   296
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   297
model:aModel label:aLabel minimumSize:minExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   298
    "ST80-style instance creation"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   299
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   300
    |newView|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   301
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   302
    newView := self origin:nil
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   303
		    extent:minExtent
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   304
		     label:aLabel
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   305
		      icon:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   306
		 minExtent:minExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   307
		 maxExtent:nil.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   308
    newView model:aModel.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   309
"/    newView controller:(self defaultControllerClass new view:newView).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   310
    ^ newView
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   311
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   312
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   313
origin:anOrigin extent:anExtent label:aLabel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   314
    "create a new topView and define its origin, extent and label"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   315
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   316
    ^ self origin:anOrigin extent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   317
	   label:aLabel icon:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   318
	   minExtent:nil maxExtent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   319
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   320
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   321
origin:anOrigin label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   322
		minExtent:minExtent maxExtent:maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   323
    "create a new topView and define its origin, extent, label, icon
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   324
     and extent-boundaries."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   325
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   326
    ^ self origin:anOrigin extent:nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   327
	   label:aLabel icon:aForm
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   328
	   minExtent:minExtent maxExtent:maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   329
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   330
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   331
!StandardSystemView class methodsFor:'Compatibility-VW'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   332
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   333
promptForOpen:aBoolean
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   334
    "not implemented here"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   335
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   336
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   337
!StandardSystemView class methodsFor:'class initialization'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   338
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   339
initialize
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   340
    IncludeHostNameInLabel := false.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   341
    WindowLabelFormat := self defaultWindowLabelFormat.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   342
6369
b799ac38af53 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6283
diff changeset
   343
    TakeFocusWhenMapped := (Screen notNil and:[Screen isWindowsPlatform]).
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   344
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   345
    "Created: / 20.8.1997 / 14:16:32 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   346
    "Modified: / 24.8.1998 / 17:16:33 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   347
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   348
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   349
!StandardSystemView class methodsFor:'defaults'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   350
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   351
defaultExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   352
    "return a standardSystemViews default window extent"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   353
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   354
    DefaultExtent notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   355
	^ DefaultExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   356
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   357
    ^ super defaultExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   358
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   359
    "Created: 15.8.1997 / 01:36:21 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   360
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   361
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   362
defaultIcon
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   363
    "return a topViews default window icon"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   364
4800
bab1343e2fa3 icon resource
Claus Gittinger <cg@exept.de>
parents: 4735
diff changeset
   365
    <resource: #programImage>
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   366
    <resource: #style (#ICON #ICON_FILE)>
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   367
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   368
    |n nm i|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   369
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   370
    (i := DefaultIcon) isNil ifTrue:[
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   371
	i := self classResources at:'ICON' default:nil.
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   372
	i isNil ifTrue:[
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   373
"/            OperatingSystem platformName == #win32 ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   374
"/                n := 'stx_16x16.xpm'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   375
"/            ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   376
"/                n := 'SmalltalkX.xbm'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   377
"/            ].
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   378
	    nm := ClassResources at:'ICON_FILE' default:n.
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   379
	    nm notNil ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   380
		i := Smalltalk imageFromFileNamed:nm inPackage:'stx:libtool'.
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   381
	    ].
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   382
	    i isNil ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   383
		i := self defaultSTXIcon
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   384
	    ].
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   385
	].
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   386
	i notNil ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   387
	    DefaultIcon := i := i onDevice:Display
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   388
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   389
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   390
    ^ i
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   391
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   392
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   393
     DefaultIcon := nil.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   394
     self defaultIcon inspect
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   395
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   396
4800
bab1343e2fa3 icon resource
Claus Gittinger <cg@exept.de>
parents: 4735
diff changeset
   397
    "Modified: / 17-09-2007 / 11:36:25 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   398
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   399
4975
9e899aca8597 allow for different icon to be used for about boxes
Claus Gittinger <cg@exept.de>
parents: 4837
diff changeset
   400
defaultIconForAboutBox
9e899aca8597 allow for different icon to be used for about boxes
Claus Gittinger <cg@exept.de>
parents: 4837
diff changeset
   401
    ^ self defaultIcon
9e899aca8597 allow for different icon to be used for about boxes
Claus Gittinger <cg@exept.de>
parents: 4837
diff changeset
   402
!
9e899aca8597 allow for different icon to be used for about boxes
Claus Gittinger <cg@exept.de>
parents: 4837
diff changeset
   403
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   404
defaultLabel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   405
    "return the default label for views of my kind.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   406
     This can be redefined in subclasses or overwritten in
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   407
     initialize methods."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   408
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   409
    ^ self nameWithoutPrefix. "/ 'aView'
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   410
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   411
    "Modified: / 27.9.1999 / 11:38:57 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   412
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   413
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   414
defaultWindowLabelFormat
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   415
    "%2 is the hostName;
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   416
     %1 is the actual window label."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   417
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   418
    "/ ^ '%2:%1'.    "/ the old format
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   419
    "/ ^ '%1 @ %2'.
5771
a4b190ff55e7 changed: #defaultWindowLabelFormat
Claus Gittinger <cg@exept.de>
parents: 5743
diff changeset
   420
    ^ '%1 (%5@%2)'.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   421
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   422
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   423
includeHostNameInLabel
8149
cda2dc8052e7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8058
diff changeset
   424
    "return the flag which controls if a view's label should
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   425
     include the hostname.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   426
     This flag is usually set/cleared in your private.rc file;
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   427
     the default is false."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   428
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   429
    ^ IncludeHostNameInLabel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   430
8149
cda2dc8052e7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8058
diff changeset
   431
    "Created: / 10-09-1995 / 19:21:16 / claus"
cda2dc8052e7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8058
diff changeset
   432
    "Modified (comment): / 31-08-2017 / 20:16:14 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   433
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   434
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   435
includeHostNameInLabel:aBoolean
8149
cda2dc8052e7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8058
diff changeset
   436
    "set/clear the flag which controls if a view's label should
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   437
     include the hostname - this is highly useful if you have
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   438
     multiple smalltalks open simultaneously ...
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   439
     This flag is usually set/cleared in your private.rc file;
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   440
     the default is false."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   441
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   442
    IncludeHostNameInLabel := aBoolean
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   443
8149
cda2dc8052e7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8058
diff changeset
   444
    "Modified: / 24-04-1996 / 09:09:21 / cg"
cda2dc8052e7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8058
diff changeset
   445
    "Modified (comment): / 31-08-2017 / 20:16:18 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   446
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   447
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   448
takeFocusWhenMapped
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   449
    ^ TakeFocusWhenMapped
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   450
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   451
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   452
     StandardSystemView takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   453
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   454
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   455
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   456
updateStyleCache
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   457
    "extract values from the styleSheet and cache them in class variables"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   458
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   459
    <resource: #style (#'standardSystemView.defaultExtent')>
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   460
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   461
    DefaultExtent := StyleSheet at:'standardSystemView.defaultExtent' default:nil.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   462
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   463
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   464
     self updateStyleCache
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   465
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   466
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   467
    "Modified: 31.8.1995 / 03:01:14 / claus"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   468
    "Created: 15.8.1997 / 01:34:37 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   469
    "Modified: 20.10.1997 / 15:13:50 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   470
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   471
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   472
windowLabelFormat
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   473
    ^ WindowLabelFormat
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   474
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   475
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   476
windowLabelFormat:aFormatString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   477
    WindowLabelFormat := aFormatString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   478
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   479
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   480
!StandardSystemView class methodsFor:'image specs'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   481
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   482
defaultSTXIcon
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   483
    <resource: #programImage>
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   484
7140
9c2e17ff88f8 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 7130
diff changeset
   485
    ^ Icon stxIcon.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   486
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   487
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   488
!StandardSystemView class methodsFor:'startup'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   489
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   490
cancelAutoRaise
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   491
    "cancel any schedule autoraise action"
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   492
8288
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
   493
    |raiseBlock|
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   494
8288
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
   495
    (raiseBlock := TimedRaiseAction) notNil ifTrue:[
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
   496
        TimedRaiseAction := nil.
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
   497
        Processor removeTimedBlock:raiseBlock.
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   498
    ].
8288
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
   499
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
   500
    "Modified: / 08-02-2018 / 16:31:38 / stefan"
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   501
!
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   502
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   503
start
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   504
    "create, realize the view - this topview and all its subviews will
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   505
     run as a separate process with its own windowGroup.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   506
     This method exists for backward compatibility - use open."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   507
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   508
    ^ self open
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   509
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   510
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   511
!StandardSystemView methodsFor:'Compatibility-ST80'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   512
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   513
maximumSize
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   514
    "same as maxExtent; for ST-80 compatibility"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   515
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   516
    ^ self maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   517
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   518
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   519
maximumSize:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   520
    "same as maxExtent; for ST-80 compatibility"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   521
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   522
    ^ self maxExtent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   523
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   524
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   525
menuBar
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   526
    "return my menuBar or nil if I have none.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   527
     This is only valid for topViews which were built with the UIBuilder."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   528
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   529
    ^ application builder menuBar
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   530
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   531
    "Created: / 27.10.1997 / 16:23:13 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   532
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   533
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   534
minimumSize
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   535
    "same as minExtent; for ST-80 compatibility"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   536
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   537
    ^ self minExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   538
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   539
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   540
minimumSize:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   541
    "same as minExtent; for ST-80 compatibility"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   542
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   543
    ^ self minExtent:anExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   544
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   545
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   546
quit
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   547
    "same as closeRequest
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   548
     (but sometimes sent via the sensors event queue from VW programs)"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   549
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   550
    self closeRequest
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   551
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   552
    "Created: / 30.10.1997 / 19:23:01 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   553
    "Modified: / 3.8.1998 / 20:04:22 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   554
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   555
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   556
!StandardSystemView methodsFor:'accessing'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   557
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   558
application
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   559
    "return the topViews application.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   560
     This is new protocol for ST-80 compatibility and not yet fully supported"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   561
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   562
    ^ application
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   563
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   564
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   565
application:anApplicationModel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   566
    "set the topViews application.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   567
     This is new protocol for ST-80 compatibility and not yet fully supported"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   568
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   569
    application := anApplicationModel.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   570
    anApplicationModel notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   571
	anApplicationModel window isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   572
	    anApplicationModel window:self
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   573
	]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   574
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   575
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   576
    "Modified: 18.4.1996 / 14:55:44 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   577
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   578
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   579
!StandardSystemView methodsFor:'accessing-behavior'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   580
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   581
bePartner
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   582
    "define me as a partner-View.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   583
     All partners within the applications windowGroup iconify/deiconify together."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   584
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   585
    self setWindowGroupFromApplication.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   586
    super bePartner.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   587
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   588
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   589
     see example in TopView>>bePartner
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   590
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   591
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   592
    "Created: 22.9.1995 / 17:40:15 / claus"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   593
    "Modified: 6.3.1996 / 16:16:42 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   594
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   595
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   596
beSlave
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   597
    "define me as a slave-View.
6122
3d48897de0c7 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6101
diff changeset
   598
     All slaves within the application's windowGroup iconify/deiconify with the masterView(s)
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   599
     (i.e. they follow their master(s))"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   600
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   601
    self setWindowGroupFromApplication.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   602
    super beSlave.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   603
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   604
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   605
     see example in TopView>>beSlave
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   606
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   607
6122
3d48897de0c7 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6101
diff changeset
   608
    "Created: / 22-09-1995 / 17:40:15 / claus"
3d48897de0c7 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6101
diff changeset
   609
    "Modified: / 06-03-1996 / 16:16:50 / cg"
3d48897de0c7 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6101
diff changeset
   610
    "Modified (comment): / 28-08-2013 / 21:27:46 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   611
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   612
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   613
sendWindowEvents:collectionOfEventSymbols
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   614
    "define the events that are to be forwarded to the application.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   615
     This is being implemented ..."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   616
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   617
    windowEventsForApplication := collectionOfEventSymbols
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   618
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   619
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   620
sizeFixed:aBoolean
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   621
    "this prevents the view from resizing itself when realized.
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   622
     For normal topViews, this is void, since they don't do this anyway.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   623
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   624
     However, modalBoxes (especially: DialogBoxes) typically resize themselfes
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   625
     to the preferredExtent of their components. In some cases, this behavior is
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   626
     not desired and it should be turned off by setting sizeFixed to true.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   627
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   628
     To avoid confusion:
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   629
        This does NOT prevent the window manager from resizing the view,
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   630
        instead it tells the view to NOT resize ITSELF."
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   631
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   632
    sizeFixed := aBoolean.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   633
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   634
    "example: dialog which resizes itself on #open:
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   635
              (thereby ignoring the 200@200 extent)
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   636
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   637
        |dialog|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   638
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   639
        dialog := Dialog new.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   640
        dialog addInputFieldOn:'' asValue.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   641
        dialog addOkButton.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   642
        dialog extent:200@200.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   643
        dialog open.
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   644
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   645
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   646
    using sizeFixed:
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   647
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   648
        |dialog|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   649
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   650
        dialog := Dialog new.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   651
        dialog addInputFieldOn:'' asValue.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   652
        dialog addOkButton.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   653
        dialog extent:200@200; sizeFixed:true.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   654
        dialog open.
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   655
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   656
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   657
    using openWithExtent (also sets sizeFixed):
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   658
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   659
        |dialog|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   660
7668
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   661
        dialog := Dialog new.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   662
        dialog addInputFieldOn:'' asValue.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   663
        dialog addOkButton.
7d36ebfb49c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7587
diff changeset
   664
        dialog openWithExtent:200@200.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   665
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   666
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   667
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   668
!StandardSystemView methodsFor:'accessing-channels'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   669
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   670
labelChannel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   671
    "return the labelChannel - or nil"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   672
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   673
    ^ labelChannel.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   674
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   675
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   676
labelChannel:aValueHolder
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   677
    "set the labelChannel - a valueHolder holding a string
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   678
     which is shown as title bar"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   679
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   680
    |prev|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   681
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   682
    prev := labelChannel.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   683
    labelChannel := aValueHolder.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   684
    self setupChannel:aValueHolder for:nil withOld:prev.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   685
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   686
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   687
!StandardSystemView methodsFor:'accessing-dimensions'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   688
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   689
maxExtent
7693
8616988317db #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7668
diff changeset
   690
    "return the view's maximum allowed extent"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   691
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   692
    ^ maxExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   693
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   694
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   695
maxExtent:max
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   696
    "define the maximum extent the view may have -
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   697
     depends on good-will of window manager"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   698
7080
1de9e5119a28 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 6871
diff changeset
   699
    |id|
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   700
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   701
    maxExtent ~= max ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   702
	maxExtent := max.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   703
	maxExtent x isNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   704
	    maxExtent := 99999 @ maxExtent y.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   705
	].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   706
	maxExtent y isNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   707
	    maxExtent := maxExtent x @ 99999.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   708
	].
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   709
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   710
	(id := self drawableId) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   711
	    device setWindowMinExtent:nil maxExtent:max in:id
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   712
	].
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   713
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   714
	"/ if my current extent is larger than the new
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   715
	"/ maxExtent, adjust.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   716
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   717
	(width notNil and:[height notNil]) ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   718
	    ((width > (max x)) or:
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   719
	     [height > (max y)]) ifTrue: [
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   720
		self extent:(max min:self extent)
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   721
	    ]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   722
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   723
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   724
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   725
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   726
minExtent
7693
8616988317db #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7668
diff changeset
   727
    "return the view's minimum allowed extent"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   728
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   729
    ^ minExtent
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   730
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   731
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   732
minExtent:min
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   733
    "define the minimum extent the view may have -
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   734
     depends on good-will of window manager"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   735
7080
1de9e5119a28 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 6871
diff changeset
   736
    |id|
1de9e5119a28 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 6871
diff changeset
   737
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   738
    minExtent ~= min ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   739
	minExtent := min.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   740
	(id := self drawableId) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   741
	    device setWindowMinExtent:min maxExtent:nil in:id
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   742
	].
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   743
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   744
	"/ if my current extent is smaller than the new
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   745
	"/ minExtent, adjust.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   746
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   747
	(width notNil and:[height notNil]) ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   748
	    ((width < (min x)) or:
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   749
	     [height < (min y)]) ifTrue: [
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   750
		self extent:(min max:self extent)
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   751
	    ]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   752
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   753
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   754
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   755
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   756
!StandardSystemView methodsFor:'accessing-look'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   757
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   758
icon
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   759
    "return the form defined as icon"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   760
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   761
    ^ icon value
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   762
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   763
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   764
icon:aFormOrImage
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   765
    "define the form or image (bitmap) used as icon"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   766
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   767
    |i m iconValue|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   768
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   769
    icon := aFormOrImage.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   770
    iconValue := icon value.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   771
    iconValue notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   772
	self drawableId notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   773
	    i := device convertedIcon:iconValue.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   774
	    (i notNil and:[i id notNil]) ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   775
		(m := iconValue mask) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   776
		    m := device convertedIconMask:m.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   777
		].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   778
		device setWindowIcon:i mask:m in:self drawableId
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   779
	    ]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   780
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   781
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   782
4814
4204263d3ab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4812
diff changeset
   783
    "Modified: / 30-10-2007 / 16:39:15 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   784
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   785
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   786
iconLabel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   787
    "return the name displayed in the icon"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   788
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   789
    ^ iconLabel
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   790
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   791
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   792
iconLabel:aString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   793
    "define the name to be displayed in the icon"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   794
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   795
    |newLabel|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   796
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   797
    (newLabel := aString string) ~= iconLabel ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   798
	iconLabel := newLabel.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   799
	self drawableId notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   800
	    device setIconName:newLabel in:self drawableId.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   801
	    "
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   802
	     unbuffered - to make it visible right NOW
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   803
	    "
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   804
	    self flush.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   805
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   806
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   807
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   808
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   809
iconMask
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   810
    "return the form defined as iconMask.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   811
     Notice, that many windowManagers ignore this mask
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   812
     (usually, only managers which place icons on the background desktop
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   813
      care for an icon - if at all ...)"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   814
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   815
    |mask|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   816
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   817
    "/ only images possibly have iconMasks
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   818
    icon notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   819
	(mask := icon value mask) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   820
	    ^ device convertedIconMask:mask
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   821
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   822
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   823
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   824
    ^ nil
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   825
4815
77b9f37c9e10 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4814
diff changeset
   826
    "Modified: / 30-10-2007 / 20:59:40 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   827
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   828
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   829
iconName:aString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   830
    "this method will vanish soon ... - for backward compatibility"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   831
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   832
    <resource:#obsolete>
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   833
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   834
    self obsoleteMethodWarning:'use #iconLabel:'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   835
    self iconLabel:aString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   836
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   837
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   838
iconView
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   839
    "return the view used as icon-view"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   840
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   841
    ^ iconView
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   842
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   843
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   844
iconView:aView
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   845
    "specify the view to be used as icon.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   846
     This may not be supported on all display types"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   847
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   848
    iconView := aView.
6278
0d9ffed76629 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6248
diff changeset
   849
    self drawableId notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   850
	aView create.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   851
	device setWindowIconWindow:aView in:self drawableId.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   852
	aView setRealized:true.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   853
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   854
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   855
    "Modified: 4.4.1997 / 16:21:37 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   856
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   857
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   858
label
7693
8616988317db #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7668
diff changeset
   859
    "return the view's name in the title area"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   860
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   861
    ^ label
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   862
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   863
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   864
label:aString
6245
d0c50dd22b30 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6228
diff changeset
   865
    "define the view's name in the window's title area.
d0c50dd22b30 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6228
diff changeset
   866
     If IncludeHostNameInLabel is true, prepend the hostname - now done in windowLabelFor:
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   867
     (you will appreciate this, if you are working on multiple
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   868
      machines simultaneously - as I do ...)"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   869
5066
c166f0bf72ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5039
diff changeset
   870
    |newLabel expandedLabel|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   871
4633
53643adff205 care for nil label-arg
Claus Gittinger <cg@exept.de>
parents: 4566
diff changeset
   872
    newLabel := aString.
53643adff205 care for nil label-arg
Claus Gittinger <cg@exept.de>
parents: 4566
diff changeset
   873
    newLabel notNil ifTrue:[newLabel := newLabel string].
53643adff205 care for nil label-arg
Claus Gittinger <cg@exept.de>
parents: 4566
diff changeset
   874
    newLabel ~= label ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   875
	label := newLabel.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   876
	"/ fix: cg: realized is a bad test here - could still be unmapped...
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   877
	self drawableId notNil "realized" ifTrue: [
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   878
	    expandedLabel := self windowLabelFor:label.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   879
	    self windowName:(expandedLabel ? '').
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   880
	    shown ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   881
		"
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   882
		 unbuffered - to make it visible right NOW
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   883
		"
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   884
		self flush.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   885
	    ]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   886
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   887
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   888
4633
53643adff205 care for nil label-arg
Claus Gittinger <cg@exept.de>
parents: 4566
diff changeset
   889
    "Created: / 08-09-1995 / 19:37:06 / claus"
53643adff205 care for nil label-arg
Claus Gittinger <cg@exept.de>
parents: 4566
diff changeset
   890
    "Modified: / 06-10-2006 / 11:55:06 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   891
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   892
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   893
label:labelString iconLabel:iconLabelString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   894
    "set both the label and the iconLabel"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   895
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   896
    self label:labelString.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   897
    self iconLabel:iconLabelString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   898
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   899
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   900
!StandardSystemView methodsFor:'change & update'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   901
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   902
update:something with:aParameter from:changedObject
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   903
    "the MVC way of changing the label ..."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   904
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   905
    changedObject notNil ifTrue:[
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   906
	changedObject == labelChannel ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   907
	    self label:labelChannel value.
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   908
	    ^ self
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   909
	].
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   910
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   911
    ^ super update:something with:aParameter from:changedObject
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   912
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   913
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   914
!StandardSystemView methodsFor:'destroying'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   915
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   916
release
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   917
    self removeFromCurrentProject.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   918
    labelChannel notNil ifTrue:[
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   919
	labelChannel removeDependent:self.
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   920
	labelChannel := nil.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   921
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   922
    windowGroup notNil ifTrue:[
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   923
	windowGroup focusSequence:nil.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   924
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   925
    super release.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   926
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   927
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   928
saveAndTerminate
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
   929
    "save & terminate request from the windowManager. The application should
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   930
     save its data/files/text etc. somehow and close.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   931
     If there is an application, let it decide how do do that.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   932
     Otherwise, forward it to superclasses which knows how to do this.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   933
     (it defaults to a terminate there).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   934
     Notice, that not all windowmanagers are nice enough
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   935
     to send this request; some simply distroy the view."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   936
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   937
    application notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   938
	application saveAndTerminateRequestFor:self
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   939
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   940
	super saveAndTerminate
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   941
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   942
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   943
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   944
terminate
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   945
    "terminate request from the windowManager. If there is an application,
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   946
     let it decide if it really wants to be close. Otherwise, forward it to
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   947
     superclasses terminate which knows how to do this.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   948
     Notice, that not all windowmanagers are nice enough
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   949
     to send this request; some simply distroy the view."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   950
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   951
    application notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   952
	application closeRequestFor:self
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   953
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   954
	self closeRequest.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   955
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   956
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   957
    "Modified: / 3.8.1998 / 19:49:45 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   958
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   959
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   960
!StandardSystemView methodsFor:'event handling'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   961
6646
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
   962
delayedAutoRaiseEvent
6048
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
   963
    "called with a delay by the focusIn code, iff the userPref setting is active.
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
   964
     Some (a small number only) may want to prevent autoraise in certain situations
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
   965
     - for example, if one view is controlling another. These get a chance to redefine this
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
   966
     method"
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
   967
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   968
    |wg app|
6049
9e2da07eefa9 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6048
diff changeset
   969
6071
536027b2080b class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6049
diff changeset
   970
    "/ not, if my windowGroup is in a modal or popup action
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   971
    ((wg := self windowGroup) notNil
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   972
    and:[ wg isInModalLoop not
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   973
    and:[ wg mainGroup isInModalLoop not
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
   974
    and:[ self isModal not ]]]) ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   975
	self sensor anyButtonPressed ifFalse:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   976
	    "/ if I have an application, let it decide
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   977
	    (app := self application) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   978
		app delayedAutoRaiseEventFor:self
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   979
	    ] ifFalse:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   980
		self raise.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   981
	    ].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
   982
	]
6071
536027b2080b class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6049
diff changeset
   983
    ]
6048
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
   984
!
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
   985
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   986
focusIn
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   987
    "the view got the keyboard focus (via the window manager).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   988
     I.e. the mouse was moved out into the topView area - restore the
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   989
     focus to the previous focusView.."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   990
6721
63e784a23e49 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6646
diff changeset
   991
    |viewToGetFocus viewUnderMousePointer ms|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   992
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
   993
    windowGroup notNil ifTrue:[
8394
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
   994
        "/ a hack for window managers, which do not honor the
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
   995
        "/ WMTransientFor attribute (i.e. XQuartz).
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
   996
        "/ This flag would prevent a popup (dialog or notification) from being
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
   997
        "/ covered by its underlying regular view. But on MAC, it does not.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
   998
        "/ However, focus is coming in, when doing this, so we manually fix this
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
   999
        "/ here. Should not hurt on other systems, where the view is already on top.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1000
        "/ if it does, add some conditional check here (device WMTransientForBroken or similar)
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1001
        "/ You can check for you WM to be correct, by disabling the line below,
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1002
        "/ then click on a smallLint-note icon, to see the smallLint info,
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1003
        "/ then click on the underlying codeView, to raise it.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1004
        "/ if the smallLint view can be covered, your WM is broken.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1005
        "/ cg: turns out to be a bad idea - it does help solve the above problem (on mac),
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1006
        "/ but raises unwanted topViews (for example, if a modal dialog's popup menu closes)
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1007
        "/ windowGroup topViews first raise.
6772
3a5a27e20524 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6741
diff changeset
  1008
8394
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1009
        "/ I got the focus - tell the current focus-windowgroup
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1010
        "/ that its focus is gone elsewhere ...
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1011
        "/ 'focusIn ' print. windowGroup process name printCR.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1012
        "/ 'focusView is ' print. windowGroup focusView printCR.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1013
8394
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1014
        "/ although the foucs has usually already been taken (see focusOut),
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1015
        "/ there are situations where this does not happen;
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1016
        "/ I am not sure if that is a WM bug or an ST/X bug, but sometimes (with popups),
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1017
        "/ I only get a focus in. Could be a race, when the loosing view is already destroyed,
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1018
        "/ at the time the focus event arrives.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1019
        "/ Anyway: it should not matter to take it again...
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1020
        WindowGroup takeFocusFromDevice:device.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1021
        device focusWindowGroup:windowGroup.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1022
        
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1023
        windowGroup isInModalLoop ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1024
            windowGroup allTopViewsDo:[:t |
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1025
                t ~~ self ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1026
                    t focusIn.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1027
                    t raise.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1028
                    ^ self.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1029
                ].
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1030
            ]
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1031
        ].
6772
3a5a27e20524 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6741
diff changeset
  1032
8394
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1033
        "/ Transcript show:self; show:' focus in '; showCR:windowGroup isInModalLoop.
6646
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
  1034
8394
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1035
        viewToGetFocus := windowGroup focusView.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1036
        viewToGetFocus isNil ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1037
            UserPreferences current focusFollowsMouse ~~ false ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1038
                viewUnderMousePointer := windowGroup pointerView.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1039
                "/ 'viewUnderMousePointer is ' print. viewUnderMousePointer printCR.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1040
                (viewUnderMousePointer notNil
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1041
                and:[viewUnderMousePointer isKeyboardConsumer
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1042
                and:[viewUnderMousePointer wantsFocusWithPointerEnter]]) ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1043
                    viewToGetFocus := viewUnderMousePointer.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1044
                ]
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1045
            ].
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1046
        ].
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1047
        viewToGetFocus isNil ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1048
            windowGroup focusBackToPreviousFocusView.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1049
            windowGroup focusView isNil ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1050
                self assignInitialKeyboardFocus.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1051
                "/ windowGroup focusView isNil ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1052
                "/     'No focusWindow' infoPrintCR.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1053
                "/ ].    
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1054
            ].
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1055
        ] ifFalse:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1056
            "/ v requestFocus.  - will be denied; but we must force it here
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1057
            "/ to force a change...
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1058
            windowGroup setFocusView:nil.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1059
            windowGroup focusView:viewToGetFocus byTab:nil.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1060
        ].
6047
d8080f253e26 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
  1061
8394
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1062
        "/ optionally bring the window to the front after some delay.
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1063
        "/ but not, if my windowGroup is in a modal or popup action
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1064
        (ms := UserPreferences current autoRaiseOnFocusInDelay) notNil ifTrue:[
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1065
            self scheduleAutoRaiseAfter:ms
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1066
        ].
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1067
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1068
    super focusIn
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1069
5675
51d438d3033c changed: #focusIn
Claus Gittinger <cg@exept.de>
parents: 5659
diff changeset
  1070
    "Modified: / 20-01-2011 / 20:51:20 / cg"
8394
44c396105bcc #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 8288
diff changeset
  1071
    "Modified: / 19-06-2018 / 14:01:54 / Claus Gittinger"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1072
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1073
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1074
focusOut
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1075
    "the top-view lost the keyboard focus (via the window manager).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1076
     I.e. the mouse was moved out of the topView area."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1077
6787
7b75289ce8f8 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6775
diff changeset
  1078
    |v wg|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1079
6148
6ba6f49e0a8d class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6122
diff changeset
  1080
    "/ 'fout ' print. self printCR.
6ba6f49e0a8d class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6122
diff changeset
  1081
6787
7b75289ce8f8 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6775
diff changeset
  1082
    (wg := windowGroup) notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1083
	"/ '  fout-focusView: ' print. windowGroup focusView printCR.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1084
	(v := wg focusView) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1085
	    "/ wg focusView:nil.  "/ -- let windowGroup do it.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1086
	    v showNoFocus:(windowGroup explicitFocusView == v).
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1087
	    "/ '  send-has-nofocus to: ' print. v printCR.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1088
	    v hasKeyboardFocus:false.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1089
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1090
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1091
    super focusOut
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1092
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1093
    "Modified: 25.2.1997 / 23:19:46 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1094
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1095
6100
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1096
processShortcut:aKeyEvent
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1097
    "a shortcut key event as forwarded from the keyboardProcessor - if there is the
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1098
     shortcut key defined, process the shortcut and return true - otherwise false."
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1099
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1100
    application notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1101
	(application processShortcut:aKeyEvent) ifTrue:[ ^ true ]
6101
ea437d17677d Fix in StandardSystemView>>#processShortcut:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6100
diff changeset
  1102
    ].
ea437d17677d Fix in StandardSystemView>>#processShortcut:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6100
diff changeset
  1103
    ^super processShortcut:aKeyEvent
6100
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1104
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1105
    "Created: / 23-07-2013 / 18:15:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6101
ea437d17677d Fix in StandardSystemView>>#processShortcut:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6100
diff changeset
  1106
    "Modified: / 23-07-2013 / 23:57:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6100
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1107
!
409e2909e130 Added StandardSystemView>>#processShortcut: to allow per-application
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6079
diff changeset
  1108
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
  1109
scheduleAutoRaiseAfter:ms
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
  1110
    "bring the window to the front after some delay.
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
  1111
     but not, if my windowGroup is in a modal or popup action"
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
  1112
8288
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1113
    |wg raiseBlock|
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
  1114
6646
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
  1115
    (wg := self windowGroup) isNil ifTrue:[^ self].
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1116
    wg isInModalLoop ifTrue:[^ self].
6646
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
  1117
    wg mainGroup isInModalLoop ifTrue:[^ self].
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
  1118
    "/ self isModal ifTrue:[^ self].
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
  1119
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
  1120
    TimedRaiseAction notNil ifTrue:[
8288
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1121
        Processor removeTimedBlock:TimedRaiseAction.
6646
7eb10d85e589 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6519
diff changeset
  1122
    ].
8288
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1123
    TimedRaiseAction := raiseBlock := [
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1124
                    TimedRaiseAction == raiseBlock ifTrue:[
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1125
                        TimedRaiseAction := nil.
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1126
                        self sensor pushUserEvent: #delayedAutoRaiseEvent for: self
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1127
                    ].
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1128
                ].
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1129
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1130
    Processor
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1131
        addTimedBlock:raiseBlock
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1132
        afterMilliseconds:ms.
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1133
3ea310460fdd #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 8149
diff changeset
  1134
    "Modified: / 08-02-2018 / 17:48:22 / stefan"
6073
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
  1135
!
2983eb433ed6 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6071
diff changeset
  1136
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1137
showActivity:someMessage
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1138
    "some activityNotification shalt be communicated to
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1139
     the user. Forward it to my application (if any).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1140
     (that one should know how to deal with it).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1141
     Otherwise, simply ignore it."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1142
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1143
    application notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1144
	application showActivity:someMessage
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1145
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1146
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1147
    "Created: 16.12.1995 / 18:40:44 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1148
    "Modified: 23.4.1996 / 21:38:11 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1149
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1150
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1151
!StandardSystemView methodsFor:'initialization & release'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1152
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1153
addToCurrentProject
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1154
    "add the receiver (a topview) to the current projects set-of-views.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1155
     (If there is a current project)"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1156
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1157
    |p|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1158
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1159
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1160
     the following check allows systems
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1161
     without projects and changeSets
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1162
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1163
    (Project notNil and:[(p := Project current) notNil]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1164
	p addView: self
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1165
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1166
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1167
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1168
defaultControllerClass
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1169
    "for ST-80 compatibility only - not used in ST/X"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1170
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1171
    ^ nil "/ StandardSystemController
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1172
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1173
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1174
initEvents
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1175
    super initEvents.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1176
    self enableFocusEvents.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1177
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1178
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1179
initialize
7849
ad44552af12c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 7693
diff changeset
  1180
    <modifier: #super> "must be called if redefined"
ad44552af12c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 7693
diff changeset
  1181
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1182
    super initialize.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1183
5388
10a240c6365a changed:
Claus Gittinger <cg@exept.de>
parents: 5349
diff changeset
  1184
    "/ self setBorderWidth:2.         "- notice: many window managers ignore this"
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1185
    device isWindowsPlatform ifTrue:[
7849
ad44552af12c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 7693
diff changeset
  1186
        minExtent := 0 @ 0.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1187
    ] ifFalse:[
7849
ad44552af12c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 7693
diff changeset
  1188
        minExtent := 10 @ 10.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1189
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1190
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1191
    label isNil ifTrue:[label := self class defaultLabel].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1192
    icon isNil ifTrue:[icon := self class defaultIcon].
5942
e9fa762f18a3 changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 5771
diff changeset
  1193
    sizeFixed := false.
e9fa762f18a3 changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 5771
diff changeset
  1194
7849
ad44552af12c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 7693
diff changeset
  1195
    "Modified: / 08-02-2017 / 00:26:39 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1196
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1197
5659
0c6fa789e7f0 oops - mapping
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1198
mapped
0c6fa789e7f0 oops - mapping
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1199
    super mapped.
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1200
    device isWindowsPlatform ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1201
	"don't do this in X11 - switching between
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1202
	 virtual desktops would change the window stacking all the time"
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1203
	self setForegroundWindow.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1204
	self activate.
5743
112d5f35a625 changed: #mapped
Stefan Vogel <sv@exept.de>
parents: 5735
diff changeset
  1205
    ].
5659
0c6fa789e7f0 oops - mapping
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1206
0c6fa789e7f0 oops - mapping
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1207
    "Created: / 01-12-2010 / 15:57:22 / cg"
0c6fa789e7f0 oops - mapping
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1208
!
0c6fa789e7f0 oops - mapping
Claus Gittinger <cg@exept.de>
parents: 5624
diff changeset
  1209
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1210
reAdjustGeometry
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1211
    "sent as a final step when an image is restarted.
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1212
     when we come up on a smaller display,
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1213
     make certain, that the receiver is visible"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1214
6278
0d9ffed76629 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6248
diff changeset
  1215
    |dX dY limitRight limitBottom graphicsDevice|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1216
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1217
    graphicsDevice := device.
6278
0d9ffed76629 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6248
diff changeset
  1218
    dX := (graphicsDevice horizontalPixelPerMillimeter * 20) rounded.
0d9ffed76629 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6248
diff changeset
  1219
    dY := (graphicsDevice verticalPixelPerMillimeter * 20) rounded.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1220
6278
0d9ffed76629 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6248
diff changeset
  1221
    limitRight := graphicsDevice usableWidth - dX.
0d9ffed76629 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6248
diff changeset
  1222
    limitBottom := graphicsDevice usableHeight - dY.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1223
    ((self left > limitRight) or:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1224
      self top > limitBottom]) ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1225
	'StandardSystemView [info]: moving view into visible area' infoPrintCR.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1226
	self origin:limitRight @ limitBottom
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1227
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1228
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1229
    "Modified: 10.1.1997 / 15:12:19 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1230
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1231
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1232
reinitialize
7562
217cc7ec5656 #OTHER by mawalch
mawalch
parents: 7416
diff changeset
  1233
    "reopen the receiver if it was visible before.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1234
     This is called right after snapIn; Notice, that all instance variables
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1235
     (such as shown, realized etc.) are left-overs from the time the snapout
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1236
     was done. Remap the receiver, if it was mapped at snapout time"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1237
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1238
    |myController|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1239
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1240
    "if I have already been reinited - return"
6278
0d9ffed76629 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6248
diff changeset
  1241
    self drawableId notNil ifTrue:[
7562
217cc7ec5656 #OTHER by mawalch
mawalch
parents: 7416
diff changeset
  1242
        ^ self
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1243
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1244
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1245
    "have to kludge with the controller
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1246
     - otherwise its startup performs unwanted actions ..."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1247
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1248
    myController := controller.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1249
    controller := nil.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1250
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1251
    "physically create the view & subviews"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1252
    self recreate.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1253
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1254
    "if I was iconified (not realized), remap iconified"
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1255
    device
7562
217cc7ec5656 #OTHER by mawalch
mawalch
parents: 7416
diff changeset
  1256
        mapView:self id:self drawableId iconified:(realized "shown" not)
217cc7ec5656 #OTHER by mawalch
mawalch
parents: 7416
diff changeset
  1257
        atX:left y:top width:width height:height
217cc7ec5656 #OTHER by mawalch
mawalch
parents: 7416
diff changeset
  1258
        minExtent:minExtent maxExtent:maxExtent.
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1259
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1260
    "and restart the window-group process"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1261
    windowGroup notNil ifTrue:[
7562
217cc7ec5656 #OTHER by mawalch
mawalch
parents: 7416
diff changeset
  1262
        windowGroup restart
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1263
    ].
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1264
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1265
    "restore controller"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1266
    controller := myController
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1267
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1268
    "Modified: / 6.5.1999 / 09:50:13 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1269
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1270
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1271
removeFromCurrentProject
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1272
    "remove the receiver (a topview) from the current projects set-of-views.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1273
     (If there is a current project)"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1274
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1275
    |p|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1276
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1277
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1278
     the following check allows systems
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1279
     without projects and changeSets
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1280
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1281
    (Project notNil and:[(p := Project current) notNil]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1282
	p removeView:self
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1283
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1284
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1285
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1286
restarted
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1287
    "sent by my windowGroup, when restarted from an image.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1288
     Nothing done here, but can be redefined to perform any actions
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1289
     required to reset the application after an image-restart.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1290
     (for example: check if application files are still around, restart
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1291
     subprocesses etc.)."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1292
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1293
    application notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1294
	application restarted
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1295
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1296
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1297
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1298
!StandardSystemView methodsFor:'printing & storing'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1299
5233
fb88be5a3dea define #printOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5086
diff changeset
  1300
printOn:aStream
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1301
    "just for your convenience in inspectors ...
7693
8616988317db #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7668
diff changeset
  1302
     ... add the view's label to the displayString."
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1303
5233
fb88be5a3dea define #printOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 5086
diff changeset
  1304
    super printOn:aStream.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1305
    label notNil ifTrue:[
7693
8616988317db #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 7668
diff changeset
  1306
        aStream nextPut:$(.  label printOn:aStream. aStream nextPut:$).
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1307
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1308
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1309
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1310
!StandardSystemView methodsFor:'private'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1311
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1312
convertedIcon
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1313
    "make certain, that the icon is compatible with my device;
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1314
     this means converting it to a format (typically: monochrome) which
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1315
     the device supports. Return a compatible version of the icon."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1316
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1317
    ^ device convertedIcon:icon
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1318
4814
4204263d3ab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4812
diff changeset
  1319
    "Modified: / 30-10-2007 / 16:39:55 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1320
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1321
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1322
convertedIcon:iconArg
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1323
    "make certain, that the image argument is compatible with my device;
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1324
     this means converting it to a format (typically: monochrome) which
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1325
     the device supports. Return a compatible version of the icon."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1326
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1327
    ^ device convertedIcon:iconArg
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1328
4814
4204263d3ab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4812
diff changeset
  1329
    "Modified: / 30-10-2007 / 16:37:31 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1330
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1331
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1332
convertedIconMask:aMask
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1333
    "return a version of the argument which can be used as an iconMask
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1334
     on my device. Typically, this means conversion to a monochrome
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1335
     mask - future versions may add alpha channel masks, if the device supports
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1336
     them ..."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1337
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1338
    ^ device convertedIconMask:aMask
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1339
4814
4204263d3ab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4812
diff changeset
  1340
    "Modified: / 30-10-2007 / 16:38:58 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1341
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1342
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1343
setWindowGroupFromApplication
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1344
    "get the applications topView and set my windowGroup to its wg."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1345
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1346
    |win master|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1347
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1348
    windowGroup isNil ifTrue:[
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1349
	application notNil ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1350
	    (win := application window) notNil ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1351
		win ~~ self ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1352
		    windowGroup := win windowGroup.
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1353
		    ^ self
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1354
		].
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1355
		(master := application masterApplication) notNil ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1356
		    (win := master window) notNil ifTrue:[
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1357
			windowGroup := win windowGroup.
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1358
			^ self
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1359
		    ].
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1360
		].
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1361
	    ]
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1362
	]
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1363
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1364
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1365
    "Created: 22.9.1995 / 17:40:36 / claus"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1366
    "Modified: 6.3.1996 / 16:17:32 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1367
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1368
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1369
windowLabelFor:labelString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1370
    "return an expanded labelString, according to the hostName-in-window setting.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1371
     The labelString may include positional parameters:
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1372
	%1 - the actual label
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1373
	%2 - the hostname
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1374
	%3 - the userName
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1375
	%4 - the processId
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1376
	%5 - the TOP-directories name
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1377
	%6 - the TOP-directories path
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1378
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1379
6504
c5f5b4ae8195 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6480
diff changeset
  1380
    |wg proc id pidString lbl windowLabelFormat stxPackageDirectory topDirectory|
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1381
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1382
    (IncludeHostNameInLabel == true
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1383
    and:[(windowLabelFormat := self class windowLabelFormat) notNil]) ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1384
	(wg := self windowGroup) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1385
	    (proc := wg process) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1386
		(id := proc id) notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1387
		    pidString := id printString
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1388
		]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1389
	    ]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1390
	].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1391
	stxPackageDirectory := Smalltalk getPackageDirectoryForPackage:'stx'.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1392
	stxPackageDirectory isNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1393
	    'StdSysView [info]: cannot figure out stx package directory.' infoPrintCR.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1394
	    stxPackageDirectory := OperatingSystem pathOfSTXExecutable asFilename.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1395
	].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1396
	stxPackageDirectory isNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1397
	    topDirectory := OperatingSystem getHomeDirectory asFilename.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1398
	] ifFalse:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1399
	    topDirectory := stxPackageDirectory directory.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1400
	    "/ a hack to make it look nicer on mac... (shows Packages otherwise)
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1401
	    topDirectory baseName = 'Packages' ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1402
		topDirectory := topDirectory directory
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1403
	    ].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1404
	].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1405
	lbl := windowLabelFormat
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1406
		bindWith:labelString
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1407
		with:[OperatingSystem getHostName]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1408
		with:[OperatingSystem getLoginName]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1409
		with:pidString
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1410
		with:[topDirectory baseName]
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1411
		with:[topDirectory pathName].
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1412
	^ lbl
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1413
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1414
    ^ labelString
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1415
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1416
    "Created: / 22-09-1997 / 10:10:32 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1417
    "Modified: / 22-08-2006 / 11:42:53 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1418
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1419
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1420
!StandardSystemView methodsFor:'queries'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1421
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1422
processName
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1423
    "return a string to be shown for my process in the
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1424
     process monitor. This has no semantic meaning, but exists
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1425
     for your convenience only."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1426
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1427
    application notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1428
	^ application processName
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1429
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1430
    label notNil ifTrue:[^ label].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1431
    ^ super processName
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1432
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1433
    "Modified: 24.4.1996 / 09:47:01 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1434
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1435
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1436
!StandardSystemView methodsFor:'realization'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1437
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1438
create
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1439
    "create - make certain that icon is available"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1440
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1441
    super create.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1442
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1443
    iconView notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1444
	iconView create.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1445
	device setWindowIconWindow:iconView in:self drawableId.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1446
	iconView setRealized:true.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1447
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1448
    iconLabel notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1449
	device setIconName:iconLabel string in:self drawableId
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1450
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1451
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1452
    "Modified: 10.6.1996 / 20:14:50 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1453
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1454
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1455
expand
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1456
    "de-iconify the receiver at its old position"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1457
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1458
    shown ifFalse:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1459
	self unmap.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1460
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1461
	"if it was iconified, try to remap non-iconified"
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1462
	device
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1463
	    mapView:self id:self drawableId iconified:false
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1464
	    atX:left y:top width:width height:height
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1465
	    minExtent:minExtent maxExtent:maxExtent.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1466
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1467
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1468
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1469
     |top|
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1470
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1471
     top := StandardSystemView new.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1472
     top label:'hello'.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1473
     top openAndWait.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1474
     top collapse.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1475
     Delay waitForSeconds:5.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1476
     top expand.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1477
    "
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1478
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1479
    "Modified: / 3.2.1998 / 16:02:56 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1480
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1481
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1482
physicalCreate
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1483
    "common code for create & recreate"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1484
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1485
    |dev currentUserPrefs lbl iconValue icn icnMask windowClassNameString org devBounds windowNameString|
6228
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1486
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1487
    dev := device.
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1488
    currentUserPrefs := UserPreferences current.
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1489
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1490
    (top notNil and:[left notNil]) ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1491
        currentUserPrefs forceWindowsIntoMonitorBounds ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1492
            "/ MULTI SCREEN support
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1493
            devBounds := dev monitorBoundsAt:( left @ top ).
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1494
            "/ adjust origin, if too large
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1495
            left + width > devBounds right ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1496
                left := devBounds right - width.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1497
            ].
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1498
            top + height > devBounds bottom ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1499
                top := devBounds bottom - height.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1500
            ].
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1501
            top  := top  max:(devBounds top).
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1502
            left := left max:(devBounds left).
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1503
        ].
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1504
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1505
        dev isWindowsPlatform ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1506
            top := top + dev captionHeight.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1507
        ].
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1508
        org := (left @ top) rounded.
5532
b804c55e232f changed: #physicalCreate
Claus Gittinger <cg@exept.de>
parents: 5418
diff changeset
  1509
    ].
b804c55e232f changed: #physicalCreate
Claus Gittinger <cg@exept.de>
parents: 5418
diff changeset
  1510
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1511
    lbl := self windowLabelFor:label.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1512
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1513
    icon notNil ifTrue:[
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1514
        iconValue := icon value.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1515
        icn := dev convertedIcon:iconValue.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1516
        (icnMask := iconValue mask) notNil ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1517
            icnMask := dev convertedIconMask:icnMask.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1518
        ].
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1519
        "this is to keep the references"
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1520
        deviceIcon := Array with:icn with:icnMask.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1521
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1522
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1523
    "/ give global eventListeners a chance to intercept windowCreation
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1524
    "/ and provide another origin (by payching my origin via setOrigin:).
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1525
    WindowSensor preViewCreateNotification:self.
6283
03b901746708 class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6278
diff changeset
  1526
    gc
6228
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1527
      createWindowFor:self
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1528
      type:(self windowType)
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1529
      origin:org
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1530
      extent:(width @ height)
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1531
      minExtent:minExtent
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1532
      maxExtent:maxExtent
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1533
      borderWidth:0 "self borderWidth"
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1534
      subViewOf:nil
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1535
      style:(self windowStyle)
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1536
      inputOnly:(self isInputOnly)
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1537
      label:lbl
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1538
      owner:nil
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1539
      icon:icn iconMask:icnMask
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1540
      iconView:iconView.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1541
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1542
    "/ give global listeners a chance to track views
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1543
    WindowSensor postViewCreateNotification:self.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1544
5556
dc9e29cb26b4 changed: #physicalCreate
Claus Gittinger <cg@exept.de>
parents: 5537
diff changeset
  1545
    self originChangedFlag:false extentChangedFlag:false.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1546
5388
10a240c6365a changed:
Claus Gittinger <cg@exept.de>
parents: 5349
diff changeset
  1547
"/    (borderColor notNil and:[borderColor ~= Black]) ifTrue:[
10a240c6365a changed:
Claus Gittinger <cg@exept.de>
parents: 5349
diff changeset
  1548
"/        self setBorderColor
10a240c6365a changed:
Claus Gittinger <cg@exept.de>
parents: 5349
diff changeset
  1549
"/    ].
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1550
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1551
"/  (viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[
6228
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1552
"/        super viewGravity:viewGravity
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1553
"/  ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1554
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1555
"/  (bitGravity notNil "and:[bitGravity ~~ #NorthWest]") ifTrue:[
6228
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1556
"/      super bitGravity:bitGravity
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1557
"/  ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1558
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1559
    viewShape notNil ifTrue:[
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1560
        self setViewShape
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1561
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1562
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1563
    (backed notNil and:[backed ~~ false]) ifTrue:[
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1564
        self backingStore:backed.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1565
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1566
    self saveUnder ifTrue:[
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1567
        self saveUnder:true.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1568
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1569
    cursor notNil ifTrue:[
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1570
        self setCursor
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1571
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1572
5975
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1573
    "/JV@2012-11-11: Updated to be ICCCM 2.0 Compliant - some modern Window managers
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1574
    "/               provide better UX when application behave nicely. Being
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1575
    "/               conformant should not hurt as St/X don't depend on X resources anyway :-)
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1576
    "/               See:
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1577
    "/
5975
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1578
    "/               http://tronche.com/gui/x/icccm/sec-4.html
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1579
7263
9036d75c2799 device access
Claus Gittinger <cg@exept.de>
parents: 7140
diff changeset
  1580
    (currentUserPrefs icccm20Compliant == true) ifTrue:[
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1581
        "/ICCCM 2.0 compliant name & class. See ICCCM 2.0 section 4.1.2.5.
5975
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1582
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1583
        | commandName lastSepIndex |
5975
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1584
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1585
        commandName := Smalltalk commandName.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1586
        lastSepIndex := commandName lastIndexOf: Filename separator.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1587
        windowNameString := commandName copyFrom: lastSepIndex + 1.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1588
        windowClassNameString := windowNameString asUppercaseFirst.
5975
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1589
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1590
        "/ Also, set _NET_WM_PID
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1591
        self setWindowPid: nil.
5039
9ac48dce073b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5005
diff changeset
  1592
    ] ifFalse:[
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1593
        "/ Old code..."
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1594
        application notNil ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1595
            windowClassNameString := application class name.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1596
        ] ifFalse:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1597
            (self class == StandardSystemView and:[subViews size == 1]) ifTrue:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1598
                "This is a subclass of SimpleView wrapped into a StandardSystemView"
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1599
                windowClassNameString := subViews first class name.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1600
            ] ifFalse:[
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1601
                windowClassNameString := self class name.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1602
            ]
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1603
        ].
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1604
        windowClassNameString := 'Stx.', windowClassNameString.
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1605
        windowNameString := 'main'.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1606
    ].
5975
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1607
6228
0d2c822acecd class: StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 6203
diff changeset
  1608
    self windowClass:windowClassNameString name:windowNameString.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1609
5975
3d74c7895143 ICCCM 2.0 Compliancy: correctly set NET_WM_CLASS and _NET_WM_PID properties
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5942
diff changeset
  1610
    "Modified: / 04-01-2013 / 16:13:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6871
68df321513d2 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6870
diff changeset
  1611
    "Modified: / 22-05-2015 / 21:09:35 / cg"
7985
d29e04d1b3ad #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 7849
diff changeset
  1612
    "Modified: / 18-03-2017 / 00:30:15 / stefan"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1613
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1614
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1615
postRealize
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1616
    "postRealize actions - tell the application (if any)."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1617
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1618
    super postRealize.
6245
d0c50dd22b30 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6228
diff changeset
  1619
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1620
    "/
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1621
    "/ let the application add its views to the current project
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1622
    "/
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1623
    application notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1624
	application opened:self.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1625
    ] ifFalse:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1626
	self addToCurrentProject.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1627
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1628
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1629
    "Created: 24.7.1997 / 18:11:26 / cg"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1630
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1631
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1632
preRealize
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1633
    "invoked right before the view is realized.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1634
     preRealize actions - tell the application (if any)."
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1635
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1636
    super preRealize.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1637
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1638
    application notNil ifTrue:[
5613
7ab31f02f7d1 Multi Screen Support
Michael Beyl <mb@exept.de>
parents: 5556
diff changeset
  1639
	application aboutToOpen:self.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1640
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1641
!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1642
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1643
recreate
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1644
    "recreate the view after a snap-in or a migration"
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1645
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1646
    super recreate.
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1647
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1648
    iconView notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1649
	iconView recreate.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1650
	device setWindowIconWindow:iconView in:self drawableId.
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1651
	iconView setRealized:true.
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1652
    ] ifFalse:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1653
	icon notNil ifTrue:[
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1654
	    self icon:(device convertedIcon:icon).
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1655
	].
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1656
    ].
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1657
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1658
    iconLabel notNil ifTrue:[
7416
bd3b9e9edd9e Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents: 7398
diff changeset
  1659
	device setIconName:iconLabel in:self drawableId
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1660
    ]
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1661
4814
4204263d3ab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4812
diff changeset
  1662
    "Modified: / 30-10-2007 / 16:39:42 / cg"
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1663
! !
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1664
8486
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1665
!StandardSystemView methodsFor:'show & hide'!
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1666
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1667
collapse
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1668
    "iconify the receiver"
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1669
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1670
    shown ifTrue:[
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1671
        self unmap.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1672
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1673
        "remap iconified"
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1674
        device
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1675
            mapView:self id:self drawableId iconified:true
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1676
            atX:left y:top width:width height:height
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1677
            minExtent:minExtent maxExtent:maxExtent.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1678
        
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1679
        shown ifTrue:[
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1680
            shown := false.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1681
            dependents notNil ifTrue:[ self changed:#visibility ].
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1682
        ].
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1683
    ].
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1684
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1685
    "
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1686
     |top|
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1687
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1688
     top := StandardSystemView new.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1689
     top label:'hello'.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1690
     top openAndWait.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1691
     Delay waitForSeconds:2.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1692
     top collapse.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1693
     Delay waitForSeconds:2.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1694
     top expand.
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1695
    "
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1696
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1697
    "Modified: / 24-07-1997 / 12:32:17 / cg"
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1698
    "Modified: / 27-09-2018 / 16:51:04 / Claus Gittinger"
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1699
! !
387d14379058 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 8394
diff changeset
  1700
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1701
!StandardSystemView class methodsFor:'documentation'!
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1702
6048
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
  1703
version
7080
1de9e5119a28 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 6871
diff changeset
  1704
    ^ '$Header$'
6048
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
  1705
!
25578230982a class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 6047
diff changeset
  1706
5388
10a240c6365a changed:
Claus Gittinger <cg@exept.de>
parents: 5349
diff changeset
  1707
version_CVS
7080
1de9e5119a28 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 6871
diff changeset
  1708
    ^ '$Header$'
4566
Claus Gittinger <cg@exept.de>
parents: 4560
diff changeset
  1709
! !
3746
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1710
6047
d8080f253e26 class: StandardSystemView
Claus Gittinger <cg@exept.de>
parents: 5975
diff changeset
  1711
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1712
StandardSystemView initialize!