예제 #1
0
    def __init__(self, parent, init=False):

        self.parent = parent
        self.initialized = False
        self.root = None

        self._resources = xrc.EmptyXmlResource()
        self._resources.Load(_getpath('xrc', 'configure.xrc'))

        pre = wx.PrePanel()
        self.PreCreate(pre)
        self._resources.LoadOnPanel(pre, parent, "configure_panel")
        self.PostCreate(pre)

        self.pg = wxpg.PropertyGridManager(self,
                                           style=wxpg.PG_SPLITTER_AUTO_CENTER
                                           | wxpg.PG_AUTO_SORT
                                           | wxpg.PG_TOOLBAR)

        self.pg_ctrl = self._resources.AttachUnknownControl(
            "property_grid", self.pg, self)
        xrc.XRCCTRL(self, 'generate_b').Bind(wx.EVT_BUTTON, self.onGenerate)
        xrc.XRCCTRL(self, 'reset_b').Bind(wx.EVT_BUTTON, self.onReset)
        xrc.XRCCTRL(self, 'load_b').Bind(wx.EVT_BUTTON, self.onLoad)
        xrc.XRCCTRL(self, 'save_b').Bind(wx.EVT_BUTTON, self.onSave)

        if init:
            wx.CallAfter(self.collect)
예제 #2
0
    def __init__(self, parent):
        self.parent = parent
        self.path = None
        self._resources = xrc.EmptyXmlResource()
        self._resources.Load(_getpath('xrc', 'fbfdframe.xrc'))

        pre = wx.PreFrame()
        self._resources.LoadOnFrame(pre, parent, "fbfrontdesk_frame")
        self.PostCreate(pre)

        self.SetIcon(wx.Icon(_getpath('xrc', 'foxbms100px.png')))
        self.tbicon = DemoTaskBarIcon(self)
        print self.tbicon.IsOk()

        self.Bind(wx.EVT_MENU, self.onProjectSelect, id=xrc.XRCID("folder_tb"))
        self.Bind(wx.EVT_MENU,
                  self.onOpenDocumentation,
                  id=xrc.XRCID("help_tb"))

        self.panel = FBFrontDeskPanel(self)
        self.SetMinSize((800, 700))
        self.Fit()

        self.detect(self.path)
        self.selectProject(self.path)
예제 #3
0
    def __init__(self, parent, log):
        self.log = log
        wx.Panel.__init__(self, parent, -1)

        # make the components
        label = wx.StaticText(self, -1,
                              "The lower panel was built from this XML:")
        label.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD))

        text = wx.TextCtrl(self,
                           -1,
                           resourceText,
                           style=wx.TE_READONLY | wx.TE_MULTILINE)
        text.SetInsertionPoint(0)

        line = wx.StaticLine(self, -1)

        # Load the resource
        res = xrc.EmptyXmlResource()
        res.InsertHandler(MyCustomPanelXmlHandler())
        res.LoadFromString(resourceText)

        # Now create a panel from the resource data
        panel = res.LoadObject(self, "MyPanel", "MyCustomPanel")

        # and do the layout
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(label, 0, wx.EXPAND | wx.TOP | wx.LEFT, 5)
        sizer.Add(text, 1, wx.EXPAND | wx.ALL, 5)
        sizer.Add(line, 0, wx.EXPAND)
        sizer.Add(panel, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.SetAutoLayout(True)
예제 #4
0
파일: xmlres.py 프로젝트: andrezgz/airs
def loadGuiResource(filename):
    """
    Load the XRC resource based upon the name
    """
    resname = os.path.join(appcfg.appdir, 'gui', filename)
    res = xrc.EmptyXmlResource()
    res.Load(resname)
    return res
예제 #5
0
    def OnInit(self):
        """Sets up the gui
        
        
        """
        # initialises the cvsss2 handler
        self.base_score = cvsscalc.Base()
        self.temp_score = cvsscalc.Temporal()
        self.env_score = cvsscalc.Environmental()

        # flag for determining if the gui has changed
        self.modified = False
        # last filename
        self.fname = None

        # read the xml file
        content = find_file('cvsscalc/xrcgui.xrc')
        self.res = xrc.EmptyXmlResource()
        # add custom control handler
        self.res.AddHandler(TimeCtrlHandler())
        self.res.AddHandler(ScoreGaugeHandler())
        # load the gui
        self.res.LoadFromString(content)

        # receive windows
        self.frame = self.res.LoadFrame(None, 'MyFrame')
        self.set_title('CVSS Calculator')
        self.base_panel = xrc.XRCCTRL(self.frame, 'base_panel')
        self.env_panel = xrc.XRCCTRL(self.frame, 'env_panel')
        self.temp_panel = xrc.XRCCTRL(self.frame, 'temp_panel')
        self.util_panel = xrc.XRCCTRL(self.frame, 'util_panel')
        self.score_panel = xrc.XRCCTRL(self.frame, 'score_panel')
        self.load_panel = xrc.XRCCTRL(self.frame, 'load_panel')

        # setup panels
        self.setup_panel(self.base_panel)
        self.setup_panel(self.temp_panel)
        self.setup_panel(self.env_panel)

        # update score panel
        self.update_scores()
        self.refresh_score()

        icon_content = find_file('cvsscalc/cvsscalc.ico', mode='rb')
        tmpfile = tempfile.mkstemp()
        os.write(tmpfile[0], icon_content)
        os.close(tmpfile[0])
        self.frame.SetIcon(wx.Icon(tmpfile[1], wx.BITMAP_TYPE_ANY))
        os.unlink(tmpfile[1])

        # resize and show
        self.frame.Fit()
        self.frame.Show()

        # connect keybindings
        self.bind_keys()

        return True
예제 #6
0
 def OnInit(self):
     res = xrc.XmlResource_Get()
     res.LoadFile('hello0.xrc')
     res.LoadFile('hello1.xrc')
     res0 = xrc.EmptyXmlResource()
     print('try.xrc', res0.LoadFromString(open('try.xrc', 'rt').read()))
     print('first', res.GetResourceNode('first'),
           res0.GetResourceNode('first'))
     return False
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    # Have to edit the path to the xrc file
    import os, sys
    xrcFile = os.path.join(os.path.dirname(__file__), 'feedback.xrc')
    xrcFile = unicode(xrcFile, sys.getfilesystemencoding())
    __res.Load(xrcFile)
예제 #8
0
    def __init__(self, *args, **kwargs):
        super(XrcTestFrame, self).__init__(*args, **kwargs)

        # Attributes
        resource = xrc.EmptyXmlResource()
        handler = TextEditPanelXmlHandler()
        resource.InsertHandler(handler)
        resource.LoadFromString(RESOURCE)
        self.panel = resource.LoadObject(self, "TextEdit", "TextEditPanel")

        # Layout
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.panel, 1, wx.EXPAND)
        self.SetSizer(sizer)
예제 #9
0
    def __init__(self, parent, conf):

        self._resources = xrc.EmptyXmlResource()

        _cwd = getattr(sys, '_MEIPASS', None)
        if not _cwd:
            _xrc = _getpath('xrc', 'fci.xrc')
        else:
            _xrc = os.path.join(_cwd, 'xrc', 'fci.xrc')

        self._resources.Load(_xrc)

        pre = wx.wizard.PreWizard()
        self.PreCreate(pre)
        self._resources.LoadOnObject(pre, parent, "fcIframe",
                                     pre.GetClassName())
        self.PostCreate(pre)

        self.conf = conf
        self._exitMode = 'abort'
        self.canCancel = True

        self.SetTitle(self.conf.getEntry('title'))
        _icon = self.conf.getIconFile()
        if _icon:
            _cwd = getattr(sys, '_MEIPASS', None)
            if _cwd:
                _icon = os.path.join(_cwd, 'data', _icon)
            self.SetIcon(wx.Icon(_icon, wx.BITMAP_TYPE_ICO))
        self.SetBitmap(
            wx.Bitmap(
                os.path.join(self.conf.dirname, self.conf.getEntry('image'))))

        xrc.XRCCTRL(self, 'progress_gauge').SetSize((-1, 3))

        #self.Bind(wx.EVT_CLOSE, self.onClose)

        self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING, self.onPageChanging)
        self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGED, self.onPageChanged)
        self.Bind(wx.wizard.EVT_WIZARD_CANCEL, self.onCancel)

        wx.xrc.XRCCTRL(self,
                       'welcome_html').Bind(wx.html.EVT_HTML_LINK_CLICKED,
                                            self.onLink)

        self.ithread = None
        self.forceClose = False
        self.SetPageSize((800, 600))
        self.installdir = GUIDirectoryInput(parent=self)
