Checks to see if x, y are in add button region, and sets the highlight flag
(self, x, y)
| 1157 | pass |
| 1158 | |
| 1159 | def CheckAddHighlighted(self, x, y): |
| 1160 | """ |
| 1161 | Checks to see if x, y are in add button region, and sets the highlight |
| 1162 | flag |
| 1163 | """ |
| 1164 | if not self.show_add_button: |
| 1165 | return |
| 1166 | |
| 1167 | region = self.add_button.GetRegion() |
| 1168 | ax, ay = self.add_button.GetPosition() |
| 1169 | region.Offset(round(ax), round(ay)) |
| 1170 | |
| 1171 | if region.Contains(x, y): |
| 1172 | if not self.add_button.IsHighlighted(): |
| 1173 | self.add_button.Highlight(True) |
| 1174 | self.Refresh() |
| 1175 | else: |
| 1176 | if self.add_button.IsHighlighted(): |
| 1177 | self.add_button.Highlight(False) |
| 1178 | self.Refresh() |
| 1179 | |
| 1180 | def OnPaint(self, event): |
| 1181 | mdc = wx.AutoBufferedPaintDC(self) |
no test coverage detected