2011-03-22 12:56:49 +00:00
|
|
|
Geometry pProgressBar::minimumGeometry() {
|
2011-03-23 08:04:37 +00:00
|
|
|
return { 0, 0, 0, 25 };
|
2011-03-22 12:56:49 +00:00
|
|
|
}
|
|
|
|
|
2011-02-24 09:27:21 +00:00
|
|
|
void pProgressBar::setPosition(unsigned position) {
|
|
|
|
position = position <= 100 ? position : 0;
|
|
|
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(gtkWidget), (double)position / 100.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pProgressBar::constructor() {
|
|
|
|
gtkWidget = gtk_progress_bar_new();
|
2011-09-05 03:48:23 +00:00
|
|
|
|
|
|
|
setPosition(progressBar.state.position);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pProgressBar::destructor() {
|
|
|
|
gtk_widget_destroy(gtkWidget);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pProgressBar::orphan() {
|
|
|
|
destructor();
|
|
|
|
constructor();
|
2011-02-24 09:27:21 +00:00
|
|
|
}
|