예제 #10
0
    def __init__(self, parent, log):
        wx.Panel.__init__(self, parent, -1)
        self.log = log

        # make the components
        label = wx.StaticText(self, -1,
                              "The lower panel was built from this XML:")
        label.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD))

        resourceText = open(RESFILE).read()
        text = wx.TextCtrl(self,
                           -1,
                           resourceText,
                           style=wx.TE_READONLY | wx.TE_MULTILINE)
        text.SetInsertionPoint(0)

        line = wx.StaticLine(self, -1)

        # This shows a few different ways to load XML Resources
        if 0:
            # XML Resources can be loaded from a file like this:
            res = xrc.XmlResource(RESFILE)

        elif 1:
            # or from a Virtual FileSystem:
            wx.FileSystem.AddHandler(wx.MemoryFSHandler())
            wx.MemoryFSHandler().AddFile("XRC_Resources/data_file",
                                         resourceText)
            res = xrc.XmlResource("memory:XRC_Resources/data_file")

        else:
            # or from a string, like this:
            res = xrc.EmptyXmlResource()
            res.LoadFromString(resourceText)

        # Now create a panel from the resource data
        panel = res.LoadPanel(self, "MyPanel")

        # and do the layout
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(label, 0, wx.EXPAND | wx.TOP | wx.LEFT, 5)
        sizer.Add(text, 1, wx.EXPAND | wx.ALL, 5)
        sizer.Add(line, 0, wx.EXPAND)
        sizer.Add(panel, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.SetAutoLayout(True)
예제 #11
0
    def __init__(self, ws):

        import locale
        if locale.localeconv()['decimal_point'] == ',':
            print("decimal point:", locale.localeconv()['decimal_point'])
            locale.setlocale(locale.LC_NUMERIC, 'C')

        self.ws = ws
        self.busyCursorWarning = False
        self.onIdleCmdQueue_ = list()

        self.xrc = xrc.EmptyXmlResource()
        xrcfile = 'pygimliMainFrame.xrc'

        if hasattr(sys, "frozen"):
            # frozen indicate windows.exe run??
            globPath = os.path.dirname(sys.argv[0])
        else:
            globPath = os.path.dirname(__file__)

        mainXRCFile = os.path.join(globPath, xrcfile)

        if not os.path.exists(mainXRCFile):
            raise IOError('Could not find xrc file "%s"; dying' % mainXRCFile)

        self.xrc.Load(mainXRCFile)

        self.PostCreate(self.xrc.LoadFrame(None, 'PyGIMLIMainFrame'))

        self.idleProzessPanel = self.xrc.LoadFrame(None, 'IdleProzessPanel')
        self.SetMinSize((800, 600))

        self.initFrameManager_()
        self.initDefaultMenuBar_()
        self.initToolBar_()
        self.initStatusBar_()

        self.initMainBINDS_()
        self.auiMgr.Update()

        self.stdout = None
        self.stderr = None

        self.plugins_ = dict()
        self.fileSuffixes = dict()
예제 #12
0
    def __init__(self, parent):

        self.PROGRESS_RE = re.compile('\[\s*(\d+)/(\d+)\] .*')

        self.parent = parent
        self._resources = xrc.EmptyXmlResource()
        self._resources.Load(_getpath('xrc', 'fbfrontdesk.xrc'))

        pre = wx.PrePanel()
        self.PreCreate(pre)
        self._resources.LoadOnPanel(pre, parent, "container_panel")
        self.PostCreate(pre)

        xrc.XRCCTRL(self, 'commands_box').InsertItems(self._COMMANDS, 0)
        xrc.XRCCTRL(self, 'run_b').Bind(wx.EVT_BUTTON, self.onRun)
        xrc.XRCCTRL(self, 'details_tc').SetMinSize((-1, 150))
        xrc.XRCCTRL(self, 'commands_box').SetMinSize((200, 200))
        xrc.XRCCTRL(self, 'progress').SetSize((-1, 3))
        xrc.XRCCTRL(self, 'progress').SetMaxSize((-1, 3))

        self.selectProject(None)
예제 #13
0
    def __init__(self, parent, flashdata = None, showFP =
            True, dummy = False, swallow = False):
        self.parent = parent
        self.deviceFound = False
        self.dummy = dummy
        self.flashdata = flashdata
        self.showFP = showFP
        self._resources = xrc.EmptyXmlResource()
        self._resources.Load(_getpath('xrc', 'inarift.xrc'))
        pre = wx.PrePanel()
        self._resources.LoadOnPanel(pre, parent, "inari_p")
        self.PostCreate(pre)

        xrc.XRCCTRL(self, 'flash_b').Bind(wx.EVT_BUTTON, self.onFlash)
        xrc.XRCCTRL(self, 'find_b').Bind(wx.EVT_BUTTON, self.onFind)

        for k in self.flashdata.KEYS:
            xrc.XRCCTRL(self, '%s_fp' % k).Bind(wx.EVT_FILEPICKER_CHANGED, self.onFirmwareSelected)

        self.setControls()
        self.setFlashButton()
        self.startUSBChecker()
예제 #14
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    repair_dialog_xrc = '''\
<?xml version="1.0" ?><resource class="unknown">
  <object class="wxDialog" name="RepairDialog">
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxPanel" name="repair_panel">
          <size>640,480</size>
          <XRCED>
            <assign_var>1</assign_var>
          </XRCED>
          <object class="wxBoxSizer">
            <orient>wxVERTICAL</orient>
            <object class="sizeritem">
              <object class="unknown" name="shell_ctrl"/>
              <option>1</option>
              <flag>wxALL|wxEXPAND|wxGROW</flag>
            </object>
          </object>
        </object>
        <option>1</option>
        <flag>wxALL|wxEXPAND|wxGROW</flag>
        <minsize>640,480</minsize>
      </object>
    </object>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/repair_dialog/repair_dialog_xrc',
                               repair_dialog_xrc)
    __res.Load('memory:XRC/repair_dialog/repair_dialog_xrc')
예제 #15
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    newVersionDialog_xrc = '''\
<?xml version="1.0" ?><resource>
  <object class="wxDialog" name="NewVersionDialog">
    <title>Update Info</title>
    <centered>1</centered>
    <size>640, 320</size>
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxBoxSizer">
          <orient>wxVERTICAL</orient>
          <object class="sizeritem">
            <object class="wxPanel">
              <object class="wxStaticText" name="StaticText">
                <label/>
                <pos>10,20</pos>
                <size>500, 20</size>
              </object>
            </object>
            <minsize>500,60</minsize>
          </object>
          <object class="sizeritem">
            <object class="wxTextCtrl" name="InfoText">
              <value>This is some information about the new features</value>
              <style>wxTE_MULTILINE</style>
            </object>
            <option>1</option>
            <flag>wxEXPAND|wxGROW</flag>
          </object>
        </object>
        <option>1</option>
        <flag>wxEXPAND|wxGROW</flag>
      </object>
      <object class="sizeritem">
        <object class="wxPanel">
          <object class="wxButton" name="Download">
            <label>Download</label>
            <default>1</default>
            <pos>530, 10</pos>
            <size/>
          </object>
          <object class="wxButton" name="Cancel">
            <label>Cancel</label>
            <default>0</default>
            <pos>450, 10</pos>
          </object>
        </object>
        <option>0</option>
        <flag>wxEXPAND</flag>
        <minsize>640, 40</minsize>
      </object>
    </object>
    <exstyle/>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/newVersionDialog/newVersionDialog_xrc', newVersionDialog_xrc)
    __res.Load('memory:XRC/newVersionDialog/newVersionDialog_xrc')
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    __res.Load('xrced_sample02.xrc')
예제 #17
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    interface_xrc = '''\
<?xml version="1.0" ?><resource>
  <object class="wxDialog" name="interface">
    <title>Hybrid System</title>
    <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU</style>
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxBoxSizer">
          <orient>wxVERTICAL</orient>
          <object class="sizeritem">
            <object class="wxStaticBoxSizer">
              <label>Geometries</label>
              <orient>wxVERTICAL</orient>
              <object class="sizeritem">
                <object class="wxGridSizer">
                  <cols>2</cols>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>type</label>
                    </object>
                    <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALIGN_CENTRE_HORIZONTAL</flag>
                  </object>
                  <rows>8</rows>
                  <vgap>5</vgap>
                  <hgap>5</hgap>
                  <object class="sizeritem">
                    <object class="wxChoice" name="TYPE">
                      <content>
                        <item>single</item>
                      </content>
                      <selection>0</selection>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>La</label>
                    </object>
                    <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALIGN_CENTRE_HORIZONTAL</flag>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="PARA_La">
                      <value>40</value>
                      <style/>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>Ha</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="PARA_Ha">
                      <value>40</value>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>Za</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="PARA_Za">
                      <value>0</value>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>Lb</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="PARA_Lb">
                      <value>20</value>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>Hb</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="PARA_Hb">
                      <value>20</value>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>Zb</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="PARA_Zb">
                      <value>0.5</value>
                    </object>
                  </object>
                </object>
                <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>
              </object>
            </object>
            <option>1</option>
            <flag>wxALL|wxEXPAND</flag>
          </object>
          <object class="spacer">
            <size>20,20</size>
          </object>
          <object class="sizeritem">
            <object class="wxStaticBoxSizer">
              <label>Mesh Control</label>
              <orient>wxVERTICAL</orient>
              <object class="sizeritem">
                <object class="wxGridSizer">
                  <cols>2</cols>
                  <rows>7</rows>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>Mesh Size H Direction</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="MESH_H">
                      <value>0.25</value>
                    </object>
                  </object>
                  <vgap>5</vgap>
                  <hgap>5</hgap>
                  <object class="sizeritem">
                    <object class="wxStaticText">
                      <label>Mesh Size L Direction</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="MESH_L">
                      <value>2.0</value>
                    </object>
                  </object>
                </object>
                <option>1</option>
                <flag>wxEXPAND</flag>
              </object>
            </object>
            <flag>wxALL|wxEXPAND</flag>
          </object>
          <object class="spacer">
            <size>20,20</size>
          </object>
          <object class="sizeritem">
            <object class="wxBoxSizer">
              <orient>wxHORIZONTAL</orient>
              <object class="sizeritem">
                <object class="wxGridSizer">
                  <cols>2</cols>
                  <rows>1</rows>
                  <hgap>5</hgap>
                  <object class="sizeritem">
                    <object class="wxButton">
                      <label>Help</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxButton" name="Process">
                      <label>Process</label>
                    </object>
                  </object>
                </object>
              </object>
            </object>
            <flag>wxALIGN_RIGHT</flag>
          </object>
        </object>
        <flag>wxALL|wxEXPAND</flag>
        <border>10</border>
      </object>
    </object>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/interface/interface_xrc', interface_xrc)
    __res.Load('memory:XRC/interface/interface_xrc')
예제 #18
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    test_gui_xrc = '''\
<?xml version="1.0" ?><resource version="2.5.3.0" xmlns="http://www.wxwidgets.org/wxxrc">
  <object class="wxFrame" name="text_frame">
    <object class="wxPanel" name="text_panel">
      <object class="wxBoxSizer">
        <orient>wxVERTICAL</orient>
        <object class="sizeritem">
          <object class="wxFlexGridSizer">
            <object class="sizeritem">
              <object class="wxStaticText">
                <label>SuggestTextCtrl</label>
              </object>
            </object>
            <object class="sizeritem">
              <object class="SuggestTextCtrl" name="txt_suggest">
                <size>200,-1</size>
                <value>suggest text field</value>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE</style>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxStaticText">
                <label>UnitIntegerCtrl</label>
              </object>
            </object>
            <object class="sizeritem">
              <object class="UnitIntegerCtrl">
                <size>200,-1</size>
                <value>0</value>
                <min>-10</min>
                <max>10</max>
                <unit>μm</unit>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE</style>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxStaticText" name="unit_float_label">
                <label>UnitFloatCtrl</label>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <object class="sizeritem">
              <object class="UnitFloatCtrl" name="unit_float">
                <size>200,-1</size>
                <unit>g</unit>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE</style>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxStaticText">
                <label>OwnerDrawnComboBox</label>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxOwnerDrawnComboBox" name="txt_odcbox">
                <size>200,14</size>
                <content>
                  <item>aap</item>
                  <item>noot</item>
                  <item>mies</item>
                </content>
                <selection>1</selection>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE|wxCB_READONLY</style>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <cols>2</cols>
            <vgap>5</vgap>
            <hgap>5</hgap>
          </object>
          <flag>wxALL</flag>
          <border>5</border>
        </object>
      </object>
      <fg>#E6E6FA</fg>
      <bg>#4D4D4D</bg>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <size>400,400</size>
  </object>
  <object class="wxFrame" name="button_frame">
    <object_ref ref="menu_bar"/>
    <object class="wxPanel" name="button_panel">
      <object class="wxBoxSizer">
        <orient>wxVERTICAL</orient>
      </object>
      <fg>#E6E6FA</fg>
      <bg>#4D4D4D</bg>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <size>400,400</size>
  </object>
  <object class="wxFrame" name="canvas_frame">
    <object_ref ref="menu_bar"/>
    <object class="wxPanel" name="canvas_panel">
      <object class="wxBoxSizer">
        <orient>wxVERTICAL</orient>
      </object>
      <bg>#4D4D4D</bg>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <size>400,400</size>
    <title>Cairo Test</title>
    <bg>#4D4D4D</bg>
  </object>
  <object class="wxFrame" name="fpb_frame">
    <object class="wxBoxSizer">
      <object class="sizeritem">
        <object class="wxScrolledWindow" name="scrwin">
          <object class="wxBoxSizer">
            <object class="sizeritem">
              <object class="FoldPanelBar" name="fpb">
                <object class="FoldPanelItem" name="panel_1">
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <label>Test Panel 1</label>
                  <fg>#1A1A1A</fg>
                  <bg>#666666</bg>
                  <font>
                    <size>13</size>
                    <style>normal</style>
                    <weight>normal</weight>
                    <underlined>0</underlined>
                    <face>Ubuntu</face>
                    <encoding>UTF-8</encoding>
                  </font>
                  <XRCED>
                    <assign_var>1</assign_var>
                  </XRCED>
                </object>
                <object class="FoldPanelItem" name="panel_2">
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <label>Test Panel 2</label>
                  <collapsed>1</collapsed>
                  <fg>#1A1A1A</fg>
                  <bg>#666666</bg>
                  <font>
                    <size>13</size>
                    <style>normal</style>
                    <weight>normal</weight>
                    <underlined>0</underlined>
                    <face>Ubuntu</face>
                    <encoding>UTF-8</encoding>
                  </font>
                  <XRCED>
                    <assign_var>1</assign_var>
                  </XRCED>
                </object>
                <object class="FoldPanelItem" name="panel_3">
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <label>Test Panel 3</label>
                  <fg>#1A1A1A</fg>
                  <bg>#666666</bg>
                  <font>
                    <size>13</size>
                    <style>normal</style>
                    <weight>normal</weight>
                    <underlined>0</underlined>
                    <face>Ubuntu</face>
                    <encoding>UTF-8</encoding>
                  </font>
                  <XRCED>
                    <assign_var>1</assign_var>
                  </XRCED>
                </object>
                <spacing>0</spacing>
                <bg>#1E90FF</bg>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
              <flag>wxEXPAND</flag>
            </object>
            <orient>wxVERTICAL</orient>
          </object>
          <bg>#A52A2A</bg>
          <XRCED>
            <assign_var>1</assign_var>
          </XRCED>
        </object>
        <option>1</option>
        <flag>wxEXPAND</flag>
        <minsize>100,100</minsize>
      </object>
      <orient>wxVERTICAL</orient>
    </object>
    <title>Fold Panel Bar Test Frame</title>
    <bg>#666666</bg>
  </object>
  <object class="wxFrame" name="grid_frame">
    <object_ref ref="menu_bar"/>
    <object class="ViewportGrid" name="grid_panel">
      <object class="wxPanel" name="red">
        <bg>#E65F5F</bg>
        <XRCED>
          <assign_var>1</assign_var>
        </XRCED>
      </object>
      <object class="wxPanel" name="blue">
        <bg>#57B4BA</bg>
        <XRCED>
          <assign_var>1</assign_var>
        </XRCED>
      </object>
      <object class="wxPanel" name="purple">
        <bg>#E48BD3</bg>
        <XRCED>
          <assign_var>1</assign_var>
        </XRCED>
      </object>
      <object class="wxPanel" name="brown">
        <bg>#FFC292</bg>
        <XRCED>
          <assign_var>1</assign_var>
        </XRCED>
      </object>
      <object class="wxPanel" name="yellow">
        <bg>#FFF490</bg>
        <hidden>1</hidden>
        <XRCED>
          <assign_var>1</assign_var>
        </XRCED>
      </object>
      <object class="wxPanel" name="green">
        <bg>#B2E926</bg>
        <hidden>1</hidden>
        <XRCED>
          <assign_var>1</assign_var>
        </XRCED>
      </object>
      <size>500,500</size>
      <bg>#FFC9C9</bg>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <size>500,500</size>
    <title>Cairo Test</title>
    <centered>1</centered>
    <bg>#1E90FF</bg>
  </object>
  <object class="wxMenuBar" name="menu_bar">
    <object class="wxMenu">
      <object class="wxMenuItem" name="item_inspect">
        <label>Inspect</label>
        <accel>Ctrl+V</accel>
      </object>
      <object class="separator"/>
      <object class="wxMenuItem">
        <label>Quit</label>
        <accel>Ctrl+Q</accel>
      </object>
      <label>Extra</label>
    </object>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/test_gui/test_gui_xrc', test_gui_xrc)
    __res.Load('memory:XRC/test_gui/test_gui_xrc')
예제 #19
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    test_gui_xrc = '''\
<?xml version="1.0" ?><resource class="ImageTextToggleButton" version="2.5.3.0" xmlns="http://www.wxwidgets.org/wxxrc">
  <object class="wxFrame" name="stream_frame">
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxScrolledWindow" name="scrwin">
          <object class="wxBoxSizer">
            <orient>wxVERTICAL</orient>
            <object class="sizeritem">
              <object class="FoldPanelBar" name="fpb">
                <object class="FoldPanelItem">
                  <label>STREAMS</label>
                  <XRCED>
                    <assign_var>1</assign_var>
                  </XRCED>
                  <object class="StreamBar" name="stream_bar">
                    <add_button>1</add_button>
                    <XRCED>
                      <assign_var>1</assign_var>
                    </XRCED>
                  </object>
                </object>
                <spacing>0</spacing>
                <leftspacing>0</leftspacing>
                <rightspacing>0</rightspacing>
                <bg>#4D4D4D</bg>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
              <flag>wxEXPAND</flag>
            </object>
          </object>
          <bg>#A52A2A</bg>
          <XRCED>
            <assign_var>1</assign_var>
          </XRCED>
        </object>
        <option>1</option>
        <flag>wxEXPAND</flag>
        <minsize>400,400</minsize>
      </object>
    </object>
    <size>400,400</size>
    <title>Stream panel test frame</title>
  </object>
  <object class="wxFrame" name="text_frame">
    <object class="wxPanel" name="text_panel">
      <object class="wxBoxSizer">
        <orient>wxVERTICAL</orient>
        <object class="sizeritem">
          <object class="wxFlexGridSizer">
            <object class="sizeritem">
              <object class="wxStaticText">
                <label>SuggestTextCtrl</label>
              </object>
            </object>
            <object class="sizeritem">
              <object class="SuggestTextCtrl" name="txt_suggest">
                <size>200,-1</size>
                <value>suggest text field</value>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE</style>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxStaticText">
                <label>UnitIntegerCtrl</label>
              </object>
            </object>
            <object class="sizeritem">
              <object class="UnitIntegerCtrl">
                <size>200,-1</size>
                <value>0</value>
                <min>-10</min>
                <max>10</max>
                <unit>μm</unit>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE</style>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxStaticText" name="unit_float_label">
                <label>UnitFloatCtrl</label>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <object class="sizeritem">
              <object class="UnitFloatCtrl" name="unit_float">
                <size>200,-1</size>
                <unit>g</unit>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE</style>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxStaticText">
                <label>OwnerDrawnComboBox</label>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxOwnerDrawnComboBox" name="txt_odcbox">
                <size>200,14</size>
                <content>
                  <item>aap</item>
                  <item>noot</item>
                  <item>mies</item>
                </content>
                <selection>1</selection>
                <fg>#1E90FF</fg>
                <bg>#4D4D4D</bg>
                <style>wxBORDER_NONE|wxCB_READONLY</style>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
            </object>
            <cols>2</cols>
            <vgap>5</vgap>
            <hgap>5</hgap>
          </object>
          <flag>wxALL</flag>
          <border>5</border>
        </object>
      </object>
      <fg>#E6E6FA</fg>
      <bg>#4D4D4D</bg>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <size>400,400</size>
  </object>
  <object class="wxFrame" name="button_frame">
    <object class="wxPanel" name="button_panel">
      <object class="wxBoxSizer">
        <orient>wxVERTICAL</orient>
      </object>
      <fg>#E6E6FA</fg>
      <bg>#4D4D4D</bg>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <size>400,400</size>
  </object>
  <object class="wxFrame" name="canvas_frame">
    <object class="wxPanel" name="canvas_panel">
      <object class="wxBoxSizer">
        <orient>wxVERTICAL</orient>
      </object>
      <bg>#4D4D4D</bg>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <size>404,400</size>
    <title>Cairo Test</title>
    <bg>#4D4D4D</bg>
  </object>
  <object class="wxFrame" name="fpb_frame">
    <object class="wxBoxSizer">
      <object class="sizeritem">
        <object class="wxScrolledWindow" name="scrwin">
          <object class="wxBoxSizer">
            <object class="sizeritem">
              <object class="FoldPanelBar" name="fpb">
                <object class="FoldPanelItem" name="panel_1">
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <label>Test Panel 1</label>
                  <fg>#1A1A1A</fg>
                  <bg>#666666</bg>
                  <font>
                    <size>13</size>
                    <style>normal</style>
                    <weight>normal</weight>
                    <underlined>0</underlined>
                    <family>default</family>
                    <face>Ubuntu</face>
                    <encoding>UTF-8</encoding>
                  </font>
                  <XRCED>
                    <assign_var>1</assign_var>
                  </XRCED>
                </object>
                <object class="FoldPanelItem" name="panel_2">
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <label>Test Panel 2</label>
                  <collapsed>1</collapsed>
                  <fg>#1A1A1A</fg>
                  <bg>#666666</bg>
                  <font>
                    <size>13</size>
                    <style>normal</style>
                    <weight>normal</weight>
                    <underlined>0</underlined>
                    <family>default</family>
                    <face>Ubuntu</face>
                    <encoding>UTF-8</encoding>
                  </font>
                  <XRCED>
                    <assign_var>1</assign_var>
                  </XRCED>
                </object>
                <object class="FoldPanelItem" name="panel_3">
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <object class="wxStaticText">
                    <label>LABEL</label>
                  </object>
                  <label>Test Panel 3</label>
                  <fg>#1A1A1A</fg>
                  <bg>#666666</bg>
                  <font>
                    <size>13</size>
                    <style>normal</style>
                    <weight>normal</weight>
                    <underlined>0</underlined>
                    <family>default</family>
                    <face>Ubuntu</face>
                    <encoding>UTF-8</encoding>
                  </font>
                  <XRCED>
                    <assign_var>1</assign_var>
                  </XRCED>
                </object>
                <spacing>0</spacing>
                <bg>#1E90FF</bg>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
              <flag>wxEXPAND</flag>
            </object>
            <orient>wxVERTICAL</orient>
          </object>
          <bg>#A52A2A</bg>
          <XRCED>
            <assign_var>1</assign_var>
          </XRCED>
        </object>
        <option>1</option>
        <flag>wxEXPAND</flag>
        <minsize>100,100</minsize>
      </object>
      <orient>wxVERTICAL</orient>
    </object>
    <title>Fold Panel Bar Test Frame</title>
    <bg>#666666</bg>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/test_gui/test_gui_xrc', test_gui_xrc)
    __res.Load('memory:XRC/test_gui/test_gui_xrc')
예제 #20
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    loaddisp_xrc = '''\
<?xml version="1.0" ?><resource>
  <object class="wxDialog" name="LDFRAME">
    <title>Quck Plot: Load Versus Displacement</title>
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxBoxSizer">
          <orient>wxVERTICAL</orient>
          <object class="sizeritem">
            <object class="wxGridSizer">
              <cols>2</cols>
              <rows>2</rows>
              <object class="sizeritem">
                <object class="wxRadioBox" name="LD_LOAD_SOURCE">
                  <label>Load Source</label>
                  <content>
                    <item>Load from time</item>
                    <item>Load From Reactions</item>
                  </content>
                </object>
                <option>1</option>
                <flag>wxALL|wxEXPAND</flag>
              </object>
            </object>
            <option>1</option>
            <flag>wxALL|wxEXPAND</flag>
            <border>5</border>
          </object>
          <object class="sizeritem">
            <object class="wxStaticBoxSizer">
              <label>Reaction </label>
              <orient>wxVERTICAL</orient>
              <object class="sizeritem">
                <object class="wxGridSizer">
                  <cols>2</cols>
                  <rows>4</rows>
                  <object class="sizeritem">
                    <object class="wxStaticText" name="POST_L_ItemSourceLabel">
                      <label>Reaction Type</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxChoice" name="POST_L_ItemSource">
                      <content>
                        <item>Reaction Force X</item>
                        <item>Reaction Force Y</item>
                        <item>Reaction Force Z</item>
                        <item>Reaction Moment X</item>
                        <item>Reaction Moment Y</item>
                        <item>Reaction Moment Z</item>
                      </content>
                      <selection>0</selection>
                      <size>120,20</size>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxRadioButton" name="POST_L_ItemSelSingle">
                      <label>Single Item</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="POST_L_ItemSingle">
                      <size>120,20</size>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxRadioButton" name="POST_L_ItemSelList">
                      <label>Item List</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="POST_L_ItemList">
                      <size>120,20</size>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxRadioButton" name="POST_L_ItemSelSet">
                      <label>Item Set</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxChoice" name="POST_L_ItemSet">
                      <content/>
                    </object>
                  </object>
                </object>
                <border>5</border>
              </object>
            </object>
            <flag>wxALL|wxEXPAND</flag>
            <border>5</border>
          </object>
          <object class="sizeritem">
            <object class="wxStaticBoxSizer">
              <label>Displacement</label>
              <orient>wxVERTICAL</orient>
              <object class="sizeritem">
                <object class="wxGridSizer">
                  <cols>2</cols>
                  <rows>4</rows>
                  <object class="sizeritem">
                    <object class="wxStaticText" name="POST_D_ItemSourceLabel">
                      <label>Displacement Type</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxChoice" name="POST_D_ItemSource">
                      <content>
                        <item>Displacement X</item>
                        <item>Displacement Y</item>
                        <item>Displacement Z</item>
                        <item>Rotation X</item>
                        <item>Rotation Y</item>
                        <item>Rotation Z</item>
                      </content>
                      <selection>0</selection>
                      <size>120,20</size>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxRadioButton" name="POST_D_ItemSelSingle">
                      <label>Single Item</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="POST_D_ItemSingle">
                      <size>120,20</size>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxRadioButton" name="POST_D_ItemSelList">
                      <label>Item List</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxTextCtrl" name="POST_D_ItemList">
                      <size>120,20</size>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxRadioButton" name="POST_D_ItemSelSet">
                      <label>Item Set</label>
                    </object>
                  </object>
                  <object class="sizeritem">
                    <object class="wxChoice" name="POST_D_ItemSet">
                      <content/>
                    </object>
                  </object>
                </object>
                <border>5</border>
              </object>
            </object>
            <flag>wxALL|wxEXPAND</flag>
            <border>5</border>
          </object>
          <object class="sizeritem">
            <object class="wxGridSizer">
              <cols>2</cols>
              <rows>2</rows>
              <object class="spacer">
                <size>0,0</size>
              </object>
              <object class="sizeritem">
                <object class="wxButton" name="POST_LD_QUICKPLOT">
                  <label>Quick Plot</label>
                </object>
                <flag>wxALIGN_RIGHT</flag>
              </object>
            </object>
            <flag>wxALL|wxEXPAND</flag>
            <border>5</border>
          </object>
        </object>
        <option>1</option>
        <flag>wxALL|wxEXPAND</flag>
        <border>0</border>
        <border>5</border>
      </object>
    </object>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/loaddisp/loaddisp_xrc', loaddisp_xrc)
    __res.Load('memory:XRC/loaddisp/loaddisp_xrc')
예제 #21
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    __res.Load('R.xrc')
예제 #22
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    __res.Load('tag_passage_dialog.xrc')
예제 #23
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    textwindow_view_xrc = '''\
<?xml version="1.0" ?><resource>
  <object class="wxFrame" name="TextWindow">
    <title>Results</title>
    <object class="wxToolBar" name="TextWindowToolBar">
      <object class="tool" name="ToolNew">
        <bitmap stock_id="wxART_NEW"/>
        <tooltip>Create A New Results File...</tooltip>
      </object>
      <object class="tool" name="ToolOpen">
        <bitmap stock_id="wxART_FILE_OPEN"/>
        <tooltip>Open Results File...</tooltip>
      </object>
      <object class="tool" name="ToolSave">
        <bitmap stock_id="wxART_FILE_SAVE"/>
        <tooltip>Save Results File</tooltip>
      </object>
      <object class="tool" name="ToolSaveAs">
        <bitmap stock_id="wxART_FILE_SAVE_AS"/>
        <tooltip>Save Results File As...</tooltip>
      </object>
      <object class="separator"/>
      <object class="tool" name="ToolFontSmaller">
        <bitmap>___icons_list_remove_png</bitmap>
        <tooltip>Decrease Font Size</tooltip>
        <label>TOOL</label>
      </object>
      <object class="tool" name="ToolFontBigger">
        <bitmap>___icons_list_add_png</bitmap>
        <tooltip>Increase Font Size</tooltip>
        <label>TOOL</label>
      </object>
      <style>wxTB_FLAT|wxTB_HORIZONTAL</style>
      <XRCED>
        <assign_var>1</assign_var>
      </XRCED>
    </object>
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxPanel" name="Panel">
          <object class="wxBoxSizer">
            <orient>wxVERTICAL</orient>
            <object class="sizeritem">
              <object class="wxTextCtrl" name="Text">
                <size>700,300</size>
                <font>
                  <size>10</size>
                  <style>normal</style>
                  <weight>normal</weight>
                  <underlined>0</underlined>
                  <family>default</family>
                  <face>Courier New</face>
                </font>
                <style>wxTE_MULTILINE|wxTE_READONLY|wxTE_LINEWRAP</style>
                <XRCED>
                  <assign_var>1</assign_var>
                </XRCED>
              </object>
              <option>1</option>
              <flag>wxALL|wxEXPAND|wxADJUST_MINSIZE</flag>
            </object>
          </object>
          <XRCED>
            <assign_var>1</assign_var>
          </XRCED>
        </object>
        <option>1</option>
        <flag>wxALL|wxEXPAND</flag>
      </object>
    </object>
  </object>
</resource>'''

    ___icons_list_remove_png = '''\
\x89PNG\x0d
\x1a
\x00\x00\x00\x0dIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\
\x1f\xf3\xffa\x00\x00\x00\x06bKGD\x00\x00\x00\x00\x00\x00\xf9C\xbb\x00\
\x00\x00\x09pHYs\x00\x00\x0d\xd7\x00\x00\x0d\xd7\x01B(\x9bx\x00\x00\x00\
\x07tIME\x07\xd6\x01\x0b\x0f;"\x00\\\x12\xc2\x00\x00\x00\x84IDAT8\xcb\xed\
\x91\xb1\x09\x83P\x10\x86\xbf\x07i\xdc\xc0:+\xe8\x08\x19#\xadmF\x08\x19\
 \x0b\x88\xads\xc4\x05t\x88\xd4\xb6"D\xf3\xeeO!\xca\xb3\xb33\x85\x1f\x1c\
\x1c\x07\xffw\x1c\x07\x07\xfb\xe3\xe6&\xcd\xca\x1aH6\xe6\x9a\xba\xb8\xa6\
\x00\xa7`\x98<o\x17F\x13\x0e\x18\xbdV\x09i*\x07\xdc\xf3\xd7\xb2(\x14\xd0\
}<\xef\xb6G\x023a\x82~\x10\xde\x8b\xaf\x0938\xc7\xd1J\x1c
\x9aG^m>\xe1\xf8\xfe?\xf1\x03\xacS-\xdbF\xe4\x80\xd8\x00\x00\x00\x00IE\
ND\xaeB`\x82'''

    ___icons_list_add_png = '''\
\x89PNG\x0d
\x1a
\x00\x00\x00\x0dIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\
\x1f\xf3\xffa\x00\x00\x00\x06bKGD\x00\x00\x00\x00\x00\x00\xf9C\xbb\x00\
\x00\x00\x09pHYs\x00\x00\x0d\xd7\x00\x00\x0d\xd7\x01B(\x9bx\x00\x00\x00\
\x07tIME\x07\xd6\x01\x0b\x10\x00\x11\x94Dx\xa1\x00\x00\x00\xd0IDAT8\xcb\
\xcd\x91\xbd\x0e\xc1`\x14\x86\x1f\xd2\xc5`\xb7r\x07\xd2\xba\x81\xc6`6[;\
tq\x07D\xd2\xc4d\x17\xb1Z\x0d&\x83\x84\x1b\xe8g7Z,Vi\xe2\xa7\xdf1\x10\x8a\
\xfa\x8b\x04\xefv\xf2\x9d\xbc\xf9\x9e\xe7\xc0\xaf\x93\xb8\xf7`9=\x1f0\x8f\
\xa3\xf2\xbb\x15+n/\xf9\xa0\xdc\xf4\\\x1b\xcf\xb5\x89\x14\xbdU\xf0R>.0\xee\
0\xc79\x91\xc8xrbD\x99[\xd5"[-$\x80mx\xde\xf7\\\x1b\x11\x109X\xafw\xc6\xe6\
\xcd\x0f\x00V\xeb\x90\xf92@\x04\xb4\x16\xb4@\xb0\x11\xc2P\xd8iAk\xc8eR\xf1\
\x08\x80jt&\x17\x08\xe5R\x01\x80\xc1\xc8\xbf&RO\xe5XNO\x86\xd3\x854\xfb\
3\xb9\xe2\xff\xf2\x19\xf3\xd9\xf4kg\x8c\x89\xaa\xb5O\xb6\x15\x9b=TrK\x0b\
\x8b\xb2w\x8e\x00\x00\x00\x00IEND\xaeB`\x82'''

    wx.MemoryFSHandler.AddFile('XRC/textwindow_view/textwindow_view_xrc',
                               textwindow_view_xrc)
    wx.MemoryFSHandler.AddFile('XRC/textwindow_view/___icons_list_remove_png',
                               ___icons_list_remove_png)
    wx.MemoryFSHandler.AddFile('XRC/textwindow_view/___icons_list_add_png',
                               ___icons_list_add_png)
    __res.Load('memory:XRC/textwindow_view/textwindow_view_xrc')
def __init_resources():
    global __res
    xml = pkg_resources.resource_string(__name__, 'itemGenHelp.xrc')
    __res = xrc.EmptyXmlResource()
    __res.LoadFromString(xml)
예제 #25
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()
    home = os.path.abspath(os.path.dirname(sys.argv[0]))
    __res.Load(os.path.join(home, 'XRC', 'LabelEditorDialog.xrc'))
예제 #26
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    manageLinkedProjects_xrc = '''\
<?xml version="1.0" ?><resource class="wxStaticText">
  <object class="wxDialog" name="ManageLinked">
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxBoxSizer">
          <orient>wxVERTICAL</orient>
          <object class="sizeritem">
            <object class="wxPanel">
              <size>40</size>
            </object>
            <flag>wxGROW</flag>
          </object>
          <object class="sizeritem">
            <object class="wxListBox" name="theList">
              <pos>0,0</pos>
              <size>320, 240</size>
              <style>wxSIMPLE_BORDER|wxFULL_REPAINT_ON_RESIZE</style>
            </object>
            <option>1</option>
            <flag>wxGROW</flag>
            <border>0</border>
            <minsize>322, 200</minsize>
          </object>
        </object>
        <option>1</option>
        <flag>wxGROW</flag>
      </object>
      <object class="sizeritem">
        <object class="wxPanel">
          <object class="wxButton" name="Unlink">
            <pos>550, 10</pos>
            <size>80, 30</size>
            <label>Close</label>
          </object>
          <object class="wxButton" name="Cancel">
            <label>Close</label>
            <default>1</default>
            <pos>460, 10</pos>
            <size>80, 30</size>
          </object>
        </object>
        <option>0</option>
        <flag>wxEXPAND</flag>
        <minsize>640, 40</minsize>
      </object>
    </object>
    <pos>0,0</pos>
    <size>640, 320</size>
    <title>Manage Projects</title>
    <centered>1</centered>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile(
        'XRC/manageLinkedProjects/manageLinkedProjects_xrc',
        manageLinkedProjects_xrc)
    __res.Load('memory:XRC/manageLinkedProjects/manageLinkedProjects_xrc')
예제 #27
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    __res.Load('error_dialog.xrc')
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    EMA_startup_window_xrc = '''\
<?xml version="1.0" ?>
<resource>
  <object class="wxFrame" name="HEAD">
    <object class="wxMenuBar" name="MEN_BAR"/>
    <object class="wxToolBar">
      <object class="wxButton" name="BTN_OUTPUT">
        <label>Select output file</label>
        <style>wxNO_BORDER</style>
        <bg>#80FF80</bg>
      </object>
      <object class="wxButton" name="BTN_RUN">
        <label>Run script</label>
        <style>wxBU_EXACTFIT|wxNO_BORDER</style>
        <bg>#FF8080</bg>
        <enabled>1</enabled>
      </object>
    </object>
    <object class="wxBoxSizer">
      <object class="sizeritem">
        <object class="wxStaticLine">
          <style>wxLI_HORIZONTAL</style>
        </object>
        <flag>wxEXPAND</flag>
      </object>
      <object class="sizeritem">
        <object class="wxPanel">
          <object class="wxBoxSizer">
            <orient>wxVERTICAL</orient>
            <object class="sizeritem">
              <object class="wxBoxSizer">
                <object class="sizeritem">
                  <object class="wxStaticText">
                    <label>Data output filename:</label>
                    <style>wxALIGN_LEFT</style>
                  </object>
                  <flag>wxALIGN_LEFT</flag>
                </object>
                <object class="sizeritem">
                  <object class="wxTextCtrl" name="TXT_FILENAME">
                    <value>&lt;choose the filename with button&gt;</value>
                    <style>wxTE_READONLY</style>
                  </object>
                  <flag>wxALL|wxEXPAND|wxGROW|wxALIGN_LEFT|wxADJUST_MINSIZE</flag>
                  <minsize>350,20</minsize>
                </object>
                <orient>wxHORIZONTAL</orient>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxBoxSizer">
                <orient>wxHORIZONTAL</orient>
                <object class="sizeritem">
                  <object class="wxStaticText">
                    <label>Working directory:</label>
                  </object>
                </object>
                <object class="sizeritem">
                  <object class="wxTextCtrl" name="TXT_DIRECTORY">
                    <value>&lt;choose the filename with button&gt;</value>
                    <style>wxTE_READONLY</style>
                  </object>
                  <flag>wxALL|wxEXPAND|wxGROW|wxALIGN_LEFT|wxADJUST_MINSIZE</flag>
                  <minsize>350,20</minsize>
                </object>
              </object>
            </object>
          </object>
        </object>
      </object>
      <object class="sizeritem">
        <object class="wxStaticLine"/>
      </object>
      <object class="sizeritem">
        <object class="wxPanel" name="PNL_SCRIPT_SELECT">
          <object class="wxBoxSizer">
            <orient>wxHORIZONTAL</orient>
            <object class="sizeritem">
              <object class="wxBoxSizer">
                <orient>wxVERTICAL</orient>
                <object class="sizeritem">
                  <object class="wxStaticText" name="TXT_CATEGORIES">
                    <label>Categories of scripts</label>
                  </object>
                </object>
                <object class="sizeritem">
                  <object class="wxListCtrl" name="LST_CATEGORIES">
                    <size>250,100</size>
                    <style>wxLC_LIST|wxLC_SINGLE_SEL|wxLC_VRULES</style>
                  </object>
                </object>
              </object>
            </object>
            <object class="sizeritem">
              <object class="wxBoxSizer">
                <orient>wxVERTICAL</orient>
                <object class="sizeritem">
                  <object class="wxStaticText" name="TXT_SCRIPTS">
                    <label>Select testing script</label>
                  </object>
                </object>
                <object class="sizeritem">
                  <object class="wxListCtrl" name="LST_SCRIPTS">
                    <size>250,100</size>
                    <style>wxLC_LIST|wxLC_SINGLE_SEL|wxLC_VRULES</style>
                  </object>
                </object>
              </object>
            </object>
          </object>
        </object>
      </object>
      <object class="sizeritem">
        <object class="wxPanel" name="PNL_PARAM_EDIT">
          <style/>
        </object>
        <flag>wxTOP|wxALL|wxEXPAND|wxGROW</flag>
      </object>
      <object class="sizeritem">
        <object class="wxTextCtrl" name="TXT_DESRIPTION">
          <size>500,200</size>
          <style>wxTE_AUTO_SCROLL|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP</style>
        </object>
        <flag>wxALL|wxEXPAND|wxGROW</flag>
      </object>
      <orient>wxVERTICAL</orient>
    </object>
    <size>500,500</size>
    <title>EMA - Electrical measurement apparate control</title>
    <centered>1</centered>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/EMA_startup_window/EMA_startup_window_xrc',
                               EMA_startup_window_xrc)
    __res.Load('memory:XRC/EMA_startup_window/EMA_startup_window_xrc')
