• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GDrawRequestExpose函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: BdfP_Resize

static void BdfP_Resize(struct bdf_dlg *bd) {
    extern int _GScrollBar_Width;
    int sbwidth = GDrawPointsToPixels(bd->gw,_GScrollBar_Width);
    GRect size, pos;
    static int cids[] = { CID_Delete, CID_DefAll, CID_DefCur, CID_Up,
	    CID_Down, CID_OK, CID_Cancel, 0 };
    int i;

    GDrawGetSize(bd->gw,&size);
    GDrawGetSize(bd->v,&pos);
    if ( size.width!=bd->width || size.height!=bd->height ) {
	int yoff = size.height-bd->height;
	int xoff = size.width-bd->width;
	bd->width = size.width; bd->height = size.height;
	bd->vwidth += xoff; bd->vheight += yoff;
	GDrawResize(bd->v,bd->vwidth,bd->vheight);
	
	GGadgetMove(bd->vsb,size.width-sbwidth,pos.y-1);
	GGadgetResize(bd->vsb,sbwidth,bd->vheight+2);

	GGadgetGetSize(bd->tf,&pos);
	GGadgetResize(bd->tf,pos.width+xoff,pos.height);

	for ( i=0; cids[i]!=0; ++i ) {
	    GGadgetGetSize(GWidgetGetControl(bd->gw,cids[i]),&pos);
	    GGadgetMove(GWidgetGetControl(bd->gw,cids[i]),pos.x,pos.y+yoff);
	}
    }
    BdfP_RefigureScrollbar(bd);
    GDrawRequestExpose(bd->v,NULL,false);
    GDrawRequestExpose(bd->gw,NULL,true);
}
开发者ID:IceJacool,项目名称:fontforge,代码行数:32,代码来源:bdfinfo.c


示例2: CVMouseMoveHand

void CVMouseMoveHand(CharView *cv, GEvent *event) {
    cv->xoff += event->u.mouse.x-cv->handscroll_base.x; cv->handscroll_base.x = event->u.mouse.x;
    cv->yoff -= event->u.mouse.y-cv->handscroll_base.y; cv->handscroll_base.y = event->u.mouse.y;
    cv->back_img_out_of_date = true;
    GScrollBarSetPos(cv->hsb,-cv->xoff);
    GScrollBarSetPos(cv->vsb,cv->yoff-cv->height);
    GDrawRequestExpose(cv->v,NULL,false);
    if ( cv->showrulers )
	GDrawRequestExpose(cv->gw,NULL,false);
}
开发者ID:Arthaey,项目名称:fontforge,代码行数:10,代码来源:cvhand.c


示例3: SVMakeActive

void SVMakeActive(SearchView *sv,CharView *cv) {
    GRect r;
    if ( sv==NULL )
return;
    sv->cv_srch.inactive = sv->cv_rpl.inactive = true;
    cv->inactive = false;
    GDrawSetUserData(sv->gw,cv);
    GDrawRequestExpose(sv->cv_srch.v,NULL,false);
    GDrawRequestExpose(sv->cv_rpl.v,NULL,false);
    GDrawGetSize(sv->gw,&r);
    r.x = 0;
    r.y = sv->mbh;
    r.height = sv->fh+10;
    GDrawRequestExpose(sv->gw,&r,false);
}
开发者ID:ystk,项目名称:debian-fontforge,代码行数:15,代码来源:searchview.c


示例4: GroupWMouse

static void GroupWMouse(struct groupdlg *grp,GEvent *event) {
    int x;
    int depth=0;
    Group *group;

    group = GroupFindLPos(grp->root,event->u.mouse.y/grp->fh+grp->off_top,&depth);
    if ( group==NULL )
return;

    x = 5+8*depth - grp->off_left;
    if ( event->u.mouse.x<x )
return;
    if ( event->u.mouse.x<=x+grp->as ) {
	if ( group->glyphs != NULL )
return;
	group->open = !group->open;
	GroupSBSizes(grp);
    } else {
	group->selected = !group->selected;
	if ( grp->select_kids_too )
	    GroupSelectKids(group,group->selected);
	else if ( group->selected && !grp->select_many )
	    GroupDeselectAllBut(grp->root,group);
	if ( grp->select_callback!=NULL )
	    (grp->select_callback)(grp);
    }
    GDrawRequestExpose(grp->v,NULL,false);
}
开发者ID:BorisLucas,项目名称:fontforge,代码行数:28,代码来源:groupsdlg.c


