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

Lines Matching refs:tool

105 // tool bar tools creation
187 wxToolBarToolSimple *tool = (wxToolBarToolSimple *)toolBase;
189 wxCHECK_MSG( !tool->IsControl(), false,
192 tool->m_x = m_xPos;
193 if ( tool->m_x == wxDefaultCoord )
194 tool->m_x = m_xMargin;
196 tool->m_y = m_yPos;
197 if ( tool->m_y == wxDefaultCoord )
198 tool->m_y = m_yMargin;
200 tool->SetSize(GetToolSize());
202 if ( tool->IsButton() )
205 if ((tool->m_x + tool->GetNormalBitmap().GetWidth() + m_xMargin) > m_maxWidth)
206 m_maxWidth = (wxCoord)((tool->m_x + tool->GetWidth() + m_xMargin));
208 if ((tool->m_y + tool->GetNormalBitmap().GetHeight() + m_yMargin) > m_maxHeight)
209 m_maxHeight = (wxCoord)((tool->m_y + tool->GetHeight() + m_yMargin));
216 wxToolBarToolBase *tool)
219 tool->Detach();
276 // Find the maximum tool width and height
280 wxToolBarToolSimple *tool = (wxToolBarToolSimple *)node->GetData();
281 if ( tool->GetWidth() > maxToolWidth )
282 maxToolWidth = tool->GetWidth();
283 if (tool->GetHeight() > maxToolHeight)
284 maxToolHeight = tool->GetHeight();
294 wxToolBarToolSimple *tool = (wxToolBarToolSimple *)node->GetData();
295 if ( tool->IsSeparator() )
312 else if ( tool->IsButton() )
322 tool->m_x = (wxCoord)(m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
323 tool->m_y = (wxCoord)(m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
335 tool->m_x = (wxCoord)(m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
336 tool->m_y = (wxCoord)(m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
387 wxToolBarToolBase *tool = node->GetData();
388 if ( tool->IsButton() )
389 DrawTool(dc, tool);
412 wxToolBarToolSimple *tool = (wxToolBarToolSimple *)FindToolForPosition(x, y);
423 if (!tool)
437 if ( tool->GetId() != m_currentTool )
441 if ( event.LeftIsDown() && tool->IsEnabled() )
445 if ( tool->CanBeToggled() )
447 tool->Toggle();
450 DrawTool(tool);
453 m_currentTool = tool->GetId();
460 if ( event.LeftDown() && tool->IsEnabled() )
462 if ( tool->CanBeToggled() )
464 tool->Toggle();
467 DrawTool(tool);
471 OnRightClick(tool->GetId(), x, y);
475 // If the button is enabled and it is not a toggle tool and it is
478 if ( event.LeftUp() && tool->IsEnabled() )
480 // Pass the OnLeftClick event to tool
481 if ( !OnLeftClick(tool->GetId(), tool->IsToggled()) &&
482 tool->CanBeToggled() )
486 tool->Toggle();
489 DrawTool(tool);
497 void wxToolBarSimple::DrawTool(wxToolBarToolBase *tool)
500 DrawTool(dc, tool);
505 wxToolBarToolSimple *tool = (wxToolBarToolSimple *)toolBase;
514 wxBitmap bitmap = tool->GetNormalBitmap();
518 if ( !tool->IsToggled() )
527 int ax = (int)tool->m_x,
528 ay = (int)tool->m_y,
529 bx = (int)(tool->m_x+tool->GetWidth()),
530 by = (int)(tool->m_y+tool->GetHeight());
553 dc.Blit(tool->m_x, tool->m_y,
567 else if ( tool->IsToggled() )
578 memDC.SelectObject(tool->GetNormalBitmap());
579 dc.Blit(tool->m_x, tool->m_y, tool->GetWidth(), tool->GetHeight(),
585 bitmap = tool->GetNormalBitmap();
589 int ax = (int)tool->m_x,
590 ay = (int)tool->m_y,
591 bx = (int)(tool->m_x+tool->GetWidth()),
592 by = (int)(tool->m_y+tool->GetHeight());
613 wxCoord x = tool->m_x;
614 wxCoord y = tool->m_y;
620 dc.SetClippingRegion(tool->m_x, tool->m_y, w, h);
621 dc.Blit(tool->m_x, tool->m_y, w, h,
653 wxToolBarToolSimple *tool = (wxToolBarToolSimple *)node->GetData();
654 if ((x >= tool->m_x) && (y >= tool->m_y) &&
655 (x <= (tool->m_x + tool->GetWidth())) &&
656 (y <= (tool->m_y + tool->GetHeight())))
658 return tool;
668 // tool state change handlers
671 void wxToolBarSimple::DoEnableTool(wxToolBarToolBase *tool,
674 DrawTool(tool);
677 void wxToolBarSimple::DoToggleTool(wxToolBarToolBase *tool,
680 DrawTool(tool);
683 void wxToolBarSimple::DoSetToggle(wxToolBarToolBase * WXUNUSED(tool),
689 // Okay, so we've left the tool we're in ... we must check if the tool we're
694 wxToolBarToolBase *tool = FindById(id);
696 if ( tool && tool->CanBeToggled() )
698 if (tool->IsToggled())
699 tool->Toggle();
701 DrawTool(tool);