Changeset 60 for trunk/IDE/Forms


Ignore:
Timestamp:
Jul 17, 2012, 7:25:56 AM (12 years ago)
Author:
chronos
Message:
  • Added: Target celection combobox on main toolbar.
  • Added: Options of available targets allow to change producer and executor path if available.
Location:
trunk/IDE/Forms
Files:
3 added
4 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UFormMain.lfm

    r57 r60  
    8686      Top = 2
    8787      Action = AStop
     88    end
     89    object ComboBoxTarget: TComboBox
     90      Left = 230
     91      Height = 21
     92      Top = 2
     93      Width = 100
     94      ItemHeight = 13
     95      OnChange = ComboBoxTargetChange
     96      Style = csDropDownList
     97      TabOrder = 0
     98    end
     99    object ToolButton11: TToolButton
     100      Left = 330
     101      Top = 2
     102      Action = AViewTargets
    88103    end
    89104  end
     
    808823      Category = 'View'
    809824      Caption = 'Targets'
     825      ImageIndex = 14
    810826      OnExecute = AViewTargetsExecute
    811827    end
     
    874890    top = 272
    875891    Bitmap = {
    876       4C690E0000001000000010000000000000000000000000000000000000000000
     892      4C690F0000001000000010000000000000000000000000000000000000000000
    877893      0000000000000000000000000000000000000000000000000000000000000000
    878894      0000000000000000000000000000000000000000000000000000000000000000
     
    13221338      0000000000000000000000000000000000000000000000000000000000000000
    13231339      0000000000000000000000000000000000000000000000000000000000000000
     1340      0000000000000000000000000000000000000000000000000000000000000000
     1341      0000000000000000000000000000000000000000000000000000000000000000
     1342      0000000000000000000000000000000000000000000000000000000000000000
     1343      000000000000000000003131312F313131FF3030301F00000000000000000000
     1344      0000000000000000000000000000000000000000000000000000000000000000
     1345      000000000000000000002E2E2E3F2E2E2EFF2E2E2E3F00000000000000000000
     1346      0000000000000000000000000000000000000000000000000000000000000000
     1347      00002A2A2A7F2A2A2ADF2B2B2BFF2B2B2BFF2B2B2BFF2A2A2ADF2A2A2A7F0000
     1348      0000000000000000000000000000000000000000000000000000000000002727
     1349      279F272727FF282828AF2828284F272727FF2828284F282828AF272727FF2727
     1350      279F0000000000000000000000000000000000000000000000002424247F2424
     1351      24FF2424245F0000000000000000242424FF00000000000000002424245F2424
     1352      24FF2424247F0000000000000000000000000000000000000000202020DF2020
     1353      20AF000000000000000000000000202020FF0000000000000000000000002020
     1354      20AF202020DF0000000000000000000000001C1C1C1F1C1C1C3F1D1D1DFF1D1D
     1355      1D4F0000000000000000000000001D1D1DFF0000000000000000000000001D1D
     1356      1D4F1D1D1DFF1C1C1C3F1C1C1C1F1A1A1A1F1A1A1AFF1A1A1AFF1A1A1AFF1A1A
     1357      1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1ABF1A1A1AFF1A1A1AFF1A1A1AFF1A1A
     1358      1AFF1A1A1AFF1A1A1AFF1A1A1AFF000000001818182F1818183F161616FF1616
     1359      167F1818183F1818183F1818183F161616FF1818183F1818183F1818183F1616
     1360      167F161616FF1818183F1818181F000000000000000000000000131313DF1313
     1361      13AF000000000000000000000000131313FF0000000000000000000000001313
     1362      13AF131313DF00000000000000000000000000000000000000000F0F0F7F0F0F
     1363      0FFF0E0E0E5F00000000000000000F0F0FFF00000000000000000E0E0E5F0F0F
     1364      0FFF1010106F0000000000000000000000000000000000000000000000000D0D
     1365      0D9F0C0C0CFF0C0C0CAF0B0B0B4F0C0C0CFF0B0B0B4F0C0C0CAF0C0C0CFF0D0D
     1366      0D9F000000000000000000000000000000000000000000000000000000000000
     1367      00000909097F090909DF090909FF090909FF090909FF090909DF0909096F0000
     1368      0000000000000000000000000000000000000000000000000000000000000000
     1369      000000000000000000000505053F050505FF0505053F00000000000000000000
     1370      0000000000000000000000000000000000000000000000000000000000000000
     1371      000000000000000000000202022F020202FF0303031F00000000000000000000
    13241372      0000000000000000000000000000
    13251373    }
  • trunk/IDE/Forms/UFormMain.pas

    r59 r60  
    4343    AProjectClose: TAction;
    4444    ActionList1: TActionList;
     45    ComboBoxTarget: TComboBox;
    4546    ImageList1: TImageList;
    4647    MainMenu: TMainMenu;
     
    99100    ToolButton1: TToolButton;
    100101    ToolButton10: TToolButton;
     102    ToolButton11: TToolButton;
    101103    ToolButton2: TToolButton;
    102104    ToolButton3: TToolButton;
     
    131133    procedure AViewProjectExecute(Sender: TObject);
    132134    procedure AViewSourceEditorExecute(Sender: TObject);
    133     procedure ComboBox1Change(Sender: TObject);
    134     procedure ComboBoxProducerChange(Sender: TObject);
     135    procedure ComboBoxTargetChange(Sender: TObject);
    135136    procedure FormShow(Sender: TObject);
    136137    procedure FormClose(Sender: TObject; var Action: TCloseAction);
     
    313314
    314315  UpdateMenu;
     316  Core.Compiler.Targets.LoadToStrings(ComboBoxTarget.Items);
     317  ComboBoxTarget.ItemIndex := Core.Compiler.Targets.IndexOf(Core.Compiler.Target);
    315318  FormSourceCode.UpdateInterface;
    316319  FormTargetCode.UpdateInterface;
     
    476479end;
    477480
    478 procedure TFormMain.ComboBox1Change(Sender: TObject);
    479 begin
    480   ABuildExecute(Self);
    481 end;
    482 
    483481procedure TFormMain.AProjectOpenExecute(Sender: TObject);
    484482begin
     
    545543end;
    546544
    547 procedure TFormMain.ComboBoxProducerChange(Sender: TObject);
    548 begin
    549   ABuildExecute(Self);
     545procedure TFormMain.ComboBoxTargetChange(Sender: TObject);
     546begin
     547  with TMenuItem(Sender) do begin
     548    Core.Compiler.Target := TTarget(Core.Compiler.Targets[ComboBoxTarget.ItemIndex]);
     549    UpdateInterface;
     550  end;
    550551end;
    551552
  • trunk/IDE/Forms/UFormTargets.lfm

    r42 r60  
    11object FormTargets: TFormTargets
    22  Left = 292
    3   Height = 264
     3  Height = 343
    44  Top = 138
    5   Width = 360
     5  Width = 522
    66  Caption = 'Targets'
    7   ClientHeight = 264
    8   ClientWidth = 360
     7  ClientHeight = 343
     8  ClientWidth = 522
    99  OnShow = FormShow
    10   LCLVersion = '0.9.31'
     10  LCLVersion = '1.1'
    1111  object ListView1: TListView
    1212    Left = 8
    13     Height = 248
     13    Height = 327
    1414    Top = 8
    15     Width = 346
     15    Width = 508
    1616    Anchors = [akTop, akLeft, akRight, akBottom]
    1717    Columns = <   
     
    2121      end   
    2222      item
    23         Caption = 'Execution path'
    24         Width = 247
     23        Caption = 'Compiler path'
     24        Width = 200
     25      end   
     26      item
     27        Caption = 'Executor path'
     28        Width = 200
    2529      end>
    2630    OwnerData = True
     31    PopupMenu = PopupMenu1
    2732    ReadOnly = True
    2833    RowSelect = True
     
    3035    ViewStyle = vsReport
    3136    OnData = ListView1Data
    32     OnDblClick = ListView1DblClick
     37    OnDblClick = ATargetOptionsExecute
     38  end
     39  object PopupMenu1: TPopupMenu
     40    Images = FormMain.ImageList1
     41    left = 124
     42    top = 69
     43  end
     44  object ActionList1: TActionList
     45    left = 200
     46    top = 72
     47    object ATargetOptions: TAction
     48      Caption = 'Options'
     49      Hint = 'Target options'
     50      OnExecute = ATargetOptionsExecute
     51    end
    3352  end
    3453end
  • trunk/IDE/Forms/UFormTargets.lrt

    r42 r60  
    11TFORMTARGETS.CAPTION=Targets
    22TFORMTARGETS.LISTVIEW1.COLUMNS[0].CAPTION=Name
    3 TFORMTARGETS.LISTVIEW1.COLUMNS[1].CAPTION=Execution path
     3TFORMTARGETS.LISTVIEW1.COLUMNS[1].CAPTION=Compiler path
     4TFORMTARGETS.LISTVIEW1.COLUMNS[2].CAPTION=Executor path
     5TFORMTARGETS.ATARGETOPTIONS.CAPTION=Options
     6TFORMTARGETS.ATARGETOPTIONS.HINT=Target options
  • trunk/IDE/Forms/UFormTargets.pas

    r53 r60  
    66
    77uses
    8   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
     9  Menus, ActnList;
    910
    1011type
     
    1314
    1415  TFormTargets = class(TForm)
     16    ATargetOptions: TAction;
     17    ActionList1: TActionList;
    1518    ListView1: TListView;
     19    PopupMenu1: TPopupMenu;
     20    procedure ATargetOptionsExecute(Sender: TObject);
    1621    procedure FormShow(Sender: TObject);
    1722    procedure ListView1Data(Sender: TObject; Item: TListItem);
    18     procedure ListView1DblClick(Sender: TObject);
    1923  private
    2024    { private declarations }
     
    3135
    3236uses
    33   UCore, UFormMain, UCompiler, UFormCompilerSettings, UProducer, UTarget;
     37  UCore, UFormMain, UCompiler, UProducer, UTarget,
     38  UFormTargetOptions;
    3439
    3540resourcestring
     
    4449end;
    4550
     51procedure TFormTargets.ATargetOptionsExecute(Sender: TObject);
     52begin
     53  if Assigned(ListView1.Selected) then begin
     54    FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data));
     55    if FormTargetOptions.ShowModal = mrOk then begin
     56      FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data));
     57      ReloadList;
     58    end;
     59  end;
     60end;
     61
    4662procedure TFormTargets.ListView1Data(Sender: TObject; Item: TListItem);
    4763begin
     
    5167    Item.Data := Core.Compiler.Targets[Item.Index];
    5268    //Item.SubItems.Add(Producer.CompilerPath);
    53   end;
    54 end;
    55 
    56 procedure TFormTargets.ListView1DblClick(Sender: TObject);
    57 begin
    58   if Assigned(ListView1.Selected) then begin
    59     FormCompilerSettings.LoadFromProducer(TProducer(ListView1.Selected.Data));
    60     if FormCompilerSettings.ShowModal = mrOk then
    61       FormCompilerSettings.SaveToProducer(TProducer(ListView1.Selected.Data));
    62     ReloadList;
    6369  end;
    6470end;
Note: See TracChangeset for help on using the changeset viewer.