home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / mp3osr05.zip / src / mp3opt.pas < prev    next >
Pascal/Delphi Source File  |  1999-12-08  |  2KB  |  72 lines

  1. (*
  2.  * part of MPEG searcher project
  3.  *  (c) 1999 by Alexander Trunov, 2:5069/10, jnc@mail.ru
  4.  *)
  5.  
  6. unit MP3Opt;
  7.  
  8. interface
  9.  
  10. uses
  11.   Objects, Dialogs, Views, Drivers
  12.   {$IFDEF fpc}, Commands{$ENDIF}
  13.   ;
  14.  
  15. type
  16.   PMP3Options = ^TMP3Options;
  17.   TMP3Options = object(TDialog)
  18.     rdoOption: PRadioButtons;
  19.     constructor Init;
  20.     procedure GetData(var R); virtual;
  21.     procedure SetData(var R); virtual;
  22.     function DataSize: Longint; virtual;
  23.   end;
  24.  
  25. implementation
  26.  
  27. constructor TMP3Options.Init;
  28. var
  29.   R: TRect;
  30. begin
  31.   R.Assign(0, 0, 50, 11);
  32.   inherited Init(R, 'Playlist generating options');
  33.  
  34.   Options := Options or ofCentered;
  35.  
  36.   R.Assign(2, 1, 48, 2);
  37.   Insert(New(PStaticText, Init(R, ^C' Choose an option: ')));
  38.  
  39.     R.Assign(2, 3, 48, 7);
  40.     rdoOption := New(PRadioButtons, Init(R, NewSItem('~I~nternet-playlist (M3U)',
  41.     NewSItem('~f~iles.bbs',
  42.     NewSItem('~W~hole list',
  43.     NewSItem('~T~wo-items separated list', nil))))));
  44.     Insert(rdoOption);
  45.  
  46.     R.Assign(36, 8, 48, 10);
  47.     Insert(New(PButton, Init(R, '~C~ancel', cmCancel, 0)));
  48.  
  49.     R.Assign(21, 8, 35, 10);
  50.     Insert(New(PButton, Init(R, '~G~enerate', cmOk, bfDefault)));
  51.  
  52.     rdoOption^.Select;
  53.  
  54. end;
  55.  
  56. function TMP3Options.DataSize: Longint;
  57. begin
  58.   DataSize := SizeOf(Integer);
  59. end;
  60.  
  61. procedure TMP3Options.GetData(var R);
  62. begin
  63.   Integer(R) := rdoOption^.Sel;
  64. end;
  65.  
  66. procedure TMP3Options.SetData(var R);
  67. begin
  68.   rdoOption^.Press(Integer(R));
  69. end;
  70.  
  71. end.
  72.