shithub: libnate

ref: aab184987c79fc7a8e5467200f9ac448700b797f
dir: /n_button.h/

View raw version
extern char* NButton_Type;

#define NTYPE NButton
#define NACCS NButtonAccessors

typedef struct NACCS NACCS;
struct NACCS {
	Nelemaccessors;
	DECL_SLOTFUNC(Slot);
	DECL_ACCESSOR_TwoParams(Border, int, Image*);
	DECL_ACCESSOR_OneParam(AutoSize, int);
	DECL_ACCESSOR_TwoParams(OnClick, OnclickHandler, void*);
	
	DECL_ACCESSOR_OneParam(Label, char*);
	DECL_ACCESSOR_OneParam(LabelFunc, char* (*f)(void));
	DECL_ACCESSOR_OneParam(Font, Font*);
	DECL_ACCESSOR_OneParam(Color, Image*);
};

typedef struct NButton NButton;
struct NButton {
	Nelem;
	
	// private members
	NBox *box;
	NLabel *label;
};

NACCS* New_Button(char*);
#undef NTYPE
#undef NACCS