def __init__(self, *args, **kwargs):
        wx.Panel.__init__(self, *args, **kwargs)

        self.swselect = wx.SashLayoutWindow(self, -1, style=wx.NO_BORDER)
        self.swselect.SetDefaultSize((100, -1))
        self.swselect.SetOrientation(wx.LAYOUT_VERTICAL)
        self.swselect.SetAlignment(wx.LAYOUT_LEFT)
        self.swselect.SetSashVisible(wx.SASH_RIGHT, True)
        bordersize = 5
        if sys.platform == 'darwin':
            bordersize = 20
        self.swselect.SetExtraBorderSize(bordersize)

        self.swmessage = wx.SashLayoutWindow(self, -1, style=wx.NO_BORDER)
        self.swmessage.SetDefaultSize((-1, 100))
        self.swmessage.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.swmessage.SetAlignment(wx.LAYOUT_TOP)
        self.swmessage.SetSashVisible(wx.SASH_BOTTOM, True)
        #self.swmessage.SetExtraBorderSize(5)

        self.selector = leginon.gui.wx.Selector.Selector(self.swselect)

        self.defaultpanel = wx.lib.scrolledpanel.ScrolledPanel(self, -1)
        self.panel = self.defaultpanel
        self.panelmap = {}

        self.Bind(leginon.gui.wx.Selector.EVT_SELECT, self.onSelect,
                  self.selector)
        self.Bind(wx.EVT_SASH_DRAGGED, self.onSashDragged)
        self.Bind(wx.EVT_SIZE, self.onSize)
Beispiel #2
0
    def __init__(self, parent):
        wx.Panel.__init__(self, parent, -1)
        winids = []

        # Left window has fixed size and contains control buttons
        self.controls = wx.SashLayoutWindow(self, -1)
        winids.append(self.controls.GetId())

        self.controls.SetDefaultSize((80, 600))
        self.controls.SetOrientation(wx.LAYOUT_VERTICAL)
        self.controls.SetAlignment(wx.LAYOUT_LEFT)

        b = wx.Button(self.controls, -1, "Open", (3, 20))
        self.Bind(wx.EVT_BUTTON, self.openFile, b)
        b.SetDefault()
        b2 = wx.Button(self.controls, -1, "Save", (3, 60))
        self.Bind(wx.EVT_BUTTON, self.saveFile, b2)
        b2.SetDefault()
        b3 = wx.Button(self.controls, -1, "Run", (3, 100))
        self.Bind(wx.EVT_BUTTON, self.run, b3)
        b3.SetDefault()
        b4 = wx.Button(self.controls, -1, "Clear", (3, 140))
        self.Bind(wx.EVT_BUTTON, self.clear, b4)
        b4.SetDefault()

        # This will occupy the space not used by the Layout Algorithm
        self.remainingSpace = wx.SashLayoutWindow(self,
                                                  -1,
                                                  style=wx.NO_BORDER
                                                  | wx.SW_3D)

        self.python_editor = wx.TextCtrl(self.remainingSpace, -1, "",
                                         wx.DefaultPosition, wx.DefaultSize,
                                         wx.TE_MULTILINE | wx.SUNKEN_BORDER)
        self.python_editor.SetValue("#Editor window")

        # The output window is at the extreme right
        win = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, (200, 30),
                                  wx.NO_BORDER | wx.SW_3D)
        winids.append(win.GetId())
        win.SetDefaultSize((300, 600))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_RIGHT)
        win.SetSashVisible(wx.SASH_LEFT, True)
        win.SetExtraBorderSize(10)
        self.rightWindow = win
        self.output_window = wx.TextCtrl(win, -1, "", wx.DefaultPosition,
                                         wx.DefaultSize,
                                         wx.TE_MULTILINE | wx.SUNKEN_BORDER)
        self.output_window.SetValue("Output Window\n")
        #redirecting output
        sys.stdout = self.output_window
        sys.stderr = self.output_window

        self.Bind(wx.EVT_SASH_DRAGGED_RANGE,
                  self.OnSashDrag,
                  id=min(winids),
                  id2=max(winids))
        self.Bind(wx.EVT_SIZE, self.OnSize)
    def __init__(self, parent, id, title, appMonitor, **kw):
        wx.Frame.__init__(self, parent, id, title, **kw)
        self.appMonitor = appMonitor

        # upper sash window
        self.topWindow = wx.SashLayoutWindow(self, self.ID_WINDOW_TOP,
                                             wx.DefaultPosition)
        self.topWindow.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.topWindow.SetAlignment(wx.LAYOUT_TOP)
        self.topWindow.SetSashVisible(wx.SASH_BOTTOM, True)
        self.topWindow.SetExtraBorderSize(2)

        # lower sash window
        self.bottomWindow = wx.SashLayoutWindow(self, self.ID_WINDOW_BOTTOM,
                                                wx.DefaultPosition)
        self.bottomWindow.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.bottomWindow.SetAlignment(wx.LAYOUT_BOTTOM)
        self.bottomWindow.SetExtraBorderSize(2)

        # widgets for upper sash window
        self.panelTop = wx.Panel(self.topWindow, -1, wx.DefaultPosition,
                                 wx.DefaultSize)
        self.nameText = wx.StaticText(self.panelTop,
                                      -1,
                                      "This is the name",
                                      style=wx.ALIGN_CENTER)

        self.descriptionText = wx.StaticText(self.panelTop,
                                             -1,
                                             "No description",
                                             size=wx.Size(10, 40))
        self.partListCtrl = wx.ListCtrl(self.panelTop, -1, style=wx.LC_REPORT)
        self.partListCtrl.InsertColumn(0, "Participants")
        self.partListCtrl.InsertColumn(1, "Status")

        # widgets for lower sash window
        self.panelBottom = wx.Panel(self.bottomWindow, -1, wx.DefaultPosition,
                                    wx.DefaultSize)
        self.textCtrl = wx.TextCtrl(self.panelBottom,
                                    -1,
                                    style=wx.TE_MULTILINE | wx.TE_READONLY
                                    | wx.TE_RICH)

        self.idToProfile = {}
        self.profileToId = {}

        self.idToData = {}
        self.dataToId = {}

        self.__setEvents()
        self.__layout()

        # finally set size to get proper layout
        self.SetSize(wx.Size(400, 400))
        self.topWindow.SetDefaultSize(wx.Size(200, 200))
Beispiel #4
0
    def activate(self, sidebarwin):
        """
		Set the mode of visualization
		"""
        scripting.wantWholeDataset = 0
        self.sidebarWin = sidebarwin

        x, y = self.visualizer.visWin.GetSize()
        if not self.galleryPanel:
            self.galleryPanel = GalleryPanel(self.parent,
                                             self.visualizer,
                                             size=(x, y))
            self.iactivePanel = self.galleryPanel

        if not self.configPanel:
            # When we embed the sidebar in a sashlayoutwindow, the size
            # is set correctly
            self.container = wx.SashLayoutWindow(self.sidebarWin)

            self.configPanel = GalleryConfigurationPanel(self.container,
                                                         self.visualizer,
                                                         self,
                                                         size=(x, y))
            if self.dataUnit:
                self.configPanel.setDataUnit(self.dataUnit)
            self.configPanel.Show()
        else:
            self.configPanel.Show()
            self.container.Show()

        return self.galleryPanel
Beispiel #5
0
 def DoCreateResource(self):
     if self.GetInstance() is None:
         sashwin = wx.SashLayoutWindow(self.GetParentAsWindow(),
                                       self.GetID(), self.GetPosition(),
                                       self.GetSize(),
                                       self.GetStyle("flag"),
                                       self.GetName())
     else:
         sashwin = self.GetInstance()
         sashwin.Create(self.GetParentAsWindow(), self.GetID(),
                        self.GetPosition(), self.GetSize(),
                        self.GetStyle("flag"), self.GetName())
     self.SetupWindow(sashwin)
     if self.HasParam("orientation"):
         orient = self.GetStyle("orientation", wx.LAYOUT_VERTICAL)
         sashwin.SetOrientation(orient)
     if self.HasParam("alignment"):
         alignment = self.GetStyle("alignment", wx.LAYOUT_TOP)
         sashwin.SetAlignment(alignment)
     if self.HasParam("sashvisible"):
         sashvisible = self.GetStyle("sashvisible", wx.SASH_NONE)
         sashwin.SetSashVisible(sashvisible, True)
     if self.HasParam("background"):
         background = self.GetColour("background")
         sashwin.SetBackgroundColour(background)
     if self.HasParam("defaultsize"):
         defaultsize = self.GetSize("defaultsize")
         sashwin.SetDefaultSize(defaultsize)
     if self.HasParam("extrabordersize"):
         extrabordersize = self.GetLong("extrabordersize")
         sashwin.SetExtraBorderSize(extrabordersize)
     self.CreateChildren(sashwin)
     return sashwin
Beispiel #6
0
    def SetupSashLayout(self, config):
        width = self.GetSize().width / 4
        leftwin = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, (200, 30),
                                      wx.SW_3D)
        leftwin.SetDefaultSize((width, 1000))
        leftwin.SetMaximumSizeX(width)
        leftwin.SetMinimumSizeX(150)
        leftwin.SetOrientation(wx.LAYOUT_VERTICAL)
        leftwin.SetAlignment(wx.LAYOUT_LEFT)
        leftwin.SetSashVisible(wx.SASH_RIGHT, True)

        self.rightWindow = wx.Panel(self, -1, style=wx.BORDER_NONE)
        self.leftWindow = leftwin

        self.leftPanel = wx.Panel(self.rightWindow, -1, style=wx.BORDER_SUNKEN)
        self.rightPanel = wx.Panel(self.rightWindow,
                                   -1,
                                   style=wx.BORDER_SUNKEN)

        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.leftPanel, 1, wx.ALL | wx.EXPAND, 0)
        hbox.Add(self.rightPanel, 1, wx.ALL | wx.EXPAND, 0)
        self.rightWindow.SetSizer(hbox)
        self.Layout()

        self.Bind(wx.EVT_SASH_DRAGGED_RANGE,
                  self.OnSashDrag,
                  id=leftwin.GetId())
        self.Bind(wx.EVT_SIZE, self.OnSize)
Beispiel #7
0
 def __init__(self, parent):
     wx.Panel.__init__(self,
                       parent,
                       id=-1,
                       size=wx.DefaultSize,
                       style=wx.BK_DEFAULT)
     leftwin = wx.SashLayoutWindow(self,
                                   -1,
                                   wx.DefaultPosition,
                                   wx.DefaultSize,
                                   wx.NO_BORDER | wx.SW_3D,
                                   name='leftwin')
     leftwin.SetDefaultSize((parent.GetClientSize().width / 2, -1))
     leftwin.SetMaximumSizeX(parent.GetClientSize().width - 20)
     leftwin.SetMinimumSizeX(20)
     leftwin.SetOrientation(wx.LAYOUT_VERTICAL)
     leftwin.SetAlignment(wx.LAYOUT_LEFT)
     leftwin.SetBackgroundColour(wx.WHITE)
     leftwin.SetSashVisible(wx.SASH_RIGHT, True)
     self.leftWindow = leftwin
     self.leftWindow.SetSizer(wx.BoxSizer(wx.VERTICAL))
     # will occupy the space not used by the Layout Algorithm
     self.rightWindow = wx.Panel(self,
                                 -1,
                                 style=wx.SUNKEN_BORDER,
                                 name='rightPanel')
     self.rightWindow.SetSizer(wx.BoxSizer(wx.VERTICAL))
     self.Bind(wx.EVT_SASH_DRAGGED_RANGE,
               self.OnSashDrag,
               id=leftwin.GetId())
     self.Bind(wx.EVT_SIZE, self.OnSize)
Beispiel #8
0
    def __init__(self, parent):
        togwin.ChildToggableDialog.__init__(self, "Log inspector", parent)
        self.log_server = servers.get_log_server()
        log_class_list = list(self.log_server.getlogclasses())
        class_and_description_list = []
        for each_class in log_class_list:
            class_and_description_list.append(
                (each_class, self.log_server.getdescription(each_class)))
        # ignore case when sorting on description
        class_and_description_list.sort(
            lambda x, y: cmp(x[1].lower(), y[1].lower()))
        sorted_log_class_list = []
        for each_tuple in class_and_description_list:
            sorted_log_class_list.append(each_tuple[0])
        self.log_output_panel = LogOutputPanel(self,
                                               sorted_log_class_list,
                                               style=wx.BORDER_SUNKEN)
        win = wx.SashLayoutWindow(self, -1)
        self.log_class_panel = ModEnablePanel(win,
                                              sorted_log_class_list,
                                              style=wx.BORDER_SUNKEN
                                              | wx.TAB_TRAVERSAL)
        self.log_class_sash = win

        self.__do_layout()
        self.__bind_events()
