cd_canvas_simulate.e 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. deferred class CD_CANVAS_SIMULATE
  2. inherit
  3. CANVAS_DRAW
  4. feature {ANY}
  5. cd_sim_none, cd_sim_line, cd_sim_rect, cd_sim_box, cd_sim_arc: INTEGER_16
  6. cd_sim_sector, cd_sim_chord, cd_sim_polyline, cd_sim_polygon: INTEGER_16
  7. cd_sim_text, cd_sim_all, cd_sim_lines, cd_sim_fills: INTEGER_16
  8. simulate (mode: INTEGER_16)
  9. do
  10. int_canvas_simulate(cnvs, mode)
  11. end
  12. feature {}
  13. -- Internals
  14. int_canvas_simulate (data: POINTER; m: INTEGER_16)
  15. external "plug_in"
  16. alias "{
  17. location: "${sys}/plugins"
  18. module_name: "iup"
  19. feature_name: "cdCanvasSimulate"
  20. }"
  21. end
  22. initialize_modes
  23. do
  24. cd_sim_none := 0x0000
  25. cd_sim_line := 0x0001
  26. cd_sim_rect := 0x0002
  27. cd_sim_box := 0x0004
  28. cd_sim_arc := 0x0008
  29. cd_sim_sector := 0x0010
  30. cd_sim_chord := 0x0020
  31. cd_sim_polyline := 0x0040
  32. cd_sim_polygon := 0x0080
  33. cd_sim_text := 0x0100
  34. cd_sim_all := 0xFFFF
  35. cd_sim_lines := cd_sim_line | cd_sim_rect | cd_sim_arc | cd_sim_polyline
  36. cd_sim_fills := cd_sim_box | cd_sim_sector | cd_sim_chord | cd_sim_polygon
  37. end
  38. end
  39. -- The MIT License (MIT)
  40. -- Copyright (c) 2016 by German A. Arias
  41. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  42. -- of this software and associated documentation files (the "Software"), to deal
  43. -- in the Software without restriction, including without limitation the rights
  44. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  45. -- copies of the Software, and to permit persons to whom the Software is
  46. -- furnished to do so, subject to the following conditions:
  47. --
  48. -- The above copyright notice and this permission notice shall be included in
  49. -- all copies or substantial portions of the Software.
  50. --
  51. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  52. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  53. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  54. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  55. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  56. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  57. -- SOFTWARE.