mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 14:18:17 +02:00
lcl: gtk1: fixed compile
git-svn-id: trunk@60773 -
This commit is contained in:
parent
3b972346b3
commit
6d813c4d01
@ -1537,7 +1537,7 @@ begin
|
||||
// send the message directly to the LCL
|
||||
NotifyApplicationUserInput(AWinControl, MessE.Msg);
|
||||
DeliverMessage(AWinControl, MessE);
|
||||
end
|
||||
end;
|
||||
if event^.Button in [6, 7] then
|
||||
begin
|
||||
// this is a mouse wheel horizontal-scroll event
|
||||
|
@ -47,7 +47,7 @@ uses
|
||||
// rtl+fcl
|
||||
Types, Classes, SysUtils,
|
||||
// LazUtils
|
||||
FPCAdds,
|
||||
FPCAdds, LazUTF8,
|
||||
// gtk
|
||||
{$IFDEF gtk2}
|
||||
glib2, gdk2pixbuf, gdk2, gtk2, Pango, gtk2proc,
|
||||
@ -66,7 +66,7 @@ uses
|
||||
LCLPlatformDef, InterfaceBase,
|
||||
FileUtil, Translations, ExtDlgs, Dialogs, Controls, Forms, LCLStrConsts,
|
||||
LMessages, LCLProc, LCLIntf, LCLType, DynHashArray, GraphType, GraphMath,
|
||||
Graphics, Menus, Maps, Themes,
|
||||
Graphics, Menus, Maps, LazLoggerBase, LazFileUtils, LazStringUtils, Themes,
|
||||
// widgetset
|
||||
GtkDebug, GtkFontCache, gtkDef, GtkProc, gtkMsgQueue, GtkExtra, WSLCLClasses;
|
||||
|
||||
|
@ -4491,6 +4491,8 @@ var
|
||||
begin
|
||||
{$IfDef GTK1}
|
||||
//debugln('UpdateTabCloseBtn ',GetWidgetDebugReport(NoteBookWidget));
|
||||
Img:=nil;
|
||||
Mask:=nil;
|
||||
GetNoteBookCloseBtnImage(GetControlWindow(NoteBookWidget), Img, Mask);
|
||||
{$EndIf}
|
||||
//debugln('UpdateTabCloseBtn ',dbgs(nboShowCloseButtons in TheNotebook.Options),' ',dbgs(Img<>nil));
|
||||
@ -5004,7 +5006,7 @@ var
|
||||
begin
|
||||
Handler := gtk_object_get_data_by_id (AnObject, gtk_handler_quark);
|
||||
SignalID := g_signal_lookup(ASignal, GTK_OBJECT_TYPE(AnObject));
|
||||
if (SignalID<0) or (SignalID>$ffffff) then
|
||||
if SignalID>$ffffff then
|
||||
RaiseGDBException('SignalConnected');
|
||||
|
||||
while (Handler <> nil) do begin
|
||||
@ -5905,7 +5907,7 @@ begin
|
||||
OldCheckMenuItemDrawProc(MenuItem,Area);
|
||||
exit;
|
||||
end;
|
||||
IconSize:=LCLMenuItem.GetIconSize;
|
||||
IconSize:=LCLMenuItem.GetIconSize(0);
|
||||
IconWidth:=IconSize.X;
|
||||
IconHeight:=IconSize.Y;
|
||||
|
||||
@ -5998,7 +6000,7 @@ begin
|
||||
CurToggleSize:=OldCheckMenuItemToggleSize;
|
||||
LCLMenuItem:=TMenuItem(GetLCLObject(MenuItem));
|
||||
if LCLMenuItem<>nil then begin
|
||||
IconSize:=LCLMenuItem.GetIconSize;
|
||||
IconSize:=LCLMenuItem.GetIconSize(0);
|
||||
{if IconSize.X>100 then
|
||||
debugln('MenuSizeRequest LCLMenuItem=',LCLMenuItem.Name,' ',LCLMenuItem.Caption,
|
||||
' ');}
|
||||
@ -6124,7 +6126,7 @@ var
|
||||
if LCLMenuItem.HasIcon then
|
||||
begin
|
||||
{$IFNDEF Gtk2}
|
||||
IconSize := LCLMenuItem.GetIconSize;
|
||||
IconSize := LCLMenuItem.GetIconSize(0);
|
||||
IconWidth := IconSize.X;
|
||||
IconHeight := IconSize.Y;
|
||||
// set the toggle width
|
||||
|
@ -47,10 +47,10 @@ uses
|
||||
glib, gdk, gtk, gdkpixbuf,
|
||||
{$ENDIF}
|
||||
Math, // Math after gtk to get the correct Float type
|
||||
LMessages, LCLMessageGlue, LCLProc, LCLStrConsts, LCLIntf, LCLType,
|
||||
DynHashArray, Masks, GraphType, GraphMath, Graphics, Controls,
|
||||
Forms, Menus, StdCtrls, ComCtrls, ExtCtrls, Dialogs, ExtDlgs,
|
||||
FileUtil, ImgList, GtkFontCache, GTKGlobals, GtkDef, GtkExtra, GtkDebug;
|
||||
LazUTF8, LMessages, LCLMessageGlue, LCLProc, LCLStrConsts, LCLIntf, LCLType,
|
||||
DynHashArray, Masks, GraphType, GraphMath, Graphics, Controls, Forms, Menus,
|
||||
StdCtrls, ComCtrls, ExtCtrls, Dialogs, ExtDlgs, FileUtil, LazFileUtils,
|
||||
ImgList, GtkFontCache, GTKGlobals, GtkDef, GtkExtra, GtkDebug;
|
||||
|
||||
const
|
||||
GtkListItemGtkListTag = 'GtkList';
|
||||
|
@ -28,7 +28,7 @@ uses
|
||||
GLib, Gtk, gdk, gdkPixbuf, Gtk1WSPrivate,
|
||||
{$ENDIF}
|
||||
// LCL
|
||||
Classes, LCLType, Controls, Graphics, GraphType, Buttons,
|
||||
Classes, LCLType, Controls, Graphics, GraphType, Buttons, ImgList,
|
||||
// widgetset
|
||||
WSButtons, WSProc,
|
||||
// interface
|
||||
@ -287,8 +287,10 @@ var
|
||||
Pixbuf: PGdkPixbuf;
|
||||
Mask: PGdkBitmap;
|
||||
AGlyph: TBitmap;
|
||||
AIndex: Integer;
|
||||
AIndex, aPPI: Integer;
|
||||
AEffect: TGraphicsDrawEffect;
|
||||
aCanvasScaleFactor: Double;
|
||||
ImgResolution: TScaledImageListResolution;
|
||||
begin
|
||||
WidgetInfo := GetWidgetInfo(Pointer(ABitBtn.Handle));
|
||||
BitBtnInfo := WidgetInfo^.UserData;
|
||||
@ -296,7 +298,8 @@ begin
|
||||
if ABitBtn.CanShowGlyph then
|
||||
begin
|
||||
AGlyph := TBitmap.Create;
|
||||
AValue.GetImageIndexAndEffect(AButtonState, AIndex, AEffect);
|
||||
AValue.GetImageIndexAndEffect(AButtonState, aPPI, aCanvasScaleFactor,
|
||||
ImgResolution, AIndex, AEffect);
|
||||
if (AIndex <> -1) and (AValue.Images <> nil) then
|
||||
AValue.Images.GetBitmap(AIndex, AGlyph, AEffect);
|
||||
end
|
||||
|
@ -26,11 +26,9 @@ uses
|
||||
{$else}
|
||||
Gtk, gdk, Glib,
|
||||
{$endif}
|
||||
SysUtils, Classes,
|
||||
Controls, Graphics, Dialogs, ExtDlgs,
|
||||
LCLType, LMessages, InterfaceBase, LCLStrConsts, LCLProc, FileUtil,
|
||||
WSDialogs, WSLCLClasses,
|
||||
GtkInt, GtkProc, GtkWSControls, GtkExtra, GtkDef, GtkGlobals;
|
||||
SysUtils, Classes, Controls, Graphics, Dialogs, ExtDlgs, LCLType, LMessages,
|
||||
InterfaceBase, LCLStrConsts, LCLProc, FileUtil, LazFileUtils, WSDialogs,
|
||||
WSLCLClasses, GtkInt, GtkProc, GtkWSControls, GtkExtra, GtkDef, GtkGlobals;
|
||||
|
||||
type
|
||||
|
||||
|
@ -27,7 +27,7 @@ type
|
||||
|
||||
{ TGtkWSCustomImageList }
|
||||
|
||||
TGtkWSCustomImageList = class(TWSCustomImageList)
|
||||
TGtkWSCustomImageListResolution = class(TWSCustomImageListResolution)
|
||||
published
|
||||
end;
|
||||
|
||||
|
@ -92,7 +92,6 @@ type
|
||||
class procedure SetMaxLength(const ACustomComboBox: TCustomComboBox; NewLength: integer); override;
|
||||
class procedure SetStyle(const ACustomComboBox: TCustomComboBox; NewStyle: TComboBoxStyle); override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
|
||||
class procedure SetReadOnly(const ACustomComboBox: TCustomComboBox; NewReadOnly: boolean); override;
|
||||
|
||||
class function GetItems(const ACustomComboBox: TCustomComboBox): TStrings; override;
|
||||
class procedure Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean); override;
|
||||
@ -1214,16 +1213,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TGtkWSCustomComboBox.SetReadOnly(const ACustomComboBox: TCustomComboBox;
|
||||
NewReadOnly: boolean);
|
||||
var
|
||||
Widget: PGtkWidget;
|
||||
begin
|
||||
Widget := PGtkCombo(ACustomComboBox.Handle)^.entry;
|
||||
if GtkWidgetIsA(Widget, GTK_TYPE_ENTRY) then
|
||||
gtk_entry_set_editable(PGtkEntry(Widget), not NewReadOnly);
|
||||
end;
|
||||
|
||||
class function TGtkWSCustomComboBox.GetItems(
|
||||
const ACustomComboBox: TCustomComboBox): TStrings;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user