Beispiel #9
0
 def __init__(self, parent, modal):
     wx.Panel.__init__(self, parent, -1)
     self.modal = modal
     self.use_active_filter = False
     self.apply_filter_when_selecting = False
     self.parent = parent
     #initialize the list of native entities
     self.master_native_list = self.get_all_native_entities()        
     #initialize the list of natives we're interested in
     #to be a copy of the list of native entities
     self.natives = None
     self.pattern = ''
     self.grid = EntityBrowserGrid(self, self.natives)
     win = wx.SashLayoutWindow(
         self, 
         -1, 
         wx.DefaultPosition,
         style = wx.SW_3D
         )
     self.native_sash_panel = SelectNativesPanel(
                                         win, 
                                         self.master_native_list
                                         )
     ideal_width = self.native_sash_panel.GetBestSize()[0]
     win.SetDefaultSize( (ideal_width, -1) )
     win.SetMaxSize( (ideal_width, -1) )
     min_width = self.native_sash_panel.get_min_width_for_heading()
     win.SetMinimumSizeX(min_width)
     win.SetOrientation(wx.LAYOUT_VERTICAL)
     win.SetAlignment(wx.LAYOUT_RIGHT)
     win.SetSashVisible(wx.SASH_LEFT, True)
     self.native_sash = win
     self.native_sash.Hide()
     self.select_entities_from_summoner()
     # bind events
     self.Bind(
         wx.EVT_SASH_DRAGGED_RANGE, 
         self.__on_sash_drag, 
         self.native_sash
         )
     self.Bind(
         wx.EVT_SIZE, 
         self.__on_size
         )
     self.native_sash.Bind(
         wx.EVT_BUTTON, 
         self.__on_click_close_button_in_sash
         )
     self.Bind(
         wx.EVT_CHECKBOX, 
         self.__on_change_apply_filter,
         self.native_sash_panel.checkbox_apply_filter
         )
     self.native_sash.Bind(
         EVT_SELECTED_NATIVES, 
         self.__on_change_selected_natives
         )
Beispiel #10
0
    def __init__(self,
                 parent,
                 id=wx.ID_ANY,
                 title="",
                 pos=wx.DefaultPosition,
                 size=(700, 650),
                 style=wx.DEFAULT_FRAME_STYLE):

        wx.Frame.__init__(self, parent, id, title, pos, size, style)

        self._flags = 0

        self.SetIcon(GetMondrianIcon())
        self.SetMenuBar(self.CreateMenuBar())

        self.statusbar = self.CreateStatusBar(2, wx.ST_SIZEGRIP)
        self.statusbar.SetStatusWidths([-4, -3])
        self.statusbar.SetStatusText("Andrea Gavana @ 23 Mar 2005", 0)
        self.statusbar.SetStatusText("Welcome to wxPython!", 1)

        self._leftWindow1 = wx.SashLayoutWindow(
            self, 101, wx.DefaultPosition, wx.Size(200, 1000),
            wx.NO_BORDER | wx.SW_3D | wx.CLIP_CHILDREN)

        self._leftWindow1.SetDefaultSize(wx.Size(220, 1000))
        self._leftWindow1.SetOrientation(wx.LAYOUT_VERTICAL)
        self._leftWindow1.SetAlignment(wx.LAYOUT_LEFT)
        self._leftWindow1.SetSashVisible(wx.SASH_RIGHT, True)
        self._leftWindow1.SetExtraBorderSize(10)

        self._pnl = 0

        # will occupy the space not used by the Layout Algorithm
        self.remainingSpace = wx.Panel(self, -1, style=wx.SUNKEN_BORDER)
        wx.StaticText(
            self.remainingSpace, -1,
            "Use your imagination for what kinds of things to put in this window...",
            (15, 30))

        self.ID_WINDOW_TOP = 100
        self.ID_WINDOW_LEFT1 = 101
        self.ID_WINDOW_RIGHT1 = 102
        self.ID_WINDOW_BOTTOM = 103

        self._leftWindow1.Bind(wx.EVT_SASH_DRAGGED_RANGE,
                               self.OnFoldPanelBarDrag,
                               id=100,
                               id2=103)
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_SCROLL, self.OnSlideColour)

        self.ReCreateFoldPanel(0)
Beispiel #11
0
	def __init__(self, parent):
		wx.Panel.__init__(self, parent, -1)

		self.parent = parent

		self.bottomWin = wx.SashLayoutWindow(self, -1, (-1,-1), (200, 30), wx.SW_3D)
		self.bottomWin.SetDefaultSize((-1, 25))
		self.bottomWin.SetOrientation(wx.LAYOUT_HORIZONTAL)
		self.bottomWin.SetAlignment(wx.LAYOUT_BOTTOM)
		# Doesn't work; have to do it by hand in self.OnSashDrag()
		#self.bottomWin.SetMinimumSizeY(30)

		self.topWin = wx.SashLayoutWindow(self, -1, (-1,-1), (-1, -1), wx.SW_3D)
		(x,y) = self.parent.GetClientSize()
		self.topWin.SetDefaultSize((-1, y-30))
		self.topWin.SetOrientation(wx.LAYOUT_HORIZONTAL)
		self.topWin.SetAlignment(wx.LAYOUT_TOP)
		self.topWin.SetSashVisible(wx.SASH_BOTTOM, True)
		self.topWin.SetMinimumSizeY(30)

		self.Bind(wx.EVT_SASH_DRAGGED, self.OnSashDrag, id=self.topWin.GetId())
		self.Bind(wx.EVT_SIZE, self.OnSize)
Beispiel #12
0
    def __init__(self):

        wx.Frame.__init__(self,
                          None,
                          id=wx.ID_ANY,
                          title="INCAR GUI",
                          pos=wx.DefaultPosition,
                          size=(650, 650),
                          style=wx.DEFAULT_FRAME_STYLE)

        self.statusbar = self.CreateStatusBar(2, wx.ST_SIZEGRIP)
        self.statusbar.SetStatusWidths([-4, -3])
        self.statusbar.SetStatusText("Leo Shen", 0)
        self.statusbar.SetStatusText("Welcome to Vasp GUI!", 1)

        self._leftWindow1 = wx.SashLayoutWindow(
            self, -1, wx.DefaultPosition, wx.Size(200, 1000),
            wx.NO_BORDER | wx.SW_3D | wx.CLIP_CHILDREN)

        self._leftWindow1.SetDefaultSize(wx.Size(320, 1000))
        self._leftWindow1.SetOrientation(wx.LAYOUT_VERTICAL)
        self._leftWindow1.SetAlignment(wx.LAYOUT_LEFT)
        self._leftWindow1.SetSashVisible(wx.SASH_RIGHT, True)
        self._leftWindow1.SetExtraBorderSize(10)

        #self._rightWindow1 = wx.SashLayoutWindow(self, -1, wx.DefaultPosition,
        #                                        wx.Size(200, 1000), wx.NO_BORDER |
        #                                        wx.SW_3D | wx.CLIP_CHILDREN)
        #
        #self._rightWindow1.SetDefaultSize(wx.Size(220, 1000))
        #self._rightWindow1.SetOrientation(wx.LAYOUT_VERTICAL)
        #self._rightWindow1.SetAlignment(wx.LAYOUT_LEFT)
        #self._rightWindow1.SetSashVisible(wx.SASH_LEFT, True)
        #self._rightWindow1.SetExtraBorderSize(10)

        self.remainingSpace = wx.Panel(self, -1, style=wx.SUNKEN_BORDER)
        #self.txtCtrl = wx.TextCtrl(self.remainingSpace, -1,size=(450, 450), style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER|wx.ALL)
        #self.ImportIncarButton = wx.Button(self.remainingSpace, -1,"Import",(20, 20))

        self.Bind(wx.EVT_SIZE, self.OnSize)
        #        self.txtCtrl.Bind(wx.EVT_TEXT,self.OnTxtChange)

        self.CreateIncarLeftFoldPanel(0)
        self.CreateIncarRightFoldPanel()
