Moved ngmx to C++, renamed it to view.
[alexxy/gromacs.git] / src / programs / view / xdlgitem.h
similarity index 84%
rename from src/ngmx/xdlgitem.h
rename to src/programs/view/xdlgitem.h
index a1076045c9522bf549ea5f1df2d2d5d9e7eb6fa3..e4f011e762586437dbcb16f2b2b0b06d1844d4d1 100644 (file)
 #define _xdlgitem_h
 
 #include <typedefs.h>
-#include <Xstuff.h>
-#include <xutil.h>
-#include <x11.h>
+#include "Xstuff.h"
+#include "xutil.h"
+#include "x11.h"
 
+typedef enum {
+    edlgBN, edlgRB, edlgGB, edlgCB, edlgPM, edlgST, edlgET, edlgNR
+} edlgitem;
 #define XCARET  2
 
 enum {
@@ -50,15 +53,15 @@ enum {
 typedef int t_id;
 
 typedef struct {
-    gmx_bool bDefault;  /* This is the default button */
+    bool bDefault;  /* This is the default button */
 } t_button;
 
 typedef struct {
-    gmx_bool bSelect;   /* Is this rb selected ? */
+    bool bSelect;   /* Is this rb selected ? */
 } t_radiobutton;
 
 typedef struct {
-    gmx_bool bChecked;  /* Is this cb checked ? */
+    bool bChecked;  /* Is this cb checked ? */
 } t_checkbox;
 
 typedef struct {
@@ -72,10 +75,10 @@ typedef struct {
 
 typedef struct {
     int  buflen, strbegin; /* Length of the screen buf and begin of string  */
-    int  pos /*,len*/;     /* Current length of the string and pos of caret */
+    int  pos;              /* Current length of the string and pos of caret */
     /* Pos is relative to strbegin, and is the pos   */
     /* in the window.                                */
-    gmx_bool bChanged;
+    bool     bChanged;
     char    *buf;
 } t_edittext;
 
@@ -84,14 +87,11 @@ typedef struct {
     t_id *item;
 } t_groupbox;
 
-typedef enum {
-    edlgBN, edlgRB, edlgGB, edlgCB, edlgPM, edlgST, edlgET, edlgNR
-} edlgitem;
 
 typedef struct t_dlgitem {
     t_windata         win;
     t_id              ID, GroupID;
-    gmx_bool          bUseMon;
+    bool              bUseMon;
     char             *set, *get, *help;
     edlgitem          type;
     int       (*WndProc)(t_x11 *x11, struct t_dlgitem *dlgitem, XEvent *event);
@@ -120,12 +120,12 @@ typedef struct t_dlgitem {
  * on the dlg box, and if wished resize them.
  *
  ****************************/
-extern t_dlgitem *CreateButton(t_x11 *x11, const char *szLab, gmx_bool bDef,
+extern t_dlgitem *CreateButton(t_x11 *x11, const char *szLab, bool bDef,
                                t_id id, t_id groupid,
                                int x0, int y0, int w, int h, int bw);
 
 extern t_dlgitem *CreateRadioButton(t_x11 *x11,
-                                    const char *szLab, gmx_bool bSet, t_id id,
+                                    const char *szLab, bool bSet, t_id id,
                                     t_id groupid,
                                     int x0, int y0, int w, int h, int bw);
 
@@ -134,23 +134,23 @@ extern t_dlgitem *CreateGroupBox(t_x11 *x11, const char *szLab, t_id id,
                                  int x0, int y0, int w, int h, int bw);
 
 extern t_dlgitem *CreateCheckBox(t_x11 *x11, const char *szLab,
-                                 gmx_bool bCheckedInitial,
+                                 bool bCheckedInitial,
                                  t_id id, t_id groupid,
                                  int x0, int y0, int w, int h, int bw);
 
-extern t_dlgitem *CreatePixmap(t_x11 *x11, Pixmap pm, t_id id, t_id groupid,
+extern t_dlgitem *CreatePixmap(Pixmap pm, t_id id, t_id groupid,
                                int x0, int y0, int w, int h, int bw);
 
 extern t_dlgitem *CreateStaticText(t_x11 *x11,
-                                   int nlines, char * const * lines, t_id id,
-                                   t_id groupid,
+                                   int nlines, const char * const *lines,
+                                   t_id id, t_id groupid,
                                    int x0, int y0, int w, int h, int bw);
 
 extern t_dlgitem *CreateEditText(t_x11 *x11, const char *title,
                                  int screenbuf, char *buf, t_id id, t_id groupid,
                                  int x0, int y0, int w, int h, int bw);
 
-extern void SetDlgitemOpts(t_dlgitem *dlgitem, gmx_bool bUseMon,
+extern void SetDlgitemOpts(t_dlgitem *dlgitem, bool bUseMon,
                            char *set, char *get, char *help);
 
 #endif  /* _xdlgitem_h */