some forgotten fVariable -> sVariable renaming

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21338 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2007-06-06 13:20:50 +00:00
parent 6677ea8715
commit 77974ff171
2 changed files with 56 additions and 56 deletions
+47 -47
View File
@@ -288,7 +288,7 @@ BPoseView::InitCommon()
PinPointToValidRange(origin); PinPointToValidRange(origin);
// init things related to laying out items // init things related to laying out items
fListElemHeight = ceilf(fFontHeight < 20 ? 20 : fFontHeight + 6); fListElemHeight = ceilf(sFontHeight < 20 ? 20 : sFontHeight + 6);
SetIconPoseHeight(); SetIconPoseHeight();
GetLayoutInfo(ViewMode(), &fGrid, &fOffset); GetLayoutInfo(ViewMode(), &fGrid, &fOffset);
ResetPosePlacementHint(); ResetPosePlacementHint();
@@ -650,7 +650,7 @@ BPoseView::SaveState(BMessage &message) const
float float
BPoseView::StringWidth(const char *str) const BPoseView::StringWidth(const char *str) const
{ {
return fWidthBuf->StringWidth(str, 0, (int32)strlen(str), &fCurrentFont); return sWidthBuffer->StringWidth(str, 0, (int32)strlen(str), &sCurrentFont);
} }
@@ -658,7 +658,7 @@ float
BPoseView::StringWidth(const char *str, int32 len) const BPoseView::StringWidth(const char *str, int32 len) const
{ {
ASSERT(strlen(str) == (uint32)len); ASSERT(strlen(str) == (uint32)len);
return fWidthBuf->StringWidth(str, 0, len, &fCurrentFont); return sWidthBuffer->StringWidth(str, 0, len, &sCurrentFont);
} }
@@ -877,12 +877,12 @@ BPoseView::AttachedToWindow()
BFont font(be_plain_font); BFont font(be_plain_font);
font.SetSpacing(B_BITMAP_SPACING); font.SetSpacing(B_BITMAP_SPACING);
SetFont(&font); SetFont(&font);
GetFont(&fCurrentFont); GetFont(&sCurrentFont);
// static - init just once // static - init just once
if (fFontHeight == -1) { if (sFontHeight == -1) {
font.GetHeight(&fFontInfo); font.GetHeight(&sFontInfo);
fFontHeight = fFontInfo.ascent + fFontInfo.descent + fFontInfo.leading; sFontHeight = sFontInfo.ascent + sFontInfo.descent + sFontInfo.leading;
} }
if (TTracker *app = dynamic_cast<TTracker*>(be_app)) { if (TTracker *app = dynamic_cast<TTracker*>(be_app)) {
@@ -906,17 +906,17 @@ BPoseView::SetIconPoseHeight()
switch (ViewMode()) { switch (ViewMode()) {
case kIconMode: case kIconMode:
fViewState->SetIconSize(B_LARGE_ICON); fViewState->SetIconSize(B_LARGE_ICON);
fIconPoseHeight = ceilf(IconSizeInt() + fFontHeight + 1); fIconPoseHeight = ceilf(IconSizeInt() + sFontHeight + 1);
break; break;
case kMiniIconMode: case kMiniIconMode:
fViewState->SetIconSize(B_MINI_ICON); fViewState->SetIconSize(B_MINI_ICON);
fIconPoseHeight = ceilf(fFontHeight < IconSizeInt() ? IconSizeInt() : fFontHeight + 1); fIconPoseHeight = ceilf(sFontHeight < IconSizeInt() ? IconSizeInt() : sFontHeight + 1);
break; break;
case kScaleIconMode: case kScaleIconMode:
// IconSize should allready be set in MessageReceived() // IconSize should allready be set in MessageReceived()
fIconPoseHeight = ceilf(IconSizeInt() + fFontHeight + 1); fIconPoseHeight = ceilf(IconSizeInt() + sFontHeight + 1);
break; break;
default: default:
@@ -2270,9 +2270,9 @@ BPoseView::MessageReceived(BMessage *message)
{ {
bigtime_t doubleClickSpeed; bigtime_t doubleClickSpeed;
get_click_speed(&doubleClickSpeed); get_click_speed(&doubleClickSpeed);
if (system_time() - fLastKeyTime > (doubleClickSpeed * 2)) { if (system_time() - sLastKeyTime > (doubleClickSpeed * 2)) {
strcpy(fMatchString, ""); strcpy(sMatchString, "");
fCountView->SetTypeAhead(fMatchString); fCountView->SetTypeAhead(sMatchString);
delete fKeyRunner; delete fKeyRunner;
fKeyRunner = NULL; fKeyRunner = NULL;
} }
@@ -5878,11 +5878,11 @@ BPoseView::KeyDown(const char *bytes, int32 count)
_inherited::KeyDown(bytes, count); _inherited::KeyDown(bytes, count);
else { else {
if (fSelectionList->IsEmpty()) if (fSelectionList->IsEmpty())
fMatchString[0] = '\0'; sMatchString[0] = '\0';
else { else {
BPose *pose = fSelectionList->FirstItem(); BPose *pose = fSelectionList->FirstItem();
strncpy(fMatchString, pose->TargetModel()->Name(), B_FILE_NAME_LENGTH - 1); strncpy(sMatchString, pose->TargetModel()->Name(), B_FILE_NAME_LENGTH - 1);
fMatchString[B_FILE_NAME_LENGTH - 1] = '\0'; sMatchString[B_FILE_NAME_LENGTH - 1] = '\0';
} }
bool reverse = (Window()->CurrentMessage()->FindInt32("modifiers") bool reverse = (Window()->CurrentMessage()->FindInt32("modifiers")
@@ -5891,10 +5891,10 @@ BPoseView::KeyDown(const char *bytes, int32 count)
BPose *pose = FindNextMatch(&index, reverse); BPose *pose = FindNextMatch(&index, reverse);
if (!pose) { // wrap around if (!pose) { // wrap around
if (reverse) { if (reverse) {
fMatchString[0] = (char)0xff; sMatchString[0] = (char)0xff;
fMatchString[1] = '\0'; sMatchString[1] = '\0';
} else } else
fMatchString[0] = '\0'; sMatchString[0] = '\0';
pose = FindNextMatch(&index, reverse); pose = FindNextMatch(&index, reverse);
} }
@@ -5922,18 +5922,18 @@ BPoseView::KeyDown(const char *bytes, int32 count)
case B_BACKSPACE: case B_BACKSPACE:
// remove last char from the typeahead buffer // remove last char from the typeahead buffer
if (strcmp(fMatchString, "") != 0) { if (strcmp(sMatchString, "") != 0) {
fMatchString[strlen(fMatchString) - 1] = '\0'; sMatchString[strlen(sMatchString) - 1] = '\0';
fLastKeyTime = system_time(); sLastKeyTime = system_time();
fCountView->SetTypeAhead(fMatchString); fCountView->SetTypeAhead(sMatchString);
// select our new string // select our new string
int32 index; int32 index;
BPose *pose = FindBestMatch(&index); BPose *pose = FindBestMatch(&index);
if (!pose) { // wrap around if (!pose) { // wrap around
fMatchString[0] = '\0'; sMatchString[0] = '\0';
pose = FindBestMatch(&index); pose = FindBestMatch(&index);
} }
SelectPose(pose, index); SelectPose(pose, index);
@@ -5966,21 +5966,21 @@ BPoseView::KeyDown(const char *bytes, int32 count)
// add char to existing matchString or start new match string // add char to existing matchString or start new match string
// make sure we don't overfill matchstring // make sure we don't overfill matchstring
if (eventTime - fLastKeyTime < (doubleClickSpeed * 2)) { if (eventTime - sLastKeyTime < (doubleClickSpeed * 2)) {
uint32 nchars = B_FILE_NAME_LENGTH - strlen(fMatchString); uint32 nchars = B_FILE_NAME_LENGTH - strlen(sMatchString);
strncat(fMatchString, searchChar, nchars); strncat(sMatchString, searchChar, nchars);
} else { } else {
strncpy(fMatchString, searchChar, B_FILE_NAME_LENGTH - 1); strncpy(sMatchString, searchChar, B_FILE_NAME_LENGTH - 1);
} }
fMatchString[B_FILE_NAME_LENGTH - 1] = '\0'; sMatchString[B_FILE_NAME_LENGTH - 1] = '\0';
fLastKeyTime = eventTime; sLastKeyTime = eventTime;
fCountView->SetTypeAhead(fMatchString); fCountView->SetTypeAhead(sMatchString);
int32 index; int32 index;
BPose *pose = FindBestMatch(&index); BPose *pose = FindBestMatch(&index);
if (!pose) { // wrap around if (!pose) { // wrap around
fMatchString[0] = '\0'; sMatchString[0] = '\0';
pose = FindBestMatch(&index); pose = FindBestMatch(&index);
} }
SelectPose(pose, index); SelectPose(pose, index);
@@ -6002,14 +6002,14 @@ BPoseView::FindNextMatch(int32 *matchingIndex, bool reverse)
BPose *pose = fPoseList->ItemAt(index); BPose *pose = fPoseList->ItemAt(index);
if (reverse) { if (reverse) {
if (strcasecmp(pose->TargetModel()->Name(), fMatchString) < 0) if (strcasecmp(pose->TargetModel()->Name(), sMatchString) < 0)
if (strcasecmp(pose->TargetModel()->Name(), bestSoFar) >= 0 if (strcasecmp(pose->TargetModel()->Name(), bestSoFar) >= 0
|| !bestSoFar[0]) { || !bestSoFar[0]) {
strcpy(bestSoFar, pose->TargetModel()->Name()); strcpy(bestSoFar, pose->TargetModel()->Name());
poseToSelect = pose; poseToSelect = pose;
*matchingIndex = index; *matchingIndex = index;
} }
} else if (strcasecmp(pose->TargetModel()->Name(), fMatchString) > 0) } else if (strcasecmp(pose->TargetModel()->Name(), sMatchString) > 0)
if (strcasecmp(pose->TargetModel()->Name(), bestSoFar) <= 0 if (strcasecmp(pose->TargetModel()->Name(), bestSoFar) <= 0
|| !bestSoFar[0]) { || !bestSoFar[0]) {
strcpy(bestSoFar, pose->TargetModel()->Name()); strcpy(bestSoFar, pose->TargetModel()->Name());
@@ -6047,7 +6047,7 @@ BPoseView::FindBestMatch(int32 *index)
text = pose->TargetModel()->Name(); text = pose->TargetModel()->Name();
} }
if (strcasecmp(text, fMatchString) >= 0) if (strcasecmp(text, sMatchString) >= 0)
if (strcasecmp(text, bestSoFar) <= 0 || !bestSoFar[0]) { if (strcasecmp(text, bestSoFar) <= 0 || !bestSoFar[0]) {
strcpy(bestSoFar, text); strcpy(bestSoFar, text);
poseToSelect = pose; poseToSelect = pose;
@@ -7564,7 +7564,7 @@ BPoseView::SwitchDir(const entry_ref *newDirRef, AttributeStreamNode *node)
ResetOrigin(); ResetOrigin();
ResetPosePlacementHint(); ResetPosePlacementHint();
fLastKeyTime = 0; sLastKeyTime = 0;
} }
@@ -8217,8 +8217,8 @@ BPoseView::ColumnRedraw(BRect updateRect)
BPoint loc(0, startIndex * fListElemHeight); BPoint loc(0, startIndex * fListElemHeight);
BRect srcRect = fPoseList->ItemAt(0)->CalcRect(BPoint(0, 0), this, false); BRect srcRect = fPoseList->ItemAt(0)->CalcRect(BPoint(0, 0), this, false);
srcRect.right += 1024; // need this to erase correctly srcRect.right += 1024; // need this to erase correctly
fOffscreen->BeginUsing(srcRect); sOffscreen->BeginUsing(srcRect);
BView *offscreenView = fOffscreen->View(); BView *offscreenView = sOffscreen->View();
BRegion updateRegion; BRegion updateRegion;
updateRegion.Set(updateRect); updateRegion.Set(updateRect);
@@ -8240,12 +8240,12 @@ BPoseView::ColumnRedraw(BRect updateRect)
offscreenView->Sync(); offscreenView->Sync();
SetDrawingMode(B_OP_COPY); SetDrawingMode(B_OP_COPY);
DrawBitmap(fOffscreen->Bitmap(), srcRect, dstRect); DrawBitmap(sOffscreen->Bitmap(), srcRect, dstRect);
loc.y += fListElemHeight; loc.y += fListElemHeight;
if (loc.y > updateRect.bottom) if (loc.y > updateRect.bottom)
break; break;
} }
fOffscreen->DoneUsing(); sOffscreen->DoneUsing();
ConstrainClippingRegion(0); ConstrainClippingRegion(0);
} }
@@ -9327,11 +9327,11 @@ TPoseViewFilter::Filter(BMessage *message, BHandler **)
// static member initializations // static member initializations
float BPoseView::fFontHeight = -1; float BPoseView::sFontHeight = -1;
font_height BPoseView::fFontInfo = { 0, 0, 0 }; font_height BPoseView::sFontInfo = { 0, 0, 0 };
bigtime_t BPoseView::fLastKeyTime = 0; bigtime_t BPoseView::sLastKeyTime = 0;
_BWidthBuffer_* BPoseView::fWidthBuf = new _BWidthBuffer_; _BWidthBuffer_* BPoseView::sWidthBuffer = new _BWidthBuffer_;
BFont BPoseView::fCurrentFont; BFont BPoseView::sCurrentFont;
OffscreenBitmap *BPoseView::fOffscreen = new OffscreenBitmap; OffscreenBitmap *BPoseView::sOffscreen = new OffscreenBitmap;
char BPoseView::fMatchString[] = ""; char BPoseView::sMatchString[] = "";
+9 -9
View File
@@ -653,17 +653,17 @@ class BPoseView : public BView {
BRect fStartFrame; BRect fStartFrame;
BRect fSelectionRect; BRect fSelectionRect;
static float fFontHeight; static float sFontHeight;
static font_height fFontInfo; static font_height sFontInfo;
static BFont fCurrentFont; static BFont sCurrentFont;
static bigtime_t fLastKeyTime; static bigtime_t sLastKeyTime;
static char fMatchString[B_FILE_NAME_LENGTH]; static char sMatchString[B_FILE_NAME_LENGTH];
// used for typeahead - should be replaced by a typeahead state // used for typeahead - should be replaced by a typeahead state
// TODO: Get rid of this. // TODO: Get rid of this.
static _BWidthBuffer_ *fWidthBuf; static _BWidthBuffer_ *sWidthBuffer;
static OffscreenBitmap *fOffscreen; static OffscreenBitmap *sOffscreen;
typedef BView _inherited; typedef BView _inherited;
}; };
@@ -778,13 +778,13 @@ BPoseView::ViewMode() const
inline font_height inline font_height
BPoseView::FontInfo() const BPoseView::FontInfo() const
{ {
return fFontInfo; return sFontInfo;
} }
inline float inline float
BPoseView::FontHeight() const BPoseView::FontHeight() const
{ {
return fFontHeight; return sFontHeight;
} }
inline BPose * inline BPose *