Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
b7db3ec7
Commit
b7db3ec7
authored
Nov 04, 2005
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make new window fit in outer window / screen
parent
66f28a3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
Ed/EdWindow.icl
Ed/EdWindow.icl
+16
-2
No files found.
Ed/EdWindow.icl
View file @
b7db3ec7
...
...
@@ -6,9 +6,20 @@ import StdInt, StdClass, StdList
import
StdWindow
,
StdControlReceiver
,
StdIOBasic
import
EdMessage
,
EdMonad
,
EdLook
,
EdVisualText
,
EdState
import
ioutil
from
StdProcess
import
getProcessWindowSize
//---
determine_default_window_size
::
!
Int
!*(
IOSt
*
a
)
->
(!
Size
,!*(
IOSt
*
a
))
determine_default_window_size
lineHeight
io
#
({
w
=
process_window_width
,
h
=
process_window_height
},
io
)
=
getProcessWindowSize
io
default_window_width
=
process_window_width
-40
default_window_width
=
if
(
default_window_width
>
800
)
800
(
if
(
default_window_width
<
100
)
100
default_window_width
)
process_window_lines
=
(
process_window_height
-60
)
/
lineHeight
default_window_lines
=
if
(
process_window_lines
>
40
)
40
(
if
(
process_window_lines
<
5
)
5
process_window_lines
)
=
({
w
=
default_window_width
,
h
=
default_window_lines
*
lineHeight
},
io
)
openEditWindow
::
Id
.
Title
String
Text
!
Font
(
Int
,
Bool
,
Bool
,
Bool
,
Bool
)
Int
SyntaxColours
Id
[.
WindowAttribute
*(
EditState
,*
PSt
*
b
)]
!*(
PSt
*
b
)
->
*
PSt
*
b
|
Editor
b
openEditWindow
uId
title
pathName
text
font
tabs
margin
syncols
windowId
atts
ps
#
(
editorState
,
ps
)
=
getEditorState
ps
...
...
@@ -23,8 +34,11 @@ openEditWindow uId title pathName text font tabs margin syncols windowId atts ps
(
viewDomain
,
(
editState
,
ps
))
=
computeViewDomain
(
editState
,
ps
)
// setup the window attributes
editLook
=
editWindowLook
editState
(
default_window_size
,
io
)
=
determine_default_window_size
fontInfo
.
FontInfo
.
lineHeight
ps
.
io
ps
=
{
ps
&
io
=
io
}
windowAttrs
=
atts
++
// in this order so that new attributes override default atts
[
WindowViewSize
{
w
=
800
,
h
=
fontInfo
.
FontInfo
.
lineHeight
*
40
}
[
WindowViewSize
default_window_size
,
WindowHMargin
0
0
,
WindowVMargin
0
0
,
WindowId
windowId
...
...
Write
Preview
Markdown
is supported
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