Re: Lazarus on one window (aka SDI)

2007-09-14 Thread Víctor R. Ruiz
  Hi Al:

2007/9/13, Al Boldi [EMAIL PROTECTED]:
 You can probably find it on google, but I attached it here for convenience.

  This approach is very interesting and I adapted it to 0.9.23 and
tested it this days. I didn't know a parent can be assigned to a whole
form,  and that avoids the need to put container panels in every form
and to capture Show and BringToFront events. However, in 0.9.23 I'm
not able to assign more than one form to another, so TStudio simply
doesn't work. I have reported the bug, let's see.

  Greetings,

-- 
Víctor R. Ruiz [EMAIL PROTECTED] | - Todos estos momentos se perderán
http://rvr.blogalia.com/   |   como lágrimas en la lluvia

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Michael Van Canneyt


On Wed, 12 Sep 2007, Víctor R. Ruiz wrote:

   Hi:
 
   In lazarus-svn-r11993-sdi-2.diff.gz I have published some changes to
 yesterday code so the window docking is now optional (variable
 DockedIDE at main, I will replace this with a proper xml reading).
 Next step will be to add support to do a hot swapping.

Great job !!

Open source, you have to love it... :-)

Michael.

Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Graeme Geldenhuys
Hi Victor,

Could you explain how you managed the MDI look?  Where the editor
(synedit) gets created?  I use the Toolbar Editor add-on package which
creates a panel above the editor tabs.  After applying you patch is
opens a blank editor window with the toolbar panel, but nothing else.
Eventually I figured out that I need to resize the Main Form to see
the editor window, but obviously the Editor Toolbar is now missing.
:-(

I guess I would have to modify the Toolbar Editor to create a panel in
a different location depending on the SDI or MDI interface in use.
I'll leave that for now, until your changes are actually in SVN.  I
just wanted a head start on where to look, to fix the issue.

Regards,
  - Graeme -


On 12/09/2007, Víctor R. Ruiz [EMAIL PROTECTED] wrote:
   Hi:

   In lazarus-svn-r11993-sdi-2.diff.gz I have published some changes to
 yesterday code so the window docking is now optional (variable
 DockedIDE at main, I will replace this with a proper xml reading).
 Next step will be to add support to do a hot swapping.

   Greetings,


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Graeme Geldenhuys
On 12/09/2007, Víctor R. Ruiz [EMAIL PROTECTED] wrote:

   In lazarus-svn-r11993-sdi-2.diff.gz I have published some changes to
 yesterday code so the window docking is now optional (variable
 DockedIDE at main, I will replace this with a proper xml reading).
 Next step will be to add support to do a hot swapping.


Also using this latest patch under Linux (ide compiled with GTK1).  I
can't resize the messages window.  There doesn't seem to be a Resizer
component between the editor window and the messages window.

Other than that - so far it looks pretty nice.   I keep playing with
it today and report any more issue if I find any.

Regards,
  - Graeme -

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Graeme Geldenhuys
On 12/09/2007, Graeme Geldenhuys [EMAIL PROTECTED] wrote:

 Other than that - so far it looks pretty nice.   I keep playing with
 it today and report any more issue if I find any.


Another one.. :)
On opening Lazarus and a project everything is fine. As soon as I
switch tabs in the editor, a black Source Editor window appears.  A
work-around is to leave it in the background and continue working, but
it is always there.

See attached screenshot.

Regards,
  - Graeme -
attachment: Screenshot1.jpg

Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Graeme Geldenhuys
On 12/09/2007, Graeme Geldenhuys [EMAIL PROTECTED] wrote:

 Another one.. :)
 On opening Lazarus and a project everything is fine. As soon as I
 switch tabs in the editor, a black Source Editor window appears.  A
 work-around is to leave it in the background and continue working, but
 it is always there.

 See attached screenshot.


Oops!  I meant blank Source Editor window.


Graeme.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Graeme Geldenhuys
That work-around isn't a work-around.  Every time I use
Ctrl+Shift+Up/Down Arrows the blank editor window jumps to the front.
I reverted my Lazarus back to a SDI interface for now - sorry.

Graeme.



On 12/09/2007, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
 On 12/09/2007, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
 
  Another one.. :)
  On opening Lazarus and a project everything is fine. As soon as I
  switch tabs in the editor, a black Source Editor window appears.  A
  work-around is to leave it in the background and continue working, but
  it is always there.
 
  See attached screenshot.


 Oops!  I meant blank Source Editor window.


 Graeme.


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Razvan Adrian Bogdan
From what i understand this type of interface is called TDI and very
popular nowdays, the old Laz/D7/Gimp was SDI and things like child
windows in a bigger main window is MDI (like Photoshop).
Newer versions of Delphi are wonderful because you can configure
almost anything, i personally like the sliding options and reposition
everything in a similar way D7 and Laz but stick them together, one
thing Delphi has is that the form designer is also docked and you can
easily switch from code to design mode and object inspector adjusts to
that, also one can add tabs or sliding panels with the less used
toolbars, D7 also had some docking options and better response when
restoring the IDE, not having to repeatedly click on the taskbar is so
much better, at least GNOME is very annoying when it comes to multiple
windows grouped, it keeps changing the place in the group using the
form title, making it even worse to work with. I think many people
(including myself) use a second desktop for Lazarus, VMware, VNC and
such :)

