 
#ifndef __dl_dialog2_h
#define __dl_dialog2_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dl_wimp_h
#include "Wimp.h"
#endif
#ifndef __dl_window_h
#include "Window.h"
#endif
typedef enum {
dialog2_type_CLOSED = 0,
dialog2_type_MENULEAF,
dialog2_type_MENU,
dialog2_type_STATIC
}
dialog2_dialog2type;
typedef struct dialog2_block *dialog2_blockptr;
typedef void (*dialog2_openfn)( dialog2_blockptr);
typedef void (*dialog2_okfn)( dialog2_blockptr);
typedef struct dialog2_block {
void *reference; 
char *templatename; 
window_handle window; 
dialog2_openfn openfn; 
dialog2_okfn okfn; 
union {
int value;
struct {
unsigned int type : 2; 
unsigned int keepwindow : 1;
unsigned int notifyclose : 1;
int okbutton : 9;
int cancelbutton : 9;
int maxtitlesize : 10;
}
data;
}
flags;
}
dialog2_block;
dialog2_block *Dialog2_CreateDialogBlock( 
char *templatename, 
icon_handle okbutton,
icon_handle cancelbutton,
dialog2_openfn openfn,
dialog2_okfn okfn,
void *reference
);
BOOL Dialog2_OpenDialogMenuLeaf( event_pollblock *event, dialog2_block *dialog2);
BOOL Dialog2_OpenDialogMenu( dialog2_block *dialog2, window_openpos openpos);
BOOL Dialog2_OpenDialogStatic( dialog2_block *dialog2, window_openpos openpos);
BOOL Dialog2_CloseDialog( dialog2_block *dialog2);
BOOL Dialog2_DeleteDialog( dialog2_block *dialog2);
#ifdef _DeskLib_SDLS
extern dialog2_block **Dialog2__Ref_menublock( void);
#endif
#if defined( _DeskLib_SDLS) && !defined( _DeskLib_Dialog2)
#define dialog2_menublock (*Dialog2__Ref_menublock())
#else
extern dialog2_block *dialog2_menublock;
#endif
void Dialog2_Window_GetWindowOpenPos( 
wimp_point *pos, window_openpos openpos, window_handle window
);
void Dialog2_EnsureWindowHandle( dialog2_block *dialog2);
#define Dialog2_ChangeCloseNotification( dialog2, x) (dialog2)->flags.data.notifyclose = (x)
#define Dialog2_NotifyClose( dialog2) Dialog2_ChangeCloseNotification( dialog2, 1)
#define Dialog2_DontNotifyClose( dialog2) Dialog2_ChangeCloseNotification( dialog2, 0)
#define Dialog2_ChangeKeepWindow( dialog2, x) (dialog2)->flags.data.keepwindow = (x)
#define Dialog2_KeepWindow( dialog2) Dialog2_ChangeKeepWindow( dialog2, 1)
#define Dialog2_DontKeepWindow( dialog2) Dialog2_ChangeKeepWindow( dialog2, 0)
#define Dialog2_ChangeTitleSize( dialog2, x) (dialog2)->flags.data.maxtitlesize = (x)
#ifdef __cplusplus
}
#endif
#endif
