/* Copyright 1996 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/* Title:   style.h
 * Purpose: Constants defined by the RISC OS 3 Style Guide
 * Author:  IDJ
 * History: 03-Nov-93: created
 *          07-Mar-94: CSM: Removed RJUSTIFY from label flags
 *          13-Jun-94: NK : display fields now unfilled
 *          06-Jun-97: PW : Added writable icons without borders for Daytona
 *          24-Jun-97: PW : Changed slider look for Daytona
 */

#ifndef __style_h
#define __style_h

#ifndef __wimp_h
#include "twimp.h"
#endif

/* --- Iconbar Icons --- */

#define style_ICONBAR_FORECOL                        7   /* black text */
#define style_ICONBAR_BACKCOL                        1   /* v. light grey background */

#define style_ICONBAR_TEXT_AND_SPRITE_YMAX          84   /* OS Units */
#define style_ICONBAR_TEXT_AND_SPRITE_GAP            4   /* OS Units gap between text and base of sprite */
#define style_ICONBAR_TEXT_AND_SPRITE_TEXT_HEIGHT   32   /* OS Units height of text */
#define style_ICONBAR_TEXT_AND_SPRITE_BASE       (-16)   /* base line of text&sprite icon */
#define style_ICONBAR_TEXT_AND_SPRITE_TYPE       wimp_BUTTON_CLICK
#define style_ICONBAR_TEXT_AND_SPRITE_ICONFLAGS  (wimp_ICONFLAGS_TEXT |\
                                                  wimp_ICONFLAGS_SPRITE |\
                                                  wimp_ICONFLAGS_HCENTRE  |\
                                                  wimp_ICONFLAGS_INDIRECT |\
                                                  (wimp_ICONFLAGS_FORECOL * style_ICONBAR_FORECOL) |\
                                                  (wimp_ICONFLAGS_BACKCOL * style_ICONBAR_BACKCOL) |\
                                                  (wimp_ICONFLAGS_BUTTON_TYPE * style_ICONBAR_TEXT_AND_SPRITE_TYPE)\
                                                 )

#define style_ICONBAR_SPRITE_YMAX                   68   /* OS Units */
#define style_ICONBAR_SPRITE_BASE                    0   /* base of sprite only icon */
#define style_ICONBAR_SPRITE_TYPE                wimp_BUTTON_CLICK
#define style_ICONBAR_SPRITE_ICONFLAGS           (wimp_ICONFLAGS_SPRITE |\
                                                  wimp_ICONFLAGS_HCENTRE |\
                                                  wimp_ICONFLAGS_VCENTRE |\
                                                  wimp_ICONFLAGS_INDIRECT |\
                                                  (wimp_ICONFLAGS_BUTTON_TYPE * style_ICONBAR_SPRITE_TYPE)\
                                                 )



/* --- Windows --- */

#define style_WINDOW_TITLE_FORECOL        7   /* black text */
#define style_WINDOW_TITLE_BACKCOL        2   /* grey background */
#define style_WINDOW_TITLE_HIGHLIGHTED   12   /* cream title bar when selected */
#define style_WINDOW_OUTER_SCROLL         3   /* dark grey backgrnd for scroll bar */
#define style_WINDOW_INNER_SCROLL         1   /* light grey scroll sausage */
#define style_WINDOW_STAGGER             48   /* offset of subsequent windows after first
                                                 window is opened in centre of screen */


/* --- Menus --- */

#define style_MENU_TITLE_FORECOL          7   /* black text */
#define style_MENU_TITLE_BACKCOL          2   /* grey background */
#define style_MENU_ENTRY_FORECOL          7   /* black text */
#define style_MENU_ENTRY_BACKCOL          0   /* white backgnd for entries */

#define style_MENU_ENTRY_HEIGHT          44   /* entries are 44 OS units high */
#define style_MENU_ENTRY_GAP              0   /* no gap between menu entries */
#define style_MENU_OFFSET                64   /* open menu 64 OS units to left of pointer */
#define style_MENU_ICONBAR_BASE          96   /* base of iconbar menu is 96 OS units from bottom of screen */


/* --- Gadgets (buttons in dialogue boxes) --- */

#define style_INTER_GADGET_SPACE              8 /* OS Units space between gadgets in a dbox */


