mwxlib 1.1.5__py3-none-any.whl → 1.1.6__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/framework.py +2 -2
- mwx/nutshell.py +16 -21
- mwx/wxpdb.py +1 -1
- {mwxlib-1.1.5.dist-info → mwxlib-1.1.6.dist-info}/METADATA +2 -2
- {mwxlib-1.1.5.dist-info → mwxlib-1.1.6.dist-info}/RECORD +8 -8
- {mwxlib-1.1.5.dist-info → mwxlib-1.1.6.dist-info}/WHEEL +1 -1
- {mwxlib-1.1.5.dist-info → mwxlib-1.1.6.dist-info}/LICENSE +0 -0
- {mwxlib-1.1.5.dist-info → mwxlib-1.1.6.dist-info}/top_level.txt +0 -0
mwx/framework.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""mwxlib framework.
|
|
3
3
|
"""
|
|
4
|
-
__version__ = "1.1.
|
|
4
|
+
__version__ = "1.1.6"
|
|
5
5
|
__author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
6
|
|
|
7
7
|
from contextlib import contextmanager
|
|
@@ -1979,7 +1979,7 @@ class ShellFrame(MiniFrame):
|
|
|
1979
1979
|
if self.findDlg:
|
|
1980
1980
|
self.OnFindClose(None)
|
|
1981
1981
|
wnd.EnsureVisible(wnd.cline)
|
|
1982
|
-
wnd.
|
|
1982
|
+
wnd.ensureLineMoreOnScreen(wnd.cline)
|
|
1983
1983
|
|
|
1984
1984
|
def OnFindPrev(self, evt):
|
|
1985
1985
|
self.OnFindNext(evt, backward=True)
|
mwx/nutshell.py
CHANGED
|
@@ -667,35 +667,30 @@ class EditorInterface(AutoCompInterfaceMixin, CtrlInterface):
|
|
|
667
667
|
self.__mark = -1
|
|
668
668
|
self.__stylus = {}
|
|
669
669
|
|
|
670
|
-
__dnd_from = None
|
|
671
670
|
__dnd_flag = 0
|
|
672
671
|
|
|
673
672
|
def OnDrag(self, evt): #<wx._core.StyledTextEvent>
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
except AttributeError:
|
|
673
|
+
if isinstance(self, Shell):
|
|
674
|
+
EditorInterface.__dnd_flag = (evt.Position < self.bolc) # readonly
|
|
675
|
+
else:
|
|
678
676
|
EditorInterface.__dnd_flag = 0
|
|
679
677
|
evt.Skip()
|
|
680
678
|
|
|
681
679
|
def OnDragging(self, evt): #<wx._core.StyledTextEvent>
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
wx.UIActionSimulator().KeyDown(wx.WXK_CONTROL) # force copy
|
|
686
|
-
try:
|
|
687
|
-
if evt.Position < self.bolc:
|
|
688
|
-
evt.DragResult = wx.DragNone # Don't drop (as readonly)
|
|
680
|
+
if isinstance(self, Shell):
|
|
681
|
+
if evt.Position < self.bolc: # target is readonly
|
|
682
|
+
evt.DragResult = wx.DragNone
|
|
689
683
|
elif EditorInterface.__dnd_flag:
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
684
|
+
## from shell to shell
|
|
685
|
+
evt.DragResult = wx.DragCopy if wx.GetKeyState(wx.WXK_CONTROL) else wx.DragNone
|
|
686
|
+
else:
|
|
687
|
+
if EditorInterface.__dnd_flag:
|
|
688
|
+
## from shell to buffer
|
|
689
|
+
evt.DragResult = wx.DragCopy if wx.GetKeyState(wx.WXK_CONTROL) else wx.DragNone
|
|
693
690
|
evt.Skip()
|
|
694
691
|
|
|
695
692
|
def OnDragged(self, evt): #<wx._core.StyledTextEvent>
|
|
696
|
-
EditorInterface.__dnd_from = None
|
|
697
693
|
EditorInterface.__dnd_flag = 0
|
|
698
|
-
wx.UIActionSimulator().KeyUp(wx.WXK_CONTROL)
|
|
699
694
|
evt.Skip()
|
|
700
695
|
|
|
701
696
|
## --------------------------------
|
|
@@ -1108,7 +1103,7 @@ class EditorInterface(AutoCompInterfaceMixin, CtrlInterface):
|
|
|
1108
1103
|
break
|
|
1109
1104
|
lc = la
|
|
1110
1105
|
self.ToggleFold(lc)
|
|
1111
|
-
self.
|
|
1106
|
+
self.ensureLineOnScreen(lc)
|
|
1112
1107
|
return lc
|
|
1113
1108
|
|
|
1114
1109
|
def get_region(self, line):
|
|
@@ -1265,7 +1260,7 @@ class EditorInterface(AutoCompInterfaceMixin, CtrlInterface):
|
|
|
1265
1260
|
w, h = self.PointFromPosition(pos)
|
|
1266
1261
|
return self.FirstVisibleLine + h//self.TextHeight(0)
|
|
1267
1262
|
|
|
1268
|
-
def
|
|
1263
|
+
def ensureLineOnScreen(self, line):
|
|
1269
1264
|
"""Ensure a particular line is visible by scrolling the buffer
|
|
1270
1265
|
without expanding any header line hiding it.
|
|
1271
1266
|
"""
|
|
@@ -1277,7 +1272,7 @@ class EditorInterface(AutoCompInterfaceMixin, CtrlInterface):
|
|
|
1277
1272
|
elif vl > hl + n - 1:
|
|
1278
1273
|
self.ScrollToLine(vl - n + 1)
|
|
1279
1274
|
|
|
1280
|
-
def
|
|
1275
|
+
def ensureLineMoreOnScreen(self, line, offset=0):
|
|
1281
1276
|
"""Ensure a particular line is visible by scrolling the buffer
|
|
1282
1277
|
without expanding any header line hiding it.
|
|
1283
1278
|
If the line is at the screen edge, recenter it.
|
|
@@ -2446,7 +2441,7 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2446
2441
|
for fn in dlg.Paths:
|
|
2447
2442
|
self.find_file(fn)
|
|
2448
2443
|
return
|
|
2449
|
-
if self.load_file(filename) == False:
|
|
2444
|
+
if self.load_file(filename) == False: # not None
|
|
2450
2445
|
buf = self.create_buffer(filename)
|
|
2451
2446
|
buf._Buffer__mtime = 0 # => need_buffer_save
|
|
2452
2447
|
self.swap_buffer(buf)
|
mwx/wxpdb.py
CHANGED
|
@@ -330,7 +330,7 @@ class Debugger(Pdb):
|
|
|
330
330
|
buffer.recenter(3)
|
|
331
331
|
buffer.goto_line(lineno - 1)
|
|
332
332
|
buffer.pointer = lineno - 1 # (->) pointer:marker
|
|
333
|
-
buffer.
|
|
333
|
+
buffer.ensureLineMoreOnScreen(lineno - 1)
|
|
334
334
|
self.code = code
|
|
335
335
|
wx.CallAfter(_mark)
|
|
336
336
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mwxlib
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.6
|
|
4
4
|
Summary: A wrapper of matplotlib and wxPython (phoenix)
|
|
5
5
|
Home-page: https://github.com/komoto48g/mwxlib
|
|
6
6
|
Author: Kazuya O'moto
|
|
@@ -17,7 +17,7 @@ Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: wxpython
|
|
20
|
+
Requires-Dist: wxpython>=4.2.0
|
|
21
21
|
Requires-Dist: matplotlib
|
|
22
22
|
Requires-Dist: opencv-python
|
|
23
23
|
Requires-Dist: scipy
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=psabnAMei5VzB2TsB2qBNLrIZMX0LiqjlXCpNGmDejk,668
|
|
2
2
|
mwx/bookshelf.py,sha256=b_TMDaNIzLHoL0xbbqb3tt0BnRvhLAqaCn_pBdrigZw,7523
|
|
3
3
|
mwx/controls.py,sha256=cNZkgwSv90lPIz61FvMtYxHIt8hJD_RQYXxsgTQIdLc,47949
|
|
4
|
-
mwx/framework.py,sha256=
|
|
4
|
+
mwx/framework.py,sha256=kqreWhh0wfhBz70vx9b5b8XHJR6BD-TxFbopzl__Ryc,76125
|
|
5
5
|
mwx/graphman.py,sha256=LjN1R8UZxHycrgAfnl_SoTT_vHuKcSISr5VVf0cMflM,69821
|
|
6
6
|
mwx/images.py,sha256=oxCn0P-emiWujSS2gUgU5TUnr5cPjix2jBcjOBDr24I,48701
|
|
7
7
|
mwx/matplot2.py,sha256=RuVWXC2A_qgZRNmBBptbHDn5MyxaWBqp3ru4bP_lDE0,33150
|
|
8
8
|
mwx/matplot2g.py,sha256=4G5uZJZzATEC3QEVZ4pGHetEDfu5NJNUFyeAaQScK5s,64495
|
|
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=wzcZSxTM9G2bYtIBri51-AA6JhiKrtfsh-DMgwJZ5io,141340
|
|
12
12
|
mwx/testsuite.py,sha256=kiM3-BVhr42LRRN7xG7pYl3at8o2vnypWSxD8KRvA7c,1228
|
|
13
13
|
mwx/utilus.py,sha256=HFvP682SyeSp8yNfUrdUXPhWdLuWVlsUSg6LqNBJOT8,37451
|
|
14
14
|
mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
|
|
15
|
-
mwx/wxpdb.py,sha256
|
|
15
|
+
mwx/wxpdb.py,sha256=AObuf4JLAmlQLj-yf0_mkBBd-Bhhz2Vb8hbTVcHEZOs,18875
|
|
16
16
|
mwx/wxwil.py,sha256=hhyB1lPrF9ixeObxCOKQv0Theu-B-kpJg_yVU3EGSNg,5406
|
|
17
17
|
mwx/wxwit.py,sha256=1hHtMi2YEy2T_LnUpwdmrIdtCuvxMOFyykqnbq6jLP0,7294
|
|
18
18
|
mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
|
|
@@ -22,8 +22,8 @@ mwx/plugins/frame_listview.py,sha256=gowjQ-ARNonMkDSXkQgPKq4U9YBJ-vQ0jK2krBVOdCs
|
|
|
22
22
|
mwx/plugins/line_profile.py,sha256=zzm6_7lnAnNepLbh07ordp3nRWDFQJtu719ZVjrVf8s,819
|
|
23
23
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
24
24
|
mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
|
|
25
|
-
mwxlib-1.1.
|
|
26
|
-
mwxlib-1.1.
|
|
27
|
-
mwxlib-1.1.
|
|
28
|
-
mwxlib-1.1.
|
|
29
|
-
mwxlib-1.1.
|
|
25
|
+
mwxlib-1.1.6.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
26
|
+
mwxlib-1.1.6.dist-info/METADATA,sha256=XXM7dJHiEuRk1rwo-UIfx9wfYFH6A5Vg_POkY0SPSpI,7258
|
|
27
|
+
mwxlib-1.1.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
28
|
+
mwxlib-1.1.6.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
29
|
+
mwxlib-1.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|