Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7433337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:39:13+00:00 2026-05-29T09:39:13+00:00

I’m trying to compile a gtkmm application that uses cairomm for drawing. It compiles

  • 0

I’m trying to compile a gtkmm application that uses cairomm for drawing.
It compiles fine using gtkmm3.0 but when I try to compile it using gtkmm2.4 i get:

error: ‘signal_draw’ was not declared in this scope

I’m using g++.

It seems that there is no signal_draw in gtkmm2.4(Am I wrong?). Is there any function/signal that can be used instead?

Thanks in advance.

Sorry for my bad English.

Some code:

class egclass: public Gtk::DrawingArea

{

public:

egclass();

virtual ~egclass();

virtual bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);

};

egclass::egclass()

{

#ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED

signal_draw().connect(sigc::mem_fun(*this, &egclass::on_draw), false);

#endif

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:39:14+00:00Added an answer on May 29, 2026 at 9:39 am

    The older gtkmm 2.4 has on_expose_event instead:

    virtual bool on_expose_event(GdkEventExpose* event);
    

    If you need to create a cairo context for drawing, with the GTK+ C API it goes something like this:

    cairo_t *cr;
    
    cr = gdk_cairo_create (event->window);
    gdk_cairo_region (cr, event->region);
    cairo_clip (cr);
    
    /* do your drawing */
    
    cairo_destroy (cr);
    

    … translating the snippet above to gtkmm is left as an exercise to the reader.

    Also see the following links:

    • Porting from gtkmm-2.4 to gtkmm-3.0
    • Migrating from GTK+ 2.x to GTK+ 3
    • example_pixbufs.cc
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.