Main Page | Class Hierarchy | Class List | File List | Class Members

aedMenu.h

00001 
00002 /*
00003  * The aedMenu class
00004  * Initial design by Ivan Stankovic <pokemon@fly.srk.fer.hr>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 #ifndef AEDMENU_H
00022 #define AEDMENU_H
00023 
00024 #include "aedWidget.h"
00025 
00026 struct DLLEXPORT aedMenuItem
00027 {
00028     std::string caption;
00029     class aedMenu *child;
00030 };
00031 
00033 class DLLEXPORT aedMenu:public aedWidget
00034 {
00035   public:
00036     aedMenu();
00037     ~aedMenu();
00038 
00044     unsigned int addItem(const std::string & caption, aedMenu * child = NULL);
00045 
00048     void removeItem(unsigned int index);
00049 
00050     int wm_lbuttondown(Uint16 x, Uint16 y);
00051     int wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy);
00052     int wm_mouseleave();
00053     int wm_mouseenter();
00054     void render();
00055 
00056   private:
00057     int getIndexFromPixel(Uint16 x, Uint16 y);
00058 
00059   private:
00060     int m_Highlight;
00061       std::vector < aedMenuItem > m_Items;
00062 };
00063 
00064 #if defined(_MSC_VER)
00065 DLLEXTERN template DLLEXPORT aedFunctor1Arg < stub, aedMenu >;
00066 #endif
00067 
00068 #endif /* AEDMENU_H */

Generated on Mon Mar 1 19:56:18 2004 for aedGUI by doxygen 1.3.6