Changeset 108
- Timestamp:
- 10/20/07 15:17:40 (1 year ago)
- Location:
- Mulberry/trunk/Linux/Sources
- Files:
-
- 5 modified
-
Application/Address_Book_Manager/CAdbkManagerTitleTable.cp (modified) (1 diff)
-
Application/Calendar/Calendar_View/Calendar_Store_View/CCalendarStoreTitleTable.cp (modified) (1 diff)
-
Application/Calendar/Calendar_View/Day_Week_View/CDayWeekTable.cp (modified) (3 diffs)
-
Application/Server/CServerTitleTable.cp (modified) (1 diff)
-
Support/Table/CTableDragAndDrop.cp (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Mulberry/trunk/Linux/Sources/Application/Address_Book_Manager/CAdbkManagerTitleTable.cp
r21 r108 94 94 { 95 95 STableCell hitCell; 96 JPoint imagePt; 97 LocalToImagePoint(point, imagePt); 98 if (!GetCellHitBy(imagePt, hitCell)) 96 if (!GetCellHitBy(point, hitCell)) 99 97 { 100 98 CTitleTableView::OnRButtonDown(point, buttonStates, modifiers); -
Mulberry/trunk/Linux/Sources/Application/Calendar/Calendar_View/Calendar_Store_View/CCalendarStoreTitleTable.cp
r21 r108 64 64 65 65 // Find column clicked 66 JPoint imagePt;67 LocalToImagePoint(point, imagePt);68 66 STableCell cell; 69 if (GetCellHitBy( imagePt, cell))67 if (GetCellHitBy(point, cell)) 70 68 sClickColumn = cell.col; 71 69 -
Mulberry/trunk/Linux/Sources/Application/Calendar/Calendar_View/Day_Week_View/CDayWeekTable.cp
r21 r108 127 127 { 128 128 STableCell hitCell; 129 JPoint imagePt; 130 LocalToImagePoint(mContextPoint, imagePt); 131 132 if (GetCellHitBy(imagePt, hitCell)) 129 if (GetCellHitBy(mContextPoint, hitCell)) 133 130 { 134 131 // Broadcast double-click if in day area … … 173 170 iCal::CICalendarDateTime CDayWeekTable::GetClickDateTime(const JPoint& localPt) const 174 171 { 175 JPoint imagePt;176 LocalToImagePoint(localPt, imagePt);177 172 STableCell hitCell; 178 if (GetCellHitBy( imagePt, hitCell))173 if (GetCellHitBy(localPt, hitCell)) 179 174 { 180 175 if (hitCell.row == cAllDayRow) … … 196 191 uint32_t bot_secs = mEndHour * 60 * 60; 197 192 198 uint32_t click_secs = top_secs + (bot_secs - top_secs) * ( imagePt.y - cellTop) / (cellBottom - cellTop);193 uint32_t click_secs = top_secs + (bot_secs - top_secs) * (localPt.y - cellTop) / (cellBottom - cellTop); 199 194 200 195 // Round to nearest 15 minute (900 second) interval -
Mulberry/trunk/Linux/Sources/Application/Server/CServerTitleTable.cp
r21 r108 64 64 65 65 // Find column clicked 66 JPoint imagePt;67 LocalToImagePoint(point, imagePt);68 66 STableCell cell; 69 if (GetCellHitBy( imagePt, cell))67 if (GetCellHitBy(point, cell)) 70 68 sClickColumn = cell.col; 71 69 -
Mulberry/trunk/Linux/Sources/Support/Table/CTableDragAndDrop.cp
r21 r108 268 268 { 269 269 270 // Clear existing cell hilight271 ClearDropCell(mDropCell);270 // Clear existing cell hilight 271 ClearDropCell(mDropCell); 272 272 273 273 // Cache the action for reference … … 292 292 { 293 293 STableCell dropCell; 294 JPoint imagePt; 295 LocalToImagePoint(pt, imagePt); 296 if (GetCellHitBy(imagePt, dropCell) && IsDropCell(mCurrentDropFlavors, dropCell)) 294 if (GetCellHitBy(pt, dropCell) && IsDropCell(mCurrentDropFlavors, dropCell)) 297 295 { 298 296 if (mDropCursor) … … 300 298 // Check if close to edge of cell and drop cursor allowed 301 299 JRect rowRect; 302 Get LocalCellRect(dropCell, rowRect);300 GetImageCellBounds(dropCell, rowRect); 303 301 304 302 if ((pt.y < rowRect.top + 2) || (pt.y > rowRect.bottom - 2)) … … 322 320 // Get the hit cell 323 321 STableCell hitCell; 324 JPoint imagePt; 325 LocalToImagePoint(pt, imagePt); 326 GetCellHitBy(imagePt, hitCell); 322 GetCellHitBy(pt, hitCell); 327 323 328 324 JRect rowRect; 329 Get LocalCellRect(hitCell, rowRect);325 GetImageCellBounds(hitCell, rowRect); 330 326 331 327 JPoint offset = pt; … … 333 329 334 330 // Get the hit cell 335 LocalToImagePoint(offset, imagePt); 336 GetCellHitBy(imagePt, hitCell); 331 GetCellHitBy(offset, hitCell); 337 332 338 333 if (mRows == 0) … … 377 372 void CTableDragAndDrop::HandleDNDHere(const JPoint& pt, const JXWidget* source) 378 373 { 379 JPoint imagePt;380 LocalToImagePoint(pt, imagePt);381 382 374 bool hilite = false; 383 375 STableCell lastDrop = mLastDropCell; … … 388 380 // Get the hit cell 389 381 STableCell hitCell; 390 GetCellHitBy( imagePt, hitCell);382 GetCellHitBy(pt, hitCell); 391 383 mLastHitCell = hitCell; 392 384 … … 398 390 // Check if close to edge of cell and drop cursor allowed 399 391 JRect rowRect; 400 Get LocalCellRect(hitCell, rowRect);392 GetImageCellBounds(hitCell, rowRect); 401 393 402 394 if ((pt.y < rowRect.top + 2) || (pt.y > rowRect.bottom - 2)) … … 416 408 // Get the hit cell 417 409 STableCell hitCell; 418 GetCellHitBy( imagePt, hitCell);410 GetCellHitBy(pt, hitCell); 419 411 420 412 JRect rowRect; 421 Get LocalCellRect(hitCell, rowRect);422 423 JPoint offset = imagePt;413 GetImageCellBounds(hitCell, rowRect); 414 415 JPoint offset = pt; 424 416 offset += JPoint(0, rowRect.height()/2); 425 417 426 418 // Get the hit cell 427 GetCellHitBy( imagePt, hitCell);419 GetCellHitBy(offset, hitCell); 428 420 429 421 if (!hilite) … … 548 540 // Get row rect 549 541 JRect rowRect; 550 GetLocalCellRect(mLastDropCell, rowRect); 551 542 GetImageCellBounds(mLastDropCell, rowRect); 552 543 p->RectInside(rowRect); 553 544 } … … 558 549 // Get row rect 559 550 JRect rowRect; 560 GetLocalCellRect(cell, rowRect); 561 551 GetImageCellBounds(cell, rowRect); 562 552 p->RectInside(rowRect); 563 553 } … … 594 584 if (mLastDropCursor <= GetItemCount()) 595 585 { 596 Get LocalRowRect(mLastDropCursor.row, rowRect);586 GetImageCellBounds(mLastDropCursor.row, rowRect); 597 587 rowRect.bottom = rowRect.top + 2; 598 588 } … … 601 591 STableCell temp = mLastDropCursor; 602 592 temp.row--; 603 Get LocalRowRect(temp.row, rowRect);593 GetImageCellBounds(temp.row, rowRect); 604 594 rowRect.top = rowRect.bottom - 2; 605 595 } … … 616 606 if (cell.row <= GetItemCount()) 617 607 { 618 Get LocalRowRect(cell.row, rowRect);608 GetImageCellBounds(cell.row, rowRect); 619 609 rowRect.bottom = rowRect.top + 2; 620 610 } … … 623 613 STableCell temp = cell; 624 614 temp.row--; 625 Get LocalRowRect(temp.row, rowRect);615 GetImageCellBounds(temp.row, rowRect); 626 616 rowRect.top = rowRect.bottom - 2; 627 617 }