Ejemplo n.º 1
0
// Initialise callbacks
void ComponentManager::enable() {
  if(enabledCallbacks)
    return;
  enabledCallbacks = true;

  evtmgr->enableCallback(memberCallback(&ComponentManager::mouseMove, this, EVT_MOUSEMOVE));
  evtmgr->enableCallback(memberCallback(&ComponentManager::mouseScroll, this, EVT_MOUSESCROLL));
  evtmgr->enableCallback(memberCallback(&ComponentManager::mouseButton, this, EVT_MOUSEBUTTON));
  evtmgr->enableCallback(memberCallback(&ComponentManager::keystroke, this, EVT_KEY));
}
Ejemplo n.º 2
0
 /// -------===========----------==================---------===========------=========-----------:):):):):)
 XMLDocument::XMLDocument(const std::string& xmlPath, const CallbackPtr callback):
 mXMLDocument(0),
 mXMLRootNode(0),
 mCallback(callback)
 {
     PropertyList plist;
     
     MemberCallbackPtr<XMLDocument>::type memberCallback( new MemberCallback<XMLDocument>(this, &XMLDocument::_readFileCallback) );
     CallbackPtr tCallback = static_pointer_cast<Callback>(memberCallback);
     FileManager::getInstancePtr()->readFile(xmlPath, tCallback, plist);
 }
Ejemplo n.º 3
0
 /// -------===========----------==================---------===========------=========-----------:):):):):)
 XMLDocument::XMLDocument(const std::string& xmlPath, const std::string& rootNodeName, const CallbackPtr callback):
 mXMLDocument(0),
 mXMLRootNode(0),
 mCallback(callback)
 {
     PropertyList plist;
     plist.setValueForKey(ROOT_NODE_NAME_KEY, Property(rootNodeName));
     
     MemberCallbackPtr<XMLDocument>::type memberCallback( new MemberCallback<XMLDocument>(this, &XMLDocument::_readFileCallback) );
     CallbackPtr tCallback = static_pointer_cast<Callback>(memberCallback);
     FileManager::getInstancePtr()->readFile(xmlPath, tCallback, plist);
 }