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
      Beveled = True
      Cursor = crVSplit
      Height = 5
      Width = 327
      ResizeAnchor = akBottom
      Cursor = crVSplit
      Height = 5
      Top = 419
      Width = 327
    end
    object Panel8: TPanel
      Align = alTop
      BevelOuter = bvNone
      Caption = 'Panel8'
      ClientHeight = 58
      ClientWidth = 327
      TabOrder = 2
      Height = 58
      Width = 327
    end
  end
  object Panel3: TPanel
    Align = alLeft
    BevelOuter = bvNone
    Caption = 'Panel3'
    ClientHeight = 476
    ClientWidth = 211
    TabOrder = 2
    Height = 476
    Width = 211
  end
  object Splitter1: TSplitter
    Align = alRight
    Beveled = True
    Height = 476
    Width = 5
    ResizeAnchor = akRight
    Cursor = crHSplit
    Left = 543
    Height = 476
    Width = 5
  end
  object Splitter2: TSplitter
    Beveled = True
    Height = 476
    Width = 5
    Cursor = crHSplit
    Left = 211
    Height = 476
    Width = 5
  end
end

Reply via email to