Recent

Author Topic: Multiple Document Interface (MDI)  (Read 6124 times)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Multiple Document Interface (MDI)
« on: May 21, 2019, 02:14:40 am »
Multiple Document Interface (MDI)

Since this subject comes and goes, I'll sum up what I have searched so far:

https://en.wikipedia.org/wiki/Multiple_document_interface



Creating MDI ( Multiple Document Interface ) application
Innovation Computer Academy, November, 27th 2017
This video will show you how to create MDI form in C# and Connect child forms with the help of menus.
https://www.youtube.com/watch?v=3l6wAOX170o

Belajar Delphi: Multiple Document Interface (MDI)
Yulianto Nur Rizky, September, 19th 2017
https://www.youtube.com/watch?v=BojHO2A6vZQ



MDI and Lazarus (Windows WidgetSet)
http://forum.lazarus.freepascal.org/index.php/topic,34137.0.html

MDI deprecated?
http://forum.lazarus.freepascal.org/index.php/topic,37414.0.html

still no MDI support?
http://forum.lazarus.freepascal.org/index.php/topic,5392.0.html

MDI application
http://forum.lazarus.freepascal.org/index.php/topic,29357.0.html
http://libaudfrederic.fr/

I'm actually develop an MDI application for Linux, Windows and others.
But I've discovered a bug on Windows release with LCL on the 2.6.x version.

LCL is very inconsistent between it's widgetsets (LCL-gtk2, LCL-win32, LCL-qt etc).   ...

As far as I know the only LCL widgetset that actually supports a usable MDI is LCL-Qt. So maybe you are better off using LCL-Qt on all your platforms, even Windows. But this makes deployment harder as you need to ship extra 3rd party (very large) libraries. Also since about the last 5+ years, nobody is really interested in tackling the MDI issues in Lazarus, so don't hold your breath for any fixes any time soon.



Looking for a good MDI alternative for Linux Mint (gtk-2)
https://forum.lazarus.freepascal.org/index.php/topic,41067.0.html

Multiple forms
https://forum.lazarus.freepascal.org/index.php/topic,38836.0.html

MDI like application, Template how to use "forms in forms"
https://forum.lazarus.freepascal.org/index.php/topic,41168.0.html

Information & Documentation on Sparta packages
https://forum.lazarus.freepascal.org/index.php/topic,37161.0.html

Lazarus Release 1.8 (with FPC 3.0.4)
https://forum.lazarus.freepascal.org/index.php/topic,39210.msg268602.html#msg268602

Lazarus Release Candidate 2 of 1.8
https://forum.lazarus.freepascal.org/index.php/topic,37128.msg249327.html#msg249327

Linux analog of windows mesages
https://forum.lazarus.freepascal.org/index.php/topic,44842.msg315600.html#msg315600

How to free form inside of panel?
https://forum.lazarus.freepascal.org/index.php/topic,39780.0.html

Docking windows
https://forum.lazarus.freepascal.org/index.php/topic,35497.msg234947.html#msg234947

mdi equivalent
https://forum.lazarus.freepascal.org/index.php/topic,30573.0.html

MDI application
https://forum.lazarus.freepascal.org/index.php/topic,29357.0.html

Tabbed Document Interface
https://forum.lazarus.freepascal.org/index.php/topic,45469.0.html

Tabbed Document Interface
https://forum.lazarus.freepascal.org/index.php/topic,1781.0.html

Tabbed Document Interface (TDI)
https://forum.lazarus.freepascal.org/index.php/topic,34142.0.html

MdiForm Windows not work Well
https://forum.lazarus.freepascal.org/index.php/topic,45477.0.html

Andyk

  • Jr. Member
  • **
  • Posts: 72
Re: Multiple Document Interface (MDI)
« Reply #1 on: September 04, 2019, 04:47:34 pm »
I created a component called TMDpagecontrol, a multidoc page control.

Works like a regular page control but you can tile and cascade the tabsheets, they work like regular child windows.

The tabs have close buttons, you can hide individual tabsheets and its tab, there is a window menu button on the right, and tab scroll buttons. When tabsheets are maximised, it looks like a regular pagecontrol except the window button on the right has a restore down button which puts it back into forms mode. 

I might donate the control if someones willing to clean it up for the LCL, I have tested it on Lazarus win32 and seems to work OK. The development has left the code a bit messy though.

I have attached a screenshot, hopefully it will come out.


jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Multiple Document Interface (MDI)
« Reply #2 on: September 04, 2019, 05:41:07 pm »
That's an impressive piece of work there  :)

I too have made MDI type forms using Laz with all the basic task bar looking icons at the base of the
parent form or on the sides, depending on what the OS likes at the time.
 
 But what really impresses me is the obvious field you are in or have been in and how you applied it Lazarus LCL code..

 Good Slob, I mean Job!  :D
The only true wisdom is knowing you know nothing

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Multiple Document Interface (MDI)
« Reply #3 on: September 04, 2019, 09:36:35 pm »
I thought MDI was forbidden by International law?
( Its inventor seems to think so too: quiz, who do I mean?  Give away: wrote "about face")
« Last Edit: September 04, 2019, 09:39:54 pm by Thaddy »
Specialize a type, not a var.

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Multiple Document Interface (MDI)
« Reply #4 on: September 04, 2019, 10:00:17 pm »
I thought MDI was forbidden by International law?
( Its inventor seems to think so too: quiz, who do I mean?  Give away: wrote "about face")

