Exemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        super(ColumnLayout, self).__init__(*args, **kwargs)
        self.SetDoubleBuffered(True)

        self.sidebar = Sidebar(self)
        self.main_content = ConfigPanel(self, opt_cols=2)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(self.sidebar, 1, wx.EXPAND)
        sizer.Add(wx_util.vertical_rule(self), 0, wx.EXPAND)
        sizer.Add(self.main_content, 3, wx.EXPAND)
        self.SetSizer(sizer)
Exemplo n.º 2
0
  def __init__(self, *args, **kwargs):
    super(ColumnLayout, self).__init__(*args, **kwargs)
    self.SetDoubleBuffered(True)

    self.sidebar = Sidebar(self)
    self.main_content = ConfigPanel(self, opt_cols=2)

    sizer = wx.BoxSizer(wx.HORIZONTAL)
    sizer.Add(self.sidebar, 1, wx.EXPAND)
    sizer.Add(wx_util.vertical_rule(self), 0, wx.EXPAND)
    sizer.Add(self.main_content, 3, wx.EXPAND)
    self.SetSizer(sizer)
Exemplo n.º 3
0
  def __init__(self, *args, **kwargs):
    self._build_spec = kwargs.pop('build_spec')
    super(ColumnLayout, self).__init__(*args, **kwargs)
    self.SetDoubleBuffered(True)

    self.sidebar = Sidebar(self, contents=self._build_spec['widgets'].keys())

    self.config_panels = self.build_panels(self._build_spec)
    self.active_panel = self.config_panels.keys()[0]
    self.config_panels[self.active_panel].Show()

    sizer = wx.BoxSizer(wx.HORIZONTAL)
    sizer.Add(self.sidebar, 1, wx.EXPAND)
    sizer.Add(wx_util.vertical_rule(self), 0, wx.EXPAND)
    for panel in self.config_panels.values():
      sizer.Add(panel, 3, wx.EXPAND)
    self.SetSizer(sizer)

    pub.subscribe(self.load_view,   events.PANEL_CHANGE)
Exemplo n.º 4
0
  def __init__(self, *args, **kwargs):
    self._build_spec = kwargs.pop('build_spec')
    super(ColumnLayout, self).__init__(*args, **kwargs)
    self.SetDoubleBuffered(True)

    self.sidebar = Sidebar(self, contents=self._build_spec['widgets'].keys())

    self.config_panels = self.build_panels(self._build_spec)
    self.active_panel = self.config_panels.keys()[0]
    self.config_panels[self.active_panel].Show()

    sizer = wx.BoxSizer(wx.HORIZONTAL)
    sizer.Add(self.sidebar, 1, wx.EXPAND)
    sizer.Add(wx_util.vertical_rule(self), 0, wx.EXPAND)
    for panel in self.config_panels.values():
      sizer.Add(panel, 3, wx.EXPAND)
    self.SetSizer(sizer)

    pub.subscribe(self.load_view,   events.PANEL_CHANGE)
Exemplo n.º 5
0
    def layoutComponent(self):
        left = self.layoutLeftSide()

        hsizer = wx.BoxSizer(wx.HORIZONTAL)
        hsizer.Add(left, 0, wx.EXPAND)

        if not self.buildSpec['tabbed_groups']:
            # only add it for non-tabbed layouts as it looks
            # weird against the tabbed ones
            hsizer.Add(wx_util.vertical_rule(self), 0, wx.EXPAND)

        for body in self.configPanels:
            body.Reparent(self)
            hsizer.Add(body, 1, wx.EXPAND)
            body.Hide()
        self.configPanels[0].Show()
        self.SetSizer(hsizer)

        if not self.buildSpec['show_sidebar']:
            left.Show(False)

        self.Layout()