Razvan

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Víctor R. Ruiz
  Hi:

2007/9/12, Graeme Geldenhuys [EMAIL PROTECTED]:
 I guess I would have to modify the Toolbar Editor to create a panel in
 a different location depending on the SDI or MDI interface in use.

  The editor is created as always, in Main (SourceEditor). I only
modified its class, UnitEditor, to add the container panel for all
widgets and the hosting panels (and splitters) for Object Inspector
and Messages View. Currently, to get that working, add the toolbar to
DockPanel (container) and not to Self.

  Greetings,

-- 
Víctor R. Ruiz [EMAIL PROTECTED] | - Todos estos momentos se perderán
http://rvr.blogalia.com/   |   como lágrimas en la lluvia

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Víctor R. Ruiz
  Hi:

2007/9/12, Graeme Geldenhuys [EMAIL PROTECTED]:
 On opening Lazarus and a project everything is fine. As soon as I
 switch tabs in the editor, a black Source Editor window appears.  A
 work-around is to leave it in the background and continue working, but
 it is always there.

  Thanks for all your testing! That's a known issue. The lastest patch
un-commented the calls to SourceEditor.ShowOnTop, to handle this in a
straight-forward way... but haven't done it yet (the window should
override the activation when its state is docked).

  Greetings,

-- 
Víctor R. Ruiz [EMAIL PROTECTED] | - Todos estos momentos se perderán
http://rvr.blogalia.com/   |   como lágrimas en la lluvia

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Al Boldi
Well, I guess the screenshot was too big (87KB), so here is the text only.

Graeme Geldenhuys wrote:
 Hi Victor,

 Could you explain how you managed the MDI look?  Where the editor
 (synedit) gets created?  I use the Toolbar Editor add-on package which
 creates a panel above the editor tabs.  After applying you patch is
 opens a blank editor window with the toolbar panel, but nothing else.
 Eventually I figured out that I need to resize the Main Form to see
 the editor window, but obviously the Editor Toolbar is now missing.

 :-(

 I guess I would have to modify the Toolbar Editor to create a panel in
 a different location depending on the SDI or MDI interface in use.
 I'll leave that for now, until your changes are actually in SVN.  I
 just wanted a head start on where to look, to fix the issue.

I once posted A Studio IDE layout, which worked by re-parenting the ide 
windows inside a TStudio form.  This meant that it did not require any 
changes to the original windows, which made it possible to easily switch 
between SDI and MDI.

The reason it did not use docking was because docking wasn't working 
correctly.  And as Mattias mentioned, once docking gets fixed, it should be 
easy to have a flexible IDE interface.

For now, I have been using TStudio ever since. Attached is a screenshot.


Thanks!

--
Al



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Víctor R. Ruiz
  Hi:

2007/9/12, Al Boldi [EMAIL PROTECTED]:
 I once posted A Studio IDE layout, which worked by re-parenting the ide
 windows inside a TStudio form.  This meant that it did not require any
 changes to the original windows, which made it possible to easily switch
 between SDI and MDI.

 The reason it did not use docking was because docking wasn't working
 correctly.  And as Mattias mentioned, once docking gets fixed, it should be
 easy to have a flexible IDE interface.

  I didn't know TStudio (I'm rather new to Lazarus), where I can find
more info? Surely the solution is similar, I don't use real docks
either -I didn't found info about how they worked. This hack also
panels and re-parenting.

  Greetings,

-- 
Víctor R. Ruiz [EMAIL PROTECTED] | - Todos estos momentos se perderán
http://rvr.blogalia.com/   |   como lágrimas en la lluvia

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Lazarus on one window (aka SDI)

2007-09-12 Thread Al Boldi
Víctor R. Ruiz wrote:
   Hi:

Hi

 2007/9/12, Al Boldi [EMAIL PROTECTED]:
  I once posted A Studio IDE layout, which worked by re-parenting the
  ide windows inside a TStudio form.  This meant that it did not require
  any changes to the original windows, which made it possible to easily
  switch between SDI and MDI.
 
  The reason it did not use docking was because docking wasn't working
  correctly.  And as Mattias mentioned, once docking gets fixed, it should
  be easy to have a flexible IDE interface.

   I didn't know TStudio (I'm rather new to Lazarus), where I can find
 more info? Surely the solution is similar, I don't use real docks
 either -I didn't found info about how they worked. This hack also
 panels and re-parenting.

You can probably find it on google, but I attached it here for convenience.


Thanks!