예제 #29
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    wx.FileSystem.AddHandler(wx.MemoryFSHandler())

    figurecreate_xrc = '''\
<?xml version="1.0" ?><resource>
  <object class="wxDialog" name="DIALOG1">
    <title>Figure Create</title>
    <object class="wxBoxSizer">
      <orient>wxVERTICAL</orient>
      <object class="sizeritem">
        <object class="wxBoxSizer">
          <orient>wxVERTICAL</orient>
          <object class="sizeritem">
            <object class="wxFlexGridSizer">
              <cols>2</cols>
              <rows>5</rows>
              <object class="sizeritem">
                <object class="wxStaticText">
                  <label>Figure Key</label>
                </object>
                <flag>wxALIGN_CENTRE</flag>
              </object>
              <object class="sizeritem">
                <object class="wxTextCtrl" name="FIGURE_KEY">
                  <size>150,20</size>
                </object>
              </object>
              <object class="sizeritem">
                <object class="wxStaticText">
                  <label>Plot Data</label>
                </object>
                <flag>wxALIGN_CENTRE</flag>
              </object>
              <object class="sizeritem">
                <object class="wxChoice" name="FIGURE_PLOTDATAKEY">
                  <content/>
                  <size>130,20</size>
                </object>
              </object>
              <object class="sizeritem">
                <object class="wxStaticText">
                  <label>Style</label>
                </object>
                <flag>wxALIGN_CENTRE</flag>
              </object>
              <object class="sizeritem">
                <object class="wxChoice" name="FIGURE_PLOTDATASTYLE">
                  <content/>
                  <size>130,20</size>
                </object>
              </object>
              <object class="sizeritem">
                <object class="wxStaticText">
                  <label>Type</label>
                </object>
                <flag>wxALIGN_CENTRE</flag>
              </object>
              <object class="sizeritem">
                <object class="wxChoice" name="FIGURE_PLOTDATATYPE">
                  <content>
                    <item>line-one axis</item>
                    <item>line-two axes</item>
                  </content>
                  <size>130,20</size>
                </object>
              </object>
              <object class="sizeritem">
                <object class="wxButton" name="FIGURE_RESET">
                  <label>Reset</label>
                </object>
                <flag>wxALIGN_RIGHT</flag>
              </object>
              <object class="sizeritem">
                <object class="wxButton" name="FIGURE_OK">
                  <label>Apply</label>
                </object>
                <flag>wxALIGN_RIGHT</flag>
              </object>
              <vgap>5</vgap>
              <hgap>5</hgap>
            </object>
          </object>
        </object>
        <option>1</option>
        <flag>wxALL|wxEXPAND</flag>
        <border>5</border>
      </object>
    </object>
  </object>
</resource>'''

    wx.MemoryFSHandler.AddFile('XRC/figurecreate/figurecreate_xrc',
                               figurecreate_xrc)
    __res.Load('memory:XRC/figurecreate/figurecreate_xrc')
예제 #30
0
def __init_resources():
    global __res
    __res = xrc.EmptyXmlResource()

    __res.Load('guess_verse.xrc')