Reference Manual

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

# scrolledwindow.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002-2003 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
    00025
    00026 #ifndef INTI_GTK_SCROLLED_WINDOW_H
    00027 #define INTI_GTK_SCROLLED_WINDOW_H
    00028
    00029 #ifndef INTI_GTK_BIN_H
    00030 #include <inti/gtk/bin.h>
    00031 #endif
    00032
    00033 #ifndef __GTK_SCROLLED_WINDOW_H__
    00034 #include <gtk/gtkscrolledwindow.h>
    00035 #endif
    00036
    00037 #ifndef INTI_GTK_ADJUSTMENT_H
    00038 #include <inti/gtk/adjustment.h>
    00039 #endif
    00040
    00041 namespace Inti {
    00042
    00043 namespace Gtk {
    00044
    00045 class HScrollbar;
    00046 class VScrollbar;
    00047 class ScrolledWindowClass;
    00048
    00079
    00080 class ScrolledWindow : public Bin
    00081 {
    00082         friend class G::Object;
    00083         friend class ScrolledWindowClass;
    00084
    00085         ScrolledWindow(const ScrolledWindow&);
    00086         ScrolledWindow& operator=(const ScrolledWindow&);
    00087
    00088 protected:
    00091
    00092         explicit ScrolledWindow(GtkScrolledWindow *scrolled_window, bool reference = false);
    00099
    00101 //  Properties
    00102
    00103         typedef G::Property<Adjustment*, G::Object*> HAdjustmentPropertyType;
    00104         typedef G::PropertyProxy<G::Object, HAdjustmentPropertyType> HAdjustmentPropertyProxy;
    00105         static const HAdjustmentPropertyType hadjustment_property;
    00106
    00107         typedef G::Property<Adjustment*, G::Object*> VAdjustmentPropertyType;
    00108         typedef G::PropertyProxy<G::Object, VAdjustmentPropertyType> VAdjustmentPropertyProxy;
    00109         static const VAdjustmentPropertyType vadjustment_property;
    00110
    00111         typedef G::Property<PolicyType, int> HScrollbarPolicyPropertyType;
    00112         typedef G::PropertyProxy<G::Object, HScrollbarPolicyPropertyType> HScrollbarPolicyPropertyProxy;
    00113         static const HScrollbarPolicyPropertyType hscrollbar_policy_property;
    00114
    00115         typedef G::Property<PolicyType, int> VScrollbarPolicyPropertyType;
    00116         typedef G::PropertyProxy<G::Object, VScrollbarPolicyPropertyType> VScrollbarPolicyPropertyProxy;
    00117         static const VScrollbarPolicyPropertyType vscrollbar_policy_property;
    00118
    00119         typedef G::Property<CornerType, int> WindowPlacementPropertyType;
    00120         typedef G::PropertyProxy<G::Object, WindowPlacementPropertyType> WindowPlacementPropertyProxy;
    00121         static const WindowPlacementPropertyType window_placement_property;
    00122
    00123         typedef G::Property<ShadowType, int> ShadowTypePropertyType;
    00124         typedef G::PropertyProxy<G::Object, ShadowTypePropertyType> ShadowTypePropertyProxy;
    00125         static const ShadowTypePropertyType shadow_type_property;
    00126
    00127 public:
    00130
    00131         ScrolledWindow();
    00134
    00135         ScrolledWindow(Adjustment *hadjustment, Adjustment *vadjustment);
    00143
    00144         virtual ~ScrolledWindow();
    00146
    00150
    00151         GtkScrolledWindow* gtk_scrolled_window() const { return (GtkScrolledWindow*)instance; }
    00153
    00154         GtkScrolledWindowClass* gtk_scrolled_window_class() const;
    00156
    00157         operator GtkScrolledWindow* () const;
    00159
    00160         HScrollbar* hscrollbar() const;
    00162
    00163         VScrollbar* vscrollbar() const;
    00165
    00166         Adjustment* get_hadjustment() const;
    00170
    00171         Adjustment* get_vadjustment() const;
    00175
    00176         void get_policy(PolicyType *hscrollbar_policy, PolicyType *vscrollbar_policy) const;
    00180
    00181         CornerType get_placement() const;
    00184
    00185         ShadowType get_shadow_type() const;
    00188
    00192
    00193         void set_hadjustment(Adjustment *hadjustment);
    00196
    00197         void set_vadjustment(Adjustment *vadjustment);
    00200
    00201         void set_policy(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy);
    00211
    00212         void set_policy_automatic();
    00215
    00216         void set_placement(CornerType window_placement);
    00223
    00224         void set_shadow_type(ShadowType type);
    00227
    00228         void add_with_viewport(Widget& child);
    00243
    00247
    00248         const HAdjustmentPropertyProxy prop_hadjustment()
    00249         {
    00250                 return HAdjustmentPropertyProxy(this, &hadjustment_property);
    00251         }
    00253
    00254         const VAdjustmentPropertyProxy prop_vadjustment()
    00255         {
    00256                 return VAdjustmentPropertyProxy(this, &vadjustment_property);
    00257         }
    00259
    00260         const HScrollbarPolicyPropertyProxy prop_hscrollbar_policy()
    00261         {
    00262                 return HScrollbarPolicyPropertyProxy(this, &hscrollbar_policy_property);
    00263         }
    00265
    00266         const VScrollbarPolicyPropertyProxy prop_vscrollbar_policy()
    00267         {
    00268                 return VScrollbarPolicyPropertyProxy(this, &vscrollbar_policy_property);
    00269         }
    00271
    00272         const WindowPlacementPropertyProxy prop_window_placement()
    00273         {
    00274                 return WindowPlacementPropertyProxy(this, &window_placement_property);
    00275         }
    00277
    00278         const ShadowTypePropertyProxy prop_shadow_type()
    00279         {
    00280                 return ShadowTypePropertyProxy(this, &shadow_type_property);
    00281         }
    00283
    00285 };
    00286
    00287 } // namespace Gtk
    00288
    00289 } // namespace Inti
    00290
    00291 #endif // INTI_GTK_SCROLLED_WINDOW_H
    00292

Main Page - Footer