diff --git a/.gitattributes b/.gitattributes index 0bd23224bc..7465f4ae34 100644 --- a/.gitattributes +++ b/.gitattributes @@ -343,6 +343,7 @@ lcl/extctrls.pp svneol=native#text/pascal lcl/filectrl.pp svneol=native#text/pascal lcl/forms.pp svneol=native#text/pascal lcl/graphics.pp svneol=native#text/pascal +lcl/graphtype.pp svneol=native#text/pascal lcl/imglist.pp svneol=native#text/pascal lcl/include/alignment.inc svneol=native#text/pascal lcl/include/application.inc svneol=native#text/pascal @@ -375,6 +376,7 @@ lcl/include/customlistbox.inc svneol=native#text/pascal lcl/include/customlistview.inc svneol=native#text/pascal lcl/include/custommemo.inc svneol=native#text/pascal lcl/include/customnotebook.inc svneol=native#text/pascal +lcl/include/custompanel.inc svneol=native#text/pascal lcl/include/customradiogroup.inc svneol=native#text/pascal lcl/include/defaultbitbtnimages.inc svneol=native#text/pascal lcl/include/dragobject.inc svneol=native#text/pascal @@ -481,6 +483,7 @@ lcl/interfaces/win32/win32winapih.inc svneol=native#text/pascal lcl/interfaces/win32/winext.pas svneol=native#text/pascal lcl/lazqueue.pp svneol=native#text/pascal lcl/lcllinux.pp svneol=native#text/pascal +lcl/lcltype.pp svneol=native#text/pascal lcl/lmessages.pp svneol=native#text/pascal lcl/lresources.pp svneol=native#text/pascal lcl/menus.pp svneol=native#text/pascal diff --git a/components/synedit/syncompletion.pas b/components/synedit/syncompletion.pas index 95f9d4beb2..cd208ef7b4 100644 --- a/components/synedit/syncompletion.pas +++ b/components/synedit/syncompletion.pas @@ -43,6 +43,7 @@ interface uses {$IFDEF SYN_LAZARUS} LCLLinux, LMessages, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index 93b49cabf6..ffb3423caf 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -65,6 +65,7 @@ interface uses {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/syneditautocomplete.pp b/components/synedit/syneditautocomplete.pp index 934628479f..8ffc2cf45b 100644 --- a/components/synedit/syneditautocomplete.pp +++ b/components/synedit/syneditautocomplete.pp @@ -46,6 +46,7 @@ interface uses {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synedithighlighter.pp b/components/synedit/synedithighlighter.pp index 49dd954f16..5388aa30bd 100644 --- a/components/synedit/synedithighlighter.pp +++ b/components/synedit/synedithighlighter.pp @@ -41,6 +41,7 @@ uses Graphics, {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/syneditkeycmds.pp b/components/synedit/syneditkeycmds.pp index 8fda0d2f7c..3d9d8db0ba 100644 --- a/components/synedit/syneditkeycmds.pp +++ b/components/synedit/syneditkeycmds.pp @@ -43,7 +43,7 @@ interface uses {$IFDEF SYN_LAZARUS} - LCLLinux, + LCLLinux, LCLType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/syneditmiscclasses.pp b/components/synedit/syneditmiscclasses.pp index e35c58fc08..a28648a4ac 100644 --- a/components/synedit/syneditmiscclasses.pp +++ b/components/synedit/syneditmiscclasses.pp @@ -44,6 +44,7 @@ interface uses {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/syneditmiscprocs.pp b/components/synedit/syneditmiscprocs.pp index f3b10e3819..fb832cf530 100644 --- a/components/synedit/syneditmiscprocs.pp +++ b/components/synedit/syneditmiscprocs.pp @@ -44,6 +44,7 @@ interface uses {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/syneditsearch.pp b/components/synedit/syneditsearch.pp index 8d6425677e..a104fe986c 100644 --- a/components/synedit/syneditsearch.pp +++ b/components/synedit/syneditsearch.pp @@ -109,6 +109,7 @@ implementation uses {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synedittextbuffer.pp b/components/synedit/synedittextbuffer.pp index 1c3c099fed..37ea101c08 100644 --- a/components/synedit/synedittextbuffer.pp +++ b/components/synedit/synedittextbuffer.pp @@ -45,6 +45,7 @@ uses Classes, SysUtils, {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synhighlightercpp.pp b/components/synedit/synhighlightercpp.pp index 22b0a73543..8352c24bb9 100644 --- a/components/synedit/synhighlightercpp.pp +++ b/components/synedit/synhighlightercpp.pp @@ -52,7 +52,7 @@ interface uses SysUtils, {$IFDEF SYN_LAZARUS} - LCLLinux, + LCLLinux, LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synhighlighterhtml.pp b/components/synedit/synhighlighterhtml.pp index 9dde80ea1f..5502f787cf 100644 --- a/components/synedit/synhighlighterhtml.pp +++ b/components/synedit/synhighlighterhtml.pp @@ -50,7 +50,7 @@ interface uses SysUtils, {$IFDEF SYN_LAZARUS} - LCLLinux, + LCLLinux, LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synhighlighterlfm.pas b/components/synedit/synhighlighterlfm.pas index fba188e6a3..22d39640e0 100644 --- a/components/synedit/synhighlighterlfm.pas +++ b/components/synedit/synhighlighterlfm.pas @@ -55,6 +55,7 @@ uses {$ELSE} {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synhighlighterpas.pp b/components/synedit/synhighlighterpas.pp index 967487e74a..0480883a97 100644 --- a/components/synedit/synhighlighterpas.pp +++ b/components/synedit/synhighlighterpas.pp @@ -54,6 +54,7 @@ uses SysUtils, {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synhighlighterperl.pas b/components/synedit/synhighlighterperl.pas index 1903e2e775..1960a73706 100644 --- a/components/synedit/synhighlighterperl.pas +++ b/components/synedit/synhighlighterperl.pas @@ -57,6 +57,7 @@ uses {$ELSE} {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/synhighlighterxml.pas b/components/synedit/synhighlighterxml.pas index 6a8fb13b60..551f2de78a 100644 --- a/components/synedit/synhighlighterxml.pas +++ b/components/synedit/synhighlighterxml.pas @@ -62,6 +62,7 @@ uses {$ELSE} {$IFDEF SYN_LAZARUS} LCLLinux, + LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/components/synedit/syntextdrawer.pp b/components/synedit/syntextdrawer.pp index 0711969dee..753df005b4 100644 --- a/components/synedit/syntextdrawer.pp +++ b/components/synedit/syntextdrawer.pp @@ -71,7 +71,7 @@ interface uses {$IFDEF SYN_LAZARUS} - LCLLinux, + LCLLinux, LCLType, GraphType, {$ELSE} Windows, {$ENDIF} diff --git a/designer/controlselection.pp b/designer/controlselection.pp index ba23f5b7b1..21cc7a9414 100644 --- a/designer/controlselection.pp +++ b/designer/controlselection.pp @@ -25,7 +25,7 @@ unit ControlSelection; interface uses - Classes, LCLLinux, Controls, Forms, Graphics,SysUtils; + Classes, LCLLinux, LCLType, Controls, Forms, GraphType, Graphics, SysUtils; type diff --git a/designer/designer.pp b/designer/designer.pp index 89947f5f69..ece7c4f418 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -25,7 +25,7 @@ unit designer; interface uses - Classes, LCLLinux, Forms, Controls, LMessages, Graphics, ControlSelection, + Classes, LCLType, LCLLinux, Forms, Controls, LMessages, Graphics, ControlSelection, CustomFormEditor, FormEditor, UnitEditor, CompReg, Menus, AlignCompsDlg, SizeCompsDlg, ScaleCompsDlg, ExtCtrls; diff --git a/designer/objectinspector.pp b/designer/objectinspector.pp index 98e22e651a..694b636a88 100644 --- a/designer/objectinspector.pp +++ b/designer/objectinspector.pp @@ -28,7 +28,7 @@ unit objectinspector; interface uses - Forms, SysUtils, Buttons, Classes, Graphics, StdCtrls, LCLLinux, Controls, + Forms, SysUtils, Buttons, Classes, Graphics, GraphType, StdCtrls, LCLType, LCLLinux, Controls, ComCtrls, ExtCtrls, PropEdits, TypInfo, Messages, LResources, XMLCfg, Menus, Dialogs; diff --git a/designer/propedits.pp b/designer/propedits.pp index be765de91a..52f950ec60 100644 --- a/designer/propedits.pp +++ b/designer/propedits.pp @@ -28,7 +28,7 @@ unit propedits; interface uses - Classes, TypInfo, SysUtils, Forms, Controls, Graphics, StdCtrls, Buttons, + Classes, TypInfo, SysUtils, Forms, Controls, GraphType, Graphics, StdCtrls, Buttons, ComCtrls; const diff --git a/examples/checkbox.pp b/examples/checkbox.pp index f26218ce88..5b9b8c486b 100644 --- a/examples/checkbox.pp +++ b/examples/checkbox.pp @@ -25,13 +25,15 @@ program checkbox; {$mode objfpc} uses - classes, stdctrls,forms,buttons,menus,comctrls,sysutils, extctrls; + classes, stdctrls, forms, buttons, menus, comctrls, sysutils, + extctrls, graphtype, controls; type TForm1 = class(TFORM) public Button2: TButton; Button3: TButton; + Panel1: TPanel; mnuMain: TMainMenu; itmFileQuit: TMenuItem; itmFile: TMenuItem; @@ -79,6 +81,7 @@ Begin begin CheckBox1.Checked := not CheckBox1.Checked; end; + Panel1.Caption:= 'Changed'; End; procedure TForm1.Button3Click(Sender : TObject); @@ -183,13 +186,31 @@ begin label1.Show; label1.Caption := 'unchecked'; + + { Sample panel here } + Panel1:= TPanel.Create(Self); + with Panel1 do begin + Parent := Self; + Left := 320; + Top := 60; + Width := 280; + Height := 81; + Alignment:= taRightJustify; + BevelInner:= bvLowered; + BevelOuter:= bvRaised; + BorderWidth:= 4; + BevelWidth:= 4; + Show; + Caption:= 'Hello world'; + end; + { Create a button which toggles the checkbox } - Button2 := TButton.Create(Self); - Button2.Parent := Self; - Button2.Left := 320; - Button2.Top := 30; + Button2 := TBitBtn.Create(Self); + Button2.Parent := Panel1; + Button2.Left := 5; + Button2.Top := 45; Button2.Width := 180; - Button2.Height := 30; + Button2.Height := 20; Button2.Show; Button2.Caption := 'Toggle checkbox'; Button2.OnClick := @Button2Click; @@ -344,6 +365,14 @@ end. { $Log$ + Revision 1.2 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.1 2000/07/13 10:28:20 michael + Initial import diff --git a/examples/speedtest.pp b/examples/speedtest.pp index 5fe5d7b026..138f06fe0b 100644 --- a/examples/speedtest.pp +++ b/examples/speedtest.pp @@ -3,8 +3,7 @@ program SpeedTest; {$mode Delphi} uses - forms, sysutils, Buttons, Classes, Graphics, - StdCtrls, LCLLinux; + forms, sysutils, Buttons, Classes, StdCtrls, LCLType, LCLLinux, Graphics; type TForm1 = class(TForm) diff --git a/examples/testallform.pp b/examples/testallform.pp index 79ca37bf2b..61774309fc 100644 --- a/examples/testallform.pp +++ b/examples/testallform.pp @@ -31,7 +31,7 @@ interface uses classes, forms, buttons, StdCtrls, controls, menus, ExtCtrls, CListBox, - ComCtrls, SysUtils, Graphics, Dialogs, Inifiles, Spin, clipbrd, lclLinux, + ComCtrls, SysUtils, GraphType, Graphics, Dialogs, Inifiles, Spin, clipbrd, lclLinux, registry, lresources; type @@ -2540,6 +2540,14 @@ END. { $Log$ + Revision 1.6 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.5 2001/12/10 07:47:00 lazarus MG: minor fixes diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index a764787d19..d0352e68a0 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -25,8 +25,9 @@ interface uses LCLLinux, + LCLType, Forms, Classes, SysUtils, ComCtrls, Buttons, StdCtrls, ExtCtrls, LazConf, - FileCtrl, Graphics, Controls, Dialogs, LResources, IDEProcs, + FileCtrl, GraphType, Graphics, Controls, Dialogs, LResources, IDEProcs, {$ifdef NEW_EDITOR_SYNEDIT} SynEdit, SynEditHighlighter, SynEditAutoComplete, SynEditKeyCmds, SynHighlighterPas, SynHighlighterHTML, SynHighlighterCPP, SynHighlighterXML, diff --git a/ide/exttooldialog.pas b/ide/exttooldialog.pas index 99587ff14e..aea6379e69 100644 --- a/ide/exttooldialog.pas +++ b/ide/exttooldialog.pas @@ -29,7 +29,7 @@ uses {$IFDEF IDE_MEM_CHECK} MemCheck, {$ENDIF} - Classes, SysUtils, LCLLinux, Controls, Forms, Buttons, StdCtrls, ComCtrls, + Classes, SysUtils, LCLType, Controls, Forms, Buttons, StdCtrls, ComCtrls, Dialogs, ExtCtrls, LResources, XMLCfg, ExtToolEditDlg, Process, KeyMapping, TransferMacros, IDEProcs, OutputFilter; diff --git a/ide/exttooleditdlg.pas b/ide/exttooleditdlg.pas index e0bdb1374e..cf07b58b36 100644 --- a/ide/exttooleditdlg.pas +++ b/ide/exttooleditdlg.pas @@ -32,7 +32,7 @@ uses {$IFDEF IDE_MEM_CHECK} MemCheck, {$ENDIF} - Classes, SysUtils, LCLLinux, Controls, Forms, Buttons, StdCtrls, ComCtrls, + Classes, SysUtils, LCLType, Controls, Forms, Buttons, StdCtrls, ComCtrls, Dialogs, ExtCtrls, LResources, XMLCfg, KeyMapping, TransferMacros; { The xml format version: diff --git a/ide/findreplacedialog.pp b/ide/findreplacedialog.pp index def1d40e0c..eb40e1fd6f 100644 --- a/ide/findreplacedialog.pp +++ b/ide/findreplacedialog.pp @@ -25,7 +25,7 @@ unit FindReplaceDialog; interface uses - Classes, SysUtils, LCLLinux, Controls, StdCtrls, Forms, Buttons, ExtCtrls, + Classes, SysUtils, LCLType, Controls, StdCtrls, Forms, Buttons, ExtCtrls, LResources, SynEdit, IDEProcs; type diff --git a/ide/idecomp.pp b/ide/idecomp.pp index 970afc6520..319fe0216f 100644 --- a/ide/idecomp.pp +++ b/ide/idecomp.pp @@ -301,6 +301,7 @@ begin RegisterComponents('Standard','Buttons',[TButton]); RegisterComponents('Standard','StdCtrls',[TEdit,TLabel,TMemo,TCheckBox ,TListBox,TRadioButton,TComboBox,TScrollBar,TGroupBox,TToggleBox]); + RegisterComponents('Standard', 'ExtCtrls',[TPanel]); RegisterComponents('Additional','Buttons',[TBitBtn,TSpeedButton]); RegisterComponents('Additional','ExtCtrls',[TNoteBook,TPaintBox ,TBevel,TRadioGroup,TImage]); diff --git a/ide/keymapping.pp b/ide/keymapping.pp index b56904a959..3b94e83179 100644 --- a/ide/keymapping.pp +++ b/ide/keymapping.pp @@ -25,6 +25,7 @@ interface uses LCLLinux, + LCLType, Forms, Classes, SysUtils, Buttons, LResources, StdCtrls, Controls, SynEdit, SynEditKeyCmds, XMLCfg, Dialogs; diff --git a/ide/macropromptdlg.pas b/ide/macropromptdlg.pas index cc01af7960..d83aa6c605 100644 --- a/ide/macropromptdlg.pas +++ b/ide/macropromptdlg.pas @@ -27,7 +27,7 @@ uses {$IFDEF IDE_MEM_CHECK} MemCheck, {$ENDIF} - Classes, SysUtils, LCLLinux, Controls, Forms, Buttons, StdCtrls, ComCtrls, + Classes, SysUtils, LCLType, Controls, Forms, Buttons, StdCtrls, ComCtrls, Dialogs, LResources; diff --git a/ide/main.pp b/ide/main.pp index f3ce9d4dad..901604877c 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -32,7 +32,7 @@ uses {$IFDEF IDE_MEM_CHECK} MemCheck, {$ENDIF} - Classes, LclLinux, Compiler, StdCtrls, Forms, Buttons, Menus, ComCtrls, Spin, + Classes, LCLType, LclLinux, Compiler, StdCtrls, Forms, Buttons, Menus, ComCtrls, Spin, Project, SysUtils, FileCtrl, Controls, Graphics, ExtCtrls, Dialogs, LazConf, CompReg, CodeToolManager, CodeCache, DefineTemplates, MsgView, NewProjectDlg, IDEComp, AbstractFormEditor, FormEditor, CustomFormEditor, ObjectInspector, @@ -57,6 +57,8 @@ type TIDEToolStatus = (itNone, itBuilder, itDebugger, itCustom); TMainIDE = class(TForm) + pnlSpeedButtons : TPanel; + ViewUnitsSpeedBtn : TSpeedButton; ViewFormsSpeedBtn : TSpeedButton; NewUnitSpeedBtn : TSpeedButton; @@ -917,8 +919,8 @@ procedure TMainIDE.LoadSpeedbuttons; with Result do begin Name := AName; -// Parent := pnlSpeedButtons; - Parent := Self; + Parent := pnlSpeedButtons; +// Parent := Self; Enabled := True; Top := ATop; Left := ALeft; @@ -939,21 +941,26 @@ var ButtonTop, ButtonLeft, n: Integer; begin -(* + pnlSpeedButtons := TPanel.Create(Self); - with pnlSpeedButtons do - begin - Parent := Self; + pnlSpeedButtons.Parent:= Self; + with pnlSpeedButtons do begin Visible := True; Name := 'pnlSpeedButtons'; Top := 0; - Caption := ''; + Left:= 0; +// Width:= 160; +// Height:= 60; + Caption:= ''; end; -*) + ButtonTop := 1; ButtonLeft := 1; + Writeln('XXX Creating NewUnit Button'); NewUnitSpeedBtn := CreateButton('NewUnitSpeedBtn' , 'btn_newunit' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuNewUnitClicked, 'New Unit'); + + Writeln('XXX Creating OpenFile Button'); OpenFileSpeedBtn := CreateButton('OpenFileSpeedBtn' , 'btn_openfile' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuOpenClicked, 'Open'); // store left @@ -978,8 +985,8 @@ begin StepIntoSpeedButton := CreateButton('StepIntoSpeedButton' , 'btn_stepinto' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuStepIntoProjectClicked, 'Step Into'); StepOverSpeedButton := CreateButton('StepOverpeedButton' , 'btn_stepover' , 1, ButtonLeft, ButtonTop, [mfLeft, mfTop], @mnuStepOverProjectClicked, 'Step Over'); -// pnlSpeedButtons.Width := ButtonLeft; -// pnlSpeedButtons.Height := ButtonTop; + pnlSpeedButtons.Width := ButtonLeft; + pnlSpeedButtons.Height := ButtonTop; // create the popupmenu for the OpenFileArrowSpeedBtn @@ -5707,6 +5714,14 @@ end. ======= $Log$ + Revision 1.208 2002/02/03 00:23:54 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.207 2002/01/27 19:08:43 lazarus MWE: Removed ^M @@ -5762,6 +5777,14 @@ end. <<<<<<< main.pp $Log$ + Revision 1.208 2002/02/03 00:23:54 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.207 2002/01/27 19:08:43 lazarus MWE: Removed ^M diff --git a/ide/project.pp b/ide/project.pp index 56dc31a810..e51a169474 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -31,7 +31,7 @@ unit Project; interface uses - Classes, SysUtils, LCLLinux, XMLCfg, LazConf, CompilerOptions, FileCtrl, + Classes, SysUtils, LCLLinux, LCLType, XMLCfg, LazConf, CompilerOptions, FileCtrl, CodeToolManager, CodeCache, Forms, Controls, EditorOptions, Dialogs, IDEProcs, RunParamsOpts, ProjectDefs; @@ -1287,6 +1287,14 @@ end. { $Log$ + Revision 1.48 2002/02/03 00:23:55 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.47 2001/12/19 22:09:14 lazarus MG: added GUID and alias parsing, added DoJumpToCodeToolBossError diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index 21f9cfa183..f05846f250 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -35,7 +35,7 @@ uses FindReplaceDialog, EditorOptions, CustomFormEditor, KeyMapping, StdCtrls, Compiler, MsgView, WordCompletion, CodeToolManager, CodeCache, SourceLog, SynEdit, SynEditHighlighter, SynHighlighterPas, SynEditAutoComplete, - SynEditKeyCmds, SynCompletion, Graphics, Extctrls, Menus, Splash, + SynEditKeyCmds, SynCompletion, GraphType, Graphics, Extctrls, Menus, Splash, FindInFilesDlg, LMessages, IDEProcs; type @@ -458,7 +458,7 @@ type implementation uses - LCLLinux, TypInfo, LResources, LazConf, EnvironmentOpts, UnitInfoDlg; + LCLType, LCLLinux, TypInfo, LResources, LazConf, EnvironmentOpts, UnitInfoDlg; type TCompletionType = (ctNone, ctWordCompletion, ctTemplateCompletion, diff --git a/ide/unitinfodlg.pp b/ide/unitinfodlg.pp index 2cde38ecab..d34bac911c 100644 --- a/ide/unitinfodlg.pp +++ b/ide/unitinfodlg.pp @@ -10,7 +10,7 @@ unit UnitInfoDlg; interface uses - Classes, SysUtils, LCLLinux, Controls, StdCtrls, Forms, Buttons, ExtCtrls{, + Classes, SysUtils, Controls, StdCtrls, Forms, Buttons, ExtCtrls{, LResources, SynEdit}; type diff --git a/lcl/buttons.pp b/lcl/buttons.pp index 0068f9354f..931da2c925 100644 --- a/lcl/buttons.pp +++ b/lcl/buttons.pp @@ -33,7 +33,7 @@ interface {$ASSERTIONS ON} {$endif} -uses stdctrls, vclglobals, classes, LCLLinux,graphics,sysutils, controls, lMessages,Forms, messages; +uses stdctrls, vclglobals, classes, LCLType, LCLLinux,graphics,sysutils, controls, lMessages,Forms, messages; type TButtonLayout = (blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom); @@ -149,33 +149,29 @@ type TSpeedButton = class(TGraphicControl) private FAllowAllUp : Boolean; + FDown : Boolean; FDragging : Boolean; - FDown : Boolean; - FFlat : Boolean; + FFlat : Boolean; FGlyph: TButtonGlyph; FGroupIndex : Integer; FLayout: TButtonLayout; FMargin : Integer; FMouseInControl : Boolean; FSpacing : Integer; + FState : TButtonState; FTransparent : Boolean; Function GetGlyph : TBitmap; - Function GetNumGlyphs : Integer; Procedure UpdateExclusive; Procedure UpdateTracking; Procedure SetAllowAllUp(Value : Boolean); - Procedure SetDown(Value : Boolean); - Procedure SetFlat(Value : Boolean); Procedure SetGlyph(value : TBitmap); - Procedure SetGroupIndex(value : Integer); - Procedure SetNumGlyphs(value : Integer); //there should be a procedure called settransparent but it's not used at this point Procedure CMButtonPressed(var MEssage : TLMessage); message CM_BUTTONPRESSED; Procedure CMMouseEnter(var Message :TLMessage); message CM_MouseEnter; Procedure CMMouseLeave(var Message :TLMessage); message CM_MouseLeave; Procedure CMEnabledChanged(var Message: TLMessage); message CM_ENABLEDCHANGED; protected - FState : TButtonState; + function GetNumGlyphs : Integer; Procedure GlyphChanged(Sender : TObject); procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; @@ -183,19 +179,23 @@ type procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; Procedure Paint; override; + procedure SetDown(Value : Boolean); + procedure SetGroupIndex(Value : Integer); + procedure SetFlat(Value : Boolean); + procedure SetNumGlyphs(Value : Integer); property MouseInControl : Boolean read FMOuseInControl; public - constructor Create(AOwner : TCOmponent) ; override; + constructor Create(AOwner : TComponent); override; destructor Destroy; override; procedure Click; override; + property Down : Boolean read FDown write SetDown default false; + property GroupIndex : Integer read FGroupIndex write SetGroupIndex default 0; + property Flat : Boolean read FFlat write SetFlat default false; + property NumGlyphs : Integer read GetNumGlyphs write SetNumGlyphs default 1; published property AllowAllUp : Boolean read FAllowAllUp write SetAllowAllUp default false; - property Down : Boolean read FDown write SetDown default False; property Enabled; - property Flat : Boolean read FFlat write SetFlat default False; property Glyph : TBitmap read GetGlyph write SetGlyph; - property GroupIndex : Integer read FGroupIndex write SetGroupIndex default 0; - property NumGlyphs : Integer read GetNumGlyphs write SetNumGlyphs default 1; property Transparent : Boolean read FTransparent write FTransparent default false; property Visible; property OnClick; @@ -237,6 +237,14 @@ end. { ============================================================================= $Log$ + Revision 1.11 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.10 2001/10/16 10:51:09 lazarus MG: added clicked event to TButton, MessageDialog reacts to return key diff --git a/lcl/clipbrd.pp b/lcl/clipbrd.pp index 6ba16e377a..7c5a253b8c 100644 --- a/lcl/clipbrd.pp +++ b/lcl/clipbrd.pp @@ -124,7 +124,7 @@ interface {$endif} uses - Classes, SysUtils, LCLLinux, Graphics; + Classes, SysUtils, LCLType, LCLLinux, GraphType, Graphics; type TClipboardData = record @@ -405,6 +405,14 @@ end. { $Log$ + Revision 1.6 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.5 2001/11/12 19:30:00 lazarus MG: added try excepts for clipboard diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index 91ec828189..3f83887a9d 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -32,8 +32,8 @@ unit ComCtrls; interface uses - SysUtils, Classes, Controls, LclLinux, StdCtrls, ExtCtrls, vclGlobals, - lMessages, Menus, ImgList, Graphics, ToolWin; + SysUtils, Classes, Controls, LclLinux, LCLType, StdCtrls, ExtCtrls, vclGlobals, + lMessages, Menus, ImgList, GraphType, Graphics, ToolWin; const @@ -1747,6 +1747,14 @@ end. { ============================================================================= $Log$ + Revision 1.18 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.17 2002/01/08 16:02:43 lazarus Minor changes to TListView. Added TImageList to the IDE diff --git a/lcl/controls.pp b/lcl/controls.pp index 4869dce0d4..4179c8ab21 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -36,7 +36,7 @@ interface uses Classes, SysUtils, vclglobals, Graphics, LMessages, LCLLinux, ImgList, UTrace, - Menus; + Menus, LCLType; // Cursor constants @@ -218,6 +218,7 @@ TCMDialogKey = TLMKEY; TFormStyle = (fsNormal, fsMDIChild, fsMDIFORM, fsStayOnTop); TFormBorderStyle = (bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin); TBorderStyle = bsNone..bsSingle; + TControlBorderStyle = TBorderStyle; TMouseButton = (mbLeft, mbRight, mbMiddle); @@ -239,7 +240,8 @@ TCMDialogKey = TLMKEY; csDisplayDragImage, csReflector, csActionClient, - csMenuEvents); + csMenuEvents, + csNoFocus); TControlState = set of (csLButtonDown, csClicked, @@ -728,7 +730,7 @@ TCMDialogKey = TLMKEY; property ControlCount: Integer read GetControlCount; property Handle : HWND read GetHandle write SetHandle; property Showing : Boolean read FShowing; - property TabStop : Boolean read FTabStop write FTabStop; + property TabStop : Boolean read FTabStop write FTabStop default false; property TabOrder : TTabOrder read GetTabOrder write SetTaborder default -1; end; @@ -1151,6 +1153,14 @@ end. { ============================================================================= $Log$ + Revision 1.31 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.30 2002/01/04 21:07:49 lazarus MG: added TTreeView diff --git a/lcl/extctrls.pp b/lcl/extctrls.pp index aedb88432b..b0c67f4edd 100644 --- a/lcl/extctrls.pp +++ b/lcl/extctrls.pp @@ -41,7 +41,7 @@ interface {$endif} uses - SysUtils, Classes, Controls, stdCtrls, vclGlobals, lMessages,Graphics; + SysUtils, Classes, Controls, stdCtrls, vclGlobals, lMessages, GraphType, Graphics, LCLLinux; type { workaround problem with fcl } @@ -332,6 +332,82 @@ type property OnClick; end; + TPanelBevel = TBevelCut; + TBevelWidth = 1..Maxint; + TBorderWidth = 0..Maxint; + + TCustomPanel = class(TCustomControl) + private + FBevelInner, FBevelOuter : TPanelBevel; + FBevelWidth : TBevelWidth; + FBorderWidth : TBorderWidth; + FBorderStyle : TControlBorderStyle; + FAlignment : TAlignment; + FCaption : TCaption; + procedure SetAlignment(const Value : TAlignment); + procedure SetBevelInner(const Value: TPanelBevel); + procedure SetBevelOuter(const Value: TPanelBevel); + procedure SetBevelWidth(const Value: TBevelWidth); + procedure SetBorderWidth(const Value: TBorderWidth); + procedure SetBorderStyle(const Value: TControlBorderStyle); + protected + procedure AdjustClientRect(var Rect: TRect); override; + function GetText: TCaption; override; + procedure SetText(const Value: TCaption); override; + procedure Paint; override; + property Alignment: TAlignment read FAlignment write SetAlignment default taCenter; + property BevelInner: TPanelBevel read FBevelInner write SetBevelInner default bvNone; + property BevelOuter: TPanelBevel read FBevelOuter write SetBevelOuter default bvRaised; + property BevelWidth: TBevelWidth read FBevelWidth write SetBevelWidth default 1; + property BorderWidth: TBorderWidth read FBorderWidth write SetBorderWidth default 0; + property BorderStyle: TControlBorderStyle read FBorderStyle write SetBorderStyle default bsNone; + property Color default clBtnFace; + property Caption read GetText write SetText; + property ParentColor default True; + public + constructor Create(AOwner: TComponent); override; + procedure Invalidate; override; + end; + + TPanel = class(TCustomPanel) + published + property Align default alNone; + property Alignment; + property Anchors; + property BevelInner; + property BevelOuter; + property BevelWidth; + property BorderWidth; + property BorderStyle; + property Caption; + property Color default clBackground; + property DragMode; + property Enabled; + property Font; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property TabOrder; + property TabStop default False; + property Visible; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDrag; + end; + + + const TCN_First = 0-550; TCN_SELCHANGE = TCN_FIRST - 1; @@ -346,6 +422,7 @@ implementation {$I timer.inc} {$I paintbox.inc} {$I customradiogroup.inc} +{$I custompanel.inc} {$I radiogroup.inc} {$I bevel.inc} {$I image.inc} @@ -355,6 +432,14 @@ end. { $Log$ + Revision 1.17 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.16 2002/01/01 15:50:13 lazarus MG: fixed initial component aligning diff --git a/lcl/forms.pp b/lcl/forms.pp index 6e4ab43474..a420aa4ca8 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -34,7 +34,8 @@ interface {$ASSERTIONS ON} {$endif} -uses classes, controls, vclglobals, sysutils,graphics,Menus, LCLLinux,LMessages; +uses classes, controls, vclglobals, sysutils, GraphType, Graphics, Menus, + LCLLinux, LCLType, LMessages; type TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter); diff --git a/lcl/graphics.pp b/lcl/graphics.pp index 956cc789b4..f9710cc203 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -28,14 +28,12 @@ interface {$endif} uses - SysUtils, Classes, vclGlobals, LMessages, LCLLinux, LResources; + GraphType, SysUtils, Classes, vclGlobals, LMessages, LCLType, LCLLinux, LResources; -type - TColor = longint; //Also defined in LMessages.pp - const // The follow colors match the predefined Delphi Colors + // TODO : kick these out into platform specific units! clBlack = TColor($000000); clMaroon = TColor($000080); clGreen = TColor($008000); @@ -111,58 +109,19 @@ const cmSrcPaint = SRCPAINT; cmWhiteness = WHITENESS; + type - TFontPitch = (fpDefault, fpVariable, fpFixed); - TFontName = shortstring; - TFontStyle = (fsBold, fsItalic, fsStrikeOut, fsUnderline); - TFontCharSet = 0..255; - TFontDataName = string[LF_FACESIZE -1]; - TFontStyles = set of TFontStyle; - TFOntStylesbase = set of TFontStyle; - - TFontData = record - Handle : HFont; - Height : Integer; - Pitch : TFontPitch; - Style : TFontStylesBase; - CharSet : TFontCharSet; - Name : TFontDataName; - end; - - TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideframe); - TPenMode = (pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, - pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge,pmNotMerge, pmMask, - pmNotMask, pmXor, pmNotXor - ); - - TPenData = record - Handle : HPen; - Color : TColor; - Width : Integer; - Style : TPenStyle; - end; TBitmap = class; //forward declaration - TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross); - - TBrushData = record - Handle : HBrush; - Color : TColor; - Bitmap : TBitmap; - Style : TBrushStyle; - end; - TGraphicsObject = class(TPersistent) private FOnChange: TNotifyEvent; Procedure DoChange(var msg); message LM_CHANGED; - protected procedure Changed; dynamic; Procedure Lock; Procedure UnLock; - public property OnChange: TNotifyEvent read FOnChange write FOnChange; end; @@ -240,6 +199,14 @@ type property Width: Integer read FPenData.Width write SetWidth; end; + + TBrushData = record + Handle : HBrush; + Color : TColor; + Bitmap : TBitmap; + Style : TBrushStyle; + end; + TBrush = class(TgraphicsObject) private FBrushData : TBrushData; @@ -263,20 +230,6 @@ type property Style: TBrushStyle read FBrushData.Style write SetStyle; end; - TFillStyle = (fsSurface, fsBorder); - TFillMode = (fmAlternate, fmWinding); - - TCopymode = longint; - - TCanvasStates = (csHandleValid, csFontValid, csPenvalid, csBrushValid); - TCanvasState = set of TCanvasStates; - TCanvasOrientation = (csLefttoRight, coRighttoLeft); - - TProgressStage = (psStarting, psRunning, psEnding); - TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage; - PercentDone: Byte; RedrawNow: Boolean; const R: TRect; - const Msg: string) of object; - TCanvas = class; TGraphic = class(TPersistent) @@ -455,13 +408,16 @@ type NumPts: Integer {$IFDEF VER1_1} = -1{$ENDIF}); procedure Polyline(Points: PPoint; NumPts: Integer); Procedure FillRect(const Rect : TRect); + procedure Frame3d(var Rect : TRect; const FrameWidth : integer; const Style : TBevelCut); Procedure Rectangle(X1,Y1,X2,Y2 : Integer); Procedure Rectangle(const Rect: TRect); Procedure Line(X1,Y1,X2,Y2 : Integer); Procedure MoveTo(X1,Y1 : Integer); Procedure LineTo(X1,Y1 : Integer); - Procedure TextOut(X,Y: Integer; const Text: String); - Procedure TextRect(Rect: TRect; X,Y : Integer; const Text : String); + procedure TextOut(X,Y: Integer; const Text: String); + procedure TextRect(Rect: TRect; X, Y: integer; const Text : string); + overload; + procedure TextRect(Rect: TRect; X, Y: integer; const Text : string; const Style : TTextStyle); overload; function TextExtent(const Text: string): TSize; function TextHeight(const Text: string): Integer; function TextWidth(const Text: string): Integer; @@ -510,10 +466,6 @@ type destructor Destroy; override; end; - TPixelFormat = (pfDevice, pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, - pf32bit, pfCustom); - - TBitmap = class(TGraphic) private FCanvas: TCanvas; @@ -597,14 +549,8 @@ type TIcon = class(TPixmap) end; - -var - { Stores information about the current screen } - ScreenInfo : TLMScreenInit; - -// Color / Identifier mapping -type + // Color / Identifier mapping TGetColorStringProc = procedure(const s:ansistring) of object; function ColorToIdent(Color: Longint; var Ident: AnsiString): Boolean; @@ -613,7 +559,11 @@ function ColorToRGB(Color: TColor): Longint; function ColorToString(Color: TColor): AnsiString; function StringToColor(const S: shortstring): TColor; procedure GetColorValues(Proc: TGetColorStringProc); + +var + { Stores information about the current screen } + ScreenInfo : TLMScreenInit; (*************************************************************************** ***************************************************************************) @@ -702,7 +652,6 @@ begin then Result := GetSysColor(Color and $000000FF) else Result := Color; Result := Result and $FFFFFF; - //WriteLN(Format('[ColorToRGB] Color %8x --> RGB %8x', [Color, Result])); end; function ColorToString(Color: TColor): AnsiString; @@ -725,6 +674,7 @@ begin end; + {$I graphicsobject.inc} {$I graphic.inc} {$I picture.inc} @@ -744,6 +694,14 @@ end. { ============================================================================= $Log$ + Revision 1.22 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.21 2002/01/02 15:24:58 lazarus MG: added TCanvas.Polygon and TCanvas.Polyline diff --git a/lcl/graphtype.pp b/lcl/graphtype.pp new file mode 100644 index 0000000000..10c569eabb --- /dev/null +++ b/lcl/graphtype.pp @@ -0,0 +1,402 @@ +{ $Id$ } +{ + /*************************************************************************** + Graphics.pp + ------------------- + Graphic related platform independent types + and utility functions. + Initial Revision : Sat Feb 02 0:02:58 2002 + + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +} +unit GraphType; + +{$mode objfpc}{$H+} + +interface + +uses Classes, LCLType; + +{$ifdef Trace} +{$ASSERTIONS ON} +{$endif} + +type + TColor = longint; //Also defined in LMessages.pp + + TFontPitch = (fpDefault, fpVariable, fpFixed); + TFontName = shortstring; + TFontStyle = (fsBold, fsItalic, fsStrikeOut, fsUnderline); + TFontCharSet = 0..255; + TFontDataName = string[LF_FACESIZE -1]; + TFontStyles = set of TFontStyle; + TFontStylesbase = set of TFontStyle; + + TFontData = record + Handle : HFont; + Height : Integer; + Pitch : TFontPitch; + Style : TFontStylesBase; + CharSet : TFontCharSet; + Name : TFontDataName; + end; + + { Reflects text style when drawn in a rectangle } + + TTextLayout = (tlTop, tlCenter, tlBottom); + TTextStyle = packed record + Alignment : TAlignment; // vertical alignment + Layout : TTextLayout; // horizontal alignment + SingleLine : boolean; // ignored + Clipping : boolean; // if set text will be clipped + ExpandTabs : boolean; // ignored + ShowPrefix : boolean; // ignored + Wordbreak : boolean; // ignored + Opaque : boolean; // text should have opaque background + end; + + TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideframe); + TPenMode = (pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, + pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge,pmNotMerge, pmMask, + pmNotMask, pmXor, pmNotXor + ); + + TPenData = record + Handle : HPen; + Color : TColor; + Width : Integer; + Style : TPenStyle; + end; + + TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross); + + TFillStyle = (fsSurface, fsBorder); + TFillMode = (fmAlternate, fmWinding); + + TCopymode = longint; + + TCanvasStates = (csHandleValid, csFontValid, csPenvalid, csBrushValid); + TCanvasState = set of TCanvasStates; + TCanvasOrientation = (csLefttoRight, coRighttoLeft); + + TProgressStage = (psStarting, psRunning, psEnding); + TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage; + PercentDone: Byte; RedrawNow: Boolean; const R: TRect; + const Msg: string) of object; + + TBevelCut = (bvNone, bvLowered, bvRaised); + + TPixelFormat = (pfDevice, pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, + pf32bit, pfCustom); + + +implementation + +end. + +{ ============================================================================= + + $Log$ + Revision 1.1 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + + Revision 1.21 2002/01/02 15:24:58 lazarus + MG: added TCanvas.Polygon and TCanvas.Polyline + + Revision 1.20 2002/01/02 12:10:01 lazarus + MG: fixed typo + + Revision 1.19 2001/12/28 11:41:50 lazarus + MG: added TCanvas.Ellipse, TCanvas.Pie + + Revision 1.18 2001/12/21 18:16:59 lazarus + Added TImage class + Shane + + Revision 1.17 2001/11/12 22:12:57 lazarus + MG: fixed parser: multiple brackets, nil, string[] + + Revision 1.16 2001/11/09 19:14:23 lazarus + HintWindow changes + Shane + + Revision 1.15 2001/10/25 19:02:18 lazarus + MG: fixed parsing constants with OR, AND, XOR, MOD, DIV, SHL, SHR + + Revision 1.14 2001/10/24 00:35:55 lazarus + MG: fixes for fpc 1.1: range check errors + + Revision 1.13 2001/09/30 08:34:49 lazarus + MG: fixed mem leaks and fixed range check errors + + Revision 1.12 2001/08/05 10:14:50 lazarus + MG: removed double props in OI, small bugfixes + + Revision 1.11 2001/06/26 00:08:35 lazarus + MG: added code for form icons from Rene E. Beszon + + Revision 1.10 2001/06/04 09:32:17 lazarus + MG: fixed bugs and cleaned up messages + + Revision 1.9 2001/03/21 00:20:29 lazarus + MG: fixed memory leaks + + Revision 1.7 2001/03/19 14:00:50 lazarus + MG: fixed many unreleased DC and GDIObj bugs + + Revision 1.6 2001/03/05 14:20:04 lazarus + added streaming to tgraphic, added tpicture + + Revision 1.5 2001/02/04 19:23:26 lazarus + Goto dialog added + Shane + + Revision 1.4 2001/02/04 18:24:41 lazarus + Code cleanup + Shane + + Revision 1.3 2001/01/31 21:16:45 lazarus + Changed to TCOmboBox focusing. + Shane + + Revision 1.2 2000/08/10 18:56:23 lazarus + Added some winapi calls. + Most don't have code yet. + SetTextCharacterExtra + CharLowerBuff + IsCharAlphaNumeric + Shane + + Revision 1.1 2000/07/13 10:28:23 michael + + Initial import + + Revision 1.46 2000/05/08 15:56:58 lazarus + MWE: + + Added support for mwedit92 in Makefiles + * Fixed bug # and #5 (Fillrect) + * Fixed labelsize in ApiWizz + + Added a call to the resize event in WMWindowPosChanged + + Revision 1.45 2000/03/30 18:07:53 lazarus + Added some drag and drop code + Added code to change the unit name when it's saved as a different name. Not perfect yet because if you are in a comment it fails. + + Shane + + Revision 1.44 2000/03/21 23:47:33 lazarus + MWE: + + Added TBitmap.MaskHandle & TGraphic.Draw & TBitmap.Draw + + Revision 1.43 2000/03/16 23:58:46 lazarus + MWE: + Added TPixmap for XPM support + + Revision 1.42 2000/03/15 20:15:31 lazarus + MOdified TBitmap but couldn't get it to work + Shane + + Revision 1.41 2000/03/10 13:13:37 lazarus + *** empty log message *** + + Revision 1.40 2000/03/09 23:44:03 lazarus + MWE: + * Fixed colorcache + * Fixed black window in new editor + ~ Did some cosmetic stuff + + From Peter Dyson : + + Added Rect api support functions + + Added the start of ScrollWindowEx + + Revision 1.39 2000/03/08 23:57:38 lazarus + MWE: + Added SetSysColors + Fixed TEdit text bug (thanks to hans-joachim ott ) + Finished GetKeyState + Added changes from Peter Dyson + - a new GetSysColor + - some improvements on ExTextOut + + Revision 1.38 2000/03/06 00:05:05 lazarus + MWE: Added changes from Peter Dyson for a new + release of mwEdit (0.92) + + Revision 1.37 2000/01/26 19:16:24 lazarus + Implemented TPen.Style properly for GTK. Done SelectObject for pen objects. + Misc bug fixes. + Corrected GDK declaration for gdk_gc_set_slashes. + + Revision 1.36 2000/01/17 20:36:25 lazarus + Fixed Makefile again. + Made implementation of TScreen and screen info saner. + Began to implemented DeleteObject in GTKWinAPI. + Fixed a bug in GDI allocation which in turn fixed A LOT of other bugs :-) + + Revision 1.35 1999/12/14 22:05:37 lazarus + More changes for TToolbar + Shane + + Revision 1.34 1999/12/02 19:00:59 lazarus + MWE: + Added (GDI)Pen + Changed (GDI)Brush + Changed (GDI)Font (color) + Changed Canvas to use/create pen/brush/font + Hacked mwedit to allow setting the number of chars (till it get a WM/LM_SIZE event) + The editor shows a line ! + + Revision 1.33 1999/11/29 00:46:47 lazarus + MWE: + Added TBrush as gdiobject + commented out some more mwedit MWE_FPC ifdefs + + Revision 1.32 1999/11/25 23:45:08 lazarus + MWE: + Added font as GDIobject + Added some API testcode to testform + Commented out some more IFDEFs in mwCustomEdit + + Revision 1.31 1999/11/19 01:09:43 lazarus + MWE: + implemented TCanvas.CopyRect + Added StretchBlt + Enabled creation of TCustomControl.Canvas + Added a temp hack in TWinControl.Repaint to get a LM_PAINT + + Revision 1.30 1999/11/18 00:13:08 lazarus + MWE: + Partly Implemented SelectObject + Added ExTextOut + Added GetTextExtentPoint + Added TCanvas.TextExtent/TextWidth/TextHeight + Added TSize and HPEN + + Revision 1.29 1999/11/17 01:16:39 lazarus + MWE: + Added some more API stuff + Added an initial TBitmapCanvas + Added some DC stuff + Changed and commented out, original gtk linedraw/rectangle code. This + is now called through the winapi wrapper. + + Revision 1.28 1999/11/09 17:19:54 lazarus + added the property PITCH to TFONT. + Shane + + Revision 1.26 1999/11/05 17:48:17 lazarus + Added a mwedit1 component to lazarus (MAIN.PP) + It crashes on create. + Shane + + Revision 1.25 1999/11/01 01:28:29 lazarus + MWE: Implemented HandleNeeded/CreateHandle/CreateWND + Now controls are created on demand. A call to CreateComponent shouldn't + be needed. It is now part of CreateWnd + + Revision 1.24 1999/10/28 17:17:42 lazarus + Removed references to FCOmponent. + Shane + + Revision 1.23 1999/10/25 17:38:52 lazarus + More stuff added for compatability. Most stuff added was put in the windows.pp file. CONST scroll bar messages and such. 2 functions were also added to that unit that needs to be completed. + Shane + + Revision 1.22 1999/10/22 21:01:51 lazarus + + Removed calls to InterfaceObjects except for controls.pp. Commented + out any gtk depend lines of code. MAH + + Revision 1.21 1999/10/19 21:16:23 lazarus + TColor added to graphics.pp + + Revision 1.20 1999/10/18 07:32:42 lazarus + Added definitions for Load methods in the TBitmap class. The + methods have not been implemented yet. They need to be implemented. CAW + + Revision 1.19 1999/09/26 16:58:01 lazarus + MWE: Added TBitMap.Mask method + + Revision 1.18 1999/08/26 23:36:02 peter + + paintbox + + generic keydefinitions and gtk conversion + * gtk state -> shiftstate conversion + + Revision 1.17 1999/08/25 18:53:02 lazarus + Added Canvas.pixel property which allows + the user to get/set the pixel color. This will be used in the editor + to create the illusion of the cursor by XORing the pixel with black. + + Shane + + Revision 1.16 1999/08/20 15:44:37 lazarus + TImageList changes added from Marc Weustink + + Revision 1.15 1999/08/17 16:46:25 lazarus + Slight modification to Editor.pp + Shane + + Revision 1.14 1999/08/16 20:48:03 lazarus + Added a changed event for TFOnt and code to get the average size of the font. Doesn't seem to work very well yet. + The "average size" code is found in gtkobject.inc. + + Revision 1.13 1999/08/16 15:48:49 lazarus + Changes by file: + Control: TCOntrol-Function GetRect added + ClientRect property added + TImageList - Added Count + TWinControl- Function Focused added. + Graphics: TCanvas - CopyRect added - nothing finished on it though + Draw added - nothing finiushed on it though + clbtnhighlight and clbtnshadow added. Actual color values not right. + IMGLIST.PP and IMGLIST.INC files added. + + A few other minor changes for compatability added. + + Shane + + Revision 1.12 1999/08/13 19:55:47 lazarus + TCanvas.MoveTo added for compatability. + + Revision 1.11 1999/08/13 19:51:07 lazarus + Minor changes for compatability made. + + Revision 1.10 1999/08/11 20:41:33 lazarus + + Minor changes and additions made. Lazarus may not compile due to these changes + + Revision 1.9 1999/08/02 01:13:33 lazarus + Added new colors and corrected BTNFACE + Need the TSCrollbar class to go further with the editor. + Mouse doesn't seem to be working correctly yet when I click on the editor window + + Revision 1.8 1999/08/01 21:46:26 lazarus + Modified the GETWIDTH and GETHEIGHT of TFOnt so you can use it to calculate the length in Pixels of a string. This is now used in the editor. + + Shane + + Revision 1.7 1999/07/31 06:39:26 lazarus + + Modified the IntCNSendMessage3 to include a data variable. It isn't used + yet but will help in merging the Message2 and Message3 features. + + Adjusted TColor routines to match Delphi color format + + Added a TGdkColorToTColor routine in gtkproc.inc + + Finished the TColorDialog added to comDialog example. MAH + + } diff --git a/lcl/imglist.pp b/lcl/imglist.pp index 6099e26db5..3b286f575c 100644 --- a/lcl/imglist.pp +++ b/lcl/imglist.pp @@ -37,8 +37,7 @@ interface {$endif} uses -// Windows, - SysUtils, Classes, Graphics, vclGlobals; + SysUtils, Classes, Graphics, GraphType, vclGlobals; @@ -148,6 +147,14 @@ end. { $Log$ + Revision 1.5 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.4 2001/06/15 10:31:06 lazarus MG: set longstrings as default diff --git a/lcl/include/canvas.inc b/lcl/include/canvas.inc index af950abed9..44bf9a59e6 100644 --- a/lcl/include/canvas.inc +++ b/lcl/include/canvas.inc @@ -374,6 +374,19 @@ begin LCLLinux.FillRect(FHandle, Rect, Brush.Handle); end; +{------------------------------------------------------------------------------ + Method: TCanvas.Frame3d + Params: Rect +, AWidth, AHeight + Returns: Nothing + + ------------------------------------------------------------------------------} +procedure TCanvas.Frame3d(var Rect : TRect; const FrameWidth : integer; const Style : TBevelCut); +begin + RequiredState([csHandleValid]); + LCLLinux.Frame3d(FHandle, Rect, FrameWidth, Style); +end; + {------------------------------------------------------------------------------ Method: TCanvas.Rectangle Params: X1,Y1,X2,Y2 @@ -410,6 +423,42 @@ begin MoveTo(X + TextWidth(Text), Y); end; +{------------------------------------------------------------------------------ + Method: TCanvas.TextRect + Params: Rect, X, Y, Text +, Style + Returns: Nothing + + ------------------------------------------------------------------------------} +procedure TCanvas.TextRect(Rect: TRect; X, Y : Integer; const Text : String; const Style : TTextStyle); +var X1, Y1 : integer; + TS : TSize; + Options : Longint; +begin + RequiredState([csHandleValid, csFontValid, csBrushValid]); + TS:= TextExtent(Text); + + { Compute the rectangle for text } + case Style.Alignment of + taRightJustify : X1:= Rect.Right - TS.cx; + taCenter : X1:= Rect.Left + ((Rect.Right - Rect.Left - TS.cx) div 2); + else X1:= Rect.Left + X; + end; + case Style.Layout of + tlCenter : Y1:= Rect.Top + ((Rect.Bottom - Rect.Top - TS.cy) div 2); + tlBottom : Y1:= Rect.Bottom - TS.cy; + else Y1:= Rect.Top + Y; + end; + + if Style.Opaque then Options:= ETO_OPAQUE + else Options:= 0; + if Style.Clipping then Options:= Options or ETO_CLIPPED; + + ExtTextOut(FHandle, X1, Y1, Options, @Rect, pChar(Text), Length(Text), nil); + MoveTo(X1 + TS.cx, Y1); +end; + + {------------------------------------------------------------------------------ Method: TCanvas.TextOut Params: X,Y,Text @@ -761,6 +810,14 @@ end; { ============================================================================= $Log$ + Revision 1.15 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.14 2002/01/02 15:24:58 lazarus MG: added TCanvas.Polygon and TCanvas.Polyline diff --git a/lcl/include/custompanel.inc b/lcl/include/custompanel.inc new file mode 100644 index 0000000000..cc9e95aa38 --- /dev/null +++ b/lcl/include/custompanel.inc @@ -0,0 +1,142 @@ +{****************************************************************************** + TCustomRadioBox + ******************************************************************************} +{ + + Delphi compatibility: + + - TPanel is compatible with Delphi implementation +} + +{------------------------------------------------------------------------------ + Method: TCustomRadioGroup.Create + Params: AOwner: the owner of the class + Returns: Nothing + + Constructor for the radiogroup + ------------------------------------------------------------------------------} +constructor TCustomPanel.Create (AOwner : TComponent); +begin + inherited Create (AOwner); + FCompStyle:= csPanel; + ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents, + csSetCaption, csOpaque, csDoubleClicks, csReplicatable, csNoFocus]; + FBevelOuter := bvRaised; + FBevelInner := bvNone; + FBevelWidth := 1; + FAlignment := taCenter; + Height := 41; + Width := 185; + ParentColor := True; +end; + +procedure TCustomPanel.SetAlignment(const Value: TAlignment); +begin + if FAlignment <> Value then begin + FAlignment := Value; + Invalidate; + end; +end; + +procedure TCustomPanel.SetBevelWidth(const Value: TBevelWidth); +begin + if FBevelWidth <> Value then begin + FBevelWidth := Value; + Invalidate; + end; +end; + +procedure TCustomPanel.SetBevelInner(const Value: TPanelBevel); +begin + if BevelInner <> Value then begin + FBevelInner := Value; + Invalidate; + end; +end; + +procedure TCustomPanel.SetBevelOuter(const Value: TPanelBevel); +begin + if BevelOuter <> Value then begin + FBevelOuter := Value; + Invalidate; + end; +end; + +procedure TCustomPanel.SetBorderWidth(const Value: TBorderWidth); +begin + if FBorderWidth <> Value then begin + FBorderWidth := Value; + Realign; + Invalidate; + end; +end; + +procedure TCustomPanel.Paint; +var + Rect: TRect; + InflateSize: Integer; + TS : TTextStyle; +begin + Rect := GetClientRect; + if BorderStyle = bsSingle then begin + Canvas.Rectangle(Rect); + InflateRect(Rect, -1, -1); + end; + + if BevelOuter <> bvNone then + Canvas.Frame3d(Rect, BevelWidth, BevelOuter); + + + if BevelInner <> bvNone then begin + if BorderWidth > 0 then InflateRect(Rect, -BorderWidth, -BorderWidth); + Canvas.Frame3d(Rect, BevelWidth, BevelInner); + end; + + if Caption <> '' then begin + TS.Alignment:= Alignment; + TS.Layout:= tlCenter; + TS.Opaque:= false; + TS.Clipping:= false; + Canvas.TextRect(Rect, 0, 0, Caption, TS); + end; +end; + +procedure TCustomPanel.AdjustClientRect(var Rect: TRect); +var + BevelSize: Integer; +begin + inherited AdjustClientRect(Rect); + InflateRect(Rect, -BorderWidth, -BorderWidth); + BevelSize := 0; + if BevelOuter <> bvNone then Inc(BevelSize, BevelWidth); + if BevelInner <> bvNone then Inc(BevelSize, BevelWidth); + InflateRect(Rect, -BevelSize, -BevelSize); +end; + +procedure TCustomPanel.SetBorderStyle(const Value: TControlBorderStyle); +begin + if FBorderStyle <> Value then begin + FBorderStyle := Value; + Invalidate; + end; +end; + +procedure TCustomPanel.Invalidate; +begin + inherited; +// InvalidateRect(ClientRect, True); +end; + +function TCustomPanel.GetText: TCaption; +begin + Result := FCaption; +end; + +procedure TCustomPanel.SetText(const Value: TCaption); +begin + if Caption <> Value then begin + FCaption := Value; +// TextChanged; + Invalidate; + end; +end; diff --git a/lcl/include/interfacebase.inc b/lcl/include/interfacebase.inc index c2a99e97b8..b820a42341 100644 --- a/lcl/include/interfacebase.inc +++ b/lcl/include/interfacebase.inc @@ -179,6 +179,11 @@ begin Result := False; end; +function TInterfaceBase.Frame3d(DC: HDC; var Rect: TRect; const FrameWidth : integer; const Style : TBevelCut) : boolean; +begin + Result:= false; +end; + Function TInterfaceBase.GetActiveWindow : HWND; begin // Your default here @@ -532,6 +537,14 @@ end; { ============================================================================= $Log$ + Revision 1.25 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.24 2002/01/02 15:24:58 lazarus MG: added TCanvas.Polygon and TCanvas.Polyline diff --git a/lcl/include/winapi.inc b/lcl/include/winapi.inc index 00f9f825a4..7e89ead57d 100644 --- a/lcl/include/winapi.inc +++ b/lcl/include/winapi.inc @@ -180,6 +180,11 @@ begin Result := InterfaceObject.FillRect(DC, Rect, Brush); end; +function Frame3d(DC : HDC; var Rect : TRect; const FrameWidth : integer; const Style : TBevelCut) : boolean; +begin + Result:= InterfaceObject.Frame3d(DC, Rect, FrameWidth, Style); +end; + Function GetActiveWindow : HWND; begin Result := InterfaceObject.GetActiveWindow; @@ -1053,6 +1058,14 @@ end; { ============================================================================= $Log$ + Revision 1.24 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.23 2002/01/02 15:24:58 lazarus MG: added TCanvas.Polygon and TCanvas.Polyline diff --git a/lcl/include/winapih.inc b/lcl/include/winapih.inc index 85cd9865e6..f35035df99 100644 --- a/lcl/include/winapih.inc +++ b/lcl/include/winapih.inc @@ -66,6 +66,7 @@ function Ellipse(DC: HDC; x1, y1, x2, y2: Integer): Boolean; {$IFDEF IF_BASE_MEM function ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function FillRect(DC: HDC; const Rect: TRect; Brush: HBRUSH): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} +function Frame3d(DC: HDC; var Rect: TRect; const FrameWidth : integer; const Style : TBevelCut): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} Function GetActiveWindow : HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} function GetCapture : HWND; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} @@ -247,6 +248,14 @@ function UnionRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): Boolean { ============================================================================= $Log$ + Revision 1.20 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.19 2002/01/02 15:24:58 lazarus MG: added TCanvas.Polygon and TCanvas.Polyline diff --git a/lcl/interfacebase.pp b/lcl/interfacebase.pp index babd698ff3..6360ce4053 100644 --- a/lcl/interfacebase.pp +++ b/lcl/interfacebase.pp @@ -36,7 +36,7 @@ interface {$endif} uses - LCLLinux, VCLGlobals, Classes, Controls, LMessages; + LCLLinux, LCLType, VCLGlobals, Classes, Controls, LMessages, GraphType; type @@ -82,6 +82,14 @@ end. { $Log$ + Revision 1.5 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.4 2001/07/01 23:33:13 lazarus MG: added WaitMessage and HandleEvents is now non blocking diff --git a/lcl/interfaces/gtk/gtkdef.pp b/lcl/interfaces/gtk/gtkdef.pp index f877b44c5f..1c55a3e0e6 100644 --- a/lcl/interfaces/gtk/gtkdef.pp +++ b/lcl/interfaces/gtk/gtkdef.pp @@ -29,7 +29,7 @@ unit gtkdef; interface uses - gtk, gdk, LCLLinux, VclGlobals, Classes; + gtk, gdk, LCLLinux, LCLType, VclGlobals, Classes; type TGDIType = (gdiBitmap, gdiBrush, gdiFont, gdiPen, gdiRegion); @@ -136,6 +136,14 @@ end. { ============================================================================= $Log$ + Revision 1.5 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.4 2001/11/12 16:56:08 lazarus MG: CLIPBOARD diff --git a/lcl/interfaces/gtk/gtkint.pp b/lcl/interfaces/gtk/gtkint.pp index 1730801d66..572516e8d9 100644 --- a/lcl/interfaces/gtk/gtkint.pp +++ b/lcl/interfaces/gtk/gtkint.pp @@ -31,8 +31,9 @@ interface uses InterfaceBase, gtk, gdk, glib, SysUtils, LMessages, Classes, Controls, - ExtCtrls, Forms, Dialogs, VclGlobals, StdCtrls, ComCtrls, LCLLinux, gtkdef, - DynHashArray, LazQueue,Calendar,Arrow; + ExtCtrls, Forms, Dialogs, VclGlobals, StdCtrls, ComCtrls, LCLLinux, LCLType, + gtkdef, + DynHashArray, LazQueue, Calendar, Arrow, GraphType; type TgtkObject = class(TInterfaceBase) @@ -324,6 +325,14 @@ end. { ============================================================================= $Log$ + Revision 1.26 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.25 2001/12/06 13:39:36 lazarus Added TArrow component Shane diff --git a/lcl/interfaces/gtk/gtkobject.inc b/lcl/interfaces/gtk/gtkobject.inc index c67bddb0fc..8b789aab62 100644 --- a/lcl/interfaces/gtk/gtkobject.inc +++ b/lcl/interfaces/gtk/gtkobject.inc @@ -2043,9 +2043,9 @@ begin csBitBtn : begin Assert(False, 'Trace:CSBITBTN CREATE*************************'); + writeln('Creating a new bit button'); p := gtk_button_new; - if (TBitBtn(Sender).Layout = blGlyphLeft) - or (TBitBtn(Sender).Layout = blGlyphRight) then begin + if ((Sender as TBitBtn).Layout in [blGlyphLeft, blGlyphRight]) then begin Assert(False, 'Trace:GLYPHLEFT or GLYPHRIGHT'); Box := gtk_hbox_new(False,0); end @@ -2513,6 +2513,8 @@ begin csSpeedButton: Begin + p := gtk_button_new_with_label(StrTemp); + {p := gtk_drawing_area_new(); gtk_drawing_area_size(pGTKDrawingArea(p),22,22);} //nothing done here. We are only worried about the canvas @@ -2609,7 +2611,15 @@ begin then P := gtk_hscale_new (PGTKADJUSTMENT (TempWidget)) else P := gtk_vscale_new (PGTKADJUSTMENT (TempWidget)); gtk_scale_set_digits (PGTKSCALE (P), 0); - end; + end; + + csPanel: + with (TPanel(Sender)) do begin + p := gtk_fixed_new(); + gtk_widget_show (p); + SetFixedWidget(p, p); + SetMainWidget(p, p); + end; end; //case @@ -3750,6 +3760,14 @@ end; { ============================================================================= $Log$ + Revision 1.103 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.102 2002/01/24 15:40:59 lazarus MG: deactivated clipboard setting target list for win32 diff --git a/lcl/interfaces/gtk/gtkwinapi.inc b/lcl/interfaces/gtk/gtkwinapi.inc index 28842eb340..eb766be630 100644 --- a/lcl/interfaces/gtk/gtkwinapi.inc +++ b/lcl/interfaces/gtk/gtkwinapi.inc @@ -1713,10 +1713,10 @@ begin gdk_draw_rectangle(Drawable, GC, 1, Rect^.Left, Rect^.Top, Width, Height); end; if (Options and ETO_CLIPPED) <> 0 then - begin + begin X := Rect^.Left; Y := Rect^.Top; - end; + end; SelectGDKTextProps(DC); Line := 1; OldText := StrPas(pStr); @@ -1748,7 +1748,7 @@ end; {------------------------------------------------------------------------------ Function: FillRect - Params: none + Params: none Returns: Nothing The FillRect function fills a rectangle by using the specified brush. @@ -1788,6 +1788,37 @@ begin Assert(False, Format('trace:< [TgtkObject.FillRect] DC:0x%x; Rect: ((%d,%d)(%d,%d)); brush: %x', [Integer(DC), Rect.left, rect.top, rect.right, rect.bottom, brush])); end; +{------------------------------------------------------------------------------ + Function: Frame3d + Params: - + Returns: Nothing + + Draws a 3d border in GTK native style. + ------------------------------------------------------------------------------} +function TGtkObject.Frame3d(DC : HDC; var Rect : TRect; const FrameWidth : integer; const Style : TBevelCut) : boolean; +const GTKShadowType: array[TBevelCut] of integer = (GTK_SHADOW_NONE, GTK_SHADOW_IN, GTK_SHADOW_OUT); +var Widget : TGtkWidget; + i : integer; +begin + Result := IsValidDC(DC); + if Result + then with PDeviceContext(DC)^ do + begin + if GC = nil + then begin + Result:= False; + end + else begin + Widget:= PGtkFixed(GetFixedWidget(PGtkWidget(PDeviceContext(DC)^.hWnd)))^.Container.Widget; + for i:= 1 to FrameWidth do begin + gtk_paint_shadow(Widget.thestyle, Widget.window, GTK_STATE_NORMAL, GtkShadowType[Style], nil, @Widget, nil, + Rect.left, Rect.top, Rect.Right - Rect.Left, Rect.Bottom - Rect.Top); + InflateRect(Rect, -1, -1); + end; + end; + end; +end; + {------------------------------------------------------------------------------ Function: GetActiveWindow Params: none @@ -4337,6 +4368,14 @@ end; { ============================================================================= $Log$ + Revision 1.60 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.59 2002/01/24 15:40:59 lazarus MG: deactivated clipboard setting target list for win32 diff --git a/lcl/interfaces/gtk/gtkwinapih.inc b/lcl/interfaces/gtk/gtkwinapih.inc index ffb9b62f2f..9b9bd19de0 100644 --- a/lcl/interfaces/gtk/gtkwinapih.inc +++ b/lcl/interfaces/gtk/gtkwinapih.inc @@ -49,6 +49,7 @@ function Ellipse(DC: HDC; x1,y1,x2,y2: Integer): Boolean; override; function ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean; override; function FillRect(DC: HDC; const Rect: TRect; Brush: HBRUSH): Boolean; override; +function Frame3d(DC : HDC; var Rect: TRect; const FrameWidth: integer; const Style : TBevelCut): boolean; override; Function GetActiveWindow : HWND; override; function GetCapture: HWND; override; @@ -132,6 +133,14 @@ Function WindowFromPoint(Point : TPoint) : HWND; override; { ============================================================================= $Log$ + Revision 1.24 2002/02/03 00:24:02 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.23 2002/01/02 15:24:59 lazarus MG: added TCanvas.Polygon and TCanvas.Polyline diff --git a/lcl/lcllinux.pp b/lcl/lcllinux.pp index f0a6d98166..603ab05bf7 100644 --- a/lcl/lcllinux.pp +++ b/lcl/lcllinux.pp @@ -36,1341 +36,12 @@ unit LCLLinux; interface -uses VCLGlobals,Classes; +uses Classes, LCLType, VCLGlobals, GraphType; {$ifdef Trace} {$ASSERTIONS ON} {$endif} - -type - //TODO: check this against vclglobals - - - PLongInt = ^LongInt; - PInteger = ^Integer; - PSmallInt = ^SmallInt; - PDouble = ^Double; - PRect = ^TRect; - PANSICHAR = ^AnsiChar; - PWideChar = ^WideChar; - UINT = LongWord; - { Provided for compatibility with Windows registry ONLY } - HKEY = Integer; - PHKEY = ^HKEY; - HDC = type LongWord; - HHOOK = type LongWord; - HFONT = type LongWord; - HGDIOBJ = type LongWord; - HPEN = type LongWord; - HRGN = type Longword; - HINST = type LongWord; - HICON = type LongWord; - HCURSOR = HICON; - Bool = LongBool; - pByte = ^byte; - HGLOBAL = THAndle; - -var - hInstance :HINST; - -type - - TKeyBoardState = array[0..255] of byte; - - PABC = ^TABC; - - _ABC = packed record - abcA: Integer; - abcB: UINT; - abcC: Integer; - end; - TABC = _ABC; - - -const - - ETO_OPAQUE = 2; - ETO_CLIPPED = 4; - - CS_VREDRAW = dword(1); - CS_HREDRAW = dword(2); - -//============================================== -// Draw frame constants -//============================================== - -//------------ -// Draw frame control flags -//------------ - dfc_Caption = $01; - dfc_Menu = $02; - dfc_Scroll = $03; - dfc_Button = $04; - -//------------ -// Draw frame control Styles -//------------ - DFCS_BUTTONCHECK = 0; - DFCS_BUTTONRADIOIMAGE = 1; - DFCS_BUTTONRADIOMASK = 2; - DFCS_BUTTONRADIO = 4; - DFCS_BUTTON3STATE = 8; - DFCS_BUTTONPUSH = 16; - - DFCS_CAPTIONCLOSE = 0; - DFCS_CAPTIONMIN = 1; - DFCS_CAPTIONMAX = 2; - DFCS_CAPTIONRESTORE = 3; - DFCS_CAPTIONHELP = 4; - - DFCS_MENUARROW = 0; - DFCS_MENUCHECK = 1; - DFCS_MENUBULLET = 2; - - DFCS_SCROLLDOWN = 1; - DFCS_SCROLLLEFT = 2; - DFCS_SCROLLRIGHT = 3; - DFCS_SCROLLCOMBOBOX = 5; - DFCS_SCROLLSIZEGRIP = 8; - DFCS_SCROLLUP = 0; - - DFCS_ADJUSTRECT = 8192; - DFCS_CHECKED = 1024; - DFCS_FLAT = 16384; - DFCS_INACTIVE = 256; - DFCS_MONO = 32768; - DFCS_PUSHED = 512; - -//============================================== -// Registry constants -//============================================== - { Provided for compatibility with Windows registry ONLY } - HKEY_CLASSES_ROOT = $80000000; - HKEY_CURRENT_USER = $80000001; - HKEY_LOCAL_MACHINE = $80000002; - HKEY_USERS = $80000003; - HKEY_PERFORMANCE_DATA = $80000004; - HKEY_CURRENT_CONFIG = $80000005; - HKEY_DYN_DATA = $80000006; - - HTERROR = -2; - HTTRANSPARENT = -1; - HTNOWHERE = 0; - HTCLIENT = 1; - HTCAPTION = 2; - - MSGF_DIALOGBOX = 0; - MSGF_MESSAGEBOX = 1; - MSGF_MENU = 2; - MSGF_MOVE = 3; - MSGF_SIZE = 4; - MSGF_SCROLLBAR = 5; - MSGF_NEXTWINDOW = 6; - - -//PEEKMESSAGE stuff -PM_Noremove = 0; -PM_Remove = 1; - -//============================================== -// Font constants -//============================================== - -//------------ -// KeyFlags (High word part !!!) -//------------ - KF_EXTENDED = $100; - KF_DLGMODE = $800; - KF_MENUMODE = $1000; - KF_ALTDOWN = $2000; - KF_REPEAT = $4000; - KF_UP = $8000; - -//------------- -// Virtual keys -//------------- - VK_UNKNOWN = 0; // defined by LCL - VK_LBUTTON = 1; - VK_RBUTTON = 2; - VK_CANCEL = 3; - VK_MBUTTON = 4; - VK_BACK = 8; - VK_TAB = 9; - VK_CLEAR = 12; - VK_RETURN = 13; - VK_SHIFT = 16; - VK_CONTROL = 17; - VK_MENU = 18; - VK_PAUSE = 19; - VK_CAPITAL = 20; - VK_KANA = 21; - VK_HANGUL = 21; - VK_JUNJA = 23; - VK_FINAL = 24; - VK_HANJA = 25; - VK_KANJI = 25; - VK_ESCAPE = 27; - VK_CONVERT = 28; - VK_NONCONVERT = 29; - VK_ACCEPT = 30; - VK_MODECHANGE = 31; - VK_SPACE = 32; - VK_PRIOR = 33; - VK_NEXT = 34; - VK_END = 35; - VK_HOME = 36; - VK_LEFT = 37; - VK_UP = 38; - VK_RIGHT = 39; - VK_DOWN = 40; - VK_SELECT = 41; - VK_PRINT = 42; - VK_EXECUTE = 43; - VK_SNAPSHOT = 44; - VK_INSERT = 45; - VK_DELETE = 46; - VK_HELP = 47; - VK_0 = $30; - VK_1 = $31; - VK_2 = $32; - VK_3 = $33; - VK_4 = $34; - VK_5 = $35; - VK_6 = $36; - VK_7 = $37; - VK_8 = $38; - VK_9 = $39; - //3A-40 Undefined - VK_A = $41; - VK_B = $42; - VK_C = $43; - VK_D = $44; - VK_E = $45; - VK_F = $46; - VK_G = $47; - VK_H = $48; - VK_I = $49; - VK_J = $4A; - VK_K = $4B; - VK_L = $4C; - VK_M = $4D; - VK_N = $4E; - VK_O = $4F; - VK_P = $50; - VK_Q = $51; - VK_R = $52; - VK_S = $53; - VK_T = $54; - VK_U = $55; - VK_V = $56; - VK_W = $57; - VK_X = $58; - VK_Y = $59; - VK_Z = $5A; - - VK_LWIN = 91; - VK_RWIN = 92; - VK_APPS = 93; - VK_NUMPAD0 = 96; - VK_NUMPAD1 = 97; - VK_NUMPAD2 = 98; - VK_NUMPAD3 = 99; - VK_NUMPAD4 = 100; - VK_NUMPAD5 = 101; - VK_NUMPAD6 = 102; - VK_NUMPAD7 = 103; - VK_NUMPAD8 = 104; - VK_NUMPAD9 = 105; - VK_MULTIPLY = 106; - VK_ADD = 107; - VK_SEPARATOR = 108; - VK_SUBTRACT = 109; - VK_DECIMAL = 110; - VK_DIVIDE = 111; - VK_F1 = 112; - VK_F2 = 113; - VK_F3 = 114; - VK_F4 = 115; - VK_F5 = 116; - VK_F6 = 117; - VK_F7 = 118; - VK_F8 = 119; - VK_F9 = 120; - VK_F10 = 121; - VK_F11 = 122; - VK_F12 = 123; - VK_F13 = 124; - VK_F14 = 125; - VK_F15 = 126; - VK_F16 = 127; - VK_F17 = 128; - VK_F18 = 129; - VK_F19 = 130; - VK_F20 = 131; - VK_F21 = 132; - VK_F22 = 133; - VK_F23 = 134; - VK_F24 = 135; - VK_NUMLOCK = 144; - VK_SCROLL = 145; - - // not in VCL defined: - VK_EQUAL = 187; - VK_COMMA = 188; - VK_POINT = 190; - VK_SLASH = 191; - - - // VK_L & VK_R - left and right Alt, Ctrl and Shift virtual keys. - // Used only as parameters to GetAsyncKeyState() and GetKeyState(). - // No other API or message will distinguish left and right keys in this way - VK_LSHIFT = 160; - VK_RSHIFT = 161; - VK_LCONTROL = 162; - VK_RCONTROL = 163; - VK_LMENU = 164; - VK_RMENU = 165; - VK_PROCESSKEY = 229; - VK_ATTN = 246; - VK_CRSEL = 247; - VK_EXSEL = 248; - VK_EREOF = 249; - VK_PLAY = 250; - VK_ZOOM = 251; - VK_NONAME = 252; - VK_PA1 = 253; - VK_OEM_CLEAR = 254; - - // all other keys with no virtial key code are mapped to - // VK_IRREGULAR + KeyCode - VK_IRREGULAR = 1000; - -const - - { 3D border styles } - BDR_RAISEDOUTER = 1; - BDR_SUNKENOUTER = 2; - BDR_RAISEDINNER = 4; - BDR_SUNKENINNER = 8; - - BDR_OUTER = 3; - BDR_INNER = 12; - BDR_RAISED = 5; - BDR_SUNKEN = 10; - - EDGE_BUMP = (BDR_RAISEDOUTER or BDR_SUNKENINNER); - EDGE_ETCHED = (BDR_SUNKENOUTER or BDR_RAISEDINNER); - EDGE_RAISED = (BDR_RAISEDOUTER or BDR_RAISEDINNER); - EDGE_SUNKEN = (BDR_SUNKENOUTER or BDR_SUNKENINNER); - - { Border flags } - BF_LEFT = 1; - BF_TOP = 2; - BF_RIGHT = 4; - BF_BOTTOM = 8; - - BF_TOPLEFT = (BF_TOP or BF_LEFT); - BF_TOPRIGHT = (BF_TOP or BF_RIGHT); - BF_BOTTOMLEFT = (BF_BOTTOM or BF_LEFT); - BF_BOTTOMRIGHT = (BF_BOTTOM or BF_RIGHT); - BF_RECT = (BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM); - BF_DIAGONAL = $10; - - BF_DIAGONAL_ENDTOPRIGHT = (BF_DIAGONAL or BF_TOP or BF_RIGHT); - BF_DIAGONAL_ENDTOPLEFT = (BF_DIAGONAL or BF_TOP or BF_LEFT); - BF_DIAGONAL_ENDBOTTOMLEFT = (BF_DIAGONAL or BF_BOTTOM or BF_LEFT); - BF_DIAGONAL_ENDBOTTOMRIGHT = (BF_DIAGONAL or BF_BOTTOM or BF_RIGHT); - - BF_MIDDLE = $800; { Fill in the middle } - BF_SOFT = $1000; { For softer buttons. Not sure what the use is for this } - BF_ADJUST = $2000; { Calculate the space left over } - BF_FLAT = $4000; { For flat rather than 3D borders } - BF_MONO = $8000; { For monochrome borders } - -{Dialog codes} -DLGC_WANTARROWS = 1; -DLGC_WANTTAB = 2; -DLGC_WANTALLKEYS = 4; - -DLGC_WANTCHARS = $80; - -{owner drawn constants} -ODT_MENU = 1; -ODT_LISTBOX = 2; -ODT_COMBOBOX = 3; -ODT_BUTTON = 4; -ODT_STATIC = 5; - -GWL_WNDPROC = -4; -GWL_HINSTANCE = -6; -GWL_HWNDPARENT = -8; -GWL_STYLE = -16; -GWL_EXSTYLE = -20; -GWL_USERDATA = -21; -GWL_ID = -12; - -MB_OK = $00000000; -MB_OKCANCEL = $00000001; -MB_ABORTRETRYIGNORE = $00000002; -MB_YESNOCANCEL = $00000003; -MB_YESNO = $00000004; -MB_RETRYCANCEL = $00000005; -MB_ICONHAND = $00000010; -MB_ICONQUESTION = $00000020; -MB_ICONEXCLAMATION = $00000030; -MB_ICONASTERICK = $00000040; -MB_ICONWARNING = MB_ICONEXCLAMATION; -MB_ICONERROR = MB_ICONHAND; -MB_ICONINFORMATION = MB_ICONASTERICK; - -IDOK = 1; ID_OK = IDOK; -IDCANCEL = 2; ID_CANCEL = IDCANCEL; -IDABORT = 3; ID_ABORT = IDABORT; -IDRETRY = 4; ID_RETRY = IDRETRY; -IDIGNORE = 5; ID_IGNORE = IDIGNORE; -IDYES = 6; ID_YES = IDYES; -IDNO = 7; ID_NO = IDNO; -IDCLOSE = 8; ID_CLOSE = IDCLOSE; -IDHELP = 9; ID_HELP = IDHELP; - -MB_DEFBUTTON1 = $00000000; -MB_DEFBUTTON2 = $00000100; -MB_DEFBUTTON3 = $00000200; -MB_DEFBUTTON4 = $00000300; - -{Region Flags} -Error = 0; -NullRegion = 1; -SimpleRegion = 2; -ComplexRegion = 3; -Region_Error = Error; - - -{Scroll bar stuff} - - SB_Horz = 0; - SB_Vert = 1; - SB_CTL = 2; - SB_BOTH = 3; - -{Scroll Bar Commands} - SB_LINEUP = 0; - SB_LINELEFT = 0; - SB_LINEDOWN = 1; - SB_LINERIGHT = 1; - SB_PAGEUP = 2; - SB_PAGELEFT = 2; - SB_PAGEDOWN = 3; - SB_PAGERIGHT = 3; - SB_THUMBPOSITION = 4; - SB_THUMBTRACK = 5; - SB_TOP = 6; - SB_LEFT = 6; - SB_BOTTOM = 7; - SB_RIGHT = 7; - SB_ENDSCROLL = 8; - - SBS_HORZ = 0; - SBS_VERT = 1; - SBS_TOPALIGN = 2; - SBS_LEFTALIGN = 2; - SBS_BOTTOMALIGN = 4; - SBS_RIGHTALIGN = 4; - SBS_SIZEBOXTOPLEFTALIGN = 2; - SBS_SIZEBOXBOTTOMRIGHTALIGN = 4; - SBS_SIZEBOX = 8; - SBS_SIZEGRIP = $10; - - SIF_Range = 1; - SIF_PAGE = 2; - SIF_POS = 4; - SIF_DISABLENOSCROLL = 8; - SIF_TRACKPOS = 100; - SIF_ALL = (SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS); - - - SWP_NOSIZE = 1; - SWP_NOMOVE = 2; - SWP_NOZORDER = 3; - SWP_NOREDRAW = 4; - SWP_NOACTIVATE = 5; - -{ WMSIZE MEssage Constants} - Size_Restored = 0; - Size_Minimized = 1; - Size_Maximized = 2; - Size_MaxShow = 3; - Size_MaxHide = 4; - - SIZENORMAL = Size_Restored; - SIZEICONIC = Size_Minimized; - SIZEFULLSCREEN = Size_Maximized; - SIZEZOOMSHOW = Size_MaxShow; - SIZEZOOMHIDE = Size_MaxHide; - -{ Window Styles } - WS_OVERLAPPED = 0; - WS_POPUP = DWORD($80000000); - WS_CHILD = DWORD($40000000); - WS_MINIMIZE = DWORD($20000000); - WS_VISIBLE = DWORD($10000000); - WS_DISABLED = DWORD($8000000); - WS_CLIPSIBLINGS = DWORD($4000000); - WS_CLIPCHILDREN = DWORD($2000000); - WS_MAXIMIZE = DWORD($1000000); - WS_BORDER = DWORD($800000); - WS_DLGFRAME = DWORD($400000); - WS_CAPTION = DWORD(WS_BORDER or WS_DLGFRAME); - WS_VSCROLL = DWORD($200000); - WS_HSCROLL = DWORD($100000); - WS_SYSMENU = DWORD($80000); - WS_THICKFRAME = DWORD($40000); - WS_GROUP = DWORD($20000); - WS_TABSTOP = DWORD($10000); - - WS_MINIMIZEBOX = DWORD($20000); - WS_MAXIMIZEBOX = DWORD($10000); - - WS_TILED = WS_OVERLAPPED; - - WS_ICONIC = WS_MINIMIZE; - - WS_SIZEBOX = WS_THICKFRAME; - - { Common Window Styles } - WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU - or WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX); - WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW; - WS_POPUPWINDOW = (WS_POPUP or WS_BORDER or WS_SYSMENU); - WS_CHILDWINDOW = (WS_CHILD); - - { Extended Window Styles } - WS_EX_DLGMODALFRAME = 1; - WS_EX_NOPARENTNOTIFY = 4; - WS_EX_TOPMOST = 8; - WS_EX_ACCEPTFILES = $10; - WS_EX_TRANSPARENT = $20; - WS_EX_MDICHILD = $40; - WS_EX_TOOLWINDOW = $80; - WS_EX_WINDOWEDGE = $100; - WS_EX_CLIENTEDGE = $200; - WS_EX_CONTEXTHELP = $400; - - WS_EX_RIGHT = $1000; - WS_EX_LEFT = 0; - WS_EX_RTLREADING = $2000; - WS_EX_LTRREADING = 0; - WS_EX_LEFTSCROLLBAR = $4000; - WS_EX_RIGHTSCROLLBAR = 0; - - WS_EX_CONTROLPARENT = $10000; - WS_EX_STATICEDGE = $20000; - WS_EX_APPWINDOW = $40000; - WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE); - WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST); - -const - { SetWindowPos Flags } - HWND_TOP = 0; - HWND_BOTTOM = 1; - HWND_TOPMOST = HWND(-1); - HWND_NOTOPMOST = HWND(-2); - -type - - PNMHdr = ^TNMHdr; - tagNMHDR = packed record - hwndFrom: HWND; - idFrom: UINT; - code: Integer; - end; - TNMHdr = tagNMHDR; - NMHDR = tagNMHDR; - - PDrawItemStruct = ^TDrawItemStruct; - tagDrawItemStruct = packed record - ctlType: UINT; - ctlID : UINT; - itemID : UINT; - itemAction : UINT; - itemState : UINT; - hwndItem: HWND; - _hDc: HDC; - rcItem: TRect; - itemData : DWord; - end; - TDrawItemStruct = tagDrawItemStruct; - DrawItemStruct = tagDrawItemStruct; - -{painting stuff} - PPaintStruct = ^TPaintStruct; - tagPAINTSTRUCT = packed record - hdc: HDC; - fErase: Boolean; - rcPaint: TRect; - fRestore: Boolean; - fIncUpdate: Boolean; - rgbReserved: array[0..31] of Byte; - end; - TPaintStruct = tagPAINTSTRUCT; - - PAINTSTRUCT = tagPAINTSTRUCT; - - - PWindowPos = ^TWIndowPos; - tagWindowPos = packed record - _hwnd : HWND; - hwndInsertAfter: HWND; - x : Integer; - y : Integer; - cx : Integer; - cy : Integer; - flags: UINT; - end; - TWindowPos = tagWindowPos; - WindowPos = tagWindowPos; - - PPoint = ^TPoint; - - tagScrollInfo = packed record - cbSize : UINT; - fMask : UINT; - nMin: Integer; - nMax: Integer; - nPage: UInt; - npos: Integer; - nTrackPos: Integer; - end; - PScrollInfo = ^TScrollInfo; - TScrollInfo = tagScrollinfo; - - PSize = ^TSize; - tagSIZE = record - cx: Longint; - cy: Longint; - end; - TSize = tagSIZE; - SIZE = tagSIZE; - - -{ Bitmap Header Definition } - PBitmap = ^TBitmap; - tagBITMAP = packed record - bmType: Longint; - bmWidth: Longint; - bmHeight: Longint; - bmWidthBytes: Longint; - bmPlanes: Word; - bmBitsPixel: Word; - bmBits: Pointer; - end; - TBitmap = tagBITMAP; - BITMAP = tagBITMAP; - -{ ********************************** } -{ B I T M A P S T U F F } - - PBitmapFileHeader = ^TBitmapFileHeader; - - tagBITMAPFILEHEADER = packed record - bfType: Word; - bfSize: DWORD; - bfReserved1: Word; - bfReserved2: Word; - bfOffBits: DWORD; - end; - TBitmapFileHeader = tagBITMAPFILEHEADER; - BITMAPFILEHEADER = tagBITMAPFILEHEADER; - - PDIBSection = ^TDIBSection; - - tagDIBSECTION = packed record - dsBm: TBitmap; - dsBmih: pointer;//TBitmapInfoHeader; - dsBitfields: array[0..2] of DWORD; - dshSection: THandle; - dsOffset: DWORD; - end; - TDIBSection = tagDIBSECTION; - DIBSECTION = tagDIBSECTION; - - -const - TRUETYPE_FONTTYPE = 4; - - GCP_DBCS = 1; - - -//============================================== -// Background Modes -//============================================== -TRANSPARENT = 1; -OPAQUE = 2; -BKMODE_LAST = 2; - -//============================================== -// Font constants -//============================================== - -//------------ -// Font Styles -//------------ - LF_FULLFACESIZE = 64; - LF_FACESIZE = 32; - - OUT_DEFAULT_PRECIS = 0; - OUT_STRING_PRECIS = 1; - OUT_CHARACTER_PRECIS = 2; - OUT_STROKE_PRECIS = 3; - OUT_TT_PRECIS = 4; - OUT_DEVICE_PRECIS = 5; - OUT_RASTER_PRECIS = 6; - OUT_TT_ONLY_PRECIS = 7; - OUT_OUTLINE_PRECIS = 8; - OUT_SCREEN_OUTLINE_PRECIS = 9; - - CLIP_DEFAULT_PRECIS = 0; - CLIP_CHARACTER_PRECIS = 1; - CLIP_STROKE_PRECIS = 2; - CLIP_MASK = 15; - CLIP_LH_ANGLES = (1 shl 4); - CLIP_TT_ALWAYS = (2 shl 4); - CLIP_EMBEDDED = (8 shl 4); - - DEFAULT_QUALITY = 0; - DRAFT_QUALITY = 1; - PROOF_QUALITY = 2; - NONANTIALIASED_QUALITY = 3; - ANTIALIASED_QUALITY = 4; - - DEFAULT_PITCH = 0; - FIXED_PITCH = 1; - VARIABLE_PITCH = 2; - MONO_FONT = 8; - - ANSI_CHARSET = 0; - DEFAULT_CHARSET = 1; - SYMBOL_CHARSET = 2; - SHIFTJIS_CHARSET = $80; - HANGEUL_CHARSET = 129; - GB2312_CHARSET = 134; - CHINESEBIG5_CHARSET = 136; - OEM_CHARSET = 255; - JOHAB_CHARSET = 130; - HEBREW_CHARSET = 177; - ARABIC_CHARSET = 178; - GREEK_CHARSET = 161; - TURKISH_CHARSET = 162; - VIETNAMESE_CHARSET = 163; - THAI_CHARSET = 222; - EASTEUROPE_CHARSET = 238; - RUSSIAN_CHARSET = 204; - - MAC_CHARSET = 77; - BALTIC_CHARSET = 186; - -//----------- -// Font Sets -//----------- - FS_LATIN1 = 1; - FS_LATIN2 = 2; - FS_CYRILLIC = 4; - FS_GREEK = 8; - FS_TURKISH = $10; - FS_HEBREW = $20; - FS_ARABIC = $40; - FS_BALTIC = $80; - FS_VIETNAMESE = $00000100; - FS_THAI = $10000; - FS_JISJAPAN = $20000; - FS_CHINESESIMP = $40000; - FS_WANSUNG = $80000; - FS_CHINESETRAD = $100000; - FS_JOHAB = $200000; - FS_SYMBOL = DWORD($80000000); - -//--------------- -// Font Families -//--------------- - FF_DONTCARE = (0 shl 4); - FF_ROMAN = (1 shl 4); - FF_SWISS = (2 shl 4); - FF_MODERN = (3 shl 4); - FF_SCRIPT = (4 shl 4); - FF_DECORATIVE = (5 shl 4); - -//-------------- -// Font Weights -//-------------- - FW_DONTCARE = 0; - FW_THIN = 100; - FW_EXTRALIGHT = 200; - FW_LIGHT = 300; - FW_NORMAL = 400; - FW_MEDIUM = 500; - FW_SEMIBOLD = 600; - FW_BOLD = 700; - FW_EXTRABOLD = 800; - FW_HEAVY = 900; - FW_ULTRALIGHT = FW_EXTRALIGHT; - FW_REGULAR = FW_NORMAL; - FW_DEMIBOLD = FW_SEMIBOLD; - FW_ULTRABOLD = FW_EXTRABOLD; - FW_BLACK = FW_HEAVY; - -//============================================== -// Brush constants -//============================================== - -//-------------- -// Brush Styles -//-------------- - - BS_SOLID = 0; - BS_NULL = 1; - BS_HOLLOW = BS_NULL; - BS_HATCHED = 2; - BS_PATTERN = 3; - BS_INDEXED = 4; - BS_DIBPATTERN = 5; - BS_DIBPATTERNPT = 6; - BS_PATTERN8X8 = 7; - BS_DIBPATTERN8X8 = 8; - BS_MONOPATTERN = 9; - -//-------------- -// Hatch Styles -//-------------- - - HS_HORIZONTAL = 0; { ----- } - HS_VERTICAL = 1; { ||||| } - HS_FDIAGONAL = 2; { ///// } - HS_BDIAGONAL = 3; { \\\\\ } - HS_CROSS = 4; { +++++ } - HS_DIAGCROSS = 5; { xxxxx } - -//============================================== -// Pen constants -//============================================== - -//------------ -// Pen Styles -//------------ - - PS_SOLID = 0; - PS_DASH = 1; { ------- } - PS_DOT = 2; { ....... } - PS_DASHDOT = 3; { _._._._ } - PS_DASHDOTDOT = 4; { _.._.._ } - PS_NULL = 5; - PS_INSIDEFRAME = 6; - PS_USERSTYLE = 7; - PS_ALTERNATE = 8; - PS_STYLE_MASK = 15; - - PS_ENDCAP_ROUND = 0; - PS_ENDCAP_SQUARE = $100; - PS_ENDCAP_FLAT = $200; - PS_ENDCAP_MASK = 3840; - - PS_JOIN_ROUND = 0; - PS_JOIN_BEVEL = $1000; - PS_JOIN_MITER = $2000; - PS_JOIN_MASK = 61440; - - PS_COSMETIC = 0; - PS_GEOMETRIC = $10000; - PS_TYPE_MASK = $F0000; - - -//============================================== -// Color constants -//============================================== - - CLR_INVALID = LongWord($FFFFFFFF); - -//============================================== -// API system Color constants pbd -// note these are usually shown ORed with -// $80000000 as these would have interfered with -// other MS color enumerations -// GetSysColor and SetSysColor expects the values -// below -//============================================== - - COLOR_SCROLLBAR = 0; - COLOR_BACKGROUND = 1; - COLOR_ACTIVECAPTION = 2; - COLOR_INACTIVECAPTION = 3; - COLOR_MENU = 4; - COLOR_WINDOW = 5; - COLOR_WINDOWFRAME = 6; - COLOR_MENUTEXT = 7; - COLOR_WINDOWTEXT = 8; - COLOR_CAPTIONTEXT = 9; - COLOR_ACTIVEBORDER = 10; - COLOR_INACTIVEBORDER = 11; - COLOR_APPWORKSPACE = 12; - COLOR_HIGHLIGHT = 13; - COLOR_HIGHLIGHTTEXT = 14; - COLOR_BTNFACE = 15; - COLOR_BTNSHADOW = 16; - COLOR_GRAYTEXT = 17; - COLOR_BTNTEXT = 18; - COLOR_INACTIVECAPTIONTEXT = 19; - COLOR_BTNHIGHLIGHT = 20; - COLOR_3DDKSHADOW = 21; - COLOR_3DLIGHT = 22; - COLOR_INFOTEXT = 23; - COLOR_INFOBK = 24; - // PBD: 25 is unassigned in all the docs I can find - // if someone finds what this is supposed to be then fill it in - // note defaults below, and cl[ColorConst] in graphics - COLOR_HOTLIGHT = 26; - COLOR_GRADIENTACTIVECAPTION = 27; - COLOR_GRADIENTINACTIVECAPTION = 28; - COLOR_ENDCOLORS = COLOR_GRADIENTINACTIVECAPTION; - COLOR_DESKTOP = COLOR_BACKGROUND; - COLOR_3DFACE = COLOR_BTNFACE; - COLOR_3DSHADOW = COLOR_BTNSHADOW; - COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT; - COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT; - COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT; - - MAX_SYS_COLORS = COLOR_GRADIENTINACTIVECAPTION; - SYS_COLOR_BASE = $80000000; - - -//============================================== -// Stock Objects -//============================================== - - WHITE_BRUSH = 0; - LTGRAY_BRUSH = 1; - GRAY_BRUSH = 2; - DKGRAY_BRUSH = 3; - BLACK_BRUSH = 4; - NULL_BRUSH = 5; - HOLLOW_BRUSH = NULL_BRUSH; - WHITE_PEN = 6; - BLACK_PEN = 7; - NULL_PEN = 8; - OEM_FIXED_FONT = 10; - ANSI_FIXED_FONT = 11; - ANSI_VAR_FONT = 12; - SYSTEM_FONT = 13; - DEVICE_DEFAULT_FONT = 14; - DEFAULT_PALETTE = 15; - SYSTEM_FIXED_FONT = 16; - DEFAULT_GUI_FONT = 17; - DC_BRUSH = 18; - DC_PEN = 19; - STOCK_LAST = 19; - - -//============================================== -// SystemMetrics constants -//============================================== - - SM_CXSCREEN = 0; - SM_CYSCREEN = 1; - SM_CXVSCROLL = 2; - SM_CYHSCROLL = 3; - SM_CYCAPTION = 4; - SM_CXBORDER = 5; - SM_CYBORDER = 6; - SM_CXDLGFRAME = 7; - SM_CYDLGFRAME = 8; - SM_CYVTHUMB = 9; - SM_CXHTHUMB = 10; - SM_CXICON = 11; - SM_CYICON = 12; - SM_CXCURSOR = 13; - SM_CYCURSOR = 14; - SM_CYMENU = 15; - SM_CXFULLSCREEN = 16; - SM_CYFULLSCREEN = 17; - SM_CYKANJIWINDOW = 18; - SM_MOUSEPRESENT = 19; - SM_CYVSCROLL = 20; - SM_CXHSCROLL = 21; - SM_DEBUG = 22; - SM_SWAPBUTTON = 23; - SM_RESERVED1 = 24; - SM_RESERVED2 = 25; - SM_RESERVED3 = 26; - SM_RESERVED4 = 27; - SM_CXMIN = 28; - SM_CYMIN = 29; - SM_CXSIZE = 30; - SM_CYSIZE = 31; - SM_CXFRAME = 32; - SM_CYFRAME = 33; - SM_CXMINTRACK = 34; - SM_CYMINTRACK = 35; - SM_CXDOUBLECLK = 36; - SM_CYDOUBLECLK = 37; - SM_CXICONSPACING = 38; - SM_CYICONSPACING = 39; - SM_MENUDROPALIGNMENT = 40; - SM_PENWINDOWS = 41; - SM_DBCSENABLED = 42; - SM_CMOUSEBUTTONS = 43; - - SM_CXFIXEDFRAME = SM_CXDLGFRAME; - SM_CYFIXEDFRAME = SM_CYDLGFRAME; - SM_CXSIZEFRAME = SM_CXFRAME; - SM_CYSIZEFRAME = SM_CYFRAME; - - SM_SECURE = 44; - SM_CXEDGE = 45; - SM_CYEDGE = 46; - SM_CXMINSPACING = 47; - SM_CYMINSPACING = 48; - SM_CXSMICON = 49; - SM_CYSMICON = 50; - SM_CYSMCAPTION = 51; - SM_CXSMSIZE = 52; - SM_CYSMSIZE = 53; - SM_CXMENUSIZE = 54; - SM_CYMENUSIZE = 55; - SM_ARRANGE = 56; - SM_CXMINIMIZED = 57; - SM_CYMINIMIZED = 58; - SM_CXMAXTRACK = 59; - SM_CYMAXTRACK = 60; - SM_CXMAXIMIZED = 61; - SM_CYMAXIMIZED = 62; - SM_NETWORK = 63; - SM_CLEANBOOT = 67; - SM_CXDRAG = 68; - SM_CYDRAG = 69; - SM_SHOWSOUNDS = 70; - SM_CXMENUCHECK = 71; - SM_CYMENUCHECK = 72; - SM_SLOWMACHINE = 73; - SM_MIDEASTENABLED = 74; - SM_MOUSEWHEELPRESENT = 75; - SM_CMETRICS = 76; - -type - - TFarProc = Pointer; - - - TFNWndProc = TFarProc; - - - - PLogFontA = ^TLogFontA; - PLogFontW = ^TLogFontW; - PLogFont = PLogFontA; - - tagLOGFONTA = packed record - lfHeight: Longint; - lfWidth: Longint; - lfEscapement: Longint; - lfOrientation: Longint; - lfWeight: Longint; - lfItalic: Byte; - lfUnderline: Byte; - lfStrikeOut: Byte; - lfCharSet: Byte; - lfOutPrecision: Byte; - lfClipPrecision: Byte; - lfQuality: Byte; - lfPitchAndFamily: Byte; - lfFaceName: array[0..LF_FACESIZE - 1] of AnsiChar; - end; - - tagLOGFONTW = packed record - lfHeight: Longint; - lfWidth: Longint; - lfEscapement: Longint; - lfOrientation: Longint; - lfWeight: Longint; - lfItalic: Byte; - lfUnderline: Byte; - lfStrikeOut: Byte; - lfCharSet: Byte; - lfOutPrecision: Byte; - lfClipPrecision: Byte; - lfQuality: Byte; - lfPitchAndFamily: Byte; - lfFaceName: array[0..LF_FACESIZE - 1] of WideChar; - end; - - tagLOGFONT = tagLOGFONTA; - TLogFontA = tagLOGFONTA; - TLogFontW = tagLOGFONTW; - TLogFont = TLogFontA; - - LOGFONTA = tagLOGFONTA; - - LOGFONTW = tagLOGFONTW; - - LOGFONT = LOGFONTA; - - COLORREF = LongWord; - TColorRef = LongWord; - - PLogBrush = ^TLogBrush; - tagLOGBRUSH = packed record - lbStyle: LongWord; - lbColor: COLORREF; - lbHatch: Longint; - end; - TLogBrush = tagLOGBRUSH; - LOGBRUSH = tagLOGBRUSH; - - -type - PEnumLogFontA = ^TEnumLogFontA; - PEnumLogFontW = ^TEnumLogFontW; - PEnumLogFont = PEnumLogFontA; - - tagENUMLOGFONTA = packed record - elfLogFont: TLogFontA; - elfFullName: array[0..LF_FULLFACESIZE - 1] of AnsiChar; - elfStyle: array[0..LF_FACESIZE - 1] of AnsiChar; - end; - - tagENUMLOGFONTW = packed record - elfLogFont: TLogFontW; - elfFullName: array[0..LF_FULLFACESIZE - 1] of WideChar; - elfStyle: array[0..LF_FACESIZE - 1] of WideChar; - end; - - tagENUMLOGFONT = tagENUMLOGFONTA; - TEnumLogFontA = tagENUMLOGFONTA; - TEnumLogFontW = tagENUMLOGFONTW; - TEnumLogFont = TEnumLogFontA; - - ENUMLOGFONTA = tagENUMLOGFONTA; - - ENUMLOGFONTW = tagENUMLOGFONTW; - - ENUMLOGFONT = ENUMLOGFONTA; - - PEnumLogFontExA = ^TEnumLogFontExA; - PEnumLogFontExW = ^TEnumLogFontExW; - PEnumLogFontEx = PEnumLogFontExA; - - tagENUMLOGFONTEXA = packed record - elfLogFont: TLogFontA; - elfFullName: array[0..LF_FULLFACESIZE - 1] of AnsiChar; - elfStyle: array[0..LF_FACESIZE - 1] of AnsiChar; - elfScript: array[0..LF_FACESIZE - 1] of AnsiChar; - end; - - tagENUMLOGFONTEXW = packed record - elfLogFont: TLogFontW; - elfFullName: array[0..LF_FULLFACESIZE - 1] of WideChar; - elfStyle: array[0..LF_FACESIZE - 1] of WideChar; - elfScript: array[0..LF_FACESIZE - 1] of WideChar; - end; - - tagENUMLOGFONTEX = tagENUMLOGFONTEXA; - TEnumLogFontExA = tagENUMLOGFONTEXA; - TEnumLogFontExW = tagENUMLOGFONTEXW; - TEnumLogFontEx = TEnumLogFontExA; - - ENUMLOGFONTEXA = tagENUMLOGFONTEXA; - - ENUMLOGFONTEXW = tagENUMLOGFONTEXW; - - ENUMLOGFONTEX = ENUMLOGFONTEXA; - - PLogPen = ^TLogPen; - tagLOGPEN = packed record - lopnStyle: LongWord; - lopnWidth: TPoint; - lopnColor: TColorRef; - end; - TLogPen = tagLOGPEN; - LOGPEN = tagLOGPEN; - -type - - PTextMetricA = ^TTextMetricA; - PTextMetricW = ^TTextMetricW; - PTextMetric = PTextMetricA; - - tagTEXTMETRICA = record - tmHeight: Longint; - tmAscent: Longint; - tmDescent: Longint; - tmInternalLeading: Longint; - tmExternalLeading: Longint; - tmAveCharWidth: Longint; - tmMaxCharWidth: Longint; - tmWeight: Longint; - tmOverhang: Longint; - tmDigitizedAspectX: Longint; - tmDigitizedAspectY: Longint; - tmFirstChar: AnsiChar; - tmLastChar: AnsiChar; - tmDefaultChar: AnsiChar; - tmBreakChar: AnsiChar; - tmItalic: Byte; - tmUnderlined: Byte; - tmStruckOut: Byte; - tmPitchAndFamily: Byte; - tmCharSet: Byte; - end; - - - tagTEXTMETRICW = record - tmHeight: Longint; - tmAscent: Longint; - tmDescent: Longint; - tmInternalLeading: Longint; - tmExternalLeading: Longint; - tmAveCharWidth: Longint; - tmMaxCharWidth: Longint; - tmWeight: Longint; - tmOverhang: Longint; - tmDigitizedAspectX: Longint; - tmDigitizedAspectY: Longint; - tmFirstChar: WideChar; - tmLastChar: WideChar; - tmDefaultChar: WideChar; - tmBreakChar: WideChar; - tmItalic: Byte; - tmUnderlined: Byte; - tmStruckOut: Byte; - tmPitchAndFamily: Byte; - tmCharSet: Byte; - end; - - tagTEXTMETRIC = tagTEXTMETRICA; - TTextMetricA = tagTEXTMETRICA; - TTextMetricW = tagTEXTMETRICW; - TTextMetric = TTextMetricA; - TEXTMETRICA = tagTEXTMETRICA; - TEXTMETRICW = tagTEXTMETRICW; - TEXTMETRIC = TEXTMETRICA; - - - - PWndClassExA = ^TWndClassExA; - PWndClassExW = ^TWndClassExW; - PWndClassEx = PWndClassExA; - - tagWNDCLASSEXA = packed record - cbSize: UINT; - style: UINT; - lpfnWndProc: TFNWndProc; - cbClsExtra: Integer; - cbWndExtra: Integer; - hInstance: HINST; - _hIcon: HICON; - hCursor: HCURSOR; - hbrBackground: HBRUSH; - lpszMenuName: PAnsiChar; - lpszClassName: PAnsiChar; - hIconSm: HICON; - end; - - tagWNDCLASSEXW = packed record - cbSize: UINT; - style: UINT; - lpfnWndProc: TFNWndProc; - cbClsExtra: Integer; - cbWndExtra: Integer; - hInstance: HINST; - _hIcon: HICON; - hCursor: HCURSOR; - hbrBackground: HBRUSH; - lpszMenuName: PWideChar; - lpszClassName: PWideChar; - hIconSm: HICON; - end; - - tagWNDCLASSEX = tagWNDCLASSEXA; - TWndClassExA = tagWNDCLASSEXA; - TWndClassExW = tagWNDCLASSEXW; - TWndClassEx = TWndClassExA; - WNDCLASSEXA = tagWNDCLASSEXA; - WNDCLASSEXW = tagWNDCLASSEXW; - WNDCLASSEX = WNDCLASSEXA; - - PWndClassA = ^TWndClassA; - PWndClassW = ^TWndClassW; - PWndClass = PWndClassA; - - tagWNDCLASSA = packed record - style: UINT; - lpfnWndProc: TFNWndProc; - cbClsExtra: Integer; - cbWndExtra: Integer; - hInstance: HINST; - hIcon: HICON; - hCursor: HCURSOR; - hbrBackground: HBRUSH; - lpszMenuName: PAnsiChar; - lpszClassName: PAnsiChar; - end; - - tagWNDCLASSW = packed record - style: UINT; - lpfnWndProc: TFNWndProc; - cbClsExtra: Integer; - cbWndExtra: Integer; - hInstance: HINST; - hIcon: HICON; - hCursor: HCURSOR; - hbrBackground: HBRUSH; - lpszMenuName: PWideChar; - lpszClassName: PWideChar; - end; - - tagWNDCLASS = tagWNDCLASSA; - TWndClassA = tagWNDCLASSA; - TWndClassW = tagWNDCLASSW; - TWndClass = TWndClassA; - WNDCLASSA = tagWNDCLASSA; - WNDCLASSW = tagWNDCLASSW; - WNDCLASS = WNDCLASSA; - - -type - - PMsg = ^TMsg; - tagMSG = packed record - hwnd: HWND; - message: LongWord; - wParam: Longint; - lParam: Longint; - time: DWORD; - pt: TPoint; - end; - TMsg = tagMSG; - _MSG = tagMSG; - - -// prototype for timer callback -TFNTimerProc = procedure(Handle: HWND; Message : cardinal; IDEvent: Integer; Time: Cardinal); - - -// clipboard -type - TClipboardFormat = cardinal; - PClipboardFormat = ^TClipboardFormat; - - TClipboardRequestEvent = procedure(const RequestedFormatID: TClipboardFormat; - Data: TStream) of object; - - TClipboardType = (ctPrimarySelection, ctSecondarySelection, ctClipboard); - -const - ClipboardTypeName : array[TClipboardType] of string = ( - 'primary selection', 'secondary selection', 'clipboard' - ); - - - // All winapi related stuff {$I winapih.inc} @@ -1394,14 +65,18 @@ end; {$I winapi.inc} -//initialization - -//finalization - end. { $Log$ + Revision 1.15 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.14 2002/01/02 15:24:58 lazarus MG: added TCanvas.Polygon and TCanvas.Polyline diff --git a/lcl/lcltype.pp b/lcl/lcltype.pp new file mode 100644 index 0000000000..302dff9acb --- /dev/null +++ b/lcl/lcltype.pp @@ -0,0 +1,1456 @@ + +{ $Id$ } +{ + /*************************************************************************** + LCLLinux.pp + ------------------- + Component Library Windows Controls + Initial Revision : Fri Jul 23 20:00:00 PDT 1999 + + + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +} + +{ +@author(Curtis White ) +@created(17-Oct-1999) +@lastmod(17-Oct-1999) + +This unit is being created specifically for compatibility with Delphi. It +should only be used for constants and type definitions that are included in +the Delphi Windows unit. This is only done for compatibiltiy. + +} + +unit LCLType; +{$mode objfpc}{$H+} + +interface + + +{$ifdef Trace} + {$ASSERTIONS ON} +{$endif} + +uses VCLGlobals, Classes; + +type + //TODO: check this against vclglobals + + PLongInt = ^LongInt; + PInteger = ^Integer; + PSmallInt = ^SmallInt; + PDouble = ^Double; + PRect = ^TRect; + PANSICHAR = ^AnsiChar; + PWideChar = ^WideChar; + UINT = LongWord; + { Provided for compatibility with Windows registry ONLY } + HKEY = Integer; + PHKEY = ^HKEY; + HDC = type LongWord; + HHOOK = type LongWord; + HFONT = type LongWord; + HGDIOBJ = type LongWord; + HPEN = type LongWord; + HRGN = type Longword; + HINST = type LongWord; + HICON = type LongWord; + HCURSOR = HICON; + Bool = LongBool; + pByte = ^byte; + HGLOBAL = THAndle; + +var + hInstance :HINST; + + +const + { Ternary raster operations } + SRCCOPY = $00CC0020; { dest = source } + SRCPAINT = $00EE0086; { dest = source OR dest } + SRCAND = $008800C6; { dest = source AND dest } + SRCINVERT = $00660046; { dest = source XOR dest } + SRCERASE = $00440328; { dest = source AND (NOT dest ) } + NOTSRCCOPY = $00330008; { dest = (NOT source) } + NOTSRCERASE = $001100A6; { dest = (NOT src) AND (NOT dest) } + MERGECOPY = $00C000CA; { dest = (source AND pattern) } + MERGEPAINT = $00BB0226; { dest = (NOT source) OR dest } + PATCOPY = $00F00021; { dest = pattern } + PATPAINT = $00FB0A09; { dest = DPSnoo } + PATINVERT = $005A0049; { dest = pattern XOR dest } + DSTINVERT = $00550009; { dest = (NOT dest) } + BLACKNESS = $00000042; { dest = BLACK } + WHITENESS = $00FF0062; { dest = WHITE } + +type + WPARAM = longint; + LPARAM = LongInt; + LRESULT = LongInt; + + TKeyBoardState = array[0..255] of byte; + + PABC = ^TABC; + + _ABC = packed record + abcA: Integer; + abcB: UINT; + abcC: Integer; + end; + TABC = _ABC; + + +const + + ETO_OPAQUE = 2; + ETO_CLIPPED = 4; + + CS_VREDRAW = dword(1); + CS_HREDRAW = dword(2); + +//============================================== +// Draw frame constants +//============================================== + +//------------ +// Draw frame control flags +//------------ + dfc_Caption = $01; + dfc_Menu = $02; + dfc_Scroll = $03; + dfc_Button = $04; + +//------------ +// Draw frame control Styles +//------------ + DFCS_BUTTONCHECK = 0; + DFCS_BUTTONRADIOIMAGE = 1; + DFCS_BUTTONRADIOMASK = 2; + DFCS_BUTTONRADIO = 4; + DFCS_BUTTON3STATE = 8; + DFCS_BUTTONPUSH = 16; + + DFCS_CAPTIONCLOSE = 0; + DFCS_CAPTIONMIN = 1; + DFCS_CAPTIONMAX = 2; + DFCS_CAPTIONRESTORE = 3; + DFCS_CAPTIONHELP = 4; + + DFCS_MENUARROW = 0; + DFCS_MENUCHECK = 1; + DFCS_MENUBULLET = 2; + + DFCS_SCROLLDOWN = 1; + DFCS_SCROLLLEFT = 2; + DFCS_SCROLLRIGHT = 3; + DFCS_SCROLLCOMBOBOX = 5; + DFCS_SCROLLSIZEGRIP = 8; + DFCS_SCROLLUP = 0; + + DFCS_ADJUSTRECT = 8192; + DFCS_CHECKED = 1024; + DFCS_FLAT = 16384; + DFCS_INACTIVE = 256; + DFCS_MONO = 32768; + DFCS_PUSHED = 512; + +//============================================== +// Registry constants +//============================================== + { Provided for compatibility with Windows registry ONLY } + HKEY_CLASSES_ROOT = $80000000; + HKEY_CURRENT_USER = $80000001; + HKEY_LOCAL_MACHINE = $80000002; + HKEY_USERS = $80000003; + HKEY_PERFORMANCE_DATA = $80000004; + HKEY_CURRENT_CONFIG = $80000005; + HKEY_DYN_DATA = $80000006; + + HTERROR = -2; + HTTRANSPARENT = -1; + HTNOWHERE = 0; + HTCLIENT = 1; + HTCAPTION = 2; + + MSGF_DIALOGBOX = 0; + MSGF_MESSAGEBOX = 1; + MSGF_MENU = 2; + MSGF_MOVE = 3; + MSGF_SIZE = 4; + MSGF_SCROLLBAR = 5; + MSGF_NEXTWINDOW = 6; + + +//PEEKMESSAGE stuff +PM_Noremove = 0; +PM_Remove = 1; + +//============================================== +// Font constants +//============================================== + +//------------ +// KeyFlags (High word part !!!) +//------------ + KF_EXTENDED = $100; + KF_DLGMODE = $800; + KF_MENUMODE = $1000; + KF_ALTDOWN = $2000; + KF_REPEAT = $4000; + KF_UP = $8000; + +//------------- +// Virtual keys +//------------- + VK_UNKNOWN = 0; // defined by LCL + VK_LBUTTON = 1; + VK_RBUTTON = 2; + VK_CANCEL = 3; + VK_MBUTTON = 4; + VK_BACK = 8; + VK_TAB = 9; + VK_CLEAR = 12; + VK_RETURN = 13; + VK_SHIFT = 16; + VK_CONTROL = 17; + VK_MENU = 18; + VK_PAUSE = 19; + VK_CAPITAL = 20; + VK_KANA = 21; + VK_HANGUL = 21; + VK_JUNJA = 23; + VK_FINAL = 24; + VK_HANJA = 25; + VK_KANJI = 25; + VK_ESCAPE = 27; + VK_CONVERT = 28; + VK_NONCONVERT = 29; + VK_ACCEPT = 30; + VK_MODECHANGE = 31; + VK_SPACE = 32; + VK_PRIOR = 33; + VK_NEXT = 34; + VK_END = 35; + VK_HOME = 36; + VK_LEFT = 37; + VK_UP = 38; + VK_RIGHT = 39; + VK_DOWN = 40; + VK_SELECT = 41; + VK_PRINT = 42; + VK_EXECUTE = 43; + VK_SNAPSHOT = 44; + VK_INSERT = 45; + VK_DELETE = 46; + VK_HELP = 47; + VK_0 = $30; + VK_1 = $31; + VK_2 = $32; + VK_3 = $33; + VK_4 = $34; + VK_5 = $35; + VK_6 = $36; + VK_7 = $37; + VK_8 = $38; + VK_9 = $39; + //3A-40 Undefined + VK_A = $41; + VK_B = $42; + VK_C = $43; + VK_D = $44; + VK_E = $45; + VK_F = $46; + VK_G = $47; + VK_H = $48; + VK_I = $49; + VK_J = $4A; + VK_K = $4B; + VK_L = $4C; + VK_M = $4D; + VK_N = $4E; + VK_O = $4F; + VK_P = $50; + VK_Q = $51; + VK_R = $52; + VK_S = $53; + VK_T = $54; + VK_U = $55; + VK_V = $56; + VK_W = $57; + VK_X = $58; + VK_Y = $59; + VK_Z = $5A; + + VK_LWIN = 91; + VK_RWIN = 92; + VK_APPS = 93; + VK_NUMPAD0 = 96; + VK_NUMPAD1 = 97; + VK_NUMPAD2 = 98; + VK_NUMPAD3 = 99; + VK_NUMPAD4 = 100; + VK_NUMPAD5 = 101; + VK_NUMPAD6 = 102; + VK_NUMPAD7 = 103; + VK_NUMPAD8 = 104; + VK_NUMPAD9 = 105; + VK_MULTIPLY = 106; + VK_ADD = 107; + VK_SEPARATOR = 108; + VK_SUBTRACT = 109; + VK_DECIMAL = 110; + VK_DIVIDE = 111; + VK_F1 = 112; + VK_F2 = 113; + VK_F3 = 114; + VK_F4 = 115; + VK_F5 = 116; + VK_F6 = 117; + VK_F7 = 118; + VK_F8 = 119; + VK_F9 = 120; + VK_F10 = 121; + VK_F11 = 122; + VK_F12 = 123; + VK_F13 = 124; + VK_F14 = 125; + VK_F15 = 126; + VK_F16 = 127; + VK_F17 = 128; + VK_F18 = 129; + VK_F19 = 130; + VK_F20 = 131; + VK_F21 = 132; + VK_F22 = 133; + VK_F23 = 134; + VK_F24 = 135; + VK_NUMLOCK = 144; + VK_SCROLL = 145; + + // not in VCL defined: + VK_EQUAL = 187; + VK_COMMA = 188; + VK_POINT = 190; + VK_SLASH = 191; + + + // VK_L & VK_R - left and right Alt, Ctrl and Shift virtual keys. + // Used only as parameters to GetAsyncKeyState() and GetKeyState(). + // No other API or message will distinguish left and right keys in this way + VK_LSHIFT = 160; + VK_RSHIFT = 161; + VK_LCONTROL = 162; + VK_RCONTROL = 163; + VK_LMENU = 164; + VK_RMENU = 165; + VK_PROCESSKEY = 229; + VK_ATTN = 246; + VK_CRSEL = 247; + VK_EXSEL = 248; + VK_EREOF = 249; + VK_PLAY = 250; + VK_ZOOM = 251; + VK_NONAME = 252; + VK_PA1 = 253; + VK_OEM_CLEAR = 254; + + // all other keys with no virtial key code are mapped to + // VK_IRREGULAR + KeyCode + VK_IRREGULAR = 1000; + +const + + { 3D border styles } + BDR_RAISEDOUTER = 1; + BDR_SUNKENOUTER = 2; + BDR_RAISEDINNER = 4; + BDR_SUNKENINNER = 8; + + BDR_OUTER = 3; + BDR_INNER = 12; + BDR_RAISED = 5; + BDR_SUNKEN = 10; + + EDGE_BUMP = (BDR_RAISEDOUTER or BDR_SUNKENINNER); + EDGE_ETCHED = (BDR_SUNKENOUTER or BDR_RAISEDINNER); + EDGE_RAISED = (BDR_RAISEDOUTER or BDR_RAISEDINNER); + EDGE_SUNKEN = (BDR_SUNKENOUTER or BDR_SUNKENINNER); + + { Border flags } + BF_LEFT = 1; + BF_TOP = 2; + BF_RIGHT = 4; + BF_BOTTOM = 8; + + BF_TOPLEFT = (BF_TOP or BF_LEFT); + BF_TOPRIGHT = (BF_TOP or BF_RIGHT); + BF_BOTTOMLEFT = (BF_BOTTOM or BF_LEFT); + BF_BOTTOMRIGHT = (BF_BOTTOM or BF_RIGHT); + BF_RECT = (BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM); + BF_DIAGONAL = $10; + + BF_DIAGONAL_ENDTOPRIGHT = (BF_DIAGONAL or BF_TOP or BF_RIGHT); + BF_DIAGONAL_ENDTOPLEFT = (BF_DIAGONAL or BF_TOP or BF_LEFT); + BF_DIAGONAL_ENDBOTTOMLEFT = (BF_DIAGONAL or BF_BOTTOM or BF_LEFT); + BF_DIAGONAL_ENDBOTTOMRIGHT = (BF_DIAGONAL or BF_BOTTOM or BF_RIGHT); + + BF_MIDDLE = $800; { Fill in the middle } + BF_SOFT = $1000; { For softer buttons. Not sure what the use is for this } + BF_ADJUST = $2000; { Calculate the space left over } + BF_FLAT = $4000; { For flat rather than 3D borders } + BF_MONO = $8000; { For monochrome borders } + +{Dialog codes} +DLGC_WANTARROWS = 1; +DLGC_WANTTAB = 2; +DLGC_WANTALLKEYS = 4; + +DLGC_WANTCHARS = $80; + +{owner drawn constants} +ODT_MENU = 1; +ODT_LISTBOX = 2; +ODT_COMBOBOX = 3; +ODT_BUTTON = 4; +ODT_STATIC = 5; + +GWL_WNDPROC = -4; +GWL_HINSTANCE = -6; +GWL_HWNDPARENT = -8; +GWL_STYLE = -16; +GWL_EXSTYLE = -20; +GWL_USERDATA = -21; +GWL_ID = -12; + +MB_OK = $00000000; +MB_OKCANCEL = $00000001; +MB_ABORTRETRYIGNORE = $00000002; +MB_YESNOCANCEL = $00000003; +MB_YESNO = $00000004; +MB_RETRYCANCEL = $00000005; +MB_ICONHAND = $00000010; +MB_ICONQUESTION = $00000020; +MB_ICONEXCLAMATION = $00000030; +MB_ICONASTERICK = $00000040; +MB_ICONWARNING = MB_ICONEXCLAMATION; +MB_ICONERROR = MB_ICONHAND; +MB_ICONINFORMATION = MB_ICONASTERICK; + +IDOK = 1; ID_OK = IDOK; +IDCANCEL = 2; ID_CANCEL = IDCANCEL; +IDABORT = 3; ID_ABORT = IDABORT; +IDRETRY = 4; ID_RETRY = IDRETRY; +IDIGNORE = 5; ID_IGNORE = IDIGNORE; +IDYES = 6; ID_YES = IDYES; +IDNO = 7; ID_NO = IDNO; +IDCLOSE = 8; ID_CLOSE = IDCLOSE; +IDHELP = 9; ID_HELP = IDHELP; + +MB_DEFBUTTON1 = $00000000; +MB_DEFBUTTON2 = $00000100; +MB_DEFBUTTON3 = $00000200; +MB_DEFBUTTON4 = $00000300; + +{Region Flags} +Error = 0; +NullRegion = 1; +SimpleRegion = 2; +ComplexRegion = 3; +Region_Error = Error; + + +{Scroll bar stuff} + + SB_Horz = 0; + SB_Vert = 1; + SB_CTL = 2; + SB_BOTH = 3; + +{Scroll Bar Commands} + SB_LINEUP = 0; + SB_LINELEFT = 0; + SB_LINEDOWN = 1; + SB_LINERIGHT = 1; + SB_PAGEUP = 2; + SB_PAGELEFT = 2; + SB_PAGEDOWN = 3; + SB_PAGERIGHT = 3; + SB_THUMBPOSITION = 4; + SB_THUMBTRACK = 5; + SB_TOP = 6; + SB_LEFT = 6; + SB_BOTTOM = 7; + SB_RIGHT = 7; + SB_ENDSCROLL = 8; + + SBS_HORZ = 0; + SBS_VERT = 1; + SBS_TOPALIGN = 2; + SBS_LEFTALIGN = 2; + SBS_BOTTOMALIGN = 4; + SBS_RIGHTALIGN = 4; + SBS_SIZEBOXTOPLEFTALIGN = 2; + SBS_SIZEBOXBOTTOMRIGHTALIGN = 4; + SBS_SIZEBOX = 8; + SBS_SIZEGRIP = $10; + + SIF_Range = 1; + SIF_PAGE = 2; + SIF_POS = 4; + SIF_DISABLENOSCROLL = 8; + SIF_TRACKPOS = 100; + SIF_ALL = (SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS); + + + SWP_NOSIZE = 1; + SWP_NOMOVE = 2; + SWP_NOZORDER = 3; + SWP_NOREDRAW = 4; + SWP_NOACTIVATE = 5; + +{ WMSIZE MEssage Constants} + Size_Restored = 0; + Size_Minimized = 1; + Size_Maximized = 2; + Size_MaxShow = 3; + Size_MaxHide = 4; + + SIZENORMAL = Size_Restored; + SIZEICONIC = Size_Minimized; + SIZEFULLSCREEN = Size_Maximized; + SIZEZOOMSHOW = Size_MaxShow; + SIZEZOOMHIDE = Size_MaxHide; + +{ Window Styles } + WS_OVERLAPPED = 0; + WS_POPUP = DWORD($80000000); + WS_CHILD = DWORD($40000000); + WS_MINIMIZE = DWORD($20000000); + WS_VISIBLE = DWORD($10000000); + WS_DISABLED = DWORD($8000000); + WS_CLIPSIBLINGS = DWORD($4000000); + WS_CLIPCHILDREN = DWORD($2000000); + WS_MAXIMIZE = DWORD($1000000); + WS_BORDER = DWORD($800000); + WS_DLGFRAME = DWORD($400000); + WS_CAPTION = DWORD(WS_BORDER or WS_DLGFRAME); + WS_VSCROLL = DWORD($200000); + WS_HSCROLL = DWORD($100000); + WS_SYSMENU = DWORD($80000); + WS_THICKFRAME = DWORD($40000); + WS_GROUP = DWORD($20000); + WS_TABSTOP = DWORD($10000); + + WS_MINIMIZEBOX = DWORD($20000); + WS_MAXIMIZEBOX = DWORD($10000); + + WS_TILED = WS_OVERLAPPED; + + WS_ICONIC = WS_MINIMIZE; + + WS_SIZEBOX = WS_THICKFRAME; + + { Common Window Styles } + WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU + or WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX); + WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW; + WS_POPUPWINDOW = (WS_POPUP or WS_BORDER or WS_SYSMENU); + WS_CHILDWINDOW = (WS_CHILD); + + { Extended Window Styles } + WS_EX_DLGMODALFRAME = 1; + WS_EX_NOPARENTNOTIFY = 4; + WS_EX_TOPMOST = 8; + WS_EX_ACCEPTFILES = $10; + WS_EX_TRANSPARENT = $20; + WS_EX_MDICHILD = $40; + WS_EX_TOOLWINDOW = $80; + WS_EX_WINDOWEDGE = $100; + WS_EX_CLIENTEDGE = $200; + WS_EX_CONTEXTHELP = $400; + + WS_EX_RIGHT = $1000; + WS_EX_LEFT = 0; + WS_EX_RTLREADING = $2000; + WS_EX_LTRREADING = 0; + WS_EX_LEFTSCROLLBAR = $4000; + WS_EX_RIGHTSCROLLBAR = 0; + + WS_EX_CONTROLPARENT = $10000; + WS_EX_STATICEDGE = $20000; + WS_EX_APPWINDOW = $40000; + WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE); + WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST); + +const + { SetWindowPos Flags } + HWND_TOP = 0; + HWND_BOTTOM = 1; + HWND_TOPMOST = HWND(-1); + HWND_NOTOPMOST = HWND(-2); + +type + + PNMHdr = ^TNMHdr; + tagNMHDR = packed record + hwndFrom: HWND; + idFrom: UINT; + code: Integer; + end; + TNMHdr = tagNMHDR; + NMHDR = tagNMHDR; + + PDrawItemStruct = ^TDrawItemStruct; + tagDrawItemStruct = packed record + ctlType: UINT; + ctlID : UINT; + itemID : UINT; + itemAction : UINT; + itemState : UINT; + hwndItem: HWND; + _hDc: HDC; + rcItem: TRect; + itemData : DWord; + end; + TDrawItemStruct = tagDrawItemStruct; + DrawItemStruct = tagDrawItemStruct; + +{painting stuff} + PPaintStruct = ^TPaintStruct; + tagPAINTSTRUCT = packed record + hdc: HDC; + fErase: Boolean; + rcPaint: TRect; + fRestore: Boolean; + fIncUpdate: Boolean; + rgbReserved: array[0..31] of Byte; + end; + TPaintStruct = tagPAINTSTRUCT; + + PAINTSTRUCT = tagPAINTSTRUCT; + + + PWindowPos = ^TWIndowPos; + tagWindowPos = packed record + _hwnd : HWND; + hwndInsertAfter: HWND; + x : Integer; + y : Integer; + cx : Integer; + cy : Integer; + flags: UINT; + end; + TWindowPos = tagWindowPos; + WindowPos = tagWindowPos; + + PPoint = ^TPoint; + + tagScrollInfo = packed record + cbSize : UINT; + fMask : UINT; + nMin: Integer; + nMax: Integer; + nPage: UInt; + npos: Integer; + nTrackPos: Integer; + end; + PScrollInfo = ^TScrollInfo; + TScrollInfo = tagScrollinfo; + + PSize = ^TSize; + tagSIZE = record + cx: Longint; + cy: Longint; + end; + TSize = tagSIZE; + SIZE = tagSIZE; + + +{ Bitmap Header Definition } + PBitmap = ^TBitmap; + tagBITMAP = packed record + bmType: Longint; + bmWidth: Longint; + bmHeight: Longint; + bmWidthBytes: Longint; + bmPlanes: Word; + bmBitsPixel: Word; + bmBits: Pointer; + end; + TBitmap = tagBITMAP; + BITMAP = tagBITMAP; + +{ ********************************** } +{ B I T M A P S T U F F } + + PBitmapFileHeader = ^TBitmapFileHeader; + + tagBITMAPFILEHEADER = packed record + bfType: Word; + bfSize: DWORD; + bfReserved1: Word; + bfReserved2: Word; + bfOffBits: DWORD; + end; + TBitmapFileHeader = tagBITMAPFILEHEADER; + BITMAPFILEHEADER = tagBITMAPFILEHEADER; + + PDIBSection = ^TDIBSection; + + tagDIBSECTION = packed record + dsBm: TBitmap; + dsBmih: pointer;//TBitmapInfoHeader; + dsBitfields: array[0..2] of DWORD; + dshSection: THandle; + dsOffset: DWORD; + end; + TDIBSection = tagDIBSECTION; + DIBSECTION = tagDIBSECTION; + + +const + TRUETYPE_FONTTYPE = 4; + + GCP_DBCS = 1; + + +//============================================== +// Background Modes +//============================================== +TRANSPARENT = 1; +OPAQUE = 2; +BKMODE_LAST = 2; + +//============================================== +// Font constants +//============================================== + +//------------ +// Font Styles +//------------ + LF_FULLFACESIZE = 64; + LF_FACESIZE = 32; + + OUT_DEFAULT_PRECIS = 0; + OUT_STRING_PRECIS = 1; + OUT_CHARACTER_PRECIS = 2; + OUT_STROKE_PRECIS = 3; + OUT_TT_PRECIS = 4; + OUT_DEVICE_PRECIS = 5; + OUT_RASTER_PRECIS = 6; + OUT_TT_ONLY_PRECIS = 7; + OUT_OUTLINE_PRECIS = 8; + OUT_SCREEN_OUTLINE_PRECIS = 9; + + CLIP_DEFAULT_PRECIS = 0; + CLIP_CHARACTER_PRECIS = 1; + CLIP_STROKE_PRECIS = 2; + CLIP_MASK = 15; + CLIP_LH_ANGLES = (1 shl 4); + CLIP_TT_ALWAYS = (2 shl 4); + CLIP_EMBEDDED = (8 shl 4); + + DEFAULT_QUALITY = 0; + DRAFT_QUALITY = 1; + PROOF_QUALITY = 2; + NONANTIALIASED_QUALITY = 3; + ANTIALIASED_QUALITY = 4; + + DEFAULT_PITCH = 0; + FIXED_PITCH = 1; + VARIABLE_PITCH = 2; + MONO_FONT = 8; + + ANSI_CHARSET = 0; + DEFAULT_CHARSET = 1; + SYMBOL_CHARSET = 2; + SHIFTJIS_CHARSET = $80; + HANGEUL_CHARSET = 129; + GB2312_CHARSET = 134; + CHINESEBIG5_CHARSET = 136; + OEM_CHARSET = 255; + JOHAB_CHARSET = 130; + HEBREW_CHARSET = 177; + ARABIC_CHARSET = 178; + GREEK_CHARSET = 161; + TURKISH_CHARSET = 162; + VIETNAMESE_CHARSET = 163; + THAI_CHARSET = 222; + EASTEUROPE_CHARSET = 238; + RUSSIAN_CHARSET = 204; + + MAC_CHARSET = 77; + BALTIC_CHARSET = 186; + +//----------- +// Font Sets +//----------- + FS_LATIN1 = 1; + FS_LATIN2 = 2; + FS_CYRILLIC = 4; + FS_GREEK = 8; + FS_TURKISH = $10; + FS_HEBREW = $20; + FS_ARABIC = $40; + FS_BALTIC = $80; + FS_VIETNAMESE = $00000100; + FS_THAI = $10000; + FS_JISJAPAN = $20000; + FS_CHINESESIMP = $40000; + FS_WANSUNG = $80000; + FS_CHINESETRAD = $100000; + FS_JOHAB = $200000; + FS_SYMBOL = DWORD($80000000); + +//--------------- +// Font Families +//--------------- + FF_DONTCARE = (0 shl 4); + FF_ROMAN = (1 shl 4); + FF_SWISS = (2 shl 4); + FF_MODERN = (3 shl 4); + FF_SCRIPT = (4 shl 4); + FF_DECORATIVE = (5 shl 4); + +//-------------- +// Font Weights +//-------------- + FW_DONTCARE = 0; + FW_THIN = 100; + FW_EXTRALIGHT = 200; + FW_LIGHT = 300; + FW_NORMAL = 400; + FW_MEDIUM = 500; + FW_SEMIBOLD = 600; + FW_BOLD = 700; + FW_EXTRABOLD = 800; + FW_HEAVY = 900; + FW_ULTRALIGHT = FW_EXTRALIGHT; + FW_REGULAR = FW_NORMAL; + FW_DEMIBOLD = FW_SEMIBOLD; + FW_ULTRABOLD = FW_EXTRABOLD; + FW_BLACK = FW_HEAVY; + +//============================================== +// Brush constants +//============================================== + +//-------------- +// Brush Styles +//-------------- + + BS_SOLID = 0; + BS_NULL = 1; + BS_HOLLOW = BS_NULL; + BS_HATCHED = 2; + BS_PATTERN = 3; + BS_INDEXED = 4; + BS_DIBPATTERN = 5; + BS_DIBPATTERNPT = 6; + BS_PATTERN8X8 = 7; + BS_DIBPATTERN8X8 = 8; + BS_MONOPATTERN = 9; + +//-------------- +// Hatch Styles +//-------------- + + HS_HORIZONTAL = 0; { ----- } + HS_VERTICAL = 1; { ||||| } + HS_FDIAGONAL = 2; { ///// } + HS_BDIAGONAL = 3; { \\\\\ } + HS_CROSS = 4; { +++++ } + HS_DIAGCROSS = 5; { xxxxx } + +//============================================== +// Pen constants +//============================================== + +//------------ +// Pen Styles +//------------ + + PS_SOLID = 0; + PS_DASH = 1; { ------- } + PS_DOT = 2; { ....... } + PS_DASHDOT = 3; { _._._._ } + PS_DASHDOTDOT = 4; { _.._.._ } + PS_NULL = 5; + PS_INSIDEFRAME = 6; + PS_USERSTYLE = 7; + PS_ALTERNATE = 8; + PS_STYLE_MASK = 15; + + PS_ENDCAP_ROUND = 0; + PS_ENDCAP_SQUARE = $100; + PS_ENDCAP_FLAT = $200; + PS_ENDCAP_MASK = 3840; + + PS_JOIN_ROUND = 0; + PS_JOIN_BEVEL = $1000; + PS_JOIN_MITER = $2000; + PS_JOIN_MASK = 61440; + + PS_COSMETIC = 0; + PS_GEOMETRIC = $10000; + PS_TYPE_MASK = $F0000; + + +//============================================== +// Color constants +//============================================== + + CLR_INVALID = LongWord($FFFFFFFF); + +//============================================== +// API system Color constants pbd +// note these are usually shown ORed with +// $80000000 as these would have interfered with +// other MS color enumerations +// GetSysColor and SetSysColor expects the values +// below +//============================================== + + COLOR_SCROLLBAR = 0; + COLOR_BACKGROUND = 1; + COLOR_ACTIVECAPTION = 2; + COLOR_INACTIVECAPTION = 3; + COLOR_MENU = 4; + COLOR_WINDOW = 5; + COLOR_WINDOWFRAME = 6; + COLOR_MENUTEXT = 7; + COLOR_WINDOWTEXT = 8; + COLOR_CAPTIONTEXT = 9; + COLOR_ACTIVEBORDER = 10; + COLOR_INACTIVEBORDER = 11; + COLOR_APPWORKSPACE = 12; + COLOR_HIGHLIGHT = 13; + COLOR_HIGHLIGHTTEXT = 14; + COLOR_BTNFACE = 15; + COLOR_BTNSHADOW = 16; + COLOR_GRAYTEXT = 17; + COLOR_BTNTEXT = 18; + COLOR_INACTIVECAPTIONTEXT = 19; + COLOR_BTNHIGHLIGHT = 20; + COLOR_3DDKSHADOW = 21; + COLOR_3DLIGHT = 22; + COLOR_INFOTEXT = 23; + COLOR_INFOBK = 24; + // PBD: 25 is unassigned in all the docs I can find + // if someone finds what this is supposed to be then fill it in + // note defaults below, and cl[ColorConst] in graphics + COLOR_HOTLIGHT = 26; + COLOR_GRADIENTACTIVECAPTION = 27; + COLOR_GRADIENTINACTIVECAPTION = 28; + COLOR_ENDCOLORS = COLOR_GRADIENTINACTIVECAPTION; + COLOR_DESKTOP = COLOR_BACKGROUND; + COLOR_3DFACE = COLOR_BTNFACE; + COLOR_3DSHADOW = COLOR_BTNSHADOW; + COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT; + COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT; + COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT; + + MAX_SYS_COLORS = COLOR_GRADIENTINACTIVECAPTION; + SYS_COLOR_BASE = $80000000; + + +//============================================== +// Stock Objects +//============================================== + + WHITE_BRUSH = 0; + LTGRAY_BRUSH = 1; + GRAY_BRUSH = 2; + DKGRAY_BRUSH = 3; + BLACK_BRUSH = 4; + NULL_BRUSH = 5; + HOLLOW_BRUSH = NULL_BRUSH; + WHITE_PEN = 6; + BLACK_PEN = 7; + NULL_PEN = 8; + OEM_FIXED_FONT = 10; + ANSI_FIXED_FONT = 11; + ANSI_VAR_FONT = 12; + SYSTEM_FONT = 13; + DEVICE_DEFAULT_FONT = 14; + DEFAULT_PALETTE = 15; + SYSTEM_FIXED_FONT = 16; + DEFAULT_GUI_FONT = 17; + DC_BRUSH = 18; + DC_PEN = 19; + STOCK_LAST = 19; + + +//============================================== +// SystemMetrics constants +//============================================== + + SM_CXSCREEN = 0; + SM_CYSCREEN = 1; + SM_CXVSCROLL = 2; + SM_CYHSCROLL = 3; + SM_CYCAPTION = 4; + SM_CXBORDER = 5; + SM_CYBORDER = 6; + SM_CXDLGFRAME = 7; + SM_CYDLGFRAME = 8; + SM_CYVTHUMB = 9; + SM_CXHTHUMB = 10; + SM_CXICON = 11; + SM_CYICON = 12; + SM_CXCURSOR = 13; + SM_CYCURSOR = 14; + SM_CYMENU = 15; + SM_CXFULLSCREEN = 16; + SM_CYFULLSCREEN = 17; + SM_CYKANJIWINDOW = 18; + SM_MOUSEPRESENT = 19; + SM_CYVSCROLL = 20; + SM_CXHSCROLL = 21; + SM_DEBUG = 22; + SM_SWAPBUTTON = 23; + SM_RESERVED1 = 24; + SM_RESERVED2 = 25; + SM_RESERVED3 = 26; + SM_RESERVED4 = 27; + SM_CXMIN = 28; + SM_CYMIN = 29; + SM_CXSIZE = 30; + SM_CYSIZE = 31; + SM_CXFRAME = 32; + SM_CYFRAME = 33; + SM_CXMINTRACK = 34; + SM_CYMINTRACK = 35; + SM_CXDOUBLECLK = 36; + SM_CYDOUBLECLK = 37; + SM_CXICONSPACING = 38; + SM_CYICONSPACING = 39; + SM_MENUDROPALIGNMENT = 40; + SM_PENWINDOWS = 41; + SM_DBCSENABLED = 42; + SM_CMOUSEBUTTONS = 43; + + SM_CXFIXEDFRAME = SM_CXDLGFRAME; + SM_CYFIXEDFRAME = SM_CYDLGFRAME; + SM_CXSIZEFRAME = SM_CXFRAME; + SM_CYSIZEFRAME = SM_CYFRAME; + + SM_SECURE = 44; + SM_CXEDGE = 45; + SM_CYEDGE = 46; + SM_CXMINSPACING = 47; + SM_CYMINSPACING = 48; + SM_CXSMICON = 49; + SM_CYSMICON = 50; + SM_CYSMCAPTION = 51; + SM_CXSMSIZE = 52; + SM_CYSMSIZE = 53; + SM_CXMENUSIZE = 54; + SM_CYMENUSIZE = 55; + SM_ARRANGE = 56; + SM_CXMINIMIZED = 57; + SM_CYMINIMIZED = 58; + SM_CXMAXTRACK = 59; + SM_CYMAXTRACK = 60; + SM_CXMAXIMIZED = 61; + SM_CYMAXIMIZED = 62; + SM_NETWORK = 63; + SM_CLEANBOOT = 67; + SM_CXDRAG = 68; + SM_CYDRAG = 69; + SM_SHOWSOUNDS = 70; + SM_CXMENUCHECK = 71; + SM_CYMENUCHECK = 72; + SM_SLOWMACHINE = 73; + SM_MIDEASTENABLED = 74; + SM_MOUSEWHEELPRESENT = 75; + SM_CMETRICS = 76; + +type + + TFarProc = Pointer; + + + TFNWndProc = TFarProc; + + + + PLogFontA = ^TLogFontA; + PLogFontW = ^TLogFontW; + PLogFont = PLogFontA; + + tagLOGFONTA = packed record + lfHeight: Longint; + lfWidth: Longint; + lfEscapement: Longint; + lfOrientation: Longint; + lfWeight: Longint; + lfItalic: Byte; + lfUnderline: Byte; + lfStrikeOut: Byte; + lfCharSet: Byte; + lfOutPrecision: Byte; + lfClipPrecision: Byte; + lfQuality: Byte; + lfPitchAndFamily: Byte; + lfFaceName: array[0..LF_FACESIZE - 1] of AnsiChar; + end; + + tagLOGFONTW = packed record + lfHeight: Longint; + lfWidth: Longint; + lfEscapement: Longint; + lfOrientation: Longint; + lfWeight: Longint; + lfItalic: Byte; + lfUnderline: Byte; + lfStrikeOut: Byte; + lfCharSet: Byte; + lfOutPrecision: Byte; + lfClipPrecision: Byte; + lfQuality: Byte; + lfPitchAndFamily: Byte; + lfFaceName: array[0..LF_FACESIZE - 1] of WideChar; + end; + + tagLOGFONT = tagLOGFONTA; + TLogFontA = tagLOGFONTA; + TLogFontW = tagLOGFONTW; + TLogFont = TLogFontA; + + LOGFONTA = tagLOGFONTA; + + LOGFONTW = tagLOGFONTW; + + LOGFONT = LOGFONTA; + + COLORREF = LongWord; + TColorRef = LongWord; + + PLogBrush = ^TLogBrush; + tagLOGBRUSH = packed record + lbStyle: LongWord; + lbColor: COLORREF; + lbHatch: Longint; + end; + TLogBrush = tagLOGBRUSH; + LOGBRUSH = tagLOGBRUSH; + + +type + PEnumLogFontA = ^TEnumLogFontA; + PEnumLogFontW = ^TEnumLogFontW; + PEnumLogFont = PEnumLogFontA; + + tagENUMLOGFONTA = packed record + elfLogFont: TLogFontA; + elfFullName: array[0..LF_FULLFACESIZE - 1] of AnsiChar; + elfStyle: array[0..LF_FACESIZE - 1] of AnsiChar; + end; + + tagENUMLOGFONTW = packed record + elfLogFont: TLogFontW; + elfFullName: array[0..LF_FULLFACESIZE - 1] of WideChar; + elfStyle: array[0..LF_FACESIZE - 1] of WideChar; + end; + + tagENUMLOGFONT = tagENUMLOGFONTA; + TEnumLogFontA = tagENUMLOGFONTA; + TEnumLogFontW = tagENUMLOGFONTW; + TEnumLogFont = TEnumLogFontA; + + ENUMLOGFONTA = tagENUMLOGFONTA; + + ENUMLOGFONTW = tagENUMLOGFONTW; + + ENUMLOGFONT = ENUMLOGFONTA; + + PEnumLogFontExA = ^TEnumLogFontExA; + PEnumLogFontExW = ^TEnumLogFontExW; + PEnumLogFontEx = PEnumLogFontExA; + + tagENUMLOGFONTEXA = packed record + elfLogFont: TLogFontA; + elfFullName: array[0..LF_FULLFACESIZE - 1] of AnsiChar; + elfStyle: array[0..LF_FACESIZE - 1] of AnsiChar; + elfScript: array[0..LF_FACESIZE - 1] of AnsiChar; + end; + + tagENUMLOGFONTEXW = packed record + elfLogFont: TLogFontW; + elfFullName: array[0..LF_FULLFACESIZE - 1] of WideChar; + elfStyle: array[0..LF_FACESIZE - 1] of WideChar; + elfScript: array[0..LF_FACESIZE - 1] of WideChar; + end; + + tagENUMLOGFONTEX = tagENUMLOGFONTEXA; + TEnumLogFontExA = tagENUMLOGFONTEXA; + TEnumLogFontExW = tagENUMLOGFONTEXW; + TEnumLogFontEx = TEnumLogFontExA; + + ENUMLOGFONTEXA = tagENUMLOGFONTEXA; + + ENUMLOGFONTEXW = tagENUMLOGFONTEXW; + + ENUMLOGFONTEX = ENUMLOGFONTEXA; + + PLogPen = ^TLogPen; + tagLOGPEN = packed record + lopnStyle: LongWord; + lopnWidth: TPoint; + lopnColor: TColorRef; + end; + TLogPen = tagLOGPEN; + LOGPEN = tagLOGPEN; + +type + + PTextMetricA = ^TTextMetricA; + PTextMetricW = ^TTextMetricW; + PTextMetric = PTextMetricA; + + tagTEXTMETRICA = record + tmHeight: Longint; + tmAscent: Longint; + tmDescent: Longint; + tmInternalLeading: Longint; + tmExternalLeading: Longint; + tmAveCharWidth: Longint; + tmMaxCharWidth: Longint; + tmWeight: Longint; + tmOverhang: Longint; + tmDigitizedAspectX: Longint; + tmDigitizedAspectY: Longint; + tmFirstChar: AnsiChar; + tmLastChar: AnsiChar; + tmDefaultChar: AnsiChar; + tmBreakChar: AnsiChar; + tmItalic: Byte; + tmUnderlined: Byte; + tmStruckOut: Byte; + tmPitchAndFamily: Byte; + tmCharSet: Byte; + end; + + + tagTEXTMETRICW = record + tmHeight: Longint; + tmAscent: Longint; + tmDescent: Longint; + tmInternalLeading: Longint; + tmExternalLeading: Longint; + tmAveCharWidth: Longint; + tmMaxCharWidth: Longint; + tmWeight: Longint; + tmOverhang: Longint; + tmDigitizedAspectX: Longint; + tmDigitizedAspectY: Longint; + tmFirstChar: WideChar; + tmLastChar: WideChar; + tmDefaultChar: WideChar; + tmBreakChar: WideChar; + tmItalic: Byte; + tmUnderlined: Byte; + tmStruckOut: Byte; + tmPitchAndFamily: Byte; + tmCharSet: Byte; + end; + + tagTEXTMETRIC = tagTEXTMETRICA; + TTextMetricA = tagTEXTMETRICA; + TTextMetricW = tagTEXTMETRICW; + TTextMetric = TTextMetricA; + TEXTMETRICA = tagTEXTMETRICA; + TEXTMETRICW = tagTEXTMETRICW; + TEXTMETRIC = TEXTMETRICA; + + + + PWndClassExA = ^TWndClassExA; + PWndClassExW = ^TWndClassExW; + PWndClassEx = PWndClassExA; + + tagWNDCLASSEXA = packed record + cbSize: UINT; + style: UINT; + lpfnWndProc: TFNWndProc; + cbClsExtra: Integer; + cbWndExtra: Integer; + hInstance: HINST; + _hIcon: HICON; + hCursor: HCURSOR; + hbrBackground: HBRUSH; + lpszMenuName: PAnsiChar; + lpszClassName: PAnsiChar; + hIconSm: HICON; + end; + + tagWNDCLASSEXW = packed record + cbSize: UINT; + style: UINT; + lpfnWndProc: TFNWndProc; + cbClsExtra: Integer; + cbWndExtra: Integer; + hInstance: HINST; + _hIcon: HICON; + hCursor: HCURSOR; + hbrBackground: HBRUSH; + lpszMenuName: PWideChar; + lpszClassName: PWideChar; + hIconSm: HICON; + end; + + tagWNDCLASSEX = tagWNDCLASSEXA; + TWndClassExA = tagWNDCLASSEXA; + TWndClassExW = tagWNDCLASSEXW; + TWndClassEx = TWndClassExA; + WNDCLASSEXA = tagWNDCLASSEXA; + WNDCLASSEXW = tagWNDCLASSEXW; + WNDCLASSEX = WNDCLASSEXA; + + PWndClassA = ^TWndClassA; + PWndClassW = ^TWndClassW; + PWndClass = PWndClassA; + + tagWNDCLASSA = packed record + style: UINT; + lpfnWndProc: TFNWndProc; + cbClsExtra: Integer; + cbWndExtra: Integer; + hInstance: HINST; + hIcon: HICON; + hCursor: HCURSOR; + hbrBackground: HBRUSH; + lpszMenuName: PAnsiChar; + lpszClassName: PAnsiChar; + end; + + tagWNDCLASSW = packed record + style: UINT; + lpfnWndProc: TFNWndProc; + cbClsExtra: Integer; + cbWndExtra: Integer; + hInstance: HINST; + hIcon: HICON; + hCursor: HCURSOR; + hbrBackground: HBRUSH; + lpszMenuName: PWideChar; + lpszClassName: PWideChar; + end; + + tagWNDCLASS = tagWNDCLASSA; + TWndClassA = tagWNDCLASSA; + TWndClassW = tagWNDCLASSW; + TWndClass = TWndClassA; + WNDCLASSA = tagWNDCLASSA; + WNDCLASSW = tagWNDCLASSW; + WNDCLASS = WNDCLASSA; + + +type + + PMsg = ^TMsg; + tagMSG = packed record + hwnd: HWND; + message: LongWord; + wParam: Longint; + lParam: Longint; + time: DWORD; + pt: TPoint; + end; + TMsg = tagMSG; + _MSG = tagMSG; + + +// prototype for timer callback +TFNTimerProc = procedure(Handle: HWND; Message : cardinal; IDEvent: Integer; Time: Cardinal); + + +// clipboard +type + TClipboardFormat = cardinal; + PClipboardFormat = ^TClipboardFormat; + + TClipboardRequestEvent = procedure(const RequestedFormatID: TClipboardFormat; + Data: TStream) of object; + + TClipboardType = (ctPrimarySelection, ctSecondarySelection, ctClipboard); + +const + ClipboardTypeName : array[TClipboardType] of string = ( + 'primary selection', 'secondary selection', 'clipboard' + ); + +implementation + +end. + +{ + $Log$ + Revision 1.1 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + + Revision 1.14 2002/01/02 15:24:58 lazarus + MG: added TCanvas.Polygon and TCanvas.Polyline + + Revision 1.13 2001/11/12 16:56:07 lazarus + MG: CLIPBOARD + + Revision 1.12 2001/11/01 18:48:52 lazarus + Changed Application.Messagebox to use TMessageBox class. + Added icon images for mtError and mtConfirmation + Shane + + Revision 1.11 2001/10/31 21:43:28 lazarus + Added code for TApplication to get it ready to accept exceptions. + Shane + + Revision 1.10 2001/09/30 08:34:49 lazarus + MG: fixed mem leaks and fixed range check errors + + Revision 1.9 2001/06/20 13:35:51 lazarus + MG: added VK_IRREGULAR and key grabbing + + Revision 1.8 2001/06/15 10:31:06 lazarus + MG: set longstrings as default + + Revision 1.7 2001/04/06 22:28:09 lazarus + * TTimer uses winapi interface now instead of sendmessage interface, stoppok + + Revision 1.6 2001/03/26 14:58:31 lazarus + MG: setwindowpos + bugfixes + + Revision 1.5 2001/02/01 16:45:19 lazarus + Started the code completion. + Shane + + Revision 1.4 2000/09/10 23:08:30 lazarus + MWE: + + Added CreateCompatibeleBitamp function + + Updated TWinControl.WMPaint + + Added some checks to avoid gtk/gdk errors + - Removed no fixed warning from GetDC + - Removed some output + + Revision 1.3 2000/08/11 14:59:09 lazarus + Adding all the Synedit files. + Changed the GDK_KEY_PRESS and GDK_KEY_RELEASE stuff to fix the problem in the editor with the shift key being ignored. + Shane + + Revision 1.1 2000/07/13 10:28:24 michael + + Initial import +} diff --git a/lcl/lmessages.pp b/lcl/lmessages.pp index 2ac2359949..6eec0f1b55 100644 --- a/lcl/lmessages.pp +++ b/lcl/lmessages.pp @@ -25,7 +25,7 @@ unit lMessages; interface -uses Classes,vclGlobals,LCLLinux; +uses Classes, vclGlobals, LCLType; const @@ -788,6 +788,14 @@ end. { $Log$ + Revision 1.19 2002/02/03 00:24:00 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.18 2002/01/25 19:42:56 lazarus Keith: Improved events and common dialogs on Win32 diff --git a/lcl/registry.pp b/lcl/registry.pp index 5292340d28..c1e834449e 100644 --- a/lcl/registry.pp +++ b/lcl/registry.pp @@ -41,7 +41,7 @@ interface {$endif} uses - Classes, Controls, SysUtils, vclGlobals, lMessages, LCLLinux; + Classes, Controls, SysUtils, vclGlobals, lMessages, LCLType; type ERegistryException = class(Exception); @@ -184,6 +184,14 @@ end. { $Log$ + Revision 1.4 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.3 2001/06/15 10:31:06 lazarus MG: set longstrings as default diff --git a/lcl/stdctrls.pp b/lcl/stdctrls.pp index a843164006..86262bf868 100644 --- a/lcl/stdctrls.pp +++ b/lcl/stdctrls.pp @@ -32,7 +32,7 @@ unit stdctrls; interface -uses VclGlobals, Classes, SysUtils, Graphics, LMessages, Controls, Forms; +uses VclGlobals, Classes, SysUtils, Graphics, GraphType, LMessages, Controls, Forms; type @@ -329,8 +329,6 @@ type property OnChange; end; - TTextLayout = (tlTop, tlCenter, tlBottom); - TCustomLabel = class(TWinControl) private FAlignment : TAlignment; @@ -518,7 +516,7 @@ type implementation {*******} -uses LCLLinux; +uses LCLLinux, LCLType; type @@ -584,6 +582,14 @@ end. { ============================================================================= $Log$ + Revision 1.20 2002/02/03 00:24:01 lazarus + TPanel implemented. + Basic graphic primitives split into GraphType package, so that we can + reference it from interface (GTK, Win32) units. + New Frame3d canvas method that uses native (themed) drawing (GTK only). + New overloaded Canvas.TextRect method. + LCLLinux and Graphics was split, so a bunch of files had to be modified. + Revision 1.19 2002/01/09 22:49:25 lazarus MWE: Converted to Unix fileformat diff --git a/lcl/toolwin.pp b/lcl/toolwin.pp index a9d1c621d7..0d1e48ef3b 100644 --- a/lcl/toolwin.pp +++ b/lcl/toolwin.pp @@ -39,7 +39,8 @@ interface {$endif} uses - Classes, Controls, SysUtils, stdCtrls, Graphics, vclGlobals, lMessages,LCLLinux; + Classes, Controls, SysUtils, stdCtrls, GraphType, Graphics, vclGlobals, + lMessages, LCLType, LCLLinux; type diff --git a/lcl/vclglobals.pp b/lcl/vclglobals.pp index 5c29642af7..acc3a279fe 100644 --- a/lcl/vclglobals.pp +++ b/lcl/vclglobals.pp @@ -89,6 +89,8 @@ csHintWindow = 48; csCalendar = 49; csArrow = 50; +csPanel = 51; + type //TODO: check this against lcllinux