Gtk::Util::Tile Class Reference

Extensible widget providing a highlighted title, summary and an image on the left-hand side. More...

Inheritance diagram for Gtk::Util::Tile:

Inheritance graph
[legend]

List of all members.

Public Types

typedef sigc::signal< void,
Tile & > 
SignalActivated
 Signature of signal emmitted when user double-clicks or presses the Return key on a Tile.
typedef sigc::signal< void,
Tile & > 
SignalSelection
 Signature of signal emitted to indicate that the Tile has been selected (gained focus) or unselected (lost focus).

Public Member Functions

virtual Gtk::VBox & get_content_vbox ()
 Returns the Gtk::VBox holding the "content" widgets of the tile.
virtual Gtk::Image & get_image ()
 Returns the image for the Tile, so that its content can be set.
virtual Gtk::HBox & get_root_hbox ()
 Returns the Gtk::HBox that contains the image and Gtk::VBox with all the labels and any other additional widgets.
virtual Glib::ustring get_summary () const
 Returns the "summary" of the Tile, ie the smaller text below the title.
virtual Gtk::Label & get_summary_label ()
 Returns the Gtk::Label displaying summary in small font.
virtual Glib::ustring get_title () const
 Returns Tile title, ie the top-first, highlighted text.
virtual Gtk::Label & get_title_label ()
 Returns the top Gtk::Label displaying title.
virtual void set_summary (const Glib::ustring &summary)
 Escapes and sets a new summary on the Tile.
virtual void set_title (const Glib::ustring &title)
 Escapes and sets a new title on the Tile.
SignalActivatedsignal_activated ()
 Returns the SignalActivated.
SignalSelectionsignal_focus_in ()
 Returns the widget's focus-in wrapper signal.
SignalSelectionsignal_focus_out ()
 Returns the widget's focus-out wrapper signal.
SignalSelectionsignal_selected ()
 Returns the SignalSelection indicating that the tile has been selected.
SignalSelectionsignal_unselected ()
 Returns the SignalSelection indicating that the tile has been unselected in favour of another one.
 Tile (const Glib::ustring &title=Glib::ustring(), const Glib::ustring &summary=Glib::ustring(), bool pack_center=true, bool paint_white=true)
 Tile constructor.
virtual ~Tile ()

Protected Member Functions

virtual void on_activated ()
virtual bool on_button_press_event (GdkEventButton *event)
virtual bool on_expose_event (GdkEventExpose *event)
virtual bool on_focus_in_event (GdkEventFocus *event)
virtual bool on_focus_out_event (GdkEventFocus *event)
virtual bool on_key_press_event (GdkEventKey *event)
virtual void on_selected ()
virtual void on_unselected ()

Protected Attributes

std::auto_ptr< Private > priv_

Friends

class TileView


Detailed Description

Extensible widget providing a highlighted title, summary and an image on the left-hand side.

The widget is designed as a more user-friendly alternative to Gtk::TreeView-based lists and tabular business-like view. Another advantage is that it is widget-based, so any additional GTK+ widget, be it static or interactive, may be added.


Member Typedef Documentation

typedef sigc::signal<void, Tile&> Gtk::Util::Tile::SignalActivated

Signature of signal emmitted when user double-clicks or presses the Return key on a Tile.

See also:
TileView::signal_tile_activated()

typedef sigc::signal<void, Tile&> Gtk::Util::Tile::SignalSelection

Signature of signal emitted to indicate that the Tile has been selected (gained focus) or unselected (lost focus).

See also:
TileView::get_selection()


Constructor & Destructor Documentation

Gtk::Util::Tile::Tile ( const Glib::ustring &  title = Glib::ustring(),
const Glib::ustring &  summary = Glib::ustring(),
bool  pack_center = true,
bool  paint_white = true 
) [explicit]

Tile constructor.

Parameters:
title The title text on the widget.
summary The text below the title.
pack_center true when labels should be packed in the center of the description area, or false when the labels should be aligned next to the image.
paint_white Whether to paint the background of the widget white, according to the current Gtk::Style settings.

virtual Gtk::Util::Tile::~Tile (  )  [virtual]


Member Function Documentation

virtual Gtk::VBox& Gtk::Util::Tile::get_content_vbox (  )  [virtual]

Returns the Gtk::VBox holding the "content" widgets of the tile.

Use this box when you want to pack more widgets to the Tile.

Returns:
a reference to the content vbox.

virtual Gtk::Image& Gtk::Util::Tile::get_image (  )  [virtual]

Returns the image for the Tile, so that its content can be set.

Returns:
a reference to the Tile's image.

virtual Gtk::HBox& Gtk::Util::Tile::get_root_hbox (  )  [virtual]

Returns the Gtk::HBox that contains the image and Gtk::VBox with all the labels and any other additional widgets.

Returns:
a reference to the root horizontal box.

virtual Glib::ustring Gtk::Util::Tile::get_summary (  )  const [virtual]

Returns the "summary" of the Tile, ie the smaller text below the title.

Returns:
Tile summary string

virtual Gtk::Label& Gtk::Util::Tile::get_summary_label (  )  [virtual]

Returns the Gtk::Label displaying summary in small font.

Returns:
a reference to the summary label.

virtual Glib::ustring Gtk::Util::Tile::get_title (  )  const [virtual]

Returns Tile title, ie the top-first, highlighted text.

Returns:
Tile title string.

virtual Gtk::Label& Gtk::Util::Tile::get_title_label (  )  [virtual]

Returns the top Gtk::Label displaying title.

Returns:
a reference to the title label.

virtual void Gtk::Util::Tile::on_activated (  )  [protected, virtual]

virtual bool Gtk::Util::Tile::on_button_press_event ( GdkEventButton *  event  )  [protected, virtual]

virtual bool Gtk::Util::Tile::on_expose_event ( GdkEventExpose *  event  )  [protected, virtual]

virtual bool Gtk::Util::Tile::on_focus_in_event ( GdkEventFocus *  event  )  [protected, virtual]

virtual bool Gtk::Util::Tile::on_focus_out_event ( GdkEventFocus *  event  )  [protected, virtual]

virtual bool Gtk::Util::Tile::on_key_press_event ( GdkEventKey *  event  )  [protected, virtual]

virtual void Gtk::Util::Tile::on_selected (  )  [protected, virtual]

virtual void Gtk::Util::Tile::on_unselected (  )  [protected, virtual]

virtual void Gtk::Util::Tile::set_summary ( const Glib::ustring &  summary  )  [virtual]

Escapes and sets a new summary on the Tile.

Parameters:
summary new summary string.

virtual void Gtk::Util::Tile::set_title ( const Glib::ustring &  title  )  [virtual]

Escapes and sets a new title on the Tile.

Parameters:
title new title string.

SignalActivated& Gtk::Util::Tile::signal_activated (  ) 

Returns the SignalActivated.

Returns:
a reference to Tile's SignalActivated.

SignalSelection& Gtk::Util::Tile::signal_focus_in (  ) 

Returns the widget's focus-in wrapper signal.

SignalSelection& Gtk::Util::Tile::signal_focus_out (  ) 

Returns the widget's focus-out wrapper signal.

SignalSelection& Gtk::Util::Tile::signal_selected (  ) 

Returns the SignalSelection indicating that the tile has been selected.

This signal is controlled by TileView. It is emitted after the selection has been changed between the packed Tiles. If you are not using TileView, use signals provided by signal_focus_in() and signal_focus_out().

The signal can be useful for subclasses that need to implement some special behaviour on this event, such as updating the content layout.

Returns:
a reference to SignalSelection.

SignalSelection& Gtk::Util::Tile::signal_unselected (  ) 

Returns the SignalSelection indicating that the tile has been unselected in favour of another one.

This signal is controlled by TileView. It is emitted after the selection has been changed between the packed Tiles. If you are not using TileView, use signals provided by signal_focus_in() and signal_focus_out().

The signal can be useful for subclasses that need to implement some special behaviour on this event, such as updating the content layout.

Returns:
a reference to SignalSelection.


Friends And Related Function Documentation

friend class TileView [friend]


Member Data Documentation

std::auto_ptr<Private> Gtk::Util::Tile::priv_ [protected]


The documentation for this class was generated from the following file:

Generated on Wed Aug 26 20:50:39 2009 for gtkmm-utils by  doxygen 1.5.8