GTK Cleanup

Shane

git-svn-id: trunk@1545 -
This commit is contained in:
lazarus 2002-03-25 17:59:20 +00:00
parent 3f5788bc3f
commit 852eb5a81f
12 changed files with 56 additions and 94 deletions

View File

@ -61,8 +61,7 @@ type
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
procedure WMDefaultClicked(var Message: TMessage); message LM_CLICKED;
protected
procedure AttachSignals; override;
procedure Click; override;
procedure Click; override;
//TODO: make this compatible
procedure CreateWnd; override;
property OnMouseEnter : TNotifyEvent read FOnEnter write FOnEnter;
@ -243,6 +242,10 @@ end.
{ =============================================================================
$Log$
Revision 1.14 2002/03/25 17:59:19 lazarus
GTK Cleanup
Shane
Revision 1.13 2002/02/24 20:51:23 lazarus
Improved TSpeedButton (Glyph, Spacing, Margin, drawing)
Added PageCount to TNotebook

View File

@ -625,7 +625,6 @@ type
procedure SetOrientation (Value : TProgressBarOrientation);
protected
procedure ApplyChanges;
procedure AttachSignals; override;
procedure InitializeWnd; override;
{ procedure SetBarTextFormat; }
public
@ -990,7 +989,6 @@ type
protected
procedure ApplyChanges;
procedure DoChange(var msg); message LM_CHANGED;
procedure AttachSignals; override;
procedure InitializeWnd; override;
{ ... what about these?
procedure CreateParams(var Params: TCreateParams); override;
@ -1783,6 +1781,10 @@ end.
{ =============================================================================
$Log$
Revision 1.30 2002/03/25 17:59:19 lazarus
GTK Cleanup
Shane
Revision 1.29 2002/03/24 16:38:00 lazarus
MWE:
* Fixed bug on ListItems.Delete

View File

@ -60,7 +60,6 @@ type
TPage = class(TWinControl)
private
protected
procedure AttachSignals; override;
procedure ReadState(Reader: TAbstractReader); override;
//procedure Paint; override;
procedure WMPaint(var Msg: TLMPaint); message LM_PAINT;
@ -437,6 +436,10 @@ end.
{
$Log$
Revision 1.21 2002/03/25 17:59:19 lazarus
GTK Cleanup
Shane
Revision 1.20 2002/03/14 23:25:51 lazarus
MG: fixed TBevel.Create and TListView.Destroy

View File

@ -114,7 +114,6 @@ type
procedure WMDestroy(var message: TLMDestroy); message LM_DESTROY;
protected
FFormState: TFormState;
procedure AttachSignals; override;
function CloseQuery : boolean; virtual;
procedure CreateParams(var Params: TCreateParams); override;
procedure CreateWnd; override;

View File

@ -110,28 +110,13 @@ Begin
if Assigned(FOnChange) then FOnChange(Self);
end;
{------------------------------------------------------------------------------
Method: TCustomEdit.AttachSignals
Params: none
Returns: Nothing
Gets called after the window is created but before the controls are created
and the cached propeties are set.
This is the only place where a call to SetCallBack is made.
------------------------------------------------------------------------------}
procedure TCustomEdit.AttachSignals;
begin
inherited AttachSignals;
SetCallback(LM_CHANGED);
SetCallback(LM_CUTTOCLIP);
SetCallback(LM_COPYTOCLIP);
SetCallback(LM_PASTEFROMCLIP);
end;
{ =============================================================================
$Log$
Revision 1.6 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane
Revision 1.5 2002/02/25 16:48:13 lazarus
MG: new IDE window layout system

View File

@ -6,17 +6,6 @@
{ $DEFINE CHECK_POSITION}
{------------------------------------------------------------------------------}
{ TCustomForm AttachSignals }
{------------------------------------------------------------------------------}
procedure TCustomForm.AttachSignals;
begin
inherited AttachSignals;
SetCallback(LM_CONFIGUREEVENT);
SetCallback(LM_CLOSEQUERY);
SetCallBack(LM_Activate);
end;
{------------------------------------------------------------------------------}
{ TCustomForm ClientWndProc }
{------------------------------------------------------------------------------}
@ -969,6 +958,10 @@ end;
{ =============================================================================
$Log$
Revision 1.38 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane
Revision 1.37 2002/03/18 11:44:41 lazarus
MG: TForm.Position will now considered before creating form on 0,0

View File

@ -260,7 +260,6 @@ writeln('[TCustomNotebook.CreateWnd] D');
SetTabPosition(fTabPosition);
SetPageIndex(FPageIndex);
SetCallback(LM_CHANGED);
{$IFDEF NOTEBOOK_DEBUG}
writeln('[TCustomNotebook.CreateWnd] END');
{$ENDIF}
@ -535,6 +534,10 @@ end;}
{ =============================================================================
$Log$
Revision 1.14 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane
Revision 1.13 2002/02/24 20:51:24 lazarus
Improved TSpeedButton (Glyph, Spacing, Margin, drawing)
Added PageCount to TNotebook

View File

@ -51,8 +51,8 @@ begin
Parent.HandleNeeded;
if Parent.HandleAllocated
then InterfaceObject.IntSendMessage3(LM_CREATE, Self, nil);
if FHandle <> 0 then begin
AttachSignals;
if FHandle <> 0 then
begin
if ShortCut <> 0 then ShortcutChanged(0, Shortcut);
end;
end;
@ -65,34 +65,6 @@ begin
end;
end;
{------------------------------------------------------------------------------
Method: TMenuItem.AttachSignals
Params: none
Returns: Nothing
Gets called after the window is created but before the controls are created
and the cached propeties are set.
This is the only place where a call to SetCallBack is made.
------------------------------------------------------------------------------}
procedure TMenuItem.AttachSignals;
begin
InterfaceObject.SetCallback(LM_ACTIVATE, Self);
end;
{------------------------------------------------------------------------------
Method: TMenuItem.DetachSignals
Params: none
Returns: Nothing
Gets called the moment the window is about to be destroyed. All callbacks
should be removed here.
------------------------------------------------------------------------------}
procedure TMenuItem.DetachSignals;
begin
InterfaceObject.RemoveCallbacks(Self);
end;
{------------------------------------------------------------------------------
Method: TMenuItem.Delete
Params: Index:
@ -103,7 +75,6 @@ end;
procedure TMenuItem.Delete(Index: Integer);
begin
//TODO: Complete
DetachSignals;
end;
{------------------------------------------------------------------------------
@ -438,6 +409,10 @@ end;
{ =============================================================================
$Log$
Revision 1.10 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane
Revision 1.9 2002/02/18 22:46:11 lazarus
Implented TMenuItem.ShortCut (not much tested).
@ -491,6 +466,10 @@ end;
$Log$
Revision 1.10 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane
Revision 1.9 2002/02/18 22:46:11 lazarus
Implented TMenuItem.ShortCut (not much tested).

View File

@ -29,22 +29,6 @@ begin
Caption := '';
end;
{------------------------------------------------------------------------------
Method: TPage.AttachSignals
Params: None
Returns: Nothing
Attaches signals.
------------------------------------------------------------------------------}
procedure TPage.AttachSignals;
begin
inherited AttachSignals;
Assert(False, 'Trace:[TPage.AttachSignals] Assign Callback Signals');
SetCallback(LM_Paint);
SetCallback(LM_WINDOWPOSCHANGED);
end;
{------------------------------------------------------------------------------
TPage ReadState
------------------------------------------------------------------------------}
@ -100,6 +84,10 @@ end;
{
$Log$
Revision 1.6 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane
Revision 1.5 2002/03/13 22:48:16 lazarus
Constraints implementation (first cut) and sizig - moving system rework to
better match Delphi/Kylix way of doing things (the existing implementation

View File

@ -19,12 +19,13 @@ LastFileSelectRow : gint;
// temp solution to fill msgqueue
function DeliverPostMessage(const Target: Pointer; var Message): GBoolean;
begin
if TObject(Target) is TWinControl
then begin
if TObject(Target) is TWinControl then
begin
Result := PostMessage(TWinControl(Target).Handle, TLMessage(Message).Msg,
TLMessage(Message).WParam, TLMessage(Message).LParam);
end
else begin
end
else
begin
Result := DeliverMessage(Target, Message) = 0;
end;
end;
@ -1591,6 +1592,10 @@ end;
{ =============================================================================
$Log$
Revision 1.64 2002/03/25 17:59:20 lazarus
GTK Cleanup
Shane
Revision 1.63 2002/03/23 19:05:52 lazarus
MG: pascal lowercase for open new unit

View File

@ -77,8 +77,6 @@ type
procedure ShortcutChanged(const OldValue, Value : TShortcut);
protected
procedure CreateHandle; virtual;
procedure AttachSignals; virtual;
procedure DetachSignals; virtual;
procedure DoClicked(var msg); message LM_ACTIVATE; //'activate';
function GetHandle: HMenu;
Procedure SetImageIndex(value : Integer);
@ -203,6 +201,10 @@ end.
{
$Log$
Revision 1.8 2002/03/25 17:59:19 lazarus
GTK Cleanup
Shane
Revision 1.7 2002/02/20 23:33:24 lazarus
MWE:
+ Published OnClick for TMenuItem

View File

@ -138,7 +138,6 @@ type
procedure CreateHandle; override;
procedure DestroyHandle; override;
procedure DoChange(var msg); message LM_CHANGED;
procedure AttachSignals; override;
function GetSelLength : integer;
function GetSelStart : integer;
function GetSelText : string;
@ -263,7 +262,6 @@ type
protected
Procedure CMTextChanged(Var Message : TLMessage); message CM_TextChanged;
Procedure Change; dynamic;
procedure AttachSignals; override;
property OnChange : TNotifyEvent read FOnChange write FOnChange;
public
@ -286,8 +284,6 @@ type
FScrollBars: TScrollStyle;
FWordWrap: Boolean;
protected
// procedure AttachSignals; override;
procedure SetLines(Value : TStrings);
procedure SetWordWrap(Value : Boolean);
public
@ -583,6 +579,10 @@ end.
{ =============================================================================
$Log$
Revision 1.22 2002/03/25 17:59:19 lazarus
GTK Cleanup
Shane
Revision 1.21 2002/02/20 23:33:24 lazarus
MWE:
+ Published OnClick for TMenuItem