mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 01:19:47 +01:00 
			
		
		
		
	implemented TTIProgressBar
git-svn-id: trunk@6451 -
This commit is contained in:
		
							parent
							
								
									813ed6b55c
								
							
						
					
					
						commit
						2d0f725a44
					
				
							
								
								
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							@ -183,6 +183,7 @@ components/rtticontrols/ttilabel.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
components/rtticontrols/ttilistbox.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
components/rtticontrols/ttimaskedit.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
components/rtticontrols/ttimemo.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
components/rtticontrols/ttiprogressbar.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
components/rtticontrols/ttipropertygrid.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
components/rtticontrols/ttiradiogroup.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
components/rtticontrols/ttispinedit.xpm -text svneol=native#image/x-xpixmap
 | 
			
		||||
 | 
			
		||||
@ -1163,6 +1163,62 @@ LazarusResources.Add('ttimemo','XPM',[
 | 
			
		||||
  +'     /+(+_+:+<+[+}+|+1+2+3+4+5+  ",'#10'"                    6+7+8+9+      '
 | 
			
		||||
  +'0+a+b+c+    "};'#10
 | 
			
		||||
]);
 | 
			
		||||
LazarusResources.Add('ttiprogressbar','XPM',[
 | 
			
		||||
  '/* XPM */'#10'static char * ttiprogressbar_xpm[] = {'#10'"23 23 119 2",'#10
 | 
			
		||||
  +'"  '#9'c None",'#10'". '#9'c #808080",'#10'"+ '#9'c #C0C0C0",'#10'"@ '#9'c '
 | 
			
		||||
  +'#FFFFFF",'#10'"# '#9'c #AE0013",'#10'"$ '#9'c #4F3732",'#10'"% '#9'c #C3988'
 | 
			
		||||
  +'E",'#10'"& '#9'c #4B251C",'#10'"* '#9'c #CC8170",'#10'"= '#9'c #934737",'#10
 | 
			
		||||
  +'"- '#9'c #B84F39",'#10'"; '#9'c #A03F2A",'#10'"> '#9'c #3C160E",'#10'", '#9
 | 
			
		||||
  +'c #6E291A",'#10'"'' '#9'c #B4452D",'#10'") '#9'c #B4452E",'#10'"! '#9'c #9A'
 | 
			
		||||
  +'3A25",'#10'"~ '#9'c #31120C",'#10'"{ '#9'c #441910",'#10'"] '#9'c #AC4C37",'
 | 
			
		||||
  +#10'"^ '#9'c #C06450",'#10'"/ '#9'c #C16552",'#10'"( '#9'c #BD5F4C",'#10'"_ '
 | 
			
		||||
  +#9'c #7B2F1F",'#10'": '#9'c #0F0503",'#10'"< '#9'c #51271E",'#10'"[ '#9'c #A'
 | 
			
		||||
  +'56D61",'#10'"} '#9'c #C3877A",'#10'"| '#9'c #B97F73",'#10'"1 '#9'c #865044"'
 | 
			
		||||
  +','#10'"2 '#9'c #170A06",'#10'"3 '#9'c #25282C",'#10'"4 '#9'c #5F6267",'#10
 | 
			
		||||
  +'"5 '#9'c #43454A",'#10'"6 '#9'c #362F23",'#10'"7 '#9'c #766A5A",'#10'"8 '#9
 | 
			
		||||
  +'c #5B5143",'#10'"9 '#9'c #17130C",'#10'"0 '#9'c #53585F",'#10'"a '#9'c #C9C'
 | 
			
		||||
  +'BD0",'#10'"b '#9'c #CED0D5",'#10'"c '#9'c #C9CBD1",'#10'"d '#9'c #898D93",'
 | 
			
		||||
  +#10'"e '#9'c #1D2025",'#10'"f '#9'c #51644D",'#10'"g '#9'c #C5D2C2",'#10'"h '
 | 
			
		||||
  +#9'c #D2DECF",'#10'"i '#9'c #CCDAC9",'#10'"j '#9'c #96A891",'#10'"k '#9'c #1'
 | 
			
		||||
  +'E291B",'#10'"l '#9'c #2A2F39",'#10'"m '#9'c #888D97",'#10'"n '#9'c #EFF0F1"'
 | 
			
		||||
  +','#10'"o '#9'c #B0B3BB",'#10'"p '#9'c #9499A3",'#10'"q '#9'c #8E939D",'#10
 | 
			
		||||
  +'"r '#9'c #414650",'#10'"s '#9'c #202F1F",'#10'"t '#9'c #8DA987",'#10'"u '#9
 | 
			
		||||
  +'c #E8EFE7",'#10'"v '#9'c #BBCEB7",'#10'"w '#9'c #9CB796",'#10'"x '#9'c #9BB'
 | 
			
		||||
  +'795",'#10'"y '#9'c #4A6844",'#10'"z '#9'c #2A303B",'#10'"A '#9'c #575F6F",'
 | 
			
		||||
  +#10'"B '#9'c #A6AAB3",'#10'"C '#9'c #686F7D",'#10'"D '#9'c #525A6B",'#10'"E '
 | 
			
		||||
  +#9'c #51596A",'#10'"F '#9'c #404858",'#10'"G '#9'c #375335",'#10'"H '#9'c #6'
 | 
			
		||||
  +'58F5B",'#10'"I '#9'c #A6BFA1",'#10'"J '#9'c #779C6E",'#10'"K '#9'c #5F8B55"'
 | 
			
		||||
  +','#10'"L '#9'c #4B7441",'#10'"M '#9'c #1A2A17",'#10'"N '#9'c #282E39",'#10
 | 
			
		||||
  +'"O '#9'c #434C5E",'#10'"P '#9'c #3C4455",'#10'"Q '#9'c #365334",'#10'"R '#9
 | 
			
		||||
  +'c #518146",'#10'"S '#9'c #47713D",'#10'"T '#9'c #192816",'#10'"U '#9'c #1F2'
 | 
			
		||||
  +'42D",'#10'"V '#9'c #48505F",'#10'"W '#9'c #5D6474",'#10'"X '#9'c #5D6574",'
 | 
			
		||||
  +#10'"Y '#9'c #575F6E",'#10'"Z '#9'c #2D333F",'#10'"` '#9'c #1C2B1A",'#10'" .'
 | 
			
		||||
  +#9'c #55804B",'#10'"..'#9'c #68915E",'#10'"+.'#9'c #699260",'#10'"@.'#9'c #6'
 | 
			
		||||
  +'48E5B",'#10'"#.'#9'c #395C32",'#10'"$.'#9'c #090E07",'#10'"%.'#9'c #353A43"'
 | 
			
		||||
  +','#10'"&.'#9'c #868C97",'#10'"*.'#9'c #9398A2",'#10'"=.'#9'c #90959F",'#10
 | 
			
		||||
  +'"-.'#9'c #5E636E",'#10'";.'#9'c #111419",'#10'">.'#9'c #070B06",'#10'",.'#9
 | 
			
		||||
  +'c #395033",'#10'"''.'#9'c #89A783",'#10'").'#9'c #9BB695",'#10'"!.'#9'c #98'
 | 
			
		||||
  +'B491",'#10'"~.'#9'c #6B8964",'#10'"{.'#9'c #162414",'#10'"].'#9'c #17191E",'
 | 
			
		||||
  +#10'"^.'#9'c #31343B",'#10'"/.'#9'c #23262C",'#10'"(.'#9'c #070709",'#10'"_.'
 | 
			
		||||
  +#9'c #192517",'#10'":.'#9'c #364831",'#10'"<.'#9'c #293826",'#10'"[.'#9'c #0'
 | 
			
		||||
  +'90E08",'#10'"                                              ",'#10'"        '
 | 
			
		||||
  +'                                      ",'#10'"                             '
 | 
			
		||||
  +'                 ",'#10'"                                              ",'
 | 
			
		||||
  +#10'"                                              ",'#10'". . . . . . . . .'
 | 
			
		||||
  +' . . . . . . . . . . .       ",'#10'". + + + + + + + + + + + + + + + + + + '
 | 
			
		||||
  +'@       ",'#10'". + # # # + # # # + # # # + + + + + + @       ",'#10'". + #'
 | 
			
		||||
  +' # # + # # # + # # # + + + + + + @ $     ",'#10'". + # # # + # # # + # # # '
 | 
			
		||||
  +'+ + + + + + @ % &   ",'#10'". + + + + + + + + + + + + + + + + + + @ * =   "'
 | 
			
		||||
  +','#10'". @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ - ; > ",'#10'"              '
 | 
			
		||||
  +'                , '' ) ) ) '' ! ~ ",'#10'"                              { ]'
 | 
			
		||||
  +' ^ / / ( _ : ",'#10'"                                < [ } | 1 2   ",'#10'"'
 | 
			
		||||
  +'                    3 4 5         6 7 8 9     ",'#10'"                  0 a'
 | 
			
		||||
  +' b c d e   f g h i j k   ",'#10'"                l m n o p q r s t u v w x '
 | 
			
		||||
  +'y   ",'#10'"                z A B C D E F G H I J K K L M ",'#10'"         '
 | 
			
		||||
  +'       N O O O O O P Q R R R R R S T ",'#10'"                U V W X X Y Z '
 | 
			
		||||
  +'`  ...+.+.@.#.$.",'#10'"                  %.&.*.=.-.;.>.,.''.).!.~.{.  ",'
 | 
			
		||||
  +#10'"                    ].^./.(.      _.:.<.[.    "};'#10
 | 
			
		||||
]);
 | 
			
		||||