#define style_ACTION_BUTTON_HEIGHT           52 /* OS Units */
#define style_ACTION_BUTTON_FORECOL           7 /* black text */
#define style_ACTION_BUTTON_BACKCOL           1 /* v. light grey background */
#define style_ACTION_BUTTON_TYPE              wimp_BUTTON_CLICK
#define style_ACTION_BUTTON_CENTERING        (wimp_ICONFLAGS_HCENTRE | wimp_ICONFLAGS_VCENTRE)
#define style_ACTION_BUTTON_ICONFLAGS        (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_HAS_BORDER |\
                                              style_ACTION_BUTTON_CENTERING |\
                                              wimp_ICONFLAGS_FILLED |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_ACTION_BUTTON_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_ACTION_BUTTON_FORECOL) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_ACTION_BUTTON_BACKCOL)\
                                             )
#define style_ACTION_BUTTON_VALIDSTR         "R5,3;F17;AA~A"


#define style_DEFAULT_ACTION_HEIGHT          68 /* OS Units */
#define style_DEFAULT_ACTION_FORECOL          7 /* black text */
#define style_DEFAULT_ACTION_BACKCOL          1 /* v. light grey background */
#define style_DEFAULT_ACTION_TYPE             wimp_BUTTON_CLICK
#define style_DEFAULT_ACTION_CENTERING       (wimp_ICONFLAGS_HCENTRE | wimp_ICONFLAGS_VCENTRE)
#define style_DEFAULT_ACTION_ICONFLAGS       (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_HAS_BORDER |\
                                              style_DEFAULT_ACTION_CENTERING |\
                                              wimp_ICONFLAGS_FILLED |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_DEFAULT_ACTION_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_DEFAULT_ACTION_FORECOL) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_DEFAULT_ACTION_BACKCOL)\
                                             )
#define style_DEFAULT_ACTION_VALIDSTR        "R6,3;AA~A"


#define style_RADIO_BUTTON_HEIGHT            44 /* OS Units */
#define style_RADIO_BUTTON_FORECOL            7 /* black text */
#define style_RADIO_BUTTON_TYPE              wimp_BUTTON_CLICK
#define style_RADIO_BUTTON_TEXT_ICONFLAGS    (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_RADIO_BUTTON_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_RADIO_BUTTON_FORECOL) |\
                                              (wimp_ICONFLAGS_FORECOL * style_RADIO_BUTTON_FORECOL)\
                                             )
#define style_RADIO_BUTTON_TEXT_VALIDSTR     "f17"

#define style_RADIO_BUTTON_BUTTON_ICONFLAGS  (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_SPRITE |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_RADIO_BUTTON_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_RADIO_BUTTON_FORECOL)\
                                             )
#define style_RADIO_BUTTON_BUTTON_VALIDSTR   "Sradiooff,radioon"


#define style_OPTION_BUTTON_HEIGHT           44 /* OS Units */
#define style_OPTION_BUTTON_FORECOL           7 /* black text */
#define style_OPTION_BUTTON_BACKCOL           1 /* light grey, necessary since icon is semi-filled */
#define style_OPTION_BUTTON_TYPE             wimp_BUTTON_CLICK

#define style_OPTION_BUTTON_TEXT_ICONFLAGS   (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_OPTION_BUTTON_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_OPTION_BUTTON_FORECOL) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_OPTION_BUTTON_BACKCOL) \
                                             )
#define style_OPTION_BUTTON_TEXT_VALIDSTR    "f17"

#define style_OPTION_BUTTON_BUTTON_ICONFLAGS (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_SPRITE |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_OPTION_BUTTON_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_OPTION_BUTTON_FORECOL) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_OPTION_BUTTON_BACKCOL) \
                                             )
#define style_OPTION_BUTTON_BUTTON_VALIDSTR  "Soptoff,opton"



#define style_WRITABLE_FIELD_HEIGHT          52 /* OS Units */
#define style_WRITABLE_FIELD_FORECOL          7 /* black text */
#define style_WRITABLE_FIELD_BACKCOL          0 /* white background */
#define style_WRITABLE_FIELD_TYPE             wimp_BUTTON_WRITABLE

