Update VirtualTree component to r320

This commit is contained in:
Ansgar Becker
2011-11-01 09:32:34 +00:00
parent 26b6e06aa9
commit b93106a6fe
18 changed files with 1833 additions and 2005 deletions

View File

@ -7,26 +7,14 @@ interface
{$include Compilers.inc}
{$ifdef COMPILER_7_UP}
// For some things to work we need code, which is classified as being unsafe for .NET.
{$warn UNSAFE_TYPE off}
{$warn UNSAFE_CAST off}
{$warn UNSAFE_CODE off}
{$endif COMPILER_7_UP}
{$ifdef COMPILER_4}
{$R 'VirtualTreesD.dcr'}
{$endif COMPILER_4}
// For some things to work we need code, which is classified as being unsafe for .NET.
{$warn UNSAFE_TYPE off}
{$warn UNSAFE_CAST off}
{$warn UNSAFE_CODE off}
uses
Windows, Classes,
{$ifdef COMPILER_6_UP}
DesignIntf, DesignEditors, VCLEditors, PropertyCategories,
{$else}
DsgnIntf,
{$endif}
ColnEdit,
VirtualTrees, VTHeaderPopup;
Windows, Classes, DesignIntf, DesignEditors, VCLEditors, PropertyCategories,
ColnEdit, VirtualTrees, VTHeaderPopup;
type
TVirtualTreeEditor = class (TDefaultEditor)
@ -41,18 +29,13 @@ procedure Register;
implementation
uses
{$ifdef COMPILER_5_UP}
StrEdit,
{$else}
StrEditD4,
{$endif COMPILER_5_UP}
Dialogs, TypInfo, SysUtils, Graphics, CommCtrl, ImgList, Controls;
StrEdit, Dialogs, TypInfo, SysUtils, Graphics, CommCtrl, ImgList, Controls;
type
// The usual trick to make a protected property accessible in the ShowCollectionEditor call below.
TVirtualTreeCast = class(TBaseVirtualTree);
TClipboardElement = class(TNestedProperty {$ifdef COMPILER_6_UP}, ICustomPropertyDrawing {$endif COMPILER_6_UP})
TClipboardElement = class(TNestedProperty, ICustomPropertyDrawing)
private
FElement: string;
protected
@ -65,79 +48,37 @@ type
procedure GetValues(Proc: TGetStrProc); override;
procedure SetValue(const Value: string); override;
{$ifdef COMPILER_5_UP}
{$ifdef COMPILER_6_UP}
procedure PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
{$endif COMPILER_6_UP}
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
{$ifndef COMPILER_6_UP} override; {$endif COMPILER_6_UP}
{$endif COMPILER_5_UP}
end;
// This is a special property editor to make the strings in the clipboard format string list
// being shown as subproperties in the object inspector. This way it is shown what formats are actually available
// and the user can pick them with a simple yes/no choice.
{$ifdef COMPILER_6_UP}
TGetPropEditProc = TGetPropProc;
{$endif}
TClipboardFormatsProperty = class(TStringListProperty {$ifdef COMPILER_6_UP}, ICustomPropertyDrawing {$endif COMPILER_6_UP})
TClipboardFormatsProperty = class(TStringListProperty, ICustomPropertyDrawing)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetProperties(Proc: TGetPropEditProc); override;
{$ifdef COMPILER_5_UP}
procedure PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
{$ifndef COMPILER_6_UP} override; {$endif}
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
{$ifndef COMPILER_6_UP} override; {$endif}
{$endif}
end;
// Property categories. They are defined this way only for Delphi 5 & BCB 5.
{$ifdef COMPILER_5}
TVTHeaderCategory = class(TPropertyCategory)
TCheckImageKindProperty = class(TEnumProperty, ICustomPropertyDrawing, ICustomPropertyListDrawing)
public
class function Name: string; override;
class function Description: string; override;
end;
TVTPaintingCategory = class(TPropertyCategory)
public
class function Name: string; override;
class function Description: string; override;
end;
TVTIncrementalSearchCategory = class(TPropertyCategory)
public
class function Name: string; override;
class function Description: string; override;
end;
{$endif COMPILER_5}
TCheckImageKindProperty = class(TEnumProperty {$ifdef COMPILER_6_UP}, ICustomPropertyDrawing, ICustomPropertyListDrawing {$endif COMPILER_6_UP})
public
{$ifdef COMPILER_5_UP}
procedure ListMeasureHeight(const Value: string; Canvas: TCanvas; var AHeight: Integer);
{$ifndef COMPILER_6_UP} override; {$endif}
procedure ListMeasureWidth(const Value: string; ACanvas: TCanvas; var AWidth: Integer);
{$ifndef COMPILER_6_UP} override; {$endif}
procedure ListDrawValue(const Value: string; ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
{$ifndef COMPILER_6_UP} override; {$endif}
{$ifdef COMPILER_6_UP}
procedure PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
{$endif}
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
{$ifndef COMPILER_6_UP} override; {$endif}
{$endif}
end;
{$ifdef COMPILER_6_UP}
resourcestring
sVTHeaderCategoryName = 'Header';
sVTPaintingCategoryName = 'Custom painting';
sVTIncremenalCategoryName = 'Incremental search';
{$endif}
//----------------------------------------------------------------------------------------------------------------------
@ -251,17 +192,15 @@ end;
//----------------------------------------------------------------------------------------------------------------------
{$ifdef COMPILER_5_UP}
procedure DrawBoolean(Checked: Boolean; ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure DrawBoolean(Checked: Boolean; ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
var
var
BoxSize,
EntryWidth: Integer;
R: TRect;
State: Cardinal;
begin
begin
with ACanvas do
begin
FillRect(ARect);
@ -277,36 +216,30 @@ end;
State := State or DFCS_CHECKED;
DrawFrameControl(Handle, R, DFC_BUTTON, State);
end;
end;
end;
//----------------------------------------------------------------------------------------------------------------------
{$ifdef COMPILER_6_UP}
procedure TClipboardElement.PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure TClipboardElement.PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
begin
begin
DefaultPropertyDrawName(Self, ACanvas, ARect);
end;
{$endif COMPILER_6_UP}
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TClipboardElement.PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure TClipboardElement.PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
begin
begin
DrawBoolean(CompareText(GetVisualValue, 'True') = 0, ACanvas, ARect, ASelected);
end;
{$endif COMPILER_5_UP}
end;
//----------------- TClipboardFormatsProperty --------------------------------------------------------------------------
function TClipboardFormatsProperty.GetAttributes: TPropertyAttributes;
begin
Result := inherited GetAttributes + [paSubProperties {$ifdef COMPILER_5_UP}, paFullWidthName {$endif COMPILER_5_UP}];
Result := inherited GetAttributes + [paSubProperties, paFullWidthName];
end;
//----------------------------------------------------------------------------------------------------------------------
@ -328,16 +261,14 @@ end;
//----------------------------------------------------------------------------------------------------------------------
{$ifdef COMPILER_5_UP}
procedure TClipboardFormatsProperty.PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure TClipboardFormatsProperty.PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
var
var
S: string;
Width: Integer;
R: TRect;
begin
begin
with ACanvas do
begin
Font.Name := 'Arial';
@ -356,77 +287,19 @@ end;
Font.Color := clBtnShadow;
ExtTextOut(Handle, R.Left, R.Top, ETO_CLIPPED, @R, PChar(S), Length(S), nil);
end;
end;
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TClipboardFormatsProperty.PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure TClipboardFormatsProperty.PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
begin
begin
// Nothing to do here.
end;
{$endif COMPILER_5_UP}
{$ifdef COMPILER_5}
//----------------- TVTPaintingCategory --------------------------------------------------------------------------------
class function TVTPaintingCategory.Name: string;
begin
Result := 'Custom Painting';
end;
//----------------------------------------------------------------------------------------------------------------------
class function TVTPaintingCategory.Description: string;
begin
Result := 'Custom Painting';
end;
//----------------- TVTHeaderCategory ----------------------------------------------------------------------------------
class function TVTHeaderCategory.Name: string;
begin
Result := 'Header';
end;
//----------------------------------------------------------------------------------------------------------------------
class function TVTHeaderCategory.Description: string;
begin
Result := 'Header';
end;
//----------------- TVTIncrementalSearchCategory -----------------------------------------------------------------------
class function TVTIncrementalSearchCategory.Name: string;
begin
Result := 'Incremental Search';
end;
//----------------------------------------------------------------------------------------------------------------------
class function TVTIncrementalSearchCategory.Description: string;
begin
Result := 'Incremental Search';
end;
//----------------------------------------------------------------------------------------------------------------------
{$endif COMPILER_5}
end;
//----------------- TCheckImageKindProperty ----------------------------------------------------------------------------
{$ifdef COMPILER_5_UP}
const
const
cCheckImageKindComboItemBorder = 0;
cCheckImageKindComboItemSpacing = 2;
cCheckImageKindComboBitmapHeight = 16;
@ -434,43 +307,36 @@ end;
//----------------------------------------------------------------------------------------------------------------------
{$ifdef COMPILER_6_UP}
procedure TCheckImageKindProperty.PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure TCheckImageKindProperty.PropDrawName(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
begin
begin
DefaultPropertyDrawName(Self, ACanvas, ARect);
end;
end;
{$endif}
//----------------------------------------------------------------------------------------------------------------------
procedure TCheckImageKindProperty.PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure TCheckImageKindProperty.PropDrawValue(ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
begin
begin
if GetVisualValue <> '' then
ListDrawValue(GetVisualValue, ACanvas, ARect, ASelected)
else
{$ifdef COMPILER_6_UP}
DefaultPropertyDrawValue(Self, ACanvas, ARect);
{$else}
inherited PropDrawValue(ACanvas, ARect, ASelected);
{$endif}
end;
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TCheckImageKindProperty.ListDrawValue(const Value: string; ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
procedure TCheckImageKindProperty.ListDrawValue(const Value: string; ACanvas: TCanvas; const ARect: TRect; ASelected: Boolean);
var
var
RighPosition: Integer;
OldPenColor: TColor;
CheckKind: TCheckImageKind;
ImageList: TCustomImageList;
RemainingRect: TRect;
begin
begin
RighPosition := ARect.Left + cCheckImageKindComboBitmapWidth;
with ACanvas do
try
@ -489,31 +355,25 @@ end;
Pen.Color := OldPenColor;
finally
RemainingRect := Rect(RighPosition, ARect.Top, ARect.Right, ARect.Bottom);
{$ifdef COMPILER_6_UP}
DefaultPropertyListDrawValue(Value, ACanvas, RemainingRect, ASelected);
{$else}
inherited ListDrawValue(Value, ACanvas, RemainingRect, ASelected);
{$endif}
end;
end;
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TCheckImageKindProperty.ListMeasureHeight(const Value: string; Canvas: TCanvas; var AHeight: Integer);
procedure TCheckImageKindProperty.ListMeasureHeight(const Value: string; Canvas: TCanvas; var AHeight: Integer);
begin
begin
AHeight := cCheckImageKindComboBitmapHeight;
end;
end;
//----------------------------------------------------------------------------------------------------------------------
procedure TCheckImageKindProperty.ListMeasureWidth(const Value: string; ACanvas: TCanvas; var AWidth: Integer);
procedure TCheckImageKindProperty.ListMeasureWidth(const Value: string; ACanvas: TCanvas; var AWidth: Integer);
begin
begin
AWidth := AWidth + cCheckImageKindComboBitmapWidth;
end;
{$endif COMPILER_5_UP}
end;
//----------------------------------------------------------------------------------------------------------------------
@ -527,13 +387,9 @@ begin
RegisterPropertyEditor(TypeInfo(TCheckImageKind), nil, '', TCheckImageKindProperty);
// Categories:
{$ifdef COMPILER_5_UP}
RegisterPropertiesInCategory({$ifdef COMPILER_5} TActionCategory, {$endif} {$ifdef COMPILER_6_UP} sActionCategoryName, {$endif COMPILER_6_UP}
TBaseVirtualTree,
['ChangeDelay',
'EditDelay']);
RegisterPropertiesInCategory(sActionCategoryName, TBaseVirtualTree, ['ChangeDelay', 'EditDelay']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TDataCategory, {$endif} {$ifdef COMPILER_6_UP} sDataCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sDataCategoryName,
TBaseVirtualTree,
['NodeDataSize',
'RootNodeCount',
@ -554,7 +410,7 @@ begin
'OnNewText',
'OnShortenString']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TLayoutCategory, {$endif} {$ifdef COMPILER_6_UP} slayoutCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(slayoutCategoryName,
TBaseVirtualTree,
['AnimationDuration',
'AutoExpandDelay',
@ -573,7 +429,7 @@ begin
'SelectionCurveRadius',
'TextMargin']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TVisualCategory, {$endif} {$ifdef COMPILER_6_UP} sVisualCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sVisualCategoryName,
TBaseVirtualTree,
['Background*',
'ButtonFillMode',
@ -581,11 +437,11 @@ begin
'Colors',
'LineMode']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} THelpCategory, {$endif} {$ifdef COMPILER_6_UP} sHelpCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sHelpCategoryName,
TBaseVirtualTree,
['AccessibleName', 'Hint*', 'On*Hint*', 'On*Help*']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TDragNDropCategory, {$endif} {$ifdef COMPILER_6_UP} sDragNDropCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sDragNDropCategoryName,
TBaseVirtualTree,
['ClipboardFormats',
'DefaultPasteMode',
@ -596,7 +452,7 @@ begin
'OnDragAllowed',
'OnRenderOLEData']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TInputCategory, {$endif} {$ifdef COMPILER_6_UP} sInputCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sInputCategoryName,
TBaseVirtualTree,
['DefaultText',
'DrawSelectionMode',
@ -613,20 +469,19 @@ begin
'OnNodeHeightTracking',
'OnHotChange']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TVTHeaderCategory, {$endif} {$ifdef COMPILER_6_UP} sVTHeaderCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sVTHeaderCategoryName,
TBaseVirtualTree,
['OnHeader*', 'OnGetHeader*']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TVTPaintingCategory, {$endif} {$ifdef COMPILER_6_UP} sVTPaintingCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sVTPaintingCategoryName,
TBaseVirtualTree,
['On*Paint*',
'OnDraw*',
'On*Erase*']);
RegisterPropertiesInCategory({$ifdef COMPILER_5} TVTIncrementalSearchCategory, {$endif} {$ifdef COMPILER_6_UP} sVTIncremenalCategoryName, {$endif COMPILER_6_UP}
RegisterPropertiesInCategory(sVTIncremenalCategoryName,
TBaseVirtualTree,
['*Incremental*']);
{$endif COMPILER_5_UP}
end;
//----------------------------------------------------------------------------------------------------------------------

View File

@ -19,6 +19,7 @@ uses
{$ifndef COMPILER_10_UP}
MSAAIntf, // MSAA support for Delphi up to 2005
{$else}
Types,
oleacc, // MSAA support in Delphi 2006 or higher
{$endif COMPILER_10_UP}
VirtualTrees, VTAccessibilityFactory, Controls;
@ -28,6 +29,8 @@ type
private
FVirtualTree: TVirtualStringTree;
public
constructor Create(AVirtualTree: TVirtualStringTree);
{ IAccessibility }
function Get_accParent(out ppdispParent: IDispatch): HResult; stdcall;
function Get_accChildCount(out pcountChildren: Integer): HResult; stdcall;
@ -61,7 +64,6 @@ type
function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
Flags: Word; var Params; VarResult: Pointer; ExcepInfo: Pointer;
ArgErr: Pointer): HRESULT; stdcall;
constructor Create(VirtualTree: TVirtualStringTree);
end;
TVirtualTreeItemAccessibility = class(TVirtualTreeAccessibility, IAccessible)
@ -78,9 +80,6 @@ type
function accLocation(out pxLeft: Integer;
out pyTop: Integer; out pcxWidth: Integer;
out pcyHeight: Integer; varChild: OleVariant): HResult; stdcall;
constructor Create(VirtualTree: TVirtualStringTree);
function Get_accFocus(out pvarChild: OleVariant): HRESULT; stdcall;
end;
@ -94,23 +93,35 @@ type
end;
TVTDefaultAccessibleProvider = class(TInterfacedObject, IVTAccessibleProvider)
public
function CreateIAccessible(ATree: TBaseVirtualTree): IAccessible;
end;
TVTDefaultAccessibleItemProvider = class(TInterfacedObject, IVTAccessibleProvider)
public
function CreateIAccessible(ATree: TBaseVirtualTree): IAccessible;
end;
TVTMultiColumnAccessibleItemProvider = class(TInterfacedObject, IVTAccessibleProvider)
public
function CreateIAccessible(ATree: TBaseVirtualTree): IAccessible;
end;
implementation
uses SysUtils, Forms, Variants, Math;
uses
SysUtils, Forms, Variants, Math;
{ TVirtualTreeAccessibility }
//----------------------------------------------------------------------------------------------------------------------
constructor TVirtualTreeAccessibility.Create(AVirtualTree: TVirtualStringTree);
// assigns the parent and current fields, and lets the control's IAccessible object know its address.
begin
inherited Create;
FVirtualTree := AVirtualTree;
end;
//----------------------------------------------------------------------------------------------------------------------
function TVirtualTreeAccessibility.accDoDefaultAction(varChild: OleVariant): HResult;
@ -176,7 +187,7 @@ begin
// return the location of the focused node
if (FVirtualTree <> nil) and (FVirtualTree.AccessibleItem <> nil) then
begin
RESULT := FVirtualTree.AccessibleItem.accLocation(pxLeft,pyTop,pcxWidth,pcyHeight,CHILDID_SELF);
Result := FVirtualTree.AccessibleItem.accLocation(pxLeft, pyTop, pcxWidth, pcyHeight, CHILDID_SELF);
end;
end;
end;
@ -202,13 +213,6 @@ begin
end;
end;
//----------------------------------------------------------------------------------------------------------------------
constructor TVirtualTreeAccessibility.Create(VirtualTree: TVirtualStringTree);
// assigns the parent and current fields, and lets the control's iAccessible object know its address.
begin
fVirtualTree := VirtualTree;
end;
//----------------------------------------------------------------------------------------------------------------------
function TVirtualTreeAccessibility.GetIDsOfNames(const IID: TGUID;
Names: Pointer; NameCount, LocaleID: Integer; DispIDs: Pointer): HRESULT;
@ -284,15 +288,11 @@ begin
if fVirtualTree <> nil then
begin
if FVirtualTree.FocusedNode <> nil then
begin
pvarChild := fVirtualTree.AccessibleItem;
result := s_OK;
end
else begin
pvarChild := FVirtualTree.AccessibleItem
else
pvarChild := childid_self;
result := S_OK;
end;
end;
end;
//----------------------------------------------------------------------------------------------------------------------
@ -354,7 +354,7 @@ begin
// return the name for the inner accessible item
if (FVirtualTree <> nil) and (FVirtualTree.AccessibleItem <> nil) then
begin
RESULT := FVirtualTree.AccessibleItem.Get_accName(CHILDID_SELF,pszName);
Result := FVirtualTree.AccessibleItem.Get_accName(CHILDID_SELF, pszName);
end;
end;
end;
@ -363,9 +363,9 @@ end;
function TVirtualTreeAccessibility.Get_accParent(out ppdispParent: IDispatch): HResult;
// Returns false, the tree itself does not have a parent.
var
hParent :HWND;
hParent: HWND;
begin
Result :=E_INVALIDARG;
Result := E_INVALIDARG;
ppdispParent := nil;
// Addition - Simon Moscrop 7/5/2009
@ -392,7 +392,7 @@ begin
if varChild = CHILDID_SELF then
begin
if FVirtualTree <> nil then
pvarRole := ROLE_SYSTEM_OUTLINE
pvarRole := ROLE_SYSTEM_OUTLINE;
end
else if VarType(varChild) = VT_I4 then
begin
@ -438,7 +438,7 @@ begin
// return the state of the inner accessible item
if (FVirtualTree <> nil) and (FVirtualTree.AccessibleItem <> nil) then
begin
RESULT := FVirtualTree.AccessibleItem.Get_accState(CHILDID_SELF,pVarState)
Result := FVirtualTree.AccessibleItem.Get_accState(CHILDID_SELF, pVarState);
end
else
RESULT := E_INVALIDARG;
@ -497,7 +497,7 @@ begin
begin
if FVirtualTree.FocusedNode <> nil then
begin
DisplayRect := FVirtualTree.GetDisplayRect(FVirtualTree.FocusedNode, FVirtualTree.Header.Columns.GetFirstVisibleColumn, TRUE, FALSE);//Use fisrt visible column instead of -1
DisplayRect := FVirtualTree.GetDisplayRect(FVirtualTree.FocusedNode, FVirtualTree.Header.Columns.GetFirstVisibleColumn, True, False);//Use first visible column instead of -1
P := FVirtualTree.ClientToScreen(DisplayRect.TopLeft);
pxLeft := P.X;
pyTop := P.Y;
@ -508,13 +508,6 @@ begin
end;
end;
//----------------------------------------------------------------------------------------------------------------------
constructor TVirtualTreeItemAccessibility.Create(VirtualTree: TVirtualStringTree);
// sets up the parent/child relationship.
begin
fVirtualTree := VirtualTree;
end;
//----------------------------------------------------------------------------------------------------------------------
function TVirtualTreeItemAccessibility.Get_accChild(varChild: OleVariant; out ppdispChild: IDispatch): HResult;
// the item does not have children. Returning false.
@ -539,8 +532,7 @@ begin
end;
//----------------------------------------------------------------------------------------------------------------------
function TVirtualTreeItemAccessibility.Get_accFocus(
out pvarChild: OleVariant): HRESULT;
function TVirtualTreeItemAccessibility.Get_accFocus(out pvarChild: OleVariant): HResult;
begin
// must override this or we get an infinite loop when using MS narrator
// when navigating using the arrow keys.
@ -556,7 +548,7 @@ function TVirtualTreeItemAccessibility.Get_accName(varChild: OleVariant; out psz
// the name is the node's caption.
var
kind: TVTImageKind;
sTemp: WideString;
ImgText: WideString;
begin
pszName := '';
Result := S_FALSE;
@ -567,9 +559,9 @@ begin
begin
for kind := ikNormal to ikOverlay do
begin
sTemp := FVirtualTree.ImageText[FVirtualTree.FocusedNode, Kind, FVirtualTree.Header.MainColumn];
if sTemp <> '' then
pszName := pszName + sTemp + ' ';
ImgText := FVirtualTree.ImageText[FVirtualTree.FocusedNode, Kind, FVirtualTree.Header.MainColumn];
if ImgText <> '' then
pszName := pszName + ImgText + ' ';
end;
pszName := pszName + FVirtualTree.Text[FVirtualTree.FocusedNode, FVirtualTree.Header.MainColumn];
result := S_OK;
@ -603,7 +595,7 @@ begin
if varChild = childid_self then
begin
if FVirtualTree <> nil then
pvarRole := ROLE_SYSTEM_OUTLINEITEM
pvarRole := ROLE_SYSTEM_OUTLINEITEM;
end;
end;
@ -663,7 +655,7 @@ function TVTMultiColumnItemAccessibility.GetItemDescription(
IncludeMainColumn: boolean): HResult;
var
I: Integer;
sTemp, sTemp2: WideString;
ImgText: WideString;
kind: TVTImageKind;
begin
pszDescription := '';
@ -677,28 +669,27 @@ begin
begin
for kind := ikNormal to ikOverlay do
begin
sTemp2 := FVirtualTree.ImageText[FVirtualTree.FocusedNode, Kind, FVirtualTree.Header.MainColumn];
if sTemp2 <> '' then
sTemp2 := sTemp2 + ' ';
ImgText := FVirtualTree.ImageText[FVirtualTree.FocusedNode, Kind, FVirtualTree.Header.MainColumn];
if ImgText <> '' then
ImgText := ImgText + ' ';
end;
pszDescription := sTemp2 + FVirtualTree.Text[FVirtualTree.FocusedNode, FVirtualTree.Header.MainColumn]
+'; ';
pszDescription := ImgText + FVirtualTree.Text[FVirtualTree.FocusedNode, FVirtualTree.Header.MainColumn] + '; ';
end;
for I := 0 to FVirtualTree.Header.Columns.Count - 1 do
if (FVirtualTree.Header.MainColumn <> I) and (coVisible in FVirtualTree.Header.Columns[I].Options) then
begin
for kind := ikNormal to ikOverlay do
begin
sTemp2 := FVirtualTree.ImageText[FVirtualTree.FocusedNode, Kind, I];
if sTemp2 <> '' then
sTemp := sTemp2 + ' ';
ImgText := FVirtualTree.ImageText[FVirtualTree.FocusedNode, Kind, I];
if ImgText <> '' then
ImgText := ImgText + ' ';
end;
sTemp := sTemp + FVirtualTree.Text[FVirtualTree.FocusedNode, I];
if sTemp <> '' then
ImgText := ImgText + FVirtualTree.Text[FVirtualTree.FocusedNode, I];
if ImgText <> '' then
pszDescription := pszDescription
+FVirtualTree.Header.Columns[I].Text
+': '
+sTemp
+ ImgText
+'; ';
end;
if pszDescription <> '' then
@ -727,24 +718,21 @@ end;
{ TVTDefaultAccessibleProvider }
function TVTDefaultAccessibleProvider.CreateIAccessible(
ATree: TBaseVirtualTree): IAccessible;
function TVTDefaultAccessibleProvider.CreateIAccessible(ATree: TBaseVirtualTree): IAccessible;
begin
result := TVirtualTreeAccessibility.Create(TVirtualStringTree(ATree));
end;
{ TVTDefaultAccessibleItemProvider }
function TVTDefaultAccessibleItemProvider.CreateIAccessible(
ATree: TBaseVirtualTree): IAccessible;
function TVTDefaultAccessibleItemProvider.CreateIAccessible(ATree: TBaseVirtualTree): IAccessible;
begin
result := TVirtualTreeItemAccessibility.Create(TVirtualStringTree(ATree));
end;
{ TVTMultiColumnAccessibleItemProvider }
function TVTMultiColumnAccessibleItemProvider.CreateIAccessible(
ATree: TBaseVirtualTree): IAccessible;
function TVTMultiColumnAccessibleItemProvider.CreateIAccessible(ATree: TBaseVirtualTree): IAccessible;
begin
result := nil;
if TVirtualStringTree(ATree).Header.UseColumns then
@ -752,33 +740,34 @@ begin
end;
var
IDefaultAccessibleProvider: TVTDefaultAccessibleProvider;
IDefaultAccessibleItemProvider: TVTDefaultAccessibleItemProvider;
IMultiColumnAccessibleProvider: TVTMultiColumnAccessibleItemProvider;
DefaultAccessibleProvider: TVTDefaultAccessibleProvider;
DefaultAccessibleItemProvider: TVTDefaultAccessibleItemProvider;
MultiColumnAccessibleProvider: TVTMultiColumnAccessibleItemProvider;
initialization
if IDefaultAccessibleProvider = nil then
if DefaultAccessibleProvider = nil then
begin
IDefaultAccessibleProvider := TVTDefaultAccessibleProvider.Create;
GetAccessibilityFactory.RegisterAccessibleProvider(IDefaultAccessibleProvider);
DefaultAccessibleProvider := TVTDefaultAccessibleProvider.Create;
GetAccessibilityFactory.RegisterAccessibleProvider(DefaultAccessibleProvider);
end;
if IDefaultAccessibleItemProvider = nil then
if DefaultAccessibleItemProvider = nil then
begin
IDefaultAccessibleItemProvider := TVTDefaultAccessibleItemProvider.Create;
GetAccessibilityFactory.RegisterAccessibleProvider(IDefaultAccessibleItemProvider);
DefaultAccessibleItemProvider := TVTDefaultAccessibleItemProvider.Create;
GetAccessibilityFactory.RegisterAccessibleProvider(DefaultAccessibleItemProvider);
end;
if IMultiColumnAccessibleProvider = nil then
if MultiColumnAccessibleProvider = nil then
begin
IMultiColumnAccessibleProvider := TVTMultiColumnAccessibleItemProvider.Create;
GetAccessibilityFactory.RegisterAccessibleProvider(IMultiColumnAccessibleProvider);
MultiColumnAccessibleProvider := TVTMultiColumnAccessibleItemProvider.Create;
GetAccessibilityFactory.RegisterAccessibleProvider(MultiColumnAccessibleProvider);
end;
finalization
GetAccessibilityFactory.UnRegisterAccessibleProvider(IMultiColumnAccessibleProvider);
IMultiColumnAccessibleProvider := nil;
GetAccessibilityFactory.UnRegisterAccessibleProvider(IDefaultAccessibleItemProvider);
IDefaultAccessibleItemProvider := nil;
GetAccessibilityFactory.UnRegisterAccessibleProvider(IDefaultAccessibleProvider);
IDefaultAccessibleProvider := nil;
GetAccessibilityFactory.UnRegisterAccessibleProvider(MultiColumnAccessibleProvider);
MultiColumnAccessibleProvider := nil;
GetAccessibilityFactory.UnRegisterAccessibleProvider(DefaultAccessibleItemProvider);
DefaultAccessibleItemProvider := nil;
GetAccessibilityFactory.UnRegisterAccessibleProvider(DefaultAccessibleProvider);
DefaultAccessibleProvider := nil;
end.

View File

@ -50,14 +50,13 @@ implementation
var
VTAccessibleFactory: TVTAccessibilityFactory = nil;
AccessibilityAvailable: boolean = false;
AccessibilityAvailable: Boolean = False;
{ TVTAccessibilityFactory }
constructor TVTAccessibilityFactory.Create;
begin
inherited;
inherited Create;
FAccessibleProviders := TInterfaceList.Create;
FAccessibleProviders.Clear;
end;
@ -77,15 +76,15 @@ var
// We'll work top to bottom, from the most complicated to the most simple.
// The index for these should all be greater than 0, e g the IAccessible for the tree itself should always be registered first, then any IAccessible items.
begin
result := nil;
Result := nil;
if ATree <> nil then
begin
if ATree.Accessible = nil then
begin
if FAccessibleProviders.Count > 0 then
begin
result := IVTAccessibleProvider(FAccessibleProviders.Items[0]).CreateIAccessible(ATree);
exit;
Result := IVTAccessibleProvider(FAccessibleProviders.Items[0]).CreateIAccessible(ATree);
Exit;
end;
end;
if ATree.AccessibleItem = nil then
@ -97,20 +96,19 @@ begin
TmpIAccessible := IVTAccessibleProvider(FAccessibleProviders.Items[I]).CreateIAccessible(ATree);
if TmpIAccessible <> nil then
begin
result := TmpIAccessible;
break;
Result := TmpIAccessible;
Break;
end;
end;
if TmpIAccessible = nil then
begin
result := IVTAccessibleProvider(FAccessibleProviders.Items[0]).CreateIAccessible(ATree);
Result := IVTAccessibleProvider(FAccessibleProviders.Items[0]).CreateIAccessible(ATree);
end;
end;
end
else begin
else
Result := ATree.AccessibleItem;
end;
end;
end;
destructor TVTAccessibilityFactory.Destroy;
@ -120,7 +118,7 @@ begin
{$ifndef COMPILER_10_UP}
FreeAccLibrary;
{$endif COMPILER_10_UP}
inherited;
inherited Destroy;
end;
procedure TVTAccessibilityFactory.RegisterAccessibleProvider(
@ -157,15 +155,15 @@ begin
// Check to see if the class has already been created.
if VTAccessibleFactory = nil then
VTAccessibleFactory := TVTAccessibilityFactory.Create;
result := VTAccessibleFactory;
Result := VTAccessibleFactory;
end
else
result := nil;
Result := nil;
end;
initialization
finalization
VTAccessibleFactory.free;
VTAccessibleFactory.Free;
end.

View File

@ -68,7 +68,7 @@ unit VTHeaderPopup;
{$ifdef COMPILER_12_UP}
{$WARN IMPLICIT_STRING_CAST OFF}
{$WARN IMPLICIT_STRING_CAST_LOSS OFF}
{$endif COMPILER_7_UP}
{$endif COMPILER_12_UP}
interface

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,35 @@
//----------------------------------------------------------------------------------------------------------------------
// Include file to determine which compiler is currently being used to build the project/component.
// This file uses ideas from Brad Stowers DFS.inc file (www.delphifreestuff.com).
// This file uses ideas from Brad Stowers DFS.inc file.
//
// Portions created by Mike Lischke are
// Copyright (C) 1999, 2008 Mike Lischke. All Rights Reserved.
// Portions created by Jim Kueneman are
// Copyright (C) 2005, 2008 Jim Kueneman. All Rights Reserved.
//
// Portions created by Mike Lischke are Copyright
// (C) 1999-2003 Dipl. Ing. Mike Lischke. All Rights Reserved.
//----------------------------------------------------------------------------------------------------------------------
//
// This unit is released under the MIT license:
// Copyright (c) 1999, 2008 Mike Lischke (support@soft-gems.net, www.soft-gems.net).
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
// Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// You are asked to give the author(s) the due credit. This means that you acknowledge the work of the author(s)
// in the product documentation, about box, help or wherever a prominent place is.
//
//----------------------------------------------------------------------------------------------------------------------
//
// The following symbols are defined:
//
// - COMPILER_1 : Kylix/Delphi/BCB 1.x is the compiler.
@ -15,8 +40,8 @@
// - COMPILER_3_UP : Kylix/Delphi/BCB 3.x or higher is the compiler.
// - COMPILER_4 : Kylix/Delphi/BCB 4.x is the compiler.
// - COMPILER_4_UP : Kylix/Delphi/BCB 4.x or higher is the compiler.
// - COMPILER_5 : Kylix/Delphi/BCB 5.x/FreePascal is the compiler.
// - COMPILER_5_UP : Kylix/Delphi/BCB 5.x/FreePascal or higher is the compiler.
// - COMPILER_5 : Kylix/Delphi/BCB 5.x is the compiler.
// - COMPILER_5_UP : Kylix/Delphi/BCB 5.x or higher is the compiler.
// - COMPILER_6 : Kylix/Delphi/BCB 6.x is the compiler.
// - COMPILER_6_UP : Kylix/Delphi/BCB 6.x or higher is the compiler.
// - COMPILER_7 : Kylix/Delphi/BCB 7.x is the compiler.
@ -26,9 +51,15 @@
// - COMPILER_9 : Kylix/Delphi/BCB 9.x is the compiler.
// - COMPILER_9_UP : Kylix/Delphi/BCB 9.x or higher is the compiler.
// - COMPILER_10 : Kylix/Delphi/BCB 10.x is the compiler.
// - COMPILER_10_UP: Kylix/Delphi/BCB 10.x or higher is the compiler.
// - COMPILER_10_UP : Kylix/Delphi/BCB 10.x or higher is the compiler.
// - COMPILER_11 : Kylix/Delphi/BCB 11.x is the compiler.
// - COMPILER_11_UP: Kylix/Delphi/BCB 11.x or higher is the compiler.
// - COMPILER_11_UP : Kylix/Delphi/BCB 11.x or higher is the compiler.
// - COMPILER_12 : Kylix/Delphi/BCB 12.x is the compiler.
// - COMPILER_12_UP : Kylix/Delphi/BCB 12.x or higher is the compiler.
// - COMPILER_14 : Kylix/Delphi/BCB 14.x is the compiler.
// - COMPILER_14_UP : Kylix/Delphi/BCB 14.x or higher is the compiler.
// - COMPILER_15 : Kylix/Delphi/BCB 15.x is the compiler.
// - COMPILER_15_UP : Kylix/Delphi/BCB 15.x or higher is the compiler.
//
// Only defined if Windows is the target:
// - CPPB : Any version of BCB is being used.
@ -41,6 +72,7 @@
// - CPPB_5_UP : BCB v5.x or higher is being used.
// - CPPB_6 : BCB v6.x is being used.
// - CPPB_6_UP : BCB v6.x or higher is being used.
// - CPPB_XXX is not used any more, use the COMPILER_XXX defines
//
// Only defined if Windows is the target:
// - DELPHI : Any version of Delphi is being used.
@ -61,10 +93,7 @@
// - DELPHI_8_UP : Delphi v8.x or higher is being used.
// - DELPHI_9 : Delphi v9.x is being used.
// - DELPHI_9_UP : Delphi v9.x or higher is being used.
// - DELPHI_10 : Delphi v10.x is being used.
// - DELPHI_10_UP: Delphi v10.x or higher is being used.
// - DELPHI_11 : Delphi v11.x is being used.
// - DELPHI_11_UP: Delphi v11.x or higher is being used.
// - DELPHI_XXX is not used any more, use the COMPILER_XXX defines
//
// Only defined if Linux is the target:
// - KYLIX : Any version of Kylix is being used.
@ -96,39 +125,34 @@
{$endif DELPHI.NET_1}
{$endif CLR}
// Consider FreePascal compiler to be roughly equivalent to version 5.
{$ifdef FPC}
{$define COMPILER_5}
{$endif}
{$ifdef Win32}
// Compiler defines not specific to a particlular platform.
// RAD Studio XE (BDS 8.0) DELPHI and BCB are no longer defined, only COMPILER
{$ifdef VER220}
{$define COMPILER_15}
{$endif VER220}
// RAD Studio 2010 (BDS 7.0) DELPHI and BCB are no longer defined, only COMPILER
{$ifdef VER210}
{$define COMPILER_14}
{$define DELPHI}
{$define DELPHI_14}
{$endif}
{$endif VER210}
// RAD Studio 2009 (BDS 6.0) DELPHI and BCB are no longer defined, only COMPILER
{$ifdef VER200}
{$define COMPILER_12}
{$define DELPHI}
{$define DELPHI_12}
{$endif}
{$endif VER200}
// RAD Studio 2007 (BDS 5.0) DELPHI and BCB are no longer defined, only COMPILER
{$ifdef VER190}
{$define COMPILER_11}
{$define DELPHI}
{$define DELPHI_11}
{$endif}
{$endif VER190}
// DELPHI and BCB are no longer defined, only COMPILER
{$ifdef VER180}
{$define COMPILER_10}
{$define DELPHI}
{$define DELPHI_10}
{$endif}
{$endif VER180}
{$ifdef VER170}
{$define COMPILER_9}
@ -272,60 +296,6 @@
{$define DELPHI_9_UP}
{$endif}
{$ifdef DELPHI_10}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define DELPHI_10_UP}
{$endif}
{$ifdef DELPHI_11}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define DELPHI_10_UP}
{$define DELPHI_11_UP}
{$endif}
{$ifdef DELPHI_12}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define DELPHI_10_UP}
{$define DELPHI_11_UP}
{$define DELPHI_12_UP}
{$endif}
{$ifdef DELPHI_14}
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define DELPHI_10_UP}
{$define DELPHI_11_UP}
{$define DELPHI_12_UP}
{$define DELPHI_14_UP}
{$endif}
{$ifdef CPPB_3}
{$define CPPB_3_UP}
{$endif}
@ -353,9 +323,8 @@
{$ObjExportAll On}
{$endif}
{$else}
// not Windows, eg. Linux is the target
// Other things to check: 'if LINUX' and 'if FREEBSD'.
{$else (not Windows)}
// Linux is the target
{$define QT_CLX}
{$define KYLIX}
@ -392,19 +361,17 @@
{$endif}
{$ifdef KYLIX_2}
{$define KYLIX_1_UP}
{$define KYLIX_2_UP}
{$endif}
{$ifdef KYLIX_3}
{$define KYLIX_1_UP}
{$define KYLIX_2_UP}
{$define KYLIX_3_UP}
{$endif}
{$endif}
{$endif Win32}
// Compiler defines not specific to a particular platform.
{$ifdef COMPILER_1}
{$define COMPILER_1_UP}
{$endif}
@ -488,6 +455,26 @@
{$define COMPILER_8_UP}
{$define COMPILER_9_UP}
{$define COMPILER_10_UP}
// Backwards compatibility
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$ifdef BCB}
{$define CPPB}
{$else}
{$define DELPHI}
{$endif}
{$endif}
{$ifdef COMPILER_11}
@ -502,8 +489,29 @@
{$define COMPILER_9_UP}
{$define COMPILER_10_UP}
{$define COMPILER_11_UP}
// Backwards compatibility
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$ifdef BCB}
{$define CPPB}
{$else}
{$define DELPHI}
{$endif}
{$endif}
{$ifdef COMPILER_12}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
@ -517,6 +525,63 @@
{$define COMPILER_10_UP}
{$define COMPILER_11_UP}
{$define COMPILER_12_UP}
// Backwards compatibility
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$ifdef BCB}
{$define CPPB}
{$else}
{$define DELPHI}
{$endif}
{$endif}
{$ifdef COMPILER_13}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
{$define COMPILER_4_UP}
{$define COMPILER_5_UP}
{$define COMPILER_6_UP}
{$define COMPILER_7_UP}
{$define COMPILER_8_UP}
{$define COMPILER_9_UP}
{$define COMPILER_10_UP}
{$define COMPILER_11_UP}
{$define COMPILER_12_UP}
{$define COMPILER_13_UP}
// Backwards compatibility
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$ifdef BCB}
{$define CPPB}
{$else}
{$define DELPHI}
{$endif}
{$endif}
{$ifdef COMPILER_14}
@ -532,10 +597,34 @@
{$define COMPILER_10_UP}
{$define COMPILER_11_UP}
{$define COMPILER_12_UP}
{$define COMPILER_13_UP}
{$define COMPILER_14_UP}
// Backwards compatibility
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$ifdef BCB}
{$define CPPB}
{$else}
{$define DELPHI}
{$endif}
{$endif}
{$ifdef COMPILER_15}
// RAD Studio XE
{$ifdef conditionalexpressions}
{$if CompilerVersion >= 22}
{$define COMPILER_1_UP}
{$define COMPILER_2_UP}
{$define COMPILER_3_UP}
@ -548,15 +637,29 @@
{$define COMPILER_10_UP}
{$define COMPILER_11_UP}
{$define COMPILER_12_UP}
{$define COMPILER_13_UP}
{$define COMPILER_14_UP}
{$define COMPILER_15_UP}
{$endif}
// Backwards compatibility
{$define DELPHI_2_UP}
{$define DELPHI_3_UP}
{$define DELPHI_4_UP}
{$define DELPHI_5_UP}
{$define DELPHI_6_UP}
{$define DELPHI_7_UP}
{$define DELPHI_8_UP}
{$define DELPHI_9_UP}
{$define CPPB_3_UP}
{$define CPPB_4_UP}
{$define CPPB_5_UP}
{$define CPPB_6_UP}
{$ifndef COMPILER_1_UP}
// Die on unknown compiler.
ERROR: Unknown compiler - please update detection logic.
{$ifdef BCB}
{$define CPPB}
{$else}
{$define DELPHI}
{$endif}
{$ifend}
{$endif}
//----------------------------------------------------------------------------------------------------------------------

