1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Vadim Zeitlin
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
11 #pragma implementation "notebook.h"
14 // For compilers that support precompilation, includes "wx.h".
15 #include "wx/wxprec.h"
17 #include "wx/notebook.h"
23 #include "wx/imaglist.h"
26 #include "wx/bitmap.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 void wxapp_install_idle_handler();
47 //-----------------------------------------------------------------------------
49 //-----------------------------------------------------------------------------
51 extern bool g_blockEventsOnDrag
;
53 //-----------------------------------------------------------------------------
55 //-----------------------------------------------------------------------------
57 // VZ: this is rather ugly as we keep the pages themselves in an array (it
58 // allows us to have quite a few functions implemented in the base class)
59 // but the page data is kept in a separate list, so we must maintain them
60 // in sync manually... of course, the list had been there before the base
61 // class which explains it but it still would be nice to do something
64 class wxGtkNotebookPage
: public wxObject
70 m_page
= (GtkNotebookPage
*) NULL
;
71 m_box
= (GtkWidget
*) NULL
;
76 GtkNotebookPage
*m_page
;
78 GtkWidget
*m_box
; // in which the label and image are packed
81 #include "wx/listimpl.cpp"
82 WX_DEFINE_LIST(wxGtkNotebookPagesList
);
84 //-----------------------------------------------------------------------------
86 //-----------------------------------------------------------------------------
88 static void gtk_notebook_page_change_callback(GtkNotebook
*WXUNUSED(widget
),
89 GtkNotebookPage
*WXUNUSED(page
),
91 wxNotebook
*notebook
)
93 // are you trying to call SetSelection() from a notebook event handler?
95 wxCHECK_RET( !notebook
->m_inSwitchPage
,
96 _T("gtk_notebook_page_change_callback reentered") );
98 notebook
->m_inSwitchPage
= TRUE
;
100 wxapp_install_idle_handler();
102 int old
= notebook
->GetSelection();
104 wxNotebookEvent
eventChanging( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
,
105 notebook
->GetId(), page
, old
);
106 eventChanging
.SetEventObject( notebook
);
108 if ( (notebook
->GetEventHandler()->ProcessEvent(eventChanging
)) &&
109 !eventChanging
.IsAllowed() )
111 /* program doesn't allow the page change */
112 gtk_signal_emit_stop_by_name( GTK_OBJECT(notebook
->m_widget
),
115 else // change allowed
117 // make wxNotebook::GetSelection() return the correct (i.e. consistent
118 // with wxNotebookEvent::GetSelection()) value even though the page is
119 // not really changed in GTK+
120 notebook
->m_selection
= page
;
122 wxNotebookEvent
eventChanged( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
,
123 notebook
->GetId(), page
, old
);
124 eventChanged
.SetEventObject( notebook
);
125 notebook
->GetEventHandler()->ProcessEvent( eventChanged
);
128 notebook
->m_inSwitchPage
= FALSE
;
131 //-----------------------------------------------------------------------------
133 //-----------------------------------------------------------------------------
135 static void gtk_page_size_callback( GtkWidget
*WXUNUSED(widget
), GtkAllocation
* alloc
, wxWindow
*win
)
138 wxapp_install_idle_handler();
140 if ((win
->m_x
== alloc
->x
) &&
141 (win
->m_y
== alloc
->y
) &&
142 (win
->m_width
== alloc
->width
) &&
143 (win
->m_height
== alloc
->height
))
148 win
->SetSize( alloc
->x
, alloc
->y
, alloc
->width
, alloc
->height
);
150 /* GTK 1.2 up to version 1.2.5 is broken so that we have to call allocate
151 here in order to make repositioning after resizing to take effect. */
152 if ((gtk_major_version
== 1) &&
153 (gtk_minor_version
== 2) &&
154 (gtk_micro_version
< 6) &&
156 (GTK_WIDGET_REALIZED(win
->m_wxwindow
)))
158 gtk_widget_size_allocate( win
->m_wxwindow
, alloc
);
162 //-----------------------------------------------------------------------------
163 // "realize" from m_widget
164 //-----------------------------------------------------------------------------
167 gtk_notebook_realized_callback( GtkWidget
* WXUNUSED(widget
), wxWindow
*win
)
170 wxapp_install_idle_handler();
172 /* GTK 1.2 up to version 1.2.5 is broken so that we have to call a queue_resize
173 here in order to make repositioning before showing to take effect. */
174 gtk_widget_queue_resize( win
->m_widget
);
179 //-----------------------------------------------------------------------------
181 //-----------------------------------------------------------------------------
183 static gint
gtk_notebook_key_press_callback( GtkWidget
*widget
, GdkEventKey
*gdk_event
, wxNotebook
*win
)
186 wxapp_install_idle_handler();
188 if (!win
->m_hasVMT
) return FALSE
;
189 if (g_blockEventsOnDrag
) return FALSE
;
191 /* win is a control: tab can be propagated up */
192 if ((gdk_event
->keyval
== GDK_Tab
) || (gdk_event
->keyval
== GDK_ISO_Left_Tab
))
194 int sel
= win
->GetSelection();
197 wxGtkNotebookPage
*nb_page
= win
->GetNotebookPage(sel
);
198 wxCHECK_MSG( nb_page
, FALSE
, _T("invalid selection in wxNotebook") );
200 wxNavigationKeyEvent event
;
201 event
.SetEventObject( win
);
202 /* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
203 event
.SetDirection( (gdk_event
->keyval
== GDK_Tab
) );
204 /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
205 event
.SetWindowChange( (gdk_event
->state
& GDK_CONTROL_MASK
) );
206 event
.SetCurrentFocus( win
);
208 wxNotebookPage
*client
= win
->GetPage(sel
);
209 if ( !client
->GetEventHandler()->ProcessEvent( event
) )
214 gtk_signal_emit_stop_by_name( GTK_OBJECT(widget
), "key_press_event" );
221 //-----------------------------------------------------------------------------
222 // InsertChild callback for wxNotebook
223 //-----------------------------------------------------------------------------
225 static void wxInsertChildInNotebook( wxNotebook
* parent
, wxWindow
* child
)
227 // Hack alert! We manually set the child window
228 // parent field so that GTK can query the
229 // notebook's style and font.
230 child
->m_widget
->parent
= parent
->m_widget
;
233 //-----------------------------------------------------------------------------
235 //-----------------------------------------------------------------------------
237 IMPLEMENT_DYNAMIC_CLASS(wxNotebook
,wxControl
)
239 BEGIN_EVENT_TABLE(wxNotebook
, wxControl
)
240 EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey
)
243 void wxNotebook::Init()
246 m_inSwitchPage
= FALSE
;
248 m_imageList
= (wxImageList
*) NULL
;
250 m_themeEnabled
= TRUE
;
253 wxNotebook::wxNotebook()
258 wxNotebook::wxNotebook( wxWindow
*parent
, wxWindowID id
,
259 const wxPoint
& pos
, const wxSize
& size
,
260 long style
, const wxString
& name
)
263 Create( parent
, id
, pos
, size
, style
, name
);
266 wxNotebook::~wxNotebook()
271 bool wxNotebook::Create(wxWindow
*parent
, wxWindowID id
,
272 const wxPoint
& pos
, const wxSize
& size
,
273 long style
, const wxString
& name
)
276 m_acceptsFocus
= TRUE
;
277 m_insertCallback
= (wxInsertChildFunction
)wxInsertChildInNotebook
;
279 if (!PreCreation( parent
, pos
, size
) ||
280 !CreateBase( parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
))
282 wxFAIL_MSG( wxT("wxNoteBook creation failed") );
287 m_widget
= gtk_notebook_new();
289 gtk_notebook_set_scrollable( GTK_NOTEBOOK(m_widget
), 1 );
291 gtk_signal_connect( GTK_OBJECT(m_widget
), "switch_page",
292 GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback
), (gpointer
)this );
294 m_parent
->DoAddChild( this );
296 if (m_windowStyle
& wxNB_RIGHT
)
297 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget
), GTK_POS_RIGHT
);
298 if (m_windowStyle
& wxNB_LEFT
)
299 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget
), GTK_POS_LEFT
);
300 if (m_windowStyle
& wxNB_BOTTOM
)
301 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(m_widget
), GTK_POS_BOTTOM
);
303 gtk_signal_connect( GTK_OBJECT(m_widget
), "key_press_event",
304 GTK_SIGNAL_FUNC(gtk_notebook_key_press_callback
), (gpointer
)this );
308 SetFont( parent
->GetFont() );
310 gtk_signal_connect( GTK_OBJECT(m_widget
), "realize",
311 GTK_SIGNAL_FUNC(gtk_notebook_realized_callback
), (gpointer
) this );
318 int wxNotebook::GetSelection() const
320 wxCHECK_MSG( m_widget
!= NULL
, -1, wxT("invalid notebook") );
322 if ( m_selection
== -1 )
324 GList
*nb_pages
= GTK_NOTEBOOK(m_widget
)->children
;
326 if (g_list_length(nb_pages
) != 0)
328 GtkNotebook
*notebook
= GTK_NOTEBOOK(m_widget
);
330 gpointer cur
= notebook
->cur_page
;
333 wxConstCast(this, wxNotebook
)->m_selection
=
334 g_list_index( nb_pages
, cur
);
342 wxString
wxNotebook::GetPageText( size_t page
) const
344 wxCHECK_MSG( m_widget
!= NULL
, wxT(""), wxT("invalid notebook") );
346 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
348 return nb_page
->m_text
;
353 int wxNotebook::GetPageImage( size_t page
) const
355 wxCHECK_MSG( m_widget
!= NULL
, -1, wxT("invalid notebook") );
357 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
359 return nb_page
->m_image
;
364 wxGtkNotebookPage
* wxNotebook::GetNotebookPage( int page
) const
366 wxCHECK_MSG( m_widget
!= NULL
, (wxGtkNotebookPage
*) NULL
, wxT("invalid notebook") );
368 wxCHECK_MSG( page
< (int)m_pagesData
.GetCount(), (wxGtkNotebookPage
*) NULL
, wxT("invalid notebook index") );
370 return m_pagesData
.Item(page
)->GetData();
373 int wxNotebook::SetSelection( size_t page
)
375 wxCHECK_MSG( m_widget
!= NULL
, -1, wxT("invalid notebook") );
377 wxCHECK_MSG( page
< m_pagesData
.GetCount(), -1, wxT("invalid notebook index") );
379 int selOld
= GetSelection();
381 // cache the selection
383 gtk_notebook_set_page( GTK_NOTEBOOK(m_widget
), page
);
385 wxNotebookPage
*client
= GetPage(page
);
392 bool wxNotebook::SetPageText( size_t page
, const wxString
&text
)
394 wxCHECK_MSG( m_widget
!= NULL
, FALSE
, wxT("invalid notebook") );
396 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
398 wxCHECK_MSG( nb_page
, FALSE
, wxT("SetPageText: invalid page index") );
400 nb_page
->m_text
= text
;
402 gtk_label_set( nb_page
->m_label
, wxGTK_CONV( nb_page
->m_text
) );
407 bool wxNotebook::SetPageImage( size_t page
, int image
)
409 /* HvdH 28-12-98: now it works, but it's a bit of a kludge */
411 wxGtkNotebookPage
* nb_page
= GetNotebookPage(page
);
413 if (!nb_page
) return FALSE
;
415 /* Optimization posibility: return immediately if image unchanged.
416 * Not enabled because it may break existing (stupid) code that
417 * manipulates the imagelist to cycle images */
419 /* if (image == nb_page->m_image) return TRUE; */
421 /* For different cases:
422 1) no image -> no image
427 if (image
== -1 && nb_page
->m_image
== -1)
428 return TRUE
; /* Case 1): Nothing to do. */
430 GtkWidget
*pixmapwid
= (GtkWidget
*) NULL
;
432 if (nb_page
->m_image
!= -1)
434 /* Case 2) or 4). There is already an image in the gtkhbox. Let's find it */
436 GList
*child
= gtk_container_children(GTK_CONTAINER(nb_page
->m_box
));
439 if (GTK_IS_PIXMAP(child
->data
))
441 pixmapwid
= GTK_WIDGET(child
->data
);
447 /* We should have the pixmap widget now */
448 wxASSERT(pixmapwid
!= NULL
);
452 /* If there's no new widget, just remove the old from the box */
453 gtk_container_remove(GTK_CONTAINER(nb_page
->m_box
), pixmapwid
);
454 nb_page
->m_image
= -1;
456 return TRUE
; /* Case 2) */
460 /* Only cases 3) and 4) left */
461 wxASSERT( m_imageList
!= NULL
); /* Just in case */
463 /* Construct the new pixmap */
464 const wxBitmap
*bmp
= m_imageList
->GetBitmap(image
);
465 GdkPixmap
*pixmap
= bmp
->GetPixmap();
466 GdkBitmap
*mask
= (GdkBitmap
*) NULL
;
467 if ( bmp
->GetMask() )
469 mask
= bmp
->GetMask()->GetBitmap();
472 if (pixmapwid
== NULL
)
474 /* Case 3) No old pixmap. Create a new one and prepend it to the hbox */
475 pixmapwid
= gtk_pixmap_new (pixmap
, mask
);
477 /* CHECKME: Are these pack flags okay? */
478 gtk_box_pack_start(GTK_BOX(nb_page
->m_box
), pixmapwid
, FALSE
, FALSE
, m_padding
);
479 gtk_widget_show(pixmapwid
);
483 /* Case 4) Simply replace the pixmap */
484 gtk_pixmap_set(GTK_PIXMAP(pixmapwid
), pixmap
, mask
);
487 nb_page
->m_image
= image
;
492 void wxNotebook::SetPageSize( const wxSize
&WXUNUSED(size
) )
494 wxFAIL_MSG( wxT("wxNotebook::SetPageSize not implemented") );
497 void wxNotebook::SetPadding( const wxSize
&padding
)
499 wxCHECK_RET( m_widget
!= NULL
, wxT("invalid notebook") );
501 m_padding
= padding
.GetWidth();
504 for (i
=0; i
<int(GetPageCount()); i
++)
506 wxGtkNotebookPage
* nb_page
= GetNotebookPage(i
);
507 wxASSERT(nb_page
!= NULL
);
509 if (nb_page
->m_image
!= -1)
511 // gtk_box_set_child_packing sets padding on BOTH sides
512 // icon provides left padding, label provides center and right
513 int image
= nb_page
->m_image
;
515 SetPageImage(i
,image
);
517 wxASSERT(nb_page
->m_label
);
518 gtk_box_set_child_packing(GTK_BOX(nb_page
->m_box
),
519 GTK_WIDGET(nb_page
->m_label
),
520 FALSE
, FALSE
, m_padding
, GTK_PACK_END
);
524 void wxNotebook::SetTabSize(const wxSize
& WXUNUSED(sz
))
526 wxFAIL_MSG( wxT("wxNotebook::SetTabSize not implemented") );
529 bool wxNotebook::DeleteAllPages()
531 wxCHECK_MSG( m_widget
!= NULL
, FALSE
, wxT("invalid notebook") );
533 while (m_pagesData
.GetCount() > 0)
534 DeletePage( m_pagesData
.GetCount()-1 );
536 wxASSERT_MSG( GetPageCount() == 0, _T("all pages must have been deleted") );
538 return wxNotebookBase::DeleteAllPages();
541 bool wxNotebook::DeletePage( size_t page
)
543 if ( m_selection
== (int)m_pagesData
.GetCount() - 1 )
545 // the index will become invalid after the page is deleted
549 // it will call our DoRemovePage() to do the real work
550 return wxNotebookBase::DeletePage(page
);
553 wxNotebookPage
*wxNotebook::DoRemovePage( size_t page
)
555 wxNotebookPage
*client
= wxNotebookBase::DoRemovePage(page
);
559 gtk_widget_ref( client
->m_widget
);
560 gtk_widget_unrealize( client
->m_widget
);
561 gtk_widget_unparent( client
->m_widget
);
563 // gtk_notebook_remove_page() sends "switch_page" signal with some strange
564 // new page index (when deleting selected page 0, new page is 1 although,
565 // clearly, the selection should stay 0), so suppress this
566 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
567 GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback
), (gpointer
) this );
569 gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget
), page
);
571 gtk_signal_connect( GTK_OBJECT(m_widget
), "switch_page",
572 GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback
), (gpointer
)this );
574 wxGtkNotebookPage
* p
= GetNotebookPage(page
);
575 m_pagesData
.DeleteObject(p
);
581 bool wxNotebook::InsertPage( size_t position
,
583 const wxString
& text
,
587 wxCHECK_MSG( m_widget
!= NULL
, FALSE
, wxT("invalid notebook") );
589 wxCHECK_MSG( win
->GetParent() == this, FALSE
,
590 wxT("Can't add a page whose parent is not the notebook!") );
592 wxCHECK_MSG( position
<= GetPageCount(), FALSE
,
593 _T("invalid page index in wxNotebookPage::InsertPage()") );
595 // Hack alert part II! See above in InsertChildInNotebook
596 // callback why this has to be done.
597 win
->m_widget
->parent
= NULL
;
599 // don't receive switch page during addition
600 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
601 GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback
), (gpointer
) this );
604 win
->SetThemeEnabled(TRUE
);
606 GtkNotebook
*notebook
= GTK_NOTEBOOK(m_widget
);
608 wxGtkNotebookPage
*nb_page
= new wxGtkNotebookPage();
610 if ( position
== GetPageCount() )
611 m_pagesData
.Append( nb_page
);
613 m_pagesData
.Insert( m_pagesData
.Item( position
), nb_page
);
615 m_pages
.Insert(win
, position
);
617 nb_page
->m_box
= gtk_hbox_new( FALSE
, 1 );
618 gtk_container_border_width( GTK_CONTAINER(nb_page
->m_box
), 2 );
620 gtk_signal_connect( GTK_OBJECT(win
->m_widget
), "size_allocate",
621 GTK_SIGNAL_FUNC(gtk_page_size_callback
), (gpointer
)win
);
624 // On VMS position is unsigned and thus always positive
626 gtk_notebook_append_page( notebook
, win
->m_widget
, nb_page
->m_box
);
629 gtk_notebook_insert_page( notebook
, win
->m_widget
, nb_page
->m_box
, position
);
631 nb_page
->m_page
= (GtkNotebookPage
*) g_list_last(notebook
->children
)->data
;
633 /* set the label image */
634 nb_page
->m_image
= imageId
;
638 wxASSERT( m_imageList
!= NULL
);
640 const wxBitmap
*bmp
= m_imageList
->GetBitmap(imageId
);
641 GdkPixmap
*pixmap
= bmp
->GetPixmap();
642 GdkBitmap
*mask
= (GdkBitmap
*) NULL
;
643 if ( bmp
->GetMask() )
645 mask
= bmp
->GetMask()->GetBitmap();
648 GtkWidget
*pixmapwid
= gtk_pixmap_new (pixmap
, mask
);
650 gtk_box_pack_start(GTK_BOX(nb_page
->m_box
), pixmapwid
, FALSE
, FALSE
, m_padding
);
652 gtk_widget_show(pixmapwid
);
655 /* set the label text */
656 nb_page
->m_text
= text
;
657 if (nb_page
->m_text
.IsEmpty()) nb_page
->m_text
= wxT("");
659 nb_page
->m_label
= GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page
->m_text
)) );
660 gtk_box_pack_end( GTK_BOX(nb_page
->m_box
), GTK_WIDGET(nb_page
->m_label
), FALSE
, FALSE
, m_padding
);
663 gtk_widget_show( GTK_WIDGET(nb_page
->m_label
) );
664 if (select
&& (m_pagesData
.GetCount() > 1))
667 // On VMS position is unsigned and thus always positive
669 SetSelection( GetPageCount()-1 );
672 SetSelection( position
);
675 gtk_signal_connect( GTK_OBJECT(m_widget
), "switch_page",
676 GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback
), (gpointer
)this );
681 // helper for HitTest(): check if the point lies inside the given widget which
682 // is the child of the notebook whose position and border size are passed as
685 IsPointInsideWidget(const wxPoint
& pt
, GtkWidget
*w
,
686 gint x
, gint y
, gint border
= 0)
689 (pt
.x
>= w
->allocation
.x
- x
- border
) &&
690 (pt
.x
<= w
->allocation
.x
- x
+ border
+ w
->allocation
.width
) &&
691 (pt
.y
>= w
->allocation
.y
- y
- border
) &&
692 (pt
.y
<= w
->allocation
.y
- y
+ border
+ w
->allocation
.height
);
695 int wxNotebook::HitTest(const wxPoint
& pt
, long *flags
) const
697 const gint x
= m_widget
->allocation
.x
;
698 const gint y
= m_widget
->allocation
.y
;
700 const size_t count
= GetPageCount();
701 for ( size_t i
= 0; i
< count
; i
++ )
703 wxGtkNotebookPage
* nb_page
= GetNotebookPage(i
);
704 GtkWidget
*box
= nb_page
->m_box
;
706 // VZ: don't know how to find the border width in GTK+ 1.2
708 const gint border
= gtk_container_get_border_width(GTK_CONTAINER(box
));
710 const gint border
= 0;
712 if ( IsPointInsideWidget(pt
, box
, x
, y
, border
) )
714 // ok, we're inside this tab -- now find out where, if needed
717 GtkWidget
*pixmap
= NULL
;
719 GList
*children
= gtk_container_children(GTK_CONTAINER(box
));
720 for ( GList
*child
= children
; child
; child
= child
->next
)
722 if ( GTK_IS_PIXMAP(child
->data
) )
724 pixmap
= GTK_WIDGET(child
->data
);
730 g_list_free(children
);
732 if ( pixmap
&& IsPointInsideWidget(pt
, pixmap
, x
, y
) )
734 *flags
= wxNB_HITTEST_ONICON
;
736 else if ( IsPointInsideWidget(pt
, GTK_WIDGET(nb_page
->m_label
), x
, y
) )
738 *flags
= wxNB_HITTEST_ONLABEL
;
742 *flags
= wxNB_HITTEST_ONITEM
;
751 *flags
= wxNB_HITTEST_NOWHERE
;
756 void wxNotebook::OnNavigationKey(wxNavigationKeyEvent
& event
)
758 if (event
.IsWindowChange())
759 AdvanceSelection( event
.GetDirection() );
764 #if wxUSE_CONSTRAINTS
766 // override these 2 functions to do nothing: everything is done in OnSize
767 void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse
) )
769 // don't set the sizes of the pages - their correct size is not yet known
770 wxControl::SetConstraintSizes(FALSE
);
773 bool wxNotebook::DoPhase( int WXUNUSED(nPhase
) )
780 void wxNotebook::ApplyWidgetStyle()
782 // TODO, font for labels etc
785 gtk_widget_set_style( m_widget
, m_widgetStyle
);
788 bool wxNotebook::IsOwnGtkWindow( GdkWindow
*window
)
790 return ((m_widget
->window
== window
) ||
791 (NOTEBOOK_PANEL(m_widget
) == window
));
794 //-----------------------------------------------------------------------------
796 //-----------------------------------------------------------------------------
798 IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent
, wxNotifyEvent
)