#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Tue Jun  9 13:07:56 2009

import wx

# begin wxGlade: extracode
# end wxGlade



class MainFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MainFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.MainPanel = wx.SplitterWindow(self, -1, style=wx.SP_3D|wx.SP_BORDER)
        self.RightPane = wx.Panel(self.MainPanel, -1)
        self.SearchSizer_staticbox = wx.StaticBox(self.RightPane, -1, "Search")
        self.LeftPane = wx.Panel(self.MainPanel, -1)
        
        # Menu Bar
        self.MainMenu = wx.MenuBar()
        wxglade_tmp_menu = wx.Menu()
        wxglade_tmp_menu.Append(wx.NewId(), "Quit", "", wx.ITEM_NORMAL)
        self.MainMenu.Append(wxglade_tmp_menu, "File")
        self.SetMenuBar(self.MainMenu)
        # Menu Bar end
        self.Main_statusbar = self.CreateStatusBar(1, wx.ST_SIZEGRIP)
        self.label_1 = wx.StaticText(self.LeftPane, -1, "Title")
        self.TitleText = wx.TextCtrl(self.LeftPane, -1, "")
        self.label_2 = wx.StaticText(self.LeftPane, -1, "Tags")
        self.TagsText = wx.TextCtrl(self.LeftPane, -1, "")
        self.label_4 = wx.StaticText(self.LeftPane, -1, "Summary", style=wx.ST_NO_AUTORESIZE)
        self.SummaryText = wx.TextCtrl(self.LeftPane, -1, "", style=wx.TE_MULTILINE|wx.TE_LINEWRAP|wx.TE_WORDWRAP)
        self.label_3 = wx.StaticText(self.LeftPane, -1, "Text")
        self.ContentText = wx.TextCtrl(self.LeftPane, -1, "", style=wx.TE_MULTILINE|wx.TE_AUTO_URL|wx.TE_LINEWRAP|wx.TE_WORDWRAP)
        self.SearchText = wx.TextCtrl(self.RightPane, -1, "")
        self.DocumentList = wx.ListCtrl(self.RightPane, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MainFrame.__set_properties
        self.SetTitle("nlplib browser")
        self.Main_statusbar.SetStatusWidths([-1])
        # statusbar fields
        Main_statusbar_fields = ["Main_statusbar"]
        for i in range(len(Main_statusbar_fields)):
            self.Main_statusbar.SetStatusText(Main_statusbar_fields[i], i)
        self.SummaryText.SetFont(wx.Font(8, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "FreeSans"))
        self.SearchText.SetMinSize((136, 25))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MainFrame.__do_layout
        MainPanelHolder = wx.BoxSizer(wx.HORIZONTAL)
        BrowseSizer = wx.BoxSizer(wx.VERTICAL)
        SearchSizer = wx.StaticBoxSizer(self.SearchSizer_staticbox, wx.HORIZONTAL)
        DocumentGrid = wx.FlexGridSizer(4, 2, 5, 5)
        DocumentGrid.Add(self.label_1, 0, wx.TOP|wx.ALIGN_CENTER_VERTICAL, 2)
        DocumentGrid.Add(self.TitleText, 2, wx.EXPAND, 0)
        DocumentGrid.Add(self.label_2, 0, wx.TOP|wx.ALIGN_CENTER_VERTICAL, 2)
        DocumentGrid.Add(self.TagsText, 1, wx.EXPAND, 0)
        DocumentGrid.Add(self.label_4, 0, wx.TOP, 2)
        DocumentGrid.Add(self.SummaryText, 1, wx.EXPAND|wx.FIXED_MINSIZE, 0)
        DocumentGrid.Add(self.label_3, 0, wx.TOP, 2)
        DocumentGrid.Add(self.ContentText, 8, wx.EXPAND, 0)
        self.LeftPane.SetSizer(DocumentGrid)
        DocumentGrid.AddGrowableRow(3)
        DocumentGrid.AddGrowableCol(1)
        SearchSizer.Add(self.SearchText, 1, 0, 0)
        BrowseSizer.Add(SearchSizer, 0, wx.EXPAND, 0)
        BrowseSizer.Add(self.DocumentList, 6, wx.EXPAND, 0)
        self.RightPane.SetSizer(BrowseSizer)
        self.MainPanel.SplitVertically(self.LeftPane, self.RightPane)
        MainPanelHolder.Add(self.MainPanel, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(MainPanelHolder)
        MainPanelHolder.Fit(self)
        MainPanelHolder.SetSizeHints(self)
        self.Layout()
        # end wxGlade

# end of class MainFrame


class Browser(wx.App):
    def OnInit(self):
        wx.InitAllImageHandlers()
        frame_1 = MainFrame(None)
        self.SetTopWindow(frame_1)
        frame_1.Show()
        return 1

# end of class Browser

if __name__ == "__main__":
    browser = Browser(0)
    browser.MainLoop()
