Re: [[gtkmm] Newbie questions (incorrect tutorial?)]



The gtkmm book is _not_ yet fully updated for gtkmm2. In particular, the
widget-specific sections are not updated at all. You would be best to look at
the examples and the reference documentation for information about specific
widgets.

Martin Samuelsson <gtkmm cos user lysator liu se> wrote:
> First of all. I'm new to both gtkmm and this list. Although C++ isn't
> completly new to me, I'm still learning.
> 
> I've read most of the gtkmm2 tutorial and think I understand the main
> concepts, but i do have trouble realizing them. The first few hello world
> examples are fully understood and working.
> 
> Since I'm mostly interested creating a user interface with a clickable
vector
> model the widgets of main interest for me seem to be EventBox and
DrawingArea.
> 
> Compiling the example code from the tutorial on those topics though gives
me
> errors.
> 
> The example eventbox.cc in chapter 9:
> 
> eventbox.cc: In method `AppWindow::AppWindow()':
> eventbox.cc:42: no matching function for call to `Gtk::Label::set_usize
(int, int)'
> eventbox.cc:45: no matching function for call to `Gtk::EventBox::set_events
(GdkEventMask)'
> /usr/include/gtkmm-2.0/gtkmm/widget.h:853: candidates are: void
Gtk::Widget::set_events(Gdk::EventMask)
> eventbox.cc:46: `class Gtk::EventBox' has no member named
`button_press_event'
> /usr/include/gtkmm-2.0/gtkmm/widget.h:2004: `void Gtk::Widget::realize()' is
protected
> eventbox.cc:51: within this context
> 
> The unnamed linedrawing example in chapter 12:
> 
> lines.cc:12: conflicting return type specified for virtual function `int
cust_draw_area::on_expose_event(GdkEventExpose *)'
> /usr/include/gtkmm-2.0/gtkmm/widget.h:302:   overriding definition as `bool
Gtk::Widget::on_expose_event(GdkEventExpose *)'
> lines.cc: In method `cust_draw_area::cust_draw_area(int = 0, int = 0)':
> lines.cc:19: implicit declaration of function `int size(...)'
> lines.cc: In method `int cust_draw_area::on_expose_event(GdkEventExpose
*)':
> lines.cc:25: no matching function for call to
`Glib::RefPtr<Gdk::Window>::draw_line (Glib::RefPtr<Gdk::GC>, int, int, int,
int)'
> lines.cc:26: no matching function for call to
`Glib::RefPtr<Gdk::Window>::draw_line (Glib::RefPtr<Gdk::GC>, int, int, int,
int)'
> lines.cc:27: no matching function for call to
`Glib::RefPtr<Gdk::Window>::draw_line (Glib::RefPtr<Gdk::GC>, int, int, int,
int)'
> lines.cc:28: no matching function for call to
`Glib::RefPtr<Gdk::Window>::draw_line (Glib::RefPtr<Gdk::GC>, int, int, int,
int)'
> lines.cc:29: no matching function for call to
`Glib::RefPtr<Gdk::Window>::draw_line (Glib::RefPtr<Gdk::GC>, int, int, int,
int)'
> lines.cc:30: no matching function for call to
`Glib::RefPtr<Gdk::Window>::draw_line (Glib::RefPtr<Gdk::GC>, int, int, int,
int)'
> 
> Are these errors problems with my configuration or is the tutorial
outdated?
> 
> My environment is based on debian sarge with gtkmm1.3-1.3.23-1 and friends.
> 
> I've tried browsing through the API reference but it's a lot of information
> and hard to understand right away since I'm not an expert on C++. Are
> there any good example applications out there written with gtkmm2 ?
> 
> Please help me,
> --
> /Martin
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list



Murray Cumming
murrayc usa net
www.murrayc.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]