shithub: libnate

ref: a0b15f88e6274b4892061a7dfe790d85eb211078
dir: /n_box.h/

View raw version
extern char* NBox_Type;

typedef struct NBox NBox;
struct NBox {
	Nelem;
	DECL_ACCESSOR_OneParam(NBox, Slot, Nelem*);
	DECL_ACCESSOR_TwoParams(NBox, Border, int, Image*);
	DECL_ACCESSOR_OneParam(NBox, SizeToContent, int);
	DECL_ACCESSOR_OneParam(NBox, Size, Point);
	DECL_ACCESSOR_TwoParams(NBox, OnClick, int (*f)(Mouse, Nelem*, void*), void*);
	
	// private members
	Nlist child;
	Point size;
	int sizetocontent;
	int borderwidth;
	Image* bordercolor;
	int (*hitfunc)(Mouse, Nelem*, void*);
	void* hitaux;
};

NBox* New_Box(void);