StandardSystemView.st
author Claus Gittinger <cg@exept.de>
Sat, 20 Jun 1998 22:21:02 +0200
changeset 2165 a2af9e8d568a
parent 2131 16c2bda00dfe
child 2217 8ce6a3da5bab
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
48194c26a46c Initial revision
claus
parents:
diff changeset
     1
"
6
7ee0cfde237d *** empty log message ***
claus
parents: 5
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
     3
	      All Rights Reserved
0
48194c26a46c Initial revision
claus
parents:
diff changeset
     4
48194c26a46c Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
48194c26a46c Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
48194c26a46c Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
48194c26a46c Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
48194c26a46c Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
48194c26a46c Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
48194c26a46c Initial revision
claus
parents:
diff changeset
    11
"
48194c26a46c Initial revision
claus
parents:
diff changeset
    12
135
claus
parents: 132
diff changeset
    13
TopView subclass:#StandardSystemView
1539
fcd8fc807c0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1538
diff changeset
    14
	instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed
fcd8fc807c0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1538
diff changeset
    15
		application windowEventsForApplication'
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
    16
	classVariableNames:'DefaultIcon TakeFocusWhenMapped IncludeHostNameInLabel
1880
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
    17
		DefaultExtent WindowLabelFormat'
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
    18
	poolDictionaries:''
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
    19
	category:'Views-Basic'
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    20
!
48194c26a46c Initial revision
claus
parents:
diff changeset
    21
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    22
!StandardSystemView class methodsFor:'documentation'!
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    23
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    24
copyright
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    25
"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    26
 COPYRIGHT (c) 1989 by Claus Gittinger
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
    27
	      All Rights Reserved
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    28
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    29
 This software is furnished under a license and may be used
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    30
 only in accordance with the terms of that license and with the
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    32
 be provided or otherwise made available to, or used by, any
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    33
 other person.  No title to or ownership of the software is
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    34
 hereby transferred.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    35
