mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 20:37:43 +02:00
convert LM_SETSELMODE message to interface method
git-svn-id: trunk@6014 -
This commit is contained in:
parent
312a4ab45c
commit
2a2c0c9db6
@ -126,14 +126,11 @@ end;
|
||||
{ procedure TCustomListBox.UpdateSelectionMode }
|
||||
{------------------------------------------------------------------------------}
|
||||
procedure TCustomListBox.UpdateSelectionMode;
|
||||
var
|
||||
Msg : TLMSetSelMode;
|
||||
begin
|
||||
if not HandleAllocated then exit;
|
||||
Msg.ExtendedSelect:= ExtendedSelect;
|
||||
Msg.MultiSelect:= MultiSelect;
|
||||
LockSelectionChange;
|
||||
CNSendMessage(LM_SETSELMODE, Self, @Msg);
|
||||
TWSCustomListBoxClass(WidgetSetClass).SetSelectionMode(Self,
|
||||
ExtendedSelect, MultiSelect);
|
||||
UnlockSelectionChange;
|
||||
end;
|
||||
|
||||
|
@ -1845,7 +1845,6 @@ Begin
|
||||
LM_PAINT : Assert(False, 'Trace:!!!!!!!!!!!!!!!!!LM_PAINT!!!!!!!!!!!!!!');
|
||||
LM_CONFIGUREEVENT : Assert(False, 'Trace:!!!!!!!!!!!!!!!!!LM_CONFIGUREEVENT!!!!!!!!!!!!!!');
|
||||
LM_KILLWORD : Assert(False, 'Trace:!!!!!!!!!!!!!!!!!!!!LM_KILLWORD!!!!!!!!!!!!!!!!!!!!');
|
||||
LM_SETSELMODE : Assert(False, 'Trace:!!!!!!!!!!!!!!!!!!!!LM_SETSELMODE!!!!!!!!!!!!!!!!');
|
||||
end;
|
||||
|
||||
case Message.msg of
|
||||
@ -2084,6 +2083,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.31 2004/09/16 14:32:31 micha
|
||||
convert LM_SETSELMODE message to interface method
|
||||
|
||||
Revision 1.30 2004/09/14 14:41:17 micha
|
||||
convert LM_INSERTTOOLBUTTON and LM_DELETETOOLBUTTON messages to interface methods; warning: still very ugly code, as if it is "OldToolbar" so probably, obsolete
|
||||
|
||||
|
@ -226,8 +226,6 @@ type
|
||||
// listbox
|
||||
function GetTopIndex(Sender: TObject): integer;virtual;
|
||||
function SetTopIndex(Sender: TObject; NewTopIndex: integer): integer;virtual;
|
||||
procedure SetSelectionMode(Sender: TObject; Widget: PGtkWidget;
|
||||
MultiSelect, ExtendedSelect: boolean); virtual;
|
||||
|
||||
// forms and dialogs
|
||||
procedure BringFormToFront(Sender: TObject);
|
||||
@ -300,6 +298,9 @@ type
|
||||
procedure UpdateTransientWindows; virtual;
|
||||
// |-notebook
|
||||
procedure UpdateNotebookPageTab(ANoteBook, APage: TObject);virtual;
|
||||
// |-listbox
|
||||
procedure SetSelectionMode(Sender: TObject; Widget: PGtkWidget;
|
||||
MultiSelect, ExtendedSelect: boolean); virtual;
|
||||
function ForceLineBreaks(DC : hDC; Src: PChar; MaxWidthInPixels : Longint;
|
||||
ProcessAmpersands : Boolean) : PChar;
|
||||
|
||||
@ -454,6 +455,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.206 2004/09/16 14:32:31 micha
|
||||
convert LM_SETSELMODE message to interface method
|
||||
|
||||
Revision 1.205 2004/09/14 10:06:26 micha
|
||||
convert LM_REDRAW message to interface method (in twidgetset)
|
||||
|
||||
|
@ -3124,12 +3124,6 @@ begin
|
||||
PLMScreenInit(Data)^.ColorDepth:= gdk_visual_get_system^.depth;
|
||||
end;
|
||||
|
||||
LM_SETSELMODE:
|
||||
if Data<>nil then
|
||||
SetSelectionMode(Sender,PGtkWidget(Handle),
|
||||
TLMSetSelMode(Data^).MultiSelect,
|
||||
TLMSetSelMode(Data^).ExtendedSelect);
|
||||
|
||||
LM_SETBORDER:
|
||||
{$IFdef GTK2}
|
||||
begin
|
||||
@ -7962,6 +7956,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.576 2004/09/16 14:32:31 micha
|
||||
convert LM_SETSELMODE message to interface method
|
||||
|
||||
Revision 1.575 2004/09/16 13:57:30 micha
|
||||
convert LM_SETSEL message to interface method
|
||||
|
||||
|
@ -34,7 +34,7 @@ uses
|
||||
glib, gdk, gtk, {$Ifndef NoGdkPixbufLib}gdkpixbuf,{$EndIf} GtkFontCache,
|
||||
{$ENDIF}
|
||||
WSStdCtrls, WSLCLClasses, GtkInt, Classes, LCLType,
|
||||
GTKWinApiWindow, gtkglobals, gtkproc;
|
||||
GTKWinApiWindow, gtkglobals, gtkproc, InterfaceBase;
|
||||
|
||||
|
||||
type
|
||||
@ -103,6 +103,8 @@ type
|
||||
class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; override;
|
||||
class procedure SelectItem(const ACustomListBox: TCustomListBox; AIndex: integer; ASelected: boolean); override;
|
||||
class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); override;
|
||||
class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect,
|
||||
AMultiSelect: boolean); override;
|
||||
class procedure SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean); override;
|
||||
end;
|
||||
|
||||
@ -456,6 +458,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGtkWSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox;
|
||||
const AExtendedSelect, AMultiSelect: boolean);
|
||||
begin
|
||||
TGtkWidgetSet(InterfaceObject).SetSelectionMode(ACustomListBox,
|
||||
PGtkWidget(ACustomListBox.Handle), AMultiSelect, AExtendedSelect);
|
||||
end;
|
||||
|
||||
procedure TGtkWSCustomListBox.SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean);
|
||||
begin
|
||||
case ACustomListBox.fCompStyle of
|
||||
|
@ -330,11 +330,6 @@ Begin
|
||||
Else
|
||||
Assert(False, Format('Trace:I don''t know how to destroy component %S', [Sender.ClassName]));
|
||||
End;
|
||||
LM_SETSELMODE:
|
||||
Begin
|
||||
If Sender Is TCustomListBox Then
|
||||
RecreateWnd(TWinControl(Sender));
|
||||
End;
|
||||
LM_SETBORDER:
|
||||
Begin
|
||||
If Sender is TControl Then
|
||||
@ -2104,6 +2099,9 @@ End;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.269 2004/09/16 14:32:31 micha
|
||||
convert LM_SETSELMODE message to interface method
|
||||
|
||||
Revision 1.268 2004/09/16 13:57:30 micha
|
||||
convert LM_SETSEL message to interface method
|
||||
|
||||
|
@ -103,6 +103,8 @@ type
|
||||
class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; override;
|
||||
class procedure SelectItem(const ACustomListBox: TCustomListBox; AIndex: integer; ASelected: boolean); override;
|
||||
class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); override;
|
||||
class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect,
|
||||
AMultiSelect: boolean); override;
|
||||
class procedure SetStyle(const ACustomListBox: TCustomListBox); override;
|
||||
class procedure SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean); override;
|
||||
end;
|
||||
@ -315,6 +317,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWin32WSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox;
|
||||
const AExtendedSelect, AMultiSelect: boolean);
|
||||
begin
|
||||
TWin32WidgetSet(InterfaceObject).RecreateWnd(ACustomListBox);
|
||||
end;
|
||||
|
||||
procedure TWin32WSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox);
|
||||
begin
|
||||
// The listbox styles can't be updated, so recreate the listbox
|
||||
|
@ -72,7 +72,6 @@ const
|
||||
|
||||
LM_GETSELTEXT = LM_COMUSER+66;
|
||||
LM_SETSELTEXT = LM_COMUSER+67;
|
||||
LM_SETSELMODE = LM_COMUSER+78;
|
||||
LM_SETBORDER = LM_COMUSER+79;
|
||||
|
||||
// TComboBox
|
||||
@ -640,11 +639,6 @@ type
|
||||
TabPosition: Pointer;
|
||||
end;
|
||||
|
||||
TLMSetSelMode = record
|
||||
MultiSelect : boolean;
|
||||
ExtendedSelect : boolean;
|
||||
end;
|
||||
|
||||
TLMSetChecked = record
|
||||
Index : integer;
|
||||
Checked : boolean;
|
||||
@ -821,7 +815,6 @@ begin
|
||||
|
||||
LM_GETSELTEXT :Result:='LM_GETSELTEXT';
|
||||
LM_SETSELTEXT :Result:='LM_SETSELTEXT';
|
||||
LM_SETSELMODE :Result:='LM_SETSELMODE';
|
||||
LM_SETBORDER :Result:='LM_SETBORDER';
|
||||
|
||||
// TComboBox
|
||||
@ -932,6 +925,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.108 2004/09/16 14:32:31 micha
|
||||
convert LM_SETSELMODE message to interface method
|
||||
|
||||
Revision 1.107 2004/09/16 13:57:29 micha
|
||||
convert LM_SETSEL message to interface method
|
||||
|
||||
|
@ -98,6 +98,8 @@ type
|
||||
class function GetItemIndex(const ACustomListBox: TCustomListBox): integer; virtual;
|
||||
class procedure SelectItem(const ACustomListBox: TCustomListBox; AIndex: integer; ASelected: boolean); virtual;
|
||||
class procedure SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer); virtual;
|
||||
class procedure SetSelectionMode(const ACustomListBox: TCustomListBox; const AExtendedSelect,
|
||||
AMultiSelect: boolean); virtual;
|
||||
class procedure SetStyle(const ACustomListBox: TCustomListBox); virtual;
|
||||
class procedure SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean); virtual;
|
||||
end;
|
||||
@ -218,6 +220,11 @@ procedure TWSCustomListBox.SetItemIndex(const ACustomListBox: TCustomListBox; co
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TWSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox;
|
||||
const AExtendedSelect, AMultiSelect: boolean);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TWSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox);
|
||||
begin
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user