MultiDoc: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: MultiDoc
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ### About | |
| 2 | + | ||
| 3 | + | MultiDoc is a Lazarus component to replace the standard MDI interface. | |
| 4 | + | ||
| 5 | + | This component permit to write pseudo-MDI application with Lazarus. It is not a real implementation of the MDI interface but it give to your application the capability to use many resizable sub-form. | |
| 6 | + | ||
| 7 | + | There are two components: | |
| 8 | + | ||
| 9 | + | - TMultiDoc : the main form docking area. | |
| 10 | + | - TChildDoc : the child container with resizeable border and button. | |
| 11 | + | ||
| 12 | + | I do them with a [graphical software](/wiki-images/3/3c/Media%3AMultidoc_skychart.jpg) in mind but they are probably useful for a range of applications. | |
| 13 | + | ||
| 14 | + | ### Screen Shot | |
| 15 | + | ||
| 16 | + | <figure> | |
| 17 | + | <img src="Multidoc_demo.png" title="Multidoc_demo.png" /> | |
| 18 | + | <figcaption>Multidoc_demo.png</figcaption> | |
| 19 | + | </figure> | |
| 20 | + | ||
| 21 | + | ### Author | |
| 22 | + | ||
| 23 | + | Patrick Chevalley | |
| 24 | + | ||
| 25 | + | ### License | |
| 26 | + | ||
| 27 | + | Modified LGPL, see readme.txt | |
| 28 | + | ||
| 29 | + | ### Download | |
| 30 | + | ||
| 31 | + | The component in version 0.1 and 0.2 and a demonstration program can be found on the [Lazarus-CCR sourceforge site](http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=176905). | |
| 32 | + | ||
| 33 | + | The component in version 0.3 and 0.3.1 can be found [here](http://br.geocities.com/hipernetjr/lmdi/index.html). *(link is broken, is someone having the file can upload somewhere?)* but could be find [here](http://br.oocities.com/hipernetjr/lmdi/index_ptbr.html) :-) | |
| 34 | + | ||
| 35 | + | Another download link of MultiDoc & LMDI (working in June 2017): <https://github.com/mehmetulukaya/laz-components> | |
| 36 | + | ||
| 37 | + | **Last available version from SVN:** A number of small fix where added to version 0.2 over the last years. If you use this version that not depend on LMDI you can get the most current version from the Skychart project.\ | |
| 38 | + | Type the following command:\ | |
| 39 | + | ||
| 40 | + | <nowiki>svn co http://svn.code.sf.net/p/skychart/code/tags/V36/skychart/component/multidoc multidoc</nowiki> | |
| 41 | + | ||
| 42 | + | **New Multiframe component:** | |
| 43 | + | ||
| 44 | + | Since 2012 I replace the use of this component in Skychart project by Multiframe.\ | |
| 45 | + | It work almost the same but use frames for the child windows, so it no more require the main TPanel trick. | |
| 46 | + | ||
| 47 | + | To get this component:\ | |
| 48 | + | ||
| 49 | + | <nowiki>svn co http://svn.code.sf.net/p/skychart/code/trunk/skychart/component/multiframe multiframe </nowiki> | |
| 50 | + | ||
| 51 | + | ### Change Log | |
| 52 | + | ||
| 53 | + | - The Multiframe SVN [changelog](http://sourceforge.net/p/skychart/code/3050/log/?path=/trunk/skychart/component/multiframe) can be read on Sourceforge. | |
| 54 | + | - Since 2012 this component is replaced by [Multiframe](http://sourceforge.net/p/skychart/code/HEAD/tree/trunk/skychart/component/multiframe/), using docked frames for the same functionality. | |
| 55 | + | - The SVN [changelog](http://sourceforge.net/p/skychart/code/2149/log/?path=/trunk/skychart/component/multidoc) can be read on Sourceforge. | |
| 56 | + | - Version 0.3.1 2008/01/01 Fixed the following: | |
| 57 | + | 1. Moved to public section some properties, to avoid exceptions in design-time | |
| 58 | + | - Version 0.3 2007/12/31 Fixed the following: | |
| 59 | + | 1. This version was developed by Júnior Gonçalves and depends on the [[LMDI]] package | |
| 60 | + | 2. Through of {\$IFDEF}'s the component compiles into Lazarus/Delphi unchanged | |
| 61 | + | 3. Great move. Now the mouse not "escape" while the cursor is dragged (Tested in GTK2 (Windows) and Windows XP) | |
| 62 | + | 4. ChildDoc is now derived from TFormPanel (see suite [[LMDI]]) | |
| 63 | + | 5. No more code necessary on each component to focus child form | |
| 64 | + | 6. It is possible to change the "skin" of the title bar, according to the OS (see component TTitleBar) | |
| 65 | + | - Version 0.2 2007/01/06 Fix the following: | |
| 66 | + | 1. BorderWidth property not working | |
| 67 | + | 2. Wrong button order | |
| 68 | + | 3. Center the cursor to the title bar when moving the panel | |
| 69 | + | 4. Gtk2 and FPC 2.1.1 compatibility | |
| 70 | + | 5. Crash when closing a child using the close button | |
| 71 | + | 6. Change licensing to modified LGPL | |
| 72 | + | - Version 0.1 2006/01/20 First beta release. | |
| 73 | + | ||
| 74 | + | ### Dependencies / System Requirements | |
| 75 | + | ||
| 76 | + | This component is exclusively derived from high level standard component (TPanel, TCustomSplitter, TSpeedButton). It must work on all the Lazarus platform without change. | |
| 77 | + | ||
| 78 | + | Tested on Linux and Windows. | |
| 79 | + | ||
| 80 | + | ### Notes | |
| 81 | + | ||
| 82 | + | You are not limited to show the docking area in the full main form. You can place the TMultiDoc anywhere you want or use multiple one! A combination with a TNotebook may give something similar to a multi-desktop. | |
| 83 | + | ||
| 84 | + | ### Installation | |
| 85 | + | ||
| 86 | + | - Compile and install multidocpackage.lpk | |
| 87 | + | - Open the example demo/demomultidoc.lpi | |
| 88 | + | ||
| 89 | + | This example can be used as a skeleton for a new application. | |
| 90 | + | ||
| 91 | + | ### Usage | |
| 92 | + | ||
| 93 | + | At design time: | |
| 94 | + | ||
| 95 | + | - On the application main form place a TMultiDoc. | |
| 96 | + | - Create a child form with a main TPanel. | |
| 97 | + | - Put all the object you want for the child to the panel, write the event, etc... | |
| 98 | + | - Do not rely on some TForm event as this form is never show. | |
| 99 | + | ||
| 100 | + | At run time: | |
| 101 | + | ||
| 102 | + | - Create a new child from TMultiDoc.NewChild | |
| 103 | + | - Create a child form with the new childdoc as owner. | |
| 104 | + | - Assign the main panel to the Dockedpanel property. | |
| 105 | + | ||
| 106 | + | ### Convert a Delphi MDI application | |
| 107 | + | ||
| 108 | + | Converting a MDI application is simplified by the availability of the same component for Delphi and Kylix. | |
| 109 | + | ||
| 110 | + | Convert first your application to MultiDoc in Delphi,then convert to Lazarus. This require some work but among the advantage you avoid the ugly XP border around your child forms. | |
| 111 | + | ||
| 112 | + | Replace the standard MDI function as below: | |
| 113 | + | ||
| 114 | + | ` MDIChildCount -> MultiDoc1.ChildCount`\ | |
| 115 | + | ` ActiveMdiChild -> MultiDoc1.ActiveObject`\ | |
| 116 | + | ` or MultiDoc1.ActiveChild`\ | |
| 117 | + | ` MDIChildren[i] -> MultiDoc1.Childs[i].DockedObject`\ | |
| 118 | + | ` or MultiDoc1.Childs[i]`\ | |
| 119 | + | ||
| 120 | + | The Delphi component is include in the package. Unzip multidoc-delphi.zip and install MultiDocD6.dpk or MultiDocK3.dpk. | |
| 121 | + | ||
| 122 | + | --- | |
| 123 | + | *From the Free Pascal wiki, page "MultiDoc", as it stood on 2017-06-19 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 124 | + | Category: Components | |
| 125 | + | Category: Lazarus-CCR |
