Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# imagemenuitem.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti Development Team.
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  */
    00018
    00023
    00024 #ifndef INTI_GTK_MENU_IMAGE_ITEM_H
    00025 #define INTI_GTK_MENU_IMAGE_ITEM_H
    00026
    00027 #ifndef INTI_GTK_MENU_ITEM_H
    00028 #include <inti/gtk/menuitem.h>
    00029 #endif
    00030
    00031 #ifndef __GTK_MENU_IMAGE_ITEM_H__
    00032 #include <gtk/gtkimagemenuitem.h>
    00033 #endif
    00034
    00035 namespace Inti {
    00036
    00037 namespace Gtk {
    00038
    00039 class ImageMenuItemClass;
    00040
    00045
    00046 class ImageMenuItem : public MenuItem
    00047 {
    00048         friend class G::Object;
    00049         friend class ImageMenuItemClass;
    00050
    00051         ImageMenuItem(const ImageMenuItem&);
    00052         ImageMenuItem& operator=(const ImageMenuItem&);
    00053
    00054 protected:
    00057
    00058         explicit ImageMenuItem(GtkImageMenuItem *menu_item, bool reference = false);
    00065
    00067 //  Properties
    00068
    00069         typedef G::Property<Widget*, G::Object*> ImagePropertyType;
    00070         typedef G::PropertyProxy<G::Object, ImagePropertyType> ImagePropertyProxy;
    00071         static const ImagePropertyType image_property;
    00072
    00073 public:
    00076
    00077         ImageMenuItem();
    00079
    00080         explicit ImageMenuItem(const String& label, bool use_underline = false);
    00089
    00090         ImageMenuItem(Widget& image, const String& label, bool use_underline = false);
    00100
    00101         ImageMenuItem(Widget& image, const String& label, Menu& submenu, bool use_underline = false);
    00112
    00113         virtual ~ImageMenuItem();
    00115
    00119
    00120         GtkImageMenuItem* gtk_image_menu_item() const { return (GtkImageMenuItem*)instance; }
    00122
    00123         GtkImageMenuItemClass* gtk_image_menu_item_class() const;
    00125
    00126         operator GtkImageMenuItem* () const;
    00128
    00129         Widget* get_image() const;
    00131
    00135
    00136         void set_image(Widget& image);
    00139
    00143
    00144         const ImagePropertyProxy prop_image()
    00145         {
    00146                 return ImagePropertyProxy(this, &image_property);
    00147         }
    00149
    00151 };
    00152
    00157
    00158 class StockMenuItem : public ImageMenuItem
    00159 {
    00160 public:
    00161         StockMenuItem(const char *stock_id, AccelGroup *accel_group = 0);
    00172 };
    00173
    00174 } // namespace Gtk
    00175
    00176 } // namespace Inti
    00177
    00178 #endif // INTI_GTK_MENU_IMAGE_ITEM_H
    00179

Main Page - Footer