home *** CD-ROM | disk | FTP | other *** search
-
- // -------------------------------------------------------------------
- // The Aurora Editor v2.1
- // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
- //
- // Mouse definitions (included by MAIN.AML)
- //
- // If you have made any changes, save this file and select 'Recompile
- // the Editor' <alt f2> from the Set menu. Exit and re-enter the
- // editor for your changes to take effect.
- // -------------------------------------------------------------------
-
- // -------------------------------------------------------------------
- // Edit and File Manager windows
- // -------------------------------------------------------------------
-
-
- object edit_fmgr
-
- // left button down
- function <lbutton>
- if button? 2 then
- queue <chord>
- else
- pass
- end
- end
-
- // right button down
- function <rbutton>
- if button? 1 then
- queue <chord>
- else
- case getregion
- when 1
- gotomenu
- when 11, 12
- open "*.*"
- otherwise
- pass
- end
- end
- end
-
- // left & right button down (mouse chording)
- function <chord>
- end
-
- // left button double-click
- function <ldouble>
-
- case getregion
-
- // background
- when ''
- winlist
-
- // title bars
- when 11, 12
- if max? or min? then
- restore
- else
- maximize
- end
-
- otherwise
- pass
- end
- end
-
-
- // -------------------------------------------------------------------
- // Prompts and Edit windows
- // -------------------------------------------------------------------
-
- object prompt
-
- // left button down
- function <lbutton>
- // pass on to the library (lib.x)
- pass
- // library may switch windows, so check...
- if wintype? "prompt" then
- _lbf =''
- case getregion
- // retrieve tab
- when 14
- askhistory
- // left title
- when 13
- call <lbuttonup>
- close
- // client area
- when 1
- // set flag for mouse marking
- _lbf = 1
- trackmouse
- end
- end
- end
-
- // move mouse
- function <move>
- if _lbf then
-
- // mouse marking
- if _lbf == 1 then
- destroymark
-
- mark_type = if? (wintype? "edit") (shiftkey? 0Fh) 1h
-
- // get the mark type from the keyboard shift-state or the
- // MouMark config variable
- if not mark_type then
- mark_type = case _MouMark
- when 'k' 4h
- when 'l' 8h
- otherwise 1h
- end
- end
-
- case mark_type
- when 4h markcolumn
- when 8h markline
- otherwise markstream
- end
- _lbf = 2
- end
- trackmouse
- else
- pass
- end
- end
-
- // left button up
- function <lbuttonup>
- if _lbf then
- stopmark
- _lbf = ''
- end
- pass
- end
-
-
- // -------------------------------------------------------------------
- // Edit windows
- // -------------------------------------------------------------------
-
- object edit
-
- // left button double-click
- function <ldouble>
- case getregion
- when 1
- destroymark
- case _MouMarkD
- when 'k' markcolumn
- when 's' markstream
- otherwise markline
- end
- setobj _lbf 2 "prompt"
- otherwise
- pass
- end
- end
-
- // left button triple-click
- function <ltriple>
- case getregion
- when 1
- markword
- end
- end
-
-
- // -------------------------------------------------------------------
- // File Manager windows
- // -------------------------------------------------------------------
-
- object fmgr
-
- // double click to open
- function <ldouble>
- _lbf = ''
- case getregion
- when 1
- fopen '1'
- otherwise
- pass
- end
- end
-
- // left button down
- function <lbutton>
- // pass on to the library (lib.x)
- pass
- // library may switch windows, so check...
- if wintype? "fmgr" then
- if getregion == 1 then
- _lbf = 1
- trackmouse
- // toggle file mark if <ctrl> is pressed
- if shiftkey? 4h then
- fmark
- end
- else
- _lbf = ''
- end
- end
- end
-
- // mouse move
- function <move>
- y = getmousey 'e'
- if _lbf and (button? 1h) then
- if shiftkey? and y <> _lasty then
- fmark
- end
- _lasty = y
- trackmouse
- else
- _lbf = ''
- pass
- end
- end
-
- // left button up
- function <lbuttonup>
- _lbf = ''
- pass
- end
-
-