Ejemplo n.º 1
0
	def __init__(self, parent, id, pos, size, style, log):
		"""初期化

		[引数]
		parent -- 親ウインドウ
		id     -- ウインドウID
		pos    -- 位置
		size   -- サイズ
		style  -- ウインドウスタイル
		# wx.TreeCtrl と同じ

		[戻り値]
		this
		"""
		
		wx.TreeCtrl.__init__(self, parent, id, pos, size, style)
		self.log = log

		isz = (16,16)
		il = wx.ImageList(isz[0], isz[1])

		self.treeimg_list = {}

		self.parent = parent
		
		rticon   = il.Add(rtimages.getRTLogoBitmap())
		computer = il.Add(rtimages.getComputerBitmap())
		manager  = il.Add(rtimages.getManagerBitmap())
		category = il.Add(rtimages.getCategoryBitmap())
		module   = il.Add(rtimages.getModuleBitmap())
		component= il.Add(rtimages.getComponentBitmap())
						  
		self.treeimg_list['unknown'] = (rticon,rticon)
		self.treeimg_list['ns'] = (rticon,rticon)
		self.treeimg_list['host_cxt'] = (computer, computer)
		self.treeimg_list['mgr_cxt'] = (manager, manager)
		self.treeimg_list['mgr'] = (category, category)
		self.treeimg_list['cate_cxt'] = (category, category)
		self.treeimg_list['mod_cxt'] = (module, module)
		self.treeimg_list['rtc'] = (component, component)

		print self.treeimg_list
		self.depth = 0

		self.SetImageList(il)
		self.il = il

		self.depth = 0
		self.root = self.AddRoot("NS:")
		self.SetPyData(self.root, None)
		self.SetItemImage(self.root, self.treeimg_list['ns'][0],
						  wx.TreeItemIcon_Normal)
		self.SetItemImage(self.root, self.treeimg_list['ns'][0],
						  wx.TreeItemIcon_Expanded)
		self.Expand(self.root)
		rootitem_id = self.GetRootItem()
		self.SelectItem(rootitem_id)

		self.kindDispMode = self.parent.frame.kindDispMode
Ejemplo n.º 2
0
    def __init__(self, parent, id, pos, size, style, log):
        """初期化

		[引数]
		parent -- 親ウインドウ
		id     -- ウインドウID
		pos    -- 位置
		size   -- サイズ
		style  -- ウインドウスタイル
		# wx.TreeCtrl と同じ

		[戻り値]
		this
		"""

        wx.TreeCtrl.__init__(self, parent, id, pos, size, style)
        self.log = log

        isz = (16, 16)
        il = wx.ImageList(isz[0], isz[1])

        self.treeimg_list = {}

        self.parent = parent

        rticon = il.Add(rtimages.getRTLogoBitmap())
        computer = il.Add(rtimages.getComputerBitmap())
        manager = il.Add(rtimages.getManagerBitmap())
        category = il.Add(rtimages.getCategoryBitmap())
        module = il.Add(rtimages.getModuleBitmap())
        component = il.Add(rtimages.getComponentBitmap())

        self.treeimg_list['unknown'] = (rticon, rticon)
        self.treeimg_list['ns'] = (rticon, rticon)
        self.treeimg_list['host_cxt'] = (computer, computer)
        self.treeimg_list['mgr_cxt'] = (manager, manager)
        self.treeimg_list['mgr'] = (category, category)
        self.treeimg_list['cate_cxt'] = (category, category)
        self.treeimg_list['mod_cxt'] = (module, module)
        self.treeimg_list['rtc'] = (component, component)

        print self.treeimg_list
        self.depth = 0

        self.SetImageList(il)
        self.il = il

        self.depth = 0
        self.root = self.AddRoot("NS:")
        self.SetPyData(self.root, None)
        self.SetItemImage(self.root, self.treeimg_list['ns'][0],
                          wx.TreeItemIcon_Normal)
        self.SetItemImage(self.root, self.treeimg_list['ns'][0],
                          wx.TreeItemIcon_Expanded)
        self.Expand(self.root)
        rootitem_id = self.GetRootItem()
        self.SelectItem(rootitem_id)

        self.kindDispMode = self.parent.frame.kindDispMode