#ifdef DAYTONA_BUILD
#define style_WRITABLE_FIELD_ICONFLAGS       (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_FILLED |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_WRITABLE_FIELD_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_WRITABLE_FIELD_FORECOL) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_WRITABLE_FIELD_BACKCOL)\
                                             )
#else
#define style_WRITABLE_FIELD_ICONFLAGS       (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_HAS_BORDER |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_FILLED |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_WRITABLE_FIELD_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_WRITABLE_FIELD_FORECOL) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_WRITABLE_FIELD_BACKCOL)\
                                             )
#endif /* DAYTONA_BUILD */

#ifdef THICK_WRITABLE_BORDERS
#define style_WRITABLE_FIELD_VALIDSTR        "Pptr_write;R5;C//0/0/0/0" /* NOT Ktar! */
#else
#define style_WRITABLE_FIELD_VALIDSTR        "Pptr_write" /* NOT Ktar! */
#endif


#define style_DISPLAY_FIELD_HEIGHT           52 /* OS Units */
#define style_DISPLAY_FIELD_FORECOL          7 /* black text */
#define style_DISPLAY_FIELD_BACKCOL          1 /* v. light grey background */
#define style_DISPLAY_FIELD_TYPE             wimp_BUTTON_NEVER
#define style_DISPLAY_FIELD_ICONFLAGS        (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_HAS_BORDER |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_FILLED |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_DISPLAY_FIELD_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_DISPLAY_FIELD_FORECOL) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_DISPLAY_FIELD_BACKCOL)\
                                             )
#define style_DISPLAY_FIELD_VALIDSTR        "R2;f17"  /* make sure colours are ok when we come to ff */

#ifdef DAYTONA_BUILD
#define style_SLIDER_BORDERSIZE			4
#define style_HSLIDER_WELL_BACKCOL            7 /* black */
#define style_HSLIDER_WELL_TYPE              wimp_BUTTON_NEVER
#define style_HSLIDER_WELL_ICONFLAGS         (wimp_ICONFLAGS_FILLED |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_WELL_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_HSLIDER_WELL_BACKCOL)\
                                             )
#define style_HSLIDER_WELL_VALIDSTR          ""
#else /* DAYTONA_BUILD */
#define style_SLIDER_BORDERSIZE			12
//#define style_HSLIDER_HEIGHT                 40 /* OS Units */

//#define style_HSLIDER_WELL_HEIGHT            40 /* OS Units */
#define style_HSLIDER_WELL_BACKCOL            1 /* v. light grey */
#define style_HSLIDER_WELL_TYPE              wimp_BUTTON_NEVER
#define style_HSLIDER_WELL_ICONFLAGS         (wimp_ICONFLAGS_HAS_BORDER |\
                                              wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_WELL_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_HSLIDER_WELL_BACKCOL)\
                                             )
#define style_HSLIDER_WELL_VALIDSTR          "R2"
#endif /* DAYTONA_BUILD */

#define style_HSLIDER_BACKGND_HEIGHT         16 /* OS Units */
#define style_HSLIDER_BACKGND_BACKCOL         0 /* white */
#define style_HSLIDER_BACKGND_TYPE           wimp_BUTTON_CLICK_DRAG
#define style_HSLIDER_BACKGND_ICONFLAGS      (wimp_ICONFLAGS_FILLED |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_BACKGND_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_HSLIDER_BACKGND_BACKCOL)\
                                             )

#define style_HSLIDER_VALUE_HEIGHT           16 /* OS Units */
#define style_HSLIDER_VALUE_BACKCOL           5 /* grey as default - can be different - style guide does not define colour */
#define style_HSLIDER_VALUE_TYPE             wimp_BUTTON_CLICK_DRAG
#define style_HSLIDER_VALUE_ICONFLAGS        (wimp_ICONFLAGS_FILLED |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_VALUE_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_HSLIDER_VALUE_BACKCOL)\
                                             )

//#define style_VSLIDER_WIDTH                  20 /* OS Units */

