Beispiel #1
0
    def __init__(self):
        wx.Frame.__init__(self, None, -1, "Nebula WX Viewer",
                            wx.DefaultPosition, wx.Size(1024, 768))
        self.myApplication = None
        self.tree = NOHTree(self, -1, nebula.sel('/'))
        self.tree.SetSelectionChangedCallback(self.OnNOHSelectionChanged)
        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)

        self.nebulaRenderPanel = wx.Panel(self, -1, wx.Point(0, 0),
                                          wx.Size(640, 480), wx.SUNKEN_BORDER,
                                          "NebulaRender")
        self.nebulaRenderPanel.SetMinSize(wx.Size(640, 480))
        parentHwndEnv = nebula.new('nenv', '/sys/env/parent_hwnd')
        parentHwndEnv.seti(self.nebulaRenderPanel.GetHandle())
        self.propertyPanel = wx.Notebook(self, -1, wx.DefaultPosition,
                                        wx.Size(640, 288), wx.SUNKEN_BORDER,
                                        "Properties")
        # Set up layout
        hSizer = wx.BoxSizer(wx.HORIZONTAL)
        hSizer.Add(self.tree, 1, wx.EXPAND)
        rSizer = wx.BoxSizer(wx.VERTICAL)
        rSizer.Add(self.nebulaRenderPanel, 0, wx.EXPAND)
        rSizer.Add(self.propertyPanel, 1, wx.EXPAND)
        hSizer.Add(rSizer, 0, wx.EXPAND)
        self.SetSizer(hSizer)
        # Select the root node by default
        self.tree.SelectItem(self.tree.root)
Beispiel #2
0
    def __init__(self):
        wx.Frame.__init__(self, None, -1, "Nebula WX Viewer",
                          wx.DefaultPosition, wx.Size(1024, 768))
        self.myApplication = None
        self.tree = NOHTree(self, -1, nebula.sel('/'))
        self.tree.SetSelectionChangedCallback(self.OnNOHSelectionChanged)
        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)

        self.nebulaRenderPanel = wx.Panel(self, -1, wx.Point(0, 0),
                                          wx.Size(640, 480), wx.SUNKEN_BORDER,
                                          "NebulaRender")
        self.nebulaRenderPanel.SetMinSize(wx.Size(640, 480))
        parentHwndEnv = nebula.new('nenv', '/sys/env/parent_hwnd')
        parentHwndEnv.seti(self.nebulaRenderPanel.GetHandle())
        self.propertyPanel = wx.Notebook(self, -1, wx.DefaultPosition,
                                         wx.Size(640, 288), wx.SUNKEN_BORDER,
                                         "Properties")
        # Set up layout
        hSizer = wx.BoxSizer(wx.HORIZONTAL)
        hSizer.Add(self.tree, 1, wx.EXPAND)
        rSizer = wx.BoxSizer(wx.VERTICAL)
        rSizer.Add(self.nebulaRenderPanel, 0, wx.EXPAND)
        rSizer.Add(self.propertyPanel, 1, wx.EXPAND)
        hSizer.Add(rSizer, 0, wx.EXPAND)
        self.SetSizer(hSizer)
        # Select the root node by default
        self.tree.SelectItem(self.tree.root)
Beispiel #3
0
 def on_clone(self, event):
     obj = self.GetPyData(self.current)
     parent = pynebula.sel(obj.getfullname)
     new_lib_name = ''
     dlg = wx.TextEntryDialog(self, 'Enter name for clone', 'New library',
                              obj.getname() + '_copy')
     dlg.Destroy()
Beispiel #4
0
 def on_clone (self, event):
     obj = self.GetPyData(self.current)
     parent = pynebula.sel(obj.getfullname)
     new_lib_name = ''
     dlg = wx.TextEntryDialog(
             self, 
             'Enter name for clone',
             'New library', 
             obj.getname() + '_copy'
             )
     dlg.Destroy()
Beispiel #5
0
def get_node_list(path):
    """
    Lists all child nodes in the library path
    """
    gui_names = []
    if (pynebula.exists(str(path))):
        obj = pynebula.sel(path)
        children = obj.getchildren()
        for node in children:
            gui_names.append(node.getname())

    return gui_names
