def __init__(self, parent): wx.Panel.__init__(self, parent) default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR) self.SetBackgroundColour(default_colour) self.last_size = None sizer = wx.BoxSizer(wx.VERTICAL) self.SetSizer(sizer) # Fold panel style style = fpb.CaptionBarStyle() style.SetCaptionStyle(fpb.CAPTIONBAR_GRADIENT_V) style.SetFirstColour(default_colour) style.SetSecondColour(default_colour) # Fold - Overlay properties self.overlay_prop_panel = OverlayProperties(self) sizer.Add(self.overlay_prop_panel, 1, wx.EXPAND) sizer.Layout() self.Fit() self.last_style = None self.__bind_pubsub_evt()
def __init__(self, parent): wx.Panel.__init__(self, parent) default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR) self.SetBackgroundColour(default_colour) # Fold panel and its style settings # FIXME: If we dont insert a value in size or if we set wx.DefaultSize, # the fold_panel doesnt show. This means that, for some reason, Sizer # is not working properly in this panel. It might be on some child or # parent panel. Perhaps we need to insert the item into the sizer also... # Study this. fold_panel = fpb.FoldPanelBar(self, -1, wx.DefaultPosition, (10, 320), 0, fpb.FPB_SINGLE_FOLD) # Fold panel style style = fpb.CaptionBarStyle() style.SetCaptionStyle(fpb.CAPTIONBAR_GRADIENT_V) style.SetFirstColour(default_colour) style.SetSecondColour(default_colour) # Fold 1 - Surface properties item = fold_panel.AddFoldPanel(_("Neuronavigation"), collapsed=True) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, NeuronavigationTools(item), Spacing=0, leftSpacing=0, rightSpacing=0) fold_panel.Expand(fold_panel.GetFoldPanel(0)) #====aji=================================================================== # Fold 2 - Object properties item = fold_panel.AddFoldPanel(_("Object Corregistrate"), collapsed=True) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, ObjectWNeuronavigation(item), Spacing=0, leftSpacing=0, rightSpacing=0) #======================================================================= # Fold 3 - Surface tools item = fold_panel.AddFoldPanel(_("Navigation Tools"), collapsed=True) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, Markers(item), Spacing=0, leftSpacing=0, rightSpacing=0) # Panel sizer to expand fold panel sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(fold_panel, 1, wx.GROW | wx.EXPAND) sizer.Fit(self) self.SetSizer(sizer) self.Update() self.SetAutoLayout(1)
def __init__(self, parent): wx.Panel.__init__(self, parent) default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR) self.SetBackgroundColour(default_colour) # Fold panel and its style settings # FIXME: If we dont insert a value in size or if we set wx.DefaultSize, # the fold_panel doesnt show. This means that, for some reason, Sizer # is not working properly in this panel. It might be on some child or # parent panel. Perhaps we need to insert the item into the sizer also... # Study this. fold_panel = fpb.FoldPanelBar(self, -1, wx.DefaultPosition, wx.DefaultSize, 0, fpb.FPB_SINGLE_FOLD) # Fold panel style style = fpb.CaptionBarStyle() style.SetCaptionStyle(fpb.CAPTIONBAR_GRADIENT_V) style.SetFirstColour(default_colour) style.SetSecondColour(default_colour) # Fold 1 - Surface properties item = fold_panel.AddFoldPanel(_("Surface properties"), collapsed=True) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, SurfaceProperties(item), Spacing=0, leftSpacing=0, rightSpacing=0) # Fold 2 - Surface tools item = fold_panel.AddFoldPanel(_("Advanced options"), collapsed=True) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, SurfaceTools(item), Spacing=0, leftSpacing=0, rightSpacing=0) #fold_panel.AddFoldPanelWindow(item, QualityAdjustment(item), Spacing= 0, # leftSpacing=0, rightSpacing=0) #fold_panel.Expand(fold_panel.GetFoldPanel(1)) self.fold_panel = fold_panel self.__bind_evt() # Panel sizer to expand fold panel sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(fold_panel, 1, wx.GROW | wx.EXPAND) sizer.Fit(self) self.SetSizer(sizer) self.Update() self.SetAutoLayout(1) fold_panel.Expand(fold_panel.GetFoldPanel(1)) self.ResizeFPB() fold_panel.Expand(fold_panel.GetFoldPanel(0))
def __init__(self, parent): wx.Panel.__init__(self, parent) default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR) self.SetBackgroundColour(default_colour) # Fold panel and its style settings # FIXME: If we dont insert a value in size or if we set wx.DefaultSize, # the fold_panel doesnt show. This means that, for some reason, Sizer # is not working properly in this panel. It might be on some child or # parent panel. Perhaps we need to insert the item into the sizer also... # Study this. fold_panel = fpb.FoldPanelBar(self, -1, wx.DefaultPosition, (10, 220), 0, fpb.FPB_SINGLE_FOLD) # Fold panel style style = fpb.CaptionBarStyle() style.SetCaptionStyle(fpb.CAPTIONBAR_GRADIENT_V) style.SetFirstColour(default_colour) style.SetSecondColour(default_colour) # Fold 1 - Mask properties item = fold_panel.AddFoldPanel(_("Mask properties"), collapsed=True) self.mask_prop_panel = MaskProperties(item) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, self.mask_prop_panel, Spacing=0, leftSpacing=0, rightSpacing=0) fold_panel.Expand(fold_panel.GetFoldPanel(0)) # Fold 2 - Advanced edition tools item = fold_panel.AddFoldPanel(_("Advanced editing tools"), collapsed=True) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, EditionTools(item), Spacing=0, leftSpacing=0, rightSpacing=0) self.__id_editor = item.GetId() self.last_panel_opened = None # Fold 3 - Watershed item = fold_panel.AddFoldPanel(_("Watershed"), collapsed=True) fold_panel.ApplyCaptionStyle(item, style) fold_panel.AddFoldPanelWindow(item, WatershedTool(item), Spacing=0, leftSpacing=0, rightSpacing=0) self.__id_watershed = item.GetId() #fold_panel.Expand(fold_panel.GetFoldPanel(1)) # Panel sizer to expand fold panel sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(fold_panel, 1, wx.GROW | wx.EXPAND) sizer.Fit(self) self.SetSizer(sizer) self.Update() self.SetAutoLayout(1) self.fold_panel = fold_panel self.last_style = None self.__bind_evt() self.__bind_pubsub_evt()