TextLayout.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. // DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
  2. #ifndef __java_awt_font_TextLayout__
  3. #define __java_awt_font_TextLayout__
  4. #pragma interface
  5. #include <java/lang/Object.h>
  6. #include <gcj/array.h>
  7. extern "Java"
  8. {
  9. namespace java
  10. {
  11. namespace awt
  12. {
  13. class Font;
  14. class Graphics2D;
  15. class Shape;
  16. namespace font
  17. {
  18. class FontRenderContext;
  19. class LineMetrics;
  20. class TextHitInfo;
  21. class TextLayout;
  22. class TextLayout$CaretPolicy;
  23. class TextLayout$Run;
  24. }
  25. namespace geom
  26. {
  27. class AffineTransform;
  28. class Rectangle2D;
  29. }
  30. }
  31. namespace text
  32. {
  33. class AttributedCharacterIterator;
  34. class Bidi;
  35. }
  36. }
  37. }
  38. class java::awt::font::TextLayout : public ::java::lang::Object
  39. {
  40. public:
  41. TextLayout(::java::lang::String *, ::java::awt::Font *, ::java::awt::font::FontRenderContext *);
  42. TextLayout(::java::lang::String *, ::java::util::Map *, ::java::awt::font::FontRenderContext *);
  43. TextLayout(::java::text::AttributedCharacterIterator *, ::java::awt::font::FontRenderContext *);
  44. public: // actually package-private
  45. TextLayout(::java::awt::font::TextLayout *, jint, jint);
  46. private:
  47. void setCharIndices();
  48. void setupMappings();
  49. static ::java::lang::String * getText(::java::text::AttributedCharacterIterator *);
  50. static ::java::awt::Font * getFont(::java::text::AttributedCharacterIterator *);
  51. void getStringProperties();
  52. void determineWhiteSpace();
  53. public: // actually protected
  54. ::java::lang::Object * clone();
  55. public:
  56. void draw(::java::awt::Graphics2D *, jfloat, jfloat);
  57. jboolean equals(::java::lang::Object *);
  58. jboolean equals(::java::awt::font::TextLayout *);
  59. jfloat getAdvance();
  60. jfloat getAscent();
  61. jbyte getBaseline();
  62. JArray< jfloat > * getBaselineOffsets();
  63. ::java::awt::Shape * getBlackBoxBounds(jint, jint);
  64. ::java::awt::geom::Rectangle2D * getBounds();
  65. JArray< jfloat > * getCaretInfo(::java::awt::font::TextHitInfo *);
  66. JArray< jfloat > * getCaretInfo(::java::awt::font::TextHitInfo *, ::java::awt::geom::Rectangle2D *);
  67. ::java::awt::Shape * getCaretShape(::java::awt::font::TextHitInfo *);
  68. ::java::awt::Shape * getCaretShape(::java::awt::font::TextHitInfo *, ::java::awt::geom::Rectangle2D *);
  69. JArray< ::java::awt::Shape * > * getCaretShapes(jint);
  70. JArray< ::java::awt::Shape * > * getCaretShapes(jint, ::java::awt::geom::Rectangle2D *);
  71. JArray< ::java::awt::Shape * > * getCaretShapes(jint, ::java::awt::geom::Rectangle2D *, ::java::awt::font::TextLayout$CaretPolicy *);
  72. jint getCharacterCount();
  73. jbyte getCharacterLevel(jint);
  74. jfloat getDescent();
  75. ::java::awt::font::TextLayout * getJustifiedLayout(jfloat);
  76. jfloat getLeading();
  77. ::java::awt::Shape * getLogicalHighlightShape(jint, jint);
  78. ::java::awt::Shape * getLogicalHighlightShape(jint, jint, ::java::awt::geom::Rectangle2D *);
  79. JArray< jint > * getLogicalRangesForVisualSelection(::java::awt::font::TextHitInfo *, ::java::awt::font::TextHitInfo *);
  80. ::java::awt::font::TextHitInfo * getNextLeftHit(jint);
  81. ::java::awt::font::TextHitInfo * getNextLeftHit(jint, ::java::awt::font::TextLayout$CaretPolicy *);
  82. ::java::awt::font::TextHitInfo * getNextLeftHit(::java::awt::font::TextHitInfo *);
  83. ::java::awt::font::TextHitInfo * getNextRightHit(jint);
  84. ::java::awt::font::TextHitInfo * getNextRightHit(jint, ::java::awt::font::TextLayout$CaretPolicy *);
  85. ::java::awt::font::TextHitInfo * getNextRightHit(::java::awt::font::TextHitInfo *);
  86. ::java::awt::Shape * getOutline(::java::awt::geom::AffineTransform *);
  87. jfloat getVisibleAdvance();
  88. ::java::awt::Shape * getVisualHighlightShape(::java::awt::font::TextHitInfo *, ::java::awt::font::TextHitInfo *);
  89. ::java::awt::Shape * getVisualHighlightShape(::java::awt::font::TextHitInfo *, ::java::awt::font::TextHitInfo *, ::java::awt::geom::Rectangle2D *);
  90. private:
  91. ::java::awt::Shape * left(::java::awt::geom::Rectangle2D *);
  92. ::java::awt::Shape * right(::java::awt::geom::Rectangle2D *);
  93. public:
  94. ::java::awt::font::TextHitInfo * getVisualOtherHit(::java::awt::font::TextHitInfo *);
  95. public: // actually protected
  96. void handleJustify(jfloat);
  97. public:
  98. ::java::awt::font::TextHitInfo * hitTestChar(jfloat, jfloat);
  99. ::java::awt::font::TextHitInfo * hitTestChar(jfloat, jfloat, ::java::awt::geom::Rectangle2D *);
  100. jboolean isLeftToRight();
  101. jboolean isVertical();
  102. jint hashCode();
  103. ::java::lang::String * toString();
  104. private:
  105. ::java::awt::geom::Rectangle2D * getNaturalBounds();
  106. void checkHitInfo(::java::awt::font::TextHitInfo *);
  107. jint hitToCaret(::java::awt::font::TextHitInfo *);
  108. ::java::awt::font::TextHitInfo * caretToHit(jint);
  109. jboolean isCharacterLTR(jint);
  110. ::java::awt::font::TextLayout$Run * findRunAtIndex(jint);
  111. void layoutRuns();
  112. JArray< ::java::awt::font::TextLayout$Run * > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) runs;
  113. ::java::awt::font::FontRenderContext * frc;
  114. JArray< jchar > * string;
  115. jint offset;
  116. jint length;
  117. ::java::awt::geom::Rectangle2D * boundsCache;
  118. ::java::awt::font::LineMetrics * lm;
  119. jfloat totalAdvance;
  120. ::java::awt::geom::Rectangle2D * naturalBounds;
  121. JArray< JArray< jint > * > * charIndices;
  122. jboolean leftToRight;
  123. jboolean hasWhitespace;
  124. ::java::text::Bidi * bidi;
  125. JArray< jint > * logicalToVisual;
  126. JArray< jint > * visualToLogical;
  127. jint hash;
  128. public:
  129. static ::java::awt::font::TextLayout$CaretPolicy * DEFAULT_CARET_POLICY;
  130. static ::java::lang::Class class$;
  131. };
  132. #endif // __java_awt_font_TextLayout__