Beispiel #6
0
 def OnItemExpanding(self, event):
     item = event.GetItem()
     if self.IsExpanded(item):
         # This event can happen twice in the self.Expand call
         return
     obj = self.GetPyData(item)
     node = obj.gethead()
     while node != None:
         obj = nebula.sel(node.getfullname())
         new_item = self.AppendItem(item, obj.getname(), -1, -1, wx.TreeItemData(obj))
         if obj.gethead() != None:
             self.SetItemHasChildren(new_item, True)
         node = obj.getsucc()
Beispiel #7
0
 def OnItemExpanding(self, event):
     item = event.GetItem()
     if self.IsExpanded(item):
         # This event can happen twice in the self.Expand call
         return
     obj = self.GetPyData(item)
     node = obj.gethead()
     while node != None:
         obj = nebula.sel(node.getfullname())
         new_item = self.AppendItem(item, obj.getname(), -1, -1,
                                    wx.TreeItemData(obj))
         if obj.gethead() != None:
             self.SetItemHasChildren(new_item, True)
         node = obj.getsucc()
Beispiel #8
0
    def expand_strings(self, item):
        image_size = (16, 16)
        fileidx = self.image_list.Add(
            wx.ArtProvider_GetBitmap(wx.ART_REPORT_VIEW, wx.ART_OTHER,
                                     image_size))

        obj = self.GetPyData(item)
        obj = pynebula.sel(obj.getfullname)
        string_list = obj.getlist()
        for name in string_list:
            new_item = self.AppendItem(item, name, -1, -1,
                                       wx.TreeItemData(name))
            self.SetItemImage(new_item, fileidx, wx.TreeItemIcon_Normal)
            self.SetItemImage(new_item, fileidx, wx.TreeItemIcon_Expanded)
 def on_find_key(self, evt):
     # Execute the search user query
     if evt.KeyCode() == wx.WXK_RETURN:
         self.find.Clear()
         word = self.find.GetValue()
         if word != "":
             obj = pynebula.sel("/")
             self.__finder(obj.gethead(), word, self.search_mode)
             self.matches_text.SetLabel("Matches: %d" % self.matches)
             self.find.SetValue(word)
             self.matches = 0
         else:
             cjr.show_information_message("Please enter a search expression.")
     else:
         evt.Skip()
 def on_find_key(self, evt):
     # Execute the search user query
     if evt.KeyCode() == wx.WXK_RETURN:
         self.find.Clear()
         word = self.find.GetValue()
         if word != "":
             obj = pynebula.sel('/')
             self.__finder(obj.gethead(), word, self.search_mode)
             self.matches_text.SetLabel("Matches: %d" % self.matches)
             self.find.SetValue(word)
             self.matches = 0
         else:
             cjr.show_information_message(
                 "Please enter a search expression.")
     else:
         evt.Skip()
Beispiel #11
0
 def on_end_edit (self, event):
     new_name = event.GetLabel()
     if not event.IsEditCancelled():
         if re.compile('^[a-zA-Z0-9_\.]+$').match(new_name):
             obj = self.GetPyData(self.current)
             obj = pynebula.sel(obj.getfullname())
             obj.setname( str(new_name) )
             old_name = self.GetItemText(event.GetItem())
             file_tmp = self.files[old_name]
             self.files.pop(old_name)
             self.files[new_name] = file_tmp
         else:
             msg = "Bad name for library: \n\n" \
                         "Only alphanumerics," \
                         " '.' and '_' can be used"
             cjr.show_information_message(msg)
             event.Veto()
Beispiel #12
0
 def on_end_edit(self, event):
     new_name = event.GetLabel()
     if not event.IsEditCancelled():
         if re.compile('^[a-zA-Z0-9_\.]+$').match(new_name):
             obj = self.GetPyData(self.current)
             obj = pynebula.sel(obj.getfullname())
             obj.setname(str(new_name))
             old_name = self.GetItemText(event.GetItem())
             file_tmp = self.files[old_name]
             self.files.pop(old_name)
             self.files[new_name] = file_tmp
         else:
             msg = "Bad name for library: \n\n" \
                         "Only alphanumerics," \
                         " '.' and '_' can be used"
             cjr.show_information_message(msg)
             event.Veto()
