mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 02:18:03 +02:00
Added 2 files for the TStatusbar
Shane git-svn-id: trunk@148 -
This commit is contained in:
parent
596fb74e0a
commit
87da23955b
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -192,6 +192,8 @@ lcl/include/sharedimage.inc svneol=native#text/pascal
|
||||
lcl/include/speedbutton.inc svneol=native#text/pascal
|
||||
lcl/include/spinedit.inc svneol=native#text/pascal
|
||||
lcl/include/statusbar.inc svneol=native#text/pascal
|
||||
lcl/include/statuspanel.inc svneol=native#text/pascal
|
||||
lcl/include/statuspanels.inc svneol=native#text/pascal
|
||||
lcl/include/timer.inc svneol=native#text/pascal
|
||||
lcl/include/togglebox.inc svneol=native#text/pascal
|
||||
lcl/include/toolbar.inc svneol=native#text/pascal
|
||||
|
77
lcl/include/statuspanel.inc
Normal file
77
lcl/include/statuspanel.inc
Normal file
@ -0,0 +1,77 @@
|
||||
{------------------------------------------------------------------------------}
|
||||
{ TStatusPanel Constructor }
|
||||
{------------------------------------------------------------------------------}
|
||||
constructor TStatusPanel.Create(aCollection: TCollection);
|
||||
begin
|
||||
FWidth := 50;
|
||||
FBevel := pbLowered;
|
||||
FParentBiDiMode := True;
|
||||
FAlignment := taLeftJustify;
|
||||
inherited Create(aCollection);
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.Assign(Source: TPersistent);
|
||||
begin
|
||||
if Source is TStatusPanel then
|
||||
begin
|
||||
Text := TStatusPanel(Source).Text;
|
||||
Width := TStatusPanel(Source).Width;
|
||||
Alignment := TStatusPanel(Source).Alignment;
|
||||
Bevel := TStatusPanel(Source).Bevel;
|
||||
Style := TStatusPanel(Source).Style;
|
||||
end
|
||||
else inherited Assign(Source);
|
||||
end;
|
||||
|
||||
|
||||
function TStatusPanel.GetDisplayName: string;
|
||||
begin
|
||||
Result := Text;
|
||||
if Result = '' then Result := inherited GetDisplayName;
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.SetAlignment(Value: TAlignment);
|
||||
begin
|
||||
if FAlignment <> Value then
|
||||
begin
|
||||
FAlignment := Value;
|
||||
Changed(False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.SetBevel(Value: TStatusPanelBevel);
|
||||
begin
|
||||
if FBevel <> Value then
|
||||
begin
|
||||
FBevel := Value;
|
||||
Changed(False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.SetStyle(Value: TStatusPanelStyle);
|
||||
begin
|
||||
if FStyle <> Value then
|
||||
begin
|
||||
FStyle := Value;
|
||||
Changed(False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.SetText(const Value: string);
|
||||
begin
|
||||
if FText <> Value then
|
||||
begin
|
||||
FText := Value;
|
||||
Changed(False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TStatusPanel.SetWidth(Value: Integer);
|
||||
begin
|
||||
if FWidth <> Value then
|
||||
begin
|
||||
FWidth := Value;
|
||||
Changed(True);
|
||||
end;
|
||||
end;
|
||||
|
32
lcl/include/statuspanels.inc
Normal file
32
lcl/include/statuspanels.inc
Normal file
@ -0,0 +1,32 @@
|
||||
{ TStatusPanels }
|
||||
|
||||
constructor TStatusPanels.Create(StatusBar: TStatusBar);
|
||||
begin
|
||||
inherited Create(TStatusPanel);
|
||||
FStatusBar := StatusBar;
|
||||
end;
|
||||
|
||||
function TStatusPanels.Add: TStatusPanel;
|
||||
begin
|
||||
Result := TStatusPanel(inherited Add);
|
||||
end;
|
||||
|
||||
function TStatusPanels.GetItem(Index: Integer): TStatusPanel;
|
||||
begin
|
||||
Result := TStatusPanel(inherited GetItem(Index));
|
||||
end;
|
||||
|
||||
function TStatusPanels.GetOwner: TPersistent;
|
||||
begin
|
||||
Result := FStatusBar;
|
||||
end;
|
||||
|
||||
procedure TStatusPanels.SetItem(Index: Integer; Value: TStatusPanel);
|
||||
begin
|
||||
inherited SetItem(Index, Value);
|
||||
end;
|
||||
|
||||
procedure TStatusPanels.Update(Item: TCollectionItem);
|
||||
begin
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user