| 1367 | | |
|---|
| 1368 | | def __onWxMouseMotion(self, evt): |
|---|
| 1369 | | self.raiseEvent(dEvents.MouseMove, evt) |
|---|
| 1370 | | def onMouseMove(self, evt): |
|---|
| 1371 | | ## pkm: commented out the evt.Continue=False because it doesn't appear |
|---|
| 1372 | | ## to be needed, and it prevents the native UI from responding. |
|---|
| 1373 | | #evt.Continue = False |
|---|
| 1374 | | if evt.EventData.has_key("row"): |
|---|
| 1375 | | self.onGridMouseMove(evt) |
|---|
| 1376 | | else: |
|---|
| 1377 | | self.onHeaderMouseMove(evt) |
|---|
| 1378 | | def onGridMouseMove(self, evt): |
|---|
| 1379 | | """ Occurs when the left mouse button moves over the grid.""" |
|---|
| 1380 | | pass |
|---|
| 1381 | | def onHeaderMouseMove(self, evt): |
|---|
| 1382 | | """ Occurs when the mouse moves in the grid header.""" |
|---|
| 1383 | | headerIsDragging = self.headerDragging |
|---|
| 1384 | | headerIsSizing = self.headerSizing |
|---|
| 1385 | | dragging = evt.EventData["mouseDown"] |
|---|
| 1386 | | header = self.Header |
|---|
| 1387 | | |
|---|
| 1388 | | if dragging: |
|---|
| 1389 | | x,y = evt.EventData["mousePosition"] |
|---|
| 1390 | | |
|---|
| 1391 | | if not headerIsSizing and ( |
|---|
| 1392 | | self.getColByX(x) == self.getColByX(x-2) == self.getColByX(x+2)): |
|---|
| 1393 | | if not headerIsDragging: |
|---|
| 1394 | | # A header reposition is beginning |
|---|
| 1395 | | self.headerDragging = True |
|---|
| 1396 | | self.headerDragFrom = (x,y) |
|---|
| 1397 | | |
|---|
| 1398 | | else: |
|---|
| 1399 | | # already dragging. |
|---|
| 1400 | | begCol = self.getColByX(self.headerDragFrom[0]) |
|---|
| 1401 | | curCol = self.getColByX(x) |
|---|
| 1402 | | |
|---|
| 1403 | | # The visual indicators (changing the mouse cursor) isn't currently |
|---|
| 1404 | | # working. It would work without the evt.Skip() below, but that is |
|---|
| 1405 | | # needed for when the column is resized. |
|---|
| 1406 | | uic = dUICursors |
|---|
| 1407 | | if begCol == curCol: |
|---|
| 1408 | | # Give visual indication that a move is initiated |
|---|
| 1409 | | header.SetCursor(uic.getStockCursor(uic.Cursor_Size_WE)) |
|---|
| 1410 | | else: |
|---|
| 1411 | | # Give visual indication that this is an acceptable drop target |
|---|
| 1412 | | header.SetCursor(uic.getStockCursor(uic.Cursor_Bullseye)) |
|---|
| 1413 | | else: |
|---|
| 1414 | | # A size action is happening |
|---|
| 1415 | | self.headerSizing = True |
|---|
| 1416 | | |
|---|
| 1417 | | |
|---|
| 1418 | | def __onWxMouseLeftUp(self, evt): |
|---|
| 1419 | | self.raiseEvent(dEvents.MouseLeftUp, evt) |
|---|
| 1420 | | def onMouseLeftUp(self, evt): |
|---|
| 1421 | | ## pkm: commented out the evt.Continue=False because it doesn't appear |
|---|
| 1422 | | ## to be needed, and it prevents the native UI from responding. |
|---|
| 1423 | | #evt.Continue = False |
|---|
| 1424 | | if evt.EventData.has_key("row"): |
|---|
| 1425 | | self.onGridLeftUp(evt) |
|---|
| 1426 | | else: |
|---|
| 1427 | | self.onHeaderLeftUp(evt) |
|---|
| 1428 | | def onGridLeftUp(self, evt): |
|---|
| 1429 | | """ Occurs when the left mouse button is released in the grid.""" |
|---|
| 1430 | | pass |
|---|
| 1431 | | def onHeaderLeftUp(self, evt): |
|---|
| 1432 | | """ Occurs when the left mouse button is released in the grid header. |
|---|
| 1433 | | |
|---|
| 1434 | | Basically, this comes down to two possibilities: the end of a drag |
|---|
| 1435 | | operation, or a single-click operation. If we were dragging, then |
|---|
| 1436 | | it is possible a column needs to change position. If we were clicking, |
|---|
| 1437 | | then it is a sort operation. |
|---|
| 1438 | | """ |
|---|
| 1439 | | x,y = evt.EventData["mousePosition"] |
|---|
| 1440 | | if self.headerDragging: |
|---|
| 1441 | | # A drag action is ending |
|---|
| 1442 | | self.headerDragTo = (x,y) |
|---|
| 1443 | | |
|---|
| 1444 | | begCol = self.getColByX(self.headerDragFrom[0]) |
|---|
| 1445 | | curCol = self.getColByX(x) |
|---|
| 1446 | | |
|---|
| 1447 | | if begCol != curCol: |
|---|
| 1448 | | if curCol > begCol: |
|---|
| 1449 | | curCol += 1 |
|---|
| 1450 | | self.MoveColumn(begCol, curCol) |
|---|
| 1451 | | self.Header.SetCursor(self.defaultHdrCursor) |
|---|
| 1452 | | elif self.headerSizing: |
|---|
| 1453 | | pass |
|---|
| 1454 | | else: |
|---|
| 1455 | | # we weren't dragging, and the mouse was just released. |
|---|
| 1456 | | # Find out the column we are in based on the x-coord, and |
|---|
| 1457 | | # do a processSort() on that column. |
|---|
| 1458 | | col = self.getColByX(x) |
|---|
| 1459 | | self.processSort(col) |
|---|
| 1460 | | self.headerDragging = False |
|---|
| 1461 | | self.headerSizing = False |
|---|
| 1462 | | ## pkm: commented out the evt.Continue=False because it doesn't appear |
|---|
| 1463 | | ## to be needed, and it prevents the native UI from responding. |
|---|
| 1464 | | #evt.Continue = False |
|---|
| 1465 | | |
|---|
| 1466 | | |
|---|
| 1467 | | def __onWxMouseLeftDown(self, evt): |
|---|
| 1468 | | self.raiseEvent(dEvents.MouseLeftDown, evt) |
|---|
| 1469 | | def onMouseLeftDown(self, evt): |
|---|
| 1470 | | evt.Continue = False |
|---|
| 1471 | | if evt.EventData.has_key("row"): |
|---|
| 1472 | | self.onGridLeftDown(evt) |
|---|
| 1473 | | else: |
|---|
| 1474 | | self.onHeaderLeftDown(evt) |
|---|
| 1475 | | def onGridLeftDown(self, evt): |
|---|
| 1476 | | """ Occurs when the left mouse button is pressed in the grid.""" |
|---|
| 1477 | | pass |
|---|
| 1478 | | def onHeaderLeftDown(self, evt): |
|---|
| 1479 | | """ Occurs when the left mouse button is pressed in the grid header.""" |
|---|
| 1480 | | evt.Continue = False |
|---|
| 1481 | | |
|---|
| 1482 | | |
|---|
| 1483 | | def onHeaderLeftDClick(self, evt): |
|---|
| 1484 | | """ Occurs when the left mouse button is double-clicked in the grid header.""" |
|---|
| 1485 | | pass |
|---|
| 1486 | | |
|---|
| 1487 | | |
|---|
| 1488 | | def __onWxMouseRightUp(self, evt): |
|---|
| 1489 | | self.raiseEvent(dEvents.MouseRightUp, evt) |
|---|
| 1490 | | def onMouseRightUp(self, evt): |
|---|
| 1491 | | evt.Continue = False |
|---|
| 1492 | | if evt.EventData.has_key("row"): |
|---|
| 1493 | | self.onGridRightUp(evt) |
|---|
| 1494 | | else: |
|---|
| 1495 | | self.onHeaderRightUp(evt) |
|---|
| 1496 | | def onGridRightUp(self, evt): |
|---|
| 1497 | | """ Occurs when the right mouse button goes up in the grid.""" |
|---|
| 1498 | | pass |
|---|
| 1499 | | def onHeaderRightUp(self, evt): |
|---|
| 1500 | | """ Occurs when the right mouse button goes up in the grid header.""" |
|---|
| 1501 | | pass |
|---|
| 1502 | | self.autoSizeCol( self.getColByX(evt.GetX())) |
|---|
| 1503 | | |
|---|
| 1504 | | |
|---|
| 1505 | | def _onLeftDClick(self, evt): |
|---|
| 1506 | | """Occurs when the user double-clicks anywhere in the grid.""" |
|---|
| 1507 | | if evt.EventData.has_key("row"): |
|---|
| 1508 | | # User double-clicked on a cell |
|---|
| 1509 | | self.onGridLeftDClick(evt) |
|---|
| 1510 | | else: |
|---|
| 1511 | | # On the header |
|---|
| 1512 | | self.onHeaderLeftDClick(evt) |
|---|
| 1513 | | |
|---|
| 1514 | | |
|---|
| 1515 | | def onGridLeftDClick(self, evt): |
|---|
| 1516 | | """The user double-clicked on a cell in the grid.""" |
|---|
| 1517 | | pass |
|---|
| 1518 | | |
|---|
| 1519 | | |
|---|
| 1520 | | def onGridRightClick(self, evt): |
|---|
| 1521 | | """ Occurs when the user right-clicks a cell in the grid. |
|---|
| 1522 | | By default, this is interpreted as a request to display the popup |
|---|
| 1523 | | menu, as defined in self.popupMenu(). |
|---|
| 1524 | | NOTE: evt is a wxPython event, not a Dabo event. |
|---|
| 1525 | | """ |
|---|
| 1526 | | # Select the cell that was right-clicked upon |
|---|
| 1527 | | self.CurrentRow = evt.GetRow() |
|---|
| 1528 | | self.CurrentColumn = evt.GetCol() |
|---|
| 1529 | | |
|---|
| 1530 | | # Make the popup menu appear in the location that was clicked |
|---|
| 1531 | | self.mousePosition = evt.GetPosition() |
|---|
| 1532 | | |
|---|
| 1533 | | # Display the popup menu, if any |
|---|
| 1534 | | self.popupMenu() |
|---|
| 1535 | | |
|---|
| 1536 | | |
|---|
| 1537 | | def OnGridLabelLeftClick(self, evt): |
|---|
| 1538 | | """ Occurs when the user left-clicks a grid column label. |
|---|
| 1539 | | By default, this is interpreted as a request to sort the column. |
|---|
| 1540 | | NOTE: evt is a wxPython event, not a Dabo event. |
|---|
| 1541 | | """ |
|---|
| 1542 | | self.processSort(evt.GetCol()) |
|---|
| 1543 | | |
|---|
| 1544 | | |
|---|
| | 1320 | |
|---|
| | 1321 | ##----------------------------------------------------------## |
|---|
| | 1322 | ## begin: user hook methods ## |
|---|
| | 1323 | ##----------------------------------------------------------## |
|---|
| | 1652 | ##----------------------------------------------------------## |
|---|
| | 1653 | ## begin: dEvent callbacks for internal use ## |
|---|
| | 1654 | ##----------------------------------------------------------## |
|---|
| | 1655 | def _onGridCellEdited(self, evt): |
|---|
| | 1656 | row, col = evt.EventData["row"], evt.EventData["col"] |
|---|
| | 1657 | rowData = self.getDataSet()[row] |
|---|
| | 1658 | fld = self.Columns[col].Field |
|---|
| | 1659 | newVal = self.GetCellValue(row, col) |
|---|
| | 1660 | oldVal = rowData[fld] |
|---|
| | 1661 | if newVal != oldVal: |
|---|
| | 1662 | # Update the local copy of the data |
|---|
| | 1663 | rowData[fld] = self.GetCellValue(row, col) |
|---|
| | 1664 | |
|---|
| | 1665 | |
|---|
| | 1666 | def _onGridColSize(self, evt): |
|---|
| | 1667 | "Occurs when the user resizes the width of the column." |
|---|
| | 1668 | colNum = evt.EventData["rowOrCol"] |
|---|
| | 1669 | col = self.Columns[colNum] |
|---|
| | 1670 | colName = "Column_%s" % col.Field |
|---|
| | 1671 | |
|---|
| | 1672 | # Sync our column object up with what the grid is reporting, and because |
|---|
| | 1673 | # the user made this change, save to the userSettings: |
|---|
| | 1674 | width = col.Width = self.GetColSize(colNum) |
|---|
| | 1675 | app = self.Application |
|---|
| | 1676 | if app is not None: |
|---|
| | 1677 | app.setUserSetting("%s.%s.%s.%s" % (self.Form.Name, |
|---|
| | 1678 | self.Name, colName, |
|---|
| | 1679 | "Width"), width) |
|---|
| | 1680 | |
|---|
| | 1681 | |
|---|
| | 1682 | def _onGridSelectCell(self, evt): |
|---|
| | 1683 | """ Occurs when the grid's cell focus has changed.""" |
|---|
| | 1684 | oldRow = self.CurrentRow |
|---|
| | 1685 | newRow = evt.EventData["row"] |
|---|
| | 1686 | |
|---|
| | 1687 | if oldRow != newRow: |
|---|
| | 1688 | if self.bizobj: |
|---|
| | 1689 | self.bizobj.RowNumber = newRow |
|---|
| | 1690 | self.Form.refreshControls() |
|---|
| | 1691 | |
|---|
| | 1692 | |
|---|
| | 1693 | def _onGridHeaderMouseMove(self, evt): |
|---|
| | 1694 | headerIsDragging = self._headerDragging |
|---|
| | 1695 | headerIsSizing = self._headerSizing |
|---|
| | 1696 | dragging = evt.EventData["mouseDown"] |
|---|
| | 1697 | header = self.Header |
|---|
| | 1698 | |
|---|
| | 1699 | if dragging: |
|---|
| | 1700 | x,y = evt.EventData["mousePosition"] |
|---|
| | 1701 | |
|---|
| | 1702 | if not headerIsSizing and ( |
|---|
| | 1703 | self.getColByX(x) == self.getColByX(x-2) == self.getColByX(x+2)): |
|---|
| | 1704 | if not headerIsDragging: |
|---|
| | 1705 | # A header reposition is beginning |
|---|
| | 1706 | self._headerDragging = True |
|---|
| | 1707 | self._headerDragFrom = (x,y) |
|---|
| | 1708 | |
|---|
| | 1709 | else: |
|---|
| | 1710 | # already dragging. |
|---|
| | 1711 | begCol = self.getColByX(self._headerDragFrom[0]) |
|---|
| | 1712 | curCol = self.getColByX(x) |
|---|
| | 1713 | |
|---|
| | 1714 | # The visual indicators (changing the mouse cursor) isn't currently |
|---|
| | 1715 | # working. It would work without the evt.Skip() below, but that is |
|---|
| | 1716 | # needed for when the column is resized. |
|---|
| | 1717 | uic = dUICursors |
|---|
| | 1718 | if begCol == curCol: |
|---|
| | 1719 | # Give visual indication that a move is initiated |
|---|
| | 1720 | header.SetCursor(uic.getStockCursor(uic.Cursor_Size_WE)) |
|---|
| | 1721 | else: |
|---|
| | 1722 | # Give visual indication that this is an acceptable drop target |
|---|
| | 1723 | header.SetCursor(uic.getStockCursor(uic.Cursor_Bullseye)) |
|---|
| | 1724 | else: |
|---|
| | 1725 | # A size action is happening |
|---|
| | 1726 | self._headerSizing = True |
|---|
| | 1727 | |
|---|
| | 1728 | |
|---|
| | 1729 | def _onGridHeaderMouseLeftUp(self, evt): |
|---|
| | 1730 | """ Occurs when the left mouse button is released in the grid header. |
|---|
| | 1731 | |
|---|
| | 1732 | Basically, this comes down to two possibilities: the end of a drag |
|---|
| | 1733 | operation, or a single-click operation. If we were dragging, then |
|---|
| | 1734 | it is possible a column needs to change position. If we were clicking, |
|---|
| | 1735 | then it is a sort operation. |
|---|
| | 1736 | """ |
|---|
| | 1737 | x,y = evt.EventData["mousePosition"] |
|---|
| | 1738 | if self._headerDragging: |
|---|
| | 1739 | # A drag action is ending |
|---|
| | 1740 | self._headerDragTo = (x,y) |
|---|
| | 1741 | |
|---|
| | 1742 | begCol = self.getColByX(self._headerDragFrom[0]) |
|---|
| | 1743 | curCol = self.getColByX(x) |
|---|
| | 1744 | |
|---|
| | 1745 | if begCol != curCol: |
|---|
| | 1746 | if curCol > begCol: |
|---|
| | 1747 | curCol += 1 |
|---|
| | 1748 | self.MoveColumn(begCol, curCol) |
|---|
| | 1749 | self.Header.SetCursor(self.defaultHdrCursor) |
|---|
| | 1750 | elif self._headerSizing: |
|---|
| | 1751 | pass |
|---|
| | 1752 | else: |
|---|
| | 1753 | # we weren't dragging, and the mouse was just released. |
|---|
| | 1754 | # Find out the column we are in based on the x-coord, and |
|---|
| | 1755 | # do a processSort() on that column. |
|---|
| | 1756 | col = self.getColByX(x) |
|---|
| | 1757 | self.processSort(col) |
|---|
| | 1758 | self._headerDragging = False |
|---|
| | 1759 | self._headerSizing = False |
|---|
| | 1760 | ## pkm: commented out the evt.Continue=False because it doesn't appear |
|---|
| | 1761 | ## to be needed, and it prevents the native UI from responding. |
|---|
| | 1762 | #evt.Continue = False |
|---|
| | 1763 | |
|---|
| | 1764 | |
|---|
| | 1765 | def _onGridHeaderMouseRightUp(self, evt): |
|---|
| | 1766 | """ Occurs when the right mouse button goes up in the grid header.""" |
|---|
| | 1767 | self.autoSizeCol( self.getColByX(evt.GetX())) |
|---|
| | 1768 | |
|---|
| | 1769 | |
|---|
| | 1770 | def _onContextMenu(self, evt): |
|---|
| | 1771 | # Make the popup menu appear in the location that was clicked |
|---|
| | 1772 | self.mousePosition = evt.GetPosition() |
|---|
| | 1773 | |
|---|
| | 1774 | # Display the popup menu, if any |
|---|
| | 1775 | self.popupMenu() |
|---|
| | 1776 | |
|---|
| | 1777 | def _onGridHeaderMouseLeftDown(self, evt): |
|---|
| | 1778 | evt.Continue = False |
|---|
| | 1779 | |
|---|
| | 1780 | def _onGridRowSize(self, evt): |
|---|
| | 1781 | """ Occurs when the user sizes the height of the row. If the |
|---|
| | 1782 | property 'SameSizeRows' is True, Dabo overrides the wxPython |
|---|
| | 1783 | default and applies that size change to all rows, not just the row |
|---|
| | 1784 | the user sized. |
|---|
| | 1785 | """ |
|---|
| | 1786 | row = evt.GetRowOrCol() |
|---|
| | 1787 | size = self.GetRowSize(row) |
|---|
| | 1788 | |
|---|
| | 1789 | # Persist the new size |
|---|
| | 1790 | app = self.Application |
|---|
| | 1791 | if app is not None: |
|---|
| | 1792 | app.setUserSetting("%s.%s.%s" % ( |
|---|
| | 1793 | self.Form.Name, self.Name, "RowSize"), size) |
|---|
| | 1794 | |
|---|
| | 1795 | if self.SameSizeRows: |
|---|
| | 1796 | self.SetDefaultRowSize(size, True) |
|---|
| | 1797 | self.ForceRefresh() |
|---|
| | 1798 | |
|---|
| | 1799 | |
|---|
| | 1800 | def _onKeyDown(self, evt): |
|---|
| | 1801 | """ Occurs when the user presses a key inside the grid. |
|---|
| | 1802 | Default actions depend on the key being pressed: |
|---|
| | 1803 | Enter: edit the record |
|---|
| | 1804 | Del: delete the record |
|---|
| | 1805 | F2: sort the current column |
|---|
| | 1806 | AlphaNumeric: incremental search |
|---|
| | 1807 | """ |
|---|
| | 1808 | if self.Editable and self.Columns[self.CurrentColumn].Editable: |
|---|
| | 1809 | # Can't search and edit at the same time |
|---|
| | 1810 | return |
|---|
| | 1811 | |
|---|
| | 1812 | keyCode = evt.EventData["keyCode"] |
|---|
| | 1813 | try: |
|---|
| | 1814 | char = chr(keyCode) |
|---|
| | 1815 | except ValueError: # keycode not in ascii range |
|---|
| | 1816 | char = None |
|---|
| | 1817 | |
|---|
| | 1818 | if keyCode == dKeys.keyStrings["enter"]: # Enter |
|---|
| | 1819 | self.onEnterKeyAction() |
|---|
| | 1820 | evt.stop() |
|---|
| | 1821 | else: |
|---|
| | 1822 | if keyCode == dKeys.keyStrings["delete"]: # Del |
|---|
| | 1823 | self.onDeleteKeyAction() |
|---|
| | 1824 | evt.stop() |
|---|
| | 1825 | elif keyCode == dKeys.keyStrings["escape"]: |
|---|
| | 1826 | self.onEscapeAction() |
|---|
| | 1827 | evt.stop() |
|---|
| | 1828 | elif char and (self.Searchable and self.Columns[self.CurrentColumn].Searchable) \ |
|---|
| | 1829 | and (char.isalnum() or char.isspace()) and not evt.HasModifiers(): |
|---|
| | 1830 | self.addToSearchStr(char) |
|---|
| | 1831 | # For some reason, without this the key happens twice |
|---|
| | 1832 | evt.stop() |
|---|
| | 1833 | else: |
|---|
| | 1834 | if self.processKeyPress(keyCode): |
|---|
| | 1835 | # Key was handled |
|---|
| | 1836 | evt.stop() |
|---|
| | 1837 | |
|---|
| | 1838 | |
|---|
| | 1839 | def _onHeaderPaint(self, evt): |
|---|
| | 1840 | dabo.ui.callAfter(self._paintHeader) |
|---|
| | 1841 | |
|---|
| | 1842 | ##----------------------------------------------------------## |
|---|
| | 1843 | ## end: dEvent callbacks for internal use ## |
|---|
| | 1844 | ##----------------------------------------------------------## |
|---|
| | 1845 | |
|---|
| | 1846 | |
|---|
| | 1847 | ##----------------------------------------------------------## |
|---|
| | 1848 | ## begin: wx callbacks to re-route to dEvents ## |
|---|
| | 1849 | ##----------------------------------------------------------## |
|---|
| | 1850 | |
|---|
| | 1851 | ## dGrid has to reimplement all of this to augment what dPemMixin does, |
|---|
| | 1852 | ## to offer separate events in the grid versus the header region. |
|---|
| | 1853 | def __onWxContextMenu(self, evt): |
|---|
| | 1854 | self.raiseEvent(dEvents.GridContextMenu, evt) |
|---|
| | 1855 | evt.Skip() |
|---|
| | 1856 | |
|---|
| | 1857 | def __onWxGridColSize(self, evt): |
|---|
| | 1858 | self.raiseEvent(dEvents.GridColSize, evt) |
|---|
| | 1859 | evt.Skip() |
|---|
| | 1860 | |
|---|
| | 1861 | def __onWxGridCellChange(self, evt): |
|---|
| | 1862 | self.raiseEvent(dEvents.GridCellEdited, evt) |
|---|
| | 1863 | evt.Skip() |
|---|
| | 1864 | |
|---|
| | 1865 | def __onWxGridRowSize(self, evt): |
|---|
| | 1866 | self.raiseEvent(dEvents.GridRowSize, evt) |
|---|
| | 1867 | evt.Skip() |
|---|
| | 1868 | |
|---|
| | 1869 | def __onWxGridSelectCell(self, evt): |
|---|
| | 1870 | self.raiseEvent(dEvents.GridSelectCell, evt) |
|---|
| | 1871 | evt.Skip() |
|---|
| | 1872 | |
|---|
| | 1873 | def __onWxHeaderContextMenu(self, evt): |
|---|
| | 1874 | self.raiseEvent(dEvents.GridHeaderContextMenu, evt) |
|---|
| | 1875 | evt.Skip() |
|---|
| | 1876 | |
|---|
| | 1877 | def __onWxHeaderMouseLeftDoubleClick(self, evt): |
|---|
| | 1878 | self.raiseEvent(dEvents.GridHeaderMouseLeftDoubleClick, evt) |
|---|
| | 1879 | evt.Skip() |
|---|
| | 1880 | |
|---|
| | 1881 | def __onWxHeaderMouseLeftDown(self, evt): |
|---|
| | 1882 | self.raiseEvent(dEvents.GridHeaderMouseLeftDown, evt) |
|---|
| | 1883 | #evt.Skip() #- don't skip or all the rows will be selected. |
|---|
| | 1884 | |
|---|
| | 1885 | def __onWxHeaderMouseLeftUp(self, evt): |
|---|
| | 1886 | self.raiseEvent(dEvents.GridHeaderMouseLeftUp, evt) |
|---|
| | 1887 | evt.Skip() |
|---|
| | 1888 | |
|---|
| | 1889 | def __onWxHeaderMouseMotion(self, evt): |
|---|
| | 1890 | self.raiseEvent(dEvents.GridHeaderMouseMove, evt) |
|---|
| | 1891 | evt.Skip() |
|---|
| | 1892 | |
|---|
| | 1893 | def __onWxHeaderMouseRightDown(self, evt): |
|---|
| | 1894 | self.raiseEvent(dEvents.GridHeaderMouseRightDown, evt) |
|---|
| | 1895 | evt.Skip() |
|---|
| | 1896 | |
|---|
| | 1897 | def __onWxHeaderMouseRightUp(self, evt): |
|---|
| | 1898 | self.raiseEvent(dEvents.GridHeaderMouseRightUp, evt) |
|---|
| | 1899 | evt.Skip() |
|---|
| | 1900 | |
|---|
| | 1901 | def __onWxHeaderPaint(self, evt): |
|---|
| | 1902 | self.raiseEvent(dEvents.GridHeaderPaint, evt) |
|---|
| | 1903 | |
|---|
| | 1904 | def __onWxMouseLeftDoubleClick(self, evt): |
|---|
| | 1905 | self.raiseEvent(dEvents.GridMouseLeftDoubleClick, evt) |
|---|
| | 1906 | evt.Skip() |
|---|
| | 1907 | |
|---|
| | 1908 | def __onWxMouseLeftClick(self, evt): |
|---|
| | 1909 | self.raiseEvent(dEvents.GridMouseLeftClick, evt) |
|---|
| | 1910 | evt.Skip() |
|---|
| | 1911 | |
|---|
| | 1912 | def __onWxMouseLeftDown(self, evt): |
|---|
| | 1913 | self.raiseEvent(dEvents.GridMouseLeftDown, evt) |
|---|
| | 1914 | evt.Skip() |
|---|
| | 1915 | |
|---|
| | 1916 | def __onWxMouseLeftUp(self, evt): |
|---|
| | 1917 | self.raiseEvent(dEvents.GridMouseLeftUp, evt) |
|---|
| | 1918 | evt.Skip() |
|---|
| | 1919 | |
|---|
| | 1920 | def __onWxMouseMotion(self, evt): |
|---|
| | 1921 | self.raiseEvent(dEvents.GridMouseMove, evt) |
|---|
| | 1922 | evt.Skip() |
|---|
| | 1923 | |
|---|
| | 1924 | def __onWxMouseRightClick(self, evt): |
|---|
| | 1925 | self.raiseEvent(dEvents.GridRightClick, evt) |
|---|
| | 1926 | evt.Skip() |
|---|
| | 1927 | |
|---|
| | 1928 | def __onWxMouseRightDown(self, evt): |
|---|
| | 1929 | self.raiseEvent(dEvents.GridMouseRightDown, evt) |
|---|
| | 1930 | evt.Skip() |
|---|
| | 1931 | |
|---|
| | 1932 | def __onWxMouseRightUp(self, evt): |
|---|
| | 1933 | self.raiseEvent(dEvents.GridMouseRightUp, evt) |
|---|
| | 1934 | evt.Skip() |
|---|
| | 1935 | |
|---|
| | 1936 | ##----------------------------------------------------------## |
|---|
| | 1937 | ## end: wx callbacks to re-route to dEvents ## |
|---|
| | 1938 | ##----------------------------------------------------------## |
|---|
| | 1939 | |
|---|
| | 1940 | |
|---|