From c787366beb529f9c44c3a55b094353c857cf609e Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 31 Jul 2005 17:58:40 +0000 Subject: [PATCH] added TIDEDialogLayoutStorage component for simpler IDE dialogs git-svn-id: trunk@7462 - --- .gitattributes | 1 + ideintf/allideintf.pas | 35 +++- ideintf/idewindowintf.pas | 62 +++++++ images/components/tidedialoglayoutstorage.xpm | 35 ++++ images/components_images.lrs | 166 +++++++++--------- lcl/forms.pp | 9 +- lcl/include/customform.inc | 18 +- packager/packagesystem.pas | 12 ++ packager/registerideintf.pas | 4 +- 9 files changed, 250 insertions(+), 92 deletions(-) create mode 100644 images/components/tidedialoglayoutstorage.xpm diff --git a/.gitattributes b/.gitattributes index a7aef97eb7..1305ec0c0a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1104,6 +1104,7 @@ images/components/tfontdialog.ico -text svneol=unset#image/x-icon images/components/tfontdialog.xpm -text svneol=native#image/x-xpixmap images/components/tgroupbox.ico -text svneol=unset#image/x-icon images/components/tgroupbox.xpm -text svneol=native#image/x-xpixmap +images/components/tidedialoglayoutstorage.xpm -text svneol=unset#image/xpm images/components/tidletimer.xpm -text svneol=native#image/x-xpixmap images/components/timage.ico -text svneol=unset#image/x-icon images/components/timage.xpm -text svneol=native#image/x-xpixmap diff --git a/ideintf/allideintf.pas b/ideintf/allideintf.pas index 013a8463c2..f8a5836e8e 100644 --- a/ideintf/allideintf.pas +++ b/ideintf/allideintf.pas @@ -20,12 +20,35 @@ unit AllIDEIntf; interface uses - IDECommands, PropEdits, ObjInspStrConsts, ObjectInspector, ColumnDlg, - ComponentEditors, GraphPropEdits, DBPropEdits, ListViewPropEdit, - ImageListEditor, ComponentTreeView, ActionsEditor, HelpIntf, TextTools, - FormEditingIntf, SrcEditorIntf, ComponentReg, PackageIntf, HelpHTML, - FieldsEditor, ConfigStorage, HelpFPDoc, ProjectIntf, LazIDEIntf, NewItemIntf, - MacroIntf, MenuIntf, FrmSelectProps, IDEWindowIntf; + ActionsEditor, + ColumnDlg, + ComponentEditors, + ComponentReg, + ComponentTreeView, + ConfigStorage, + DBPropEdits, + FieldsEditor, + FormEditingIntf, + FrmSelectProps, + GraphPropEdits, + HelpFPDoc, + HelpHTML, + HelpIntf, + IDECommands, + IDEWindowIntf, + ImageListEditor, + LazIDEIntf, + ListViewPropEdit, + MacroIntf, + MenuIntf, + NewItemIntf, + ObjectInspector, + ObjInspStrConsts, + PackageIntf, + ProjectIntf, + PropEdits, + SrcEditorIntf, + TextTools; implementation diff --git a/ideintf/idewindowintf.pas b/ideintf/idewindowintf.pas index c4d09a6fb7..5f3a1f8b1d 100644 --- a/ideintf/idewindowintf.pas +++ b/ideintf/idewindowintf.pas @@ -72,6 +72,7 @@ type destructor Destroy; override; procedure ApplyLayout(ADialog: TControl; DefaultWidth, DefaultHeight: integer); + procedure ApplyLayout(ADialog: TControl); procedure SaveLayout(ADialog: TControl); procedure Clear; function Count: integer; @@ -86,12 +87,30 @@ type property Modified: boolean read FModified write SetModified; property ItemClass: TIDEDialogLayoutClass read FItemClass write FItemClass; end; + + { TIDEDialogLayoutStorage } + + TIDEDialogLayoutStorage = class(TComponent) + protected + procedure OnCreateForm(Sender: TObject); + procedure OnCloseForm(Sender: TObject; var CloseAction: TCloseAction); + public + constructor Create(TheOwner: TComponent); override; + destructor Destroy; override; + end; var IDEDialogLayoutList: TIDEDialogLayoutList = nil;// set by the IDE + +procedure Register; implementation +procedure Register; +begin + RegisterComponents('Misc',[TIDEDialogLayoutStorage]); +end; + { TIDEDialogLayout } procedure TIDEDialogLayout.SetHeight(const AValue: integer); @@ -196,6 +215,11 @@ begin ADialog.SetBounds(ADialog.Left,ADialog.Top,NewWidth,NewHeight); end; +procedure TIDEDialogLayoutList.ApplyLayout(ADialog: TControl); +begin + ApplyLayout(ADialog,ADialog.Width,ADialog.Height); +end; + procedure TIDEDialogLayoutList.SaveLayout(ADialog: TControl); var ALayout: TIDEDialogLayout; @@ -279,5 +303,43 @@ begin Modified:=false; end; +{ TIDEDialogLayoutStorage } + +procedure TIDEDialogLayoutStorage.OnCreateForm(Sender: TObject); +begin + if Sender=nil then ; + IDEDialogLayoutList.ApplyLayout(Sender as TControl); +end; + +procedure TIDEDialogLayoutStorage.OnCloseForm(Sender: TObject; + var CloseAction: TCloseAction); +begin + if Sender=nil then ; + IDEDialogLayoutList.SaveLayout(Sender as TControl); +end; + +constructor TIDEDialogLayoutStorage.Create(TheOwner: TComponent); +var + Form: TCustomForm; +begin + inherited Create(TheOwner); + if Owner is TCustomForm then begin + Form:=TCustomForm(Owner); + Form.AddHandlerCreate(@OnCreateForm); + Form.AddHandlerClose(@OnCloseForm); + end; +end; + +destructor TIDEDialogLayoutStorage.Destroy; +var + Form: TCustomForm; +begin + if Owner is TCustomForm then begin + Form:=TCustomForm(Owner); + Form.RemoveAllHandlersOfObject(Self); + end; + inherited Destroy; +end; + end. diff --git a/images/components/tidedialoglayoutstorage.xpm b/images/components/tidedialoglayoutstorage.xpm new file mode 100644 index 0000000000..5fd7848236 --- /dev/null +++ b/images/components/tidedialoglayoutstorage.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static char *txmlstorage[]={ +"24 24 8 1", +". c None", +"d c #000000", +"b c #000080", +"f c #00ff00", +"e c #00ffff", +"# c #808080", +"a c #c0c0c0", +"c c #ffffff", +"..#####################.", +"..#aaaaaaaaaaaaaaaaaaaa.", +"..#abbbbbbbbbbbbcdcdcda.", +"..#abbbbbbbbbbbbdddddda.", +"..#aaaaaaaaaaaaaaaaaaaa.", +"..#acccccccccccccccccca.", +"..#accccccc#dd#ccccccca.", +"..#acccddc#dccd#cddccca.", +"..#accddddddddddddddcca.", +"..#accdcccddddddcccdcca.", +"..#accdccdd####ddccdcca.", +"..#accd##d#ec###d##dcca.", +"..#accd##d#c####d##dcca.", +"..#accd##d######d##dcca.", +"..#accd##dd####dd##dcca.", +"..fffc#dfffdfdddddf#fca.", +"..#ffcccffc#fffcfffcfca.", +"..#afcccfcccfcfffcfcfca.", +"..#aafafaaaafaafaafafaa.", +"......f.....f.....f.f...", +".....f.f....f.....f.f...", +"....f...f...f.....f.f...", +"...ff...ff..f.....f.f...", +"..fff...fff.f.....f.ffff"}; diff --git a/images/components_images.lrs b/images/components_images.lrs index 8bbacc6aea..4e640b6f86 100644 --- a/images/components_images.lrs +++ b/images/components_images.lrs @@ -1323,86 +1323,77 @@ LazarusResources.Add('tedit','XPM',[ +' _ [ "};'#10 ]); LazarusResources.Add('tfilelistbox','XPM',[ - '/* XPM */'#13#10'static char * C:\lazarus\images\components\tfilelistbox_xpm' - +'[] = {'#13#10'"20 19 188 2",'#13#10'" '#9'c None",'#13#10'". '#9'c #79797B' - +'",'#13#10'"+ '#9'c #818085",'#13#10'"@ '#9'c #7A797F",'#13#10'"# '#9'c #848' - +'388",'#13#10'"$ '#9'c #848587",'#13#10'"% '#9'c #808183",'#13#10'"& '#9'c #' - +'7C7C84",'#13#10'"* '#9'c #7D7D89",'#13#10'"= '#9'c #898795",'#13#10'"- '#9 - +'c #7A7987",'#13#10'"; '#9'c #7A7A86",'#13#10'"> '#9'c #82828A",'#13#10'", ' - +#9'c #828284",'#13#10'"'' '#9'c #858583",'#13#10'") '#9'c #040500",'#13#10'"' - +'! '#9'c #000100",'#13#10'"~ '#9'c #090907",'#13#10'"{ '#9'c #000002",'#13#10 - +'"] '#9'c #000005",'#13#10'"^ '#9'c #0A0911",'#13#10'"/ '#9'c #908F94",'#13 - +#10'"( '#9'c #FDFCFF",'#13#10'"_ '#9'c #F6F5FD",'#13#10'": '#9'c #FFFFFF",' - +#13#10'"< '#9'c #FCFDFF",'#13#10'"[ '#9'c #FCFCFF",'#13#10'"} '#9'c #F5F5FF"' - +','#13#10'"| '#9'c #F8F7FD",'#13#10'"1 '#9'c #FDFEF8",'#13#10'"2 '#9'c #FFFF' - +'FD",'#13#10'"3 '#9'c #FEFEFF",'#13#10'"4 '#9'c #C3C2C8",'#13#10'"5 '#9'c #7' - +'A7981",'#13#10'"6 '#9'c #FFFDFF",'#13#10'"7 '#9'c #010101",'#13#10'"8 '#9'c' - +' #F5F6FA",'#13#10'"9 '#9'c #050503",'#13#10'"0 '#9'c #FFFFFA",'#13#10'"a '#9 - +'c #7C7B77",'#13#10'"b '#9'c #878586",'#13#10'"c '#9'c #BEBCC1",'#13#10'"d ' - +#9'c #020005",'#13#10'"e '#9'c #817F8A",'#13#10'"f '#9'c #E2E2E2",'#13#10'"g' - +' '#9'c #F2F3FF",'#13#10'"h '#9'c #F9F8FF",'#13#10'"i '#9'c #F4F3FF",'#13#10 - +'"j '#9'c #FBFAFF",'#13#10'"k '#9'c #FCFBFF",'#13#10'"l '#9'c #000000",'#13 - +#10'"m '#9'c #050400",'#13#10'"n '#9'c #060503",'#13#10'"o '#9'c #BBB9BC",' - +#13#10'"p '#9'c #010002",'#13#10'"q '#9'c #83818E",'#13#10'"r '#9'c #F0F0F0"' - +','#13#10'"s '#9'c #151659",'#13#10'"t '#9'c #000043",'#13#10'"u '#9'c #1312' - +'58",'#13#10'"v '#9'c #F9F9FF",'#13#10'"w '#9'c #FAFAFF",'#13#10'"x '#9'c #0' - +'20202",'#13#10'"y '#9'c #C1C2BC",'#13#10'"z '#9'c #C9C8C3",'#13#10'"A '#9'c' - +' #B7B6B2",'#13#10'"B '#9'c #C2C0C1",'#13#10'"C '#9'c #060405",'#13#10'"D '#9 - +'c #82828C",'#13#10'"E '#9'c #EEF0FF",'#13#10'"F '#9'c #F7F6FF",'#13#10'"G ' - +#9'c #F3F3FF",'#13#10'"H '#9'c #F8F7FF",'#13#10'"I '#9'c #F6F4FF",'#13#10'"J' - +' '#9'c #F9FBFF",'#13#10'"K '#9'c #FCFFFF",'#13#10'"L '#9'c #010100",'#13#10 - +'"M '#9'c #010000",'#13#10'"N '#9'c #7E8387",'#13#10'"O '#9'c #FBFEFF",'#13 - +#10'"P '#9'c #000207",'#13#10'"Q '#9'c #FEFFFF",'#13#10'"R '#9'c #BEC0BB",' - +#13#10'"S '#9'c #FFFFF8",'#13#10'"T '#9'c #BDBEB8",'#13#10'"U '#9'c #858994"' - +','#13#10'"V '#9'c #F8FCFF",'#13#10'"W '#9'c #F4F6FF",'#13#10'"X '#9'c #F2F4' - +'FF",'#13#10'"Y '#9'c #F8F5FF",'#13#10'"Z '#9'c #F7F7FF",'#13#10'"` '#9'c #F' - +'1F3FF",'#13#10'" .'#9'c #FBFFFF",'#13#10'"..'#9'c #00000B",'#13#10'"+.'#9'c' - +' #B9BCC5",'#13#10'"@.'#9'c #BABCB7",'#13#10'"#.'#9'c #FFFFFB",'#13#10'"$.'#9 - +'c #777992",'#13#10'"%.'#9'c #FBF8FF",'#13#10'"&.'#9'c #FBFBFF",'#13#10'"*.' - +#9'c #030416",'#13#10'"=.'#9'c #B7B8BD",'#13#10'"-.'#9'c #FDFEFF",'#13#10'";' - +'.'#9'c #C0C0C0",'#13#10'">.'#9'c #7D7DA1",'#13#10'",.'#9'c #000019",'#13#10 - +'"''.'#9'c #C9CCD5",'#13#10'").'#9'c #F4F4FE",'#13#10'"!.'#9'c #C8C8D0",'#13 - +#10'"~.'#9'c #FFFEFF",'#13#10'"{.'#9'c #7A79A1",'#13#10'"].'#9'c #000023",' - +#13#10'"^.'#9'c #FBFCFF",'#13#10'"/.'#9'c #C2C1D1",'#13#10'"(.'#9'c #C5C4CC"' - +','#13#10'"_.'#9'c #030207",'#13#10'":.'#9'c #6D6B92",'#13#10'"<.'#9'c #0000' - +'1E",'#13#10'"[.'#9'c #BABCC9",'#13#10'"}.'#9'c #C0C1C6",'#13#10'"|.'#9'c #0' - +'00004",'#13#10'"1.'#9'c #8A8AA4",'#13#10'"2.'#9'c #FAF8FF",'#13#10'"3.'#9'c' - +' #02020C",'#13#10'"4.'#9'c #FAFCF9",'#13#10'"5.'#9'c #C2C3BB",'#13#10'"6.'#9 - +'c #F9FAF2",'#13#10'"7.'#9'c #BBBBB9",'#13#10'"8.'#9'c #070709",'#13#10'"9.' - +#9'c #818090",'#13#10'"0.'#9'c #F2F1FF",'#13#10'"a.'#9'c #F9F7FF",'#13#10'"b' - +'.'#9'c #FAFDFF",'#13#10'"c.'#9'c #030500",'#13#10'"d.'#9'c #000200",'#13#10 - +'"e.'#9'c #060702",'#13#10'"f.'#9'c #7E7F84",'#13#10'"g.'#9'c #FCFEFF",'#13 - +#10'"h.'#9'c #141154",'#13#10'"i.'#9'c #050245",'#13#10'"j.'#9'c #090540",' - +#13#10'"k.'#9'c #100B4D",'#13#10'"l.'#9'c #09063B",'#13#10'"m.'#9'c #F9FAFF"' - +','#13#10'"n.'#9'c #01010B",'#13#10'"o.'#9'c #FEFFFA",'#13#10'"p.'#9'c #FCFD' - +'F5",'#13#10'"q.'#9'c #BBBCB7",'#13#10'"r.'#9'c #7C7D7F",'#13#10'"s.'#9'c #F' - +'2EFFF",'#13#10'"t.'#9'c #FBF7FF",'#13#10'"u.'#9'c #F2EDFF",'#13#10'"v.'#9'c' - +' #FBF9FF",'#13#10'"w.'#9'c #F3F8F4",'#13#10'"x.'#9'c #070705",'#13#10'"y.'#9 - +'c #C5C5C3",'#13#10'"z.'#9'c #797A7C",'#13#10'"A.'#9'c #F9FCF5",'#13#10'"B.' - +#9'c #FEFFEF",'#13#10'"C.'#9'c #000300",'#13#10'"D.'#9'c #7E7D83",'#13#10'"E' - +'.'#9'c #C4C3C9",'#13#10'"F.'#9'c #86858A",'#13#10'"G.'#9'c #FEFBFF",'#13#10 - +'"H.'#9'c #F2ECFF",'#13#10'"I.'#9'c #FBF5FF",'#13#10'"J.'#9'c #F4F2FF",'#13 - +#10'"K.'#9'c #F0EFFF",'#13#10'"L.'#9'c #FEFFF6",'#13#10'"M.'#9'c #F6FBE5",' - +#13#10'"N.'#9'c #080C00",'#13#10'"O.'#9'c #BBBEB5",'#13#10'"P.'#9'c #C7C6CC"' - +','#13#10'"Q.'#9'c #BBB9C6",'#13#10'"R.'#9'c #C1BFCA",'#13#10'"S.'#9'c #0504' - +'0C",'#13#10'"T.'#9'c #7D7C82",'#13#10'"U.'#9'c #000007",'#13#10'"V.'#9'c #0' - +'70614",'#13#10'"W.'#9'c #00000F",'#13#10'"X.'#9'c #00020F",'#13#10'"Y.'#9'c' - ,' #00000C",'#13#10'"Z.'#9'c #040519",'#13#10'"`.'#9'c #000014",'#13#10'" +'#9 - +'c #060513",'#13#10'".+'#9'c #070904",'#13#10'"++'#9'c #000009",'#13#10'"@+' - +#9'c #00000E",'#13#10'". + @ # $ % & * = - ; > , '' ) ! ~ { ] ^ ",'#13#10'"/' - +' ( _ : : : < [ } : : : | : ! 1 2 3 4 ] ",'#13#10'"5 6 7 7 : : : : : : : : :' - +' 8 9 0 a b c d ",'#13#10'"e : 7 f 7 : g h i : j k k 3 l 1 m n o p ",'#13#10 - +'"q 6 7 r 7 : s t u : 7 7 v w x y z A B C ",'#13#10'"D h 7 7 7 : E F G H : I' - +' J K { L ! m M l ",'#13#10'"N : : : : : : : : : : : O K P Q R S T l ",'#13 - +#10'"U V 7 7 : : W W X : Y Z ` ...+.Q @.#.9 ",'#13#10'"$.: 7 f 7 : : : : : ' - +': : %.&.*.K =.-.;.7 ",'#13#10'">.: 7 r 7 : 7 7 7 : 7 7 : : ,.''.).!.~.{ ",' - +#13#10'"{.: 7 7 7 : : : : : : : : : ].^./.&.(._.",'#13#10'":.: : : : : : : :' - +' : : : : : <.[.3 }.k |.",'#13#10'"1.&.7 7 : : : : : : : : 2.[ 3.4.5.6.7.8."' - +','#13#10'"9.G 7 f 7 : H 0.h : a.&.< b.{ ! c.d.e.l ",'#13#10'"f.g.7 r 7 : h.' - +'i.j.: k.l.m.K n.Q o.p.q.9 ",'#13#10'"r.3 7 7 7 : s.a.t.: u.v.g.w.] Q l x.y.' - +'l ",'#13#10'"z.: : : : : : : : : : : A.B.C.A., D.E.|.",'#13#10'"F.3 3 G.H.I' - +'.Y v.J.K.k W L.M.N.O.P.Q.R.S.",'#13#10'"T.U...V.W.X...Y.Z.`. +U.! .+! x.++@' - +'+@+++"};'#13#10 + '/* XPM */'#10'static char * C:\lazarus\images\components\tfilelistbox_xpm[] ' + +'= {'#10'"20 19 188 2",'#10'" '#9'c None",'#10'". '#9'c #79797B",'#10'"+ '#9 + +'c #818085",'#10'"@ '#9'c #7A797F",'#10'"# '#9'c #848388",'#10'"$ '#9'c #848' + +'587",'#10'"% '#9'c #808183",'#10'"& '#9'c #7C7C84",'#10'"* '#9'c #7D7D89",' + +#10'"= '#9'c #898795",'#10'"- '#9'c #7A7987",'#10'"; '#9'c #7A7A86",'#10'"> ' + +#9'c #82828A",'#10'", '#9'c #828284",'#10'"'' '#9'c #858583",'#10'") '#9'c #' + +'040500",'#10'"! '#9'c #000100",'#10'"~ '#9'c #090907",'#10'"{ '#9'c #000002' + +'",'#10'"] '#9'c #000005",'#10'"^ '#9'c #0A0911",'#10'"/ '#9'c #908F94",'#10 + +'"( '#9'c #FDFCFF",'#10'"_ '#9'c #F6F5FD",'#10'": '#9'c #FFFFFF",'#10'"< '#9 + +'c #FCFDFF",'#10'"[ '#9'c #FCFCFF",'#10'"} '#9'c #F5F5FF",'#10'"| '#9'c #F8F' + +'7FD",'#10'"1 '#9'c #FDFEF8",'#10'"2 '#9'c #FFFFFD",'#10'"3 '#9'c #FEFEFF",' + +#10'"4 '#9'c #C3C2C8",'#10'"5 '#9'c #7A7981",'#10'"6 '#9'c #FFFDFF",'#10'"7 ' + +#9'c #010101",'#10'"8 '#9'c #F5F6FA",'#10'"9 '#9'c #050503",'#10'"0 '#9'c #F' + +'FFFFA",'#10'"a '#9'c #7C7B77",'#10'"b '#9'c #878586",'#10'"c '#9'c #BEBCC1"' + +','#10'"d '#9'c #020005",'#10'"e '#9'c #817F8A",'#10'"f '#9'c #E2E2E2",'#10 + +'"g '#9'c #F2F3FF",'#10'"h '#9'c #F9F8FF",'#10'"i '#9'c #F4F3FF",'#10'"j '#9 + +'c #FBFAFF",'#10'"k '#9'c #FCFBFF",'#10'"l '#9'c #000000",'#10'"m '#9'c #050' + +'400",'#10'"n '#9'c #060503",'#10'"o '#9'c #BBB9BC",'#10'"p '#9'c #010002",' + +#10'"q '#9'c #83818E",'#10'"r '#9'c #F0F0F0",'#10'"s '#9'c #151659",'#10'"t ' + +#9'c #000043",'#10'"u '#9'c #131258",'#10'"v '#9'c #F9F9FF",'#10'"w '#9'c #F' + +'AFAFF",'#10'"x '#9'c #020202",'#10'"y '#9'c #C1C2BC",'#10'"z '#9'c #C9C8C3"' + +','#10'"A '#9'c #B7B6B2",'#10'"B '#9'c #C2C0C1",'#10'"C '#9'c #060405",'#10 + +'"D '#9'c #82828C",'#10'"E '#9'c #EEF0FF",'#10'"F '#9'c #F7F6FF",'#10'"G '#9 + +'c #F3F3FF",'#10'"H '#9'c #F8F7FF",'#10'"I '#9'c #F6F4FF",'#10'"J '#9'c #F9F' + +'BFF",'#10'"K '#9'c #FCFFFF",'#10'"L '#9'c #010100",'#10'"M '#9'c #010000",' + +#10'"N '#9'c #7E8387",'#10'"O '#9'c #FBFEFF",'#10'"P '#9'c #000207",'#10'"Q ' + +#9'c #FEFFFF",'#10'"R '#9'c #BEC0BB",'#10'"S '#9'c #FFFFF8",'#10'"T '#9'c #B' + +'DBEB8",'#10'"U '#9'c #858994",'#10'"V '#9'c #F8FCFF",'#10'"W '#9'c #F4F6FF"' + +','#10'"X '#9'c #F2F4FF",'#10'"Y '#9'c #F8F5FF",'#10'"Z '#9'c #F7F7FF",'#10 + +'"` '#9'c #F1F3FF",'#10'" .'#9'c #FBFFFF",'#10'"..'#9'c #00000B",'#10'"+.'#9 + +'c #B9BCC5",'#10'"@.'#9'c #BABCB7",'#10'"#.'#9'c #FFFFFB",'#10'"$.'#9'c #777' + +'992",'#10'"%.'#9'c #FBF8FF",'#10'"&.'#9'c #FBFBFF",'#10'"*.'#9'c #030416",' + +#10'"=.'#9'c #B7B8BD",'#10'"-.'#9'c #FDFEFF",'#10'";.'#9'c #C0C0C0",'#10'">.' + +#9'c #7D7DA1",'#10'",.'#9'c #000019",'#10'"''.'#9'c #C9CCD5",'#10'").'#9'c #' + +'F4F4FE",'#10'"!.'#9'c #C8C8D0",'#10'"~.'#9'c #FFFEFF",'#10'"{.'#9'c #7A79A1' + +'",'#10'"].'#9'c #000023",'#10'"^.'#9'c #FBFCFF",'#10'"/.'#9'c #C2C1D1",'#10 + +'"(.'#9'c #C5C4CC",'#10'"_.'#9'c #030207",'#10'":.'#9'c #6D6B92",'#10'"<.'#9 + +'c #00001E",'#10'"[.'#9'c #BABCC9",'#10'"}.'#9'c #C0C1C6",'#10'"|.'#9'c #000' + +'004",'#10'"1.'#9'c #8A8AA4",'#10'"2.'#9'c #FAF8FF",'#10'"3.'#9'c #02020C",' + +#10'"4.'#9'c #FAFCF9",'#10'"5.'#9'c #C2C3BB",'#10'"6.'#9'c #F9FAF2",'#10'"7.' + +#9'c #BBBBB9",'#10'"8.'#9'c #070709",'#10'"9.'#9'c #818090",'#10'"0.'#9'c #F' + +'2F1FF",'#10'"a.'#9'c #F9F7FF",'#10'"b.'#9'c #FAFDFF",'#10'"c.'#9'c #030500"' + +','#10'"d.'#9'c #000200",'#10'"e.'#9'c #060702",'#10'"f.'#9'c #7E7F84",'#10 + +'"g.'#9'c #FCFEFF",'#10'"h.'#9'c #141154",'#10'"i.'#9'c #050245",'#10'"j.'#9 + +'c #090540",'#10'"k.'#9'c #100B4D",'#10'"l.'#9'c #09063B",'#10'"m.'#9'c #F9F' + +'AFF",'#10'"n.'#9'c #01010B",'#10'"o.'#9'c #FEFFFA",'#10'"p.'#9'c #FCFDF5",' + +#10'"q.'#9'c #BBBCB7",'#10'"r.'#9'c #7C7D7F",'#10'"s.'#9'c #F2EFFF",'#10'"t.' + +#9'c #FBF7FF",'#10'"u.'#9'c #F2EDFF",'#10'"v.'#9'c #FBF9FF",'#10'"w.'#9'c #F' + +'3F8F4",'#10'"x.'#9'c #070705",'#10'"y.'#9'c #C5C5C3",'#10'"z.'#9'c #797A7C"' + +','#10'"A.'#9'c #F9FCF5",'#10'"B.'#9'c #FEFFEF",'#10'"C.'#9'c #000300",'#10 + +'"D.'#9'c #7E7D83",'#10'"E.'#9'c #C4C3C9",'#10'"F.'#9'c #86858A",'#10'"G.'#9 + +'c #FEFBFF",'#10'"H.'#9'c #F2ECFF",'#10'"I.'#9'c #FBF5FF",'#10'"J.'#9'c #F4F' + +'2FF",'#10'"K.'#9'c #F0EFFF",'#10'"L.'#9'c #FEFFF6",'#10'"M.'#9'c #F6FBE5",' + +#10'"N.'#9'c #080C00",'#10'"O.'#9'c #BBBEB5",'#10'"P.'#9'c #C7C6CC",'#10'"Q.' + +#9'c #BBB9C6",'#10'"R.'#9'c #C1BFCA",'#10'"S.'#9'c #05040C",'#10'"T.'#9'c #7' + +'D7C82",'#10'"U.'#9'c #000007",'#10'"V.'#9'c #070614",'#10'"W.'#9'c #00000F"' + +','#10'"X.'#9'c #00020F",'#10'"Y.'#9'c #00000C",'#10'"Z.'#9'c #040519",'#10 + +'"`.'#9'c #000014",'#10'" +'#9'c #060513",'#10'".+'#9'c #070904",'#10'"++'#9 + +'c #000009",'#10'"@+'#9'c #00000E",'#10'". + @ # $ % & * = - ; > , '' ) ! ~ ' + +'{ ] ^ ",'#10'"/ ( _ : : : < [ } : : : | : ! 1 2 3 4 ] ",'#10'"5 6 7 7 : : :' + +' : : : : : : 8 9 0 a b c d ",'#10'"e : 7 f 7 : g h i : j k k 3 l 1 m n o p ' + +'",'#10'"q 6 7 r 7 : s t u : 7 7 v w x y z A B C ",'#10'"D h 7 7 7 : E F G H' + +' : I J K { L ! m M l ",'#10'"N : : : : : : : : : : : O K P Q R S T l ",'#10 + +'"U V 7 7 : : W W X : Y Z ` ...+.Q @.#.9 ",'#10'"$.: 7 f 7 : : : : : : : %.' + ,'&.*.K =.-.;.7 ",'#10'">.: 7 r 7 : 7 7 7 : 7 7 : : ,.''.).!.~.{ ",'#10'"{.: ' + +'7 7 7 : : : : : : : : : ].^./.&.(._.",'#10'":.: : : : : : : : : : : : : <.[' + +'.3 }.k |.",'#10'"1.&.7 7 : : : : : : : : 2.[ 3.4.5.6.7.8.",'#10'"9.G 7 f 7 ' + +': H 0.h : a.&.< b.{ ! c.d.e.l ",'#10'"f.g.7 r 7 : h.i.j.: k.l.m.K n.Q o.p.q' + +'.9 ",'#10'"r.3 7 7 7 : s.a.t.: u.v.g.w.] Q l x.y.l ",'#10'"z.: : : : : : : ' + +': : : : A.B.C.A., D.E.|.",'#10'"F.3 3 G.H.I.Y v.J.K.k W L.M.N.O.P.Q.R.S.",' + +#10'"T.U...V.W.X...Y.Z.`. +U.! .+! x.++@+@+++"};'#10 ]); LazarusResources.Add('tfilenamedit','XPM',[ '/* XPM */'#10'static char *tfilenamedit[] = {'#10'/* columns rows colors cha' @@ -1466,6 +1457,21 @@ LazarusResources.Add('tgroupbox','XPM',[ +'@@@@@@@@@@@@+#",'#10'"+#@@@@@@@@@@@@@@@@+#",'#10'"+@+++++++++++++++++#",'#10 +'" ###################"};'#10 ]); +LazarusResources.Add('tidedialoglayoutstorage','XPM',[ + '/* XPM */'#10'static char *txmlstorage[]={'#10'"24 24 8 1",'#10'". c None",' + +#10'"d c #000000",'#10'"b c #000080",'#10'"f c #00ff00",'#10'"e c #00ffff",' + +#10'"# c #808080",'#10'"a c #c0c0c0",'#10'"c c #ffffff",'#10'"..############' + +'#########.",'#10'"..#aaaaaaaaaaaaaaaaaaaa.",'#10'"..#abbbbbbbbbbbbcdcdcda."' + +','#10'"..#abbbbbbbbbbbbdddddda.",'#10'"..#aaaaaaaaaaaaaaaaaaaa.",'#10'"..#a' + +'cccccccccccccccccca.",'#10'"..#accccccc#dd#ccccccca.",'#10'"..#acccddc#dccd' + +'#cddccca.",'#10'"..#accddddddddddddddcca.",'#10'"..#accdcccddddddcccdcca.",' + +#10'"..#accdccdd####ddccdcca.",'#10'"..#accd##d#ec###d##dcca.",'#10'"..#accd' + +'##d#c####d##dcca.",'#10'"..#accd##d######d##dcca.",'#10'"..#accd##dd####dd#' + +'#dcca.",'#10'"..fffc#dfffdfdddddf#fca.",'#10'"..#ffcccffc#fffcfffcfca.",'#10 + +'"..#afcccfcccfcfffcfcfca.",'#10'"..#aafafaaaafaafaafafaa.",'#10'"......f...' + +'..f.....f.f...",'#10'".....f.f....f.....f.f...",'#10'"....f...f...f.....f.f' + +'...",'#10'"...ff...ff..f.....f.f...",'#10'"..fff...fff.f.....f.ffff"};'#10 +]); LazarusResources.Add('tidletimer','XPM',[ '/* XPM */'#10'static char * tidletimer_xpm[] = {'#10'"19 19 4 1",'#10'" '#9 +'c None",'#10'".'#9'c #000000",'#10'"+'#9'c #AD9226",'#10'"@'#9'c #1100D6",' diff --git a/lcl/forms.pp b/lcl/forms.pp index 5c0ecdb1d3..32c59db690 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -341,7 +341,8 @@ type TFormHandlerType = ( fhtFirstShow, - fhtClose + fhtClose, + fhtCreate ); { TCustomForm } @@ -488,10 +489,12 @@ type function GetRolesForControl(AControl: TControl): TControlRolesForForm; procedure RemoveAllHandlersOfObject(AnObject: TObject); override; procedure AddHandlerFirstShow(OnFirstShowHandler: TNotifyEvent; - AsLast: Boolean); + AsLast: Boolean=true); procedure RemoveHandlerFirstShow(OnFirstShowHandler: TNotifyEvent); - procedure AddHandlerClose(OnCloseHandler: TCloseEvent; AsLast: Boolean); + procedure AddHandlerClose(OnCloseHandler: TCloseEvent; AsLast: Boolean=true); procedure RemoveHandlerClose(OnCloseHandler: TCloseEvent); + procedure AddHandlerCreate(OnCreateHandler: TNotifyEvent; AsLast: Boolean=true); + procedure RemoveHandlerCreate(OnCreateHandler: TNotifyEvent); function IsShortcut(var Message: TLMKey): boolean; public // drag and dock diff --git a/lcl/include/customform.inc b/lcl/include/customform.inc index f79acdb3d6..b2bd461d93 100644 --- a/lcl/include/customform.inc +++ b/lcl/include/customform.inc @@ -620,9 +620,14 @@ end; Calls user handler ------------------------------------------------------------------------------} procedure TCustomForm.DoCreate; +var + i: LongInt; begin LockRealizeBounds; if Assigned(FOnCreate) then FOnCreate(Self); + i:=FFormHandlers[fhtCreate].Count; + while FFormHandlers[fhtCreate].NextDownIndex(i) do + TNotifyEvent(FFormHandlers[fhtCreate][i])(Self); UnlockRealizeBounds; end; @@ -1287,7 +1292,7 @@ Begin Visible := False; fCompStyle:= csForm; - FMenu := nil; + FMenu:= nil; ControlStyle := ControlStyle + [csAcceptsControls, csCaptureMouse, csClickEvents, csSetCaption, csDoubleClicks]; @@ -1914,6 +1919,17 @@ begin RemoveHandler(fhtClose,TMethod(OnCloseHandler)); end; +procedure TCustomForm.AddHandlerCreate(OnCreateHandler: TNotifyEvent; + AsLast: Boolean); +begin + AddHandler(fhtCreate,TMethod(OnCreateHandler),AsLast); +end; + +procedure TCustomForm.RemoveHandlerCreate(OnCreateHandler: TNotifyEvent); +begin + RemoveHandler(fhtCreate,TMethod(OnCreateHandler)); +end; + procedure TCustomForm.Dock(NewDockSite: TWinControl; ARect: TRect); begin inherited Dock(NewDockSite, ARect); diff --git a/packager/packagesystem.pas b/packager/packagesystem.pas index bb283c0e34..d1caa4cdfd 100644 --- a/packager/packagesystem.pas +++ b/packager/packagesystem.pas @@ -1061,12 +1061,24 @@ begin AddFile('componenteditors.pas','ComponentEditors',pftUnit,[],cpBase); AddFile('componentreg.pas','ComponentReg',pftUnit,[],cpBase); AddFile('componenttreeview.pas','ComponentTreeview',pftUnit,[],cpBase); + AddFile('configstorage.pas','ConfigStorage',pftUnit,[],cpBase); + AddFile('dbpropedits.pas','DBPropEdits',pftUnit,[],cpBase); + AddFile('fieldseditor.pas','FieldsEditor',pftUnit,[],cpBase); AddFile('formeditingintf.pas','FormEditingIntf',pftUnit,[],cpBase); + AddFile('frmselectprops.pas','FrmSelectProps',pftUnit,[],cpBase); AddFile('graphpropedits.pas','GraphPropEdits',pftUnit,[],cpBase); + AddFile('helpfpdoc.pas','HelpFPDoc',pftUnit,[],cpBase); + AddFile('helphtml.pas','HelpHTML',pftUnit,[],cpBase); + AddFile('helpintf.pas','HelpIntf',pftUnit,[],cpBase); AddFile('idecommands.pas','IDECommands',pftUnit,[],cpBase); + AddFile('idewindowintf.pas','IDEWindowIntf',pftUnit,[pffHasRegisterProc],cpBase); AddFile('imagelisteditor.pp','ImageListEditor',pftUnit,[],cpBase); + AddFile('lazideintf.pp','LazIDEIntf',pftUnit,[],cpBase); AddFile('listviewpropedit.pp','ListViewPropEdit',pftUnit,[],cpBase); AddFile('newitemintf.pas','NewItemIntf',pftUnit,[],cpBase); + AddFile('macrointf.pas','MacroIntf',pftUnit,[],cpBase); + AddFile('menuintf.pas','MenuIntf',pftUnit,[],cpBase); + AddFile('newintf.pas','NewIntf',pftUnit,[],cpBase); AddFile('objectinspector.pp','ObjectInspector',pftUnit,[],cpBase); AddFile('objinspstrconsts.pas','ObjInspStrConsts',pftUnit,[],cpBase); AddFile('packageintf.pas','PackageIntf',pftUnit,[],cpBase); diff --git a/packager/registerideintf.pas b/packager/registerideintf.pas index dc17d36884..21c34a88b7 100644 --- a/packager/registerideintf.pas +++ b/packager/registerideintf.pas @@ -38,7 +38,7 @@ unit RegisterIDEIntf; interface uses - Classes, SysUtils; + LazarusPackageIntf, IDEWindowIntf; procedure Register; @@ -46,7 +46,7 @@ implementation procedure Register; begin - + RegisterUnit('IDEWindowIntf',@IDEWindowIntf.Register); end; end.