mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:39:44 +02:00
gtk interface: fixed calling TListView.OnColumnClick, removed duplicate code (bug #8298) from Flavio Etrusco
git-svn-id: trunk@10858 -
This commit is contained in:
parent
f0cba610c2
commit
e1b5b16184
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -2506,7 +2506,6 @@ lcl/interfaces/gtk/gtklclintf.inc svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/gtklclintfh.inc svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/gtklistsl.inc svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/gtklistslh.inc svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/gtklistviewcallback.inc svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/gtkmsgqueue.pp svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/gtkobject.inc svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/gtkpagecallback.inc svneol=native#text/pascal
|
||||
|
@ -292,8 +292,12 @@ begin
|
||||
else
|
||||
UnusedByteMask:=(1 shl UnusedBitsAtEnd) - 1;
|
||||
p:=RawImage^.Mask;
|
||||
DebugLn(['RawImageMaskIsEmpty A Height', Height]);
|
||||
DebugLn(['RawImageMaskIsEmpty B UsedBytesPerLine', UsedBytesPerLine]);
|
||||
for y:=0 to Height-1 do begin
|
||||
// check fully used bytes in line
|
||||
if UsedBytesPerLine = 0 then
|
||||
debugln('UsedBytesPerLine is 0');
|
||||
for x:=0 to UsedBytesPerLine-1 do begin
|
||||
if p^<>$ff then begin
|
||||
// not all bits set -> transparent pixels found -> Mask needed
|
||||
|
@ -3272,7 +3272,6 @@ begin
|
||||
end;
|
||||
|
||||
{$I gtkDragCallback.inc}
|
||||
{$I gtkListViewCallback.inc}
|
||||
{$I gtkComboBoxCallback.inc}
|
||||
{$I gtkPageCallback.inc}
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
{%MainUnit gtkcallback.inc}
|
||||
|
||||
{
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
}
|
||||
//----------------------
|
||||
|
||||
//----------------------
|
||||
//HDN_ENDTRACK
|
||||
//HDN_TRACK
|
||||
function gtkLVAbortColumnResize(AList: PGTKCList; AData: gPointer): GBoolean; cdecl;
|
||||
begin
|
||||
//TODO: implement
|
||||
if (AList=nil) or (AData=nil) then ;
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
//----------------------
|
||||
//HDN_ENDTRACK
|
||||
//HDN_TRACK
|
||||
//HDN_ITEMCHANGED
|
||||
//HDN_ITEMCHANGING
|
||||
function gtkLVResizeColumn(AList: PGTKCList; AColumn, AWidth: Integer;
|
||||
AData: gPointer): GBoolean; cdecl;
|
||||
begin
|
||||
//TODO: implement
|
||||
if (AList=nil) or (AData=nil) or (AColumn=0) or (AWidth=0) then ;
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
//----------------------
|
||||
//HDN_ITEMCLICK
|
||||
//LVN_COLUMNCLICK
|
||||
function gtkLVClickColumn(AList: PGTKCList; AColumn: Integer; AData: gPointer): GBoolean; cdecl;
|
||||
var
|
||||
msg: TLMNotify;
|
||||
NM: TNMListView;
|
||||
begin
|
||||
EventTrace('click-column', Adata);
|
||||
msg.Msg := CN_NOTIFY;
|
||||
|
||||
FillChar(NM, SizeOf(NM), 0);
|
||||
NM.hdr.hwndfrom := PtrInt(AList);
|
||||
NM.hdr.code := LVN_COLUMNCLICK;
|
||||
NM.iItem := -1;
|
||||
NM.iSubItem := AColumn;
|
||||
msg.NMHdr := @NM.hdr;
|
||||
Result := DeliverMessage(AData, msg) = 0;
|
||||
end;
|
||||
|
||||
// included by gtkcallback.inc
|
@ -4052,30 +4052,6 @@ begin
|
||||
end;
|
||||
|
||||
// Listview & Header control
|
||||
|
||||
//HDN_BEGINTRACK
|
||||
//HDN_DIVIDERDBLCLICK
|
||||
|
||||
HDN_ENDTRACK,
|
||||
HDN_TRACK:
|
||||
begin
|
||||
ConnectSenderSignal(gObject, 'resize-column', @gtkLVResizeColumn);
|
||||
ConnectSenderSignal(gObject, 'abort-column-resize',
|
||||
@gtkLVAbortColumnResize);
|
||||
end;
|
||||
|
||||
HDN_ITEMCHANGED,
|
||||
HDN_ITEMCHANGING:
|
||||
begin
|
||||
ConnectSenderSignal(gObject, 'resize-column', @gtkLVResizeColumn);
|
||||
end;
|
||||
|
||||
// HDN_ITEMDBLCLICK
|
||||
HDN_ITEMCLICK:
|
||||
begin
|
||||
ConnectSenderSignal(gCore, 'click-column', @gtkLVClickColumn);
|
||||
end;
|
||||
|
||||
LM_COMMAND:
|
||||
begin
|
||||
if ALCLObject is TCustomComboBox then begin
|
||||
|
@ -250,13 +250,6 @@ Function Edit_source_drag_data_delete (widget: pGtkWidget;
|
||||
context: pGdkDragContext;
|
||||
data: gpointer): gBoolean ; cdecl;
|
||||
|
||||
// gtklistviewcallbacks.inc headers
|
||||
function gtkLVAbortColumnResize(AList: PGTKCList; AData: gPointer): GBoolean; cdecl;
|
||||
function gtkLVResizeColumn(AList: PGTKCList; AColumn, AWidth: Integer;
|
||||
AData: gPointer): GBoolean; cdecl;
|
||||
function gtkLVClickColumn(AList: PGTKCList; AColumn: Integer;
|
||||
AData: gPointer): GBoolean; cdecl;
|
||||
|
||||
// gtkcomboboxcallbacks.inc headers
|
||||
function gtkComboBoxShowAfter(widget: PGtkWidget; data: gPointer): GBoolean; cdecl;
|
||||
function gtkComboBoxHideAfter(widget: PGtkWidget; data: gPointer): GBoolean; cdecl;
|
||||
|
@ -19,7 +19,7 @@
|
||||
The Map maps an unique ID to arbitrary data. The ID->Data is stored in a
|
||||
Average Level binary Tree for fast indexing.
|
||||
The map maintans also a linked list beween the ordered items for fast
|
||||
iterating throug all elements.
|
||||
iterating through all elements.
|
||||
The ID can be signed or unsigned, with a size of 1,2,4,8,16 or 32 bytes
|
||||
The data can be of any (constant) size.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user