Added: X2MenuBar component + musikCube painter
This commit is contained in:
parent
72f9725251
commit
430d01900e
0
Lib/D2006/placeholder.txt
Normal file
0
Lib/D2006/placeholder.txt
Normal file
0
Lib/D7/placeholder.txt
Normal file
0
Lib/D7/placeholder.txt
Normal file
@ -21,7 +21,8 @@ uses
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('X²Software', [TX2GraphicContainer, TX2GraphicList]);
|
||||
RegisterComponents('X2Software', [TX2GraphicContainer, TX2GraphicList]);
|
||||
|
||||
RegisterPropertyEditor(TypeInfo(TX2GraphicCollection), TX2GraphicContainer, 'Graphics', TX2GraphicsProperty);
|
||||
RegisterComponentEditor(TX2GraphicContainer, TX2GraphicContainerEditor);
|
||||
RegisterComponentEditor(TX2GraphicList, TX2GraphicListEditor);
|
||||
|
29
Packages/X2CLMBReg.pas
Normal file
29
Packages/X2CLMBReg.pas
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
:: Registers the MenuBar components
|
||||
::
|
||||
:: Last changed: $Date$
|
||||
:: Revision: $Rev$
|
||||
:: Author: $Author$
|
||||
}
|
||||
unit X2CLMBReg;
|
||||
|
||||
interface
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
uses
|
||||
Classes,
|
||||
DesignIntf,
|
||||
X2CLMenuBar,
|
||||
X2CLmusikCubePainter;
|
||||
|
||||
{.$R ..\Resources\MenuBar.dcr}
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('X2Software', [TX2MenuBar,
|
||||
TX2MenuBarmusikCubePainter]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
1306
Source/X2CLMenuBar.pas
Normal file
1306
Source/X2CLMenuBar.pas
Normal file
File diff suppressed because it is too large
Load Diff
627
Source/X2CLmusikCubePainter.pas
Normal file
627
Source/X2CLmusikCubePainter.pas
Normal file
@ -0,0 +1,627 @@
|
||||
{
|
||||
:: Implements a musikCube-style painter for the X2MenuBar.
|
||||
::
|
||||
:: Last changed: $Date$
|
||||
:: Revision: $Rev$
|
||||
:: Author: $Author$
|
||||
}
|
||||
unit X2CLmusikCubePainter;
|
||||
|
||||
interface
|
||||
uses
|
||||
Classes,
|
||||
Graphics,
|
||||
ImgList,
|
||||
Windows,
|
||||
|
||||
X2CLMenuBar;
|
||||
|
||||
type
|
||||
// #ToDo1 (MvR) 19-3-2006: IsStored implementations
|
||||
// #ToDo1 (MvR) 19-3-2006: cache positions
|
||||
TX2MenuBarmCColor = class(TPersistent)
|
||||
private
|
||||
FBorderAlpha: Byte;
|
||||
FBorderColor: TColor;
|
||||
FFillAlpha: Byte;
|
||||
FFillColor: TColor;
|
||||
FOnChange: TNotifyEvent;
|
||||
|
||||
procedure SetBorderAlpha(const Value: Byte);
|
||||
procedure SetBorderColor(const Value: TColor);
|
||||
procedure SetFillAlpha(const Value: Byte);
|
||||
procedure SetFillColor(const Value: TColor);
|
||||
protected
|
||||
procedure DoChange();
|
||||
|
||||
function MixColors(ABackColor, AForeColor: TColor; AAlpha: Byte): TColor;
|
||||
|
||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||
public
|
||||
constructor Create();
|
||||
|
||||
function MixBorder(AColor: TColor): TColor;
|
||||
function MixFill(AColor: TColor): TColor;
|
||||
published
|
||||
property BorderColor: TColor read FBorderColor write SetBorderColor;
|
||||
property BorderAlpha: Byte read FBorderAlpha write SetBorderAlpha;
|
||||
property FillColor: TColor read FFillColor write SetFillColor;
|
||||
property FillAlpha: Byte read FFillAlpha write SetFillAlpha;
|
||||
end;
|
||||
|
||||
TX2MenuBarmCColors = class(TPersistent)
|
||||
private
|
||||
FHot: TX2MenuBarmCColor;
|
||||
FNormal: TX2MenuBarmCColor;
|
||||
FSelected: TX2MenuBarmCColor;
|
||||
FOnChange: TNotifyEvent;
|
||||
|
||||
procedure SetHot(const Value: TX2MenuBarmCColor);
|
||||
procedure SetNormal(const Value: TX2MenuBarmCColor);
|
||||
procedure SetSelected(const Value: TX2MenuBarmCColor);
|
||||
protected
|
||||
procedure DoChange();
|
||||
procedure ColorChange(Sender: TObject);
|
||||
|
||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||
public
|
||||
constructor Create();
|
||||
destructor Destroy(); override;
|
||||
published
|
||||
property Hot: TX2MenuBarmCColor read FHot write SetHot;
|
||||
property Normal: TX2MenuBarmCColor read FNormal write SetNormal;
|
||||
property Selected: TX2MenuBarmCColor read FSelected write SetSelected;
|
||||
end;
|
||||
|
||||
// #ToDo1 (MvR) 19-3-2006: Custom base class
|
||||
TX2MenuBarmusikCubePainter = class(TX2MenuBarPainter)
|
||||
private
|
||||
FColor: TColor;
|
||||
FGroupColors: TX2MenuBarmCColors;
|
||||
FGroupHeight: Integer;
|
||||
FIndicatorColors: TX2MenuBarmCColors;
|
||||
FItemColors: TX2MenuBarmCColors;
|
||||
FItemHeight: Integer;
|
||||
|
||||
procedure SetColor(const Value: TColor);
|
||||
procedure SetGroupColors(const Value: TX2MenuBarmCColors);
|
||||
procedure SetGroupHeight(const Value: Integer);
|
||||
procedure SetIndicatorColors(const Value: TX2MenuBarmCColors);
|
||||
procedure SetItemColors(const Value: TX2MenuBarmCColors);
|
||||
procedure SetItemHeight(const Value: Integer);
|
||||
protected
|
||||
procedure ColorChange(Sender: TObject);
|
||||
|
||||
function GetColor(AColors: TX2MenuBarmCColors; AState: TX2MenuBarDrawStates): TX2MenuBarmCColor;
|
||||
procedure DrawBlended(ACanvas: TCanvas; AImageList: TCustomImageList; AX, AY, AImageIndex: Integer; AAlpha: Byte);
|
||||
|
||||
function GetGroupHeaderHeight(AGroup: TX2MenuBarGroup): Integer; override;
|
||||
function GetGroupHeight(AGroup: TX2MenuBarGroup): Integer; override;
|
||||
function GetItemHeight(AItem: TX2MenuBarItem): Integer; override;
|
||||
|
||||
procedure DrawBackground(ACanvas: TCanvas; const ABounds: TRect); override;
|
||||
procedure DrawGroupHeader(ACanvas: TCanvas; AGroup: TX2MenuBarGroup; const ABounds: TRect; AState: TX2MenuBarDrawStates); override;
|
||||
procedure DrawItem(ACanvas: TCanvas; AItem: TX2MenuBarItem; const ABounds: TRect; AState: TX2MenuBarDrawStates); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy(); override;
|
||||
|
||||
procedure ResetColors();
|
||||
published
|
||||
property AnimationStyle;
|
||||
property AnimationTime;
|
||||
property Color: TColor read FColor write SetColor stored False;
|
||||
property GroupColors: TX2MenuBarmCColors read FGroupColors write SetGroupColors stored False;
|
||||
property GroupHeight: Integer read FGroupHeight write SetGroupHeight stored False;
|
||||
property IndicatorColors: TX2MenuBarmCColors read FIndicatorColors write SetIndicatorColors stored False;
|
||||
property ItemColors: TX2MenuBarmCColors read FItemColors write SetItemColors stored False;
|
||||
property ItemHeight: Integer read FItemHeight write SetItemHeight stored False;
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
type
|
||||
PRGBArray = ^TRGBArray;
|
||||
TRGBArray = array[Word] of TRGBTriple;
|
||||
|
||||
|
||||
{ TX2MenuBarmusikCubePainter }
|
||||
constructor TX2MenuBarmusikCubePainter.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
FColor := clBtnFace;
|
||||
FGroupColors := TX2MenuBarmCColors.Create();
|
||||
FGroupHeight := 22;
|
||||
FIndicatorColors := TX2MenuBarmCColors.Create();
|
||||
FItemColors := TX2MenuBarmCColors.Create();
|
||||
FItemHeight := 22;
|
||||
|
||||
FGroupColors.OnChange := ColorChange;
|
||||
FIndicatorColors.OnChange := ColorChange;
|
||||
FItemColors.OnChange := ColorChange;
|
||||
|
||||
ResetColors();
|
||||
end;
|
||||
|
||||
destructor TX2MenuBarmusikCubePainter.Destroy();
|
||||
begin
|
||||
FreeAndNil(FItemColors);
|
||||
FreeAndNil(FIndicatorColors);
|
||||
FreeAndNil(FGroupColors);
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.ResetColors();
|
||||
begin
|
||||
{ Group buttons }
|
||||
with GroupColors.Hot do
|
||||
begin
|
||||
BorderColor := clBtnShadow;
|
||||
FillAlpha := 128;
|
||||
FillColor := clBtnShadow;
|
||||
end;
|
||||
|
||||
with GroupColors.Normal do
|
||||
begin
|
||||
BorderAlpha := 64;
|
||||
BorderColor := clBtnShadow;
|
||||
FillAlpha := 64;
|
||||
FillColor := clBtnShadow;
|
||||
end;
|
||||
|
||||
with GroupColors.Selected do
|
||||
begin
|
||||
BorderColor := clBtnShadow;
|
||||
FillColor := clBtnHighlight;
|
||||
end;
|
||||
|
||||
{ Indicator }
|
||||
with IndicatorColors.Selected do
|
||||
begin
|
||||
BorderAlpha := 252;
|
||||
BorderColor := clHighlight;
|
||||
FillAlpha := 252;
|
||||
FillColor := clHighlight;
|
||||
end;
|
||||
|
||||
{ Item buttons }
|
||||
with ItemColors.Hot do
|
||||
begin
|
||||
BorderColor := clBtnShadow;
|
||||
FillAlpha := 114;
|
||||
FillColor := clBtnHighlight;
|
||||
end;
|
||||
|
||||
with ItemColors.Normal do
|
||||
begin
|
||||
BorderAlpha := 50;
|
||||
BorderColor := clBtnHighlight;
|
||||
FillAlpha := 50;
|
||||
FillColor := clBtnHighlight;
|
||||
end;
|
||||
|
||||
with ItemColors.Selected do
|
||||
begin
|
||||
BorderColor := clBtnShadow;
|
||||
FillColor := clBtnHighlight;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function TX2MenuBarmusikCubePainter.GetColor(AColors: TX2MenuBarmCColors;
|
||||
AState: TX2MenuBarDrawStates): TX2MenuBarmCColor;
|
||||
begin
|
||||
if mdsSelected in AState then
|
||||
Result := AColors.Selected
|
||||
else if mdsHot in AState then
|
||||
Result := AColors.Hot
|
||||
else
|
||||
Result := AColors.Normal;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.DrawBlended(ACanvas: TCanvas;
|
||||
AImageList: TCustomImageList;
|
||||
AX, AY, AImageIndex: Integer;
|
||||
AAlpha: Byte);
|
||||
var
|
||||
backBuffer: Graphics.TBitmap;
|
||||
iconBuffer: Graphics.TBitmap;
|
||||
sourceRect: TRect;
|
||||
destRect: TRect;
|
||||
sourceRow: PRGBArray;
|
||||
destRow: PRGBArray;
|
||||
xPos: Integer;
|
||||
yPos: Integer;
|
||||
backAlpha: Integer;
|
||||
iconAlpha: Integer;
|
||||
|
||||
begin
|
||||
backBuffer := Graphics.TBitmap.Create();
|
||||
try
|
||||
backBuffer.PixelFormat := pf24bit;
|
||||
backBuffer.Width := AImageList.Width;
|
||||
backBuffer.Height := AImageList.Height;
|
||||
|
||||
destRect := Rect(0, 0, backBuffer.Width, backBuffer.Height);
|
||||
sourceRect := destRect;
|
||||
OffsetRect(sourceRect, AX, AY);
|
||||
backBuffer.Canvas.CopyRect(destRect, ACanvas, sourceRect);
|
||||
|
||||
iconBuffer := Graphics.TBitmap.Create();
|
||||
try
|
||||
iconBuffer.Assign(backBuffer);
|
||||
AImageList.Draw(iconBuffer.Canvas, 0, 0, AImageIndex);
|
||||
|
||||
backAlpha := AAlpha;
|
||||
iconAlpha := 256 - AAlpha;
|
||||
|
||||
for yPos := 0 to Pred(iconBuffer.Height) do
|
||||
begin
|
||||
sourceRow := iconBuffer.ScanLine[yPos];
|
||||
destRow := backBuffer.ScanLine[yPos];
|
||||
|
||||
for xPos := 0 to Pred(iconBuffer.Width) do
|
||||
with destRow^[xPos] do
|
||||
begin
|
||||
rgbtRed := ((rgbtRed * backAlpha) +
|
||||
(sourceRow^[xPos].rgbtRed * iconAlpha)) shr 8;
|
||||
rgbtGreen := ((rgbtGreen * backAlpha) +
|
||||
(sourceRow^[xPos].rgbtGreen * iconAlpha)) shr 8;
|
||||
rgbtBlue := ((rgbtBlue * backAlpha) +
|
||||
(sourceRow^[xPos].rgbtBlue * iconAlpha)) shr 8;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(iconBuffer);
|
||||
end;
|
||||
|
||||
ACanvas.Draw(AX, AY, backBuffer);
|
||||
finally
|
||||
FreeAndNil(backBuffer);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function TX2MenuBarmusikCubePainter.GetGroupHeaderHeight(AGroup: TX2MenuBarGroup): Integer;
|
||||
begin
|
||||
Result := FGroupHeight;
|
||||
end;
|
||||
|
||||
function TX2MenuBarmusikCubePainter.GetGroupHeight(AGroup: TX2MenuBarGroup): Integer;
|
||||
begin
|
||||
Result := (AGroup.Items.Count * FGroupHeight);
|
||||
end;
|
||||
|
||||
function TX2MenuBarmusikCubePainter.GetItemHeight(AItem: TX2MenuBarItem): Integer;
|
||||
begin
|
||||
Result := FItemHeight;
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.DrawBackground(ACanvas: TCanvas;
|
||||
const ABounds: TRect);
|
||||
begin
|
||||
with ACanvas do
|
||||
begin
|
||||
Brush.Color := FColor;
|
||||
FillRect(ABounds);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.DrawGroupHeader(ACanvas: TCanvas;
|
||||
AGroup: TX2MenuBarGroup;
|
||||
const ABounds: TRect;
|
||||
AState: TX2MenuBarDrawStates);
|
||||
var
|
||||
groupColor: TX2MenuBarmCColor;
|
||||
textBounds: TRect;
|
||||
|
||||
begin
|
||||
with ACanvas do
|
||||
begin
|
||||
groupColor := GetColor(GroupColors, AState);
|
||||
|
||||
Brush.Color := groupColor.MixFill(Color);
|
||||
Brush.Style := bsSolid;
|
||||
Pen.Color := groupColor.MixBorder(Color);
|
||||
Pen.Style := psSolid;
|
||||
Rectangle(ABounds);
|
||||
|
||||
textBounds := ABounds;
|
||||
Inc(textBounds.Left, 12); // #ToDo3 (MvR) 19-3-2006: GroupIndent property?
|
||||
|
||||
ACanvas.Font.Style := [fsBold];
|
||||
DrawText(ACanvas, AGroup.Caption, textBounds);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.DrawItem(ACanvas: TCanvas;
|
||||
AItem: TX2MenuBarItem;
|
||||
const ABounds: TRect;
|
||||
AState: TX2MenuBarDrawStates);
|
||||
var
|
||||
itemColor: TX2MenuBarmCColor;
|
||||
itemBounds: TRect;
|
||||
indicatorBounds: TRect;
|
||||
indicatorColor: TX2MenuBarmCColor;
|
||||
textBounds: TRect;
|
||||
imageList: TCustomImageList;
|
||||
imgY: Integer;
|
||||
|
||||
begin
|
||||
with ACanvas do
|
||||
begin
|
||||
itemColor := GetColor(ItemColors, AState);
|
||||
indicatorColor := GetColor(IndicatorColors, AState);
|
||||
|
||||
itemBounds := ABounds;
|
||||
indicatorBounds := itemBounds;
|
||||
indicatorBounds.Right := indicatorBounds.Left + 6;
|
||||
Brush.Color := indicatorColor.MixFill(Color);
|
||||
Brush.Style := bsSolid;
|
||||
Pen.Color := indicatorColor.MixBorder(Color);
|
||||
Pen.Style := psSolid;
|
||||
Rectangle(itemBounds);
|
||||
|
||||
itemBounds.Left := indicatorBounds.Right;
|
||||
Brush.Color := itemColor.MixFill(Color);
|
||||
Brush.Style := bsSolid;
|
||||
Pen.Color := itemColor.MixBorder(Color);
|
||||
Pen.Style := psSolid;
|
||||
Rectangle(itemBounds);
|
||||
|
||||
textBounds := itemBounds;
|
||||
Inc(textBounds.Left, 4);
|
||||
|
||||
imageList := MenuBar.ImageList;
|
||||
if Assigned(imageList) then
|
||||
begin
|
||||
if AItem.ImageIndex > -1 then
|
||||
begin
|
||||
imgY := textBounds.Top + ((textBounds.Bottom - textBounds.Top -
|
||||
imageList.Height) div 2);
|
||||
|
||||
if (mdsHot in AState) or (mdsSelected in AState) then
|
||||
imageList.Draw(ACanvas, textBounds.Left, imgY, AItem.ImageIndex)
|
||||
else
|
||||
DrawBlended(ACanvas, imageList, textBounds.Left, imgY,
|
||||
AItem.ImageIndex, 128);
|
||||
end;
|
||||
|
||||
Inc(textBounds.Left, imageList.Width + 4);
|
||||
end;
|
||||
|
||||
if mdsSelected in AState then
|
||||
ACanvas.Font.Style := [fsBold]
|
||||
else
|
||||
ACanvas.Font.Style := [];
|
||||
|
||||
DrawText(ACanvas, AItem.Caption, textBounds);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.ColorChange(Sender: TObject);
|
||||
begin
|
||||
NotifyObservers();
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.SetIndicatorColors(const Value: TX2MenuBarmCColors);
|
||||
begin
|
||||
if Value <> FIndicatorColors then
|
||||
begin
|
||||
FIndicatorColors.Assign(Value);
|
||||
NotifyObservers();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.SetItemColors(const Value: TX2MenuBarmCColors);
|
||||
begin
|
||||
if Value <> FItemColors then
|
||||
begin
|
||||
FItemColors.Assign(Value);
|
||||
NotifyObservers();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.SetItemHeight(const Value: Integer);
|
||||
begin
|
||||
if Value <> FItemHeight then
|
||||
begin
|
||||
FItemHeight := Value;
|
||||
NotifyObservers();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.SetColor(const Value: TColor);
|
||||
begin
|
||||
if Value <> FColor then
|
||||
begin
|
||||
FColor := Value;
|
||||
NotifyObservers();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.SetGroupColors(const Value: TX2MenuBarmCColors);
|
||||
begin
|
||||
if Value <> FGroupColors then
|
||||
begin
|
||||
FGroupColors.Assign(Value);
|
||||
NotifyObservers();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmusikCubePainter.SetGroupHeight(const Value: Integer);
|
||||
begin
|
||||
if Value <> FGroupHeight then
|
||||
begin
|
||||
FGroupHeight := Value;
|
||||
NotifyObservers();
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TX2MenuBarmCColor }
|
||||
constructor TX2MenuBarmCColor.Create();
|
||||
begin
|
||||
inherited;
|
||||
|
||||
FBorderAlpha := 255;
|
||||
FBorderColor := clNone;
|
||||
FFillAlpha := 255;
|
||||
FFillColor := clNone;
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmCColor.DoChange();
|
||||
begin
|
||||
if Assigned(FOnChange) then
|
||||
FOnChange(Self);
|
||||
end;
|
||||
|
||||
|
||||
function TX2MenuBarmCColor.MixColors(ABackColor, AForeColor: TColor;
|
||||
AAlpha: Byte): TColor;
|
||||
var
|
||||
cBack: Cardinal;
|
||||
cFore: Cardinal;
|
||||
bBack: Byte;
|
||||
|
||||
begin
|
||||
{ Source: X2UtGraphics.BlendColors }
|
||||
cBack := ColorToRGB(ABackColor);
|
||||
cFore := ColorToRGB(AForeColor);
|
||||
bBack := 255 - AAlpha;
|
||||
|
||||
Result := RGB(((GetRValue(cBack) * bBack) +
|
||||
(GetRValue(cFore) * AAlpha)) shr 8,
|
||||
((GetGValue(cBack) * bBack) +
|
||||
(GetGValue(cFore) * AAlpha)) shr 8,
|
||||
((GetBValue(cBack) * bBack) +
|
||||
(GetBValue(cFore) * AAlpha)) shr 8);
|
||||
end;
|
||||
|
||||
function TX2MenuBarmCColor.MixBorder(AColor: TColor): TColor;
|
||||
begin
|
||||
if BorderColor = clNone then
|
||||
Result := AColor
|
||||
else
|
||||
Result := MixColors(AColor, BorderColor, BorderAlpha);
|
||||
end;
|
||||
|
||||
function TX2MenuBarmCColor.MixFill(AColor: TColor): TColor;
|
||||
begin
|
||||
if FillColor = clNone then
|
||||
Result := AColor
|
||||
else
|
||||
Result := MixColors(AColor, FillColor, FillAlpha);
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmCColor.SetBorderAlpha(const Value: Byte);
|
||||
begin
|
||||
if Value <> FBorderAlpha then
|
||||
begin
|
||||
FBorderAlpha := Value;
|
||||
DoChange();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmCColor.SetBorderColor(const Value: TColor);
|
||||
begin
|
||||
if Value <> FBorderColor then
|
||||
begin
|
||||
FBorderColor := Value;
|
||||
DoChange();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmCColor.SetFillAlpha(const Value: Byte);
|
||||
begin
|
||||
if Value <> FFillAlpha then
|
||||
begin
|
||||
FFillAlpha := Value;
|
||||
DoChange();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmCColor.SetFillColor(const Value: TColor);
|
||||
begin
|
||||
if Value <> FFillColor then
|
||||
begin
|
||||
FFillColor := Value;
|
||||
DoChange();
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TX2MenuBarmCColors }
|
||||
constructor TX2MenuBarmCColors.Create();
|
||||
begin
|
||||
inherited;
|
||||
|
||||
FHot := TX2MenuBarmCColor.Create();
|
||||
FNormal := TX2MenuBarmCColor.Create();
|
||||
FSelected := TX2MenuBarmCColor.Create();
|
||||
|
||||
FHot.OnChange := ColorChange;
|
||||
FNormal.OnChange := ColorChange;
|
||||
FSelected.OnChange := ColorChange;
|
||||
end;
|
||||
|
||||
destructor TX2MenuBarmCColors.Destroy();
|
||||
begin
|
||||
FreeAndNil(FSelected);
|
||||
FreeAndNil(FNormal);
|
||||
FreeAndNil(FHot);
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmCColors.DoChange();
|
||||
begin
|
||||
if Assigned(FOnChange) then
|
||||
FOnChange(Self);
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmCColors.ColorChange(Sender: TObject);
|
||||
begin
|
||||
DoChange();
|
||||
end;
|
||||
|
||||
|
||||
procedure TX2MenuBarmCColors.SetHot(const Value: TX2MenuBarmCColor);
|
||||
begin
|
||||
if FHot <> Value then
|
||||
begin
|
||||
FHot.Assign(Value);
|
||||
DoChange();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmCColors.SetNormal(const Value: TX2MenuBarmCColor);
|
||||
begin
|
||||
if FNormal <> Value then
|
||||
begin
|
||||
FNormal.Assign(Value);
|
||||
DoChange();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TX2MenuBarmCColors.SetSelected(const Value: TX2MenuBarmCColor);
|
||||
begin
|
||||
if FNormal <> Value then
|
||||
begin
|
||||
FSelected.Assign(Value);
|
||||
DoChange();
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
278
Test/MenuBar/MainForm.dfm
Normal file
278
Test/MenuBar/MainForm.dfm
Normal file
@ -0,0 +1,278 @@
|
||||
object frmMain: TfrmMain
|
||||
Left = 300
|
||||
Top = 219
|
||||
Caption = 'X2MenuBar Test'
|
||||
ClientHeight = 360
|
||||
ClientWidth = 550
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object bvlMenu: TBevel
|
||||
Left = 137
|
||||
Top = 0
|
||||
Width = 8
|
||||
Height = 360
|
||||
Align = alLeft
|
||||
Shape = bsLeftLine
|
||||
ExplicitLeft = 141
|
||||
end
|
||||
object lblAnimationTime: TLabel
|
||||
Left = 364
|
||||
Top = 32
|
||||
Width = 98
|
||||
Height = 13
|
||||
Caption = 'Animation time (ms):'
|
||||
end
|
||||
object mbTest: TX2MenuBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 137
|
||||
Height = 360
|
||||
Align = alLeft
|
||||
Groups = <
|
||||
item
|
||||
Caption = 'Share'
|
||||
Expanded = True
|
||||
Items = <
|
||||
item
|
||||
Caption = 'File'
|
||||
ImageIndex = 0
|
||||
end
|
||||
item
|
||||
Caption = 'Folder'
|
||||
ImageIndex = 1
|
||||
end
|
||||
item
|
||||
Caption = 'Photo'
|
||||
ImageIndex = 2
|
||||
end
|
||||
item
|
||||
Caption = 'Video'
|
||||
ImageIndex = 3
|
||||
end>
|
||||
end
|
||||
item
|
||||
Caption = 'Group'
|
||||
Expanded = False
|
||||
Items = <
|
||||
item
|
||||
Caption = 'Menu Item'
|
||||
ImageIndex = -1
|
||||
end
|
||||
item
|
||||
Caption = 'Menu Item'
|
||||
ImageIndex = -1
|
||||
end
|
||||
item
|
||||
Caption = 'Menu Item'
|
||||
ImageIndex = -1
|
||||
end>
|
||||
end
|
||||
item
|
||||
Caption = 'Group without items'
|
||||
Expanded = False
|
||||
Items = <>
|
||||
end>
|
||||
ImageList = glMenu
|
||||
Painter = mbPainter
|
||||
end
|
||||
object seAnimationTime: TJvSpinEdit
|
||||
Left = 364
|
||||
Top = 48
|
||||
Width = 81
|
||||
Height = 21
|
||||
CheckMinValue = True
|
||||
ButtonKind = bkStandard
|
||||
Value = 250.000000000000000000
|
||||
TabOrder = 1
|
||||
OnChange = seAnimationTimeChange
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 220
|
||||
Top = 80
|
||||
Width = 133
|
||||
Height = 153
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 2
|
||||
object rbmusikCube: TRadioButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'musikCube style'
|
||||
Checked = True
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object rbUnameIT: TRadioButton
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Uname-IT style'
|
||||
Enabled = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 364
|
||||
Top = 80
|
||||
Width = 129
|
||||
Height = 153
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 3
|
||||
object rbSliding: TRadioButton
|
||||
Left = 0
|
||||
Top = 20
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Sliding animation'
|
||||
Checked = True
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
OnClick = AnimationClick
|
||||
end
|
||||
object rbNoAnimation: TRadioButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'No animation'
|
||||
TabOrder = 1
|
||||
OnClick = AnimationClick
|
||||
end
|
||||
object rbFade: TRadioButton
|
||||
Left = 0
|
||||
Top = 40
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Fading animation'
|
||||
Enabled = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object gcMenu: TX2GraphicContainer
|
||||
Graphics = <
|
||||
item
|
||||
Name = 'ShareFile'
|
||||
Picture.Data = {
|
||||
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001000
|
||||
00001008060000001FF3FF61000001844944415478DAA5D2CD4B02411400F0B7
|
||||
DB2DA27FAB4EE22102A1A0C0FCA0837A4989683734C7A072A12C45502902FB00
|
||||
E95487FEA20E1D24337777E635B33BBB389B5E6A60F6ED1EDE6FDE9BB71AFC73
|
||||
69C14BADF98A223A8EEB7DDB41B4FD38B11D1112D661A23F1728A657E69E5428
|
||||
F761796911869F5F0A32174044102551E6BF17C90364B76270F7F4A6202140AE
|
||||
5FB09459554E1589942B8CF9C0F4E280A600A6F58C462E3613A01C70F9B61DCA
|
||||
4F1F83D51CA0656EEB2A501FA0918FAB2D88646FA3D74A108D6A0F2E2A496D26
|
||||
20127D80972E93998208A00B97951D1530CE076816E2E052FFF238E125B228C4
|
||||
1F06E941230AEC9F3CE2F1DE1A7CBB2CAC00652B4CB6C2E49D1C912E07522A50
|
||||
22F7484AEB30B2250018224C2607509974A0719C5681BC798B75630386131AA9
|
||||
80274B2C68A5C22BB8AA46809C71C347B3091F631ACC414564152E8FD55A079A
|
||||
24A302A9621B5BB524BC8F9CA951AA80F72FF07D76DA8516C9AAC0EE411B755D
|
||||
0790339045841719DC8BA86241D37F4FE1AFEB07F8392D2050E7313500000000
|
||||
49454E44AE426082}
|
||||
end
|
||||
item
|
||||
Name = 'ShareFolder'
|
||||
Picture.Data = {
|
||||
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001000
|
||||
00001008060000001FF3FF610000025B4944415478DAAD936D48535118C7FF77
|
||||
775BEAD8ACA123CB2834EC9B2DB2B0328CCC284B461192146A48040505D36A05
|
||||
154826A64D53A490303F6510C528421B6B2CC4C0E5170317ABA859099ACEBBF7
|
||||
B6BBFBD2F172433F680875E0CF797BFE3FCE79CE7928FC63A3961B38D201BB3F
|
||||
82524100E6140AA0A7D28ADA65039C2D88159DF3A7AA52F5D2FCF90D0AA60650
|
||||
4B02BCBDD8C504512288284CB23088EA0C63F18569FACFFE92007727BCB47E4B
|
||||
9E5A9385F4753B9091530EB5D6009AD690DD28519C2813B66B5A1CB9B908C075
|
||||
0762B139042EEE412CF01D51BF0789F04F4064C1712C36EEAE275119787A350B
|
||||
C79A64C0609B2209958E5E633C4FF9DE36A0B07610D1D97EA8523448D56AB122
|
||||
2D8D642E8EC98FA3D0E79442AD31E289250F15CD32C0D942058ACE0EA7ABD236
|
||||
C1D19C8E7D973F93D521804B4A4649624292CFF3151B0AEAF1F8E26654B6CA00
|
||||
C76DA53BFF68DFB6CCDC9DB037ADC5FE2BA3C4F41AE009804BCC03F8047E787D
|
||||
C8DE5E8547751538619501F62674AF5A5F525350D9AD1A68CCC5018B8BE4AA5F
|
||||
324060E57EEE041CC4A40026A6C3CBAE07A8BA2B03061A5141F1F4BDBD752FF4
|
||||
AF5ACB70E8928D24FC1931B20B00736312ACA010F42760EB79839ACE05AF3070
|
||||
2BC5A6CBDA6A9AF10DA1DCFC1008F649999704228508669605331E86776C06D3
|
||||
939189EA0E6453F31F0367D49AD55DF1F0246D32B713402F3125C04C45C8BD43
|
||||
98188F89D15032405E72F8781B0E2E5A0BCEAE7C8E99784F97551FC627B70BDF
|
||||
BEFCE2E3117E4AE031625809CB9EEBF8F0D7627A77BFE0D4D8D88855A9440022
|
||||
1C27DB71FABF55E352ED373075032024CD24170000000049454E44AE426082}
|
||||
end
|
||||
item
|
||||
Name = 'ShareWebcam'
|
||||
Picture.Data = {
|
||||
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001000
|
||||
00001008060000001FF3FF61000002C14944415478DABD935D48935118C7FF9B
|
||||
DB9CD38913155CB586D008C30F9A95A8217927A14157DE441FE88521A4828108
|
||||
0A8992621745A80C477AB3A048D44A08A18589BA959AE0D4A09CBAE936F7E55E
|
||||
759B7BDFB91EDF20E82E283A70381CCE797EFFE739E7FF08F09743F04F00D5D5
|
||||
BA94C4C4E47A954AA171BB0F6452292B92CB25C24824088E63A32C1BE658F630
|
||||
B2BFBF175E5B5B5B0F0643AF8DC6E79F7F011A1B87DE3435555C0D8582181F37
|
||||
637BFB3BEAEA6ED28918BBBB3EC4C589F8AB1C071C1C846136CFC52626DE0D8D
|
||||
8E0EDEE6011D1D2F772A2B0BD2392E0A936915878711C46231088502582C6FB1
|
||||
B4B44CC0079899998048C48132A1A8D42D9DAEEB240F686919F017179F4D6118
|
||||
8ED4BD9048E22016FF9C16CB14525353A056E7C26AB5109C4166A692A0566F6F
|
||||
EFC3341ED0DDFDC25759A9552C2CAC8061F6715C7B2C968868D405AD36076EB7
|
||||
874A0990BA020A453A8145181B1BF1F7F575A7F280F6F621574D4D4586DDEE81
|
||||
D7CBC066B3D2EA446E6E16BABA9E906A0C39392AE4E79F874A758E32946078F8
|
||||
95BBBFBF278307B4B50D6CD6D65E3FB5B9E982CFC7606BCB4EEA3EACAE2E2110
|
||||
5042A3C9C6E4A40EA5A525042A444282140683C1A6D33D56F180E6E6A75F1B1A
|
||||
6E683636B649790F3B3B0E04832EACAF7F83D13887B4B44CC8E52C0A0B8B9097
|
||||
7701F1F1F1D0EBF52B7A7D6F360FA8AFEFFAD4DA7AB7C06ADD86C7B34BC10C1C
|
||||
0E3BA4D2E35F311F7B014AE50994945C21F544242727D1BB3D9A32189E5DE601
|
||||
55558D239D9DF7AE310C4BEA7EAA5100A7D3857098A1E010EDC5C8CA3A43CA32
|
||||
BACD61717131363030747F76F6430F0F282FBF73A9ACACE47D51915666B3B9C8
|
||||
386421B11432593C418294CD163DAC2DE2743AE697972DC66834326A327D34FD
|
||||
D60BE5E5B72EAAD5A7079392E41AB2AE9BCC6275B91CCB3E5FE08B40C0CE1F1D
|
||||
F917A6A767427FD24C429A47FFAD1B7F00ED1B51200D4AE2740000000049454E
|
||||
44AE426082}
|
||||
end
|
||||
item
|
||||
Name = 'ShareWebcamVideo'
|
||||
Picture.Data = {
|
||||
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001000
|
||||
00001008060000001FF3FF61000002EA4944415478DAA5935D48935118C7FFF3
|
||||
DDAB6BCEF9FDED44DC4CA15E8761412A1296A121285ED595DD7521298C125341
|
||||
E9622B584CE6BCF122454891AE9424432B3FC8A4FC203F32D1E9FCAA95D36DCD
|
||||
B5BDAF7BB78E2B040BA2E8DC9CAFE7FC9EE7FCCFF90BF09F4DF0EB82CFE713E8
|
||||
F5FA149AA6198FC7C3884422262C2C8C118BC5A91CC7EDBBDDAE75ABD5BAC4B2
|
||||
9C4EA5524D1E03747777574B2492A688888830D2432A952238580C9AA6C82E8F
|
||||
830316DBDB7632077A7B7B5FD7D737E41C017A7A7A8A939393FB188611DA6C36
|
||||
2426268265DDB05A2D9899716373D30BA39187CD7608FA86ADCD06D7E0D0A0D8
|
||||
0F50ABD585342D7CEA703828A55289E8E818242424203C5C82AE2E0789909183
|
||||
FB70BB59389D2E02F66274F4BA6361615CEA075455DD1C11894EE43FEC7C8C2B
|
||||
C59791794A8EA2A26212ECC4F47436380EE430878D8D31D8ED6FC93A199BDEAC
|
||||
4FCD0CA4F801776A6B9D731F56C553CB1C3EED72A82C4FC2A5C2622814C99898
|
||||
9061656519F3F3F7B1B7B785A8A818040444212DEDCCAC56AB52FA013535B7ED
|
||||
E65D56FA688405EF0DC5D59CAF60329290937B0E7373720C0CA840511C76763E
|
||||
FB01F1F1371014343B6B3034FE005456560E9D4C935FACD6AF03541CCAB35791
|
||||
9A1082D34C3A9697F33035A5267A444128CC464848162C163BD1A97FB2B5557D
|
||||
F667053525F0F17D2C1527E81B36212B6E1D79F917E0724988FAB9100804F078
|
||||
78A2C5A1802EA2831B1919CFFB753A6DC9D133D6D5D5DD22719AF434B9D0E9E2
|
||||
488981E4B942313C1C47EECCC3EBF591B9070E871B4AA58FC09E7536371B2A8E
|
||||
7DA4F6F6F677A5A5A59966B39964B1C164B2A0A34388C04090CC3C2223BD2828
|
||||
A0C978D16B327D2CD56A1F3C3906D0E974E3656565E7799EF7976DB57E415BDB
|
||||
26C46211C94A932A8CBEA5A5B5171415D8A8D1685EFDE605F2A1AE51146590C9
|
||||
64110A8582F8C2EBBFF7E2E27B9FD1B8F6322040D8A4D1DC1BFBA39988418288
|
||||
894A481515B1B1B185168BE51531D8DD969696D1BF72E3BFB6EF2C065120000A
|
||||
A5C30000000049454E44AE426082}
|
||||
end>
|
||||
Left = 180
|
||||
Top = 8
|
||||
end
|
||||
object glMenu: TX2GraphicList
|
||||
Container = gcMenu
|
||||
Left = 208
|
||||
Top = 8
|
||||
end
|
||||
object mbPainter: TX2MenuBarmusikCubePainter
|
||||
Left = 152
|
||||
Top = 8
|
||||
end
|
||||
end
|
52
Test/MenuBar/MainForm.pas
Normal file
52
Test/MenuBar/MainForm.pas
Normal file
@ -0,0 +1,52 @@
|
||||
unit MainForm;
|
||||
|
||||
interface
|
||||
uses
|
||||
Classes,
|
||||
Controls,
|
||||
Forms,
|
||||
ImgList,
|
||||
|
||||
PNGImage,
|
||||
X2CLGraphicList,
|
||||
X2CLMenuBar,
|
||||
X2CLmusikCubePainter, StdCtrls, ExtCtrls, Mask, JvExMask, JvSpin;
|
||||
|
||||
type
|
||||
TfrmMain = class(TForm)
|
||||
mbTest: TX2MenuBar;
|
||||
mbPainter: TX2MenuBarmusikCubePainter;
|
||||
gcMenu: TX2GraphicContainer;
|
||||
glMenu: TX2GraphicList;
|
||||
bvlMenu: TBevel;
|
||||
rbmusikCube: TRadioButton;
|
||||
rbSliding: TRadioButton;
|
||||
lblAnimationTime: TLabel;
|
||||
seAnimationTime: TJvSpinEdit;
|
||||
Panel1: TPanel;
|
||||
Panel2: TPanel;
|
||||
rbNoAnimation: TRadioButton;
|
||||
rbFade: TRadioButton;
|
||||
rbUnameIT: TRadioButton;
|
||||
procedure AnimationClick(Sender: TObject);
|
||||
procedure seAnimationTimeChange(Sender: TObject);
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmMain.AnimationClick(Sender: TObject);
|
||||
begin
|
||||
if rbSliding.Checked then
|
||||
mbPainter.AnimationStyle := asSlide
|
||||
else
|
||||
mbPainter.AnimationStyle := asNone;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.seAnimationTimeChange(Sender: TObject);
|
||||
begin
|
||||
mbPainter.AnimationTime := seAnimationTime.AsInteger;
|
||||
end;
|
||||
|
||||
end.
|
20
Test/MenuBar/MenuBarGroup.bdsgroup
Normal file
20
Test/MenuBar/MenuBarGroup.bdsgroup
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">Default.Personality</Option>
|
||||
<Option Name="ProjectType"></Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{899F97C0-66A5-4324-BD71-C5E037D59CA1}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Default.Personality> <Projects>
|
||||
<Projects Name="MenuBarTest.exe">MenuBarTest.bdsproj</Projects>
|
||||
<Projects Name="X2CLMB.bpl">..\..\Packages\D2006\X2CLMB.bdsproj</Projects>
|
||||
<Projects Name="X2CLMBD.bpl">..\..\Packages\D2006\X2CLMBD.bdsproj</Projects>
|
||||
<Projects Name="ColorBlender.exe">..\..\..\..\Archive\Tests\2006\ColorBlender\ColorBlender.bdsproj</Projects>
|
||||
<Projects Name="Targets">MenuBarTest.exe X2CLMB.bpl X2CLMBD.bpl ColorBlender.exe</Projects>
|
||||
</Projects>
|
||||
<Dependencies/>
|
||||
</Default.Personality>
|
||||
</BorlandProject>
|
172
Test/MenuBar/MenuBarTest.bdsproj
Normal file
172
Test/MenuBar/MenuBarTest.bdsproj
Normal file
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">Delphi.Personality</Option>
|
||||
<Option Name="ProjectType"></Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{57D3D6EE-4412-43CE-90E0-02395E34B5E4}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">MenuBarTest.dpr</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">8</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">0</Compiler>
|
||||
<Compiler Name="R">0</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
||||
<Compiler Name="NamespacePrefix"></Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">False</Compiler>
|
||||
<Compiler Name="UnsafeCode">False</Compiler>
|
||||
<Compiler Name="UnsafeCast">False</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
<Compiler Name="UnitInitSeq">True</Compiler>
|
||||
<Compiler Name="LocalPInvoke">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
<Compiler Name="CodePage"></Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="GenerateHpps">False</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">False</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">16384</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription"></Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir"></Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath">..\..\Source</Directories>
|
||||
<Directories Name="Packages"></Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">False</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="Debug Symbols Search Path"></Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1043</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
<StarTeamAssociation></StarTeamAssociation>
|
||||
<StarTeamNonRelativeFiles></StarTeamNonRelativeFiles>
|
||||
</BorlandProject>
|
42
Test/MenuBar/MenuBarTest.cfg
Normal file
42
Test/MenuBar/MenuBarTest.cfg
Normal file
@ -0,0 +1,42 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J-
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T-
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-LE"C:\Documents and Settings\PsychoMark\My Documents\Borland Studio Projects\Bpl"
|
||||
-LN"C:\Documents and Settings\PsychoMark\My Documents\Borland Studio Projects\Bpl"
|
||||
-U"..\..\Source"
|
||||
-O"..\..\Source"
|
||||
-I"..\..\Source"
|
||||
-R"..\..\Source"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
16
Test/MenuBar/MenuBarTest.dpr
Normal file
16
Test/MenuBar/MenuBarTest.dpr
Normal file
@ -0,0 +1,16 @@
|
||||
program MenuBarTest;
|
||||
|
||||
uses
|
||||
Forms,
|
||||
MainForm in 'MainForm.pas' {frmMain};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
var
|
||||
frmMain: TfrmMain;
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TfrmMain, frmMain);
|
||||
Application.Run;
|
||||
end.
|
BIN
Test/MenuBar/MenuBarTest.res
Normal file
BIN
Test/MenuBar/MenuBarTest.res
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user