⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dxribbonskins.pas

📁 胜天进销存源码,国产优秀的进销存
💻 PAS
📖 第 1 页 / 共 5 页
字号:
    I := 0;
  end;
  Parts[FGroupScrollButtons[ALeft][I]].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawInRibbonGalleryBackground(DC: HDC;
  const R: TRect; AState: Integer);
begin
  DrawFrame(DC, R, GetPartColor(DXBAR_INRIBBONGALLERY_BACKGROUND, AState),
    GetPartColor(DXBAR_INRIBBONGALLERY_BORDER, AState));
end;

procedure TdxCustomRibbonSkin.DrawInRibbonGalleryScrollBarButton(DC: HDC;
  const R: TRect; AButtonKind: TdxInRibbonGalleryScrollBarButtonKind;
  AState: Integer);
begin
  case AButtonKind of
    gsbkLineUp:
      InternalDrawPart(FInRibbonGalleryScrollBarLineUpButton, DC, R, AState);
    gsbkLineDown:
      InternalDrawPart(FInRibbonGalleryScrollBarLineDownButton, DC, R, AState);
    gsbkDropDown:
      InternalDrawPart(FInRibbonGalleryScrollBarDropDownButton, DC, R, AState);
  end;
end;

procedure TdxCustomRibbonSkin.DrawLargeButton(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FLargeButtons, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawLargeButtonGlyphBackground(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FLargeButtonGlyphBackgrounds, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawLargeButtonDropButton(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FLargeButtonDropButtons, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawLaunchButtonBackground(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FLaunchButtonBackgrounds, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawLaunchButtonDefaultGlyph(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FLaunchButtonDefaultGlyphs, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawMDIButton(DC: HDC; const R: TRect;
  AButton: TdxBarMDIButton; AState: TdxBorderIconState);
var
  APart: Integer;
begin
  case AState of
    bisHot: APart := DXBAR_HOT;
    bisPressed: APart := DXBAR_PRESSED;
  else
    APart := DXBAR_NORMAL;
  end;
  if APart = DXBAR_NORMAL then
    FillRectByColor(DC, R, GetPartColor(rspRibbonBackground))
  else
    DrawSmallButton(DC, R, APart);
end;

procedure TdxCustomRibbonSkin.DrawMDIButtonGlyph(DC: HDC; const R: TRect;
  AButton: TdxBarMDIButton; AState: TdxBorderIconState);
var
  APart: Integer;
  GR: TRect;
  AIcon: TdxBorderDrawIcon;
begin
  GR := cxRectBounds(R.Left, R.Top, 9, 9);
  OffsetRect(GR, (R.Right - R.Left - 9) div 2, (R.Bottom - R.Top - 9) div 2 + 1);
  case AButton of
    mdibMinimize: AIcon := bdiMinimize;
    mdibRestore: AIcon := bdiRestore;
  else
    AIcon := bdiClose;
  end;
  case AState of
    bisHot: APart := 1;
    bisPressed: APart := 2;
    bisInactive: APart := 3;
  else
    APart := 0;
  end;
  Parts[FBorderIconGlyph[AIcon][APart]].Draw(DC, GR);
end;

procedure TdxCustomRibbonSkin.DrawMenuCheck(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FMenuCheck, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawMenuCheckMark(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FMenuCheckMark, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawMenuContent(DC: HDC; const R: TRect);
begin
  Parts[FMenuContent].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawMenuDetachCaption(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FMenuDetachCaption, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawMenuGlyph(DC: HDC; const R: TRect);
begin
  Parts[FMenuGlyph].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawMenuMark(DC: HDC; const R: TRect);
begin
  Parts[FMenuMark].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawMenuSeparatorHorz(DC: HDC; const R: TRect);
begin
  Parts[FMenuSeparatorHorz].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawMenuSeparatorVert(DC: HDC; const R: TRect);
begin
  Parts[FMenuSeparatorVert].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawMenuScrollArea(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FMenuScrollArea, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawProgressSolidBand(DC: HDC; const R: TRect);
begin
  Parts[FProgressSolidBand].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawProgressSubstrate(DC: HDC; const R: TRect);
begin
  Parts[FProgressSubstrate].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawProgressDiscreteBand(DC: HDC; const R: TRect);
begin
  Parts[FProgressDiscreteBand].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawRibbonBackground(DC: HDC; const R: TRect);
begin
  FillRectByColor(DC, R, GetPartColor(rspRibbonBackground));
end;

procedure TdxCustomRibbonSkin.DrawRibbonBottomBorder(DC: HDC; const R: TRect);
begin
end;

procedure TdxCustomRibbonSkin.DrawRibbonClientTopArea(DC: HDC; const R: TRect);
begin
  Parts[FRibbonTopArea].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawSmallButton(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FSmallButtons, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawSmallButtonGlyphBackground(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FSmallButtonGlyphBackgrounds, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawSmallButtonDropButton(DC: HDC; const R: TRect; AState: Integer);
begin
  InternalDrawPart(FSmallButtonDropButtons, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawScrollArrow(DC: HDC; const R: TRect);
begin
  Parts[FScrollArrow].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawScreenTip(DC: HDC; const R: TRect);
begin
  Parts[FScreenTip].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawTab(DC: HDC; const R: TRect; AState: TdxRibbonTabState);
begin
  if LowColors then
  begin
    case AState of
      rtsNormal: FillRectByColor(DC, R, clBtnFace);
      rtsActive: DrawFrame(DC, R, clHighlight, clWhite, [bLeft, bTop, bRight]);
    else
      DrawFrame(DC, R, clHighlight, clBtnFace, [bTop]);
    end;
  end
  else
    Parts[FTabIndex[AState]].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawTabGroupBackground(DC: HDC; const R: TRect; AState: Integer);
begin
  if LowColors then
    DrawFrame(DC, R, clBtnFace, clBtnShadow, [bTop, bLeft, bRight])
  else
    InternalDrawPart(FToolbar, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawTabGroupHeaderBackground(DC: HDC; const R: TRect; AState: Integer);
var
  R1: TRect;
begin
  if LowColors then
  begin
    R1 := cxRect(R.Left + 4, R.Top, R.Right - 4, R.Top + 1);
    FillRectByColor(DC, R1, clBtnShadow);
    ExcludeClipRect(DC, R1);
    DrawFrame(DC, R, clBtnFace, clBtnShadow, [bBottom, bLeft, bRight]);
  end
  else
    InternalDrawPart(FToolbarHeader, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawMarkArrow(DC: HDC; const R: TRect; AState: Integer);
var
  H: Integer;
begin
  H := (R.Bottom - R.Top) div 7;
  InternalDrawPart(FMarkArrow, DC,
    cxRect(R.Left + 3, R.Top + H * 3, R.Right - 3, R.Bottom - H * 2), AState);
end;

procedure TdxCustomRibbonSkin.DrawMarkTruncated(DC: HDC; const R: TRect; AState: Integer);
var
  H: Integer;
begin
  H := (R.Bottom - R.Top) div 7;
  InternalDrawPart(FMarkTruncated, DC,
    cxRect(R.Left + H + 1, R.Top + H * 3, R.Right - H + 1, R.Bottom - H * 2), AState);
end;

procedure TdxCustomRibbonSkin.DrawTabGroupsArea(DC: HDC; const R: TRect);
begin
  if LowColors then
    DrawFrame(DC, R, clBtnFace, clBtnShadow)
  else
    Parts[FTabGroupsArea].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawTabScrollButton(DC: HDC; const R: TRect;
  ALeft: Boolean; AState: Integer);
var
  I: Integer;
begin
  case AState of
    DXBAR_HOT: I := 1;
    DXBAR_PRESSED: I := 2;
  else
    I := 0;
  end;
  Parts[FTabScrollButtons[ALeft][I]].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawTabSeparator(DC: HDC; const R: TRect; Alpha: Byte);
begin
  Parts[FTabSeparator].Draw(DC, R, Alpha);
end;

procedure TdxCustomRibbonSkin.DrawQuickAccessToolbar(DC: HDC;
  const R: TRect; ABellow, ANonClientDraw, AHasApplicationButton, AIsActive, ADontUseAero: Boolean);
var
  W, ALeftPart, ARightPart: Integer;
  R1: TRect;
  AInactive: Boolean;
begin
  if not ABellow then
  begin
    AInactive := ANonClientDraw and not AIsActive;
    W := (R.Bottom - R.Top) div 2;
    if R.Right - W - R.Left < W then Exit;
    R1 := cxRectInflate(R, 0, -3, 0, -4);
    if AHasApplicationButton then
      R1.Right := R1.Left + 15
    else
      R1.Right := R1.Left + 7;
    ALeftPart := FQATAtTopLeft[AHasApplicationButton][AInactive];
    ARightPart := FQATAtTopRight[AInactive];
    if ANonClientDraw then
    begin
      if IsCompositionEnabled and not ADontUseAero then
      begin
        ALeftPart := FQATGlassAtTopLeft[AHasApplicationButton];
        ARightPart := FQATGlassAtTopRight;
      end;
      OffsetRect(R1, 0, 1);
    end;
    Parts[ALeftPart].Draw(DC, R1);
    R1.Left := R1.Right;
    R1.Right := R.Right - W;
    Parts[ARightPart].Draw(DC, R1);
  end
  else
    Parts[FQATAtBottom].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawQuickAccessToolbarDefaultGlyph(DC: HDC;
  const R: TRect);
begin
  if FLowColors then
  begin
    FillRectByColor(DC, R, clBtnFace);
  end
  else
    Parts[FQATDefaultGlyph].Draw(DC, R);
end; 

procedure TdxCustomRibbonSkin.DrawQuickAccessToolbarGroupButton(DC: HDC;
  const R: TRect; ABellow, ANonClientDraw, AIsActive: Boolean; AState: Integer);
begin
  if ABellow or ANonClientDraw and not AIsActive then
    InternalDrawPart(FQATGroupButtonInactive, DC, R, AState)
  else
    InternalDrawPart(FQATGroupButtonActive, DC, R, AState);
end;

procedure TdxCustomRibbonSkin.DrawQuickAccessToolbarPopup(DC: HDC; const R: TRect);
begin
  if FLowColors then
    FillRectByColor(DC, R, clBtnFace)
  else
    Parts[FQATPopup].Draw(DC, R)
end;

procedure TdxCustomRibbonSkin.DrawStatusBar(DC: HDC; const R: TRect);
begin
  if FLowColors then
    FillRectByColor(DC, R, clBtnFace)
  else
    Parts[FStatusBar].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawStatusBarGripBackground(DC: HDC; const R: TRect);
begin
  if FLowColors then
    FillRectByColor(DC, R, clBtnFace)
  else
    Parts[FStatusBarGripBackground].Draw(DC, R);
end;

procedure TdxCustomRibbonSkin.DrawStatusBarPanel(DC: HDC; const Bounds, R: TRect;
  AIsLowered: Boolean);
begin
  if FLowColors then
    FillRectByColor(DC, R, clBtnFace)
  else

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -