mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 03:56:12 +02:00
convert LM_SETPROPERTIES message to interface method for TScrollBar
git-svn-id: trunk@6056 -
This commit is contained in:
parent
4c7a8a5a19
commit
924f6583c7
@ -6258,17 +6258,6 @@ begin
|
|||||||
Widget:= GTK_WIDGET(wHandle);
|
Widget:= GTK_WIDGET(wHandle);
|
||||||
|
|
||||||
case TControl(Sender).fCompStyle of
|
case TControl(Sender).fCompStyle of
|
||||||
csScrollBar:
|
|
||||||
with (TScrollBar (Sender)) do
|
|
||||||
begin
|
|
||||||
//set properties for the range
|
|
||||||
Widget := GTK_WIDGET(gtk_range_get_adjustment (GTK_RANGE(wHandle)));
|
|
||||||
GTK_ADJUSTMENT(Widget)^.lower := Min;
|
|
||||||
GTK_ADJUSTMENT(Widget)^.Upper := Max;
|
|
||||||
GTK_ADJUSTMENT(Widget)^.Value := Position;
|
|
||||||
GTK_ADJUSTMENT(Widget)^.step_increment := SmallChange;
|
|
||||||
GTK_ADJUSTMENT(Widget)^.page_increment := LargeChange;
|
|
||||||
end;
|
|
||||||
|
|
||||||
csTrackbar :
|
csTrackbar :
|
||||||
with (TCustomTrackBar (Sender)) do
|
with (TCustomTrackBar (Sender)) do
|
||||||
@ -7461,6 +7450,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.595 2004/09/23 20:36:30 micha
|
||||||
|
convert LM_SETPROPERTIES message to interface method for TScrollBar
|
||||||
|
|
||||||
Revision 1.594 2004/09/23 14:50:47 micha
|
Revision 1.594 2004/09/23 14:50:47 micha
|
||||||
convert LM_SETPROPERTIES message to interface method for TProgressBar
|
convert LM_SETPROPERTIES message to interface method for TProgressBar
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
|
class procedure SetParams(const AScrollBar: TScrollBar); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGtkWSCustomGroupBox }
|
{ TGtkWSCustomGroupBox }
|
||||||
@ -280,6 +281,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TGtkWSScrollBar }
|
||||||
|
|
||||||
|
procedure TGtkWSScrollBar.SetParams(const AScrollBar: TScrollBar);
|
||||||
|
var
|
||||||
|
Widget : PGtkWidget;
|
||||||
|
begin
|
||||||
|
with AScrollBar do
|
||||||
|
begin
|
||||||
|
//set properties for the range
|
||||||
|
Widget := GTK_WIDGET(gtk_range_get_adjustment (GTK_RANGE(Handle)));
|
||||||
|
GTK_ADJUSTMENT(Widget)^.lower := Min;
|
||||||
|
GTK_ADJUSTMENT(Widget)^.Upper := Max;
|
||||||
|
GTK_ADJUSTMENT(Widget)^.Value := Position;
|
||||||
|
GTK_ADJUSTMENT(Widget)^.step_increment := SmallChange;
|
||||||
|
GTK_ADJUSTMENT(Widget)^.page_increment := LargeChange;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TGtkWSCustomListBox }
|
{ TGtkWSCustomListBox }
|
||||||
|
|
||||||
function TGtkWSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
|
function TGtkWSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
|
||||||
@ -869,7 +888,7 @@ initialization
|
|||||||
// To improve speed, register only classes
|
// To improve speed, register only classes
|
||||||
// which actually implement something
|
// which actually implement something
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// RegisterWSComponent(TScrollBar, TGtkWSScrollBar);
|
RegisterWSComponent(TScrollBar, TGtkWSScrollBar);
|
||||||
// RegisterWSComponent(TCustomGroupBox, TGtkWSCustomGroupBox);
|
// RegisterWSComponent(TCustomGroupBox, TGtkWSCustomGroupBox);
|
||||||
// RegisterWSComponent(TGroupBox, TGtkWSGroupBox);
|
// RegisterWSComponent(TGroupBox, TGtkWSGroupBox);
|
||||||
RegisterWSComponent(TCustomComboBox, TGtkWSCustomComboBox);
|
RegisterWSComponent(TCustomComboBox, TGtkWSCustomComboBox);
|
||||||
|
@ -1700,20 +1700,6 @@ begin
|
|||||||
|
|
||||||
Case TControl(Sender).FCompStyle Of
|
Case TControl(Sender).FCompStyle Of
|
||||||
|
|
||||||
csScrollBar:
|
|
||||||
With (TScrollBar(Sender)) Do
|
|
||||||
Begin
|
|
||||||
SendMessage(Handle, SBM_SETRANGE, Min, Max);
|
|
||||||
SendMessage(Handle, SBM_SETPOS, Position, LPARAM(True));
|
|
||||||
Case Kind Of
|
|
||||||
sbHorizontal:
|
|
||||||
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) Or SBS_HORZ);
|
|
||||||
sbVertical:
|
|
||||||
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) Or SBS_VERT);
|
|
||||||
End;
|
|
||||||
Assert(False, 'Trace:TODO: [TWin32WidgetSet.SetProperties] Set up step and page increments for csScrollBar');
|
|
||||||
End;
|
|
||||||
|
|
||||||
csSpinEdit:
|
csSpinEdit:
|
||||||
Begin
|
Begin
|
||||||
SendMessage(Handle, UDM_SETRANGE, 0, MakeLong(Trunc(TSpinEdit(Sender).MaxValue), Trunc(TSpinEdit(Sender).MinValue)));
|
SendMessage(Handle, UDM_SETRANGE, 0, MakeLong(Trunc(TSpinEdit(Sender).MaxValue), Trunc(TSpinEdit(Sender).MinValue)));
|
||||||
@ -1774,6 +1760,9 @@ End;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.283 2004/09/23 20:36:30 micha
|
||||||
|
convert LM_SETPROPERTIES message to interface method for TScrollBar
|
||||||
|
|
||||||
Revision 1.282 2004/09/23 14:50:47 micha
|
Revision 1.282 2004/09/23 14:50:47 micha
|
||||||
convert LM_SETPROPERTIES message to interface method for TProgressBar
|
convert LM_SETPROPERTIES message to interface method for TProgressBar
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ uses
|
|||||||
// To get as little as posible circles,
|
// To get as little as posible circles,
|
||||||
// uncomment only when needed for registration
|
// uncomment only when needed for registration
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
Classes, StdCtrls, Controls, Graphics,
|
Classes, StdCtrls, Controls, Graphics, Forms,
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
WSStdCtrls, WSLCLClasses, Windows, Win32Int, Win32Proc, InterfaceBase, LCLType;
|
WSStdCtrls, WSLCLClasses, Windows, Win32Int, Win32Proc, InterfaceBase, LCLType;
|
||||||
|
|
||||||
@ -45,6 +45,7 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
|
class procedure SetParams(const AScrollBar: TScrollBar); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWin32WSCustomGroupBox }
|
{ TWin32WSCustomGroupBox }
|
||||||
@ -255,6 +256,24 @@ procedure EditSetSelLength(WinHandle: HWND; NewLength: integer);
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{ TWin32WSScrollBar }
|
||||||
|
|
||||||
|
procedure TWin32WSScrollBar.SetParams(const AScrollBar: TScrollBar);
|
||||||
|
begin
|
||||||
|
with AScrollBar do
|
||||||
|
begin
|
||||||
|
SendMessage(Handle, SBM_SETRANGE, Min, Max);
|
||||||
|
SendMessage(Handle, SBM_SETPOS, Position, LPARAM(true));
|
||||||
|
case Kind of
|
||||||
|
sbHorizontal:
|
||||||
|
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) or SBS_HORZ);
|
||||||
|
sbVertical:
|
||||||
|
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) or SBS_VERT);
|
||||||
|
end;
|
||||||
|
Assert(False, 'Trace:TODO: [TWin32WSScrollBar.SetParams] Set up step and page increments for csScrollBar');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TWin32WSCustomListBox }
|
{ TWin32WSCustomListBox }
|
||||||
|
|
||||||
function TWin32WSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
|
function TWin32WSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
|
||||||
@ -650,7 +669,7 @@ initialization
|
|||||||
// To improve speed, register only classes
|
// To improve speed, register only classes
|
||||||
// which actually implement something
|
// which actually implement something
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// RegisterWSComponent(TScrollBar, TWin32WSScrollBar);
|
RegisterWSComponent(TScrollBar, TWin32WSScrollBar);
|
||||||
// RegisterWSComponent(TCustomGroupBox, TWin32WSCustomGroupBox);
|
// RegisterWSComponent(TCustomGroupBox, TWin32WSCustomGroupBox);
|
||||||
// RegisterWSComponent(TGroupBox, TWin32WSGroupBox);
|
// RegisterWSComponent(TGroupBox, TWin32WSGroupBox);
|
||||||
RegisterWSComponent(TCustomComboBox, TWin32WSCustomComboBox);
|
RegisterWSComponent(TCustomComboBox, TWin32WSCustomComboBox);
|
||||||
|
@ -52,6 +52,7 @@ type
|
|||||||
{ TWSScrollBar }
|
{ TWSScrollBar }
|
||||||
|
|
||||||
TWSScrollBar = class(TWSWinControl)
|
TWSScrollBar = class(TWSWinControl)
|
||||||
|
class procedure SetParams(const AScrollBar: TScrollBar); virtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWSCustomGroupBox }
|
{ TWSCustomGroupBox }
|
||||||
@ -204,6 +205,12 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{ TWSScrollBar }
|
||||||
|
|
||||||
|
procedure TWSScrollBar.SetParams(const AScrollBar: TScrollBar);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
{ TWSCustomListBox }
|
{ TWSCustomListBox }
|
||||||
|
|
||||||
function TWSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
|
function TWSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user