unit Step111;
//******************************************************************/
//                (c)                      */
//*                -, 1991, 1996                     */
//*                 -   5.x                      */
//******************************************************************/
//*                                              */
//*                                     */
//*                                                                */
//******************************************************************/

interface
 uses  Sysutils, LtDefine, LibTool, step110, LDefin2D;

 procedure  LIBRARYENTRY( comm: WORD  ); Pascal;
// function   LIBRARYID   : Cardinal;      Pascal;
 function   LIBRARYNAME : PChar;  pascal;
 function CallBackCommand( info : PRequestInfo; command : integer ): Integer;  pascal;

 implementation


//----------------------------------------------------------------------------------------
//
//---
//function   LIBRARYID : Cardinal;  pascal;
//begin
//  Result:=100;
//end;

//----------------------------------------------------------------------------------------
//
//---
function LIBRARYNAME : PChar;  pascal;
begin
  Result:='   ';
end;

//----------------------------------------------------------------------------------------
//
//---
procedure  LIBRARYENTRY( comm : Word  );  pascal;
var
 info    : RequestInfo  ;
 command : integer;
 buf : string;
begin
//           .
//        NULL,
//    CommandWindow  ,
//        .
//      .
//     ,    
//      FALSE.
//    -1.
 FillChar( info, sizeof(info), 0 );
 info.commands := PChar(ID_TREE_CONTENTS);  //     
 info.title :=  PChar(ID_WINDOW_TITLE_1); //   
 info.callBack := Addr(CallBackCommand);
  command := CommandWindow( Addr(info) );
  buf := Format ( '  = %d', [command] );
  ksMessage( PChar(buf));

end;

//----------------------------------------------------------------------------------------
//
//---
function CallBackCommand( info : PRequestInfo; command : integer ): Integer;  pascal;
var
  buf : string;

begin
  buf := Format ( 'command = %d', [command] );
  ksMessage( PChar(buf));
//        
//       
  if ( command = ID_COMMAND_1 )  then
    info^.title := PChar(ID_WINDOW_TITLE_2)
  else
    info^.title := PChar(ID_WINDOW_TITLE_3);

//   ,    
//   :
// TRUE - 
// FALSE -    
   CallBackCommand := Integer(command=ID_COMMAND_2_2_1_3);
end;

end.