Beispiel #13
0
    def expand_strings (self, item):
        image_size = (16, 16)
        fileidx = self.image_list.Add(
                        wx.ArtProvider_GetBitmap(
                            wx.ART_REPORT_VIEW,
                            wx.ART_OTHER, image_size
                            )
                        )

        obj = self.GetPyData(item)
        obj = pynebula.sel(obj.getfullname)
        string_list = obj.getlist()
        for name in string_list:
            new_item = self.AppendItem(
                                item, 
                                name, 
                                -1, 
                                -1,
                                wx.TreeItemData(name)
                                )
            self.SetItemImage(new_item, fileidx, wx.TreeItemIcon_Normal)
            self.SetItemImage(new_item, fileidx, wx.TreeItemIcon_Expanded)
Beispiel #14
0
def OnGuiServerOpen():
    # initialize the default tooltip
    guiServer = nebula.lookup('/sys/servers/gui')
    guiRoot = guiServer.getrootpath()
    oldCwd = nebula.psel()
    nebula.sel(guiRoot)

    toolTip = nebula.new("nguitooltip", "Tooltip")
    toolTip.setdefaultbrush("tooltip")
    toolTip.setfont("GuiSmall")
    toolTip.setcolor(0, 0, 0, 1)
    toolTip.setalignment("left")
    toolTip.setborder(0.005, 0.005)

    # define the system skin
    skin = guiServer.newskin('system')
    # set texture path pre- and postfix (NOTE: don't change path to textures:system!!!)
    skin.settextureprefix("home:export/textures/system/")
    skin.settexturepostfix(".dds")

    # active and inactive window modulation color
    skin.setactivewindowcolor(1.0, 1.0, 1.0, 1.0)
    skin.setinactivewindowcolor(0.6, 0.6, 0.6, 0.6)
    skin.setbuttontextcolor(0.0, 0.0, 0.0, 1.0)
    skin.settitletextcolor(0.0, 0.0, 0.0, 1.0)
    skin.setlabeltextcolor(0.0, 0.0, 0.0, 1.0)
    skin.setentrytextcolor(0.0, 0.0, 0.0, 1.0)
    skin.settextcolor(0.0, 0.0, 0.0, 1.0)
    skin.setmenutextcolor(0.0, 0.0, 0.0, 1.0)

    # define brushes
    skin.beginbrushes()

    # window title bar, window background, tooltip background
    skin.addbrush('titlebar','skin',66,152,10,20,1.0,1.0,1.0,1.0)
    skin.addbrush('window','skin',8,154,4,4,1.0,1.0,1.0,1.0)
    skin.addbrush('tooltip','skin',8,154,4,4,1.0,1.0,0.878,0.8)
    skin.addbrush('pink','skin',8,154,4,4,1.0,1.0,1.0,1.0)
    skin.addbrush('dragbox','skin',8,154,4,4,1.0,0.8,0.8,0.5)

    # text entry field
    skin.addbrush('textentry_n','skin',446,124,8,8,0.7,0.7,0.7,1.0)
    skin.addbrush('textentry_p','skin',446,124,8,8,0.8,0.8,0.8,1.0)
    skin.addbrush('textentry_h','skin',446,124,8,8,0.9,0.9,0.9,1.0)
    skin.addbrush('textcursor','skin',446,124,8,8,1.0,0.8,0.8,0.5)

    # the window close button
    skin.addbrush('close_n','skin',388,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('close_h','skin',388,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('close_p','skin',388,40,16,16,1.0,1.0,1.0,1.0)

    # the window size button
    skin.addbrush('size_n','skin',372,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('size_h','skin',372,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('size_p','skin',372,40,16,16,1.0,1.0,1.0,1.0)

    # arrows
    skin.addbrush('arrowleft_n','skin',68,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowleft_h','skin',84,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowleft_p','skin',100,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowright_n','skin',116,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowright_h','skin',132,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowright_p','skin',148,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowup_n','skin',164,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowup_h','skin',180,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowup_p','skin',196,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowdown_n','skin',20,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowdown_h','skin',36,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('arrowdown_p','skin',52,40,16,16,1.0,1.0,1.0,1.0)

    # sliders
    skin.addbrush('sliderhori_bg','skin', 228, 40, 16, 16, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('slidervert_bg','skin', 228, 40, 16, 16, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('sliderknobhori_n','skin',276,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('sliderknobhori_p','skin',292,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('sliderknobhori_h','skin',308,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('sliderknobvert_n','skin',324,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('sliderknobvert_p','skin',340,40,16,16,1.0,1.0,1.0,1.0)
    skin.addbrush('sliderknobvert_h','skin',356,40,16,16,1.0,1.0,1.0,1.0)

    # standard buttons
    skin.addbrush('button_n','skin',192,152,96,20,1.0,1.0,1.0,1.0)
    skin.addbrush('button_h','skin',288,152,96,20,1.0,1.0,1.0,1.0)
    skin.addbrush('button_p','skin',384,152,96,20,1.0,1.0,1.0,1.0)

    skin.addbrush('menu_n','skin',192,172,96,16,1.0,1.0,1.0,1.0)
    skin.addbrush('menu_h','skin',288,172,96,16,1.0,1.0,1.0,1.0)
    skin.addbrush('menu_p','skin',384,172,96,16,1.0,1.0,1.0,1.0)

    skin.addbrush('button_64x16_n', 'skin',  0,  0, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_64x16_h', 'skin', 64,  0, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_64x16_p', 'skin', 128, 0, 64, 16, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('button_96x16_n', 'skin', 192, 0, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_96x16_h', 'skin', 288, 0, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_96x16_p', 'skin', 384, 0, 96, 16, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('button_64x24_n', 'skin',   0, 16, 64, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_64x24_h', 'skin',  64, 16, 64, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_64x24_p', 'skin', 128, 16, 64, 24, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('button_96x24_n', 'skin', 192, 16, 96, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_96x24_h', 'skin', 288, 16, 96, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_96x24_p', 'skin', 384, 16, 96, 24, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('button_64x20_n', 'skin', 192, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_64x20_h', 'skin', 288, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('button_64x20_p', 'skin', 384, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('menu_64x16_n', 'skin',   0, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('menu_64x16_h', 'skin',  64, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('menu_64x16_p', 'skin', 128, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('menu_128x16_n', 'skin', 192, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('menu_128x16_h', 'skin', 288, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('menu_128x16_p', 'skin', 384, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)

    # list views
    skin.addbrush('list_background', 'skin', 446,  72,  8,  8, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('list_selection' , 'skin',  64, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)

    # icons
    skin.addbrush('console_n', 'skin',     0,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('console_p', 'skin',     0,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('console_h', 'skin',     0, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('texbrowser_n', 'skin',  48,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('texbrowser_p', 'skin',  48,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('texbrowser_h', 'skin',  48, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('gfxbrowser_n', 'skin',  96,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('gfxbrowser_p', 'skin',  96,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('gfxbrowser_h', 'skin',  96, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('dbgwindow_n', 'skin',  144,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('dbgwindow_p', 'skin',  144,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('dbgwindow_h', 'skin',  144, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('syswindow_n', 'skin',  192,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('syswindow_p', 'skin',  192,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('syswindow_h', 'skin',  192, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('contrwindow_n', 'skin',  336,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('contrwindow_p', 'skin',  336,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('contrwindow_h', 'skin',  336, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('hidegui_n', 'skin',    240,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('hidegui_p', 'skin',    240,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('hidegui_h', 'skin',    240, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('quit_n', 'skin',       288,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('quit_p', 'skin',       288,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('quit_h', 'skin',       288, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('hardpoint_n', 'skin',    0, 188, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('hardpoint_p', 'skin',    0, 188, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('hardpoint_h', 'skin',   48, 188, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush('disp_n', 'skin',       384,  56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush('disp_p', 'skin',       384,  56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush('disp_h', 'skin',       384, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    # the left and right logos
    skin.addbrush('n2logo', 'n2logo', 0, 0, 64, 64, 1.0, 1.0, 1.0, 0.5)

    # the color hexagon for the colorpicker
    skin.addbrush('colorhex', 'colorhexagon', 0, 0, 170, 141, 1.0, 1.0, 1.0, 1.0)

    skin.endbrushes()

    guiServer.setsystemskin(skin)
    guiServer.setskin(skin)

    # create the Nebula dock window
    guiServer.newwindow('nguidockwindow', True)

    nebula.sel(oldCwd)
Beispiel #15
0
def OnGuiServerOpen():
    # initialize the default tooltip
    guiServer = nebula.lookup("/sys/servers/gui")
    guiRoot = guiServer.getrootpath()
    oldCwd = nebula.psel()
    nebula.sel(guiRoot)

    toolTip = nebula.new("nguitooltip", "Tooltip")
    toolTip.setdefaultbrush("tooltip")
    toolTip.setfont("GuiSmall")
    toolTip.setcolor(0, 0, 0, 1)
    toolTip.setalignment("left")
    toolTip.setborder(0.005, 0.005)

    # define the system skin
    skin = guiServer.newskin("system")
    # set texture path pre- and postfix (NOTE: don't change path to textures:system!!!)
    skin.settextureprefix("home:export/textures/system/")
    skin.settexturepostfix(".dds")

    # active and inactive window modulation color
    skin.setactivewindowcolor(1.0, 1.0, 1.0, 1.0)
    skin.setinactivewindowcolor(0.6, 0.6, 0.6, 0.6)
    skin.setbuttontextcolor(0.0, 0.0, 0.0, 1.0)
    skin.settitletextcolor(0.0, 0.0, 0.0, 1.0)
    skin.setlabeltextcolor(0.0, 0.0, 0.0, 1.0)
    skin.setentrytextcolor(0.0, 0.0, 0.0, 1.0)
    skin.settextcolor(0.0, 0.0, 0.0, 1.0)
    skin.setmenutextcolor(0.0, 0.0, 0.0, 1.0)

    # define brushes
    skin.beginbrushes()

    # window title bar, window background, tooltip background
    skin.addbrush("titlebar", "skin", 66, 152, 10, 20, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("window", "skin", 8, 154, 4, 4, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("tooltip", "skin", 8, 154, 4, 4, 1.0, 1.0, 0.878, 0.8)
    skin.addbrush("pink", "skin", 8, 154, 4, 4, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("dragbox", "skin", 8, 154, 4, 4, 1.0, 0.8, 0.8, 0.5)

    # text entry field
    skin.addbrush("textentry_n", "skin", 446, 124, 8, 8, 0.7, 0.7, 0.7, 1.0)
    skin.addbrush("textentry_p", "skin", 446, 124, 8, 8, 0.8, 0.8, 0.8, 1.0)
    skin.addbrush("textentry_h", "skin", 446, 124, 8, 8, 0.9, 0.9, 0.9, 1.0)
    skin.addbrush("textcursor", "skin", 446, 124, 8, 8, 1.0, 0.8, 0.8, 0.5)

    # the window close button
    skin.addbrush("close_n", "skin", 388, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("close_h", "skin", 388, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("close_p", "skin", 388, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)

    # the window size button
    skin.addbrush("size_n", "skin", 372, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("size_h", "skin", 372, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("size_p", "skin", 372, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)

    # arrows
    skin.addbrush("arrowleft_n", "skin", 68, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowleft_h", "skin", 84, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowleft_p", "skin", 100, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowright_n", "skin", 116, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowright_h", "skin", 132, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowright_p", "skin", 148, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowup_n", "skin", 164, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowup_h", "skin", 180, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowup_p", "skin", 196, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowdown_n", "skin", 20, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowdown_h", "skin", 36, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("arrowdown_p", "skin", 52, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)

    # sliders
    skin.addbrush("sliderhori_bg", "skin", 228, 40, 16, 16, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("slidervert_bg", "skin", 228, 40, 16, 16, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("sliderknobhori_n", "skin", 276, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("sliderknobhori_p", "skin", 292, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("sliderknobhori_h", "skin", 308, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("sliderknobvert_n", "skin", 324, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("sliderknobvert_p", "skin", 340, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("sliderknobvert_h", "skin", 356, 40, 16, 16, 1.0, 1.0, 1.0, 1.0)

    # standard buttons
    skin.addbrush("button_n", "skin", 192, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_h", "skin", 288, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_p", "skin", 384, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("menu_n", "skin", 192, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("menu_h", "skin", 288, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("menu_p", "skin", 384, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("button_64x16_n", "skin", 0, 0, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_64x16_h", "skin", 64, 0, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_64x16_p", "skin", 128, 0, 64, 16, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("button_96x16_n", "skin", 192, 0, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_96x16_h", "skin", 288, 0, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_96x16_p", "skin", 384, 0, 96, 16, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("button_64x24_n", "skin", 0, 16, 64, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_64x24_h", "skin", 64, 16, 64, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_64x24_p", "skin", 128, 16, 64, 24, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("button_96x24_n", "skin", 192, 16, 96, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_96x24_h", "skin", 288, 16, 96, 24, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_96x24_p", "skin", 384, 16, 96, 24, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("button_64x20_n", "skin", 192, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_64x20_h", "skin", 288, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("button_64x20_p", "skin", 384, 152, 96, 20, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("menu_64x16_n", "skin", 0, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("menu_64x16_h", "skin", 64, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("menu_64x16_p", "skin", 128, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("menu_128x16_n", "skin", 192, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("menu_128x16_h", "skin", 288, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("menu_128x16_p", "skin", 384, 172, 96, 16, 1.0, 1.0, 1.0, 1.0)

    # list views
    skin.addbrush("list_background", "skin", 446, 72, 8, 8, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("list_selection", "skin", 64, 172, 64, 16, 1.0, 1.0, 1.0, 1.0)

    # icons
    skin.addbrush("console_n", "skin", 0, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("console_p", "skin", 0, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("console_h", "skin", 0, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("texbrowser_n", "skin", 48, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("texbrowser_p", "skin", 48, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("texbrowser_h", "skin", 48, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("gfxbrowser_n", "skin", 96, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("gfxbrowser_p", "skin", 96, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("gfxbrowser_h", "skin", 96, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("dbgwindow_n", "skin", 144, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("dbgwindow_p", "skin", 144, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("dbgwindow_h", "skin", 144, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("syswindow_n", "skin", 192, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("syswindow_p", "skin", 192, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("syswindow_h", "skin", 192, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("contrwindow_n", "skin", 336, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("contrwindow_p", "skin", 336, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("contrwindow_h", "skin", 336, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("hidegui_n", "skin", 240, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("hidegui_p", "skin", 240, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("hidegui_h", "skin", 240, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("quit_n", "skin", 288, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("quit_p", "skin", 288, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("quit_h", "skin", 288, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("hardpoint_n", "skin", 0, 188, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("hardpoint_p", "skin", 0, 188, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("hardpoint_h", "skin", 48, 188, 48, 48, 1.0, 1.0, 1.0, 1.0)

    skin.addbrush("disp_n", "skin", 384, 56, 48, 48, 1.0, 1.0, 1.0, 1.0)
    skin.addbrush("disp_p", "skin", 384, 56, 48, 48, 0.5, 0.5, 0.5, 1.0)
    skin.addbrush("disp_h", "skin", 384, 104, 48, 48, 1.0, 1.0, 1.0, 1.0)

    # the left and right logos
    skin.addbrush("n2logo", "n2logo", 0, 0, 64, 64, 1.0, 1.0, 1.0, 0.5)

    # the color hexagon for the colorpicker
    skin.addbrush("colorhex", "colorhexagon", 0, 0, 170, 141, 1.0, 1.0, 1.0, 1.0)

    skin.endbrushes()

    guiServer.setsystemskin(skin)
    guiServer.setskin(skin)

    # create the Nebula dock window
    guiServer.newwindow("nguidockwindow", True)

    nebula.sel(oldCwd)