1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/notebook.cpp
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Vadim Zeitlin
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
15 #include "wx/notebook.h"
21 #include "wx/msgdlg.h"
22 #include "wx/bitmap.h"
25 #include "wx/imaglist.h"
26 #include "wx/fontutil.h"
28 #include "wx/gtk/private.h"
29 #include "wx/gtk/win_gtk.h"
31 #include <gdk/gdkkeysyms.h>
33 // ----------------------------------------------------------------------------
35 // ----------------------------------------------------------------------------
37 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
)
38 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
)
40 //-----------------------------------------------------------------------------
42 //-----------------------------------------------------------------------------
44 extern bool g_blockEventsOnDrag
;
46 //-----------------------------------------------------------------------------
48 //-----------------------------------------------------------------------------
50 // VZ: this is rather ugly as we keep the pages themselves in an array (it
51 // allows us to have quite a few functions implemented in the base class)
52 // but the page data is kept in a separate list, so we must maintain them
53 // in sync manually... of course, the list had been there before the base
54 // class which explains it but it still would be nice to do something
57 class wxGtkNotebookPage
: public wxObject
63 m_page
= (GtkNotebookPage
*) NULL
;
64 m_box
= (GtkWidget
*) NULL
;
69 GtkNotebookPage
*m_page
;
71 GtkWidget
*m_box
; // in which the label and image are packed
75 #include "wx/listimpl.cpp"
76 WX_DEFINE_LIST(wxGtkNotebookPagesList
)
79 //-----------------------------------------------------------------------------
81 //-----------------------------------------------------------------------------
84 static void gtk_notebook_page_changing_callback( GtkNotebook
*widget
,
85 GtkNotebookPage
*WXUNUSED(gpage
),
87 wxNotebook
*notebook
)
89 int old
= gtk_notebook_get_current_page( widget
);
91 if ( !notebook
->SendPageChangingEvent(page
) )
93 // program doesn't allow the page change
94 g_signal_stop_emission_by_name(notebook
->m_widget
, "switch_page");
98 // the page change event also reports the old page
99 notebook
->m_oldSelection
= old
;
105 static void gtk_notebook_page_changed_callback( GtkNotebook
*widget
,
106 GtkNotebookPage
*WXUNUSED(gpage
),
108 wxNotebook
*notebook
)
110 int old
= notebook
->m_oldSelection
;
111 notebook
->SendPageChangedEvent( old
);
115 //-----------------------------------------------------------------------------
117 //-----------------------------------------------------------------------------
120 static void gtk_page_size_callback( GtkWidget
*WXUNUSED(widget
), GtkAllocation
* alloc
, wxWindow
*win
)
123 wxapp_install_idle_handler();
125 if ((win
->m_x
== alloc
->x
) &&
126 (win
->m_y
== alloc
->y
) &&
127 (win
->m_width
== alloc
->width
) &&
128 (win
->m_height
== alloc
->height
))
133 win
->SetSize( alloc
->x
, alloc
->y
, alloc
->width
, alloc
->height
);
135 /* GTK 1.2 up to version 1.2.5 is broken so that we have to call allocate
136 here in order to make repositioning after resizing to take effect. */
137 if ((gtk_major_version
== 1) &&
138 (gtk_minor_version
== 2) &&
139 (gtk_micro_version
< 6) &&
141 (GTK_WIDGET_REALIZED(win
->m_wxwindow
)))
143 gtk_widget_size_allocate( win
->m_wxwindow
, alloc
);
148 //-----------------------------------------------------------------------------
149 // "realize" from m_widget
150 //-----------------------------------------------------------------------------
154 gtk_notebook_realized_callback( GtkWidget
* WXUNUSED(widget
), wxWindow
*win
)
157 wxapp_install_idle_handler();
159 /* GTK 1.2 up to version 1.2.5 is broken so that we have to call a queue_resize
160 here in order to make repositioning before showing to take effect. */
161 gtk_widget_queue_resize( win
->m_widget
);
165 //-----------------------------------------------------------------------------
167 //-----------------------------------------------------------------------------
171 gtk_notebook_key_press_callback( GtkWidget
*widget
,
172 GdkEventKey
*gdk_event
,
173 wxNotebook
*notebook
)
175 // don't need to install idle handler, its done from "event" signal
177 if (!notebook
->m_hasVMT
) return FALSE
;
178 if (g_blockEventsOnDrag
) return FALSE
;
180 /* win is a control: tab can be propagated up */
181 if ((gdk_event
->keyval
== GDK_Left
) || (gdk_event
->keyval
== GDK_Right
))
184 int nMax
= notebook
->GetPageCount();
185 if ( nMax
-- ) // decrement it to get the last valid index
187 int nSel
= notebook
->GetSelection();
189 // change selection wrapping if it becomes invalid
190 page
= (gdk_event
->keyval
!= GDK_Left
) ? nSel
== nMax
? 0
195 else // notebook is empty, no next page
200 gtk_notebook_set_current_page( GTK_NOTEBOOK(widget
), page
);
205 /* win is a control: tab can be propagated up */
206 if ((gdk_event
->keyval
== GDK_Tab
) || (gdk_event
->keyval
== GDK_ISO_Left_Tab
))
208 int sel
= notebook
->GetSelection();
211 wxGtkNotebookPage
*nb_page
= notebook
->GetNotebookPage(sel
);
212 wxCHECK_MSG( nb_page
, FALSE
, _T("invalid selection in wxNotebook") );
214 wxNavigationKeyEvent event
;
215 event
.SetEventObject( notebook
);
216 /* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
217 event
.SetDirection( (gdk_event
->keyval
== GDK_Tab
) );
218 /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
219 event
.SetWindowChange( (gdk_event
->state
& GDK_CONTROL_MASK
) ||
220 (gdk_event
->keyval
== GDK_Left
) || (gdk_event
->keyval
== GDK_Right
) );
221 event
.SetCurrentFocus( notebook
);
223 wxNotebookPage
*client
= notebook
->GetPage(sel
);
224 if ( !client
->GetEventHandler()->ProcessEvent( event
) )
236 //-----------------------------------------------------------------------------
237 // InsertChild callback for wxNotebook
238 //-----------------------------------------------------------------------------
240 static void wxInsertChildInNotebook( wxNotebook
* parent
, wxWindow
* child
)
242 // Hack Alert! (Part I): This sets the notebook as the parent of the child
243 // widget, and takes care of some details such as updating the state and
244 // style of the child to reflect its new location. We do this early
245 // because without it GetBestSize (which is used to set the initial size
246 // of controls if an explicit size is not given) will often report
247 // incorrect sizes since the widget's style context is not fully known.
248 // See bug #901694 for details
249 // (http://sourceforge.net/tracker/?func=detail&aid=901694&group_id=9863&atid=109863)
250 gtk_widget_set_parent(child
->m_widget
, parent
->m_widget
);
252 // NOTE: This should be considered a temporary workaround until we can
253 // work out the details and implement delaying the setting of the initial
254 // size of widgets until the size is really needed.
257 //-----------------------------------------------------------------------------
259 //-----------------------------------------------------------------------------
261 IMPLEMENT_DYNAMIC_CLASS(wxNotebook
,wxControl
)
263 BEGIN_EVENT_TABLE(wxNotebook
, wxControl
)
264 EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey
)
267 void wxNotebook::Init()
271 m_imageList
= (wxImageList
*) NULL
;
273 m_themeEnabled
= true;
276 wxNotebook::wxNotebook()
281 wxNotebook::wxNotebook( wxWindow
*parent
, wxWindowID id
,
282 const wxPoint
& pos
, const wxSize
& size
,
283 long style
, const wxString
& name
)
286 Create( parent
, id
, pos
, size
, style
, name
);
289 wxNotebook::~wxNotebook()
294 bool wxNotebook::Create(wxWindow
*parent
, wxWindowID id
,
295 const wxPoint
& pos
, const wxSize
& size
,
296 long style
, const wxString
& name
)
299 m_acceptsFocus
= true;
300 m_insertCallback
= (wxInsertChildFunction
)wxInsertChildInNotebook
;
302 if ( (style
& wxBK_ALIGN_MASK
) == wxBK_DEFAULT
)
305 if (!PreCreation( parent
, pos
, size
) ||
306 !CreateBase( parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
))
308 wxFAIL_MSG( wxT("wxNoteBook creation failed") );
313 m_widget
= gtk_notebook_new();
315 gtk_notebook_set_scrollable( GTK_NOTEBOOK(m_widget
), 1 );
317 g_signal_connect (m_widget
, "switch_page",
318 G_CALLBACK (gtk_notebook_page_changing_callback
), this);
320 g_signal_connect_after (m_widget
, "switch_page",
321 G_CALLBACK (gtk_notebook_page_changed_callback
), this);
323 m_parent
->DoAddChild( this );
325 if (m_windowStyle
& wxBK_RIGHT
)
326 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget
), GTK_POS_RIGHT
);
327 if (m_windowStyle
& wxBK_LEFT
)
328 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget
), GTK_POS_LEFT
);
329 if (m_windowStyle
& wxBK_BOTTOM
)
330 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget
), GTK_POS_BOTTOM
);
332 g_signal_connect (m_widget
, "key_press_event",
333 G_CALLBACK (gtk_notebook_key_press_callback
), this);
337 g_signal_connect (m_widget
, "realize",
338 G_CALLBACK (gtk_notebook_realized_callback
), this);
343 int wxNotebook::GetSelection() const
345 wxCHECK_MSG( m_widget
!= NULL
, -1, wxT("invalid notebook") );
347 return gtk_notebook_get_current_page( GTK_NOTEBOOK(m_widget
) );
350 wxString
wxNotebook::GetPageText( size_t page
) const
352 wxCHECK_MSG( m_widget
!= NULL
, wxEmptyString
, wxT("invalid notebook") );
354 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
356 return nb_page
->m_text
;
358 return wxEmptyString
;
361 int wxNotebook::GetPageImage( size_t page
) const
363 wxCHECK_MSG( m_widget
!= NULL
, -1, wxT("invalid notebook") );
365 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
367 return nb_page
->m_image
;
372 wxGtkNotebookPage
* wxNotebook::GetNotebookPage( int page
) const
374 wxCHECK_MSG( m_widget
!= NULL
, (wxGtkNotebookPage
*) NULL
, wxT("invalid notebook") );
376 wxCHECK_MSG( page
< (int)m_pagesData
.GetCount(), (wxGtkNotebookPage
*) NULL
, wxT("invalid notebook index") );
378 return m_pagesData
.Item(page
)->GetData();
381 int wxNotebook::DoSetSelection( size_t page
, int flags
)
383 wxCHECK_MSG( m_widget
!= NULL
, -1, wxT("invalid notebook") );
385 wxCHECK_MSG( page
< m_pagesData
.GetCount(), -1, wxT("invalid notebook index") );
387 int selOld
= GetSelection();
389 if ( !(flags
& SetSelection_SendEvent
) )
391 g_signal_handlers_disconnect_by_func (m_widget
,
392 (gpointer
) gtk_notebook_page_changing_callback
,
395 g_signal_handlers_disconnect_by_func (m_widget
,
396 (gpointer
) gtk_notebook_page_changed_callback
,
400 gtk_notebook_set_current_page( GTK_NOTEBOOK(m_widget
), page
);
402 if ( !(flags
& SetSelection_SendEvent
) )
404 // reconnect to signals
406 g_signal_connect (m_widget
, "switch_page",
407 G_CALLBACK (gtk_notebook_page_changing_callback
), this);
409 g_signal_connect_after (m_widget
, "switch_page",
410 G_CALLBACK (gtk_notebook_page_changed_callback
), this);
413 wxNotebookPage
*client
= GetPage(page
);
420 bool wxNotebook::SetPageText( size_t page
, const wxString
&text
)
422 wxCHECK_MSG( m_widget
!= NULL
, false, wxT("invalid notebook") );
424 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
426 wxCHECK_MSG( nb_page
, false, wxT("SetPageText: invalid page index") );
428 nb_page
->m_text
= text
;
430 gtk_label_set_text( nb_page
->m_label
, wxGTK_CONV( nb_page
->m_text
) );
435 bool wxNotebook::SetPageImage( size_t page
, int image
)
437 /* HvdH 28-12-98: now it works, but it's a bit of a kludge */
439 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
441 if (!nb_page
) return false;
443 /* Optimization posibility: return immediately if image unchanged.
444 * Not enabled because it may break existing (stupid) code that
445 * manipulates the imagelist to cycle images */
447 /* if (image == nb_page->m_image) return true; */
449 /* For different cases:
450 1) no image -> no image
455 if (image
== -1 && nb_page
->m_image
== -1)
456 return true; /* Case 1): Nothing to do. */
458 GtkWidget
*pixmapwid
= (GtkWidget
*) NULL
;
460 if (nb_page
->m_image
!= -1)
462 /* Case 2) or 4). There is already an image in the gtkhbox. Let's find it */
464 GList
*child
= gtk_container_get_children(GTK_CONTAINER(nb_page
->m_box
));
467 if (GTK_IS_IMAGE(child
->data
))
469 pixmapwid
= GTK_WIDGET(child
->data
);
475 /* We should have the pixmap widget now */
476 wxASSERT(pixmapwid
!= NULL
);
480 /* If there's no new widget, just remove the old from the box */
481 gtk_container_remove(GTK_CONTAINER(nb_page
->m_box
), pixmapwid
);
482 nb_page
->m_image
= -1;
484 return true; /* Case 2) */
488 /* Only cases 3) and 4) left */
489 wxASSERT( m_imageList
!= NULL
); /* Just in case */
491 /* Construct the new pixmap */
492 const wxBitmap
*bmp
= m_imageList
->GetBitmapPtr(image
);
494 if (pixmapwid
== NULL
)
496 /* Case 3) No old pixmap. Create a new one and prepend it to the hbox */
497 pixmapwid
= gtk_image_new_from_pixbuf(bmp
->GetPixbuf());
499 /* CHECKME: Are these pack flags okay? */
500 gtk_box_pack_start(GTK_BOX(nb_page
->m_box
), pixmapwid
, FALSE
, FALSE
, m_padding
);
501 gtk_widget_show(pixmapwid
);
505 /* Case 4) Simply replace the pixmap */
506 gtk_image_set_from_pixbuf((GtkImage
*)pixmapwid
, bmp
->GetPixbuf());
509 nb_page
->m_image
= image
;
514 void wxNotebook::SetPageSize( const wxSize
&WXUNUSED(size
) )
516 wxFAIL_MSG( wxT("wxNotebook::SetPageSize not implemented") );
519 void wxNotebook::SetPadding( const wxSize
&padding
)
521 wxCHECK_RET( m_widget
!= NULL
, wxT("invalid notebook") );
523 m_padding
= padding
.GetWidth();
526 for (i
=0; i
<int(GetPageCount()); i
++)
528 wxGtkNotebookPage
* nb_page
= GetNotebookPage(i
);
529 wxASSERT(nb_page
!= NULL
);
531 if (nb_page
->m_image
!= -1)
533 // gtk_box_set_child_packing sets padding on BOTH sides
534 // icon provides left padding, label provides center and right
535 int image
= nb_page
->m_image
;
537 SetPageImage(i
,image
);
539 wxASSERT(nb_page
->m_label
);
540 gtk_box_set_child_packing(GTK_BOX(nb_page
->m_box
),
541 GTK_WIDGET(nb_page
->m_label
),
542 FALSE
, FALSE
, m_padding
, GTK_PACK_END
);
546 void wxNotebook::SetTabSize(const wxSize
& WXUNUSED(sz
))
548 wxFAIL_MSG( wxT("wxNotebook::SetTabSize not implemented") );
551 bool wxNotebook::DeleteAllPages()
553 wxCHECK_MSG( m_widget
!= NULL
, false, wxT("invalid notebook") );
555 while (m_pagesData
.GetCount() > 0)
556 DeletePage( m_pagesData
.GetCount()-1 );
558 wxASSERT_MSG( GetPageCount() == 0, _T("all pages must have been deleted") );
560 InvalidateBestSize();
561 return wxNotebookBase::DeleteAllPages();
564 wxNotebookPage
*wxNotebook::DoRemovePage( size_t page
)
566 wxNotebookPage
*client
= wxNotebookBase::DoRemovePage(page
);
570 gtk_widget_ref( client
->m_widget
);
571 gtk_widget_unrealize( client
->m_widget
);
573 // we don't need to unparent the client->m_widget; GTK+ will do
574 // that for us (and will throw a warning if we do it!)
576 gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget
), page
);
578 wxGtkNotebookPage
* p
= GetNotebookPage(page
);
579 m_pagesData
.DeleteObject(p
);
585 bool wxNotebook::InsertPage( size_t position
,
587 const wxString
& text
,
591 wxCHECK_MSG( m_widget
!= NULL
, false, wxT("invalid notebook") );
593 wxCHECK_MSG( win
->GetParent() == this, false,
594 wxT("Can't add a page whose parent is not the notebook!") );
596 wxCHECK_MSG( position
<= GetPageCount(), false,
597 _T("invalid page index in wxNotebookPage::InsertPage()") );
599 // Hack Alert! (Part II): See above in wxInsertChildInNotebook callback
600 // why this has to be done. NOTE: using gtk_widget_unparent here does not
601 // work as it seems to undo too much and will cause errors in the
602 // gtk_notebook_insert_page below, so instead just clear the parent by
604 win
->m_widget
->parent
= NULL
;
607 win
->SetThemeEnabled(true);
609 GtkNotebook
*notebook
= GTK_NOTEBOOK(m_widget
);
611 wxGtkNotebookPage
*nb_page
= new wxGtkNotebookPage();
613 if ( position
== GetPageCount() )
614 m_pagesData
.Append( nb_page
);
616 m_pagesData
.Insert( position
, nb_page
);
618 m_pages
.Insert(win
, position
);
620 nb_page
->m_box
= gtk_hbox_new( FALSE
, 1 );
621 gtk_container_set_border_width((GtkContainer
*)nb_page
->m_box
, 2);
623 g_signal_connect (win
->m_widget
, "size_allocate",
624 G_CALLBACK (gtk_page_size_callback
), win
);
626 gtk_notebook_insert_page( notebook
, win
->m_widget
, nb_page
->m_box
, position
);
628 nb_page
->m_page
= (GtkNotebookPage
*) g_list_last(notebook
->children
)->data
;
630 /* set the label image */
631 nb_page
->m_image
= imageId
;
635 wxASSERT( m_imageList
!= NULL
);
637 const wxBitmap
*bmp
= m_imageList
->GetBitmapPtr(imageId
);
638 GtkWidget
* pixmapwid
= gtk_image_new_from_pixbuf(bmp
->GetPixbuf());
639 gtk_box_pack_start(GTK_BOX(nb_page
->m_box
), pixmapwid
, FALSE
, FALSE
, m_padding
);
640 gtk_widget_show(pixmapwid
);
643 /* set the label text */
645 nb_page
->m_text
= wxStripMenuCodes(text
);
646 if (nb_page
->m_text
.empty()) nb_page
->m_text
= wxEmptyString
;
648 nb_page
->m_label
= GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page
->m_text
)) );
649 gtk_box_pack_end( GTK_BOX(nb_page
->m_box
), GTK_WIDGET(nb_page
->m_label
), FALSE
, FALSE
, m_padding
);
651 /* apply current style */
652 GtkRcStyle
*style
= CreateWidgetStyle();
655 gtk_widget_modify_style(GTK_WIDGET(nb_page
->m_label
), style
);
656 gtk_rc_style_unref(style
);
660 gtk_widget_show( GTK_WIDGET(nb_page
->m_label
) );
662 if (select
&& (m_pagesData
.GetCount() > 1))
664 SetSelection( position
);
667 InvalidateBestSize();
671 // helper for HitTest(): check if the point lies inside the given widget which
672 // is the child of the notebook whose position and border size are passed as
675 IsPointInsideWidget(const wxPoint
& pt
, GtkWidget
*w
,
676 gint x
, gint y
, gint border
= 0)
679 (pt
.x
>= w
->allocation
.x
- x
- border
) &&
680 (pt
.x
<= w
->allocation
.x
- x
+ border
+ w
->allocation
.width
) &&
681 (pt
.y
>= w
->allocation
.y
- y
- border
) &&
682 (pt
.y
<= w
->allocation
.y
- y
+ border
+ w
->allocation
.height
);
685 int wxNotebook::HitTest(const wxPoint
& pt
, long *flags
) const
687 const gint x
= m_widget
->allocation
.x
;
688 const gint y
= m_widget
->allocation
.y
;
690 const size_t count
= GetPageCount();
693 GtkNotebook
* notebook
= GTK_NOTEBOOK(m_widget
);
694 if (gtk_notebook_get_scrollable(notebook
))
695 i
= g_list_position( notebook
->children
, notebook
->first_tab
);
697 for ( ; i
< count
; i
++ )
699 wxGtkNotebookPage
* nb_page
= GetNotebookPage(i
);
700 GtkWidget
*box
= nb_page
->m_box
;
702 const gint border
= gtk_container_get_border_width(GTK_CONTAINER(box
));
704 if ( IsPointInsideWidget(pt
, box
, x
, y
, border
) )
706 // ok, we're inside this tab -- now find out where, if needed
709 GtkWidget
*pixmap
= NULL
;
711 GList
*children
= gtk_container_get_children(GTK_CONTAINER(box
));
712 for ( GList
*child
= children
; child
; child
= child
->next
)
714 if (GTK_IS_IMAGE(child
->data
))
716 pixmap
= GTK_WIDGET(child
->data
);
722 g_list_free(children
);
724 if ( pixmap
&& IsPointInsideWidget(pt
, pixmap
, x
, y
) )
726 *flags
= wxBK_HITTEST_ONICON
;
728 else if ( IsPointInsideWidget(pt
, GTK_WIDGET(nb_page
->m_label
), x
, y
) )
730 *flags
= wxBK_HITTEST_ONLABEL
;
734 *flags
= wxBK_HITTEST_ONITEM
;
744 *flags
= wxBK_HITTEST_NOWHERE
;
745 wxWindowBase
* page
= GetCurrentPage();
748 // rect origin is in notebook's parent coordinates
749 wxRect rect
= page
->GetRect();
751 // adjust it to the notebook's coordinates
752 wxPoint pos
= GetPosition();
755 if ( rect
.Contains( pt
) )
756 *flags
|= wxBK_HITTEST_ONPAGE
;
763 void wxNotebook::OnNavigationKey(wxNavigationKeyEvent
& event
)
765 if (event
.IsWindowChange())
766 AdvanceSelection( event
.GetDirection() );
771 #if wxUSE_CONSTRAINTS
773 // override these 2 functions to do nothing: everything is done in OnSize
774 void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse
) )
776 // don't set the sizes of the pages - their correct size is not yet known
777 wxControl::SetConstraintSizes(false);
780 bool wxNotebook::DoPhase( int WXUNUSED(nPhase
) )
787 void wxNotebook::DoApplyWidgetStyle(GtkRcStyle
*style
)
789 gtk_widget_modify_style(m_widget
, style
);
790 size_t cnt
= m_pagesData
.GetCount();
791 for (size_t i
= 0; i
< cnt
; i
++)
792 gtk_widget_modify_style(GTK_WIDGET(GetNotebookPage(i
)->m_label
), style
);
795 GdkWindow
*wxNotebook::GTKGetWindow(wxArrayGdkWindows
& windows
) const
797 windows
.push_back(m_widget
->window
);
798 windows
.push_back(GTK_NOTEBOOK(m_widget
)->event_window
);
805 wxNotebook::GetClassDefaultAttributes(wxWindowVariant
WXUNUSED(variant
))
807 return GetDefaultAttributesFromGTKWidget(gtk_notebook_new
);
810 //-----------------------------------------------------------------------------
812 //-----------------------------------------------------------------------------
814 IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent
, wxNotifyEvent
)