Exemplo n.º 1
0
            internal void DefaultItemGUI(TreeView.ItemGUIEventArgs args)
            {
                string label = args.item.displayName;

                if (this.IsRenaming(args.item.id))
                {
                    label = "";
                }
                base.OnContentGUI(args.rowRect, args.row, args.item, label, args.selected, args.focused, false, false);
            }
Exemplo n.º 2
0
 protected override void DrawItemBackground(Rect rect, int row, TreeViewItem item, bool selected, bool focused)
 {
     if (this.m_Owner.m_OverriddenMethods.hasDrawItemBackground)
     {
         TreeView.ItemGUIEventArgs args = new TreeView.ItemGUIEventArgs
         {
             rowRect      = rect,
             row          = row,
             item         = item,
             selected     = selected,
             focused      = focused,
             isRenaming   = this.IsRenaming(item.id),
             isDropTarget = this.IsDropTarget(item)
         };
         this.m_Owner.OnDrawItemBackground(args);
     }
 }
Exemplo n.º 3
0
 protected override void OnContentGUI(Rect rect, int row, TreeViewItem item, string label, bool selected, bool focused, bool useBoldFont, bool isPinging)
 {
     if (!isPinging)
     {
         if (this.m_Owner.m_OverriddenMethods.hasItemGUI)
         {
             TreeView.ItemGUIEventArgs args = new TreeView.ItemGUIEventArgs
             {
                 rowRect      = rect,
                 row          = row,
                 item         = item,
                 selected     = selected,
                 focused      = focused,
                 isRenaming   = this.IsRenaming(item.id),
                 isDropTarget = this.IsDropTarget(item)
             };
             if (this.m_Owner.multiColumnHeader != null)
             {
                 int[] visibleColumns = this.m_Owner.multiColumnHeader.state.visibleColumns;
                 MultiColumnHeaderState.Column[] columns = this.m_Owner.multiColumnHeader.state.columns;
                 Rect rowRect = args.rowRect;
                 for (int i = 0; i < visibleColumns.Length; i++)
                 {
                     int num = visibleColumns[i];
                     MultiColumnHeaderState.Column column = columns[num];
                     rowRect.width = column.width;
                     args.cellRect = rowRect;
                     args.column   = num;
                     this.m_Owner.OnItemGUI(args);
                     rowRect.x += column.width;
                 }
             }
             else
             {
                 this.m_Owner.OnItemGUI(args);
             }
         }
         else
         {
             base.OnContentGUI(rect, row, item, label, selected, focused, useBoldFont, false);
         }
     }
 }
Exemplo n.º 4
0
 protected virtual void OnDrawItemBackground(TreeView.ItemGUIEventArgs args)
 {
 }
Exemplo n.º 5
0
 protected virtual void OnItemGUI(TreeView.ItemGUIEventArgs args)
 {
     this.m_GUI.DefaultItemGUI(args);
 }