Beispiel #13
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.MDIParentFrame.__init__(self,
                                   id=wxID_WXMDIPARENTFRAME1,
                                   name='',
                                   parent=prnt,
                                   pos=wx.Point(129, 88),
                                   size=wx.Size(544, 318),
                                   style=wx.DEFAULT_FRAME_STYLE | wx.VSCROLL
                                   | wx.HSCROLL,
                                   title='wxMDIParentFrame1')
        self._init_utils()
        self.SetMenuBar(self.menuBar1)
        self.SetAutoLayout(True)
        self.SetClientSize(wx.Size(536, 291))
        self.Bind(wx.EVT_SIZE, self.OnWxmdiparentframe1Size)

        self.sashLayoutWindow1 = wx.SashLayoutWindow(
            id=wxID_WXMDIPARENTFRAME1SASHLAYOUTWINDOW1,
            name='sashLayoutWindow1',
            parent=self,
            pos=wx.Point(0, 0),
            size=wx.Size(137, 272),
            style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow1.SetOrientation(wx.LAYOUT_VERTICAL)
        self.sashLayoutWindow1.SetAlignment(wx.LAYOUT_LEFT)
        self.sashLayoutWindow1.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashLayoutWindow1.SetDefaultSize(wx.Size(137, 272))
        self.sashLayoutWindow1.Bind(wx.EVT_SASH_DRAGGED,
                                    self.OnSashlayoutwindow1SashDragged,
                                    id=wxID_WXMDIPARENTFRAME1SASHLAYOUTWINDOW1)

        self.treeCtrl1 = wx.TreeCtrl(id=wxID_WXMDIPARENTFRAME1TREECTRL1,
                                     name='treeCtrl1',
                                     parent=self.sashLayoutWindow1,
                                     pos=wx.Point(0, 0),
                                     size=wx.Size(134, 272),
                                     style=wx.TR_HAS_BUTTONS)
Beispiel #14
0
    def activate(self, sidebarwin):
        """
		Set the mode of visualization
		"""
        scripting.wantWholeDataset = 1
        self.sidebarWin = sidebarwin

        x, y = self.getSidebarWinOrigSize()
        if not self.iactivePanel:
            Logging.info("Generating preview", kw="visualizer")
            self.iactivePanel = MIPPreviewFrame(self.parent)

        if not self.configPanel:
            self.container = wx.SashLayoutWindow(self.sidebarWin)
            self.configPanel = SimpleConfigurationPanel(self.container,
                                                        self.visualizer,
                                                        self,
                                                        size=(x, y))

        self.configPanel.Show()
        self.container.Show()

        return self.iactivePanel
Beispiel #15
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
              pos=wx.Point(438, 55), size=wx.Size(873, 704),
              style=wx.DEFAULT_FRAME_STYLE, title=u'Alpha-D')
        self.SetClientSize(wx.Size(857, 665))
        self.Bind(wx.EVT_SIZE, self.OnFrame1Size)

        self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
              pos=wx.Point(392, -8), size=wx.Size(463, 664),
              style=wx.TAB_TRAVERSAL)
        self.panel1.SetMinSize(wx.Size(455, 778))

        self.sashLayoutWindow1 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW1,
              name='sashLayoutWindow1', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(392, 664), style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow1.SetAlignment(wx.LAYOUT_LEFT)
        self.sashLayoutWindow1.SetOrientation(wx.LAYOUT_VERTICAL)
        self.sashLayoutWindow1.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashLayoutWindow1.SetDefaultSize(wx.Size(392, 664))
        self.sashLayoutWindow1.Bind(wx.EVT_SASH_DRAGGED,
              self.OnSashLayoutWindow1SashDragged,
              id=wxID_FRAME1SASHLAYOUTWINDOW1)

        self.textReturn = wx.TextCtrl(id=wxID_FRAME1TEXTRETURN,
              name=u'textReturn', parent=self.panel1, pos=wx.Point(104, 8),
              size=wx.Size(1110, 1050), style=wx.TE_MULTILINE, value='')

        self.btn_start = wx.Button(id=wxID_FRAME1BTN_START,
              label=u'\u5f00\u59cb', name=u'btn_start', parent=self.panel1,
              pos=wx.Point(16, 128), size=wx.Size(75, 24), style=0)
        self.btn_start.Bind(wx.EVT_BUTTON, self.Onbtn_startButton,
              id=wxID_FRAME1BTN_START)

        self.genericDirCtrl1 = wx.GenericDirCtrl(defaultFilter=0, dir='.',
              filter=u'Fichier png(*.png,*.jpg)|*.png;*.jpg',
              id=wxID_FRAME1GENERICDIRCTRL1, name='genericDirCtrl1',
              parent=self.sashLayoutWindow1, pos=wx.Point(0, 0),
              size=wx.Size(392, 664),
              style=wx.DIRCTRL_3D_INTERNAL | wx.SUNKEN_BORDER)
        self.genericDirCtrl1.SetMinSize(wx.Size(270, 664))
        self.genericDirCtrl1.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSel)

        self.btn_mobile = wx.Button(id=wxID_FRAME1BTN_MOBILE,
              label=u'\u5f53\u524d\u8bbe\u5907', name=u'btn_mobile',
              parent=self.panel1, pos=wx.Point(16, 296), size=wx.Size(75, 24),
              style=0)
        self.btn_mobile.Bind(wx.EVT_BUTTON, self.Onbtn_mobileButton,
              id=wxID_FRAME1BTN_MOBILE)

        self.btn_clear = wx.Button(id=wxID_FRAME1BTN_CLEAR,
              label=u'\u6e05\u7a7a\u7ed3\u679c', name=u'btn_clear',
              parent=self.panel1, pos=wx.Point(16, 336), size=wx.Size(75, 24),
              style=0)
        self.btn_clear.Bind(wx.EVT_BUTTON, self.Onbtn_clearButton,
              id=wxID_FRAME1BTN_CLEAR)

        self.beauty = wx.TextCtrl(id=wxID_FRAME1BEAUTY, name=u'beauty',
              parent=self.panel1, pos=wx.Point(48, 16), size=wx.Size(48, 22),
              style=0, value=u'80')

        self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1,
              label=u'\u989c\u503c>', name='staticText1', parent=self.panel1,
              pos=wx.Point(8, 16), size=wx.Size(33, 14), style=0)

        self.staticText2 = wx.StaticText(id=wxID_FRAME1STATICTEXT2,
              label=u'\u6027\u522b\uff1a', name='staticText2',
              parent=self.panel1, pos=wx.Point(8, 56), size=wx.Size(36, 14),
              style=0)

        self.radioButton1 = wx.RadioButton(id=wxID_FRAME1RADIOBUTTON1,
              label=u'\u7537', name='radioButton1', parent=self.panel1,
              pos=wx.Point(72, 56), size=wx.Size(32, 16), style=0)
        self.radioButton1.SetValue(True)
        self.radioButton1.Enable(True)
        self.radioButton1.Show(True)
        self.radioButton1.Bind(wx.EVT_RADIOBUTTON,
              self.OnRadioButton1Radiobutton, id=wxID_FRAME1RADIOBUTTON1)

        self.radioButton2 = wx.RadioButton(id=wxID_FRAME1RADIOBUTTON2,
              label=u'\u5973', name='radioButton2', parent=self.panel1,
              pos=wx.Point(40, 56), size=wx.Size(32, 14), style=0)
        self.radioButton2.SetValue(True)
        self.radioButton2.Bind(wx.EVT_RADIOBUTTON,
              self.OnRadioButton2Radiobutton, id=wxID_FRAME1RADIOBUTTON2)

        self.textCtrl2 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL2, name='textCtrl2',
              parent=self.panel1, pos=wx.Point(48, 88), size=wx.Size(48, 22),
              style=0, value=u'10')

        self.staticText3 = wx.StaticText(id=wxID_FRAME1STATICTEXT3,
              label=u'\u5148\u5237\uff1a', name='staticText3',
              parent=self.panel1, pos=wx.Point(8, 88), size=wx.Size(36, 14),
              style=0)

        self.btn_test_beauty = wx.Button(id=wxID_FRAME1BTN_TEST_BEAUTY,
              label=u'\u989c\u503c\u68c0\u6d4b', name=u'btn_test_beauty',
              parent=self.panel1, pos=wx.Point(16, 216), size=wx.Size(75, 24),
              style=0)
        self.btn_test_beauty.Bind(wx.EVT_BUTTON, self.Onbtn_test_beautyButton,
              id=wxID_FRAME1BTN_TEST_BEAUTY)

        self.app_key = wx.TextCtrl(id=wxID_FRAME1APP_KEY, name=u'app_key',
              parent=self.panel1, pos=wx.Point(0, 632), size=wx.Size(104, 22),
              style=0, value=u'ecTptvOyErjHiNgo')

        self.staticText4 = wx.StaticText(id=wxID_FRAME1STATICTEXT4,
              label=u'app_key\uff1a', name='staticText4', parent=self.panel1,
              pos=wx.Point(0, 616), size=wx.Size(58, 14), style=0)

        self.app_id = wx.TextCtrl(id=wxID_FRAME1APP_ID, name=u'app_id',
              parent=self.panel1, pos=wx.Point(0, 592), size=wx.Size(104, 22),
              style=0, value=u'1106941552')

        self.staticText5 = wx.StaticText(id=wxID_FRAME1STATICTEXT5,
              label=u'app_id\uff1a', name='staticText5', parent=self.panel1,
              pos=wx.Point(0, 576), size=wx.Size(48, 14), style=0)

        self.star_y = wx.TextCtrl(id=wxID_FRAME1STAR_Y, name=u'star_y',
              parent=self.panel1, pos=wx.Point(56, 520), size=wx.Size(40, 24),
              style=0, value=u'960')

        self.star_x = wx.TextCtrl(id=wxID_FRAME1STAR_X, name=u'star_x',
              parent=self.panel1, pos=wx.Point(8, 520), size=wx.Size(40, 24),
              style=0, value=u'987')

        self.btn_star = wx.Button(id=wxID_FRAME1BTN_STAR, label=u'\u70b9\u8d5e',
              name=u'btn_star', parent=self.panel1, pos=wx.Point(16, 552),
              size=wx.Size(75, 24), style=0)
        self.btn_star.Bind(wx.EVT_BUTTON, self.OnBtn_starButton,
              id=wxID_FRAME1BTN_STAR)

        self.btn_follow = wx.Button(id=wxID_FRAME1BTN_FOLLOW,
              label=u'\u5173\u6ce8', name=u'btn_follow', parent=self.panel1,
              pos=wx.Point(16, 488), size=wx.Size(75, 24), style=0)
        self.btn_follow.Bind(wx.EVT_BUTTON, self.OnBtn_followButton,
              id=wxID_FRAME1BTN_FOLLOW)

        self.btn_next = wx.Button(id=wxID_FRAME1BTN_NEXT, label=u'\u7ffb\u9875',
              name=u'btn_next', parent=self.panel1, pos=wx.Point(16, 424),
              size=wx.Size(75, 24), style=0)
        self.btn_next.Bind(wx.EVT_BUTTON, self.OnBtn_nextButton,
              id=wxID_FRAME1BTN_NEXT)

        self.follow_x = wx.TextCtrl(id=wxID_FRAME1FOLLOW_X, name=u'follow_x',
              parent=self.panel1, pos=wx.Point(8, 456), size=wx.Size(40, 22),
              style=0, value=u'987')

        self.follow_y = wx.TextCtrl(id=wxID_FRAME1FOLLOW_Y, name=u'follow_y',
              parent=self.panel1, pos=wx.Point(56, 456), size=wx.Size(40, 22),
              style=0, value=u'796')

        self.next_x = wx.TextCtrl(id=wxID_FRAME1NEXT_X, name=u'next_x',
              parent=self.panel1, pos=wx.Point(8, 392), size=wx.Size(40, 24),
              style=0, value=u'540')

        self.next_y = wx.TextCtrl(id=wxID_FRAME1NEXT_Y, name=u'next_y',
              parent=self.panel1, pos=wx.Point(56, 392), size=wx.Size(40, 22),
              style=0, value=u'965')
Beispiel #16
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
              pos=wx.Point(556, 295), size=wx.Size(516, 476),
              style=wx.DEFAULT_FRAME_STYLE, title='Everything')
        self._init_utils()
        self.SetClientSize(wx.Size(508, 449))
        self.SetMenuBar(self.menuBar1)
        self.Center(wx.BOTH)

        self.toolBar1 = wx.ToolBar(id=wxID_FRAME1TOOLBAR1, name='toolBar1',
              parent=self, pos=wx.Point(0, 0), size=wx.Size(508, 27),
              style=wx.TB_HORIZONTAL | wx.NO_BORDER)
        self.SetToolBar(self.toolBar1)

        self.statusBar1 = wx.StatusBar(id=wxID_FRAME1STATUSBAR1,
              name='statusBar1', parent=self, style=0)
        self.statusBar1.SetPosition(wx.Point(0, 308))
        self.statusBar1.SetSize(wx.Size(422, 20))
        self._init_coll_statusBar1_Fields(self.statusBar1)
        self.SetStatusBar(self.statusBar1)

        self.notebook1 = wx.Notebook(id=wxID_FRAME1NOTEBOOK1, name='notebook1',
              parent=self, pos=wx.Point(0, 27), size=wx.Size(508, 383),
              style=0)

        self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1',
              parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
              style=wx.TAB_TRAVERSAL)

        self.splitterWindow1 = wx.SplitterWindow(id=wxID_FRAME1SPLITTERWINDOW1,
              name='splitterWindow1', parent=self.panel1, point=wx.Point(8, 8),
              size=wx.Size(200, 100), style=wx.SP_3D)

        self.scrolledWindow1 = wx.ScrolledWindow(id=wxID_FRAME1SCROLLEDWINDOW1,
              name='scrolledWindow1', parent=self.splitterWindow1,
              pos=wx.Point(2, 2), size=wx.Size(98, 96),
              style=wx.SUNKEN_BORDER | wx.TAB_TRAVERSAL)
        self.scrolledWindow1.SetToolTipString('wxScrolledWindow')

        self.sashWindow1 = wx.SashWindow(id=wxID_FRAME1SASHWINDOW1,
              name='sashWindow1', parent=self.splitterWindow1, pos=wx.Point(107,
              2), size=wx.Size(91, 96), style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.splitterWindow1.SplitVertically(self.scrolledWindow1,
              self.sashWindow1, 100)

        self.sashLayoutWindow1 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW1,
              name='sashLayoutWindow1', parent=self.panel1, pos=wx.Point(8,
              120), size=wx.Size(200, 80), style=wx.CLIP_CHILDREN | wx.SW_3D)

        self.window1 = wx.Window(id=wxID_FRAME1WINDOW1, name='window1',
              parent=self.panel1, pos=wx.Point(216, 120), size=wx.Size(96, 80),
              style=wx.SIMPLE_BORDER)
        self.window1.SetCursor(self.stockCursor1)

        self.dynamicSashWindow1 = wx.gizmos.DynamicSashWindow(id=wxID_FRAME1DYNAMICSASHWINDOW1,
              name='dynamicSashWindow1', parent=self.panel1, pos=wx.Point(216,
              8), size=wx.Size(100, 100), style=wx.CLIP_CHILDREN)

        self.panel2 = wx.Panel(id=wxID_FRAME1PANEL2, name='panel2',
              parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
              style=wx.TAB_TRAVERSAL)

        self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1,
              label='staticText1', name='staticText1', parent=self.panel2,
              pos=wx.Point(16, 16), size=wx.Size(52, 13), style=0)

        self.textCtrl1 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL1, name='textCtrl1',
              parent=self.panel2, pos=wx.Point(16, 40), size=wx.Size(100, 21),
              style=0, value='textCtrl1')

        self.comboBox1 = wx.ComboBox(choices=[], id=wxID_FRAME1COMBOBOX1,
              name='comboBox1', parent=self.panel2, pos=wx.Point(16, 72),
              size=wx.Size(125, 21), style=0, validator=wx.DefaultValidator,
              value='comboBox1')

        self.choice1 = wx.Choice(choices=[], id=wxID_FRAME1CHOICE1,
              name='choice1', parent=self.panel2, pos=wx.Point(16, 104),
              size=wx.Size(125, 21), style=0, validator=wx.DefaultValidator)

        self.checkBox1 = wx.CheckBox(id=wxID_FRAME1CHECKBOX1, label='checkBox1',
              name='checkBox1', parent=self.panel2, pos=wx.Point(16, 136),
              size=wx.Size(73, 13), style=0)

        self.radioButton1 = wx.RadioButton(id=wxID_FRAME1RADIOBUTTON1,
              label='radioButton1', name='radioButton1', parent=self.panel2,
              pos=wx.Point(16, 160), size=wx.Size(80, 20), style=0)

        self.slider1 = wx.Slider(id=wxID_FRAME1SLIDER1, maxValue=100,
              minValue=0, name='slider1', parent=self.panel2,
              point=wx.Point(152, 16), size=wx.Size(136, 20),
              style=wx.SL_HORIZONTAL, validator=wx.DefaultValidator, value=0)
        self.slider1.Bind(wx.EVT_SCROLL, self.OnSlider1Slider)

        self.scrollBar1 = wx.ScrollBar(id=wxID_FRAME1SCROLLBAR1,
              name='scrollBar1', parent=self.panel2, pos=wx.Point(16, 192),
              size=wx.Size(120, 14), style=wx.SB_HORIZONTAL)
        self.scrollBar1.SetThumbPosition(0)

        self.staticBitmap1 = wx.StaticBitmap(bitmap=Everything_img.getBoaBitmap(),
              id=wxID_FRAME1STATICBITMAP1, name='staticBitmap1',
              parent=self.panel2, pos=wx.Point(160, 136), size=wx.Size(16, 16),
              style=0)

        self.staticLine1 = wx.StaticLine(id=wxID_FRAME1STATICLINE1,
              name='staticLine1', parent=self.panel2, pos=wx.Point(15, 216),
              size=wx.Size(121, 2), style=0)

        self.staticBox1 = wx.StaticBox(id=wxID_FRAME1STATICBOX1,
              label='staticBox1', name='staticBox1', parent=self.panel2,
              pos=wx.Point(152, 120), size=wx.Size(144, 40), style=0)

        self.htmlWindow1 = wx.html.HtmlWindow(id=wxID_FRAME1HTMLWINDOW1,
              name='htmlWindow1', parent=self.panel2, pos=wx.Point(152, 168),
              size=wx.Size(144, 80), style=wx.html.HW_SCROLLBAR_AUTO)

        self.lEDNumberCtrl1 = wx.gizmos.LEDNumberCtrl(id=wxID_FRAME1LEDNUMBERCTRL1,
              parent=self.panel2, pos=wx.Point(152, 40), size=wx.Size(136, 40),
              style=wx.gizmos.LED_ALIGN_CENTER)
        self.lEDNumberCtrl1.SetValue('123')

        self.panel3 = wx.Panel(id=wxID_FRAME1PANEL3, name='panel3',
              parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
              style=wx.TAB_TRAVERSAL)

        self.button1 = wx.Button(id=wxID_FRAME1BUTTON1, label='button1',
              name='button1', parent=self.panel3, pos=wx.Point(16, 16),
              size=wx.Size(75, 23), style=0)
        self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
              id=wxID_FRAME1BUTTON1)
        self.button1.Bind(wx.EVT_LEFT_UP, self.OnButton1LeftUp)

        self.bitmapButton1 = wx.BitmapButton(bitmap=Everything_img.getBoaBitmap(),
              id=wxID_FRAME1BITMAPBUTTON1, name='bitmapButton1',
              parent=self.panel3, pos=wx.Point(16, 56), size=wx.Size(72, 24),
              style=wx.BU_AUTODRAW, validator=wx.DefaultValidator)
        self.bitmapButton1.Bind(wx.EVT_BUTTON, self.OnBitmapbutton1Button,
              id=wxID_FRAME1BITMAPBUTTON1)

        self.spinButton1 = wx.SpinButton(id=wxID_FRAME1SPINBUTTON1,
              name='spinButton1', parent=self.panel3, pos=wx.Point(136, 96),
              size=wx.Size(32, 16), style=wx.SP_HORIZONTAL)
        self.spinButton1.Bind(wx.EVT_COMMAND_SCROLL,
              self.OnSpinbutton1CommandScroll, id=wxID_FRAME1SPINBUTTON1)

        self.toggleButton1 = wx.ToggleButton(id=wxID_FRAME1TOGGLEBUTTON1,
              label='toggleButton1', name='toggleButton1', parent=self.panel3,
              pos=wx.Point(104, 16), size=wx.Size(81, 23), style=0)
        self.toggleButton1.Bind(wx.EVT_BUTTON, self.OnTogglebutton1Button,
              id=wxID_FRAME1TOGGLEBUTTON1)

        self.genButton1 = wx.lib.buttons.GenButton(ID=wxID_FRAME1GENBUTTON1,
              label='genButton1', name='genButton1', parent=self.panel3,
              pos=wx.Point(16, 160), size=wx.Size(88, 37), style=0)

        self.genBitmapButton1 = wx.lib.buttons.GenBitmapButton(ID=wxID_FRAME1GENBITMAPBUTTON1,
              bitmap=Everything_img.getBoaBitmap(), name='genBitmapButton1',
              parent=self.panel3, pos=wx.Point(16, 192), size=wx.Size(59, 58),
              style=0)

        self.genToggleButton1 = wx.lib.buttons.GenToggleButton(ID=wxID_FRAME1GENTOGGLEBUTTON1,
              label='genToggleButton1', name='genToggleButton1',
              parent=self.panel3, pos=wx.Point(104, 160), size=wx.Size(113, 37),
              style=0)

        self.genBitmapToggleButton1 = wx.lib.buttons.GenBitmapToggleButton(ID=wxID_FRAME1GENBITMAPTOGGLEBUTTON1,
              bitmap=Everything_img.getBoaBitmap(),
              name='genBitmapToggleButton1', parent=self.panel3,
              pos=wx.Point(72, 192), size=wx.Size(59, 58), style=0)

        self.genBitmapTextToggleButton1 = wx.lib.buttons.GenBitmapTextToggleButton(ID=wxID_FRAME1GENBITMAPTEXTTOGGLEBUTTON1,
              bitmap=Everything_img.getBoaBitmap(),
              label='genBitmapTextToggleButton1',
              name='genBitmapTextToggleButton1', parent=self.panel3,
              pos=wx.Point(128, 192), size=wx.Size(88, 58), style=0)

        self.contextHelpButton1 = wx.ContextHelpButton(parent=self.panel3,
              pos=wx.Point(136, 64), size=wx.Size(20, 19),
              style=wx.BU_AUTODRAW)

        self.panel4 = wx.Panel(id=wxID_FRAME1PANEL4, name='panel4',
              parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
              style=wx.TAB_TRAVERSAL)

        self.radioBox1 = wx.RadioBox(choices=['asd'], id=wxID_FRAME1RADIOBOX1,
              label='radioBox1', majorDimension=1, name='radioBox1',
              parent=self.panel4, point=wx.Point(16, 16), size=wx.DefaultSize,
              style=wx.RA_SPECIFY_COLS, validator=wx.DefaultValidator)

        self.listBox1 = wx.ListBox(choices=[], id=wxID_FRAME1LISTBOX1,
              name='listBox1', parent=self.panel4, pos=wx.Point(16, 64),
              size=wx.Size(115, 63), style=0, validator=wx.DefaultValidator)

        self.checkListBox1 = wx.CheckListBox(choices=[],
              id=wxID_FRAME1CHECKLISTBOX1, name='checkListBox1',
              parent=self.panel4, pos=wx.Point(16, 136), size=wx.Size(115, 63),
              style=0, validator=wx.DefaultValidator)

        self.grid1 = wx.grid.Grid(id=wxID_FRAME1GRID1, name='grid1',
              parent=self.panel4, pos=wx.Point(144, 16), size=wx.Size(128, 112),
              style=0)

        self.listCtrl1 = wx.ListCtrl(id=wxID_FRAME1LISTCTRL1, name='listCtrl1',
              parent=self.panel4, pos=wx.Point(280, 16), size=wx.Size(100, 30),
              style=wx.LC_ICON, validator=wx.DefaultValidator)

        self.treeCtrl1 = wx.TreeCtrl(id=wxID_FRAME1TREECTRL1, name='treeCtrl1',
              parent=self.panel4, pos=wx.Point(280, 56), size=wx.Size(100, 80),
              style=wx.TR_HAS_BUTTONS, validator=wx.DefaultValidator)

        self.editableListBox1 = wx.gizmos.EditableListBox(id=wxID_FRAME1EDITABLELISTBOX1,
              label='editableListBox1', name='editableListBox1',
              parent=self.panel4, pos=wx.Point(152, 152), size=wx.Size(200,
              100))

        self.panel5 = wx.Panel(id=wxID_FRAME1PANEL5, name='panel5',
              parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
              style=wx.TAB_TRAVERSAL)
        self.panel5.SetAutoLayout(True)

        self.window2 = wx.Window(id=wxID_FRAME1WINDOW2, name='window2',
              parent=self.panel5, pos=wx.Point(446, 16), size=wx.Size(40, 40),
              style=0)
        self.window2.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window2.SetConstraints(LayoutAnchors(self.window2, False, True,
              True, False))

        self.window3 = wx.Window(id=wxID_FRAME1WINDOW3, name='window3',
              parent=self.panel5, pos=wx.Point(16, 299), size=wx.Size(40, 40),
              style=0)
        self.window3.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window3.SetConstraints(LayoutAnchors(self.window3, True, False,
              False, True))

        self.window4 = wx.Window(id=wxID_FRAME1WINDOW4, name='window4',
              parent=self.panel5, pos=wx.Point(446, 299), size=wx.Size(40, 40),
              style=0)
        self.window4.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window4.SetConstraints(LayoutAnchors(self.window4, False, False,
              True, True))

        self.window5 = wx.Window(id=wxID_FRAME1WINDOW5, name='window5',
              parent=self.panel5, pos=wx.Point(16, 16), size=wx.Size(40, 40),
              style=0)
        self.window5.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window5.SetConstraints(LayoutAnchors(self.window5, True, True,
              False, False))

        self.window6 = wx.Window(id=wxID_FRAME1WINDOW6, name='window6',
              parent=self.panel5, pos=wx.Point(192, 16), size=wx.Size(126, 40),
              style=0)
        self.window6.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window6.SetConstraints(LayoutAnchors(self.window6, True, True,
              True, False))

        self.window7 = wx.Window(id=wxID_FRAME1WINDOW7, name='window7',
              parent=self.panel5, pos=wx.Point(446, 120), size=wx.Size(40, 115),
              style=0)
        self.window7.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window7.SetConstraints(LayoutAnchors(self.window7, False, True,
              True, True))

        self.window8 = wx.Window(id=wxID_FRAME1WINDOW8, name='window8',
              parent=self.panel5, pos=wx.Point(192, 299), size=wx.Size(126, 40),
              style=0)
        self.window8.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window8.SetConstraints(LayoutAnchors(self.window8, True, False,
              True, True))

        self.window9 = wx.Window(id=wxID_FRAME1WINDOW9, name='window9',
              parent=self.panel5, pos=wx.Point(16, 120), size=wx.Size(40, 115),
              style=0)
        self.window9.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window9.SetConstraints(LayoutAnchors(self.window9, True, True,
              False, True))

        self.window10 = wx.Window(id=wxID_FRAME1WINDOW10, name='window10',
              parent=self.panel5, pos=wx.Point(225, 147), size=wx.Size(40, 40),
              style=0)
        self.window10.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.window10.SetConstraints(LayoutAnchors(self.window10, False, False,
              False, False))

        self.panel6 = wx.Panel(id=wxID_FRAME1PANEL6, name='panel6',
              parent=self.notebook1, pos=wx.Point(0, 0), size=wx.Size(500, 357),
              style=wx.TAB_TRAVERSAL)

        self.gauge1 = wx.Gauge(id=wxID_FRAME1GAUGE1, name='gauge1',
              parent=self.panel2, pos=wx.Point(152, 88), range=100,
              size=wx.Size(136, 16), style=wx.GA_SMOOTH | wx.GA_HORIZONTAL,
              validator=wx.DefaultValidator)
        self.gauge1.SetValue(50)

        self._init_coll_toolBar1_Tools(self.toolBar1)
        self._init_coll_notebook1_Pages(self.notebook1)
Beispiel #17
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self,
                          id=wxID_FRAME1,
                          name='Frame1',
                          parent=prnt,
                          pos=wx.Point(327, 136),
                          size=wx.Size(518, 376),
                          style=wx.DEFAULT_FRAME_STYLE,
                          title='Sash layout')
        self.SetClientSize(wx.Size(510, 349))
        self.Bind(wx.EVT_SIZE, self.OnWxframe1Size)

        self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1,
                               name='panel1',
                               parent=self,
                               pos=wx.Point(248, 50),
                               size=wx.Size(262, 234),
                               style=wx.TAB_TRAVERSAL)

        self.sashLayoutWindow1 = wx.SashLayoutWindow(
            id=wxID_FRAME1SASHLAYOUTWINDOW1,
            name='sashLayoutWindow1',
            parent=self,
            pos=wx.Point(0, 0),
            size=wx.Size(510, 50),
            style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow1.SetBackgroundColour(wx.Colour(255, 0, 0))
        self.sashLayoutWindow1.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.sashLayoutWindow1.SetAlignment(wx.LAYOUT_TOP)
        self.sashLayoutWindow1.SetSashVisible(wx.SASH_BOTTOM, True)
        self.sashLayoutWindow1.SetDefaultSize(wx.Size(510, 50))
        self.sashLayoutWindow1.Bind(wx.EVT_SASH_DRAGGED,
                                    self.OnSashlayoutwindow1SashDragged,
                                    id=wxID_FRAME1SASHLAYOUTWINDOW1)

        self.sashLayoutWindow4 = wx.SashLayoutWindow(
            id=wxID_FRAME1SASHLAYOUTWINDOW4,
            name='sashLayoutWindow4',
            parent=self,
            pos=wx.Point(0, 284),
            size=wx.Size(510, 65),
            style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow4.SetBackgroundColour(wx.Colour(0, 0, 255))
        self.sashLayoutWindow4.SetAlignment(wx.LAYOUT_BOTTOM)
        self.sashLayoutWindow4.SetSashVisible(wx.SASH_TOP, True)
        self.sashLayoutWindow4.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.sashLayoutWindow4.SetDefaultSize(wx.Size(308, 65))
        self.sashLayoutWindow4.SetExtraBorderSize(10)
        self.sashLayoutWindow4.Bind(wx.EVT_SASH_DRAGGED,
                                    self.OnSashlayoutwindow4SashDragged,
                                    id=wxID_FRAME1SASHLAYOUTWINDOW4)

        self.sashLayoutWindow2 = wx.SashLayoutWindow(
            id=wxID_FRAME1SASHLAYOUTWINDOW2,
            name='sashLayoutWindow2',
            parent=self,
            pos=wx.Point(0, 50),
            size=wx.Size(112, 234),
            style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow2.SetBackgroundColour(wx.Colour(128, 255, 0))
        self.sashLayoutWindow2.SetExtraBorderSize(20)
        self.sashLayoutWindow2.SetAlignment(wx.LAYOUT_LEFT)
        self.sashLayoutWindow2.SetOrientation(wx.LAYOUT_VERTICAL)
        self.sashLayoutWindow2.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashLayoutWindow2.SetDefaultSize(wx.Size(112, 113))
        self.sashLayoutWindow2.Bind(wx.EVT_SASH_DRAGGED,
                                    self.OnSashlayoutwindow2SashDragged,
                                    id=wxID_FRAME1SASHLAYOUTWINDOW2)

        self.sashLayoutWindow3 = wx.SashLayoutWindow(
            id=wxID_FRAME1SASHLAYOUTWINDOW3,
            name='sashLayoutWindow3',
            parent=self,
            pos=wx.Point(112, 50),
            size=wx.Size(136, 234),
            style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow3.SetBackgroundColour(wx.Colour(0, 255, 255))
        self.sashLayoutWindow3.SetAlignment(wx.LAYOUT_LEFT)
        self.sashLayoutWindow3.SetOrientation(wx.LAYOUT_VERTICAL)
        self.sashLayoutWindow3.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashLayoutWindow3.SetDefaultSize(wx.Size(136, 234))
        self.sashLayoutWindow3.Bind(wx.EVT_SASH_DRAGGED,
                                    self.OnSashlayoutwindow3SashDragged,
                                    id=wxID_FRAME1SASHLAYOUTWINDOW3)

        self.textCtrl1 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL1,
                                     name='textCtrl1',
                                     parent=self.sashLayoutWindow2,
                                     pos=wx.Point(20, 20),
                                     size=wx.Size(69, 194),
                                     style=0,
                                     value='textCtrl1')

        self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1,
                                         label='staticText1',
                                         name='staticText1',
                                         parent=self.panel1,
                                         pos=wx.Point(16, 16),
                                         size=wx.Size(52, 13),
                                         style=0)

        self.textCtrl2 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL2,
                                     name='textCtrl2',
                                     parent=self.sashLayoutWindow4,
                                     pos=wx.Point(10, 13),
                                     size=wx.Size(490, 42),
                                     style=0,
                                     value='textCtrl2')
Beispiel #18
0
    def __init__(self, parent, log):
        wx.Panel.__init__(self, parent, -1)

        self.log = log
        winids = []

        # Create some layout windows
        # A window like a toolbar
        topwin = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, (200, 30),
                                     wx.NO_BORDER | wx.SW_3D)

        topwin.SetDefaultSize((1000, 30))
        topwin.SetOrientation(wx.LAYOUT_HORIZONTAL)
        topwin.SetAlignment(wx.LAYOUT_TOP)
        topwin.SetBackgroundColour(wx.Colour(255, 0, 0))
        topwin.SetSashVisible(wx.SASH_BOTTOM, True)

        self.topWindow = topwin
        winids.append(topwin.GetId())

        # A window like a statusbar
        bottomwin = wx.SashLayoutWindow(self, -1, wx.DefaultPosition,
                                        (200, 30), wx.NO_BORDER | wx.SW_3D)

        bottomwin.SetDefaultSize((1000, 30))
        bottomwin.SetOrientation(wx.LAYOUT_HORIZONTAL)
        bottomwin.SetAlignment(wx.LAYOUT_BOTTOM)
        bottomwin.SetBackgroundColour(wx.Colour(0, 0, 255))
        bottomwin.SetSashVisible(wx.SASH_TOP, True)

        self.bottomWindow = bottomwin
        winids.append(bottomwin.GetId())

        # A window to the left of the client window
        leftwin1 = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, (200, 30),
                                       wx.NO_BORDER | wx.SW_3D)

        leftwin1.SetDefaultSize((120, 1000))
        leftwin1.SetOrientation(wx.LAYOUT_VERTICAL)
        leftwin1.SetAlignment(wx.LAYOUT_LEFT)
        leftwin1.SetBackgroundColour(wx.Colour(0, 255, 0))
        leftwin1.SetSashVisible(wx.SASH_RIGHT, True)
        leftwin1.SetExtraBorderSize(10)
        textWindow = wx.TextCtrl(leftwin1, -1, "", wx.DefaultPosition,
                                 wx.DefaultSize,
                                 wx.TE_MULTILINE | wx.SUNKEN_BORDER)

        textWindow.SetValue("A sub window")

        self.leftWindow1 = leftwin1
        winids.append(leftwin1.GetId())

        # Another window to the left of the client window
        leftwin2 = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, (200, 30),
                                       wx.NO_BORDER | wx.SW_3D)

        leftwin2.SetDefaultSize((120, 1000))
        leftwin2.SetOrientation(wx.LAYOUT_VERTICAL)
        leftwin2.SetAlignment(wx.LAYOUT_LEFT)
        leftwin2.SetBackgroundColour(wx.Colour(0, 255, 255))
        leftwin2.SetSashVisible(wx.SASH_RIGHT, True)

        self.leftWindow2 = leftwin2
        winids.append(leftwin2.GetId())

        # will occupy the space not used by the Layout Algorithm
        self.remainingSpace = wx.Panel(self, -1, style=wx.SUNKEN_BORDER)

        self.Bind(wx.EVT_SASH_DRAGGED_RANGE,
                  self.OnSashDrag,
                  id=min(winids),
                  id2=max(winids))

        self.Bind(wx.EVT_SIZE, self.OnSize)
