+ Added TCheckListBox component

git-svn-id: trunk@4292 -
This commit is contained in:
marc 2003-06-20 01:37:47 +00:00
parent a1157665d0
commit 2326706a2b
5 changed files with 98 additions and 3 deletions

View File

@ -56,7 +56,7 @@ uses
// LCL
StdCtrls, Forms, Buttons, Menus, ComCtrls, Arrow,
Spin, SysUtils, Controls, CompReg, Graphics, ExtCtrls, Dialogs, Calendar,
ImgList, Grids, LResources, MaskEdit,
ImgList, Grids, LResources, MaskEdit, CheckLst,
// synedit
SynEditLazDsgn, SynEdit, SynCompletion, SynExportHTML, SynMacroRecorder,
SynMemo, SynHighlighterPas, SynHighlighterCPP, SynHighlighterJava,
@ -350,6 +350,7 @@ begin
RegisterComponents('Additional','Forms',[TScrollBox]);
RegisterComponents('Additional','Grids',[TStringGrid,TDrawGrid]);
RegisterComponents('Additional','MaskEdit',[TMaskEdit]);
RegisterComponents('Additional','CheckLst',[TCheckListBox]);
// Common
RegisterComponents('Common Controls','Controls',[TImageList]);

View File

@ -122,6 +122,94 @@ LazarusResources.Add('tcheckgroup','XPM',[
+'+#",'#10'"+#@$@$@%%%%%%%%%@@+#",'#10'"+#@@$@@@@@@@@@@@@@+#",'#10'"+#@@@@@@@'
+'@@@@@@@@@+#",'#10'"+@+++++++++++++++++#",'#10'" ###################"};'#10
]);
LazarusResources.Add('tchecklistbox','XPM',[
'/* XPM */'#10'static char * tchecklistbox_xpm[] = {'#10'"20 19 238 2",'#10'"'
+' '#9'c None",'#10'". '#9'c #79797B",'#10'"+ '#9'c #818085",'#10'"@ '#9'c #'
+'7A797F",'#10'"# '#9'c #848388",'#10'"$ '#9'c #848587",'#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 #00'
+'0100",'#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 #7A79A1",'#10'": '#9'c #FEFEFF",'#10'"< '#9'c #FBFDFF",'#10'"[ '#9'c #F'
+'2F6FF",'#10'"} '#9'c #FCFDFF",'#10'"| '#9'c #FCFCFF",'#10'"1 '#9'c #F5F5FF"'
+','#10'"2 '#9'c #FEFBFF",'#10'"3 '#9'c #FEFCFF",'#10'"4 '#9'c #FCFBFF",'#10
+'"5 '#9'c #F8F7FD",'#10'"6 '#9'c #FFFFFF",'#10'"7 '#9'c #FDFEF8",'#10'"8 '#9
+'c #FFFFFD",'#10'"9 '#9'c #C3C2C8",'#10'"0 '#9'c #7A7981",'#10'"a '#9'c #4D4'
+'C4E",'#10'"b '#9'c #0F1231",'#10'"c '#9'c #05052B",'#10'"d '#9'c #0D0C34",'
+#10'"e '#9'c #0E0D37",'#10'"f '#9'c #08062E",'#10'"g '#9'c #0F0E2E",'#10'"h '
+#9'c #080820",'#10'"i '#9'c #F5F6FA",'#10'"j '#9'c #050503",'#10'"k '#9'c #F'
+'FFFFA",'#10'"l '#9'c #7C7B77",'#10'"m '#9'c #878586",'#10'"n '#9'c #BEBCC1"'
+','#10'"o '#9'c #020005",'#10'"p '#9'c #817F8A",'#10'"q '#9'c #FFFDFF",'#10
+'"r '#9'c #F5F3FF",'#10'"s '#9'c #F9FBFF",'#10'"t '#9'c #F5F7FF",'#10'"u '#9
+'c #F2F3FF",'#10'"v '#9'c #F9F8FF",'#10'"w '#9'c #F4F3FF",'#10'"x '#9'c #FBF'
+'8FF",'#10'"y '#9'c #FBFAFF",'#10'"z '#9'c #000000",'#10'"A '#9'c #050400",'
+#10'"B '#9'c #060503",'#10'"C '#9'c #BBB9BC",'#10'"D '#9'c #010002",'#10'"E '
+#9'c #83818E",'#10'"F '#9'c #FCF9FF",'#10'"G '#9'c #030444",'#10'"H '#9'c #1'
+'51659",'#10'"I '#9'c #000043",'#10'"J '#9'c #131258",'#10'"K '#9'c #040243"'
+','#10'"L '#9'c #030037",'#10'"M '#9'c #F9F9FF",'#10'"N '#9'c #FAFAFF",'#10
+'"O '#9'c #020202",'#10'"P '#9'c #C1C2BC",'#10'"Q '#9'c #C9C8C3",'#10'"R '#9
+'c #B7B6B2",'#10'"S '#9'c #C2C0C1",'#10'"T '#9'c #060405",'#10'"U '#9'c #828'
+'28C",'#10'"V '#9'c #FBFBFF",'#10'"W '#9'c #EEF0FF",'#10'"X '#9'c #F5F8FF",'
+#10'"Y '#9'c #F7F6FF",'#10'"Z '#9'c #F3F3FF",'#10'"` '#9'c #F8F7FF",'#10'" .'
+#9'c #F9F7FF",'#10'"..'#9'c #F6F4FF",'#10'"+.'#9'c #FCFFFF",'#10'"@.'#9'c #0'
+'10100",'#10'"#.'#9'c #010000",'#10'"$.'#9'c #7E8387",'#10'"%.'#9'c #02064F"'
+','#10'"&.'#9'c #020650",'#10'"*.'#9'c #05084F",'#10'"=.'#9'c #040847",'#10
+'"-.'#9'c #050646",'#10'";.'#9'c #040349",'#10'">.'#9'c #0C0C42",'#10'",.'#9
+'c #FBFEFF",'#10'"''.'#9'c #000207",'#10'").'#9'c #FEFFFF",'#10'"!.'#9'c #BE'
+'C0BB",'#10'"~.'#9'c #FFFFF8",'#10'"{.'#9'c #BDBEB8",'#10'"].'#9'c #858994",'
+#10'"^.'#9'c #F8FCFF",'#10'"/.'#9'c #F7F9FF",'#10'"(.'#9'c #F3F5FF",'#10'"_.'
+#9'c #F2F4FF",'#10'":.'#9'c #F4F6FF",'#10'"<.'#9'c #F7F7FF",'#10'"[.'#9'c #F'
+'8F5FF",'#10'"}.'#9'c #F1F3FF",'#10'"|.'#9'c #FBFFFF",'#10'"1.'#9'c #00000B"'
+','#10'"2.'#9'c #B9BCC5",'#10'"3.'#9'c #BABCB7",'#10'"4.'#9'c #FFFFFB",'#10
+'"5.'#9'c #777992",'#10'"6.'#9'c #F6F8FF",'#10'"7.'#9'c #C25A6D",'#10'"8.'#9
+'c #AB172F",'#10'"9.'#9'c #030416",'#10'"0.'#9'c #B7B8BD",'#10'"a.'#9'c #FDF'
+'EFF",'#10'"b.'#9'c #C0C0C0",'#10'"c.'#9'c #010101",'#10'"d.'#9'c #7D7DA1",'
+#10'"e.'#9'c #C194AF",'#10'"f.'#9'c #000019",'#10'"g.'#9'c #C9CCD5",'#10'"h.'
+#9'c #F4F4FE",'#10'"i.'#9'c #C8C8D0",'#10'"j.'#9'c #FFFEFF",'#10'"k.'#9'c #C'
+'390AA",'#10'"l.'#9'c #494B4E",'#10'"m.'#9'c #F5F9FF",'#10'"n.'#9'c #E7E7FF"'
+','#10'"o.'#9'c #F7F4FF",'#10'"p.'#9'c #F8F1FF",'#10'"q.'#9'c #F8F2FF",'#10
+'"r.'#9'c #F0ECFF",'#10'"s.'#9'c #F9F6FF",'#10'"t.'#9'c #000023",'#10'"u.'#9
+'c #FBFCFF",'#10'"v.'#9'c #C2C1D1",'#10'"w.'#9'c #C5C4CC",'#10'"x.'#9'c #030'
+'207",'#10'"y.'#9'c #6D6B92",'#10'"z.'#9'c #00001E",'#10'"A.'#9'c #BABCC9",'
+#10'"B.'#9'c #C0C1C6",'#10'"C.'#9'c #000004",'#10'"D.'#9'c #8A8AA4",'#10'"E.'
+#9'c #C35B6D",'#10'"F.'#9'c #FAF8FF",'#10'"G.'#9'c #02020C",'#10'"H.'#9'c #F'
+'AFCF9",'#10'"I.'#9'c #C2C3BB",'#10'"J.'#9'c #F9FAF2",'#10'"K.'#9'c #BBBBB9"'
+','#10'"L.'#9'c #070709",'#10'"M.'#9'c #818090",'#10'"N.'#9'c #F8F8FF",'#10
+'"O.'#9'c #F2F1FF",'#10'"P.'#9'c #FAFDFF",'#10'"Q.'#9'c #030500",'#10'"R.'#9
+'c #000200",'#10'"S.'#9'c #060702",'#10'"T.'#9'c #7E7F84",'#10'"U.'#9'c #F8F'
+'9FF",'#10'"V.'#9'c #080743",'#10'"W.'#9'c #141154",'#10'"X.'#9'c #050245",'
+#10'"Y.'#9'c #090540",'#10'"Z.'#9'c #100B4D",'#10'"`.'#9'c #09063B",'#10'" +'
+#9'c #F9FAFF",'#10'".+'#9'c #01010B",'#10'"++'#9'c #FEFFFA",'#10'"@+'#9'c #F'
+'CFDF5",'#10'"#+'#9'c #BBBCB7",'#10'"$+'#9'c #7C7D7F",'#10'"%+'#9'c #F4F1FF"'
+','#10'"&+'#9'c #F2EFFF",'#10'"*+'#9'c #FBF7FF",'#10'"=+'#9'c #F8F4FF",'#10
+'"-+'#9'c #F2EDFF",'#10'";+'#9'c #FBF9FF",'#10'">+'#9'c #FCFEFF",'#10'",+'#9
+'c #F3F8F4",'#10'"''+'#9'c #070705",'#10'")+'#9'c #C5C5C3",'#10'"!+'#9'c #79'
+'7A7C",'#10'"~+'#9'c #4B4B4E",'#10'"{+'#9'c #010051",'#10'"]+'#9'c #160F5C",'
+#10'"^+'#9'c #00003A",'#10'"/+'#9'c #100C47",'#10'"(+'#9'c #110E43",'#10'"_+'
,#9'c #0C0938",'#10'":+'#9'c #F9FCF5",'#10'"<+'#9'c #FEFFEF",'#10'"[+'#9'c #0'
+'00300",'#10'"}+'#9'c #7E7D83",'#10'"|+'#9'c #C4C3C9",'#10'"1+'#9'c #86858A"'
+','#10'"2+'#9'c #F2ECFF",'#10'"3+'#9'c #FBF5FF",'#10'"4+'#9'c #F4F2FF",'#10
+'"5+'#9'c #F0EFFF",'#10'"6+'#9'c #FEFFF6",'#10'"7+'#9'c #F6FBE5",'#10'"8+'#9
+'c #080C00",'#10'"9+'#9'c #BBBEB5",'#10'"0+'#9'c #C7C6CC",'#10'"a+'#9'c #BBB'
+'9C6",'#10'"b+'#9'c #C1BFCA",'#10'"c+'#9'c #05040C",'#10'"d+'#9'c #7D7C82",'
+#10'"e+'#9'c #000007",'#10'"f+'#9'c #070614",'#10'"g+'#9'c #00000F",'#10'"h+'
+#9'c #00020F",'#10'"i+'#9'c #00000C",'#10'"j+'#9'c #040519",'#10'"k+'#9'c #0'
+'00014",'#10'"l+'#9'c #060513",'#10'"m+'#9'c #070904",'#10'"n+'#9'c #000009"'
+','#10'"o+'#9'c #00000E",'#10'". + @ # $ % & * = - ; > , '' ) ! ~ { ] ^ ",'
+#10'"/ ( _ : < [ } | 1 2 3 4 5 6 ! 7 8 : 9 ] ",'#10'"0 _ a _ 6 b c d e f g h'
+' : i j k l m n o ",'#10'"p q _ r s t u v w x y 4 4 : z 7 A B C D ",'#10'"E '
+'_ F _ 6 G H I J K L y M N O P Q R S T ",'#10'"U v _ V W X W Y Z ` ...s +.{'
+' @.! A #.z ",'#10'"$._ 6 _ 6 %.&.*.=.-.;.>.,.+.''.).!.~.{.z ",'#10'"].^._ /'
+'.(._.:.:._.<.[.<.}.|.1.2.).3.4.j ",'#10'"5.6.7.8.8.8.8.8.8.8.8.Y x V 9.+.0.'
+'a.b.c.",'#10'"d.8.e.8.8.8.8.8.8.8.8.8.8.8.f.g.h.i.j.{ ",'#10'"_ k.l.k.8.m.n'
+'.o.p.q.r.s.8.8.t.u.v.V w.x.",'#10'"y.8.k.8.8.8.8.8.8.8.8.8.8.8.z.A.: B.4 C.'
+'",'#10'"D.V E.8.8.8.8.8.8.8.8.M F.| G.H.I.J.K.L.",'#10'"M.Z _ y (.N.` O.v <'
+'. .V } P.{ ! Q.R.S.z ",'#10'"T._ U._ 6 V.W.X.Y.Y.Z.`. ++..+).++@+#+j ",'#10
+'"$+: _ | x %+&+ .*+=+-+;+>+,+] ).z ''+)+z ",'#10'"!+_ ~+_ 6 {+]+^+/+(+_+| :'
+'+<+[+:+, }+|+C.",'#10'"1+: _ 2 2+3+[.;+4+5+4 :.6+7+8+9+0+a+b+c+",'#10'"d+e+'
+'1.f+g+h+1.i+j+k+l+e+! m+! ''+n+o+o+n+"};'#10
]);
LazarusResources.Add('tcolorbutton','XPM',[
'/* XPM */'#10'static char * tcolorbutton_xpm[] = {'#10'"19 11 43 1",'#10'" '
+#9'c None",'#10'".'#9'c #F8F8F8",'#10'"+'#9'c #FFFFFF",'#10'"@'#9'c #EFEFEF"'

View File

@ -33,6 +33,7 @@ type
FCachedCount: integer;
FCachedItems: PPGtkListItem;
FUpdateCount: integer;
FWithCheckBox: Boolean;
protected
function GetCount : integer; override;
function Get(Index : Integer) : string; override;
@ -46,7 +47,7 @@ type
procedure RemoveAllCallbacks; virtual;
procedure UpdateItemCache;
public
constructor Create(List : PGtkList; TheOwner: TWinControl);
constructor Create(List : PGtkList; TheOwner: TWinControl; const AWithCheckBox: Boolean);
destructor Destroy; override;
function Add(const S: string): Integer; override;
procedure Assign(Source : TPersistent); override;
@ -86,6 +87,9 @@ type
{ =============================================================================
$Log$
Revision 1.7 2003/06/20 01:37:47 marc
+ Added TCheckListBox component
Revision 1.6 2002/11/17 11:10:04 mattias
TComboBox and TListBox accelerated and now supports objects

View File

@ -869,6 +869,7 @@ begin
AddFile('extctrls.pp','ExtCtrls',pftUnit,[pffHasRegisterProc],cpBase);
AddFile('comctrls.pp','ComCtrls',pftUnit,[pffHasRegisterProc],cpBase);
AddFile('maskedit.pp','MaskEdit',pftUnit,[pffHasRegisterProc],cpBase);
AddFile('checklst.pp','CheckLst',pftUnit,[pffHasRegisterProc],cpBase);
AddFile('forms.pp','Forms',pftUnit,[pffHasRegisterProc],cpBase);
AddFile('grids.pas','Grids',pftUnit,[pffHasRegisterProc],cpBase);
AddFile('controls.pp','Controls',pftUnit,[pffHasRegisterProc],cpBase);

View File

@ -40,7 +40,7 @@ interface
uses
LazarusPackageIntf,
Menus, Buttons, StdCtrls, ExtCtrls, ComCtrls, Forms, Grids, Controls,
Dialogs, Spin, Arrow, Calendar, MaskEdit;
Dialogs, Spin, Arrow, Calendar, MaskEdit, CheckLst;
procedure Register;
@ -54,6 +54,7 @@ begin
RegisterUnit('ExtCtrls',@ExtCtrls.Register);
RegisterUnit('ComCtrls',@ComCtrls.Register);
RegisterUnit('MaskEdit',@MaskEdit.Register);
RegisterUnit('CheckLst',@CheckLst.Register);
RegisterUnit('Forms',@Forms.Register);
RegisterUnit('Grids',@Grids.Register);
RegisterUnit('Controls',@Controls.Register);