Label.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. function Label() {
  2. }
  3. Label.prototype.setText = function(text) {
  4. Polycode.Label_setText(this.__ptr, text)
  5. }
  6. Label.prototype.getText = function() {
  7. Polycode.Label_getText(this.__ptr)
  8. }
  9. Label.prototype.getTextWidthForString = function(text) {
  10. Polycode.Label_getTextWidthForString(this.__ptr, text)
  11. }
  12. Label.prototype.getTextHeightForString = function(text) {
  13. Polycode.Label_getTextHeightForString(this.__ptr, text)
  14. }
  15. Label.prototype.getTextWidth = function() {
  16. Polycode.Label_getTextWidth(this.__ptr)
  17. }
  18. Label.prototype.getTextHeight = function() {
  19. Polycode.Label_getTextHeight(this.__ptr)
  20. }
  21. Label.prototype.setColorForRange = function(color,rangeStart,rangeEnd) {
  22. Polycode.Label_setColorForRange(this.__ptr, color,rangeStart,rangeEnd)
  23. }
  24. Label.prototype.clearColors = function() {
  25. Polycode.Label_clearColors(this.__ptr)
  26. }
  27. Label.prototype.getColorForIndex = function(index) {
  28. Polycode.Label_getColorForIndex(this.__ptr, index)
  29. }
  30. Label.prototype.getPremultiplyAlpha = function() {
  31. Polycode.Label_getPremultiplyAlpha(this.__ptr)
  32. }
  33. Label.prototype.setPremultiplyAlpha = function(val) {
  34. Polycode.Label_setPremultiplyAlpha(this.__ptr, val)
  35. }
  36. Label.prototype.setFont = function(newFont) {
  37. Polycode.Label_setFont(this.__ptr, newFont)
  38. }
  39. Label.prototype.getFont = function() {
  40. Polycode.Label_getFont(this.__ptr)
  41. }
  42. Label.prototype.setSize = function(newSize) {
  43. Polycode.Label_setSize(this.__ptr, newSize)
  44. }
  45. Label.prototype.getSize = function() {
  46. Polycode.Label_getSize(this.__ptr)
  47. }
  48. Label.prototype.getAntialiasMode = function() {
  49. Polycode.Label_getAntialiasMode(this.__ptr)
  50. }
  51. Label.prototype.setAntialiasMode = function(newMode) {
  52. Polycode.Label_setAntialiasMode(this.__ptr, newMode)
  53. }
  54. Label.prototype.getBaselineAdjust = function() {
  55. Polycode.Label_getBaselineAdjust(this.__ptr)
  56. }
  57. Label.prototype.setBackgroundColor = function(color) {
  58. Polycode.Label_setBackgroundColor(this.__ptr, color)
  59. }
  60. Label.prototype.setForegroundColor = function(color) {
  61. Polycode.Label_setForegroundColor(this.__ptr, color)
  62. }
  63. Label.prototype.setColors = function(backgroundColor,foregroundColor) {
  64. Polycode.Label_setColors(this.__ptr, backgroundColor,foregroundColor)
  65. }
  66. Label.prototype.getBackgroundColor = function() {
  67. Polycode.Label_getBackgroundColor(this.__ptr)
  68. }
  69. Label.prototype.getForegroundColor = function() {
  70. Polycode.Label_getForegroundColor(this.__ptr)
  71. }
  72. Label.prototype.optionsChanged = function() {
  73. Polycode.Label_optionsChanged(this.__ptr)
  74. }