It is possible to modify thee LBG_destroy_window to instead hide the window and all it's children. Should I try and post the result?

I also would like to suggest flag e.g. WF_LOCK_INSIDE_PARENT so I can't move the child out of the parent.

Quote:
EDIT* I said lbgui_elements megatype struct (wow confusing). How about just thinking of a lbg_composite struct.


Quote:
OP* Lukas maybe this is a bad idea but could you have a lbgui_elements mega-type struct so that all elements create with a NULL parent get assign and then any element that is assign to a parent also stores it pointer in to lbugi_elements megatype struct.

Code:
typedef struct
{
	LBG_WINDOW* owner_obj;
	LBG_BUTTON* my_buts[100];
	LBG_WINDOW* my_wins[100];
	ect.
	ect.
}LBG_ELEMENTS;

#define LBG_MAX_ELEMENTS 500;
LBG_ELEMENTS* LBG_screen_elements[LBG_MAX_ELEMENTS];

void LBG_create_x(var parent,x,x,x)
{
	var 1;
	if(!parent)
	{
		for(i=0;i<LBG_MAX_ELEMENTS;i++)
		{
			if(i=LBG_MAX_ELEMENTS)
			{
				printf("LBG_MAX_ELEMENTS too small or full");
				break
			}
			if(!LBG_screen_elements[i])
			{
				LBG_screen_elements[i]->owner = me;
				break;
			}
		}
	}
	else
	{
		var j;
		// find the parents LBG_screen_elements struct
		for(i=0;i<LBG_MAX_ELEMENTS;i++)
		{
			if(LBG_screen_elements[i]->owner == parent)
			{
		        /* find an empity struct pointer in the right 
type based on create function 
type e.i. LBG_create_button pass 
LBG_screen_elements[i]->my_buts[j]*/
				for(j=0;j<LBG_MAX_ELEMENTS;j++)
				{
					if(!LBG_screen_elements[i]->my_buts[j])
					LBG_screen_elements[i]->my_buts[j] = my;
					break;
				}
				// hand over point.
			}
		}
		
	}
}



Then I could write a function the goes through the elements struct and set/reset(s) and panel->flags parameters.


Well I'm just a beginner and you may very well have something like this or else how could the destor() functions work.

Last edited by Malice; 05/28/13 01:13.