unit menu;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Menus, KsMenus, KsSkinMenus, KsItems, KsSkinItems, KsHooks, KsForms,
  KsSkinForms, KsCheckBoxs, KsSkinCheckBoxs, StdCtrls, Spin, KsControls,
  KsGroupBoxs, KsSkinGroupBoxs, KsEffects, KsSpinButtons,
  KsSkinSpinButtons, Mask, KsEdits, KsSkinEdits;

type
  TfrmMenu = class(TForm)
    Label2: TLabel;
    KsBlendGroupBox1: TSeSkinGroupBox;
    Label1: TLabel;
    KsBlendGroupBox2: TSeSkinGroupBox;
    KsBlendGroupBox3: TSeSkinGroupBox;
    KsBlendRadioButton1: TSeSkinRadioButton;
    KsBlendRadioButton2: TSeSkinRadioButton;
    KsBlendRadioButton3: TSeSkinRadioButton;
    KsBlendRadioButton4: TSeSkinRadioButton;
    CheckBox1: TSeSkinCheckBox;
    KsBlendCheckBox2: TSeSkinCheckBox;
    KsBlendCheckBox1: TSeSkinCheckBox;
    SeSkinForm1: TSeSkinForm;
    SeSkinMenuBar1: TSeSkinMenuBar;
    File3: TSeSkinItem;
    New3: TSeSkinItem;
    Open3: TSeSkinItem;
    Save3: TSeSkinItem;
    SaveAs3: TSeSkinItem;
    N7: TSeSkinItem;
    Print3: TSeSkinItem;
    PrintSetup3: TSeSkinItem;
    N8: TSeSkinItem;
    Exit3: TSeSkinItem;
    Edit3: TSeSkinItem;
    Undo3: TSeSkinItem;
    Repeatcommand3: TSeSkinItem;
    N10: TSeSkinItem;
    Cut3: TSeSkinItem;
    Copy3: TSeSkinItem;
    Paste3: TSeSkinItem;
    PasteSpecial3: TSeSkinItem;
    N11: TSeSkinItem;
    Find2: TSeSkinItem;
    Replace2: TSeSkinItem;
    Window3: TSeSkinItem;
    NewWindow3: TSeSkinItem;
    Tile3: TSeSkinItem;
    Cascade3: TSeSkinItem;
    ArrangeAll3: TSeSkinItem;
    N13: TSeSkinItem;
    Hide1: TSeSkinItem;
    Show1: TSeSkinItem;
    Help3: TSeSkinItem;
    Contents3: TSeSkinItem;
    SearchforHelpOn3: TSeSkinItem;
    HowtoUseHelp3: TSeSkinItem;
    About3: TSeSkinItem;
    SeSkinPopupMenu1: TSeSkinPopupMenu;
    File3_OLD: TSeSkinItem;
    New3_OLD: TSeSkinItem;
    Open3_OLD: TSeSkinItem;
    Save3_OLD: TSeSkinItem;
    SaveAs3_OLD: TSeSkinItem;
    N7_OLD: TSeSkinItem;
    Print3_OLD: TSeSkinItem;
    PrintSetup3_OLD: TSeSkinItem;
    N8_OLD: TSeSkinItem;
    Exit3_OLD: TSeSkinItem;
    Edit3_OLD: TSeSkinItem;
    Undo3_OLD: TSeSkinItem;
    Repeatcommand3_OLD: TSeSkinItem;
    N10_OLD: TSeSkinItem;
    Cut3_OLD: TSeSkinItem;
    Copy3_OLD: TSeSkinItem;
    Paste3_OLD: TSeSkinItem;
    PasteSpecial3_OLD: TSeSkinItem;
    N11_OLD: TSeSkinItem;
    Find2_OLD: TSeSkinItem;
    Replace2_OLD: TSeSkinItem;
    GoTo2_OLD: TSeSkinItem;
    Window3_OLD: TSeSkinItem;
    NewWindow3_OLD: TSeSkinItem;
    Tile3_OLD: TSeSkinItem;
    Cascade3_OLD: TSeSkinItem;
    ArrangeAll3_OLD: TSeSkinItem;
    N13_OLD: TSeSkinItem;
    Hide1_OLD: TSeSkinItem;
    Show1_OLD: TSeSkinItem;
    Help3_OLD: TSeSkinItem;
    Contents3_OLD: TSeSkinItem;
    SearchforHelpOn3_OLD: TSeSkinItem;
    HowtoUseHelp3_OLD: TSeSkinItem;
    About3_OLD: TSeSkinItem;
    CustomItem1: TSeSkinItem;
    CustomItem2: TSeSkinItem;
    CustomItem3: TSeSkinItem;
    SeSkinEdit1: TSeSkinEdit;
    SeSkinSpinButton1: TSeSkinSpinButton;
    procedure FormCreate(Sender: TObject);
    procedure CustomItem7Click(Sender: TObject);
    procedure CustomItem20Click(Sender: TObject);
    procedure CustomItem11Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure CustomItem15Click(Sender: TObject);
    procedure KsBlendRadioButton1Click(Sender: TObject);
    procedure KsBlendRadioButton2Click(Sender: TObject);
    procedure KsBlendRadioButton3Click(Sender: TObject);
    procedure KsBlendCheckBox1Click(Sender: TObject);
    procedure KsBlendRadioButton4Click(Sender: TObject);
    procedure KsBlendCheckBox2Click(Sender: TObject);
    procedure SeSkinSpinButton1Changing(Sender: TObject;
      var AllowChange: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmMenu: TfrmMenu;

implementation {===============================================================}

uses KsSkinVersion, about, Form, Main;

{$R *.DFM}

procedure TfrmMenu.FormCreate(Sender: TObject);
begin
  Caption := 'MegaDemo - ' + sSeSkinVersionPropText;
end;

procedure TfrmMenu.CustomItem7Click(Sender: TObject);
begin
  frmAbout := TfrmAbout.Create(Self);
  frmAbout.ShowModal;
  frmAbout.Free;
end;

procedure TfrmMenu.CustomItem20Click(Sender: TObject);
begin
  TKsCustomItem(Sender).Checked := not TKsCustomItem(Sender).Checked;
end;

procedure TfrmMenu.CustomItem11Click(Sender: TObject);
begin
  ShowMessage('You clicked on ' + TKsCustomItem(Sender).Caption);
end;

procedure TfrmMenu.CheckBox1Click(Sender: TObject);
begin
  SeSkinMenuBar1.PopupBlend := CheckBox1.Checked;
  SeSkinPopupMenu1.PopupBlend := CheckBox1.Checked;
  SeSkinForm1.SysMenuBlend := CheckBox1.Checked;
end;

procedure TfrmMenu.CustomItem15Click(Sender: TObject);
begin
  Close;
end;

procedure TfrmMenu.KsBlendRadioButton1Click(Sender: TObject);
begin
  SeSkinMenuBar1.ShowAnimation := kaNone;
  SeSkinForm1.SysMenuShowAnimation := kaNone;
  SeSkinPopupMenu1.ShowAnimation := kaNone;
end;

procedure TfrmMenu.KsBlendRadioButton2Click(Sender: TObject);
begin
  SeSkinMenuBar1.ShowAnimation := kaFade;
  SeSkinForm1.SysMenuShowAnimation := kaFade;
  SeSkinPopupMenu1.ShowAnimation := kaFade;
end;

procedure TfrmMenu.KsBlendRadioButton3Click(Sender: TObject);
begin
  SeSkinMenuBar1.ShowAnimation := kaSlide;
  SeSkinForm1.SysMenuShowAnimation := kaSlide;
  SeSkinPopupMenu1.ShowAnimation := kaSlide;
end;

procedure TfrmMenu.KsBlendRadioButton4Click(Sender: TObject);
begin
  SeSkinMenuBar1.ShowAnimation := kaRect;
  SeSkinForm1.SysMenuShowAnimation := kaRect;
  SeSkinPopupMenu1.ShowAnimation := kaRect;
end;

procedure TfrmMenu.KsBlendCheckBox1Click(Sender: TObject);
begin
  if KsBlendCheckBox1.Checked then
    SeSkinMenuBar1.Align := alBottom
  else
    SeSkinMenuBar1.Align := alTop;
end;

procedure TfrmMenu.KsBlendCheckBox2Click(Sender: TObject);
begin
  SeSkinMenuBar1.DropShadow := KsBlendCheckBox2.Checked;
  SeSkinForm1.SysMenuDropShadow := KsBlendCheckBox2.Checked;
  SeSkinPopupMenu1.DropShadow := KsBlendCheckBox2.Checked;
end;

procedure TfrmMenu.SeSkinSpinButton1Changing(Sender: TObject;
  var AllowChange: Boolean);
begin
  SeSkinMenuBar1.PopupBlendValue := SeSkinSpinButton1.Position;
  SeSkinPopupMenu1.PopupBlendValue := SeSkinSpinButton1.Position;
  SeSkinForm1.SysMenuBlendValue := SeSkinSpinButton1.Position;
end;

end.
