Ignore:
Timestamp:
Oct 15, 2010, 7:09:49 AM (15 years ago)
Author:
george
Message:
  • Added: Windows for Code tree and compiled code.
Location:
branches/Transpascal/Forms
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/Transpascal/Forms/UCodeForm.lfm

    r61 r62  
    6969        Priority = 0
    7070      end>
     71    Highlighter = SynPasSyn1
    7172    Keystrokes = <   
    7273      item
  • branches/Transpascal/Forms/UMainForm.lfm

    r61 r62  
    11object MainForm: TMainForm
    2   Left = 114
    3   Height = 504
    4   Top = 122
    5   Width = 861
     2  Left = 142
     3  Height = 501
     4  Top = 113
     5  Width = 695
    66  Caption = 'Transpascal IDE'
    7   ClientHeight = 504
    8   ClientWidth = 861
     7  ClientHeight = 482
     8  ClientWidth = 695
    99  Font.Height = -11
    1010  Font.Name = 'Tahoma'
     
    2020    Left = 0
    2121    Height = 5
    22     Top = 480
    23     Width = 861
     22    Top = 477
     23    Width = 695
    2424    Align = alBottom
    2525    ResizeAnchor = akBottom
     
    2727  object DockPanel: TPanel
    2828    Left = 0
    29     Height = 454
     29    Height = 451
    3030    Top = 26
    31     Width = 861
     31    Width = 695
    3232    Align = alClient
    3333    BevelOuter = bvNone
     
    3838    Height = 26
    3939    Top = 0
    40     Width = 861
     40    Width = 695
    4141    Caption = 'ToolBar1'
    4242    TabOrder = 2
     
    4747      Width = 100
    4848      ItemHeight = 13
     49      ItemIndex = 1
     50      Items.Strings = (
     51        'Pascal'
     52        'C'
     53        'AS8051'
     54        'XML'
     55      )
     56      Style = csDropDownList
    4957      TabOrder = 0
    50       Text = 'ComboBox1'
     58      Text = 'C'
    5159    end
    5260    object Button1: TButton
  • branches/Transpascal/Forms/UMainForm.pas

    r61 r62  
    99  Dialogs, StdCtrls, UCompiler, UProducerAsm8051,
    1010  UProducerC, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, UProducerTreeView,
    11   UProducerPascal, Contnrs, UProject, FileUtil, Menus, ActnList, UCoolDocking;
     11  UProducerPascal, Contnrs, UProject, FileUtil, Menus, ActnList, UCoolDocking,
     12  UCompiledForm, UCodeTreeForm;
    1213
    1314const
     
    5152    procedure Splitter2CanResize(Sender: TObject; var NewSize: Integer;
    5253      var Accept: Boolean);
    53     procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode);
    5454  private
    5555    procedure LoadErrorMessages;
    5656    procedure UpdateProjectTree;
    5757    procedure UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup);
    58     function GetSource(Name: string; Source: TStringList): Boolean;
    5958    procedure DockInit;
    6059  public
    6160    Project: TProject;
    62     ProducerControl: TControl;
    6361    Compiler: TCompiler;
     62    function GetSource(Name: string; Source: TStringList): Boolean;
    6463  end;
    6564
     
    8079  I: Integer;
    8180begin
    82   ProducerControl.Free;
    8381  if ComboBox1.ItemIndex = 0 then begin
    8482    Compiler.Producer.Free;
     
    9694    Compiler.Producer.Free;
    9795    Compiler.Producer := TProducerTreeView.Create;
    98     ProducerControl := TTreeView.Create(Self);
    99     ProducerControl.Parent := DockPanel;
    100     ProducerControl.Align := alClient;
    101 //    TProducerTreeView(Compiler.Producer).TreeView := TTreeView(ProducerControl);
    10296  end;
    10397
     
    107101  with TProjectFile(Project.Items[0]) do begin
    108102    Compiler.Compile(Parent.GetDir + Name, Source);
    109   end;
    110 
    111   if ComboBox1.ItemIndex = 0 then begin
    112     ProducerControl := TMemo.Create(Self);
    113     ProducerControl.Parent := DockPanel;
    114     ProducerControl.Align := alClient;
    115     ProducerControl.Font.Name := 'Courier New';
    116     TMemo(ProducerControl).ScrollBars := ssAutoBoth;
    117   end else
    118   if ComboBox1.ItemIndex = 1 then begin
    119     ProducerControl := TMemo.Create(Self);
    120     ProducerControl.Parent := DockPanel;
    121     ProducerControl.Align := alClient;
    122     ProducerControl.Font.Name := 'Courier New';
    123     TMemo(ProducerControl).ScrollBars := ssAutoBoth;
    124   end else
    125   if ComboBox1.ItemIndex = 2 then begin
    126     ProducerControl := TMemo.Create(Self);
    127     ProducerControl.Parent := DockPanel;
    128     ProducerControl.Align := alClient;
    129     ProducerControl.Font.Name := 'Courier New';
    130     TMemo(ProducerControl).ScrollBars := ssAutoBoth;
    131   end else
    132   if ComboBox1.ItemIndex = 3 then begin
    133103  end;
    134104
     
    219189var
    220190  Container1: TCoolDockConjoinForm;
     191  Container2: TCoolDockConjoinForm;
    221192begin
    222193  ProjectManager.ManualDock(DockPanel, nil, alLeft);
     
    228199  Container1.ManualDock(DockPanel, nil, alRight);
    229200
    230   CodeForm.ManualDock(Container1.Panel, nil, alTop);
    231   CodeForm.Show;
     201  CodeTreeForm.ManualDock(DockPanel, nil, alLeft);
     202  CodeTreeForm.Show;
     203  Container1.Parent.Parent.Width := MainForm.Width;
     204
     205  Container2 := TCoolDockManager(DockPanel.DockManager).CreateContainer(alRight);
     206  Container2.Caption := 'Panel';
     207  Container2.Name := 'Tools2';
     208  Container2.ManualDock(Container1.Panel, nil, alRight);
     209
    232210  MessagesForm.ManualDock(Container1.Panel, nil, alBottom);
    233211  MessagesForm.Show;
    234212
     213  CodeForm.ManualDock(Container2.Panel, nil, alTop);
     214  CodeForm.Show;
     215
     216  CompiledForm.ManualDock(Container2.Panel, nil, alTop);
     217  CompiledForm.Show;
     218
     219  TCoolDockManager(Container2.Panel.DockManager).DockStyle := dsTabs;
     220
    235221  ProjectManager.Parent.Parent.Width := 200;
    236   CodeForm.Parent.Parent.Height := MainForm.Height;
     222  Container2.Parent.Parent.Height := MainForm.Height;
    237223end;
    238224
  • branches/Transpascal/Forms/UProjectManager.pas

    r61 r62  
    11unit UProjectManager;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    3028
    3129uses
    32   UMainForm, UCodeForm;
     30  UMainForm, UCodeForm, UCompiledForm, UCodeTreeForm, UProducerTreeView;
    3331
    3432{ TProjectManager }
     
    4543      FileName := Compiler.CompiledFolder + DirectorySeparator +
    4644        Compiler.Producer.ClassName + DirectorySeparator + ExtractFileNameOnly(TProjectFile(Node.Data).Name) + Compiler.Producer.FileExtension;
    47       if ProducerControl is TMemo then
    4845        if FileExists(FileName) then
    49         TMemo(ProducerControl).Lines.LoadFromFile(FileName) else
    50           TMemo(ProducerControl).Lines.Clear;
    51       //if ProducerControl is TTreeView then
    52       //  TTreeView(ProducerControl).Assign(TProjectFile(Node.Data).ProducedCode);
     46        CompiledForm.SynEdit1.Lines.LoadFromFile(FileName) else
     47          CompiledForm.SynEdit1.Lines.Clear;
     48
     49      // Load code tree view
     50      Compiler.Producer.Free;
     51      Compiler.Producer := TProducerTreeView.Create;
     52      Compiler.Init;
     53      Compiler.Parser.OnGetSource := GetSource;
     54      with TProjectFile(Project.Items[0]) do begin
     55        Compiler.Compile(Parent.GetDir + Name, Source);
     56      end;
     57      //CodeTreeForm.TreeView1.Assign(TProducerTreeView(Compiler.Producer).TreeView);
    5358    end;
    5459  end;
Note: See TracChangeset for help on using the changeset viewer.