Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / notebook.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <gtkmm/notebook.h>
4 #include <gtkmm/private/notebook_p.h>
5
6 #include <gtk/gtktypebuiltins.h>
7 // -*- c++ -*-
8 /* $Id$ */
9
10 /* Copyright 1998-2002 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26
27 #include <gtk/gtknotebook.h>
28 #include <gtkmm/label.h>
29
30
31 namespace Gtk
32 {
33
34 namespace Notebook_Helpers
35 {
36
37 /**** Gtk::Notebook_Helpers::PageIterator **********************************/
38
39 bool PageIterator::equal(const PageIterator& other) const
40 {
41   return (node_ == other.node_);
42 }
43
44 PageIterator::operator bool() const
45 {
46   return (node_ != 0);
47 }
48
49 PageIterator& PageIterator::operator++()
50 {
51   g_return_val_if_fail(node_ != 0, *this);
52
53   node_ = node_->next;
54   return *this;
55 }
56
57 const PageIterator PageIterator::operator++(int)
58 {
59   const PageIterator tmp (*this);
60   this->operator++();
61   return tmp;
62 }
63
64 PageIterator& PageIterator::operator--()
65 {
66   if(node_)
67     node_ = node_->prev;
68   else
69     node_ = g_list_last(parent_->gobj()->children);
70
71   return *this;
72 }
73
74 const PageIterator PageIterator::operator--(int)
75 {
76   const PageIterator tmp (*this);
77   this->operator--();
78   return tmp;
79 }
80
81
82 /*********************************************************************
83 ***** Page Properties
84 *********************************************************************/
85
86 int Page::get_page_num() const
87 {
88   return g_list_position(parent_->gobj()->children, node_);
89 }
90
91 Widget* Page::get_child() const
92 {
93   return parent_->get_nth_page(get_page_num());
94 }
95
96 Widget* Page::get_tab_label() const
97 {
98   return parent_->get_tab_label(*get_child());
99 }
100
101 void Page::set_tab_label(Widget& tab_label)
102 {
103   parent_->set_tab_label(*get_child(), tab_label);
104 }
105
106 void Page::set_tab_label_text(const Glib::ustring& tab_text)
107 {
108   parent_->set_tab_label_text(*get_child(), tab_text);
109 }
110
111 Glib::ustring Page::get_tab_label_text() const
112 {
113   return parent_->get_tab_label_text(*get_child());
114 }
115
116 Widget* Page::get_menu_label() const
117 {
118   return parent_->get_menu_label(*get_child());
119 }
120
121 void Page::set_menu_label(Widget& menu_label)
122 {
123   parent_->set_menu_label(*get_child(), menu_label);
124 }
125
126 void Page::set_menu_label_text(const Glib::ustring& menu_text)
127 {
128   parent_->set_menu_label_text(*get_child(), menu_text);
129 }
130
131 Glib::ustring Page::get_menu_label_text() const
132 {
133   return parent_->get_menu_label_text(*get_child());
134 }
135
136 void Page::query_tab_label_packing(bool& expand, bool& fill, PackType& pack_type)
137 {
138   parent_->query_tab_label_packing(*get_child(), expand, fill, pack_type);
139 }
140
141 void Page::set_tab_label_packing(bool expand, bool fill, PackType pack_type)
142 {
143   parent_->set_tab_label_packing(*get_child(), expand, fill, pack_type);
144 }
145
146 /*********************************************************************
147 ***** List properties
148 *********************************************************************/
149 PageList::PageList()
150 :
151   gparent_ (0)
152 {}
153
154 PageList::PageList(GtkNotebook* gparent)
155 :
156   gparent_ (gparent)
157 {}
158
159 PageList::PageList(const PageList& src)
160 {
161   operator=(src);
162 }
163
164 PageList& PageList::operator=(const PageList& src)
165 {
166   gparent_ = src.gparent_;
167   return *this;
168 }
169
170 PageList::size_type PageList::max_size() const
171 {
172   return G_MAXINT;
173 }
174
175 bool PageList::empty() const
176 {
177   return (gparent_->children == 0);
178 }
179
180 PageList::size_type PageList::size() const
181 {
182   return g_list_length(gparent_->children);
183 }
184
185 PageList::value_type PageList::front() const
186 {
187   return *begin();
188 }
189
190 PageList::value_type PageList::back() const
191 {
192   iterator pend (end());
193   return *--pend;
194 }
195
196 PageList::value_type PageList::operator[](size_type index) const
197 {
198   GList *const node = g_list_nth(gparent_->children, index);
199   g_assert(node != 0);
200
201   return *iterator(Glib::wrap(gparent_), node);
202 }
203
204 PageList::iterator PageList::insert(PageList::iterator position, const Element& elem)
205 {
206   // Get the iterator index, or -1 for end().
207   const int index = (position) ? position->get_page_num() : -1;
208
209   // Give item to GTK+.
210   gtk_notebook_insert_page_menu(gparent_,
211                                 Glib::unwrap(elem.child_),
212                                 Glib::unwrap(elem.tab_),
213                                 Glib::unwrap(elem.menu_),
214                                 index);
215
216   // Return an iterator pointing to the inserted element.
217   return --position;
218 }
219
220 void PageList::erase(PageList::iterator start, PageList::iterator stop)
221 {
222   while(start != stop)
223     start = erase(start);
224 }
225
226 PageList::iterator PageList::erase(PageList::iterator position)
227 {
228   iterator next (position);
229
230   if(position)
231   {
232     ++next;
233     gtk_container_remove(GTK_CONTAINER(gparent_), position->get_child()->gobj());
234   }
235
236   return next;
237 }
238
239 void PageList::remove(const_reference child)
240 {
241 //  g_return_if_fail(child.parent_ != 0);
242   gtk_container_remove(GTK_CONTAINER(gparent_), child.get_child()->gobj());
243 }
244
245 void PageList::remove(Widget& widget)
246 {
247   gtk_container_remove(GTK_CONTAINER(gparent_), widget.gobj());
248 }
249
250 void PageList::reorder(PageList::iterator position, PageList::iterator page)
251 {
252   gtk_notebook_reorder_child(gparent(), page->get_child()->gobj(), position->get_page_num());
253 }
254
255 PageList::iterator PageList::find(int num)
256 {
257   if(num < 0) return end();
258   int j = 0;
259   iterator i;
260   for(i = begin(), j = 0; i != end(), j < num; ++i, ++j);
261   return i;
262 }
263
264 PageList::iterator PageList::find(const_reference c)
265 {
266   iterator i = begin();
267   for(i = begin(); i != end() && ((*i).get_child() != c.get_child()); i++);
268   return i;
269 }
270
271 PageList::iterator PageList::find(Widget& widget)
272 {
273   iterator i;
274   for(i = begin(); i != end() && ((*i).get_child() != &widget); i++);
275   return i;
276 }
277
278 PageList::iterator PageList::find(GtkNotebookPage* page)
279 {
280   GList* node = gparent_->children;
281
282   while(node && node->data != page)
283     node = node->next;
284
285   return (node) ? iterator(Glib::wrap(gparent_), node) : end();
286 }
287
288 void PageList::clear()
289 {
290   erase(begin(), end());
291 }
292
293 PageList::iterator PageList::begin_() const
294 {
295   return iterator(Glib::wrap(gparent_), gparent_->children);
296 }
297
298 PageList::iterator PageList::end_() const
299 {
300   return iterator(Glib::wrap(gparent_), 0);
301 }
302
303 Element::Element(Widget* child, Widget* tab, Widget* menu)
304 :
305   child_  (child),
306   tab_    (tab),
307   menu_   (menu)
308 {}
309
310 Element::Element(Widget& child, Widget& tab, Widget& menu)
311 :
312   child_  (&child),
313   tab_    (&tab),
314   menu_   (&menu)
315 {}
316
317 Element::Element(Widget& child)
318 :
319   child_  (&child),
320   tab_    (0),
321   menu_   (0)
322 {}
323
324 TabElem::TabElem(Widget& child, Widget& tab)
325 :
326   Element(&child, &tab, 0)
327 {}
328
329 TabElem::TabElem(Widget& child, const Glib::ustring& label, bool mnemonic)
330 :
331   Element(&child, manage(new Label(label, mnemonic)), 0)
332 {}
333
334 MenuElem::MenuElem(Widget& child, Widget& menu)
335 :
336   Element(&child, 0, &menu)
337 {}
338
339 } /* namespace Notebook_Helpers */
340
341
342 Notebook::PageList::iterator Notebook::get_current()
343 {
344   return pages().find(get_current_page());
345 }
346
347 Notebook::PageList& Notebook::pages()
348 {
349   pages_proxy_ = PageList(gobj());
350   return pages_proxy_;
351 }
352
353 const Notebook::PageList& Notebook::pages() const
354 {
355   pages_proxy_ = PageList(const_cast<GtkNotebook*>(gobj()));
356   return pages_proxy_;
357 }
358
359 /*Widget* Notebook::get_current_page()
360 {
361   return get_nth_page(get_current_page_num());
362 }*/
363
364 int Notebook::prepend_page(Widget& child, const Glib::ustring& tab_label, bool use_mnemonic)
365 {
366   Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
367   return prepend_page(child, *pLabel);
368 }
369
370 int Notebook::prepend_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, bool use_mnemonic)
371 {
372   Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
373   Label* pLabelMenu = Gtk::manage( new Label(menu_label, use_mnemonic) );
374   return prepend_page(child, *pLabel, *pLabelMenu);
375 }
376
377 int Notebook::append_page(Widget& child, const Glib::ustring& tab_label, bool use_mnemonic)
378 {
379   Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
380   return append_page(child, *pLabel);
381 }
382
383 int Notebook::append_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, bool use_mnemonic)
384 {
385   Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
386   Label* pLabelMenu = Gtk::manage( new Label(menu_label, use_mnemonic) );
387   return append_page(child, *pLabel, *pLabelMenu);
388 }
389
390 int Notebook::insert_page(Widget& child, const Glib::ustring& tab_label, int position, bool use_mnemonic)
391 {
392   Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
393   return insert_page(child, *pLabel, position);
394 }
395
396 int Notebook::insert_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, int position, bool use_mnemonic)
397 {
398   Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
399   Label* pLabelMenu = Gtk::manage( new Label(menu_label, use_mnemonic) );
400   return insert_page(child, *pLabel, *pLabelMenu, position);
401 }
402
403 void Notebook::remove_page(Widget& child)
404 {
405   int pos = page_num(child);
406   if(pos != -1)
407     remove_page(pos);
408 }
409
410 void Notebook::query_tab_label_packing(Widget& child, bool& expand, bool& fill, PackType& pack_type)
411 {
412   gboolean gexpand = false;
413   gboolean gfill = false;
414   GtkPackType gpack_type = GTK_PACK_START;
415   gtk_notebook_query_tab_label_packing(gobj(), child.gobj(), &gexpand, &gfill, &gpack_type);
416   expand = gexpand;
417   fill = gfill;
418   pack_type = (PackType)gpack_type;
419 }
420
421 int Notebook::prepend_page(Widget& child)
422 {
423   return gtk_notebook_prepend_page(gobj(), child.gobj(), 0 /* see GTK+ docs */);
424 }
425
426 int Notebook::append_page(Widget& child)
427 {
428   return gtk_notebook_append_page(gobj(), child.gobj(), 0 /* see GTK+ docs */);
429 }
430
431 int Notebook::insert_page(Widget& child, int position)
432 {
433   return gtk_notebook_insert_page(gobj(), child.gobj(), 0 /* see GTK+ docs */, position);
434 }
435
436 } //namespace Gtk
437
438
439 namespace
440 {
441
442 void Notebook_signal_switch_page_callback(GtkNotebook* self, GtkNotebookPage* p0,guint p1,void* data)
443 {
444   using namespace Gtk;
445   typedef sigc::slot< void,GtkNotebookPage*,guint > SlotType;
446
447   // Do not try to call a signal on a disassociated wrapper.
448   if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
449   {
450     try
451     {
452       if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
453         (*static_cast<SlotType*>(slot))(p0, p1);
454     }
455     catch(...)
456     {
457       Glib::exception_handlers_invoke();
458     }
459   }
460 }
461
462 const Glib::SignalProxyInfo Notebook_signal_switch_page_info =
463 {
464   "switch_page",
465   (GCallback) &Notebook_signal_switch_page_callback,
466   (GCallback) &Notebook_signal_switch_page_callback
467 };
468
469 } // anonymous namespace
470
471 // static
472 GType Glib::Value<Gtk::NotebookTab>::value_type()
473 {
474   return gtk_notebook_tab_get_type();
475 }
476
477
478 namespace Glib
479 {
480
481 Gtk::Notebook* wrap(GtkNotebook* object, bool take_copy)
482 {
483   return dynamic_cast<Gtk::Notebook *> (Glib::wrap_auto ((GObject*)(object), take_copy));
484 }
485
486 } /* namespace Glib */
487
488 namespace Gtk
489 {
490
491
492 /* The *_Class implementation: */
493
494 const Glib::Class& Notebook_Class::init()
495 {
496   if(!gtype_) // create the GType if necessary
497   {
498     // Glib::Class has to know the class init function to clone custom types.
499     class_init_func_ = &Notebook_Class::class_init_function;
500
501     // This is actually just optimized away, apparently with no harm.
502     // Make sure that the parent type has been created.
503     //CppClassParent::CppObjectType::get_type();
504
505     // Create the wrapper type, with the same class/instance size as the base type.
506     register_derived_type(gtk_notebook_get_type());
507
508     // Add derived versions of interfaces, if the C type implements any interfaces:
509   }
510
511   return *this;
512 }
513
514 void Notebook_Class::class_init_function(void* g_class, void* class_data)
515 {
516   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
517   CppClassParent::class_init_function(klass, class_data);
518
519   klass->switch_page = &switch_page_callback;
520 }
521
522
523 void Notebook_Class::switch_page_callback(GtkNotebook* self, GtkNotebookPage* p0, guint p1)
524 {
525   CppObjectType *const obj = dynamic_cast<CppObjectType*>(
526       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
527
528   // Non-gtkmmproc-generated custom classes implicitly call the default
529   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
530   // generated classes can use this optimisation, which avoids the unnecessary
531   // parameter conversions if there is no possibility of the virtual function
532   // being overridden:
533   if(obj && obj->is_derived_())
534   {
535     try // Trap C++ exceptions which would normally be lost because this is a C callback.
536     {
537       // Call the virtual member method, which derived classes might override.
538       obj->on_switch_page(p0, p1);
539     }
540     catch(...)
541     {
542       Glib::exception_handlers_invoke();
543     }
544   }
545   else
546   {
547     BaseClassType *const base = static_cast<BaseClassType*>(
548         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
549     );
550
551     // Call the original underlying C function:
552     if(base && base->switch_page)
553       (*base->switch_page)(self, p0, p1);
554   }
555 }
556
557
558 Glib::ObjectBase* Notebook_Class::wrap_new(GObject* o)
559 {
560   return manage(new Notebook((GtkNotebook*)(o)));
561
562 }
563
564
565 /* The implementation: */
566
567 Notebook::Notebook(const Glib::ConstructParams& construct_params)
568 :
569   Gtk::Container(construct_params)
570 {
571   }
572
573 Notebook::Notebook(GtkNotebook* castitem)
574 :
575   Gtk::Container((GtkContainer*)(castitem))
576 {
577   }
578
579 Notebook::~Notebook()
580 {
581   destroy_();
582 }
583
584 Notebook::CppClassType Notebook::notebook_class_; // initialize static member
585
586 GType Notebook::get_type()
587 {
588   return notebook_class_.init().get_type();
589 }
590
591 GType Notebook::get_base_type()
592 {
593   return gtk_notebook_get_type();
594 }
595
596
597 Notebook::Notebook()
598 :
599   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
600   Gtk::Container(Glib::ConstructParams(notebook_class_.init()))
601 {
602   }
603
604 int Notebook::prepend_page(Widget& child, Widget& tab_label)
605 {
606   return gtk_notebook_prepend_page(gobj(), (child).gobj(), (tab_label).gobj());
607 }
608
609 int Notebook::prepend_page(Widget& child, Widget& tab_label, Widget& menu_label)
610 {
611   return gtk_notebook_prepend_page_menu(gobj(), (child).gobj(), (tab_label).gobj(), (menu_label).gobj());
612 }
613
614 int Notebook::append_page(Widget& child, Widget& tab_label)
615 {
616   return gtk_notebook_append_page(gobj(), (child).gobj(), (tab_label).gobj());
617 }
618
619 int Notebook::append_page(Widget& child, Widget& tab_label, Widget& menu_label)
620 {
621   return gtk_notebook_append_page_menu(gobj(), (child).gobj(), (tab_label).gobj(), (menu_label).gobj());
622 }
623
624 int Notebook::insert_page(Widget& child, Widget& tab_label, int position)
625 {
626   return gtk_notebook_insert_page(gobj(), (child).gobj(), (tab_label).gobj(), position);
627 }
628
629 int Notebook::insert_page(Widget& child, Widget& tab_label, Widget& menu_label, int position)
630 {
631   return gtk_notebook_insert_page_menu(gobj(), (child).gobj(), (tab_label).gobj(), (menu_label).gobj(), position);
632 }
633
634 void Notebook::remove_page(int page_num)
635 {
636   gtk_notebook_remove_page(gobj(), page_num);
637 }
638
639 int Notebook::get_current_page() const
640 {
641   return gtk_notebook_get_current_page(const_cast<GtkNotebook*>(gobj()));
642 }
643
644 Widget* Notebook::get_nth_page(int page_num)
645 {
646   return Glib::wrap(gtk_notebook_get_nth_page(gobj(), page_num));
647 }
648
649 const Widget* Notebook::get_nth_page(int page_num) const
650 {
651   return Glib::wrap(gtk_notebook_get_nth_page(const_cast<GtkNotebook*>(gobj()), page_num));
652 }
653
654 int Notebook::get_n_pages()
655 {
656   return gtk_notebook_get_n_pages(gobj());
657 }
658
659 int Notebook::page_num(const Widget& child)
660 {
661   return gtk_notebook_page_num(gobj(), const_cast<GtkWidget*>((child).gobj()));
662 }
663
664 void Notebook::set_current_page(int page_num)
665 {
666   gtk_notebook_set_current_page(gobj(), page_num);
667 }
668
669 void Notebook::next_page()
670 {
671   gtk_notebook_next_page(gobj());
672 }
673
674 void Notebook::prev_page()
675 {
676   gtk_notebook_prev_page(gobj());
677 }
678
679 void Notebook::set_show_border(bool show_border)
680 {
681   gtk_notebook_set_show_border(gobj(), static_cast<int>(show_border));
682 }
683
684 bool Notebook::get_show_border() const
685 {
686   return gtk_notebook_get_show_border(const_cast<GtkNotebook*>(gobj()));
687 }
688
689 void Notebook::set_show_tabs(bool show_tabs)
690 {
691   gtk_notebook_set_show_tabs(gobj(), static_cast<int>(show_tabs));
692 }
693
694 bool Notebook::get_show_tabs() const
695 {
696   return gtk_notebook_get_show_tabs(const_cast<GtkNotebook*>(gobj()));
697 }
698
699 void Notebook::set_tab_pos(PositionType pos)
700 {
701   gtk_notebook_set_tab_pos(gobj(), ((GtkPositionType)(pos)));
702 }
703
704 PositionType Notebook::get_tab_pos() const
705 {
706   return ((PositionType)(gtk_notebook_get_tab_pos(const_cast<GtkNotebook*>(gobj()))));
707 }
708
709 void Notebook::set_scrollable(bool scrollable)
710 {
711   gtk_notebook_set_scrollable(gobj(), static_cast<int>(scrollable));
712 }
713
714 bool Notebook::get_scrollable() const
715 {
716   return gtk_notebook_get_scrollable(const_cast<GtkNotebook*>(gobj()));
717 }
718
719 void Notebook::popup_enable()
720 {
721   gtk_notebook_popup_enable(gobj());
722 }
723
724 void Notebook::popup_disable()
725 {
726   gtk_notebook_popup_disable(gobj());
727 }
728
729 Widget* Notebook::get_tab_label(Widget& child)
730 {
731   return Glib::wrap(gtk_notebook_get_tab_label(gobj(), (child).gobj()));
732 }
733
734 const Widget* Notebook::get_tab_label(Widget& child) const
735 {
736   return Glib::wrap(gtk_notebook_get_tab_label(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
737 }
738
739 void Notebook::set_tab_label(Widget& child, Widget& tab_label)
740 {
741   gtk_notebook_set_tab_label(gobj(), (child).gobj(), (tab_label).gobj());
742 }
743
744 void Notebook::set_tab_label_text(Widget& child, const Glib::ustring& tab_text)
745 {
746   gtk_notebook_set_tab_label_text(gobj(), (child).gobj(), tab_text.c_str());
747 }
748
749 Glib::ustring Notebook::get_tab_label_text(Widget& child) const
750 {
751   return Glib::convert_const_gchar_ptr_to_ustring(gtk_notebook_get_tab_label_text(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
752 }
753
754 Widget* Notebook::get_menu_label(Widget& child)
755 {
756   return Glib::wrap(gtk_notebook_get_menu_label(gobj(), (child).gobj()));
757 }
758
759 const Widget* Notebook::get_menu_label(Widget& child) const
760 {
761   return Glib::wrap(gtk_notebook_get_menu_label(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
762 }
763
764 void Notebook::set_menu_label(Widget& child, Widget& menu_label)
765 {
766   gtk_notebook_set_menu_label(gobj(), (child).gobj(), (menu_label).gobj());
767 }
768
769 void Notebook::set_menu_label_text(Widget& child, const Glib::ustring& menu_text)
770 {
771   gtk_notebook_set_menu_label_text(gobj(), (child).gobj(), menu_text.c_str());
772 }
773
774 Glib::ustring Notebook::get_menu_label_text(Widget& child) const
775 {
776   return Glib::convert_const_gchar_ptr_to_ustring(gtk_notebook_get_menu_label_text(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
777 }
778
779 void Notebook::set_tab_label_packing(Widget& child, bool expand, bool fill, PackType pack_type)
780 {
781   gtk_notebook_set_tab_label_packing(gobj(), (child).gobj(), static_cast<int>(expand), static_cast<int>(fill), ((GtkPackType)(pack_type)));
782 }
783
784 void Notebook::reorder_child(Widget& child, int position)
785 {
786   gtk_notebook_reorder_child(gobj(), (child).gobj(), position);
787 }
788
789
790 Glib::SignalProxy2< void,GtkNotebookPage*,guint > Notebook::signal_switch_page()
791 {
792   return Glib::SignalProxy2< void,GtkNotebookPage*,guint >(this, &Notebook_signal_switch_page_info);
793 }
794
795
796 Glib::PropertyProxy<PositionType> Notebook::property_tab_pos() 
797 {
798   return Glib::PropertyProxy<PositionType>(this, "tab-pos");
799 }
800
801 Glib::PropertyProxy_ReadOnly<PositionType> Notebook::property_tab_pos() const
802 {
803   return Glib::PropertyProxy_ReadOnly<PositionType>(this, "tab-pos");
804 }
805
806 Glib::PropertyProxy<bool> Notebook::property_show_tabs() 
807 {
808   return Glib::PropertyProxy<bool>(this, "show-tabs");
809 }
810
811 Glib::PropertyProxy_ReadOnly<bool> Notebook::property_show_tabs() const
812 {
813   return Glib::PropertyProxy_ReadOnly<bool>(this, "show-tabs");
814 }
815
816 Glib::PropertyProxy<bool> Notebook::property_show_border() 
817 {
818   return Glib::PropertyProxy<bool>(this, "show-border");
819 }
820
821 Glib::PropertyProxy_ReadOnly<bool> Notebook::property_show_border() const
822 {
823   return Glib::PropertyProxy_ReadOnly<bool>(this, "show-border");
824 }
825
826 Glib::PropertyProxy<bool> Notebook::property_scrollable() 
827 {
828   return Glib::PropertyProxy<bool>(this, "scrollable");
829 }
830
831 Glib::PropertyProxy_ReadOnly<bool> Notebook::property_scrollable() const
832 {
833   return Glib::PropertyProxy_ReadOnly<bool>(this, "scrollable");
834 }
835
836 Glib::PropertyProxy_WriteOnly<guint> Notebook::property_tab_border() 
837 {
838   return Glib::PropertyProxy_WriteOnly<guint>(this, "tab-border");
839 }
840
841 Glib::PropertyProxy_ReadOnly<guint> Notebook::property_tab_border() const
842 {
843   return Glib::PropertyProxy_ReadOnly<guint>(this, "tab-border");
844 }
845
846 Glib::PropertyProxy<guint> Notebook::property_tab_hborder() 
847 {
848   return Glib::PropertyProxy<guint>(this, "tab-hborder");
849 }
850
851 Glib::PropertyProxy_ReadOnly<guint> Notebook::property_tab_hborder() const
852 {
853   return Glib::PropertyProxy_ReadOnly<guint>(this, "tab-hborder");
854 }
855
856 Glib::PropertyProxy<guint> Notebook::property_tab_vborder() 
857 {
858   return Glib::PropertyProxy<guint>(this, "tab-vborder");
859 }
860
861 Glib::PropertyProxy_ReadOnly<guint> Notebook::property_tab_vborder() const
862 {
863   return Glib::PropertyProxy_ReadOnly<guint>(this, "tab-vborder");
864 }
865
866 Glib::PropertyProxy<int> Notebook::property_page() 
867 {
868   return Glib::PropertyProxy<int>(this, "page");
869 }
870
871 Glib::PropertyProxy_ReadOnly<int> Notebook::property_page() const
872 {
873   return Glib::PropertyProxy_ReadOnly<int>(this, "page");
874 }
875
876 Glib::PropertyProxy<bool> Notebook::property_enable_popup() 
877 {
878   return Glib::PropertyProxy<bool>(this, "enable-popup");
879 }
880
881 Glib::PropertyProxy_ReadOnly<bool> Notebook::property_enable_popup() const
882 {
883   return Glib::PropertyProxy_ReadOnly<bool>(this, "enable-popup");
884 }
885
886 Glib::PropertyProxy<bool> Notebook::property_homogeneous() 
887 {
888   return Glib::PropertyProxy<bool>(this, "homogeneous");
889 }
890
891 Glib::PropertyProxy_ReadOnly<bool> Notebook::property_homogeneous() const
892 {
893   return Glib::PropertyProxy_ReadOnly<bool>(this, "homogeneous");
894 }
895
896
897 void Gtk::Notebook::on_switch_page(GtkNotebookPage* page, guint page_num)
898 {
899   BaseClassType *const base = static_cast<BaseClassType*>(
900       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
901   );
902
903   if(base && base->switch_page)
904     (*base->switch_page)(gobj(),page,page_num);
905 }
906
907
908 } // namespace Gtk
909
910