62 | | Currently the resource library does not handle cyclic references. If this cannot be fixed, importing a book that will cause cyclic references will be disabled. |
| 62 | Since embdedded books are extra content, they will be separated into a new module - org.sophie2.extra.func.embedded. This module will provide extensions and classes that are required for the embedded books functionality: |
| 63 | * EmbeddedBookContent - a class representing the content of an embedded book frame. |
| 64 | * Extensions for: |
| 65 | * a menu item in the Insert menu; |
| 66 | * a file dialog for choosing a book; |
| 67 | * a frame content provider; |
| 68 | * a frame content view provider; |
| 69 | * an embedded books palette; |
| 70 | * An R3Logic OperationDef for inserting the book. |
| 71 | These are new things and their relation is shown in the following class diagram: |
68 | | The embedded books will be listed in the opened books palette, below the book they are embedded in and indented to the right. |
| 77 | When a frame with an embedded book is selected (i.e. the embedded book is on focus), the embedded book will become the current book of the application. Thus the page preview palette and the resources palette will display the correct corresponding information. When the frame is deselected, the parent book should become current again. This will also affect the book bottom panel - it will control the embedded book and it will contain only the Navigation and Search panels. |
| 78 | |
| 79 | There are some issues related to embedded books: |
| 80 | * Cyclic references - Book A embeds Book B which embeds book A. Any problems and exceptions that come up with this will be solved by changing the Resource library to handle cyclic dependencies. If that cannot be achieved in a reasonable time, embedding a book that will cause cyclic references will be disabled. |
| 81 | * Preview mode - A book that is embedded should be displayed as in Preview mode and should not be editable in place. You have to open it in its own window if you want to edit it. Currently the Preview mode is working to a quite basic extent and might need refactoring for proper displaying of embedded books. |
| 82 | |
| 83 | Embedded books will be displayed under the Books tab in a new palette. From there you will be able to rename and delete embedded books. This requires the Resources library to provide ability for renaming and deleting and may slow down the task if not implemented. |
| 84 | |
| 85 | Since this task depends on a lot of other things documenting will be done only if there is time left and after a stable design has been achieved. |