View File

@ -82,7 +82,6 @@ object connform: Tconnform
Anchors = [akLeft, akTop, akBottom]
EditDelay = 250
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11

View File

@ -92,7 +92,6 @@ object CopyTableForm: TCopyTableForm
Height = 88
Anchors = [akLeft, akTop, akRight, akBottom]
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11

View File

@ -102,7 +102,6 @@ object frmInsertFiles: TfrmInsertFiles
Anchors = [akLeft, akTop, akRight]
EditDelay = 0
Header.AutoSizeIndex = 2
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11
@ -180,7 +179,6 @@ object frmInsertFiles: TfrmInsertFiles
Height = 128
Anchors = [akLeft, akTop, akRight, akBottom]
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11

View File

@ -407,7 +407,6 @@ object MainForm: TMainForm
DragMode = dmAutomatic
DragType = dtVCL
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11
@ -621,7 +620,6 @@ object MainForm: TMainForm
Height = 273
Align = alClient
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
Header.PopupMenu = popupListHeader
@ -705,7 +703,6 @@ object MainForm: TMainForm
Align = alClient
DragOperations = []
Header.AutoSizeIndex = 1
Header.DefaultHeight = 17
Header.Height = 20
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
@ -757,7 +754,6 @@ object MainForm: TMainForm
Align = alClient
DragOperations = []
Header.AutoSizeIndex = 1
Header.DefaultHeight = 17
Header.Height = 20
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
@ -829,7 +825,6 @@ object MainForm: TMainForm
Height = 200
Align = alClient
Header.AutoSizeIndex = 7
Header.DefaultHeight = 17
Header.Height = 20
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
@ -976,7 +971,6 @@ object MainForm: TMainForm
Height = 273
Align = alClient
Header.AutoSizeIndex = 4
Header.DefaultHeight = 17
Header.Height = 20
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
@ -1049,7 +1043,6 @@ object MainForm: TMainForm
Align = alClient
EditDelay = 500
Header.AutoSizeIndex = -1
Header.DefaultHeight = 17
Header.Height = 20
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
@ -1418,7 +1411,6 @@ object MainForm: TMainForm
AutoScrollDelay = 50
EditDelay = 0
Header.AutoSizeIndex = -1
Header.DefaultHeight = 17
Header.Height = 20
Header.Images = ImageListMain
Header.MainColumn = -1
@ -1550,7 +1542,6 @@ object MainForm: TMainForm
DragMode = dmAutomatic
DragType = dtVCL
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11
@ -1600,7 +1591,6 @@ object MainForm: TMainForm
AutoScrollDelay = 50
EditDelay = 0
Header.AutoSizeIndex = -1
Header.DefaultHeight = 17
Header.Height = 20
Header.Images = ImageListMain
Header.MainColumn = -1

