Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

buttonbox.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  
00024 
00025 #ifndef INTI_GTK_BUTTON_BOX_H
00026 #define INTI_GTK_BUTTON_BOX_H
00027 
00028 #ifndef INTI_GTK_BOX_H
00029 #include <inti/gtk/box.h>
00030 #endif
00031 
00032 #ifndef __GTK_HBUTTON_BOX_H__
00033 #include <gtk/gtkhbbox.h>
00034 #endif
00035 
00036 #ifndef __GTK_VBUTTON_BOX_H__
00037 #include <gtk/gtkvbbox.h>
00038 #endif
00039 
00040 namespace Inti {
00041 
00042 namespace Gtk {
00043 
00044 class ButtonBoxClass;
00045 class HButtonBoxClass;
00046 class VButtonBoxClass;
00047 
00051 
00052 enum ButtonBoxStyle
00053 {
00054         BUTTONBOX_DEFAULT_STYLE = GTK_BUTTONBOX_DEFAULT_STYLE, 
00055         BUTTONBOX_SPREAD = GTK_BUTTONBOX_SPREAD, 
00056         BUTTONBOX_EDGE = GTK_BUTTONBOX_EDGE, 
00057         BUTTONBOX_START = GTK_BUTTONBOX_START, 
00058         BUTTONBOX_END = GTK_BUTTONBOX_END  
00059 };
00060 
00071 
00072 class ButtonBox : public Box
00073 {
00074         friend class G::Object;
00075         friend class ButtonBoxClass;
00076 
00077         ButtonBox(const ButtonBox&);
00078         ButtonBox& operator=(const ButtonBox&);
00079 
00080 protected:
00083 
00084         ButtonBox();
00086 
00087         explicit ButtonBox(GtkButtonBox *button_box, bool reference = false);
00094 
00095         virtual ~ButtonBox() = 0;
00097         
00099 //  Properties
00100 
00101         typedef G::Property<Style, int> LayoutStylePropertyType;
00102         typedef G::PropertyProxy<G::Object, LayoutStylePropertyType> LayoutStylePropertyProxy;
00103         static const LayoutStylePropertyType layout_style_property;
00104 
00105         typedef Gtk::ChildProperty<bool> SecondaryPropertyType;
00106         typedef Gtk::ChildPropertyProxy<Container, SecondaryPropertyType> SecondaryPropertyProxy;
00107         static const SecondaryPropertyType secondary_property;
00108 
00109 public:
00112 
00113         GtkButtonBox* gtk_button_box() const { return (GtkButtonBox*)instance; }
00115 
00116         GtkButtonBoxClass* gtk_button_box_class() const;
00118 
00119         operator GtkButtonBox* () const;
00121 
00122         ButtonBoxStyle get_layout() const;
00125 
00129 
00130         void set_layout(ButtonBoxStyle layout_style);
00133 
00134         void set_child_secondary(Widget& child, bool is_secondary);
00147 
00151         
00152         const LayoutStylePropertyProxy prop_layout_style()
00153         {
00154                 return LayoutStylePropertyProxy(this, &layout_style_property);
00155         }
00157 
00161         
00162         const SecondaryPropertyProxy prop_secondary()
00163         {
00164                 return SecondaryPropertyProxy(this, &secondary_property);
00165         }
00167 
00169 };
00170 
00184 
00185 class HButtonBox : public ButtonBox
00186 {
00187         friend class G::Object;
00188         friend class HButtonBoxClass;
00189 
00190         HButtonBox(const HButtonBox&);
00191         HButtonBox& operator=(const HButtonBox&);
00192         
00193 protected:
00196 
00197         explicit HButtonBox(GtkHButtonBox *hbutton_box, bool reference = false);
00204 
00206         
00207 public:
00210 
00211         explicit HButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = 0);
00215 
00216         virtual ~HButtonBox();
00218         
00222 
00223         GtkHButtonBox* gtk_hbutton_box() const { return (GtkHButtonBox*)instance; }
00225 
00226         GtkHButtonBoxClass* gtk_hbutton_box_class() const;
00228 
00229         operator GtkHButtonBox* () const;
00231 
00233 };
00234 
00248 
00249 class VButtonBox : public ButtonBox
00250 {
00251         friend class G::Object;
00252         friend class VButtonBoxClass;
00253 
00254         VButtonBox(const VButtonBox&);
00255         VButtonBox& operator=(const VButtonBox&);
00256         
00257 protected:
00260         
00261         explicit VButtonBox(GtkVButtonBox *vbutton_box, bool reference = false);
00268         
00270 
00271 public:
00274         explicit VButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = 0);
00278 
00279 
00280         virtual ~VButtonBox();
00282         
00286 
00287         GtkVButtonBox* gtk_vbutton_box() const { return (GtkVButtonBox*)instance; }
00289 
00290         GtkVButtonBoxClass* gtk_vbutton_box_class() const;
00292 
00293         operator GtkVButtonBox* () const;
00295 
00297 };
00298 
00299 } // namespace Gtk
00300 
00301 } // namespace Inti
00302 
00303 #endif // INTI_GTK_BUTTON_BOX_H
00304 
Main Page - Footer


Generated on Sun Sep 14 20:08:02 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002