You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

  1. import wx
  2. from gooey.gui.util import wx_util
  3. from gooey.gui.windows.advanced_config import ConfigPanel
  4. from gooey.gui.windows.sidebar import Sidebar
  5. basic_config = {
  6. 'widgets': [{
  7. 'type': 'CommandField',
  8. 'required': True,
  9. 'data': {
  10. 'display_name': 'Enter Commands',
  11. 'help': 'Enter command line arguments',
  12. 'nargs': '',
  13. 'commands': '',
  14. 'choices': [],
  15. 'default': None,
  16. }
  17. }],
  18. }
  19. FLAT = 'standard'
  20. COLUMN = 'column'
  21. class FlatLayout(wx.Panel):
  22. def __init__(self, *args, **kwargs):
  23. super(FlatLayout, self).__init__(*args, **kwargs)
  24. self.SetDoubleBuffered(True)
  25. self.main_content = ConfigPanel(self, opt_cols=3)
  26. sizer = wx.BoxSizer(wx.HORIZONTAL)
  27. sizer.Add(self.main_content, 3, wx.EXPAND)
  28. self.SetSizer(sizer)
  29. class ColumnLayout(wx.Panel):
  30. def __init__(self, *args, **kwargs):
  31. super(ColumnLayout, self).__init__(*args, **kwargs)
  32. self.SetDoubleBuffered(True)
  33. self.sidebar = Sidebar(self)
  34. self.main_content = ConfigPanel(self, opt_cols=2)
  35. sizer = wx.BoxSizer(wx.HORIZONTAL)
  36. sizer.Add(self.sidebar, 1, wx.EXPAND)
  37. sizer.Add(wx_util.vertical_rule(self), 0, wx.EXPAND)
  38. sizer.Add(self.main_content, 3, wx.EXPAND)
  39. self.SetSizer(sizer)