mwxlib 0.97.0__py3-none-any.whl → 0.97.1__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/bookshelf.py +10 -14
- mwx/controls.py +1 -1
- mwx/framework.py +10 -11
- mwx/graphman.py +2 -2
- mwx/matplot2g.py +7 -7
- {mwxlib-0.97.0.dist-info → mwxlib-0.97.1.dist-info}/METADATA +1 -1
- {mwxlib-0.97.0.dist-info → mwxlib-0.97.1.dist-info}/RECORD +10 -10
- {mwxlib-0.97.0.dist-info → mwxlib-0.97.1.dist-info}/WHEEL +1 -1
- {mwxlib-0.97.0.dist-info → mwxlib-0.97.1.dist-info}/LICENSE +0 -0
- {mwxlib-0.97.0.dist-info → mwxlib-0.97.1.dist-info}/top_level.txt +0 -0
mwx/bookshelf.py
CHANGED
|
@@ -36,22 +36,19 @@ class EditorTreeCtrl(wx.TreeCtrl, CtrlInterface):
|
|
|
36
36
|
self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged)
|
|
37
37
|
self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy)
|
|
38
38
|
|
|
39
|
-
def enter(
|
|
39
|
+
def enter():
|
|
40
40
|
data = self.GetItemData(self.Selection)
|
|
41
41
|
if data:
|
|
42
42
|
data.SetFocus()
|
|
43
43
|
|
|
44
|
-
def refresh(
|
|
44
|
+
def refresh(clear=False):
|
|
45
45
|
self.build_tree(clear)
|
|
46
|
-
|
|
47
|
-
self.target.current_editor.SetFocus()
|
|
48
|
-
wx.CallAfter(self.SetFocus)
|
|
46
|
+
wx.CallAfter(self.SetFocus)
|
|
49
47
|
|
|
50
|
-
def delete(
|
|
48
|
+
def delete():
|
|
51
49
|
data = self.GetItemData(self.Selection)
|
|
52
50
|
if data:
|
|
53
|
-
|
|
54
|
-
data.parent.kill_buffer(data) # -> focus moves
|
|
51
|
+
data.parent.kill_buffer(data) # -> focus moves
|
|
55
52
|
wx.CallAfter(self.SetFocus)
|
|
56
53
|
|
|
57
54
|
def dispatch(evt):
|
|
@@ -65,9 +62,9 @@ class EditorTreeCtrl(wx.TreeCtrl, CtrlInterface):
|
|
|
65
62
|
'*button* released' : [ None, dispatch ],
|
|
66
63
|
},
|
|
67
64
|
0 : {
|
|
68
|
-
'enter pressed' : (0, enter),
|
|
69
|
-
'delete pressed' : (0, delete),
|
|
70
|
-
'f5 pressed' : (0, refresh),
|
|
65
|
+
'enter pressed' : (0, _F(enter)),
|
|
66
|
+
'delete pressed' : (0, _F(delete)),
|
|
67
|
+
'f5 pressed' : (0, _F(refresh, clear=0)),
|
|
71
68
|
'S-f5 pressed' : (0, _F(refresh, clear=1)),
|
|
72
69
|
},
|
|
73
70
|
})
|
|
@@ -135,19 +132,18 @@ class EditorTreeCtrl(wx.TreeCtrl, CtrlInterface):
|
|
|
135
132
|
## Actions for bookshelf interfaces
|
|
136
133
|
## --------------------------------
|
|
137
134
|
|
|
138
|
-
## @postcall
|
|
139
135
|
def on_buffer_new(self, buf):
|
|
140
136
|
self.build_tree(clear=0)
|
|
141
137
|
|
|
142
|
-
## @postcall
|
|
143
138
|
def on_buffer_deleted(self, buf):
|
|
144
139
|
self.Delete(buf.__itemId)
|
|
145
140
|
|
|
141
|
+
## Note: [buffer_activated][EVT_SET_FOCUS] > [buffer_new] の順で呼ばれる
|
|
142
|
+
## buf.__itemId がない場合がある (delete_buffer 直後など)
|
|
146
143
|
@postcall
|
|
147
144
|
def on_buffer_selected(self, buf):
|
|
148
145
|
self.SelectItem(buf.__itemId)
|
|
149
146
|
|
|
150
|
-
@postcall
|
|
151
147
|
def on_buffer_filename(self, buf):
|
|
152
148
|
self.SetItemText(buf.__itemId, buf.caption_prefix + buf.name)
|
|
153
149
|
|
mwx/controls.py
CHANGED
|
@@ -1225,7 +1225,7 @@ class Indicator(wx.Control):
|
|
|
1225
1225
|
self.__value = int(v)
|
|
1226
1226
|
self.Refresh()
|
|
1227
1227
|
|
|
1228
|
-
def
|
|
1228
|
+
def redesign(self, **kwargs):
|
|
1229
1229
|
"""Update multiple design properties at once.
|
|
1230
1230
|
|
|
1231
1231
|
This method is useful for changing colors, spacing, radius, etc.
|
mwx/framework.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""mwxlib framework.
|
|
3
3
|
"""
|
|
4
|
-
__version__ = "0.97.
|
|
4
|
+
__version__ = "0.97.1"
|
|
5
5
|
__author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
6
|
|
|
7
7
|
from functools import wraps, partial
|
|
@@ -54,16 +54,15 @@ def deb(target=None, loop=True, locals=None, **kwargs):
|
|
|
54
54
|
kwargs.setdefault("ensureClose", True)
|
|
55
55
|
|
|
56
56
|
app = wx.GetApp() or wx.App()
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
frame = ShellFrame(None, target, **kwargs)
|
|
58
|
+
frame.Show()
|
|
59
|
+
frame.rootshell.SetFocus()
|
|
60
|
+
if locals:
|
|
61
|
+
frame.rootshell.locals.update(locals)
|
|
62
|
+
if not loop:
|
|
63
63
|
return frame
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
app.MainLoop()
|
|
64
|
+
if not app.GetMainLoop():
|
|
65
|
+
return app.MainLoop()
|
|
67
66
|
|
|
68
67
|
|
|
69
68
|
def postcall(f):
|
|
@@ -159,7 +158,7 @@ _speckeys = {
|
|
|
159
158
|
|
|
160
159
|
_speckeys_wxkmap = dict((v, k) for k, v in _speckeys.items())
|
|
161
160
|
|
|
162
|
-
def
|
|
161
|
+
def getKeyState(key):
|
|
163
162
|
"""Returns state of speckey (cf. wx.GetKeyState)."""
|
|
164
163
|
try:
|
|
165
164
|
return wx.GetKeyState(_speckeys_wxkmap[key])
|
mwx/graphman.py
CHANGED
|
@@ -895,8 +895,8 @@ class Frame(mwx.Frame):
|
|
|
895
895
|
evt.Skip()
|
|
896
896
|
|
|
897
897
|
def Destroy(self):
|
|
898
|
-
for name in list(self.plugins):
|
|
899
|
-
|
|
898
|
+
## for name in list(self.plugins):
|
|
899
|
+
## self.unload_plug(name) # => plug.Destroy
|
|
900
900
|
self._mgr.UnInit()
|
|
901
901
|
return mwx.Frame.Destroy(self)
|
|
902
902
|
|
mwx/matplot2g.py
CHANGED
|
@@ -272,7 +272,7 @@ class AxesImagePhantom(object):
|
|
|
272
272
|
return self.parent.index(self)
|
|
273
273
|
|
|
274
274
|
def update_buffer(self, buf=None):
|
|
275
|
-
"""Update buffer and the image."""
|
|
275
|
+
"""Update buffer and the image (internal use only)."""
|
|
276
276
|
if buf is not None:
|
|
277
277
|
self.__buf = _to_buffer(buf)
|
|
278
278
|
|
|
@@ -286,7 +286,7 @@ class AxesImagePhantom(object):
|
|
|
286
286
|
self.parent.handler('frame_modified', self)
|
|
287
287
|
|
|
288
288
|
def update_extent(self):
|
|
289
|
-
"""Update logical extent of the image."""
|
|
289
|
+
"""Update logical extent of the image (internal use only)."""
|
|
290
290
|
h, w = self.__buf.shape[:2]
|
|
291
291
|
ux, uy = self.xy_unit
|
|
292
292
|
w *= ux/2
|
|
@@ -396,7 +396,7 @@ class GraphPlot(MatplotPanel):
|
|
|
396
396
|
'pageup pressed' : [ None, self.OnPageUp ],
|
|
397
397
|
'pagedown pressed' : [ None, self.OnPageDown ],
|
|
398
398
|
'M-a pressed' : [ None, _F(self.fit_to_canvas) ],
|
|
399
|
-
'C-a pressed' : [ None, _F(self.
|
|
399
|
+
'C-a pressed' : [ None, _F(self.fit_to_axes) ],
|
|
400
400
|
'C-i pressed' : [ None, _F(self.invert_cmap) ],
|
|
401
401
|
'C-k pressed' : [ None, _F(self.kill_buffer) ],
|
|
402
402
|
'C-S-k pressed' : [ None, _F(self.kill_buffer_all) ],
|
|
@@ -823,8 +823,8 @@ class GraphPlot(MatplotPanel):
|
|
|
823
823
|
def kill_buffer_all(self):
|
|
824
824
|
del self[:]
|
|
825
825
|
|
|
826
|
-
def
|
|
827
|
-
"""Reset
|
|
826
|
+
def fit_to_axes(self):
|
|
827
|
+
"""Reset the view limits to the current frame extent."""
|
|
828
828
|
if self.frame:
|
|
829
829
|
self.axes.axis(self.frame.get_extent()) # reset xlim and ylim
|
|
830
830
|
self.toolbar.update()
|
|
@@ -832,7 +832,7 @@ class GraphPlot(MatplotPanel):
|
|
|
832
832
|
self.draw()
|
|
833
833
|
|
|
834
834
|
def fit_to_canvas(self):
|
|
835
|
-
"""
|
|
835
|
+
"""Reset the view limits to the canvas range."""
|
|
836
836
|
x, y = self.xlim, self.ylim
|
|
837
837
|
w, h = self.canvas.GetSize()
|
|
838
838
|
r = h/w
|
|
@@ -1114,7 +1114,7 @@ class GraphPlot(MatplotPanel):
|
|
|
1114
1114
|
self.select(i - 1)
|
|
1115
1115
|
|
|
1116
1116
|
def OnHomePosition(self, evt):
|
|
1117
|
-
self.
|
|
1117
|
+
self.fit_to_axes()
|
|
1118
1118
|
|
|
1119
1119
|
def OnEscapeSelection(self, evt):
|
|
1120
1120
|
xs, ys = self.Selector
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=nN62CGTWjME7Zz2h-jIRB8MxwuErIkHPGrlBzydkF0o,643
|
|
2
|
-
mwx/bookshelf.py,sha256=
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
5
|
-
mwx/graphman.py,sha256=
|
|
2
|
+
mwx/bookshelf.py,sha256=SiDYw0bMW-dHrPl2eP4ZEoQAn17f9XeEk8_0XbYw9DQ,5319
|
|
3
|
+
mwx/controls.py,sha256=ebF16EOoDWndVdBh_x2TKLZ4WevkH91QkKWyEivfCjY,48373
|
|
4
|
+
mwx/framework.py,sha256=ffCTDK7wMnAct-kaNXK3FoL8Bm0vECPDxXO1ordG2Og,75300
|
|
5
|
+
mwx/graphman.py,sha256=NLklcxzTKklaL_FXpl5qW2apwAb3YuHH_NSr--PlqMQ,70612
|
|
6
6
|
mwx/images.py,sha256=_-Eh3xF7Khu42ivkYp97NXIzSNGbjcidqtWjZQFGtqE,47827
|
|
7
7
|
mwx/matplot2.py,sha256=xCJ_ZzdDEWmzctpPaOrzTnwXyHINP4nfFHweoTZa6ug,32899
|
|
8
|
-
mwx/matplot2g.py,sha256=
|
|
8
|
+
mwx/matplot2g.py,sha256=95J4tyA6VgKrTN7zPPGoo_f24kYAqKB5BOBordExNUg,64443
|
|
9
9
|
mwx/matplot2lg.py,sha256=JRWjWnLJUytbSq6wxs4P0gbVUr3xoLSF6Wwqd5V_pJI,27404
|
|
10
10
|
mwx/mgplt.py,sha256=ITzxA97yDwr_35BUk5OqnyskSuKVDbpf2AQCKY1jHTI,5671
|
|
11
11
|
mwx/nutshell.py,sha256=zrye6tLuGgyCC-Od323o71bauGDKFnO8Zsabs0JMqjs,137383
|
|
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=hbApzZWa9-BmQthu7uZBlBbGbtf4iJ_prO8IhxoGMs8
|
|
|
21
21
|
mwx/plugins/line_profile.py,sha256=--9NIc3x5EfRB3L59JvD7rzENQHyiYfu7wWJo6AuMkA,820
|
|
22
22
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
23
23
|
mwx/py/filling.py,sha256=KaHooM32hrGGgqw75Cbt8lAvACwC6RXadob9LGgNnEc,16806
|
|
24
|
-
mwxlib-0.97.
|
|
25
|
-
mwxlib-0.97.
|
|
26
|
-
mwxlib-0.97.
|
|
27
|
-
mwxlib-0.97.
|
|
28
|
-
mwxlib-0.97.
|
|
24
|
+
mwxlib-0.97.1.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-0.97.1.dist-info/METADATA,sha256=2iRI3XivGubsXjavm_XGa1fkwoFx5MjiWFbWnNqhrko,1880
|
|
26
|
+
mwxlib-0.97.1.dist-info/WHEEL,sha256=rWxmBtp7hEUqVLOnTaDOPpR-cZpCDkzhhcBce-Zyd5k,91
|
|
27
|
+
mwxlib-0.97.1.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-0.97.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|