• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/wxWidgets-2.8.12/src/generic/

Lines Matching refs:item

115     bool    bNeedsUpdate;   //  only set to true when an item whose
174 // the item image or -1
177 // user data associated with the item
180 // the item coordinates are not used in report mode; instead this pointer is
181 // NULL and the owner window is used to retrieve the item position and size
206 void SetItem( const wxListItem &item );
218 void GetItem( wxListItem &item );
252 // the list of subitems: only may have more than one item in report mode
258 // total item rect
284 // is this item selected? [NB: not used in virtual mode]
361 // prepare the DC for drawing with these item's attributes, return true if
569 // get the rect to be highlighted when the item has focus
579 // bring the selected item into view, scrolling to it if necessary
580 void MoveToItem(size_t item);
584 // bring the current item into view
587 // start editing the label of the given item
588 wxTextCtrl *EditLabel(long item,
612 // called to switch the selection from the current item to newCurrent,
634 void SetColumn( int col, wxListItem &item );
636 void GetColumn( int col, wxListItem &item ) const;
645 void SetItem( wxListItem &item );
646 void GetItem( wxListItem &item ) const;
647 void SetItemState( long item, long state, long stateMask );
649 int GetItemState( long item, long stateMask ) const;
652 bool GetItemPosition( long item, wxPoint& pos ) const;
655 wxString GetItemText(long item) const
659 info.m_itemId = item;
664 void SetItemText(long item, const wxString& value)
668 info.m_itemId = item;
679 long GetNextItem( long item, int geometry, int state ) const;
689 void InsertItem( wxListItem &item );
690 void InsertColumn( long col, wxListItem &item );
691 int GetItemWidthWithImage(wxListItem * item);
698 // change the current (== focused) item, send a notification event
733 // get the brush to use for the item highlighting
752 // currently focused item or -1
759 // redrawing happens (i.e. an item was added or deleted, or its appearance
832 // initialize the current item if needed
850 // the brushes to use for item highlighting when we do/don't have focus
858 // NULL if no item is being edited
1024 wxListHeaderData::wxListHeaderData( const wxListItem &item )
1028 SetItem( item );
1031 void wxListHeaderData::SetItem( const wxListItem &item )
1033 m_mask = item.m_mask;
1036 m_text = item.m_text;
1039 m_image = item.m_image;
1042 m_format = item.m_format;
1045 SetWidth(item.m_width);
1048 SetState(item.m_state);
1087 void wxListHeaderData::GetItem( wxListItem& item )
1089 item.m_mask = m_mask;
1090 item.m_text = m_text;
1091 item.m_image = m_image;
1092 item.m_format = m_format;
1093 item.m_width = m_width;
1094 item.m_state = m_state;
1155 wxListItemData *item = node->GetData();
1166 s = item->GetText();
1188 if (item->HasImage())
1191 m_owner->GetImageSize( item->GetImage(), w, h );
1201 if ( item->HasText() )
1214 s = item->GetTextForMeasuring();
1226 if (item->HasImage())
1229 m_owner->GetImageSize( item->GetImage(), w, h );
1257 wxListItemData *item = node->GetData();
1266 if ( item->HasImage() )
1273 if ( item->HasText() )
1298 if (item->HasImage())
1331 wxListItemData *item = node->GetData();
1332 item->SetItem( info );
1340 wxListItemData *item = node->GetData();
1341 item->GetItem( info );
1352 wxListItemData *item = node->GetData();
1353 s = item->GetText();
1364 wxListItemData *item = node->GetData();
1365 item->SetText( s );
1374 wxListItemData *item = node->GetData();
1375 item->SetImage(image);
1383 wxListItemData *item = node->GetData();
1384 return item->GetImage();
1392 wxListItemData *item = node->GetData();
1393 return item->GetAttr();
1401 wxListItemData *item = node->GetData();
1402 item->SetAttr(attr);
1514 wxListItemData *item = node->GetData();
1515 if (item->HasImage())
1521 m_owner->DrawImage(item->GetImage(), dc, rectIcon.x, rectIcon.y);
1524 if (item->HasText())
1529 dc->DrawText(item->GetText(), rectLabel.x, rectLabel.y);
1581 wxListItemData *item = node->GetData();
1587 if ( item->HasImage() )
1590 m_owner->GetImageSize( item->GetImage(), ix, iy );
1591 m_owner->DrawImage( item->GetImage(), dc, xOld, yMid - iy/2 );
1599 if ( item->HasText() )
1600 DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, width - 8);
1627 wxListItem item;
1628 m_owner->GetColumn(col, item);
1629 switch ( item.GetAlign() )
1644 wxFAIL_MSG( _T("unknown list item format") );
1814 wxListItem item;
1817 m_owner->GetColumn( i, item );
1818 int wCol = item.m_width;
1832 if ( !m_owner->IsVirtual() && (item.m_mask & wxLIST_MASK_STATE) &&
1833 (item.m_state & wxLIST_STATE_SELECTED) )
1850 dc.GetTextExtent(item.GetText(), &wLabel, &hLabel);
1855 const int image = item.m_image;
1873 switch ( wLabel < cw ? item.GetAlign() : wxLIST_FORMAT_LEFT )
1876 wxFAIL_MSG( _T("unknown list item format") );
1909 dc.DrawText( item.GetText(),
2190 // accepted, do rename the item (unless nothing changed)
2478 wxListItemData *item = node->GetData();
2479 if ( item->HasImage() )
2482 GetImageSize( item->GetImage(), ix, iy );
2892 // we just have one item to turn off
2938 //else: there may be no more such item
2947 // as the current item changed, we shouldn't start editing it when the
2948 // "slow click" timer expires as the click happened on another item
2955 wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass)
2957 wxCHECK_MSG( (item >= 0) && ((size_t)item < GetItemCount()), NULL,
2963 size_t itemEdit = (size_t)item;
2967 le.m_itemIndex = item;
2984 // Pending events dispatched by wxSafeYield might have changed the item
2986 if ( (size_t)item >= GetItemCount() )
2991 m_textctrlWrapper = new wxListTextCtrlWrapper(this, text, item);
3113 // get the item being dragged
3140 // outside of any item
3177 // The first click was on another item, so don't interpret this as
3226 // If the item is already selected, do not update the selection.
3227 // Multi-selections should not be cleared if a selected item is clicked.
3306 // forceClick is only set if the previous click was on another item
3311 void wxListMainWindow::MoveToItem(size_t item)
3313 if ( item == (size_t)-1 )
3316 wxRect rect = GetLineRect(item);
3402 _T("invalid item index in OnArrowChar()") );
3436 // in single selection mode we must always have a selected item
3502 // no item -> nothing to do
3761 void wxListMainWindow::SetColumn( int col, wxListItem &item )
3767 if ( item.m_width == wxLIST_AUTOSIZE_USEHEADER )
3768 item.m_width = GetTextLength( item.m_text );
3771 column->SetItem( item );
3845 wxListItem item;
3847 itemData->GetItem(item);
3848 int itemWidth = GetItemWidthWithImage(&item);
3884 void wxListMainWindow::GetColumn( int col, wxListItem &item ) const
3890 column->GetItem( item );
3903 // item state
3906 void wxListMainWindow::SetItem( wxListItem &item )
3908 long id = item.m_itemId;
3910 _T("invalid item index in SetItem") );
3915 line->SetItem( item.m_col, item );
3917 // Set item state if user wants
3918 if ( item.m_mask & wxLIST_MASK_STATE )
3919 SetItemState( item.m_itemId, item.m_state, item.m_state );
3924 int width = GetItemWidthWithImage(&item);
3926 if (width > m_aColWidths.Item(item.m_col)->nMaxWidth)
3927 m_aColWidths.Item(item.m_col)->nMaxWidth = width;
3931 // update the item on screen
3974 // unfocus all: only one item can be focussed, so clearing focus for
3975 // all items is simply clearing focus of the focussed item.
3990 _T("invalid list ctrl item index in SetItem") );
3993 size_t item = (size_t)litem; // safe because of the check above
4000 // don't do anything if this item is already focused
4001 if ( item != m_current )
4003 ChangeCurrent(item);
4020 // don't do anything if this item is not focused
4021 if ( item == m_current )
4027 // we must unselect the old current item as well or we
4028 // might end up with more than one selected item in a
4047 // selecting the item also makes it the focused one in the
4049 if ( m_current != item )
4051 ChangeCurrent(item);
4062 // only the current item may be selected anyhow
4063 if ( item != m_current )
4068 if ( HighlightLine(item, on) )
4070 RefreshLine(item);
4075 int wxListMainWindow::GetItemState( long item, long stateMask ) const
4077 wxCHECK_MSG( item >= 0 && (size_t)item < GetItemCount(), 0,
4078 _T("invalid list ctrl item index in GetItemState()") );
4084 if ( (size_t)item == m_current )
4090 if ( IsHighlighted(item) )
4097 void wxListMainWindow::GetItem( wxListItem &item ) const
4099 wxCHECK_RET( item.m_itemId >= 0 && (size_t)item.m_itemId < GetItemCount(),
4100 _T("invalid item index in GetItem") );
4102 wxListLineData *line = GetLine((size_t)item.m_itemId);
4103 line->GetItem( item.m_col, item );
4105 // Get item state if user wants it
4106 if ( item.m_mask & wxLIST_MASK_STATE )
4107 item.m_state = GetItemState( item.m_itemId, wxLIST_STATE_SELECTED |
4112 // item count
4155 // item position/size
4215 bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos) const
4218 GetItemRect(item, rect);
4392 // We have reached the last item.
4451 long wxListMainWindow::GetNextItem( long item,
4455 long ret = item,
4460 // notice that we start with the next item (or the first one if item == -1)
4466 // just no such item
4495 _T("invalid item index in DeleteItem") );
4502 // if the current item is being deleted, we want the next one to
4516 wxListItem item;
4523 itemData->GetItem(item);
4525 itemWidth = GetItemWidthWithImage(&item);
4593 // notifications for each item deletion in this case but only one event
4635 // scanning for an item
4691 wxListItem item;
4692 line->GetItem( 0, item );
4693 if (item.m_data == data)
4752 void wxListMainWindow::InsertItem( wxListItem &item )
4757 wxCHECK_RET( item.m_itemId >= 0, _T("invalid item index") );
4759 if (item.m_itemId > count)
4760 item.m_itemId = count;
4762 size_t id = item.m_itemId;
4770 // calculate the width of the item and adjust the max column width
4771 wxColWidthInfo *pWidthInfo = m_aColWidths.Item(item.GetColumn());
4772 int width = GetItemWidthWithImage(&item);
4773 item.SetWidth(width);
4780 line->SetItem( item.m_col, item );
4786 // If an item is selected at or below the point of insertion, we need to
4797 void wxListMainWindow::InsertColumn( long col, wxListItem &item )
4802 if (item.m_width == wxLIST_AUTOSIZE_USEHEADER)
4803 item.m_width = GetTextLength( item.m_text );
4805 wxListHeaderData *column = new wxListHeaderData( item );
4841 int wxListMainWindow::GetItemWidthWithImage(wxListItem * item)
4848 if (item->GetImage() != -1)
4851 GetImageSize( item->GetImage(), ix, iy );
4855 if (!item->GetText().empty())
4858 dc.GetTextExtent( item->GetText(), &w, NULL );
4876 wxListItem item;
4877 line1->GetItem( 0, item );
4878 wxUIntPtr data1 = item.m_data;
4879 line2->GetItem( 0, item );
4880 wxUIntPtr data2 = item.m_data;
5194 bool wxGenericListCtrl::GetColumn(int col, wxListItem &item) const
5196 m_mainWin->GetColumn( col, item );
5200 bool wxGenericListCtrl::SetColumn( int col, wxListItem& item )
5202 m_mainWin->SetColumn( col, item );
5251 int wxGenericListCtrl::GetItemState( long item, long stateMask ) const
5253 return m_mainWin->GetItemState( item, stateMask );
5256 bool wxGenericListCtrl::SetItemState( long item, long state, long stateMask )
5258 m_mainWin->SetItemState( item, state, stateMask );
5263 wxGenericListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) )
5265 return SetItemColumnImage(item, 0, image);
5269 wxGenericListCtrl::SetItemColumnImage( long item, long column, int image )
5274 info.m_itemId = item;
5280 wxString wxGenericListCtrl::GetItemText( long item ) const
5282 return m_mainWin->GetItemText(item);
5285 void wxGenericListCtrl::SetItemText( long item, const wxString& str )
5287 m_mainWin->SetItemText(item, str);
5290 wxUIntPtr wxGenericListCtrl::GetItemData( long item ) const
5294 info.m_itemId = item;
5299 bool wxGenericListCtrl::SetItemPtrData( long item, wxUIntPtr data )
5303 info.m_itemId = item;
5309 bool wxGenericListCtrl::SetItemData(long item, long data)
5311 return SetItemPtrData(item, data);
5319 bool wxGenericListCtrl::GetItemRect( long item, wxRect &rect, int WXUNUSED(code) ) const
5321 m_mainWin->GetItemRect( item, rect );
5327 bool wxGenericListCtrl::GetItemPosition( long item, wxPoint& pos ) const
5329 m_mainWin->GetItemPosition( item, pos );
5333 bool wxGenericListCtrl::SetItemPosition( long WXUNUSED(item), const wxPoint& WXUNUSED(pos) )
5367 void wxGenericListCtrl::SetItemTextColour( long item, const wxColour &col )
5370 info.m_itemId = item;
5375 wxColour wxGenericListCtrl::GetItemTextColour( long item ) const
5378 info.m_itemId = item;
5383 void wxGenericListCtrl::SetItemBackgroundColour( long item, const wxColour &col )
5386 info.m_itemId = item;
5391 wxColour wxGenericListCtrl::GetItemBackgroundColour( long item ) const
5394 info.m_itemId = item;
5409 void wxGenericListCtrl::SetItemFont( long item, const wxFont &f )
5412 info.m_itemId = item;
5417 wxFont wxGenericListCtrl::GetItemFont( long item ) const
5420 info.m_itemId = item;
5447 long wxGenericListCtrl::GetNextItem( long item, int geom, int state ) const
5449 return m_mainWin->GetNextItem( item, geom, state );
5507 bool wxGenericListCtrl::DeleteItem( long item )
5509 m_mainWin->DeleteItem( item );
5542 wxTextCtrl *wxGenericListCtrl::EditLabel(long item,
5545 return m_mainWin->EditLabel( item, textControlClass );
5553 bool wxGenericListCtrl::EnsureVisible( long item )
5555 m_mainWin->EnsureVisible( item );
5575 // TODO: sub item hit testing
5615 long wxGenericListCtrl::InsertColumn( long col, wxListItem &item )
5619 m_mainWin->InsertColumn( col, item );
5634 wxListItem item;
5635 item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT;
5636 item.m_text = heading;
5639 item.m_mask |= wxLIST_MASK_WIDTH;
5640 item.m_width = width;
5643 item.m_format = format;
5645 return InsertColumn( col, item );
5655 // item1 is the long data associated with a first item (NOT the index).
5656 // item2 is the long data associated with a second item (NOT the index).
5658 // The return value is a negative number if the first item should precede the second
5659 // item, a positive number of the second item should precede the first,
5857 wxString wxGenericListCtrl::OnGetItemText(long WXUNUSED(item), long WXUNUSED(col)) const
5866 int wxGenericListCtrl::OnGetItemImage(long WXUNUSED(item)) const
5874 int wxGenericListCtrl::OnGetItemColumnImage(long item, long column) const
5877 return OnGetItemImage(item);
5883 wxGenericListCtrl::OnGetItemAttr(long WXUNUSED_UNLESS_DEBUG(item)) const
5885 wxASSERT_MSG( item >= 0 && item < GetItemCount(),
5886 _T("invalid item index in OnGetItemAttr()") );
5899 void wxGenericListCtrl::RefreshItem(long item)
5901 m_mainWin->RefreshLine(item);