54 lines
714 B
C
54 lines
714 B
C
// 26 may 2015
|
|
#include "../ui.h"
|
|
#include "uipriv.h"
|
|
|
|
uintptr_t uiControlHandle(uiControl *c)
|
|
{
|
|
return (*(c->Handle))(c);
|
|
}
|
|
|
|
int uiControlToplevel(uiControl *c)
|
|
{
|
|
return (*(c->Toplevel))(c);
|
|
}
|
|
|
|
int uiControlVisible(uiControl *c)
|
|
{
|
|
return (*(c->Visible))(c);
|
|
}
|
|
|
|
void uiControlShow(uiControl *c)
|
|
{
|
|
(*(c->Show))(c);
|
|
}
|
|
|
|
void uiControlHide(uiControl *c)
|
|
{
|
|
(*(c->Hide))(c);
|
|
}
|
|
|
|
int uiControlEnabled(uiControl *c)
|
|
{
|
|
return (*(c->Enabled))(c);
|
|
}
|
|
|
|
void uiControlEnable(uiControl *c)
|
|
{
|
|
(*(c->Enable))(c);
|
|
}
|
|
|
|
void uiControlDisable(uiControl *c)
|
|
{
|
|
(*(c->Disable))(c);
|
|
}
|
|
|
|
int uiControlEnabledToUser(uiControl *c)
|
|
{
|
|
while (c != NULL) {
|
|
if (!uiControlEnabled(c))
|
|
return 0;
|
|
c = uiControlParent(c);
|
|
}
|
|
return 1;
|
|
}
|