亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gridseh.pas

?? 一個功能強大的DBGRID控件
?? PAS
?? 第 1 頁 / 共 5 頁
字號:


begin
  inherited DefineProperties(Filer);
  if FSaveCellExtents then
    with Filer do
    begin
      DefineProperty('ColWidths', ReadColWidths, WriteColWidths, DoColWidths);
      DefineProperty('RowHeights', ReadRowHeights, WriteRowHeights, DoRowHeights);
    end;
end;

procedure TCustomGridEh.MoveColumn(FromIndex, ToIndex: Longint);
var
  Rect: TGridRect;
  InvalidRect: TRect;
  DrawInfo: TGridDrawInfoEh;
begin
  if FromIndex = ToIndex then Exit;
  if Length(FColWidths) > 0 then
  begin
    MoveExtent(FColWidths, FromIndex + 1, ToIndex + 1);
    MoveExtent(FTabStops, FromIndex + 1, ToIndex + 1);
  end;
  MoveAdjust(FCurrent.X, FromIndex, ToIndex);
  MoveAdjust(FAnchor.X, FromIndex, ToIndex);
  MoveAdjust(FInplaceCol, FromIndex, ToIndex);
  Rect.Top := 0;
  CalcDrawInfo(DrawInfo);
  Rect.Bottom := DrawInfo.Vert.LastFullVisibleCell - TopRow + 1;//VisibleRowCount;
  if FromIndex < ToIndex then
  begin
    Rect.Left := FromIndex;
    Rect.Right := ToIndex;
  end
  else
  begin
    Rect.Left := ToIndex;
    Rect.Right := FromIndex;
  end;
//ddd  InvalidateRect(Rect);
  if HandleAllocated then
  begin
    GridRectToScreenRect(Rect, InvalidRect, True);
    InvalidRect.Bottom := DrawInfo.Vert.FullGridExtent;
    WindowsInvalidateRect(Handle, InvalidRect, False);
  end;
  ColumnMoved(FromIndex, ToIndex);
  if Length(FColWidths) > 0 then
    ColWidthsChanged;
  UpdateEdit;
end;

procedure TCustomGridEh.ColumnMoved(FromIndex, ToIndex: Longint);
begin
end;

procedure TCustomGridEh.MoveRow(FromIndex, ToIndex: Longint);
var
  Rect: TGridRect;
  InvalidRect: TRect;
  DrawInfo: TGridDrawInfoEh;
begin
  if Length(FRowHeights) <> 0 then
    MoveExtent(FRowHeights, FromIndex + 1, ToIndex + 1);
  MoveAdjust(FCurrent.Y, FromIndex, ToIndex);
  MoveAdjust(FAnchor.Y, FromIndex, ToIndex);
  MoveAdjust(FInplaceRow, FromIndex, ToIndex);

  Rect.Left := 0;
  CalcDrawInfo(DrawInfo);
  Rect.Right := DrawInfo.Horz.LastFullVisibleCell - LeftCol + 1;
  if FromIndex < ToIndex then
  begin
    Rect.Top := FromIndex;
    Rect.Bottom := ToIndex;
  end
  else
  begin
    Rect.Top := ToIndex;
    Rect.Bottom := FromIndex;
  end;
  if HandleAllocated then
  begin
    GridRectToScreenRect(Rect, InvalidRect, True);
    InvalidRect.Right := DrawInfo.Horz.FullGridExtent;
    WindowsInvalidateRect(Handle, InvalidRect, False);
  end;

  RowMoved(FromIndex, ToIndex);
  if Length(FRowHeights) <> 0 then
    RowHeightsChanged;
  UpdateEdit;
end;

procedure TCustomGridEh.RowMoved(FromIndex, ToIndex: Longint);
begin
end;

function TCustomGridEh.MouseCoord(X, Y: Integer): TGridCoord;
var
  DrawInfo: TGridDrawInfoEh;
begin
  CalcDrawInfo(DrawInfo);
  Result := CalcCoordFromPoint(X, Y, DrawInfo);
  if Result.X < 0 then Result.Y := -1
  else if Result.Y < 0 then Result.X := -1;
end;

procedure TCustomGridEh.MoveColRow(ACol, ARow: Longint; MoveAnchor,
  Show: Boolean);
begin
  MoveCurrent(ACol, ARow, MoveAnchor, Show);
end;

function TCustomGridEh.SelectCell(ACol, ARow: Longint): Boolean;
begin
  Result := True;
