/* 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.                    */
/***************************************************/

/* Define this if you want to display the Selected colour */
/* in the faked page.                                     */

#define ChoiceUseSelected

/* Choices main dialogue component IDs */

#define CDSet              0x2600
#define CDCancel           0x2601
#define CDSaveButton       0x2602

#define CDBrowseDefaults   0x2603
#define CDWindows          0x2604
#define CDColours          0x2605
#define CDFonts            0x2606
#define CDHotlist          0x2607
#define CDHistory          0x2608
#define CDSub6             0x2609
#define CDSub7             0x260a
#define CDSub8             0x260b

#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

/* Choices subwindows event codes */

#define ECD_EncodingMenuBt 0x2656

#define ECD_ColourButton   0x2690

#define ECD_HlSaveBt     0x26d1
#define ECD_HlDispBt     0x26d3

#define ECD_HiSaveBt     0x26f1
#define ECD_HiDispBt     0x26f3

/* Choices subwindows */

#define CDSubNone          -1
#define CDSubBrowseDefaults 0
#define CDSubWindows        1
#define CDSubColours        2
#define CDSubFonts          3
#define CDSubHotlist        4
#define CDSubHistory        5
#define CDSubSub6           6
#define CDSubSub7           7
#define CDSubSub8           8

#define CDNoSubwindows      9

/* Choices Subwindow component ids */

/* 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

/* In colours sub window: */

#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
#define CD_FakePage     0x269c

/* In fonts subwindow */

#define CD_Fontsbits    0x26b0

/* In hotlist 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_HiLines      0x26f4
#define CD_HiMaxSize    0x26f5

/* Display menu: */

#define CD_DispDesc     0x0000
#define CD_DispURL      0x0001

/* Save menu: */

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

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);