diff --git a/designer/objectinspector.pp b/designer/objectinspector.pp index 142cd4e580..603e8279c8 100644 --- a/designer/objectinspector.pp +++ b/designer/objectinspector.pp @@ -21,9 +21,6 @@ ToDo: - - TCustomComboBox has a bug: it can not store objects - - TCustomComboBox don't know custom draw yet - - combobox can't sort (exception) - backgroundcolor=clNone - a lot more ... see XXX @@ -45,6 +42,9 @@ type TObjectInspector = class; + + { TOIOptions } + TOIOptions = class private FCustomXMLCfg: TXMLConfig; @@ -95,6 +95,9 @@ type TOIPropertyGrid = class; + + { TOIPropertyGridRow } + TOIPropertyGridRow = class private FTop:integer; diff --git a/lcl/include/customcombobox.inc b/lcl/include/customcombobox.inc index f0fe85c328..42451591ec 100644 --- a/lcl/include/customcombobox.inc +++ b/lcl/include/customcombobox.inc @@ -70,12 +70,12 @@ end; {------------------------------------------------------------------------------ procedure TCustomComboBox.DrawItem(Index: Integer; Rect: TRect; - State: TCustomDrawItemState); + State: TOwnerDrawState); ------------------------------------------------------------------------------} procedure TCustomComboBox.DrawItem(Index: Integer; Rect: TRect; - State: TCustomDrawItemState); + State: TOwnerDrawState); begin //TControlCanvas(FCanvas).UpdateTextFlags; if Assigned(FOnDrawItem) then @@ -654,10 +654,9 @@ end; ------------------------------------------------------------------------------} Procedure TCustomComboBox.CNDrawItems(var TheMessage : TLMDrawItems); //var - //State: TOwnerDrawState; +// State: TOwnerDrawState; begin - - {with Message.DrawItemStruct^ do + {with TheMessage.DrawItemStruct^ do begin State := TOwnerDrawState(LongRec(itemState).Lo); if itemState and ODS_COMBOBOXEDIT <> 0 then @@ -728,6 +727,9 @@ end; { $Log$ + Revision 1.17 2002/10/03 18:04:46 lazarus + MG: started customdrawitem + Revision 1.16 2002/10/03 14:47:30 lazarus MG: added TComboBox.OnPopup+OnCloseUp+ItemWidth diff --git a/lcl/lcltype.pp b/lcl/lcltype.pp index db4c5ae9a5..b7122f80fe 100644 --- a/lcl/lcltype.pp +++ b/lcl/lcltype.pp @@ -664,10 +664,10 @@ type ctlType: UINT; ctlID : UINT; itemID : UINT; - itemAction : UINT; - itemState : UINT; + itemAction : UINT; + itemState : UINT; hwndItem: HWND; - _hDc: HDC; + _hDC: HDC; rcItem: TRect; itemData : DWord; end; @@ -1579,6 +1579,9 @@ end. { $Log$ + Revision 1.18 2002/10/03 18:04:46 lazarus + MG: started customdrawitem + Revision 1.17 2002/09/27 20:52:22 lazarus MWE: Applied patch from "Andrew Johnson" diff --git a/lcl/lmessages.pp b/lcl/lmessages.pp index a154615bae..678c3d7110 100644 --- a/lcl/lmessages.pp +++ b/lcl/lmessages.pp @@ -372,7 +372,7 @@ type Msg : Cardinal; CursorWnd : HWND; HitText : Word; - MOuseMsg : Word; + MouseMsg : Word; Result : Longint; end; @@ -381,7 +381,7 @@ type TLMCanvasCreate = Record pparent : Pointer; pCanvas : Pointer; - end; + end; pTLMCanvasCreate = ^TLMCanvasCreate; @@ -871,6 +871,9 @@ end. { $Log$ + Revision 1.34 2002/10/03 18:04:46 lazarus + MG: started customdrawitem + Revision 1.33 2002/10/03 14:47:29 lazarus MG: added TComboBox.OnPopup+OnCloseUp+ItemWidth diff --git a/lcl/stdctrls.pp b/lcl/stdctrls.pp index 5687978a0e..44700b0aa1 100644 --- a/lcl/stdctrls.pp +++ b/lcl/stdctrls.pp @@ -168,13 +168,14 @@ type TComboBoxStyle = (csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable); - TCustomDrawItemState = ( - cdiSelected, cdiGrayed, cdiDisabled, cdiChecked, - cdiFocused, cdiDefault, cdiHotLight, cdiInactive, cdiNoAccel, - cdiNoFocusRect, cdiComboBoxEdit); - - TCustomDrawItemEvent = procedure(Control: TWinControl; Index: Integer; - Rect: TRect; State: TCustomDrawItemState) of object; + TOwnerDrawStateType = ( + odSelected, odGrayed, odDisabled, odChecked, + odFocused, odDefault, odHotLight, odInactive, odNoAccel, + odNoFocusRect, odReserved1, odReserved2, odComboBoxEdit); + TOwnerDrawState = set of TOwnerDrawStateType; + + TDrawItemEvent = procedure(Control: TWinControl; Index: Integer; + Rect: TRect; State: TOwnerDrawState) of object; TMeasureItemEvent = procedure(Control: TWinControl; Index: Integer; var Height: Integer) of object; @@ -191,7 +192,7 @@ type fMaxLength: integer; FOnChange : TNotifyEvent; FOnCloseUp: TNotifyEvent; - FOnDrawItem: TCustomDrawItemEvent; + FOnDrawItem: TDrawItemEvent; FOnDropDown: TNotifyEvent; FOnMeasureItem: TMeasureItemEvent; FOnSelect: TNotifyEvent; @@ -209,7 +210,7 @@ type procedure CreateHandle; override; procedure DestroyHandle; override; procedure DrawItem(Index: Integer; Rect: TRect; - State: TCustomDrawItemState); virtual; + State: TOwnerDrawState); virtual; procedure DoChange(var msg); message LM_CHANGED; procedure Change; dynamic; procedure Loaded; override; @@ -247,7 +248,7 @@ type property MaxLength: integer read GetMaxLength write SetMaxLength default 0; property OnChange: TNotifyEvent read FOnChange write FOnChange; property OnCloseUp: TNotifyEvent read FOnCloseUp write FOnCloseUp; - property OnDrawItem: TCustomDrawItemEvent read FOnDrawItem write FOnDrawItem; + property OnDrawItem: TDrawItemEvent read FOnDrawItem write FOnDrawItem; property OnDropDown: TNotifyEvent read FOnDropDown write FOnDropDown; property OnMeasureItem: TMeasureItemEvent read FOnMeasureItem write FOnMeasureItem; @@ -1315,6 +1316,9 @@ end. { ============================================================================= $Log$ + Revision 1.52 2002/10/03 18:04:46 lazarus + MG: started customdrawitem + Revision 1.51 2002/10/03 14:47:30 lazarus MG: added TComboBox.OnPopup+OnCloseUp+ItemWidth