当前位置: 首页>>代码示例>>C++>>正文


C++ xv_set函数代码示例

本文整理汇总了C++中xv_set函数的典型用法代码示例。如果您正苦于以下问题:C++ xv_set函数的具体用法?C++ xv_set怎么用?C++ xv_set使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xv_set函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: func_update

static void
func_update()
{
    char *label;
    int value;

    value = (int)xv_get(vsi.func_choice, PANEL_VALUE);
    label = (char *)xv_get(vsi.func_choice, PANEL_CHOICE_STRING, value);
    delete vsi.default_vsfunc;
    if (strcasecmp(label,"linear") == 0){
	vsi.default_vsfunc = linear_scale();
	vsi.myknots = LIN_KNOTS;
	xv_set(vsi.popup, FRAME_LEFT_FOOTER,
	       "LEFT moves/creates, MIDDLE deletes points", NULL);
    }else if (strcasecmp(label,"spline") == 0){
	vsi.default_vsfunc = spline_scale();
	vsi.myknots = SPL_KNOTS;
	xv_set(vsi.popup, FRAME_LEFT_FOOTER,
	       "LEFT moves/creates, MIDDLE deletes points", NULL);
    }else if (strcasecmp(label,"log") == 0){
	vsi.default_vsfunc = log_scale();
    }else if (strcasecmp(label,"power") == 0){
	vsi.default_vsfunc = power_scale();
    }else if (strcasecmp(label,"curve") == 0){
	vsi.default_vsfunc = curve_scale();
	vsi.myknots = CRV_KNOTS;
	xv_set(vsi.popup, FRAME_LEFT_FOOTER, "LEFT moves points", NULL);
    }
}
开发者ID:timburrow,项目名称:ovj3,代码行数:29,代码来源:vscale.c

示例2: msgmacro_win_create

