Пример #1
0
void destroy_dialog()
{
    if (ui_dialog_wid) {
        hide_dialog();
        XPDestroyWidget(ui_dialog_wid, 1); // 1 = destroy child widgets
        ui_dialog_wid   = NULL;
        ui_dlg_text_wid = NULL;
    }
}
Пример #2
0
bool do_cleanup()
{
  XPLMClearAllMenuItems(checklistsMenu);
  checklists_count = -1;
  if(xCheckListWidget != NULL){
    if(XPIsWidgetVisible(xCheckListWidget)){
      XPHideWidget(xCheckListWidget);
    }
    XPDestroyWidget(xCheckListWidget, 1);
    xCheckListWidget = NULL;
  }
  if(setupWidget != NULL){
    if(XPIsWidgetVisible(setupWidget)){
      XPHideWidget(setupWidget);
    }
    XPDestroyWidget(setupWidget, 1);
    setupWidget = NULL;
  }
  return true;
}
Пример #3
0
PLUGIN_API void XPluginStop(void)
{
	if (gMenuItem == 1)
	    {
		    XPDestroyWidget(AboutWidget, 1);
		    gMenuItem = 0;
	    }
	if (recv_socket_open == 1) {
		if (close(receiverSocket) == -1) {
			XPLMDebugString("XPUDPNG: failed - Caught error while closing socket!(");
			XPLMDebugString((char * const)strerror(errno));
			XPLMDebugString(")\n");
		} else {
			XPLMDebugString("XPUDPNG: Closed socket\n");
		}
		recv_socket_open = 0;
		recv_enabled = 0;
	}
}
Пример #4
0
XPCWidget::~XPCWidget()
{
	if (mOwnsWidget)
		XPDestroyWidget(mWidget, mOwnsChildren ? 1 : 0);
}