shithub: libnate

ref: aab184987c79fc7a8e5467200f9ac448700b797f
dir: /n_box.h/

View raw version
extern char* NBox_Type;

#define NTYPE NBox
#define NACCS NBoxAccessors

typedef struct NBoxAccessors NBoxAccessors;
struct NBoxAccessors {
	Nelemaccessors;
	
	DECL_SLOTFUNC(Slot);
	DECL_ACCESSOR_TwoParams(Border, int, Image*);
	DECL_ACCESSOR_OneParam(AutoSize, int);
	DECL_ACCESSOR_OneParam(Size, Point);
	DECL_ACCESSOR_TwoParams(OnClick, OnclickHandler, void*);
	DECL_ACCESSOR_OneParam(Padding, Nmargin);
};

typedef struct NBox NBox;
struct NBox {
	Nelem;
	
	// private members
	Point size;
	int autosize;
	int borderwidth;
	Nmargin padding;
	Image* bordercolor;
	int (*hitfunc)(Mouse, Nelem*, void*);
	void* hitaux;
	int ishit;
};

#undef NTYPE
#undef NACCS

NBoxAccessors* New_Box(char*);