{ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
 Ί                              EXAMPLE SOURCE                               Ί
 ΜΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΉ
 Ί                  To be used with MOS v3.0 Professional GUI                Ί
 ΜΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΉ
 Ί Coded by Zuul as BouFFtou as Cheveau Fr‚d‚ric.                            Ί
 Ί Source Turbo Pascal v7.00 generated by MRE (MOS Resource Editor) v2.8.    Ί
 Ί Contact us on MOS Home's Page - http://www.multimania.com/mos             Ί
 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ}

{$M 65500,0,365520}                     {*Stack And Heap*}

Program FileSel;                        {*Program Name*}

Uses Dos,                               {*Unit BP7 DOS*}
     MOS_VESA,MOS_DEB,                  {*Manage VESA and debug*}
     MOS_STR, MOS_BLK,                  {*Manage Strings and blankers*}
     MOS_CRT, MOS_BAS,                  {*Manage Initialisations and CRT*}
     MOS_ASM, MOS_MSE,                  {*Manage Assembler and Mouse*}
     MOS_IPX, MOS_XMS,                  {*Manage Networks and XMS Memory*}
     MOS_TOO, MOS_GAD,                  {*Manage Tools and Gadgets*}
     MOS_GFX, MOS_BMP,                  {*Manage Graphics and BMP*}
     MOS_WIN, MOS_MEN,                  {*Manage Windows and Menus*}
     MOS_WAV, MOS_VAR,                  {*Manage WAV Sounds*}
     MOS_DIR, MOS_SYS,                  {*Manage Disk and System*}
     MOS_TSK, MOS_LIS,                  {*Manage Tasks and Lists*}
     MOS_EZR, MOS_GPH,                  {*Manage Dialogs and Graph*}
     MOS_KBD, MOS_DSK,                  {*Manage Keyboard and Disk*}
     MOS_REQ, MOS_SWAP;                 {*Manage Requesters and Swap Disk*}

{ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
 Ί                             PROCEDURE Main                                Ί
 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ}

Procedure Main(Px,Py:Integer);
Var W1            :TWindow;             {*Window Structure*}
    Even          :Byte;                {*Get Windows Evens*}
    XOk,XCancel   :Boolean;             {*Exit Flags*}
    Cyc1          :TCycler;             {*Structure Cyclers*}
    But1          :TButton;             {*Structure Boutons*}
    DirSel,FilSel :String;              {*Gestion du Directory*}
    Size          :Longint;

{************************* DISPLAY WINDOW CONTENT ***************************}

Procedure REDRAW_FRAME;                 {*Define Window Content*}
Begin
Win_Clip(On,W1);                        {*Clipping Window*}
Button( LaF*5,HaF*2,LaF*40,-1,0,7,$0,But1,'_GET FILE MANAGER');
Cycler( LaF*5,HaF*4,LaF*20,Cyc1.CyclVal,0,7,$10,Cyc1,Loc(982));
Win_Clip(Off,W1);                       {*Restore Normal Clipping*}
End;

{***************************** MAIN PROCEDURE *******************************}

Begin
Win_Init(Px,Py,Px+LaF*80,Py+HaF1+HaF*9,$51F9,'FILE MANAGER',W1);
Win_Sup(100,50,250,200,79,60,639,479,0,5,$0A10,W1);{*Supplement*}
If NError<>0 Then Exit;                 {*Initialisations Errors ?*}
Win_Draw(W1);                           {*Display Window*}

Cyc1.CyclVal:=1;                        {*For File Manager*}
DirSel:=''; FilSel:='';

REDRAW_FRAME;                           {*Display Window Content*}
XOk:=No; XCancel:=No;                   {*Init Exit Flags*}

Repeat;
If Win_Ready(W1) Then                   {*Test if Window Ready*}
   Begin                                {*Test Personnals Gadgets*}
   Win_Clip(On,W1);                     {*Clipping Window*}
   Cycler_GetMsg(Cyc1,1);
   If Button_GetMsg(But1,1) Then
      Begin
      Req_FileManager(W1.X1+30,W1.Y1+35,300,'FILE MANAGER','_OK','*.*',Cyc1.CyclVal-1,DirSel,FilSel,Size);
      If FilSel<>'' Then ;              {*Make here your File Action...*}
      End;
   Win_Clip(Off,W1);                    {*Restore Normal Clipping*}
   End;

Even:=Win_Test(W1);                     {*Get Windows Evens*}
If Even=1 Then XCancel:=Yes;            {*Window Closed   => Exit*}
If Even=9 Then REDRAW_FRAME;            {*Window Moved    => Display Content*}
Until (XOk) Or (XCancel);               {*Exit Flags*}

Win_Kill(W1);                           {*Close Window if Needs*}
End;

{ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
 Ί                        MAIN PROGRAM (INITIALISATIONS)                     Ί
 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ}

Begin
INIT_BASE;                               {*Initialise Hardware*}
INIT_SCREEN;                            {*Initialise Screen*}
INIT_MOUSE;                             {*Initialise Mouse*}

Oldexit:=ExitProc;                      {*Intercept Errors*}
SetJump(MyAddr);
ExitProc:=@ENTRY_INT24;

Main(100,100);                          {*Call File Manager*}

DONE_MOUSE;                             {*Restore Mouse*}
DONE_SCREEN;                            {*Restore Screen*}
DONE_BASE;                               {*Restore Hardware*}
End.
