mirror of https://github.com/bsnes-emu/bsnes.git
24 lines
515 B
C++
Executable File
24 lines
515 B
C++
Executable File
Geometry pProgressBar::minimumGeometry() {
|
|
return { 0, 0, 0, 25 };
|
|
}
|
|
|
|
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();
|
|
|
|
setPosition(progressBar.state.position);
|
|
}
|
|
|
|
void pProgressBar::destructor() {
|
|
gtk_widget_destroy(gtkWidget);
|
|
}
|
|
|
|
void pProgressBar::orphan() {
|
|
destructor();
|
|
constructor();
|
|
}
|