StandardSystemView.st
author Claus Gittinger <cg@exept.de>
Tue, 26 Oct 2004 22:25:50 +0200
changeset 4327 307fc2ce50cc
parent 4322 238880c18923
child 4479 3984d0e74589
permissions -rw-r--r--
*** empty log message ***
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
3210
250f55f80683 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3152
diff changeset
    13
"{ Package: 'stx:libview' }"
250f55f80683 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3152
diff changeset
    14
135
claus
parents: 132
diff changeset
    15
TopView subclass:#StandardSystemView
1539
fcd8fc807c0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1538
diff changeset
    16
	instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
    17
		application windowEventsForApplication deviceIcon labelChannel'
2326
c47b2c8f51dc moved TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 2303
diff changeset
    18
	classVariableNames:'DefaultIcon IncludeHostNameInLabel DefaultExtent
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
    19
		WindowLabelFormat DefaultMinExtent'
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
    20
	poolDictionaries:''
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
    21
	category:'Views-Basic'
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    22
!
48194c26a46c Initial revision
claus
parents:
diff changeset
    23
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    24
!StandardSystemView class methodsFor:'documentation'!
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    25
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    26
copyright
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    27
"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    28
 COPYRIGHT (c) 1989 by Claus Gittinger
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
    29
	      All Rights Reserved
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    30
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    31
 This software is furnished under a license and may be used
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    32
 only in accordance with the terms of that license and with the
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    34
 be provided or otherwise made available to, or used by, any
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    35
 other person.  No title to or ownership of the software is
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    36
 hereby transferred.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    37
"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    38
!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
    39
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    40
documentation
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
    41
