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

C++ GGadgetGetWindow函数代码示例

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

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



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

示例1: RH_HVStem

static int RH_HVStem(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_radiochanged ) {
	ReviewHintData *hd = GDrawGetUserData(GGadgetGetWindow(g));
	hd->ishstem = GGadgetIsChecked(GWidgetGetControl(GGadgetGetWindow(g),CID_HStem));
	hd->active =  hd->ishstem ? hd->cv->b.sc->hstem : hd->cv->b.sc->vstem;
	RH_SetupHint(hd);
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:9,代码来源:cvhints.c


示例2: GFD_New

static int GFD_New(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	struct gfc_data *d = GDrawGetUserData(GGadgetGetWindow(g));
	d->done = true;
	GDrawSetVisible(GGadgetGetWindow(g),false);
	FontNew();
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:9,代码来源:openfontdlg.c


示例3: RH_OK

static int RH_OK(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	ReviewHintData *hd = GDrawGetUserData(GGadgetGetWindow(g));
	Do_OKRegen(hd);
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:7,代码来源:cvhints.c


示例4: _BdfP_VScroll

static int _BdfP_VScroll(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_scrollbarchange ) {
	struct bdf_dlg *bd = (struct bdf_dlg *) GDrawGetUserData(GGadgetGetWindow(g));
	BdfP_VScroll(bd,&e->u.control.u.sb);
    }
return( true );
}
开发者ID:IceJacool,项目名称:fontforge,代码行数:7,代码来源:bdfinfo.c


示例5: BdfP_Cancel

static int BdfP_Cancel(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	struct bdf_dlg *bd = GDrawGetUserData(GGadgetGetWindow(g));
	BdfP_DoCancel(bd);
    }
return( true );
}
开发者ID:IceJacool,项目名称:fontforge,代码行数:7,代码来源:bdfinfo.c


示例6: Filter_OK

static int Filter_OK(GGadget *g, GEvent *e) {
    struct filter_d *d;
    struct matrix_data *md;
    int rows,i,cnt;

    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	if ( user_font_filters!=NULL ) {
	    for ( i=0; user_font_filters[i].name!=NULL; ++i ) {
		free(user_font_filters[i].name);
		free(user_font_filters[i].filter);
	    }
	    free(user_font_filters);
	    user_font_filters = NULL;
	}
	d = GDrawGetUserData(GGadgetGetWindow(g));
	md = GMatrixEditGet(d->gme,&rows);
	for ( i=cnt=0; i<rows; ++i )
	    if ( !md[2*i].frozen )
		++cnt;
	if ( cnt!=0 ) {
	    user_font_filters = malloc((cnt+1)*sizeof(struct openfilefilters));
	    for ( i=cnt=0; i<rows; ++i ) if ( !md[2*i].frozen ) {
		user_font_filters[cnt].name = copy(md[2*i].u.md_str);
		user_font_filters[cnt].filter = copy(md[2*i+1].u.md_str);
		++cnt;
	    }
	    user_font_filters[cnt].name = user_font_filters[cnt].filter = NULL;
	}
	SavePrefs(true);
	d->done = true;
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:33,代码来源:openfontdlg.c


示例7: OD_Cancel

static int OD_Cancel(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	OutlineData *od = GDrawGetUserData(GGadgetGetWindow(g));
	od->done = true;
    }
return( true );
}
开发者ID:catharanthus,项目名称:fontforge,代码行数:7,代码来源:effectsui.c


示例8: FtPpem_Cancel

static int FtPpem_Cancel(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	FtSizeData *fsd = GDrawGetUserData(GGadgetGetWindow(g));
	fsd->done = true;
    }
return( true );
}
开发者ID:Arthaey,项目名称:fontforge,代码行数:7,代码来源:cvgridfit.c


示例9: Goto_OK

static int Goto_OK(GGadget *g, GEvent *e) {
    GWindow gw;
    GotoData *d;
    char *ret;
    int i;

    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	gw = GGadgetGetWindow(g);
	d = GDrawGetUserData(gw);
	ret = GGadgetGetTitle8(GWidgetGetControl(gw,CID_Name));
	if ( d->ranges!=NULL ) {
	    for ( i=0; d->ranges[i].text!=NULL; ++i ) {
		if ( strcmp(ret,(char *) d->ranges[i].text)==0 ) {
		    d->ret = (intpt) d->ranges[i].userdata;
	    break;
		}
	    }
	}
	if ( d->ret==-1 ) {
	    d->ret = NameToEncoding(d->sf,d->map,ret);
	    if ( d->ret<0 || (d->ret>=d->map->enccount && d->sf->cidmaster==NULL ))
		d->ret = -1;
	    if ( d->ret==-1 ) {
		ff_post_notice(_("Goto"),_("Could not find the glyph: %.70s"),ret);
	    } else
		d->done = true;
	} else
	    d->done = true;
    }
return( true );
}
开发者ID:UIKit0,项目名称:fontforge-1,代码行数:31,代码来源:gotodlg.c


示例10: DE_Delete

static int DE_Delete(GGadget *g, GEvent *e) {
    GWindow gw;
    int *done;
    GGadget *list;
    int sel,i;
    Encoding *item;

    if ( e->type==et_controlevent &&
            (e->u.control.subtype == et_buttonactivate ||
             e->u.control.subtype == et_listdoubleclick )) {
        gw = GGadgetGetWindow(g);
        done = GDrawGetUserData(gw);
        list = GWidgetGetControl(gw,CID_Encodings);
        sel = GGadgetGetFirstListSelectedItem(list);
        i=0;
        for ( item=enclist; item!=NULL; item=item->next ) {
            if ( item->builtin )
                /* Do Nothing */;
            else if ( i==sel )
                break;
            else
                ++i;
        }
        if ( item!=NULL )
            DeleteEncoding(item);
        *done = true;
    }
    return( true );
}
开发者ID:monkeyiq,项目名称:fontforge-fill-off-by-one,代码行数:29,代码来源:encodingui.c


示例11: CW_Cancel

static int CW_Cancel(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	CreateWidthDlg *wd = GDrawGetUserData(GGadgetGetWindow(g));
	wd->wd.done = true;
    }
return( true );
}
开发者ID:UIKit0,项目名称:fontforge-1,代码行数:7,代码来源:fvmetricsdlg.c


示例12: CW_OK

static int CW_OK(GGadget *g, GEvent *e) {

    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	int err = false;
	CreateWidthDlg *wd = GDrawGetUserData(GGadgetGetWindow(g));
	if ( GGadgetIsChecked(GWidgetGetControl(wd->gw,CID_Set)) ) {
	    wd->wd.type = st_set;
	    wd->wd.setto = GetReal8(wd->gw,CID_SetVal,rb1[wd->wd.wtype],&err);
	    if ( wd->wd.setto<0 && wd->wd.wtype==wt_width ) {
		char *yesno[3];
		yesno[0] = _("_Yes");
		yesno[1] = _("_No");
		yesno[2] = NULL;
		if ( gwwv_ask(_("Negative Width"), (const char **) yesno, 0, 1, _("Negative glyph widths are not allowed in TrueType\nDo you really want a negative width?") )==1 )
return( true );
	    }
	} else if ( GGadgetIsChecked(GWidgetGetControl(wd->gw,CID_Incr)) ) {
	    wd->wd.type = st_incr;
	    wd->wd.increment = GetReal8(wd->gw,CID_IncrVal,rb2[wd->wd.wtype],&err);
	} else {
	    wd->wd.type = st_scale;
	    wd->wd.scale = GetReal8(wd->gw,CID_ScaleVal,rb2[wd->wd.wtype],&err);
	}
	if ( err )
return(true);
	(wd->wd.doit)((CreateWidthData *) wd);
    }
return( true );
}
开发者ID:UIKit0,项目名称:fontforge-1,代码行数:29,代码来源:fvmetricsdlg.c


示例13: CH_Cancel

static int CH_Cancel(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	CreateHintData *hd = GDrawGetUserData(GGadgetGetWindow(g));
	hd->done = true;
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:7,代码来源:cvhints.c


示例14: RH_Remove

static int RH_Remove(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	ReviewHintData *hd = GDrawGetUserData(GGadgetGetWindow(g));
	StemInfo *prev;
	if ( hd->active==NULL )
return( true );			/* Eh? */
	if ( hd->active==hd->cv->b.sc->hstem ) {
	    hd->cv->b.sc->hstem = hd->active->next;
	    prev = hd->cv->b.sc->hstem;
	} else if ( hd->active==hd->cv->b.sc->vstem ) {
	    hd->cv->b.sc->vstem = hd->active->next;
	    prev = hd->cv->b.sc->vstem;
	} else {
	    prev = hd->ishstem ? hd->cv->b.sc->hstem : hd->cv->b.sc->vstem;
	    for ( ; prev->next!=hd->active && prev->next!=NULL; prev = prev->next );
	    prev->next = hd->active->next;
	}
	if ( hd->ishstem )
	    hd->cv->b.sc->hconflicts = StemListAnyConflicts(hd->cv->b.sc->hstem);
	else
	    hd->cv->b.sc->vconflicts = StemListAnyConflicts(hd->cv->b.sc->vstem);
	hd->cv->b.sc->manualhints = true;
	hd->changed = true;
	StemInfoFree( hd->active );
	hd->active = prev;
	SCOutOfDateBackground(hd->cv->b.sc);
	RH_SetupHint(hd);
	/*SCUpdateAll(hd->cv->b.sc);*/	/* Done in RH_SetupHint now */
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:31,代码来源:cvhints.c


示例15: JSTF_Script_OK

static int JSTF_Script_OK(GGadget *g, GEvent *e) {

    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	Jstf_Dlg *jd = GDrawGetUserData(GGadgetGetWindow(g));
	SplineFont *sf = jd->sf;
	Justify *head=NULL, *last=NULL, *cur;
	int rows, i;
	int cols = GMatrixEditGetColCnt(GWidgetGetControl(jd->gw,CID_Scripts));
	struct matrix_data *strings = GMatrixEditGet(GWidgetGetControl(jd->gw,CID_Scripts), &rows);

	for ( i=0; i<rows; ++i ) {
	    cur = chunkalloc(sizeof(Justify));
	    cur->script = Str2Tag(strings[cols*i+0].u.md_str);
	    cur->extenders = copy(strings[cols*i+1].u.md_str);
	    cur->langs = strings[cols*i+3].u.md_addr;
	    if ( head==NULL )
		head = cur;
	    else
		last->next = cur;
	    last = cur;
	}
	JustifyFree(sf->justify);
	sf->justify = head;
	jd->done = true;
    }
return( true );
}
开发者ID:ystk,项目名称:debian-fontforge,代码行数:27,代码来源:justifydlg.c


示例16: Delta_Cancel

static int Delta_Cancel(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	QGData *qg = GDrawGetUserData(GGadgetGetWindow(g));
	qg->done = true;
    }
return( true );
}
开发者ID:Hasimir,项目名称:fontforge,代码行数:7,代码来源:deltaui.c


