Commit 6695327e authored by Murray Cumming's avatar Murray Cumming Committed by Murray Cumming

Added overrides of set_text_column(), and set_pixbuf_column() that take

2004-09-17  Murray Cumming  <murrayc@murrayc.com>

        * iconview.hg: Added overrides of set_text_column(), and
        set_pixbuf_column() that take ModelColumns instead of ints.
        Wrapped signals. Added foreach()
        * cellview.hg: Make get_size_of_row() const.
        * tools/extra_defs_gen/gtk_extra_defs_gen: Added new types.
        * gtk/src/gtk_signals.defs: Regenerated (making the usual corrections
        for Event* and gpointer parameters.
        * combobox.[hg|ccg], treeview.[hg|ccg]: Add set_row_separator_func(),
        with common implementation in treeview-private.[h|cc].
        * range.hg: Wrapped change_value signal.
        * demos/gtk-demo/: Added example_iconview.cc, which demonstrates  the
        IconView and is a C++ version of the C original..
parent 9e601765
2004-09-17 Murray Cumming <murrayc@murrayc.com>
* iconview.hg: Added overrides of set_text_column(), and
set_pixbuf_column() that take ModelColumns instead of ints.
Wrapped signals. Added foreach()
* cellview.hg: Make get_size_of_row() const.
* tools/extra_defs_gen/gtk_extra_defs_gen: Added new types.
* gtk/src/gtk_signals.defs: Regenerated (making the usual corrections
for Event* and gpointer parameters.
* combobox.[hg|ccg], treeview.[hg|ccg]: Add set_row_separator_func(),
with common implementation in treeview-private.[h|cc].
* range.hg: Wrapped change_value signal.
* demos/gtk-demo/: Added example_iconview.cc, which demonstrates the
IconView and is a C++ version of the C original..
2.5.0:
2004-09-12 Murray Cumming <murrayc@murrayc.com>
......
......@@ -10,15 +10,21 @@ pixmap_files = \
gnome-gsame.png \
gnu-keys.png \
floppybuddy.gif \
gtk-logo-rgb.gif
gtk-logo-rgb.gif \
gnome-fs-regular.png \
gnome-fs-directory.png
EXTRA_DIST = $(pixmap_files)
democodedir=$(datadir)/gtkmm-2.4/demo
#Build the executable, but don't install it.
noinst_PROGRAMS = demo
bin_PROGRAMS = demo
#Where to find the header files needed by the source files:
INCLUDES = -I$(top_builddir)/gtk -I$(top_srcdir)/gtk \
INCLUDES = -DDEMOCODEDIR="\"$(democodedir)\"" \
-I$(top_builddir)/gtk -I$(top_srcdir)/gtk \
-I$(top_builddir)/gdk -I$(top_srcdir)/gdk \
-I$(top_builddir)/pango -I$(top_srcdir)/pango \
-I$(top_builddir)/atk -I$(top_srcdir)/atk \
......@@ -35,6 +41,8 @@ LIBS = $(top_builddir)/pango/pangomm/libpangomm-1.4.la \
demo_SOURCES = demowindow.h demowindow.cc main.cc demos.h textwidget.h textwidget.cc \
example_appwindow.cc example_buttonbox.cc example_change_display.cc example_colorsel.cc \
example_dialog.cc example_drawingarea.cc \
example_images.cc example_menus.cc example_panes.cc example_pixbufs.cc example_sizegroup.cc \
example_images.cc example_iconview.cc example_menus.cc example_panes.cc example_pixbufs.cc example_sizegroup.cc \
example_stockbrowser.cc example_uimanager.cc example_textview.cc \
example_treeview_editable_cells.cc example_treeview_liststore.cc example_treeview_treestore.cc
example_treeview_editable_cells.cc example_treeview_liststore.cc example_treeview_treestore.cc \
demo-common.cc demo-common.h
......@@ -24,6 +24,7 @@ Gtk::Window* do_colorsel();
Gtk::Window* do_dialog();
Gtk::Window* do_drawingarea();
Gtk::Window* do_images();
Gtk::Window* do_iconview();
//Gtk::Window* do_item_factory();
Gtk::Window* do_menus();
Gtk::Window* do_pixbufs();
......@@ -54,6 +55,7 @@ Demo testgtk_demos[] =
{ "Color Selector", "example_colorsel.cc", sigc::ptr_fun(&do_colorsel), 0 },
{ "Dialog and Message Boxes", "example_dialog.cc", sigc::ptr_fun(&do_dialog), 0 },
{ "Drawing Area", "example_drawingarea.cc", sigc::ptr_fun(&do_drawingarea), 0 },
{ "Icon View", "example_iconview.cc", sigc::ptr_fun(&do_iconview), 0 },
{ "Images", "example_images.cc", sigc::ptr_fun(&do_images), 0 },
/*
{ "Item Factory", "example_item_factory.cc", sigc::ptr_fun(&do_item_factory), 0 },
......
/* Icon View
*
* The Gtk::IconView widget is used to display and manipulate icons. It
* uses a Gtk::TreeModel for data storage, so the list store example
* might be helpful.
*
*/
#include <gtkmm.h>
class Example_IconView : public Gtk::Window
{
public:
Example_IconView();
virtual ~Example_IconView();
protected:
//Signal handlers:
virtual void on_button_clicked();
class ModelColumns : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<Glib::ustring> path;
Gtk::TreeModelColumn<Glib::ustring> display_name;
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > pixbuf;
Gtk::TreeModelColumn<bool> is_directory;
ModelColumns() { add(path); add(display_name); add(pixbuf); add(is_description); }
};
const ModelColumns m_columns;
Glib::RefPtr<Gtk::ListStore> m_model;
//Member widgets:
Gtk::VBox m_VBox;
Gtk::Frame m_Frame;
Gtk::DrawingArea m_DrawingArea;
Gtk::Button m_Button;
Gdk::Color m_Color;
Gtk::Alignment m_Alignment;
};
//Called by DemoWindow;
Gtk::Window* do_colorsel()
{
return new Example_IconView();
}
Example_IconView::Example_IconView()
: m_VBox(false, 8),
m_Button("_Change the above color", true),
m_Alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_BOTTOM, 0.0, 0.0)
{
set_title("Icon View");
set_border_width(8);
m_model = Gtk::ListStore::create(m_columns);
m_VBox.set_border_width(8);
add(m_VBox);
/*
* Create the color swatch area
*/
m_Frame.set_shadow_type(Gtk::SHADOW_IN);
m_VBox.pack_start(m_Frame);
// set a fixed size
m_DrawingArea.set_size_request(200, 200);
// Unset the background pixmap (as used by pixmap themes)
// because it takes precedence over the background color.
m_DrawingArea.modify_bg_pixmap(Gtk::STATE_NORMAL, "<none>");
// set the color
m_Color.set_rgb(0, 0, 65535);
m_DrawingArea.modify_bg(Gtk::STATE_NORMAL, m_Color);
m_Frame.add(m_DrawingArea);
m_Alignment.add(m_Button);
m_VBox.pack_start(m_Alignment,Gtk::PACK_SHRINK);
m_Button.signal_clicked().connect(sigc::mem_fun(*this, &Example_IconView::on_button_clicked));
show_all();
}
Example_IconView::~Example_IconView()
{
}
void Example_IconView::on_button_clicked()
{
Gtk::ColorSelectionDialog dialog ("Changing color");
dialog.set_transient_for(*this);
Gtk::ColorSelection *const pColorSel = dialog.get_colorsel();
pColorSel->set_previous_color(m_Color);
pColorSel->set_current_color(m_Color);
pColorSel->set_has_palette();
const int response = dialog.run();
if(response == Gtk::RESPONSE_OK)
{
m_Color = pColorSel->get_current_color();
m_DrawingArea.modify_bg(Gtk::STATE_NORMAL, m_Color);
}
}
/* Icon View
*
* The Gtk::IconView widget is used to display and manipulate icons. It
* uses a Gtk::TreeModel for data storage, so the list store example
* might be helpful.
*
*/
#include <gtkmm.h>
#include <iostream> //For std::cout.
#include "demo-common.h" //For demo_find_file().
class Example_IconView : public Gtk::Window
{
public:
Example_IconView();
virtual ~Example_IconView();
protected:
void fill_store();
//Signal handlers:
virtual void on_button_up();
virtual void on_button_home();
virtual void on_iconview_item_activated(const Gtk::TreeModel::Path& path);
virtual int on_model_sort(const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b);
class ModelColumns : public Gtk::TreeModelColumnRecord
{
public:
Gtk::TreeModelColumn<std::string> path;
Gtk::TreeModelColumn<Glib::ustring> display_name;
Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > pixbuf;
Gtk::TreeModelColumn<bool> is_directory;
ModelColumns() { add(path); add(display_name); add(pixbuf); add(is_directory); }
};
const ModelColumns m_columns;
Glib::RefPtr<Gtk::ListStore> m_model;
Glib::RefPtr<Gdk::Pixbuf> m_refPixbufFile, m_refPixbufFolder;
std::string m_parent;
//Member widgets:
Gtk::VBox m_VBox;
Gtk::Toolbar m_Toolbar;
Gtk::ToolButton m_ButtonUp, m_ButtonHome;
Gtk::ScrolledWindow m_ScrolledWindow;
Gtk::IconView m_IconView;
};
//Called by DemoWindow;
Gtk::Window* do_iconview()
{
return new Example_IconView();
}
Example_IconView::Example_IconView()
: m_ButtonUp(Gtk::Stock::GO_UP),
m_ButtonHome(Gtk::Stock::HOME)
{
set_title("Icon View");
set_default_size(650, 400);
try
{
Glib::ustring filename = demo_find_file("gnome-fs-regular.png");
m_refPixbufFile = Gdk::Pixbuf::create_from_file(filename);
filename = demo_find_file("gnome-fs-directory.png");
m_refPixbufFolder = Gdk::Pixbuf::create_from_file(filename);
}
catch(const Glib::FileError& ex)
{
std::cout << ex.what() << std::endl;
}
m_VBox.pack_start(m_Toolbar, Gtk::PACK_SHRINK);
m_ButtonUp.set_is_important();
m_ButtonUp.set_sensitive();
m_Toolbar.append(m_ButtonUp);
m_ButtonHome.set_is_important();
m_ButtonHome.set_sensitive();
m_Toolbar.append(m_ButtonHome);
m_ScrolledWindow.set_shadow_type(Gtk::SHADOW_ETCHED_IN);
m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
m_VBox.pack_start(m_ScrolledWindow, Gtk::PACK_EXPAND_WIDGET);
//Create the data model:
m_model = Gtk::ListStore::create(m_columns);
m_model->set_default_sort_func( sigc::mem_fun(*this, &Example_IconView::on_model_sort) );
m_model->set_sort_column_id(Gtk::TreeSortable::DEFAULT_SORT_COLUMN_ID, Gtk::SORT_ASCENDING);
/* and fill it with the contents of '/' */
m_parent = "/";
fill_store();
m_IconView.set_model(m_model);
m_IconView.set_selection_mode(Gtk::SELECTION_MULTIPLE);
//Connect signals:
m_ButtonUp.signal_clicked().connect( sigc::mem_fun(*this, &Example_IconView::on_button_up) );
m_ButtonHome.signal_clicked().connect( sigc::mem_fun(*this, &Example_IconView::on_button_home) );
/* We now set which model columns that correspont to the text
* and pixbuf of each item
*/
m_IconView.set_text_column(m_columns.display_name);
m_IconView.set_pixbuf_column(m_columns.pixbuf);
m_IconView.signal_item_activated().connect( sigc::mem_fun(*this, &Example_IconView::on_iconview_item_activated) );
m_ScrolledWindow.add(m_IconView);
m_IconView.grab_focus();
add(m_VBox);
show_all();
}
int Example_IconView::on_model_sort(const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b)
{
/* We need this function because we want to sort
* folders before files.
*/
Gtk::TreeModel::Row row_a = *a;
Gtk::TreeModel::Row row_b = *b;
const bool a_is_dir = row_a[m_columns.is_directory];
const bool b_is_dir = row_b[m_columns.is_directory];
if(!a_is_dir && b_is_dir)
return 1;
else if (a_is_dir && !b_is_dir)
return -1;
else
{
Glib::ustring name_a = row_a[m_columns.display_name];
return name_a.compare( row_b[m_columns.display_name] );
}
}
Example_IconView::~Example_IconView()
{
}
void Example_IconView::on_button_up()
{
m_parent = Glib::path_get_dirname(m_parent);
fill_store();
/* Maybe de-sensitize the up button */
m_ButtonUp.set_sensitive( m_parent == "/" );
}
void Example_IconView::on_button_home()
{
m_parent = Glib::get_home_dir();
fill_store();
/* De-sensitize the up button */
m_ButtonUp.set_sensitive(true);
}
void Example_IconView::fill_store()
{
/* First clear the store */
m_model->clear();
/* Now go through the directory and extract all the file
* information */
try
{
Glib::Dir dir(m_parent); //throws an exception if it fails.
std::string name = dir.read_name();
while(!name.empty())
{
/* We ignore hidden files that start with a '.' */
if (name[0] != '.')
{
std::string path = Glib::build_filename(m_parent, name);
bool is_dir = Glib::file_test(path, Glib::FILE_TEST_IS_DIR);
Glib::ustring display_name = Glib::filename_to_utf8(name);
Gtk::TreeModel::iterator iter = m_model->append();
Gtk::TreeModel::Row row = *iter;
row[m_columns.path] = path;
row[m_columns.display_name] = display_name;
row[m_columns.is_directory] = is_dir;
row[m_columns.pixbuf] = (is_dir ? m_refPixbufFolder : m_refPixbufFile);
}
name = dir.read_name();
}
}
catch(const Glib::FileError& ex)
{
std::cout << ex.what() << std::endl;
}
}
void Example_IconView::on_iconview_item_activated(const Gtk::TreeModel::Path& path)
{
Gtk::TreeModel::iterator iter = m_model->get_iter(path);
if(iter)
{
Gtk::TreeModel::Row row = *iter;
const bool is_dir = row[m_columns.is_directory];
const std::string filepath = row[m_columns.path];
if(is_dir)
{
m_parent = filepath;
fill_store();
/* Sensitize the up button */
m_ButtonUp.set_sensitive();
}
}
}
......@@ -57,6 +57,37 @@ void SignalProxy_CellData::gtk_callback_destroy(void* data)
}
SignalProxy_RowSeparator::SignalProxy_RowSeparator(const SlotType& slot)
:
slot_ (slot)
{}
SignalProxy_RowSeparator::~SignalProxy_RowSeparator()
{}
gboolean SignalProxy_RowSeparator::gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, void* data)
{
SignalProxy_RowSeparator *const self = static_cast<SignalProxy_RowSeparator*>(data);
try
{
return (self->slot_)(Glib::wrap(model, true), Gtk::TreeIter(model, iter));
}
catch(...)
{
Glib::exception_handlers_invoke();
}
return 0; // arbitrary value
}
void SignalProxy_RowSeparator::gtk_callback_destroy(void* data)
{
delete static_cast<SignalProxy_RowSeparator*>(data);
}
} // namespace TreeView_Private
} // namespace Gtk
......
......@@ -23,6 +23,7 @@
*/
#include <gtkmm/treeviewcolumn.h>
#include <gtkmm/treeview.h>
namespace Gtk
{
......@@ -48,6 +49,24 @@ protected:
SlotType slot_;
};
//SignalProxy_RowSeparator:
//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
class SignalProxy_RowSeparator
{
public:
typedef TreeView::SlotRowSeparator SlotType;
SignalProxy_RowSeparator(const SlotType& slot);
~SignalProxy_RowSeparator();
static gboolean gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, void* data);
static void gtk_callback_destroy(void* data);
protected:
SlotType slot_;
};
} /* namespace TreeView_Private */
#endif //DOXYGEN_SHOULD_SKIP_THIS
......
......@@ -51,7 +51,7 @@ public:
_WRAP_METHOD(void set_model(const Glib::RefPtr<TreeModel>& model), gtk_cell_view_set_model)
_WRAP_METHOD(void set_displayed_row(const TreeModel::Path& path), gtk_cell_view_set_displayed_row)
_WRAP_METHOD(TreeModel::Path get_displayed_row() const, gtk_cell_view_get_displayed_row)
_WRAP_METHOD(bool get_size_of_row(const TreeModel::Path& path, Requisition& requisition), gtk_cell_view_get_size_of_row)
_WRAP_METHOD(bool get_size_of_row(const TreeModel::Path& path, Requisition& requisition) const, gtk_cell_view_get_size_of_row)
_WRAP_METHOD(void set_background_color(const Gdk::Color& color), gtk_cell_view_set_background_color)
_WRAP_METHOD(void set_cell_data(), gtk_cell_view_set_cell_data)
......
......@@ -22,6 +22,7 @@
#include <gtkmm/liststore.h>
#include <gtkmm/cellrenderertext.h>
#include <gtkmm/treeview_private.h> //For SignalProxy_RowSeparator.
#include <gtk/gtkcombobox.h>
#include <gtk/gtkcelllayout.h>
......@@ -65,5 +66,17 @@ TreeModel::const_iterator ComboBox::get_active() const
return iter;
}
void ComboBox::set_row_separator_func(const SlotRowSeparator& slot)
{
//Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
//It will be deleted when SignalProxy_RowSeparator::gtk_callback_destroy() is called.
TreeView_Private::SignalProxy_RowSeparator *const pSignalProxy = new TreeView_Private::SignalProxy_RowSeparator(slot);
gtk_combo_box_set_row_separator_func(gobj(),
&TreeView_Private::SignalProxy_RowSeparator::gtk_callback, pSignalProxy,
&TreeView_Private::SignalProxy_RowSeparator::gtk_callback_destroy);
}
} // namespace Gtk
......@@ -23,6 +23,8 @@
#include <gtkmm/celllayout.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/cellrenderer.h>
#include <gtkmm/treeview.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
......@@ -77,13 +79,9 @@ public:
_WRAP_METHOD(Glib::RefPtr<const TreeModel> get_model() const, gtk_combo_box_get_model, refreturn)
_WRAP_METHOD(void set_model(const Glib::RefPtr<TreeModel>& model), gtk_combo_box_set_model)
/* TODO:
GtkTreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func (GtkComboBox *combo_box);
void gtk_combo_box_set_row_separator_func (GtkComboBox *combo_box,
GtkTreeViewRowSeparatorFunc func,
gpointer data,
GtkDestroyNotify destroy);
*/
typedef TreeView::SlotRowSeparator SlotRowSeparator;
void set_row_separator_func(const SlotRowSeparator& slot);
_IGNORE(gtk_combo_box_set_row_separator_func, gtk_combo_box_get_row_separator_func)
_WRAP_METHOD(void popup(), gtk_combo_box_popup)
_WRAP_METHOD(void popdown(), gtk_combo_box_popdown)
......@@ -101,7 +99,6 @@ void gtk_combo_box_set_row_separator_func (GtkComboBox
_WRAP_PROPERTY("add-tearoffs", bool)
_WRAP_PROPERTY("has-frame", bool)
_WRAP_PROPERTY("focus-on-click", bool)
_WRAP_PROPERTY("has-frame", bool)
_WRAP_SIGNAL(void changed(), "changed")
};
......
......@@ -84,6 +84,9 @@ public:
/// Request that contained widgets check their size
_WRAP_METHOD(void check_resize(), gtk_container_check_resize)
/** For instance,
* void on_foreach(Gtk::Widget* widget);
*/
typedef sigc::slot<void, Widget&> ForeachSlot;
/** Operate on contained items
......
......@@ -97,6 +97,7 @@ public:
_IGNORE_SIGNAL("copy_clipboard")
_IGNORE_SIGNAL("paste_clipboard")
_IGNORE_SIGNAL("toggle_overwrite")
_IGNORE_SIGNAL("backspace")
_WRAP_PROPERTY("cursor-position", int)
_WRAP_PROPERTY("selection-bound", int)
......
......@@ -109,6 +109,8 @@ dnl
_POP()
#m4end
//TODO when the constness is fixed in GTK+: _WRAP_SIGNAL(bool insert_prefix(const Glib::ustring& prefix), insert_prefix);
protected:
//Default Signal Handler:
......
This diff is collapsed.
......@@ -18,12 +18,38 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/adjustment.h>
#include <gtk/gtkiconview.h>
namespace Gtk
namespace //anonymous namespace
{
void proxy_foreach_callback(GtkIconView* /* icon_view */, GtkTreePath* path, void* data)
{
typedef Gtk::IconView::SlotForeach SlotType;
SlotType& slot = *static_cast<SlotType*>(data);
try
{
slot(Gtk::TreeModel::Path(path, true));
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
} //anonymous namespace
namespace Gtk
{
void IconView::selected_foreach(const SlotForeach& slot)
{
SlotForeach slot_copy(slot);
gtk_icon_view_selected_foreach(const_cast<GtkIconView*>(gobj()), &proxy_foreach_callback, &slot_copy);
}
} // namespace Gtk
......@@ -47,12 +47,14 @@ public:
_WRAP_METHOD(Glib::RefPtr<TreeModel> get_model(), gtk_icon_view_get_model)
_WRAP_METHOD(Glib::RefPtr<const TreeModel> get_model() const, gtk_icon_view_get_model)
//TODO: Add overrides with ModelColumn:
_WRAP_METHOD(void set_text_column(int column), gtk_icon_view_set_text_column)
_WRAP_METHOD(void set_text_column(const TreeModelColumnBase& model_column), gtk_icon_view_set_text_column)
_WRAP_METHOD(int get_text_column() const, gtk_icon_view_get_text_column)
_WRAP_METHOD(void set_markup_column(int column), gtk_icon_view_set_markup_column)
_WRAP_METHOD(void set_markup_column(const TreeModelColumnBase& column), gtk_icon_view_set_markup_column)
_WRAP_METHOD(int get_markup_column() const, gtk_icon_view_get_markup_column )
_WRAP_METHOD(void set_pixbuf_column(int column), gtk_icon_view_set_pixbuf_column)
_WRAP_METHOD(void set_pixbuf_column(const TreeModelColumnBase& column), gtk_icon_view_set_pixbuf_column)
_WRAP_METHOD(int get_pixbuf_column() const, gtk_icon_view_get_pixbuf_column)
//TODO: Add default value?:
......@@ -62,11 +64,20 @@ public:
_WRAP_METHOD(TreeModel::Path get_path_at_pos(int x, int y) const, gtk_icon_view_get_path_at_pos )
/* TODO:
_WRAP_METHOD(void gtk_icon_view_selected_foreach (
GtkIconViewForeachFunc func,
gpointer data);
*/
/** For instance,
* void on_foreach(const Gtk::TreeModel::Path& path);
*/
typedef sigc::slot<void, const TreeModel::Path&> SlotForeach;
/** Calls a function for each selected icon. Note that the model or
* selection cannot be modified from within this function.
*
* Since: 2.6
*
* @param slot The callback to call for each selected icon.
*/
void selected_foreach(const SlotForeach& slot);
_IGNORE(gtk_icon_view_selected_foreach)
//Default value?:
_WRAP_METHOD(void set_selection_mode(SelectionMode mode), gtk_icon_view_set_selection_mode)
......@@ -79,6 +90,18 @@ public:
_WRAP_METHOD(void unselect_all(), gtk_icon_view_unselect_all)
_WRAP_METHOD(void item_activated(const TreeModel::Path& path), gtk_icon_view_item_activated)
_WRAP_SIGNAL(void set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment), set_scroll_adjustments)
_WRAP_SIGNAL(void item_activated(const TreeModel::Path& path), item_activated)
_WRAP_SIGNAL(void selection_changed(), selection_changed)
/* Key binding signals */
_IGNORE_SIGNAL(select_all)
_IGNORE_SIGNAL(unselect_all)
_IGNORE_SIGNAL(select_cursor_item)
_IGNORE_SIGNAL(toggle_cursor_item)
_IGNORE_SIGNAL(move_cursor)
_IGNORE_SIGNAL(activate_cursor_item)
};
} // namespace Gtk
......
......@@ -56,11 +56,12 @@ public:
_WRAP_SIGNAL(void value_changed(), "value_changed")
_WRAP_SIGNAL(void adjust_bounds(double new_value), "adjust_bounds")
_WRAP_SIGNAL(void move_slider(ScrollType scroll), "move_slider")
_WRAP_SIGNAL(bool change_value(ScrollType scroll, double new_value), "change_value")
_WRAP_PROPERTY("update-policy", UpdateType)
_WRAP_PROPERTY("adjustment", Adjustment*)
_WRAP_PROPERTY("inverted", bool)
protected:
_WRAP_VFUNC(void get_range_border(GtkBorder* border) const, get_range_border)
......
......@@ -26,8 +26,6 @@ _DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/range_p.h)
namespace Gtk
{
......@@ -86,6 +84,7 @@ public:
_WRAP_METHOD(void get_layout_offsets(int& x, int& y) const, gtk_scale_get_layout_offsets)
#m4 dnl// The ::format_value signal handler should return a newly allocated string.
#m4 dnl// (which is obviously not a const gchar*)
#m4 _CONVERSION(`Glib::ustring',`gchar*',`g_strdup($3.c_str())')
/** Determines how the value is formatted.
......
......@@ -208,7 +208,8 @@ public:
_IGNORE_SIGNAL("move_focus")
_IGNORE_SIGNAL("move_viewport")
_IGNORE_SIGNAL("select_all")
_IGNORE_SIGNAL("backspace")
_WRAP_PROPERTY("pixels-above-lines", int)
_WRAP_PROPERTY("pixels-below-lines", int)
_WRAP_PROPERTY("pixels-inside-wrap", int)
......
......@@ -308,6 +308,17 @@ void TreeView::set_search_equal_func(const SlotSearchEqual& slot)
&SignalProxy_SearchEqual::gtk_callback_destroy);
}
void TreeView::set_row_separator_func(const SlotRowSeparator& slot)
{
//Create a signal proxy. A pointer to this will be passed through the callback's data parameter.