mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-24 04:59:43 +01:00
added SetAnchors
git-svn-id: trunk@4665 -
This commit is contained in:
parent
9921e33ecf
commit
4169b6f751
@ -43,11 +43,7 @@ uses
|
|||||||
const
|
const
|
||||||
// ToDo: find the constant in the fpc units.
|
// ToDo: find the constant in the fpc units.
|
||||||
EndOfLine:shortstring={$IFDEF win32}#13+{$ENDIF}#10;
|
EndOfLine:shortstring={$IFDEF win32}#13+{$ENDIF}#10;
|
||||||
{$ifdef win32}
|
SpecialChar = '#'; // used to use PathDelim, e.g. #\
|
||||||
SpecialChar = '/'; // used to use PathDelim, e.g. /\
|
|
||||||
{$else}
|
|
||||||
SpecialChar = '\';
|
|
||||||
{$endif}
|
|
||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
{$define CaseInsensitiveFilenames}
|
{$define CaseInsensitiveFilenames}
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -670,6 +666,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if Mask[DirStartMask]=SpecialChar then begin
|
if Mask[DirStartMask]=SpecialChar then begin
|
||||||
|
// special char -> next char is normal char
|
||||||
inc(DirStartMask);
|
inc(DirStartMask);
|
||||||
if (DirStartMask>=DirEndMask) then exit;
|
if (DirStartMask>=DirEndMask) then exit;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -220,7 +220,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TTransferMacroList.SubstituteStr(var s:string): boolean;
|
function TTransferMacroList.SubstituteStr(var s:string): boolean;
|
||||||
var MacroStart,MacroEnd: integer;
|
var
|
||||||
|
MacroStart,MacroEnd: integer;
|
||||||
MacroName, MacroStr, MacroParam: string;
|
MacroName, MacroStr, MacroParam: string;
|
||||||
AMacro: TTransferMacro;
|
AMacro: TTransferMacro;
|
||||||
Handled, Abort: boolean;
|
Handled, Abort: boolean;
|
||||||
|
|||||||
@ -658,7 +658,6 @@ type
|
|||||||
Function GetTabOrder: TTabOrder;
|
Function GetTabOrder: TTabOrder;
|
||||||
function GetUndockHeight: Integer;
|
function GetUndockHeight: Integer;
|
||||||
function GetUndockWidth: Integer;
|
function GetUndockWidth: Integer;
|
||||||
function IsAnchorsStored: boolean;
|
|
||||||
function IsCaptionStored : Boolean;
|
function IsCaptionStored : Boolean;
|
||||||
function IsHelpContextStored: boolean;
|
function IsHelpContextStored: boolean;
|
||||||
function IsHelpKeyWordStored: boolean;
|
function IsHelpKeyWordStored: boolean;
|
||||||
@ -669,6 +668,7 @@ type
|
|||||||
procedure DoMouseDown(var Message: TLMMouse; Button: TMouseButton; Shift:TShiftState);
|
procedure DoMouseDown(var Message: TLMMouse; Button: TMouseButton; Shift:TShiftState);
|
||||||
procedure DoMouseUp(var Message: TLMMouse; Button: TMouseButton);
|
procedure DoMouseUp(var Message: TLMMouse; Button: TMouseButton);
|
||||||
procedure SetAlign(Value: TAlign);
|
procedure SetAlign(Value: TAlign);
|
||||||
|
procedure SetAnchors(const AValue: TAnchors);
|
||||||
procedure SetBoundsRect(const ARect : TRect);
|
procedure SetBoundsRect(const ARect : TRect);
|
||||||
procedure SetClientHeight(Value: Integer);
|
procedure SetClientHeight(Value: Integer);
|
||||||
procedure SetClientSize(Value: TPoint);
|
procedure SetClientSize(Value: TPoint);
|
||||||
@ -691,7 +691,7 @@ type
|
|||||||
procedure SetTop(Value: Integer);
|
procedure SetTop(Value: Integer);
|
||||||
procedure SetVisible(Value: Boolean);
|
procedure SetVisible(Value: Boolean);
|
||||||
procedure SetWidth(Value: Integer);
|
procedure SetWidth(Value: Integer);
|
||||||
Procedure UpdateTaborder(value : TTabOrder);
|
Procedure UpdateTabOrder(value : TTabOrder);
|
||||||
protected
|
protected
|
||||||
AutoSizing : Boolean;
|
AutoSizing : Boolean;
|
||||||
FControlState: TControlState;
|
FControlState: TControlState;
|
||||||
@ -873,7 +873,7 @@ type
|
|||||||
AsLast: boolean);
|
AsLast: boolean);
|
||||||
procedure RemoveHandlerOnChangeBounds(OnChangeBoundsEvent: TNotifyEvent);
|
procedure RemoveHandlerOnChangeBounds(OnChangeBoundsEvent: TNotifyEvent);
|
||||||
public
|
public
|
||||||
property Anchors: TAnchors read FAnchors write FAnchors stored IsAnchorsStored;
|
property Anchors: TAnchors read FAnchors write SetAnchors default [akLeft,akTop];
|
||||||
property Align: TAlign read FAlign write SetAlign;
|
property Align: TAlign read FAlign write SetAlign;
|
||||||
property BoundsRect: TRect read GetBoundsRect write SetBoundsRect;
|
property BoundsRect: TRect read GetBoundsRect write SetBoundsRect;
|
||||||
property Caption: TCaption read GetText write SetText stored IsCaptionStored;
|
property Caption: TCaption read GetText write SetText stored IsCaptionStored;
|
||||||
@ -1845,6 +1845,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.153 2003/09/23 17:52:04 mattias
|
||||||
|
added SetAnchors
|
||||||
|
|
||||||
Revision 1.152 2003/09/23 08:00:46 mattias
|
Revision 1.152 2003/09/23 08:00:46 mattias
|
||||||
improved OnEnter for gtkcombo
|
improved OnEnter for gtkcombo
|
||||||
|
|
||||||
|
|||||||
@ -427,11 +427,6 @@ begin
|
|||||||
Result := UndockWidth;
|
Result := UndockWidth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TControl.IsAnchorsStored: boolean;
|
|
||||||
begin
|
|
||||||
Result:=Anchors<>[akLeft,akTop];
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
function TControl.IsHelpContextStored: boolean;
|
function TControl.IsHelpContextStored: boolean;
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
@ -1273,8 +1268,8 @@ end;
|
|||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
{ TControl DoMouseDown "Event Handler" }
|
{ TControl DoMouseDown "Event Handler" }
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
procedure TControl.DoMouseDown(var Message: TLMMouse; Button: TMOuseButton;
|
procedure TControl.DoMouseDown(var Message: TLMMouse; Button: TMouseButton;
|
||||||
Shift:TShiftState);
|
Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
if not (csNoStdEvents in ControlStyle) then
|
if not (csNoStdEvents in ControlStyle) then
|
||||||
Begin
|
Begin
|
||||||
@ -1350,8 +1345,10 @@ begin
|
|||||||
DoBeforeMouseMessage;
|
DoBeforeMouseMessage;
|
||||||
//TODO: SendCancelMode(self);
|
//TODO: SendCancelMode(self);
|
||||||
if csCaptureMouse in ControlStyle then MouseCapture := True;
|
if csCaptureMouse in ControlStyle then MouseCapture := True;
|
||||||
if csClickEvents in ControlStyle then DblClick;
|
// first send a mouse down
|
||||||
DoMouseDown(Message, mbLeft ,[ssDouble]);
|
DoMouseDown(Message, mbLeft ,[ssDouble]);
|
||||||
|
// then send the double click
|
||||||
|
if csClickEvents in ControlStyle then DblClick;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -1886,11 +1883,20 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TControl.SetAlign(Value: TAlign);
|
procedure TControl.SetAlign(Value: TAlign);
|
||||||
begin
|
begin
|
||||||
if FAlign <> Value then begin
|
if FAlign = Value then exit;
|
||||||
//writeln('TControl.SetAlign ',Name,':',ClassName,' Old=',AlignNames[FAlign],' New=',AlignNames[Value]);
|
//writeln('TControl.SetAlign ',Name,':',ClassName,' Old=',AlignNames[FAlign],' New=',AlignNames[Value]);
|
||||||
FAlign := Value;
|
FAlign := Value;
|
||||||
RequestAlign;
|
RequestAlign;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
TControl SetAnchors
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
procedure TControl.SetAnchors(const AValue: TAnchors);
|
||||||
|
begin
|
||||||
|
if Anchors=AValue then exit;
|
||||||
|
FAnchors:=AValue;
|
||||||
|
RequestAlign;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -2138,7 +2144,7 @@ End;
|
|||||||
}
|
}
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
|
|
||||||
Procedure TControl.MouseDown(Button: TMouseButton; Shift:TShiftState;
|
Procedure TControl.MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||||
X, Y: Integer);
|
X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnMouseDown) then FOnMouseDown(Self, Button, Shift, X,Y);
|
if Assigned(FOnMouseDown) then FOnMouseDown(Self, Button, Shift, X,Y);
|
||||||
@ -2587,6 +2593,9 @@ end;
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.157 2003/09/23 17:52:04 mattias
|
||||||
|
added SetAnchors
|
||||||
|
|
||||||
Revision 1.156 2003/09/20 13:27:49 mattias
|
Revision 1.156 2003/09/20 13:27:49 mattias
|
||||||
varois improvements for ParentColor from Micha
|
varois improvements for ParentColor from Micha
|
||||||
|
|
||||||
|
|||||||
@ -1100,9 +1100,10 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
|
|
||||||
{$ifdef GTK2}
|
|
||||||
if (LastMouse.Down) and
|
if (LastMouse.Down) and
|
||||||
(not (Event^._Type in [gdk_2button_press,gdk_3button_press]))
|
(not (Event^.{$ifdef GTK2}_Type{$ELSE}theType{$ENDIF}
|
||||||
|
in [gdk_2button_press,gdk_3button_press]))
|
||||||
then begin
|
then begin
|
||||||
{$IFDEF VerboseMouseBugfix}
|
{$IFDEF VerboseMouseBugfix}
|
||||||
writeln(' NO CLICK: LastMouse.Down=',LastMouse.Down,
|
writeln(' NO CLICK: LastMouse.Down=',LastMouse.Down,
|
||||||
@ -1110,27 +1111,12 @@ var
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
{$else}
|
|
||||||
if (LastMouse.Down) and
|
|
||||||
(not (Event^.theType in [gdk_2button_press,gdk_3button_press]))
|
|
||||||
then begin
|
|
||||||
{$IFDEF VerboseMouseBugfix}
|
|
||||||
writeln(' NO CLICK: LastMouse.Down=',LastMouse.Down,
|
|
||||||
' Event^.theType=',Event^.theType);
|
|
||||||
{$ENDIF}
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
{$EndIf}
|
|
||||||
|
|
||||||
MessI.Keys := MessI.Keys or BtnKey;
|
MessI.Keys := MessI.Keys or BtnKey;
|
||||||
|
|
||||||
IsMultiClick:=TestIfMultiClick;
|
IsMultiClick:=TestIfMultiClick;
|
||||||
|
|
||||||
{$ifdef GTK2}
|
case Event^.{$ifdef GTK2}_Type{$ELSE}theType{$ENDIF} of
|
||||||
case Event^._Type of
|
|
||||||
{$else}
|
|
||||||
case Event^.theType of
|
|
||||||
{$EndIf}
|
|
||||||
gdk_2button_press:
|
gdk_2button_press:
|
||||||
// the gtk itself has detected a double click
|
// the gtk itself has detected a double click
|
||||||
if (LastMouse.ClickCount>=2)
|
if (LastMouse.ClickCount>=2)
|
||||||
@ -1483,7 +1469,7 @@ end;
|
|||||||
function gtkMouseBtnReleaseAfter(widget: PGtkWidget; event : pgdkEventButton;
|
function gtkMouseBtnReleaseAfter(widget: PGtkWidget; event : pgdkEventButton;
|
||||||
data: gPointer) : GBoolean; cdecl;
|
data: gPointer) : GBoolean; cdecl;
|
||||||
begin
|
begin
|
||||||
result:={$Ifdef GTk1}true{$Else}false{$EndIf};
|
Result:={$Ifdef GTk1}true{$Else}false{$EndIf};
|
||||||
{$IFDEF VerboseMouseBugfix}
|
{$IFDEF VerboseMouseBugfix}
|
||||||
{writeln('[gtkMouseBtnReleaseAfter] ',
|
{writeln('[gtkMouseBtnReleaseAfter] ',
|
||||||
TControl(Data).Name,':',TObject(Data).ClassName,' ',
|
TControl(Data).Name,':',TObject(Data).ClassName,' ',
|
||||||
@ -2854,6 +2840,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.194 2003/09/23 17:52:04 mattias
|
||||||
|
added SetAnchors
|
||||||
|
|
||||||
Revision 1.193 2003/09/20 13:27:49 mattias
|
Revision 1.193 2003/09/20 13:27:49 mattias
|
||||||
varois improvements for ParentColor from Micha
|
varois improvements for ParentColor from Micha
|
||||||
|
|
||||||
|
|||||||
@ -3105,11 +3105,11 @@ begin
|
|||||||
{$IFdef GTK1}
|
{$IFdef GTK1}
|
||||||
csListBox, csCheckListBox:
|
csListBox, csCheckListBox:
|
||||||
begin
|
begin
|
||||||
if Integer(Data)>=0 then
|
if Integer(Data)>=0 then begin
|
||||||
gtk_list_select_item(
|
gtk_list_select_item(
|
||||||
PGtkList(GetWidgetInfo(Pointer(Handle),True)^.ImplementationWidget),
|
PGtkList(GetWidgetInfo(Pointer(Handle),True)^.ImplementationWidget),
|
||||||
Integer(Data))
|
Integer(Data))
|
||||||
else
|
end else
|
||||||
gtk_list_unselect_all(
|
gtk_list_unselect_all(
|
||||||
PGtkList(GetWidgetInfo(Pointer(Handle),True)^.ImplementationWidget));
|
PGtkList(GetWidgetInfo(Pointer(Handle),True)^.ImplementationWidget));
|
||||||
end;
|
end;
|
||||||
@ -8386,6 +8386,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.426 2003/09/23 17:52:04 mattias
|
||||||
|
added SetAnchors
|
||||||
|
|
||||||
Revision 1.425 2003/09/23 08:00:46 mattias
|
Revision 1.425 2003/09/23 08:00:46 mattias
|
||||||
improved OnEnter for gtkcombo
|
improved OnEnter for gtkcombo
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user