* unified application of style into a separate method _ApplyStyleRange()

in order to maintain the null-style appropriately, if required
* finally fix #3040 for real (a single style is now maintained at all times
  for non-stylable textviews)
* the caret is now being drawn with the correct size, even if it is on
  the empty line at the end of the buffer and a specific font size has been
  requested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30532 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2009-05-01 13:59:13 +00:00
parent a6cde944e6
commit 5cc8dc2fe3
2 changed files with 94 additions and 56 deletions
+9
View File
@@ -362,6 +362,13 @@ private:
void _SetRunArray(int32 startOffset, int32 endOffset,
const text_run_array* inRuns);
void _ApplyStyleRange(int32 fromOffset,
int32 toOffset,
uint32 inMode = B_FONT_ALL,
const BFont *inFont = NULL,
const rgb_color *inColor = NULL,
bool syncNullStyle = true);
uint32 _CharClassification(int32 offset) const;
int32 _NextInitialByte(int32 offset) const;
int32 _PreviousInitialByte(int32 offset) const;
@@ -385,6 +392,8 @@ private:
int32 _LineAt(const BPoint& point) const;
bool _IsOnEmptyLastLine(int32 offset) const;
float _NullStyleHeight() const;
BPrivate::TextGapBuffer* fText;
LineBuffer* fLines;
StyleBuffer* fStyles;