home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / delphi / kompon / d456 / CAJSCRPT.ZIP / ifps3 / ifpii_forms.pas < prev    next >
Pascal/Delphi Source File  |  2002-07-12  |  12KB  |  269 lines

  1. unit ifpii_forms;
  2. {$I ifps3_def.inc}
  3.  
  4. interface
  5. uses
  6.   ifpscomp, ifps3common, ifps3utl, ifpiclass;
  7.  
  8. procedure SIRegister_Forms_TypesAndConsts(Cl: TIFPSCompileTimeClassesImporter);
  9.  
  10.  
  11. procedure SIRegisterTCONTROLSCROLLBAR(Cl: TIFPSCompileTimeClassesImporter);
  12. procedure SIRegisterTSCROLLINGWINCONTROL(Cl: TIFPSCompileTimeClassesImporter);
  13. procedure SIRegisterTSCROLLBOX(Cl: TIFPSCompileTimeClassesImporter);
  14. procedure SIRegisterTFORM(Cl: TIFPSCompileTimeClassesImporter);
  15. procedure SIRegisterTAPPLICATION(Cl: TIFPSCompileTimeClassesImporter);
  16.  
  17. procedure SIRegister_Forms(Cl: TIFPSCompileTimeClassesImporter);
  18.  
  19. implementation
  20. uses
  21. {$IFDEF CLX}
  22.   QForms;
  23. {$ELSE}
  24.   Forms;
  25. {$ENDIF}
  26.  
  27. procedure SIRegisterTCONTROLSCROLLBAR(Cl: TIFPSCompileTimeClassesImporter);
  28. begin
  29.   with Cl.Add(cl.FindClass('TPERSISTENT'), TCONTROLSCROLLBAR) do
  30.   begin
  31.     RegisterProperty('KIND', 'TSCROLLBARKIND', iptr);
  32.     RegisterProperty('SCROLLPOS', 'INTEGER', iptr);
  33.     RegisterProperty('MARGIN', 'WORD', iptrw);
  34.     RegisterProperty('INCREMENT', 'TSCROLLBARINC', iptrw);
  35.     RegisterProperty('RANGE', 'INTEGER', iptrw);
  36.     RegisterProperty('POSITION', 'INTEGER', iptrw);
  37.     RegisterProperty('TRACKING', 'BOOLEAN', iptrw);
  38.     RegisterProperty('VISIBLE', 'BOOLEAN', iptrw);
  39.   end;
  40. end;
  41.  
  42. procedure SIRegisterTSCROLLINGWINCONTROL(Cl: TIFPSCompileTimeClassesImporter);
  43. begin
  44.   with Cl.Add(cl.FindClass('TWINCONTROL'), TSCROLLINGWINCONTROL) do
  45.   begin
  46.     RegisterMethod('procedure SCROLLINVIEW(ACONTROL:TCONTROL)');
  47.     RegisterProperty('HORZSCROLLBAR', 'TCONTROLSCROLLBAR', iptrw);
  48.     RegisterProperty('VERTSCROLLBAR', 'TCONTROLSCROLLBAR', iptrw);
  49.   end;
  50. end;
  51.  
  52. procedure SIRegisterTSCROLLBOX(Cl: TIFPSCompileTimeClassesImporter);
  53. begin
  54.   with Cl.Add(cl.FindClass('TSCROLLINGWINCONTROL'), TSCROLLBOX) do
  55.   begin
  56.     RegisterProperty('BORDERSTYLE', 'TBORDERSTYLE', iptrw);
  57.     RegisterProperty('COLOR', 'TCOLOR', iptrw);
  58.     RegisterProperty('FONT', 'TFONT', iptrw);
  59.     RegisterProperty('AUTOSCROLL', 'BOOLEAN', iptrw);
  60.     RegisterProperty('ONCLICK', 'TNOTIFYEVENT', iptrw);
  61.     RegisterProperty('ONDBLCLICK', 'TNOTIFYEVENT', iptrw);
  62.  
  63.     {$IFNDEF MINIVCL}
  64.     RegisterProperty('ONRESIZE', 'TNOTIFYEVENT', iptrw);
  65.     RegisterProperty('DRAGCURSOR', 'TCURSOR', iptrw);
  66.     RegisterProperty('DRAGMODE', 'TDRAGMODE', iptrw);
  67.     RegisterProperty('PARENTCOLOR', 'BOOLEAN', iptrw);
  68.     RegisterProperty('PARENTFONT', 'BOOLEAN', iptrw);
  69.     RegisterProperty('PARENTSHOWHINT', 'BOOLEAN', iptrw);
  70.     RegisterProperty('POPUPMENU', 'TPOPUPMENU', iptrw);
  71.     RegisterProperty('CTL3D', 'BOOLEAN', iptrw);
  72.     RegisterProperty('PARENTCTL3D', 'BOOLEAN', iptrw);
  73.     RegisterProperty('ONDRAGDROP', 'TDRAGDROPEVENT', iptrw);
  74.     RegisterProperty('ONDRAGOVER', 'TDRAGOVEREVENT', iptrw);
  75.     RegisterProperty('ONENDDRAG', 'TENDDRAGEVENT', iptrw);
  76.     RegisterProperty('ONENTER', 'TNOTIFYEVENT', iptrw);
  77.     RegisterProperty('ONEXIT', 'TNOTIFYEVENT', iptrw);
  78.     RegisterProperty('ONMOUSEDOWN', 'TMOUSEEVENT', iptrw);
  79.     RegisterProperty('ONMOUSEMOVE', 'TMOUSEMOVEEVENT', iptrw);
  80.     RegisterProperty('ONMOUSEUP', 'TMOUSEEVENT', iptrw);
  81.     {$ENDIF}
  82.   end;
  83. end;
  84.  
  85. procedure SIRegisterTFORM(Cl: TIFPSCompileTimeClassesImporter);
  86. begin
  87.  with Cl.Add(cl.FindClass('TSCROLLINGWINCONTROL'), TFORM) do
  88.   begin
  89.     RegisterMethod('constructor CREATENEW(AOWNER:TCOMPONENT; Dummy: Longint)');
  90.     RegisterMethod('procedure CLOSE');
  91.     RegisterMethod('procedure HIDE');
  92.     RegisterMethod('procedure SHOW');
  93.     RegisterMethod('function SHOWMODAL:INTEGER');
  94.     RegisterMethod('procedure RELEASE');
  95.     RegisterProperty('ACTIVE', 'BOOLEAN', iptr);
  96.     RegisterProperty('ACTIVECONTROL', 'TWINCONTROL', iptrw);
  97.     RegisterProperty('BORDERICONS', 'Longint', iptrw);
  98.     RegisterProperty('BORDERSTYLE', 'TFORMBORDERSTYLE', iptrw);
  99.     RegisterProperty('CAPTION', 'STRING', iptrw);
  100.     RegisterProperty('AUTOSCROLL', 'BOOLEAN', iptrw);
  101.     RegisterProperty('COLOR', 'TCOLOR', iptrw);
  102.     RegisterProperty('FONT', 'TFONT', iptrw);
  103.     RegisterProperty('FORMSTYLE', 'TFORMSTYLE', iptrw);
  104.     RegisterProperty('KEYPREVIEW', 'BOOLEAN', iptrw);
  105.     RegisterProperty('POSITION', 'TPOSITION', iptrw);
  106.     RegisterProperty('ONACTIVATE', 'TNOTIFYEVENT', iptrw);
  107.     RegisterProperty('ONCLICK', 'TNOTIFYEVENT', iptrw);
  108.     RegisterProperty('ONDBLCLICK', 'TNOTIFYEVENT', iptrw);
  109.     RegisterProperty('ONCLOSE', 'TCLOSEEVENT', iptrw);
  110.     RegisterProperty('ONCLOSEQUERY', 'TCLOSEQUERYEVENT', iptrw);
  111.     RegisterProperty('ONCREATE', 'TNOTIFYEVENT', iptrw);
  112.     RegisterProperty('ONDESTROY', 'TNOTIFYEVENT', iptrw);
  113.     RegisterProperty('ONDEACTIVATE', 'TNOTIFYEVENT', iptrw);
  114.     RegisterProperty('ONHIDE', 'TNOTIFYEVENT', iptrw);
  115.     RegisterProperty('ONKEYDOWN', 'TKEYEVENT', iptrw);
  116.     RegisterProperty('ONKEYPRESS', 'TKEYPRESSEVENT', iptrw);
  117.     RegisterProperty('ONKEYUP', 'TKEYEVENT', iptrw);
  118.     RegisterProperty('ONRESIZE', 'TNOTIFYEVENT', iptrw);
  119.     RegisterProperty('ONSHOW', 'TNOTIFYEVENT', iptrw);
  120.  
  121.  
  122.     {$IFNDEF MINIVCL}
  123.     {$IFNDEF CLX}
  124.     RegisterMethod('procedure ARRANGEICONS');
  125.     RegisterMethod('function GETFORMIMAGE:TBITMAP');
  126.     RegisterMethod('procedure PRINT');
  127.     RegisterMethod('procedure SENDCANCELMODE(SENDER:TCONTROL)');
  128.     RegisterProperty('ACTIVEOLECONTROL', 'TWINCONTROL', iptrw);
  129.     RegisterProperty('OLEFORMOBJECT', 'TOLEFORMOBJECT', iptrw);
  130.     RegisterProperty('CLIENTHANDLE', 'HWND', iptr);
  131.     RegisterProperty('TILEMODE', 'TTILEMODE', iptrw);
  132.     {$ENDIF}
  133.     RegisterMethod('procedure CASCADE');
  134.     RegisterMethod('function CLOSEQUERY:BOOLEAN');
  135.     RegisterMethod('procedure DEFOCUSCONTROL(CONTROL:TWINCONTROL;REMOVING:BOOLEAN)');
  136.     RegisterMethod('procedure FOCUSCONTROL(CONTROL:TWINCONTROL)');
  137.     RegisterMethod('procedure NEXT');
  138.     RegisterMethod('procedure PREVIOUS');
  139.     RegisterMethod('function SETFOCUSEDCONTROL(CONTROL:TWINCONTROL):BOOLEAN');
  140.     RegisterMethod('procedure TILE');
  141.     RegisterProperty('ACTIVEMDICHILD', 'TFORM', iptr);
  142.     RegisterProperty('CANVAS', 'TCANVAS', iptr);
  143.     RegisterProperty('DROPTARGET', 'BOOLEAN', iptrw);
  144.     RegisterProperty('MODALRESULT', 'Longint', iptrw);
  145.     RegisterProperty('MDICHILDCOUNT', 'INTEGER', iptr);
  146.     RegisterProperty('MDICHILDREN:INTEGER', 'TFORM INTEGER', iptr);
  147.     RegisterProperty('ICON', 'TICON', iptrw);
  148.     RegisterProperty('MENU', 'TMAINMENU', iptrw);
  149.     RegisterProperty('OBJECTMENUITEM', 'TMENUITEM', iptrw);
  150.     RegisterProperty('PIXELSPERINCH', 'INTEGER', iptrw);
  151.     RegisterProperty('PRINTSCALE', 'TPRINTSCALE', iptrw);
  152.     RegisterProperty('SCALED', 'BOOLEAN', iptrw);
  153.     RegisterProperty('WINDOWSTATE', 'TWINDOWSTATE', iptrw);
  154.     RegisterProperty('WINDOWMENU', 'TMENUITEM', iptrw);
  155.     RegisterProperty('CTL3D', 'BOOLEAN', iptrw);
  156.     RegisterProperty('POPUPMENU', 'TPOPUPMENU', iptrw);
  157.     RegisterProperty('ONDRAGDROP', 'TDRAGDROPEVENT', iptrw);
  158.     RegisterProperty('ONDRAGOVER', 'TDRAGOVEREVENT', iptrw);
  159.     RegisterProperty('ONMOUSEDOWN', 'TMOUSEEVENT', iptrw);
  160.     RegisterProperty('ONMOUSEMOVE', 'TMOUSEMOVEEVENT', iptrw);
  161.     RegisterProperty('ONMOUSEUP', 'TMOUSEEVENT', iptrw);
  162.     RegisterProperty('ONPAINT', 'TNOTIFYEVENT', iptrw);
  163.     {$ENDIF}
  164.   end;
  165. end;
  166.  
  167. procedure SIRegisterTAPPLICATION(Cl: TIFPSCompileTimeClassesImporter);
  168. begin
  169.   with Cl.Add(cl.FindClass('TCOMPONENT'), TAPPLICATION) do
  170.   begin
  171.     RegisterMethod('procedure BRINGTOFRONT');
  172.     RegisterMethod('function MESSAGEBOX(TEXT,CAPTION:PCHAR;FLAGS:WORD):INTEGER');
  173.     RegisterMethod('procedure MINIMIZE');
  174.     RegisterMethod('procedure PROCESSMESSAGES');
  175.     RegisterMethod('procedure RESTORE');
  176.     RegisterMethod('procedure TERMINATE');
  177.     RegisterProperty('ACTIVE', 'BOOLEAN', iptr);
  178.     RegisterProperty('EXENAME', 'STRING', iptr);
  179.     {$IFNDEF CLX}
  180.     RegisterProperty('HANDLE', 'HWND', iptrw);
  181.     RegisterProperty('UPDATEFORMATSETTINGS', 'BOOLEAN', iptrw);
  182.     {$ENDIF}
  183.     RegisterProperty('HINT', 'STRING', iptrw);
  184.     RegisterProperty('MAINFORM', 'TFORM', iptr);
  185.     RegisterProperty('SHOWHINT', 'BOOLEAN', iptrw);
  186.     RegisterProperty('SHOWMAINFORM', 'BOOLEAN', iptrw);
  187.     RegisterProperty('TERMINATED', 'BOOLEAN', iptr);
  188.     RegisterProperty('TITLE', 'STRING', iptrw);
  189.     RegisterProperty('ONACTIVATE', 'TNOTIFYEVENT', iptrw);
  190.     RegisterProperty('ONDEACTIVATE', 'TNOTIFYEVENT', iptrw);
  191.     RegisterProperty('ONIDLE', 'TIDLEEVENT', iptrw);
  192.     RegisterProperty('ONHINT', 'TNOTIFYEVENT', iptrw);
  193.     RegisterProperty('ONMINIMIZE', 'TNOTIFYEVENT', iptrw);
  194.     RegisterProperty('ONRESTORE', 'TNOTIFYEVENT', iptrw);
  195.  
  196.     {$IFNDEF MINIVCL}
  197.     RegisterMethod('procedure CONTROLDESTROYED(CONTROL:TCONTROL)');
  198.     RegisterMethod('procedure CANCELHINT');
  199.     RegisterMethod('procedure HANDLEEXCEPTION(SENDER:TOBJECT)');
  200.     RegisterMethod('procedure HANDLEMESSAGE');
  201.     RegisterMethod('procedure HIDEHINT');
  202.     RegisterMethod('procedure HINTMOUSEMESSAGE(CONTROL:TCONTROL;var MESSAGE:TMESSAGE)');
  203.     RegisterMethod('procedure INITIALIZE');
  204.     RegisterMethod('procedure NORMALIZETOPMOSTS');
  205.     RegisterMethod('procedure RESTORETOPMOSTS');
  206.     RegisterMethod('procedure RUN');
  207.     RegisterMethod('procedure SHOWEXCEPTION(E:EXCEPTION)');
  208.     {$IFNDEF CLX}
  209.     RegisterMethod('function HELPCOMMAND(COMMAND:INTEGER;DATA:LONGINT):BOOLEAN');
  210.     RegisterMethod('function HELPCONTEXT(CONTEXT:THELPCONTEXT):BOOLEAN');
  211.     RegisterMethod('function HELPJUMP(JUMPID:STRING):BOOLEAN');
  212.     RegisterProperty('DIALOGHANDLE', 'HWND', iptrw);
  213.     RegisterMethod('procedure CREATEHANDLE');
  214.     RegisterMethod('procedure HOOKMAINWINDOW(HOOK:TWINDOWHOOK)');
  215.     RegisterMethod('procedure UNHOOKMAINWINDOW(HOOK:TWINDOWHOOK)');
  216.     {$ENDIF}
  217.     RegisterProperty('HELPFILE', 'STRING', iptrw);
  218.     RegisterProperty('HINTCOLOR', 'TCOLOR', iptrw);
  219.     RegisterProperty('HINTPAUSE', 'INTEGER', iptrw);
  220.     RegisterProperty('HINTSHORTPAUSE', 'INTEGER', iptrw);
  221.     RegisterProperty('HINTHIDEPAUSE', 'INTEGER', iptrw);
  222.     RegisterProperty('ICON', 'TICON', iptrw);
  223.     RegisterProperty('ONHELP', 'THELPEVENT', iptrw);
  224.     {$ENDIF}
  225.   end;
  226. end;
  227.  
  228. procedure SIRegister_Forms_TypesAndConsts(Cl: TIFPSCompileTimeClassesImporter);
  229. begin
  230.   Cl.Se.AddTypeS('TIdleEvent', 'procedure (Sender: TObject; var Done: Boolean)');
  231.   Cl.SE.AddTypeS('TScrollBarKind', '(sbHorizontal, sbVertical)');
  232.   Cl.SE.AddTypeS('TFormBorderStyle', '(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)');
  233.   Cl.Se.AddTypeS('TBorderStyle', 'TFormBorderStyle');
  234.   Cl.SE.AddTypeS('TWindowState', '(wsNormal, wsMinimized, wsMaximized)');
  235.   Cl.SE.AddTypeS('TFormStyle', '(fsNormal, fsMDIChild, fsMDIForm, fsStayOnTop)');
  236.   Cl.SE.AddTypeS('TPosition', '(poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter)');
  237.   Cl.SE.AddTypeS('TPrintScale', '(poNone, poProportional, poPrintToFit)');
  238.   Cl.SE.AddTypeS('TCloseAction', '(caNone, caHide, caFree, caMinimize)');
  239.   Cl.SE.AddTypeS('TCloseEvent' ,'procedure(Sender: TObject; var Action: TCloseAction)');
  240.   Cl.SE.AddTypeS('TCloseQueryEvent' ,'procedure(Sender: TObject; var CanClose: Boolean)');
  241.   Cl.SE.AddConstantN('biSystemMenu', 'Byte')^.Value.Value := #1;
  242.   Cl.SE.AddConstantN('biMinimize', 'Byte')^.Value.Value := #2;
  243.   Cl.SE.AddConstantN('biMaximize', 'Byte')^.Value.Value := #4;
  244.   Cl.SE.AddConstantN('biHelp', 'Byte')^.Value.Value := #8;
  245. end;
  246.  
  247. procedure SIRegister_Forms(Cl: TIFPSCompileTimeClassesImporter);
  248. begin
  249.   SIRegister_Forms_TypesAndConsts(cl);
  250.  
  251.   {$IFNDEF MINIVCL}
  252.   SIRegisterTCONTROLSCROLLBAR(cl);
  253.   {$ENDIF}
  254.   SIRegisterTScrollingWinControl(cl);
  255.   {$IFNDEF MINIVCL}
  256.   SIRegisterTSCROLLBOX(cl);
  257.   {$ENDIF}
  258.   SIRegisterTForm(Cl);
  259.   {$IFNDEF MINIVCL}
  260.   SIRegisterTApplication(Cl);
  261.   {$ENDIF}
  262. end;
  263.  
  264. // MiniVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
  265.  
  266.  
  267. end.
  268.  
  269.