home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 April A / Pcwk4a98.iso / PROGRAM / DELPHI16 / Calmira / Src / SRC / DESKPROP.PAS < prev    next >
Pascal/Delphi Source File  |  1997-02-15  |  3KB  |  82 lines

  1. {**************************************************************************}
  2. {                                                                          }
  3. {    Calmira shell for Microsoft« Windows(TM) 3.1                          }
  4. {    Source Release 1.0                                                    }
  5. {    Copyright (C) 1997  Li-Hsin Huang                                     }
  6. {                                                                          }
  7. {    This program is free software; you can redistribute it and/or modify  }
  8. {    it under the terms of the GNU General Public License as published by  }
  9. {    the Free Software Foundation; either version 2 of the License, or     }
  10. {    (at your option) any later version.                                   }
  11. {                                                                          }
  12. {    This program is distributed in the hope that it will be useful,       }
  13. {    but WITHOUT ANY WARRANTY; without even the implied warranty of        }
  14. {    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         }
  15. {    GNU General Public License for more details.                          }
  16. {                                                                          }
  17. {    You should have received a copy of the GNU General Public License     }
  18. {    along with this program; if not, write to the Free Software           }
  19. {    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.             }
  20. {                                                                          }
  21. {**************************************************************************}
  22.  
  23. unit Deskprop;
  24.  
  25. interface
  26.  
  27. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  28.   StdCtrls, ExtCtrls, Chklist, TabNotBk;
  29.  
  30. type
  31.   TDeskPropDlg = class(TForm)
  32.     OKBtn: TBitBtn;
  33.     CancelBtn: TBitBtn;
  34.     Notebook: TTabbedNotebook;
  35.     CheckList: TCheckList;
  36.     Placement: TRadioGroup;
  37.     Label1: TLabel;
  38.     HelpBtn: TBitBtn;
  39.     procedure FormCreate(Sender: TObject);
  40.     procedure OKBtnClick(Sender: TObject);
  41.   private
  42.     { Private declarations }
  43.   public
  44.     { Public declarations }
  45.   end;
  46. {
  47. var
  48.   DeskPropDlg: TDeskPropDlg;
  49. }
  50.  
  51. implementation
  52.  
  53. {$R *.DFM}
  54.  
  55. uses Settings, Desk;
  56.  
  57. procedure TDeskPropDlg.FormCreate(Sender: TObject);
  58. begin
  59.   Notebook.PageIndex := 0;
  60.   Placement.ItemIndex := Integer(WindowOpen);
  61.   CheckList.SetData(
  62.     [AutoSize, HollowDrag, SaveWindows,
  63.      ShortArrows, AnimCursor, ShowDeskMenu,
  64.      TreeAlign, ConfirmDelShort, StickyShorts,
  65.      OneClickShorts, BrowseSame, RightClose]);
  66. end;
  67.  
  68. procedure TDeskPropDlg.OKBtnClick(Sender: TObject);
  69. begin
  70.   WindowOpen := TWindowOpen(Placement.ItemIndex);
  71.   CheckList.GetData(
  72.     [@AutoSize, @HollowDrag, @SaveWindows,
  73.      @ShortArrows, @AnimCursor, @ShowDeskMenu,
  74.      @TreeAlign, @ConfirmDelShort, @StickyShorts,
  75.      @OneClickShorts, @BrowseSame, @RightClose]);
  76.   SaveDeskProp;
  77.   AnnounceSettingsChanged([scDesktop]);
  78. end;
  79.  
  80.  
  81. end.
  82.