home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
util
/
cdity
/
yak
/
src
/
popup.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-10-13
|
15KB
|
531 lines
/*
* Source machine generated by GadToolsBox V2.0b
* which is (c) Copyright 1991-1993 Jaba Development
*
* GUI Designed by : Martin W Scott and Gaël Marziou
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#include <intuition/classes.h>
#include <intuition/classusr.h>
#include <intuition/imageclass.h>
#include <intuition/gadgetclass.h>
#include <intuition/intuitionbase.h>
#include <libraries/gadtools.h>
#include <graphics/displayinfo.h>
#include <graphics/gfxbase.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/gadtools.h>
#include <proto/graphics.h>
#include <proto/locale.h>
#include <proto/utility.h>
#include <string.h>
#include "code.h"
#include "version.h"
#include "yak.h"
#include "gui.h"
#define CATCOMP_NUMBERS
#include "locale/yak_locale_strings.h"
#ifdef BETA_VERSION
static UBYTE DisplayBetaRequester = TRUE;
#endif
extern struct Catalog *Catalog;
struct Screen *Scr = NULL;
UBYTE *PubScreenName;
APTR VisualInfo = NULL;
struct Window *RootWnd = NULL;
struct Gadget *RootGList = NULL;
struct Menu *RootMenus = NULL;
struct Gadget *RootGadgets[Root_CNT];
UWORD RootLeft = 0;
UWORD RootWidth = 586;
UWORD RootHeight = 138;
UWORD WindowTop;
UBYTE *RootWdt = NULL;
struct TextAttr *Font,Attr;
UWORD FontX,FontY;
UWORD OffX,OffY;
static BOOL GUIFirstOpening = TRUE;
#define ROOT_TNUM 2
struct IntuiText RootIText[ROOT_TNUM] =
{
2,0,JAM1,37,7,NULL,NULL,NULL,
2,0,JAM1,301,7,NULL,NULL,NULL,
};
static VOID
InitIText(VOID)
{
RootIText[0].IText = getString(TOGGLES_STRING);
RootIText[1].IText = getString(INCLUSION_PATTERNS_STRING);
BlankIText[0].IText = getString(TIMEOUT_STRING);
}
struct NewMenu RootNewMenu[] =
{
NM_TITLE,NULL,NULL,0,NULL,NULL,
NM_ITEM ,NULL,NULL,0,0L ,NULL,
NM_ITEM ,NULL,NULL,0,0L ,NULL,
NM_ITEM ,NULL,NULL,0,0L ,NULL,
NM_ITEM ,NULL,NULL,0,0L ,NULL,
NM_ITEM ,NULL,NULL,0,NULL,NULL,
NM_SUB ,NULL,NULL,0,0L ,NULL,
NM_SUB ,NULL,NULL,0,0L ,NULL,
NM_SUB ,NULL,NULL,0,0L ,NULL,
NM_SUB ,NULL,NULL,0,0L ,NULL,
NM_SUB ,NULL,NULL,0,0L ,NULL,
NM_END ,NULL,NULL,0,0L ,NULL
};
VOID InitRootNewMenu (VOID)
{
RootNewMenu[0].nm_Label = (STRPTR)getString(PROJECT_STRING);
RootNewMenu[1].nm_Label = (STRPTR)getString(LOAD_SETTINGS_STRING);
RootNewMenu[1].nm_CommKey = (STRPTR)getString(LOAD_SHORTCUT);
RootNewMenu[2].nm_Label = (STRPTR)getString(SAVE_SETTINGS_STRING);
RootNewMenu[2].nm_CommKey = (STRPTR)getString(SAVE_SHORTCUT);
RootNewMenu[3].nm_Label = (STRPTR)getString(HIDE_WINDOW_STRING);
RootNewMenu[3].nm_CommKey = (STRPTR)getString(HIDE_SHORTCUT);
RootNewMenu[4].nm_Label = (STRPTR)getString(QUIT_STRING);
RootNewMenu[4].nm_CommKey = (STRPTR)getString(QUIT_SHORTCUT);
RootNewMenu[5].nm_Label = (STRPTR)getString(Credits_STRING);
RootNewMenu[6].nm_Label = (STRPTR)getString(Credits_Line1_STRING);
RootNewMenu[7].nm_Label = (STRPTR)getString(Credits_Line2_STRING);
RootNewMenu[8].nm_Label = (STRPTR)getString(Credits_Line3_STRING);
RootNewMenu[9].nm_Label = (STRPTR)getString(Credits_Line4_STRING);
RootNewMenu[10].nm_Label = (STRPTR)getString(Credits_Line5_STRING);
}
UWORD RootGTypes[] =
{
BUTTON_KIND,
BUTTON_KIND,
CHECKBOX_KIND,
CHECKBOX_KIND,
CHECKBOX_KIND,
CHECKBOX_KIND,
CHECKBOX_KIND,
CHECKBOX_KIND,
CHECKBOX_KIND,
CHECKBOX_KIND,
BUTTON_KIND,
BUTTON_KIND,
STRING_KIND,
STRING_KIND,
STRING_KIND,
STRING_KIND,
CHECKBOX_KIND,
BUTTON_KIND,
CHECKBOX_KIND
};
struct NewGadget RootNGad[] =
{
226,121,175,14,NULL,NULL,GD_Hide ,PLACETEXT_IN ,NULL,NULL,
405,121,175,14,NULL,NULL,GD_Quit ,PLACETEXT_IN ,NULL,NULL,
6,15,26,11,NULL,NULL,GD_AutoCheck ,PLACETEXT_RIGHT,NULL,NULL,
6,39,26,11,NULL,NULL,GD_KeyActCheck ,PLACETEXT_RIGHT,NULL,NULL,
6,51,26,11,NULL,NULL,GD_CTFCheck ,PLACETEXT_RIGHT,NULL,NULL,
6,63,26,11,NULL,NULL,GD_CTBCheck ,PLACETEXT_RIGHT,NULL,NULL,
6,99,26,11,NULL,NULL,GD_ScrCycleCheck ,PLACETEXT_RIGHT,NULL,NULL,
6,111,26,11,NULL,NULL,GD_ScrActCheck ,PLACETEXT_RIGHT,NULL,NULL,
6,27,26,11,NULL,NULL,GD_AutoPopCheck ,PLACETEXT_RIGHT,NULL,NULL,
6,87,26,11,NULL,NULL,GD_RMBActCheck ,PLACETEXT_RIGHT,NULL,NULL,
405,105,175,14,NULL,NULL,GD_Miscellaneous,PLACETEXT_IN ,NULL,NULL,
226,105,175,14,NULL,NULL,GD_EditHotkeys ,PLACETEXT_IN ,NULL,NULL,
423,18,157,14,NULL,NULL,GD_AutoPat ,PLACETEXT_LEFT ,NULL,NULL,
423,33,157,14,NULL,NULL,GD_ClickPat ,PLACETEXT_LEFT ,NULL,NULL,
423,48,157,14,NULL,NULL,GD_PopPat ,PLACETEXT_LEFT ,NULL,NULL,
423,63,157,14,NULL,NULL,GD_ClickWinPat ,PLACETEXT_LEFT ,NULL,NULL,
6,75,26,11,NULL,NULL,GD_MMBActCheck ,PLACETEXT_RIGHT,NULL,NULL,
405,89,175,14,NULL,NULL,GD_Blanking ,PLACETEXT_IN ,NULL,NULL,
6,123,26,11,NULL,NULL,GD_MMBShiftCheck ,PLACETEXT_RIGHT,NULL,NULL
};
VOID InitRootNGad (VOID)
{
RootNGad[GD_Hide].ng_GadgetText = getString(HIDE_STRING);
RootNGad[GD_Quit].ng_GadgetText = getString(QUIT_STRING);
RootNGad[GD_AutoCheck].ng_GadgetText = getString(AUTOPOINT_STRING);
RootNGad[GD_KeyActCheck].ng_GadgetText = getString(KEY_ACTIVATE_STRING);
RootNGad[GD_CTFCheck].ng_GadgetText = getString(CLICK_TO_FRONT_STRING);
RootNGad[GD_CTBCheck].ng_GadgetText = getString(CLICK_TO_BACK_STRING);
RootNGad[GD_ScrCycleCheck].ng_GadgetText = getString(CYCLE_SCREENS_STRING);
RootNGad[GD_ScrActCheck].ng_GadgetText = getString(SCREEN_ACTIVATE_STRING);
RootNGad[GD_AutoPopCheck].ng_GadgetText = getString(AUTOPOPTOFRONT_STRING);
RootNGad[GD_RMBActCheck].ng_GadgetText = getString(RMB_ACTIVATE_STRING);
RootNGad[GD_Miscellaneous].ng_GadgetText = getString(MISCELLANEOUS_STRING);
RootNGad[GD_EditHotkeys].ng_GadgetText = getString(EDIT_HOTKEYS_STRING);
RootNGad[GD_AutoPat].ng_GadgetText = getString(AUTOSCREENS_STRING);
RootNGad[GD_ClickPat].ng_GadgetText = getString(CLICKSCREENS_STRING);
RootNGad[GD_PopPat].ng_GadgetText = getString(POPWINDOWS_STRING);
RootNGad[GD_ClickWinPat].ng_GadgetText = getString(CLICKWINDOWS_STRING);
RootNGad[GD_MMBActCheck].ng_GadgetText = getString(MMB_ACTIVATE_STRING);
RootNGad[GD_Blanking].ng_GadgetText = getString(Blanking);
RootNGad[GD_MMBShiftCheck].ng_GadgetText = getString(MMB_SHIFT_STRING);
}
VOID InitGUI (VOID)
{
static char title[80];
#ifdef BETA_VERSION
if (DisplayBetaRequester == TRUE)
{
PostError("This is " VERSION_NAME " beta version\nBuilt on " __AMIGADATE__);
DisplayBetaRequester = FALSE;
}
#endif
strcpy(title,VERSION_NAME ": ");
strcat(title,getString(Hotkey_Window_TITLE));
strcat(title,PopKeyStr);
strcat(title,">");
RootWdt = title;
HotKeyWdt = getString(EDIT_HOTKEYS_STRING);
MiscWdt = getString(MISCELLANEOUS_STRING);
BlankWdt = getString(Blanking);
InitOptions1Label ();
InitIText ();
InitRootNewMenu ();
InitRootNGad ();
InitActions1Nodes ();
InitHotKeyNGad ();
InitMiscNGad ();
InitMBMethod0Labels ();
InitBlankNGad ();
InitKeyDefNGad ();
InitClass0Labels ();
InitStroke0Labels ();
}
ULONG RootGTags[] =
{
(TAG_DONE),
(TAG_DONE),
(GTCB_Scaled),TRUE,(TAG_DONE),
(GTCB_Scaled),TRUE,(TAG_DONE),
(GTCB_Scaled),TRUE,(TAG_DONE),
(GTCB_Scaled),TRUE,(TAG_DONE),
(GTCB_Scaled),TRUE,(TAG_DONE),
(GTCB_Scaled),TRUE,(TAG_DONE),
(GTCB_Scaled),TRUE,