/* Copyright 1997 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.
 */
/***************************************************/
/* File   : Choices.h                              */
/*                                                 */
/* Purpose: Functions relating to the Choices      */
/*          dialogue box and related sub windows.  */
/*                                                 */
/* Author : D.T.A.Brown                            */
/*                                                 */
/* History: 23-Sep-97: Created.                    */
/***************************************************/

/* Choices main dialogue component IDs */

#define CDSet                 0x2600
#define CDCancel              0x2601
#define CDSaveButton          0x2602
#define CDFirstSubRadio       0x2603
#define CDPlaceHolder         0x260f

/* Choices main dialogue and menu event codes */

#define ECDSet                0x2600
#define ECDCancel             0x2601
#define ECDSaveButton         0x2602

#define ECDToBeShown          0x27ff
#define ECDHidden             0x27fe
#define ECDRG2                0x27fd
#define ECDSaveMenuClick      0x27fc
#define ECDDispMenuClick      0x27fb
#define ECDPlugMenuClick      0x27fa
#define ECDTimeMenuClick      0x27f9
#define ECDBordMenuClick      0x27f8
#define ECDHiRadioClick       0x27f7

/* Choices subwindows event codes */

#define ECD_EncodingMenuBt    0x2656

#define ECD_ColourButton      0x2690

#define ECD_FontButton        0x26b0

#define ECD_HlSaveBt          0x26d1
#define ECD_HlDispBt          0x26d3

#define ECD_HiSaveBt          0x26f1
#define ECD_HiDispBt          0x26f3

#define ECD_HiAgeTypeBt       0x26f8

#define ECD_ObjPlugBt         0x26c2

#define ECD_TabInnerBordBt    0x26c7
#define ECD_TabOuterBordBt    0x26ca

/* Choices subwindows */

#define CDSubNone             -1
#define CDNoSubwindows        9

/* Choices Subwindow component ids */

/* In all cases there may only be one of each */
/* of these components.                       */

/* In BrowseDefaults sub window: */

#define CD_Homepage           0x2650
#define CD_UnderlineLinks     0x2651
#define CD_UseDocColours      0x2652
#define CD_ShowForeground     0x2653
#define CD_ShowBackground     0x2654
#define CD_EncodingDisply     0x2655
#define CD_EncodingMenuBt     0x2656

/* In Windows sub window: */

#define CD_URLBar             0x2670
#define CD_StatusBar          0x2671
#define CD_ButtonBar          0x2672
#define CD_FullScreen         0x2673

#define CD_ClientPull         0x2674
#define CD_NetscapeEmu        0x2675
#define CD_FramesSupport      0x2676

/* In colours sub window: */

/* The colour display button MUST have a component id */
/* one less than it's equivalent menu button and      */
/* be in the same subwindow.                          */

#define CD_BackColour         0x2690
#define CD_BackColourBt       0x2691
#define CD_TextColour         0x2692
#define CD_TextColourBt       0x2693
#define CD_LinkColour         0x2694
#define CD_LinkColourBt       0x2695
#define CD_UsedColour         0x2696
#define CD_UsedColourBt       0x2697
#define CD_FolwColour         0x2698
#define CD_FolwColourBt       0x2699
#define CD_SlctColour         0x269a
#define CD_SlctColourBt       0x269b

/* The window in which the fake page button resides */
/* must not be auto redraw.                         */

#define CD_FakePage           0x269c

/* In fonts subwindow */

/* The display fields must have component id one */
/* less than their equivalent menu buttons and   */
/* be in the same subwindow.                     */

#define CD_FontsTF1Disp       0x26b0
#define CD_FontsTF1Bt         0x26b1
#define CD_FontsTF2Disp       0x26b2
#define CD_FontsTF2Bt         0x26b3
#define CD_FontsTF3Disp       0x26b4
#define CD_FontsTF3Bt         0x26b5
#define CD_FontsSize          0x26b6
#define CD_FontsSystem        0x26b7
#define CD_FontsTF1Labl       0x26b8
#define CD_FontsTF2Labl       0x26b9
#define CD_FontsTF3Labl       0x26ba
#define CD_FontsSzLabl1       0x26bb
#define CD_FontsSzLabl2       0x26bc
#define CD_FontsGroup1        0x26bd
#define CD_FontsAspect        0x26be
#define CD_FontsAspectLabl1   0x26bf
#define CD_FontsAspectLabl2   0x2730

/* In hotlist subwindow */

/* The Display fields must have component id one */
/* less than their equivalent menu buttons and   */
/* be in the same subwindow.                     */

#define CD_HlSaveDisp         0x26d0
#define CD_HlSaveBt           0x26d1
#define CD_HlDispDisp         0x26d2
#define CD_HlDispBt           0x26d3
#define CD_HlAutoOpen         0x26d4
#define CD_HlAutoScroll       0x26d5

/* In history subwindow */

#define CD_HiSaveDisp         0x26f0
#define CD_HiSaveBt           0x26f1
#define CD_HiDispDisp         0x26f2
#define CD_HiDispBt           0x26f3

#define CD_HiDontAge          0x26f4
#define CD_HiExpiryAgeLabl    0x26f5
#define CD_HiExpiryAge        0x26f6
#define CD_HiAgeTypeDisp      0x26f7
#define CD_HiAgeTypeBt        0x26f8

#define CD_HiDontSize         0x26f9
#define CD_HiMaxSizeLabl1     0x26fa
#define CD_HiMaxSize          0x26fb
#define CD_HiMaxSizeLabl2     0x26fc

#define CD_HiImDontAge        0x26fd
#define CD_HiImExpiryAgeLabl  0x26fe
#define CD_HiImExpiryAge      0x26ff
#define CD_HiImAgeTypeDisp    0x2720
#define CD_HiImAgeTypeBt      0x2721

#define CD_HiImDontSize       0x2722
#define CD_HiImMaxSizeLabl1   0x2723
#define CD_HiImMaxSize        0x2724
#define CD_HiImMaxSizeLabl2   0x2725

#define CD_HiRadPage          0x2726
#define CD_HiRadImage         0x2727

/* In Objects subwindow */

/* The ObjPlugDisp component must have a component id */
/* one less than the ObjPlugBt component.             */

#define CD_ObjHandle          0x26c0
#define CD_ObjPlugDisp        0x26c1
#define CD_ObjPlugBt          0x26c2
#define CD_ObjPlugLabl        0x26c3

/* Tables stuff (currently in objects window)         */

#define CD_TabSupport         0x26c4
#define CD_TabInnerBordLabl   0x26c5
#define CD_TabInnerBordDisp   0x26c6
#define CD_TabInnerBordBt     0x26c7
#define CD_TabOuterBordLabl   0x26c8
#define CD_TabOuterBordDisp   0x26c9
#define CD_TabOuterBordBt     0x26ca

/* In network subwindow */

#define CD_NetUseProxy        0x2700
#define CD_NetProxyAddr       0x2701
#define CD_NetProxyLabl       0x2702
#define CD_NetLaunchProxy     0x2703
#define CD_NetMaxImageFetch   0x2704

/* Display menu: */

#define CD_DispDesc           0x0000
#define CD_DispURL            0x0001

/* Save menu: */

#define CD_SaveNever          0x0000
#define CD_SaveOnExit         0x0001
#define CD_SaveAlways         0x0002

/* Plugin menu: */

#define CD_PlugDont           0x0000
#define CD_PlugRedraw         0x0001
#define CD_PlugASAP           0x0002

/* Time menu: */

#define CD_TimeMinutes        0x0000
#define CD_TimeHours          0x0001
#define CD_TimeDays           0x0002
#define CD_TimeWeeks          0x0003
#define CD_TimeMonths         0x0004

extern global_choices * new_choices;
extern ObjectId         choices_windowid;

int               choices_to_be_shown        (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int               choices_hidden             (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
_kernel_oserror * choices_set_encoding_field (void);
_kernel_oserror * choices_mode_change        (void);