From: Andreas H. <ah...@us...> - 2004-01-07 22:36:52
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1:/tmp/cvs-serv8063/run Modified Files: JvCheckBox.pas JvItemsPanel.pas Log Message: CLX compatible Index: JvCheckBox.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvCheckBox.pas,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** JvCheckBox.pas 5 Jan 2004 22:37:41 -0000 1.24 --- JvCheckBox.pas 7 Jan 2004 22:36:49 -0000 1.25 *************** *** 39,43 **** Windows, Messages, Graphics, Controls, Forms, StdCtrls, {$ELSE} ! QGraphics, QControls, QForms, QStdCtrls, {$ENDIF VCL} JVCLVer, JvTypes, JvExStdCtrls; --- 39,43 ---- Windows, Messages, Graphics, Controls, Forms, StdCtrls, {$ELSE} ! Types, QWindows, QGraphics, QControls, QForms, QStdCtrls, {$ENDIF VCL} JVCLVer, JvTypes, JvExStdCtrls; *************** *** 78,87 **** procedure TextChanged; override; procedure FontChanged; override; ! procedure SetAutoSize(Value: Boolean); {$IFDEF COMPILER6_UP} override; {$ENDIF} procedure CreateParams(var Params: TCreateParams); override; procedure Notification(AComponent: TComponent; Operation: TOperation); override; procedure CalcAutoSize; virtual; procedure Loaded; override; - procedure Toggle; override; procedure Click; override; procedure SetChecked(Value: Boolean); override; --- 78,92 ---- procedure TextChanged; override; procedure FontChanged; override; ! procedure SetAutoSize(Value: Boolean); {$IFDEF VCL}{$IFDEF COMPILER6_UP} override;{$ENDIF}{$ENDIF} ! {$IFDEF VCL} procedure CreateParams(var Params: TCreateParams); override; + procedure Toggle; override; + {$ENDIF VCL} + {$IFDEF VisualCLX} + procedure AdjustSize; override; + {$ENDIF VisualCLX} procedure Notification(AComponent: TComponent; Operation: TOperation); override; procedure CalcAutoSize; virtual; procedure Loaded; override; procedure Click; override; procedure SetChecked(Value: Boolean); override; *************** *** 89,92 **** --- 94,100 ---- constructor Create(AOwner: TComponent); override; destructor Destroy; override; + {$IFDEF VisualCLX} + procedure Toggle; override; + {$ENDIF VisualCLX} property Canvas: TCanvas read GetCanvas; published *************** *** 160,163 **** --- 168,172 ---- end; + {$IFDEF VCL} procedure TJvCheckBox.CreateParams(var Params: TCreateParams); const *************** *** 172,175 **** --- 181,185 ---- cLeftText[LeftText] or cWordWrap[WordWrap]; end; + {$ENDIF VCL} procedure TJvCheckBox.MouseEnter(AControl: TControl); *************** *** 244,249 **** --- 254,264 ---- if Caption <> '' then begin + {$IFDEF VCL} DrawText(FCanvas.Handle, PChar(Caption), Length(Caption), R, Flags[WordWrap] or DT_LEFT or DT_NOCLIP or DT_CALCRECT); + {$ELSE} + DrawTextW(FCanvas.Handle, PWideChar(Caption), Length(Caption), R, + Flags[WordWrap] or DT_LEFT or DT_NOCLIP or DT_CALCRECT); + {$ENDIF VCL} AWidth := (R.Right - R.Left) + ASize.cx + 8; AHeight := R.Bottom - R.Top; *************** *** 271,277 **** --- 286,294 ---- if FAutoSize <> Value then begin + {$IFDEF VCL} {$IFDEF COMPILER6_UP} // inherited SetAutoSize(Value); {$ENDIF COMPILER6_UP} + {$ENDIF VCL} FAutoSize := Value; if Value then *************** *** 334,338 **** --- 351,359 ---- if Value then AutoSize := False; + {$IFDEF VCl} RecreateWnd; + {$ELSE} + RecreateWidget; + {$ENDIF VCL} end; end; *************** *** 343,347 **** --- 364,372 ---- begin FAlignment := Value; + {$IFDEF VCl} RecreateWnd; + {$ELSE} + RecreateWidget; + {$ENDIF VCL} end; end; *************** *** 352,356 **** --- 377,385 ---- begin FLayout := Value; + {$IFDEF VCl} RecreateWnd; + {$ELSE} + RecreateWidget; + {$ENDIF VCL} end; end; *************** *** 366,370 **** --- 395,403 ---- begin FLeftText := Value; + {$IFDEF VCl} RecreateWnd; + {$ELSE} + RecreateWidget; + {$ENDIF VCL} end; end; *************** *** 374,377 **** --- 407,418 ---- Result := ClicksDisabled; end; + + {$IFDEF VisualCLX} + procedure TJvCheckBox.AdjustSize; + begin + inherited AdjustSize; + CalcAutoSize; + end; + {$ENDIF VisualCLX} end. Index: JvItemsPanel.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvItemsPanel.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** JvItemsPanel.pas 6 Jan 2004 23:11:06 -0000 1.10 --- JvItemsPanel.pas 7 Jan 2004 22:36:49 -0000 1.11 *************** *** 37,44 **** {$IFDEF VCL} Windows, Messages, Graphics, Controls, ExtCtrls, ! {$ENDIF} {$IFDEF VisualCLX} ! QGraphics, QControls, QExtCtrls, ! {$ENDIF} JvComponent, JvThemes; --- 37,44 ---- {$IFDEF VCL} Windows, Messages, Graphics, Controls, ExtCtrls, ! {$ENDIF VCL} {$IFDEF VisualCLX} ! Types, QWindows, QTypes, QGraphics, QControls, QExtCtrls, ! {$ENDIF VisualCLX} JvComponent, JvThemes; *************** *** 53,57 **** {$IFDEF COMPILER6_UP} FAutoSize: Boolean; ! {$ENDIF} FAutoGrow: Boolean; FDown: Boolean; --- 53,57 ---- {$IFDEF COMPILER6_UP} FAutoSize: Boolean; ! {$ENDIF COMPILER6_UP} FAutoGrow: Boolean; FDown: Boolean; *************** *** 64,68 **** {$IFDEF VCL} procedure WMSize(var Msg: TWMSize); message WM_SIZE; ! {$ENDIF} function GetCaption: TCaption; procedure SetItems(const Value: TStrings); --- 64,68 ---- {$IFDEF VCL} procedure WMSize(var Msg: TWMSize); message WM_SIZE; ! {$ENDIF VCL} function GetCaption: TCaption; procedure SetItems(const Value: TStrings); *************** *** 74,83 **** procedure SetOrientation(const Value: TJvPanelOrientation); protected ! {$IFDEF COMPILER6_UP} ! procedure SetAutoSize(Value: Boolean); override; ! {$ENDIF} {$IFDEF VisualCLX} procedure AdjustSize; override; ! {$ENDIF} procedure Grow; procedure PaintDown; --- 74,81 ---- procedure SetOrientation(const Value: TJvPanelOrientation); protected ! procedure SetAutoSize(Value: Boolean); {$IFDEF VCL}{$IFDEF COMPILER6_UP} override;{$ENDIF}{$ENDIF} {$IFDEF VisualCLX} procedure AdjustSize; override; ! {$ENDIF VisualCLX} procedure Grow; procedure PaintDown; *************** *** 104,108 **** {$IFDEF COMPILER6_UP} property AutoSize: Boolean read FAutoSize write SetAutoSize; ! {$ENDIF} property Items: TStrings read FItems write SetItems; property ItemHeight: Integer read FItemHeight write SetItemHeight default 16; --- 102,106 ---- {$IFDEF COMPILER6_UP} property AutoSize: Boolean read FAutoSize write SetAutoSize; ! {$ENDIF COMPILER6_UP} property Items: TStrings read FItems write SetItems; property ItemHeight: Integer read FItemHeight write SetItemHeight default 16; *************** *** 125,129 **** property DragKind; property ParentBiDiMode; ! {$ENDIF} property BorderWidth; property Color; --- 123,127 ---- property DragKind; property ParentBiDiMode; ! {$ENDIF VCL} property BorderWidth; property Color; *************** *** 142,150 **** property TabStop; property Visible; - property OnCanResize; property OnClick; property OnConstrainedResize; property OnContextPopup; {$IFDEF VCL} property OnDockDrop; property OnDockOver; --- 140,148 ---- property TabStop; property Visible; property OnClick; property OnConstrainedResize; property OnContextPopup; {$IFDEF VCL} + property OnCanResize; property OnDockDrop; property OnDockOver; *************** *** 153,157 **** property OnStartDock; property OnUnDock; ! {$ENDIF} property OnDblClick; property OnDragDrop; --- 151,155 ---- property OnStartDock; property OnUnDock; ! {$ENDIF VCL} property OnDblClick; property OnDragDrop; *************** *** 165,171 **** property OnResize; property OnStartDrag; ! {$IFDEF JVCLThemesEnabled} property ParentBackground; ! {$ENDIF} end; --- 163,169 ---- property OnResize; property OnStartDrag; ! {$IFDEF JVCLThemesEnabled} property ParentBackground; ! {$ENDIF JVCLThemesEnabled} end; *************** *** 263,267 **** if ThemeServices.ThemesEnabled then SetBkMode(Canvas.Handle, TRANSPARENT); ! {$ENDIF} DrawText(Canvas.Handle, PChar(FItems[Index]), -1, R, Flags); end; --- 261,265 ---- if ThemeServices.ThemesEnabled then SetBkMode(Canvas.Handle, TRANSPARENT); ! {$ENDIF JVCLThemesEnabled} DrawText(Canvas.Handle, PChar(FItems[Index]), -1, R, Flags); end; *************** *** 281,285 **** end; - {$IFDEF COMPILER6_UP} procedure TJvItemsPanel.SetAutoSize(Value: Boolean); begin --- 279,282 ---- *************** *** 297,301 **** end; end; - {$ENDIF COMPILER6_UP} procedure TJvItemsPanel.SetItemHeight(const Value: Integer); --- 294,297 ---- |