Beispiel #1
0
/**
 * Move button to the specified left and top coordinates.
 *
 * The coordinates SHOULD BE in pixels of the screen (i.e. after scaling!)
 *
 * @param ch
 * @param left    Number of pixels from the left (in screen pixels)
 * @param top     Number of pixels from the top (in screen pixels)
 */
void
KeyboardControl::MoveButton(TCHAR ch, PixelScalar left, PixelScalar top)
{
  ButtonWindow *kb = FindButton(ch);
  if (kb)
    kb->Move(left, top);
}
Beispiel #2
0
BOOL CToolBarEx::OnNotify(LPNMHDR nm)
{
	if (nm->hwndFrom != m_hWnd)
		return FALSE;

	int nID = ((LPNMTBGETINFOTIPA) nm)->iItem;

	fsTBInfo *tb = FindButton (nID);

	if (tb == NULL)
		return FALSE;

	switch (nm->code)
	{
		case TBN_GETINFOTIPA:
		{
			LPNMTBGETINFOTIPA inf = (LPNMTBGETINFOTIPA) nm;
			strcpy (inf->pszText, tb->strToolTip);
		}
		break;

		case TBN_GETINFOTIPW:
		{
			return FALSE;
			
		}
		break;

		default:
			return FALSE;
	}

	return TRUE;
}
Beispiel #3
0
/**
 * Move button to the specified left and top coordinates.
 *
 * The coordinates SHOULD BE in pixels of the screen (i.e. after scaling!)
 *
 * @param ch
 * @param left    Number of pixels from the left (in screen pixels)
 * @param top     Number of pixels from the top (in screen pixels)
 */
void
KeyboardWidget::MoveButton(unsigned ch, PixelScalar left, PixelScalar top)
{
  ButtonWindow *kb = FindButton(ch);
  if (kb)
    kb->Move(left, top);
}
Beispiel #4
0
/**
 * Resizes the button to specified width and height values according to display pixels!
 *
 *
 * @param ch
 * @param width   Width measured in display pixels!
 * @param height  Height measured in display pixels!
 */
void
KeyboardWidget::ResizeButton(unsigned ch,
                              UPixelScalar width, UPixelScalar height)
{
  ButtonWindow *kb = FindButton(ch);
  if (kb)
    kb->Resize(width, height);
}
void mxExpressionTray::ActivateButton( const char *name, bool active )
{
	mxETButton *btn = FindButton( name );
	if ( !name )
		return;

	btn->m_bActive = active;
}
void CElcSkinFrameBase::EnableCustomButton(UINT nId, BOOL bEnable)
{
	int nItem = FindButton(nId + ESNWT_CUSTOM_BASE);
	if (nItem != -1) {
		m_arrButton[nItem].bEnable = bEnable;
		RedrawButton(m_arrButton[nItem].pButton);
	}
}
Beispiel #7
0
/**
 * Resizes the button to specified width and height values according to display pixels!
 *
 *
 * @param ch
 * @param width   Width measured in display pixels!
 * @param height  Height measured in display pixels!
 */
void
KeyboardWidget::ResizeButton(unsigned ch,
                             unsigned width, unsigned height)
{
  auto *kb = FindButton(ch);
  if (kb)
    kb->Resize(width, height);
}
Beispiel #8
0
/**
 * Resizes the button to specified width and height values according to display pixels!
 *
 *
 * @param ch
 * @param width   Width measured in display pixels!
 * @param height  Height measured in display pixels!
 */
void
KeyboardControl::ResizeButton(TCHAR ch,
                              UPixelScalar width, UPixelScalar height)
{
  ButtonWindow *kb = FindButton(ch);
  if (kb)
    kb->Resize(width, height);
}
Beispiel #9
0
	//*************************************************************************
	// Method:		SetButtonOptionDisplayString
	// Description: changes the display string for an existing item
	//
	// Parameters:
	//	itemName - the name of the item to set the display string for
	//	displayString - the string to set as the displayed menu item text
	//
	// Return Value: None
	//*************************************************************************
	void SIToolBar::SetButtonOptionDisplayString(String *itemName, String *displayString)
	{
		SIToolBarButton *item = FindButton(itemName);
		if (item)
		{
			item->displayName = displayString;
			Refresh();
		}
	}
Beispiel #10
0
	//*************************************************************************
	// Method:		SetButtonOptionImageIndex
	// Description: changes the image for an existing item
	//
	// Parameters:
	//	itemName - the name of the item to set the tag for
	//	imageIndex - the image to assign to the button
	//
	// Return Value: None
	//*************************************************************************
	void SIToolBar::SetButtonOptionImageIndex(String *itemName, int imageIndex)
	{
		SIToolBarButton* item = FindButton(itemName);
		if (item)
		{
			item->imageIndex = imageIndex;
			Refresh();
		}
	}