Beispiel #19
0
    def __init__(self):
        wx.MDIParentFrame.__init__(self,
                                   None,
                                   -1,
                                   '770W P5 (Final Version)',
                                   size=(1000, 700),
                                   style=wx.DEFAULT_FRAME_STYLE | wx.HSCROLL
                                   | wx.VSCROLL)

        self.winCount = 0
        menu = wx.Menu()
        menu.Append(ID_Menu_Exit, 'Exit')

        menubar = wx.MenuBar()
        menubar.Append(menu, 'File')
        self.SetMenuBar(menubar)

        self.Bind(wx.EVT_MENU, self.OnExit, id=ID_Menu_Exit)

        self.Bind(wx.EVT_SIZE, self.OnSize)

        # A window to the left of the client window
        win = wx.SashLayoutWindow(self,
                                  ID_WINDOW_LEFT,
                                  style=wx.NO_BORDER | wx.SW_3D)
        win.SetDefaultSize((120, 100))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_LEFT)
        win.SetBackgroundColour(wx.Colour(0, 255, 0))
        win.SetExtraBorderSize(10)

        sizer = wx.FlexGridSizer(cols=1, hgap=20, vgap=20)

        b = wx.Button(win, DEMO1_BUTTOM, 'Demo1', (10, 10))
        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
        sizer.Add(b)

        b = wx.Button(win, DEMO2_BUTTOM, 'Demo2', (10, 50))
        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
        sizer.Add(b)

        b = wx.Button(win, DEMO3_BUTTOM, 'Demo3', (10, 90))
        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
        sizer.Add(b)

        b = wx.Button(win, DEMO4_BUTTOM, 'Demo4', (10, 130))
        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
        sizer.Add(b)

        b = wx.Button(win, DEMO5_BUTTOM, 'Demo5', (10, 170))
        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
        sizer.Add(b)

        b = wx.Button(win, P5_BUTTOM, 'p5', (10, 210))
        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
        # b.Enable(False)
        sizer.Add(b)

        border = wx.BoxSizer(wx.VERTICAL)
        border.Add(sizer, 0, wx.ALL, 25)
        self.SetSizer(border)

        self.leftWindow1 = sizer

        self.win2 = wx.SashLayoutWindow(self,
                                        ID_WINDOW_MIDD,
                                        style=wx.NO_BORDER | wx.SW_3D)
        self.win2.SetDefaultSize((200, 1000))
        self.win2.SetOrientation(wx.LAYOUT_VERTICAL)
        self.win2.SetAlignment(wx.LAYOUT_LEFT)
        self.win2.SetBackgroundColour(wx.Colour(0, 255, 255))

        self.midWindow = self.win2

        self.win3 = wx.SashLayoutWindow(self,
                                        ID_WINDOW_RIGHT,
                                        style=wx.NO_BORDER | wx.SW_3D)
        self.windowRight = None
        self.OnButton(DEMO1_BUTTOM)

        self.SetAutoLayout(True)
        win.Show(True)
Beispiel #20
0
    def __init__(self, parent, log):
        wx.Panel.__init__(self, parent, -1)

        self.log = log

        # will occupy the space not used by the Layout Algorithm
        self.remainingSpace = wx.Panel(self, -1, style=wx.SUNKEN_BORDER)

        self.Bind(
            wx.EVT_SASH_DRAGGED_RANGE,
            self.OnSashDrag,
            id=self.ID_WINDOW_TOP,
            id2=self.ID_WINDOW_BOTTOM,
        )

        self.Bind(wx.EVT_SIZE, self.OnSize)

        # Create some layout windows
        # A window like a toolbar
        win = wx.SashLayoutWindow(self, self.ID_WINDOW_TOP, wx.DefaultPosition,
                                  (200, 30), wx.NO_BORDER | wx.SW_3D)

        win.SetDefaultSize((1000, 30))
        win.SetOrientation(wx.LAYOUT_HORIZONTAL)
        win.SetAlignment(wx.LAYOUT_TOP)
        win.SetBackgroundColour(wx.Colour(255, 0, 0))
        win.SetSashVisible(wx.SASH_BOTTOM, True)

        self.topWindow = win

        # A window like a statusbar
        win = wx.SashLayoutWindow(self, self.ID_WINDOW_BOTTOM,
                                  wx.DefaultPosition, (200, 30),
                                  wx.NO_BORDER | wx.SW_3D)

        win.SetDefaultSize((1000, 30))
        win.SetOrientation(wx.LAYOUT_HORIZONTAL)
        win.SetAlignment(wx.LAYOUT_BOTTOM)
        win.SetBackgroundColour(wx.Colour(0, 0, 255))
        win.SetSashVisible(wx.SASH_TOP, True)

        self.bottomWindow = win

        # A window to the left of the client window
        win = wx.SashLayoutWindow(self, self.ID_WINDOW_LEFT1,
                                  wx.DefaultPosition, (200, 30),
                                  wx.NO_BORDER | wx.SW_3D)

        win.SetDefaultSize((120, 1000))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_LEFT)
        win.SetBackgroundColour(wx.Colour(0, 255, 0))
        win.SetSashVisible(wx.SASH_RIGHT, True)
        win.SetExtraBorderSize(10)
        textWindow = wx.TextCtrl(win, -1, "", wx.DefaultPosition,
                                 wx.DefaultSize,
                                 wx.TE_MULTILINE | wx.SUNKEN_BORDER)

        textWindow.SetValue("A sub window")

        self.leftWindow1 = win

        # Another window to the left of the client window
        win = wx.SashLayoutWindow(self, self.ID_WINDOW_LEFT2,
                                  wx.DefaultPosition, (200, 30),
                                  wx.NO_BORDER | wx.SW_3D)

        win.SetDefaultSize((120, 1000))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_LEFT)
        win.SetBackgroundColour(wx.Colour(0, 255, 255))
        win.SetSashVisible(wx.SASH_RIGHT, True)

        self.leftWindow2 = win
