mwxlib 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mwxlib might be problematic. Click here for more details.
- mwx/controls.py +12 -6
- mwx/framework.py +1 -1
- mwx/nutshell.py +9 -7
- {mwxlib-1.0.3.dist-info → mwxlib-1.0.4.dist-info}/METADATA +1 -1
- {mwxlib-1.0.3.dist-info → mwxlib-1.0.4.dist-info}/RECORD +8 -8
- {mwxlib-1.0.3.dist-info → mwxlib-1.0.4.dist-info}/WHEEL +1 -1
- {mwxlib-1.0.3.dist-info → mwxlib-1.0.4.dist-info}/LICENSE +0 -0
- {mwxlib-1.0.3.dist-info → mwxlib-1.0.4.dist-info}/top_level.txt +0 -0
mwx/controls.py
CHANGED
|
@@ -465,7 +465,13 @@ class Knob(wx.Panel):
|
|
|
465
465
|
self.text.BackgroundColour = c
|
|
466
466
|
self.text.Refresh()
|
|
467
467
|
|
|
468
|
-
def
|
|
468
|
+
def shift_ctrl(self, evt, bit):
|
|
469
|
+
"""Called when a key/mouse wheel is pressed/scrolled.
|
|
470
|
+
|
|
471
|
+
In addition to direct key input to the textctrl,
|
|
472
|
+
[up][down][wheelup][wheeldown] keys can be used,
|
|
473
|
+
with modifiers S- 2x, C- 16x, and M- 256x steps.
|
|
474
|
+
"""
|
|
469
475
|
if bit:
|
|
470
476
|
if evt.ShiftDown(): bit *= 2
|
|
471
477
|
if evt.ControlDown(): bit *= 16
|
|
@@ -485,13 +491,13 @@ class Knob(wx.Panel):
|
|
|
485
491
|
evt.Skip()
|
|
486
492
|
|
|
487
493
|
def OnMouseWheel(self, evt): #<wx._core.MouseEvent>
|
|
488
|
-
self.
|
|
494
|
+
self.shift_ctrl(evt, 1 if evt.WheelRotation>0 else -1)
|
|
489
495
|
evt.Skip(False)
|
|
490
496
|
|
|
491
497
|
def OnCtrlKeyDown(self, evt): #<wx._core.KeyEvent>
|
|
492
498
|
key = evt.GetKeyCode()
|
|
493
|
-
if key == wx.WXK_LEFT: return self.
|
|
494
|
-
if key == wx.WXK_RIGHT: return self.
|
|
499
|
+
if key == wx.WXK_LEFT: return self.shift_ctrl(evt, -1)
|
|
500
|
+
if key == wx.WXK_RIGHT: return self.shift_ctrl(evt, 1)
|
|
495
501
|
|
|
496
502
|
def _focus(c):
|
|
497
503
|
if isinstance(c, Knob) and c.ctrl.IsEnabled():
|
|
@@ -508,8 +514,8 @@ class Knob(wx.Panel):
|
|
|
508
514
|
|
|
509
515
|
def OnTextKeyDown(self, evt): #<wx._core.KeyEvent>
|
|
510
516
|
key = evt.GetKeyCode()
|
|
511
|
-
if key == wx.WXK_DOWN: return self.
|
|
512
|
-
if key == wx.WXK_UP: return self.
|
|
517
|
+
if key == wx.WXK_DOWN: return self.shift_ctrl(evt, -1)
|
|
518
|
+
if key == wx.WXK_UP: return self.shift_ctrl(evt, 1)
|
|
513
519
|
if key == wx.WXK_ESCAPE:
|
|
514
520
|
self.__par.reset(self.__par.value, internal_callback=None) # restore value
|
|
515
521
|
evt.Skip()
|
mwx/framework.py
CHANGED
mwx/nutshell.py
CHANGED
|
@@ -503,9 +503,7 @@ class EditorInterface(AutoCompInterfaceMixin, CtrlInterface):
|
|
|
503
503
|
## 'C-/ pressed' : (0, ), # cf. C-a home
|
|
504
504
|
## 'C-\ pressed' : (0, ), # cf. C-e end
|
|
505
505
|
'C-; pressed' : (0, _F(self.comment_out_line)),
|
|
506
|
-
'C-S-; pressed' : (0, _F(self.comment_out_line)),
|
|
507
506
|
'C-: pressed' : (0, _F(self.uncomment_line)),
|
|
508
|
-
'C-S-: pressed' : (0, _F(self.uncomment_line)),
|
|
509
507
|
'select_line' : (11, self.on_linesel_begin),
|
|
510
508
|
'select_lines' : (11, self.on_linesel_next),
|
|
511
509
|
},
|
|
@@ -637,10 +635,10 @@ class EditorInterface(AutoCompInterfaceMixin, CtrlInterface):
|
|
|
637
635
|
self.IndicatorSetForeground(10, "red")
|
|
638
636
|
|
|
639
637
|
self.IndicatorSetStyle(11, stc.STC_INDIC_STRAIGHTBOX)
|
|
638
|
+
self.IndicatorSetForeground(11, "yellow")
|
|
640
639
|
self.IndicatorSetUnder(11, True)
|
|
641
|
-
self.IndicatorSetAlpha(11,
|
|
642
|
-
self.IndicatorSetOutlineAlpha(11,
|
|
643
|
-
self.IndicatorSetForeground(11, "light gray")
|
|
640
|
+
self.IndicatorSetAlpha(11, 0xe8)
|
|
641
|
+
self.IndicatorSetOutlineAlpha(11, 0)
|
|
644
642
|
|
|
645
643
|
self.IndicatorSetStyle(2, stc.STC_INDIC_DOTS)
|
|
646
644
|
self.IndicatorSetForeground(2, "light gray")
|
|
@@ -2437,10 +2435,14 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2437
2435
|
self.swap_buffer(buf, lineno)
|
|
2438
2436
|
return True
|
|
2439
2437
|
return False
|
|
2438
|
+
except FileNotFoundError:
|
|
2439
|
+
self.post_message(f"New file: {filename!r}.")
|
|
2440
|
+
self.delete_buffer(buf)
|
|
2441
|
+
return False
|
|
2440
2442
|
except Exception as e:
|
|
2441
2443
|
self.post_message(f"Failed to load {filename!r}.", e)
|
|
2442
2444
|
self.delete_buffer(buf)
|
|
2443
|
-
|
|
2445
|
+
raise
|
|
2444
2446
|
|
|
2445
2447
|
def find_file(self, filename=None):
|
|
2446
2448
|
"""Open the specified file."""
|
|
@@ -2453,7 +2455,7 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2453
2455
|
for fn in dlg.Paths:
|
|
2454
2456
|
self.find_file(fn)
|
|
2455
2457
|
return
|
|
2456
|
-
if
|
|
2458
|
+
if self.load_file(filename) == False:
|
|
2457
2459
|
buf = self.create_buffer(filename)
|
|
2458
2460
|
buf._Buffer__mtime = 0 # => need_buffer_save
|
|
2459
2461
|
self.swap_buffer(buf)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=psabnAMei5VzB2TsB2qBNLrIZMX0LiqjlXCpNGmDejk,668
|
|
2
2
|
mwx/bookshelf.py,sha256=so-xSLq08sMlJBErTxOaDoKUAMa_g1CkIP2pNnff68c,5607
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
3
|
+
mwx/controls.py,sha256=iXNTk4ge6sHStenjxC7bFKgQHvqxMwfb82IbgiDmtEk,47944
|
|
4
|
+
mwx/framework.py,sha256=PZwNHchv_Z1sDUaPTR1d90Bt0UV6mNx_X53Nnekd0tA,75809
|
|
5
5
|
mwx/graphman.py,sha256=mDnhy3jAzZCo8_p6ZcA-NDPMuOyW_R2r_fuxUIAM7D8,69669
|
|
6
6
|
mwx/images.py,sha256=oxCn0P-emiWujSS2gUgU5TUnr5cPjix2jBcjOBDr24I,48701
|
|
7
7
|
mwx/matplot2.py,sha256=zA56jIdRUdzu-wrmPai1PSOjzqV2Erqw2yFKW-jwdA8,32901
|
|
8
8
|
mwx/matplot2g.py,sha256=diwWNxzyy-c8KBDaolHaMqWdFXSYhEumgwXIZ9wAEYk,64467
|
|
9
9
|
mwx/matplot2lg.py,sha256=JRWjWnLJUytbSq6wxs4P0gbVUr3xoLSF6Wwqd5V_pJI,27404
|
|
10
10
|
mwx/mgplt.py,sha256=M5rt-H7Uq1OHnlFvMA4a3945UBvppbR9L_mw8NL_YZ0,5602
|
|
11
|
-
mwx/nutshell.py,sha256=
|
|
11
|
+
mwx/nutshell.py,sha256=blsRL7RDJ3C4Dkiq6Jg09INF1ROfEdWi274IohR2Lpk,142048
|
|
12
12
|
mwx/utilus.py,sha256=Yyw8L1f-ikhyd7wtFXYtsOswofWxmB4GAmLOZnhUXeU,37388
|
|
13
13
|
mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
|
|
14
14
|
mwx/wxpdb.py,sha256=--TQr-_zs9dWPYV2V4s3Zr4abvN14o5wD8anT9frHUg,18875
|
|
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=gowjQ-ARNonMkDSXkQgPKq4U9YBJ-vQ0jK2krBVOdCs
|
|
|
21
21
|
mwx/plugins/line_profile.py,sha256=zzm6_7lnAnNepLbh07ordp3nRWDFQJtu719ZVjrVf8s,819
|
|
22
22
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
23
23
|
mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
|
|
24
|
-
mwxlib-1.0.
|
|
25
|
-
mwxlib-1.0.
|
|
26
|
-
mwxlib-1.0.
|
|
27
|
-
mwxlib-1.0.
|
|
28
|
-
mwxlib-1.0.
|
|
24
|
+
mwxlib-1.0.4.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-1.0.4.dist-info/METADATA,sha256=xUi5IB8tDvqX39GOIY2xmz-W765moTc-xpV_9G9eGLs,7259
|
|
26
|
+
mwxlib-1.0.4.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
27
|
+
mwxlib-1.0.4.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-1.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|