forms.h
来自「Genetic Programing of music」· C头文件 代码 · 共 2,195 行 · 第 1/5 页
H
2,195 行
/* * forms.h $Revision: 0.81 $ $State: Exp $ * $Date: 1996/06/28 04:45:03 $ $Author: zhao $ * *. All XForms files as distributed in this package are * Copyright(c) 1995,1996 by T.C. Zhao and Mark Overmars. * ALL RIGHTS RESERVED. * * Permission to use, copy, and distribute this software verbatim * and in its entirety for non-commercial purposes and without fee, * is hereby granted, provided that the above copyright notice and * this permission notice appear in all copies and their documentation. * * This software may not be distributed 'bundled' with any other * products/systems without prior permission from the authors. * * This software may be modified for your own use, but modified versions * may not be distributed without prior consent of the authors. * * This software is provided "as is" without expressed or implied * warranty of any kind. *. * * Contact zhao@bloch.phys.uwm.edu or visit http://bragg.phys.uwm.edu/xforms * if you have questions about XForms * * ******** This file is generated automatically. DO NOT CHANGE ********* */#ifndef FL_FORMS_H#define FL_FORMS_H#define FL_VERSION 0#define FL_REVISION 81#define FL_FIXLEVEL 0#define FL_INCLUDE_VERSION (FL_VERSION * 1000 + FL_REVISION)#include <stdio.h>#include <string.h>#include <limits.h>#if defined(__cplusplus)extern "C"{#endif/* * $Id: Basic.h,v 0.81 1996/06/28 04:23:12 zhao Beta $ * * Basic definitions and limits. * Window system independent prototypes * * Modify with care * */#ifndef FL_BASIC_H#define FL_BASIC_H /* { *//* for compatibilities */#ifndef FALSE# define FALSE 0# define TRUE 1#endif/* some general constants */enum{ FL_ON = 1, FL_OK = 1, FL_VALID = 1, FL_PREEMPT = 1, FL_ALWAYS_ON = 2, FL_OFF = 0, FL_NONE = 0, FL_CANCEL = 0, FL_INVALID = 0, FL_IGNORE = -1};/* Max directory length */#ifndef FL_PATH_MAX# ifndef PATH_MAX# define FL_PATH_MAX 1024# else# define FL_PATH_MAX PATH_MAX# endif#endif /* !def FL_PATH_MAX *//* * The screen coordinate unit, FL_Coord, must be of signed type. Without * prototype support, a type other than integer might not work right. * If FL_Coord is float, FL_CoordIsFloat must be defined to be 1 so that * round-off error can be checked. **TODO Float not tested *** */typedef int FL_Coord;#define FL_CoordIsFloat 0 /* define this if FL_Coord is of type float */typedef unsigned long FL_COLOR;/* * Coordinates can be in pixels, milli-meters or points (1/72inch) */typedef enum{ FL_COORD_PIXEL, /* default, Pixel */ FL_COORD_MM, /* milli-meter */ FL_COORD_POINT, /* point */ FL_COORD_centiMM, /* one hundredth of a mm */ FL_COORD_centiPOINT /* one hundredth of a point */} FL_COORD_UNIT;/* * All object classes. */typedef enum{ FL_INVALID_CLASS, FL_BUTTON, FL_LIGHTBUTTON, FL_ROUNDBUTTON, FL_CHECKBUTTON, FL_BITMAPBUTTON, FL_PIXMAPBUTTON, FL_BITMAP, FL_PIXMAP, FL_BOX, FL_TEXT, FL_MENU, FL_CHART, FL_CHOICE, FL_COUNTER, FL_SLIDER, FL_VALSLIDER, FL_INPUT, FL_BROWSER, FL_DIAL, FL_TIMER, FL_CLOCK, FL_POSITIONER, FL_FREE, FL_XYPLOT, FL_FOLDERTAB, FL_CANVAS, FL_FRAME, FL_GLCANVAS /* only used by fdesign */} FL_CLASS;/* how to display a form onto screen */typedef enum{ FL_PLACE_FREE = 0, /* size remain resizable */ FL_PLACE_MOUSE = 1, /* mouse centered on form */ FL_PLACE_CENTER = 2, /* center of the screen */ FL_PLACE_POSITION = 4, /* specific size */ FL_PLACE_SIZE = 8, /* specific size */ FL_PLACE_GEOMETRY = 16, /* specific position */ FL_PLACE_ASPECT = 32, /* keep aspect ratio */ FL_PLACE_FULLSCREEN = 64, /* scale to fit screen */ FL_PLACE_HOTSPOT = 128, /* so mouse fall on (x,y) */ FL_PLACE_ICONIC = 256, /* modifier */ FL_FREE_SIZE = (1 << 14), FL_FIX_SIZE = (1 << 15)} FL_PLACE;#define FL_PLACE_FREE_CENTER (FL_PLACE_CENTER|FL_FREE_SIZE)#define FL_PLACE_CENTERFREE (FL_PLACE_CENTER|FL_FREE_SIZE)/* Window manager decoration request */typedef enum{ FL_TRANSIENT = -1, /* set TRANSIENT_FOR property */ FL_NOBORDER = 0, /* use override_redirect to supress decor. */ FL_FULLBORDER = 1 /* normal */} FL_DECORATION;/* All box types */typedef enum{ FL_NO_BOX, FL_UP_BOX, FL_DOWN_BOX, FL_BORDER_BOX, FL_SHADOW_BOX, FL_FRAME_BOX, FL_ROUNDED_BOX, FL_EMBOSSED_BOX, FL_FLAT_BOX, FL_RFLAT_BOX, FL_RSHADOW_BOX, FL_OVAL_BOX, FL_OSHADOW_BOX} FL_BOX_TYPE;/* How to place text relative to a box */typedef enum{ FL_ALIGN_CENTER, FL_ALIGN_TOP = 1, FL_ALIGN_BOTTOM = 2, FL_ALIGN_LEFT = 4, FL_ALIGN_RIGHT = 8, FL_ALIGN_TOP_LEFT = (FL_ALIGN_TOP | FL_ALIGN_LEFT), FL_ALIGN_TOP_RIGHT = (FL_ALIGN_TOP | FL_ALIGN_RIGHT), FL_ALIGN_BOTTOM_LEFT = (FL_ALIGN_BOTTOM | FL_ALIGN_LEFT), FL_ALIGN_BOTTOM_RIGHT = (FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT), FL_ALIGN_INSIDE = (1 << 13), FL_ALIGN_VERT = (1 << 14), /* not functional yet */ FL_ALIGN_LEFT_TOP = FL_ALIGN_TOP_LEFT, FL_ALIGN_RIGHT_TOP = FL_ALIGN_TOP_RIGHT, FL_ALIGN_LEFT_BOTTOM = FL_ALIGN_BOTTOM_LEFT, FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT} FL_ALIGN;/* control when to reutrn input, slider and dial object. */enum{ FL_RETURN_END_CHANGED = 0, FL_RETURN_CHANGED = 1, FL_RETURN_END = 2, FL_RETURN_ALWAYS = 3, FL_RETURN_DBLCLICK};/* * Some special color indeces for FL private colormap. It does not matter * what the value of each enum is, but it must start from 0 and be * consecutive. */typedef enum{ FL_BLACK, FL_RED, FL_GREEN, FL_YELLOW, FL_BLUE, FL_MAGENTA, FL_CYAN, FL_WHITE, FL_TOMATO, FL_INDIANRED, FL_SLATEBLUE, FL_COL1, FL_RIGHT_BCOL, FL_BOTTOM_BCOL, FL_TOP_BCOL, FL_LEFT_BCOL, FL_MCOL, FL_INACTIVE, FL_PALEGREEN, FL_DARKGOLD, FL_ORCHID, FL_DARKCYAN, FL_DARKTOMATO, FL_WHEAT, FL_DARKORANGE, FL_DEEPPINK, FL_CHARTREUSE, FL_DARKVIOLET, FL_SPRINGGREEN, FL_DOGERBLUE, FL_FREE_COL1 = 256, FL_FREE_COL2, FL_FREE_COL3, FL_FREE_COL4, FL_FREE_COL5, FL_FREE_COL6, FL_FREE_COL7, FL_FREE_COL8, FL_FREE_COL9, FL_FREE_COL10, FL_FREE_COL11, FL_FREE_COL12, FL_FREE_COL13, FL_FREE_COL14, FL_FREE_COL15, FL_FREE_COL16} FL_PD_COL;#define FL_BUILT_IN_COLS (FL_DOGERBLUE+1)#define FL_INACTIVE_COL FL_INACTIVE/* Some aliases for the color. This is actually backwards ... */#define FL_GRAY16 FL_RIGHT_BCOL#define FL_GRAY35 FL_BOTTOM_BCOL#define FL_GRAY80 FL_TOP_BCOL#define FL_GRAY90 FL_LEFT_BCOL#define FL_GRAY63 FL_COL1#define FL_GRAY75 FL_MCOL#define FL_LCOL FL_BLACK/* * Pop-up menu item attributes. NOTE if more than 8, need to change * choice and menu class where mode is kept by a single byte */enum{ FL_PUP_NONE, FL_PUP_GREY = 1, FL_PUP_BOX = 2, FL_PUP_CHECK = 4, FL_PUP_RADIO = 8};#define FL_PUP_GRAY FL_PUP_GREY#define FL_PUP_TOGGLE FL_PUP_BOX#define FL_PUP_INACTIVE FL_PUP_GREY/* Events that a form reacts to. */typedef enum{ FL_NOEVENT, FL_DRAW, FL_PUSH, FL_RELEASE, FL_ENTER, FL_LEAVE, FL_MOUSE, FL_FOCUS, FL_UNFOCUS, FL_KEYBOARD, FL_MOTION, FL_STEP, FL_SHORTCUT, FL_FREEMEM, FL_OTHER, /* property, selection etc */ FL_DRAWLABEL, FL_DBLCLICK, /* double click */ FL_TRPLCLICK, /* triple click */ FL_PS /* dump a form into EPS */} FL_EVENTS;#define FL_MOVE FL_MOTION /* for compatibility *//* Resize policies */typedef enum{ FL_RESIZE_NONE, FL_RESIZE_X, FL_RESIZE_Y} FL_RESIZE_T;#define FL_RESIZE_ALL (FL_RESIZE_X | FL_RESIZE_Y)/* Keyboard focus control */typedef enum{ FL_KEY_NORMAL = 1, /* normal keys(0-255) - tab +left/right */ FL_KEY_TAB = 2, /* normal keys + 4 direction cursor */ FL_KEY_SPECIAL = 4, /* only needs special keys(>255) */ FL_KEY_ALL = 7 /* all keys */} FL_KEY;#define FL_ALT_VAL (1L<<17) /* alt + Key --> FL_ALT_VAL + key *//* Internal use */typedef enum{ FL_FIND_INPUT, FL_FIND_AUTOMATIC, FL_FIND_MOUSE, FL_FIND_CANVAS, FL_FIND_KEYSPECIAL} FL_FIND;/******************************************************************* * FONTS ******************************************************************/#define FL_MAXFONTS 32 /* max number of fonts */typedef enum{ FL_INVALID_STYLE = -1, FL_NORMAL_STYLE, FL_BOLD_STYLE, FL_ITALIC_STYLE, FL_BOLDITALIC_STYLE, FL_FIXED_STYLE, FL_FIXEDBOLD_STYLE, FL_FIXEDITALIC_STYLE, FL_FIXEDBOLDITALIC_STYLE, FL_TIMES_STYLE, FL_TIMESBOLD_STYLE, FL_TIMESITALIC_STYLE, FL_TIMESBOLDITALIC_STYLE, /* The following are derived and must differ by multiples of SHADOW, i.e., (FL_ENGRAVED%SHADOW) == 0. All being 2^n has the benefit that (lstyle | FL_SHADOW) == (lstyle + FL_SHADOW). */ FL_SHADOW_STYLE = (1 << 17), FL_ENGRAVED_STYLE = (1 << 18), FL_EMBOSSED_STYLE = (1 << 19)} FL_TEXT_STYLE;#define FL_FONT_STYLE FL_TEXT_STYLE#define special_style(a) (a >=FL_SHADOW_STYLE &&\ a <= (FL_EMBOSSED_STYLE+FL_MAXFONTS))/* Standard sizes in XForms */#define FL_TINY_SIZE 8#define FL_SMALL_SIZE 10#define FL_NORMAL_SIZE 12#define FL_MEDIUM_SIZE 14#define FL_LARGE_SIZE 18#define FL_HUGE_SIZE 24#define FL_DEFAULT_SIZE FL_SMALL_SIZE/* Defines for compatibility */#define FL_TINY_FONT FL_TINY_SIZE#define FL_SMALL_FONT FL_SMALL_SIZE#define FL_NORMAL_FONT FL_NORMAL_SIZE#define FL_MEDIUM_FONT FL_MEDIUM_SIZE#define FL_LARGE_FONT FL_LARGE_SIZE#define FL_HUGE_FONT FL_HUGE_SIZE#define FL_NORMAL_FONT1 FL_SMALL_FONT#define FL_NORMAL_FONT2 FL_NORMAL_FONT#define FL_DEFAULT_FONT FL_SMALL_FONT#define FL_BOUND_WIDTH (FL_Coord)3 /* Border width of boxes */#define FL_BEGIN_GROUP 10000#define FL_END_GROUP 20000/* * Definition of basic struct that holds an object */#define FL_CLICK_TIMEOUT 350 /* double click interval */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?