def __init__(self): wx.Frame.__init__(self, None, -1, "Image File Browser", wx.DefaultPosition, (600, 400)) icon = compat_wx.create_icon_from_bitmap( gamera_icons.getIconImageBrowserBitmap()) self.SetIcon(icon) self.splitter = wx.SplitterWindow(self, -1) self.image = gamera_display.ImageWindow(self.splitter, -1) self.file = FileList(self.splitter, -1, self.image) self.splitter.SetMinimumPaneSize(20) self.splitter.SplitVertically(self.file, self.image) self.splitter.Show(1) self.image.id.RefreshAll()
def __init__(self, parent, id, title): global shell wx.Frame.__init__( self, parent, id, title, (100, 100), # Win32 change [600, 550], style=wx.DEFAULT_FRAME_STYLE|wx.CLIP_CHILDREN|wx.NO_FULL_REPAINT_ON_RESIZE) compat_wx.handle_event_0(self, wx.EVT_CLOSE, self._OnCloseWindow) self.known_modules = {} self.menu = self.make_menu() self.SetMenuBar(self.menu) if aui: self._aui = aui.AuiManager(self) nb_style = (aui.AUI_NB_TAB_SPLIT|aui.AUI_NB_TAB_MOVE| aui.AUI_NB_TAB_EXTERNAL_MOVE|aui.AUI_NB_SCROLL_BUTTONS) nb = aui.AuiNotebook(self, style=nb_style) control_parent = self else: splitter = wx.SplitterWindow( self, -1, style=wx.SP_3DSASH|wx.CLIP_CHILDREN| wx.NO_FULL_REPAINT_ON_RESIZE|wx.SP_LIVE_UPDATE) control_parent = splitter self.icon_display = icon_display.IconDisplay(control_parent, self) if aui: self.shell = PyShellGameraShell(parent=self) rootObject = self.shell.interp.locals self.filling = wx.py.filling.Filling(parent=nb, rootObject=rootObject, rootIsNamespace=True) # Add 'filling' to the interpreter's locals. self.calltip = Calltip(parent=nb) self.sessionlisting = wx.py.crust.SessionListing(parent=nb) else: crust = PyCrustGameraShell(control_parent, -1) self.shell = crust.shell self.shell.main_win = self self.shell.update = self.Update image_menu.set_shell(self.shell) image_menu.set_shell_frame(self) self.shell.push("from gamera.gui import gui") self.shell.push("from gamera.gui.matplotlib_support import *") self.shell.push("from gamera.core import *") self.shell.push("init_gamera()") self.shell.update = self.Update self.icon_display.shell = self.shell self.icon_display.main = self self.Update() self.shell.SetFocus() if aui: self._aui.AddPane( self.icon_display, aui.AuiPaneInfo() .Name("icon_display") .CenterPane() .MinSize(wx.Size(96, 96)) .CloseButton(False) .CaptionVisible(True) .Caption("Objects") .Dockable(True)) self._aui.AddPane( self.shell, aui.AuiPaneInfo() .Name("shell") .CenterPane() .MinSize(wx.Size(200,200)) .CloseButton(False) .CaptionVisible(True) .MaximizeButton(True) .Caption("Interactive Python Shell") .Dockable(True)) nb.AddPage(self.calltip, "Documentation") nb.AddPage(self.filling, "Namespace") nb.AddPage(self.sessionlisting, "History") self._aui.AddPane( nb, aui.AuiPaneInfo() .Name("notebook") .CenterPane() .MinSize(wx.Size(200, 100)) .MaximizeButton(True)) self._aui.GetPane("notebook").Show().Bottom() self._aui.GetPane("icon_display").Show().Left() self._aui.Update() else: splitter.SetMinimumPaneSize(20) splitter.SplitVertically(self.icon_display, crust, 120) splitter.SetSashPosition(120) self.status = StatusBar(self) self.SetStatusBar(self.status) from gamera.gui import gamera_icons icon = compat_wx.create_icon_from_bitmap(gamera_icons.getIconBitmap()) self.SetIcon(icon) self.Move(wx.Point(int(30), int(30))) wx.Yield()
def get_icon(): return compat_wx.create_icon_from_bitmap(gamera_icons.getComplexVectorBitmap())
def get_icon(): return compat_wx.create_icon_from_bitmap(gamera_icons.getIconNoninterClassifyBitmap())
def get_icon(): return compat_wx.create_icon_from_bitmap(gamera_icons.getIconImageListBitmap())
def get_icon(): return compat_wx.create_icon_from_bitmap(gamera_icons.getIconSubimageComplexBitmap())
def to_icon(bitmap): if has_gui.has_gui: return compat_wx.create_icon_from_bitmap(bitmap) else: return None