You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
helper Visual
|
|
{
|
|
public class VisualCI : Native.ContructInfo
|
|
{
|
|
public int pgadParent;
|
|
};
|
|
|
|
public Visual(Visual vParent)
|
|
{
|
|
VisualCI ci = new VisualCI();
|
|
ci.pgadParent = vParent.pgad;
|
|
int pgad = Native.BuildGadget(idVisual, ci);
|
|
if (pgad != 0)
|
|
{
|
|
this.pgad = pgad;
|
|
}
|
|
else
|
|
{
|
|
uint error = Native.GetLastError();
|
|
throw new System.SystemException("Unable to create new Visual");
|
|
}
|
|
}
|
|
|
|
public Visual(HGadget gadParent)
|
|
{
|
|
VisualCI ci = new VisualCI();
|
|
ci.pgadParent = Native.CastGadgetDirect(gadParent.hgad);
|
|
int pgad = Native.BuildGadget(Native.FindGadgetClass("Visual", 1), ci);
|
|
if (pgad != 0)
|
|
{
|
|
this.pgad = pgad;
|
|
}
|
|
else
|
|
{
|
|
uint error = Native.GetLastError();
|
|
throw new System.SystemException("Unable to create new Visual");
|
|
}
|
|
}
|
|
};
|