2006-03-24 05:56:59 +00:00
|
|
|
unit MainForm;
|
|
|
|
|
|
|
|
interface
|
|
|
|
uses
|
|
|
|
Classes,
|
|
|
|
Controls,
|
2006-03-30 04:54:11 +00:00
|
|
|
ExtCtrls,
|
2006-03-24 05:56:59 +00:00
|
|
|
Forms,
|
|
|
|
ImgList,
|
2006-03-30 04:54:11 +00:00
|
|
|
Mask,
|
|
|
|
StdCtrls,
|
2006-03-24 05:56:59 +00:00
|
|
|
|
2006-03-30 04:54:11 +00:00
|
|
|
JvExMask,
|
|
|
|
JvSpin,
|
2006-03-24 05:56:59 +00:00
|
|
|
PNGImage,
|
|
|
|
X2CLGraphicList,
|
|
|
|
X2CLMenuBar,
|
2006-03-30 04:54:11 +00:00
|
|
|
X2CLmusikCubeMenuBarPainter,
|
|
|
|
X2CLunaMenuBarPainter;
|
2006-03-24 05:56:59 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
TfrmMain = class(TForm)
|
|
|
|
mbTest: TX2MenuBar;
|
2006-03-30 04:54:11 +00:00
|
|
|
mcPainter: TX2MenuBarmusikCubePainter;
|
2006-03-24 05:56:59 +00:00
|
|
|
gcMenu: TX2GraphicContainer;
|
|
|
|
glMenu: TX2GraphicList;
|
|
|
|
bvlMenu: TBevel;
|
|
|
|
rbmusikCube: TRadioButton;
|
|
|
|
rbSliding: TRadioButton;
|
|
|
|
lblAnimationTime: TLabel;
|
|
|
|
seAnimationTime: TJvSpinEdit;
|
|
|
|
Panel1: TPanel;
|
|
|
|
Panel2: TPanel;
|
|
|
|
rbNoAnimation: TRadioButton;
|
|
|
|
rbFade: TRadioButton;
|
|
|
|
rbUnameIT: TRadioButton;
|
2006-03-30 04:54:11 +00:00
|
|
|
unaPainter: TX2MenuBarunaPainter;
|
2006-04-01 19:51:46 +00:00
|
|
|
rbDissolve: TRadioButton;
|
2006-03-30 04:54:11 +00:00
|
|
|
chkAutoCollapse: TCheckBox;
|
|
|
|
chkAllowCollapseAll: TCheckBox;
|
|
|
|
chkAutoSelectItem: TCheckBox;
|
|
|
|
chkBlurShadow: TCheckBox;
|
2006-04-01 19:51:46 +00:00
|
|
|
chkScrollbar: TCheckBox;
|
2006-03-30 04:54:11 +00:00
|
|
|
procedure chkBlurShadowClick(Sender: TObject);
|
|
|
|
procedure chkAutoSelectItemClick(Sender: TObject);
|
|
|
|
procedure FormCreate(Sender: TObject);
|
|
|
|
procedure chkAllowCollapseAllClick(Sender: TObject);
|
|
|
|
procedure chkAutoCollapseClick(Sender: TObject);
|
|
|
|
procedure PainterClick(Sender: TObject);
|
2006-03-24 05:56:59 +00:00
|
|
|
procedure AnimationClick(Sender: TObject);
|
|
|
|
procedure seAnimationTimeChange(Sender: TObject);
|
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
procedure TfrmMain.AnimationClick(Sender: TObject);
|
2006-03-30 04:54:11 +00:00
|
|
|
var
|
|
|
|
style: TX2MenuBarAnimationStyle;
|
|
|
|
|
2006-03-24 05:56:59 +00:00
|
|
|
begin
|
|
|
|
if rbSliding.Checked then
|
2006-03-30 04:54:11 +00:00
|
|
|
style := asSlide
|
2006-04-01 19:51:46 +00:00
|
|
|
else if rbDissolve.Checked then
|
|
|
|
style := asDissolve
|
2006-03-30 04:54:11 +00:00
|
|
|
else
|
|
|
|
style := asNone;
|
|
|
|
|
|
|
|
mcPainter.AnimationStyle := style;
|
|
|
|
unaPainter.AnimationStyle := style;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmMain.chkAllowCollapseAllClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if chkAllowCollapseAll.Checked then
|
|
|
|
mbTest.Options := mbTest.Options + [mboAllowCollapseAll]
|
|
|
|
else
|
|
|
|
mbTest.Options := mbTest.Options - [mboAllowCollapseAll];
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmMain.chkAutoCollapseClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if chkAutoCollapse.Checked then
|
|
|
|
mbTest.Options := mbTest.Options + [mboAutoCollapse]
|
|
|
|
else
|
|
|
|
mbTest.Options := mbTest.Options - [mboAutoCollapse];
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmMain.chkAutoSelectItemClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if chkAutoSelectItem.Checked then
|
|
|
|
mbTest.Options := mbTest.Options + [mboAutoSelectItem]
|
2006-03-24 05:56:59 +00:00
|
|
|
else
|
2006-03-30 04:54:11 +00:00
|
|
|
mbTest.Options := mbTest.Options - [mboAutoSelectItem];
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmMain.chkBlurShadowClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
unaPainter.BlurShadow := chkBlurShadow.Checked;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmMain.FormCreate(Sender: TObject);
|
|
|
|
begin
|
|
|
|
chkAutoCollapse.Checked := mboAutoCollapse in mbTest.Options;
|
|
|
|
chkAutoSelectItem.Checked := mboAutoSelectItem in mbTest.Options;
|
|
|
|
chkAllowCollapseAll.Checked := mboAllowCollapseAll in mbTest.Options;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmMain.PainterClick(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if rbmusikCube.Checked then
|
|
|
|
begin
|
|
|
|
mbTest.Painter := mcPainter;
|
|
|
|
chkAutoCollapse.Checked := False;
|
|
|
|
chkAutoSelectItem.Checked := False;
|
|
|
|
chkAllowCollapseAll.Checked := True;
|
|
|
|
end else
|
|
|
|
begin
|
|
|
|
mbTest.Painter := unaPainter;
|
|
|
|
chkAutoCollapse.Checked := True;
|
|
|
|
chkAutoSelectItem.Checked := True;
|
|
|
|
chkAllowCollapseAll.Checked := False;
|
|
|
|
end;
|
2006-03-24 05:56:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TfrmMain.seAnimationTimeChange(Sender: TObject);
|
|
|
|
begin
|
2006-03-30 04:54:11 +00:00
|
|
|
mcPainter.AnimationTime := seAnimationTime.AsInteger;
|
|
|
|
unaPainter.AnimationTime := seAnimationTime.AsInteger;
|
2006-03-24 05:56:59 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|