View File

@ -887,7 +887,6 @@ object optionsform: Toptionsform
Height = 353
Align = alLeft
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11

View File

@ -258,7 +258,6 @@ object frmRoutineEditor: TfrmRoutineEditor
DragType = dtVCL
EditDelay = 0
Header.AutoSizeIndex = 1
Header.DefaultHeight = 17
Header.MainColumn = 1
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoVisible]
Header.ParentFont = True

View File

@ -44,7 +44,6 @@ object frmSelectDBObject: TfrmSelectDBObject
Height = 206
Anchors = [akLeft, akTop, akRight, akBottom]
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11

View File

@ -102,7 +102,6 @@ object frmSQLhelp: TfrmSQLhelp
Margins.Bottom = 0
Align = alClient
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11

View File

@ -43,7 +43,6 @@ object frmSyncDB: TfrmSyncDB
AccessibleName = 'tree'
Anchors = [akLeft, akTop, akBottom]
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11
@ -206,7 +205,6 @@ object frmSyncDB: TfrmSyncDB
Height = 115
Anchors = [akLeft, akTop, akRight, akBottom]
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11

View File

@ -61,7 +61,6 @@ object frmTableEditor: TfrmTableEditor
DragMode = dmAutomatic
EditDelay = 0
Header.AutoSizeIndex = -1
Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoVisible]
Header.ParentFont = True
Header.PopupMenu = MainForm.popupListHeader
@ -398,7 +397,6 @@ object frmTableEditor: TfrmTableEditor
DragMode = dmAutomatic
EditDelay = 0
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
Images = MainForm.ImageListMain
@ -561,7 +559,6 @@ object frmTableEditor: TfrmTableEditor
Align = alClient
EditDelay = 0
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
Images = MainForm.ImageListMain

View File

@ -70,7 +70,6 @@ object frmTableTools: TfrmTableTools
Height = 336
Align = alLeft
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Font.Charset = DEFAULT_CHARSET
Header.Font.Color = clWindowText
Header.Font.Height = -11
@ -119,7 +118,6 @@ object frmTableTools: TfrmTableTools
Height = 191
Align = alClient
Header.AutoSizeIndex = -1
Header.DefaultHeight = 17
Header.Images = MainForm.ImageListMain
Header.MainColumn = -1
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]

View File

@ -104,7 +104,6 @@ object UserManagerForm: TUserManagerForm
Height = 275
Align = alClient
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
Header.SortColumn = 0
@ -224,7 +223,6 @@ object UserManagerForm: TUserManagerForm
Height = 149
Align = alClient
Header.AutoSizeIndex = 0
Header.DefaultHeight = 17
Header.MainColumn = -1
Header.ParentFont = True
Images = MainForm.ImageListMain