Reference Manual

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

# optionmenu.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti Development Team.
    00003  *  Copyright (C) 2000 Red Hat, Inc.
    00004  *
    00005  *  This program is free software; you can redistribute it and/or modify
    00006  *  it under the terms of the GNU General Public License as published by
    00007  *  the Free Software Foundation; either version 2 of the License, or
    00008  *  (at your option) any later version.
    00009  *
    00010  *  This program is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013  *  GNU Library General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU Library General Public License
    00016  *  along with this program; if not, write to the Free Software
    00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018  */
    00019
    00023
    00024 #ifndef INTI_GTK_OPTION_MENU_H
    00025 #define INTI_GTK_OPTION_MENU_H
    00026
    00027 #ifndef INTI_GTK_BUTTON_H
    00028 #include <inti/gtk/button.h>
    00029 #endif
    00030
    00031 #ifndef __GTK_OPTION_MENU_H__
    00032 #include <gtk/gtkoptionmenu.h>
    00033 #endif
    00034
    00035 namespace Inti {
    00036
    00037 namespace Gtk {
    00038
    00039 class Menu;
    00040 class MenuItem;
    00041 class OptionMenuClass;
    00042
    00054
    00055 class OptionMenu : public Button
    00056 {
    00057         friend class G::Object;
    00058         friend class OptionMenuClass;
    00059
    00060         OptionMenu(const OptionMenu&);
    00061         OptionMenu& operator=(const OptionMenu&);
    00062
    00063 protected:
    00066
    00067         explicit OptionMenu(GtkOptionMenu *option_menu, bool reference = false);
    00074
    00078
    00079         virtual void on_changed();
    00082
    00084 //  Properties
    00085
    00086         typedef G::Property<Menu*>  MenuPropertyType;
    00087         typedef G::PropertyProxy<G::Object, MenuPropertyType> MenuPropertyProxy;
    00088         static const MenuPropertyType menu_property;
    00089
    00090 //  Signals
    00091
    00092         typedef G::Signal0<void> ChangedSignalType;
    00093         typedef G::SignalProxy<TypeInstance, ChangedSignalType> ChangedSignalProxy;
    00094         static const ChangedSignalType changed_signal;
    00095
    00096 public:
    00099
    00100         OptionMenu();
    00102
    00103         explicit OptionMenu(Menu& menu, unsigned int index = 0);
    00107
    00108         virtual ~OptionMenu();
    00110
    00114
    00115         GtkOptionMenu* gtk_option_menu() const { return (GtkOptionMenu*)instance; }
    00117
    00118         GtkOptionMenuClass* gtk_option_menu_class() const;
    00120
    00121         operator GtkOptionMenu* () const;
    00123
    00124         Menu* get_menu() const;
    00126
    00127         int get_history() const;
    00132
    00136
    00137         void set_menu(Menu& menu);
    00143
    00144         void remove_menu();
    00146
    00147         void set_history(unsigned int index);
    00151
    00155
    00156         const MenuPropertyProxy prop_menu()
    00157         {
    00158                 return MenuPropertyProxy(this, &menu_property);
    00159         }
    00161
    00165
    00166         const ChangedSignalProxy sig_changed()
    00167         {
    00168                 return ChangedSignalProxy(this, &changed_signal);
    00169         }
    00172
    00174 };
    00175
    00176 } // namespace Gtk
    00177
    00178 } // namespace Inti
    00179
    00180 #endif // INTI_GTK_OPTION_MENU_H
    00181

Main Page - Footer