CEBL
2.1
Main Page
Namespaces
Data Structures
Files
File List
Globals
gui
CEBLGtkWidget.cpp
Go to the documentation of this file.
1
/* CEBLGtkWidget.hpp
2
* \author Jeshua Bratman
3
*
4
* Simple C++ gtk widget class.
5
*
6
*/
7
8
#include "
CEBLGtkWidget.hpp
"
9
10
//-----------------------------------------------------------
11
// Constructors / Destructors
12
13
CEBLGtkWidget::CEBLGtkWidget
()
14
{
15
cebl_gtk_widget_container
= gtk_vbox_new(
false
, 0);
16
g_object_ref(
cebl_gtk_widget_container
);
17
}
18
CEBLGtkWidget::~CEBLGtkWidget
()
19
{
20
g_object_unref(
cebl_gtk_widget_container
);
21
}
22
23
//-----------------------------------------------------------
24
// Widget Controls
25
26
GtkWidget*
CEBLGtkWidget::getContainer
()
27
{
28
return
cebl_gtk_widget_container
;
29
}
30
CEBLGtkWidget::operator GtkWidget*()
31
{
32
return
cebl_gtk_widget_container;
33
}
34
// remove a widget from the container
35
void
CEBLGtkWidget::removeWidget
(GtkWidget* widget)
36
{
37
gtk_container_remove(GTK_CONTAINER(this->
cebl_gtk_widget_container
),widget);
38
}
39
40
// hide the widget
41
void
CEBLGtkWidget::hide
()
42
{
43
gtk_widget_hide(this->
cebl_gtk_widget_container
);
44
}
45
46
47
// show the widget
48
void
CEBLGtkWidget::show
()
49
{
50
gtk_widget_show_all(this->
cebl_gtk_widget_container
);
51
}
52
Generated by
1.8.1.1