def __init__(self, parent, id=-1): wx.Panel.__init__(self, parent, id=id) #self.nb = wx.Notebook(self) self.nb = aui.AuiNotebook(self) sizer = wx.BoxSizer() sizer.Add(self.nb, 1, wx.EXPAND) self.SetSizer(sizer)
def __init__(self, parent, id=-1, interactive=True): wx.Panel.__init__(self, parent, id=id) self.nb = aui.AuiNotebook(self) sizer = wx.BoxSizer() sizer.Add(self.nb, 1, wx.EXPAND) self.SetSizer(sizer) self.interactive = interactive
def __init__(self, parent, app=None): wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.Size(300, 200), style=wx.TAB_TRAVERSAL) sizer = wx.BoxSizer(wx.VERTICAL) mrecorder = recorder(self) self.notebook = aui.AuiNotebook(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, aui.AUI_NB_DEFAULT_STYLE) self.notebook.AddPage(mrecorder, mrecorder.title, True, wx.NullBitmap) self.notebook.AddPage(console(self), console.title, False, wx.NullBitmap) self.notebook.AddPage(plglist(self), plglist.title, False, wx.NullBitmap) self.notebook.AddPage(plgtree(self), plgtree.title, False, wx.NullBitmap) self.notebook.AddPage(toltree(self), toltree.title, False, wx.NullBitmap) for i in range(5): self.notebook.GetPage(i).app = parent Source.manager('widget').add('Macros Recorder', mrecorder) sizer.Add(self.notebook, 1, wx.EXPAND | wx.ALL, 0) self.SetSizer(sizer) self.Fit() self.Layout()
def run_main(): window = aui_manager.GetManagedWindow() if 'SCT_DIR' not in os.environ: dlg = wx.MessageDialog(window, 'Spinal Cord Toolbox (SCT) was not ' 'found in your system. Make sure you open fsleyes ' 'from the Terminal (not by clicking on the App). ' 'If you are indeed running from the Terminal, please ' 'check the installation procedure at: ' 'https://github.com/spinalcordtoolbox/spinalcordtoolbox', 'SCT not found!', wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() return # Adding panels notebook = aui.AuiNotebook(parent=window) panel_propseg = TabPanelPropSeg(parent=notebook) panel_sc = TabPanelSCSeg(parent=notebook) panel_gm = TabPanelGMSeg(parent=notebook) panel_vlb = TabPanelVertLB(parent=notebook) panel_reg = TabPanelRegisterToTemplate(parent=notebook) notebook.AddPage(page=panel_propseg, caption="sct_propseg", select=True) notebook.AddPage(page=panel_sc, caption="sct_deepseg_sc", select=False) notebook.AddPage(page=panel_gm, caption="sct_deepseg_gm", select=False) notebook.AddPage(page=panel_vlb, caption="sct_label_vertebrae", select=False) notebook.AddPage(page=panel_reg, caption="sct_register_to_template", select=False) aui_manager.AddPane(notebook, aui.AuiPaneInfo().Name("notebook_content").CenterPane().PaneBorder(False)) aui_manager.Update()
def __init__(self, parent, status_bar): self.logger = logging.getLogger(LOGGER) self.logger.debug(self.__class__.__name__ + '.__init__') wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY) self.status_bar = status_bar # create the AuiNotebook instance style = aui.AUI_NB_DEFAULT_STYLE style &= ~(aui.AUI_NB_CLOSE_ON_ACTIVE_TAB) self.nb = aui.AuiNotebook(self, style=style) self.Bind(aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.OnClose) # add some pages to the notebook self.algorithm = TabPanelOne(self.nb, name="Algorithm") self.scale = TabPanelOne(self.nb, name="Scale") self.nb.AddPage(self.algorithm, self.algorithm.GetName(), False) self.nb.AddPage(self.scale, self.scale.GetName(), False) self.list_pages = dict() self.list_pages.update({self.algorithm.GetName(): (self.algorithm, 0)}) self.list_pages.update({self.scale.GetName(): (self.scale, 1)}) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb, 1, wx.EXPAND) self.SetSizer(sizer)
def run_main(): window = aui_manager.GetManagedWindow() if 'SCT_DIR' not in os.environ: dlg = wx.MessageDialog( window, 'Spinal Cord Toolbox (SCT) was not ' 'found in your system. Make sure you open fsleyes ' 'from the Terminal (not by clicking on the App). ' 'If you are indeed running from the Terminal, please ' 'check the installation procedure at: ' 'https://github.com/neuropoly/spinalcordtoolbox', 'SCT not found!', wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() return notebook = aui.AuiNotebook(window) panel_sc = TabPanelSCSeg(notebook) panel_gm = TabPanelGMSeg(notebook) notebook.AddPage(panel_sc, "sct_deepseg_sc", True) notebook.AddPage(panel_gm, "sct_deepseg_gm", False) aui_manager.AddPane( notebook, aui.AuiPaneInfo().Name("notebook_content").CenterPane().PaneBorder( False)) aui_manager.Update()
def CreateNotebook(self): # create the notebook off-window to avoid flicker ctrl = AUI.AuiNotebook(self.notebook, -1) ctrl.SetName("AuiNotebook1") page_bmp = wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_OTHER, wx.Size(16, 16)) ctrl.AddPage(wx.Panel(ctrl), "Page 1", False, page_bmp) ctrl.AddPage( wx.TextCtrl(ctrl, -1, "Some text", wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE | wx.NO_BORDER), "Page 1", False, page_bmp) ctrl.AddPage( wx.TextCtrl(ctrl, -1, "Some more text", wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE | wx.NO_BORDER), "Page 2") ctrl.AddPage( wx.TextCtrl(ctrl, -1, "Some more text", wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE | wx.NO_BORDER), "Page 3") ctrl.AddPage( wx.TextCtrl(ctrl, -1, "Some more text", wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE | wx.NO_BORDER), "Page 4") return ctrl
def __init__(self, parent, id, pos, size): wx.Panel.__init__(self, parent, id, pos, size) self.parent = parent self.nb = aui.AuiNotebook(self) #Create binding so that charecteristics change when the tab is changed sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb, 5, wx.TOP|wx.EXPAND) self.SetSizer(sizer)
def __init__(self, parent, id=-1,**kwargs): wx.Panel.__init__(self, parent, id=id,**kwargs) self.nb = aui.AuiNotebook(self) sizer = wx.BoxSizer() sizer.Add(self.nb, 1, wx.EXPAND) self.SetSizer(sizer) sizer.SetSizeHints(self)
def load_dev(self): return self.devpan = aui.AuiNotebook(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, aui.AUI_NB_DEFAULT_STYLE) self.auimgr.AddPane( self.devpan, waui.AuiPaneInfo().Bottom().CaptionVisible(False).PinButton( True).Dock().PaneBorder(False).Resizable().FloatingSize( wx.DefaultSize))
def CreateNoteBook(self): sizer = wx.BoxSizer(wx.VERTICAL) self.SetSizer(sizer) self._notebook = aui.AuiNotebook(self) style = self._notebook.GetWindowStyleFlag() style ^= aui.AUI_NB_WINDOWLIST_BUTTON style ^= aui.AUI_NB_CLOSE_BUTTON style ^= aui.AUI_NB_USE_IMAGES_DROPDOWN self._notebook.SetAGWWindowStyleFlag(style) self._notebook.Refresh() self._notebook.Update() self._notebook.Bind(aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.OnPluginClose) sizer.Add(self._notebook, 1, wx.EXPAND) # Add the "Tools & Applications" page to the notebook. self.ToolsAndAppsPage = wx.lib.scrolledpanel.ScrolledPanel( self._notebook, -1) sizer2 = wx.BoxSizer(wx.VERTICAL) self.ToolsAndAppsPage.SetSizer(sizer2) alignmentPanel = wx.Panel(self.ToolsAndAppsPage, -1) sizer2.Add(alignmentPanel) sizer3 = wx.BoxSizer(wx.VERTICAL) alignmentPanel.SetSizer(sizer3) self._notebook.AddPage(self.ToolsAndAppsPage, 'Tools & Apps') self.ToolsGroup = wx.Panel(alignmentPanel, -1) sizer3.Add(self.ToolsGroup, 0, wx.EXPAND | wx.ALL, 5) g = wx.StaticBox(self.ToolsGroup, label='Tools') self.ToolsSizer = wx.StaticBoxSizer(g, wx.VERTICAL) self.ToolsGroup.SetSizer(self.ToolsSizer) self.ApplicationsGroup = wx.Panel(alignmentPanel, -1) sizer3.Add(self.ApplicationsGroup, 0, wx.EXPAND | wx.ALL, 5) g = wx.StaticBox(self.ApplicationsGroup, label='Applications') self.ApplicationsSizer = wx.StaticBoxSizer(g, wx.VERTICAL) self.ApplicationsGroup.SetSizer(self.ApplicationsSizer) # set up scrolling self.ToolsAndAppsPage.SetAutoLayout(True) self.ToolsAndAppsPage.SetupScrolling() # this is where we should put our logo bmp = self._stockicons.getBitmap("parallax-logo") company_logo = wx.StaticBitmap(self, -1, bmp) sizer.Add(company_logo)
def __init__(self, parent, id=-1): #Made the notebook stretch to approximately a full screen wx.Panel.__init__(self, parent, id=id, size=(1900, 900)) self.nb = aui.AuiNotebook(self, size=(1900, 500)) sizer = wx.BoxSizer() sizer.Add(self.nb, 1, wx.EXPAND) self.SetSizer(sizer) self.currPage = None self.nb.Bind(aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.onTabChange) self.Fit()
def working_area(self): self.working_area_panel = wx.Panel(self) self.nb = aui.AuiNotebook(self.working_area_panel) self.default_tab() sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb, 1, wx.EXPAND) self.working_area_panel.SetSizer(sizer) self.working_area_panel.Fit() self.Show() self.mgr.AddPane(self.working_area_panel, self._center_panel) self.mgr.Update()
def __init__(self, parent, fa, id=-1, evt_type=None): wx.Panel.__init__(self, parent, id=id) self.fa = fa self.nb = aui.AuiNotebook(self) sizer = wx.BoxSizer() sizer.Add(self.nb, 1, wx.EXPAND) self.page = [] self.SetSizer(sizer) self.parent = parent self.Bind(evt_type, self.draw_page) self.clock = 0
def __init__(self, parent, id, pos, size): wx.Panel.__init__(self, parent, id, pos, size) self.parent = parent atext = wx.StaticText(self, wx.ID_ANY, "Analysis Side") self.nb = aui.AuiNotebook(self) #Create binding so that charecteristics change when the tab is changed self.Bind(aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.on_nb_tab_changed, self.nb) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(atext, 0, wx.TOP|wx.CENTER) sizer.Add(self.nb, 5, wx.TOP|wx.EXPAND) self.SetSizer(sizer)
def working_area_training(self): self.working_area_training_panel = wx.Panel(self) self.nb_training = aui.AuiNotebook(self.working_area_training_panel) self.trainingObj = TrainingPanel(self, self.nb_training) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb_training, 1, wx.EXPAND) self.working_area_training_panel.SetSizer(sizer) self.working_area_training_panel.Fit() self.working_area_training_panel.Show() return self.working_area_training_panel
def __init__(self, parent): wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"Color Picker", pos=wx.DefaultPosition, style=wx.DEFAULT_DIALOG_STYLE) # Set main params self.color = Color((0,0,0,1), 'rgba') self.sizer = wx.GridBagSizer() # Add colourful top bar self.preview = ColorPreview(color=self.color, parent=self) self.sizer.Add(self.preview, pos=(0,0), span=wx.GBSpan(2,1), border=5, flag=wx.RIGHT | wx.EXPAND) # Add notebook of controls self.ctrls = aui.AuiNotebook(self, wx.ID_ANY, size=wx.Size(400, 400)) self.sizer.Add(self.ctrls, pos=(0,1), border=5, flag=wx.ALL) self.ctrls.AddPage(ColorPage(self.ctrls, self, 'rgba'), 'RGB (-1 to 1)') self.ctrls.AddPage(ColorPage(self.ctrls, self, 'rgba1'), 'RGB (0 to 1)') self.ctrls.AddPage(ColorPage(self.ctrls, self, 'rgba255'), 'RGB (0 to 255)') self.ctrls.AddPage(ColorPage(self.ctrls, self, 'hsva'), 'HSV') self.ctrls.AddPage(ColorPage(self.ctrls, self, 'hex'), 'Hex') # Add array of named colours self.presets = ColorPresets(parent=self) self.sizer.Add(self.presets, pos=(0,2), border=5, flag=wx.ALL) # Add buttons self.buttons = wx.BoxSizer(wx.HORIZONTAL) self.closeButton = wx.Button(self, label="Close") self.closeButton.Bind(wx.EVT_BUTTON, self.Close) self.buttons.Add(self.closeButton, border=5, flag=wx.ALL) # Add insert buttons # self.insertValueButton = wx.Button(self, label="Insert As Value") # self.insertValueButton.Bind(wx.EVT_BUTTON, self.insertValue) # self.buttons.Add(self.insertValueButton, border=5, flag=wx.ALL) # self.insertObjectButton = wx.Button(self, label="Insert As Object") # self.insertObjectButton.Bind(wx.EVT_BUTTON, self.insertObject) # self.buttons.Add(self.insertObjectButton, border=5, flag=wx.ALL) # Add copy buttons self.copyValueButton = wx.Button(self, label="Copy As Value") self.copyValueButton.Bind(wx.EVT_BUTTON, self.copyValue) self.buttons.Add(self.copyValueButton, border=5, flag=wx.ALL) self.copyObjectButton = wx.Button(self, label="Copy As Object") self.copyObjectButton.Bind(wx.EVT_BUTTON, self.copyObject) self.buttons.Add(self.copyObjectButton, border=5, flag=wx.ALL) self.sizer.Add(self.buttons, pos=(1,1), span=wx.GBSpan(1,2), border=5, flag=wx.ALL | wx.ALIGN_RIGHT) # Configure sizer self.sizer.AddGrowableRow(0) self.sizer.AddGrowableCol(1) self.SetSizerAndFit(self.sizer) self._applyAppTheme() self._applyAppTheme(self.ctrls) self.Layout() self.Centre(wx.BOTH) self.Show(True)
def initialize_notebook(self, frame, size=(300, 400)): """ Add notebook :param frame: :param size: :return: """ self.notebook = aui.AuiNotebook(frame, agwStyle=aui.AUI_NB_CLOSE_ON_ALL_TABS, size=size) self.frame.add_pane(self.notebook, wx.CENTER, 'Notebook')
def panel_design(self): # create notebook self.nb_result = aui.AuiNotebook(self) self.default_tab() # to display page to notebook sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb_result, 1, wx.ALL | wx.EXPAND) self.SetSizer(sizer) self.Fit() self.Center() self.Show()
def __init__(self, parent, id=-1, x_len=20): """ Create new notebook with one empty tab """ wx.Panel.__init__(self, parent, id=id) self.x_len = x_len self.nb = aui.AuiNotebook( self, agwStyle=aui.AUI_NB_WINDOWLIST_BUTTON | aui.AUI_NB_SCROLL_BUTTONS ) self.plot = Plot(self, self.x_len) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb, 1, wx.EXPAND) sizer.Add(self.plot, 1, wx.EXPAND) self.SetSizer(sizer) self.plot_data = {} self.Bind(aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.OnPageChange)
def __init__(self, parent): wx.Panel.__init__(self, parent) self.blank_file_tab_count = 0 self.nb = aui.AuiNotebook(self, agwStyle=aui.AUI_NB_CLOSE_ON_ALL_TABS|aui.AUI_NB_SMART_TABS|aui.AUI_NB_WINDOWLIST_BUTTON|aui.AUI_NB_TAB_FIXED_WIDTH|aui.AUI_NB_TAB_MOVE|aui.AUI_NB_SCROLL_BUTTONS) self.tmsg = trsMessagePanel(self) #self.qf_folder_path = ".\\" #self.nb.SetTabCtrlHeight(25) #self.nb.SetMinMaxTabWidth(5, 10) #self.test = wx.Button(self, label='Welcome') if(len(literal_eval(last_settings['last_opened_files'])[0])==0): self.defE = stcE.NewSTCEditor(self) self.defE.format_tab_spaces = int(settings['format_tab_spaces']) self.nb.AddPage(self.defE, "New "+str(self.getBlankTabSeq())) self.defE.updateLCInfo(None) else: self.loadFiles(last_settings['last_opened_files']) import searchService as search self.searchPan = search.SearchPanel(self) self.searchPan.Hide() self.nb.Bind(aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.closeTab, self.nb) self.nb.Bind(aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.tabChanged, self.nb) self.nb.Bind(aui.EVT_AUINOTEBOOK_TAB_RIGHT_DOWN, self.showTabContextMenu, self.nb) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.nb, 40, wx.EXPAND) self.sizer.Add(self.tmsg, 0, wx.EXPAND) self.sizer.Add(self.searchPan, 0, wx.EXPAND) self.SetSizer(self.sizer) self.tmsg.Hide() try: tabArt = settings['notebook_current_theme'] if tabArt == 'VC8TabArt': self.nb.SetArtProvider(aui.VC8TabArt()) elif tabArt == 'AuiSimpleTabArt': self.nb.SetArtProvider(aui.AuiSimpleTabArt()) elif tabArt == 'VC71TabArt': self.nb.SetArtProvider(aui.VC71TabArt()) elif tabArt == 'FF2TabArt': self.nb.SetArtProvider(aui.FF2TabArt()) elif tabArt == 'ChromeTabArt': self.nb.SetArtProvider(aui.ChromeTabArt()) else: self.nb.SetArtProvider(aui.AuiDefaultTabArt()) except Exception as tae: aplgr.log(str(tae))
def run_main(): if 'SCT_DIR' not in os.environ: dlg = wx.MessageDialog( frame.auiManager.GetManagedWindow(), 'Spinal Cord Toolbox (SCT) was not ' 'found in your system. Make sure you open fsleyes ' 'from the Terminal (not by clicking on the App). ' 'If you are indeed running from the Terminal, please ' 'check the installation procedure at: ' 'https://github.com/spinalcordtoolbox/spinalcordtoolbox', 'SCT not found!', wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() return # Create a new view panel which will contain the SCT notebook pages sct_view_panel = frame.addViewPanel(SCTViewPanel, default=False, title="Spinal Cord Toolbox") aui_manager = sct_view_panel.auiManager # Move panel to bottom (by default, FSLeyes puts ViewPanels to the right) width, height = frame.GetClientSize().Get() frame.auiManager.GetPane(sct_view_panel).Bottom()\ .BestSize(width, height // 3) # Resize, horizontal viewing frame.auiManager.Update() # Adding panels notebook = aui.AuiNotebook(parent=aui_manager.GetManagedWindow()) panel_propseg = TabPanelPropSeg(parent=notebook) panel_sc = TabPanelSCSeg(parent=notebook) panel_gm = TabPanelGMSeg(parent=notebook) panel_vlb = TabPanelVertLB(parent=notebook) panel_reg = TabPanelRegisterToTemplate(parent=notebook) notebook.AddPage(page=panel_propseg, caption="sct_propseg", select=True) notebook.AddPage(page=panel_sc, caption="sct_deepseg_sc", select=False) notebook.AddPage(page=panel_gm, caption="sct_deepseg_gm", select=False) notebook.AddPage(page=panel_vlb, caption="sct_label_vertebrae", select=False) notebook.AddPage(page=panel_reg, caption="sct_register_to_template", select=False) aui_manager.AddPane( notebook, aui.AuiPaneInfo().Name("notebook_content").CenterPane().PaneBorder( False)) aui_manager.Update()
def __init__(self, parent, canvas, ax, fig): wx.Panel.__init__(self, parent) style = aui.AUI_NB_DEFAULT_STYLE style &= ~(aui.AUI_NB_CLOSE_ON_ACTIVE_TAB) nb = aui.AuiNotebook(self, agwStyle=style) self.clear_button = wx.Button(self, -1, "CLEAR") ### self.results = None # # create the page windows as children of the notebook self.ball_ownership_analysis_page = BallOwnershipAnalysisNotebook( nb, canvas, ax, self) self.running_distance_analysis_page = RunningDistanceAnalysisNotebook( nb, canvas, ax, self) self.dominant_region_analysis_page = DominantRegionAnalysisNotebook( nb, canvas, ax, self) self.player_effectiveness_analysis_page = PlayerEffectivenessAnalysisNotebook( nb, canvas, ax, self) self.optimal_shooting_point_prediction_page = OptimalShootingPointPredictionNotebook( nb, canvas, ax, fig) self.pass_success_prediction_page = PassSuccessPredictionNotebook( nb, canvas, ax, fig) self.ball_ownership_prediction_page = BallOwnershipPredictionNotebook( nb) # add the pages to the notebook with the label to show on the tab nb.AddPage(self.ball_ownership_analysis_page, "Ball Ownership A.") nb.AddPage(self.running_distance_analysis_page, "Running Distance A.") nb.AddPage(self.dominant_region_analysis_page, "Dominant Region A.") nb.AddPage(self.player_effectiveness_analysis_page, "Player Effectiveness A.") nb.AddPage(self.optimal_shooting_point_prediction_page, "Optimal Shooting Point P.") nb.AddPage(self.pass_success_prediction_page, "Pass Success P.") nb.AddPage(self.ball_ownership_prediction_page, "Ball Ownership P.") sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(nb, 1, wx.EXPAND) sizer.Add(self.clear_button, 0, wx.ALIGN_CENTER) self.SetSizer(sizer) sizer.Fit(self) ##################### ##### Binds ######### ##################### self.clear_button.Bind(wx.EVT_BUTTON, self.onClear)
def panel_design(self): # create notebook self.nb_process = aui.AuiNotebook(self) self.default_tab() #self.grid_design_huge("daf", "dd100") # to display page to notebook sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb_process, 1, wx.ALL | wx.EXPAND) self.SetSizer(sizer) self.Fit() self.Center() self.Show()
def panel_design(self): # create notebook self.nb_training = aui.AuiNotebook(self) self.Bind(aui.EVT_AUINOTEBOOK_PAGE_CLOSED, self.close, self.nb_training) #self.default_tab() self.main_area() # to display page to notebook sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.nb_training, 1, wx.ALL | wx.EXPAND) self.SetSizer(sizer) self.Fit() self.Center() self.Show()
def __init__( self, parent ): wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 300,200), style = wx.TAB_TRAVERSAL ) sizer = wx.BoxSizer( wx.VERTICAL ) mrecorder = recorder(self) self.notebook = aui.AuiNotebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, aui.AUI_NB_DEFAULT_STYLE ) self.notebook.AddPage( mrecorder, mrecorder.title, True, wx.NullBitmap ) self.notebook.AddPage( console(self), console.title, False, wx.NullBitmap ) self.notebook.AddPage( plglist(self), plglist.title, False, wx.NullBitmap ) self.notebook.AddPage( plgtree(self), plgtree.title, False, wx.NullBitmap ) self.notebook.AddPage( toltree(self), toltree.title, False, wx.NullBitmap ) WidgetsManager.addref(mrecorder) sizer.Add( self.notebook, 1, wx.EXPAND |wx.ALL, 0 ) self.SetSizer( sizer ) self.Fit() self.Layout()
def v_content(self): self.instancias_page = [] self.instancias_view = [] self.nb_main = aui.AuiNotebook(self) ar = aui.ChromeTabArt() ar.SetAGWFlags(aui.AUI_NB_TAB_SPLIT) self.nb_main.SetArtProvider(ar) # self.nb_main.SetAGWWindowStyleFlag(KURI_AUI_NB_STYLE) self.nb_main.Bind(aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.on_close) # self.nb_main.Bind(aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.on_change) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.nb_main, 1, wx.LEFT | wx.TOP | wx.EXPAND | wx.ALL, 1) self.SetSizer(self.sizer) self.Fit()
def __CreateEditorView(self): """生成代码编辑区""" # 创建auiNotebook self.nb = aui.AuiNotebook(self, -1) # 添加欢迎页 panel = wx.Panel(self.nb, -1) sizer = wx.BoxSizer() bmp = wx.StaticBitmap(panel, -1, wx.Bitmap(os.path.join("res", "PyEditor.png"))) sizer.Add(bmp, 1, flag=wx.ALIGN_CENTER) panel.SetSizer(sizer) panel.SetAutoLayout(True) self.nb.AddPage(panel, "欢迎") self._mgr.AddPane( self.nb, aui.AuiPaneInfo().Name("code edit").CenterPane().PaneBorder(False))
def __init__(self, parent): wx.Panel.__init__(self, parent) self.nb = aui.AuiNotebook(self, agwStyle=aui.AUI_NB_DRAW_DND_TAB|aui.AUI_NB_BOTTOM) self.mea_url = wx.ComboBox(self, -1, size=(40, 20)) self.mea_srvc = wx.ComboBox(self, -1, size=(40, 20)) self.auth_img = self.GetTopLevelParent().getUIBitMap(self, "UI_AUTH") self.use_auth = wx.CheckBox(self, -1) self.openFile = wx.BitmapButton(self, -1, self.GetTopLevelParent().getUIBitMap(self, "FILES_ICON"), size=(20,23)) self.sendXML = wx.Button(self, label='Send') self.HZBS1= wx.BoxSizer(wx.HORIZONTAL) self.HZBS1.Add(self.mea_url, 10) self.HZBS1.Add(self.mea_srvc, 12) self.HZBS1.Add(self.auth_img, 0) self.HZBS1.Add(self.use_auth, 0, flag=wx.CENTER) self.HZBS1.Add(self.openFile, 0, flag=wx.CENTER) self.HZBS1.Add(self.sendXML,6) self.respE = stcE.NewSTCEditor(self) self.respE.isAppTab = True self.msgPn = MessagesPanel(self) self.reqPr = PropertiesTab(self) self.nb.AddPage(self.respE, "Response") self.nb.AddPage(self.msgPn, "Messages") self.nb.AddPage(self.reqPr, "Properties") self.VTBS2= wx.BoxSizer(wx.VERTICAL) self.VTBS2.Add(self.HZBS1, 0, wx.EXPAND) self.VTBS2.Add(self.nb, 1, wx.EXPAND) self.SetSizerAndFit(self.VTBS2) self.mea_url.SetItems( literal_eval("("+setng.getUserData("mea_urls")+")") ) self.mea_srvc.SetItems( literal_eval("("+setng.getUserData("mea_services")+")") ) self.mea_url.SetValue(last_settings['mea_host_url']) self.mea_srvc.SetValue(last_settings['mea_service']) self.sendXML.Bind(wx.EVT_BUTTON, self.sendXML2WS) self.openFile.Bind(wx.EVT_BUTTON, self.openQuickFileMenu) self.use_auth.SetToolTip(wx.ToolTip("Use Authentication?"))
def __init__(self): wx.Frame.__init__( self, parent = None, title = "Borges Infinite Image", size = (600,550) ) self.SetIcon(wx.Icon(gui_graphics + '/Abe.png')) self.Bind(wx.EVT_CLOSE, self.OnCloseFrame) panel = wx.Panel(self) notebook = aui.AuiNotebook(panel) spider = Front_page(notebook) explorer = explorer_panel(notebook) notebook.AddPage(spider, 'Spider') notebook.AddPage(explorer, 'Explorer') sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5) panel.SetSizer(sizer)