예제 #1
0
void iupDialogHide(Ihandle* ih)
{
  /* hidden at the system and marked hidden in IUP */
  if (!iupdrvDialogIsVisible(ih) && ih->data->show_state == IUP_HIDE) 
    return;

  /* marked hidden in IUP */
  ih->data->show_state = IUP_HIDE;

  /* if called IupHide for a Popup window */
  if (iupAttribGetBoolean(ih, "MODAL"))
  {
    iDialogUnSetModal(ih);
    IupExitLoop();
  }

  ih->data->ignore_resize = 1;

  /* actually hide the window */
  iupdrvDialogSetVisible(ih, 0);

  ih->data->ignore_resize = 0;

  /* decrement visible count */
  iupDlgListVisibleDec();
    
  /* process flush and process show_cb */
  iDialogAfterHide(ih);

  iDialogListCheckLastVisible();
}
예제 #2
0
void iupDialogHide(Ihandle* ih)
{
  /* hidden at the system and marked hidden in IUP */
  if (!iupdrvDialogIsVisible(ih) && ih->data->show_state == IUP_HIDE) 
    return;

  /* marked hidden in IUP */
  ih->data->show_state = IUP_HIDE;

  /* if called IupHide for a Popup window */
  if (iupAttribGetInt(ih, "MODAL"))
  {
    iDialogUnSetModal(ih);
    IupExitLoop();
  }

  /* actually hide the window */
  iupdrvDialogSetVisible(ih, 0);

  /* decrement visible count */
  iupDlgListVisibleDec();

  if (iupDlgListVisibleCount() <= 0)
  {
    /* if this is the last window visible, 
       exit message loop except when LOCKLOOP==YES */
    if (!iupStrBoolean(IupGetGlobal("LOCKLOOP")))
      IupExitLoop();
  }

  iDialogCallShowCb(ih);
}