I am not sure is MDI design patented but some people hate it
( https://web.archive.org/web/20080530025541/http://pixelcentric.net/x-shame/docs.html  )

I prefer for mutli viewing, I used before lazarus on my some weighing scale  projects.

In lazarus there are some attempts about like MDI by panels but not fully usable like as :

https://github.com/mehmetulukaya/laz-components/tree/master/lmdi

or

https://github.com/mehmetulukaya/laz-components/tree/master/multidoc-0.3


Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Multiple Document Interface (MDI)
« Reply #5 on: September 04, 2019, 10:44:40 pm »
https://www.goodreads.com/book/show/289062.About_Face_3
Read ir and weep... Alan Cooper  designed MDI. (for the completely ignorant...)
« Last Edit: September 04, 2019, 10:48:03 pm by Thaddy »
Specialize a type, not a var.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Multiple Document Interface (MDI)
« Reply #6 on: September 05, 2019, 06:59:51 am »
I created a component called TMDpagecontrol, a multidoc page control.
Works like a regular page control but you can tile and cascade the tabsheets, they work like regular child windows.
The tabs have close buttons, you can hide individual tabsheets and its tab, there is a window menu button on the right, and tab scroll buttons. When tabsheets are maximised, it looks like a regular pagecontrol except the window button on the right has a restore down button which puts it back into forms mode. 
I might donate the control if someones willing to clean it up for the LCL, I have tested it on Lazarus win32 and seems to work OK. The development has left the code a bit messy though.
I have attached a screenshot, hopefully it will come out.
Impressive.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Multiple Document Interface (MDI)
« Reply #7 on: September 05, 2019, 07:13:17 am »
https://www.goodreads.com/book/show/289062.About_Face_3
Read ir and weep... Alan Cooper  designed MDI. (for the completely ignorant...)
Oral History of Alan Cooper - YouTube
https://www.youtube.com/watch?v=-wtGFgaKYI0
21 de jun de 2017
CHM Fellow Alan Cooper is best known as the "Father of Visual Basic."

Andyk

  • Jr. Member
  • **
  • Posts: 72
Re: Multiple Document Interface (MDI)
« Reply #8 on: September 05, 2019, 10:00:58 am »

I am not sure is MDI design patented but some people hate it


Its essential for CAD and other engineering software where you need to have multiple views of different aspects of the same object so you can see how adjustments you make in one thing affect others.

You won't find many big engineering software that doesn't use MDI.

The one one problem with my approach is that the canvases of the objects that make up the control are not actual forms, they are simulated forms.

Generally, when you move a form across the screen, it caches the bitmaps of the objects under the form so that it doesn't force the objects underneath to repaint. Without this cahing, the moved form would leave trails across the screen (which eventually clean themselves up but it looks unprofessional).

When you move a non-form object across the screen, the OS keeps sending paint messages to the underlying objects and everything looks messy.

I bypass this in my applications by putting just one frame on each tabsheet which contains my own designed objects (Like charts and schematics etc).  These objects have a paint method that draws into a bitmap instead of direct to the screen, the bitmap is then copied to the screen.

This caching into the bitmap means that the objects only have to redraw when the user actually changes something in the object or the object size changes by the window being resized. For all other OS paint messages, the object just does a copy of the predrawn bitmap, thus the window dragging becomes smooth.

It is possible to create TMDtabsheets from the designer and drop controls on them as per any other container control, but if they don't implement internal paint caching, the form won't be as smooth when its dragged across the screen.



guest48180

  • Guest
Re: Multiple Document Interface (MDI)
« Reply #9 on: September 05, 2019, 03:47:51 pm »
@Andyk - your work shows promise and certainly fills a niche. Very impressive.

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Multiple Document Interface (MDI)
« Reply #10 on: September 05, 2019, 03:55:32 pm »
@AndyK
  I agree with you %100, the MDI interface is the standard in software for instrumentation interfaces and IDE automation editing.

 Floating forms are ok but is a problem when other apps decide to overlay one of them, Its a mix of who belongs to whom.

 With a little hacking I can create forms that are parented but I need to supply the GUI code required to properly position and display the ICON-IC view of the forms.. There is also the problem handles not being valid at the proper time and thus requires Windows API calls ..

 Delphi forms do not have this issue, they seem to be able to use the standard methods of setting the parents at dynamic time and things just work..

 May need to look into why that is and fix it in the form.

The only true wisdom is knowing you know nothing

Andyk

  • Jr. Member
  • **
  • Posts: 72
Re: Multiple Document Interface (MDI)
« Reply #11 on: September 05, 2019, 09:55:40 pm »
@Andyk - your work shows promise and certainly fills a niche. Very impressive.

Thanks, the nice thing about it is it should be cross platform.

I'll see if I can tidy the code and then maybe upload it to Torrys.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Multiple Document Interface (MDI)
« Reply #12 on: September 05, 2019, 11:22:33 pm »
@Andyk - your work shows promise and certainly fills a niche. Very impressive.
Thanks, the nice thing about it is it should be cross platform.
I'll see if I can tidy the code and then maybe upload it to Torrys.
Beyond https://torry.net/, it would be very helpful if you could also upload your source code to one cloud service such as:
https://github.com/
https://bitbucket.org/
https://about.gitlab.com/
https://sourceforge.net/

 

TinyPortal © 2005-2018