Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
fa1f2c0e
Commit
fa1f2c0e
authored
Dec 17, 1999
by
Peter Achten
Browse files
(PA): (1) hiding/showing layout control in window bug fixed.
(2) activate bug of zoomed windows fixed.
parent
3edae9dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
libraries/ObjectIO/ObjectIO/OS Windows/oswindow.dcl
View file @
fa1f2c0e
...
...
@@ -82,7 +82,7 @@ OSgetSliderControlMinWidth :: !OSWindowMetrics -> Int
it is an OSWindowPtr if it must be placed behind a given window.
OScreateWindow isResizable hScrollInfo vScrollInfo minSize maxSize
isClosable title pos size
getcontrolfocus createcontrols updatecontrols osdocinfo controlinfo
getcontrolfocus createcontrols updatecontrols osdocinfo
behindPtr
controlinfo
creates a window with the given title, position and size.
The isResizable argument is True iff the window is user resizable.
The hScrollInfo argument represents the horizontal scrollbar of the window.
...
...
@@ -122,9 +122,10 @@ OScreateWindow :: !OSWindowMetrics !Bool !ScrollbarInfo !ScrollbarInfo !(!Int,!I
!(.
s
->(
OSWindowPtr
,.
s
))
!(
OSWindowPtr
->
.
s
->
*
OSToolbox
->
(.
s
,*
OSToolbox
))
!(
OSWindowPtr
->
OSWindowPtr
->
OSPictContext
->.
s
->*
OSToolbox
->(.
s
,*
OSToolbox
))
!
OSDInfo
!.
s
!*
OSToolbox
!
OSDInfo
!
OSWindowPtr
!.
s
!*
OSToolbox
->
(![
DelayActivationInfo
],!
OSWindowPtr
,!
OSWindowPtr
,!
OSWindowPtr
,!
OSDInfo
,!.
s
,!*
OSToolbox
)
OScreateModalDialog
::
!
Bool
!
String
!
OSDInfo
!(
Maybe
OSWindowPtr
)
!(
OSEvent
->
.
s
->
([
Int
],.
s
))
!.
s
!*
OSToolbox
->
(!
Bool
,!.
s
,!*
OSToolbox
)
OScreateModalDialog
::
!
Bool
!
String
!
OSDInfo
!(
Maybe
OSWindowPtr
)
!(
OSEvent
->
.
s
->
([
Int
],.
s
))
!.
s
!*
OSToolbox
->
(!
Bool
,!.
s
,!*
OSToolbox
)
// Mike //
...
...
@@ -339,17 +340,21 @@ OSvalidateWindowRgn :: !OSWindowPtr !OSRgnHandle !*OSToolbox -> *OSToolbox
OSdisableWindow
::
!
OSWindowPtr
!(!
Bool
,!
Bool
)
!
Bool
!*
OSToolbox
->
*
OSToolbox
OSenableWindow
::
!
OSWindowPtr
!(!
Bool
,!
Bool
)
!
Bool
!*
OSToolbox
->
*
OSToolbox
/* OSactivateWindow osdInfo thisWindow
activates thisWindow.
/* OSactivateWindow osdInfo thisWindow
handleEvents info
activates thisWindow.
The handleEvents function is applied when updates are required.
OSactivateControl parentWindow theControl
activates theControl which is in parentWindow.
OSstackWindow thisWindow behindWindow
moves the window identified by thisWindow behind the window identified by behindWindow.
OSstackWindow assumes that thisWindow and behindWindow are valid values.
*/
OSactivateWindow
::
!
OSDInfo
!
OSWindowPtr
!*
OSToolbox
->
(![
DelayActivationInfo
],!*
OSToolbox
)
//OSactivateWindow :: !OSDInfo !OSWindowPtr !*OSToolbox -> (![DelayActivationInfo],!*OSToolbox)
OSactivateWindow
::
!
OSDInfo
!
OSWindowPtr
!(
OSEvent
->(.
s
,*
OSToolbox
)->(.
s
,*
OSToolbox
))
!.
s
!*
OSToolbox
->
(![
DelayActivationInfo
],!.
s
,!*
OSToolbox
)
OSactivateControl
::
!
OSWindowPtr
!
OSWindowPtr
!*
OSToolbox
->
(![
DelayActivationInfo
],!*
OSToolbox
)
OSstackWindow
::
!
OSWindowPtr
!
OSWindowPtr
!*
OSToolbox
->
*
OSToolbox
//OSstackWindow :: !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
OSstackWindow
::
!
OSWindowPtr
!
OSWindowPtr
!(
OSEvent
->(.
s
,*
OSToolbox
)->(.
s
,*
OSToolbox
))
!.
s
!*
OSToolbox
->
(![
DelayActivationInfo
],!.
s
,!*
OSToolbox
)
/* OShideWindow thisWindow activate
hides the window. If the Boolean activate is True then a new window is made the active window.
...
...
libraries/ObjectIO/ObjectIO/OS Windows/oswindow.icl
View file @
fa1f2c0e
...
...
@@ -197,14 +197,14 @@ OScreateWindow :: !OSWindowMetrics !Bool !ScrollbarInfo !ScrollbarInfo !(!Int,!I
!(.
s
->(
OSWindowPtr
,.
s
))
!(
OSWindowPtr
->.
s
->*
OSToolbox
->(.
s
,*
OSToolbox
))
!(
OSWindowPtr
->
OSWindowPtr
->
OSPictContext
->.
s
->*
OSToolbox
->(.
s
,*
OSToolbox
))
!
OSDInfo
!.
s
!*
OSToolbox
!
OSDInfo
!
OSWindowPtr
!.
s
!*
OSToolbox
->
(![
DelayActivationInfo
],!
OSWindowPtr
,!
OSWindowPtr
,!
OSWindowPtr
,!
OSDInfo
,!.
s
,!*
OSToolbox
)
OScreateWindow
wMetrics
isResizable
hInfo
=:{
cbiHasScroll
=
hasHScroll
}
vInfo
=:{
cbiHasScroll
=
hasVScroll
}
minSize
maxSize
isClosable
title
pos
size
get_focus
create_controls
update_controls
osdInfo
control_info
tb
osdInfo
behindPtr
control_info
tb
|
di
==
MDI
#
(
textPtr
,
tb
)
=
WinMakeCString
title
tb
styleFlags
=
WS_SYSMENU
...
...
@@ -213,7 +213,7 @@ OScreateWindow wMetrics isResizable hInfo=:{cbiHasScroll=hasHScroll} vInfo=:{cbi
bitor
(
if
hasVScroll
WS_VSCROLL
0
)
bitor
(
if
isResizable
WS_THICKFRAME
0
)
// bitor WS_CLIPCHILDREN
createcci
=
Rq6Cci
CcRqCREATEMDIDOCWINDOW
textPtr
osinfo
.
osClient
(
x
<<
16
+(
y
<<
16
)>>
16
)
w
h
styleFlags
createcci
=
Rq6Cci
CcRqCREATEMDIDOCWINDOW
textPtr
osinfo
.
osClient
behindPtr
(
x
<<
16
+(
y
<<
16
)>>
16
)
(
w
<<
16
+(
h
<<
16
)>>
16
)
styleFlags
#
(
returncci
,(
control_info
,
delay_info
),
tb
)
=
IssueCleanRequest
(
OScreateWindowCallback
isResizable
minSize
maxSize
create_controls
update_controls
)
createcci
...
...
@@ -972,15 +972,30 @@ OSenableWindow :: !OSWindowPtr !(!Bool,!Bool) !Bool !*OSToolbox -> *OSToolbox
OSenableWindow
theWindow
scrollInfo
modalContext
tb
=
WinSetSelectStateWindow
theWindow
scrollInfo
True
modalContext
tb
OSactivateWindow
::
!
OSDInfo
!
OSWindowPtr
!*
OSToolbox
->
(![
DelayActivationInfo
],!*
OSToolbox
)
OSactivateWindow
osdInfo
thisWindow
tb
#
(_,
delayinfo
,
tb
)
=
IssueCleanRequest
osIgnoreCallback`
(
Rq3Cci
CcRqACTIVATEWINDOW
(
toInt
isMDI
)
clientPtr
thisWindow
)
[]
tb
=
(
reverse
delayinfo
,
tb
)
OSactivateWindow
::
!
OSDInfo
!
OSWindowPtr
!(
OSEvent
->(.
s
,*
OSToolbox
)->(.
s
,*
OSToolbox
))
!.
s
!*
OSToolbox
->
(![
DelayActivationInfo
],!.
s
,!*
OSToolbox
)
OSactivateWindow
osdInfo
thisWindow
handleOSEvent
state
tb
#
(_,(
delayinfo
,
state
),
tb
)
=
IssueCleanRequest
(
osCallback
handleOSEvent
)
(
Rq3Cci
CcRqACTIVATEWINDOW
(
toInt
isMDI
)
clientPtr
thisWindow
)
([],
state
)
tb
=
(
reverse
delayinfo
,
state
,
tb
)
where
isMDI
=
getOSDInfoDocumentInterface
osdInfo
==
MDI
clientPtr
=
case
(
getOSDInfoOSInfo
osdInfo
)
of
Just
{
osClient
}
->
osClient
nothing
->
oswindowFatalError
"OSactivateWindow"
"illegal DocumentInterface context"
/* osCallback delays activate and deactivate events.
All other events are passed to the callback function.
PA: is now identical to OSstackWindow!!
*/
osCallback
::
!(
OSEvent
->(.
s
,*
OSToolbox
)->(.
s
,*
OSToolbox
))
!
CrossCallInfo
!(![
DelayActivationInfo
],!.
s
)
!*
OSToolbox
->
(!
CrossCallInfo
,!(![
DelayActivationInfo
],!.
s
),!*
OSToolbox
)
osCallback
handleOSEvent
{
ccMsg
=
CcWmACTIVATE
,
p1
=
hwnd
}
(
delayinfo
,
s
)
tb
=
(
Return0Cci
,([
DelayActivatedWindow
hwnd
:
delayinfo
],
s
),
tb
)
osCallback
handleOSEvent
{
ccMsg
=
CcWmDEACTIVATE
,
p1
=
hwnd
}
(
delayinfo
,
s
)
tb
=
(
Return0Cci
,([
DelayDeactivatedWindow
hwnd
:
delayinfo
],
s
),
tb
)
osCallback
handleOSEvent
osEvent
(
delayinfo
,
s
)
tb
#
(
s
,
tb
)
=
handleOSEvent
osEvent
(
s
,
tb
)
=
(
Return0Cci
,(
delayinfo
,
s
),
tb
)
OSactivateControl
::
!
OSWindowPtr
!
OSWindowPtr
!*
OSToolbox
->
(![
DelayActivationInfo
],!*
OSToolbox
)
OSactivateControl
parentWindow
controlPtr
tb
...
...
@@ -997,10 +1012,35 @@ where
osIgnoreCallback`
_
s
tb
=
(
Return0Cci
,
s
,
tb
)
/* PA: previous implementation of OSstackWindow ignored window updates and resizes. This is fixed below.
OSstackWindow :: !OSWindowPtr !OSWindowPtr !*OSToolbox -> *OSToolbox
OSstackWindow thisWindow behindWindow tb
= WinRestackWindow thisWindow behindWindow tb
WinRestackWindow :: !HWND !HWND !*OSToolbox -> *OSToolbox
WinRestackWindow theWindow behindWindow tb
= snd (IssueCleanRequest2 (ErrorCallback2 "WinRestackWindow") (Rq2Cci CcRqRESTACKWINDOW theWindow behindWindow) tb)
*/
OSstackWindow
::
!
OSWindowPtr
!
OSWindowPtr
!(
OSEvent
->(.
s
,*
OSToolbox
)->(.
s
,*
OSToolbox
))
!.
s
!*
OSToolbox
->
(![
DelayActivationInfo
],!.
s
,!*
OSToolbox
)
OSstackWindow
thisWindow
behindWindow
handleOSEvent
state
tb
#
(_,(
delayinfo
,
state
),
tb
)
=
IssueCleanRequest
(
osCallback
handleOSEvent
)
(
Rq2Cci
CcRqRESTACKWINDOW
thisWindow
behindWindow
)
([],
state
)
tb
=
(
reverse
delayinfo
,
state
,
tb
)
where
/* osCallback delays activate and deactivate events.
All other events are passed to the callback function.
PA: is now identical to OSactivateWindow!!
*/
osCallback
::
!(
OSEvent
->(.
s
,*
OSToolbox
)->(.
s
,*
OSToolbox
))
!
CrossCallInfo
!(![
DelayActivationInfo
],!.
s
)
!*
OSToolbox
->
(!
CrossCallInfo
,!(![
DelayActivationInfo
],!.
s
),!*
OSToolbox
)
osCallback
handleOSEvent
{
ccMsg
=
CcWmACTIVATE
,
p1
=
hwnd
}
(
delayinfo
,
s
)
tb
=
(
Return0Cci
,([
DelayActivatedWindow
hwnd
:
delayinfo
],
s
),
tb
)
osCallback
handleOSEvent
{
ccMsg
=
CcWmDEACTIVATE
,
p1
=
hwnd
}
(
delayinfo
,
s
)
tb
=
(
Return0Cci
,([
DelayDeactivatedWindow
hwnd
:
delayinfo
],
s
),
tb
)
osCallback
handleOSEvent
osEvent
(
delayinfo
,
s
)
tb
#
(
s
,
tb
)
=
handleOSEvent
osEvent
(
s
,
tb
)
=
(
Return0Cci
,(
delayinfo
,
s
),
tb
)
OShideWindow
::
!
OSWindowPtr
!
Bool
!*
OSToolbox
->
(![
DelayActivationInfo
],!*
OSToolbox
)
OShideWindow
wPtr
activate
tb
#
(_,
delayinfo
,
tb
)
=
IssueCleanRequest
osIgnoreCallback`
(
Rq3Cci
CcRqSHOWWINDOW
wPtr
(
toInt
False
)
(
toInt
activate
))
[]
tb
...
...
libraries/ObjectIO/ObjectIO/OS Windows/windowCrossCall_12.dcl
View file @
fa1f2c0e
...
...
@@ -118,8 +118,6 @@ WinSetScrollThumbSize :: !HWND !Int !Int !Int !Int !Int !*OSToolbox -> *OSToolbo
*/
WinSetEditSelection
::
!
HWND
!
Int
!
Int
!*
OSToolbox
->
*
OSToolbox
// Note: @2<=@3, @1 must point to an edit control.
WinRestackWindow
::
!
HWND
!
HWND
!*
OSToolbox
->
*
OSToolbox
// PA: new function to put first window behind second window
WinShowControl
::
!
HWND
!
Bool
!*
OSToolbox
->
*
OSToolbox
// PA: new routine to hide (False) & show (True) controls.
WinEnableControl
::
!
HWND
!
Bool
!*
OSToolbox
->
*
OSToolbox
WinEnablePopupItem
::
!
HWND
!
Int
!
Bool
!*
OSToolbox
->
*
OSToolbox
// PA: this function is currently not used, but might be
...
...
libraries/ObjectIO/ObjectIO/OS Windows/windowCrossCall_12.icl
View file @
fa1f2c0e
...
...
@@ -220,10 +220,6 @@ WinSetEditSelection :: !HWND !Int !Int !*OSToolbox -> *OSToolbox
WinSetEditSelection
editHWND
first
last
tb
=
snd
(
IssueCleanRequest2
(
ErrorCallback2
"WinSetEditSelection"
)
(
Rq3Cci
CcRqSETEDITSELECTION
editHWND
first
last
)
tb
)
WinRestackWindow
::
!
HWND
!
HWND
!*
OSToolbox
->
*
OSToolbox
WinRestackWindow
theWindow
behindWindow
tb
=
snd
(
IssueCleanRequest2
(
ErrorCallback2
"WinRestackWindow"
)
(
Rq2Cci
CcRqRESTACKWINDOW
theWindow
behindWindow
)
tb
)
WinShowControl
::
!
HWND
!
Bool
!*
OSToolbox
->
*
OSToolbox
WinShowControl
hwnd
bool
tb
=
snd
(
IssueCleanRequest2
(
ErrorCallback2
"WinShowControl"
)
(
Rq2Cci
CcRqSHOWCONTROL
hwnd
(
toInt
bool
))
tb
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment