Google

logo top
Main Page   Widgets   Namespaces   Book  

Gtk::ScrolledWindow Class Reference
[WidgetsContainer Widgets]

Adds scrollbars to its child widget. More...

Inheritance diagram for Gtk::ScrolledWindow:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~ScrolledWindow ()
GtkScrolledWindow* gobj ()
const GtkScrolledWindow* gobj () const
 ScrolledWindow ()
 ScrolledWindow (Adjustment& hadjustment, Adjustment& vadjustment)
void set_hadjustment (Gtk::Adjustment* hadjustment=0)
void set_vadjustment (Gtk::Adjustment* vadjustment=0)
void set_hadjustment (Gtk::Adjustment& hadjustment)
void set_vadjustment (Gtk::Adjustment& vadjustment)
Gtk::Adjustmentget_hadjustment ()
const Gtk::Adjustmentget_hadjustment () const
Gtk::Adjustmentget_vadjustment ()
const Gtk::Adjustmentget_vadjustment () const
void set_policy (PolicyType hscrollbar_policy, PolicyType vscrollbar_policy)
void get_policy (PolicyType& hscrollbar_policy, PolicyType& vscrollbar_policy) const
 Retrieves the current policy values for the horizontal and vertical scrollbars.

void set_placement (CornerType window_placement)
CornerType get_placement () const
 Gets the placement of the scrollbars for the scrolled window.

void set_shadow_type (ShadowType type)
 Changes the type of shadow drawn around the contents of scrolled_window .

ShadowType get_shadow_type () const
 Gets the shadow type of the scrolled window.

virtual void add (Gtk::Widget& widget)
 Puts the child inside a Gtk::Viewport if it doesn't have native scrolling capability.

bool get_vscrollbar_visible () const
bool get_hscrollbar_visible () const
Gtk::HScrollbarget_hscrollbar ()
const Gtk::HScrollbarget_hscrollbar () const
Gtk::VScrollbarget_vscrollbar ()
const Gtk::VScrollbarget_vscrollbar () const
Glib::SignalProxy2< void,
ScrollType, bool > 
signal_scroll_child ()
Glib::SignalProxy1< void,
DirectionType
signal_move_focus_out ()
Glib::PropertyProxy<Gtk::Adjustment*> property_hadjustment ()
Glib::PropertyProxy<Gtk::Adjustment*> property_vadjustment ()
Glib::PropertyProxy<PolicyTypeproperty_hscrollbar_policy ()
Glib::PropertyProxy<PolicyTypeproperty_vscrollbar_policy ()
Glib::PropertyProxy<CornerTypeproperty_window_placement ()
Glib::PropertyProxy<ShadowTypeproperty_shadow_type ()

Protected Methods

virtual void on_scroll_child (ScrollType scroll, bool horizontal)
virtual void on_move_focus_out (DirectionType direction)

Related Functions

(Note that these are not member functions.)

Gtk::ScrolledWindow* wrap (GtkScrolledWindow* object, bool take_copy=false)

Detailed Description

Adds scrollbars to its child widget.

This container accepts a single child widget. It adds scrollbars to the child widget and optionally draws a beveled frame around the child widget. The scrolled window can work in two ways: 1) Some widgets have native scrolling support; these widgets handle certain Gtk::Adjustment signals. Widgets with native scroll support include Gtk::TreeView, Gtk::TextView, and Gtk::Layout. 2) For widgets that lack native scrolling support, such as Gtk::Table, Gtk::Box, and so on, the widget will be placed inside a Gtk::Viewport.

The position of the scrollbars is controlled by the scroll adjustments. See Gtk::Adjustment for the fields in an adjustment - for Gtk::Scrollbar, used by Gtk::ScrolledWindow, the "value" field represents the position of the scrollbar, which must be between the "lower" field and "upper - page_size." The "page_size" field represents the size of the visible scrollable area. The "step_increment" and "page_increment" fields are used when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).

If a Gtk::ScrolledWindow doesn't behave quite as you would like, or doesn't have exactly the right layout, it's very possible to set up your own scrolling with Gtk::Scrollbar and, for example, a Gtk::Table.


Constructor & Destructor Documentation

virtual Gtk::ScrolledWindow::~ScrolledWindow (   [virtual]
 

Gtk::ScrolledWindow::ScrolledWindow (  
 

Gtk::ScrolledWindow::ScrolledWindow ( Adjustment   hadjustment,
Adjustment   vadjustment
[explicit]
 


Member Function Documentation

virtual void Gtk::ScrolledWindow::add ( Gtk::Widget   widget [virtual]
 

Puts the child inside a Gtk::Viewport if it doesn't have native scrolling capability.

Reimplemented from Gtk::Container.

const Gtk::Adjustment* Gtk::ScrolledWindow::get_hadjustment (   const
 

Gtk::Adjustment* Gtk::ScrolledWindow::get_hadjustment (  
 

const Gtk::HScrollbar* Gtk::ScrolledWindow::get_hscrollbar (   const
 

Gtk::HScrollbar* Gtk::ScrolledWindow::get_hscrollbar (  
 

bool Gtk::ScrolledWindow::get_hscrollbar_visible (   const
 

CornerType Gtk::ScrolledWindow::get_placement (   const
 

Gets the placement of the scrollbars for the scrolled window.

See set_placement().

Returns:
The current placement value.

void Gtk::ScrolledWindow::get_policy ( PolicyType   hscrollbar_policy,
PolicyType   vscrollbar_policy
const
 

Retrieves the current policy values for the horizontal and vertical scrollbars.

See set_policy().

Parameters:
hscrollbar_policy Location to store the policy for the horizontal scrollbar, or 0.
vscrollbar_policy Location to store the policy for the horizontal scrollbar, or 0.

ShadowType Gtk::ScrolledWindow::get_shadow_type (   const
 

Gets the shadow type of the scrolled window.

See set_shadow_type().

Returns:
The current shadow type.

const Gtk::Adjustment* Gtk::ScrolledWindow::get_vadjustment (   const
 

Gtk::Adjustment* Gtk::ScrolledWindow::get_vadjustment (  
 

const Gtk::VScrollbar* Gtk::ScrolledWindow::get_vscrollbar (   const
 

Gtk::VScrollbar* Gtk::ScrolledWindow::get_vscrollbar (  
 

bool Gtk::ScrolledWindow::get_vscrollbar_visible (   const
 

const GtkScrolledWindow* Gtk::ScrolledWindow::gobj (   const [inline]
 

Reimplemented from Gtk::Bin.

GtkScrolledWindow* Gtk::ScrolledWindow::gobj (   [inline]
 

Reimplemented from Gtk::Bin.

virtual void Gtk::ScrolledWindow::on_move_focus_out ( DirectionType    direction [protected, virtual]
 

virtual void Gtk::ScrolledWindow::on_scroll_child ( ScrollType    scroll,
bool    horizontal
[protected, virtual]
 

Glib::PropertyProxy<Gtk::Adjustment*> Gtk::ScrolledWindow::property_hadjustment (  
 

Glib::PropertyProxy<PolicyType> Gtk::ScrolledWindow::property_hscrollbar_policy (  
 

Glib::PropertyProxy<ShadowType> Gtk::ScrolledWindow::property_shadow_type (  
 

Glib::PropertyProxy<Gtk::Adjustment*> Gtk::ScrolledWindow::property_vadjustment (  
 

Glib::PropertyProxy<PolicyType> Gtk::ScrolledWindow::property_vscrollbar_policy (  
 

Glib::PropertyProxy<CornerType> Gtk::ScrolledWindow::property_window_placement (  
 

void Gtk::ScrolledWindow::set_hadjustment ( Gtk::Adjustment   hadjustment
 

void Gtk::ScrolledWindow::set_hadjustment ( Gtk::Adjustment   hadjustment = 0
 

void Gtk::ScrolledWindow::set_placement ( CornerType    window_placement
 

void Gtk::ScrolledWindow::set_policy ( PolicyType    hscrollbar_policy,
PolicyType    vscrollbar_policy
 

void Gtk::ScrolledWindow::set_shadow_type ( ShadowType    type
 

Changes the type of shadow drawn around the contents of scrolled_window .

Parameters:
type Kind of shadow to draw around scrolled window contents.

void Gtk::ScrolledWindow::set_vadjustment ( Gtk::Adjustment   vadjustment
 

void Gtk::ScrolledWindow::set_vadjustment ( Gtk::Adjustment   vadjustment = 0
 

Glib::SignalProxy1<void,DirectionType> Gtk::ScrolledWindow::signal_move_focus_out (  
 

Prototype:
void move_focus_out(DirectionType direction)

Glib::SignalProxy2<void,ScrollType,bool> Gtk::ScrolledWindow::signal_scroll_child (  
 

Prototype:
void scroll_child(ScrollType scroll, bool horizontal)


Friends And Related Function Documentation

Gtk::ScrolledWindow* wrap ( GtkScrolledWindow*    object,
bool    take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm by Doxygen 1.3-rc1 © 1997-2001