当前位置: 首页>>代码示例>>Python>>正文


Python wx.aui方法代码示例

本文整理汇总了Python中wx.aui方法的典型用法代码示例。如果您正苦于以下问题:Python wx.aui方法的具体用法?Python wx.aui怎么用?Python wx.aui使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wx的用法示例。


在下文中一共展示了wx.aui方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def __init__(self, parent, frame, interpreter):
        self._frame = frame
        wx.Panel.__init__(self, parent, -1)

        bookStyle = aui.AUI_NB_DEFAULT_STYLE
        bookStyle &= ~(aui.AUI_NB_CLOSE_ON_ACTIVE_TAB)

        self.rawpanel = HttpRawPanel(self, self)
        self.renderpanel = self.create_web_view()

        self.nb = aui.AuiNotebook(self, style=bookStyle)
        self.nb.AddPage(self.rawpanel, "HTML Raw")
        self.nb.AddPage(self.renderpanel, "HTML Render")

        sizer = wx.BoxSizer()
        sizer.Add(self.nb, 1, wx.EXPAND)
        self.SetSizer(sizer)
        wx.CallAfter(self.nb.SendSizeEvent)

        pub.subscribe(self.on_selected_row, "selected_row") 
开发者ID:xmendez,项目名称:wfuzz,代码行数:22,代码来源:guicontrols.py

示例2: CreateLogCtrl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def CreateLogCtrl(self):
        logCtrl = LogCtrl(self)
        logCtrl.Freeze()
        if not Config.logDate:
            logCtrl.SetDateLogging(False)
        if not Config.logTime:
            logCtrl.SetTimeLogging(False)
        logCtrl.SetIndent(Config.indentLog)
        self.auiManager.AddPane(
            logCtrl,
            wx.aui.AuiPaneInfo().
            Name("logger").
            Left().
            MinSize((280, 300)).
            MaximizeButton(True).
            CloseButton(False).
            Caption(" " + Text.Logger.caption)
        )
        self.auiManager.Update()
        logCtrl.Thaw()
        return logCtrl 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:23,代码来源:__init__.py

示例3: CreateTreeCtrl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def CreateTreeCtrl(self):
        treeCtrl = TreeCtrl(self, document=self.document)
        self.auiManager.AddPane(
            treeCtrl,
            wx.aui.AuiPaneInfo().
            Name("tree").
            Center().
            MinSize((100, 100)).
            Floatable(True).
            Dockable(True).
            MaximizeButton(True).
            Caption(" " + Text.Tree.caption).
            CloseButton(False)
        )
        self.auiManager.Update()
        treeCtrl.SetFocus()
        return treeCtrl 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:19,代码来源:__init__.py

示例4: SaveTabLayout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def SaveTabLayout(self, notebook):
        tabs = []
        for child in notebook.GetChildren():
            if isinstance(child, wx.aui.AuiTabCtrl):
                if child.GetPageCount() > 0:
                    pos = child.GetPosition()
                    tab = {"pos": (pos.x, pos.y), "pages": []}
                    tab_size = child.GetSize()
                    for page_idx in xrange(child.GetPageCount()):
                        page = child.GetWindowFromIdx(page_idx)
                        if "size" not in tab:
                            tab["size"] = (tab_size[0], tab_size[1] + page.GetSize()[1])
                        tab_infos = self.GetTabInfos(page)
                        if tab_infos is not None:
                            tab["pages"].append((tab_infos, page_idx == child.GetActivePage()))
                    tabs.append(tab)
        tabs.sort(lambda x, y: cmp(x["pos"], y["pos"]))
        size = notebook.GetSize()
        return ComputeTabsLayout(tabs, wx.Rect(1, 1, size[0] - NOTEBOOK_BORDER, size[1] - NOTEBOOK_BORDER)) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:21,代码来源:IDEFrame.py

示例5: start_gui

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def start_gui(self, controller):
        self.controller = controller
        # tell FrameManager to manage this frame
        self._mgr = wx.aui.AuiManager()
        self._mgr.SetManagedWindow(self)

        # create menu
        mb = wx.MenuBar()

        file_menu = wx.Menu()
        file_menu.Append(wx.ID_EXIT, "Exit")

        help_menu = wx.Menu()
        help_menu.Append(ID_About, "About...")

        mb.Append(file_menu, "File")
        mb.Append(help_menu, "Help")

        self.SetMenuBar(mb)

        self.SetMinSize(wx.Size(400, 300))

        # create some center panes
        self._mgr.AddPane(MainNotebookPanel(self, self, controller._interp), wx.aui.AuiPaneInfo().Caption("Raw HTTP Content").Name("analysis_notebook").CenterPane())
        self._mgr.AddPane(self.CreateNotebook(), wx.aui.AuiPaneInfo().Name("main_notebook").CenterPane())
        self._mgr.Update()

        self.Bind(wx.EVT_CLOSE, self.OnClose)
        self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT)
        self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About)

        pub.subscribe(self.OnAddTab, "create_tab") 
开发者ID:xmendez,项目名称:wfuzz,代码行数:34,代码来源:guicontrols.py

示例6: CreateNotebook

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def CreateNotebook(self):
        bookStyle = aui.AUI_NB_DEFAULT_STYLE
        # bookStyle &= ~(aui.AUI_NB_CLOSE_ON_ACTIVE_TAB)

        bookStyle = aui.AUI_NB_DEFAULT_STYLE | aui.AUI_NB_TAB_EXTERNAL_MOVE | wx.NO_BORDER

        client_size = self.GetClientSize()
        nb = aui.AuiNotebook(self, -1, wx.Point(client_size.x, client_size.y), wx.Size(430, 200), agwStyle=bookStyle)

        nb.AddPage(ListPanel(self, self, self.controller._model, self.controller._interp), "Main")

        return nb 
