mwxlib 0.95.4__py3-none-any.whl → 0.95.5__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 +19 -7
- mwx/framework.py +5 -5
- mwx/graphman.py +8 -5
- mwx/plugins/frame_listview.py +2 -2
- {mwxlib-0.95.4.dist-info → mwxlib-0.95.5.dist-info}/METADATA +1 -1
- {mwxlib-0.95.4.dist-info → mwxlib-0.95.5.dist-info}/RECORD +9 -9
- {mwxlib-0.95.4.dist-info → mwxlib-0.95.5.dist-info}/LICENSE +0 -0
- {mwxlib-0.95.4.dist-info → mwxlib-0.95.5.dist-info}/WHEEL +0 -0
- {mwxlib-0.95.4.dist-info → mwxlib-0.95.5.dist-info}/top_level.txt +0 -0
mwx/controls.py
CHANGED
|
@@ -896,6 +896,20 @@ class Icon(wx.Bitmap):
|
|
|
896
896
|
bmp = _getBitmap2(*args, **kwargs)
|
|
897
897
|
wx.Bitmap.__init__(self, bmp)
|
|
898
898
|
|
|
899
|
+
@staticmethod
|
|
900
|
+
def bullet(colour, ec=None, size=None, radius=4):
|
|
901
|
+
if not size:
|
|
902
|
+
size = (16,16)
|
|
903
|
+
bmp = wx.Bitmap(size)
|
|
904
|
+
with wx.MemoryDC(bmp) as dc:
|
|
905
|
+
dc.SetBackground(wx.Brush('black'))
|
|
906
|
+
dc.Clear()
|
|
907
|
+
dc.SetPen(wx.Pen(ec, style=wx.PENSTYLE_SOLID))
|
|
908
|
+
dc.SetBrush(wx.Brush(colour, style=wx.BRUSHSTYLE_SOLID))
|
|
909
|
+
dc.DrawCircle(size[0]//2, size[0]//2, radius)
|
|
910
|
+
bmp.SetMaskColour('black')
|
|
911
|
+
return bmp
|
|
912
|
+
|
|
899
913
|
@staticmethod
|
|
900
914
|
def iconify(icon, w, h):
|
|
901
915
|
## if wx.VERSION >= (4,1,0):
|
|
@@ -930,15 +944,14 @@ def _getBitmap1(key, size=None):
|
|
|
930
944
|
return bmp
|
|
931
945
|
|
|
932
946
|
## Note: null (0-shaped) bitmap fails with AssertionError from 4.1.1
|
|
933
|
-
|
|
947
|
+
elif key == '':
|
|
934
948
|
bmp = wx.Bitmap(size or (16,16))
|
|
935
|
-
|
|
936
|
-
dc = wx.MemoryDC(bmp)
|
|
949
|
+
with wx.MemoryDC(bmp) as dc:
|
|
937
950
|
dc.SetBackground(wx.Brush('black'))
|
|
938
951
|
dc.Clear()
|
|
939
|
-
del dc
|
|
940
952
|
bmp.SetMaskColour('black') # return dummy-sized blank bitmap
|
|
941
953
|
return bmp
|
|
954
|
+
|
|
942
955
|
return wx.NullBitmap # The standard wx controls accept this,
|
|
943
956
|
|
|
944
957
|
|
|
@@ -951,9 +964,8 @@ def _getBitmap2(back, fore, size=None, subsize=3/4):
|
|
|
951
964
|
fore = _getBitmap1(fore, subsize)
|
|
952
965
|
x = size[0] - subsize[0]
|
|
953
966
|
y = size[1] - subsize[1]
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
del dc
|
|
967
|
+
with wx.MemoryDC(back) as dc:
|
|
968
|
+
dc.DrawBitmap(fore, x, y, useMask=True)
|
|
957
969
|
return back
|
|
958
970
|
|
|
959
971
|
|
mwx/framework.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""mwxlib framework.
|
|
3
3
|
"""
|
|
4
|
-
__version__ = "0.95.
|
|
4
|
+
__version__ = "0.95.5"
|
|
5
5
|
__author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
6
|
|
|
7
7
|
from functools import wraps, partial
|
|
@@ -1116,6 +1116,10 @@ class ShellFrame(MiniFrame):
|
|
|
1116
1116
|
self.Log = EditorBook(self, name="Log")
|
|
1117
1117
|
self.Help = EditorBook(self, name="Help")
|
|
1118
1118
|
|
|
1119
|
+
self.Bookshelf = EditorTreeCtrl(self, name="Bookshelf",
|
|
1120
|
+
style=wx.TR_DEFAULT_STYLE|wx.TR_HIDE_ROOT)
|
|
1121
|
+
wx.CallAfter(self.Bookshelf.attach, self)
|
|
1122
|
+
|
|
1119
1123
|
from .wxpdb import Debugger
|
|
1120
1124
|
from .wxwit import Inspector
|
|
1121
1125
|
from .wxmon import EventMonitor
|
|
@@ -1152,10 +1156,6 @@ class ShellFrame(MiniFrame):
|
|
|
1152
1156
|
self.ghost.AddPage(self.Help, "Help")
|
|
1153
1157
|
self.ghost.Name = "ghost"
|
|
1154
1158
|
|
|
1155
|
-
self.Bookshelf = EditorTreeCtrl(self, name="Bookshelf",
|
|
1156
|
-
style=wx.TR_DEFAULT_STYLE|wx.TR_HIDE_ROOT)
|
|
1157
|
-
self.Bookshelf.attach(self)
|
|
1158
|
-
|
|
1159
1159
|
self.ghost.AddPage(self.Bookshelf, "Bookshelf", bitmap=Icon('book'))
|
|
1160
1160
|
|
|
1161
1161
|
self.ghost.SetDropTarget(FileDropLoader(self.Scratch))
|
mwx/graphman.py
CHANGED
|
@@ -594,7 +594,7 @@ class MyFileDropLoader(wx.FileDropTarget):
|
|
|
594
594
|
elif ext == '.jssn':
|
|
595
595
|
self.loader.load_session(fn)
|
|
596
596
|
elif ext == '.index':
|
|
597
|
-
self.loader.
|
|
597
|
+
self.loader.load_index(fn, self.view)
|
|
598
598
|
else:
|
|
599
599
|
paths.append(fn) # image file just stacks to be loaded
|
|
600
600
|
if paths:
|
|
@@ -697,10 +697,10 @@ class Frame(mwx.Frame):
|
|
|
697
697
|
(),
|
|
698
698
|
## ("Index", (
|
|
699
699
|
## (mwx.ID_(11), "&Import index\tCtrl+Shift+o", "Import index file", Icon('open'),
|
|
700
|
-
## lambda v: self.
|
|
700
|
+
## lambda v: self.load_index()),
|
|
701
701
|
##
|
|
702
702
|
## (mwx.ID_(12), "&Export index\tCtrl+Shift+s", "Export index file", Icon('saveas'),
|
|
703
|
-
## lambda v: self.
|
|
703
|
+
## lambda v: self.save_index(),
|
|
704
704
|
## lambda v: v.Enable(self.__view.frame is not None)),
|
|
705
705
|
## )),
|
|
706
706
|
("Session", (
|
|
@@ -1401,7 +1401,7 @@ class Frame(mwx.Frame):
|
|
|
1401
1401
|
## --------------------------------
|
|
1402
1402
|
ATTRIBUTESFILE = "results.index"
|
|
1403
1403
|
|
|
1404
|
-
def
|
|
1404
|
+
def load_index(self, filename=None, view=None):
|
|
1405
1405
|
"""Load frames :ref to the Index file.
|
|
1406
1406
|
"""
|
|
1407
1407
|
if not view:
|
|
@@ -1433,7 +1433,7 @@ class Frame(mwx.Frame):
|
|
|
1433
1433
|
print(self.message.read())
|
|
1434
1434
|
return frames
|
|
1435
1435
|
|
|
1436
|
-
def
|
|
1436
|
+
def save_index(self, filename=None, frames=None):
|
|
1437
1437
|
"""Save frames :ref to the Index file.
|
|
1438
1438
|
"""
|
|
1439
1439
|
if not frames:
|
|
@@ -1481,6 +1481,9 @@ class Frame(mwx.Frame):
|
|
|
1481
1481
|
print(self.message.read())
|
|
1482
1482
|
return frames
|
|
1483
1483
|
|
|
1484
|
+
import_index = load_index # for backward compatibility
|
|
1485
|
+
export_index = save_index # for backward compatibility
|
|
1486
|
+
|
|
1484
1487
|
## --------------------------------
|
|
1485
1488
|
## load/save frames and attributes
|
|
1486
1489
|
## --------------------------------
|
mwx/plugins/frame_listview.py
CHANGED
|
@@ -180,14 +180,14 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
180
180
|
self.Select(j)
|
|
181
181
|
|
|
182
182
|
def OnLoadItems(self, evt):
|
|
183
|
-
self.parent.parent.
|
|
183
|
+
self.parent.parent.load_index(view=self.Target)
|
|
184
184
|
|
|
185
185
|
def OnSaveItems(self, evt):
|
|
186
186
|
frames = self.Target.all_frames
|
|
187
187
|
selected_frames = [frames[j] for j in self.selected_items]
|
|
188
188
|
if selected_frames:
|
|
189
189
|
self.parent.message("Exporting {} frames.".format(len(selected_frames)))
|
|
190
|
-
self.parent.parent.
|
|
190
|
+
self.parent.parent.save_index(frames=selected_frames)
|
|
191
191
|
else:
|
|
192
192
|
self.parent.message("No frame selected.")
|
|
193
193
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=SNSLQc0IGuE6LDT5mzaAxXRgcH_k6cRVS3gXzFQqdZM,814
|
|
2
2
|
mwx/bookshelf.py,sha256=DAhMQk3_J4rdE50adBMFu5wNz3WdMh_zzJ37O9ncceo,5103
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
5
|
-
mwx/graphman.py,sha256=
|
|
3
|
+
mwx/controls.py,sha256=mNSDNuIB6BPZxgd2lZXHBFQz7QaIBLy6bZSrD4dp0LI,48161
|
|
4
|
+
mwx/framework.py,sha256=ygT0sB2hCEDB4ObmJCBYka7pWJrGpINmJ3zqopyleWk,75669
|
|
5
|
+
mwx/graphman.py,sha256=OMO2HQGfeCCGON8MwabmhLYsA-YHKueKaepsJkTDP0c,70489
|
|
6
6
|
mwx/images.py,sha256=gyvqW4TLWdJMKmsaWiPiV_PuHJM1GbHgeELERLwGzg8,45291
|
|
7
7
|
mwx/matplot2.py,sha256=nA7RLW1tf5kQfrenFnrAF900DbrpOUldc3SGaJgJKi0,32794
|
|
8
8
|
mwx/matplot2g.py,sha256=faKpuBdp4H_g-HKfRdxV17AwHtXcfRi2F0myE3cjM04,65393
|
|
@@ -17,12 +17,12 @@ mwx/wxwit.py,sha256=yU6XeCCWRBP7CLmpphjT072PfXAL30DNaxoChDX2p0I,7322
|
|
|
17
17
|
mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
|
|
18
18
|
mwx/plugins/ffmpeg_view.py,sha256=vUYNybIJsF1JGkDzjBgDyBQvDh8e1oKHlEMY5Fwc8L4,9399
|
|
19
19
|
mwx/plugins/fft_view.py,sha256=HcnBr-y_yFdSfASPRzMLANta4SwSDShd65QWnCU3XhM,2665
|
|
20
|
-
mwx/plugins/frame_listview.py,sha256=
|
|
20
|
+
mwx/plugins/frame_listview.py,sha256=RaYOj-YKrpLqhT8TkBRDX1TQnSPv90V185j8OjrWJTs,10108
|
|
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.95.
|
|
25
|
-
mwxlib-0.95.
|
|
26
|
-
mwxlib-0.95.
|
|
27
|
-
mwxlib-0.95.
|
|
28
|
-
mwxlib-0.95.
|
|
24
|
+
mwxlib-0.95.5.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-0.95.5.dist-info/METADATA,sha256=VSx9T74u5-4ID0njjolKRXbZSsbYe_UP8HQ9AzCfTQA,1925
|
|
26
|
+
mwxlib-0.95.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
27
|
+
mwxlib-0.95.5.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-0.95.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|