示例5: ErrChar

static int ErrChar(GEvent *e) {
    int newpos = errdata.offtop;

    switch( e->u.chr.keysym ) {
      case GK_Home:
	newpos = 0;
      break;
      case GK_End:
	newpos = errdata.cnt-errdata.linecnt;
      break;
      case GK_Page_Up: case GK_KP_Page_Up:
	newpos -= errdata.linecnt;
      break;
      case GK_Page_Down: case GK_KP_Page_Down:
	newpos += errdata.linecnt;
      break;
      case GK_Up: case GK_KP_Up:
	--newpos;
      break;
      case GK_Down: case GK_KP_Down:
        ++newpos;
      break;
    }
    if ( newpos>errdata.cnt-errdata.linecnt )
        newpos = errdata.cnt-errdata.linecnt;
    if ( newpos<0 ) newpos =0;
    if ( newpos!=errdata.offtop ) {
	errdata.offtop = newpos;
	GScrollBarSetPos(errdata.vsb,errdata.offtop);
	GDrawRequestExpose(errdata.v,NULL,false);
return( true );
    }
return( false );
}	
开发者ID:monkeyiq,项目名称:fontforge-fork,代码行数:34,代码来源:uiutil.c


示例6: SVResize

static void SVResize(SearchView *sv, GEvent *event) {
    int width, height;

    if ( !event->u.resize.sized )
return;

    GGadgetMove(GWidgetGetControl(sv->gw,CID_TopBox),4,4);
    GGadgetResize(GWidgetGetControl(sv->gw,CID_TopBox),
	    event->u.resize.size.width-8,
	    event->u.resize.size.height-12);
    
    width = (event->u.resize.size.width-40)/2;
    height = (event->u.resize.size.height-sv->cv_y-sv->button_height-8);
    if ( width<70 || height<80 ) {
	if ( width<70 ) width = 70;
	width = 2*width+40;
	if ( height<80 ) height = 80;
	height += sv->cv_y+sv->button_height+8;
	GDrawResize(sv->gw,width,height);
return;
    }
    if ( width!=sv->cv_width || height!=sv->cv_height ) {
	GDrawResize(sv->cv_srch.gw,width,height);
	GDrawResize(sv->cv_rpl.gw,width,height);
	sv->cv_width = width; sv->cv_height = height;
	sv->rpl_x = 30+width;
	GDrawMove(sv->cv_rpl.gw,sv->rpl_x,sv->cv_y);
    }

    GDrawSync(NULL);
    GDrawProcessPendingEvents(NULL);
    GDrawRequestExpose(sv->gw,NULL,false);
}
开发者ID:BorisLucas,项目名称:fontforge,代码行数:33,代码来源:searchview.c


示例7: _DoFVCompare

static void _DoFVCompare(FontView *fv,int from,int to,double errbound) {
    SplineFont *sf = fv->b.sf;
    int gid, enc;
    SplineChar *sc;
    int first=-1;

    memset(fv->b.selected,0,fv->b.map->enccount);

    for ( enc=0 ; enc<fv->b.map->enccount; ++enc ) {
	if ( /*fv->b.selected[enc] &&*/ (gid=fv->b.map->map[enc])!=-1 &&
		(sc = sf->glyphs[gid])!=NULL && !sc->ticked ) {
	    if ( !LayersSimilar(&sc->layers[from],&sc->layers[to],errbound)) {
		fv->b.selected[enc] = true;
		if ( first==-1 )
		    first = enc;
	    }
	}
    }
    GDrawRequestExpose(fv->v,NULL,true);
    if ( first==-1 )
	ff_post_notice(_("Match"),_("No significant differences found"));
    else {
	ff_post_notice(_("Differ"),_("The layers do not match"));
	FVScrollToChar(fv,first);
	fv->end_pos = fv->pressed_pos = first;
	/*FVShowInfo(fv);*/
    }
}
开发者ID:UIKit0,项目名称:fontforge-1,代码行数:28,代码来源:layer2layer.c


示例8: GWidgetFlowGadgets

