#import "PhButton.h" @implementation PhButton @synthesize DIMx, DIMy, POSx, POSy, tekst; - (void) createButton { PtArg_t args[4]; PhPoint_t pntPOS, pntDIM; short nArgs = 0; pntDIM.x = DIMx; pntDIM.y = DIMy; PtSetArg(&args[0], Pt_ARG_DIM, &pntDIM, 0L); nArgs++; pntPOS.x = POSx; pntPOS.y = POSy; PtSetArg(&args[1], Pt_ARG_POS, &pntPOS, 0L); nArgs++; PtSetArg(&args[2], Pt_ARG_TEXT_STRING, tekst, 0); nArgs++; widget = PtCreateWidget(PtButton, myparent, nArgs, args); } - (void) setWidth: (int) w andHeight: (int) h { DIMx = w; DIMy = h; } - (void) AddCallback: (Callback) callback { PtAddCallback( widget, Pt_CB_ACTIVATE, callback, NULL ); } @end