* Moved the global BPrivate::WidthBuffer from BTextView into BPrivate as

gWidthBuffer.
* Tracker PoseView now uses BPrivate::gWidthBuffer instead of it's own
  instance.
* TextView.h and PoseView.h are now a little cleaner.
* InterfaceDefs.cpp now deletes gWidthBuffer in _fini_interface_kit_().
* Added binary compatibility support for NetPositive in WidthBuffer.h and .cpp.
  Obviously it kind of defeats the purpose of having WidthBuffer neatly tucked
  away in the BPrivate namespace, but Haiku should run NetPositive, I guess.
  Fixes #2879.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28532 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-11-06 11:31:40 +00:00
parent 5074333ded
commit b545073f08
7 changed files with 58 additions and 26 deletions
+3 -5
View File
@@ -152,9 +152,6 @@ struct BTextView::LayoutData {
bool valid;
};
// Initialized/finalized by init/fini_interface_kit
BPrivate::WidthBuffer* BTextView::sWidths = NULL;
const static rgb_color kBlackColor = { 0, 0, 0, 255 };
const static rgb_color kBlueInputColor = { 152, 203, 255, 255 };
@@ -3824,8 +3821,9 @@ BTextView::_StyledWidth(int32 fromOffset, int32 length, float *outAscent,
#if USE_WIDTHBUFFER
// Use _BWidthBuffer_ if possible
if (sWidths != NULL) {
result += sWidths->StringWidth(*fText, fromOffset, numChars, font);
if (BPrivate::gWidthBuffer != NULL) {
result += BPrivate::gWidthBuffer->StringWidth(*fText, fromOffset,
numChars, font);
} else {
#endif
const char* text = fText->GetString(fromOffset, &numChars);