Changeset 6 for trunk/UCore.pas


Ignore:
Timestamp:
Sep 19, 2014, 7:12:01 AM (10 years ago)
Author:
chronos
Message:
  • Added: Prepared more menu actions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r5 r6  
    1313
    1414  TCore = class(TDataModule)
     15    AFileSaveAs: TAction;
     16    AFileSave: TAction;
     17    AFileClose: TAction;
     18    AFileOpen: TAction;
     19    AZoomNormal: TAction;
     20    AZoomAll: TAction;
     21    AZoomIn: TAction;
     22    AZoomOut: TAction;
    1523    AImageRandom: TAction;
    1624    AImageClear: TAction;
    1725    AExit: TAction;
    18     AProjectNew: TAction;
     26    AFileNew: TAction;
    1927    ActionList1: TActionList;
     28    ImageList1: TImageList;
    2029    procedure AExitExecute(Sender: TObject);
    2130    procedure AImageClearExecute(Sender: TObject);
    2231    procedure AImageRandomExecute(Sender: TObject);
    23     procedure AProjectNewExecute(Sender: TObject);
     32    procedure AFileNewExecute(Sender: TObject);
     33    procedure AZoomInExecute(Sender: TObject);
     34    procedure AZoomNormalExecute(Sender: TObject);
     35    procedure AZoomOutExecute(Sender: TObject);
    2436    procedure DataModuleCreate(Sender: TObject);
    2537  private
     
    5466end;
    5567
    56 procedure TCore.AProjectNewExecute(Sender: TObject);
     68procedure TCore.AFileNewExecute(Sender: TObject);
    5769begin
    5870  if FormNew.ShowModal = mrOk then begin
     
    6577    FormMain.Redraw;
    6678  end;
     79end;
     80
     81procedure TCore.AZoomInExecute(Sender: TObject);
     82begin
     83  Project.ViewPort.Zoom := Project.ViewPort.Zoom * 1.3;
     84  FormMain.Redraw;
     85end;
     86
     87procedure TCore.AZoomNormalExecute(Sender: TObject);
     88begin
     89  Project.ViewPort.Zoom := 1;
     90  FormMain.Redraw;
     91end;
     92
     93procedure TCore.AZoomOutExecute(Sender: TObject);
     94begin
     95  Project.ViewPort.Zoom := Project.ViewPort.Zoom / 1.3;
     96  FormMain.Redraw;
    6797end;
    6898
Note: See TracChangeset for help on using the changeset viewer.