Beispiel #21
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.MDIParentFrame.__init__(self, id=wxID_FRMMAINFRAME,
              name='frmMainFrame', parent=prnt, pos=wx.Point(334, -47),
              size=wx.Size(1032, 775), style=wx.DEFAULT_FRAME_STYLE,
              title='MAKE2')
        self._init_utils()
        self.SetToolTipString('')
        self.SetMenuBar(self.menuBarMain)
        self.Center(wx.BOTH)
        self.SetAutoLayout(True)
        self.SetBackgroundColour(wx.Colour(236, 233, 216))
        self.SetClientSize(wx.Size(1016, 737))
        self.Bind(wx.EVT_SIZE, self.OnFrmMainFrameSize)
        self.Bind(wx.EVT_ACTIVATE, self.OnFrmMainFrameActivate)

        self.statusBarMain = wx.StatusBar(id=wxID_FRMMAINFRAMESTATUSBARMAIN,
              name='statusBarMain', parent=self,
              style=wx.ST_SIZEGRIP | wx.CLIP_CHILDREN)
        self.statusBarMain.SetToolTipString('Status Bar')
        self.statusBarMain.SetExtraStyle(0)
        self._init_coll_statusBarMain_Fields(self.statusBarMain)
        self.SetStatusBar(self.statusBarMain)

        self.sashTopMost = wx.SashLayoutWindow(id=wxID_FRMMAINFRAMESASHTOPMOST,
              name='sashTopMost', parent=self, pos=wx.Point(-270, -20),
              size=wx.Size(1048, 85), style=wx.SW_3D)
        self.sashTopMost.SetBackgroundColour(wx.Colour(4, 56, 85))
        self.sashTopMost.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.sashTopMost.SetAlignment(wx.LAYOUT_TOP)
        self.sashTopMost.SetSashVisible(wx.SASH_BOTTOM, False)
        self.sashTopMost.SetDefaultSize(wx.Size(1048, 100))
        self.sashTopMost.SetDefaultBorderSize(0)
        self.sashTopMost.SetAutoLayout(True)
        self.sashTopMost.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashTopMost.SetConstraints(LayoutAnchors(self.sashTopMost, False,
              False, False, False))
        self.sashTopMost.Bind(wx.EVT_SASH_DRAGGED,
              self.OnSashTopMostSashDragged, id=wxID_FRMMAINFRAMESASHTOPMOST)

        self.sashLeftMost = wx.SashLayoutWindow(id=wxID_FRMMAINFRAMESASHLEFTMOST,
              name='sashLeftMost', parent=self, pos=wx.Point(0, 80),
              size=wx.Size(128, 608),
              style=wx.SW_BORDER | wx.SW_3DSASH | wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLeftMost.SetBackgroundColour(wx.Colour(125, 152, 221))
        self.sashLeftMost.SetExtraBorderSize(0)
        self.sashLeftMost.SetAlignment(wx.LAYOUT_LEFT)
        self.sashLeftMost.SetOrientation(wx.LAYOUT_VERTICAL)
        self.sashLeftMost.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashLeftMost.SetDefaultSize(wx.Size(125, 600))
        self.sashLeftMost.Bind(wx.EVT_SASH_DRAGGED,
              self.OnSashLeftMostSashDragged, id=wxID_FRMMAINFRAMESASHLEFTMOST)

        self.sashBottomMost = wx.SashLayoutWindow(id=wxID_FRMMAINFRAMESASHBOTTOMMOST,
              name='sashBottomMost', parent=self, pos=wx.Point(152, 630),
              size=wx.Size(776, 50), style=wx.SW_3D)
        self.sashBottomMost.SetBackgroundColour(wx.Colour(125, 152, 221))
        self.sashBottomMost.SetAlignment(wx.LAYOUT_BOTTOM)
        self.sashBottomMost.SetSashVisible(wx.SASH_TOP, True)
        self.sashBottomMost.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.sashBottomMost.SetDefaultSize(wx.Size(776, 50))
        self.sashBottomMost.SetExtraBorderSize(5)
        self.sashBottomMost.SetAutoLayout(False)
        self.sashBottomMost.Bind(wx.EVT_SASH_DRAGGED,
              self.OnSashBottomMostSashDragged,
              id=wxID_FRMMAINFRAMESASHBOTTOMMOST)

        self.panTopMost = wx.Panel(id=wxID_FRMMAINFRAMEPANTOPMOST,
              name='panTopMost', parent=self.sashTopMost, pos=wx.Point(0, 0),
              size=wx.Size(1048, 85),
              style=wx.RAISED_BORDER | wx.CLIP_CHILDREN | wx.TAB_TRAVERSAL)
        self.panTopMost.SetAutoLayout(True)
        self.panTopMost.SetBackgroundColour(wx.Colour(243, 248, 253))
        self.panTopMost.SetBackgroundStyle(wx.BG_STYLE_COLOUR)

        self.txtSystemOutput = wx.TextCtrl(id=wxID_FRMMAINFRAMETXTSYSTEMOUTPUT,
              name='txtSystemOutput', parent=self.sashBottomMost,
              pos=wx.Point(4, 4), size=wx.Size(768, 42),
              style=wx.TE_RICH | wx.TE_MULTILINE | wx.HSCROLL | wx.TE_READONLY | wx.VSCROLL | wx.TE_WORDWRAP,
              value='')

        self.ToolBarMain = wx.ToolBar(id=wxID_FRMMAINFRAMETOOLBARMAIN,
              name=u'ToolBarMain', parent=self.panTopMost, pos=wx.Point(0, 0),
              size=wx.Size(1042, 28), style=wx.TB_HORIZONTAL | wx.NO_BORDER)
        self.ToolBarMain.SetConstraints(LayoutAnchors(self.ToolBarMain, True,
              True, True, False))
        self.ToolBarMain.SetToolBitmapSize(wx.Size(24, 24))
        self.ToolBarMain.SetBackgroundColour(wx.Colour(183, 183, 255))

        self.panButtonBar = wx.Panel(id=wxID_FRMMAINFRAMEPANBUTTONBAR,
              name=u'panButtonBar', parent=self.panTopMost, pos=wx.Point(0, 28),
              size=wx.Size(1042, 56), style=wx.TAB_TRAVERSAL)
        self.panButtonBar.SetBackgroundColour(wx.Colour(244, 0, 0))
        self.panButtonBar.SetAutoLayout(True)
        self.panButtonBar.SetConstraints(LayoutAnchors(self.panButtonBar, True,
              False, True, False))
        self.panButtonBar.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, u'MS Shell Dlg 2'))

        self.panLeftMost = wx.Panel(id=wxID_FRMMAINFRAMEPANLEFTMOST,
              name=u'panLeftMost', parent=self.sashLeftMost, pos=wx.Point(0, 0),
              size=wx.Size(125, 608), style=wx.TAB_TRAVERSAL)
        self.panLeftMost.SetBackgroundColour(wx.Colour(125, 152, 221))
        self.panLeftMost.SetAutoLayout(True)
        self.panLeftMost.SetBackgroundStyle(wx.BG_STYLE_SYSTEM)

        self.notebookCase = wx.Notebook(id=wxID_FRMMAINFRAMENOTEBOOKCASE,
              name=u'notebookCase', parent=self.panLeftMost, pos=wx.Point(0, 0),
              size=wx.Size(128, 608), style=0)
        self.notebookCase.SetConstraints(LayoutAnchors(self.notebookCase, True,
              True, True, True))
        self.notebookCase.SetBackgroundColour(wx.Colour(125, 152, 221))
        self.notebookCase.SetForegroundColour(wx.Colour(0, 0, 0))
        self.notebookCase.SetToolTipString('')
        self.notebookCase.SetAutoLayout(False)
        self.notebookCase.Show(False)

        self.panReport = wx.Panel(id=wxID_FRMMAINFRAMEPANREPORT,
              name='panReport', parent=self.notebookCase, pos=wx.Point(0, 0),
              size=wx.Size(120, 582), style=wx.TAB_TRAVERSAL)
        self.panReport.SetAutoLayout(True)

        self.panHome = wx.Panel(id=wxID_FRMMAINFRAMEPANHOME, name='panHome',
              parent=self.notebookCase, pos=wx.Point(0, 0), size=wx.Size(120,
              582), style=wx.TAB_TRAVERSAL)
        self.panHome.SetAutoLayout(True)

        self.panProjProperties = wx.Panel(id=wxID_FRMMAINFRAMEPANPROJPROPERTIES,
              name=u'panProjProperties', parent=self.panHome, pos=wx.Point(4,
              4), size=wx.Size(112, 574), style=wx.TAB_TRAVERSAL)
        self.panProjProperties.SetBackgroundColour(wx.Colour(225, 225, 255))
        self.panProjProperties.SetConstraints(LayoutAnchors(self.panProjProperties,
              True, True, True, True))
        self.panProjProperties.Show(True)

        self.btnProjProperties = wx.Button(id=wxID_FRMMAINFRAMEBTNPROJPROPERTIES,
              label=u'Properties', name=u'btnProjProperties',
              parent=self.panProjProperties, pos=wx.Point(8, 8),
              size=wx.Size(75, 23), style=0)
        self.btnProjProperties.Show(True)
        self.btnProjProperties.Bind(wx.EVT_BUTTON,
              self.OnBtnProjPropertiesButton,
              id=wxID_FRMMAINFRAMEBTNPROJPROPERTIES)

        self.panReportFront = wx.Panel(id=wx.NewId(), name='panel1',
              parent=self.panReport, pos=wx.Point(4, 4), size=wx.Size(112, 574),
              style=wx.TAB_TRAVERSAL)
        self.panReportFront.SetBackgroundColour(wx.Colour(225, 225, 255))
        self.panReportFront.SetConstraints(LayoutAnchors(self.panReportFront,
              True, True, True, True))
        self.panReportFront.Show(True)

        self.btnReportKnownFiles = wx.Button(id=wxID_FRMMAINFRAMEBTNREPORTKNOWNFILES,
              label=u'Known Files', name=u'btnReportKnownFiles',
              parent=self.panReportFront, pos=wx.Point(8, 8), size=wx.Size(88,
              23), style=0)
        self.btnReportKnownFiles.Bind(wx.EVT_BUTTON,
              self.OnBtnReportKnownFilesButton,
              id=wxID_FRMMAINFRAMEBTNREPORTKNOWNFILES)

        self._init_coll_notebookCase_Pages(self.notebookCase)
Beispiel #22
0
    def __init__(self):
        wx.MDIParentFrame.__init__(self,
                                   None,
                                   -1,
                                   "MDI Parent",
                                   size=(600, 400),
                                   style=wx.DEFAULT_FRAME_STYLE | wx.HSCROLL
                                   | wx.VSCROLL)

        self.winCount = 0
        menu = wx.Menu()
        menu.Append(ID_Menu_5Min, "&5Min Window")
        menu.Append(ID_Menu_30Min, "&30Min Window")
        menu.Append(ID_Menu_Day, "&Day Window")
        menu.AppendSeparator()
        menu.Append(ID_Menu_Realtime, "&Realtime Window")
        menu.AppendSeparator()
        menu.Append(ID_Menu_Exit, "E&xit")

        menubar = wx.MenuBar()
        menubar.Append(menu, "&File")
        self.SetMenuBar(menubar)

        #self.CreateStatusBar()

        self.Bind(wx.EVT_MENU, self.OnExit, id=ID_Menu_Exit)

        self.Bind(wx.EVT_SASH_DRAGGED_RANGE,
                  self.OnSashDrag,
                  id=ID_WINDOW_TOP,
                  id2=ID_WINDOW_BOTTOM)

        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)

        # Create some layout windows
        # A window like a toolbar
        win = wx.SashLayoutWindow(self,
                                  ID_WINDOW_TOP,
                                  style=wx.NO_BORDER | wx.SW_3D)
        win.SetDefaultSize((1000, 30))
        win.SetOrientation(wx.LAYOUT_HORIZONTAL)
        win.SetAlignment(wx.LAYOUT_TOP)
        #win.SetBackgroundColour(wx.Colour(255, 0, 0))
        win.SetSashVisible(wx.SASH_BOTTOM, True)

        self.topWindow = win

        # A window like a statusbar
        win = wx.SashLayoutWindow(self,
                                  ID_WINDOW_BOTTOM,
                                  style=wx.NO_BORDER | wx.SW_3D)
        win.SetDefaultSize((1000, 30))
        win.SetOrientation(wx.LAYOUT_HORIZONTAL)
        win.SetAlignment(wx.LAYOUT_BOTTOM)
        #win.SetBackgroundColour(wx.Colour(0, 0, 255))
        win.SetSashVisible(wx.SASH_TOP, True)

        self.bottomWindow = win

        # A window to the left of the client window
        win = wx.SashLayoutWindow(self,
                                  ID_WINDOW_LEFT1,
                                  style=wx.NO_BORDER | wx.SW_3D)
        win.SetDefaultSize((120, 1000))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_LEFT)
        #win.SetBackgroundColour(wx.Colour(0, 255, 255))
        win.SetSashVisible(wx.SASH_RIGHT, True)
        win.SetExtraBorderSize(10)
        textWindow = wx.TextCtrl(win,
                                 -1,
                                 "",
                                 style=wx.TE_MULTILINE | wx.SUNKEN_BORDER)
        textWindow.SetValue("A sub window")

        self.leftWindow1 = win

        # Another window to the left of the client window
        win = wx.SashLayoutWindow(self,
                                  ID_WINDOW_LEFT2,
                                  style=wx.NO_BORDER | wx.SW_3D)
        win.SetDefaultSize((120, 1000))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_LEFT)
        #win.SetBackgroundColour(wx.Colour(0, 255, 255))
        l1 = wx.StaticText(win, -1, "Enter Symbol", pos=(5, 5))
        self.symbol_ctrl = wx.TextCtrl(win,
                                       -1,
                                       "Enter Symbol",
                                       pos=(5, 50),
                                       size=(100, -1),
                                       style=wx.TE_PROCESS_ENTER)
        win.SetSashVisible(wx.SASH_RIGHT, True)

        self.leftWindow2 = win