//#define style_VSLIDER_WELL_WIDTH             20 /* OS Units */
#ifdef DAYTONA_BUILD
#define style_VSLIDER_WELL_BACKCOL            7 /* black */
#define style_VSLIDER_WELL_TYPE              wimp_BUTTON_NEVER
#define style_VSLIDER_WELL_ICONFLAGS         (wimp_ICONFLAGS_FILLED |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_HSLIDER_WELL_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_HSLIDER_WELL_BACKCOL)\
                                             )
#define style_VSLIDER_WELL_VALIDSTR          ""
#else /* DAYTONA_BUILD */
#define style_VSLIDER_WELL_BACKCOL            1 /* v. light grey */
#define style_VSLIDER_WELL_TYPE              wimp_BUTTON_NEVER
#define style_VSLIDER_WELL_ICONFLAGS         (wimp_ICONFLAGS_HAS_BORDER |\
                                              wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_VSLIDER_WELL_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_VSLIDER_WELL_BACKCOL)\
                                             )
#define style_VSLIDER_WELL_VALIDSTR          "R2"
#endif /* DAYTONA_BUILD */

#define style_VSLIDER_BACKGND_WIDTH          16 /* OS Units */
#define style_VSLIDER_BACKGND_BACKCOL         0 /* white */
#define style_VSLIDER_BACKGND_TYPE           wimp_BUTTON_CLICK_DRAG
#define style_VSLIDER_BACKGND_ICONFLAGS      (wimp_ICONFLAGS_FILLED |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_VSLIDER_BACKGND_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_VSLIDER_BACKGND_BACKCOL)\
                                             )

#define style_VSLIDER_VALUE_WIDTH            16 /* OS Units */
#define style_VSLIDER_VALUE_BACKCOL           5 /* grey as default - can be different - style guide does not define colour */
#define style_VSLIDER_VALUE_TYPE             wimp_BUTTON_CLICK_DRAG
#define style_VSLIDER_VALUE_ICONFLAGS        (wimp_ICONFLAGS_FILLED |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_VSLIDER_VALUE_TYPE) |\
                                              (wimp_ICONFLAGS_BACKCOL * style_VSLIDER_VALUE_BACKCOL)\
                                             )



#define style_ADJUSTER_ARROW_HEIGHT          32 /* OS Units */
#define style_ADJUSTER_ARROW_WIDTH           32 /* OS Units */
#define style_ADJUSTER_ARROW_GAP              8 /* OS Units */
#define style_ADJUSTER_ARROW_DOWN_VALIDSTR   "R5;sdown,pdown"
#define style_ADJUSTER_ARROW_UP_VALIDSTR     "R5;sup,pup"
#define style_ADJUSTER_ARROW_LEFT_VALIDSTR   "R5;sleft,pleft"
#define style_ADJUSTER_ARROW_RIGHT_VALIDSTR     "R5;sright,pright"

#define style_ADJUSTER_ARROW_TYPE            wimp_BUTTON_AUTO_REPEAT
#define style_ADJUSTER_ARROW_ICONFLAGS       (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_SPRITE |\
                                              wimp_ICONFLAGS_HCENTRE |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_ADJUSTER_ARROW_TYPE)\
                                             )


#define style_POPUP_MENU_HEIGHT              44 /* OS Units */
#define style_POPUP_MENU_WIDTH               44 /* OS Units */
#define style_POPUP_MENU_TYPE                wimp_BUTTON_CLICK
#define style_POPUP_MENU_ICONFLAGS           (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_SPRITE |\
                                              wimp_ICONFLAGS_HCENTRE |\
                                              wimp_ICONFLAGS_VCENTRE |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_POPUP_MENU_TYPE)\
                                             )
#define style_POPUP_MENU_VALIDSTR            "R5;sgright,pgright"


#define style_TEXT_LABEL_MAX_HEIGHT          40 /* OS Units */
#define style_TEXT_LABEL_FORECOL              7 /* black text */
#define style_TEXT_LABEL_TYPE                wimp_BUTTON_NEVER
#define style_TEXT_LABEL_ICONFLAGS           (wimp_ICONFLAGS_TEXT |\
                                              wimp_ICONFLAGS_INDIRECT |\
                                              (wimp_ICONFLAGS_BUTTON_TYPE * style_TEXT_LABEL_TYPE) |\
                                              (wimp_ICONFLAGS_FORECOL * style_TEXT_LABEL_FORECOL)\
                                             )

#endif

