• 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:tool

82     // the tool position (for controls)
161 // wxButtonToolBar tool-related methods
187 wxButtonToolBarTool *tool = (wxButtonToolBarTool*) node->GetData();
188 wxRect rectTool = GetToolRect(tool);
197 return tool->IsSeparator() ? NULL : tool;
225 wxToolBarToolBase *tool = FindById(id);
227 wxCHECK_RET( tool, _T("SetToolShortHelp: no such tool") );
230 tool->SetShortHelp(help);
234 wxToolBarToolBase * WXUNUSED(tool))
240 wxToolBarToolBase * WXUNUSED(tool))
246 void wxButtonToolBar::DoEnableTool(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(enable))
251 void wxButtonToolBar::DoToggleTool(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(toggle))
256 void wxButtonToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(toggle))
285 const wxButtonToolBarTool *tool = (wxButtonToolBarTool *)toolBase;
289 wxCHECK_MSG( tool, rect, _T("GetToolRect: NULL tool") );
291 // ensure that we always have the valid tool position
297 rect.x = tool->m_x - (m_toolPacking/2);
298 rect.y = tool->m_y;
302 if (tool->IsButton())
306 if (tool->GetButton())
307 rect.SetSize(wxSize(tool->m_width, tool->m_height));
309 else if (tool->IsSeparator())
316 rect.width = tool->m_width;
317 rect.height = tool->m_height;
322 if (tool->IsButton())
326 if (tool->GetButton())
327 rect.SetSize(wxSize(tool->m_width, tool->m_height));
329 else if (tool->IsSeparator())
336 rect.width = tool->m_width;
337 rect.height = tool->m_height;
377 wxButtonToolBarTool *tool = (wxButtonToolBarTool *) node->GetData();
379 tool->m_x = x;
380 tool->m_y = y;
382 if (tool->IsButton())
384 if (!tool->GetButton())
386 wxBitmapButton* bmpButton = new wxBitmapButton(this, tool->GetId(), tool->GetNormalBitmap(), wxPoint(tool->m_x, tool->m_y), wxDefaultSize,
388 if (!tool->GetShortHelp().empty())
389 bmpButton->SetLabel(tool->GetShortHelp());
391 tool->SetButton(bmpButton);
395 tool->GetButton()->Move(wxPoint(tool->m_x, tool->m_y));
399 if (tool->GetButton())
401 wxSize sz = tool->GetButton()->GetSize();
408 if (!tool->GetShortHelp().empty())
413 dc.GetTextExtent(tool->GetShortHelp(), & tw, & th);
416 // becomes the new tool width, and we need to centre the
420 int newX = int(tool->m_x + (tw - sz.x)/2.0);
421 tool->GetButton()->Move(newX, tool->m_y);
429 tool->m_width = sz.x;
430 tool->m_height = sz.y;
436 else if (tool->IsSeparator())
442 wxControl *control = tool->GetControl();
444 tool->m_y += (m_defaultHeight - size.y)/2;
445 tool->m_width = size.x;
446 tool->m_height = size.y;
448 *pCur += tool->m_width;
472 wxButtonToolBarTool* tool = (wxButtonToolBarTool*) FindById(event.GetId());
473 if (!tool)
479 if (tool->CanBeToggled())
480 tool->Toggle(tool->IsToggled());
485 if (tool->GetKind() == wxITEM_RADIO)
486 UnToggleRadioGroup(tool);
488 if (tool->CanBeToggled())
504 wxButtonToolBarTool *tool = (wxButtonToolBarTool*) node->GetData();
505 wxRect rectTool = GetToolRect(tool);
506 if (tool->IsToggled())
517 if (m_labelHeight > 0 && !tool->GetShortHelp().empty())
520 dc.GetTextExtent(tool->GetShortHelp(), & tw, & th);
522 int x = tool->m_x;
523 dc.DrawText(tool->GetShortHelp(), x, tool->m_y + tool->GetButton()->GetSize().y + m_labelMargin);
544 wxButtonToolBarTool* tool = (wxButtonToolBarTool*) FindToolForPosition(event.GetX(), event.GetY());
545 if (tool && tool->GetButton() && (event.GetY() > (tool->m_y + tool->GetButton()->GetSize().y)))
547 wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId());
548 event.SetEventObject(tool->GetButton());