Skip to content
GitLab
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-ide
Commits
da3a144d
Commit
da3a144d
authored
Feb 21, 2003
by
Diederik van Arkel
Browse files
consolidate font filtering
parent
6d30fd2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Ide/conswin.icl
View file @
da3a144d
...
...
@@ -8,7 +8,7 @@ import EdMouse, EdKeyboard
from
StrictList
import
slFromList
from
UtilStrictLists
import
StrictListToList
,::
List
(:!),
IsEmptyList
import
IDE
,
IdeState
,
UtilIO
import
IDE
,
IdeState
,
IdePlatform
//--
...
...
@@ -199,19 +199,6 @@ cw_deactivate ps
import
morecontrols
,
colorpickcontrol
,
ioutil
,
colourclip
import
StdClipboard
lisFixedWidth
::
.
FontName
*
Picture
->
(
Bool
,*
Picture
)
lisFixedWidth
fontname
env
#
((
ok
,
font
),
env
)
=
openFont
{
fName
=
fontname
,
fSize
=
12
,
fStyles
=[]}
env
|
not
ok
=
(
ok
,
env
)
#
(
wide
,
env
)
=
getFontCharWidth
font
'M'
env
(
narrow
,
env
)
=
getFontCharWidth
font
'i'
env
=
(
wide
==
narrow
,
env
)
lfilter
::
[.
Bool
]
[.
a
]
->
[.
a
];
lfilter
[
True
:
r
]
[
a
:
x
]
=
[
a
:
lfilter
r
x
]
lfilter
[_:
r
]
[_:
x
]
=
lfilter
r
x
lfilter
_
_
=
[]
::
CWC_LS
=
{
cur
::
CWC_CR
// current colour
,
txt
::
Colour
...
...
@@ -248,7 +235,8 @@ conswinPane ps
#
(
fontNames
,
ps
)
=
accPIO
(
accScreenPicture
getFontNames
)
ps
// filter fixed width fonts....
#
(
fixed
,
ps
)
=
seqList
(
map
(\
f
->
accPIO
(
accScreenPicture
(
lisFixedWidth
f
)))
fontNames
)
ps
// # (fixed,ps) = seqList (map (\f->accPIO (accScreenPicture (lisFixedWidth f))) fontNames) ps
#
(
fixed
,
ps
)
=
accPIO
(
accScreenPicture
(
seqList
(
map
lisFixedWidth
fontNames
)))
ps
#
fontNames
=
lfilter
fixed
fontNames
#
fontSizes
=
[
7
,
8
,
9
,
10
,
12
,
14
,
18
,
24
]
#
{
conswinfont
={
fName
=
inifn
,
fSize
=
inifs
},
conswinsync
=
sync
}
...
...
Ide/edoptions.icl
View file @
da3a144d
...
...
@@ -4,7 +4,7 @@ import StdTuple, StdEnum, StdList, StdFunc, StdMisc
import
StdMenu
,
StdWindow
,
StdId
,
StdPSt
,
StdControl
import
StdClipboard
,
StdControlReceiver
import
EdKeyMapping
,
EdState
,
EdClient
,
EdKeyboard
import
IDE
,
IdeState
,
ExtNotice
,
UtilIO
import
IDE
,
IdeState
,
ExtNotice
,
IdePlatform
import
colorpickcontrol
import
ioutil
,
morecontrols
import
typewin
,
colourclip
...
...
@@ -27,21 +27,6 @@ where
//--
lisFixedWidth
::
.
FontName
*
Picture
->
(
Bool
,*
Picture
)
lisFixedWidth
fontname
env
#
((
ok
,
font
),
env
)
=
openFont
{
fName
=
fontname
,
fSize
=
12
,
fStyles
=[]}
env
|
not
ok
=
(
ok
,
env
)
#
(
wide
,
env
)
=
getFontCharWidth
font
'M'
env
(
narrow
,
env
)
=
getFontCharWidth
font
'i'
env
=
(
wide
==
narrow
,
env
)
lfilter
::
[.
Bool
]
[.
a
]
->
[.
a
];
lfilter
[
True
:
r
]
[
a
:
x
]
=
[
a
:
lfilter
r
x
]
lfilter
[_:
r
]
[_:
x
]
=
lfilter
r
x
lfilter
_
_
=
[]
//--
::
ECLS
=
{
ids
::[
Id
],
act
::
Int
,
cls
::[
Colour
],
mfs
::
EditMenuLS
General
}
froot
txt
ps
...
...
@@ -527,7 +512,8 @@ defaultFontAndTabs :: !*(PSt *General) -> *(PSt *General)
defaultFontAndTabs
ps
#
(
names
,
ps
)
=
accPIO
(
accScreenPicture
getFontNames
)
ps
// filter fixed width fonts....
#
(
fixed
,
ps
)
=
seqList
(
map
(\
f
->
accPIO
(
accScreenPicture
(
lisFixedWidth
f
)))
names
)
ps
// # (fixed,ps) = seqList (map (\f->accPIO (accScreenPicture (lisFixedWidth f))) names) ps
#
(
fixed
,
ps
)
=
accPIO
(
accScreenPicture
(
seqList
(
map
lisFixedWidth
names
)))
ps
#
names
=
lfilter
fixed
names
#
(
prefs
,
ps
)
=
getPrefs
ps
#
fontdef
=
prefs
.
edwinfont
...
...
Ide/errwin.icl
View file @
da3a144d
...
...
@@ -12,7 +12,7 @@ from IdeState import :: General, getErrInfo, setErrInfo, :: ErrorInfo, :: MenuId
from
IdeState
import
::
SearchMenuIds
,
::
PLMMessage
,
::
PLMReply
,
::
MIn
,
::
EditMenuLS
,
getInteract
,
writeLog
from
EdClient
import
lineSelection
import
EdClient
import
UtilIO
import
IdePlatform
/*
ADD:
...
...
Ide/typewin.icl
View file @
da3a144d
...
...
@@ -8,7 +8,7 @@ import EdMouse, EdKeyboard
from
StrictList
import
slFromList
from
UtilStrictLists
import
StrictListToList
,::
List
(:!),
IsEmptyList
import
IDE
,
IdeState
,
UtilIO
import
IDE
,
IdeState
,
IdePlatform
import
morecontrols
,
colorpickcontrol
,
ioutil
,
colourclip
import
StdClipboard
...
...
@@ -214,19 +214,6 @@ tw_deactivate ps
//-- type win options...
lisFixedWidth
::
.
FontName
*
Picture
->
(
Bool
,*
Picture
)
lisFixedWidth
fontname
env
#
((
ok
,
font
),
env
)
=
openFont
{
fName
=
fontname
,
fSize
=
12
,
fStyles
=[]}
env
|
not
ok
=
(
ok
,
env
)
#
(
wide
,
env
)
=
getFontCharWidth
font
'M'
env
(
narrow
,
env
)
=
getFontCharWidth
font
'i'
env
=
(
wide
==
narrow
,
env
)
lfilter
::
[.
Bool
]
[.
a
]
->
[.
a
];
lfilter
[
True
:
r
]
[
a
:
x
]
=
[
a
:
lfilter
r
x
]
lfilter
[_:
r
]
[_:
x
]
=
lfilter
r
x
lfilter
_
_
=
[]
::
TWC_LS
=
{
cur
::
TWC_CR
// current colour
,
txt
::
Colour
...
...
@@ -262,7 +249,8 @@ typewinPane ps
#
(
twi
,
ps
)
=
accPLoc
getTypeWinInfo
ps
#
(
fontNames
,
ps
)
=
accPIO
(
accScreenPicture
getFontNames
)
ps
#
(
fixed
,
ps
)
=
seqList
(
map
(\
f
->
accPIO
(
accScreenPicture
(
lisFixedWidth
f
)))
fontNames
)
ps
// # (fixed,ps) = seqList (map (\f->accPIO (accScreenPicture (lisFixedWidth f))) fontNames) ps
#
(
fixed
,
ps
)
=
accPIO
(
accScreenPicture
(
seqList
(
map
lisFixedWidth
fontNames
)))
ps
#
fontNames
=
lfilter
fixed
fontNames
#
fontSizes
=
[
7
,
8
,
9
,
10
,
12
,
14
,
18
,
24
]
#
{
typewinfont
={
fName
=
inifn
,
fSize
=
inifs
},
typewinsync
=
sync
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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