Ejemplo n.º 3
0
    def __init__(self, parent):
        self.datamap = [
            ("Instance ID", ""),
            ("Impl. ID", ""),
            ("Maker", ""),
            ("Description", ""),
            ("Version", ""),
            ("Category", ""),
            ("Component Type" , ""),
            ("Activity Type", ""),
            ("Max Instance", ""),
            ("Language", ""),
            ("Lang. Type", ""),
            ("InPort Attr.", ""),
            ("    Name", ""),
            ("    Type", ""),
            ("OutPort Attr.", ""),
            ("    Name", ""),
            ("    Type", "")]
        
        wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)

        self.il = wx.ImageList(16, 16)
        self.comp_bmp = self.il.Add(rtimages.getComponentBitmap())
        self.inp_bmp = self.il.Add(rtimages.getInPortBitmap())
        self.outp_bmp = self.il.Add(rtimages.getOutPortBitmap())
        self.blank_bmp = self.il.Add(rtimages.getBlankBitmap())

        tID = wx.NewId()
        self.list = RtmProfileListCtrl(self, tID, wx.DefaultPosition,
                                       (1000, 1000), #wx.DefaultSize,
                                       wx.LC_REPORT | wx.SUNKEN_BORDER
                                       | wx.LC_VRULES | wx.LC_HRULES)
        
        self.list.SetImageList(self.il, wx.IMAGE_LIST_SMALL)
        info = wx.ListItem()
        info.m_mask = wx.LIST_MASK_TEXT | wx.LIST_MASK_IMAGE | wx.LIST_MASK_WIDTH | wx.LIST_MASK_FORMAT
        info.m_text = "Attribute"
        info.m_image = -1
        info.m_width = 120
        info.m_format = wx.LIST_FORMAT_LEFT
        self.list.InsertColumnInfo(0, info)
        
        info.m_width = 100
        info.m_text = "Value"
        self.list.InsertColumnInfo(1, info)
        self.PopulateList()        

        self.Bind(wx.EVT_SIZE, self.OnSize)
Ejemplo n.º 4
0
    def __init__(self, parent):
        self.datamap = [("Instance ID", ""), ("Impl. ID", ""), ("Maker", ""),
                        ("Description", ""), ("Version", ""), ("Category", ""),
                        ("Component Type", ""), ("Activity Type", ""),
                        ("Max Instance", ""), ("Language", ""),
                        ("Lang. Type", ""), ("InPort Attr.", ""),
                        ("    Name", ""), ("    Type", ""),
                        ("OutPort Attr.", ""), ("    Name", ""),
                        ("    Type", "")]

        wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)

        self.il = wx.ImageList(16, 16)
        self.comp_bmp = self.il.Add(rtimages.getComponentBitmap())
        self.inp_bmp = self.il.Add(rtimages.getInPortBitmap())
        self.outp_bmp = self.il.Add(rtimages.getOutPortBitmap())
        self.blank_bmp = self.il.Add(rtimages.getBlankBitmap())

        tID = wx.NewId()
        self.list = RtmProfileListCtrl(
            self,
            tID,
            wx.DefaultPosition,
            (1000, 1000),  #wx.DefaultSize,
            wx.LC_REPORT | wx.SUNKEN_BORDER
            | wx.LC_VRULES | wx.LC_HRULES)

        self.list.SetImageList(self.il, wx.IMAGE_LIST_SMALL)
        info = wx.ListItem()
        info.m_mask = wx.LIST_MASK_TEXT | wx.LIST_MASK_IMAGE | wx.LIST_MASK_WIDTH | wx.LIST_MASK_FORMAT
        info.m_text = "Attribute"
        info.m_image = -1
        info.m_width = 120
        info.m_format = wx.LIST_FORMAT_LEFT
        self.list.InsertColumnInfo(0, info)

        info.m_width = 100
        info.m_text = "Value"
        self.list.InsertColumnInfo(1, info)
        self.PopulateList()

        self.Bind(wx.EVT_SIZE, self.OnSize)