Commit e1f4cd2d authored by Diederik van Arkel's avatar Diederik van Arkel
Browse files

cleanup for Clean2 release

parent af9b4495
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
......
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
......
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
......
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
......
/*
* EdFile.dcl: reading and writing text files
*/
definition module EdFile
// reading and writing text files
import StdError, StdMaybe
from StdFile import class FileSystem
from EdText import :: Text
import StdError, StdMaybe
from UtilNewlinesFile import :: NewlineConvention
readText :: !String !*env -> ((Error Text,NewlineConvention,Bool), !*env) | FileSystem env
......
/*
* 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
......
/*
* 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)
......
/*
* 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
......
/*
* EdKeyboard.dcl: handling keyboard events
*/
definition module EdKeyboard
// handling keyboard events
import EdCommon, StdMaybe
from StdIOCommon import :: KeyboardState
from StdPSt import :: PSt
//from EdState import EditorState
from EdKeyMapping import :: KeyMapping
import EdMonad, StdMaybe
import EdCommon
editWindowKeyboard ::
KeyMapping KeyboardState !(!EditState, !PSt PLocState) -> (!EditState, !PSt PLocState)
......
/*
* 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`
......
/*
* 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
......
/*
* EdLineText.icl: a type for dealing with line-oriented operations on texts
*/
implementation module EdLineText
// 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
......
/*
* EdLook.dcl: the edit window update function
*/
definition module EdLook
// the edit window update function
from StdPicture import :: Picture
from StdIOCommon import :: SelectState, :: UpdateState
import EdMonad
......
/*
* 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
......
/*
* 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
......
/*
* EdMessage.icl: message passing with the editor
*/
implementation module EdMessage
// message passing with the editor
import StdFunc, StdMisc
import StdReceiver, StdPSt, StdId
import EdMonad
......
/*
* 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
......
/*
* 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
......
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.
//*********************************************************************************
/*
* EdMouse.dcl: handling mouse events
*/
// handling mouse events
from StdIOCommon import :: MouseState
from StdPSt import :: PSt
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment