home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / e-tools / plugins / plugin_bitmap / bm_test.e < prev    next >
Encoding:
Text File  |  1996-04-11  |  4.1 KB  |  71 lines

  1. /* EasyGUI BitMapPlugin-Test.e  ©1996 by Sebstian Hesselbarth           */
  2. /*                                                                      */
  3. /* This Plugin is useful for displaying bitmaps in the EasyGUI-         */
  4. /* window ! It is only a beta version, so use it at your own            */
  5. /* risk !!                                                              */
  6. /*                                                                      */
  7. /* Thanks go to :                                                       */
  8. /*   Wouter van Oortmerssen : For AmigaE and EasGUI, of course          */
  9. /*   Joerg Wach             : For founding the EPD ;-)                  */
  10. /*   Daniel van Gerpen &                                                */
  11. /*   Gregor Goldbach        : For keep releasing EPDs  !!               */
  12. /*                                                                      */
  13. /*                                                                      */
  14. /* I think this plugin is easy to use !                                 */
  15. /* The important things are :                                           */
  16. /* Allocating enough memory for the plugin-object (look at source "NEW")*/
  17. /* and handing over the right arguments for the initialisation routine  */
  18. /*                                                                      */
  19. /* e.g.: [PLUGIN, 1, NEW mp.init (bitmap, bitmapwidth, bitmapheight,    */
  20. /*        bitmapdepth)]                                                 */
  21. /*                                                                      */
  22. /* "mp" is a pointer to the "bitmap_plugin"-object                      */
  23. /* "bitmap" is the bitmap you want to draw in to your EasyGUI-window    */
  24. /* "bitmapwidth", "bitmapheight" and "bitmapdepth" are the dimensions of*/
  25. /*  your bitmap ! (x,y and z[colordepth])!!                             */
  26. /*                                                                      */
  27. /* This Module is not completely finished !!!                           */
  28. /* ToDo:                                                                */
  29. /*   - imform Wouter, that I had to add IDCMP_IDCMPUPDATE to the        */
  30. /*     idcmpflags of the EasyGUI-window :-))))                          */
  31. /*   - don't use system-images in scrollbuttons or change the bgcolor to*/
  32. /*     0                                                                */
  33. /*   - create new images for scrollergadgets which are 16*16 pixel or so*/
  34. /*     (looks much better I think !) BUT I need a full description of   */
  35. /*     the BOOPSI-Classes !!! Send them to me or just contact me !      */
  36. /*   - buy a PPC603/604-Powerboard !!! ;->>>>>                          */
  37. /*                                                                      */
  38. /* Here is my address :                                                 */
  39. /*   Sebastian Hesselbarth                                              */
  40. /*   Multhöpen 13                                                       */
  41. /*   31855 Aerzen                                                       */
  42. /*   GERMANY                                                            */
  43. /*                                                                      */      
  44. /*   Tel. 05154/8051                                                    */
  45. /*   email: SOON !!!!                                                   */
  46. /*                                                                      */
  47. /*                                      ciao, Sebastian !               */
  48.  
  49. MODULE 'tools/plugin_bitmap', 'intuition/screens', 'tools/easygui', 'tools/exceptions', 'graphics/gfx'
  50.  
  51. DEF mp:PTR TO bitmap_plugin, wbscr:PTR TO screen
  52.  
  53. PROC main() HANDLE
  54.   IF (wbscr := LockPubScreen ('Workbench'))=NIL THEN Raise ("lock")
  55.   easygui('Plugin Test!',
  56.     [ROWS,
  57.       [TEXT,'EasyGUIs BitMapPlugin-Test',NIL,TRUE,15],
  58.       [PLUGIN,1,NEW mp.init(wbscr.bitmap, wbscr.width, wbscr.height, wbscr.bitmap.depth)],                       
  59.       [SBUTTON,{redraw},'Set 1.Quarter of Workbench']
  60.     ])
  61. Raise (NIL)
  62. EXCEPT
  63.   END mp
  64.   IF wbscr THEN UnlockPubScreen (NIL,wbscr)
  65.   report_exception()
  66. ENDPROC
  67.  
  68. PROC redraw ()
  69.   mp.setbitmap (wbscr.bitmap, wbscr.width/2, wbscr.height/2, wbscr.bitmap.depth)
  70. ENDPROC
  71.