Beispiel #11
0
	//*************************************************************************
	// Method:		SetButtonOptionHelpString
	// Description: changes the help string for an existing item
	//
	// Parameters:
	//	itemName - the name of the item to set the help string for
	//	helpString - the string to set as the button's help text
	//
	// Return Value: None
	//*************************************************************************
	void SIToolBar::SetButtonOptionHelpString(String *itemName, String *helpString)
	{
		SIToolBarButton *item = FindButton(itemName);
		if (item)
		{
			item->helpString = helpString;
			Refresh();
		}
	}
Beispiel #12
0
	//*************************************************************************
	// Method:		SetButtonOptionTag
	// Description: changes the user-defined tag object for an existing item
	//
	// Parameters:
	//	itemName - the name of the item to set the tag for
	//	tag - the user-defined object to assign to the button
	//
	// Return Value: None
	//*************************************************************************
	void SIToolBar::SetButtonOptionTag(String *itemName, Object *tag)
	{
		SIToolBarButton* item = FindButton(itemName);
		if (item)
		{
			item->tag = tag;
			Refresh();
		}
	}
Beispiel #13
0
	//*************************************************************************
	// Method:		SetButtonOptionIconType
	// Description: changes the icon type for an existing item
	//
	// Parameters:
	//	itemName - the name of the item to set the tag for
	//	type - the icon type to assign to the button
	//
	// Return Value: None
	//*************************************************************************
	void SIToolBar::SetButtonOptionIconType(String *itemName, IconType type)
	{
		SIToolBarButton* item = FindButton(itemName);
		if (item)
		{
			item->imageIconType = type;
			Refresh();
		}
	}
Beispiel #14
0
	//*************************************************************************
	// Method:		SetButtonOptionContextMenu
	// Description: changes the context menu for an existing item
	//
	// Parameters:
	//	itemName - the name of the item to set the tag for
	//	menu - the context menu to assign to the button
	//
	// Return Value: None
	//*************************************************************************
	void SIToolBar::SetButtonOptionContextMenu(String *itemName, Menu *menu)
	{
		SIToolBarButton* item = FindButton(itemName);
		if (item)
		{
			item->dropDownMenu = menu;
			Refresh();
		}
	}
void CElcSkinFrameBase::DelCustomButton(UINT nId)
{
	int nItem = FindButton(nId + ESNWT_CUSTOM_BASE);
	if (nItem != -1) {
		delete (m_arrButton.begin() + nItem)->pButton;
		m_arrButton.erase(m_arrButton.begin() + nItem);
		RedrawCaption();
	}
}
Beispiel #16
0
	//*************************************************************************
	// Method:		SetButtonOptionStyle
	// Description: changes the style for an existing item
	//
	// Parameters:
	//	itemName - the name of the item to set the tag for
	//	style - the style to assign to the button
	//
	// Return Value: None
	//*************************************************************************
	void SIToolBar::SetButtonOptionStyle(String *itemName, ToolBarButtonStyle style)
	{
		SIToolBarButton* item = FindButton(itemName);
		if (item)
		{
			item->style = style;
			Refresh();
		}
	}