LazarusResources.Add('ttipropertygrid','XPM',[
 | 
			
		||||
  '/* XPM */'#10'static char * ttipropertygrid_xpm[] = {'#10'"23 23 243 2",'#10
 | 
			
		||||
  +'"  '#9'c None",'#10'". '#9'c #79797B",'#10'"+ '#9'c #7A797F",'#10'"@ '#9'c '
 | 
			
		||||
 | 
			
		||||
@ -1236,6 +1236,69 @@ Type
 | 
			
		||||
  end;
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  { TTICustomProgressBar }
 | 
			
		||||
 | 
			
		||||
  TTICustomProgressBar = class(TCustomProgressBar)
 | 
			
		||||
  private
 | 
			
		||||
    FLink: TPropertyLink;
 | 
			
		||||
    FUseRTTIMinMax: boolean;
 | 
			
		||||
    procedure SetLink(const AValue: TPropertyLink);
 | 
			
		||||
    procedure SetUseRTTIMinMax(const AValue: boolean);
 | 
			
		||||
  protected
 | 
			
		||||
    procedure LinkLoadFromProperty(Sender: TObject); virtual;
 | 
			
		||||
    procedure LinkSaveToProperty(Sender: TObject); virtual;
 | 
			
		||||
    procedure LinkEditorChanged(Sender: TObject); virtual;
 | 
			
		||||
    procedure GetRTTIMinMax; virtual;
 | 
			
		||||
  public
 | 
			
		||||
    constructor Create(TheOwner: TComponent); override;
 | 
			
		||||
    destructor Destroy; override;
 | 
			
		||||
    procedure Loaded; override;
 | 
			
		||||
    procedure EditingDone; override;
 | 
			
		||||
    property Link: TPropertyLink read FLink write SetLink;
 | 
			
		||||
    property UseRTTIMinMax: boolean read FUseRTTIMinMax write SetUseRTTIMinMax default true;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  { TTIProgressBar }
 | 
			
		||||
 | 
			
		||||
  TTIProgressBar = class(TTICustomProgressBar)
 | 
			
		||||
  published
 | 
			
		||||
    property Align;
 | 
			
		||||
    property Anchors;
 | 
			
		||||
    property BorderSpacing;
 | 
			
		||||
    property BorderWidth;
 | 
			
		||||
    property Constraints;
 | 
			
		||||
    property DragCursor;
 | 
			
		||||
    property DragKind;
 | 
			
		||||
    property DragMode;
 | 
			
		||||
    property Enabled;
 | 
			
		||||
    property Hint;
 | 
			
		||||
    property Max;
 | 
			
		||||
    property Min;
 | 
			
		||||
    property OnDragDrop;
 | 
			
		||||
    property OnDragOver;
 | 
			
		||||
    property OnEndDrag;
 | 
			
		||||
    property OnEnter;
 | 
			
		||||
    property OnExit;
 | 
			
		||||
    property OnMouseDown;
 | 
			
		||||
    property OnMouseMove;
 | 
			
		||||
    property OnMouseUp;
 | 
			
		||||
    property OnStartDock;
 | 
			
		||||
    property OnStartDrag;
 | 
			
		||||
    property Orientation;
 | 
			
		||||
    property ParentShowHint;
 | 
			
		||||
    property PopupMenu;
 | 
			
		||||
    property Position;
 | 
			
		||||
    property ShowHint;
 | 
			
		||||
    property Smooth;
 | 
			
		||||
    property Step;
 | 
			
		||||
    property TabOrder;
 | 
			
		||||
    property TabStop;
 | 
			
		||||
    property Visible;
 | 
			
		||||
    property BarShowText;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  { TTICustomColorButton }
 | 
			
		||||
 | 
			
		||||
  TTICustomColorButton = class(TColorButton)
 | 
			
		||||
@ -1349,7 +1412,8 @@ begin
 | 
			
		||||
  RegisterComponents('RTTI',[TTIEdit,TTIComboBox,TTIButton,TTICheckBox,
 | 
			
		||||
    TTILabel,TTIGroupBox,TTIRadioGroup,TTICheckGroup,TTICheckListBox,
 | 
			
		||||
    TTIListBox,TTIMemo,TTICalendar,TTIImage,TTISpinEdit,TTITrackBar,
 | 
			
		||||
    TTIMaskEdit,TTIColorButton,TTIPropertyGrid,TMultiPropertyLink]);
 | 
			
		||||
    TTIProgressBar,TTIMaskEdit,TTIColorButton,TTIPropertyGrid,
 | 
			
		||||
    TMultiPropertyLink]);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{ TAliasStrings }
 | 
			
		||||
@ -3565,6 +3629,114 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{ TTICustomProgressBar }
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.SetLink(const AValue: TPropertyLink);
 | 
			
		||||
begin
 | 
			
		||||
  if FLink=AValue then exit;
 | 
			
		||||
  FLink.Assign(AValue);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.SetUseRTTIMinMax(const AValue: boolean);
 | 
			
		||||
