File: wx.Cursor.1.py

package info (click to toggle)
wxpython4.0 4.2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 218,584 kB
  • sloc: cpp: 962,669; python: 231,226; ansic: 170,755; makefile: 51,757; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (40 lines) | stat: -rw-r--r-- 2,149 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

        down_bits = [255, 255, 255, 255, 31,
                     255, 255, 255, 31, 255, 255, 255, 31, 255, 255, 255,
                     31, 255, 255, 255, 31, 255, 255, 255, 31, 255, 255,
                     255, 31, 255, 255, 255, 31, 255, 255, 255, 25, 243,
                     255, 255, 19, 249, 255, 255, 7, 252, 255, 255, 15, 254,
                     255, 255, 31, 255, 255, 255, 191, 255, 255, 255, 255,
                     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
                     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
                     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
                     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
                     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
                     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
                     255]

        down_mask = [240, 1, 0, 0, 240, 1,
                     0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1,
                     0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 255, 31, 0, 0, 255,
                     31, 0, 0, 254, 15, 0, 0, 252, 7, 0, 0, 248, 3, 0, 0,
                     240, 1, 0, 0, 224, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0,
                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                     0, 0, 0, 0, 0]

        if wx.Platform == '__WXMSW__':

            down_bitmap = wx.BitmapFromBits(down_bits, 32, 32)
            down_mask_bitmap = wx.BitmapFromBits(down_mask, 32, 32)

            down_bitmap.SetMask(wx.Mask(down_mask_bitmap))
            down_image = down_bitmap.ConvertToImage()
            down_image.SetOption(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 6)
            down_image.SetOption(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 14)
            down_cursor = wx.Cursor(down_image)

        elif wx.Platform == '__WXGTK__':

            down_cursor = wx.Cursor(down_bits, 32, 32, 6, 14,
                                    down_mask, wx.WHITE, wx.BLACK)