Beispiel #23
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
              pos=wx.Point(428, 269), size=wx.Size(1130, 702),
              style=wx.DEFAULT_FRAME_STYLE, title=u'Android_Test')
        self.SetClientSize(wx.Size(1114, 664))
        self.Bind(wx.EVT_SIZE, self.OnFrame1Size)

        self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
              pos=wx.Point(648, 0), size=wx.Size(463, 664),
              style=wx.TAB_TRAVERSAL)
        self.panel1.SetMinSize(wx.Size(455, 778))

        self.sashLayoutWindow1 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW1,
              name='sashLayoutWindow1', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(272, 664), style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow1.SetExtraBorderSize(20)
        self.sashLayoutWindow1.SetAlignment(wx.LAYOUT_LEFT)
        self.sashLayoutWindow1.SetOrientation(wx.LAYOUT_VERTICAL)
        self.sashLayoutWindow1.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashLayoutWindow1.SetExtraBorderSize(20)
        self.sashLayoutWindow1.SetDefaultSize(wx.Size(272, 778))
        self.sashLayoutWindow1.Bind(wx.EVT_SASH_DRAGGED,
              self.OnSashLayoutWindow1SashDragged,
              id=wxID_FRAME1SASHLAYOUTWINDOW1)

        self.sashLayoutWindow2 = wx.SashLayoutWindow(id=wxID_FRAME1SASHLAYOUTWINDOW2,
              name='sashLayoutWindow2', parent=self, pos=wx.Point(272, 0),
              size=wx.Size(378, 664), style=wx.CLIP_CHILDREN | wx.SW_3D)
        self.sashLayoutWindow2.SetDefaultSize(wx.Size(370, 664))
        self.sashLayoutWindow2.SetAlignment(wx.LAYOUT_LEFT)
        self.sashLayoutWindow2.SetOrientation(wx.LAYOUT_VERTICAL)
        self.sashLayoutWindow2.SetSashVisible(wx.SASH_RIGHT, True)
        self.sashLayoutWindow2.SetDefaultSize(wx.Size(378, 778))
        self.sashLayoutWindow2.Bind(wx.EVT_SASH_DRAGGED,
              self.OnSashLayoutWindow2SashDragged,
              id=wxID_FRAME1SASHLAYOUTWINDOW2)

        self.textReturn = wx.TextCtrl(id=wxID_FRAME1TEXTRETURN,
              name=u'textReturn', parent=self.panel1, pos=wx.Point(104, 0),
              size=wx.Size(1110, 1050), style=wx.TE_MULTILINE, value='')

        self.textEditor = wx.TextCtrl(id=wxID_FRAME1TEXTEDITOR,
              name=u'textEditor', parent=self.sashLayoutWindow2, pos=wx.Point(0,
              0), size=wx.Size(375, 664), style=wx.TE_MULTILINE, value='')
        self.textEditor.Bind(wx.EVT_LEFT_DOWN, self.OnTextEditorLeftDown)

        self.button1 = wx.Button(id=wxID_FRAME1BUTTON1,
              label=u'\u5355\u6b65\u6267\u884c', name='button1',
              parent=self.panel1, pos=wx.Point(8, 48), size=wx.Size(75, 24),
              style=0)
        self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
              id=wxID_FRAME1BUTTON1)

        self.button2 = wx.Button(id=wxID_FRAME1BUTTON2,
              label=u'\u6279\u91cf\u6267\u884c', name='button2',
              parent=self.panel1, pos=wx.Point(8, 128), size=wx.Size(75, 24),
              style=0)
        self.button2.Bind(wx.EVT_BUTTON, self.OnButton2Button,
              id=wxID_FRAME1BUTTON2)

        self.genericDirCtrl1 = wx.GenericDirCtrl(defaultFilter=0, dir='.',
              filter='Fichier txt (*.txt)|*.txt', id=wxID_FRAME1GENERICDIRCTRL1,
              name='genericDirCtrl1', parent=self.sashLayoutWindow1,
              pos=wx.Point(0, 0), size=wx.Size(270, 664),
              style=wx.DIRCTRL_3D_INTERNAL | wx.SUNKEN_BORDER)
        self.genericDirCtrl1.SetMinSize(wx.Size(270, 664))
        self.genericDirCtrl1.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSel)

        self.button3 = wx.Button(id=wxID_FRAME1BUTTON3, label=u'\u4fdd\u5b58',
              name='button3', parent=self.panel1, pos=wx.Point(8, 248),
              size=wx.Size(75, 24), style=0)
        self.button3.Bind(wx.EVT_BUTTON, self.OnButton3Button,
              id=wxID_FRAME1BUTTON3)

        self.button4 = wx.Button(id=wxID_FRAME1BUTTON4,
              label=u'\u53e6\u5b58\u4e3a', name='button4', parent=self.panel1,
              pos=wx.Point(8, 288), size=wx.Size(75, 24), style=0)
        self.button4.Bind(wx.EVT_BUTTON, self.OnButton4Button,
              id=wxID_FRAME1BUTTON4)

        self.button5 = wx.Button(id=wxID_FRAME1BUTTON5,
              label=u'\u5f53\u524d\u8bbe\u5907', name='button5',
              parent=self.panel1, pos=wx.Point(8, 576), size=wx.Size(75, 24),
              style=0)
        self.button5.Bind(wx.EVT_BUTTON, self.OnButton5Button,
              id=wxID_FRAME1BUTTON5)

        self.button6 = wx.Button(id=wxID_FRAME1BUTTON6,
              label=u'\u6e05\u7a7a\u7ed3\u679c', name='button6',
              parent=self.panel1, pos=wx.Point(8, 616), size=wx.Size(75, 24),
              style=0)
        self.button6.Bind(wx.EVT_BUTTON, self.OnButton6Button,
              id=wxID_FRAME1BUTTON6)

        self.button7 = wx.Button(id=wxID_FRAME1BUTTON7,
              label=u'\u6267\u884c\u9009\u4e2d', name='button7',
              parent=self.panel1, pos=wx.Point(8, 88), size=wx.Size(75, 24),
              style=0)
        self.button7.Bind(wx.EVT_BUTTON, self.OnButton7Button,
              id=wxID_FRAME1BUTTON7)

        self.bitmapButton1 = wx.BitmapButton(bitmap=wx.Bitmap(u'undo.png',
              wx.BITMAP_TYPE_PNG), id=wxID_FRAME1BITMAPBUTTON1,
              name='bitmapButton1', parent=self.panel1, pos=wx.Point(8, 208),
              size=wx.Size(24, 24), style=wx.BU_AUTODRAW)
        self.bitmapButton1.Bind(wx.EVT_BUTTON, self.OnBitmapButton1Button,
              id=wxID_FRAME1BITMAPBUTTON1)

        self.bitmapButton2 = wx.BitmapButton(bitmap=wx.Bitmap(u'redo.png',
              wx.BITMAP_TYPE_PNG), id=wxID_FRAME1BITMAPBUTTON2,
              name='bitmapButton2', parent=self.panel1, pos=wx.Point(56, 208),
              size=wx.Size(24, 24), style=wx.BU_AUTODRAW)
        self.bitmapButton2.Bind(wx.EVT_BUTTON, self.OnBitmapButton2Button,
              id=wxID_FRAME1BITMAPBUTTON2)

        self.button8 = wx.Button(id=wxID_FRAME1BUTTON8, label=u'Dump XML',
              name='button8', parent=self.panel1, pos=wx.Point(8, 384),
              size=wx.Size(75, 24), style=0)
        self.button8.Bind(wx.EVT_BUTTON, self.OnButton8Button,
              id=wxID_FRAME1BUTTON8)

        self.button9 = wx.Button(id=wxID_FRAME1BUTTON9,
              label=u'\u67e5\u627e\u8282\u70b9', name='button9',
              parent=self.panel1, pos=wx.Point(8, 464), size=wx.Size(75, 24),
              style=0)
        self.button9.Bind(wx.EVT_BUTTON, self.OnButton9Button,
              id=wxID_FRAME1BUTTON9)

        self.textCtrl1 = wx.TextCtrl(id=wxID_FRAME1TEXTCTRL1, name='textCtrl1',
              parent=self.panel1, pos=wx.Point(0, 424), size=wx.Size(104, 22),
              style=0, value=u'')
Beispiel #24
0
    def activate(self, sidebarwin):
        """
		Set the mode of visualization
		"""
        scripting.preferRGB = 0
        scripting.wantAlphaChannel = 1
        scripting.wantWholeDataset = 1
        self.sidebarWin = sidebarwin
        # If we're preloading, don't create the render window
        # since it will mess up the rendering

        if not self.wxrenwin and not self.visualizer.preload:
            self.wxrenwin = VisualizerWindow.VisualizerWindow(self.parent,
                                                              size=(512, 512))
            self.wxrenwin.Render()
            self.GetRenderWindow = self.wxrenwin.GetRenderWindow
            self.renwin = self.wxrenwin.GetRenderWindow()
            self.wxrenwin.Render()
            self.iactivePanel = self.wxrenwin
            scripting.renderWindow = self.renwin
            scripting.renderer = self.wxrenwin.getRenderer()
            self.getRenderer = self.GetRenderer = self.wxrenwin.getRenderer

        else:
            self.wxrenwin.iren.Enable()

        if not self.configPanel:
            # When we embed the sidebar in a sashlayoutwindow, the size
            # is set correctly
            self.container = wx.SashLayoutWindow(self.sidebarWin)

            self.configPanel = VisualizationFrame.ConfigurationPanel(
                self.container, self.visualizer, self)

        self.container.Show()
        self.configPanel.Show()

        if not self.lightsManager:
            self.lightsManager = Lights.LightManager(self.parent,
                                                     self.wxrenwin,
                                                     self.getRenderer(),
                                                     mode='raymond')

        mgr = self.menuManager

        self.visualizer.tb.EnableTool(GUI.MenuManager.ID_ZOOM_TO_FIT, 0)

        if not scripting.TFLag:
            mgr.enable(GUI.MenuManager.ID_LIGHTS,
                       self.configPanel.onConfigureLights)
        #mgr.enable(GUI.MenuManager.ID_RENDERWIN, self.configPanel.onConfigureRenderwindow)
        mgr.addMenuItem("file", GUI.MenuManager.ID_LOAD_SCENE, "Open 3D view scene...", \
            "Open a 3D view scene file", self.configPanel.onOpenScene, \
            before = GUI.MenuManager.ID_IMPORT_IMAGES)
        mgr.addMenuItem("file", GUI.MenuManager.ID_SAVE_SCENE, "Save 3D view scene...", \
            "Save a 3D view scene", self.configPanel.onSaveScene, \
            before = GUI.MenuManager.ID_IMPORT_IMAGES)
        mgr.addSeparator("file", sepid = GUI.MenuManager.ID_SEPARATOR, \
             before = GUI.MenuManager.ID_IMPORT_IMAGES)

        self.visualizer.pitch.Bind(wx.EVT_SPIN_UP, self.onPitchUp)
        self.visualizer.pitch.Bind(wx.EVT_SPIN_DOWN, self.onPitchDown)
        self.visualizer.yaw.Bind(wx.EVT_SPIN_UP, self.onYawUp)
        self.visualizer.yaw.Bind(wx.EVT_SPIN_DOWN, self.onYawDown)
        self.visualizer.roll.Bind(wx.EVT_SPIN_UP, self.onRollUp)
        self.visualizer.roll.Bind(wx.EVT_SPIN_DOWN, self.onRollDown)
        self.visualizer.elevation.Bind(wx.EVT_SPIN_UP, self.onElevationUp)
        self.visualizer.elevation.Bind(wx.EVT_SPIN_DOWN, self.onElevationDown)

        return self.wxrenwin
Beispiel #25
0
    def __init__(self,
                 parent,
                 id,
                 title,
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE,
                 name='frame',
                 fps=30,
                 glCanvasSize=wx.DefaultSize,
                 showConsole=True,
                 consoleEnvironment={}):

        # Check if a fixed glWindow was asked
        fixedGlWindow = glCanvasSize != wx.DefaultSize
        self._glCanvasSize = glCanvasSize

        #
        # Forcing a specific style on the window.
        #   Should this include styles passed?
        style |= wx.NO_FULL_REPAINT_ON_RESIZE

        # Not resizable if GL canvas is fixed size
        if fixedGlWindow:
            style &= ~wx.RESIZE_BORDER & ~wx.MAXIMIZE_BOX

        super(MainWindow, self).__init__(parent, id, title, pos, size, style,
                                         name)

        #
        # Create the menu

        self._menuBar = wx.MenuBar()
        self._fileMenu = wx.Menu()
        self._fileMenu.Append(wx.ID_OPEN, "&Open")
        self._fileMenu.Append(wx.ID_SAVE, "&Save")
        self._fileMenu.AppendSeparator()
        self._fileMenu.Append(wx.ID_EXIT, "&Quit")
        self._menuBar.Append(self._fileMenu, "&File")

        self._helpMenu = wx.Menu()
        self._helpMenu.Append(wx.ID_ABOUT, "&About")
        self._menuBar.Append(self._helpMenu, "&Help")

        self.SetMenuBar(self._menuBar)

        #
        # Create the GL canvas
        attribList = (
            wx.glcanvas.WX_GL_RGBA,  # RGBA
            wx.glcanvas.WX_GL_DOUBLEBUFFER,  # Double Buffered
            wx.glcanvas.WX_GL_DEPTH_SIZE,
            24,  # 24 bit depth
            wx.glcanvas.WX_GL_STENCIL_SIZE,
            8)  # 8 bit stencil

        self._glCanvas = UI.GLPanel(self,
                                    fps=fps,
                                    size=glCanvasSize,
                                    attribList=attribList)

        # Create the right window (sashed) where the tool panel will be
        self._rightWindow = wx.SashLayoutWindow(self)
        self._rightWindow.SetDefaultSize(
            (MainWindow.MIN_TOOLPANEL_WIDTH * 1.3, -1))
        self._rightWindow.SetMinimumSizeX(MainWindow.MIN_TOOLPANEL_WIDTH)
        self._rightWindow.SetOrientation(wx.LAYOUT_VERTICAL)
        self._rightWindow.SetAlignment(wx.LAYOUT_RIGHT)
        if not fixedGlWindow:
            self._rightWindow.SetSashVisible(wx.SASH_LEFT, True)
        self._rightWindow.Bind(wx.EVT_SASH_DRAGGED, self.onSashDragRightWindow)

        #
        # Create the tool panel
        self._toolPanel = UI.ToolPanel(self._rightWindow)

        # Create the bottom window (sashed) where the console will be
        self._bottomWindow = wx.SashLayoutWindow(self)
        self._bottomWindow.SetDefaultSize(
            (-1, MainWindow.MIN_CONSOLE_HEIGHT * 2))
        self._bottomWindow.SetMinimumSizeY(MainWindow.MIN_CONSOLE_HEIGHT)
        self._bottomWindow.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self._bottomWindow.SetAlignment(wx.LAYOUT_BOTTOM)
        if not fixedGlWindow:
            self._bottomWindow.SetSashVisible(wx.SASH_TOP, True)
        self._bottomWindow.Bind(wx.EVT_SASH_DRAGGED,
                                self.onSashDragBottomWindow)

        #
        # Create the console window
        self._console = UI.PythonConsole(self._bottomWindow,
                                         size=(-1, 220),
                                         consoleEnvironment=consoleEnvironment)
        if not showConsole:
            self._bottomWindow.Hide()

        self.Bind(wx.EVT_SIZE, self.onSize)
