home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / Oberon⁄F / System / Docu / Controllers (.txt) next >
Encoding:
Oberon Document  |  1994-06-07  |  32.4 KB  |  506 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Geneva
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Geneva
  22. HostPictures.StdViewDesc
  23. Geneva
  24. Dialog
  25. Views
  26. Files
  27. Ports
  28. Domains
  29. Fonts
  30. Stores
  31. Models
  32. Controllers
  33. Geneva
  34. model
  35. controller
  36. controller
  37. uld be
  38. Geneva
  39. Geneva
  40. front path
  41. target path
  42. front focus
  43. target focus
  44. front window
  45. bottom window
  46. focus hierarchy
  47. Geneva
  48. Geneva
  49. 5.8 Controllers
  50. DEFINITION Controllers;
  51.     IMPORT Fonts, Ports, Stores, Views;
  52.     CONST
  53.         now = 0;
  54.         frontPath = FALSE; targetPath = TRUE;
  55.         decLine = 0; incLine = 1; decPage = 2; incPage = 3; gotoPos = 4;
  56.         nextPageX = 0; nextPageY = 0; gotoPageX = 2; gotoPageY = 3;
  57.         cut = 0; copy = 1;
  58.         pasteChar = 2; pasteLChar = 3; paste = 4; pasteView = 5;
  59.         doubleClick = 0; extend = 1; modifiy = 2;
  60.         noMark = FALSE; mark = TRUE;
  61.     TYPE
  62.         LONGCHAR = INTEGER;
  63.         Controller = POINTER TO ControllerDesc;
  64.         ControllerDesc = RECORD (Stores.StoreDesc)
  65.             PROCEDURE (c: Controller) Clone (): Controller;
  66.             PROCEDURE (c: Controller) CopyFrom (source: Controller);
  67.             PROCEDURE (c: Controller) InitView (v: Views.View);
  68.             PROCEDURE (c: Controller) ThisView (): Views.View;
  69.             PROCEDURE (c: Controller) ThisFocus (): Views.View;
  70.             PROCEDURE (c: Controller) ConsiderFocusRequestBy (view: Views.View);
  71.             PROCEDURE (c: Controller) RestoreMarks (f: Views.Frame; l, t, r, b: LONGINT);
  72.             PROCEDURE (c: Controller) Neutralize;
  73.             PROCEDURE (c: Controller) HandleModelMsg (VAR msg: Models.Message);
  74.             PROCEDURE (c: Controller) HandleViewMsg (f: Views.Frame; VAR msg: Views.Message);
  75.             PROCEDURE (c: Controller) HandleCtrlMsg (f: Views.Frame; VAR msg: Message;
  76.                                                                                     focus: Views.View);
  77.             PROCEDURE (c: Controller) HandlePropMsg (VAR msg: Views.PropMessage)
  78.         END;
  79.         Directory = POINTER TO DirectoryDesc;
  80.         DirectoryDesc = RECORD
  81.             PROCEDURE (d: Directory) New (): Controller
  82.         END;
  83.         Forwarder = POINTER TO ForwarderDesc;
  84.         ForwarderDesc = RECORD
  85.             PROCEDURE (n: Forwarder) Forward (target: BOOLEAN; VAR msg: Message);
  86.             PROCEDURE (n: Forwarder) Transfer (VAR msg: TransferMessage)
  87.         END;
  88.         Action = POINTER TO ActionDesc;
  89.         ActionDesc = RECORD
  90.             notBefore-: LONGINT;
  91.             PROCEDURE (a: Action) Do
  92.         END;
  93.         Message = Views.CtrlMessage;
  94.         PollFocusMsg = RECORD (Message)
  95.             focus: Views.Frame
  96.         END;
  97.         PollSectionMsg = RECORD (Message)
  98.             focus, vertical: BOOLEAN
  99.             wholeSize, partSize, partPos: LONGINT;
  100.             valid, done: BOOLEAN
  101.         END;
  102.         PollOpsMsg = RECORD (Message)
  103.             type: Stores.TypeName;
  104.             singleton, pasteFrom: Views.View;
  105.             selectable, deselectable: BOOLEAN;
  106.             valid: SET
  107.         END;
  108.         ScrollMsg = RECORD (Message)
  109.             focus, vertical: BOOLEAN
  110.             op: INTEGER;
  111.             pos: LONGINT;
  112.             done: BOOLEAN
  113.         END;
  114.         PageMsg = RECORD (Message)
  115.             op: INTEGER;
  116.             pageX, pageY: INTEGER;
  117.             done, eox, eoy: BOOLEAN
  118.         END;
  119.         TickMsg = RECORD (Message)
  120.             tick: LONGINT
  121.         END;
  122.         MarkMsg = RECORD (Message)
  123.             show: BOOLEAN
  124.         END;
  125.         SelectMsg = RECORD (Message)
  126.             set: BOOLEAN
  127.         END;
  128.         RequestMessage = RECORD (Message)
  129.             requestFocus: BOOLEAN
  130.         END;
  131.         EditMsg = RECORD (RequestMessage)
  132.             op: INTEGER;
  133.             modifiers: SET;
  134.             char: CHAR;
  135.             lchar: LONGCHAR;
  136.             view: Views.View;
  137.             w, h: LONGINT
  138.         END;
  139.         ReplaceViewMsg = RECORD (RequestMessage)
  140.             old, new: Views.View
  141.         END;
  142.         CursorMessage = RECORD (RequestMessage)
  143.             x, y: LONGINT
  144.         END;
  145.         PollCursorMsg = RECORD (CursorMessage)
  146.             cursor: INTEGER
  147.         END;
  148.         TrackMsg = RECORD (CursorMessage)
  149.             modifiers: SET
  150.         END;
  151.         TransferMessage = RECORD (CursorMessage)
  152.             source: Views.Frame;
  153.             sourceX, sourceY: LONGINT
  154.         END;
  155.         PollDropMsg = RECORD (TransferMessage)
  156.             mark: BOOLEAN;
  157.             show: BOOLEAN;
  158.             view: Views.View;
  159.             dest: Views.Fram
  160.         END;
  161.         DropMsg = RECORD (CursorMessage)
  162.             view: Views.View;
  163.             w, h: LONGINT
  164.         END;
  165.         resolution-: LONGINT;
  166.         path-: BOOLEAN;
  167.     PROCEDURE Forward (VAR msg: Message);
  168.     PROCEDURE FocusFrame (): Views.Frame;
  169.     PROCEDURE FocusView (): Views.View;
  170.     PROCEDURE FocusModel (): Models.Model;
  171.     PROCEDURE DoLater (a: Action; notBefore: LONGINT);
  172.     PROCEDURE Step;
  173.     PROCEDURE Ticks (): LONGINT;
  174.     PROCEDURE Register (f: Forwarder);
  175.     PROCEDURE Delete (f: Forwarder);
  176.     PROCEDURE ForwardVia (target: BOOLEAN; VAR msg: Message);
  177.     PROCEDURE SetCurrentPath (target: BOOLEAN);
  178.     PROCEDURE PollSection (VAR msg: PollSectionMsg);
  179.     PROCEDURE PollOps (VAR msg: PollOpsMsg);
  180.     PROCEDURE PollCursor (x, y: LONGINT; VAR cursor: INTEGER);
  181.     PROCEDURE Transfer (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  182.                                             VAR msg: TransferMessage);
  183.     PROCEDURE PollDrop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  184.                                             mark, show: BOOLEAN; view: Views.View;
  185.                                             VAR dest: Views.Frame; VAR destX, destY: LONGINT);
  186.     PROCEDURE Drop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  187.                                             view: Views.View; w, h: LONGINT);
  188.     PROCEDURE PasteView (view: Views.View; w, h: LONGINT);
  189. END Controllers.
  190. Picture 5.8a Model-View-Controller Separation
  191. A controller implements the interactive behavior for a view class. It is an object which transforms controller messages into model or view transformations.
  192. A controller message is a message which is sent along exactly one path in a view hierarchy, the focus path. Every view on such a path decides for itself whether it is the terminal of this path, i.e. whether it is the current focus, or whether the message should be forwarded to one of its embedded views. Oberon supports two focus paths, namely a target and a front focus. Both paths may fall together into one. The target path defines which view is the target of commands in dialogs. The front path defines which view is being edited, via mouse, keyboard, or menus.
  193. Picture 5.8b  Simplified Example of Focus Hiearchy
  194. It is important to note that all controller messages which are not relevant for a particular view type can simply be ignored.
  195. Actions are objects whose Do procedures are executed in a delayed fashion, when the system is idle. An action which re-installs itself whenever it is invoked operates as a non-preemptive background task.
  196. CONST now
  197. This value can be passed to DoLater as notBefore parameter, if the action may be executed immediately.
  198. CONST frontPath
  199. This value may be passed as target parameter to several procedures of this module. It lets a focus message be sent along the front focus path.
  200. CONST targetPath
  201. This value may be passed as target parameter to several procedures of this module. It lets a controller message be sent along the target focus path.
  202. CONST decLine, incLine, decPage, incPage
  203. These values can be assigned to the ScrollMsg.op field. They will cause the receiver view to scroll by increments or decrements of one line or page. It is up to the receiver to define what constitutes a "line" in its model, except that it should be smaller than a page. A page should correspond to the width/height of the focus frame.
  204. CONST gotoPos
  205. This value can be assigned to the ScrollMsg.op field. It causes the receiver view to scroll to the position given by ScrollMsg.pos.
  206. CONST nextPageX, nextPageY
  207. This value can be assigned to the PageMsg.op field. It causes the receiver view to display the next page in x resp. in y direction.
  208. CONST gotoPageX, gotoPageY
  209. This value can be assigned to the PageMsg.op field. It causes the receiver view to display a given page in x resp. in y direction.
  210. CONST cut, copy
  211. These values can be assigned to the EditMsg.op field. They should be handled by the receiver view in the following way:
  212.  - cut    delete selection, and assign a new view containing the deleted data or a copy thereof to EditMsg.view
  213.  - copy    copy selection, and assign a new view containing the copied data to EditMsg.view
  214. CONST pasteChar, pasteLChar
  215. These values can be assigned to the EditMsg.op field. They denote the input of a CHAR value, or of a LONGCHAR value, respectively.
  216. CONST paste
  217. This value can be assigned to the EditMsg.op field. The receiver view should insert a copy of the data that EditMsg.view contains. If it cannot insert the data directly because it doesn't know its type, it should insert a copy of the whole EditMsg.view into its model if it has this capability, i.e. if it is a container.
  218. CONST pasteView
  219. This value can be assigned to the EditMsg.op field. The receiving container view should insert a copy of the whole EditMsg.view into its model.
  220. CONST doubleClick
  221. This value means that a mouse button has been pressed in a way which is interpreted by the underlying user interface as a "double click".
  222. CONST extend, modify
  223. Oberon operates with two virtual modifier keys. The extend key is used to extend or toggle selections (usually the Shift key), the modify key to change the default behavior of a command (e.g. to change a drag-and-move into a drag-and-copy, using the option key on the Macintosh). The behavior of possible additional modifier keys is platform-specific.
  224. CONST noMark, mark
  225. Used internally.
  226. TYPE LONGCHAR
  227. Type for 2-byte characters in the Unicode character set.
  228. TYPE Controller
  229. Interface, Extension
  230. A controller is the third component of the model-view-controller triple. It's main purpose is to translate controller messages into model or view transformations. Simple applications can implement the controller's functionality in the view itself, thus needing no separate controller object at all. Container views usually have a separate controller.
  231. PROCEDURE (c: Controller) Clone (): Controller
  232. Default, Extension
  233. Result type is narrowed.
  234. PROCEDURE (c: Controller) CopyFrom (source: Controller)
  235. Copy the contents of source to c. Copy only non-shared state, i.e. don't copy the controller's model or view.
  236. CopyFrom is called in the controller's view's CopyFrom procedure.
  237. CopyFrom is extended if the controller has some state.
  238. Super call at the beginning is mandatory.
  239. ~c.init    20
  240. source # NIL    21
  241. source.init    22
  242. c.init
  243. PROCEDURE (c: Controller) InitView (v: Views.View)
  244. Assign or de-assign the controller's view.
  245. v # NIL & c.ThisView() = NIL OR
  246. v = NIL & c.ThisView() # NIL    20
  247. c.ThisView() = v
  248. PROCEDURE (c: Controller) ThisView (): Views.View
  249. Interface
  250. Returns the view to which the controller is connected.
  251. PROCEDURE (c: Controller) ThisFocus (): Views.View
  252. Default
  253. Returns the current focus.
  254. ThisFocus is called to determine which view, if any, is currently focus. Typically this happens in a container view's Restore procedure before InstallFrame is called.
  255. ThisFocus should be extended by a container controller, otherwise it returns NIL as default.
  256. PROCEDURE (c: Controller) ConsiderFocusRequestBy (view: Views.View)
  257. Empty, Forwarded from view
  258. PROCEDURE (c: Controller) RestoreMarks (f: Views.Frame; l, t, r, b: LONGINT)
  259. Empty, Forwarded from view
  260. PROCEDURE (c: Controller) Neutralize
  261. Empty, Forwarded from view
  262. PROCEDURE (c: Controller) HandleModelMsg (VAR msg: Models.Message)
  263. Empty, Forwarded from view
  264. PROCEDURE (c: Controller) HandleViewMsg (f: Views.Frame; VAR msg: Views.Message)
  265. Empty, Forwarded from view
  266. PROCEDURE (c: Controller) HandleCtrlMsg (f: Views.Frame; VAR msg: Message;
  267.                                                                                 focus: Views.View)
  268. Empty, Forwarded from view
  269. PROCEDURE (c: Controller) HandlePropMsg (VAR msg: Views.PropMessage)
  270. Empty, Forwarded from view
  271. TYPE Directory
  272. Interface
  273. Usually there is a controller directory in the views module of a subsystem, since the view directory must be able to allocate an appropriate controller. Such a directory is installed by the corresponding controller module upon loading. To guarantee the loading of the corresponding controller module is loaded, the view module's body usually contains a statement of the form Dialog.Call("XYZControllers.Install, "", res).
  274. PROCEDURE (d: Directory) New (): Controller
  275. Interface
  276. Returns a new controller.
  277. result # NIL
  278. result.init
  279. result.ThisView() = NIL
  280. TYPE Forwarder
  281. Interface
  282. Used internally.
  283. PROCEDURE (n: Forwarder) Forward (target: BOOLEAN; VAR msg: Message)
  284. Interface
  285. Used internally.
  286. PROCEDURE (n: Forwarder) Transfer (VAR msg: TransferMsg)
  287. Interface
  288. Used internally
  289. TYPE Action
  290. Interface
  291. Actions are objects whose Do procedures are called in a deferred way, when the system is idle again.
  292. notBefore-: LONGINT    notBefore >= now
  293. The earliest possible time when the action's Do procedure may be called.
  294. PROCEDURE (a: Action) Do
  295. Interface
  296. For a registered action a, a.Do is called eventually after Ticks() has reached t.notBefore, or if t.notBefore = now.
  297. TYPE Message
  298. Interface
  299. Base type of all controller messages. In contrast to model and view messages, a controller message is never broadcast. Instead, it is passed along a focus path. The target and front focus paths are predefined.
  300. TYPE PollFocusMsg
  301. Extension
  302. This message is sent to find out the leaf view of a focus path. The message is handled by the framework itself. If your view should not give away its identity when it is focus, set focus to NIL. Otherwise ignore the message.
  303. focus: View
  304. After the message returns from the traversal of the focus path, it should contain the leaf view of the path.
  305. TYPE PollSectionMsg
  306. Extension
  307. This message is sent to poll the focus view's current scroll state. Oberon/F contains a generic scrolling mechanism which scrolls simply by changing the scrolled frame's origin. Explicit handling of scrolling is only necessary for views which can become extremely large, and whose efficient implementation crucially depends on keeping frames small.
  308. focus: BOOLEAN
  309. This flag tells whether a container should forward the message to its focus or not. Non-containers obviously cannot forward to a focus.
  310. vertical: BOOLEAN
  311. Tells whether the vertical or horizontal direction is polled.
  312. wholeSize: LONGINT    wholeSize >= 1
  313. This value denotes the focus view's width or height, in coordinates which a view can freely choose, i.e. they need not necessarily be universal units.
  314. partSize: LONGINT    0 <= partSize <= wholeSize
  315. This value denotes the focus view frame's width or height, in the same coordinates as above.
  316. partPos: LONGINT    0 <= partPos <= wholeSize
  317. This value denotes the focus view's origin, in the same coordinates as above.
  318. valid: BOOLEAN
  319. The receiving view should set this flag if it supports scrolling in the given direction. valid indicates that wholeSize, partSize, and partPos are valid indicators of the view's scroll position.
  320. done: BOOLEAN
  321. This flag should be set if the message has been interpreted, i.e. if the above output fields have been set. For some controllers this may depend on op, e.g. if the controller supports horizontal or vertical scrolling only.
  322. TYPE PollOpsMsg
  323. Extension
  324. This message is sent to inquire which editing operations the focus view supports, depending on its current selection.
  325. type: Stores.TypeName
  326. This field denotes a context for the focus view. This context is used to determine which menus are relevant for the focus view. As a convention, a view assigns the type name of its abstract base type to type, e.g. "TextViews.ViewDesc". If the view doesn't support any such context, ignore this field.
  327. singleton: Views.View
  328. A container view which supports a selection should set this field to the selected view, if this view is the only contents currently selected.
  329. pasteFrom: Views.View    valid iff op IN {paste, pasteView}
  330. The view of which a copy would be pasted, if a paste operation occured.
  331. selectable: BOOLEAN
  332. This field should be set to TRUE if the focus view contains selectable elements, independent of whether they are currently selected or not.
  333. selectable: BOOLEAN
  334. This field should be set to TRUE if the focus view contains selected elements which could be deselected.
  335. valid: SET
  336. This set denotes which edit operations (i.e. cut .. pasteView) are currently possible.
  337. TYPE ScrollMsg
  338. Extension
  339. This message is sent in order to let the focus view scroll to another position. It is used only in conjunction with PollSectionMsg (cf. above).
  340. focus: BOOLEAN
  341. This flag tells whether a container should forward the message to its focus or not. Non-containers obviously cannot forward to a focus.
  342. vertical: BOOLEAN
  343. Denotes whether scrolling should occur in the vertical or in the horizontal direction.
  344. op: INTEGER    op IN {incLine..gotoPos}
  345. Scroll operation to be performed.
  346. pos: LONGINT    valid iff op = gotoPos    pos >= 0
  347. This denotes the position to be scrolled to, in the same coordinates that the PollSectionMsg uses.
  348. done: BOOLEAN
  349. This flag should be set if the message has been interpreted; for some controllers, this may depend on op.
  350. TYPE PageMsg
  351. Extension
  352. A page message is similar to a scroll message, but measures are in pages. It can be interpreted if the view should behave differently depending whether it is being printed or not. This is done e.g. in TextViews to avoid the last line on a page to become clipped, which is acceptable on screen.
  353. If this message is not interpreted for a view which cannot be printed on one page, a default printing strategy is used which decomposes the view into suitable pieces for printing.
  354. op: INTEGER    op IN {nextPageX, nextPageY, gotoPageX, gotoPageY}
  355. Where to scroll to.
  356. pageX, pageY: INTEGER
  357. Current page in x and in y directions.
  358. done: BOOLEAN
  359. This flag should be set if the message has been interpreted; for some controllers, this may depend on op.
  360. eox, eoy: BOOLEAN
  361. These flags should be set when it is attempted to go beyond the last page in the x resp. in y direction.
  362. TYPE TickMsg
  363. Extension
  364. This message is sent to the front focus view periodically. It can be used to realize effects like a blinking caret.
  365. tick: LONGINT
  366. Tick count. The difference between two ticks is given by the global variable resolution.
  367. TYPE MarkMsg
  368. Extension
  369. This message is sent whenever the target or front focus paths change. Before the change, the message is sent along the focus path with show = FALSE, such that the focus view can switch off visible marks like the selection or the caret. After the change (e.g. another window coming to the top), a MarkMsg is sent along the focus path with show = TRUE, such that the focus view can switch on its marks again, if there are any.
  370. show: BOOLEAN
  371. Tells whether the focus view's marks should be switched on or off.
  372. TYPE SelectMsg
  373. Extension
  374. This message is sent when the focus view should select all selectable items, or when it should deselect all selected items.
  375. set: BOOLEAN
  376. Determines whether everything should be selected (set = TRUE) or whether everything should be deselected (set = FALSE).
  377. TYPE RequestMessage
  378. Interface, Extension
  379. A view (or its controller) receiving a request message can indicate, by setting requestFocus to TRUE, that it wants to become focus afterwards, if it isn't already.
  380. requestFocus: BOOLEAN
  381. Set this flag to TRUE if receiver should become/remain focus after the message has been handled.
  382. TYPE EditMsg
  383. Extension
  384. This message is sent when a key was pressed, or when a cut/copy/paste operation was invoked. The following operations can be supported (for every supported operation, the corresponding flag in PollOpsMsg.valid should be set when receiving a PollOpsMsg):
  385. - cut
  386. Create a clone of the focus view, with a copy of its selection as contents. Assign this clone to EditMsg.view and delete the focus' selection. There is one exception: if the selection consists of exactly one view (a singleton), this view's clone should be copied to EditMsg.view, not a clone of its container.
  387. - copy
  388. Create a clone of the focus view, with a copy of the focus' selection as contents. Assign this clone to EditMsg.view. If the selection consists of exactly one view (a singleton), this view's clone should be copied to EditMsg.view.
  389. - pasteChar
  390. Interpret EditMsg.char, e.g. insert it into a text model.
  391. char may be a control character (-> "Appendix"). For control characters, check field modifiers also.
  392. - pasteLChar
  393. Interpret EditMsg.lchar, e.g. insert it into a text model.
  394. - paste
  395. Insert a copy of the contents of the EditMsg.view view into the focus view's contents. If the contents is not known to the focus view and if the focus is a container, it should insert a copy of the whole view (perform a pasteView operation, in fact).
  396. - pasteView
  397. Insert a copy of the EditMsg.view view into the focus view' contents, as a subview. The view's desired width and height are given in w and h.
  398. op: INTEGER    op IN {cut .. pasteView}
  399. Operation to be performed.
  400. modifiers: SET    valid iff op = pasteChar & char is control character
  401. Modifier keys.
  402. char: CHAR    valid iff op = pasteChar
  403. Character to be pasted, or to be interpreted in the case of control characters.
  404. lchar: LONGCHAR    valid iff op = pasteLChar
  405. Long character to be pasted.
  406. view: Views.View    valid iff op IN {paste, pasteView}
  407. View of which a copy should be pasted.
  408. w, h: LONGINT    valid iff op IN {paste, pasteView}
  409.                                 w >= Views.undefined  &  h >= Views.undefined    [units]
  410. The desired width and height of the pasted view. These values can be treated as hints. If they are not suitable, others can be used. The value Views.undefined should be handled also.
  411. TYPE ReplaceViewMsg
  412. Extension
  413. A container should check whether it contains old. If so, it should replace old by new, without modifying the view's context in any way.
  414. old, new: Views.View    old # NIL & new # NIL
  415. old should be replaced by new.
  416. TYPE CursorMessage
  417. Interface, Extension
  418. The base type of all messages which denote some interaction that depends on the current cursor position.
  419. x, y: LONGINT
  420. Current cursor position.
  421. TYPE PollCursorMsg
  422. Extension
  423. This message is sent regularly to inquire which cursor the focus view currently desires.
  424. cursor: INTEGER    cursor IN {Ports.arrowCursor .. Ports.bitmapCursor}
  425. This field can be set to the cursor appropriate for the focus view.
  426. TYPE TrackMsg
  427. Extension
  428. This message is sent when the mouse button is pressed down.
  429. modifiers: SET
  430. Determines which modifier keys have been pressed together with the mouse button.
  431. TYPE TransferMessage
  432. Interface, Extension
  433. This is the base type of all messages which denote an interaction between several views, e.g. for drag and drop.
  434. source: Views.Frame
  435. The frame from which the interaction started, e.g. where the mouse button has been clicked for dragging.
  436. sourceX, sourceY: LONGINT
  437. The position in the source frame where the mouse button has been clicked, e.g. when starting to drag.
  438. TYPE PollDropMsg
  439. Extension
  440. While an item is being dragged around, PollDropMsgs are sent to enable feedback about the drop target.
  441. mark: BOOLEAN
  442. A container which supports drop feedback should show (hide) its feedback marked when mark is set (cleared).
  443. show: BOOLEAN    valid iff mark
  444. Indicates whether the mark should be shown or hidden.
  445. view: Views.View
  446. The candidate for dropping.
  447. dest: Views.Frame
  448. The receiver should set dest to its own frame, if it would accept a drop.
  449. TYPE DropMsg
  450. Extension
  451. This message is used if a view should be dragged and dropped to the cursor location.
  452. view: Views.View
  453. The view which is dropped. The view is the original, thus its contents must be copied first. The view itself must not be modified.
  454. w, h: LONGINT    [units]
  455. The size of the dropped view.
  456. VAR resolution-: LONGINT
  457. Time resolution. A value of 60 for resolution means that the difference between time = n and time = n + 1 is 1/60 second. The current time can be inquired by procedure Ticks.
  458. VAR path-: BOOLEAN
  459. Used internally.
  460. PROCEDURE Forward (VAR msg: Message)
  461. Send msg to to current focus.
  462. PROCEDURE FocusFrame (): Views.Frame
  463. Returns the current focus frame, if there is any.
  464. PROCEDURE FocusView (): Views.View
  465. Returns the current focus view, if there is any.
  466. PROCEDURE FocusModel (): Models.Model
  467. Returns the current focus view's model, if there is any.
  468. PROCEDURE DoLater (a: Action; notBefore: LONGINT)
  469. Register an action. Its Do procedure will be executed once, later when time permits. If it should be executed more than once, it may call DoLater to re-install itself. A particular action can only be registered once; additional attempts will have no effect.
  470. a # NIL    20
  471. PROCEDURE Step
  472. Used internally.
  473. PROCEDURE Ticks (): LONGINT
  474. Returns the current time in clock ticks. These ticks have a resolution of resolution., i.e. resolution ticks per second.
  475. The following procedures are used internally:
  476. PROCEDURE Register (f: Forwarder)
  477. Add forwarder f to the list of forwarders. If f is already registered, Register(f) does nothing.
  478. f # NIL    20
  479. PROCEDURE Delete (f: Forwarder)
  480. Remove f from the list of forwarders. If f is not registered, nothing happens.
  481. f # NIL    20
  482. PROCEDURE ForwardVia (target: BOOLEAN; VAR msg: FocusMessage)
  483. Send msg to either target or front focus.
  484. PROCEDURE SetCurrentPath (target: BOOLEAN)
  485. Set path to target.
  486. PROCEDURE PollSection (VAR msg: PollSectionMsg)
  487. Poll the current focus view's scroll state.
  488. PROCEDURE PollOps (VAR msg: PollOpsMsg)
  489. Poll the current focus view's currently valid editing operations.
  490. PROCEDURE PollCursor (x, y: LONGINT; VAR cursor: INTEGER)
  491. Poll the current focus view's currently desired cursor.
  492. PROCEDURE Transfer (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  493.                                             VAR msg: TransferMessage)
  494. PROCEDURE PollDrop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  495.                                             mark, show: BOOLEAN; view: Views.View; VAR dest: Views.Frame;
  496.                                             VAR destX, destY: LONGINT)
  497. PROCEDURE Drop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  498.                                     view: Views.View; w, h: LONGINT)
  499. PROCEDURE PasteView (view: Views.View; w, h: LONGINT)
  500. TextControllers.StdCtrlDesc
  501. TextControllers.ControllerDesc
  502. Containers.ControllerDesc
  503. Controllers.ControllerDesc
  504. Geneva
  505. Documents.ControllerDesc
  506.