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

Lines Matching refs:tool

123     // is this tool pressed, even temporarily? (this is different from being
131 // press the tool temporarily by inverting its toggle state
139 // the tool position (for controls)
146 // true if the tool is pressed
149 // true if the tool is under the mouse
216 // wxToolBar tool-related methods
242 wxToolBarToolBase *tool = node->GetData();
243 wxRect rectTool = GetToolRect(tool);
252 return tool->IsSeparator() ? NULL : tool;
261 wxToolBarToolBase *tool = FindById(id);
263 wxCHECK_RET( tool, _T("SetToolShortHelp: no such tool") );
265 tool->SetShortHelp(help);
269 wxToolBarToolBase * WXUNUSED(tool))
281 wxToolBarToolBase * WXUNUSED(tool))
291 void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
295 if ( !enable && !tool->GetDisabledBitmap().Ok() )
297 wxImage image(tool->GetNormalBitmap().ConvertToImage());
299 tool->SetDisabledBitmap(image.ConvertToGreyscale());
303 RefreshTool(tool);
306 void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool WXUNUSED(toggle))
308 // note that if we're called the tool did change state (the base class
310 RefreshTool(tool);
313 void wxToolBar::DoSetToggle(wxToolBarToolBase *tool, bool WXUNUSED(toggle))
315 RefreshTool(tool);
342 const wxToolBarTool *tool = (wxToolBarTool *)toolBase;
346 wxCHECK_MSG( tool, rect, _T("GetToolRect: NULL tool") );
348 // ensure that we always have the valid tool position
354 rect.x = tool->m_x - m_xMargin;
355 rect.y = tool->m_y - m_yMargin;
359 if (tool->IsButton())
369 GetFont().GetPointSize() * tool->GetLabel().length();
373 else if (tool->IsSeparator())
380 rect.width = tool->m_width;
381 rect.height = tool->m_height;
386 if (tool->IsButton())
396 GetFont().GetPointSize() * tool->GetLabel().length();
400 else if (tool->IsSeparator())
407 rect.width = tool->m_width;
408 rect.height = tool->m_height;
459 wxToolBarTool *tool = (wxToolBarTool *) node->GetData();
461 tool->m_x = x;
462 tool->m_y = y;
465 if (tool->IsButton())
472 heightTool += GetFont().GetPointSize() * tool->GetLabel().length();
478 widthTool += GetFont().GetPointSize() * tool->GetLabel().length();
483 if(widthTool > maxWidthTool) // Record max width of tool
488 if(heightTool > maxHeightTool) // Record max width of tool
495 else if (tool->IsSeparator())
501 wxControl *control = tool->GetControl();
503 tool->m_y += (m_defaultHeight - size.y)/2;
504 tool->m_width = size.x;
505 tool->m_height = size.y;
507 *pCur += tool->m_width;
580 void wxToolBar::RefreshTool(wxToolBarToolBase *tool)
582 RefreshRect(GetToolRect(tool));
627 wxToolBarTool *tool = (wxToolBarTool*) node->GetData();
628 wxRect rectTool = GetToolRect(tool);
644 if (tool->IsSeparator() && !HasFlag(wxTB_FLAT))
653 if ( tool->IsEnabled() )
656 if ( !HasFlag(wxTB_FLAT) || tool->IsUnderMouse() )
659 else // disabled tool
664 //if ( tool == m_toolCaptured )
667 if ( tool->IsPressed() )
672 if ( !tool->IsSeparator() )
674 label = tool->GetLabel();
675 bitmap = tool->GetBitmap();
679 if ( !tool->IsControl() )
695 rend->DrawToolBarButton(dc, label, bitmap, rectTool, flags, tool->GetStyle(), tbStyle);
699 wxControl *control = tool->GetControl();
700 control->Move(tool->m_x, tool->m_y);
713 wxToolBarTool *tool = (wxToolBarTool*) FindById(numArg);
714 if (!tool)
725 if ( tool->CanBeToggled() && tool->IsToggled() )
727 tool->Toggle(false);
730 if( tool->IsInverted() )
741 wxLogTrace(_T("toolbar"), _T("Button '%s' pressed."), tool->GetShortHelp().c_str());
743 tool->Invert();
745 RefreshTool( tool );
749 wxLogTrace(_T("toolbar"), _T("Button '%s' released."), tool->GetShortHelp().c_str());
751 wxASSERT_MSG( tool->IsInverted(), _T("release unpressed button?") );
753 tool->Invert();
755 RefreshTool( tool );
760 if ( tool->CanBeToggled() )
762 tool->Toggle();
764 RefreshTool( tool );
766 isToggled = tool->IsToggled();
768 else // simple non-checkable tool
772 OnLeftClick( tool->GetId(), isToggled );
776 wxCHECK_MSG( tool, false, _T("no tool to enter?") );
778 if ( HasFlag(wxTB_FLAT) && tool->IsEnabled() )
780 tool->SetUnderMouse( true );
782 if ( !tool->IsToggled() )
783 RefreshTool( tool );
788 wxCHECK_MSG( tool, false, _T("no tool to leave?") );
790 if ( HasFlag(wxTB_FLAT) && tool->IsEnabled() )
792 tool->SetUnderMouse( false );
794 if ( !tool->IsToggled() )
795 RefreshTool( tool );
837 wxToolBarToolBase *tool = tbar->FindToolForPosition(event.GetX(), event.GetY());
844 if ( !tool || !tool->IsEnabled() )
850 m_toolCapture = tool;
852 consumer->PerformAction( wxACTION_BUTTON_PRESS, tool->GetId() );
866 if ( tool == m_toolCapture )
889 wxToolBarTool *tool;
892 // We cannot possibly be over a tool when
894 tool = NULL;
898 tool = (wxToolBarTool*) tbar->FindToolForPosition( event.GetX(), event.GetY() );
903 // During capture we only care of the captured tool
904 if (tool && (tool != m_toolCapture))
905 tool = NULL;
907 if (tool == m_toolLast)
910 if (tool)
915 m_toolLast = tool;
919 if (tool == m_toolLast)
924 // Leave old tool if any
928 if (tool)
930 // Enter new tool if any
931 consumer->PerformAction( wxACTION_TOOLBAR_ENTER, tool->GetId() );
934 m_toolLast = tool;