/* STATBAR.H for dynamic custom control for XVT/Design 2.01

   $Revision: 1.5 $ $Author: guy $ $Date: 2008-05-20 14:06:05 $

   This code was written by Christopher Williamson,
   May be distributed in object form only when embedded in a
   registered XVT user's application.
   Copyright 1993-1994, XVT Software Inc., All Rights Reserved.
 */
#ifndef STATBAR_H
#define STATBAR_H

#if defined(_cplusplus) || defined(__cplusplus)
extern "C" {
#endif

/* internal constants for sizing arrays, defaults, etc... */
#define STATBAR_MAX_LEN 256	/* maximum length of status bar string */
#define STATBAR_MAX_NUM 128	/* maximum number of status bars in an app */
#if ( (XVTWS==MACWS) || (XVTWS==MTFWS) || (XVTWS==XOLWS) )
#define STATBAR_FONT_SIZE 12	/* default font size on Mac/XM/XOL */
#else
#define STATBAR_FONT_SIZE 10	/* default font size on Windows/PM/NT/CH */
#endif

/* the following CIS functions are external and may be called by the app */
XVTDLL const char *statbar_set_title(WINDOW win, const char *text);
XVTDLL const char *statbar_set_default_title(WINDOW win, const char *text);

/* the following CIS functions are external and are usable in all font modes */

XVTDLL XVT_FNTID statbar_set_fontid(WINDOW win, XVT_FNTID fontid);
XVTDLL XVT_FNTID statbar_get_fontid(WINDOW win, XVT_FNTID fontid);

/* the event handler and create function for statbar */
XVTDLL WINDOW statbar_create 
    (int cid, int left, int top, int right, int bottom,
		 int prop_count, char **prop_list, WINDOW parent_win,
		 int parent_rid, long parent_flags, char *parent_class);

XVTDLL BOOLEAN statbar_destroy(WINDOW win);

/* toolbar supports different types of controls */
enum TOOL_TYPE { TOOL_SEPARATOR = -1, TOOL_BUTTON, TOOL_TOGLBUTN, TOOL_RADIOBUTN };

/* the following CIS functions are external and may be called by the app */
XVTDLL BOOLEAN xvt_toolbar_add_control(WINDOW win, int cid, TOOL_TYPE type, const char *title, 
                                       int ico, int cust_width, int idx);
XVTDLL WINDOW  xvt_toolbar_create(int cid, int left, int top, int right, int bottom, 
                                  long style, WINDOW parent_win);
XVTDLL void    xvt_toolbar_enable_control(WINDOW win, int cid, BOOLEAN on);
XVTDLL void    xvt_toolbar_realize(WINDOW win);
XVTDLL BOOLEAN xvt_toolbar_set_last_tool(WINDOW win, int cid);
XVTDLL void    xvt_toolbar_show_control(WINDOW win, int cid, BOOLEAN on);

#if defined(_cplusplus) || defined(__cplusplus)
}				/* extern "C" */
#endif

#endif				/* STATBAR_H */