connecting wxFrame with gtkWidget

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

connecting wxFrame with gtkWidget

Post by spectrum » Tue Feb 25, 2014 2:30 pm

Dear all,

i have

wxFrame, that includes a child wxControl

the wxControl includes :
a gtk horizonatal box (gtk_hbox_new) with 2 childs, a vte_terminal (gtkWidget), and a gtk_vscrollbar.

Now, from wxFrame i do:

wxControl -> Connect(wxEVT_RIGHT_DOWN,
(wxObjectEventFunction)&FrmMain::OnTermRightClick, NULL, this);

But when i "right down" on the vte_terminal, i don't receive any signal to the upper wxFrame,
i guess since it is direct child of the box, and not of the wxControl itself.

How could i connect properly this gtkWidget "right down" event with upper wxFrame ?

Many thanks
Spectrum
spectrum

User avatar
doublemax
Moderator
Moderator
Posts: 15173
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: connecting wxFrame with gtkWidget

Post by doublemax » Wed Feb 26, 2014 6:20 pm

As wxWidgets doesn't know about your gtkWidget, it can't react to any of its events. I think you have to catch the GTK event yourself at a lower (non-wx) level.

Check /src/gtk/window.cpp to see how wxWidgets connects the events.

Search for:

Code: Select all

g_signal_connect (widget, "button_press_event",
                      G_CALLBACK (gtk_window_button_press_callback), this);
Use the source, Luke!

Post Reply