diff --git a/src/apps/deskbar/Switcher.cpp b/src/apps/deskbar/Switcher.cpp
index ef2503d..106dbfd 100644
a
|
b
|
Except as contained in this notice, the name of Be Incorporated shall not be
|
26 | 26 | used in advertising or otherwise to promote the sale, use or other dealings in |
27 | 27 | this Software without prior written authorization from Be Incorporated. |
28 | 28 | |
29 | | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks |
30 | | of Be Incorporated in the United States and other countries. Other brand product |
31 | | names are registered trademarks or trademarks of their respective holders. |
| 29 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered |
| 30 | trademarks of Be Incorporated in the United States and other countries. Other |
| 31 | brand product names are registered trademarks or trademarks of their respective |
| 32 | holders. |
32 | 33 | All rights reserved. |
33 | 34 | */ |
34 | 35 | |
… |
… |
public:
|
99 | 100 | TSwitchManager* manager); |
100 | 101 | virtual ~TSwitcherWindow(); |
101 | 102 | |
102 | | virtual bool QuitRequested(); |
103 | | virtual void MessageReceived(BMessage* message); |
104 | | virtual void Show(); |
105 | | virtual void Hide(); |
106 | | virtual void WindowActivated(bool state); |
| 103 | virtual bool QuitRequested(); |
| 104 | virtual void MessageReceived(BMessage* message); |
| 105 | virtual void Show(); |
| 106 | virtual void Hide(); |
| 107 | virtual void WindowActivated(bool state); |
107 | 108 | |
108 | 109 | void DoKey(uint32 key, uint32 modifiers); |
109 | 110 | TIconView* IconView(); |
… |
… |
public:
|
133 | 134 | void UpdateGroup(int32 groupIndex, int32 windowIndex); |
134 | 135 | |
135 | 136 | virtual void AttachedToWindow(); |
136 | | virtual void Draw(BRect update); |
137 | | virtual void Pulse(); |
138 | | virtual void GetPreferredSize(float* w, float* h); |
| 137 | virtual void Draw(BRect update); |
| 138 | virtual void Pulse(); |
| 139 | virtual void GetPreferredSize(float* w, float* h); |
139 | 140 | void ScrollTo(float x, float y) |
140 | | { ScrollTo(BPoint(x,y)); } |
141 | | virtual void ScrollTo(BPoint where); |
| 141 | { |
| 142 | ScrollTo(BPoint(x, y)); |
| 143 | } |
| 144 | virtual void ScrollTo(BPoint where); |
142 | 145 | |
143 | 146 | void ShowIndex(int32 windex); |
144 | 147 | BRect FrameOf(int32 index) const; |
… |
… |
public:
|
160 | 163 | void Hiding(); |
161 | 164 | |
162 | 165 | virtual void KeyDown(const char* bytes, int32 numBytes); |
163 | | virtual void Pulse(); |
164 | | virtual void MouseDown(BPoint point); |
165 | | virtual void Draw(BRect updateRect); |
| 166 | virtual void Pulse(); |
| 167 | virtual void MouseDown(BPoint point); |
| 168 | virtual void Draw(BRect updateRect); |
166 | 169 | |
167 | 170 | void ScrollTo(float x, float y) |
168 | | { ScrollTo(BPoint(x,y)); } |
169 | | virtual void ScrollTo(BPoint where); |
| 171 | { |
| 172 | ScrollTo(BPoint(x, y)); |
| 173 | } |
| 174 | virtual void ScrollTo(BPoint where); |
170 | 175 | void Update(int32 previous, int32 current, |
171 | 176 | int32 previousSlot, int32 currentSlot, |
172 | 177 | bool forward); |
… |
… |
public:
|
197 | 202 | |
198 | 203 | virtual void Draw(BRect update); |
199 | 204 | virtual void AllAttached(); |
200 | | virtual void DrawIconScrollers(bool force); |
201 | | virtual void DrawWindowScrollers(bool force); |
202 | | virtual void MouseDown(BPoint where); |
| 205 | virtual void DrawIconScrollers(bool force); |
| 206 | virtual void DrawWindowScrollers(bool force); |
| 207 | virtual void MouseDown(BPoint where); |
203 | 208 | |
204 | 209 | private: |
205 | 210 | TSwitchManager* fManager; |
… |
… |
LowBitIndex(uint32 value)
|
250 | 255 | inline bool |
251 | 256 | IsVisibleInCurrentWorkspace(const window_info* windowInfo) |
252 | 257 | { |
253 | | /* |
254 | | The window list is always ordered from the top |
255 | | front visible window (the first on the list), going down through all |
256 | | the other visible windows, then all the hidden or non workspace |
257 | | visible window at the end. |
258 | | |
259 | | layer > 2 : normal visible window. |
260 | | layer == 2 : reserved for the desktop window (visible also). |
261 | | layer < 2 : hidden (0) and non workspace visible window (1) |
262 | | */ |
| 258 | // The window list is always ordered from the top front visible window |
| 259 | // (the first on the list), going down through all the other visible |
| 260 | // windows, then all hidden or non-workspace visible windows at the end. |
| 261 | // layer > 2 : normal visible window |
| 262 | // layer == 2 : reserved for the desktop window (visible also) |
| 263 | // layer < 2 : hidden (0) and non workspace visible window (1) |
263 | 264 | return windowInfo->layer > 2; |
264 | 265 | } |
265 | 266 | |
… |
… |
bool
|
278 | 279 | IsWindowOK(const window_info* windowInfo) |
279 | 280 | { |
280 | 281 | // is_mini (true means that the window is minimized). |
281 | | // if not, then |
282 | | // show_hide >= 1 means that the window is hidden. |
283 | | // |
| 282 | // if not, then show_hide >= 1 means that the window is hidden. |
284 | 283 | // If the window is both minimized and hidden, then you get : |
285 | | // TWindow->is_mini = false; |
286 | | // TWindow->was_mini = true; |
287 | | // TWindow->show_hide >= 1; |
| 284 | // TWindow->is_mini = false; |
| 285 | // TWindow->was_mini = true; |
| 286 | // TWindow->show_hide >= 1; |
288 | 287 | |
289 | 288 | if (windowInfo->feel != _STD_W_TYPE_) |
290 | 289 | return false; |
… |
… |
SmartStrcmp(const char* s1, const char* s2)
|
330 | 329 | s2++; |
331 | 330 | continue; |
332 | 331 | } |
333 | | if (*s1 != *s2) |
334 | | return 1; // they differ |
| 332 | if (*s1 != *s2) { |
| 333 | // they differ |
| 334 | return 1; |
| 335 | } |
335 | 336 | s1++; |
336 | 337 | s2++; |
337 | 338 | } |
338 | 339 | |
339 | 340 | // if one of the strings ended before the other |
340 | | // ??? could process trailing spaces & underscores! |
| 341 | // TODO: could process trailing spaces and underscores |
341 | 342 | if (*s1) |
342 | 343 | return 1; |
343 | 344 | if (*s2) |
… |
… |
TSwitchManager::TSwitchManager(BPoint point)
|
446 | 447 | TBarApp::Subscribe(BMessenger(this), &tmpList); |
447 | 448 | |
448 | 449 | for (int32 i = 0; ; i++) { |
449 | | BarTeamInfo *barTeamInfo = (BarTeamInfo *)tmpList.ItemAt(i); |
| 450 | BarTeamInfo* barTeamInfo = (BarTeamInfo*)tmpList.ItemAt(i); |
450 | 451 | if (!barTeamInfo) |
451 | 452 | break; |
452 | 453 | |
… |
… |
TSwitchManager::MessageReceived(BMessage* message)
|
483 | 484 | int i = 0; |
484 | 485 | TTeamGroup* tinfo; |
485 | 486 | message->FindInt32("team", &teamID); |
| 487 | |
486 | 488 | while ((tinfo = (TTeamGroup*)fGroupList.ItemAt(i)) != NULL) { |
487 | 489 | if (tinfo->TeamList()->HasItem((void*)teamID)) { |
488 | 490 | fGroupList.RemoveItem(i); |
… |
… |
TSwitchManager::MessageReceived(BMessage* message)
|
517 | 519 | delete teams; |
518 | 520 | break; |
519 | 521 | } |
| 522 | |
520 | 523 | delete smallIcon; |
| 524 | |
521 | 525 | if (message->FindString("sig", &signature) != B_OK) { |
522 | 526 | delete teams; |
523 | 527 | break; |
524 | 528 | } |
| 529 | |
525 | 530 | if (message->FindInt32("flags", (int32*)&flags) != B_OK) { |
526 | 531 | delete teams; |
527 | 532 | break; |
528 | 533 | } |
| 534 | |
529 | 535 | if (message->FindString("name", &name) != B_OK) { |
530 | 536 | delete teams; |
531 | 537 | break; |
… |
… |
TSwitchManager::MessageReceived(BMessage* message)
|
546 | 552 | const char* signature = message->FindString("sig"); |
547 | 553 | team_id team = message->FindInt32("team"); |
548 | 554 | |
549 | | int32 numItems = fGroupList.CountItems(); |
550 | | for (int32 i = 0; i < numItems; i++) { |
| 555 | for (int32 i = 0; i < fGroupList.CountItems(); i++) { |
551 | 556 | TTeamGroup* tinfo = (TTeamGroup*)fGroupList.ItemAt(i); |
552 | 557 | if (strcasecmp(tinfo->Signature(), signature) == 0) { |
553 | 558 | if (!(tinfo->TeamList()->HasItem((void*)team))) |
… |
… |
TSwitchManager::MessageReceived(BMessage* message)
|
562 | 567 | { |
563 | 568 | team_id team = message->FindInt32("team"); |
564 | 569 | |
565 | | int32 numItems = fGroupList.CountItems(); |
566 | | for (int32 i = 0; i < numItems; i++) { |
| 570 | for (int32 i = 0; i < fGroupList.CountItems(); i++) { |
567 | 571 | TTeamGroup* tinfo = (TTeamGroup*)fGroupList.ItemAt(i); |
568 | 572 | if (tinfo->TeamList()->HasItem((void*)team)) { |
569 | 573 | tinfo->TeamList()->RemoveItem((void*)team); |
… |
… |
TSwitchManager::MessageReceived(BMessage* message)
|
584 | 588 | // starts differentiating initial key_downs from KeyDowns generated |
585 | 589 | // by auto-repeat. Until then the fSkipUntil stuff helps, but it |
586 | 590 | // isn't perfect. |
587 | | |
588 | 591 | if (time < fSkipUntil) |
589 | 592 | break; |
590 | 593 | |
… |
… |
TSwitchManager::_SortApps()
|
620 | 623 | team_id* teams; |
621 | 624 | int32 count; |
622 | 625 | if (BPrivate::get_application_order(current_workspace(), &teams, &count) |
623 | | != B_OK) |
| 626 | != B_OK) |
624 | 627 | return; |
625 | 628 | |
626 | 629 | BList groups; |
… |
… |
TSwitchManager::MainEntry(BMessage* message)
|
656 | 659 | { |
657 | 660 | bigtime_t now = system_time(); |
658 | 661 | bigtime_t timeout = now + 180000; |
659 | | // The delay above was arrived at by trial and error and |
660 | | // has a good "feel" |
| 662 | // The above delay has a good "feel" found by trial and error |
661 | 663 | |
662 | 664 | app_info appInfo; |
663 | 665 | be_roster->GetActiveAppInfo(&appInfo); |
… |
… |
TSwitchManager::_FindNextValidApp(bool forward)
|
885 | 887 | if (fCurrentIndex < 0) |
886 | 888 | fCurrentIndex = max - 1; |
887 | 889 | } |
| 890 | |
888 | 891 | if (fCurrentIndex == startIndex) { |
889 | 892 | // we've gone completely through the list without finding |
890 | 893 | // a good app. Oh well. |
… |
… |
TSwitchManager::_FindNextValidApp(bool forward)
|
898 | 901 | return false; |
899 | 902 | } |
900 | 903 | |
| 904 | |
901 | 905 | void |
902 | 906 | TSwitchManager::SwitchToApp(int32 previousIndex, int32 newIndex, bool forward) |
903 | 907 | { |
… |
… |
TSwitchManager::ActivateApp(bool forceShow, bool allowWorkspaceSwitch)
|
930 | 934 | |
931 | 935 | int32 currentWorkspace = current_workspace(); |
932 | 936 | TTeamGroup* teamGroup = (TTeamGroup*)fGroupList.ItemAt(fCurrentIndex); |
| 937 | |
933 | 938 | // Let's handle the easy case first: There's only 1 team in the group |
934 | 939 | if (teamGroup->TeamList()->CountItems() == 1) { |
935 | 940 | bool result; |
… |
… |
TSwitchManager::ActivateApp(bool forceShow, bool allowWorkspaceSwitch)
|
988 | 993 | if (tokens == NULL) { |
989 | 994 | ASSERT(windowInfo); |
990 | 995 | free(windowInfo); |
991 | | return true; // weird error, so don't try to recover |
| 996 | return true; |
| 997 | // weird error, so don't try to recover |
992 | 998 | } |
993 | 999 | |
994 | 1000 | BList windowsToActivate; |
… |
… |
TSwitchManager::QuitApp()
|
1040 | 1046 | |
1041 | 1047 | TTeamGroup* teamGroup; |
1042 | 1048 | int32 count = 0; |
| 1049 | |
1043 | 1050 | for (int32 i = fCurrentIndex + 1; i < fGroupList.CountItems(); i++) { |
1044 | 1051 | teamGroup = (TTeamGroup*)fGroupList.ItemAt(i); |
1045 | 1052 | |
… |
… |
TBox::MouseDown(BPoint where)
|
1296 | 1303 | if (fLeftScroller) { |
1297 | 1304 | BRect lhit(0, frame.top, frame.left, frame.bottom); |
1298 | 1305 | if (lhit.Contains(where)) { |
1299 | | // Want to scroll by NUMSLOTS-1 slots |
| 1306 | // Want to scroll by NUMSLOTS - 1 slots |
1300 | 1307 | int32 previousIndex = fManager->CurrentIndex(); |
1301 | 1308 | int32 previousSlot = fManager->CurrentSlot(); |
1302 | 1309 | int32 newSlot = previousSlot - (kNumSlots - 1); |
… |
… |
TBox::MouseDown(BPoint where)
|
1311 | 1318 | if (fRightScroller) { |
1312 | 1319 | BRect rhit(frame.right, frame.top, bounds.right, frame.bottom); |
1313 | 1320 | if (rhit.Contains(where)) { |
1314 | | // Want to scroll by NUMSLOTS-1 slots |
| 1321 | // Want to scroll by NUMSLOTS - 1 slots |
1315 | 1322 | int32 previousIndex = fManager->CurrentIndex(); |
1316 | 1323 | int32 previousSlot = fManager->CurrentSlot(); |
1317 | | int32 newSlot = previousSlot + (kNumSlots-1); |
| 1324 | int32 newSlot = previousSlot + (kNumSlots - 1); |
1318 | 1325 | int32 newIndex = fIconView->IndexAt(newSlot); |
1319 | 1326 | |
1320 | 1327 | if (newIndex < 0) { |
1321 | 1328 | // don't have a page full to scroll |
1322 | 1329 | int32 valid = fManager->CountVisibleGroups(); |
1323 | | newIndex = fIconView->IndexAt(valid-1); |
| 1330 | newIndex = fIconView->IndexAt(valid - 1); |
1324 | 1331 | } |
1325 | 1332 | fManager->SwitchToApp(previousIndex, newIndex, true); |
1326 | 1333 | } |
… |
… |
TBox::MouseDown(BPoint where)
|
1329 | 1336 | frame = fWindow->WindowView()->Frame(); |
1330 | 1337 | if (fUpScroller) { |
1331 | 1338 | BRect hit1(frame.left - 10, frame.top, frame.left, |
1332 | | (frame.top+frame.bottom)/2); |
| 1339 | (frame.top + frame.bottom) / 2); |
1333 | 1340 | BRect hit2(frame.right, frame.top, frame.right + 10, |
1334 | | (frame.top+frame.bottom)/2); |
| 1341 | (frame.top + frame.bottom) / 2); |
1335 | 1342 | if (hit1.Contains(where) || hit2.Contains(where)) { |
1336 | 1343 | // Want to scroll up 1 window |
1337 | 1344 | fManager->CycleWindow(false, false); |
… |
… |
TBox::MouseDown(BPoint where)
|
1339 | 1346 | } |
1340 | 1347 | |
1341 | 1348 | if (fDownScroller) { |
1342 | | BRect hit1(frame.left - 10, (frame.top+frame.bottom) / 2, frame.left, |
1343 | | frame.bottom); |
1344 | | BRect hit2(frame.right, (frame.top+frame.bottom) / 2, frame.right + 10, |
1345 | | frame.bottom); |
| 1349 | BRect hit1(frame.left - 10, (frame.top + frame.bottom) / 2, |
| 1350 | frame.left, frame.bottom); |
| 1351 | BRect hit2(frame.right, (frame.top + frame.bottom) / 2, |
| 1352 | frame.right + 10, frame.bottom); |
1346 | 1353 | if (hit1.Contains(where) || hit2.Contains(where)) { |
1347 | 1354 | // Want to scroll down 1 window |
1348 | 1355 | fManager->CycleWindow(true, false); |
… |
… |
TBox::Draw(BRect update)
|
1374 | 1381 | |
1375 | 1382 | // Fill the area with dark gray |
1376 | 1383 | SetHighColor(darkGray); |
1377 | | box.InsetBy(1,1); |
| 1384 | box.InsetBy(1, 1); |
1378 | 1385 | FillRect(box); |
1379 | 1386 | |
1380 | | box.InsetBy(-1,-1); |
| 1387 | box.InsetBy(-1, -1); |
1381 | 1388 | |
1382 | 1389 | BeginLineArray(50); |
1383 | 1390 | |
1384 | 1391 | // The main frame around the icon view |
1385 | | AddLine(box.LeftTop(), BPoint(center-kWedge, box.top), veryDarkGray); |
1386 | | AddLine(BPoint(center+kWedge, box.top), box.RightTop(), veryDarkGray); |
| 1392 | AddLine(box.LeftTop(), BPoint(center - kWedge, box.top), veryDarkGray); |
| 1393 | AddLine(BPoint(center + kWedge, box.top), box.RightTop(), veryDarkGray); |
1387 | 1394 | |
1388 | | AddLine(box.LeftBottom(), BPoint(center-kWedge, box.bottom), veryDarkGray); |
1389 | | AddLine(BPoint(center+kWedge, box.bottom), box.RightBottom(), veryDarkGray); |
| 1395 | AddLine(box.LeftBottom(), BPoint(center - kWedge, box.bottom), |
| 1396 | veryDarkGray); |
| 1397 | AddLine(BPoint(center + kWedge, box.bottom), box.RightBottom(), |
| 1398 | veryDarkGray); |
1390 | 1399 | AddLine(box.LeftBottom() + BPoint(1, 1), |
1391 | | BPoint(center-kWedge, box.bottom + 1), white); |
1392 | | AddLine(BPoint(center+kWedge, box.bottom) + BPoint(0, 1), |
| 1400 | BPoint(center - kWedge, box.bottom + 1), white); |
| 1401 | AddLine(BPoint(center + kWedge, box.bottom) + BPoint(0, 1), |
1393 | 1402 | box.RightBottom() + BPoint(1, 1), white); |
1394 | 1403 | |
1395 | 1404 | AddLine(box.LeftTop(), box.LeftBottom(), veryDarkGray); |
1396 | 1405 | AddLine(box.RightTop(), box.RightBottom(), veryDarkGray); |
1397 | | AddLine(box.RightTop() + BPoint(1, 1), |
1398 | | box.RightBottom() + BPoint(1, 1), white); |
| 1406 | AddLine(box.RightTop() + BPoint(1, 1), box.RightBottom() + BPoint(1, 1), |
| 1407 | white); |
1399 | 1408 | |
1400 | 1409 | // downward pointing area at top of frame |
1401 | 1410 | BPoint point(center - kWedge, box.top); |
1402 | 1411 | AddLine(point, point + BPoint(kWedge, kWedge), veryDarkGray); |
1403 | | AddLine(point + BPoint(kWedge, kWedge), |
1404 | | BPoint(center+kWedge, point.y), veryDarkGray); |
| 1412 | AddLine(point + BPoint(kWedge, kWedge), BPoint(center + kWedge, point.y), |
| 1413 | veryDarkGray); |
1405 | 1414 | |
1406 | | AddLine(point + BPoint(1, 0), |
1407 | | point + BPoint(1, 0) + BPoint(kWedge - 1, kWedge - 1), white); |
| 1415 | AddLine(point + BPoint(1, 0), point + BPoint(1, 0) |
| 1416 | + BPoint(kWedge - 1, kWedge - 1), white); |
1408 | 1417 | |
1409 | 1418 | AddLine(point + BPoint(2, -1) + BPoint(kWedge - 1, kWedge - 1), |
1410 | | BPoint(center+kWedge-1, point.y), darkGray); |
| 1419 | BPoint(center + kWedge - 1, point.y), darkGray); |
1411 | 1420 | |
1412 | 1421 | BPoint topPoint = point; |
1413 | 1422 | |
… |
… |
TBox::Draw(BRect update)
|
1416 | 1425 | point.x = center - kWedge; |
1417 | 1426 | AddLine(point, point + BPoint(kWedge, -kWedge), veryDarkGray); |
1418 | 1427 | AddLine(point + BPoint(kWedge, -kWedge), |
1419 | | BPoint(center+kWedge, point.y), veryDarkGray); |
| 1428 | BPoint(center + kWedge, point.y), veryDarkGray); |
1420 | 1429 | |
1421 | 1430 | AddLine(point + BPoint(1, 0), |
1422 | 1431 | point + BPoint(1, 0) + BPoint(kWedge - 1, -(kWedge - 1)), white); |
… |
… |
TBox::Draw(BRect update)
|
1436 | 1445 | |
1437 | 1446 | // fill the upward pointing arrow area |
1438 | 1447 | SetHighColor(standardGray); |
1439 | | FillTriangle(bottomPoint + BPoint(2,0), |
| 1448 | FillTriangle(bottomPoint + BPoint(2, 0), |
1440 | 1449 | bottomPoint + BPoint(2, 0) + BPoint(kWedge - 2, -(kWedge - 2)), |
1441 | 1450 | BPoint(center + kWedge - 2, bottomPoint.y)); |
1442 | 1451 | |
… |
… |
TBox::DrawIconScrollers(bool force)
|
1467 | 1476 | } |
1468 | 1477 | |
1469 | 1478 | int32 maxIndex = fManager->GroupList()->CountItems() - 1; |
1470 | | // last_frame is in fIconView coordinate space |
| 1479 | // last_frame is in fIconView coordinate space |
1471 | 1480 | BRect lastFrame = fIconView->FrameOf(maxIndex); |
1472 | 1481 | |
1473 | 1482 | if (lastFrame.right > rect.right) { |
… |
… |
TIconView::CacheIcons(TTeamGroup* teamGroup)
|
1893 | 1902 | void |
1894 | 1903 | TIconView::AnimateIcon(BBitmap* startIcon, BBitmap* endIcon) |
1895 | 1904 | { |
1896 | | BRect centerRect(kCenterSlot*kSlotSize, 0, |
| 1905 | BRect centerRect(kCenterSlot * kSlotSize, 0, |
1897 | 1906 | (kCenterSlot + 1) * kSlotSize - 1, kSlotSize - 1); |
1898 | 1907 | BRect startIconBounds = startIcon->Bounds(); |
1899 | 1908 | BRect bounds = Bounds(); |
… |
… |
TIconView::AnimateIcon(BBitmap* startIcon, BBitmap* endIcon)
|
1917 | 1926 | fOffBitmap->Lock(); |
1918 | 1927 | |
1919 | 1928 | for (int i = 0; i < 2; i++) { |
1920 | | startIconBounds.InsetBy(amount,amount); |
| 1929 | startIconBounds.InsetBy(amount, amount); |
1921 | 1930 | snooze(20000); |
1922 | 1931 | fOffView->SetDrawingMode(B_OP_COPY); |
1923 | 1932 | fOffView->FillRect(fOffView->Bounds()); |
… |
… |
TIconView::AnimateIcon(BBitmap* startIcon, BBitmap* endIcon)
|
1927 | 1936 | DrawBitmap(fOffBitmap, destRect); |
1928 | 1937 | } |
1929 | 1938 | for (int i = 0; i < 2; i++) { |
1930 | | startIconBounds.InsetBy(amount,amount); |
| 1939 | startIconBounds.InsetBy(amount, amount); |
1931 | 1940 | snooze(20000); |
1932 | 1941 | fOffView->SetDrawingMode(B_OP_COPY); |
1933 | 1942 | fOffView->FillRect(fOffView->Bounds()); |
… |
… |
int32
|
2054 | 2063 | TIconView::SlotOf(int32 index) const |
2055 | 2064 | { |
2056 | 2065 | BRect rect = FrameOf(index); |
| 2066 | |
2057 | 2067 | return (int32)(rect.left / kSlotSize) - kCenterSlot; |
2058 | 2068 | } |
2059 | 2069 | |
… |
… |
TIconView::DrawTeams(BRect update)
|
2107 | 2117 | |
2108 | 2118 | SetDrawingMode(B_OP_COPY); |
2109 | 2119 | } |
2110 | | rect.OffsetBy(kSlotSize,0); |
| 2120 | rect.OffsetBy(kSlotSize, 0); |
2111 | 2121 | } |
2112 | 2122 | } |
2113 | 2123 | |
… |
… |
TWindowView::ScrollTo(BPoint where)
|
2201 | 2211 | } |
2202 | 2212 | |
2203 | 2213 | |
2204 | | |
2205 | 2214 | BRect |
2206 | 2215 | TWindowView::FrameOf(int32 index) const |
2207 | 2216 | { |
… |
… |
TWindowView::Draw(BRect update)
|
2275 | 2284 | int32 groupIndex = fManager->CurrentIndex(); |
2276 | 2285 | TTeamGroup* teamGroup |
2277 | 2286 | = (TTeamGroup*)fManager->GroupList()->ItemAt(groupIndex); |
| 2287 | |
2278 | 2288 | if (teamGroup == NULL) |
2279 | 2289 | return; |
2280 | 2290 | |