示例#1
0
static void uiMultilineEntryDestroy(uiControl *c)
{
	uiMultilineEntry *e = uiMultilineEntry(c);

	uiWindowsUnregisterWM_COMMANDHandler(e->hwnd);
	uiWindowsEnsureDestroyWindow(e->hwnd);
	uiFreeControl(uiControl(e));
}
示例#2
0
static void uiImageBoxDestroy(uiControl *c)
{
	uiImageBox *b = uiImageBox(c);
	
	uiImageBoxSetImage(b, NULL);
	uiWindowsEnsureDestroyWindow(b->hwnd);
	uiFreeControl(uiControl(b));
}
示例#3
0
void uiEditableComboboxDestroy(uiControl *cc)
{
	uiEditableCombobox *c = uiEditableCombobox(cc);

	uiWindowsUnregisterWM_COMMANDHandler(c->hwnd);
	uiWindowsEnsureDestroyWindow(c->hwnd);
	uiFreeControl(uiControl(c));
}
示例#4
0
static void uiColorButtonDestroy(uiControl *c)
{
	uiColorButton *b = uiColorButton(c);

	uiWindowsUnregisterWM_COMMANDHandler(b->hwnd);
	uiWindowsUnregisterWM_NOTIFYHandler(b->hwnd);
	uiWindowsEnsureDestroyWindow(b->hwnd);
	uiFreeControl(uiControl(b));
}
示例#5
0
static void uiSpinboxDestroy(uiControl *c)
{
	uiSpinbox *s = uiSpinbox(c);

	uiWindowsUnregisterWM_COMMANDHandler(s->edit);
	uiWindowsEnsureDestroyWindow(s->updown);
	uiWindowsEnsureDestroyWindow(s->edit);
	uiWindowsEnsureDestroyWindow(s->hwnd);
	uiFreeControl(uiControl(s));
}
示例#6
0
static void uiGroupDestroy(uiControl *c)
{
	uiGroup *g = uiGroup(c);

	if (g->child != NULL) {
		uiControlSetParent(g->child, NULL);
		uiControlDestroy(g->child);
	}
	uiWindowsEnsureDestroyWindow(g->hwnd);
	uiFreeControl(uiControl(g));
}
示例#7
0
static void uiRadioButtonsDestroy(uiControl *c)
{
	uiRadioButtons *r = uiRadioButtons(c);

	for (const HWND &hwnd : *(r->hwnds)) {
		uiWindowsUnregisterWM_COMMANDHandler(hwnd);
		uiWindowsEnsureDestroyWindow(hwnd);
	}
	delete r->hwnds;
	uiWindowsEnsureDestroyWindow(r->hwnd);
	uiFreeControl(uiControl(r));
}
示例#8
0
static void uiFormDestroy(uiControl *c)
{
	uiForm *f = uiForm(c);

	for (const struct formChild &fc : *(f->controls)) {
		uiControlSetParent(fc.c, NULL);
		uiControlDestroy(fc.c);
		uiWindowsEnsureDestroyWindow(fc.label);
	}
	delete f->controls;
	uiWindowsEnsureDestroyWindow(f->hwnd);
	uiFreeControl(uiControl(f));
}
示例#9
0
文件: window.cpp 项目: 08opt/libui
static void uiWindowDestroy(uiControl *c)
{
	uiWindow *w = uiWindow(c);

	// first hide ourselves
	ShowWindow(w->hwnd, SW_HIDE);
	// now destroy the child
	if (w->child != NULL) {
		uiControlSetParent(w->child, NULL);
		uiControlDestroy(w->child);
	}
	// now free the menubar, if any
	if (w->menubar != NULL)
		freeMenubar(w->menubar);
	// and finally free ourselves
	windows.erase(w);
	uiWindowsEnsureDestroyWindow(w->hwnd);
	uiFreeControl(uiControl(w));
}
示例#10
0
文件: window.c 项目: Alcaro/RetroArch
static void uiWindowDestroy(uiControl *c)
{
	uiWindow *w = uiWindow(c);

	// first hide ourselves
	gtk_widget_hide(w->widget);
	// now destroy the child
	if (w->child != NULL) {
		uiControlSetParent(w->child, NULL);
		uiUnixControlSetContainer(uiUnixControl(w->child), w->childHolderContainer, TRUE);
		uiControlDestroy(w->child);
	}
	// now destroy the menus, if any
	if (w->menubar != NULL)
		freeMenubar(w->menubar);
	gtk_widget_destroy(w->childHolderWidget);
	gtk_widget_destroy(w->vboxWidget);
	// and finally free ourselves
	// use gtk_widget_destroy() instead of g_object_unref() because GTK+ has internal references (see #165)
	gtk_widget_destroy(w->widget);
	uiFreeControl(uiControl(w));
}