Re: Where to place init code (in which event handler) needing custom widget's window mapped?
- From: David Sillou <silloudavid yahoo fr>
- To: Marco <mscholtn xs4all nl>
- Cc: gtkmm general discussion <gtkmm-list gnome org>
- Subject: Re: Where to place init code (in which event handler) needing custom widget's window mapped?
- Date: Thu, 24 Mar 2005 00:30:42 +0100
Marco wrote:
On Wed, 23 Mar 2005 23:40:05 +0100, David Sillou
<silloudavid yahoo fr> wrote:
Hello,
I need to execute various initialization code in a derived widget;
That code need to be executed only one time but it also need that
widget's window is mapped since i need to perform few operation
(xine related stuff) on that window (GDK object).
Could someone please tell me where is the best place to put that code?
try on_realize()
in that function call on_realize() on the parent first and then do
your initialization.
Is there any available documentation that could help me to have a
better idea of when and why events are fired in a typical widget's
life (for example: relation between widget's state and events ) ?
It's rather difficult to find out in which circumstances events are
fired for a beginner; Studying xlib (and gtk) helped me but it
remains obscure to me.
http://developer.gnome.org/doc/GGAD/z57.html
--
Marco
Thanks for the link.
Concerning on_realize, it's the way i tried to achieve the work
(including calling base class method before any other thing) but the
window I create for xine to render to:
m_window = Gdk::Window::create(get_window(), &attributes,GDK_WA_X|GDK_WA_Y);
isn't mapped yet. I verified it by calling:
std::cout <<m_window->is_viewable ()<<std::endl;
and i get a "bad drawable or bad window error" if I execute xine init
functions (passing the created window as arg).
DAve
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]