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