libui/zOLD_common/control.c

54 lines
714 B
C
Raw Normal View History

2015-05-29 13:56:11 -05:00
// 26 may 2015
#include "../ui.h"
#include "uipriv.h"
2015-08-27 11:05:11 -05:00
uintptr_t uiControlHandle(uiControl *c)
{
return (*(c->Handle))(c);
}
int uiControlToplevel(uiControl *c)
2015-09-01 15:44:09 -05:00
{
return (*(c->Toplevel))(c);
2015-09-01 15:44:09 -05:00
}
int uiControlVisible(uiControl *c)
{
return (*(c->Visible))(c);
}
2015-08-27 11:05:11 -05:00
void uiControlShow(uiControl *c)
{
(*(c->Show))(c);
}
2015-08-27 11:05:11 -05:00
void uiControlHide(uiControl *c)
{
(*(c->Hide))(c);
}
int uiControlEnabled(uiControl *c)
{
return (*(c->Enabled))(c);
}
2015-08-27 11:05:11 -05:00
void uiControlEnable(uiControl *c)
{
(*(c->Enable))(c);
}
2015-08-27 11:05:11 -05:00
void uiControlDisable(uiControl *c)
{
(*(c->Disable))(c);
}
int uiControlEnabledToUser(uiControl *c)
{
while (c != NULL) {
if (!uiControlEnabled(c))
return 0;
c = uiControlParent(c);
}
return 1;
}