*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
return dlg->dlgitem[i];
}
}
- return NULL;
+ return nullptr;
}
t_dlgitem *FindWin(t_dlg *dlg, Window win)
return dlg->dlgitem[i];
}
}
- return NULL;
+ return nullptr;
}
/*****************************
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
*w = dlgitem->win.width;
*h = dlgitem->win.height;
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
*x0 = dlgitem->win.x;
*y0 = dlgitem->win.y;
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
return dlgitem->win.x;
}
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
return dlgitem->win.y;
}
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
return dlgitem->win.width;
}
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
return dlgitem->win.height;
}
int old_w, old_h;
#endif
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
#ifdef DEBUG
old_w = dlgitem->win.width;
t_dlgitem *dlgitem;
int old_x, old_y;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
old_x = dlgitem->win.x;
old_y = dlgitem->win.y;
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
if (dlgitem->type == edlgCB)
{
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
if (dlgitem->type == edlgET)
{
{
t_dlgitem *dlgitem;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
if (dlgitem->type == edlgET)
{
}
}
- return NULL;
+ return nullptr;
}
/*****************************
"No help for this item"
};
MessageBox(dlg->x11, dlg->wDad, "No Help", 2, lines,
- MB_OK | MB_ICONSTOP | MB_APPLMODAL, NULL, NULL);
+ MB_OK | MB_ICONSTOP | MB_APPLMODAL, nullptr, nullptr);
}
void HelpDlg(t_dlg *dlg)
"First press the OK button."
};
MessageBox(dlg->x11, dlg->win.self, "Help Dialogbox",
- 3, lines, MB_OK | MB_ICONINFORMATION | MB_APPLMODAL, NULL, NULL);
+ 3, lines, MB_OK | MB_ICONINFORMATION | MB_APPLMODAL, nullptr, nullptr);
}
void HelpNow(t_dlg *dlg, t_dlgitem *dlgitem)
char buf[80];
bool bCont = true;
int i, nlines = 0;
- char **lines = NULL;
+ char **lines = nullptr;
if (!dlgitem->help)
{
while (bCont);
MessageBox(dlg->x11, dlg->wDad, "Help",
nlines, lines,
- MB_OK | MB_ICONINFORMATION | MB_APPLMODAL, NULL, NULL);
+ MB_OK | MB_ICONINFORMATION | MB_APPLMODAL, nullptr, nullptr);
for (i = 0; (i < nlines); i++)
{
sfree(lines[i]);
int i, nWndProc;
t_dlgitem *dlgitem;
- if ((dlgitem = FindWin(dlg, w)) != NULL)
+ if ((dlgitem = FindWin(dlg, w)) != nullptr)
{
nWndProc = (dlgitem->WndProc)(x11, dlgitem, event);
#ifdef DEBUG
hints.y = dlg->win.y;
hints.flags = PPosition;
XSetStandardProperties(dlg->x11->disp, dlg->win.self, dlg->title,
- dlg->title, None, NULL, 0, &hints);
+ dlg->title, None, nullptr, 0, &hints);
}
void AddDlgItem(t_dlg *dlg, t_dlgitem *item)
t_dlgitem *dlgitem;
int i;
- if ((dlgitem = FindItem(dlg, id)) != NULL)
+ if ((dlgitem = FindItem(dlg, id)) != nullptr)
{
dlg->x11->UnRegisterCallback(dlg->x11, dlgitem->win.self);
if (dlgitem->win.self)
{
XDestroyWindow(dlg->x11->disp, dlg->win.self);
}
- dlg->dlgitem = NULL;
+ dlg->dlgitem = nullptr;
}
}
}
else
{
- dlg->title = NULL;
+ dlg->title = nullptr;
}
if (w == 0)
{
{
y = y0;
}
- InitWin(&(dlg->win), x, y, w, h, bw, NULL);
+ InitWin(&(dlg->win), x, y, w, h, bw, nullptr);
SetDlgSize(dlg, w, h, x0 || y0);
dlg->wDad = Parent;
dlg->fg = x11->fg;
dlg->bg = x11->bg;
dlg->nitem = 0;
- dlg->dlgitem = NULL;
+ dlg->dlgitem = nullptr;
DoCreateDlg(dlg);
return dlg;