unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ShellApi,
  Dialogs, NxThemesSupport, NxCollection, NxToolBox, ImgList, NxPageControl,
  ExtCtrls;

type
  TForm1 = class(TForm)
    infDescription: TNxInfoPanel;
    NxColorScheme1: TNxColorScheme;
    NxPathControl1: TNxPathControl;
    imlOutlookBar: TImageList;
    imlPath: TImageList;
    NxHeaderPanel1: TNxHeaderPanel;
    NxOutlookBar1: TNxOutlookBar;
    NxLinkLabel1: TNxLinkLabel;
    NxPageControl1: TNxPageControl;
    NxTabSheet1: TNxTabSheet;
    NxTabSheet2: TNxTabSheet;
    NxTabSheet3: TNxTabSheet;
    NxFlipPanel1: TNxFlipPanel;
    NxButton1: TNxButton;
    NxButton2: TNxButton;
    NxButton3: TNxButton;
    NxAlertWindow1: TNxAlertWindow;
    NxLinkLabel2: TNxLinkLabel;
    NxGroupHeader1: TNxGroupHeader;
    NxHtmlLabel1: TNxHtmlLabel;
    shpBlue: TShape;
    shpSilver: TShape;
    shpBlack: TShape;
    procedure FormCreate(Sender: TObject);
    procedure NxPathControl1ItemMouseMove(Sender: TObject;
      Node: TNxPathNode);
    procedure NxButton3Click(Sender: TObject);
    procedure NxLinkLabel1Click(Sender: TObject);
    procedure NxLinkLabel2Click(Sender: TObject);
    procedure shpBlueMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure shpSilverMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure shpBlackMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses NxClasses;

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
  C: HCURSOR;
begin
  C := LoadCursor(0, IDC_HAND);
  if C <> 0 then Screen.Cursors[crHandPoint] := C;

  with NxPathControl1.Items.AddChild(nil) do
  begin
    Text := 'Home';
  end;

  with NxPathControl1.Items.AddChild(NxPathControl1.Items[0]) do
  begin
    Text := 'Music';
  end;

  with NxPathControl1.Items.AddChild(NxPathControl1.Items[0]) do
  begin
    Text := 'Pictures';
  end;

  // Set 1st item (Home) to be selected on form create.
  NxPathControl1.Selected := NxPathControl1.Items[0];
end;

procedure TForm1.NxPathControl1ItemMouseMove(Sender: TObject;
  Node: TNxPathNode);
begin
  if Assigned(Node) then
  begin
    infDescription.Text := 'OnItemMouseMove: ' + Node.Text;
  end;
end;

procedure TForm1.NxButton3Click(Sender: TObject);
begin
  NxAlertWindow1.Popup;
end;

procedure TForm1.NxLinkLabel1Click(Sender: TObject);
begin
  ShellExecute(Handle, 'Open', 'http://www.bergsoft.net/', '', '', SW_SHOW);
end;

procedure TForm1.NxLinkLabel2Click(Sender: TObject);
begin
  ShellExecute(Handle, 'Open', 'http://www.bergsoft.net/news.xml', '', '', SW_SHOW);
end;

procedure TForm1.shpBlueMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  NxColorScheme1.ColorScheme := csBlue;
end;

procedure TForm1.shpSilverMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  NxColorScheme1.ColorScheme := csSilver;
end;

procedure TForm1.shpBlackMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  NxColorScheme1.ColorScheme := csBlack;
end;

end.