"
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    42
    I represent standard application topViews 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    43
    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
    44
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    45
    The name `StandardSystemView' is probably misleading and
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    46
    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
    47
    Think of it as an ApplicationWindow.
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    48
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
    49
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    50
    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
    51
    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
    52
    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
    53
    problems and inconveniences:
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    54
	- applications inherit a big number of methods through the
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    55
	  SimpleView->View->TopView->StandardSystemView hierarchy.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    56
	  There is quite a danger that by accident, some method gets
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    57
	  redefined which is required by one of those classes.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    58
	  (typical candidates are: terminate, destroy, open ...)
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    59
	  This may lead to strange effects, which may not be obvious to
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    60
	  non experts ...
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    61
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    62
	- applications with multiple topViews are difficult to implement
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    63
	  and manage.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    64
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    65
	- 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
    66
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    67
    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
    68
    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
    69
    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
    70
    if (if at all).
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    71
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    72
    [instance variables:]
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    73
	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
    74
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    75
	icon                    <Form>      the icon
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    76
					    [ignored if the display does not 
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    77
					     support icons]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    78
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    79
	iconView                <View>      an optional icon-view (for animated icons)
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    80
					    [ignored if the display does not
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    81
					     supports this]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
    82
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    83
	iconLabel               <String>    the label in the icon
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    84
					    [ignored if the display does not 
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    85
					     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
    86
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    87
	minExtent               <Point>     the minimum size
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    88
					    No limit, if nil
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    89
					    [the window manager may have its own
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    90
					     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
    91
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    92
	maxExtent               <Point>     the maximum size
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    93
					    No limit, if nil.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    94
					    [the window manager may have its own
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    95
					     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
    96
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    97
	sizeFixed               <Boolean>   prevents the view from resizing itself
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
    98
					    (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
    99
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   100
	application             <AppModel>  if nonNil, thats the application
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   101
					    Many requests (such as open/close etc.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   102
					    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
   103
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   104
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   105
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   106
     [class variables:]
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   107
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   108
	DefaultIcon             <Form>      cached default icon
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   109
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   110
	TakeFocusWhenMapped     <Boolean>   if true, views grab the keyboard
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   111
					    focus (convenient with some stupid
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   112
					    windowManagers)
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   113
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   114
	IncludeHostNameInLabel  <Boolean>   if true, the windows title shall
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   115
					    include the hostname.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   116
					    (convenient if you have many remote
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   117
					    views open simultaneously)
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   118
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   119
	WindowLabelFormat       <Boolean>   specifies the format for windowLabels
1880
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   120
616
56cf67c82664 documentation
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
   121
56cf67c82664 documentation
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
   122
    [author:]
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   123
	Claus Gittinger
616
56cf67c82664 documentation
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
   124
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   125
    [see also:]
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   126
	WindowGroup
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   127
	ApplicationModel
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   128
"
1880
2900f8770585 more flexible windowLabel formats.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
   129
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   130
!
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
examples
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   133
"
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   134
    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
   135
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   136
	|topView|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   137
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   138
	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
   139
	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
   140
	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
   141
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   142
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   143
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   144
    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
   145
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   146
	|topView|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   147
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   148
	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
   149
	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
   150
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   151
	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
   152
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   153
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   154
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   155
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   156
    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
   157
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   158
	|iconView topView|
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
	iconView := ClockView new.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   161
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   162
	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
   163
	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
   164
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   165
	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
   166
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   167
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   168
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   169
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   170
    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
   171
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   172
	|topView button|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   173
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   174
	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
   175
	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
   176
	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
   177
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   178
	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
   179
	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
   180
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   181
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   182
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   183
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   184
    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
   185
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   186
	|topView button|
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   187
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   188
	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
   189
	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
   190
	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
   191
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   192
	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
   193
	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
   194
	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
   195
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   196
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   197
									[exEnd]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   198
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   199
    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
   200
									[exBegin]
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   201
	|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
   202
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   203
	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
   204
	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
   205
	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
   206
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   207
	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
   208
	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
   209
	panel level:-1.
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   210
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   211
	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
   212
	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
   213
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   214
	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
   215
	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
   216
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   217
	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
   218
	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
   219
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   220
	topView open.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   221
									[exEnd]
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   222
"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   223
! !
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   224
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   225
!StandardSystemView class methodsFor:'instance creation'!
183
claus
parents: 181
diff changeset
   226
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   227
extent:anExtent label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   228
    "create a new topView and define its extent, label and icon"
180
claus
parents: 157
diff changeset
   229
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   230
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   231
	   label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   232
	   minExtent:nil maxExtent:nil
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   233
!
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   234
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   235
extent:anExtent label:aLabel icon:aForm minExtent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   236
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   237
	   label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   238
	   minExtent:minExtent maxExtent:nil
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   239
!
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
   240
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   241
extent:anExtent label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   242
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   243
	   label:aLabel icon:aForm
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   244
	   minExtent:minExtent maxExtent:maxExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   245
!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   246
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   247
extent:anExtent label:aLabel minExtent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   248
    "create a new topView and define its extent, label and minumum extent"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   249
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   250
    ^ self origin:nil extent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   251
	   label:aLabel icon:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   252
	   minExtent:minExtent maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   253
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   254
48194c26a46c Initial revision
claus
parents:
diff changeset
   255
label:aLabel
48194c26a46c Initial revision
claus
parents:
diff changeset
   256
    "create a new topView and define its label"
48194c26a46c Initial revision
claus
parents:
diff changeset
   257
48194c26a46c Initial revision
claus
parents:
diff changeset
   258
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   259
	   label:aLabel icon:nil
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   260
	   minExtent:nil maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   261
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   262
48194c26a46c Initial revision
claus
parents:
diff changeset
   263
label:aLabel icon:aForm
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   264
    "create a new topView and define its label and icon"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   265
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   266
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   267
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   268
	   minExtent:nil maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   269
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   270
48194c26a46c Initial revision
claus
parents:
diff changeset
   271
label:aLabel icon:aForm minExtent:anExtent
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   272
    "create a new topView and define its label, icon and minumum extent"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   273
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   274
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   275
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   276
	   minExtent:anExtent maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   277
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   278
48194c26a46c Initial revision
claus
parents:
diff changeset
   279
label:aLabel icon:aForm minExtent:minExtent maxExtent:maxExtent
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   280
    "create a new topView and define its label, icon, min and max extents"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   281
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   282
    ^ self origin:nil extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   283
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   284
	   minExtent:minExtent maxExtent:maxExtent
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   285
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   286
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   287
label:aLabel minExtent:anExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   288
    "create a new topView and define its label and minimum extent"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   289
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   290
    ^ self origin:nil extent:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   291
	   label:aLabel icon:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   292
	   minExtent:anExtent maxExtent:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   293
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   294
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   295
model:aModel label:aLabel minimumSize:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   296
    "ST80-style instance creation"
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|
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   299
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   300
    newView := self origin:nil 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   301
		    extent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   302
		     label:aLabel 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   303
		      icon:nil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   304
		 minExtent:minExtent
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   305
		 maxExtent:nil.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   306
    newView model:aModel.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   307
"/    newView controller:(self defaultControllerClass new view:newView).
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   308
    ^ newView
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   309
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   310
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   311
origin:anOrigin extent:anExtent label:aLabel
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   312
    "create a new topView and define its origin, extent and label"
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   313
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   314
    ^ self origin:anOrigin extent:anExtent
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   315
	   label:aLabel icon:nil
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   316
	   minExtent:nil maxExtent:nil
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   317
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   318
48194c26a46c Initial revision
claus
parents:
diff changeset
   319
origin:anOrigin label:aLabel icon:aForm
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   320
		minExtent:minExtent maxExtent:maxExtent
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   321
    "create a new topView and define its origin, extent, label, icon
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   322
     and extent-boundaries."
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   323
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   324
    ^ self origin:anOrigin extent:nil
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   325
	   label:aLabel icon:aForm
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
   326
	   minExtent:minExtent maxExtent:maxExtent
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   327
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   328
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   329
!StandardSystemView class methodsFor:'class initialization'!
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   330
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   331
initialize
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   332
    IncludeHostNameInLabel := false.
3463
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   333
    WindowLabelFormat := self defaultWindowLabelFormat.
2272
a355b3aaf38d make takeFocusWhenMapped standard on win32 platforms
Claus Gittinger <cg@exept.de>
parents: 2218
diff changeset
   334
2283
e8c1e3b6f04c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2282
diff changeset
   335
    TakeFocusWhenMapped := (Display notNil and:[Display platformName = 'WIN32']).
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   336
2272
a355b3aaf38d make takeFocusWhenMapped standard on win32 platforms
Claus Gittinger <cg@exept.de>
parents: 2218
diff changeset
   337
    "Created: / 20.8.1997 / 14:16:32 / cg"
a355b3aaf38d make takeFocusWhenMapped standard on win32 platforms
Claus Gittinger <cg@exept.de>
parents: 2218
diff changeset
   338
    "Modified: / 24.8.1998 / 17:16:33 / cg"
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   339
! !
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
   340
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   341
!StandardSystemView class methodsFor:'defaults'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   342
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   343
defaultExtent
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   344
    "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
   345
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   346
    DefaultExtent notNil ifTrue:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   347
	^ DefaultExtent
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   348
    ].
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   349
    ^ super defaultExtent
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   350
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   351
    "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
   352
!
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   353
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   354
defaultIcon
1612
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   355
    "return a topViews default window icon"
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   356
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   357
    <resource: #style (#ICON #ICON_FILE)>
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   358
3210
250f55f80683 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3152
diff changeset
   359
    |n nm i|
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   360
1612
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   361
    (i := DefaultIcon) isNil ifTrue:[
4327
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   362
        i := self classResources at:'ICON' default:nil.
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   363
        i isNil ifTrue:[
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   364
"/            OperatingSystem platformName == #win32 ifTrue:[
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   365
"/                n := 'stx_16x16.xpm'.
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   366
"/            ] ifFalse:[
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   367
"/                n := 'SmalltalkX.xbm'.
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   368
"/            ].
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   369
            nm := ClassResources at:'ICON_FILE' default:n.
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   370
            nm notNil ifTrue:[    
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   371
                i := Smalltalk imageFromFileNamed:nm inPackage:'stx:libtool'.
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   372
            ].
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   373
            i isNil ifTrue:[
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   374
                i := self defaultSTXIcon
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   375
            ].
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   376
        ].
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   377
        i notNil ifTrue:[
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   378
            DefaultIcon := i := i onDevice:Display
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   379
        ]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   380
    ].
1612
e1f1a02b494e defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1560
diff changeset
   381
    ^ i
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   382
2729
cecfd2c7ab68 changed default icon under win32
Claus Gittinger <cg@exept.de>
parents: 2722
diff changeset
   383
    "
cecfd2c7ab68 changed default icon under win32
Claus Gittinger <cg@exept.de>
parents: 2722
diff changeset
   384
     DefaultIcon := nil.
cecfd2c7ab68 changed default icon under win32
Claus Gittinger <cg@exept.de>
parents: 2722
diff changeset
   385
     self defaultIcon inspect
cecfd2c7ab68 changed default icon under win32
Claus Gittinger <cg@exept.de>
parents: 2722
diff changeset
   386
    "
cecfd2c7ab68 changed default icon under win32
Claus Gittinger <cg@exept.de>
parents: 2722
diff changeset
   387
2730
ac6aaad6c036 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
   388
    "Modified: / 25.5.1999 / 15:36:49 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   389
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   390
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   391
defaultLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   392
    "return the default label for views of my kind.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   393
     This can be redefined in subclasses or overwritten in
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   394
     initialize methods."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   395
2931
6de9822ed777 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2873
diff changeset
   396
    ^ self nameWithoutPrefix. "/ 'aView'
6de9822ed777 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2873
diff changeset
   397
6de9822ed777 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2873
diff changeset
   398
    "Modified: / 27.9.1999 / 11:38:57 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   399
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   400
3463
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   401
defaultWindowLabelFormat
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   402
    "%2 is the hostName;
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   403
     %1 is the actual window label."
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   404
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   405
    "/ ^ '%2:%1'.    "/ the old format
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   406
    "/ ^ '%1 @ %2'.
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   407
    ^ '%1 [%2]'.
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   408
!
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   409
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   410
includeHostNameInLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   411
    "return the flag which controls if a views label should
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   412
     include the hostname.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   413
     This flag is usually set/cleared in your private.rc file;
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   414
     the default is false."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   415
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   416
    ^ IncludeHostNameInLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   417
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   418
    "Created: 10.9.1995 / 19:21:16 / claus"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   419
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   420
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   421
includeHostNameInLabel:aBoolean
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   422
    "set/clear the flag which controls if a views label should
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   423
     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
   424
     multiple smalltalks open simultaneously ...
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   425
     This flag is usually set/cleared in your private.rc file;
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   426
     the default is false."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   427
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   428
    IncludeHostNameInLabel := aBoolean
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   429
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   430
    "Modified: 24.4.1996 / 09:09:21 / cg"
1260
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   431
!
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   432
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   433
takeFocusWhenMapped
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   434
    ^ TakeFocusWhenMapped 
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   435
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   436
    "
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   437
     StandardSystemView takeFocusWhenMapped
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   438
    "
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   439
!
a89bbf1a52a2 added public access to TakeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
   440
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   441
updateStyleCache
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   442
    "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
   443
1931
27aa9e5b15dd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1915
diff changeset
   444
    <resource: #style (#'standardSystemView.defaultExtent')>
1865
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   445
1931
27aa9e5b15dd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1915
diff changeset
   446
    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
   447
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   448
    "
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   449
     self updateStyleCache
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   450
    "
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   451
43c2eaba229d allow default topViews extends to be overwritten by styleSheet
Claus Gittinger <cg@exept.de>
parents: 1830
diff changeset
   452
    "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
   453
    "Created: 15.8.1997 / 01:34:37 / cg"
1931
27aa9e5b15dd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1915
diff changeset
   454
    "Modified: 20.10.1997 / 15:13:50 / cg"
3463
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   455
!
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   456
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   457
windowLabelFormat
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   458
    ^ WindowLabelFormat
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   459
!
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   460
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   461
windowLabelFormat:aFormatString
cdfc1db6bccf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
   462
    WindowLabelFormat := aFormatString
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   463
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   464
4327
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   465
!StandardSystemView class methodsFor:'image specs'!
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   466
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   467
defaultSTXIcon
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   468
    <resource: #programImage>
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   469
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   470
    ^ self defaultSTXIcon3.
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   471
!
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   472
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   473
defaultSTXIcon1
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   474
    "This resource specification was automatically generated
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   475
     by the ImageEditor of ST/X."
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   476
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   477
    "Do not manually edit this!! If it is corrupted,
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   478
     the ImageEditor may not be able to read the specification."
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   479
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   480
    "
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   481
     self defaultSTXIcon1 inspect
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   482
     ImageEditor openOnClass:self andSelector:#defaultSTXIcon1
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   483
     Icon flushCachedIcons
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   484
    "
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   485
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   486
    <resource: #image>
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   487
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   488
    ^Icon
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   489
        constantNamed:#'StandardSystemView class defaultSTXIcon1'
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   490
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[2]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@E@@@@AP@D@@V@D@@APF@@@F&@@@AV@@@@&@@@@%P@@@&F@@@VBP@@V@I@@V@@P@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 0 127 127 184 231 231]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@X@A PGB@LX@_@A8@G@@<@GX@9 GC@8D@@@@@@b') ; yourself); yourself]
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   491
!
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   492
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   493
defaultSTXIcon2
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   494
    "This resource specification was automatically generated
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   495
     by the ImageEditor of ST/X."
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   496
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   497
    "Do not manually edit this!! If it is corrupted,
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   498
     the ImageEditor may not be able to read the specification."
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   499
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   500
    "
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   501
     self defaultSTXIcon2 inspect
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   502
     ImageEditor openOnClass:self andSelector:#defaultSTXIcon2
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   503
     Icon flushCachedIcons
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   504
    "
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   505
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   506
    <resource: #image>
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   507
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   508
    ^Icon
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   509
        constantNamed:#'StandardSystemView class defaultSTXIcon2'
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   510
        ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   511
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@@@@@@@@@@@@@@@@@@@B@ @@@@@@@@H@@@@@@@@@@ H@@@@@@@H@@@@@@@@@@@@B@ @@
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   512
@@H@@@@@@@@@@@@@@@H@@@H@@@@@@@@@@@@@@@@B@ H@@@@@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@@@@@HB@ @@@@@@@@@@@@@@@@H@@@H@@@@@@@@@@@@@
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   513
@ H@@@@@@ @@@@@@@@@@@ H@@@@@@@@B@@@@@@@@@ H@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[184 231 231 63 63 63 0 127 127]; yourself]
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   514
!
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   515
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   516
defaultSTXIcon3
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   517
    "This resource specification was automatically generated
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   518
     by the ImageEditor of ST/X."
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   519
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   520
    "Do not manually edit this!! If it is corrupted,
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   521
     the ImageEditor may not be able to read the specification."
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   522
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   523
    "
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   524
     self defaultSTXIcon3 inspect
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   525
     ImageEditor openOnClass:self andSelector:#defaultSTXIcon3
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   526
     Icon flushCachedIcons
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   527
    "
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   528
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   529
    <resource: #image>
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   530
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   531
    ^Icon
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   532
        constantNamed:#'StandardSystemView class defaultSTXIcon3'
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   533
        ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[2]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@E@@@@AP@D@@V@D@@APF@@@FF@@@AV@@@@&@@@@%P@@@$F@@@T@X@@T@I@@T@@P@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 0 204 51 0 112 0]; yourself]
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   534
! !
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
   535
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   536
!StandardSystemView class methodsFor:'startup'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   537
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   538
start
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   539
    "create, realize the view - this topview and all its subviews will
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   540
     run as a separate process with its own windowGroup.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   541
     This method exists for backward compatibility - use open."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   542
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   543
    ^ self open
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   544
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   545
3880
c4c8268a2d9f method category rename
Claus Gittinger <cg@exept.de>
parents: 3825
diff changeset
   546
!StandardSystemView methodsFor:'Compatibility-ST80'!
1939
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   547
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   548
maximumSize
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   549
    "same as maxExtent; for ST-80 compatibility"
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   550
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   551
    ^ self maxExtent
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   552
!
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   553
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   554
maximumSize:anExtent
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   555
    "same as maxExtent; for ST-80 compatibility"
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   556
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   557
    ^ self maxExtent:anExtent
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   558
!
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   559
1939
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   560
menuBar
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   561
    "return my menuBar or nil if I have none.
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   562
     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
   563
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   564
    ^ application builder menuBar
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   565
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   566
    "Created: / 27.10.1997 / 16:23:13 / cg"
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   567
!
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   568
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   569
minimumSize
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   570
    "same as minExtent; for ST-80 compatibility"
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   571
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   572
    ^ self minExtent
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   573
!
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   574
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   575
minimumSize:anExtent
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   576
    "same as minExtent; for ST-80 compatibility"
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   577
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   578
    ^ self minExtent:anExtent
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   579
!
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   580
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   581
quit
2217
8ce6a3da5bab #terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents: 2165
diff changeset
   582
    "same as closeRequest 
8ce6a3da5bab #terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents: 2165
diff changeset
   583
     (but sometimes sent via the sensors event queue from VW programs)"
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   584
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   585
    self closeRequest
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   586
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
   587
    "Created: / 30.10.1997 / 19:23:01 / cg"
2217
8ce6a3da5bab #terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents: 2165
diff changeset
   588
    "Modified: / 3.8.1998 / 20:04:22 / cg"
1939
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   589
! !
a32908e2214d added #menuBar for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
   590
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   591
!StandardSystemView methodsFor:'accessing'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   592
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   593
application
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   594
    "return the topViews application.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   595
     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
   596
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   597
    ^ application
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   598
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   599
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   600
application:anApplicationModel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   601
    "set the topViews application.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   602
     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
   603
570
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   604
    application := anApplicationModel.
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   605
    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
   606
	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
   607
	    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
   608
	]
570
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   609
    ]
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   610
8a7c398caa94 preset the applications window when my app is set
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
   611
    "Modified: 18.4.1996 / 14:55:44 / cg"
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   612
! !
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   613
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   614
!StandardSystemView methodsFor:'accessing-behavior'!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   615
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   616
bePartner
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   617
    "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
   618
     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
   619
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   620
    self setWindowGroupFromApplication.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   621
    super bePartner.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   622
298
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   623
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   624
     see example in TopView>>bePartner
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   625
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   626
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   627
    "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
   628
    "Modified: 6.3.1996 / 16:16:42 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   629
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   630
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   631
beSlave
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   632
    "define me as a slave-View.
4032
ced6a721d1a6 comment
Claus Gittinger <cg@exept.de>
parents: 3978
diff changeset
   633
     All slaves within the applications windowGroup iconify/deiconify with the masterView(s)
ced6a721d1a6 comment
Claus Gittinger <cg@exept.de>
parents: 3978
diff changeset
   634
     (i.e. they follow their master(s))"
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
   635
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   636
    self setWindowGroupFromApplication.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   637
    super beSlave.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   638
298
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   639
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   640
     see example in TopView>>beSlave
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   641
    "
37bc0d73346f documentation update
Claus Gittinger <cg@exept.de>
parents: 269
diff changeset
   642
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   643
    "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
   644
    "Modified: 6.3.1996 / 16:16:50 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   645
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   646
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   647
sendWindowEvents:collectionOfEventSymbols
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   648
    "define the events that are to be forwarded to the application.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   649
     This is being implemented ..."
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   650
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   651
    windowEventsForApplication := collectionOfEventSymbols
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
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   654
sizeFixed:aBoolean
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   655
    "this prevents the view from resizing itself when realized.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   656
     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
   657
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   658
     However, modalBoxes (especially: DialogBoxes) typically resize themselfes 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   659
     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
   660
     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
   661
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   662
     To avoid confusion:
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   663
	This does NOT prevent the window manager from resizing the view, 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   664
	instead it tells the view to NOT resize ITSELF."
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   665
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   666
    sizeFixed := aBoolean.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   667
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   668
    "example: dialog which resizes itself on #open: 
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   669
	      (thereby ignoring the 200@200 extent)
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   670
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   671
	|dialog|
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   672
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   673
	dialog := Dialog new.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   674
	dialog addInputFieldOn:'' asValue.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   675
	dialog addOkButton.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   676
	dialog extent:200@200.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   677
	dialog open.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   678
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   679
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   680
    using sizeFixed:
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   681
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   682
	|dialog|
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   683
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   684
	dialog := Dialog new.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   685
	dialog addInputFieldOn:'' asValue.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   686
	dialog addOkButton.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   687
	dialog extent:200@200; sizeFixed:true.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   688
	dialog open.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   689
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   690
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   691
    using openWithExtent (also sets sizeFixed):
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   692
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   693
	|dialog|
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   694
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   695
	dialog := Dialog new.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   696
	dialog addInputFieldOn:'' asValue.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   697
	dialog addOkButton.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   698
	dialog openWithExtent:200@200.
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   699
    "
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   700
! !
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   701
3776
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   702
!StandardSystemView methodsFor:'accessing-channels'!
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   703
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   704
labelChannel
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   705
    "return the labelChannel - or nil"
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   706
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   707
    ^ labelChannel.
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   708
!
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   709
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   710
labelChannel:aValueHolder
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   711
    "set the labelChannel - a valueHolder holding a string
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   712
     which is shown as title bar"
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   713
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   714
    |prev|
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   715
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   716
    prev := labelChannel.
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   717
    labelChannel := aValueHolder.
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   718
    self setupChannel:aValueHolder for:nil withOld:prev.
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   719
! !
3d7e22c4c6ea category change
Claus Gittinger <cg@exept.de>
parents: 3746
diff changeset
   720
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   721
!StandardSystemView methodsFor:'accessing-dimensions'!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   722
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   723
maxExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   724
    "return the views maximum allowed extent"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   725
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   726
    ^ maxExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   727
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   728
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   729
maxExtent:max
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   730
    "define the maximum extent the view may have -
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   731
     depends on good-will of window manager"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   732
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   733
    maxExtent ~= max ifTrue:[
4197
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   734
        maxExtent := max.
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   735
        maxExtent x isNil ifTrue:[
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   736
            maxExtent := 99999 @ maxExtent y.
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   737
        ].
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   738
        maxExtent y isNil ifTrue:[
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   739
            maxExtent := maxExtent x @ 99999.
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   740
        ].
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   741
4197
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   742
        drawableId notNil ifTrue:[
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   743
            device setWindowMinExtent:nil maxExtent:max in:drawableId
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   744
        ].
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   745
4197
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   746
        "/ if my current extent is larger than the new
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   747
        "/ maxExtent, adjust.
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   748
4197
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   749
        (width notNil and:[height notNil]) ifTrue:[
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   750
            ((width > (max x)) or:
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   751
             [height > (max y)]) ifTrue: [
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   752
                self extent:(max min:self extent)
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   753
            ]
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
   754
        ]
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   755
    ].
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   756
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   757
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   758
minExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   759
    "return the views minimum allowed extent"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   760
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   761
    ^ minExtent
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   762
!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   763
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   764
minExtent:min
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   765
    "define the minimum extent the view may have -
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   766
     depends on good-will of window manager"
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   767
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   768
    minExtent ~= min ifTrue:[
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   769
	minExtent := min.
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   770
	drawableId notNil ifTrue:[
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   771
	    device setWindowMinExtent:min maxExtent:nil in:drawableId
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   772
	].
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   773
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   774
	"/ if my current extent is smaller than the new
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   775
	"/ minExtent, adjust.
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   776
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   777
	(width notNil and:[height notNil]) ifTrue:[
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   778
	    ((width < (min x)) or:
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   779
	     [height < (min y)]) ifTrue: [
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   780
		self extent:(min max:self extent)
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   781
	    ]
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
   782
	]
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
   783
    ]
625
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   784
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   785
! !
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   786
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   787
!StandardSystemView methodsFor:'accessing-look'!
4d8f6dc3af75 commentary & category changes
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   788
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   789
icon
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   790
    "return the form defined as icon"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   791
4322
238880c18923 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4321
diff changeset
   792
    ^ icon value
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   793
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   794
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   795
icon:aFormOrImage
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   796
    "define the form or image (bitmap) used as icon"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   797
4321
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   798
    |i m iconValue|
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   799
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   800
    icon := aFormOrImage.
4321
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   801
    iconValue := icon value.
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   802
    iconValue notNil ifTrue:[
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   803
        drawableId notNil ifTrue:[
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   804
            i := self convertedIcon:iconValue.
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   805
            (i notNil and:[i id notNil]) ifTrue:[
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   806
                (m := iconValue mask) notNil ifTrue:[
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   807
                    m := self convertedIconMask:m.
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   808
                ].
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   809
                device setWindowIcon:i mask:m in:drawableId
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   810
            ]
f65178d64901 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
   811
        ]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   812
    ]
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   813
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   814
    "Modified: 4.4.1997 / 16:20:52 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   815
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   816
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   817
iconLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   818
    "return the name displayed in the icon"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   819
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   820
    ^ iconLabel
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   821
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   822
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   823
iconLabel:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   824
    "define the name to be displayed in the icon"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   825
2099
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   826
    |newLabel|
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   827
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   828
    (newLabel := aString string) ~= iconLabel ifTrue:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   829
	iconLabel := newLabel.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   830
	drawableId notNil ifTrue:[
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   831
	    device setIconName:newLabel in:drawableId.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   832
	    "
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   833
	     unbuffered - to make it visible right NOW
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   834
	    "
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   835
	    device flush.
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   836
	]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   837
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   838
!
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
   839
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   840
iconMask
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   841
    "return the form defined as iconMask.
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   842
     Notice, that many windowManagers ignore this mask
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   843
     (usually, only managers which place icons on the background desktop
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   844
      care for an icon - if at all ...)"
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   845
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   846
    |mask|
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   847
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   848
    "/ only images possibly have iconMasks
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   849
    icon notNil ifTrue:[
4322
238880c18923 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4321
diff changeset
   850
        (mask := icon value mask) notNil ifTrue:[
238880c18923 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4321
diff changeset
   851
            ^ self convertedIconMask:mask
238880c18923 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4321
diff changeset
   852
        ]
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   853
    ].
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   854
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   855
    ^ nil
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   856
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   857
    "Modified: 4.4.1997 / 16:39:00 / cg"
1464
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   858
!
e2716325d697 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   859
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   860
iconName:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   861
    "this method will vanish soon ... - for backward compatibility"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   862
3435
3364a7082bdd Use <resource:#obsolete>
Stefan Vogel <sv@exept.de>
parents: 3408
diff changeset
   863
    <resource:#obsolete>
3364a7082bdd Use <resource:#obsolete>
Stefan Vogel <sv@exept.de>
parents: 3408
diff changeset
   864
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   865
    self obsoleteMethodWarning:'use #iconLabel:'.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   866
    self iconLabel:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   867
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   868
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   869
iconView
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   870
    "return the view used as icon-view"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   871
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   872
    ^ iconView
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   873
!
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
iconView:aView
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   876
    "specify the view to be used as icon.
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   877
     This may not be supported on all display types"
269
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
    iconView := aView.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   880
    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
   881
	aView create.
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   882
	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
   883
	aView setRealized:true.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   884
    ]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
   885
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   886
    "Modified: 4.4.1997 / 16:21:37 / cg"
269
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
label
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   890
    "return the views name in the title area"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   891
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   892
    ^ label
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   893
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   894
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   895
label:aString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   896
    "define the views name in the windows title area.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   897
     If IncludeHostNameInLabel is true, prepend the hostname
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   898
     (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
   899
      machines simultaneously - as I do ...)"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   900
4128
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
   901
    |newLabel|
2099
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   902
84cde59b2575 handle label/iconLabel being a text (instead of a string)
Claus Gittinger <cg@exept.de>
parents: 2092
diff changeset
   903
    (newLabel := aString string) ~= label ifTrue:[
4060
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   904
        label := newLabel.
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   905
        drawableId notNil ifTrue: [
4128
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
   906
            device setWindowName:(self windowLabelFor:label) in:drawableId.
4060
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   907
            shown ifTrue:[
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   908
                "
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   909
                 unbuffered - to make it visible right NOW
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   910
                "
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   911
                device flush.
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   912
            ]
3de2582320a0 for now, set the window-label in utf8
Claus Gittinger <cg@exept.de>
parents: 4032
diff changeset
   913
        ]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   914
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   915
2218
f3e1685b3698 no need to change the label immediately if not shown.
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
   916
    "Created: / 8.9.1995 / 19:37:06 / claus"
f3e1685b3698 no need to change the label immediately if not shown.
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
   917
    "Modified: / 8.9.1995 / 19:39:18 / claus"
f3e1685b3698 no need to change the label immediately if not shown.
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
   918
    "Modified: / 3.8.1998 / 17:05:10 / cg"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   919
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   920
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   921
label:labelString iconLabel:iconLabelString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   922
    "set both the label and the iconLabel"
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
    self label:labelString.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   925
    self iconLabel:iconLabelString
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
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   928
!StandardSystemView methodsFor:'change & update'!
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   929
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   930
update:something with:aParameter from:changedObject
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   931
    "the MVC way of changing the label ..."
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   932
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   933
    changedObject notNil ifTrue:[
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   934
        changedObject == labelChannel ifTrue:[
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   935
            self label:labelChannel value.
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   936
            ^ self
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   937
        ].
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   938
    ].
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   939
    ^ super update:something with:aParameter from:changedObject
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   940
! !
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   941
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   942
!StandardSystemView methodsFor:'destroying'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   943
3706
c2b41c6ea4ef destroy - release
Claus Gittinger <cg@exept.de>
parents: 3539
diff changeset
   944
release
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   945
    self removeFromCurrentProject.
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   946
    labelChannel notNil ifTrue:[
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   947
        labelChannel removeDependent:self.
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   948
        labelChannel := nil.
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
   949
    ].
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   950
    windowGroup notNil ifTrue:[
3383
111b54361247 postOpenedWith, windowEvent and noticeOfWindow-Whatever
tm
parents: 3369
diff changeset
   951
        windowGroup focusSequence:nil.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   952
    ].
3706
c2b41c6ea4ef destroy - release
Claus Gittinger <cg@exept.de>
parents: 3539
diff changeset
   953
    super release.
0
48194c26a46c Initial revision
claus
parents:
diff changeset
   954
!
48194c26a46c Initial revision
claus
parents:
diff changeset
   955
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   956
saveAndTerminate
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   957
    "save & terminate request from the windowManager. The application should 
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   958
     save its data/files/text etc. somehow and close.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   959
     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
   960
     Otherwise, forward it to superclasses which knows how to do this.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   961
     (it defaults to a terminate there).
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   962
     Notice, that not all windowmanagers are nice enough
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   963
     to send this request; some simply distroy the view."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   964
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   965
    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
   966
	application saveAndTerminateRequestFor:self
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   967
    ] ifFalse:[
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
   968
	super saveAndTerminate
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   969
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   970
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   971
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   972
terminate
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   973
    "terminate request from the windowManager. If there is an application,
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   974
     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
   975
     superclasses terminate which knows how to do this.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   976
     Notice, that not all windowmanagers are nice enough
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   977
     to send this request; some simply distroy the view."
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   978
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   979
    application notNil ifTrue:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   980
	application closeRequestFor:self
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   981
    ] ifFalse:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   982
	self closeRequest.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   983
    ]
2217
8ce6a3da5bab #terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents: 2165
diff changeset
   984
8ce6a3da5bab #terminate -> #closeRequest -> #destroy
Claus Gittinger <cg@exept.de>
parents: 2165
diff changeset
   985
    "Modified: / 3.8.1998 / 19:49:45 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   986
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   987
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   988
!StandardSystemView methodsFor:'event handling'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   989
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   990
focusIn
2582
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
   991
    "the view got the keyboard focus (via the window manager).
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
   992
     I.e. the mouse was moved out into the topView area - restore the
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
   993
     focus to the previous focusView.."
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   994
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   995
    |v|
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   996
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   997
    windowGroup notNil ifTrue:[
4178
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
   998
        "/ I got the focus - tell the current focus-windowgroup
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
   999
        "/ that its focus is gone elsewhere ...
2742
7013a6aafebd added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
  1000
"/ 'focusIn ' print. windowGroup process name printCR.
7013a6aafebd added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
  1001
"/ 'focusView is ' print. windowGroup focusView printCR.
2722
6fa197cfc572 take focus from focus-group, when getting the focus
Claus Gittinger <cg@exept.de>
parents: 2694
diff changeset
  1002
4178
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1003
        WindowGroup takeFocusFromDevice:device.
2722
6fa197cfc572 take focus from focus-group, when getting the focus
Claus Gittinger <cg@exept.de>
parents: 2694
diff changeset
  1004
4178
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1005
        v := windowGroup focusView.
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1006
        v isNil ifTrue:[
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1007
            UserPreferences current focusFollowsMouse ~~ false ifTrue:[
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1008
                v := windowGroup pointerView.
2742
7013a6aafebd added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
  1009
"/ 'pointerView is ' print. v printCR.
4178
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1010
                (v notNil 
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1011
                and:[v isKeyboardConsumer not
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1012
                and:[v wantsFocusWithPointerEnter not]]) ifTrue:[
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1013
                    "/ no - not this one
2742
7013a6aafebd added extra query: #wantsFocusWithPointerEnter;
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
  1014
"/ 'not a kbdConsumer' printCR.
4178
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1015
                    v := nil.
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1016
                ]
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1017
            ]
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1018
        ].
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1019
        v isNil ifTrue:[
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1020
            self assignInitialKeyboardFocus.
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1021
        ] ifFalse:[
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1022
            "/ v requestFocus.  - will be denied; but we must force it here
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1023
            windowGroup focusView:v byTab:false.
e176977f5f2c initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1024
        ]
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1025
    ].
1382
26b34ba5e742 focusIn/out
Claus Gittinger <cg@exept.de>
parents: 1357
diff changeset
  1026
    super focusIn
655
2a518e85793a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 641
diff changeset
  1027
2722
6fa197cfc572 take focus from focus-group, when getting the focus
Claus Gittinger <cg@exept.de>
parents: 2694
diff changeset
  1028
    "Modified: / 23.5.1999 / 14:00:20 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1029
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1030
2582
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1031
focusOut
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1032
    "the top-view lost the keyboard focus (via the window manager).
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1033
     I.e. the mouse was moved out of the topView area."
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1034
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1035
    |v|
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1036
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1037
    windowGroup notNil ifTrue:[
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1038
	(v := windowGroup focusView) notNil ifTrue:[
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1039
	    v showNoFocus:(windowGroup explicitFocusView == v).
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1040
	    v hasKeyboardFocus:false.
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1041
	]
2582
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1042
    ].
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1043
    super focusOut
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1044
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1045
    "Modified: 25.2.1997 / 23:19:46 / cg"
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1046
!
849551c05f70 focus handling (restore focusView when topView is re-entered)
Claus Gittinger <cg@exept.de>
parents: 2573
diff changeset
  1047
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1048
showActivity:someMessage
597
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
  1049
    "some activityNotification shalt be communicated to
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
  1050
     the user. Forward it to my application (if any).
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
  1051
     (that one should know how to deal with it).
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
  1052
     Otherwise, simply ignore it."
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
  1053
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1054
    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
  1055
	application showActivity:someMessage
328
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1056
    ]
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1057
7bbe05da5769 activity notification added
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1058
    "Created: 16.12.1995 / 18:40:44 / cg"
597
958e2673ca11 commentary
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
  1059
    "Modified: 23.4.1996 / 21:38:11 / cg"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1060
! !
48194c26a46c Initial revision
claus
parents:
diff changeset
  1061
3883
4e01a59afccb method category rename
Claus Gittinger <cg@exept.de>
parents: 3880
diff changeset
  1062
!StandardSystemView methodsFor:'initialization & release'!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1063
48194c26a46c Initial revision
claus
parents:
diff changeset
  1064
addToCurrentProject
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1065
    "add the receiver (a topview) to the current projects set-of-views.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1066
     (If there is a current project)"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1067
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1068
    |p|
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
  1069
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
  1070
    "
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1071
     the following check allows systems
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1072
     without projects and changeSets
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
  1073
    "
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1074
    (Project notNil and:[(p := Project current) notNil]) ifTrue:[
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1075
	p addView: self
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
  1076
    ]
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
  1077
!
12
9f0995fac1fa *** empty log message ***
claus
parents: 6
diff changeset
  1078
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1079
defaultControllerClass
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1080
    "for ST-80 compatibility only - not used in ST/X"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1081
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1082
    ^ nil "/ StandardSystemController
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1083
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1084
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1085
initEvents
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1086
    super initEvents.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1087
    self enableFocusEvents.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1088
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1089
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1090
initialize
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1091
    super initialize.
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
  1092
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1093
    borderWidth := 2.         "- notice: many window managers ignore this"
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  1094
    device platformName = 'WIN32' ifTrue:[
4197
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1095
        minExtent := 0 @ 0.
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  1096
    ] ifFalse:[
4197
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1097
        minExtent := 10 @ 10.
2651
8f800d7bcee3 send minExtend/maxExtend changes down to the device.
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  1098
    ].
4197
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1099
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1100
"/ This code is bad for 2 reasons:
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1101
"/ - KDE (3.2) WM does not show the maximize button if the maxExtent is restricted.
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1102
"/ - why restrict the size of a window?
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1103
"/    maxExtent := device usableExtent "- (0 @ device captionHeight)".
1984b2ba83de Do not set maxExtent (to the Screen size) in StandartSystemView.
Stefan Vogel <sv@exept.de>
parents: 4178
diff changeset
  1104
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1105
    label isNil ifTrue:[label := self class defaultLabel].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1106
    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
  1107
df5125310d86 New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
  1108
    "Modified: 14.6.1996 / 17:18:28 / stefan"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1109
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1110
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1111
reAdjustGeometry
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1112
    "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
  1113
     when we come up on a smaller display, 
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1114
     make certain, that the receiver is visible"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1115
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1116
    |dX dY limitRight limitBottom|
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1117
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1118
    dX := (device horizontalPixelPerMillimeter * 20) rounded.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1119
    dY := (device verticalPixelPerMillimeter * 20) rounded.
69
04d0949dc053 *** empty log message ***
claus
parents: 54
diff changeset
  1120
1703
b77cc326916d take usableExtent as max.
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
  1121
    limitRight := device usableWidth - dX.
b77cc326916d take usableExtent as max.
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
  1122
    limitBottom := device usableHeight - dY.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1123
    ((self left > limitRight) or:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1124
      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
  1125
	'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
  1126
	self origin:limitRight @ limitBottom
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1127
    ]
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1128
1163
7b416e1ea819 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  1129
    "Modified: 10.1.1997 / 15:12:19 / cg"
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1130
!
48194c26a46c Initial revision
claus
parents:
diff changeset
  1131
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1132
reinitialize
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1133
    "reopen the receiver if if was visible before.
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1134
     This is called right after snapIn; Notice, that all instance variables
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1135
     (such as shown, realized etc.) are left-overs from the time the snapout
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1136
     was done. Remap the receiver, if it was mapped at snapout time"
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1137
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1138
    |myController|
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1139
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1140
    "if I have already been reinited - return"
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1141
    drawableId notNil ifTrue:[
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1142
	^ self
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1143
    ].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1144
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1145
    "have to kludge with the controller 
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1146
     - otherwise its startup performs unwanted actions ..."
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1147
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1148
    myController := controller.
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1149
    controller := nil.
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1150
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1151
    "physically create the view & subviews"
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1152
    self recreate.
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1153
2644
bb15778539af oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  1154
    "if I was iconified (not realized), remap iconified"
bb15778539af oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  1155
    device 
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1156
	mapView:self id:drawableId iconified:(realized "shown" not) 
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1157
	atX:left y:top width:width height:height
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1158
	minExtent:minExtent maxExtent:maxExtent.
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1159
2644
bb15778539af oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  1160
    "and restart the window-group process"
bb15778539af oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  1161
    windowGroup notNil ifTrue:[
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1162
	windowGroup restart
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1163
    ].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1164
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1165
    "restore controller"
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1166
    controller := myController
2644
bb15778539af oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  1167
bb15778539af oops - restart with iconified views recreated them
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  1168
    "Modified: / 6.5.1999 / 09:50:13 / cg"
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1169
!
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1170
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1171
removeFromCurrentProject
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1172
    "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
  1173
     (If there is a current project)"
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1174
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1175
    |p|
12
9f0995fac1fa *** empty log message ***
claus
parents: 6
diff changeset
  1176
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1177
    "
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1178
     the following check allows systems
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1179
     without projects and changeSets
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1180
    "
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1181
    (Project notNil and:[(p := Project current) notNil]) ifTrue:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1182
	p removeView:self
89
ea2bf46eb669 *** empty log message ***
claus
parents: 82
diff changeset
  1183
    ]
ea2bf46eb669 *** empty log message ***
claus
parents: 82
diff changeset
  1184
!
ea2bf46eb669 *** empty log message ***
claus
parents: 82
diff changeset
  1185
140
claus
parents: 135
diff changeset
  1186
restarted
claus
parents: 135
diff changeset
  1187
    "sent by my windowGroup, when restarted from an image.
claus
parents: 135
diff changeset
  1188
     Nothing done here, but can be redefined to perform any actions
claus
parents: 135
diff changeset
  1189
     required to reset the application after an image-restart.
claus
parents: 135
diff changeset
  1190
     (for example: check if application files are still around, restart
claus
parents: 135
diff changeset
  1191
     subprocesses etc.)."
claus
parents: 135
diff changeset
  1192
claus
parents: 135
diff changeset
  1193
    application notNil ifTrue:[
claus
parents: 135
diff changeset
  1194
	application restarted
claus
parents: 135
diff changeset
  1195
    ].
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1196
! !
48194c26a46c Initial revision
claus
parents:
diff changeset
  1197
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1198
!StandardSystemView methodsFor:'printing & storing'!
142
claus
parents: 141
diff changeset
  1199
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1200
displayString
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1201
    "just for your convenience in inspectors ...
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1202
     ... add the views label to the displayString."
142
claus
parents: 141
diff changeset
  1203
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1204
    |s|
142
claus
parents: 141
diff changeset
  1205
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1206
    s := super displayString.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1207
    label notNil ifTrue:[
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1208
	s := s , '(' , label , ')'
157
claus
parents: 153
diff changeset
  1209
    ].
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1210
    ^ s
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1211
! !
48194c26a46c Initial revision
claus
parents:
diff changeset
  1212
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1213
!StandardSystemView methodsFor:'private'!
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1214
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1215
convertedIcon
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1216
    "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
  1217
     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
  1218
     the device supports. Return a compatible version of the icon."
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1219
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1220
    ^ self convertedIcon:icon
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1221
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1222
    "Modified: 10.6.1996 / 19:42:20 / cg"
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1223
!
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1224
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1225
convertedIcon:iconArg
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1226
    "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
  1227
     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
  1228
     the device supports. Return a compatible version of the icon."
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1229
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1230
    |deviceIcon d toMono toDeep icon|
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1231
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1232
    icon := iconArg value.
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1233
    icon isNil ifTrue:[^ nil].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1234
825
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1235
    toMono := toDeep := false.
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1236
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1237
    d := icon depth.
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1238
    device supportsDeepIcons ifFalse:[
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1239
        (d ~~ 1 or:[icon isImage]) ifTrue:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1240
            "
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1241
             dither to monochrome
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1242
            "
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1243
            toMono := true.
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1244
        ]
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1245
    ] ifTrue:[
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1246
        d == 1 ifTrue:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1247
            icon colorMap notNil ifTrue:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1248
                icon isImage ifFalse:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1249
                    toMono := true.
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1250
                ] ifTrue:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1251
                    toDeep := true.
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1252
                ]
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1253
            ]
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1254
        ] ifFalse:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1255
            d ~~ device depth ifTrue:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1256
                icon isImage ifFalse:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1257
                    toMono := true.
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1258
                ] ifTrue:[
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1259
                    toDeep := true.
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1260
                ]
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1261
            ]
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1262
        ]
825
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1263
    ].
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1264
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1265
    deviceIcon := icon.
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1266
    toMono ifTrue:[
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1267
        deviceIcon := icon asMonochromeFormOn:device.
825
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1268
    ].
dad10f7f7251 deep & mono icons
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1269
    toDeep ifTrue:[
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1270
        deviceIcon := (Image implementorForDepth:device depth)
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1271
                        fromImage:icon.
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1272
    ].
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1273
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1274
    deviceIcon notNil ifTrue:[
4320
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1275
        "
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1276
         get device pixmap (i.e. allocate colors & resource)
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1277
        "
9bc8c69c8d4e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4319
diff changeset
  1278
        deviceIcon := deviceIcon onDevice:device
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1279
    ].
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1280
    ^ deviceIcon
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1281
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1282
    "Created: 10.6.1996 / 19:41:31 / cg"
1755
742281b8e981 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  1283
    "Modified: 17.6.1997 / 11:46:44 / cg"
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1284
!
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1285
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1286
convertedIconMask:aMask
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1287
    "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
  1288
     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
  1289
     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
  1290
     them ..."
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1291
2605
951cf4e422be ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents: 2582
diff changeset
  1292
    device supportsIconMasks ifFalse:[^ nil].
951cf4e422be ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents: 2582
diff changeset
  1293
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1294
    aMask depth ~~ 1 ifTrue:[
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1295
	^ aMask asMonochromeFormOn:device
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1296
    ].
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1297
    ^ aMask
2605
951cf4e422be ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents: 2582
diff changeset
  1298
951cf4e422be ask device if it supports icon masks
Claus Gittinger <cg@exept.de>
parents: 2582
diff changeset
  1299
    "Modified: / 28.4.1999 / 20:00:00 / cg"
1425
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1300
!
c6963c38dcd8 preparations for iconMasks (for windows)
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  1301
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1302
setWindowGroupFromApplication
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1303
    "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
  1304
3746
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1305
    |win master|
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1306
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1307
    windowGroup isNil ifTrue:[
3746
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1308
        application notNil ifTrue:[
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1309
            (win := application window) notNil ifTrue:[
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1310
                win ~~ self ifTrue:[
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1311
                    windowGroup := win windowGroup.
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1312
                    ^ self
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1313
                ].
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1314
                (master := application masterApplication) notNil ifTrue:[
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1315
                    (win := master window) notNil ifTrue:[
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1316
                        windowGroup := win windowGroup.
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1317
                        ^ self
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1318
                    ].
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1319
                ].
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1320
            ]
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1321
        ]
193
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1322
    ].
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1323
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1324
    "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
  1325
    "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
  1326
!
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1327
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1328
windowLabelFor:labelString
3539
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1329
    "return an expanded labelString, according to the hostName-in-window setting.
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1330
     The labelString may include positional parameters:
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1331
        %1 - the actual label
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1332
        %2 - the hostname
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1333
        %3 - the userName
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1334
        %4 - the processId
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1335
    "
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1336
4128
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
  1337
    |wg proc id pidString lbl|
1915
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1338
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1339
    (IncludeHostNameInLabel == true
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1340
    and:[WindowLabelFormat notNil]) ifTrue:[
3539
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1341
        (wg := self windowGroup) notNil ifTrue:[
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1342
            (proc := wg process) notNil ifTrue:[
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1343
                (id := proc id) notNil ifTrue:[
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1344
                    pidString := id printString
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1345
                ]
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1346
            ]
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1347
        ].
4128
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
  1348
        lbl := WindowLabelFormat 
3539
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1349
                bindWith:labelString 
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1350
                with:(OperatingSystem getHostName)
d1f51be1c8b4 windowLabel format
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  1351
                with:(OperatingSystem getLoginName)
4128
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
  1352
                with:pidString.
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
  1353
        ^ lbl
1915
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1354
    ].
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1355
    ^ labelString
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1356
f86162de1a2f extracted windowLabel generation into a separate method
Claus Gittinger <cg@exept.de>
parents: 1904
diff changeset
  1357
    "Created: 22.9.1997 / 10:10:32 / cg"
24
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1358
! !
e810b1be068b *** empty log message ***
claus
parents: 21
diff changeset
  1359
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1360
!StandardSystemView methodsFor:'queries'!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1361
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1362
focusSequence
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1363
    "return a sequence which defines the order in which the focus
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1364
     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
  1365
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1366
     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
  1367
     this method and return a collection of (sub-) views.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1368
     Or, if the model is some applicationModel, it may itself define
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1369
     the focusSequence.
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1370
     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
  1371
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1372
     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
  1373
     to belong into the controller or the builder ..."
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1374
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1375
    "/
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1376
    "/ if I have an application, its supposed to
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1377
    "/ know about the focusSequence
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1378
    "/
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1379
    application notNil ifTrue:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1380
	^ application focusSequence
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1381
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1382
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1383
    "/ is that really a good idea ?
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1384
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1385
    (model notNil
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1386
    and:[(model respondsTo:#focusSequence)
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1387
    and:[model ~~ self]]) ifTrue:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1388
	^ model focusSequence
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1389
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1390
    ^ nil
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1391
1944
4714af03d87d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1939
diff changeset
  1392
    "Modified: / 31.10.1997 / 19:14:02 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1393
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1394
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1395
processName
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1396
    "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
  1397
     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
  1398
     for your convenience only."
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1399
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1400
    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
  1401
	^ application processName
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1402
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1403
    label notNil ifTrue:[^ label].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1404
    ^ super processName
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1405
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1406
    "Modified: 24.4.1996 / 09:47:01 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1407
! !
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1408
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1409
!StandardSystemView methodsFor:'realization'!
48194c26a46c Initial revision
claus
parents:
diff changeset
  1410
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1411
collapse
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1412
    "iconify the receiver"
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1413
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1414
    shown ifTrue:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1415
	self unmap.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1416
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1417
	"if it was iconified, try to remap iconified"
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1418
	device
2103
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1419
	    mapView:self id:drawableId iconified:true 
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1420
	    atX:left y:top width:width height:height
2103
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1421
	    minExtent:minExtent maxExtent:maxExtent.
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1422
	shown := false.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1423
    ].
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1424
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1425
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1426
     |top|
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1427
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1428
     top := StandardSystemView new.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1429
     top label:'hello'.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1430
     top openAndWait.
1820
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1431
     Delay waitForSeconds:2.
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1432
     top collapse.
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1433
     Delay waitForSeconds:2.
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1434
     top expand.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1435
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1436
1820
44b1622bcb50 method comment
Claus Gittinger <cg@exept.de>
parents: 1755
diff changeset
  1437
    "Modified: 24.7.1997 / 12:32:17 / cg"
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1438
!
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1439
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1440
create
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1441
    "create - make certain that icon is available"
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1442
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1443
    super create.
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1444
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1445
    iconView notNil ifTrue:[
3393
a7f33744dd82 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1446
        iconView create.
a7f33744dd82 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1447
        device setWindowIconWindow:iconView in:drawableId.
a7f33744dd82 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1448
        iconView setRealized:true.
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1449
    ].
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1450
    iconLabel notNil ifTrue:[
3393
a7f33744dd82 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1451
        device setIconName:iconLabel string in:drawableId
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1452
    ]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1453
816
6576c8242e5d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
  1454
    "Modified: 10.6.1996 / 20:14:50 / cg"
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1455
!
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1456
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1457
expand
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1458
    "de-iconify the receiver at its old position"
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1459
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1460
    shown ifFalse:[
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1461
	self unmap.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1462
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1463
	"if it was iconified, try to remap iconified"
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1464
	device
2103
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1465
	    mapView:self id:drawableId iconified:false 
2303
29743aa4897e comment only
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  1466
	    atX:left y:top width:width height:height
2103
dbe7a348084f do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents: 2099
diff changeset
  1467
	    minExtent:minExtent maxExtent:maxExtent.
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1468
    ].
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1469
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1470
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1471
     |top|
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1472
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1473
     top := StandardSystemView new.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1474
     top label:'hello'.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1475
     top openAndWait.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1476
     top collapse.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1477
     Delay waitForSeconds:5.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1478
     top expand.
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1479
    "
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1480
2038
ef772cbd32d2 expand - fix
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
  1481
    "Modified: / 3.2.1998 / 16:02:56 / cg"
1405
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1482
!
4cdcc64344f4 added collapse & expand
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  1483
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1484
physicalCreate
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1485
    "common code for create & recreate"
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1486
4319
81b13632542f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1487
    |lbl iconValue icn icnMask windowClassNameString|
183
claus
parents: 181
diff changeset
  1488
4128
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
  1489
    lbl := self windowLabelFor:label.
183
claus
parents: 181
diff changeset
  1490
1560
654a2dd70db7 care for nil icon
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  1491
    icon notNil ifTrue:[
4319
81b13632542f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1492
        iconValue := icon value.
81b13632542f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1493
        icn := self convertedIcon:iconValue.
81b13632542f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1494
        (icnMask := iconValue mask) notNil ifTrue:[
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1495
            icnMask := self convertedIconMask:icnMask
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1496
        ].
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1497
        deviceIcon := icn.
1696
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1498
    ].
ba6085a629e0 replaced isPopUp flag in #createWindow by a more general #style symbol argument
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
  1499
3008
81987f198808 let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents: 2935
diff changeset
  1500
    "/ give global eventListeners a chance to intercept windowCreation
81987f198808 let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents: 2935
diff changeset
  1501
    "/ and provide another origin (by payching my origin via setOrigin:).
81987f198808 let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents: 2935
diff changeset
  1502
    WindowSensor preViewCreateNotification:self.
81987f198808 let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents: 2935
diff changeset
  1503
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1504
    drawableId := device 
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1505
                      createWindowFor:self 
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1506
                      type:nil
3393
a7f33744dd82 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1507
                      origin:(left @ top)
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1508
                      extent:(width @ height)
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1509
                      minExtent:minExtent
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1510
                      maxExtent:maxExtent
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1511
                      borderWidth:borderWidth
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1512
                      subViewOf:nil 
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1513
                      style:(self windowStyle)
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1514
                      inputOnly:(self isInputOnly)
4128
c8b677256664 to utf8 or not - that is the question in window labels
Michael Beyl <mb@exept.de>
parents: 4125
diff changeset
  1515
                      label:lbl
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1516
                      owner:nil
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1517
                      icon:icn iconMask:icnMask
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1518
                      iconView:iconView.
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1519
641
f265a4c4785f Must register drawableId in Lobby when physicalCreate'ing a window.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  1520
    Lobby registerChange:self.
1724
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1521
3008
81987f198808 let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents: 2935
diff changeset
  1522
    "/ give global listeners a chance to track views
81987f198808 let WindowSensor perform the preViewCreation/postViewCreation
Claus Gittinger <cg@exept.de>
parents: 2935
diff changeset
  1523
    WindowSensor postViewCreateNotification:self.
1724
166073494dcc pass window styles (normal / dialog / popup)
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  1524
3369
2710ff974761 only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents: 3346
diff changeset
  1525
    self extentChangedFlag:false.
2710ff974761 only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents: 3346
diff changeset
  1526
    self originChangedFlag:false.
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1527
1202
deaeebf2a9b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1163
diff changeset
  1528
    (borderColor notNil and:[borderColor ~= Black]) ifTrue:[
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1529
        self setBorderColor
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1530
    ].
81
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1531
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1532
"/  (viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1533
"/        device setWindowGravity:viewGravity in:drawableId
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1534
"/  ].
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1535
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1536
"/  (bitGravity notNil "and:[bitGravity ~~ #NorthWest]") ifTrue:[
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1537
"/      device setBitGravity:bitGravity in:drawableId
4ba554473294 *** empty log message ***
claus
parents: 78
diff changeset
  1538
"/  ].
72
3e84121988c3 *** empty log message ***
claus
parents: 69
diff changeset
  1539
1904
8ec8d16e241c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1540
    viewShape notNil ifTrue:[
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1541
        self setViewShape
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1542
    ].
1904
8ec8d16e241c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  1543
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1544
    (backed notNil and:[backed ~~ false]) ifTrue:[
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1545
        device setBackingStore:backed in:drawableId
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1546
    ].
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1547
    self saveUnder ifTrue:[
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1548
        device setSaveUnder:true in:drawableId
46
7b331e9012fd *** empty log message ***
claus
parents: 24
diff changeset
  1549
    ].
1960
aa9ef6e21f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1944
diff changeset
  1550
    cursor notNil ifTrue:[
3315
995d017b5107 must keep a reference to the deviceIcon...
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  1551
        self setCursor
1960
aa9ef6e21f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1944
diff changeset
  1552
    ].
3917
806839e6531e Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents: 3883
diff changeset
  1553
806839e6531e Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents: 3883
diff changeset
  1554
    application isNil ifTrue:[
3919
6b390fe57e96 More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents: 3917
diff changeset
  1555
        (self class == StandardSystemView and:[subViews size == 1]) ifTrue:[
6b390fe57e96 More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents: 3917
diff changeset
  1556
            "This is a subclass of SimpleView wrapped into a StandardSystemView"
6b390fe57e96 More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents: 3917
diff changeset
  1557
            windowClassNameString := subViews first className.
6b390fe57e96 More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents: 3917
diff changeset
  1558
        ] ifFalse:[
6b390fe57e96 More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents: 3917
diff changeset
  1559
            windowClassNameString := self className.
6b390fe57e96 More fixes for X11 window class names
Stefan Vogel <sv@exept.de>
parents: 3917
diff changeset
  1560
        ]
3917
806839e6531e Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents: 3883
diff changeset
  1561
    ] ifFalse:[
806839e6531e Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents: 3883
diff changeset
  1562
        windowClassNameString := application className.
806839e6531e Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents: 3883
diff changeset
  1563
    ].
806839e6531e Set windowClasses based on application class name.
Stefan Vogel <sv@exept.de>
parents: 3883
diff changeset
  1564
    self setWindowClass:('Stx.', windowClassNameString) name:"name"'bla'.
641
f265a4c4785f Must register drawableId in Lobby when physicalCreate'ing a window.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  1565
857
df5125310d86 New method #setWindowClass:name:in: to give a hint to the window manager.
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
  1566
    "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
  1567
    "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
  1568
!
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1569
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1570
postRealize
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1571
    "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
  1572
2873
872359bf6162 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
  1573
    super postRealize.
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1574
    "/
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1575
    "/ let the application add its views to the current project
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1576
    "/
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1577
    application notNil ifTrue:[
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1578
	application opened:self.
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1579
    ] ifFalse:[
3152
b64eeb833f5b added flag bits;
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1580
	self addToCurrentProject.
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1581
    ].
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1582
1830
f5cac70b7105 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  1583
    "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
  1584
!
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1585
4125
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1586
preRealize
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1587
    "invoked right before the view is realized.
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1588
     preRealize actions - tell the application (if any)."
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1589
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1590
    super preRealize.
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1591
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1592
    application notNil ifTrue:[
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1593
        application aboutToOpen:self.
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1594
    ].
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1595
!
e8b878a4e8ab preRealize hook
Claus Gittinger <cg@exept.de>
parents: 4060
diff changeset
  1596
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1597
recreate
3301
1bcebb26ecbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3210
diff changeset
  1598
    "recreate the view after a snap-in or a migration"
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1599
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1600
    super recreate.
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1601
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1602
    iconView notNil ifTrue:[
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
  1603
        iconView recreate.
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
  1604
        device setWindowIconWindow:iconView in:drawableId.
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
  1605
        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
  1606
    ] ifFalse:[
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
  1607
        icon notNil ifTrue:[
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
  1608
            self icon:icon.
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
  1609
        ].
504
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1610
    ].
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1611
bc7734000bd3 windowGroup pulls focusSequence from topView (used to be pushed into it)
Claus Gittinger <cg@exept.de>
parents: 385
diff changeset
  1612
    iconLabel notNil ifTrue:[
3408
42384f123133 Add labelChannel and visibilityChannel to WindowSpec/StandardSystemView
Stefan Vogel <sv@exept.de>
parents: 3393
diff changeset
  1613
        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
  1614
    ]
604
672ecb7ec347 fixed iconView handling (thought it was not realized); comments & docu
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1615
1538
2c9c73a04908 icon masks
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
  1616
    "Modified: 4.4.1997 / 16:16:40 / cg"
141
claus
parents: 140
diff changeset
  1617
! !
claus
parents: 140
diff changeset
  1618
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1619
!StandardSystemView class methodsFor:'documentation'!
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1620
269
ea536bb319a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1621
version
4327
307fc2ce50cc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4322
diff changeset
  1622
    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.164 2004-10-26 20:25:50 cg Exp $'
0
48194c26a46c Initial revision
claus
parents:
diff changeset
  1623
! !
3746
d9dccd3a4a41 beSlave: also try masterApp in setWGFromApplication
Claus Gittinger <cg@exept.de>
parents: 3706
diff changeset
  1624
1878
76e9bc8e1b9c new hostName in label format
Claus Gittinger <cg@exept.de>
parents: 1865
diff changeset
  1625
StandardSystemView initialize!