~ubuntu-branches/ubuntu/saucy/lazarus/saucy

« back to all changes in this revision

Viewing changes to examples/testallform.pp

  • Committer: Package Import Robot
  • Author(s): Paul Gevers, Abou Al Montacir, Bart Martens, Paul Gevers
  • Date: 2013-06-08 14:12:17 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20130608141217-7k0cy9id8ifcnutc
Tags: 1.0.8+dfsg-1
[ Abou Al Montacir ]
* New upstream major release and multiple maintenace release offering many
  fixes and new features marking a new milestone for the Lazarus development
  and its stability level.
  - The detailed list of changes can be found here:
    http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes
    http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch
* LCL changes:
  - LCL is now a normal package.
      + Platform independent parts of the LCL are now in the package LCLBase
      + LCL is automatically recompiled when switching the target platform,
        unless pre-compiled binaries for this target are already installed.
      + No impact on existing projects.
      + Linker options needed by LCL are no more added to projects that do
        not use the LCL package.
  - Minor changes in LCL basic classes behaviour
      + TCustomForm.Create raises an exception if a form resource is not
        found.
      + TNotebook and TPage: a new implementation of these classes was added.
      + TDBNavigator: It is now possible to have focusable buttons by setting
        Options = [navFocusableButtons] and TabStop = True, useful for
        accessibility and for devices with neither mouse nor touch screen.
      + Names of TControlBorderSpacing.GetSideSpace and GetSpace were swapped
        and are now consistent. GetSideSpace = Around + GetSpace.
      + TForm.WindowState=wsFullscreen was added
      + TCanvas.TextFitInfo was added to calculate how many characters will
        fit into a specified Width. Useful for word-wrapping calculations.
      + TControl.GetColorResolvingParent and
        TControl.GetRGBColorResolvingParent were added, simplifying the work
        to obtain the final color of the control while resolving clDefault
        and the ParentColor.
      + LCLIntf.GetTextExtentExPoint now has a good default implementation
        which works in any platform not providing a specific implementation.
        However, Widgetset specific implementation is better, when available.
      + TTabControl was reorganized. Now it has the correct class hierarchy
        and inherits from TCustomTabControl as it should.
  - New unit in the LCL:
      + lazdialogs.pas: adds non-native versions of various native dialogs,
        for example TLazOpenDialog, TLazSaveDialog, TLazSelectDirectoryDialog.
        It is used by widgetsets which either do not have a native dialog, or
        do not wish to use it because it is limited. These dialogs can also be
        used by user applications directly.
      + lazdeviceapis.pas: offers an interface to more hardware devices such
        as the accelerometer, GPS, etc. See LazDeviceAPIs
      + lazcanvas.pas: provides a TFPImageCanvas descendent implementing
        drawing in a LCL-compatible way, but 100% in Pascal.
      + lazregions.pas. LazRegions is a wholly Pascal implementation of
        regions for canvas clipping, event clipping, finding in which control
        of a region tree one an event should reach, for drawing polygons, etc.
      + customdrawncontrols.pas, customdrawndrawers.pas,
        customdrawn_common.pas, customdrawn_android.pas and
        customdrawn_winxp.pas: are the Lazarus Custom Drawn Controls -controls
        which imitate the standard LCL ones, but with the difference that they
        are non-native and support skinning.
  - New APIs added to the LCL to improve support of accessibility software
    such as screen readers.
* IDE changes:
  - Many improvments.
  - The detailed list of changes can be found here:
    http://wiki.lazarus.freepascal.org/New_IDE_features_since#v1.0_.282012-08-29.29
    http://wiki.lazarus.freepascal.org/Lazarus_1.0_release_notes#IDE_Changes
* Debugger / Editor changes:
  - Added pascal sources and breakpoints to the disassembler
  - Added threads dialog.
