home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Documentation / Development Notes / ODF Examples RoadMap / Linking < prev    next >
Encoding:
Text File  |  1996-09-18  |  3.2 KB  |  68 lines  |  [TEXT/ttxt]

  1. OpenDoc
  2. Development
  3. Framework
  4.                                                                                                                                                                                      
  5. Linking
  6. ODF Release 2                                                                                                                                                             
  7.  
  8.  
  9. Table of Contents
  10. -------------------------
  11. • Linking - ODFDraw, ODFTable
  12. • Paste As menu command - ODFDraw, ODFTable
  13. • Paste As via dragging - ODFDraw, ODFTable
  14. • Show Link Info - ODFTable
  15. • Breaking Links (undoable) - ODFTable
  16. • Link borders -ODFTable
  17. • Link selection -ODFTable
  18.  
  19.  
  20. Linking
  21.  
  22. Some support for linking is present in two of the sample parts, ODFDraw and ODFTable. Here are the differences between the two:
  23. ODFDraw 
  24.    - permits only one link to be created from a given shape 
  25.    - doesn't support link selection
  26.    - doesn't show link borders
  27. ODFTable 
  28.    - a cell can be the source for multiple links
  29.    - a link is automatically selected when its cell is selected
  30.    - shows link borders only when the "Show Links" box is checked in the Document Info dialog
  31.  
  32.  
  33. The “Paste As” Menu Command
  34.  
  35. In ODF1 the “Paste As” menu item was enabled by ODF whenever the clipboard contained a link spec. This is no longer the case: individual parts must enable this command as appropriate.  The reason this changed is that Paste As may be used for other things besides linking; non-linking parts may wish to enable Paste As to do translation, for example.
  36.  
  37. ODFDraw: the Paste As command is undoable, and is implemented in CDrawClipboardCommand. 
  38.  
  39. ODFTable: the Paste As command is undoable, and is implemented in CTableEditCommand.
  40.  
  41.  
  42. Paste As Via Cmd-dragging
  43.  
  44. ODFDraw: see the class CDrawDropCommand. Note that it overrides DoDroppedPasteAs, which is called after the drop/PasteAs has already occurred. Another point of interest is that code for undo/redo of the two PasteAs commands is shared in the CDrawLinkManager methods UndoPasteAs and RedoPasteAs.
  45.  
  46.  
  47. Show Link Info
  48.  
  49. ODFTable: The appropriate link info dialog is shown by ODF when a cell containing a link source or destination is selected.
  50.  
  51.  
  52. Breaking Links
  53.  
  54. ODFTable: Links may be broken by clicking on the “Break Link” button in the Link Info dialog. ODF handles creation and execution of the undo-able commands FW_CBreakLinkSourceCommand and FW_CBreakLinkCommand. 
  55.  
  56.  
  57. Link Borders
  58.  
  59. ODFTable: Link borders are displayed when the "Show Links" box is checked in the Document Info window. (Note: you may have to move the grid lines to get them to show up.) CTableView::Draw checks the window's ShowLinks flag, and if it's set, iterates through the links and tells them to draw their link borders. See the override methods DoCreateLinkBorderShape and DoDrawLinkBorder in CTableLink and CTableLinkSource for an example of drawing link borders.
  60.  
  61.  
  62. Link Selection
  63.  
  64. ODFTable: Links are automatically selected when their cell is selected. Selecting a link by clicking on its border is not yet implemented.
  65.  
  66.  
  67. © 1993 - 1996 Apple Computer, Inc. All rights reserved.
  68. Apple, the Apple Logo, Macintosh, and OpenDoc are trademarks of Apple Computer, Inc., registered in the United States and other countries.