"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    36
!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    37
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    38
documentation
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    39
"
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    40
    I represent standard application topViews 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    41
    i.e. those views which have a title-label, an icon etc. 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    42
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    43
    The name `StandardSystemView' is probably misleading and
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    44
    results from ST-80 (rel2.x) compatibility reasons.
857
df5125310d86 New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
    45
    Think of it as an ApplicationWindow.
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    46
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    47
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    48
    In ST/X, StandardSystemViews were subclassed for special views
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    49
    in the past (for example: FileBrowser, ChangesBrowser etc.).
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    50
    Although this worked, it may lead to the following
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    51
    problems and inconveniences:
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    52
        - applications inherit a big number of methods through the
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    53
          SimpleView->View->TopView->StandardSystemView hierarchy.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    54
          There is quite a danger that by accident, some method gets
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    55
          redefined which is required by one of those classes.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    56
          (typical candidates are: terminate, destroy, open ...)
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    57
          This may lead to strange effects, which may not be obvious to
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    58
          non experts ...
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    59
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    60
        - applications with multiple topViews are difficult to implement
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    61
          and manage.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    62
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    63
        - use of a windowBuilder is difficult.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    64
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    65
    For all those reasons, we HIGHLY recommend to NOT define applications
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    66
    as subclasses of StandardSystemView, but instead base them on
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    67
    ApplicationModel, and reference the topView(s) as instance variables of
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    68
    if (if at all).
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    69
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    70
    [instance variables:]
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    71
        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
    72
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    73
        icon                    <Form>      the icon
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    74
                                            [ignored if the display does not 
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    75
                                             support icons]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    76
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    77
        iconView                <View>      an optional icon-view (for animated icons)
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    78
                                            [ignored if the display does not
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    79
                                             supports this]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    80
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    81
        iconLabel               <String>    the label in the icon
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    82
                                            [ignored if the display does not 
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    83
                                             support label-tabs with icons]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    84
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    85
        minExtent               <Point>     the minimum size
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    86
                                            No limit, if nil
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    87
                                            [the window manager may have its own
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    88
                                             limit; typically some small area]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    89
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    90
        maxExtent               <Point>     the maximum size
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    91
                                            No limit, if nil.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    92
                                            [the window manager may have its own
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    93
                                             limit; typically the screen size]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    94
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    95
        sizeFixed               <Boolean>   prevents the view from resizing itself
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    96
                                            (especially to freeze a dialogs size)
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    97
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    98
        application             <AppModel>  if nonNil, thats the application
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
    99
                                            Many requests (such as open/close etc.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   100
                                            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
   101
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   102
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   103
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   104
     [class variables:]
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   105
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   106
        DefaultIcon             <Form>      cached default icon
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   107
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   108
        TakeFocusWhenMapped     <Boolean>   if true, views grab the keyboard
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   109
                                            focus (convenient with some stupid
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   110
                                            windowManagers)
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   111
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   112
        IncludeHostNameInLabel  <Boolean>   if true, the windows title shall
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   113
                                            include the hostname.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   114
                                            (convenient if you have many remote
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   115
                                            views open simultaneously)
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   116
1880
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   117
        WindowLabelFormat       <Boolean>   specifies the format for windowLabels
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   118
616
56cf67c82664 documentation
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
   119
56cf67c82664 documentation
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
   120
    [author:]
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   121
        Claus Gittinger
616
56cf67c82664 documentation
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
   122
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   123
    [see also:]
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   124
        WindowGroup
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   125
        ApplicationModel
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   126
"
1880
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   127
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   128
!
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   129
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   130
examples
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   131
"
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   132
    simple, empty topView:
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   133
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   134
	|topView|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   135
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   136
	topView := StandardSystemView new.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   137
	topView label:'my first view'.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   138
	topView extent:200 @ 200.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   139
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   140
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   141
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   142
    with an icon & iconLabel:
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   143
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   144
	|topView|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   145
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   146
	topView := StandardSystemView extent:200 @ 200.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   147
	topView label:'Hello world'.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   148
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   149
	topView icon:(Image fromFile:'hello_world.icon').
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   150
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   151
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   152
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   153
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   154
    with an animated iconView [not supported on all display devices]:
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   155
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   156
	|iconView topView|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   157
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   158
	iconView := ClockView new.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   159
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   160
	topView := StandardSystemView extent:200 @ 200.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   161
	topView label:'Hello world'.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   162
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   163
	topView iconView:iconView.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   164
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   165
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   166
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   167
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   168
    placing a subView into it:
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   169
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   170
	|topView button|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   171
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   172
	topView := StandardSystemView new.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   173
	topView label:'my second view'.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   174
	topView extent:200 @ 200.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   175
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   176
	button := Button label:'close' in:topView.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   177
	button action:[topView destroy].
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   178
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   179
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   180
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   181
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   182
    same, relative sized subview:
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   183
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   184
	|topView button|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   185
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   186
	topView := StandardSystemView new.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   187
	topView label:'my second view'.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   188
	topView extent:200 @ 200.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   189
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   190
	button := Button label:'close' in:topView.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   191
	button action:[topView destroy].
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   192
	button origin:0.25 @ 0.25 corner:0.75 @ 0.75.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   193
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   194
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   195
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   196
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   197
    multiple buttons in a panel in a topView:
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   198
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   199
	|topView panel button1 button2 button3|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   200
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   201
	topView := StandardSystemView new.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   202
	topView label:'my second view'.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   203
	topView extent:200 @ 200.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   204
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   205
	panel := HorizontalPanelView origin:0.0@0.0 corner:1.0@1.0 in:topView.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   206
	panel inset:10.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   207
	panel level:-1.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   208
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   209
	button1 := Button label:'one' in:panel.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   210
	button1 action:[Transcript showCR:'one pressed'].
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   211
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   212
	button2 := Button label:'two' in:panel.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   213
	button2 action:[Transcript showCR:'two pressed'].
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   214
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   215
	button3 := Button label:'three' in:panel.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   216
	button3 action:[Transcript showCR:'three pressed'].
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   217
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   218
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   219
									[exEnd]
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   220
"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   221
! !
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   222
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   223
!StandardSystemView class methodsFor:'instance creation'!
183
claus
parents: 181
diff changeset
   224
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   225
extent:anExtent label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   226
    "create a new topView and define its extent, label and icon"
180
claus
parents: 157
diff changeset
   227
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   228
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   229
	   label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   230
	   minExtent:nil maxExtent:nil
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   231
!
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   232
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   233
extent:anExtent label:aLabel icon:aForm minExtent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   234
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   235
	   label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   236
	   minExtent:minExtent maxExtent:nil
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   237
!
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   238
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   239
extent:anExtent label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   240
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   241
	   label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   242
	   minExtent:minExtent maxExtent:maxExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   243
!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   244
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   245
extent:anExtent label:aLabel minExtent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   246
    "create a new topView and define its extent, label and minumum extent"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   247
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   248
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   249
	   label:aLabel icon:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   250
	   minExtent:minExtent maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   251
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   252
48194c26a46c Initial revision
claus
parents:
diff changeset
   253
label:aLabel
48194c26a46c Initial revision
claus
parents:
diff changeset
   254
    "create a new topView and define its label"
48194c26a46c Initial revision
claus
parents:
diff changeset
   255
48194c26a46c Initial revision
claus
parents:
diff changeset
   256
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   257
	   label:aLabel icon:nil
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   258
	   minExtent:nil maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   259
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   260
48194c26a46c Initial revision
claus
parents:
diff changeset
   261
label:aLabel icon:aForm
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   262
    "create a new topView and define its label and icon"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   263
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   264
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   265
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   266
	   minExtent:nil maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   267
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   268
48194c26a46c Initial revision
claus
parents:
diff changeset
   269
label:aLabel icon:aForm minExtent:anExtent
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   270
    "create a new topView and define its label, icon and minumum extent"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   271
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   272
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   273
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   274
	   minExtent:anExtent maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   275
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   276
48194c26a46c Initial revision
claus
parents:
diff changeset
   277
label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   278
    "create a new topView and define its label, icon, min and max extents"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   279
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   280
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   281
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   282
	   minExtent:minExtent maxExtent:maxExtent
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   283
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   284
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   285
label:aLabel minExtent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   286
    "create a new topView and define its label and minimum extent"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   287
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   288
    ^ self origin:nil extent:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   289
	   label:aLabel icon:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   290
	   minExtent:anExtent maxExtent:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   291
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   292
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   293
model:aModel label:aLabel minimumSize:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   294
    "ST80-style instance creation"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   295
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   296
    |newView|
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   297
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   298
    newView := self origin:nil 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   299
		    extent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   300
		     label:aLabel 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   301
		      icon:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   302
		 minExtent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   303
		 maxExtent:nil.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   304
    newView model:aModel.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   305
"/    newView controller:(self defaultControllerClass new view:newView).
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   306
    ^ newView
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   307
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   308
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   309
origin:anOrigin extent:anExtent label:aLabel
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   310
    "create a new topView and define its origin, extent and label"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   311
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   312
    ^ self origin:anOrigin extent:anExtent
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   313
	   label:aLabel icon:nil
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   314
	   minExtent:nil maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   315
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   316
48194c26a46c Initial revision
claus
parents:
diff changeset
   317
origin:anOrigin label:aLabel icon:aForm
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   318
		minExtent:minExtent maxExtent:maxExtent
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   319
    "create a new topView and define its origin, extent, label, icon
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   320
     and extent-boundaries."
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   321
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   322
    ^ self origin:anOrigin extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   323
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   324
	   minExtent:minExtent maxExtent:maxExtent
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   325
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   326
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   327
!StandardSystemView class methodsFor:'class initialization'!
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   328
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   329
initialize
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   330
    IncludeHostNameInLabel := false.
1880
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   331
    "/ WindowLabelFormat := '%2:%1'.    "/ the old format
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   332
    "/ WindowLabelFormat := '%1 @ %2'.
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   333
    WindowLabelFormat := '%1 [%2]'.
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   334
    TakeFocusWhenMapped := false.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   335
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   336
    "Created: 20.8.1997 / 14:16:32 / cg"
1880
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   337
    "Modified: 20.8.1997 / 20:11:10 / cg"
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   338
! !
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   339
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   340
!StandardSystemView class methodsFor:'defaults'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   341
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   342
defaultExtent
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   343
    "return a standardSystemViews default window extent"
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   344
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   345
    DefaultExtent notNil ifTrue:[
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   346
        ^ DefaultExtent
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   347
    ].
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   348
    ^ super defaultExtent
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   349
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   350
    "Created: 15.8.1997 / 01:36:21 / cg"
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   351
!
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   352
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   353
defaultIcon
1612
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   354
    "return a topViews default window icon"
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   355
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   356
    <resource: #style (#ICON #ICON_FILE)>
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   357
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   358
    |nm i|
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   359
1612
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   360
    (i := DefaultIcon) isNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   361
	i := self classResources at:'ICON' default:nil.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   362
	i isNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   363
	    nm := ClassResources at:'ICON_FILE' default:'SmalltalkX.xbm'.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   364
	    i := Image fromFile:nm resolution:100.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   365
	    i isNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   366
		i := Image fromFile:('bitmaps/' , nm) resolution:100.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   367
	    ]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   368
	].
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   369
	i notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   370
	    DefaultIcon := i := i on:Display
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   371
	]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   372
    ].
1612
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   373
    ^ i
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   374
1612
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   375
    "Modified: 18.4.1997 / 15:17:22 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   376
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   377
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   378
defaultLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   379
    "return the default label for views of my kind.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   380
     This can be redefined in subclasses or overwritten in
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   381
     initialize methods."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   382
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   383
    ^ 'aView'
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   384
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   385
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   386
includeHostNameInLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   387
    "return the flag which controls if a views label should
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   388
     include the hostname.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   389
     This flag is usually set/cleared in your private.rc file;
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   390
     the default is false."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   391
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   392
    ^ IncludeHostNameInLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   393
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   394
    "Created: 10.9.1995 / 19:21:16 / claus"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   395
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   396
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   397
includeHostNameInLabel:aBoolean
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   398
    "set/clear the flag which controls if a views label should
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   399
     include the hostname - this is highly useful if you have 
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   400
     multiple smalltalks open simultaneously ...
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   401
     This flag is usually set/cleared in your private.rc file;
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   402
     the default is false."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   403
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   404
    IncludeHostNameInLabel := aBoolean
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   405
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   406
    "Modified: 24.4.1996 / 09:09:21 / cg"
1260
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   407
!
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   408
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   409
takeFocusWhenMapped
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   410
    ^ TakeFocusWhenMapped 
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   411
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   412
    "
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   413
     StandardSystemView takeFocusWhenMapped
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   414
    "
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   415
!
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   416
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   417
takeFocusWhenMapped:aBoolean
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   418
    "if turned on, topViews will grab the keyboard when mapped.
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   419
     This is useful on systems like openView, where a view needs a click
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   420
     otherwise"
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   421
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   422
    TakeFocusWhenMapped := aBoolean
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   423
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   424
    "
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   425
     StandardSystemView takeFocusWhenMapped:true
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   426
    "
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   427
!
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   428
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   429
updateStyleCache
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   430
    "extract values from the styleSheet and cache them in class variables"
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   431
1931
27aa9e5b15dd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1915
diff changeset
   432
    <resource: #style (#'standardSystemView.defaultExtent')>
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   433
1931
27aa9e5b15dd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1915
diff changeset
   434
    DefaultExtent := StyleSheet at:'standardSystemView.defaultExtent' default:nil.
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   435
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   436
    "
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   437
     self updateStyleCache
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   438
    "
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   439
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   440
    "Modified: 31.8.1995 / 03:01:14 / claus"
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   441
    "Created: 15.8.1997 / 01:34:37 / cg"
1931
27aa9e5b15dd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1915
diff changeset
   442
    "Modified: 20.10.1997 / 15:13:50 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   443
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   444
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   445
!StandardSystemView class methodsFor:'startup'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   446
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   447
open
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   448
    "create, realize the view - this topview and all its subviews will
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   449
     run as a separate process with its own windowGroup"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   450
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   451
    ^ self new open 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   452
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   453
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   454
start
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   455
    "create, realize the view - this topview and all its subviews will
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   456
     run as a separate process with its own windowGroup.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   457
     This method exists for backward compatibility - use open."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   458
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   459
    ^ self open
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   460
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   461
1939
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   462
!StandardSystemView methodsFor:'ST-80 compatibility'!
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   463
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   464
menuBar
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   465
    "return my menuBar or nil if I have none.
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   466
     This is only valid for topViews which were built with the UIBuilder."
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   467
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   468
    ^ application builder menuBar
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   469
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   470
    "Created: / 27.10.1997 / 16:23:13 / cg"
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   471
!
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   472
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   473
quit
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   474
    "same as closeRequest (but sometimes send via the sensors event queue)"
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   475
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   476
    self closeRequest
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   477
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   478
    "Created: / 30.10.1997 / 19:23:01 / cg"
1939
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   479
! !
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   480
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   481
!StandardSystemView methodsFor:'accessing'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   482
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   483
application
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   484
    "return the topViews application.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   485
     This is new protocol for ST-80 compatibility and not yet fully supported"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   486
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   487
    ^ application
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   488
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   489
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   490
application:anApplicationModel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   491
    "set the topViews application.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   492
     This is new protocol for ST-80 compatibility and not yet fully supported"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   493
570
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   494
    application := anApplicationModel.
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   495
    anApplicationModel notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   496
	anApplicationModel window isNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   497
	    anApplicationModel window:self
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   498
	]
570
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   499
    ]
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   500
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   501
    "Modified: 18.4.1996 / 14:55:44 / cg"
2165
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   502
!
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   503
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   504
keyboardProcessor
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   505
    "return my keyboard processor"
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   506
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   507
    ^ nil
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
   508
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   509
! !
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   510
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   511
!StandardSystemView methodsFor:'accessing-behavior'!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   512
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   513
bePartner
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   514
    "define me as a partner-View.
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   515
     All partners within the applications windowGroup iconify/deiconify together."
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   516
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   517
    self setWindowGroupFromApplication.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   518
    super bePartner.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   519
298
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   520
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   521
     see example in TopView>>bePartner
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   522
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   523
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   524
    "Created: 22.9.1995 / 17:40:15 / claus"
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   525
    "Modified: 6.3.1996 / 16:16:42 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   526
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   527
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   528
beSlave
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   529
    "define me as a slave-View.
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   530
     All slaves within the applications windowGroup iconify/deiconify with the masterView(s)"
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   531
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   532
    self setWindowGroupFromApplication.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   533
    super beSlave.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   534
298
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   535
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   536
     see example in TopView>>beSlave
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   537
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   538
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   539
    "Created: 22.9.1995 / 17:40:15 / claus"
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   540
    "Modified: 6.3.1996 / 16:16:50 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   541
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   542
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   543
sendWindowEvents:collectionOfEventSymbols
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   544
    "define the events that are to be forwarded to the application.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   545
     This is being implemented ..."
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   546
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   547
    windowEventsForApplication := collectionOfEventSymbols
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   548
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   549
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   550
sizeFixed:aBoolean
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   551
    "this prevents the view from resizing itself when realized.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   552
     For normal topViews, this is void, since they dont do this anyway.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   553
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   554
     However, modalBoxes (especially: DialogBoxes) typically resize themselfes 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   555
     to the preferredExtent of their components. In some cases, this behavior is 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   556
     not desired and it should be turned off by setting sizeFixed to true.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   557
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   558
     To avoid confusion:
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   559
	This does NOT prevent the window manager from resizing the view, 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   560
	instead it tells the view to NOT resize ITSELF."
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   561
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   562
    sizeFixed := aBoolean.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   563
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   564
    "example: dialog which resizes itself on #open: 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   565
	      (thereby ignoring the 200@200 extent)
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   566
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   567
	|dialog|
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   568
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   569
	dialog := Dialog new.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   570
	dialog addInputFieldOn:'' asValue.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   571
	dialog addOkButton.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   572
	dialog extent:200@200.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   573
	dialog open.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   574
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   575
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   576
    using sizeFixed:
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   577
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   578
	|dialog|
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   579
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   580
	dialog := Dialog new.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   581
	dialog addInputFieldOn:'' asValue.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   582
	dialog addOkButton.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   583
	dialog extent:200@200; sizeFixed:true.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   584
	dialog open.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   585
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   586
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   587
    using openWithExtent (also sets sizeFixed):
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   588
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   589
	|dialog|
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   590
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   591
	dialog := Dialog new.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   592
	dialog addInputFieldOn:'' asValue.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   593
	dialog addOkButton.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   594
	dialog openWithExtent:200@200.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   595
    "
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   596
! !
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   597
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   598
!StandardSystemView methodsFor:'accessing-dimensions'!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   599
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   600
maxExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   601
    "return the views maximum allowed extent"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   602
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   603
    ^ maxExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   604
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   605
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   606
maxExtent:max
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   607
    "define the maximum extent the view may have -
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   608
     depends on good-will of window manager"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   609
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   610
    maxExtent := max.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   611
    (width notNil and:[height notNil]) ifTrue:[
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   612
	((width > (maxExtent x)) or:
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   613
	 [height > (maxExtent y)]) ifTrue: [
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   614
	    self extent:maxExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   615
	]
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   616
    ]
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   617
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   618
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   619
maximumSize:anExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   620
    "same as maxExtent: for ST-80 compatibility"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   621
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   622
    ^ self maxExtent:anExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   623
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   624
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   625
minExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   626
    "return the views minimum allowed extent"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   627
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   628
    ^ minExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   629
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   630
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   631
minExtent:min
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   632
    "define the minimum extent the view may have -
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   633
     depends on good-will of window manager"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   634
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   635
    minExtent := min.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   636
    (width notNil and:[height notNil]) ifTrue:[
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   637
	((width < (minExtent x)) or:
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   638
	 [height < (minExtent y)]) ifTrue: [
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   639
	    self extent:minExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   640
	]
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   641
    ]
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   642
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   643
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   644
minimumSize
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   645
    "same as minExtent for ST-80 compatibility"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   646
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   647
    ^ self minExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   648
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   649
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   650
minimumSize:anExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   651
    "same as minExtent: for ST-80 compatibility"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   652
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   653
    ^ self minExtent:anExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   654
! !
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
!StandardSystemView methodsFor:'accessing-look'!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   657
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   658
icon
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   659
    "return the form defined as icon"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   660
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   661
    ^ icon
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   662
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   663
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   664
icon:aFormOrImage
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   665
    "define the form or image (bitmap) used as icon"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   666
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   667
    |i m|
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   668
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   669
    icon := aFormOrImage.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   670
    icon notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   671
	drawableId notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   672
	    i := self convertedIcon:icon.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   673
	    (i notNil and:[i id notNil]) ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   674
		(m := icon mask) notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   675
		    m := self convertedIconMask:m.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   676
		].
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   677
		device setWindowIcon:i mask:m in:drawableId
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   678
	    ]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   679
	]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   680
    ]
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   681
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   682
    "Modified: 4.4.1997 / 16:20:52 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   683
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   684
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   685
iconLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   686
    "return the name displayed in the icon"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   687
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   688
    ^ iconLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   689
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   690
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   691
iconLabel:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   692
    "define the name to be displayed in the icon"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   693
2099
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   694
    |newLabel|
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   695
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   696
    (newLabel := aString string) ~= iconLabel ifTrue:[
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   697
        iconLabel := newLabel.
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   698
        drawableId notNil ifTrue:[
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   699
            device setIconName:newLabel in:drawableId.
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   700
            "
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   701
             unbuffered - to make it visible right NOW
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   702
            "
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   703
            device flush.
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   704
        ]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   705
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   706
!
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   707
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   708
iconMask
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   709
    "return the form defined as iconMask.
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   710
     Notice, that many windowManagers ignore this mask
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   711
     (usually, only managers which place icons on the background desktop
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   712
      care for an icon - if at all ...)"
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   713
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   714
    |mask|
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   715
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   716
    "/ only images possibly have iconMasks
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   717
    icon notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   718
	(mask := icon mask) notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   719
	    ^ self convertedIconMask:mask
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   720
	]
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   721
    ].
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   722
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   723
    ^ nil
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   724
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   725
    "Modified: 4.4.1997 / 16:39:00 / cg"
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   726
!
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   727
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   728
iconName:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   729
    "this method will vanish soon ... - for backward compatibility"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   730
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   731
    self iconLabel:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   732
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   733
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   734
iconView
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   735
    "return the view used as icon-view"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   736
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   737
    ^ iconView
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   738
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   739
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   740
iconView:aView
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   741
    "specify the view to be used as icon.
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   742
     This may not be supported on all display types"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   743
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   744
    iconView := aView.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   745
    drawableId notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   746
	aView create.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   747
	device setWindowIconWindow:aView in:drawableId.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   748
	aView setRealized:true.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   749
    ]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   750
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   751
    "Modified: 4.4.1997 / 16:21:37 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   752
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   753
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   754
label
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   755
    "return the views name in the title area"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   756
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   757
    ^ label
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   758
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   759
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   760
label:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   761
    "define the views name in the windows title area.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   762
     If IncludeHostNameInLabel is true, prepend the hostname
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   763
     (you will appreciate this, if you are working on multiple
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   764
      machines simultaneously - as I do ...)"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   765
2099
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   766
    |newLabel|
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   767
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   768
    (newLabel := aString string) ~= label ifTrue:[
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   769
        label := newLabel.
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   770
        drawableId notNil ifTrue: [
2099
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   771
            device setWindowName:(self windowLabelFor:newLabel) in:drawableId.
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   772
            "
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   773
             unbuffered - to make it visible right NOW
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   774
            "
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   775
            device flush.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   776
        ]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   777
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   778
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   779
    "Created: 8.9.1995 / 19:37:06 / claus"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   780
    "Modified: 8.9.1995 / 19:39:18 / claus"
1915
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
   781
    "Modified: 22.9.1997 / 10:12:23 / cg"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   782
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   783
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   784
label:labelString iconLabel:iconLabelString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   785
    "set both the label and the iconLabel"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   786
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   787
    self label:labelString.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   788
    self iconLabel:iconLabelString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   789
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   790
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   791
!StandardSystemView methodsFor:'destroying'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   792
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   793
closeRequest 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   794
    "programmatic close request"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   795
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   796
    ^ self terminate
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   797
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   798
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   799
destroy
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   800
    "destroy the view."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   801
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   802
    self removeFromCurrentProject.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   803
    windowGroup notNil ifTrue:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   804
	windowGroup focusSequence:nil.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   805
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   806
    application notNil ifTrue:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   807
	application windowEvent:(#close -> self) from:self
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   808
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   809
    super destroy.
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   810
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   811
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   812
saveAndTerminate
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   813
    "save & terminate request from the windowManager. The application should 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   814
     save its data/files/text etc. somehow and close.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   815
     If there is an application, let it decide how do do that.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   816
     Otherwise, forward it to superclasses which knows how to do this.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   817
     (it defaults to a terminate there).
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   818
     Notice, that not all windowmanagers are nice enough
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   819
     to send this request; some simply distroy the view."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   820
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   821
    application notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   822
	application saveAndTerminateRequestFor:self
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   823
    ] ifFalse:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   824
	super saveAndTerminate
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   825
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   826
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   827
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   828
terminate
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   829
    "terminate request from the windowManager. If there is an application,
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   830
     let it decide if it really wants to be close. Otherwise, forward it to
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   831
     superclasses terminate which knows how to do this.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   832
     Notice, that not all windowmanagers are nice enough
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   833
     to send this request; some simply distroy the view."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   834
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   835
    application notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   836
	application closeRequestFor:self
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   837
    ] ifFalse:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   838
	super terminate
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   839
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   840
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   841
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   842
!StandardSystemView methodsFor:'event handling'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   843
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   844
focusIn
385
15fd1c806d2a pass info if focus change was explicit (i.e. Tab-key) or by window manager.
Claus Gittinger <cg@exept.de>
parents: 328
diff changeset
   845
    "the view got the keyboard focus (via the window manager)"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   846
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   847
    |v|
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   848
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   849
    windowGroup notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   850
	(v := windowGroup focusView) notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   851
	    v showFocus:false.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   852
	    ^ self
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   853
	]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   854
    ].
1382
26b34ba5e742 focusIn/out
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
   855
    super focusIn
655
2a518e85793a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
   856
1382
26b34ba5e742 focusIn/out
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
   857
    "Modified: 25.2.1997 / 23:19:46 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   858
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   859
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   860
focusOut
385
15fd1c806d2a pass info if focus change was explicit (i.e. Tab-key) or by window manager.
Claus Gittinger <cg@exept.de>
parents: 328
diff changeset
   861
    "the view lost keyboard focus (via the window manager)"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   862
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   863
    |v|
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   864
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   865
    windowGroup notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   866
	(v := windowGroup focusView) notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   867
	    v showNoFocus:false.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   868
	    ^ self
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   869
	]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   870
    ].
1382
26b34ba5e742 focusIn/out
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
   871
    super focusOut
655
2a518e85793a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
   872
1382
26b34ba5e742 focusIn/out
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
   873
    "Modified: 25.2.1997 / 23:19:54 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   874
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   875
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   876
mapped
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   877
    "the view got mapped"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   878
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   879
    super mapped.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   880
    "
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   881
     ask for the focus - this avoids having to click on the
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   882
     view with WM's which need an explicit click.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   883
     Q: is this a good idea ?
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   884
    "
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   885
    TakeFocusWhenMapped == true ifTrue:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   886
	self getKeyboardFocus.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   887
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   888
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   889
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
   890
showActivity:someMessage
597
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   891
    "some activityNotification shalt be communicated to
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   892
     the user. Forward it to my application (if any).
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   893
     (that one should know how to deal with it).
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   894
     Otherwise, simply ignore it."
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   895
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
   896
    application notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   897
	application showActivity:someMessage
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
   898
    ]
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
   899
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
   900
    "Created: 16.12.1995 / 18:40:44 / cg"
597
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   901
    "Modified: 23.4.1996 / 21:38:11 / cg"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   902
! !
48194c26a46c Initial revision
claus
parents:
diff changeset
   903
48194c26a46c Initial revision
claus
parents:
diff changeset
   904
!StandardSystemView methodsFor:'initialization'!
48194c26a46c Initial revision
claus
parents:
diff changeset
   905
48194c26a46c Initial revision
claus
parents:
diff changeset
   906
addToCurrentProject
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   907
    "add the receiver (a topview) to the current projects set-of-views.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   908
     (If there is a current project)"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   909
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   910
    |p|
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
   911
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
   912
    "
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   913
     the following check allows systems
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   914
     without projects and changeSets
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
   915
    "
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   916
    (Project notNil and:[(p := Project current) notNil]) ifTrue:[
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   917
	p addView: self
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
   918
    ]
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
   919
!
12
9f0995fac1fa *** empty log message ***
claus
parents: 6
diff changeset
   920
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   921
defaultControllerClass
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   922
    "for ST-80 compatibility only - not used in ST/X"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   923
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   924
    ^ nil "/ StandardSystemController
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   925
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   926
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   927
initEvents
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   928
    super initEvents.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   929
    self enableFocusEvents.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   930
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   931
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   932
initialize
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   933
    super initialize.
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
   934
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   935
    borderWidth := 2.         "- notice: many window managers ignore this"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   936
    minExtent := 10 @ 10.
1703
b77cc326916d take usableExtent as max.
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
   937
    maxExtent := device usableExtent.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   938
    label isNil ifTrue:[label := self class defaultLabel].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   939
    icon isNil ifTrue:[icon := self class defaultIcon].
857
df5125310d86 New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   940
df5125310d86 New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   941
    "Modified: 14.6.1996 / 17:18:28 / stefan"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   942
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   943
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   944
reAdjustGeometry
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   945
    "sent as a final step when an image is restarted.
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   946
     when we come up on a smaller display, 
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   947
     make certain, that the receiver is visible"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   948
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   949
    |dX dY limitRight limitBottom|
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   950
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   951
    dX := (device horizontalPixelPerMillimeter * 20) rounded.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   952
    dY := (device verticalPixelPerMillimeter * 20) rounded.
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
   953
1703
b77cc326916d take usableExtent as max.
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
   954
    limitRight := device usableWidth - dX.
b77cc326916d take usableExtent as max.
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
   955
    limitBottom := device usableHeight - dY.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   956
    ((self left > limitRight) or:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   957
      self top > limitBottom]) ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   958
	'StandardSystemView [info]: moving view into visible area' infoPrintCR.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   959
	self origin:limitRight @ limitBottom
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   960
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   961
1163
7b416e1ea819 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
   962
    "Modified: 10.1.1997 / 15:12:19 / cg"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   963
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   964
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   965
reinitialize
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   966
    "reopen the receiver if if was visible before.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   967
     This is called right after snapIn; Notice, that all instance variables
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   968
     (such as shown, realized etc.) are left-overs from the time the snapout
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   969
     was done. Remap the receiver, if it was mapped at snapout time"
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   970
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   971
    |myController|
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   972
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   973
    "if I have already been reinited - return"
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   974
    drawableId notNil ifTrue:[
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   975
	^ self
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   976
    ].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   977
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   978
    "have to kludge with the controller 
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   979
     - otherwise its startup performs unwanted actions ..."
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   980
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   981
    myController := controller.
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   982
    controller := nil.
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   983
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   984
    "physically create the view & subviews"
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   985
    self recreate.
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   986
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   987
    "if I was mapped, do it again"
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   988
    realized ifTrue:[
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   989
	"if it was iconified, try to remap iconified"
2103
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
   990
	device 
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
   991
	    mapView:self id:drawableId iconified:(shown not) 
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
   992
	    atX:left y:top width:width height:height
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
   993
	    minExtent:minExtent maxExtent:maxExtent.
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   994
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   995
	"and restart the window-group process"
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   996
	windowGroup notNil ifTrue:[
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   997
	    windowGroup restart
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   998
	]
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
   999
    ].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1000
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1001
    "restore controller"
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1002
    controller := myController
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1003
!
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1004
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1005
removeFromCurrentProject
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1006
    "remove the receiver (a topview) from the current projects set-of-views.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1007
     (If there is a current project)"
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1008
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1009
    |p|
12
9f0995fac1fa *** empty log message ***
claus
parents: 6
diff changeset
  1010
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1011
    "
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1012
     the following check allows systems
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1013
     without projects and changeSets
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1014
    "
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1015
    (Project notNil and:[(p := Project current) notNil]) ifTrue:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1016
	p removeView:self
89
ea2bf46eb669 *** empty log message ***
claus
parents: 82
diff changeset
  1017
    ]
ea2bf46eb669 *** empty log message ***
claus
parents: 82
diff changeset
  1018
!
ea2bf46eb669 *** empty log message ***
claus
parents: 82
diff changeset
  1019
140
claus
parents: 135
diff changeset
  1020
restarted
claus
parents: 135
diff changeset
  1021
    "sent by my windowGroup, when restarted from an image.
claus
parents: 135
diff changeset
  1022
     Nothing done here, but can be redefined to perform any actions
claus
parents: 135
diff changeset
  1023
     required to reset the application after an image-restart.
claus
parents: 135
diff changeset
  1024
     (for example: check if application files are still around, restart
claus
parents: 135
diff changeset
  1025
     subprocesses etc.)."
claus
parents: 135
diff changeset
  1026
claus
parents: 135
diff changeset
  1027
    application notNil ifTrue:[
claus
parents: 135
diff changeset
  1028
	application restarted
claus
parents: 135
diff changeset
  1029
    ].
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1030
! !
48194c26a46c Initial revision
claus
parents:
diff changeset
  1031
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1032
!StandardSystemView methodsFor:'printing & storing'!
142
claus
parents: 141
diff changeset
  1033
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1034
displayString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1035
    "just for your convenience in inspectors ...
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1036
     ... add the views label to the displayString."
142
claus
parents: 141
diff changeset
  1037
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1038
    |s|
142
claus
parents: 141
diff changeset
  1039
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1040
    s := super displayString.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1041
    label notNil ifTrue:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1042
	s := s , '(' , label , ')'
157
claus
parents: 153
diff changeset
  1043
    ].
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1044
    ^ s
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1045
! !
48194c26a46c Initial revision
claus
parents:
diff changeset
  1046
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1047
!StandardSystemView methodsFor:'private'!
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1048
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1049
convertedIcon
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1050
    "make certain, that the icon is compatible with my device;
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1051
     this means converting it to a format (typically: monochrome) which
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1052
     the device supports. Return a compatible version of the icon."
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1053
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1054
    ^ self convertedIcon:icon
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1055
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1056
    "Modified: 10.6.1996 / 19:42:20 / cg"
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1057
!
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1058
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1059
convertedIcon:icon
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1060
    "make certain, that the image argument is compatible with my device;
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1061
     this means converting it to a format (typically: monochrome) which
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1062
     the device supports. Return a compatible version of the icon."
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1063
825
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1064
    |deviceIcon d toMono toDeep|
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1065
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1066
    icon isNil ifTrue:[^ nil].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1067
825
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1068
    toMono := toDeep := false.
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1069
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1070
    d := icon depth.
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1071
    device supportsDeepIcons ifFalse:[
1755
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1072
        (d ~~ 1 or:[icon isImage]) ifTrue:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1073
            "
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1074
             dither to monochrome
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1075
            "
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1076
            toMono := true.
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1077
        ]
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1078
    ] ifTrue:[
1755
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1079
        d == 1 ifTrue:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1080
            icon colorMap notNil ifTrue:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1081
                icon isImage ifFalse:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1082
                    toMono := true.
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1083
                ] ifTrue:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1084
                    toDeep := true.
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1085
                ]
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1086
            ]
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1087
        ] ifFalse:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1088
            d ~~ device depth ifTrue:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1089
                icon isImage ifFalse:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1090
                    toMono := true.
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1091
                ] ifTrue:[
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1092
                    toDeep := true.
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1093
                ]
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1094
            ]
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1095
        ]
825
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1096
    ].
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1097
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1098
    deviceIcon := icon.
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1099
    toMono ifTrue:[
1755
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1100
        deviceIcon := icon asMonochromeFormOn:device.
825
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1101
    ].
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1102
    toDeep ifTrue:[
1755
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1103
        deviceIcon := (Image implementorForDepth:device depth)
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1104
                        fromImage:icon.
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1105
    ].
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1106
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1107
    deviceIcon notNil ifTrue:[
1755
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1108
        "
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1109
         get device pixmap (i.e. allocate colors & resource)
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1110
        "
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1111
        deviceIcon := deviceIcon onDevice:device
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1112
    ].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1113
    ^ deviceIcon
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1114
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1115
    "Created: 10.6.1996 / 19:41:31 / cg"
1755
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1116
    "Modified: 17.6.1997 / 11:46:44 / cg"
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1117
!
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1118
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1119
convertedIconMask:aMask
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1120
    "return a version of the argument which can be used as an iconMask
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1121
     on my device. Typically, this means conversion to a monochrome
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1122
     mask - future versions may add alpha channel masks, if the device supports
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1123
     them ..."
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1124
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1125
    aMask depth ~~ 1 ifTrue:[
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1126
	^ aMask asMonochromeFormOn
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1127
    ].
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1128
    ^ aMask
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1129
!
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1130
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1131
setWindowGroupFromApplication
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1132
    "get the applications topView and set my windowGroup to its wg."
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1133
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1134
    |win|
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1135
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1136
    windowGroup isNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1137
	application notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1138
	    (win := application window) notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1139
		windowGroup := win windowGroup.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1140
	    ]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1141
	]
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1142
    ].
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1143
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1144
    "Created: 22.9.1995 / 17:40:36 / claus"
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1145
    "Modified: 6.3.1996 / 16:17:32 / cg"
1915
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1146
!
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1147
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1148
windowLabelFor:labelString
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1149
    "return an expanded labelString, according to the hostName-in-window setting"
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1150
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1151
    (IncludeHostNameInLabel == true
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1152
    and:[WindowLabelFormat notNil]) ifTrue:[
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1153
        ^ WindowLabelFormat bindWith:labelString with:(OperatingSystem getHostName)
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1154
    ].
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1155
    ^ labelString
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1156
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1157
    "Created: 22.9.1997 / 10:10:32 / cg"
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1158
! !
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1159
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1160
!StandardSystemView methodsFor:'queries'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1161
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1162
focusSequence
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1163
    "return a sequence which defines the order in which the focus
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1164
     is passed for FocusNext and FocusPrevious keys.
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1165
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1166
     All views which like to support these keys should either redefine
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1167
     this method and return a collection of (sub-) views.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1168
     Or, if the model is some applicationModel, it may itself define
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1169
     the focusSequence.
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1170
     Or, somehow let me (via focusSequence:) know about the order.
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1171
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1172
     Notice: I dont think this is good style: the focusSequence seems
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1173
     to belong into the controller or the builder ..."
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1174
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1175
    "/
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1176
    "/ if I have an application, its supposed to
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1177
    "/ know about the focusSequence
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1178
    "/
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1179
    application notNil ifTrue:[
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1180
        ^ application focusSequence
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1181
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1182
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1183
    "/ is that really a good idea ?
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1184
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1185
    (model notNil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1186
    and:[(model respondsTo:#focusSequence)
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1187
    and:[model ~~ self]]) ifTrue:[
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1188
        ^ model focusSequence
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1189
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1190
    ^ nil
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1191
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1192
    "Modified: / 31.10.1997 / 19:14:02 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1193
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1194
298
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
  1195
isModal
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1196
    "return true, if the receiver has been opened modal"
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1197
298
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
  1198
    windowGroup isNil ifTrue:[^ false].
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
  1199
    ^ windowGroup isModal
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
  1200
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
  1201
    "Created: 10.12.1995 / 13:11:17 / cg"
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1202
    "Modified: 24.4.1996 / 09:46:31 / cg"
298
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
  1203
!
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
  1204
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1205
processName
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1206
    "return a string to be shown for my process in the
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1207
     process monitor. This has no semantic meaning, but exists
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1208
     for your convenience only."
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1209
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1210
    application notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1211
	^ application processName
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1212
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1213
    label notNil ifTrue:[^ label].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1214
    ^ super processName
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1215
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1216
    "Modified: 24.4.1996 / 09:47:01 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1217
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1218
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1219
!StandardSystemView methodsFor:'realization'!
48194c26a46c Initial revision
claus
parents:
diff changeset
  1220
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1221
collapse
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1222
    "iconify the receiver"
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1223
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1224
    shown ifTrue:[
1820
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1225
        self unmap.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1226
1820
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1227
        "if it was iconified, try to remap iconified"
2103
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1228
        device
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1229
	    mapView:self id:drawableId iconified:true 
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1230
            atX:left y:top width:width height:height
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1231
	    minExtent:minExtent maxExtent:maxExtent.
1820
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1232
        shown := false.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1233
    ].
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1234
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1235
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1236
     |top|
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1237
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1238
     top := StandardSystemView new.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1239
     top label:'hello'.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1240
     top openAndWait.
1820
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1241
     Delay waitForSeconds:2.
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1242
     top collapse.
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1243
     Delay waitForSeconds:2.
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1244
     top expand.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1245
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1246
1820
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1247
    "Modified: 24.7.1997 / 12:32:17 / cg"
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1248
!
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1249
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1250
create
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1251
    "create - make certain that icon is available"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1252
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1253
    super create.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1254
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1255
    iconView notNil ifTrue:[
2099
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
  1256
        iconView create.
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
  1257
        device setWindowIconWindow:iconView in:drawableId.
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
  1258
        iconView setRealized:true.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1259
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1260
    iconLabel notNil ifTrue:[
2099
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
  1261
        device setIconName:iconLabel string in:drawableId
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1262
    ]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1263
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1264
    "Modified: 10.6.1996 / 20:14:50 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1265
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1266
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1267
expand
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1268
    "de-iconify the receiver at its old position"
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1269
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1270
    shown ifFalse:[
2066
af1b43e278d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2038
diff changeset
  1271
        self unmap.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1272
2038
ef772cbd32d2 expand - fix
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
  1273
        "if it was iconified, try to remap iconified"
2103
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1274
        device
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1275
	    mapView:self id:drawableId iconified:false 
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1276
            atX:left y:top width:width height:height
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1277
	    minExtent:minExtent maxExtent:maxExtent.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1278
    ].
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1279
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1280
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1281
     |top|
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1282
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1283
     top := StandardSystemView new.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1284
     top label:'hello'.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1285
     top openAndWait.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1286
     top collapse.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1287
     Delay waitForSeconds:5.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1288
     top expand.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1289
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1290
2038
ef772cbd32d2 expand - fix
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
  1291
    "Modified: / 3.2.1998 / 16:02:56 / cg"
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1292
!
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1293
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1294
physicalCreate
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1295
    "common code for create & recreate"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1296
1915
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1297
    |l icn icnMask org listener ret|
183
claus
parents: 181
diff changeset
  1298
1915
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1299
    l := self windowLabelFor:label.
183
claus
parents: 181
diff changeset
  1300
1560
654a2dd70db7 care for nil icon
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  1301
    icon notNil ifTrue:[
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1302
        icn := self convertedIcon:icon.
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1303
        (icnMask := icon mask) notNil ifTrue:[
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1304
            icnMask := self convertedIconMask:icnMask
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1305
        ]
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1306
    ].
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1307
1724
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1308
    org := left @ top.
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1309
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1310
    "/ if there is a global eventListener,
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1311
    "/ give it a chance to intercept windowCreation
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1312
    "/ and provide another origin.
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1313
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1314
    (listener := WindowSensor eventListener) notNil ifTrue:[
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1315
        ret := listener preCreateView:self origin:org.
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1316
        ret isPoint ifTrue:[
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1317
            org := ret
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1318
        ]
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
  1319
    ].
1724
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1320
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1321
    drawableId := device 
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1322
                      createWindowFor:self 
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1323
                      type:nil
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1324
                      origin:org
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1325
                      extent:(width @ height)
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1326
                      minExtent:minExtent
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1327
                      maxExtent:maxExtent
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1328
                      borderWidth:borderWidth
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1329
                      subViewOf:nil 
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1330
                      style:(self windowStyle)
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1331
                      inputOnly:(self isInputOnly)
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1332
                      label:l
1960
aa9ef6e21f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1944
diff changeset
  1333
                      owner:nil
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1334
                      icon:icn iconMask:icnMask
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1335
                      iconView:iconView.
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1336
641
f265a4c4785f Must register drawableId in Lobby when physicalCreate'ing a window.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  1337
    Lobby registerChange:self.
1724
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1338
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1339
    "/ if there is a global eventListener,
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1340
    "/ give it a chance to track views
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1341
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1342
    listener notNil ifTrue:[
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1343
         listener postCreateView:self.
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1344
    ].
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1345
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1346
    extentChanged := false.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1347
    originChanged := false.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1348
1202
deaeebf2a9b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1163
diff changeset
  1349
    (borderColor notNil and:[borderColor ~= Black]) ifTrue:[
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1350
        self setBorderColor
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1351
    ].
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1352
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1353
"/  (viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1354
"/        device setWindowGravity:viewGravity in:drawableId
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1355
"/  ].
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1356
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1357
"/  (bitGravity notNil "and:[bitGravity ~~ #NorthWest]") ifTrue:[
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1358
"/      device setBitGravity:bitGravity in:drawableId
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1359
"/  ].
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1360
1904
8ec8d16e241c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1361
    viewShape notNil ifTrue:[
8ec8d16e241c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1362
        self setViewShape
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1363
    ].
1904
8ec8d16e241c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1364
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1365
    (backed notNil and:[backed ~~ false]) ifTrue:[
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1366
        device setBackingStore:backed in:drawableId
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1367
    ].
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1368
    saveUnder ifTrue:[
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1369
        device setSaveUnder:true in:drawableId
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1370
    ].
1960
aa9ef6e21f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1944
diff changeset
  1371
    cursor notNil ifTrue:[
aa9ef6e21f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1944
diff changeset
  1372
	self setCursor
aa9ef6e21f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1944
diff changeset
  1373
    ].
857
df5125310d86 New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
  1374
    device setWindowClass:('Stx', self className) name:name in:drawableId.
641
f265a4c4785f Must register drawableId in Lobby when physicalCreate'ing a window.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  1375
857
df5125310d86 New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
  1376
    "Modified: 14.6.1996 / 17:14:25 / stefan"
1915
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1377
    "Modified: 22.9.1997 / 10:11:16 / cg"
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1378
!
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1379
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1380
postRealize
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1381
    "postRealize actions - tell the application (if any)."
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1382
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1383
    "/
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1384
    "/ let the application add its views to the current project
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1385
    "/
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1386
    application notNil ifTrue:[
2092
872df2e58124 #opened -> #opened:
ca
parents: 2066
diff changeset
  1387
        application opened:self.
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1388
    ] ifFalse:[
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1389
        self addToCurrentProject.
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1390
    ].
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1391
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1392
    "Created: 24.7.1997 / 18:11:26 / cg"
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1393
!
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1394
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1395
recreate
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1396
    "recreate the view after a snap-in"
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1397
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
  1398
    |i m|
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
  1399
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1400
    super recreate.
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1401
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1402
    iconView notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1403
	iconView recreate.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1404
	device setWindowIconWindow:iconView in:drawableId.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1405
	iconView setRealized:true.
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1406
    ] ifFalse:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1407
	icon notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1408
	    i := self convertedIcon:icon.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1409
	    (i notNil and:[i id notNil]) ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1410
		(m := icon mask) notNil ifTrue:[
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1411
		    m := self convertedIconMask:m.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1412
		].
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1413
		device setWindowIcon:i mask:m in:drawableId
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1414
	    ]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1415
	].
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1416
    ].
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1417
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1418
    iconLabel notNil ifTrue:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1419
	device setIconName:iconLabel in:drawableId
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1420
    ]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1421
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
  1422
    "Modified: 4.4.1997 / 16:16:40 / cg"
141
claus
parents: 140
diff changeset
  1423
! !
claus
parents: 140
diff changeset
  1424
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1425
!StandardSystemView class methodsFor:'documentation'!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1426
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1427
version
2165
a2af9e8d568a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2131
diff changeset
  1428
    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.99 1998-06-20 20:21:02 cg Exp $'
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1429
! !
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1430
StandardSystemView initialize!