* Components changes:
  - TAChart: many fixes and new features
  - CodeTool: support Delphi style generics and new syntax extensions.
  - AggPas: removed to honor free licencing. (Closes: Bug#708695)
[Bart Martens]
* New debian/watch file fixing issues with upstream RC release.
[Abou Al Montacir]
* Avoid changing files in .pc hidden directory, these are used by quilt for
  internal purpose and could lead to surprises during build.
[Paul Gevers]
* Updated get-orig-source target and it compinion script orig-tar.sh so that they
  repack the source file, allowing bug 708695 to be fixed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
    //MediaPlayer1      : TMediaPlayer;
87
87
      Memo1             : TMemo;
88
88
    //MessageDialog1    : TMessageDialog;
89
 
      NoteBook1         : TNoteBook;
 
89
    //NoteBook1         : TNoteBook;
90
90
      OpenDialog1       : TOpenDialog;
91
 
    //PageControl1      : TPageControl;
 
91
      PageControl1      : TPageControl;
92
92
    //TabSheet1, TabSheet2, TabSheet3 : TTabSheet;
93
93
      PaintBox1         : TPaintBox;
94
94
      Panel1            : TPanel;
352
352
//******** Create Form1.TForm1 ******************************************************
353
353
constructor TForm1.Create(AOwner: TComponent);
354
354
begin
355
 
   inherited Create(AOwner);
 
355
   inherited CreateNew(AOwner, 1);
356
356
   OnMouseDown    := @EventOnMouseDown;
357
357
   OnMouseUp      := @EventOnMouseUp;
358
358
 //OnMouseMove    := @EventOnMouseMove;
455
455
  File1.Add(Open1);
456
456
 
457
457
  Save1 := TMenuItem.Create(Self);
458
 
  Save1.Caption := '&Save as...';
 
458
  Save1.Caption := '&Save as ...';
459
459
  Save1.OnClick := @SaveMemoAs;
460
460
  File1.Add(Save1);
461
461
 
691
691
 
692
692
  TNot := TMenuItem.Create(Self);
693
693
  TNot.Caption := 'TNoteBook';
694
 
  TNot.OnClick := @ShowMessage1;
 
694
  TNot.OnClick := @ShowMessage0;          //++ Do not exist yet ++
695
695
 
696
696
  TOpe := TMenuItem.Create(Self);
697
697
  TOpe.Caption := 'TOpenDialog';
699
699
 
700
700
  TPag := TMenuItem.Create(Self);
701
701
  TPag.Caption := 'TPageControl';
702
 
  TPag.OnClick := @ShowMessage0;          //++ Do not exist yet ++
 
702
  TPag.OnClick := @ShowMessage1;
703
703
 
704
704
  TPai := TMenuItem.Create(Self);
705
705
  TPai.Caption := 'TPaintBox';
860
860
  MainMenu1.Items.Add(Help1);
861
861
 
862
862
  About1 := TMenuItem.Create(Self);
863
 
  About1.Caption := '&About...';
 
863
  About1.Caption := '&About ...';
864
864
  About1.OnClick := @ShowTestForm;
865
865
  Help1.Add(About1);
866
866
end;
1934
1934
//++++++++++++++++++++++++++++++++++++ MessageDialog1 +++++++++++++++++++++++++++++++
1935
1935
//MessageDialog := TMessageDialog.Create(Self);
1936
1936
//++++++++++++++++++++++++++++++++++++ TNoteBook ++++++++++++++++++++++++++++++++++++
1937
 
NoteBook1 := TNoteBook.Create(Self); // TODO : Add all properties
 
1937
{NoteBook1 := TNoteBook.Create(Self); // TODO : Add all properties
1938
1938
  With NoteBook1 do
1939
1939
  begin
1940
1940
    OnClick        := @EventOnClick;
1960
1960
    Hint := 'NoteBook1';
1961
1961
    ShowHint := True;
1962
1962
    Show;
1963
 
  end;
 
1963
  end;}
1964
1964
//++++++++++++++++++++++++++++++++++++ OpenDialog1 ++++++++++++++++++++++++++++++++++
1965
1965
OpenDialog1 := TOpenDialog.Create(Self);
1966
1966
//++++++++++++++++++++++++++++++++++++ PageControl ++++++++++++++++++++++++++++++++++
1967
 
{PageControl1 := TPageControl.Create(Self);
 
1967
PageControl1 := TPageControl.Create(Self);
1968
1968
  with PageControl1 do
1969
1969
  begin
1970
1970
    OnClick        := @EventOnClick;
1973
1973
    OnMouseUp      := @EventOnMouseUp;
1974
1974
    Parent         := BenchForm[31];
1975
1975
 
1976
 
    ActivePage     := TabSheet1
1977
1976
    Align          := alNone;
1978
1977
    Cursor         := crDefault;
1979
1978
    DragCursor     := crDrag;
1989
1988
    Height         := 200;
1990
1989
    HelpContext    := 0;
1991
1990
    Hint           := 'PageControl1';
1992
 
    HotTrack       := False;
1993
1991
    Left           := 10;
1994
1992
    MultiLine      := False;
1995
1993
    Name           := 'PageControl1';
1996
1994
    ParentFont     := False;
1997
1995
    ParentShowHint := True;
1998
1996
    PopupMenu      := PopupMenu1;
1999
 
    ScrollOpposite := False;
2000
1997
    ShowHint       := True;
2001
 
    TabHeight      := 0;
2002
1998
    TabOrder       := 0;
2003
1999
    TabPosition    := tpTop;
2004
2000
    TabStop        := True;
2005
 
    TabWidth       := 0;
2006
2001
    Tag            := 0;   
2007
2002
    Top            := 10;
2008
2003
    Visible        := True;    
2009
2004
    Width          := 300;
 
2005
    for i:=1 to 3 do
 
2006
    with TTabSheet.Create(PageControl1) do
 
2007
    begin
 
2008
      PageControl := PageControl1;
 
2009
      Caption := 'TabSheet'+IntToStr(i);
 
2010
    end;
2010
2011
  end;
2011
 
TabSheet1 := TTabSheet.Create(Self);
2012
 
TabSheet1.Caption := 'TabSheet1';
2013
 
TabSheet1.PageControl := PageControl1;
2014
 
 
2015
 
TabSheet2 := TTabSheet.Create(Self);
2016
 
TabSheet2.Caption := 'TabSheet2';
2017
 
TabSheet2.PageControl := PageControl1;
2018
 
 
2019
 
TabSheet3 := TTabSheet.Create(Self);
2020
 
TabSheet3.Caption := 'TabSheet3';
2021
 
TabSheet3.PageControl := PageControl1;}
 
2012
 
2022
2013
//++++++++++++++++++++++++++++++++++++ PaintBox1 ++++++++++++++++++++++++++++++++++++
2023
2014
PaintBox1 := TPaintBox.Create(Self); //Gives Access violation !!!
2024
2015
  with PaintBox1 do
2477
2468
//ToolButton2 := TToolButton.Create(ToolBar1);
2478
2469
  //with ToolButton2 do
2479
2470
  //begin
2480
 
     // Assert(False, 'Trace:SETTING PARENT');
 
2471
     // DebugLn('Trace:SETTING PARENT');
2481
2472
   // parent := ToolBar1;
2482
2473
   // OnClick        := @EventOnClick;
2483
2474
    //Show;