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

frame.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_FRAME_H
00026 #define INTI_GTK_FRAME_H
00027 
00028 #ifndef INTI_GTK_BIN_H
00029 #include <inti/gtk/bin.h>
00030 #endif
00031 
00032 #ifndef __GTK_FRAME_H__
00033 #include <gtk/gtkframe.h>
00034 #endif
00035 
00036 namespace Inti {
00037 
00038 namespace Gtk {
00039 
00040 class FrameClass;
00041 
00048 
00049 class Frame : public Bin
00050 {
00051         friend class G::Object;
00052         friend class FrameClass;
00053 
00054         Frame(const Frame&);
00055         Frame& operator=(const Frame&);
00056         
00057 protected:
00060 
00061         explicit Frame(GtkFrame *frame, bool reference = false);
00068 
00070 //  Override this do_ method when you want to change the default behaviour of the GtkFrame.
00071         
00072         virtual void do_compute_child_allocation(GtkAllocation *allocation);
00073 
00074 //  Properties
00075 
00076         typedef G::Property<String> LabelPropertyType;
00077         typedef G::PropertyProxy<G::Object, LabelPropertyType> LabelPropertyProxy;
00078         static const LabelPropertyType label_property;
00079 
00080         typedef G::Property<float> LabelXalignPropertyType;
00081         typedef G::PropertyProxy<G::Object, LabelXalignPropertyType> LabelXalignPropertyProxy;
00082         static const LabelXalignPropertyType label_xalign_property;
00083 
00084         typedef G::Property<float> LabelYalignPropertyType;
00085         typedef G::PropertyProxy<G::Object, LabelYalignPropertyType> LabelYalignPropertyProxy;
00086         static const LabelYalignPropertyType label_yalign_property;
00087 
00088         typedef G::Property<ShadowType, int> ShadowTypePropertyType;
00089         typedef G::PropertyProxy<G::Object, ShadowTypePropertyType> ShadowTypePropertyProxy;
00090         static const ShadowTypePropertyType shadow_type_property;
00091 
00092         typedef G::Property<Widget*, G::Object*> LabelWidgetPropertyType;
00093         typedef G::PropertyProxy<G::Object, LabelWidgetPropertyType> LabelWidgetPropertyProxy;
00094         static const LabelWidgetPropertyType label_widget_property;
00095 
00096 public:
00099 
00100         explicit Frame(ShadowType type = SHADOW_ETCHED_IN);
00103 
00104         explicit Frame(const String& label, ShadowType type = SHADOW_ETCHED_IN);
00108 
00109         virtual ~Frame();
00111         
00115 
00116         GtkFrame* gtk_frame() const { return (GtkFrame*)instance; }
00118 
00119         GtkFrameClass* gtk_frame_class() const;
00121 
00122         operator GtkFrame* () const;
00124 
00125         String get_label() const;
00128 
00129         Widget* get_label_widget() const;
00131         
00132         void get_label_align(float *xalign, float *yalign) const;
00136 
00137         ShadowType get_shadow_type() const;
00139 
00143 
00144         void remove_label();
00146 
00147         void set_label(const String& label);
00150 
00151         void set_label_widget(Widget& label_widget);
00156         
00157         void set_label_align(float xalign, float yalign);
00165         
00166         void set_shadow_type(ShadowType type);
00169 
00173 
00174         const LabelPropertyProxy prop_label()
00175         {
00176                 return LabelPropertyProxy(this, &label_property);
00177         }
00179 
00180         const LabelXalignPropertyProxy prop_label_xalign()
00181         {
00182                 return LabelXalignPropertyProxy(this, &label_xalign_property);
00183         }
00185 
00186         const LabelYalignPropertyProxy prop_label_yalign()
00187         {
00188                 return LabelYalignPropertyProxy(this, &label_yalign_property);
00189         }
00191 
00192         const ShadowTypePropertyProxy prop_shadow_type()
00193         {
00194                 return ShadowTypePropertyProxy(this, &shadow_type_property);
00195         }
00197 
00198         const LabelWidgetPropertyProxy prop_label_widget()
00199         {
00200                 return LabelWidgetPropertyProxy(this, &label_widget_property);
00201         }
00203 
00205 };
00206 
00207 } // namespace Gtk
00208 
00209 } // namespace Inti
00210 
00211 #endif // INTI_GTK_FRAME_H
00212 
Main Page - Footer


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