uo_angle.sru 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. $PBExportHeader$uo_angle.sru
  2. forward
  3. global type uo_angle from UserObject
  4. end type
  5. type ln_2 from line within uo_angle
  6. end type
  7. type ln_4 from line within uo_angle
  8. end type
  9. type ln_1 from line within uo_angle
  10. end type
  11. type ln_3 from line within uo_angle
  12. end type
  13. end forward
  14. global type uo_angle from UserObject
  15. int Width=32
  16. int Height=16
  17. long BackColor=12632256
  18. long PictureMaskColor=536870912
  19. long TabTextColor=33554432
  20. long TabBackColor=67108864
  21. ln_2 ln_2
  22. ln_4 ln_4
  23. ln_1 ln_1
  24. ln_3 ln_3
  25. end type
  26. global uo_angle uo_angle
  27. forward prototypes
  28. public subroutine of_setenabled (boolean ab_enabled)
  29. end prototypes
  30. public subroutine of_setenabled (boolean ab_enabled);//====================================================================
  31. // Function - of_setenabled for uo_angle
  32. //--------------------------------------------------------------------
  33. // Description: draw black (enabled) triangle or gray (disabled)
  34. // triangle for the toolbottom which has child menu.
  35. //--------------------------------------------------------------------
  36. // Arguments:
  37. //
  38. // boolean ab_enabled
  39. // <description>
  40. //--------------------------------------------------------------------
  41. // Returns: (None)
  42. //--------------------------------------------------------------------
  43. // Author: Brave_QQ Date: December, 2002
  44. //====================================================================
  45. IF ab_enabled THEN
  46. ln_1.linecolor = 0
  47. ln_2.linecolor = 0
  48. ln_3.linecolor = 0
  49. ln_4.linecolor = 0
  50. ELSE
  51. ln_1.linecolor = 16777215 //白色
  52. ln_2.linecolor = 0 //黑色
  53. ln_3.linecolor = 10789024 //中灰
  54. ln_4.linecolor = 10789024
  55. END IF
  56. end subroutine
  57. on uo_angle.create
  58. this.ln_2=create ln_2
  59. this.ln_4=create ln_4
  60. this.ln_1=create ln_1
  61. this.ln_3=create ln_3
  62. this.Control[]={this.ln_2,&
  63. this.ln_4,&
  64. this.ln_1,&
  65. this.ln_3}
  66. end on
  67. on uo_angle.destroy
  68. destroy(this.ln_2)
  69. destroy(this.ln_4)
  70. destroy(this.ln_1)
  71. destroy(this.ln_3)
  72. end on
  73. type ln_2 from line within uo_angle
  74. boolean Enabled=false
  75. int EndX=27
  76. int LineThickness=4
  77. end type
  78. type ln_4 from line within uo_angle
  79. boolean Enabled=false
  80. int BeginX=9
  81. int BeginY=8
  82. int EndX=18
  83. int EndY=8
  84. int LineThickness=4
  85. long LineColor=10789024
  86. end type
  87. type ln_1 from line within uo_angle
  88. boolean Enabled=false
  89. int BeginX=14
  90. int BeginY=12
  91. int EndX=32
  92. int EndY=-4
  93. int LineThickness=4
  94. long LineColor=16777215
  95. end type
  96. type ln_3 from line within uo_angle
  97. boolean Enabled=false
  98. int BeginX=5
  99. int BeginY=4
  100. int EndX=23
  101. int EndY=4
  102. int LineThickness=4
  103. long LineColor=10789024
  104. end type