--
Al
---BeginMessage---
Al Boldi wrote:
 This form implements a Studio-style IDE layout in contrast to the current
 VB-style.  It works by hooking it into main.pp with something like this:

   IDEloStyle.TStudio.Create(Self).Show;

 Note, keep the following windows open before calling:
   ProjectInspector
   ObjectInspector
   CodeExplorer
   Messages

 Many known bugs like:
   First invocation of SourceEditor crashes. - Close SourceTab and reload.
   SourceEditor codetips don't work.

 Todo:
   Stream layout state.
   Allow link/unlink windows.
   Allow window to tab capture.

This new version goes full screen with integrated component palette.

Call like this:

   IDEloStyle2.TStudio.Create(Self).Show;

Your comments/improvements/fixes are most welcome.

Thanks!

--
Al



unit IDEloStyle2;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms,
  MainBar, MainBase, MsgView, ProjectInspector, CodeExplorer,
  Controls, ExtCtrls, Menus;

type

  { TStudio }

  TStudio = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
Panel7: TPanel;
Panel8: TPanel;
Splitter1: TSplitter;
Splitter2: TSplitter;
Splitter3: TSplitter;
Splitter4: TSplitter;
procedure FormCreate(Sender: TObject);
  private
{ private declarations }
  public
{ public declarations }
  end; 

var
  Studio: TStudio;

implementation

{ TStudio }

procedure TStudio.FormCreate(Sender: TObject);
var mnu: TMainMenu;
begin
  if Assigned(Studio) then begin
Studio.show;
abort;
  end;
  Studio:=self;

  MainBase.ObjectInspector1.Parent:=panel3;
  MainBase.ObjectInspector1.Align:=alClient;

  CodeExplorer.CodeExplorerView.Parent:=panel4;
  CodeExplorer.CodeExplorerView.Align:=alClient;

  ProjectInspector.ProjInspector.Parent:=panel5;
  ProjectInspector.ProjInspector.Align:=alClient;

  MainBase.SourceNotebook.Parent:=panel6;
  MainBase.SourceNotebook.Align:=alClient;

  MsgView.MessagesView.Parent:=panel7;
  MsgView.MessagesView.Align:=alClient;

  mnu:=MainBar.MainIDEBar.Menu;
  MainBar.MainIDEBar.Menu:=nil;
  self.Menu:=mnu;
  MainBar.MainIDEBar.Parent:=panel8;
  MainBar.MainIDEBar.Align:=alClient;

end;

initialization
  {$I idelostyle2.lrs}

end.

object Studio: TStudio
  Caption = 'Studio'
  ClientHeight = 476
  ClientWidth = 718
  OnCreate = FormCreate
  PixelsPerInch = 75
  WindowState = wsMaximized
  HorzScrollBar.Page = 717
  VertScrollBar.Page = 475
  Left = 32
  Height = 476
  Top = 77
  Width = 718
  object Panel1: TPanel
Align = alRight
BevelOuter = bvNone
Caption = 'Panel1'
ClientHeight = 476
ClientWidth = 170
TabOrder = 0
Left = 548
Height = 476
Width = 170
object Panel4: TPanel
  Align = alClient
  BevelOuter = bvNone
  Caption = 'Panel4'
  ClientHeight = 277
  ClientWidth = 170
  TabOrder = 0
  Height = 277
  Width = 170
end
object Panel5: TPanel
  Align = alBottom
  BevelOuter = bvNone
  Caption = 'Panel5'
  ClientHeight = 194
  ClientWidth = 170
  TabOrder = 1
  Height = 194
  Top = 282
  Width = 170
end
object Splitter3: TSplitter
  Align = alBottom
  Beveled = True
  Cursor = crVSplit
  Height = 5
  Width = 170
  ResizeAnchor = akBottom
  Cursor = crVSplit
  Height = 5
  Top = 277
  Width = 170
end
  end
  object Panel2: TPanel
Align = alClient
BevelOuter = bvNone
Caption = 'Panel2'
ClientHeight = 476
ClientWidth = 327
TabOrder = 1
Left = 216
Height = 476
Width = 327
object Panel6: TPanel
  Align = alClient
  BevelOuter = bvNone
  Caption = 'Panel6'
  ClientHeight = 361
  ClientWidth = 327
  TabOrder = 0
  Height = 361
  Top = 58
  Width = 327
end
object Panel7: TPanel
  Align = alBottom
  BevelOuter = bvNone
  Caption = 'Panel7'
  ClientHeight = 52
  ClientWidth = 327
  TabOrder = 1
  Height = 52
  Top = 424
  Width = 327
end
object Splitter4: TSplitter
  Align = alBottom
  

Re: Lazarus on one window (aka SDI)

2007-09-11 Thread Víctor R. Ruiz
  Hi:

  In lazarus-svn-r11993-sdi-2.diff.gz I have published some changes to
yesterday code so the window docking is now optional (variable
DockedIDE at main, I will replace this with a proper xml reading).
Next step will be to add support to do a hot swapping.

  Greetings,

-- 
Víctor R. Ruiz [EMAIL PROTECTED] | - Todos estos momentos se perderán
http://rvr.blogalia.com/   |   como lágrimas en la lluvia

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives