2015-11-19 07:47:53 -06:00
|
|
|
// 18 november 2015
|
|
|
|
#include "uipriv_haiku.hpp"
|
|
|
|
|
|
|
|
struct uiProgressBar {
|
|
|
|
uiHaikuControl c;
|
2015-11-22 10:00:14 -06:00
|
|
|
BStatusBar *pbar;
|
2015-11-19 07:47:53 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
uiHaikuDefineControl(
|
|
|
|
uiProgressBar, // type name
|
|
|
|
uiProgressBarType, // type function
|
2015-11-22 10:00:14 -06:00
|
|
|
pbar // handle
|
2015-11-19 07:47:53 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
void uiProgressBarSetValue(uiProgressBar *p, int n)
|
|
|
|
{
|
2015-11-22 10:00:14 -06:00
|
|
|
// not on api.haiku-os.org
|
|
|
|
p->pbar->SetTo(n);
|
2015-11-19 07:47:53 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
uiProgressBar *uiNewProgressBar(void)
|
|
|
|
{
|
|
|
|
uiProgressBar *p;
|
|
|
|
|
|
|
|
p = (uiProgressBar *) uiNewControl(uiProgressBarType());
|
|
|
|
|
2015-11-22 10:00:14 -06:00
|
|
|
// layout constructor; not on api.haiku-os.org
|
|
|
|
p->pbar = new BStatusBar(NULL, NULL, NULL);
|
2015-11-19 07:47:53 -06:00
|
|
|
|
|
|
|
uiHaikuFinishNewControl(p, uiProgressBar);
|
|
|
|
|
|
|
|
return p;
|
|
|
|
}
|