开发者ID:xmendez,项目名称:wfuzz,代码行数:14,代码来源:guicontrols.py

示例7: OnPaneClose

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def OnPaneClose(self, event):
        """
        React to a wx.aui.EVT_AUI_PANE_CLOSE event.

        Monitors if the toolbar gets closed and updates the check menu
        entry accordingly
        """
        paneName = event.GetPane().name
        if paneName == "toolBar":
            Config.showToolbar = False
            self.menuBar.Check(ID["HideShowToolbar"], False) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:13,代码来源:__init__.py

示例8: OnPaneMaximize

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def OnPaneMaximize(self, dummyEvent):
        """
        React to a wx.aui.EVT_AUI_PANE_MAXIMIZE event.
        """
        Config.perspective2 = self.auiManager.SavePerspective() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:7,代码来源:__init__.py

示例9: OnPaneRestore

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def OnPaneRestore(self, dummyEvent):
        """
        React to a wx.aui.EVT_AUI_PANE_RESTORE event.
        """
        if Config.perspective2 is not None:
            self.auiManager.LoadPerspective(Config.perspective2) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:8,代码来源:__init__.py

示例10: AddPage

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def AddPage(self, window, text):
        """Function that add a tab in Notebook, calling refresh for tab DClick event
        for wx.aui.AUINotebook.

        :param window: Panel to display in tab.
        :param text: title for the tab ctrl.
        """
        self.TabsOpened.AddPage(window, text)
        self.RefreshTabCtrlEvent() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:11,代码来源:IDEFrame.py

示例11: DeleteAllPages

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def DeleteAllPages(self):
        """Function that fix difference in deleting all tabs between
        wx.Notebook and wx.aui.AUINotebook.
        """
        for dummy in xrange(self.TabsOpened.GetPageCount()):
            self.TabsOpened.DeletePage(0)
        self.RefreshTabCtrlEvent() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:9,代码来源:IDEFrame.py

示例12: SetPageBitmap

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def SetPageBitmap(self, idx, bitmap):
        """Function that fix difference in setting picture on tab between
        wx.Notebook and wx.aui.AUINotebook.

        :param idx: Tab index.
        :param bitmap: wx.Bitmap to define on tab.
        :returns: True if operation succeeded
        """
        return self.TabsOpened.SetPageBitmap(idx, bitmap)

    # -------------------------------------------------------------------------------
    #                         Dialog Message Functions
    # ------------------------------------------------------------------------------- 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:15,代码来源:IDEFrame.py

示例13: RefreshTabCtrlEvent

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def RefreshTabCtrlEvent(self):
        auitabctrl = []
        for child in self.TabsOpened.GetChildren():
            if isinstance(child, wx.aui.AuiTabCtrl):
                auitabctrl.append(child)
                if child not in self.AuiTabCtrl:
                    child.Bind(wx.EVT_LEFT_DCLICK, self.GetTabsOpenedDClickFunction(child))
        self.AuiTabCtrl = auitabctrl
        if self.TabsOpened.GetPageCount() == 0:
            pane = self.AUIManager.GetPane(self.TabsOpened)
            if pane.IsMaximized():
                self.AUIManager.RestorePane(pane)
            self.AUIManager.Update() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:15,代码来源:IDEFrame.py

示例14: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import aui [as 别名]
def __init__(self,parent,title):
		""" Initialise main frame """
		wx.Frame.__init__(self,None,title=title,size=(2000,900))
		
		## EXPERIMENTAL
		#self._mgr = aui.AuiManager()
		#
		## notify AUI which frame to use
		#self._mgr.SetManagedWindow(self)

		#ubuntu sizing:
		if os.name == 'posix':
			font = wx.Font(9, wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL)
			self.SetFont(font)
		
		# Set icons for top-left of frame, alt-tab window ...
		frame_icon = wx.IconBundle()
		try:
			frame_icon.AddIconFromFile(os.path.join(elecsus_dir,'images/elecsus_t_group.ico'), wx.BITMAP_TYPE_ANY)
		except:
			# new wx version
			frame_icon.AddIcon(os.path.join(elecsus_dir,'images/elecsus_t_group.ico'), wx.BITMAP_TYPE_ANY)
		
		self.SetIcons(frame_icon)

		#if the window is closed, exit
		self.Bind(wx.EVT_CLOSE,self.OnExit)

		self.panel = wx.Panel(self)
		
		self.panel.SetBackgroundColour(wx.Colour(240,240,240))
		
		self._init_default_values()	
		self._init_plot_defaults()
		self._init_menus()
		self._init_panels()
		
		## redirect stdout (command line text) to status box
		sys.stdout = self.StatusPanel
		sys.stderr = self.ErrorPanel
		
		# Create initially blank set of axes
		#self.OnCreateAxes(self.figs[0],self.canvases[0])
		
		## Bind the event EVT_FIT_COMPLETE to function
		## This executes in the main thread once the fitting thread 
		## (separate from the main thread) completes
		self.Bind(EVT_FIT_COMPLETE,self.OnFitCompleted) 
开发者ID:jameskeaveney,项目名称:ElecSus,代码行数:50,代码来源:elecsus_gui.py


注:本文中的wx.aui方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。