end;

procedure TCustomGridEh.SizeChanged(OldColCount, OldRowCount: Longint);
begin
end;

function TCustomGridEh.Sizing(X, Y: Integer): Boolean;
var
  DrawInfo: TGridDrawInfoEh;
  State: TGridState;
  Index: Longint;
  Pos, Ofs: Integer;
begin
  State := FGridState;
  if State = gsNormal then
  begin
    CalcDrawInfo(DrawInfo);
    CalcSizingState(X, Y, State, Index, Pos, Ofs, DrawInfo);
  end;
  Result := State <> gsNormal;
end;

procedure TCustomGridEh.TopLeftChanged;
begin
  if FEditorMode and (FInplaceEdit <> nil)
    then FInplaceEdit.UpdateLoc(CellRect(Col, Row));
end;

(*
procedure FillDWord(var Dest; Count, Value: Integer); register;
asm
  XCHG  EDX, ECX
  PUSH  EDI
  MOV   EDI, EAX
  MOV   EAX, EDX
  REP   STOSD
  POP   EDI
end;

{ StackAlloc allocates a 'small' block of memory from the stack by
  decrementing SP.  This provides the allocation speed of a local variable,
  but the runtime size flexibility of heap allocated memory.  }
function StackAlloc(Size: Integer): Pointer; register;
asm
  POP   ECX          { return address }
  MOV   EDX, ESP
  ADD   EAX, 3
  AND   EAX, not 3   // round up to keep ESP dword aligned
  CMP   EAX, 4092
  JLE   @@2
@@1:
  SUB   ESP, 4092
  PUSH  EAX          { make sure we touch guard page, to grow stack }
  SUB   EAX, 4096
  JNS   @@1
  ADD   EAX, 4096
@@2:
  SUB   ESP, EAX
  MOV   EAX, ESP     { function result = low memory address of block }
  PUSH  EDX          { save original SP, for cleanup }
  MOV   EDX, ESP
  SUB   EDX, 4
  PUSH  EDX          { save current SP, for sanity check  (sp = [sp]) }
  PUSH  ECX          { return to caller }
end;

{ StackFree pops the memory allocated by StackAlloc off the stack.
- Calling StackFree is optional - SP will be restored when the calling routine
  exits, but it's a good idea to free the stack allocated memory ASAP anyway.
- StackFree must be called in the same stack context as StackAlloc - not in
  a subroutine or finally block.
- Multiple StackFree calls must occur in reverse order of their corresponding
  StackAlloc calls.
- Built-in sanity checks guarantee that an improper call to StackFree will not
  corrupt the stack. Worst case is that the stack block is not released until
  the calling routine exits. }
procedure StackFree(P: Pointer); register;
asm
  POP   ECX                     { return address }
  MOV   EDX, DWORD PTR [ESP]
  SUB   EAX, 8
  CMP   EDX, ESP                { sanity check #1 (SP = [SP]) }
  JNE   @@1
  CMP   EDX, EAX                { sanity check #2 (P = this stack block) }
  JNE   @@1
  MOV   ESP, DWORD PTR [ESP+4]  { restore previous SP  }
@@1:
  PUSH  ECX                     { return to caller }
end;
*)

procedure TCustomGridEh.DrawLines(DrawInfo: TGridDrawInfoEh; DoHorz, DoVert: Boolean;
 Col, Row: Longint; const CellBounds: array of Integer; OnColor, OffColor: TColor;
  Canvas: TCanvas; DrawLinesInfo: TDrawLinesInfoEh);

{ Cellbounds is 4 integers: StartX, StartY, StopX, StopY
  Horizontal lines:  MajorIndex = 0
  Vertical lines:    MajorIndex = 1 }

const
  FlatPenStyle = PS_Geometric or PS_Solid or PS_EndCap_Flat or PS_Join_Miter;

  procedure DrawAxisLines(const AxisInfo: TGridAxisDrawInfoEh;
    Cell, MajorIndex: Integer; UseOnColor: Boolean; LastCell: Longint);
  var
    Line: Integer;
    LogBrush: TLOGBRUSH;
    Index: Integer;
    Points: TPointArray;
    StopMajor, StartMinor, StopMinor, StopIndex: Integer;
    LineIncr: Integer;
  begin
    Points := nil;
    with Canvas, AxisInfo do
    begin
      if EffectiveLineWidth <> 0 then
      begin
        Pen.Width := GridLineWidth;
        if UseOnColor then
          Pen.Color := OnColor
        else
          Pen.Color := OffColor;
        if Pen.Width > 1 then
        begin
          LogBrush.lbStyle := BS_Solid;
          LogBrush.lbColor := Pen.Color;
          LogBrush.lbHatch := 0;
          Pen.Handle := ExtCreatePen(FlatPenStyle, Pen.Width, LogBrush, 0, nil);
        end;
        Points := DrawLinesInfo.PointsList;
        Line := CellBounds[MajorIndex] + EffectiveLineWidth shr 1 +
          AxisInfo.GetExtent(Cell);
        //!!! ??? Line needs to be incremented for RightToLeftAlignment ???
// Fix in DrawPolyPolyline   if UseRightToLeftAlignment and (MajorIndex = 0) then Inc(Line);
        StartMinor := CellBounds[MajorIndex xor 1];
        StopMinor := CellBounds[2 + (MajorIndex xor 1)];
        StopMajor := CellBounds[2 + MajorIndex] + EffectiveLineWidth;
        StopIndex := DrawLinesInfo.MaxStroke * 2;
        Index := 0;
        repeat
          if MajorIndex <> 0 then
          begin
            Points[Index].Y := Line;
            Points[Index].X := StartMinor;
          end else
          begin
            Points[Index].X := Line;
            Points[Index].Y := StartMinor;
          end;
          Inc(Index);
          if MajorIndex <> 0 then
          begin
            Points[Index].Y := Line;
            Points[Index].X := StopMinor;
          end else
          begin
            Points[Index].X := Line;
            Points[Index].Y := StopMinor;
          end;
          Inc(Index);
          // Skip hidden columns/rows.  We don't have stroke slots for them
          // A column/row with an extent of -EffectiveLineWidth is hidden
          repeat
            Inc(Cell);
            LineIncr := AxisInfo.GetExtent(Cell) + EffectiveLineWidth;
          until (LineIncr > 0) or (Cell > LastCell);
          Inc(Line, LineIncr);
        until (Line > StopMajor) or (Cell > LastCell) or (Index > StopIndex);
//        until (Line > StopMajor) or (Cell > LastCell) or (Index > StopIndex);
         { 2 integers per point, 2 points per line -> Index div 4 }
(*{$IFDEF CIL}
        PolyPolyLine(Canvas.Handle, Points, DrawLinesInfo.StrokeList, Index shr 1);
{$ELSE}
        PolyPolyLine(Canvas.Handle, Pointer(Points)^, Pointer(DrawLinesInfo.StrokeList)^, Index shr 1);
{$ENDIF}*)
        DrawPolyPolyline(Points, DrawLinesInfo.StrokeList, Index);
      end;
    end;
  end;

begin
  if (CellBounds[0] = CellBounds[2]) or (CellBounds[1] = CellBounds[3]) then
    Exit;
  if not DoHorz then
  begin
    DrawAxisLines(DrawInfo.Vert, Row, 1, DoHorz, DrawLinesInfo.LastRow);
    DrawAxisLines(DrawInfo.Horz, Col, 0, DoVert, DrawLinesInfo.LastCol);
  end
  else
  begin
    DrawAxisLines(DrawInfo.Horz, Col, 0, DoVert, DrawLinesInfo.LastCol);
    DrawAxisLines(DrawInfo.Vert, Row, 1, DoHorz, DrawLinesInfo.LastRow);
  end;
end;

procedure TCustomGridEh.Paint;
var
//  LineColor: TColor;
  DrawInfo: TGridDrawInfoEh;
  Sel: TGridRect;
  UpdateRect: TRect;
  AFocRect, FocRect: TRect;
  PointsList: TPointArray;
  StrokeList: TDWORDArray;
  MaxStroke: Integer;
  FrameFlags1, FrameFlags2: DWORD;

  procedure DrawCells(ACol, ARow: Longint; StartX, StartY, StopX, StopY: Integer;
    Color: TColor; IncludeDrawState: TGridDrawState);
  var
    CurCol, CurRow: Longint;
    AWhere, Where, TempRect: TRect;
    DrawState: TGridDrawState;
    Focused: Boolean;
  begin
    CurRow := ARow;
    Where.Top := StartY;
    while (Where.Top < StopY) and (CurRow < RowCount) do
    begin
      CurCol := ACol;
      Where.Left := StartX;
      Where.Bottom := Where.Top + RowHeights[CurRow];
      while (Where.Left < StopX) and (CurCol < ColCount) do
      begin
        Where.Right := Where.Left + ColWidths[CurCol];
        if (Where.Right > Where.Left) and RectVisible(Canvas.Handle, Where) then
        begin
          DrawState := IncludeDrawState;
          Focused := IsActiveControl;
          if Focused and (CurRow = Row) and (CurCol = Col)  then
            Include(DrawState, gdFocused);
          if PointInGridRect(CurCol, CurRow, Sel) then
            Include(DrawState, gdSelected);
          if not (gdFocused in DrawState) or not (goEditing in Options) or
            not FEditorMode or (csDesigning in ComponentState) then
          begin
            if DefaultDrawing or (csDesigning in ComponentState) then
              with Canvas do
              begin
                Font := Self.Font;
                if (gdSelected in DrawState) and
                  (not (gdFocused in DrawState) or
                  ([goDrawFocusSelected, goRowSelect] * Options <> [])) then
                begin
                  Brush.Color := clHighlight;
                  Font.Color := clHighlightText;
                end
                else
                  Brush.Color := Color;
                FillRect(Where);
              end;
            DrawCell(CurCol, CurRow, Where, DrawState);
            if DefaultDrawing and (gdFixed in DrawState) and Ctl3D and
              ((FrameFlags1 or FrameFlags2) <> 0) then
            begin
              TempRect := Where;
              if (FrameFlags1 and BF_RIGHT) = 0 then
                Inc(TempRect.Right, DrawInfo.Horz.EffectiveLineWidth)
              else if (FrameFlags1 and BF_BOTTOM) = 0 then
                Inc(TempRect.Bottom, DrawInfo.Vert.EffectiveLineWidth);
              DrawEdgeEh(Canvas, TempRect, False, False, True, True);
              DrawEdgeEh(Canvas, TempRect, False, False, True, True);
            end;

            if DefaultDrawi

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久国产大片| 色婷婷av一区二区三区大白胸| 亚洲国产毛片aaaaa无费看| 国产喂奶挤奶一区二区三区| 精品国免费一区二区三区| 精品国产乱码久久久久久图片| 欧美va日韩va| 久久综合色综合88| 欧美精品一区二区三区蜜臀| 国产性天天综合网| 国产欧美日韩精品在线| 国产精品久久久久久福利一牛影视| 中文av字幕一区| 亚洲另类在线视频| 日韩中文字幕91| 国产在线播放一区| 激情综合网av| 成人短视频下载| 91成人免费在线视频| 欧美人xxxx| 久久久www免费人成精品| 欧美激情中文不卡| 一区二区三区自拍| 狂野欧美性猛交blacked| 国产最新精品免费| 99vv1com这只有精品| 欧美视频精品在线观看| 精品国产一区二区亚洲人成毛片| 欧美激情艳妇裸体舞| 亚洲午夜精品17c| 久久av老司机精品网站导航| 成人国产精品免费| 欧美精品第一页| 日本一区二区三区四区在线视频| 亚洲精品大片www| 国精产品一区一区三区mba桃花 | 亚洲欧美一区二区三区久本道91| 亚洲天堂网中文字| 免费观看成人av| 国产成人免费视频| 欧美日本一区二区三区四区| 国产欧美精品一区二区色综合| 一区二区三区在线免费| 黄色日韩网站视频| 欧美亚洲精品一区| 中文字幕第一区二区| 免费久久99精品国产| 91麻豆高清视频| 久久久久久99久久久精品网站| 一区二区高清免费观看影视大全| 国产精品一区免费视频| 欧美一区二区三区小说| 一区二区三区免费网站| 成人app软件下载大全免费| 精品区一区二区| 亚洲成人在线观看视频| 91浏览器入口在线观看| 国产日产亚洲精品系列| 久久国产精品99久久久久久老狼| 91国模大尺度私拍在线视频| 国产精品理论在线观看| 国产一区二区三区观看| 日韩视频免费观看高清完整版在线观看 | 日本不卡中文字幕| 欧美性xxxxxx少妇| 亚洲欧美日韩一区二区三区在线观看| 国产一区二区不卡| 久久这里只有精品视频网| 秋霞av亚洲一区二区三| 欧美电影一区二区| 亚洲超碰97人人做人人爱| 在线观看网站黄不卡| 一区二区三区在线观看视频| 92国产精品观看| 亚洲日本在线天堂| 91影视在线播放| 亚洲愉拍自拍另类高清精品| 色噜噜夜夜夜综合网| 亚洲精品成人少妇| 欧美剧在线免费观看网站| 亚洲综合在线免费观看| 欧美丝袜自拍制服另类| 午夜成人免费电影| 日韩一区二区三区高清免费看看| 欧美a一区二区| 久久色视频免费观看| 国产麻豆精品95视频| 国产精品丝袜久久久久久app| 成人性视频网站| 亚洲精品第1页| 91精品国产综合久久小美女| 久久99精品久久只有精品| 久久亚洲春色中文字幕久久久| 国产一区二区电影| 日韩毛片视频在线看| 欧美日韩一区二区三区高清| 首页亚洲欧美制服丝腿| 久久久三级国产网站| av在线播放一区二区三区| 亚洲国产精品久久人人爱| 91精品国产综合久久精品性色| 蜜臀久久99精品久久久久宅男| 久久久www成人免费无遮挡大片| jvid福利写真一区二区三区| 亚洲大片在线观看| 久久综合久久综合久久| av电影在线观看一区| 亚洲成a人v欧美综合天堂下载| 日韩欧美你懂的| 色综合天天天天做夜夜夜夜做| 日韩精品成人一区二区三区| 国产日韩欧美麻豆| 欧美精品v国产精品v日韩精品 | 久久亚洲影视婷婷| 91精品福利在线| 国产乱子轮精品视频| 亚洲久草在线视频| 精品福利视频一区二区三区| 91蝌蚪porny成人天涯| 精品亚洲成a人在线观看| 一区二区三区在线视频播放| 亚洲精品一区二区在线观看| 色老汉av一区二区三区| 国产精一品亚洲二区在线视频| 亚洲精品一卡二卡| 国产亚洲一本大道中文在线| 欧美日韩一区二区三区在线看 | 91精品国产全国免费观看| www.亚洲国产| 国产一区二区剧情av在线| 亚洲国产精品久久久男人的天堂| 国产精品欧美综合在线| 欧美二区三区91| 日本精品一级二级| 成人动漫精品一区二区| 精品中文字幕一区二区| 视频一区视频二区在线观看| 中文字幕佐山爱一区二区免费| 国产三级精品三级在线专区| 欧美电视剧免费观看| 欧美高清www午色夜在线视频| 91女厕偷拍女厕偷拍高清| 国产91露脸合集magnet| 美女精品一区二区| 日产国产高清一区二区三区| 亚洲国产精品久久艾草纯爱| 亚洲欧美激情视频在线观看一区二区三区 | 日韩精品亚洲一区| 日日摸夜夜添夜夜添国产精品 | www.日韩av| 国产美女视频一区| 国产电影一区在线| 成人综合在线网站| 风间由美性色一区二区三区| 狠狠色综合日日| 精品无码三级在线观看视频| 日韩精品一二三四| 久久国产精品色婷婷| 久久精品国产第一区二区三区| 肉丝袜脚交视频一区二区| 视频一区二区三区中文字幕| 麻豆成人av在线| 国精产品一区一区三区mba桃花| 91国偷自产一区二区三区成为亚洲经典| 国产成人亚洲精品狼色在线| 国产精品白丝av| eeuss鲁一区二区三区| 色婷婷久久久综合中文字幕| 一本一道综合狠狠老| 欧美日韩日本视频| 91精品国产全国免费观看| 精品国产sm最大网站| 久久久精品黄色| 亚洲色图在线看| 亚洲.国产.中文慕字在线| 蜜臀av亚洲一区中文字幕| 韩国成人在线视频| 国产精品99久| 在线一区二区三区| 欧美一区二视频| 欧美精彩视频一区二区三区| 亚洲精品ww久久久久久p站| 日韩经典一区二区| 国产成人久久精品77777最新版本| 色综合久久99| 精品日本一线二线三线不卡| 中文字幕一区二区不卡| 日韩精品一二三区| 高清在线不卡av| 欧美日韩五月天| 国产精品久久午夜| 日韩经典中文字幕一区| 成人高清视频免费观看| 在线播放亚洲一区| 中文字幕乱码日本亚洲一区二区| 亚洲国产欧美一区二区三区丁香婷| 国产精品影音先锋| 欧美精品一二三| 日韩一区在线看| 国产一区二区女|