diff --git a/lcl/forms.pp b/lcl/forms.pp index 72fc6bbcd1..7eef25091c 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -921,6 +921,7 @@ end; initialization FocusCount := 0; Focusmessages := True; + HintWindowClass := THintWindow; LCLProc.OwnerFormDesignerModifiedProc:=@IfOwnerIsFormThenDesignerModified; Screen:= TScreen.Create(nil); Application:= TApplication.Create(nil); diff --git a/lcl/include/bitbtn.inc b/lcl/include/bitbtn.inc index d6948b90b8..6ca68e2ca1 100644 --- a/lcl/include/bitbtn.inc +++ b/lcl/include/bitbtn.inc @@ -92,19 +92,15 @@ Procedure TBitBtn.SetKind(Value : TBitBtnKind); var Bitmap1 : TBitmap; Begin -// HandleNeeded; FKind := Value; - Assert(False, 'Trace:SETKIND'); if FKind = bkCustom then Exit; - //if Glyph <> nil then Glyph.free; Bitmap1 := TBitmap.Create; Bitmap1.Handle := LoadStockPixmap(BitBtnImages[Value]); + Glyph := Bitmap1; Caption := BitBtnCaption[fKind]; - - Glyph := Bitmap1; ModalResult := BitBtnModalResults[Value]; if (FKind = bkOK) or (FKind = bkYes) then diff --git a/lcl/include/bitmap.inc b/lcl/include/bitmap.inc index 4589636db4..1799f82926 100644 --- a/lcl/include/bitmap.inc +++ b/lcl/include/bitmap.inc @@ -19,8 +19,21 @@ } procedure TBitMap.Assign(Source: TPersistent); +var + SrcBitmap: TBitmap; begin -//TODO: Finish TBITMAP ASSIGN + //TODO: Finish TBITMAP ASSIGN + if Source=Self then exit; + if Source is TBitmap then begin + FreeContext; + SrcBitmap:=TBitmap(Source); + Width:=SrcBitmap.Width; + Height:=SrcBitmap.Height; + Canvas.Brush.Color:=clWindow; + Canvas.FillRect(Rect(0,0,Width,Height)); + SrcBitmap.Draw(Canvas,Rect(0,0,Width,Height)); + end else + inherited; end; procedure TBitmap.Draw(ACanvas: TCanvas; const Rect: TRect); @@ -145,12 +158,9 @@ var pstr : PChar; Begin HandleNeeded; - pStr := StrAlloc(length(Filename) + 1); - try - StrPCopy(pStr, Filename); + if Filename<>'' then begin + pStr:=PChar(Filename); SendIntfMessage(LM_LOADXPM,Self,pstr); - finally - StrDispose(pStr); end; end; @@ -168,6 +178,7 @@ end; procedure TBitMap.PaletteNeeded; begin + end; procedure TBitmap.ReadStream(Stream: TStream; Size: Longint); @@ -365,7 +376,7 @@ end; procedure TBitmap.SetHandle(Value: HBITMAP); begin if FImage.FHandle = Value then exit; - // TODO: the properties from new bitmap + // TODO: get the properties from new bitmap with FImage do begin FreeContext; Release; @@ -466,6 +477,9 @@ end; { ============================================================================= $Log$ + Revision 1.22 2002/11/09 15:02:06 lazarus + MG: fixed LM_LVChangedItem, OnShowHint, small bugs + Revision 1.21 2002/10/25 10:42:08 lazarus MG: broke minor circles diff --git a/lcl/include/customnotebook.inc b/lcl/include/customnotebook.inc index 492df8b864..abf209574b 100644 --- a/lcl/include/customnotebook.inc +++ b/lcl/include/customnotebook.inc @@ -376,6 +376,22 @@ begin inherited Destroy; end; +{------------------------------------------------------------------------------ + function TCustomNotebook.TabIndexAtClientPos(ClientPos: TPoint): integer; + + Returns the index of the page of the tab at the client position. + For example: + Index:=NoteBook1.PageIndexAtClientPos( + NoteBook1.ScreenToClient(Mouse.CursorPos)); + ------------------------------------------------------------------------------} +function TCustomNotebook.TabIndexAtClientPos(ClientPos: TPoint): integer; +begin + if HandleAllocated then + Result:=LCLLinux.GetNotebookTabIndexAtPos(Handle,ClientPos) + else + Result:=-1; +end; + {------------------------------------------------------------------------------ method TCustomNotebook DoCloseTabClicked Params: APage: TPage @@ -681,6 +697,9 @@ end;} { ============================================================================= $Log$ + Revision 1.25 2002/11/09 15:02:07 lazarus + MG: fixed LM_LVChangedItem, OnShowHint, small bugs + Revision 1.24 2002/10/26 15:56:45 lazarus MG: fixed changing notebook pageindex at designtime diff --git a/lcl/include/imglist.inc b/lcl/include/imglist.inc index a10c174c6b..df3eaf3d38 100644 --- a/lcl/include/imglist.inc +++ b/lcl/include/imglist.inc @@ -312,14 +312,25 @@ end; procedure TCustomImageList.GetBitmap(Index: Integer; Image: TBitmap); begin if (FCount = 0) or (Image = nil) then Exit; - - with Image do - begin + with Image do begin Width := FWidth; Height := FHeight; Self.Draw(Canvas, 0, 0, Index, True); end; +end; +{------------------------------------------------------------------------------ + procedure TCustomImageList.GetInternalImage(Index: integer; var Image, + Mask: TBitmap); + + Fetches the index'th image. This is only available if there is one image + per index. + ------------------------------------------------------------------------------} +procedure TCustomImageList.GetInternalImage(Index: integer; var Image, + Mask: TBitmap); +begin + Image:=TBitmap(FImageList[Index]); + Mask:=nil; end; {------------------------------------------------------------------------------ @@ -327,7 +338,7 @@ end; Params: Returns: Count - Fetches the index'th image into an icon. + Returns the number of images. ------------------------------------------------------------------------------} Function TCustomImageList.GetCount : Integer; begin @@ -840,6 +851,9 @@ end; { $Log$ + Revision 1.13 2002/11/09 15:02:07 lazarus + MG: fixed LM_LVChangedItem, OnShowHint, small bugs + Revision 1.12 2002/08/22 13:45:58 lazarus MG: fixed non AutoCheck menuitems and editor bookmark popupmenu