Initializes regions for tab, which makes it easier to determine if given coordinates are included in a region
(self)
| 544 | self.tab_back_bitmap = bk_bmp |
| 545 | |
| 546 | def InitTabRegions(self): |
| 547 | """ |
| 548 | Initializes regions for tab, which makes it easier to determine if |
| 549 | given coordinates are included in a region |
| 550 | """ |
| 551 | self.tab_region = wx.Region(self.tab_back_bitmap) |
| 552 | self.close_region = wx.Region(self.ctab_close_bmp) |
| 553 | |
| 554 | x_offset = self.content_width \ |
| 555 | + self.left_width \ |
| 556 | - self.ctab_close_bmp.GetWidth() / 2 |
| 557 | y_offset = (self.tab_height - self.ctab_close_bmp.GetHeight()) / 2 |
| 558 | self.close_region.Offset(round(x_offset), round(y_offset)) |
| 559 | |
| 560 | def InitColors(self): |
| 561 | """Determines colors used for tab, based on system settings""" |