示例17: PoV_Vanish

static int PoV_Vanish(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_textchanged ) {
	struct nldlg *d = GDrawGetUserData(GGadgetGetWindow(g));
	PoV_DoVanish(d);
    }
return( true );
}
开发者ID:Decepticoner,项目名称:fontforge,代码行数:7,代码来源:nonlineartransui.c


示例18: AnchorD_Cancel

static int AnchorD_Cancel(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	AnchorDlg *a = GDrawGetUserData(GGadgetGetWindow(g));
	AnchorD_DoCancel(a);
    }
return( true );
}
开发者ID:catharanthus,项目名称:fontforge,代码行数:7,代码来源:anchorsaway.c


示例19: OD_OK

static int OD_OK(GGadget *g, GEvent *e) {
    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
	OutlineData *od = GDrawGetUserData(GGadgetGetWindow(g));
	real width, gap;
	int err = 0;

	width = GetReal8(od->gw,CID_Width,_("Outline Width"),&err);
	if ( od->isinline )
	    gap = GetReal8(od->gw,CID_Gap,_("_Gap:"),&err);
	if ( err )
return(true);
	def_outline_width = width;
	if ( od->isinline ) {
	    def_gap_width = gap;
	    if ( od->fv!=NULL )
		FVInline((FontViewBase *) od->fv,width,gap);
	    else if ( od->cv!=NULL )
		CVInline(od->cv,width,gap);
	    else if ( od->mv!=NULL )
		MVInline(od->mv,width,gap);
	} else {
	    if ( od->fv!=NULL )
		FVOutline((FontViewBase *) od->fv,width);
	    else if ( od->cv!=NULL )
		CVOutline(od->cv,width);
	    else if ( od->mv!=NULL )
		MVOutline(od->mv,width);
	}
	od->done = true;
    }
return( true );
}
开发者ID:catharanthus,项目名称:fontforge,代码行数:32,代码来源:effectsui.c


示例20: BaseLang_OK

static int BaseLang_OK(GGadget *g, GEvent *e) {

    if ( e->type==et_controlevent && e->u.control.subtype == et_buttonactivate ) {
        BaseLangDlg *b = GDrawGetUserData(GGadgetGetWindow(g));
        GGadget *g = GWidgetGetControl(b->gw,CID_Languages);
        int r, rows, cols = GMatrixEditGetColCnt(g);
        struct matrix_data *md = GMatrixEditGet(g,&rows);
        struct baselangextent *cur, *last;

        if ( md==NULL )
            return( true );

        b->old = last = NULL;
        for ( r=0; r<rows; ++r ) {
            cur = XZALLOC(struct baselangextent);
            cur->lang = TagFromString(md[r*cols+0].u.md_str);
            cur->descent = md[r*cols+1].u.md_ival;
            cur->ascent = md[r*cols+2].u.md_ival;
            cur->features = (struct baselangextent *) md[r*cols+3].u.md_str;
            md[r*cols+3].u.md_str = NULL;
            if ( last==NULL )
                b->old = cur;
            else
                last->next = cur;
            last = cur;
        }
        b->done = true;
    }
开发者ID:jric,项目名称:fontforge,代码行数:28,代码来源:basedlg.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GHOST_ASSERT函数代码示例发布时间:2022-05-30
下一篇:
C++ GF_SAFEALLOC函数代码示例发布时间: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