00001 /*! 00002 * \file GpgGtkMenuElement.h 00003 * \brief Defines a GtkMenu element for the password composite 00004 * 00005 * \author Frederic RUAUDEL <grumz@users.sf.net> 00006 * 00007 * $Revision: 1.2 $ 00008 * $Date: 2003/02/27 22:07:43 $ 00009 * 00010 * \b GPassGuard 00011 * Copyleft (c) 2003 Frederic RUAUDEL, all rights reversed 00012 * 00013 * This program is free software which I release under the GNU General Public 00014 * License. You may redistribute and/or modify this program under the terms 00015 * of that license as published by the Free Software Foundation; either 00016 * version 2 of the License, or (at your option) any later version. 00017 * 00018 * This program is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. Version 2 is in the 00022 * COPYING file in the top level directory of this distribution. 00023 * 00024 * To get a copy of the GNU General Public License, write to the Free Software 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 **/ 00027 00028 #ifndef GTK_MENU_ELEMENT_H 00029 #define GTK_MENU_ELEMENT_H 00030 00031 #include <gtk/gtk.h> 00032 #include <iostream> 00033 #include <string> 00034 00035 #include <PassguardAbstractCommand.h> 00036 00037 using namespace std; 00038 00039 /*! 00040 * \brief a GtkMenu element for the password composite 00041 **/ 00042 class GpgGtkMenuElement 00043 { 00044 public: 00045 GpgGtkMenuElement (string label, bool with_submenu); 00046 virtual ~GpgGtkMenuElement (); 00047 00048 virtual bool addSubMenu (GpgGtkMenuElement* element); 00049 virtual bool addCommand (PassguardAbstractCommand* command); 00050 00051 virtual GtkWidget* getMenuItem (void); 00052 00053 static void command_callback (GtkWidget* menu_item, gpointer data); 00054 00055 private: 00056 GtkWidget* _menu_item; 00057 GtkWidget* _menu_box; 00058 GtkTooltips* _tool_tips; 00059 bool _with_submenu; 00060 PassguardAbstractCommand* _command; 00061 gint _callback_id; 00062 }; 00063 00064 #endif /* GTK_MENU_ELEMENT_H */
1.2.15