libui/haiku/progressbar.cpp

34 lines
616 B
C++
Raw Normal View History

// 18 november 2015
#include "uipriv_haiku.hpp"
struct uiProgressBar {
uiHaikuControl c;
2015-11-22 10:00:14 -06:00
BStatusBar *pbar;
};
uiHaikuDefineControl(
uiProgressBar, // type name
uiProgressBarType, // type function
2015-11-22 10:00:14 -06:00
pbar // handle
)
void uiProgressBarSetValue(uiProgressBar *p, int n)
{
2015-11-22 10:00:14 -06:00
// not on api.haiku-os.org
p->pbar->SetTo(n);
}
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);
uiHaikuFinishNewControl(p, uiProgressBar);
return p;
}