diff options
author | Felipe Menteiro de Carvalho <sekelsenmat@users.sourceforge.net> | 2007-05-17 08:15:20 +0000 |
---|---|---|
committer | Felipe Menteiro de Carvalho <sekelsenmat@users.sourceforge.net> | 2007-05-17 08:15:20 +0000 |
commit | bead9d72b61f683954957650fd688eaeb4644a7c (patch) | |
tree | 6eaf5337bfce61a8e3b096f7474564674bc676ee | |
parent | fe73e95e263dbffa96386ab1aa2b3cd7a78e66dc (diff) | |
download | fpGUI-bead9d72b61f683954957650fd688eaeb4644a7c.tar.xz |
fixed compilation of the prototype
-rw-r--r-- | prototypes/multihandle/gui2Base.pas | 46 | ||||
-rw-r--r-- | prototypes/multihandle/test.lpr | 24 |
2 files changed, 35 insertions, 35 deletions
diff --git a/prototypes/multihandle/gui2Base.pas b/prototypes/multihandle/gui2Base.pas index 38c03ff7..fe25dbf9 100644 --- a/prototypes/multihandle/gui2Base.pas +++ b/prototypes/multihandle/gui2Base.pas @@ -47,9 +47,9 @@ type ); - { TWidget } + { TFWidget } - TWidget = class(TFWindow) + TFWidget = class(TFWindow) private FColor: TGfxColor; FOnClick: TNotifyEvent; @@ -71,9 +71,9 @@ type procedure SetFocus; end; - { TForm } + { TFForm } - TForm = class(TWidget) + TFForm = class(TFWidget) public constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; constructor Create; virtual; reintroduce; @@ -82,14 +82,14 @@ type { TFPopupWindow } {$Note TFPopupWindow is still work in progess. } - TFPopupWindow = class(TForm) + TFPopupWindow = class(TFForm) public constructor Create; override; end; { TFButton } - TFButton = class(TWidget) + TFButton = class(TFWidget) private FCaption: string; procedure SetCaption(const AValue: string); @@ -104,7 +104,7 @@ type { TFLabel } - TFLabel = class(TWidget) + TFLabel = class(TFWidget) private FCaption: string; procedure SetCaption(const AValue: string); @@ -117,7 +117,7 @@ type { TFCustomEdit } - TFCustomEdit = class(TWidget) + TFCustomEdit = class(TFWidget) private FText: string; procedure SetText(const AValue: string); @@ -130,7 +130,7 @@ type { TEdit } - TEdit = class(TFCustomEdit) + TFEdit = class(TFCustomEdit) public property Text; end; @@ -180,9 +180,9 @@ begin Canvas.FillRect(Rect(Left + 2, Top + 2, Right - 2, Bottom - 2)); end; -{ TWidget } +{ TFWidget } -procedure TWidget.EvOnMouseReleased(Sender: TObject; AButton: TMouseButton; +procedure TFWidget.EvOnMouseReleased(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); begin {$IFDEF DEBUG} Writeln(ClassName + '.EvOnMouseReleased'); {$ENDIF} @@ -199,7 +199,7 @@ begin end; end; -procedure TWidget.EvOnMousePressed(Sender: TObject; AButton: TMouseButton; +procedure TFWidget.EvOnMousePressed(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); begin {$IFDEF DEBUG} Writeln(ClassName + '.EvOnMousePressed'); {$ENDIF} @@ -212,20 +212,20 @@ begin end; end; -procedure TWidget.EvOnMouseLeave(Sender: TObject); +procedure TFWidget.EvOnMouseLeave(Sender: TObject); begin Exclude(FWidgetState, wsHasFocus); // Paint; end; -procedure TWidget.SetColor(const AValue: TGfxColor); +procedure TFWidget.SetColor(const AValue: TGfxColor); begin if FColor = AValue then exit; FColor := AValue; Paint; end; -procedure TWidget.Paint; +procedure TFWidget.Paint; var r: TRect; begin @@ -238,7 +238,7 @@ begin Canvas.FillRect(r); end; -constructor TWidget.Create(AParent: TFCustomWindow; +constructor TFWidget.Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); begin inherited Create(AParent, AWindowOptions); @@ -253,19 +253,19 @@ begin OnMouseLeave := @EvOnMouseLeave; end; -constructor TWidget.Create(AParent: TFCustomWindow); +constructor TFWidget.Create(AParent: TFCustomWindow); begin Create(AParent, [woChildWindow]); end; -destructor TWidget.Destroy; +destructor TFWidget.Destroy; begin OnMouseReleased := nil; OnMousePressed := nil; inherited Destroy; end; -procedure TWidget.ProcessEvent(AEvent: TFEvent); +procedure TFWidget.ProcessEvent(AEvent: TFEvent); begin inherited ProcessEvent(AEvent); case AEvent.EventType of @@ -277,22 +277,22 @@ begin end; -procedure TWidget.SetFocus; +procedure TFWidget.SetFocus; begin Include(FWidgetState, wsHasFocus); Paint; // FindForm.FocusedWidget := Self; end; -{ TForm } +{ TFForm } -constructor TForm.Create(AParent: TFCustomWindow; +constructor TFForm.Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); begin inherited Create(AParent, AWindowOptions); end; -constructor TForm.Create; +constructor TFForm.Create; begin inherited Create(nil, [woWindow]); end; diff --git a/prototypes/multihandle/test.lpr b/prototypes/multihandle/test.lpr index 8a183ecc..23e4f4f5 100644 --- a/prototypes/multihandle/test.lpr +++ b/prototypes/multihandle/test.lpr @@ -22,23 +22,23 @@ type { TMainWindow } - TMainWindow = class(TForm) + TMainWindow = class(TFForm) procedure btnCancelClick(Sender: TObject); procedure btnCloseClick(Sender: TObject); procedure btnPopupClick(Sender: TObject); private - btnClose: TButton; - btnCancel: TButton; - btnPopup: TButton; - lblWelcome: TLabel; - edEdit: TEdit; + btnClose: TFButton; + btnCancel: TFButton; + btnPopup: TFButton; + lblWelcome: TFLabel; + edEdit: TFEdit; public constructor Create; override; destructor Destroy; override; end; - TMyPopup = class(TPopupWindow) + TMyPopup = class(TFPopupWindow) public constructor Create; override; end; @@ -87,22 +87,22 @@ begin SetClientSize(Size(320, 200)); Color := clLightSteelBlue; - btnClose := TButton.Create(self, Point(20, 150)); + btnClose := TFButton.Create(self, Point(20, 150)); btnClose.Caption := 'Close'; btnClose.OnClick := @btnCloseClick; - btnCancel := TButton.Create(self, Point(150, 150)); + btnCancel := TFButton.Create(self, Point(150, 150)); btnCancel.Caption := 'Cancel'; btnCancel.OnClick := @btnCancelClick; - btnPopup := TButton.Create(self, Point(80, 80)); + btnPopup := TFButton.Create(self, Point(80, 80)); btnPopup.Caption := 'Popup'; btnPopup.OnClick := @btnPopupClick; - lblWelcome := TLabel.Create(self, Point(10, 10)); + lblWelcome := TFLabel.Create(self, Point(10, 10)); lblWelcome.Caption := 'So what do you think?'; - edEdit := TEdit.Create(self, Point(65, 110)); + edEdit := TFEdit.Create(self, Point(65, 110)); edEdit.Text := 'Multi-Handle widgets'; end; |