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
e1f4cd2d
Commit
e1f4cd2d
authored
Dec 10, 2001
by
Diederik van Arkel
Browse files
cleanup for Clean2 release
parent
af9b4495
Changes
115
Hide whitespace changes
Inline
Side-by-side
Ed/EdAction.dcl
View file @
e1f4cd2d
definition
module
EdAction
//*********************************************************************************
// Original Clean Library Software Module
// Written for Clean version : 1.3
// Written for I/O version : 1.2
// Author : Diederik van Arkel
// Date :
// Last Modified by :
// Date :
// Copyright : 1999 Hilt - High Level Software Tools B.V.
// : University of Nijmegen
// e-mail : clean@cs.kun.nl or rinus@hilt.nl
//*********************************************************************************
// It is allowed to modify this module for your own purposes but it is NOT allowed
// to (re)distribute the code or the modified code in ANY form without written
// permission.
//*********************************************************************************
/*
* EdAction.dcl: performing editor Actions
*/
// performing editor Actions
import
EdMonad
,
EdMovement
import
EdCommon
...
...
Ed/EdAction.icl
View file @
e1f4cd2d
implementation
module
EdAction
//*********************************************************************************
// Original Clean Library Software Module
// Written for Clean version : 1.3
// Written for I/O version : 1.2
// Author : Diederik van Arkel
// Date :
// Last Modified by :
// Date :
// Copyright : 1999 Hilt - High Level Software Tools B.V.
// : University of Nijmegen
// e-mail : clean@cs.kun.nl or rinus@hilt.nl
//*********************************************************************************
// It is allowed to modify this module for your own purposes but it is NOT allowed
// to (re)distribute the code or the modified code in ANY form without written
// permission.
//*********************************************************************************
/*
* EdAction.icl: performing editor Actions
*/
import
StdInt
,
StdArray
,
StdTuple
,
StdBool
,
StdChar
,
StdList
,
StdMisc
import
StdIOCommon
,
StdPSt
,
StdWindow
import
EdVisualCursor
,
EdVisualText
,
EdMovement
,
StrictList
,
EdMonad
...
...
Ed/EdActionType.dcl
View file @
e1f4cd2d
definition
module
EdActionType
//*********************************************************************************
// Original Clean Library Software Module
// Written for Clean version : 1.3
// Written for I/O version : 1.2
// Author : Diederik van Arkel
// Date :
// Last Modified by :
// Date :
// Copyright : 1999 Hilt - High Level Software Tools B.V.
// : University of Nijmegen
// e-mail : clean@cs.kun.nl or rinus@hilt.nl
//*********************************************************************************
// It is allowed to modify this module for your own purposes but it is NOT allowed
// to (re)distribute the code or the modified code in ANY form without written
// permission.
//*********************************************************************************
import
StdOverloaded
import
EdMovement
from
EdText
import
::
TextFragment
...
...
Ed/EdActionType.icl
View file @
e1f4cd2d
implementation
module
EdActionType
//*********************************************************************************
// Original Clean Library Software Module
// Written for Clean version : 1.3
// Written for I/O version : 1.2
// Author : Diederik van Arkel
// Date :
// Last Modified by :
// Date :
// Copyright : 1999 Hilt - High Level Software Tools B.V.
// : University of Nijmegen
// e-mail : clean@cs.kun.nl or rinus@hilt.nl
//*********************************************************************************
// It is allowed to modify this module for your own purposes but it is NOT allowed
// to (re)distribute the code or the modified code in ANY form without written
// permission.
//*********************************************************************************
import
StdOverloaded
,
StdArray
,
StdInt
,
StdString
,
StdChar
,
StdList
import
StrictList
import
EdMovement
...
...
Ed/EdFile.dcl
View file @
e1f4cd2d
/*
* EdFile.dcl: reading and writing text files
*/
definition
module
EdFile
from
StdFile
import
class
FileSystem
from
EdText
import
::
Text
import
StdError
,
StdMaybe
from
UtilNewlinesFile
import
::
NewlineConvention
// reading and writing text files
import
StdError
,
StdMaybe
from
StdFile
import
class
FileSystem
from
EdText
import
::
Text
from
UtilNewlinesFile
import
::
NewlineConvention
readText
::
!
String
!*
env
->
((
Error
Text
,
NewlineConvention
,
Bool
),
!*
env
)
|
FileSystem
env
writeText
::
!
String
!
NewlineConvention
!
Text
!*
env
->
(
Maybe
String
,
!*
env
)
|
FileSystem
env
...
...
Ed/EdFile.icl
View file @
e1f4cd2d
/*
* EdFile.icl: reading and writing text files
*/
implementation
module
EdFile
// reading and writing text files
import
StdBool
,
StdFile
,
StdArray
,
StdInt
,
StdString
,
StdChar
,
StdFunc
import
UtilNewlinesFile
import
EdText
,
StrictList
...
...
Ed/EdFind.dcl
View file @
e1f4cd2d
definition
module
EdFind
import
StdMaybe
from
StrictList
import
::
StrictList
import
EdSelection
import
StdMaybe
from
StrictList
import
::
StrictList
import
EdSelection
simpleLineSearch
::
// plain search
...
...
Ed/EdKeyMapping.dcl
View file @
e1f4cd2d
/*
* EdKeyMapping.dcl: configuring the key mapping of the editor
*/
definition
module
EdKeyMapping
// configuring the key mapping of the editor
from
StdFile
import
::
Files
from
StdPSt
import
::
PSt
from
StdIOCommon
import
::
KeyboardState
,
::
SpecialKey
from
StdMaybe
import
::
Maybe
from
StdOverloaded
import
class
==,
class
toString
,
class
fromString
from
EdActionType
import
::
Action
//from EdMonad import EditMonad, EditState, StateM
::
KeyMapping
...
...
@@ -19,6 +16,7 @@ from EdActionType import :: Action
// not allowed. The type should be:
// configureKeyMapping :: (PSt EditorState .p) -> (PSt EditorState .p)
// But then you have to import EdState which imports this module...
// => can be removed in Clean 2.0!
configureKeyMapping
::
KeyMapping
(
KeyMapping
(
PSt
.
l
)
->
(
PSt
.
l
))
(
PSt
.
l
)
->
(
PSt
.
l
)
...
...
Ed/EdKeyMapping.icl
View file @
e1f4cd2d
/*
* EdKeyMapping.icl: configuring the key mapping of the editor
*/
implementation
module
EdKeyMapping
//import StdEnv, StdIO
// configuring the key mapping of the editor
import
StdArray
,
StdEnum
,
StdFunc
,
StdMisc
,
StdOrdList
,
StdTuple
import
StdFileSelect
,
StdPStClass
,
StdWindow
import
EdState
,
Table
,
StdListBox
...
...
Ed/EdKeyboard.dcl
View file @
e1f4cd2d
/*
* EdKeyboard.dcl: handling keyboard events
*/
definition
module
EdKeyboard
from
StdIOCommon
import
::
KeyboardState
from
StdPSt
import
::
PSt
//from EdState
import
Ed
itorStat
e
from
EdKeyMapping
import
::
Key
Mapping
import
EdMonad
,
StdMaybe
import
EdCommon
// handling keyboard events
import
Ed
Common
,
StdMayb
e
from
StdIOCommon
import
::
Key
boardState
from
StdPSt
import
::
PSt
from
EdKeyMapping
import
::
KeyMapping
editWindowKeyboard
::
KeyMapping
KeyboardState
!(!
EditState
,
!
PSt
PLocState
)
->
(!
EditState
,
!
PSt
PLocState
)
...
...
Ed/EdKeyboard.icl
View file @
e1f4cd2d
/*
* EdKeyboard.icl: handling keyboard events
*/
implementation
module
EdKeyboard
// handling keyboard events
import
StdClass
,
StdBool
,
StdArray
,
StdInt
,
StdChar
,
StdTuple
,
StdList
,
StdMisc
import
StdIOCommon
,
StdWindow
,
StdPSt
import
EdVisualText
,
EdVisualCursor
,
EdSelection
,
EdAction
,
EdKeyMapping
,
EdState
,
StrictList
import
EdVisualText
,
EdVisualCursor
,
EdSelection
,
EdAction
,
EdKeyMapping
,
EdState
import
StrictList
import
EdActionType
//from dodebug import trace_n`
...
...
Ed/EdLineText.dcl
View file @
e1f4cd2d
/*
* EdLineText.dcl: a type for dealing with line-oriented operations on texts
*/
definition
module
EdLineText
// a type for dealing with line-oriented operations on texts
from
StrictList
import
::
StrictList
from
EdPosition
import
::
LineNr
...
...
Ed/EdLineText.icl
View file @
e1f4cd2d
/*
* EdLineText.icl: a type for dealing with line-oriented operations on texts
*/
implementation
module
EdLineText
import
StdString
,
StdClass
,
StdInt
,
StdList
,
StdBool
,
StdFunc
,
StdArray
,
StdTuple
import
StrictList
from
EdPosition
import
::
LineNr
import
syncol
import
Platform
// a type for dealing with line-oriented operations on texts
import
StdString
,
StdClass
,
StdInt
,
StdList
,
StdBool
,
StdFunc
,
StdArray
,
StdTuple
import
StrictList
from
EdPosition
import
::
LineNr
import
syncol
import
Platform
//-- stuff we want to parametrise...
/*
...
...
Ed/EdLook.dcl
View file @
e1f4cd2d
/*
* EdLook.dcl: the edit window update function
*/
definition
module
EdLook
from
StdPicture
import
::
Picture
from
StdIOCommon
import
::
SelectState
,
::
UpdateState
import
EdMonad
// the edit window update function
from
StdPicture
import
::
Picture
from
StdIOCommon
import
::
SelectState
,
::
UpdateState
import
EdMonad
editWindowLook
::
EditState
SelectState
!
UpdateState
->
(!*
Picture
->
*
Picture
)
// editWindowLook: defines the look of the editor window. This function
...
...
Ed/EdLook.icl
View file @
e1f4cd2d
/*
* EdLook.icl: the edit window update function
*/
implementation
module
EdLook
// the edit window update function
import
StdInt
,
StdBool
,
StdClass
import
StdIOCommon
import
StdPicture
...
...
@@ -30,15 +28,6 @@ where
(
height
,
ds4
)
=
getCursorHeight
ds3
(
selection
=:{
end
},_)
=
getSelection
ds4
/*
import StdDebug,dodebug
traceUpdate [] s = s
traceUpdate [h:t] s
#! s = trace_n h s
= traceUpdate t s
*/
cleanUpdate
[]
=
[]
cleanUpdate
[
h
:
t
]
|
h
.
corner1
.
x
==
h
.
corner2
.
x
=
cleanUpdate
t
...
...
Ed/EdMessage.dcl
View file @
e1f4cd2d
/*
* EdMessage.dcl: message passing with the editor
*/
definition
module
EdMessage
// message passing with the editor
from
StdId
import
class
Ids
from
StdPSt
import
::
PSt
from
StdReceiver
import
::
Receiver2
...
...
Ed/EdMessage.icl
View file @
e1f4cd2d
/*
* EdMessage.icl: message passing with the editor
*/
implementation
module
EdMessage
// message passing with the editor
import
StdFunc
,
StdMisc
import
StdReceiver
,
StdPSt
,
StdId
import
EdMonad
...
...
Ed/EdMonad.dcl
View file @
e1f4cd2d
/*
* EdMonad.dcl: the monad that keeps track of the local EditState and another state (mostly the program state)
*/
definition
module
EdMonad
// the monad that keeps track of the local EditState and another state (mostly the program state)
from
StdPicture
import
::
Font
,
::
FontMetrics
,
::
Colour
from
StdPSt
import
::
PSt
,
::
IOSt
from
StdId
import
::
Id
...
...
@@ -59,8 +57,6 @@ from EdSelection import :: Selection, :: Position, :: ColumnNr, :: LineNr
DefaultSyntaxColours
::
!
SyntaxColours
//:: CursorInfo
::
UndoInfo
=
{
state
::
!
UndoState
// undo or redo
,
action
::
!
String
// string describing action to be undone/redone
...
...
Ed/EdMonad.icl
View file @
e1f4cd2d
/*
* EdMonad.icl: the monad that keeps track of the local EditState and another state (mostly the program state)
*/
implementation
module
EdMonad
// the monad that keeps track of the local EditState and another state (mostly the program state)
import
StdArray
,
StdBool
,
StdChar
,
StdClass
,
StdFunc
,
StdInt
,
StdMisc
import
StdMenuElement
,
StdPSt
,
StdWindow
,
StdSystem
import
UtilNewlinesFile
,
StateMonad
import
StdId
// P4
import
StdId
import
EdVisualText
,
EdSelection
,
EdLook
import
EdAction
...
...
@@ -522,7 +519,7 @@ getUndoInfo
setUndoInfo
::
UndoInfo
->
EditMonad
(
PSt
.
l
)
nothing
setUndoInfo
undoInfo
=
getEditState
>>>=
\{
/*undomId,*/
undoeId
}
->
=
getEditState
>>>=
\{
undoeId
}
->
appEnv
(
appPIO
(
mfun
undoeId
))
>>>
updateEditState
update
where
...
...
Ed/EdMouse.dcl
View file @
e1f4cd2d
definition
module
EdMouse
//*********************************************************************************
// Original Clean Library Software Module
// Written for Clean version : 1.3
// Written for I/O version : 1.2
// Author : Diederik van Arkel
// Date :
// Last Modified by :
// Date :
// Copyright : 1999 Hilt - High Level Software Tools B.V.
// : University of Nijmegen
// e-mail : clean@cs.kun.nl or rinus@hilt.nl
//*********************************************************************************
// It is allowed to modify this module for your own purposes but it is NOT allowed
// to (re)distribute the code or the modified code in ANY form without written
// permission.
//*********************************************************************************
// handling mouse events
/*
* EdMouse.dcl: handling mouse events
*/
from
StdIOCommon
import
::
MouseState
from
StdPSt
import
::
PSt
import
EdMonad
,
EdCommon
from
StdIOCommon
import
::
MouseState
from
StdPSt
import
::
PSt
import
EdMonad
,
EdCommon
editWindowMouse
::
MouseState
(!
EditState
,
!
PSt
PLocState
)
->
(
EditState
,
PSt
PLocState
)
// editWindowMouse: handles mouse events in the edit window
...
...
Prev
1
2
3
4
5
6
Next
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