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

Lines Matching refs:item

245                                     const wxAuiToolBarItem& item,
252 // will get cropped based on the width of the item
264 dc.DrawText(item.GetLabel(), text_x, text_y);
272 const wxAuiToolBarItem& item,
285 dc.GetTextExtent(item.GetLabel(), &text_width, &ty);
295 (item.GetBitmap().GetWidth()/2);
299 (item.GetBitmap().GetHeight()/2);
310 (item.GetBitmap().GetHeight()/2);
312 text_x = bmp_x + 3 + item.GetBitmap().GetWidth();
319 if (!(item.GetState() & wxAUI_BUTTON_STATE_DISABLED))
321 if (item.GetState() & wxAUI_BUTTON_STATE_PRESSED)
327 else if ((item.GetState() & wxAUI_BUTTON_STATE_HOVER) || item.IsSticky())
332 // draw an even lighter background for checked item hovers (since
334 if (item.GetState() & wxAUI_BUTTON_STATE_CHECKED)
339 else if (item.GetState() & wxAUI_BUTTON_STATE_CHECKED)
350 if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED)
351 bmp = item.GetDisabledBitmap();
353 bmp = item.GetBitmap();
360 // set the item's text color based on if it is disabled
362 if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED)
365 if ( (m_flags & wxAUI_TB_TEXT) && !item.GetLabel().empty() )
367 dc.DrawText(item.GetLabel(), text_x, text_y);
375 const wxAuiToolBarItem& item,
401 dc.GetTextExtent(item.GetLabel(), &text_width, &ty);
418 (item.GetBitmap().GetWidth()/2);
421 (item.GetBitmap().GetHeight()/2);
432 (item.GetBitmap().GetHeight()/2);
434 text_x = bmp_x + 3 + item.GetBitmap().GetWidth();
441 if (item.GetState() & wxAUI_BUTTON_STATE_PRESSED)
448 else if (item.GetState() & wxAUI_BUTTON_STATE_HOVER ||
449 item.IsSticky())
459 if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED)
461 bmp = item.GetDisabledBitmap();
466 bmp = item.GetBitmap();
476 // set the item's text color based on if it is disabled
478 if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED)
481 if ( (m_flags & wxAUI_TB_TEXT) && !item.GetLabel().empty() )
483 dc.DrawText(item.GetLabel(), text_x, text_y);
490 const wxAuiToolBarItem& item,
511 dc.GetTextExtent(item.GetLabel(), &text_width, &ty);
513 // don't draw the label if it is wider than the item width
523 if ( (m_flags & wxAUI_TB_TEXT) && !item.GetLabel().empty() )
525 dc.DrawText(item.GetLabel(), text_x, text_y);
532 const wxAuiToolBarItem& item)
540 // get item's width
541 width = item.GetMinSize().GetWidth();
546 width = dc.GetTextExtent(item.GetLabel()).GetX();
555 const wxAuiToolBarItem& item)
557 if (!item.GetBitmap().IsOk() && !(m_flags & wxAUI_TB_TEXT))
560 int width = item.GetBitmap().GetWidth();
561 int height = item.GetBitmap().GetHeight();
573 if ( !item.GetLabel().empty() )
575 dc.GetTextExtent(item.GetLabel(), &tx, &ty);
580 !item.GetLabel().empty() )
585 if ( !item.GetLabel().empty() )
587 dc.GetTextExtent(item.GetLabel(), &tx, &ty);
595 if (item.HasDropDown())
738 wxAuiToolBarItem& item = items.Item(i);
740 if (item.GetKind() == wxITEM_NORMAL)
742 wxString text = item.GetShortHelp();
744 text = item.GetLabel();
749 wxMenuItem* m = new wxMenuItem(&menuPopup, item.GetId(), text, item.GetShortHelp());
751 m->SetBitmap(item.GetBitmap());
755 else if (item.GetKind() == wxITEM_SEPARATOR)
926 wxAuiToolBarItem item;
927 item.window = NULL;
928 item.label = label;
929 item.bitmap = bitmap;
930 item.disabled_bitmap = disabled_bitmap;
931 item.short_help = short_help_string;
932 item.long_help = long_help_string;
933 item.active = true;
934 item.dropdown = false;
935 item.spacer_pixels = 0;
936 item.id = tool_id;
937 item.state = 0;
938 item.proportion = 0;
939 item.kind = kind;
940 item.sizer_item = NULL;
941 item.min_size = wxDefaultSize;
942 item.user_data = 0;
943 item.sticky = false;
945 if (item.id == wxID_ANY)
946 item.id = wxNewId();
948 if (!item.disabled_bitmap.IsOk())
951 if (item.bitmap.IsOk())
953 //wxImage img = item.bitmap.ConvertToImage();
955 //item.disabled_bitmap = wxBitmap(grey_version);
956 item.disabled_bitmap = MakeDisabledBitmap(item.bitmap);
960 m_items.Add(item);
966 wxAuiToolBarItem item;
967 item.window = (wxWindow*)control;
968 item.label = label;
969 item.bitmap = wxNullBitmap;
970 item.disabled_bitmap = wxNullBitmap;
971 item.active = true;
972 item.dropdown = false;
973 item.spacer_pixels = 0;
974 item.id = control->GetId();
975 item.state = 0;
976 item.proportion = 0;
977 item.kind = wxITEM_CONTROL;
978 item.sizer_item = NULL;
979 item.min_size = control->GetEffectiveMinSize();
980 item.user_data = 0;
981 item.sticky = false;
983 m_items.Add(item);
994 wxAuiToolBarItem item;
995 item.window = NULL;
996 item.label = label;
997 item.bitmap = wxNullBitmap;
998 item.disabled_bitmap = wxNullBitmap;
999 item.active = true;
1000 item.dropdown = false;
1001 item.spacer_pixels = 0;
1002 item.id = tool_id;
1003 item.state = 0;
1004 item.proportion = 0;
1005 item.kind = wxITEM_LABEL;
1006 item.sizer_item = NULL;
1007 item.min_size = min_size;
1008 item.user_data = 0;
1009 item.sticky = false;
1011 if (item.id == wxID_ANY)
1012 item.id = wxNewId();
1014 m_items.Add(item);
1019 wxAuiToolBarItem item;
1020 item.window = NULL;
1021 item.label = wxEmptyString;
1022 item.bitmap = wxNullBitmap;
1023 item.disabled_bitmap = wxNullBitmap;
1024 item.active = true;
1025 item.dropdown = false;
1026 item.id = -1;
1027 item.state = 0;
1028 item.proportion = 0;
1029 item.kind = wxITEM_SEPARATOR;
1030 item.sizer_item = NULL;
1031 item.min_size = wxDefaultSize;
1032 item.user_data = 0;
1033 item.sticky = false;
1035 m_items.Add(item);
1040 wxAuiToolBarItem item;
1041 item.window = NULL;
1042 item.label = wxEmptyString;
1043 item.bitmap = wxNullBitmap;
1044 item.disabled_bitmap = wxNullBitmap;
1045 item.active = true;
1046 item.dropdown = false;
1047 item.spacer_pixels = pixels;
1048 item.id = -1;
1049 item.state = 0;
1050 item.proportion = 0;
1051 item.kind = wxITEM_SPACER;
1052 item.sizer_item = NULL;
1053 item.min_size = wxDefaultSize;
1054 item.user_data = 0;
1055 item.sticky = false;
1057 m_items.Add(item);
1062 wxAuiToolBarItem item;
1063 item.window = NULL;
1064 item.label = wxEmptyString;
1065 item.bitmap = wxNullBitmap;
1066 item.disabled_bitmap = wxNullBitmap;
1067 item.active = true;
1068 item.dropdown = false;
1069 item.spacer_pixels = 0;
1070 item.id = -1;
1071 item.state = 0;
1072 item.proportion = proportion;
1073 item.kind = wxITEM_SPACER;
1074 item.sizer_item = NULL;
1075 item.min_size = wxDefaultSize;
1076 item.user_data = 0;
1077 item.sticky = false;
1079 m_items.Add(item);
1125 wxAuiToolBarItem& item = m_items.Item(i);
1126 if (item.id == tool_id)
1127 return &item;
1138 wxAuiToolBarItem& item = m_items.Item(i);
1140 if (!item.sizer_item)
1143 wxRect rect = item.sizer_item->GetRect();
1146 // if the item doesn't fit on the toolbar, return NULL
1150 return &item;
1162 wxAuiToolBarItem& item = m_items.Item(i);
1164 if (!item.sizer_item)
1167 wxRect rect = item.sizer_item->GetRect();
1175 // if the item doesn't fit on the toolbar, return NULL
1179 return &item;
1210 wxAuiToolBarItem* item = FindTool(tool_id);
1211 if (!item)
1214 item->proportion = proportion;
1219 wxAuiToolBarItem* item = FindTool(tool_id);
1220 if (!item)
1223 return item->proportion;
1243 wxAuiToolBarItem* item = FindTool(tool_id);
1244 if (!item)
1247 item->dropdown = dropdown;
1252 wxAuiToolBarItem* item = FindTool(tool_id);
1253 if (!item)
1256 return item->dropdown;
1265 wxAuiToolBarItem* item = FindTool(tool_id);
1266 if (!item)
1269 if (item->sticky == sticky)
1272 item->sticky = sticky;
1280 wxAuiToolBarItem* item = FindTool(tool_id);
1281 if (!item)
1284 return item->sticky;
1394 wxAuiToolBarItem& item = m_items.Item(i);
1395 if (item.state & wxAUI_BUTTON_STATE_HOVER)
1396 former_hover = &item;
1397 item.state &= ~wxAUI_BUTTON_STATE_HOVER;
1419 wxAuiToolBarItem& item = m_items.Item(i);
1420 if (item.state & wxAUI_BUTTON_STATE_PRESSED)
1421 former_item = &item;
1422 item.state &= ~wxAUI_BUTTON_STATE_PRESSED;
1555 wxASSERT_MSG(tool, wxT("can't find tool in toolbar item array"));
1574 wxASSERT_MSG(tool, wxT("can't find tool in toolbar item array"));
1593 wxASSERT_MSG(tool, wxT("can't find tool in toolbar item array"));
1612 wxASSERT_MSG(tool, wxT("can't find tool in toolbar item array"));
1651 wxAuiToolBarItem& item = m_items.Item(i);
1652 if (item.id == tool_id)
1764 wxAuiToolBarItem& item = m_items.Item(i);
1767 switch (item.kind)
1771 wxSize size = m_art->GetLabelSize(dc, this, item);
1774 item.proportion,
1788 wxSize size = m_art->GetToolSize(dc, this, item);
1819 if (item.proportion > 0)
1820 sizer_item = sizer->AddStretchSpacer(item.proportion);
1822 sizer_item = sizer->Add(item.spacer_pixels, 1);
1827 //sizer_item = sizer->Add(item.window, item.proportion, wxEXPAND);
1832 ctrl_sizer_item = vert_sizer->Add(item.window, 0, wxEXPAND);
1836 !item.GetLabel().empty() )
1838 wxSize s = GetLabelSize(item.GetLabel());
1843 sizer_item = sizer->Add(vert_sizer, item.proportion, wxEXPAND);
1845 wxSize min_size = item.min_size;
1850 if (item.proportion != 0)
1869 item.sizer_item = sizer_item;
1931 wxAuiToolBarItem& item = m_items.Item(i);
1932 if (item.sizer_item && item.proportion > 0 && item.min_size.IsFullySpecified())
1933 item.sizer_item->SetMinSize(0,0);
1941 wxAuiToolBarItem& item = m_items.Item(i);
1942 if (item.sizer_item && item.proportion > 0 && item.min_size.IsFullySpecified())
1943 item.sizer_item->SetMinSize(item.min_size);
2031 wxAuiToolBarItem& item = m_items.Item(i);
2033 if (item.id == -1)
2036 wxUpdateUIEvent evt(item.id);
2044 if (item.window)
2045 is_enabled = item.window->IsEnabled();
2047 is_enabled = (item.state & wxAUI_BUTTON_STATE_DISABLED) ? false : true;
2052 if (item.window)
2054 item.window->Enable(new_enabled);
2059 item.state &= ~wxAUI_BUTTON_STATE_DISABLED;
2061 item.state |= wxAUI_BUTTON_STATE_DISABLED;
2069 // make sure we aren't checking an item that can't be
2070 if (item.kind != wxITEM_CHECK && item.kind != wxITEM_RADIO)
2073 bool is_checked = (item.state & wxAUI_BUTTON_STATE_CHECKED) ? true : false;
2079 item.state |= wxAUI_BUTTON_STATE_CHECKED;
2081 item.state &= ~wxAUI_BUTTON_STATE_CHECKED;
2115 wxAuiToolBarItem& item = m_items.Item(i);
2116 if (item.sizer_item && item.proportion > 0 && item.sizer_item->IsShown())
2118 item.sizer_item->Show(false);
2119 item.sizer_item->SetProportion(0);
2129 wxAuiToolBarItem& item = m_items.Item(i);
2130 if (item.sizer_item && item.proportion > 0 && !item.sizer_item->IsShown())
2132 item.sizer_item->Show(true);
2133 item.sizer_item->SetProportion(item.proportion);
2208 wxAuiToolBarItem& item = m_items.Item(i);
2210 if (!item.sizer_item)
2213 wxRect item_rect = item.sizer_item->GetRect();
2222 if (item.kind == wxITEM_SEPARATOR)
2227 else if (item.kind == wxITEM_LABEL)
2230 m_art->DrawLabel(dc, this, item, item_rect);
2232 else if (item.kind == wxITEM_NORMAL)
2235 if (!item.dropdown)
2236 m_art->DrawButton(dc, this, item, item_rect);
2238 m_art->DrawDropDownButton(dc, this, item, item_rect);
2240 else if (item.kind == wxITEM_CHECK)
2243 m_art->DrawButton(dc, this, item, item_rect);
2245 else if (item.kind == wxITEM_RADIO)
2248 m_art->DrawButton(dc, this, item, item_rect);
2250 else if (item.kind == wxITEM_CONTROL)
2253 m_art->DrawControlLabel(dc, this, item, item_rect);
2256 // fire a signal to see if the item wants to be custom-rendered
2257 OnCustomRender(dc, item, item_rect);
2615 // no hit item, remove any hit item
2640 // if we've pressed down an item and we're hovering