static void do_genwin_panel_posn(QSP_ARG_DECL const char *s, int x, int y) { Panel_Obj *po; po=get_panel_obj(s); if( po != NULL ) { SET_PO_X(po, x); SET_PO_Y(po, y); posn_panel(po); } return; }
static void navp_genwin_posn(QSP_ARG_DECL const char *s, int x, int y) { Nav_Panel *np_p; np_p=GET_NAV_PANEL(s); if( np_p != NO_NAV_PANEL ) { //SET_NAVP_X(np_p, x); //SET_NAVP_Y(np_p, y); SET_PO_X(NAVP_PANEL(np_p), x); SET_PO_Y(NAVP_PANEL(np_p), y); posn_panel(NAVP_PANEL(np_p)); } return; }
Panel_Obj *new_panel(QSP_ARG_DECL const char *name,int dx,int dy) { Panel_Obj *po; po = new_panel_obj(name); if( po == NULL ){ printf("ERROR creating new panel object!?\n"); return(po); } //fprintf(stderr,"panel obj created...\n"); #ifndef BUILD_FOR_OBJC SET_PO_WIDTH(po, dx); SET_PO_HEIGHT(po, dy); // This represents where we put the panel on the screen... // for X11, place near the upper left... SET_PO_X(po, 100); SET_PO_Y(po, 100); SET_PO_FLAGS(po, 0); // why not initialize the flags for IOS too? SET_GW_TYPE( PO_GW(po), GW_PANEL); #endif /* ! BUILD_FOR_OBJC */ SET_PO_CHILDREN(po, new_ios_list() ); // In IOS, we don't need to have a distinction // between viewers and panels, we can add controls // to viewers and images to panels. So we need // to have a stripped down version of new_panel // to set up an existing viewer for getting widgets. //sprintf(ERROR_STRING,"new_panel %s calling make_panel",PO_NAME(po)); //advise(ERROR_STRING); make_panel(QSP_ARG po,dx,dy); /* Xlib calls */ #ifdef BUILD_FOR_OBJC /* these fields are part of the associated Gen_Win, * and must be set after the call to make_panel * That means we can't use the flags field to * pass the hide_back_button flag... */ // for IOS, typically we use the whole screen // BUG - for nav_panels, we need to push down to clear // the nav bar! SET_PO_X(po, 0); SET_PO_Y(po, 0); SET_PO_FLAGS(po, 0); #endif /* BUILD_FOR_OBJC */ make_scrnobj_ctx_for_panel(QSP_ARG po); // This is where we place the first object SET_PO_CURR_X(po,OBJECT_GAP); SET_PO_CURR_Y(po,OBJECT_GAP); curr_panel=po; //fprintf(stderr,"new_panel DONE\n"); return(po); }