home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / tvrw31d.zip / RESMKR.SKL < prev    next >
Text File  |  1996-04-16  |  4KB  |  144 lines

  1. !
  2. ! Resource builder source skeleton file.
  3. !
  4. !  Copyright (c) 1995-96 Balázs Scheidler
  5. !  This file is part of Turbo Vision Resource WorkShop
  6. !
  7. ! Lines that begin with '!' are comments. All other lines are copied to the
  8. ! generated output.
  9. !
  10. ! Lines that begin with ` are quoted lines. Quoted lines are directly copied
  11. ! to output WITHOUT macro expansion. Use this if you need something in a line
  12. ! beginning with $(
  13. !
  14. ! The following macros are defined in this file:
  15. !
  16. !  $(FULLNAME)   = fully expanded filename
  17. !  $(FILENAME)   = 8+3 filename
  18. !  $(FNAME)      = 8 char file name
  19. !  $(FEXT)       = 3 char extension
  20. !  $(DESCRIPTION)= The description of the project
  21. !  $(VERSION)    = the version of this project
  22. !  $(AUTHOR)     = the author of the project
  23. !  $(RESNAME)    = name of the resource file to be generated
  24. !  $(MAKEFNS)    = expands to the make functions of the objects to be generated
  25. !
  26. !  You can also use a conditional "macro". It is called $(IFDEF xxxx), where
  27. !  xxxx is one of the below listed strings. TVRW will ignore the lines
  28. !  between $(IFDEF) and $(ENDIF) if the symbol xxxx is not defined.
  29. !  NOTE: DO NOT write anything else in lines which contain $(IFDEF) and
  30. !  $(ENDIF)
  31. !
  32. !   xxxx can be one of the following:
  33. !     CPP
  34. !     PASCAL
  35. !
  36. !     anything else:  true if you gave them in the Sourcer Options dialog
  37. !                     Defines inputline.
  38. !
  39. ! These macros are case insensitive.
  40. !
  41. $(IFDEF PASCAL)
  42. {**************************************************************************
  43.   $(FILENAME) resource maker program
  44.  
  45.   Copyright (c) 1996 $(AUTHOR)
  46.  
  47.   Generated by Turbo Vision Resource WorkShop
  48.  **************************************************************************}
  49. program $(FNAME);
  50. uses
  51.   Drivers, Objects, Views, Dialogs, Validate, Editors, StdDlg, App;
  52.  
  53. $(IFDEF ADDMAKEFNS)
  54. $(MAKEFNS)
  55. $(ENDIF)
  56.  
  57. var
  58.   ResFile: PResourceFile;
  59.   P: PObject;
  60.  
  61. begin
  62.   RegisterObjects;
  63.   RegisterViews;
  64.   RegisterDialogs;
  65.   RegisterValidate;
  66.   RegisterEditors;
  67.   RegisterStdDlg;
  68.   ResFile := New(PResourceFile, Init(New(PBufStream, Init('$(RESNAME).RES', stCreate, 4096))));
  69.   with ResFile^ do begin
  70.     $(PUTOBJECTS ResFile P)
  71.   end;
  72.   Dispose(ResFile, Done);
  73. end.
  74. $(ENDIF)
  75. $(IFDEF CPP)
  76. /**************************************************************************
  77.   $(FILENAME) resource maker program
  78.  
  79.   Copyright (c) 1996 $(AUTHOR)
  80.  
  81.   Generated by Turbo Vision Resource WorkShop
  82.  **************************************************************************/
  83. #define Uses_TApplication
  84. #define Uses_TKeys
  85. #define Uses_TRect
  86. #define Uses_TMenuBar
  87. #define Uses_TSubMenu
  88. #define Uses_TMenuItem
  89. #define Uses_TStatusLine
  90. #define Uses_TStatusItem
  91. #define Uses_TStatusDef
  92. #define Uses_TDeskTop
  93. #define Uses_TButton
  94. #define Uses_TLabel
  95. #define Uses_TStaticText
  96. #define Uses_TParamText
  97. #define Uses_TMemo
  98. #define Uses_TListBox
  99. #define Uses_TSortedListBox
  100. #define Uses_TScrollBar
  101. #define Uses_THistory
  102. #define Uses_TInputLine
  103. #define Uses_TCheckBoxes
  104. #define Uses_TRadioButtons
  105. #define Uses_TPXPictureValidator
  106. #define Uses_TStringLookupValidator
  107. #define Uses_TRangeValidator
  108. #define Uses_TDialog
  109. #define Uses_TResourceFile
  110.  
  111. #include <tvision\tv.h>
  112.  
  113. __link(RLabel);
  114. __link(RStaticText);
  115. __link(RParamText);
  116. __link(RMemo);
  117. __link(RListBox);
  118. __link(RSortedListBox);
  119. __link(RScrollBar);
  120. __link(RHistory);
  121. __link(RInputLine);
  122. __link(RCheckBoxes);
  123. __link(RRadioButtons);
  124. __link(RPXPictureValidator);
  125. __link(RStringLookupValidator);
  126. __link(RRangeValidator);
  127. __link(RDialog);
  128.  
  129. $(IFDEF ADDMAKEFNS)
  130. $(MAKEFNS)
  131. $(ENDIF)
  132.  
  133. int main(void)
  134. {
  135.     TResourceFile *resFile;
  136.     TObject *p;
  137.     resFile = new TResourceFile(new fpstream("$(RESNAME)", ios:in|ios:binary));
  138.     $(PUTOBJECTS resFile p);
  139.     TObject::destroy(resFile);
  140.     return (0);
  141. }
  142.  
  143. $(ENDIF)
  144.