/************************************************************************
*									*
*  Create macro display window. It actually creates it when the first
*  message is displayed.
*									*/
void
msgmacro_win_create(Frame owner, int x, int y, int wd, int ht)
{
   if (wmacromsg)
   {
      STDERR("msgmacro_win_create:Window has been created");
      return;
   }

   if ((wmacromsg = (Wmsgprt *)malloc(sizeof(Wmsgprt))) == NULL)
   {
      PERROR("msgmacro_win_create:Cannot malloc");
      return;
   }
   wmacromsg->owner = owner;
   wmacromsg->popup = NULL;
   wmacromsg->textsw = NULL;
   wmacromsg->x = x;
   wmacromsg->y = y;
   wmacromsg->wd = wd;
   wmacromsg->ht = ht;

   /* Since there is a BUG in Xview, we cannot wait to create a window. */
   /* Until the bug is fixed, we create a window at start-up time (NOW). */
   msgprt_win_create(wmacromsg);
   xv_set(wmacromsg->popup,
	  FRAME_LABEL, "Macro Edit",
	  NULL);
   xv_set(wmacromsg->textsw,
	  TEXTSW_BROWSING, FALSE,
	  WIN_KBD_FOCUS, TRUE,
	  NULL);
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:38,代码来源:msgprt.c

示例3: msginfo_print

/************************************************************************
*									*
*  Show Info message.							*
*  Note that it DOES NOT prefix the message with a newline.		*
*									*/
void
msginfo_print(char *format, ...)
{
   char msgbuf[128];	/* message buffer */
   va_list vargs;	/* variable argument pointer */

   /* Create window message if it is not created */
   if (winfomsg->popup == NULL)
   {
      msgprt_win_create(winfomsg);
      xv_set(winfomsg->popup, FRAME_LABEL, "Info Messages", NULL);
   }

   if ( (xv_get(winfomsg->popup, XV_SHOW) == FALSE) || (format == NULL) ){
      xv_set(winfomsg->popup, XV_SHOW, TRUE, NULL);
      xv_set(winfomsg->popup, FRAME_CMD_PUSHPIN_IN, TRUE, NULL);
   }

   if (format == NULL)
      return;
   
   va_start(vargs, format);
   (void)vsprintf(msgbuf, format, vargs);
   va_end(vargs);

   int point = (int)xv_get(winfomsg->textsw, TEXTSW_INSERTION_POINT);
   show_msg_text(winfomsg->textsw, msgbuf);
   if (point == 0){
       xv_set(winfomsg->textsw, TEXTSW_FIRST, point, NULL);
   }
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:36,代码来源:msgprt.c

示例4: xv_set

/************************************************************************
*                                                                       *
*  Turn on/off constant value item.					*
*  (STATIC)								*
*									*/
void
Win_arith::apply_proc(Panel_item, int val)
{
   if (val == 0){
       xv_set(winarith->constant_item, PANEL_SHOW_ITEM, FALSE, NULL);
   }else{
       xv_set(winarith->constant_item, PANEL_SHOW_ITEM, TRUE, NULL);
   }
}
开发者ID:timburrow,项目名称:ovj3,代码行数:14,代码来源:win_arithmetic.c

示例5: ResizeZTScale

void ResizeZTScale()
{
    xv_set(ztscl_top_canvas, XV_X, 0, XV_Y, 0,
	   XV_WIDTH, ZCvsWidth+ZTrkLabWidth,
	   NULL);
    xv_set(ztscl_bot_canvas, XV_X, 0, XV_Y, ZCvsHeight+ZTSHEIGHT-1,
	   XV_WIDTH, ZCvsWidth+ZTrkLabWidth,
	   NULL);
    return;
}
开发者ID:BIDS-collaborative,项目名称:save-seistool,代码行数:10,代码来源:zscale.c

示例6: set_vscale

void
set_vscale(float datamax, float datamin)
{
    char buf[20];

    sprintf(buf,"%-.4g", datamin);
    xv_set(vsi.min_data, PANEL_VALUE, buf, NULL);
    sprintf(buf,"%-.4g", datamax);
    xv_set(vsi.max_data, PANEL_VALUE, buf, NULL);
    settings_update();
    func_update();
}
开发者ID:timburrow,项目名称:ovj3,代码行数:12,代码来源:vscale.c

示例7: ZTimeScale_disp_undisp

void ZTimeScale_disp_undisp()
{
    if (ZoomWindowMapped) {
	if(Mode_ZDisplayTScale) {
	    xv_set(ztscl_top_canvas, XV_SHOW, TRUE, NULL);
	    xv_set(ztscl_bot_canvas, XV_SHOW, TRUE, NULL);
	}else {
	    xv_set(ztscl_top_canvas, XV_SHOW, FALSE, NULL);
	    xv_set(ztscl_bot_canvas, XV_SHOW, FALSE, NULL);
	}
    }
    ResizeZoomWindow();
}
开发者ID:BIDS-collaborative,项目名称:save-seistool,代码行数:13,代码来源:zscale.c

示例8: tt_togglePicking

/* this is an unfortunate consequence of having 2 event procs handling the
 * same canvas. Since we mapped the left mouse button twice, the user has
 * to decide which one to use:
 */
void tt_togglePicking()
{
    if(tt_button_picking) {
	/* switch back to trvltime event proc */
	SwitchTTZevtProc();
	tt_button_picking= 0;
	xv_set(pick_but, PANEL_LABEL_STRING, "To Pick ", NULL);
    }else {
	/* switch back to original event proc */
	RestoreZevtProc();
	tt_button_picking= 1;
	xv_set(pick_but, PANEL_LABEL_STRING, "TrvlTme", NULL);
    }
}
开发者ID:BIDS-collaborative,项目名称:save-seistool,代码行数:18,代码来源:tt_panel.c

示例9: show_dir_path

/************************************************************************
*									*
*  Print out directory name on file-browser.  It limits the length of 	*
*  the string to be printed out.					*
*									*/
static void
show_dir_path(char *dirpath)
{
    /* Append ... at the first three charcaters and cut-off the characters */
    /* which can not be showed up on the control-panel.			 */
    if (strlen(dirpath) > (fhdl->filename_wd / 8)){
	char dirbuf[128];

	(void) sprintf(dirbuf, "...%s",
		       dirpath + strlen(dirpath) - (fhdl->filename_wd / 8));
	xv_set(fhdl->dirmsg, PANEL_LABEL_STRING, dirbuf, NULL);
    }else{
	xv_set(fhdl->dirmsg, PANEL_LABEL_STRING, dirpath, NULL);
    }
}
开发者ID:DanIverson,项目名称:OpenVnmrJ,代码行数:20,代码来源:filelist.c

示例10: canvas_resize_proc

static void
canvas_resize_proc(Canvas, int w, int h)
{
    /*fprintf(stderr,"canvas_resize_proc(%d, %d)\n", w, h);/*CMP*/
    vsi.canvas_width = w;
    vsi.canvas_height = h;
    xv_set(vsi.range_label,
	   XV_X, (vsi.canvas_width - (int)xv_get(vsi.range_label, XV_WIDTH))/2,
	   NULL);
    xv_set(vsi.max_data,
	   XV_X, vsi.canvas_width - (int)xv_get(vsi.max_data, XV_WIDTH),
	   NULL);
    build_background();
    build_curve_data(vsi.default_vsfunc);
}
开发者ID:timburrow,项目名称:ovj3,代码行数:15,代码来源:vscale.c

示例11: event_action

/************************************************************************
*                                                                       *
*  Expression text callback routine.
*  (STATIC)								*
*									*/
void
Win_math::text_proc(Panel_item item, Event *event)
{
    short action = event_action(event);
    short chr = xview_to_ascii(action);
    fprintf(stderr,"char=0x%x\n", chr);
    /*fprintf(stderr,"posn=%d\n",
	    (int)xv_get(item, PANEL_TEXT_CURSOR));*/
    xv_set(item, PANEL_TEXT_SELECT_LINE, NULL);

#ifndef LINUX
    textsw_set_selection(wm->expression_box, 1, 4, 1);
#endif
    xv_set(wm->expression_box, TEXTSW_INSERTION_POINT, 4, NULL);
}
开发者ID:timburrow,项目名称:ovj3,代码行数:20,代码来源:win_math.c

示例12: CreateTracks

static void CreateTracks(Frame frame)
{
    int height, i, y;
    int tsHeight= 30;
    int panel_width = top_panel_width;

    if((FrmHeight-panel_width-tsHeight)/NumTracks < 30)
	tsHeight= 15;
    if (Mode_align) {	/* reserve space for time scale */
	height= (float)(FrmHeight-panel_width-tsHeight)/NumTracks;
	tsHeight= FrmHeight-panel_width-height*NumTracks;
    }else {
	height= (float)(FrmHeight-panel_width)/NumTracks;
    }
    y=panel_width;
    for(i=0; i < NumTracks; i++) {
	CreateTrk(frame, i, height, FrmWidth, y);
	y+=height;
    }
    /* create one for time scale if necessary */
    CreateTimeScale(frame, y, tsHeight);

    if(!Mode_align) {
	extern Canvas tscl_canvas;      
	/*      xv_set(frame,XV_SHOW,FALSE,NULL); */
	/*      printf("remove time bar\n"); */
	xv_set(tscl_canvas,XV_SHOW,FALSE,NULL);
	/*CreateTimeScale(frame, y, tsHeight);*/
    }
}
开发者ID:BIDS-collaborative,项目名称:save-seistool,代码行数:30,代码来源:track.c

示例13: SoundingChart_GUI_window1_window1_create

/*
 * Create object `window1' in the specified instance.
 */
Xv_opaque
SoundingChart_GUI_window1_window1_create(SoundingChart_GUI_window1_objects *ip, Xv_opaque owner)
{
	extern Notify_value	window_event_func(Xv_window, Event *, Notify_arg, Notify_event_type);
	Xv_opaque	obj;
	
	obj = xv_create(owner, FRAME,
		XV_KEY_DATA, INSTANCE, ip,
		XV_WIDTH, 661,
		XV_HEIGHT, 597,
		XV_LABEL, "Base Window",
		FRAME_SHOW_FOOTER, FALSE,
		FRAME_SHOW_RESIZE_CORNER, TRUE,
		NULL);
	xv_set(obj, WIN_CONSUME_EVENTS,
		WIN_MOUSE_BUTTONS,
		LOC_MOVE,
		LOC_DRAG,
		LOC_WINENTER,
		LOC_WINEXIT,
		WIN_ASCII_EVENTS,
		WIN_LEFT_KEYS,
		WIN_RIGHT_KEYS,
		WIN_TOP_KEYS,
		NULL, NULL);
	notify_interpose_event_func(obj,
		(Notify_func) window_event_func, NOTIFY_SAFE);
	return obj;
}
开发者ID:jbuonagurio,项目名称:lrose-core,代码行数:32,代码来源:SoundingChart_GUI_ui.c

示例14: ipgwin_register_user_func

/************************************************************************
 *                                                                       *
 *  Stop Movie Playback procedure                   			*
 *									*/
void
Win_movie::stop_playback(void)
{
   if (play_state == PLAYING){       // do nothing if NOT currently playing
       ipgwin_register_user_func(MOVIE_TICK, 1, 0, (void(*)(int)) NULL);
       play_state = NOT_PLAYING;
       if (number_of_frames > 1){
	   xv_set(frame_slider,
		  PANEL_VALUE, frame_number + 1,
		  XV_SHOW, TRUE,
		  NULL);
       }
       framelist_select (frame_number) ;
       xv_set(movie_speedometer, PANEL_VALUE, 0, NULL);
   }
}
开发者ID:timburrow,项目名称:ovj3,代码行数:20,代码来源:win_movie.c

示例15: eventman_em_bw_em_tp_create

/*
 * Create object `em_tp' in the specified instance.
 */
Xv_opaque
eventman_em_bw_em_tp_create(eventman_em_bw_objects *ip, Xv_opaque owner)
{
	extern Notify_value	comment_text_proc(Xv_window, Event *, Notify_arg, Notify_event_type);
	Xv_opaque	obj;
	
	obj = xv_create(owner, TEXTSW,
		XV_KEY_DATA, INSTANCE, ip,
		XV_X, 0,
		XV_Y, (int)xv_get(ip->em_cp, XV_Y) +
		      (int)xv_get(ip->em_cp, XV_HEIGHT),
		XV_WIDTH, WIN_EXTEND_TO_EDGE,
		XV_HEIGHT, WIN_EXTEND_TO_EDGE,
		OPENWIN_SHOW_BORDERS, TRUE,
		NULL);
	gcm_initialize_colors(obj, "White", "Black");
	xv_set(textsw_first(obj), WIN_CONSUME_EVENTS,
		WIN_MOUSE_BUTTONS,
		LOC_MOVE,
		LOC_DRAG,
		LOC_WINENTER,
		LOC_WINEXIT,
		WIN_ASCII_EVENTS,
		WIN_LEFT_KEYS,
		WIN_RIGHT_KEYS,
		WIN_TOP_KEYS,
		NULL, NULL);
	notify_interpose_event_func(textsw_first(obj),
		(Notify_func) comment_text_proc, NOTIFY_SAFE);
	return obj;
}
开发者ID:jbuonagurio,项目名称:lrose-core,代码行数:34,代码来源:eventman_ui.c


注:本文中的xv_set函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。