mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 19:58:13 +02:00
added ambigius compiled unit test for packages
git-svn-id: trunk@2556 -
This commit is contained in:
parent
50135420e7
commit
5cdecc6d81
@ -1933,6 +1933,69 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure gtk_combo_get_pos(combo : PGtkCombo; var x : gint; var y : gint;
|
||||||
|
var height : gint; var width : gint);
|
||||||
|
{var
|
||||||
|
popwin : PGtkbin;
|
||||||
|
widget : PGtkWidget;
|
||||||
|
popup : PGtkScrolledwindow;
|
||||||
|
real_height : gint;
|
||||||
|
list_requisition : PGtkRequisition;
|
||||||
|
show_hscroll : gboolean;
|
||||||
|
show_vscroll : gboolean;
|
||||||
|
avail_height : gint;
|
||||||
|
min_height : gint;
|
||||||
|
alloc_width : gint;
|
||||||
|
work_height : gint;
|
||||||
|
old_height : gint;
|
||||||
|
old_width : gint;
|
||||||
|
okay_to_exit : boolean;
|
||||||
|
const
|
||||||
|
EMPTY_LIST_HEIGHT = 15;}
|
||||||
|
begin
|
||||||
|
{ show_hscroll := False;
|
||||||
|
show_vscroll := False;
|
||||||
|
widget := GTK_WIDGET(combo);
|
||||||
|
popup := GTK_SCROLLED_WINDOW (combo^.popup);
|
||||||
|
popwin := GTK_BIN (combo^.popwin);
|
||||||
|
gdk_window_get_origin (combo^.entry^.window, @x, @y);
|
||||||
|
real_height := MIN (combo^.entry^.requisition.height,
|
||||||
|
combo^.entry^.allocation.height);
|
||||||
|
y := y + real_height;
|
||||||
|
avail_height := gdk_screen_height () - y;
|
||||||
|
New(list_requisition);
|
||||||
|
gtk_widget_size_request (combo^.list, list_requisition);
|
||||||
|
min_height := list_requisition^.height;
|
||||||
|
min_height := MIN (list_requisition^.height,popup^.vscrollbar^.requisition.height);
|
||||||
|
if GTK_LIST (combo^.list)^.children = nil then
|
||||||
|
list_requisition^.height := list_requisition^.height + EMPTY_LIST_HEIGHT;
|
||||||
|
alloc_width := (widget^.allocation.width -
|
||||||
|
2 * PGtkStyle(popwin^.child^.thestyle)^.klass^.xthickness -
|
||||||
|
2 * border_width(GTK_CONTAINER (popwin^.child)^) -
|
||||||
|
2 * border_width(GTK_CONTAINER (combo^.popup)^) -
|
||||||
|
2 * border_width(GTK_CONTAINER (GTK_BIN (popup)^.child)^) -
|
||||||
|
2 * PGtkStyle(GTK_BIN (popup)^.child^.thestyle)^.klass^.xthickness);
|
||||||
|
work_height := (2 * (PGtkStyle(popwin^.child^.thestyle)^.klass^.ythickness) +
|
||||||
|
2 * border_width(GTK_CONTAINER (popwin^.child)^) +
|
||||||
|
2 * border_width(GTK_CONTAINER (combo^.popup)^) +
|
||||||
|
2 * border_width(GTK_CONTAINER (GTK_BIN (popup)^.child)^) +
|
||||||
|
2 * PGtkStyle(GTK_BIN (popup)^.child^.thestyle)^.klass^.xthickness);
|
||||||
|
repeat
|
||||||
|
okay_to_exit := True;
|
||||||
|
old_width := alloc_width;
|
||||||
|
old_height := work_height;
|
||||||
|
if ((not show_hscroll) and (alloc_width < list_requisition^.width)) then
|
||||||
|
begin
|
||||||
|
work_height := work_height + popup^.hscrollbar^.requisition.height +
|
||||||
|
GTK_SCROLLED_WINDOW_CLASS(GTK_OBJECT (combo^.popup)^.klass)^.scrollbar_spacing;
|
||||||
|
show_hscroll := TRUE;
|
||||||
|
okay_to_exit := False;
|
||||||
|
end;
|
||||||
|
if ((not show_vscroll) and (work
|
||||||
|
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
function TgtkObject.ComboBoxDropDown(Handle: HWND;
|
function TgtkObject.ComboBoxDropDown(Handle: HWND;
|
||||||
DropDown: boolean): boolean; override;
|
DropDown: boolean): boolean; override;
|
||||||
@ -8093,6 +8156,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.240 2003/06/07 09:34:21 mattias
|
||||||
|
added ambigius compiled unit test for packages
|
||||||
|
|
||||||
Revision 1.239 2003/06/03 08:02:33 mattias
|
Revision 1.239 2003/06/03 08:02:33 mattias
|
||||||
implemented showing source lines in breakpoints dialog
|
implemented showing source lines in breakpoints dialog
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user