Exemple #1
0
bool pymms::gui::GUIProgressControl::onMessage(GUIMessage& message)
{
  if (message.getControlId() == getId())
  {
     switch (message.getMessage())
     {
        case GUI_MSG_LABEL_SET:
        {
           setText(message.getLabel());

           return true;
     	}
     
	case GUI_MSG_LABEL_RESET:
     	{
           setText("");
      
           return true;
     	}
     }

     return GUIControl::onMessage(message);
  }

  return false;
}
Exemple #2
0
bool pymms::gui::GUIListControl::onMessage(GUIMessage& message)
{
  if (message.getControlId() == getId())
  {
     switch (message.getMessage())
     {
        case GUI_MSG_LABEL_ADD:
        {
           GUIListItem* pItem=(GUIListItem*)message.getVoid();
           if(pItem)
              addItem(pItem);

           return true;
     	}
     
	case GUI_MSG_LABEL_RESET:
     	{
           clear();
      
           return true;
     	}

	case GUI_MSG_ITEM_SELECTED:
	{
	   message.setParam1(m_iPos);

	   return true;
	}

        case GUI_MSG_TOUCH:
        {
           m_iPos = message.getParam1();

           return true;
        }
	case GUI_MSG_ACTION:
        {
          return onAction(message.getAction());
        }
     }

     return GUIControl::onMessage(message);
  }

  return false;
}
Exemple #3
0
bool GUIPYWindow::onMessage(GUIMessage& message)
{
  bool bRetVal = GUIWindow::onMessage(message);

  switch(message.getMessage())
  {
    case GUI_MSG_CLICKED:
    {
       if(m_pCallbackWindow && m_bActive)
       {
	 PyMMSActionEvent* pAction = new PyMMSActionEvent;
	
         pAction->pCallback = m_pCallbackWindow;
         pAction->iControlId = message.getSenderId();
	 pAction->iType = 1;

         Py_AddPendingCall(Py_MMS_Event_OnClick, pAction);
       }

       break;
    }

    case GUI_MSG_SETFOCUS:
    {
       if(m_pCallbackWindow && m_bActive)
       {
         PyMMSActionEvent* pAction = new PyMMSActionEvent;

         pAction->pCallback = m_pCallbackWindow;
         pAction->iControlId = message.getControlId();
         pAction->iType = 1;

         Py_AddPendingCall(Py_MMS_Event_OnFocus, pAction);
       }

       break;
    }
  }

  return bRetVal;
}