X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.h;h=63690f30514a89a136fa632dcfb31a3e2a7a9a79;hb=9d455a7f4ce66cc25d540d4dc5a65fdb1895cc2e;hp=856598e5d9de27c7a6f38dd22e7bee4707a4724b;hpb=02de46755f727ffb565f7c855f37c344eee925ff;p=xboard.git diff --git a/dialogs.h b/dialogs.h index 856598e..63690f3 100644 --- a/dialogs.h +++ b/dialogs.h @@ -79,18 +79,41 @@ #define MODAL 1 #define NONMODAL 0 +/* Board widget numbers, MUST correspond to mainOptions array */ + +#define W_MENU 0 // main menu bar +#define W_ENGIN 6 // engine menu +#define W_TITLE 10 +#define W_WHITE 11 +#define W_BLACK 12 +#define W_SMALL 13 // title in small layout +#define W_MESSG 14 +#define W_BUTTON 15 // button bar +#define W_PAUSE 18 +#define W_BOARD 22 +#define W_MENUW 23 +#define W_MENUB 24 +#define W_DROP 25 // drop (popup) menu + + + typedef enum { // identifier of dialogs done by GenericPopup TransientDlg=0, // transient: grabs mouse events and is destroyed at pop-down (so other dialog can use this ID next time) -CommentDlg, TagsDlg, TextMenuDlg, InputBoxDlg, NoDlg, BrowserDlg, HistoryDlg, // persistent: no grab and reused +CommentDlg, TagsDlg, TextMenuDlg, InputBoxDlg, NoDlg, DummyDlg, HistoryDlg, // persistent: no grab and reused +GameListDlg, +EngOutDlg, +EvalGraphDlg, PromoDlg, // this and beyond are destroyed at pop-down ErrorDlg, AskDlg, // this and beyond do grab mouse events (and are destroyed) FatalDlg, BoardWindow, +BrowserDlg, NrOfDialogs // dummy for total } DialogClass; typedef Option *PointerCallback(int n, int x, int y); +typedef void ListBoxCallback(int n, int selected); typedef void ButtonCallback(int n); typedef int OKCallback(int n); @@ -102,7 +125,7 @@ extern ChessProgramState *currentCps; extern int dialogError; extern ButtonCallback *comboCallback; -extern WindowPlacement wpComment, wpTags, wpMoveHistory; +extern WindowPlacement wpComment, wpTags, wpMoveHistory, wpMain; extern char *marked[]; extern Boolean shellUp[]; extern Option textOptions[], typeOptions[]; @@ -121,6 +144,7 @@ void GetWidgetText P((Option *opt, char **buf)); void SetWidgetText P((Option *opt, char *buf, int n)); void GetWidgetState P((Option *opt, int *state)); void SetWidgetState P((Option *opt, int state)); +void SetWidgetLabel P((Option *opt, char *buf)); void SetDialogTitle P((DialogClass dlg, char *title)); void LoadListBox P((Option *opt, char *emptyText)); void HighlightListBoxItem P((Option *opt, int nr)); @@ -134,14 +158,27 @@ int ReadScroll P((Option *opt, float *top, float *bottom)); void SetScroll P((Option *opt, float f)); void AddHandler P((Option *opt, int nr)); void SendText P((int n)); +FILE *Browse P((DialogClass dlg, char *label, char *proposed, char *ext, + Boolean pathFlag, char *mode, char **name, FILE **fp)); void InitDrawingParams P(()); // in xboard.c void ErrorPopUp P((char *title, char *text, int modal)); int ShiftKeys P((void)); +void SetClockIcon P((int color)); +void DelayedLoad P((void)); +void DisplayTimerLabel P((Option *opt, char *color, long timer, int highlight)); +Option *BoardPopUp P((int squareSize, int lineGap, void *clockFontThingy)); int SetCurrentComboSelection P((Option *opt)); void BoxAutoPopUp P((char *buf)); void IcsKey P((int n)); void ICSInputBoxPopUp P((void)); +void LoadOptionsPopUp P((DialogClass parent)); +void GameListOptionsPopUp P((DialogClass parent)); + +// in ngamelist.c +int GameListClicks P((int direction)); +void SetFilter P((void)); +int SaveGameListAsText P((FILE *f));