diff --git a/.gitattributes b/.gitattributes index a257b60158..561328de08 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/lcl/include/statuspanel.inc b/lcl/include/statuspanel.inc new file mode 100644 index 0000000000..247fc8118a --- /dev/null +++ b/lcl/include/statuspanel.inc @@ -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; + diff --git a/lcl/include/statuspanels.inc b/lcl/include/statuspanels.inc new file mode 100644 index 0000000000..ee98e23fa2 --- /dev/null +++ b/lcl/include/statuspanels.inc @@ -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; +