/*- # X-BASED ABACUS # # Abacus.h # ### # # Copyright (c) 1994 - 2007 David Albert Bagley, bagleyd@tux.org # # Abacus demo and neat pointers from # Copyright (c) 1991 - 1998 Luis Fernandes, elf@ee.ryerson.ca # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and # that both that copyright notice and this permission notice appear in # supporting documentation, and that the name of the author not be # used in advertising or publicity pertaining to distribution of the # software without specific, written prior permission. # # This program is distributed in the hope that it will be "useful", # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # */ /* Public header file for Abacus */ #ifndef _XtAbacus_h #define _XtAbacus_h /*********************************************************************** * * Abacus Widget * ***********************************************************************/ #if 0 #define DEBUG 1 #endif #ifndef WINVER #define XtNmono ((char *) "mono") #define XtNframeColor ((char *) "frameColor") #define XtNsymbolColor ((char *) "symbolColor") #define XtNrailColor0 ((char *) "railColor0") #define XtNrailColor1 ((char *) "railColor1") #define XtNbeadColor0 ((char *) "beadColor0") #define XtNbeadColor1 ((char *) "beadColor1") #define XtNbeadBorder ((char *) "beadBorder") #define XtNdelay ((char *) "delay") #define XtNsound ((char *) "sound") #define XtNbumpSound ((char *) "bumpSound") #define XtNmoveSound ((char *) "moveSound") #define XtNbuffer ((char *) "buffer") #define XtNscript ((char *) "script") #define XtNdemo ((char *) "demo") #define XtNdemoPath ((char *) "demoPath") #define XtNdemoFont ((char *) "demoFont") #define XtNdemoForeground ((char *) "demoForeground") #define XtNdemoBackground ((char *) "demoBackground") #define XtNlee ((char *) "lee") #define XtNleftAuxRails ((char *) "leftAuxRails") #define XtNrightAuxRails ((char *) "rightAuxRails") #define XtNvertical ((char *) "vertical") #define XtNcolorScheme ((char *) "colorScheme") #define XtNslot ((char *) "slot") #define XtNdiamond ((char *) "diamond") #define XtNrailIndex ((char *) "railIndex") #define XtNtopOrient ((char *) "topOrient") #define XtNbottomOrient ((char *) "bottomOrient") #define XtNtopNumber ((char *) "topNumber") #define XtNbottomNumber ((char *) "bottomNumber") #define XtNtopFactor ((char *) "topFactor") #define XtNbottomFactor ((char *) "bottomFactor") #define XtNtopSpaces ((char *) "topSpaces") #define XtNbottomSpaces ((char *) "bottomSpaces") #define XtNtopPiece ((char *) "topPiece") #define XtNbottomPiece ((char *) "bottomPiece") #define XtNtopPiecePercent ((char *) "topPiecePercent") #define XtNbottomPiecePercent ((char *) "bottomPiecePercent") #define XtNshiftPercent ((char *) "shiftPercent") #define XtNsubdeck ((char *) "subdeck") #define XtNsubbead ((char *) "subbead") #define XtNsign ((char *) "sign") #define XtNdecimalPosition ((char *) "decimalPosition") #define XtNgroupSize ((char *) "groupSize") #define XtNrails ((char *) "rails") #define XtNbase ((char *) "base") #define XtNsubbase ((char *) "subbase") #define XtNanomaly ((char *) "anomaly") #define XtNshiftAnomaly ((char *) "shiftAnomaly") #define XtNanomalySq ((char *) "anomalySq") #define XtNshiftAnomalySq ((char *) "shiftAnomalySq") #define XtNdisplayBase ((char *) "displayBase") #define XtNromanNumerals ((char *) "romanNumerals") #define XtNgroup ((char *) "group") #define XtNmode ((char *) "mode") #define XtNformat ((char *) "format") #define XtNsubmode ((char *) "submode") #define XtNmuseum ((char *) "museum") #define XtNversionOnly ((char *) "versionOnly") #define XtNmenu ((char *) "menu") #define XtNdeck ((char *) "deck") #define XtNrail ((char *) "rail") #define XtNnumber ((char *) "number") #define XtNframed ((char *) "framed") #define XtNaux ((char *) "aux") #define XtNmathBuffer ((char *) "mathBuffer") #define XtNpixmapSize ((char *) "pixmapSize") #define XtNselectCallback ((char *) "selectCallback") #define XtCMono ((char *) "Mono") #define XtCFrameColor ((char *) "FrameColor") #define XtCSymbolColor ((char *) "SymbolColor") #define XtCRailColor0 ((char *) "RailColor0") #define XtCRailColor1 ((char *) "RailColor1") #define XtCBeadColor0 ((char *) "BeadColor0") #define XtCBeadColor1 ((char *) "BeadColor1") #define XtCBeadBorder ((char *) "BeadBorder") #define XtCDelay ((char *) "Delay") #define XtCSound ((char *) "Sound") #define XtCBumpSound ((char *) "BumpSound") #define XtCMoveSound ((char *) "MoveSound") #define XtCBuffer ((char *) "Buffer") #define XtCScript ((char *) "Script") #define XtCDemo ((char *) "Demo") #define XtCDemoPath ((char *) "DemoPath") #define XtCDemoFont ((char *) "DemoFont") #define XtCDemoForeground ((char *) "DemoForeground") #define XtCDemoBackground ((char *) "DemoBackground") #define XtCLee ((char *) "Lee") #define XtCLeftAuxRails ((char *) "LeftAuxRails") #define XtCRightAuxRails ((char *) "RightAuxRails") #define XtCVertical ((char *) "Vertical") #define XtCColorScheme ((char *) "ColorScheme") #define XtCSlot ((char *) "Slot") #define XtCDiamond ((char *) "Diamond") #define XtCRailIndex ((char *) "RailIndex") #define XtCTopOrient ((char *) "TopOrient") #define XtCBottomOrient ((char *) "BottomOrient") #define XtCTopNumber ((char *) "TopNumber") #define XtCBottomNumber ((char *) "BottomNumber") #define XtCTopFactor ((char *) "TopFactor") #define XtCBottomFactor ((char *) "BottomFactor") #define XtCTopSpaces ((char *) "TopSpaces") #define XtCBottomSpaces ((char *) "BottomSpaces") #define XtCTopPiece ((char *) "TopPiece") #define XtCBottomPiece ((char *) "BottomPiece") #define XtCTopPiecePercent ((char *) "TopPiecePercent") #define XtCBottomPiecePercent ((char *) "BottomPiecePercent") #define XtCShiftPercent ((char *) "ShiftPercent") #define XtCSubdeck ((char *) "Subdeck") #define XtCSubbead ((char *) "Subbead") #define XtCSign ((char *) "Sign") #define XtCDecimalPosition ((char *) "DecimalPosition") #define XtCGroupSize ((char *) "GroupSize") #define XtCRails ((char *) "Rails") #define XtCBase ((char *) "Base") #define XtCSubbase ((char *) "Subbase") #define XtCAnomaly ((char *) "Anomaly") #define XtCShiftAnomaly ((char *) "ShiftAnomaly") #define XtCAnomalySq ((char *) "AnomalySq") #define XtCShiftAnomalySq ((char *) "ShiftAnomalySq") #define XtCDisplayBase ((char *) "DisplayBase") #define XtCRomanNumerals ((char *) "RomanNumerals") #define XtCGroup ((char *) "Group") #define XtCMode ((char *) "Mode") #define XtCFormat ((char *) "Format") #define XtCSubmode ((char *) "Submode") #define XtCMuseum ((char *) "Museum") #define XtCMenu ((char *) "Menu") #define XtCDeck ((char *) "Deck") #define XtCRail ((char *) "Rail") #define XtCNumber ((char *) "Number") #define XtCFramed ((char *) "Framed") #define XtCAux ((char *) "Aux") #define XtCMathBuffer ((char *) "MathBuffer") #define XtCPixmapSize ((char *) "PixmapSize") typedef struct _AbacusClassRec *AbacusWidgetClass; typedef struct _AbacusDemoClassRec *AbacusDemoWidgetClass; extern WidgetClass abacusWidgetClass; extern WidgetClass abacusDemoWidgetClass; typedef struct { XEvent *event; int reason; char *buffer, *mathBuffer; int aux, deck, rail, number; } abacusCallbackStruct; #endif #define ACTION_EXIT 100 #define ACTION_HIDE 101 #define ACTION_BASE_DEFAULT 102 #define ACTION_DEMO_DEFAULT 103 #define ACTION_CLEAR_QUERY 104 #define ACTION_CALC 105 #define ACTION_SCRIPT 106 #define ACTION_MOVE 107 #define ACTION_CLEAR 200 #define ACTION_INCREMENT 201 #define ACTION_DECREMENT 202 #define ACTION_FORMAT 203 #define ACTION_MUSEUM 204 #define ACTION_ROMANNUMERAL 205 #define ACTION_GROUP 206 #define ACTION_SIGN 207 #define ACTION_QUARTER 208 #define ACTION_QUARTERPERCENT 209 #define ACTION_TWELFTH 210 #define ACTION_SUBDECK 211 #define ACTION_EIGHTH 212 #define ACTION_ANOMALY 213 #define ACTION_WATCH 214 #define ACTION_SPEED 215 #define ACTION_SLOW 216 #define ACTION_SOUND 217 #define ACTION_VERTICAL 218 #define ACTION_DEMO 300 #define ACTION_NEXT 301 #define ACTION_REPEAT 302 #define ACTION_JUMP 303 #define ACTION_MORE 304 #define ACTION_CHAPTER1 311 #define ACTION_CHAPTER2 312 #define ACTION_CHAPTER3 313 #define ACTION_CHAPTER4 314 #define ACTION_CHAPTER5 315 #define ACTION_CHAPTER6 316 #define ACTION_CHAPTER7 317 #define ACTION_CHAPTER8 318 #define ACTION_DESCRIPTION 900 #define ACTION_FEATURES 901 #define ACTION_REFERENCES 902 #define ACTION_ABOUT 903 #define ACTION_IGNORE 999 #define CALC_DECK (-8) #define MORE_DECK (-7) #define JUMP_DECK (-6) #define REPEAT_DECK (-5) #define NEXT_DECK (-4) #define CLEAR_DECK (-3) #define IGNORE_DECK (-1) #define MINRAILS 1 #define MINDEMORAILS 3 #define DEFAULTRAILS 13 #define DEFAULTTOPSPACES 2 #define DEFAULTBOTTOMSPACES 2 #define DEFAULTTOPNUMBER 2 #define DEFAULTBOTTOMNUMBER 5 #define DEFAULTTOPFACTOR 5 #define DEFAULTBOTTOMFACTOR 1 #define DEFAULTTOPORIENT TRUE #define DEFAULTBOTTOMORIENT FALSE #define MINBASE 2 /* Base 1 is rediculous :) */ #define MAXBASE 36 /* 10 numbers + 26 letters (ASCII) */ #define DEFAULTBASE 10 #define DEFAULTSUBDECKS 3 #define DEFAULTSUBBEADS 4 #define DEFAULTSHIFTPERCENT 2 #define DEFAULTSHIFTANOMALY 2 #define DEFAULTGROUPSIZE 3 #define SUBDECKSPACE 1 #define MAXMUSEUMS 3 #define IT 0 #define UK 1 #define FR 2 #define COLORMIDDLE 1 #define COLOR1STOFGROUP 2 #define COLORHALF 4 #define PRIMARY 0 #define LEFTAUX 1 #define RIGHTAUX 2 #ifdef MONOTEST #define DEFAULTMONO TRUE #else #define DEFAULTMONO FALSE #endif #define DEFAULTREVERSE FALSE #define CHINESE 0 #define JAPANESE 1 #define KOREAN 2 #define ROMAN 3 #define RUSSIAN 4 #define DANISH 5 #define OTHER 6 #define MAXFORMATS 6 #define MAXMODES 7 #define QUARTERS 4 #define QUARTERPERCENTS 4 #define TWELFTHS 12 #define EIGHTHS 8 typedef struct _AbacusRec *AbacusWidget; typedef struct _AbacusRec *AbacusDemoWidget; #endif /* _XtAbacus_h */ /* DON'T ADD STUFF AFTER THIS #endif */