mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 04:19:12 +02:00
Added the Nudge feature to the IDE.
Shane git-svn-id: trunk@109 -
This commit is contained in:
parent
176191f0cf
commit
a392379d1d
@ -91,8 +91,10 @@ type
|
|||||||
function IsSelected(AControl: TControl): Boolean;
|
function IsSelected(AControl: TControl): Boolean;
|
||||||
procedure Remove(AControl: TControl);
|
procedure Remove(AControl: TControl);
|
||||||
procedure MoveSelection(dx, dy: integer);
|
procedure MoveSelection(dx, dy: integer);
|
||||||
|
procedure SizeSelection(dx, dy: integer);
|
||||||
property Visible: Boolean read FVisible write SetVisible;
|
property Visible: Boolean read FVisible write SetVisible;
|
||||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure SetCaptureGrabber(AGrabber:TGrabber);
|
procedure SetCaptureGrabber(AGrabber:TGrabber);
|
||||||
@ -250,6 +252,7 @@ end;
|
|||||||
procedure TGrabber.PaintWindow(DC: HDC);
|
procedure TGrabber.PaintWindow(DC: HDC);
|
||||||
begin
|
begin
|
||||||
// WriteLn(Format('[TGrabber.PaintWindow] 0x%x', [DC]));
|
// WriteLn(Format('[TGrabber.PaintWindow] 0x%x', [DC]));
|
||||||
|
// if Visible then
|
||||||
FillRect(DC, Rect(0, 0, Width, Height), GetStockObject(BLACK_BRUSH));
|
FillRect(DC, Rect(0, 0, Width, Height), GetStockObject(BLACK_BRUSH));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -271,6 +274,23 @@ Writeln('**********');
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TControlSelection.SizeSelection(dx, dy: integer);
|
||||||
|
begin
|
||||||
|
{Writeln('**********');
|
||||||
|
Writeln('Size Selection');
|
||||||
|
Writeln(Format('dx,dy = %d,%d',[dx,dy]));
|
||||||
|
Writeln(Format('FLeft,FTop= %d,%d',[FLeft,FTop]));
|
||||||
|
Writeln('**********');
|
||||||
|
}
|
||||||
|
if (dx<>0) or (dy<>0) then begin
|
||||||
|
Inc(FWidth,dx);
|
||||||
|
Inc(FHeight,dy);
|
||||||
|
SizeContent;
|
||||||
|
SetGrabbers;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TControlSelection.Add(AControl: TControl);
|
procedure TControlSelection.Add(AControl: TControl);
|
||||||
begin
|
begin
|
||||||
if AControl <> nil
|
if AControl <> nil
|
||||||
@ -283,8 +303,8 @@ begin
|
|||||||
FControlList.Add(AControl);
|
FControlList.Add(AControl);
|
||||||
end;
|
end;
|
||||||
AdjustSize(Acontrol, FControlList.Count = 1);
|
AdjustSize(Acontrol, FControlList.Count = 1);
|
||||||
FVisible:=not (AControl is TCustomForm);
|
Visible:=not (AControl is TCustomForm);
|
||||||
SetGrabbers;
|
//This is taken care of in SETVISIBLE SetGrabbers;
|
||||||
with TSelectControl(AControl) do
|
with TSelectControl(AControl) do
|
||||||
begin
|
begin
|
||||||
{OnMouseDown := @ControlMouseDown;
|
{OnMouseDown := @ControlMouseDown;
|
||||||
@ -367,8 +387,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
FWidth := 0;
|
FWidth := 0;
|
||||||
FHeight := 0;
|
FHeight := 0;
|
||||||
FVisible := False;
|
Visible := False;
|
||||||
//SetGrabbers;
|
//This is set in SETVISIBLE SetGrabbers;
|
||||||
DoChange;
|
DoChange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -531,6 +551,7 @@ begin
|
|||||||
AdjustSize(TControl(FControlList[n]), n = 0);
|
AdjustSize(TControl(FControlList[n]), n = 0);
|
||||||
end
|
end
|
||||||
else FVisible := False;
|
else FVisible := False;
|
||||||
|
|
||||||
SetGrabbers;
|
SetGrabbers;
|
||||||
|
|
||||||
with TSelectControl(AControl) do
|
with TSelectControl(AControl) do
|
||||||
@ -556,6 +577,7 @@ begin
|
|||||||
for GrabPos := Low(TGrabIndex) to High(TGrabIndex) do
|
for GrabPos := Low(TGrabIndex) to High(TGrabIndex) do
|
||||||
begin
|
begin
|
||||||
Grabber := FGrabbers[GrabPos];
|
Grabber := FGrabbers[GrabPos];
|
||||||
|
|
||||||
if FVisible
|
if FVisible
|
||||||
then begin
|
then begin
|
||||||
//Write('[TControlSelection.SetGrabbers] Setting grabber ',Ord(GrabPos),' --> ');
|
//Write('[TControlSelection.SetGrabbers] Setting grabber ',Ord(GrabPos),' --> ');
|
||||||
@ -594,9 +616,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Grabber.SetBounds(GrabLeft,GrabTop,GRAB_SIZE,GRAB_SIZE);
|
Grabber.SetBounds(GrabLeft,GrabTop,GRAB_SIZE,GRAB_SIZE);
|
||||||
|
|
||||||
//WriteLN(Format('X:%d, Y:%d', [Grabber.Left, Grabber.Top]));
|
//WriteLN(Format('X:%d, Y:%d', [Grabber.Left, Grabber.Top]));
|
||||||
end;
|
end;
|
||||||
Grabber.Visible := FVisible;
|
Grabber.Visible := FVisible;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -44,13 +44,18 @@ type
|
|||||||
protected
|
protected
|
||||||
MouseDownControl : TObject;
|
MouseDownControl : TObject;
|
||||||
MouseDownPos, MouseUpPos, LastMouseMovePos : TPoint;
|
MouseDownPos, MouseUpPos, LastMouseMovePos : TPoint;
|
||||||
|
CTRLDOWN, SHIFTDOWN : Boolean;
|
||||||
|
|
||||||
Procedure MouseDownOnControl(Sender : TControl; Message : TLMessage);
|
Procedure MouseDownOnControl(Sender : TControl; Message : TLMessage);
|
||||||
procedure MouseMoveOnControl(Sender : TControl; var Message : TLMessage);
|
procedure MouseMoveOnControl(Sender : TControl; var Message : TLMessage);
|
||||||
Procedure MouseUpOnControl(Sender : TControl; Message:TLMessage);
|
Procedure MouseUpOnControl(Sender : TControl; Message:TLMessage);
|
||||||
|
|
||||||
Procedure KeyDown(Sender : TControl; Message:TLMKEY);
|
Procedure KeyDown(Sender : TControl; Message:TLMKEY);
|
||||||
|
Procedure KeyUP(Sender : TControl; Message:TLMKEY);
|
||||||
|
|
||||||
Procedure RemoveControl(Control : TComponent);
|
Procedure RemoveControl(Control : TComponent);
|
||||||
|
Procedure NudgeControl(Value1,Value2 : Integer);
|
||||||
|
Procedure NudgeSize(Value1,Value2 : Integer);
|
||||||
|
|
||||||
public
|
public
|
||||||
ControlSelection : TControlSelection;
|
ControlSelection : TControlSelection;
|
||||||
@ -81,6 +86,14 @@ type
|
|||||||
uses
|
uses
|
||||||
Sysutils, Typinfo,Math;
|
Sysutils, Typinfo,Math;
|
||||||
|
|
||||||
|
|
||||||
|
const
|
||||||
|
mk_lbutton = 1;
|
||||||
|
mk_rbutton = 2;
|
||||||
|
mk_shift = 4;
|
||||||
|
mk_control = 8;
|
||||||
|
mk_mbutton = $10;
|
||||||
|
|
||||||
var
|
var
|
||||||
GridPoints : TGridPoint;
|
GridPoints : TGridPoint;
|
||||||
|
|
||||||
@ -116,9 +129,21 @@ Procedure TDesigner.RemoveControl(Control : TComponent);
|
|||||||
Begin
|
Begin
|
||||||
Writeln('RemoveControl called');
|
Writeln('RemoveControl called');
|
||||||
FSourceEditor.RemoveControlCode(Control);
|
FSourceEditor.RemoveControlCode(Control);
|
||||||
|
FCustomForm.Remove(TCOntrol(Control)); //this send a message to notification and removes it from the controlselection
|
||||||
Control.Destroy;
|
Control.Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Procedure TDesigner.NudgeControl(Value1,Value2 : Integer);
|
||||||
|
Begin
|
||||||
|
Writeln('NudgeControl');
|
||||||
|
ControlSelection.MoveSelection(Value1,Value2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Procedure TDesigner.NudgeSize(Value1,Value2 : Integer);
|
||||||
|
Begin
|
||||||
|
Writeln('NudgeSize');
|
||||||
|
ControlSelection.SizeSelection(Value1,Value2);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDesigner.SelectOnlyThisComponent(AComponent:TComponent);
|
procedure TDesigner.SelectOnlyThisComponent(AComponent:TComponent);
|
||||||
begin
|
begin
|
||||||
@ -133,8 +158,10 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TDesigner.MouseDownOnControl(Sender : TControl; Message : TLMessage);
|
procedure TDesigner.MouseDownOnControl(Sender : TControl; Message : TLMessage);
|
||||||
|
var
|
||||||
|
SHift : TShiftState;
|
||||||
Begin
|
Begin
|
||||||
if assigned(MouseDownControl) and (MOuseDownControl <> Sender) then Exit;
|
// if assigned(MouseDownControl) and (MOuseDownControl <> Sender) then Exit;
|
||||||
Writeln('Left is '+Inttostr(TCOntrol(Sender).left));
|
Writeln('Left is '+Inttostr(TCOntrol(Sender).left));
|
||||||
Writeln('Top is '+Inttostr(TCOntrol(Sender).Top));
|
Writeln('Top is '+Inttostr(TCOntrol(Sender).Top));
|
||||||
Writeln('***************************');
|
Writeln('***************************');
|
||||||
@ -156,24 +183,34 @@ Begin
|
|||||||
inc(MouseDownPos.Y,TControl(Sender).Top);
|
inc(MouseDownPos.Y,TControl(Sender).Top);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Shift := [];
|
||||||
|
if (TLMMouse(Message).keys and MK_Shift) = MK_Shift then
|
||||||
|
Writeln('Shift down')
|
||||||
|
else
|
||||||
|
Writeln('No Shift down');
|
||||||
|
|
||||||
|
if (TLMMouse(Message).keys and MK_Control) = MK_Control then
|
||||||
|
Writeln('CTRL down')
|
||||||
|
else
|
||||||
|
Writeln('No CTRL down');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MouseDownControl:=Sender;
|
MouseDownControl:=Sender;
|
||||||
LastMouseMovePos:=MouseDownPos;
|
LastMouseMovePos:=MouseDownPos;
|
||||||
|
Writeln('Sender is '+sender.name);
|
||||||
if FMainIDE.SelectedComponent = nil then
|
if FMainIDE.SelectedComponent = nil then
|
||||||
Begin //mouse pointer button pressed.
|
Begin //mouse pointer button pressed.
|
||||||
if not (Sender is TCustomForm) then begin
|
if not (Sender is TCustomForm) then begin
|
||||||
|
if (TLMMouse(Message).keys and MK_Shift) = MK_Shift then
|
||||||
|
ControlSelection.Add(sender)
|
||||||
|
else
|
||||||
SelectOnlyThisComponent(TComponent(Sender));
|
SelectOnlyThisComponent(TComponent(Sender));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
procedure TDesigner.MouseUpOnControl(Sender : TControl; Message:TLMessage);
|
procedure TDesigner.MouseUpOnControl(Sender : TControl; Message:TLMessage);
|
||||||
const
|
|
||||||
mk_lbutton = 1;
|
|
||||||
mk_rbutton = 2;
|
|
||||||
mk_shift = 4;
|
|
||||||
mk_control = 8;
|
|
||||||
mk_mbutton = $10;
|
|
||||||
var
|
var
|
||||||
ParentCI, NewCI : TComponentInterface;
|
ParentCI, NewCI : TComponentInterface;
|
||||||
NewLeft, NewTop, NewWidth, NewHeight : Integer;
|
NewLeft, NewTop, NewWidth, NewHeight : Integer;
|
||||||
@ -240,8 +277,8 @@ Begin
|
|||||||
|
|
||||||
if FMainIDE.SelectedComponent = nil then
|
if FMainIDE.SelectedComponent = nil then
|
||||||
Begin //mouse pointer button pressed.
|
Begin //mouse pointer button pressed.
|
||||||
if Sender is TCustomForm then
|
{ if Sender is TCustomForm then
|
||||||
SelectOnlyThisComponent(TComponent(Sender));
|
SelectOnlyThisComponent(TComponent(Sender));}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Begin //add a new control
|
Begin //add a new control
|
||||||
@ -370,6 +407,15 @@ with MEssage do
|
|||||||
Writeln('KEYDATA = '+inttostr(KeyData));
|
Writeln('KEYDATA = '+inttostr(KeyData));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ CTRLDOWN, SHIFTDOWN : Boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
if Message.CharCode = 16 then //SHIFT
|
||||||
|
SHIFTDOWN := True
|
||||||
|
else
|
||||||
|
if Message.CharCode = 17 then //CTRL
|
||||||
|
CTRLDOWN := True
|
||||||
|
else
|
||||||
if Message.CharCode = 46 then //DEL KEY
|
if Message.CharCode = 46 then //DEL KEY
|
||||||
begin
|
begin
|
||||||
for I := 0 to FCustomForm.ComponentCount-1 do
|
for I := 0 to FCustomForm.ComponentCount-1 do
|
||||||
@ -381,17 +427,75 @@ if Message.CharCode = 46 then //DEL KEY
|
|||||||
RemoveControl(TControl(FCustomForm.Components[i]));
|
RemoveControl(TControl(FCustomForm.Components[i]));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
FFormEditor.ClearSelected;
|
SelectOnlythisComponent(FCustomForm);
|
||||||
// this will automatically inform the object inspector
|
|
||||||
ControlSelection.Add(FCustomForm);
|
|
||||||
FFormEditor.AddSelected(FCustomForm);
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if Message.CharCode = 38 then //UP ARROW
|
||||||
|
Begin
|
||||||
|
If CTRLDOWN then
|
||||||
|
NudgeControl(0,-1)
|
||||||
|
else
|
||||||
|
If SHIFTDOWN then
|
||||||
|
NudgeSize(0,-1);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if Message.CharCode = 40 then //DOWN ARROW
|
||||||
|
Begin
|
||||||
|
If CTRLDOWN then
|
||||||
|
NudgeControl(0,1)
|
||||||
|
else
|
||||||
|
If SHIFTDOWN then
|
||||||
|
NudgeSize(0,1);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if Message.CharCode = 39 then //RIGHT ARROW
|
||||||
|
Begin
|
||||||
|
If CTRLDOWN then
|
||||||
|
NudgeControl(1,0)
|
||||||
|
else
|
||||||
|
If SHIFTDOWN then
|
||||||
|
NudgeSize(1,0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if Message.CharCode = 37 then //LEFT ARROW
|
||||||
|
Begin
|
||||||
|
If CTRLDOWN then
|
||||||
|
NudgeControl(-1,0)
|
||||||
|
else
|
||||||
|
If SHIFTDOWN then
|
||||||
|
NudgeSize(-1,0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{-----------------------------------------K E Y U P --------------------------------}
|
||||||
|
Procedure TDesigner.KeyUp(Sender : TControl; Message:TLMKEY);
|
||||||
|
var
|
||||||
|
I : Integer;
|
||||||
|
Begin
|
||||||
|
Writeln('KEYUp');
|
||||||
|
with MEssage do
|
||||||
|
Begin
|
||||||
|
Writeln('CHARCODE = '+inttostr(charcode));
|
||||||
|
Writeln('KEYDATA = '+inttostr(KeyData));
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ CTRLDOWN, SHIFTDOWN : Boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
if Message.CharCode = 16 then //SHIFT
|
||||||
|
SHIFTDOWN := False
|
||||||
|
else
|
||||||
|
if Message.CharCode = 17 then //CTRL
|
||||||
|
CTRLDOWN := False
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
function TDesigner.IsDesignMsg(Sender: TControl; var Message: TLMessage): Boolean;
|
function TDesigner.IsDesignMsg(Sender: TControl; var Message: TLMessage): Boolean;
|
||||||
Begin
|
Begin
|
||||||
result := false;
|
result := false;
|
||||||
@ -401,7 +505,9 @@ else
|
|||||||
if ((Message.msg >= LM_KeyFIRST) and (Message.msg <= LM_KeyLAST)) then
|
if ((Message.msg >= LM_KeyFIRST) and (Message.msg <= LM_KeyLAST)) then
|
||||||
Begin
|
Begin
|
||||||
Writeln('KEY MESSAGE in IsDesignMsg');
|
Writeln('KEY MESSAGE in IsDesignMsg');
|
||||||
KeyDown(Sender,TLMKey(Message));
|
if MEssage.MSG = LM_KEYDOWN then KeyDown(Sender,TLMKey(Message))
|
||||||
|
else
|
||||||
|
if MEssage.MSG = LM_KEYUP then KeyUP(Sender,TLMKey(Message));
|
||||||
Result := true;
|
Result := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -78,14 +78,18 @@ end;
|
|||||||
and the cached propeties are set.
|
and the cached propeties are set.
|
||||||
This is the only place where a call to SetCallBack is made.
|
This is the only place where a call to SetCallBack is made.
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TCustomMemo.AttachSignals;
|
{procedure TCustomMemo.AttachSignals;
|
||||||
begin
|
begin
|
||||||
inherited AttachSignals;
|
inherited AttachSignals;
|
||||||
end;
|
end; }
|
||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.2 2001/01/10 20:12:29 lazarus
|
||||||
|
Added the Nudge feature to the IDE.
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.1 2000/07/13 10:28:25 michael
|
Revision 1.1 2000/07/13 10:28:25 michael
|
||||||
+ Initial import
|
+ Initial import
|
||||||
|
|
||||||
|
@ -198,8 +198,11 @@ begin
|
|||||||
// Assert(False, Format('Trace:[GTKKeyUpDown] Type: %3:d, GTK: 0x%0:x(%0:d) LCL: 0x%1:x(%1:d) VK: 0x%2:x(%2:d)', [Event^.keyval, KeyCode, Msg.CharCode, Event^.theType]));
|
// Assert(False, Format('Trace:[GTKKeyUpDown] Type: %3:d, GTK: 0x%0:x(%0:d) LCL: 0x%1:x(%1:d) VK: 0x%2:x(%2:d)', [Event^.keyval, KeyCode, Msg.CharCode, Event^.theType]));
|
||||||
|
|
||||||
Flags := 0;
|
Flags := 0;
|
||||||
|
|
||||||
if Extended then Flags := KF_EXTENDED;
|
if Extended then Flags := KF_EXTENDED;
|
||||||
if SysKey then Flags := Flags or KF_ALTDOWN;
|
if SysKey then Flags := Flags or KF_ALTDOWN;
|
||||||
|
|
||||||
|
|
||||||
Msg.KeyData := $00000000; //TODO: OEM char
|
Msg.KeyData := $00000000; //TODO: OEM char
|
||||||
Msg.KeyData := Msg.KeyData or (Flags shl 16);
|
Msg.KeyData := Msg.KeyData or (Flags shl 16);
|
||||||
|
|
||||||
@ -211,7 +214,10 @@ begin
|
|||||||
if SysKey
|
if SysKey
|
||||||
then Msg.msg := LM_SYSKEYUP
|
then Msg.msg := LM_SYSKEYUP
|
||||||
else Msg.msg := LM_KEYUP;
|
else Msg.msg := LM_KEYUP;
|
||||||
Msg.KeyData := Msg.KeyData or 0{TODO: previous keystate} or $0001 {TODO: repeatcount};
|
|
||||||
|
Flags := KF_UP or KF_REPEAT;
|
||||||
|
|
||||||
|
Msg.KeyData := Msg.KeyData or (Flags shl 16) or $0001 {allways};
|
||||||
Result := DeliverPostMessage(data, msg);
|
Result := DeliverPostMessage(data, msg);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@ -222,8 +228,7 @@ begin
|
|||||||
then Msg.msg := LM_SYSKEYDOWN
|
then Msg.msg := LM_SYSKEYDOWN
|
||||||
else Msg.msg := LM_KEYDOWN;
|
else Msg.msg := LM_KEYDOWN;
|
||||||
|
|
||||||
Flags := KF_UP or KF_REPEAT;
|
Msg.KeyData := Msg.KeyData or 0{TODO: previous keystate} or $0001 {TODO: repeatcount};
|
||||||
Msg.KeyData := Msg.KeyData or (Flags shl 16) or $0001 {allways};
|
|
||||||
Result := DeliverPostMessage(data, msg);
|
Result := DeliverPostMessage(data, msg);
|
||||||
|
|
||||||
if KeyCode <> $FFFF
|
if KeyCode <> $FFFF
|
||||||
@ -1095,6 +1100,10 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.12 2001/01/10 20:12:29 lazarus
|
||||||
|
Added the Nudge feature to the IDE.
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.11 2001/01/09 18:23:21 lazarus
|
Revision 1.11 2001/01/09 18:23:21 lazarus
|
||||||
Worked on moving controls. It's just not working with the X and Y coord's I'm getting.
|
Worked on moving controls. It's just not working with the X and Y coord's I'm getting.
|
||||||
Shane
|
Shane
|
||||||
|
@ -1282,6 +1282,8 @@ begin
|
|||||||
LM_SYSCHAR,
|
LM_SYSCHAR,
|
||||||
LM_SYSKEYUP:
|
LM_SYSKEYUP:
|
||||||
begin
|
begin
|
||||||
|
if (sender is TMemo) then
|
||||||
|
Writeln('KEY-PRESS-EVENT for TMEmo');
|
||||||
ConnectSignal(gFixed, 'key-press-event', @GTKKeyUpDown, GDK_KEY_PRESS_MASK);
|
ConnectSignal(gFixed, 'key-press-event', @GTKKeyUpDown, GDK_KEY_PRESS_MASK);
|
||||||
ConnectSignal(gFixed, 'key-release-event', @GTKKeyUpDown, GDK_KEY_RELEASE_MASK);
|
ConnectSignal(gFixed, 'key-release-event', @GTKKeyUpDown, GDK_KEY_RELEASE_MASK);
|
||||||
end;
|
end;
|
||||||
@ -2703,6 +2705,10 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.17 2001/01/10 20:12:29 lazarus
|
||||||
|
Added the Nudge feature to the IDE.
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.16 2001/01/09 18:23:21 lazarus
|
Revision 1.16 2001/01/09 18:23:21 lazarus
|
||||||
Worked on moving controls. It's just not working with the X and Y coord's I'm getting.
|
Worked on moving controls. It's just not working with the X and Y coord's I'm getting.
|
||||||
Shane
|
Shane
|
||||||
|
@ -184,6 +184,7 @@ type
|
|||||||
protected
|
protected
|
||||||
Procedure CMTextChanged(Var Message : TLMessage); message CM_TextChanged;
|
Procedure CMTextChanged(Var Message : TLMessage); message CM_TextChanged;
|
||||||
Procedure Change; dynamic;
|
Procedure Change; dynamic;
|
||||||
|
procedure AttachSignals; override;
|
||||||
|
|
||||||
property OnChange : TNotifyEvent read FOnChange write FOnChange;
|
property OnChange : TNotifyEvent read FOnChange write FOnChange;
|
||||||
public
|
public
|
||||||
@ -196,7 +197,6 @@ type
|
|||||||
property Text;
|
property Text;
|
||||||
published
|
published
|
||||||
property TabStop default true;
|
property TabStop default true;
|
||||||
procedure AttachSignals; override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ type
|
|||||||
FScrollBars: TScrollStyle;
|
FScrollBars: TScrollStyle;
|
||||||
FWordWrap: Boolean;
|
FWordWrap: Boolean;
|
||||||
protected
|
protected
|
||||||
procedure AttachSignals; override;
|
// procedure AttachSignals; override;
|
||||||
|
|
||||||
procedure SetLines(Value : TStrings);
|
procedure SetLines(Value : TStrings);
|
||||||
procedure SetWordWrap(Value : Boolean);
|
procedure SetWordWrap(Value : Boolean);
|
||||||
@ -493,6 +493,10 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.9 2001/01/10 20:12:29 lazarus
|
||||||
|
Added the Nudge feature to the IDE.
|
||||||
|
Shane
|
||||||
|
|
||||||
Revision 1.8 2001/01/05 17:44:37 lazarus
|
Revision 1.8 2001/01/05 17:44:37 lazarus
|
||||||
ViewUnits1, ViewForms1 and MessageDlg are all loaded from their resources and all controls are auto-created on them.
|
ViewUnits1, ViewForms1 and MessageDlg are all loaded from their resources and all controls are auto-created on them.
|
||||||
There are still a few problems with some controls so I haven't converted all forms.
|
There are still a few problems with some controls so I haven't converted all forms.
|
||||||
|
Loading…
Reference in New Issue
Block a user