Beispiel #26
0
    def __init__(self, parent, grand_parent):

        settings = conf.getSettings()

        wx.Panel.__init__(self, parent, -1)
        self.grand_parent = grand_parent
        self.ID_WINDOW_TOP = wx.NewId()
        self.ID_WINDOW_RIGHT = wx.NewId()
        self.ID_WINDOW_LEFT = wx.NewId()
        self.ID_WINDOW_BOTTOM = wx.NewId()
        wx.EVT_SASH_DRAGGED_RANGE(self, self.ID_WINDOW_TOP,
                                  self.ID_WINDOW_BOTTOM, self.OnSashDrag)
        wx.EVT_SIZE(self, self.OnSize)

        # The following will occupy the space not used by the Layout Algorithm
        self.grand_parent.WorldDisplay = WorldGUI(self, -1)
        # Create the other windows
        # At the top, a window-like a toolbar containing buttons

        win = wx.SashLayoutWindow(self, self.ID_WINDOW_TOP, wx.DefaultPosition,
                                  wx.Size(800, 40), wx.NO_BORDER | wx.SW_3D)
        win.SetOrientation(wx.LAYOUT_HORIZONTAL)
        win.SetAlignment(wx.LAYOUT_TOP)  #top
        win.SetSashVisible(wx.SASH_BOTTOM, True)
        self.topWindow = win

        # A window to the right of the client window
        win = wx.SashLayoutWindow(self,
                                  self.ID_WINDOW_RIGHT, wx.DefaultPosition,
                                  wx.Size(350, 600), wx.NO_BORDER | wx.SW_3D)
        win.SetDefaultSize(wx.Size(0, 600))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_RIGHT)
        win.SetSashVisible(wx.SASH_LEFT, True)
        self.grand_parent.rightWindow = win
        self.grand_parent.rightWindow.isVisible = False

        # Another window to the left of the client window
        win = wx.SashLayoutWindow(self,
                                  self.ID_WINDOW_LEFT, wx.DefaultPosition,
                                  wx.Size(300, 600), wx.NO_BORDER | wx.SW_3D)
        win.SetDefaultSize(wx.Size(settings.SCREEN[2], 600))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_LEFT)
        win.SetSashVisible(wx.SASH_RIGHT, True)
        self.leftWindow = win
        #### new
        # Output window at the bottom
        win = wx.SashLayoutWindow(self, self.ID_WINDOW_BOTTOM,
                                  wx.DefaultPosition,
                                  wx.Size(800, settings.SCREEN[3]),
                                  wx.NO_BORDER | wx.SW_3D)
        #winids.append(win.GetId())
        #win.SetDefaultSize((WIDTH, self.output_default_height))
        win.SetOrientation(wx.LAYOUT_HORIZONTAL)
        win.SetAlignment(wx.LAYOUT_BOTTOM)
        win.SetSashVisible(wx.SASH_TOP, True)
        self.bottomWindow = win
        self.output_window = LogWindow(self.bottomWindow)
        self.bottomWindow.SetDefaultSize(wx.Size(800, settings.SCREEN[3]))
        ####################
        self.grand_parent.ch = rurChoiceWindow(self.topWindow,
                                               self.grand_parent)
        self.topWindow.SetDefaultSize(
            wx.Size(800, self.grand_parent.BUTTON_HEIGHT))

        self.grand_parent.WorldEditor = wx.Panel(self.grand_parent.rightWindow,
                                                 -1)
        self.grand_parent.ProgramEditor = rur_editor(self.leftWindow, -1)
        # to update from within WorldDisplay, create the following link
        self.grand_parent.WorldDisplay.editor = self.grand_parent.rightWindow
Beispiel #27
0
    def __init__(self,
                 parent,
                 grand_parent=None,
                 controller=ControlPanel,
                 top_control=False,
                 top_control_height=-1):
        wx.Panel.__init__(self, parent, -1)
        self.parent = parent
        winids = []
        self.arguments = ''
        self.output_default_height = OUT_HEIGHT
        self.output_default_width = OUT_WIDTH
        if top_control:  # for embedding in RUR-PLE
            self.controls = wx.SashLayoutWindow(self, -1)
            winids.append(self.controls.GetId())
            self.controls.SetDefaultSize((WIDTH, top_control_height))
            self.controls.SetOrientation(wx.LAYOUT_HORIZONTAL)
            self.controls.SetAlignment(wx.LAYOUT_TOP)
            win = controller(self.controls, self)
        else:  # Left window has fixed size and contains control buttons
            self.controls = wx.SashLayoutWindow(self, -1)
            winids.append(self.controls.GetId())
            self.controls.SetDefaultSize((100, HEIGHT))
            self.controls.SetOrientation(wx.LAYOUT_VERTICAL)
            self.controls.SetAlignment(wx.LAYOUT_LEFT)
            win = controller(self.controls, self)
        if grand_parent is not None:
            grand_parent.py_ch = win

        self.remainingSpace = wx.SashLayoutWindow(self,
                                                  -1,
                                                  style=wx.NO_BORDER
                                                  | wx.SW_3D)
        self.PythonEditor = PythonEditor(self.remainingSpace)
        # Output window at the bottom
        win = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, wx.DefaultSize,
                                  wx.NO_BORDER | wx.SW_3D)
        winids.append(win.GetId())
        win.SetDefaultSize((WIDTH, self.output_default_height))
        win.SetOrientation(wx.LAYOUT_HORIZONTAL)
        win.SetAlignment(wx.LAYOUT_BOTTOM)
        win.SetSashVisible(wx.SASH_TOP, True)
        win.SetExtraBorderSize(8)
        self.bottomWindow = win
        # Output window at the right
        win = wx.SashLayoutWindow(self, -1, wx.DefaultPosition, wx.DefaultSize,
                                  wx.NO_BORDER | wx.SW_3D)
        winids.append(win.GetId())
        win.SetDefaultSize((self.output_default_width, HEIGHT))
        win.SetOrientation(wx.LAYOUT_VERTICAL)
        win.SetAlignment(wx.LAYOUT_RIGHT)
        win.SetSashVisible(wx.SASH_LEFT, True)
        win.SetExtraBorderSize(8)
        self.rightWindow = win

        self.output_window_bottom = LogWindow(self.bottomWindow)
        self.output_window_right = LogWindow(self.rightWindow)
        if OUTPUT == RIGHT:
            self.output_window = self.output_window_right
            self.hide_bottom_window = True
            self.hide_right_window = HIDDEN
        else:
            self.output_window = self.output_window_bottom
            self.hide_bottom_window = HIDDEN
            self.hide_right_window = True
        self.show_bottom()
        self.show_right()

        self.Bind(wx.EVT_SASH_DRAGGED_RANGE,
                  self.OnSashDrag,
                  id=min(winids),
                  id2=max(winids))
        self.Bind(wx.EVT_SIZE, self.OnSize)
        # drag and drop
        dt = MyFileDropTarget(self)
        self.PythonEditor.SetDropTarget(dt)
Beispiel #28
0
    def SetupSashLayout(self, parent):
        winids = []

        # where the view filter control bar goes to
        h = 30
        filterfootwin = wx.SashLayoutWindow(parent,
                                            -1,
                                            wx.DefaultPosition, (200, h),
                                            wx.NO_BORDER | wx.SW_3D,
                                            name='filterfootwin')
        filterfootwin.SetDefaultSize((1000, h))
        filterfootwin.SetMaximumSizeY(h)
        filterfootwin.SetMinimumSizeY(h)
        filterfootwin.SetOrientation(wx.LAYOUT_HORIZONTAL)
        filterfootwin.SetAlignment(wx.LAYOUT_BOTTOM)
        filterfootwin.SetBackgroundColour(wx.WHITE)
        filterfootwin.SetSashVisible(wx.SASH_TOP, True)

        headpanel = wx.Panel(filterfootwin, style=wx.BORDER_STATIC)
        headpanel.SetBackgroundColour(
            wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE))
        self.filtersizebutton = wx.Button(headpanel, wx.ID_ANY,
                                          _('Filter') + ' >>')
        self.Bind(wx.EVT_BUTTON, self.OnFilterSizeButtonClick,
                  self.filtersizebutton)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        hbox.Add(self.filtersizebutton)
        hbox.AddStretchSpacer()

        self.filterstatus = {}
        for artefact in afresource.ARTEFACTLIST:
            stext = wx.StaticText(headpanel,
                                  -1,
                                  ' ' + afresource.ARTEFACTSHORT[artefact] +
                                  ' ',
                                  style=wx.BORDER_STATIC)
            hbox.Add(stext, 0, wx.LEFT | wx.TOP, 5)
            self.filterstatus[artefact] = stext

        hbox.AddSpacer(10)
        headpanel.SetSizer(hbox)
        self.headpanel = headpanel

        # where the view filter goes to
        h = 200
        bottomwin = wx.SashLayoutWindow(parent,
                                        -1,
                                        wx.DefaultPosition,
                                        (parent.GetClientSize()[0], h),
                                        wx.NO_BORDER | wx.SW_3D,
                                        name='bottomwin')
        bottomwin.SetMaximumSizeY(200)
        bottomwin.SetMinimumSizeY(h)
        bottomwin.SetOrientation(wx.LAYOUT_HORIZONTAL)
        bottomwin.SetAlignment(wx.LAYOUT_BOTTOM)
        bottomwin.SetSashVisible(wx.SASH_TOP, False)
        bottomwin.Hide()

        # A window to the left of the client window
        leftwin = wx.SashLayoutWindow(parent,
                                      -1,
                                      wx.DefaultPosition, (200, 30),
                                      wx.NO_BORDER | wx.SW_3D,
                                      name='leftwin')
        leftwin.SetDefaultSize((self.config.ReadInt("sash_pos_x", 250), 1000))
        leftwin.SetMaximumSizeX(250)
        leftwin.SetMinimumSizeX(150)
        leftwin.SetOrientation(wx.LAYOUT_VERTICAL)
        leftwin.SetAlignment(wx.LAYOUT_LEFT)
        leftwin.SetBackgroundColour(wx.WHITE)
        leftwin.SetSashVisible(wx.SASH_RIGHT, True)

        self.leftWindow = leftwin
        winids.append(leftwin.GetId())
        self.bottomWindow = bottomwin
        winids.append(bottomwin.GetId())

        # will occupy the space not used by the Layout Algorithm
        self.rightWindow = wx.Panel(parent,
                                    -1,
                                    style=wx.SUNKEN_BORDER,
                                    name='rightPanel')

        self.Bind(wx.EVT_SASH_DRAGGED_RANGE,
                  self.OnSashDrag,
                  id=min(winids),
                  id2=max(winids))
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
Beispiel #29
0
    def __init__(self, parent):
        wx.Panel.__init__(self, parent, -1, size=(0, 0))

        self.parent = parent
        self.mainframe = parent

        width, height = self.GetSizeTuple()

        self.pages = []

        self.ID_TOP = Id.makeid(self, 'ID_TOP')
        self.ID_BOTTOM = Id.makeid(self, 'ID_BOTTOM')
        self.ID_LEFT = Id.makeid(self, 'ID_LEFT')
        self.ID_RIGHT = Id.makeid(self, 'ID_RIGHT')

        wx.EVT_SASH_DRAGGED(self, self.ID_TOP, self.OnSashDrag)
        wx.EVT_SASH_DRAGGED(self, self.ID_BOTTOM, self.OnSashDrag)
        wx.EVT_SASH_DRAGGED(self, self.ID_LEFT, self.OnSashDrag)
        wx.EVT_SASH_DRAGGED(self, self.ID_RIGHT, self.OnSashDrag)

        self.toptuple = (width, height)
        self.lefttuple = (0, 0)
        self.righttuple = (0, 0)
        self.bottomtuple = (0, 0)

        self.bottomsize = 20
        self.leftsize = 20
        self.rightsize = 30

        self.BottomIsVisible = False
        self.LeftIsVisible = False
        self.RightIsVisible = False

        self.top = wx.SashLayoutWindow(self, self.ID_TOP, wx.DefaultPosition,
                                       wx.DefaultSize, wx.NO_BORDER)

        self.top.SetDefaultSize((width, height))
        self.top.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.top.SetAlignment(wx.LAYOUT_TOP)

        self.bottom = wx.SashLayoutWindow(self, self.ID_BOTTOM,
                                          wx.DefaultPosition, wx.DefaultSize,
                                          wx.NO_BORDER)

        self.bottom.SetDefaultSize((width, height))
        self.bottom.SetOrientation(wx.LAYOUT_HORIZONTAL)
        self.bottom.SetAlignment(wx.LAYOUT_BOTTOM)
        self.bottom.SetSashVisible(wx.SASH_TOP, True)
        #        self.bottom.SetSashBorder(wx.SASH_TOP, True)

        self.left = wx.SashLayoutWindow(self, self.ID_LEFT, wx.DefaultPosition,
                                        wx.DefaultSize, wx.NO_BORDER)

        self.left.SetDefaultSize((100, 1000))
        self.left.SetOrientation(wx.LAYOUT_VERTICAL)
        self.left.SetAlignment(wx.LAYOUT_LEFT)
        self.left.SetSashVisible(wx.SASH_RIGHT, True)
        #        self.left.SetSashBorder(wx.SASH_RIGHT, True)

        self.right = wx.SashLayoutWindow(self, self.ID_RIGHT,
                                         wx.DefaultPosition, wx.DefaultSize,
                                         wx.NO_BORDER)

        self.right.SetDefaultSize((100, 1000))
        self.right.SetOrientation(wx.LAYOUT_VERTICAL)
        self.right.SetAlignment(wx.LAYOUT_RIGHT)
        self.right.SetSashVisible(wx.SASH_LEFT, True)
        #        self.right.SetSashBorder(wx.SASH_LEFT, True)

        wx.EVT_SIZE(self, self.OnSize)

        self.leftbook = None
        self.rightbook = None
        self.bottombook = None