Ejemplo n.º 1
0
void MpButton::Redraw (void) 
{
  MpCanvas::RedrawPanel();
  
  // redraw the frame
  if (state & pressed)
    PressFrame();
  else if (state & entered)
    EnterFrame();
  else
    LeaveFrame();

  Draw(); // draw label and/or icon
}
Ejemplo n.º 2
0
void MpButton::BRelease_CB (XButtonEvent ev) // virtual
{
  EnterFrame();
  timer.StopTimer(); // disable auto-repeat timer
  if (ev.x >= 0 && ev.y >= 0 && ev.x <= Width() && ev.y <= Height()) {
    // save group before calling button's callback.
    bgroup = GetGroup();
    // call button's callback
    BClick_CB(ev);
    // if button is member of group then call the group callback
    if ( bgroup ) bgroup->BClick_Handler(this);
    // no actions after callback are allowed, because the action
    // might cause deletion of the button
  }
}
Ejemplo n.º 3
0
void Button::Exec(int mId, int cId)
{
	IObject::Exec(mId, cId);

	EnterFrame();
}
Ejemplo n.º 4
0
void MpButton::Enter_CB (XCrossingEvent)  // virtual
{ 
  EnterFrame();
}