void GWidgetFlowGadgets(GWindow gw) {
    GGadget *gadget;
    GContainerD *gd = (GContainerD *) (gw->widget_data);

    if ( gd==NULL )
return;

    gadget = gd->gadgets;
    if ( gadget!=NULL ) {
	while ( gadget->prev!=NULL )
	    gadget=gadget->prev;
    }
    if ( gadget != NULL && GGadgetFillsWindow(gadget)) {
	GRect wsize;
	GDrawGetSize(gw, &wsize);

	/* Make any offset simmetrical */
	if (wsize.width >= 2*gadget->r.x) wsize.width -= 2*gadget->r.x;
	else wsize.width = 0;
	
	if (wsize.height >= 2*gadget->r.y) wsize.height -= 2*gadget->r.y;
	else wsize.height = 0;
	
	GGadgetResize(gadget,wsize.width,wsize.height);
	GDrawRequestExpose(gw,NULL,false);
    }
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:27,代码来源:gcontainer.c


示例9: CVMouseMoveKnife

void CVMouseMoveKnife(CharView *cv, PressedOn *p) {
#if defined(KNIFE_CONTINUOUS)
    ProcessKnife(cv,p);
#else
    GDrawRequestExpose(cv->v,NULL,false);
#endif
}
开发者ID:ystk,项目名称:debian-fontforge,代码行数:7,代码来源:cvknife.c


示例10: CVGridFitChar

void CVGridFitChar(CharView *cv) {
    void *single_glyph_context;
    SplineFont *sf = cv->b.sc->parent;
    int layer = CVLayer((CharViewBase *) cv);

    SplinePointListsFree(cv->b.gridfit); cv->b.gridfit = NULL;
    FreeType_FreeRaster(cv->raster); cv->raster = NULL;

    single_glyph_context = _FreeTypeFontContext(sf,cv->b.sc,NULL,layer,
	    sf->layers[layer].order2?ff_ttf:ff_otf,0,NULL);
    if ( single_glyph_context==NULL ) {
	LogError(_("Freetype rasterization failed.\n") );
return;
    }

    if ( cv->b.sc->layers[layer].refs!=NULL )
	SCNumberPoints(cv->b.sc,layer);

    cv->raster = FreeType_GetRaster(single_glyph_context,cv->b.sc->orig_pos,
	    cv->ft_pointsizey, cv->ft_pointsizex, cv->ft_dpi, cv->ft_depth );
    cv->b.gridfit = FreeType_GridFitChar(single_glyph_context,cv->b.sc->orig_pos,
	    cv->ft_pointsizey, cv->ft_pointsizex, cv->ft_dpi, &cv->b.ft_gridfitwidth,
	    cv->b.sc, cv->ft_depth, true );

    FreeTypeFreeContext(single_glyph_context);
    GDrawRequestExpose(cv->v,NULL,false);
    if ( cv->b.sc->instructions_out_of_date && cv->b.sc->ttf_instrs_len!=0 )
	ff_post_notice(_("Instructions out of date"),
	    _("The points have been changed. This may mean that the truetype instructions now refer to the wrong points and they may cause unexpected results."));
}
开发者ID:Arthaey,项目名称:fontforge,代码行数:30,代码来源:cvgridfit.c


示例11: GProgressProcess

static int GProgressProcess(GProgress *p) {
    int width, amount;
    int tenpt;

    if ( !p->visible )
	GProgressTimeCheck();

    tenpt = GDrawPointsToPixels(p->gw,10);
    width = p->width-2*tenpt;
    if ( p->tot==0 )
	amount = 0;
    else
	amount = width * (p->stage*p->tot + p->sofar)/(p->stages*p->tot);
    if ( amount!=p->last_amount ) {
	if ( amount<p->last_amount || p->last_amount==0 )
	    GDrawRequestExpose(p->gw,NULL,false);
	else {
	    GRect r;
	    r.height = tenpt-1;
	    r.width = amount - p->last_amount;
	    r.x = tenpt + p->last_amount;
	    r.y = p->boxy+1;
	    GDrawFillRect(p->gw,&r,progress_fillcol);
	}
	p->last_amount = amount;
    }
    GDrawProcessPendingEvents(NULL);
return( !p->aborted );
}
开发者ID:Cyclens,项目名称:fontforge,代码行数:29,代码来源:gprogress.c


示例12: DoFindAll

static void DoFindAll(SearchView *sv) {
    int any;

    any = _DoFindAll(&sv->sd);
    GDrawRequestExpose(((FontView *) (sv->sd.fv))->v,NULL,false);
    if ( !any )
	ff_post_notice(_("Not Found"),_("The search pattern was not found in the font %.100s"),sv->sd.fv->sf->fontname);
}
开发者ID:ystk,项目名称:debian-fontforge,代码行数:8,代码来源:searchview.c


示例13: QGSorter

static int QGSorter(GGadget *g, GEvent *e) {
    if ( e->u.control.subtype == et_listselected ) {
	QGData *qg = GDrawGetUserData(GGadgetGetWindow(g));
	QGDoSort(qg);
	GDrawRequestExpose(qg->v,NULL,false);
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:8,代码来源:deltaui.c


示例14: AnchorD_Mouse

static int AnchorD_Mouse(AnchorDlg *a,GEvent *event) {
    int on_combo = -1;
    int on_ap = 0;
    int i;

    if ( event->u.mouse.x<a->ctl_len || event->u.mouse.y>=a->sb_base )
return( false );
    if ( a->xlen>0 && event->u.mouse.x>=a->apmatch[0].xstart ) {
	int x = event->u.mouse.x + a->xoff;
	for ( i=0; i<a->cnt; ++i ) {
	    if ( x>=a->apmatch[i].xstart &&
		    x<a->apmatch[i].xstart + a->apmatch[i].size*a->magfactor ) {
		on_combo = i;
	break;
	    }
	}
    } else if ( event->u.mouse.x>=a->ctl_len && event->u.mouse.x<a->ctl_len+ a->magfactor*a->char_size ) {
	int x = event->u.mouse.x - a->ctl_len;
	int y = a->baseline - event->u.mouse.y;
	int ax = (a->char_off + (int) rint(a->apos.x*a->scale))*a->magfactor;
	int ay = (int) rint(a->apos.y*a->scale)*a->magfactor;
	if ( x>ax-4 && x<ax+4 && y>ay-4 && y<ay+4 )
	    on_ap = 2;
	else
	    on_ap = 1;
    }

    if ( event->type == et_mousedown ) {
	if ( on_combo!=-1 )
	    a->combo = on_combo+1;
	else if ( on_ap==2 ) {
	    a->on_ap = true;
	    a->orig_pos = a->apos;
	}
    } else if ( event->type == et_mouseup ) {
	if ( on_combo!=-1 && on_combo+1==a->combo ) {
	    AnchorPoint *ap = a->apmatch[on_combo].ap;
	    a->combo = 0;
	    AnchorD_ChangeGlyph(a,a->apmatch[on_combo].sc,a->apmatch[on_combo].ap);
	    AnchorD_SelectGlyph(a,ap);
	} else if ( on_ap && a->on_ap ) {
	    AnchorD_FigurePos(a,event);
	    AnchorD_ClearCorrections(a);
	    AnchorD_DrawPos(a);
	    GDrawRequestExpose(a->gw,NULL,false);
	} else if ( a->combo!=0 ) {
	} else if ( a->on_ap ) {
	    a->apos = a->orig_pos;
	    AnchorD_DrawPos(a);
	}
	a->on_ap = 0;
	a->combo = 0;
    } else if ( a->on_ap ) {
	AnchorD_FigurePos(a,event);
	AnchorD_DrawPos(a);
    }
return( true );
}
开发者ID:catharanthus,项目名称:fontforge,代码行数:58,代码来源:anchorsaway.c


示例15: BdfP_Mouse

static void BdfP_Mouse(struct bdf_dlg *bd, GEvent *e) {
    int line = e->u.mouse.y/(bd->fh+1) + bd->cur->top_prop;

    if ( line<0 || line>bd->cur->bdf->prop_cnt )
return;			/* "New" happens when line==bd->cur->bdf->prop_cnt */
    if ( e->type == et_mousedown ) {
	if ( !BdfP_FinishTextField(bd) ) {
	    bd->press_pos = -1;
return;
	}
	if ( e->u.mouse.x>=4 && e->u.mouse.x<= bd->value_x ) {
	    bd->cur->sel_prop = line;
	    BdfP_PopupMenuProps(bd,e);
	    BdfP_EnableButtons(bd);
	} else if ( line>=bd->cur->bdf->prop_cnt )
return;
	else {
	    bd->press_pos = line;
	    bd->cur->sel_prop = -1;
	    GDrawRequestExpose(bd->v,NULL,false );
	}
    } else if ( e->type == et_mouseup ) {
	int pos = bd->press_pos;
	bd->press_pos = -1;
	if ( line>=bd->cur->bdf->prop_cnt || line!=pos )
return;
	if ( bd->active )		/* Should never happen */
return;
	bd->cur->sel_prop = line;
	if ( e->u.mouse.x > bd->value_x ) {
	    BDFFont *bdf = bd->cur->bdf;
	    GGadgetMove(bd->tf,bd->value_x+2,(line-bd->cur->top_prop)*(bd->fh+1));
	    if ( (bdf->props[line].type&~prt_property) == prt_int ||
		    (bdf->props[line].type&~prt_property) == prt_uint ) {
		char buffer[40];
		sprintf( buffer,"%d",bdf->props[line].u.val );
		GGadgetSetTitle8(bd->tf,buffer);
	    } else
		GGadgetSetTitle8(bd->tf,bdf->props[line].u.str );
	    GGadgetSetVisible(bd->tf,true);
	    bd->active = true;
	}
	GDrawRequestExpose(bd->v,NULL,false );
    }
}
开发者ID:IceJacool,项目名称:fontforge,代码行数:45,代码来源:bdfinfo.c


示例16: ShowErrorWindow

void ShowErrorWindow(void) {
    if ( errdata.gw==NULL )
return;
    GDrawSetVisible(errdata.gw,true);
    GDrawRaise(errdata.gw);
    if ( errdata.showing )
	GDrawRequestExpose(errdata.v,NULL,false);
    errdata.showing = true;
}
开发者ID:monkeyiq,项目名称:fontforge-fork,代码行数:9,代码来源:uiutil.c


示例17: KP_RefreshKP

static void KP_RefreshKP(KPData *kpd,int index) {
    GRect sel;

    if ( index<kpd->off_top || index>kpd->off_top+kpd->wh )
return;
    sel.x = 0; sel.width = kpd->vwidth;
    sel.y = (index-kpd->off_top)*kpd->uh; sel.height = kpd->uh;
    GDrawRequestExpose(kpd->v,&sel,false);
}
开发者ID:IceJacool,项目名称:fontforge,代码行数:9,代码来源:combinations.c


示例18: KPV_Resize

static void KPV_Resize(KPData *kpd) {
    GRect size;
    GGadget *sb;

    GDrawGetSize(kpd->v,&size);
    kpd->wh = size.height/kpd->uh;

    sb = GWidgetGetControl(kpd->gw,CID_ScrollBar);
    GScrollBarSetBounds(sb,0,kpd->kcnt,kpd->wh);
    if ( kpd->off_top>kpd->kcnt-kpd->wh )
	kpd->off_top = kpd->kcnt-kpd->wh;
    if ( kpd->off_top<0 )
	kpd->off_top = 0;
    GScrollBarSetPos(sb,kpd->off_top);
    kpd->vwidth = size.width;
    GDrawRequestExpose(kpd->v,NULL,false);
    GDrawRequestExpose(kpd->gw,NULL,false);
}
开发者ID:IceJacool,项目名称:fontforge,代码行数:18,代码来源:combinations.c


示例19: SCDeGridFit

void SCDeGridFit(SplineChar *sc) {
    CharView *cv;

    for ( cv=(CharView *) (sc->views); cv!=NULL; cv=(CharView *) (cv->b.next) ) if ( cv->show_ft_results ) {
	SplinePointListsFree(cv->b.gridfit); cv->b.gridfit = NULL;
	FreeType_FreeRaster(cv->raster); cv->raster = NULL;
	cv->show_ft_results = false;
	GDrawRequestExpose(cv->v,NULL,false);
    }
}
开发者ID:Arthaey,项目名称:fontforge,代码行数:10,代码来源:cvgridfit.c


示例20: WarnMenuClear

static void WarnMenuClear(GWindow gw,struct gmenuitem *mi,GEvent *e) {
    int i;

    for ( i=0; i<errdata.cnt; ++i ) {
	free(errdata.errlines[i]);
	errdata.errlines[i] = NULL;
    }
    errdata.cnt = 0;
    GDrawRequestExpose(gw,NULL,false);
}
开发者ID:monkeyiq,项目名称:fontforge-fork,代码行数:10,代码来源:uiutil.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GDrawSetVisible函数代码示例发布时间:2022-05-30
下一篇:
C++ GDrawGetUserData函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap