Logo Search packages:      
Sourcecode: aewm++ version File versions  Download package

genericmenu.cc

/*
 * frankhale@gmail.com
 * http://frankhale.org
 *
 * This code is released under the GPL license www.gnu.org
 */
#include "aewm.hh"

GenericMenu::GenericMenu(Display * dpy) : BaseMenu(dpy)
{
}

GenericMenu::~GenericMenu()
{
      menuList.clear();
}

BaseMenu* GenericMenu::findMenu(Window w)
{
      if (w && w != DefaultRootWindow(dpy)) {
            if(menuList.size()) 
            {
                  list<BaseMenu*>::iterator menu_it;

                  for(menu_it = menuList.begin(); menu_it != menuList.end(); menu_it++)
                  {
                        if (w == (*menu_it)->getMenuWindow())
                        {
                              return (*menu_it);
                        }                       
                  }
            }
      }

      return NULL;      
}

Generated by  Doxygen 1.6.0   Back to index