Beispiel #17
0
void CNSToolbar2::ReplaceButtonBitmapIndex(UINT nID, UINT nIndex)
{

    int nButtonIndex = FindButton(nID);

    if(nButtonIndex != -1)
    {
        CToolbarButton *pButton = m_pButtonArray[nButtonIndex];
        pButton->ReplaceBitmapIndex(nIndex);
    }

}
Beispiel #18
0
CToolbarButton* CNSToolbar2::GetButton(UINT nID)
{
    int nIndex = FindButton(nID);

    if(nIndex != -1)
    {
        return m_pButtonArray[nIndex];
    }
    else
        return NULL;

}
Beispiel #19
0
// Return the rect of the button with nID in screen coordinates
// Returns TRUE if the button exists, FALSE if it doesn't.
BOOL CNSToolbar2::GetButtonRect(UINT nID, RECT *pRect)
{
    int nIndex = FindButton(nID);

    if(nIndex != -1)
    {
        m_pButtonArray[nIndex]->GetWindowRect(pRect);
        return TRUE;
    }
    else
        return FALSE;

}
Beispiel #20
0
void MultiButton::MouseMove(Point p, dword flags)
{
	int h = FindButton(p.x);
	Ctrl::Tip(h >= 0 && h < button.GetCount() ? Nvl(button[h].tip, tip) : tip);
	if(hl != h) {
		hl = h;
		Refresh();
	}
	bool b = flags & K_MOUSELEFT;
	if(b != push) {
		push = b;
		Refresh();
	}
}
Beispiel #21
0
LRESULT CNSToolbar2::OnButtonDrag(WPARAM wParam, LPARAM lParam)
{
    HWND hWnd = (HWND) lParam;

    CWnd *pButton = CWnd::FromHandle(hWnd);

    int nButtonIndex = FindButton(pButton);

    if(nButtonIndex != -1)
    {
        MoveButton(nButtonIndex);
    }

    return 1;
}
Beispiel #22
0
void
KeyboardControl::MoveButtonsToRow(const TCHAR* buttons, int row,
                                  PixelScalar offset)
{
  if (StringIsEmpty(buttons))
    return;

  ButtonWindow *kb;
  for (unsigned i = 0; buttons[i] != _T('\0'); i++) {
    kb = FindButton(buttons[i]);
    if (!kb)
      continue;

    kb->Move(i * button_width + offset, row * button_height);
  }
}
BOOL CElcSkinFrameBase::NcLButtonDown(UINT nHitTest, CPoint point)
{
	GetOppositePoint(point);

	m_nLBDownItem = ESNWT_NONE;

	if (HTMENU == nHitTest) {
		int nIndex = PtInMenuItem(point);
		if (nIndex != -1) {
			m_bMenuActivated = !m_bMenuActivated;
				m_nActiveItem = nIndex;

				if (m_bMenuActivated) {
					RedrawMenuBar();
					//m_bSelfCancelMenu = TRUE;
					PopupMenu(nIndex);
				}
				else {
					m_bSelfCancelMenu = TRUE;
					::SendMessage(m_hDerive, WM_CANCELMODE, 0, 0);
					RedrawMenuBar();
				}
		}
	}
	else if (HTSYSMENU == nHitTest) {
		PopupSysMenu();
	}
	else {
		int nItem = FindButton(nHitTest);
		if (nItem != -1) {
			m_nLBDownItem = nHitTest;
			RedrawButton(m_arrButton[nItem].pButton);
			return TRUE;
		}

		m_nActiveItem = -1;
		m_bMenuActivated = FALSE;
		m_nActiveButton = -1;
		m_nLBDownItem = ESNWT_NONE;
		RedrawMenuBar();
		return FALSE;
	}

	return TRUE;
}
Beispiel #24
0
LRESULT CNSToolbar2::OnToolbarButtonSizeChanged(WPARAM wParam, LPARAM lParam)
{

    HWND hWnd = (HWND) lParam;

    CToolbarButton *pButton = (CToolbarButton*)CWnd::FromHandle(hWnd);

    int nButtonIndex = FindButton(pButton);

    if(nButtonIndex != -1)
    {
        if(CheckMaxButtonSizeChanged(pButton, TRUE) || CheckMaxButtonSizeChanged(pButton, FALSE))
        {
            ChangeButtonSizes();
            LayoutButtons(-1);
            GetParentFrame()->RecalcLayout();
            GetParent()->SendMessage(CASTUINT(TOOLBAR_WIDTH_CHANGED), 0, LPARAM(m_hWnd));
        }
    }


    return 1;
}
void CElcSkinFrameBase::PressFrameButton(UINT nHitTest)
{
	if (m_nLBDownItem != nHitTest)
		return;

	int nItem = FindButton(m_nLBDownItem);
	if (nItem == -1 
		|| !m_arrButton[nItem].bEnable)
		return;

	switch (nHitTest) 
	{
	case ESNWT_MINIMIZE:
		{
			if (::IsIconic(m_hDerive))
				::PostMessage(m_hDerive, WM_SYSCOMMAND, SC_RESTORE, 0);
			else
				::PostMessage(m_hDerive, WM_SYSCOMMAND, SC_MINIMIZE, 0);
		}
		break;
	case ESNWT_MAXIMIZE:
		{
			if (::IsZoomed(m_hDerive))
				::PostMessage(m_hDerive, WM_SYSCOMMAND, SC_RESTORE, 0);
			else
				::PostMessage(m_hDerive, WM_SYSCOMMAND, SC_MAXIMIZE, 0);
		}
		break;
	case ESNWT_CLOSE:
		PostMessage(m_hDerive, WM_SYSCOMMAND, SC_CLOSE, 0);
		break;
	default:
		PostMessage(m_hDerive, WM_COMMAND, m_nLBDownItem-ESNWT_CUSTOM_BASE, 0);
		break;
	}
}
Beispiel #26
0
// Function - Add
//
// Adds a button to the toolbar in position nIndex and layouts the buttons
//
//
// Arguments - pButton			the button to add
//			   nIndex			the index to add it to
//
// Returns - nothing
void CNSToolbar2::AddButtonAtIndex(CToolbarButton *pButton, int nIndex, BOOL bNotify)
{
    // for the moment, don't allow more than m_nMaxButtons.  However, eventually keep track of
    // all items, but just make room for first m_nMaxButtons.
    ASSERT( nIndex >= -1 && nIndex <= m_nNumButtons);


    //if the button is already on the toolbar, remove it
    int nPos;
    if((nPos = FindButton(pButton)) != -1)
    {
        RemoveButton(nPos);
        if(nPos < nIndex)
            nIndex--;
    }

    // if we are going to overflow, just remove the last one.
    if(m_nNumButtons >= m_nMaxButtons && nIndex < m_nMaxButtons)
        delete(RemoveButton(m_nMaxButtons - 1));

    if( nIndex == -1)
    {
        nIndex = m_nNumButtons;
    }

    for(int i = m_nNumButtons; i > nIndex; i--)
    {
        m_pButtonArray[i] = m_pButtonArray[i - 1] ;
        // new button id will have to be set
    }

    m_pButtonArray[i] = pButton;
    if(bNotify)
        SendMessage(CASTUINT(TOOLBAR_BUTTON_ADD), (WPARAM) i, (LPARAM)pButton->m_hWnd);

    m_nNumButtons++;

    if(CheckMaxButtonSizeChanged(pButton, TRUE))
    {
        ChangeButtonSizes();
        LayoutButtons(-1);
        GetParentFrame()->RecalcLayout();
    }
    else
    {
        int nWidth;

        if(!m_bButtonsSameWidth)
        {
            CSize size = pButton->GetRequiredButtonSize();
            nWidth = size.cx;
        }
        else
            nWidth = m_nMaxButtonWidth;

        //make sure it's the size of the largest button so far
        pButton->SetButtonSize(CSize(nWidth, m_nMaxButtonHeight));

        LayoutButtons(nIndex - 1);
    }
}
void CCommandParser::HandleButtonReport(TUint16 aButton)
    {
    TUint16 all(0);
    TRemoteInfo info;    
    info = iObserver.RemoteInfo();
    
    all = aButton & TControllerDataTypes::EWiiMoteButtonAll;
    info.iButtonsHeld = (all & info.iButtons);
    info.iButtonsReleased = ((info.iButtons | info.iButtonsHeld) & ~all);
    info.iButtons = all;            

    iObserver.UpdateRemoteInfo(info);
    
    // button held will be button with repeat flag
    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonOne))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonOne),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonTwo))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonTwo),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonDown))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonDown),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonUp))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonUp),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonLeft))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonLeft),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonRight))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonRight),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonB))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonB),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonA))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonA),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonPlus))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonPlus),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonMinus))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonMinus),TControllerDataTypes::EButtonClickRepeat);

    if(IsButtonHeld(info,TControllerDataTypes::EWiiMoteButtonHome))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonHome),TControllerDataTypes::EButtonClickRepeat);
    
    // just pressed
    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonOne))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonOne),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonTwo))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonTwo),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonDown))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonDown),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonUp))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonUp),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonLeft))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonLeft),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonRight))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonRight),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonB))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonB),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonA))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonA),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonPlus))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonPlus),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonMinus))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonMinus),TControllerDataTypes::EButtonClickJustPressed);

    if(IsButtonJustPressed(info,TControllerDataTypes::EWiiMoteButtonHome))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonHome),TControllerDataTypes::EButtonClickJustPressed);
    
    // check released buttons    
    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonOne))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonOne),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonTwo))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonTwo),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonDown))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonDown),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonUp))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonUp),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonLeft))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonLeft),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonRight))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonRight),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonB))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonB),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonA))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonA),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonPlus))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonPlus),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonMinus))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonMinus),TControllerDataTypes::EButtonClickReleased);

    if(IsButtonReleased(info,TControllerDataTypes::EWiiMoteButtonHome))
    	iObserver.SendButtonClick( FindButton(TControllerDataTypes::EWiiMoteButtonHome),TControllerDataTypes::EButtonClickReleased);
    }
Input::InputState Input::buttonState( Qt::MouseButton k )
{
    ButtonContainer::iterator it = FindButton( k );
    return ( it != buttonInstances.end() ) ? it->second : InputInvalid;
}
void Input::registerMousePress( Qt::MouseButton btn )
{
    ButtonContainer::iterator it = FindButton( btn );
    if( it == buttonInstances.end() )
        buttonInstances.push_back( ButtonInstance( btn, InputRegistered ) );
}
void Input::registerMouseRelease( Qt::MouseButton btn )
{
    ButtonContainer::iterator it = FindButton( btn );
    if( it != buttonInstances.end() )
        it->second = InputUnregistered;
}