begin
 | 
			
		||||
  if FUseRTTIMinMax=AValue then exit;
 | 
			
		||||
  FUseRTTIMinMax:=AValue;
 | 
			
		||||
  if UseRTTIMinMax then GetRTTIMinMax;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.LinkLoadFromProperty(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if Sender=nil then ;
 | 
			
		||||
  if (FLink.Editor=nil) then exit;
 | 
			
		||||
  try
 | 
			
		||||
    Position:=StrToInt(FLink.GetAsText);
 | 
			
		||||
  except
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.LinkSaveToProperty(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if Sender=nil then ;
 | 
			
		||||
  if (FLink.Editor=nil) then exit;
 | 
			
		||||
  FLink.SetAsText(IntToStr(Position));
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.LinkEditorChanged(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if Sender=nil then ;
 | 
			
		||||
  if UseRTTIMinMax then GetRTTIMinMax;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.GetRTTIMinMax;
 | 
			
		||||
var
 | 
			
		||||
  TypeData: PTypeData;
 | 
			
		||||
  PropKind: TTypeKind;
 | 
			
		||||
  OldLinkSaveEnabled: Boolean;
 | 
			
		||||
  i: Integer;
 | 
			
		||||
begin
 | 
			
		||||
  if FLink.Editor=nil then exit;
 | 
			
		||||
  OldLinkSaveEnabled:=FLink.SaveEnabled;
 | 
			
		||||
  FLink.SaveEnabled:=false;
 | 
			
		||||
  try
 | 
			
		||||
    PropKind:=FLink.Editor.GetPropType^.Kind;
 | 
			
		||||
    case PropKind of
 | 
			
		||||
 | 
			
		||||
    tkInteger,tkChar,tkEnumeration,tkWChar:
 | 
			
		||||
      begin
 | 
			
		||||
        TypeData:=GetTypeData(FLink.Editor.GetPropType);
 | 
			
		||||
        Min:=TypeData^.MinValue;
 | 
			
		||||
        Max:=TypeData^.MaxValue;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
    else
 | 
			
		||||
      begin
 | 
			
		||||
        try
 | 
			
		||||
          i:=StrToInt(FLink.GetAsText);
 | 
			
		||||
        except
 | 
			
		||||
        end;
 | 
			
		||||
        if i<Min then Min:=i;
 | 
			
		||||
        if i>Max then Max:=i;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    FLink.SaveEnabled:=OldLinkSaveEnabled;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
constructor TTICustomProgressBar.Create(TheOwner: TComponent);
 | 
			
		||||
begin
 | 
			
		||||
  inherited Create(TheOwner);
 | 
			
		||||
  FUseRTTIMinMax:=true;
 | 
			
		||||
  FLink:=TPropertyLink.Create(Self);
 | 
			
		||||
  FLink.Filter:=[{tkUnknown,}tkInteger,{tkChar,tkEnumeration,}
 | 
			
		||||
                 tkFloat,{tkSet,tkMethod,}tkSString,tkLString,tkAString,
 | 
			
		||||
                 tkWString{,tkVariant,tkArray,tkRecord,tkInterface,}
 | 
			
		||||
                 {tkClass,tkObject,tkWChar,tkBool,tkInt64,}
 | 
			
		||||
                 {tkQWord,tkDynArray,tkInterfaceRaw}];
 | 
			
		||||
  FLink.OnLoadFromProperty:=@LinkLoadFromProperty;
 | 
			
		||||
  FLink.OnSaveToProperty:=@LinkSaveToProperty;
 | 
			
		||||
  FLink.OnEditorChanged:=@LinkEditorChanged;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
destructor TTICustomProgressBar.Destroy;
 | 
			
		||||
begin
 | 
			
		||||
  FreeThenNil(FLink);
 | 
			
		||||
  inherited Destroy;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.Loaded;
 | 
			
		||||
begin
 | 
			
		||||
  inherited Loaded;
 | 
			
		||||
  FLink.LoadFromProperty;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TTICustomProgressBar.EditingDone;
 | 
			
		||||
begin
 | 
			
		||||
  inherited EditingDone;
 | 
			
		||||
  FLink.EditingDone;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
initialization
 | 
			
		||||
  {$I rttictrls.lrs}
 | 
			
		||||
  // TPropertyLink
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										145
									
								
								components/rtticontrols/ttiprogressbar.xpm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								components/rtticontrols/ttiprogressbar.xpm
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,145 @@
 | 
			
		||||
/* XPM */
 | 
			
		||||
static char * ttiprogressbar_xpm[] = {
 | 
			
		||||
"23 23 119 2",
 | 
			
		||||
"  	c None",
 | 
			
		||||
". 	c #808080",
 | 
			
		||||
"+ 	c #C0C0C0",
 | 
			
		||||
"@ 	c #FFFFFF",
 | 
			
		||||
"# 	c #AE0013",
 | 
			
		||||
"$ 	c #4F3732",
 | 
			
		||||
"% 	c #C3988E",
 | 
			
		||||
"& 	c #4B251C",
 | 
			
		||||
"* 	c #CC8170",
 | 
			
		||||
"= 	c #934737",
 | 
			
		||||
"- 	c #B84F39",
 | 
			
		||||
"; 	c #A03F2A",
 | 
			
		||||
"> 	c #3C160E",
 | 
			
		||||
", 	c #6E291A",
 | 
			
		||||
"' 	c #B4452D",
 | 
			
		||||
") 	c #B4452E",
 | 
			
		||||
"! 	c #9A3A25",
 | 
			
		||||
"~ 	c #31120C",
 | 
			
		||||
"{ 	c #441910",
 | 
			
		||||
"] 	c #AC4C37",
 | 
			
		||||
"^ 	c #C06450",
 | 
			
		||||
"/ 	c #C16552",
 | 
			
		||||
"( 	c #BD5F4C",
 | 
			
		||||
"_ 	c #7B2F1F",
 | 
			
		||||
": 	c #0F0503",
 | 
			
		||||
"< 	c #51271E",
 | 
			
		||||
"[ 	c #A56D61",
 | 
			
		||||
"} 	c #C3877A",
 | 
			
		||||
"| 	c #B97F73",
 | 
			
		||||
"1 	c #865044",
 | 
			
		||||
"2 	c #170A06",
 | 
			
		||||
"3 	c #25282C",
 | 
			
		||||
"4 	c #5F6267",
 | 
			
		||||
"5 	c #43454A",
 | 
			
		||||
"6 	c #362F23",
 | 
			
		||||
"7 	c #766A5A",
 | 
			
		||||
"8 	c #5B5143",
 | 
			
		||||
"9 	c #17130C",
 | 
			
		||||
"0 	c #53585F",
 | 
			
		||||
"a 	c #C9CBD0",
 | 
			
		||||
"b 	c #CED0D5",
 | 
			
		||||
"c 	c #C9CBD1",
 | 
			
		||||
"d 	c #898D93",
 | 
			
		||||
"e 	c #1D2025",
 | 
			
		||||
"f 	c #51644D",
 | 
			
		||||
"g 	c #C5D2C2",
 | 
			
		||||
"h 	c #D2DECF",
 | 
			
		||||
"i 	c #CCDAC9",
 | 
			
		||||
"j 	c #96A891",
 | 
			
		||||
"k 	c #1E291B",
 | 
			
		||||
"l 	c #2A2F39",
 | 
			
		||||
"m 	c #888D97",
 | 
			
		||||
"n 	c #EFF0F1",
 | 
			
		||||
"o 	c #B0B3BB",
 | 
			
		||||
"p 	c #9499A3",
 | 
			
		||||
"q 	c #8E939D",
 | 
			
		||||
"r 	c #414650",
 | 
			
		||||
"s 	c #202F1F",
 | 
			
		||||
"t 	c #8DA987",
 | 
			
		||||
"u 	c #E8EFE7",
 | 
			
		||||
"v 	c #BBCEB7",
 | 
			
		||||
"w 	c #9CB796",
 | 
			
		||||
"x 	c #9BB795",
 | 
			
		||||
"y 	c #4A6844",
 | 
			
		||||
"z 	c #2A303B",
 | 
			
		||||
"A 	c #575F6F",
 | 
			
		||||
"B 	c #A6AAB3",
 | 
			
		||||
"C 	c #686F7D",
 | 
			
		||||
"D 	c #525A6B",
 | 
			
		||||
"E 	c #51596A",
 | 
			
		||||
"F 	c #404858",
 | 
			
		||||
"G 	c #375335",
 | 
			
		||||
"H 	c #658F5B",
 | 
			
		||||
"I 	c #A6BFA1",
 | 
			
		||||
"J 	c #779C6E",
 | 
			
		||||
"K 	c #5F8B55",
 | 
			
		||||
"L 	c #4B7441",
 | 
			
		||||
"M 	c #1A2A17",
 | 
			
		||||
"N 	c #282E39",
 | 
			
		||||
"O 	c #434C5E",
 | 
			
		||||
"P 	c #3C4455",
 | 
			
		||||
"Q 	c #365334",
 | 
			
		||||
"R 	c #518146",
 | 
			
		||||
"S 	c #47713D",
 | 
			
		||||
"T 	c #192816",
 | 
			
		||||
"U 	c #1F242D",
 | 
			
		||||
"V 	c #48505F",
 | 
			
		||||
"W 	c #5D6474",
 | 
			
		||||
"X 	c #5D6574",
 | 
			
		||||
"Y 	c #575F6E",
 | 
			
		||||
"Z 	c #2D333F",
 | 
			
		||||
"` 	c #1C2B1A",
 | 
			
		||||
" .	c #55804B",
 | 
			
		||||
"..	c #68915E",
 | 
			
		||||
"+.	c #699260",
 | 
			
		||||
"@.	c #648E5B",
 | 
			
		||||
"#.	c #395C32",
 | 
			
		||||
"$.	c #090E07",
 | 
			
		||||
"%.	c #353A43",
 | 
			
		||||
"&.	c #868C97",
 | 
			
		||||
"*.	c #9398A2",
 | 
			
		||||
"=.	c #90959F",
 | 
			
		||||
"-.	c #5E636E",
 | 
			
		||||
";.	c #111419",
 | 
			
		||||
">.	c #070B06",
 | 
			
		||||
",.	c #395033",
 | 
			
		||||
"'.	c #89A783",
 | 
			
		||||
").	c #9BB695",
 | 
			
		||||
"!.	c #98B491",
 | 
			
		||||
"~.	c #6B8964",
 | 
			
		||||
"{.	c #162414",
 | 
			
		||||
"].	c #17191E",
 | 
			
		||||
"^.	c #31343B",
 | 
			
		||||
"/.	c #23262C",
 | 
			
		||||
"(.	c #070709",
 | 
			
		||||
"_.	c #192517",
 | 
			
		||||
":.	c #364831",
 | 
			
		||||
"<.	c #293826",
 | 
			
		||||
"[.	c #090E08",
 | 
			
		||||
"                                              ",
 | 
			
		||||
"                                              ",
 | 
			
		||||
"                                              ",
 | 
			
		||||
"                                              ",
 | 
			
		||||
"                                              ",
 | 
			
		||||
". . . . . . . . . . . . . . . . . . . .       ",
 | 
			
		||||
". + + + + + + + + + + + + + + + + + + @       ",
 | 
			
		||||
". + # # # + # # # + # # # + + + + + + @       ",
 | 
			
		||||
". + # # # + # # # + # # # + + + + + + @ $     ",
 | 
			
		||||
". + # # # + # # # + # # # + + + + + + @ % &   ",
 | 
			
		||||
". + + + + + + + + + + + + + + + + + + @ * =   ",
 | 
			
		||||
". @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ - ; > ",
 | 
			
		||||
"                              , ' ) ) ) ' ! ~ ",
 | 
			
		||||
"                              { ] ^ / / ( _ : ",
 | 
			
		||||
"                                < [ } | 1 2   ",
 | 
			
		||||
"                    3 4 5         6 7 8 9     ",
 | 
			
		||||
"                  0 a b c d e   f g h i j k   ",
 | 
			
		||||
"                l m n o p q r s t u v w x y   ",
 | 
			
		||||
"                z A B C D E F G H I J K K L M ",
 | 
			
		||||
"                N O O O O O P Q R R R R R S T ",
 | 
			
		||||
"                U V W X X Y Z `  ...+.+.@.#.$.",
 | 
			
		||||
"                  %.&.*.=.-.;.>.,.'.).!.~.{.  ",
 | 
			
		||||
"                    ].^./.(.      _.:.<.[.    "};
 | 
			
		||||
@ -6952,7 +6952,7 @@ begin
 | 
			
		||||
    if Result<>mrOk then exit;
 | 
			
		||||
  end;
 | 
			
		||||
  // rename files (.pas,.dfm) lowercase
 | 
			
		||||
  // TODO: rename if files in project
 | 
			
		||||
  // TODO: rename files in project
 | 
			
		||||
  DebugLn('TMainIDE.DoConvertDelphiUnit Rename files');
 | 
			
		||||
  LazarusUnitFilename:='';
 | 
			
		||||
  LFMFilename:='';
 | 
			
		||||
@ -7086,8 +7086,9 @@ begin
 | 
			
		||||
    end;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  // TODO: get all compiler options from .dpr
 | 
			
		||||
  // TODO: read .dof file
 | 
			
		||||
  // TODO: get all compiler options (Flags)
 | 
			
		||||
  // TODO: read .cfg file
 | 
			
		||||
  // TODO: get all search paths
 | 
			
		||||
  // TODO: get all needed packages
 | 
			
		||||
 | 
			
		||||
@ -11274,6 +11275,9 @@ end.
 | 
			
		||||
 | 
			
		||||
{ =============================================================================
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.817  2005/01/01 18:56:46  mattias
 | 
			
		||||
  implemented TTIProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.816  2005/01/01 17:02:53  mattias
 | 
			
		||||
  changed default online help paths to lazarus-ccr
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -24,7 +24,7 @@
 | 
			
		||||
}
 | 
			
		||||
{
 | 
			
		||||
@abstract(Just a try to provide the same objects as the Delphi comctrls unit)
 | 
			
		||||
@author(TProgressBar - Stefan Hille <stoppok@osibisa.ms.sub.org>)
 | 
			
		||||
@author(TCustomProgressBar - Stefan Hille <stoppok@osibisa.ms.sub.org>)
 | 
			
		||||
@author(TTrackBar - Stefan Hille <stoppok@osibisa.ms.sub.org>)
 | 
			
		||||
@created(1999)
 | 
			
		||||
@lastmod(1999)
 | 
			
		||||
@ -860,13 +860,13 @@ type
 | 
			
		||||
 | 
			
		||||
  TProgressBarOrientation = (pbHorizontal, pbVertical, pbRightToLeft, pbTopDown);
 | 
			
		||||
 | 
			
		||||
  { TProgressBar }
 | 
			
		||||
  { TCustomProgressBar }
 | 
			
		||||
  {
 | 
			
		||||
    @abstract(Simple progressbar.)
 | 
			
		||||
    Introduced by Author Name <stoppok@osibisa.ms.sub.org>
 | 
			
		||||
    Currently maintained by Maintainer Name <stoppok@osibisa.ms.sub.org>
 | 
			
		||||
  }
 | 
			
		||||
  TProgressBar = class(TWinControl)
 | 
			
		||||
  TCustomProgressBar = class(TWinControl)
 | 
			
		||||
  private
 | 
			
		||||
    FMin              : Integer;
 | 
			
		||||
    FMax              : Integer;
 | 
			
		||||
@ -895,6 +895,20 @@ type
 | 
			
		||||
    constructor Create(AOwner: TComponent); override;
 | 
			
		||||
    procedure StepIt;
 | 
			
		||||
    procedure StepBy(Delta: Integer);
 | 
			
		||||
  public
 | 
			
		||||
    property Max: Integer read GetMax write SetMax;
 | 
			
		||||
    property Min: Integer read GetMin write SetMin;
 | 
			
		||||
    property Orientation: TProgressBarOrientation read FOrientation write SetOrientation default pbHorizontal;
 | 
			
		||||
    property Position: Integer read GetPosition write SetPosition default 0;
 | 
			
		||||
    property Smooth : boolean read FSmooth write SetSmooth default false;
 | 
			
		||||
    property Step: Integer read FStep write SetStep default 10;
 | 
			
		||||
    property BarShowText : boolean read FBarShowText write SetBarShowText;
 | 
			
		||||
  end;
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
  { TProgressBar }
 | 
			
		||||
 
 | 
			
		||||
  TProgressBar = class(TCustomProgressBar)
 | 
			
		||||
  published
 | 
			
		||||
    property Align;
 | 
			
		||||
    property Anchors;
 | 
			
		||||
@ -906,8 +920,8 @@ type
 | 
			
		||||
    property DragMode;
 | 
			
		||||
    property Enabled;
 | 
			
		||||
    property Hint;
 | 
			
		||||
    property Max: Integer read GetMax write SetMax;
 | 
			
		||||
    property Min: Integer read GetMin write SetMin;
 | 
			
		||||
    property Max;
 | 
			
		||||
    property Min;
 | 
			
		||||
    property OnDragDrop;
 | 
			
		||||
    property OnDragOver;
 | 
			
		||||
    property OnEndDrag;
 | 
			
		||||
@ -918,28 +932,22 @@ type
 | 
			
		||||
    property OnMouseUp;
 | 
			
		||||
    property OnStartDock;
 | 
			
		||||
    property OnStartDrag;
 | 
			
		||||
    property Orientation: TProgressBarOrientation read FOrientation write SetOrientation default pbHorizontal;
 | 
			
		||||
    property Orientation;
 | 
			
		||||
    property ParentShowHint;
 | 
			
		||||
    property PopupMenu;
 | 
			
		||||
    property Position: Integer read GetPosition write SetPosition default 0;
 | 
			
		||||
    property Position;
 | 
			
		||||
    property ShowHint;
 | 
			
		||||
    property Smooth : boolean read FSmooth write SetSmooth default false;
 | 
			
		||||
    property Step: Integer read FStep write SetStep default 10;
 | 
			
		||||
    property Smooth;
 | 
			
		||||
    property Step;
 | 
			
		||||
    property TabOrder;
 | 
			
		||||
    property TabStop;
 | 
			
		||||
    property Visible;
 | 
			
		||||
{ ... to be implemented for Delphi compatibility
 | 
			
		||||
//    property Anchors;
 | 
			
		||||
//  property Constraints;
 | 
			
		||||
//  property OnStartDock;
 | 
			
		||||
//  property OnEndDock;
 | 
			
		||||
}
 | 
			
		||||
 published { additional functionality }
 | 
			
		||||
    property BarShowText : boolean read FBarShowText write SetBarShowText;
 | 
			
		||||
{   property BarTextFormat : string read FBarTextFormat write SetBarTextFormat; }
 | 
			
		||||
 end;
 | 
			
		||||
    property BarShowText;
 | 
			
		||||
  end;
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
{ TUpDown }
 | 
			
		||||
  { TUpDown }
 | 
			
		||||
  
 | 
			
		||||
  TUDAlignButton = (udLeft, udRight, udTop, udBottom);
 | 
			
		||||
  TUDOrientation = (udHorizontal, udVertical);
 | 
			
		||||
  TUDBtnType = (btNext, btPrev);
 | 
			
		||||
@ -2247,7 +2255,7 @@ end;
 | 
			
		||||
 | 
			
		||||
procedure Register;
 | 
			
		||||
begin
 | 
			
		||||
  RegisterComponents('Common Controls',[TTrackbar,TProgressBar,TTreeView,
 | 
			
		||||
  RegisterComponents('Common Controls',[TTrackbar,TCustomProgressBar,TTreeView,
 | 
			
		||||
    TListView,TStatusBar,TToolBar,TUpDown,TPageControl,TTabControl]);
 | 
			
		||||
  RegisterNoIcon([TToolButton,TTabSheet]);
 | 
			
		||||
end;
 | 
			
		||||
@ -2276,6 +2284,9 @@ end.
 | 
			
		||||
{ =============================================================================
 | 
			
		||||
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.154  2005/01/01 18:56:47  mattias
 | 
			
		||||
  implemented TTIProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.153  2004/12/27 19:40:59  mattias
 | 
			
		||||
  published BorderSpacing for many controls
 | 
			
		||||
 | 
			
		||||
@ -2504,7 +2515,7 @@ end.
 | 
			
		||||
  started TTabSheet and TPageControl
 | 
			
		||||
 | 
			
		||||
  Revision 1.80  2003/06/25 21:02:19  mattias
 | 
			
		||||
  reduced TProgressBar setproperties calls
 | 
			
		||||
  reduced TCustomProgressBar setproperties calls
 | 
			
		||||
 | 
			
		||||
  Revision 1.79  2003/06/19 16:36:35  mattias
 | 
			
		||||
  started codeexplorer
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{%MainUnit ../comctrls.pp}
 | 
			
		||||
{******************************************************************************
 | 
			
		||||
                                  TProgressBar
 | 
			
		||||
                                  TCustomProgressBar
 | 
			
		||||
 ******************************************************************************
 | 
			
		||||
 | 
			
		||||
 *****************************************************************************
 | 
			
		||||
@ -34,13 +34,13 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.Create
 | 
			
		||||
  Method: TCustomProgressBar.Create
 | 
			
		||||
  Params:  AOwner: the owner of the class
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Constructor for the progressbar.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
constructor TProgressBar.Create (AOwner : TComponent);
 | 
			
		||||
constructor TCustomProgressBar.Create (AOwner : TComponent);
 | 
			
		||||
begin
 | 
			
		||||
  inherited Create(AOwner);
 | 
			
		||||
  fCompStyle := csProgressBar;
 | 
			
		||||
@ -56,69 +56,69 @@ begin
 | 
			
		||||
end;   
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.InitializeWnd
 | 
			
		||||
  Method: TCustomProgressBar.InitializeWnd
 | 
			
		||||
  Params: none
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set all properties after visual component has been created. Will be called
 | 
			
		||||
  from TWinControl.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.InitializeWnd;
 | 
			
		||||
procedure TCustomProgressBar.InitializeWnd;
 | 
			
		||||
begin
 | 
			
		||||
  inherited InitializeWnd;
 | 
			
		||||
  ApplyChanges;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TProgressBar.Loaded;
 | 
			
		||||
procedure TCustomProgressBar.Loaded;
 | 
			
		||||
begin
 | 
			
		||||
  inherited Loaded;
 | 
			
		||||
  ApplyChanges;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.GetMin
 | 
			
		||||
  Method: TCustomProgressBar.GetMin
 | 
			
		||||
  Params:  Nothing
 | 
			
		||||
  Returns: actual minimum value of the progressbar
 | 
			
		||||
 | 
			
		||||
  Retrieve the actual minimum value of the progressbar.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
function TProgressBar.GetMin: Integer;
 | 
			
		||||
function TCustomProgressBar.GetMin: Integer;
 | 
			
		||||
begin
 | 
			
		||||
  Result := FMin;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.GetMax
 | 
			
		||||
  Method: TCustomProgressBar.GetMax
 | 
			
		||||
  Params:  Nothing
 | 
			
		||||
  Returns: actual maximum value of the progressbar
 | 
			
		||||
 | 
			
		||||
  Retrieve the actual maximum value of the progressbar.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
function TProgressBar.GetMax: Integer;
 | 
			
		||||
function TCustomProgressBar.GetMax: Integer;
 | 
			
		||||
begin
 | 
			
		||||
  Result := FMax;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.GetPosition
 | 
			
		||||
  Method: TCustomProgressBar.GetPosition
 | 
			
		||||
  Params:  Nothing
 | 
			
		||||
  Returns: actual position of the progressbar
 | 
			
		||||
 | 
			
		||||
  Retrieve the position of the progressbar.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
function TProgressBar.GetPosition: Integer;
 | 
			
		||||
function TCustomProgressBar.GetPosition: Integer;
 | 
			
		||||
begin
 | 
			
		||||
  Result := FPosition;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetParams
 | 
			
		||||
  Method: TCustomProgressBar.SetParams
 | 
			
		||||
  Params:  Min & Max for the progressbar
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set new minimum and maximum values for the progressbar.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetParams(AMin, AMax: Integer);
 | 
			
		||||
procedure TCustomProgressBar.SetParams(AMin, AMax: Integer);
 | 
			
		||||
begin
 | 
			
		||||
  SetMax(AMax);
 | 
			
		||||
  SetMin(AMin);
 | 
			
		||||
@ -126,13 +126,13 @@ end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetMin
 | 
			
		||||
  Method: TCustomProgressBar.SetMin
 | 
			
		||||
  Params:  Minimum value for the progressbar
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set new minimum value for the progressbar.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetMin(Value: Integer);
 | 
			
		||||
procedure TCustomProgressBar.SetMin(Value: Integer);
 | 
			
		||||
begin
 | 
			
		||||
  if FMin <> Value then
 | 
			
		||||
  begin
 | 
			
		||||
@ -143,13 +143,13 @@ end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetMax
 | 
			
		||||
  Method: TCustomProgressBar.SetMax
 | 
			
		||||
  Params:  Maximum value for the progressbar
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set new maximum value for the progressbar.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetMax(Value: Integer);
 | 
			
		||||
procedure TCustomProgressBar.SetMax(Value: Integer);
 | 
			
		||||
begin
 | 
			
		||||
  if FMax <> Value then
 | 
			
		||||
  begin
 | 
			
		||||
@ -159,13 +159,13 @@ begin
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetPosition
 | 
			
		||||
  Method: TCustomProgressBar.SetPosition
 | 
			
		||||
  Params:  New acutal position for the progressbar
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set new new acutal position for the progressbar
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetPosition(Value: Integer);
 | 
			
		||||
procedure TCustomProgressBar.SetPosition(Value: Integer);
 | 
			
		||||
begin
 | 
			
		||||
  if FPosition <> Value then
 | 
			
		||||
  begin
 | 
			
		||||
@ -176,13 +176,13 @@ end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetPosition
 | 
			
		||||
  Method: TCustomProgressBar.SetPosition
 | 
			
		||||
  Params:  New stepping value for the progressbar
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set new stepping value for the progressbar
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetStep(Value: Integer);
 | 
			
		||||
procedure TCustomProgressBar.SetStep(Value: Integer);
 | 
			
		||||
begin
 | 
			
		||||
  if FStep <> Value then
 | 
			
		||||
  begin
 | 
			
		||||
@ -192,13 +192,13 @@ begin
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetPosition
 | 
			
		||||
  Method: TCustomProgressBar.SetPosition
 | 
			
		||||
  Params:  New orientation of the progressbar
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set new orientation.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetOrientation (Value : TProgressBarOrientation);
 | 
			
		||||
procedure TCustomProgressBar.SetOrientation (Value : TProgressBarOrientation);
 | 
			
		||||
begin
 | 
			
		||||
  if FOrientation <> Value then
 | 
			
		||||
  begin
 | 
			
		||||
@ -208,13 +208,13 @@ begin
 | 
			
		||||
end;
 | 
			
		||||
 
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.StepIt
 | 
			
		||||
  Method: TCustomProgressBar.StepIt
 | 
			
		||||
  Params:  Nothing
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Let the progressbar proceed from actual position to actualposition + Step
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.StepIt;
 | 
			
		||||
procedure TCustomProgressBar.StepIt;
 | 
			
		||||
begin
 | 
			
		||||
  inc (FPosition, FStep);
 | 
			
		||||
  if FPosition > FMax then FPosition := FMax;
 | 
			
		||||
@ -224,7 +224,7 @@ end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.StepIt
 | 
			
		||||
  Method: TCustomProgressBar.StepIt
 | 
			
		||||
  Params:  Delta : the value to add to actual position
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
@ -234,7 +234,7 @@ end;
 | 
			
		||||
   StepBy is realized by faking the current position to get a solution
 | 
			
		||||
   which is independant from the widget set in use.
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.StepBy(Delta: Integer);
 | 
			
		||||
procedure TCustomProgressBar.StepBy(Delta: Integer);
 | 
			
		||||
begin
 | 
			
		||||
  if FStep < Delta then FPosition := FPosition + (Delta - FStep);
 | 
			
		||||
  if FStep > Delta then FPosition := FPosition - (Delta);
 | 
			
		||||
@ -242,13 +242,13 @@ begin
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.ApplyChanges
 | 
			
		||||
  Method: TCustomProgressBar.ApplyChanges
 | 
			
		||||
  Params:  Nothing
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Apply the current parameters to the object
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.ApplyChanges;
 | 
			
		||||
procedure TCustomProgressBar.ApplyChanges;
 | 
			
		||||
begin
 | 
			
		||||
  if not (csLoading in ComponentState) then begin
 | 
			
		||||
    if FMin>Max then FMin:=Max;
 | 
			
		||||
@ -262,13 +262,13 @@ end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetSmooth
 | 
			
		||||
  Method: TCustomProgressBar.SetSmooth
 | 
			
		||||
  Params:  Value : Smoothing on or off
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
  Set the style of the progressbar
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetSmooth (Value : boolean);
 | 
			
		||||
procedure TCustomProgressBar.SetSmooth (Value : boolean);
 | 
			
		||||
begin
 | 
			
		||||
  if FSmooth <> value then
 | 
			
		||||
  begin
 | 
			
		||||
@ -279,7 +279,7 @@ end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{------------------------------------------------------------------------------
 | 
			
		||||
  Method: TProgressBar.SetBarShowText
 | 
			
		||||
  Method: TCustomProgressBar.SetBarShowText
 | 
			
		||||
  Params:  Value : ShowText on or off
 | 
			
		||||
  Returns: Nothing
 | 
			
		||||
 | 
			
		||||
@ -289,7 +289,7 @@ end;
 | 
			
		||||
  Implementation detail:
 | 
			
		||||
   This functionality is not Delphi-compatible
 | 
			
		||||
 ------------------------------------------------------------------------------}
 | 
			
		||||
procedure TProgressBar.SetBarShowText (Value : boolean);
 | 
			
		||||
procedure TCustomProgressBar.SetBarShowText (Value : boolean);
 | 
			
		||||
begin
 | 
			
		||||
  if FBarShowText <> Value then
 | 
			
		||||
  begin
 | 
			
		||||
@ -302,14 +302,17 @@ end;
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.12  2005/01/01 18:56:47  mattias
 | 
			
		||||
  implemented TTIProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.11  2004/12/12 03:54:09  mattias
 | 
			
		||||
  implemented open project after open standard windows
 | 
			
		||||
 | 
			
		||||
  Revision 1.10  2004/09/23 14:50:47  micha
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TProgressBar
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TCustomProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.9  2004/09/21 10:05:26  mattias
 | 
			
		||||
  fixed disable at designtime and bounding TProgressBar position
 | 
			
		||||
  fixed disable at designtime and bounding TCustomProgressBar position
 | 
			
		||||
 | 
			
		||||
  Revision 1.8  2004/09/19 18:50:28  micha
 | 
			
		||||
  convert LM_SETVALUE message to interface methods
 | 
			
		||||
@ -321,7 +324,7 @@ end;
 | 
			
		||||
  revert intf split
 | 
			
		||||
 | 
			
		||||
  Revision 1.4  2003/06/25 21:02:20  mattias
 | 
			
		||||
  reduced TProgressBar setproperties calls
 | 
			
		||||
  reduced TCustomProgressBar setproperties calls
 | 
			
		||||
 | 
			
		||||
  Revision 1.3  2002/05/10 06:05:55  lazarus
 | 
			
		||||
  MG: changed license to LGPL
 | 
			
		||||
 | 
			
		||||
@ -4184,6 +4184,9 @@ end;
 | 
			
		||||
{ =============================================================================
 | 
			
		||||
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.293  2005/01/01 18:56:47  mattias
 | 
			
		||||
  implemented TTIProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.292  2004/12/01 16:17:17  mattias
 | 
			
		||||
  updated fpdoc sceletons for lcl and gtk intf
 | 
			
		||||
 | 
			
		||||
@ -4223,7 +4226,7 @@ end;
 | 
			
		||||
  convert LM_SETGEOMETRY message to interface method
 | 
			
		||||
 | 
			
		||||
  Revision 1.280  2004/09/21 10:05:26  mattias
 | 
			
		||||
  fixed disable at designtime and bounding TProgressBar position
 | 
			
		||||
  fixed disable at designtime and bounding TCustomProgressBar position
 | 
			
		||||
 | 
			
		||||
  Revision 1.279  2004/09/18 12:43:15  micha
 | 
			
		||||
  convert LM_DESTROY message to interface methods
 | 
			
		||||
 | 
			
		||||
@ -2931,6 +2931,9 @@ end;
 | 
			
		||||
{ =============================================================================
 | 
			
		||||
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.255  2005/01/01 18:56:47  mattias
 | 
			
		||||
  implemented TTIProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.254  2004/12/21 22:49:29  mattias
 | 
			
		||||
  implemented scrollbar codes for gtk intf  from Jesus
 | 
			
		||||
 | 
			
		||||
@ -2950,7 +2953,7 @@ end;
 | 
			
		||||
  calling updating notebook tab after realize, needed for close btns
 | 
			
		||||
 | 
			
		||||
  Revision 1.248  2004/09/21 10:05:26  mattias
 | 
			
		||||
  fixed disable at designtime and bounding TProgressBar position
 | 
			
		||||
  fixed disable at designtime and bounding TCustomProgressBar position
 | 
			
		||||
 | 
			
		||||
  Revision 1.247  2004/09/10 16:28:50  mattias
 | 
			
		||||
  implemented very rudimentary TTabControl
 | 
			
		||||
 | 
			
		||||
@ -5300,7 +5300,7 @@ begin
 | 
			
		||||
    P:=CreateSimpleClientAreaWidget(Sender,true);
 | 
			
		||||
 | 
			
		||||
  csProgressBar:
 | 
			
		||||
    with (TProgressBar (Sender)) do
 | 
			
		||||
    with (TCustomProgressBar (Sender)) do
 | 
			
		||||
    begin
 | 
			
		||||
       { Create a GtkAdjustment object to hold the range of the progress bar }
 | 
			
		||||
       TempWidget := PGtkWidget( gtk_adjustment_new (Position, Min, Max, 0, 0, 0));
 | 
			
		||||
@ -6944,6 +6944,9 @@ end;
 | 
			
		||||
 { =============================================================================
 | 
			
		||||
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.612  2005/01/01 18:56:47  mattias
 | 
			
		||||
  implemented TTIProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.611  2004/12/18 23:46:16  mattias
 | 
			
		||||
  added resurce strings for gtk file dlg
 | 
			
		||||
 | 
			
		||||
@ -6999,7 +7002,7 @@ end;
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TScrollBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.594  2004/09/23 14:50:47  micha
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TProgressBar
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TCustomProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.593  2004/09/22 18:06:32  micha
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface methods for TCustomListView
 | 
			
		||||
@ -7014,7 +7017,7 @@ end;
 | 
			
		||||
  convert LM_SETPROPERTIES to interface methods for TCustomEdit
 | 
			
		||||
 | 
			
		||||
  Revision 1.589  2004/09/21 10:05:26  mattias
 | 
			
		||||
  fixed disable at designtime and bounding TProgressBar position
 | 
			
		||||
  fixed disable at designtime and bounding TCustomProgressBar position
 | 
			
		||||
 | 
			
		||||
  Revision 1.588  2004/09/20 21:01:04  micha
 | 
			
		||||
  convert LM_SETPROPERTIES to interface methods for TCustomComboBox
 | 
			
		||||
 | 
			
		||||
@ -115,8 +115,8 @@ type
 | 
			
		||||
  private
 | 
			
		||||
  protected
 | 
			
		||||
  public
 | 
			
		||||
    class procedure ApplyChanges(const AProgressBar: TProgressBar); override;
 | 
			
		||||
    class procedure SetPosition(const AProgressBar: TProgressBar; const NewPosition: integer); override;
 | 
			
		||||
    class procedure ApplyChanges(const AProgressBar: TCustomProgressBar); override;
 | 
			
		||||
    class procedure SetPosition(const AProgressBar: TCustomProgressBar; const NewPosition: integer); override;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  { TGtkWSCustomUpDown }
 | 
			
		||||
@ -886,7 +886,7 @@ end;
 | 
			
		||||
 | 
			
		||||
{ TGtkWSProgressBar }
 | 
			
		||||
 | 
			
		||||
procedure TGtkWSProgressBar.ApplyChanges(const AProgressBar: TProgressBar);
 | 
			
		||||
procedure TGtkWSProgressBar.ApplyChanges(const AProgressBar: TCustomProgressBar);
 | 
			
		||||
var
 | 
			
		||||
  wHandle: HWND;
 | 
			
		||||
begin
 | 
			
		||||
@ -924,7 +924,7 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TGtkWSProgressBar.SetPosition(const AProgressBar: TProgressBar; const NewPosition: integer);
 | 
			
		||||
procedure TGtkWSProgressBar.SetPosition(const AProgressBar: TCustomProgressBar; const NewPosition: integer);
 | 
			
		||||
begin
 | 
			
		||||
  gtk_progress_set_value(GTK_PROGRESS(Pointer(AProgressBar.Handle)), NewPosition);
 | 
			
		||||
end;
 | 
			
		||||
@ -1087,7 +1087,7 @@ initialization
 | 
			
		||||
//  RegisterWSComponent(TCustomPageControl, TGtkWSPageControl);
 | 
			
		||||
  RegisterWSComponent(TCustomListView, TGtkWSCustomListView);
 | 
			
		||||
//  RegisterWSComponent(TCustomListView, TGtkWSListView);
 | 
			
		||||
  RegisterWSComponent(TProgressBar, TGtkWSProgressBar);
 | 
			
		||||
  RegisterWSComponent(TCustomProgressBar, TGtkWSProgressBar);
 | 
			
		||||
//  RegisterWSComponent(TCustomUpDown, TGtkWSCustomUpDown);
 | 
			
		||||
//  RegisterWSComponent(TCustomUpDown, TGtkWSUpDown);
 | 
			
		||||
//  RegisterWSComponent(TCustomToolButton, TGtkWSToolButton);
 | 
			
		||||
 | 
			
		||||
@ -710,6 +710,9 @@ end;
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.303  2005/01/01 18:56:47  mattias
 | 
			
		||||
  implemented TTIProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.302  2004/12/27 10:18:21  micha
 | 
			
		||||
  implement support for tthread.synchronize
 | 
			
		||||
 | 
			
		||||
@ -775,7 +778,7 @@ end;
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TScrollBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.282  2004/09/23 14:50:47  micha
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TProgressBar
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface method for TCustomProgressBar
 | 
			
		||||
 | 
			
		||||
  Revision 1.281  2004/09/22 18:06:32  micha
 | 
			
		||||
  convert LM_SETPROPERTIES message to interface methods for TCustomListView
 | 
			
		||||
 | 
			
		||||
@ -116,8 +116,8 @@ type
 | 
			
		||||
  public
 | 
			
		||||
    class function  CreateHandle(const AWinControl: TWinControl;
 | 
			
		||||
          const AParams: TCreateParams): HWND; override;
 | 
			
		||||
    class procedure ApplyChanges(const AProgressBar: TProgressBar); override;
 | 
			
		||||
    class procedure SetPosition(const AProgressBar: TProgressBar; const NewPosition: integer); override;
 | 
			
		||||
    class procedure ApplyChanges(const AProgressBar: TCustomProgressBar); override;
 | 
			
		||||
    class procedure SetPosition(const AProgressBar: TCustomProgressBar; const NewPosition: integer); override;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  { TWin32WSCustomUpDown }
 | 
			
		||||
@ -667,7 +667,7 @@ begin
 | 
			
		||||
  // customization of Params
 | 
			
		||||
  with Params do
 | 
			
		||||
  begin
 | 
			
		||||
    with TProgressBar(AWinControl) do
 | 
			
		||||
    with TCustomProgressBar(AWinControl) do
 | 
			
		||||
    begin
 | 
			
		||||
      if Smooth then
 | 
			
		||||
        Flags := Flags or PBS_SMOOTH;
 | 
			
		||||
@ -681,7 +681,8 @@ begin
 | 
			
		||||
  Result := Params.Window;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TWin32WSProgressBar.ApplyChanges(const AProgressBar: TProgressBar);
 | 
			
		||||
procedure TWin32WSProgressBar.ApplyChanges(
 | 
			
		||||
  const AProgressBar: TCustomProgressBar);
 | 
			
		||||
begin
 | 
			
		||||
  with AProgressBar do
 | 
			
		||||
  begin
 | 
			
		||||
@ -706,7 +707,8 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TWin32WSProgressBar.SetPosition(const AProgressBar: TProgressBar; const NewPosition: integer);
 | 
			
		||||
procedure TWin32WSProgressBar.SetPosition(
 | 
			
		||||
  const AProgressBar: TCustomProgressBar; const NewPosition: integer);
 | 
			
		||||
begin
 | 
			
		||||
  Windows.SendMessage(AProgressBar.Handle, PBM_SETPOS, Windows.WPARAM(NewPosition), 0);
 | 
			
		||||
end;
 | 
			
		||||
@ -876,7 +878,7 @@ initialization
 | 
			
		||||
//  RegisterWSComponent(TCustomPageControl, TWin32WSPageControl);
 | 
			
		||||
  RegisterWSComponent(TCustomListView, TWin32WSCustomListView);
 | 
			
		||||
//  RegisterWSComponent(TCustomListView, TWin32WSListView);
 | 
			
		||||
  RegisterWSComponent(TProgressBar, TWin32WSProgressBar);
 | 
			
		||||
  RegisterWSComponent(TCustomProgressBar, TWin32WSProgressBar);
 | 
			
		||||
//  RegisterWSComponent(TCustomUpDown, TWin32WSCustomUpDown);
 | 
			
		||||
//  RegisterWSComponent(TCustomUpDown, TWin32WSUpDown);
 | 
			
		||||
//  RegisterWSComponent(TCustomToolButton, TWin32WSToolButton);
 | 
			
		||||
 | 
			
		||||
@ -109,8 +109,8 @@ type
 | 
			
		||||
 | 
			
		||||
  TWSProgressBarClass = class of TWSProgressBar;
 | 
			
		||||
  TWSProgressBar = class(TWSWinControl)
 | 
			
		||||
    class procedure ApplyChanges(const AProgressBar: TProgressBar); virtual;
 | 
			
		||||
    class procedure SetPosition(const AProgressBar: TProgressBar; const NewPosition: integer); virtual;
 | 
			
		||||
    class procedure ApplyChanges(const AProgressBar: TCustomProgressBar); virtual;
 | 
			
		||||
    class procedure SetPosition(const AProgressBar: TCustomProgressBar; const NewPosition: integer); virtual;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  { TWSCustomUpDown }
 | 
			
		||||
@ -263,11 +263,12 @@ end;
 | 
			
		||||
 | 
			
		||||
{ TWSProgressBar }
 | 
			
		||||
 | 
			
		||||
procedure TWSProgressBar.ApplyChanges(const AProgressBar: TProgressBar);
 | 
			
		||||
procedure TWSProgressBar.ApplyChanges(const AProgressBar: TCustomProgressBar);
 | 
			
		||||
begin
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TWSProgressBar.SetPosition(const AProgressBar: TProgressBar; const NewPosition: integer);
 | 
			
		||||
procedure TWSProgressBar.SetPosition(const AProgressBar: TCustomProgressBar;
 | 
			
		||||
  const NewPosition: integer);
 | 
			
		||||
begin
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user