set svn:eol-style=native for Externals/**.h

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1437 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
bushing
2008-12-08 04:36:27 +00:00
parent bbb98d8e2e
commit e6fe5ec42f
757 changed files with 228654 additions and 228654 deletions

View File

@@ -1,28 +1,28 @@
/* $VER: ppc_disasm V0.1 (23.05.1998) /* $VER: ppc_disasm V0.1 (23.05.1998)
* *
* Disassembler module for the PowerPC microprocessor family * Disassembler module for the PowerPC microprocessor family
* Copyright (c) 1998-2000 Frank Wille * Copyright (c) 1998-2000 Frank Wille
* *
* ppc_disasm.c is freeware and may be freely redistributed as long as * ppc_disasm.c is freeware and may be freely redistributed as long as
* no modifications are made and nothing is charged for it. * no modifications are made and nothing is charged for it.
* Non-commercial usage is allowed without any restrictions. * Non-commercial usage is allowed without any restrictions.
* EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE * EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
* SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR. * SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
* *
* *
* v0.1 (23.05.1998) phx * v0.1 (23.05.1998) phx
* First version, which implements all PowerPC instructions. * First version, which implements all PowerPC instructions.
* v0.0 (09.05.1998) phx * v0.0 (09.05.1998) phx
* File created. * File created.
*/ */
// Yeah, this does not really belong in bochs_disasm, but hey, it's a disasm and it needed a common location... // Yeah, this does not really belong in bochs_disasm, but hey, it's a disasm and it needed a common location...
#ifndef _POWERPC_DISASM #ifndef _POWERPC_DISASM
#define _POWERPC_DISASM #define _POWERPC_DISASM
const char *DisassembleGekko(unsigned int opcode, unsigned int curInstAddr); const char *DisassembleGekko(unsigned int opcode, unsigned int curInstAddr);
const char *GetGRPName(unsigned int index); const char *GetGRPName(unsigned int index);
#endif #endif

View File

@@ -1,41 +1,41 @@
#ifndef _BOCHS_CONFIG_H #ifndef _BOCHS_CONFIG_H
#define _BOCHS_CONFIG_H #define _BOCHS_CONFIG_H
#ifdef _WIN32 #ifdef _WIN32
typedef signed __int8 Bit8s; typedef signed __int8 Bit8s;
typedef signed __int16 Bit16s; typedef signed __int16 Bit16s;
typedef signed __int32 Bit32s; typedef signed __int32 Bit32s;
typedef signed __int64 Bit64s; typedef signed __int64 Bit64s;
typedef unsigned __int8 Bit8u; typedef unsigned __int8 Bit8u;
typedef unsigned __int16 Bit16u; typedef unsigned __int16 Bit16u;
typedef unsigned __int32 Bit32u; typedef unsigned __int32 Bit32u;
typedef unsigned __int64 Bit64u; typedef unsigned __int64 Bit64u;
typedef bool bx_bool; typedef bool bx_bool;
typedef Bit64u bx_address; typedef Bit64u bx_address;
#define BX_CPP_INLINE inline #define BX_CPP_INLINE inline
#else #else
#include <stdint.h> #include <stdint.h>
typedef int8_t Bit8s; typedef int8_t Bit8s;
typedef int16_t Bit16s; typedef int16_t Bit16s;
typedef int32_t Bit32s; typedef int32_t Bit32s;
typedef int64_t Bit64s; typedef int64_t Bit64s;
typedef uint8_t Bit8u; typedef uint8_t Bit8u;
typedef uint16_t Bit16u; typedef uint16_t Bit16u;
typedef uint32_t Bit32u; typedef uint32_t Bit32u;
typedef uint64_t Bit64u; typedef uint64_t Bit64u;
typedef bool bx_bool; typedef bool bx_bool;
typedef Bit64u bx_address; typedef Bit64u bx_address;
#define BX_CPP_INLINE inline #define BX_CPP_INLINE inline
#endif #endif
#endif #endif

View File

@@ -1,18 +1,18 @@
// stdafx.h : include file for standard system include files, // stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but // or project specific include files that are used frequently, but
// are changed infrequently // are changed infrequently
// //
#pragma once #pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _CRT_SECURE_NO_DEPRECATE 1 #define _CRT_SECURE_NO_DEPRECATE 1
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>
// TODO: reference additional headers your program requires here // TODO: reference additional headers your program requires here

1410
Externals/Cg/cg.h vendored

File diff suppressed because it is too large Load Diff

846
Externals/Cg/cgGL.h vendored
View File

@@ -1,423 +1,423 @@
/* /*
* *
* Copyright (c) 2002-2007, NVIDIA Corporation. * Copyright (c) 2002-2007, NVIDIA Corporation.
* *
* *
* *
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation, * of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes * modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do * acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software. * not use, install, modify or redistribute this NVIDIA software.
* *
* *
* *
* In consideration of your agreement to abide by the following terms, and * In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license, * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA * Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms; * Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the * provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and * copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the * disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without * to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated * specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted * in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be * by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA * infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder. * Software may be incorporated. No hardware is licensed hereunder.
* *
* *
* *
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
* *
* *
* *
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
#ifndef _cggl_h #ifndef _cggl_h
#define _cggl_h #define _cggl_h
#include <Cg/cg.h> #include <Cg/cg.h>
#ifdef _WIN32 #ifdef _WIN32
# ifndef APIENTRY /* From Win32's <windef.h> */ # ifndef APIENTRY /* From Win32's <windef.h> */
# define CGGL_APIENTRY_DEFINED # define CGGL_APIENTRY_DEFINED
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
# define APIENTRY __stdcall # define APIENTRY __stdcall
# else # else
# define APIENTRY # define APIENTRY
# endif # endif
# endif # endif
# ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */ # ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */
# define CGGL_WINGDIAPI_DEFINED # define CGGL_WINGDIAPI_DEFINED
# define WINGDIAPI __declspec(dllimport) # define WINGDIAPI __declspec(dllimport)
# endif # endif
#endif /* _WIN32 */ #endif /* _WIN32 */
/* Set up for either Win32 import/export/lib. */ /* Set up for either Win32 import/export/lib. */
#ifndef CGGL_API #ifndef CGGL_API
# ifdef _WIN32 # ifdef _WIN32
# ifdef CGGL_EXPORTS # ifdef CGGL_EXPORTS
# define CGGL_API __declspec(dllexport) # define CGGL_API __declspec(dllexport)
# elif defined (CG_LIB) # elif defined (CG_LIB)
# define CGGL_API # define CGGL_API
# else # else
# define CGGL_API __declspec(dllimport) # define CGGL_API __declspec(dllimport)
# endif # endif
# else # else
# define CGGL_API # define CGGL_API
# endif # endif
#endif #endif
#ifndef CGGLENTRY #ifndef CGGLENTRY
# ifdef _WIN32 # ifdef _WIN32
# define CGGLENTRY __cdecl # define CGGLENTRY __cdecl
# else # else
# define CGGLENTRY # define CGGLENTRY
# endif # endif
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#else #else
#include <GL/gl.h> #include <GL/gl.h>
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*****************************************************************************/ /*****************************************************************************/
/*** cgGL Type Definitions ***/ /*** cgGL Type Definitions ***/
/*****************************************************************************/ /*****************************************************************************/
typedef enum typedef enum
{ {
CG_GL_MATRIX_IDENTITY = 0, CG_GL_MATRIX_IDENTITY = 0,
CG_GL_MATRIX_TRANSPOSE = 1, CG_GL_MATRIX_TRANSPOSE = 1,
CG_GL_MATRIX_INVERSE = 2, CG_GL_MATRIX_INVERSE = 2,
CG_GL_MATRIX_INVERSE_TRANSPOSE = 3, CG_GL_MATRIX_INVERSE_TRANSPOSE = 3,
CG_GL_MODELVIEW_MATRIX, CG_GL_MODELVIEW_MATRIX,
CG_GL_PROJECTION_MATRIX, CG_GL_PROJECTION_MATRIX,
CG_GL_TEXTURE_MATRIX, CG_GL_TEXTURE_MATRIX,
CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MODELVIEW_PROJECTION_MATRIX,
CG_GL_VERTEX, CG_GL_VERTEX,
CG_GL_FRAGMENT, CG_GL_FRAGMENT,
CG_GL_GEOMETRY CG_GL_GEOMETRY
} CGGLenum; } CGGLenum;
#ifndef CGGL_EXPLICIT #ifndef CGGL_EXPLICIT
/****************************************************************************** /******************************************************************************
*** Profile Functions *** Profile Functions
*****************************************************************************/ *****************************************************************************/
CGGL_API CGbool CGGLENTRY cgGLIsProfileSupported(CGprofile profile); CGGL_API CGbool CGGLENTRY cgGLIsProfileSupported(CGprofile profile);
CGGL_API void CGGLENTRY cgGLEnableProfile(CGprofile profile); CGGL_API void CGGLENTRY cgGLEnableProfile(CGprofile profile);
CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile); CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile);
CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type); CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type);
CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile); CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile);
/****************************************************************************** /******************************************************************************
*** Program Managment Functions *** Program Managment Functions
*****************************************************************************/ *****************************************************************************/
CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program); CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program);
CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program); CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program);
CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program); CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program);
CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile); CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile);
CGGL_API GLuint CGGLENTRY cgGLGetProgramID(CGprogram program); CGGL_API GLuint CGGLENTRY cgGLGetProgramID(CGprogram program);
/****************************************************************************** /******************************************************************************
*** Parameter Managment Functions *** Parameter Managment Functions
*****************************************************************************/ *****************************************************************************/
CGGL_API void CGGLENTRY cgGLSetParameter1f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter1f(CGparameter param,
float x); float x);
CGGL_API void CGGLENTRY cgGLSetParameter2f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter2f(CGparameter param,
float x, float x,
float y); float y);
CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param,
float x, float x,
float y, float y,
float z); float z);
CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param,
float x, float x,
float y, float y,
float z, float z,
float w); float w);
CGGL_API void CGGLENTRY cgGLSetParameter1fv(CGparameter param, const float *v); CGGL_API void CGGLENTRY cgGLSetParameter1fv(CGparameter param, const float *v);
CGGL_API void CGGLENTRY cgGLSetParameter2fv(CGparameter param, const float *v); CGGL_API void CGGLENTRY cgGLSetParameter2fv(CGparameter param, const float *v);
CGGL_API void CGGLENTRY cgGLSetParameter3fv(CGparameter param, const float *v); CGGL_API void CGGLENTRY cgGLSetParameter3fv(CGparameter param, const float *v);
CGGL_API void CGGLENTRY cgGLSetParameter4fv(CGparameter param, const float *v); CGGL_API void CGGLENTRY cgGLSetParameter4fv(CGparameter param, const float *v);
CGGL_API void CGGLENTRY cgGLSetParameter1d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter1d(CGparameter param,
double x); double x);
CGGL_API void CGGLENTRY cgGLSetParameter2d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter2d(CGparameter param,
double x, double x,
double y); double y);
CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param,
double x, double x,
double y, double y,
double z); double z);
CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param,
double x, double x,
double y, double y,
double z, double z,
double w); double w);
CGGL_API void CGGLENTRY cgGLSetParameter1dv(CGparameter param, const double *v); CGGL_API void CGGLENTRY cgGLSetParameter1dv(CGparameter param, const double *v);
CGGL_API void CGGLENTRY cgGLSetParameter2dv(CGparameter param, const double *v); CGGL_API void CGGLENTRY cgGLSetParameter2dv(CGparameter param, const double *v);
CGGL_API void CGGLENTRY cgGLSetParameter3dv(CGparameter param, const double *v); CGGL_API void CGGLENTRY cgGLSetParameter3dv(CGparameter param, const double *v);
CGGL_API void CGGLENTRY cgGLSetParameter4dv(CGparameter param, const double *v); CGGL_API void CGGLENTRY cgGLSetParameter4dv(CGparameter param, const double *v);
CGGL_API void CGGLENTRY cgGLGetParameter1f(CGparameter param, float *v); CGGL_API void CGGLENTRY cgGLGetParameter1f(CGparameter param, float *v);
CGGL_API void CGGLENTRY cgGLGetParameter2f(CGparameter param, float *v); CGGL_API void CGGLENTRY cgGLGetParameter2f(CGparameter param, float *v);
CGGL_API void CGGLENTRY cgGLGetParameter3f(CGparameter param, float *v); CGGL_API void CGGLENTRY cgGLGetParameter3f(CGparameter param, float *v);
CGGL_API void CGGLENTRY cgGLGetParameter4f(CGparameter param, float *v); CGGL_API void CGGLENTRY cgGLGetParameter4f(CGparameter param, float *v);
CGGL_API void CGGLENTRY cgGLGetParameter1d(CGparameter param, double *v); CGGL_API void CGGLENTRY cgGLGetParameter1d(CGparameter param, double *v);
CGGL_API void CGGLENTRY cgGLGetParameter2d(CGparameter param, double *v); CGGL_API void CGGLENTRY cgGLGetParameter2d(CGparameter param, double *v);
CGGL_API void CGGLENTRY cgGLGetParameter3d(CGparameter param, double *v); CGGL_API void CGGLENTRY cgGLGetParameter3d(CGparameter param, double *v);
CGGL_API void CGGLENTRY cgGLGetParameter4d(CGparameter param, double *v); CGGL_API void CGGLENTRY cgGLGetParameter4d(CGparameter param, double *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const float *v); const float *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const float *v); const float *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const float *v); const float *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const float *v); const float *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const double *v); const double *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const double *v); const double *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const double *v); const double *v);
CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const double *v); const double *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
float *v); float *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
float *v); float *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
float *v); float *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param,
long offset, long offset,
long nelements, long nelements,
float *v); float *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
double *v); double *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
double *v); double *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
double *v); double *v);
CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param, CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param,
long offset, long offset,
long nelements, long nelements,
double *v); double *v);
CGGL_API void CGGLENTRY cgGLSetParameterPointer(CGparameter param, CGGL_API void CGGLENTRY cgGLSetParameterPointer(CGparameter param,
GLint fsize, GLint fsize,
GLenum type, GLenum type,
GLsizei stride, GLsizei stride,
const GLvoid *pointer); const GLvoid *pointer);
CGGL_API void CGGLENTRY cgGLEnableClientState(CGparameter param); CGGL_API void CGGLENTRY cgGLEnableClientState(CGparameter param);
CGGL_API void CGGLENTRY cgGLDisableClientState(CGparameter param); CGGL_API void CGGLENTRY cgGLDisableClientState(CGparameter param);
/****************************************************************************** /******************************************************************************
*** Matrix Parameter Managment Functions *** Matrix Parameter Managment Functions
*****************************************************************************/ *****************************************************************************/
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdr(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterdr(CGparameter param,
const double *matrix); const double *matrix);
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfr(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterfr(CGparameter param,
const float *matrix); const float *matrix);
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdc(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterdc(CGparameter param,
const double *matrix); const double *matrix);
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfc(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterfc(CGparameter param,
const float *matrix); const float *matrix);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdr(CGparameter param, double *matrix); CGGL_API void CGGLENTRY cgGLGetMatrixParameterdr(CGparameter param, double *matrix);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfr(CGparameter param, float *matrix); CGGL_API void CGGLENTRY cgGLGetMatrixParameterfr(CGparameter param, float *matrix);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdc(CGparameter param, double *matrix); CGGL_API void CGGLENTRY cgGLGetMatrixParameterdc(CGparameter param, double *matrix);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfc(CGparameter param, float *matrix); CGGL_API void CGGLENTRY cgGLGetMatrixParameterfc(CGparameter param, float *matrix);
CGGL_API void CGGLENTRY cgGLSetStateMatrixParameter(CGparameter param, CGGL_API void CGGLENTRY cgGLSetStateMatrixParameter(CGparameter param,
CGGLenum matrix, CGGLenum matrix,
CGGLenum transform); CGGLenum transform);
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const float *matrices); const float *matrices);
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const float *matrices); const float *matrices);
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const double *matrices); const double *matrices);
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param, CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param,
long offset, long offset,
long nelements, long nelements,
const double *matrices); const double *matrices);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param, CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param,
long offset, long offset,
long nelements, long nelements,
float *matrices); float *matrices);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param, CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param,
long offset, long offset,
long nelements, long nelements,
float *matrices); float *matrices);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param, CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param,
long offset, long offset,
long nelements, long nelements,
double *matrices); double *matrices);
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param, CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param,
long offset, long offset,
long nelements, long nelements,
double *matrices); double *matrices);
/****************************************************************************** /******************************************************************************
*** Texture Parameter Managment Functions *** Texture Parameter Managment Functions
*****************************************************************************/ *****************************************************************************/
CGGL_API void CGGLENTRY cgGLSetTextureParameter(CGparameter param, GLuint texobj); CGGL_API void CGGLENTRY cgGLSetTextureParameter(CGparameter param, GLuint texobj);
CGGL_API GLuint CGGLENTRY cgGLGetTextureParameter(CGparameter param); CGGL_API GLuint CGGLENTRY cgGLGetTextureParameter(CGparameter param);
CGGL_API void CGGLENTRY cgGLEnableTextureParameter(CGparameter param); CGGL_API void CGGLENTRY cgGLEnableTextureParameter(CGparameter param);
CGGL_API void CGGLENTRY cgGLDisableTextureParameter(CGparameter param); CGGL_API void CGGLENTRY cgGLDisableTextureParameter(CGparameter param);
CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param); CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param);
CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag); CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag);
CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx); CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx);
CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj); CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj);
CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext); CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext);
CGGL_API void CGGLENTRY cgGLEnableProgramProfiles( CGprogram program ); CGGL_API void CGGLENTRY cgGLEnableProgramProfiles( CGprogram program );
CGGL_API void CGGLENTRY cgGLDisableProgramProfiles( CGprogram program ); CGGL_API void CGGLENTRY cgGLDisableProgramProfiles( CGprogram program );
/****************************************************************************** /******************************************************************************
*** Misc Functions *** Misc Functions
*****************************************************************************/ *****************************************************************************/
CGGL_API void CGGLENTRY cgGLSetDebugMode( CGbool debug ); CGGL_API void CGGLENTRY cgGLSetDebugMode( CGbool debug );
/****************************************************************************** /******************************************************************************
*** Buffer Functions *** Buffer Functions
*****************************************************************************/ *****************************************************************************/
CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage); CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage);
CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer); CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#ifdef CGGL_APIENTRY_DEFINED #ifdef CGGL_APIENTRY_DEFINED
# undef CGGL_APIENTRY_DEFINED # undef CGGL_APIENTRY_DEFINED
# undef APIENTRY # undef APIENTRY
#endif #endif
#ifdef CGGL_WINGDIAPI_DEFINED #ifdef CGGL_WINGDIAPI_DEFINED
# undef CGGL_WINGDIAPI_DEFINED # undef CGGL_WINGDIAPI_DEFINED
# undef WINGDIAPI # undef WINGDIAPI
#endif #endif
#endif #endif

View File

@@ -1,70 +1,70 @@
/* /*
* *
* Copyright (c) 2002-2007, NVIDIA Corporation. * Copyright (c) 2002-2007, NVIDIA Corporation.
* *
* *
* *
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation, * of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes * modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do * acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software. * not use, install, modify or redistribute this NVIDIA software.
* *
* *
* *
* In consideration of your agreement to abide by the following terms, and * In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license, * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA * Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms; * Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the * provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and * copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the * disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without * to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated * specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted * in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be * by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA * infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder. * Software may be incorporated. No hardware is licensed hereunder.
* *
* *
* *
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
* *
* *
* *
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
CG_PROFILE_MACRO(Vertex,vp20,VP20,"vp20",6146,1) CG_PROFILE_MACRO(Vertex,vp20,VP20,"vp20",6146,1)
CG_PROFILE_MACRO(Fragment20,fp20,FP20,"fp20",6147,0) CG_PROFILE_MACRO(Fragment20,fp20,FP20,"fp20",6147,0)
CG_PROFILE_MACRO(Vertex30,vp30,VP30,"vp30",6148,1) CG_PROFILE_MACRO(Vertex30,vp30,VP30,"vp30",6148,1)
CG_PROFILE_MACRO(Fragment,fp30,FP30,"fp30",6149,0) CG_PROFILE_MACRO(Fragment,fp30,FP30,"fp30",6149,0)
CG_PROFILE_MACRO(ARBVertex,arbvp1,ARBVP1,"arbvp1",6150,1) CG_PROFILE_MACRO(ARBVertex,arbvp1,ARBVP1,"arbvp1",6150,1)
CG_PROFILE_MACRO(Fragment40,fp40,FP40,"fp40",6151,0) CG_PROFILE_MACRO(Fragment40,fp40,FP40,"fp40",6151,0)
CG_PROFILE_MACRO(ARBFragment,arbfp1,ARBFP1,"arbfp1",7000,0) CG_PROFILE_MACRO(ARBFragment,arbfp1,ARBFP1,"arbfp1",7000,0)
CG_PROFILE_MACRO(Vertex40,vp40,VP40,"vp40",7001,1) CG_PROFILE_MACRO(Vertex40,vp40,VP40,"vp40",7001,1)
CG_PROFILE_MACRO(GLSLVertex,glslv,GLSLV,"glslv",7007,1) CG_PROFILE_MACRO(GLSLVertex,glslv,GLSLV,"glslv",7007,1)
CG_PROFILE_MACRO(GLSLFragment,glslf,GLSLF,"glslf",7008,0) CG_PROFILE_MACRO(GLSLFragment,glslf,GLSLF,"glslf",7008,0)
CG_PROFILE_MACRO(GLSLCombined, glslc, GLSLC, "glslc", 7009, 0) CG_PROFILE_MACRO(GLSLCombined, glslc, GLSLC, "glslc", 7009, 0)
CG_PROFILE_MACRO(GPUFragment,gpu_fp,GPU_FP,"gp4fp",7010,0) CG_PROFILE_MACRO(GPUFragment,gpu_fp,GPU_FP,"gp4fp",7010,0)
CG_PROFILE_MACRO(GPUVertex,gpu_vp,GPU_VP,"gp4vp",7011,1) CG_PROFILE_MACRO(GPUVertex,gpu_vp,GPU_VP,"gp4vp",7011,1)
CG_PROFILE_MACRO(GPUGeometry,gpu_gp,GPU_GP,"gp4gp",7012,0) CG_PROFILE_MACRO(GPUGeometry,gpu_gp,GPU_GP,"gp4gp",7012,0)
#ifndef CG_IN_PROFILES_INCLUDE #ifndef CG_IN_PROFILES_INCLUDE
# undef CG_PROFILE_MACRO # undef CG_PROFILE_MACRO
#endif #endif

View File

@@ -1,382 +1,382 @@
/* /*
* *
* Copyright (c) 2002-2007, NVIDIA Corporation. * Copyright (c) 2002-2007, NVIDIA Corporation.
* *
* *
* *
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation, * of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes * modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do * acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software. * not use, install, modify or redistribute this NVIDIA software.
* *
* *
* *
* In consideration of your agreement to abide by the following terms, and * In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license, * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA * Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms; * Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the * provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and * copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the * disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without * to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated * specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted * in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be * by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA * infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder. * Software may be incorporated. No hardware is licensed hereunder.
* *
* *
* *
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
* *
* *
* *
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
/* /*
* The following macro invocations define the supported CG basic hardware * The following macro invocations define the supported CG basic hardware
* bind locations. * bind locations.
* *
* The macros have the form : * The macros have the form :
* *
* CG_BINDLOCATION_MACRO(name, compiler_name, enum_int) * CG_BINDLOCATION_MACRO(name, compiler_name, enum_int)
* *
* name : The name of the location. * name : The name of the location.
* enum_name : The C enumerant. * enum_name : The C enumerant.
* compiler_name : The name of the location within the compiler syntax. * compiler_name : The name of the location within the compiler syntax.
* int_id : Integer enumerant associated with this bind location. * int_id : Integer enumerant associated with this bind location.
* (3256 is reservered for CG_UNDEFINED) * (3256 is reservered for CG_UNDEFINED)
* addressable : The bind location must have an integer address * addressable : The bind location must have an integer address
* associated with it. * associated with it.
* ParamType : the cgParamType of this register. * ParamType : the cgParamType of this register.
* *
*/ */
CG_BINDLOCATION_MACRO(TexUnit0,CG_TEXUNIT0,"texunit 0",2048,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit0,CG_TEXUNIT0,"texunit 0",2048,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit1,CG_TEXUNIT1,"texunit 1",2049,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit1,CG_TEXUNIT1,"texunit 1",2049,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit2,CG_TEXUNIT2,"texunit 2",2050,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit2,CG_TEXUNIT2,"texunit 2",2050,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit3,CG_TEXUNIT3,"texunit 3",2051,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit3,CG_TEXUNIT3,"texunit 3",2051,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit4,CG_TEXUNIT4,"texunit 4",2052,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit4,CG_TEXUNIT4,"texunit 4",2052,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit5,CG_TEXUNIT5,"texunit 5",2053,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit5,CG_TEXUNIT5,"texunit 5",2053,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit6,CG_TEXUNIT6,"texunit 6",2054,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit6,CG_TEXUNIT6,"texunit 6",2054,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit7,CG_TEXUNIT7,"texunit 7",2055,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit7,CG_TEXUNIT7,"texunit 7",2055,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit8,CG_TEXUNIT8,"texunit 8",2056,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit8,CG_TEXUNIT8,"texunit 8",2056,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit9,CG_TEXUNIT9,"texunit 9",2057,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit9,CG_TEXUNIT9,"texunit 9",2057,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit10,CG_TEXUNIT10,"texunit 10",2058,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit10,CG_TEXUNIT10,"texunit 10",2058,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit11,CG_TEXUNIT11,"texunit 11",2059,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit11,CG_TEXUNIT11,"texunit 11",2059,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit12,CG_TEXUNIT12,"texunit 12",2060,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit12,CG_TEXUNIT12,"texunit 12",2060,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit13,CG_TEXUNIT13,"texunit 13",2061,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit13,CG_TEXUNIT13,"texunit 13",2061,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit14,CG_TEXUNIT14,"texunit 14",2062,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit14,CG_TEXUNIT14,"texunit 14",2062,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(TexUnit15,CG_TEXUNIT15,"texunit 15",2063,0,CG_TEXOBJ_PARAM) CG_BINDLOCATION_MACRO(TexUnit15,CG_TEXUNIT15,"texunit 15",2063,0,CG_TEXOBJ_PARAM)
CG_BINDLOCATION_MACRO(Buffer0, CG_BUFFER0, "buffer[0]", 2064, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer0, CG_BUFFER0, "buffer[0]", 2064, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer1, CG_BUFFER1, "buffer[1]", 2065, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer1, CG_BUFFER1, "buffer[1]", 2065, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer2, CG_BUFFER2, "buffer[2]", 2066, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer2, CG_BUFFER2, "buffer[2]", 2066, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer3, CG_BUFFER3, "buffer[3]", 2067, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer3, CG_BUFFER3, "buffer[3]", 2067, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer4, CG_BUFFER4, "buffer[4]", 2068, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer4, CG_BUFFER4, "buffer[4]", 2068, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer5, CG_BUFFER5, "buffer[5]", 2069, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer5, CG_BUFFER5, "buffer[5]", 2069, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer6, CG_BUFFER6, "buffer[6]", 2070, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer6, CG_BUFFER6, "buffer[6]", 2070, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer7, CG_BUFFER7, "buffer[7]", 2071, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer7, CG_BUFFER7, "buffer[7]", 2071, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer8, CG_BUFFER8, "buffer[8]", 2072, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer8, CG_BUFFER8, "buffer[8]", 2072, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer9, CG_BUFFER9, "buffer[9]", 2073, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer9, CG_BUFFER9, "buffer[9]", 2073, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer10, CG_BUFFER10, "buffer[10]", 2074, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer10, CG_BUFFER10, "buffer[10]", 2074, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Buffer11, CG_BUFFER11, "buffer[11]", 2075, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(Buffer11, CG_BUFFER11, "buffer[11]", 2075, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Attr0,CG_ATTR0,"ATTR0",2113,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr0,CG_ATTR0,"ATTR0",2113,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr1,CG_ATTR1,"ATTR1",2114,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr1,CG_ATTR1,"ATTR1",2114,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr2,CG_ATTR2,"ATTR2",2115,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr2,CG_ATTR2,"ATTR2",2115,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr3,CG_ATTR3,"ATTR3",2116,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr3,CG_ATTR3,"ATTR3",2116,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr4,CG_ATTR4,"ATTR4",2117,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr4,CG_ATTR4,"ATTR4",2117,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr5,CG_ATTR5,"ATTR5",2118,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr5,CG_ATTR5,"ATTR5",2118,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr6,CG_ATTR6,"ATTR6",2119,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr6,CG_ATTR6,"ATTR6",2119,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr7,CG_ATTR7,"ATTR7",2120,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr7,CG_ATTR7,"ATTR7",2120,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr8,CG_ATTR8,"ATTR8",2121,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr8,CG_ATTR8,"ATTR8",2121,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr9,CG_ATTR9,"ATTR9",2122,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr9,CG_ATTR9,"ATTR9",2122,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr10,CG_ATTR10,"ATTR10",2123,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr10,CG_ATTR10,"ATTR10",2123,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr11,CG_ATTR11,"ATTR11",2124,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr11,CG_ATTR11,"ATTR11",2124,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr12,CG_ATTR12,"ATTR12",2125,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr12,CG_ATTR12,"ATTR12",2125,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr13,CG_ATTR13,"ATTR13",2126,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr13,CG_ATTR13,"ATTR13",2126,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr14,CG_ATTR14,"ATTR14",2127,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr14,CG_ATTR14,"ATTR14",2127,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Attr15,CG_ATTR15,"ATTR15",2128,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Attr15,CG_ATTR15,"ATTR15",2128,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(VertUniform,CG_C,"c",2178,1,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(VertUniform,CG_C,"c",2178,1,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Tex0,CG_TEX0,"TEX0",2179,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex0,CG_TEX0,"TEX0",2179,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tex1,CG_TEX1,"TEX1",2180,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex1,CG_TEX1,"TEX1",2180,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tex2,CG_TEX2,"TEX2",2181,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex2,CG_TEX2,"TEX2",2181,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tex3,CG_TEX3,"TEX3",2192,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex3,CG_TEX3,"TEX3",2192,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tex4,CG_TEX4,"TEX4",2193,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex4,CG_TEX4,"TEX4",2193,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tex5,CG_TEX5,"TEX5",2194,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex5,CG_TEX5,"TEX5",2194,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tex6,CG_TEX6,"TEX6",2195,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex6,CG_TEX6,"TEX6",2195,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tex7,CG_TEX7,"TEX7",2196,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tex7,CG_TEX7,"TEX7",2196,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(HPos,CG_HPOS,"HPOS",2243,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(HPos,CG_HPOS,"HPOS",2243,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Col0,CG_COL0,"COL0",2245,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Col0,CG_COL0,"COL0",2245,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Col1,CG_COL1,"COL1",2246,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Col1,CG_COL1,"COL1",2246,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Col2,CG_COL2,"COL2",2247,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Col2,CG_COL2,"COL2",2247,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Col3,CG_COL3,"COL3",2248,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Col3,CG_COL3,"COL3",2248,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSiz,CG_PSIZ,"PSIZ",2309,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSiz,CG_PSIZ,"PSIZ",2309,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Clp0,CG_CLP0,"CLP0",2310,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Clp0,CG_CLP0,"CLP0",2310,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Clp1,CG_CLP1,"CLP1",2311,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Clp1,CG_CLP1,"CLP1",2311,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Clp2,CG_CLP2,"CLP2",2312,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Clp2,CG_CLP2,"CLP2",2312,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Clp3,CG_CLP3,"CLP3",2313,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Clp3,CG_CLP3,"CLP3",2313,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Clp4,CG_CLP4,"CLP4",2314,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Clp4,CG_CLP4,"CLP4",2314,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Clp5,CG_CLP5,"CLP5",2315,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Clp5,CG_CLP5,"CLP5",2315,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(WPos,CG_WPOS,"WPOS",2373,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(WPos,CG_WPOS,"WPOS",2373,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PointCoord,CG_POINTCOORD,"POINTCOORD",2374,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PointCoord,CG_POINTCOORD,"POINTCOORD",2374,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position0,CG_POSITION0,"POSITION0",2437,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position0,CG_POSITION0,"POSITION0",2437,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position1,CG_POSITION1,"POSITION1",2438,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position1,CG_POSITION1,"POSITION1",2438,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position2,CG_POSITION2,"POSITION2",2439,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position2,CG_POSITION2,"POSITION2",2439,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position3,CG_POSITION3,"POSITION3",2440,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position3,CG_POSITION3,"POSITION3",2440,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position4,CG_POSITION4,"POSITION4",2441,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position4,CG_POSITION4,"POSITION4",2441,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position5,CG_POSITION5,"POSITION5",2442,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position5,CG_POSITION5,"POSITION5",2442,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position6,CG_POSITION6,"POSITION6",2443,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position6,CG_POSITION6,"POSITION6",2443,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position7,CG_POSITION7,"POSITION7",2444,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position7,CG_POSITION7,"POSITION7",2444,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position8,CG_POSITION8,"POSITION8",2445,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position8,CG_POSITION8,"POSITION8",2445,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position9,CG_POSITION9,"POSITION9",2446,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position9,CG_POSITION9,"POSITION9",2446,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position10,CG_POSITION10,"POSITION10",2447,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position10,CG_POSITION10,"POSITION10",2447,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position11,CG_POSITION11,"POSITION11",2448,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position11,CG_POSITION11,"POSITION11",2448,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position12,CG_POSITION12,"POSITION12",2449,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position12,CG_POSITION12,"POSITION12",2449,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position13,CG_POSITION13,"POSITION13",2450,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position13,CG_POSITION13,"POSITION13",2450,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position14,CG_POSITION14,"POSITION14",2451,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position14,CG_POSITION14,"POSITION14",2451,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Position15,CG_POSITION15,"POSITION15",2452,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Position15,CG_POSITION15,"POSITION15",2452,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Diffuse0,CG_DIFFUSE0,"DIFFUSE0",2501,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Diffuse0,CG_DIFFUSE0,"DIFFUSE0",2501,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent0,CG_TANGENT0,"TANGENT0",2565,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent0,CG_TANGENT0,"TANGENT0",2565,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent1,CG_TANGENT1,"TANGENT1",2566,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent1,CG_TANGENT1,"TANGENT1",2566,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent2,CG_TANGENT2,"TANGENT2",2567,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent2,CG_TANGENT2,"TANGENT2",2567,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent3,CG_TANGENT3,"TANGENT3",2568,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent3,CG_TANGENT3,"TANGENT3",2568,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent4,CG_TANGENT4,"TANGENT4",2569,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent4,CG_TANGENT4,"TANGENT4",2569,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent5,CG_TANGENT5,"TANGENT5",2570,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent5,CG_TANGENT5,"TANGENT5",2570,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent6,CG_TANGENT6,"TANGENT6",2571,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent6,CG_TANGENT6,"TANGENT6",2571,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent7,CG_TANGENT7,"TANGENT7",2572,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent7,CG_TANGENT7,"TANGENT7",2572,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent8,CG_TANGENT8,"TANGENT8",2573,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent8,CG_TANGENT8,"TANGENT8",2573,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent9,CG_TANGENT9,"TANGENT9",2574,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent9,CG_TANGENT9,"TANGENT9",2574,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent10,CG_TANGENT10,"TANGENT10",2575,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent10,CG_TANGENT10,"TANGENT10",2575,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent11,CG_TANGENT11,"TANGENT11",2576,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent11,CG_TANGENT11,"TANGENT11",2576,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent12,CG_TANGENT12,"TANGENT12",2577,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent12,CG_TANGENT12,"TANGENT12",2577,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent13,CG_TANGENT13,"TANGENT13",2578,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent13,CG_TANGENT13,"TANGENT13",2578,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent14,CG_TANGENT14,"TANGENT14",2579,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent14,CG_TANGENT14,"TANGENT14",2579,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Tangent15,CG_TANGENT15,"TANGENT15",2580,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Tangent15,CG_TANGENT15,"TANGENT15",2580,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Specular0,CG_SPECULAR0,"SPECULAR0",2629,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Specular0,CG_SPECULAR0,"SPECULAR0",2629,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices0,CG_BLENDINDICES0,"BLENDINDICES0",2693,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices0,CG_BLENDINDICES0,"BLENDINDICES0",2693,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices1,CG_BLENDINDICES1,"BLENDINDICES1",2694,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices1,CG_BLENDINDICES1,"BLENDINDICES1",2694,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices2,CG_BLENDINDICES2,"BLENDINDICES2",2695,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices2,CG_BLENDINDICES2,"BLENDINDICES2",2695,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices3,CG_BLENDINDICES3,"BLENDINDICES3",2696,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices3,CG_BLENDINDICES3,"BLENDINDICES3",2696,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices4,CG_BLENDINDICES4,"BLENDINDICES4",2697,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices4,CG_BLENDINDICES4,"BLENDINDICES4",2697,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices5,CG_BLENDINDICES5,"BLENDINDICES5",2698,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices5,CG_BLENDINDICES5,"BLENDINDICES5",2698,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices6,CG_BLENDINDICES6,"BLENDINDICES6",2699,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices6,CG_BLENDINDICES6,"BLENDINDICES6",2699,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices7,CG_BLENDINDICES7,"BLENDINDICES7",2700,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices7,CG_BLENDINDICES7,"BLENDINDICES7",2700,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices8,CG_BLENDINDICES8,"BLENDINDICES8",2701,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices8,CG_BLENDINDICES8,"BLENDINDICES8",2701,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices9,CG_BLENDINDICES9,"BLENDINDICES9",2702,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices9,CG_BLENDINDICES9,"BLENDINDICES9",2702,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices10,CG_BLENDINDICES10,"BLENDINDICES10",2703,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices10,CG_BLENDINDICES10,"BLENDINDICES10",2703,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices11,CG_BLENDINDICES11,"BLENDINDICES11",2704,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices11,CG_BLENDINDICES11,"BLENDINDICES11",2704,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices12,CG_BLENDINDICES12,"BLENDINDICES12",2705,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices12,CG_BLENDINDICES12,"BLENDINDICES12",2705,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices13,CG_BLENDINDICES13,"BLENDINDICES13",2706,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices13,CG_BLENDINDICES13,"BLENDINDICES13",2706,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices14,CG_BLENDINDICES14,"BLENDINDICES14",2707,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices14,CG_BLENDINDICES14,"BLENDINDICES14",2707,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendIndices15,CG_BLENDINDICES15,"BLENDINDICES15",2708,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendIndices15,CG_BLENDINDICES15,"BLENDINDICES15",2708,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color0,CG_COLOR0,"COLOR0",2757,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color0,CG_COLOR0,"COLOR0",2757,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color1,CG_COLOR1,"COLOR1",2758,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color1,CG_COLOR1,"COLOR1",2758,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color2,CG_COLOR2,"COLOR2",2759,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color2,CG_COLOR2,"COLOR2",2759,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color3,CG_COLOR3,"COLOR3",2760,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color3,CG_COLOR3,"COLOR3",2760,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color4,CG_COLOR4,"COLOR4",2761,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color4,CG_COLOR4,"COLOR4",2761,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color5,CG_COLOR5,"COLOR5",2762,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color5,CG_COLOR5,"COLOR5",2762,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color6,CG_COLOR6,"COLOR6",2763,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color6,CG_COLOR6,"COLOR6",2763,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color7,CG_COLOR7,"COLOR7",2764,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color7,CG_COLOR7,"COLOR7",2764,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color8,CG_COLOR8,"COLOR8",2765,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color8,CG_COLOR8,"COLOR8",2765,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color9,CG_COLOR9,"COLOR9",2766,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color9,CG_COLOR9,"COLOR9",2766,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color10,CG_COLOR10,"COLOR10",2767,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color10,CG_COLOR10,"COLOR10",2767,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color11,CG_COLOR11,"COLOR11",2768,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color11,CG_COLOR11,"COLOR11",2768,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color12,CG_COLOR12,"COLOR12",2769,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color12,CG_COLOR12,"COLOR12",2769,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color13,CG_COLOR13,"COLOR13",2770,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color13,CG_COLOR13,"COLOR13",2770,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color14,CG_COLOR14,"COLOR14",2771,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color14,CG_COLOR14,"COLOR14",2771,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Color15,CG_COLOR15,"COLOR15",2772,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Color15,CG_COLOR15,"COLOR15",2772,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize0,CG_PSIZE0,"PSIZE0",2821,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize0,CG_PSIZE0,"PSIZE0",2821,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize1,CG_PSIZE1,"PSIZE1",2822,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize1,CG_PSIZE1,"PSIZE1",2822,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize2,CG_PSIZE2,"PSIZE2",2823,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize2,CG_PSIZE2,"PSIZE2",2823,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize3,CG_PSIZE3,"PSIZE3",2824,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize3,CG_PSIZE3,"PSIZE3",2824,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize4,CG_PSIZE4,"PSIZE4",2825,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize4,CG_PSIZE4,"PSIZE4",2825,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize5,CG_PSIZE5,"PSIZE5",2826,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize5,CG_PSIZE5,"PSIZE5",2826,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize6,CG_PSIZE6,"PSIZE6",2827,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize6,CG_PSIZE6,"PSIZE6",2827,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize7,CG_PSIZE7,"PSIZE7",2828,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize7,CG_PSIZE7,"PSIZE7",2828,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize8,CG_PSIZE8,"PSIZE8",2829,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize8,CG_PSIZE8,"PSIZE8",2829,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize9,CG_PSIZE9,"PSIZE9",2830,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize9,CG_PSIZE9,"PSIZE9",2830,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize10,CG_PSIZE10,"PSIZE10",2831,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize10,CG_PSIZE10,"PSIZE10",2831,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize11,CG_PSIZE11,"PSIZE11",2832,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize11,CG_PSIZE11,"PSIZE11",2832,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize12,CG_PSIZE12,"PSIZE12",2833,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize12,CG_PSIZE12,"PSIZE12",2833,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize13,CG_PSIZE13,"PSIZE13",2834,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize13,CG_PSIZE13,"PSIZE13",2834,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize14,CG_PSIZE14,"PSIZE14",2835,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize14,CG_PSIZE14,"PSIZE14",2835,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PSize15,CG_PSIZE15,"PSIZE15",2836,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PSize15,CG_PSIZE15,"PSIZE15",2836,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal0,CG_BINORMAL0,"BINORMAL0",2885,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal0,CG_BINORMAL0,"BINORMAL0",2885,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal1,CG_BINORMAL1,"BINORMAL1",2886,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal1,CG_BINORMAL1,"BINORMAL1",2886,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal2,CG_BINORMAL2,"BINORMAL2",2887,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal2,CG_BINORMAL2,"BINORMAL2",2887,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal3,CG_BINORMAL3,"BINORMAL3",2888,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal3,CG_BINORMAL3,"BINORMAL3",2888,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal4,CG_BINORMAL4,"BINORMAL4",2889,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal4,CG_BINORMAL4,"BINORMAL4",2889,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal5,CG_BINORMAL5,"BINORMAL5",2890,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal5,CG_BINORMAL5,"BINORMAL5",2890,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal6,CG_BINORMAL6,"BINORMAL6",2891,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal6,CG_BINORMAL6,"BINORMAL6",2891,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal7,CG_BINORMAL7,"BINORMAL7",2892,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal7,CG_BINORMAL7,"BINORMAL7",2892,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal8,CG_BINORMAL8,"BINORMAL8",2893,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal8,CG_BINORMAL8,"BINORMAL8",2893,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal9,CG_BINORMAL9,"BINORMAL9",2894,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal9,CG_BINORMAL9,"BINORMAL9",2894,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal10,CG_BINORMAL10,"BINORMAL10",2895,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal10,CG_BINORMAL10,"BINORMAL10",2895,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal11,CG_BINORMAL11,"BINORMAL11",2896,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal11,CG_BINORMAL11,"BINORMAL11",2896,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal12,CG_BINORMAL12,"BINORMAL12",2897,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal12,CG_BINORMAL12,"BINORMAL12",2897,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal13,CG_BINORMAL13,"BINORMAL13",2898,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal13,CG_BINORMAL13,"BINORMAL13",2898,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal14,CG_BINORMAL14,"BINORMAL14",2899,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal14,CG_BINORMAL14,"BINORMAL14",2899,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BiNormal15,CG_BINORMAL15,"BINORMAL15",2900,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BiNormal15,CG_BINORMAL15,"BINORMAL15",2900,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG0,CG_FOG0,"FOG0",2917,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG0,CG_FOG0,"FOG0",2917,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG1,CG_FOG1,"FOG1",2918,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG1,CG_FOG1,"FOG1",2918,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG2,CG_FOG2,"FOG2",2919,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG2,CG_FOG2,"FOG2",2919,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG3,CG_FOG3,"FOG3",2920,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG3,CG_FOG3,"FOG3",2920,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG4,CG_FOG4,"FOG4",2921,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG4,CG_FOG4,"FOG4",2921,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG5,CG_FOG5,"FOG5",2922,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG5,CG_FOG5,"FOG5",2922,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG6,CG_FOG6,"FOG6",2923,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG6,CG_FOG6,"FOG6",2923,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG7,CG_FOG7,"FOG7",2924,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG7,CG_FOG7,"FOG7",2924,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG8,CG_FOG8,"FOG8",2925,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG8,CG_FOG8,"FOG8",2925,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG9,CG_FOG9,"FOG9",2926,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG9,CG_FOG9,"FOG9",2926,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG10,CG_FOG10,"FOG10",2927,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG10,CG_FOG10,"FOG10",2927,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG11,CG_FOG11,"FOG11",2928,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG11,CG_FOG11,"FOG11",2928,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG12,CG_FOG12,"FOG12",2929,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG12,CG_FOG12,"FOG12",2929,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG13,CG_FOG13,"FOG13",2930,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG13,CG_FOG13,"FOG13",2930,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG14,CG_FOG14,"FOG14",2931,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG14,CG_FOG14,"FOG14",2931,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FOG15,CG_FOG15,"FOG15",2932,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FOG15,CG_FOG15,"FOG15",2932,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH0,CG_DEPTH0,"DEPTH0",2933,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH0,CG_DEPTH0,"DEPTH0",2933,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH1,CG_DEPTH1,"DEPTH1",2934,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH1,CG_DEPTH1,"DEPTH1",2934,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH2,CG_DEPTH2,"DEPTH2",2935,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH2,CG_DEPTH2,"DEPTH2",2935,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH3,CG_DEPTH3,"DEPTH3",2936,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH3,CG_DEPTH3,"DEPTH3",2936,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH4,CG_DEPTH4,"DEPTH4",2937,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH4,CG_DEPTH4,"DEPTH4",2937,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH5,CG_DEPTH5,"DEPTH5",2938,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH5,CG_DEPTH5,"DEPTH5",2938,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH6,CG_DEPTH6,"DEPTH6",2939,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH6,CG_DEPTH6,"DEPTH6",2939,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH7,CG_DEPTH7,"DEPTH7",2940,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH7,CG_DEPTH7,"DEPTH7",2940,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH8,CG_DEPTH8,"DEPTH8",2941,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH8,CG_DEPTH8,"DEPTH8",2941,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH9,CG_DEPTH9,"DEPTH9",2942,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH9,CG_DEPTH9,"DEPTH9",2942,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH10,CG_DEPTH10,"DEPTH10",2943,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH10,CG_DEPTH10,"DEPTH10",2943,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH11,CG_DEPTH11,"DEPTH11",2944,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH11,CG_DEPTH11,"DEPTH11",2944,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH12,CG_DEPTH12,"DEPTH12",2945,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH12,CG_DEPTH12,"DEPTH12",2945,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH13,CG_DEPTH13,"DEPTH13",2946,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH13,CG_DEPTH13,"DEPTH13",2946,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH14,CG_DEPTH14,"DEPTH14",2947,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH14,CG_DEPTH14,"DEPTH14",2947,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(DEPTH15,CG_DEPTH15,"DEPTH15",2948,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(DEPTH15,CG_DEPTH15,"DEPTH15",2948,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE0,CG_SAMPLE0,"SAMPLE0",2949,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE0,CG_SAMPLE0,"SAMPLE0",2949,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE1,CG_SAMPLE1,"SAMPLE1",2950,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE1,CG_SAMPLE1,"SAMPLE1",2950,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE2,CG_SAMPLE2,"SAMPLE2",2951,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE2,CG_SAMPLE2,"SAMPLE2",2951,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE3,CG_SAMPLE3,"SAMPLE3",2952,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE3,CG_SAMPLE3,"SAMPLE3",2952,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE4,CG_SAMPLE4,"SAMPLE4",2953,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE4,CG_SAMPLE4,"SAMPLE4",2953,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE5,CG_SAMPLE5,"SAMPLE5",2954,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE5,CG_SAMPLE5,"SAMPLE5",2954,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE6,CG_SAMPLE6,"SAMPLE6",2955,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE6,CG_SAMPLE6,"SAMPLE6",2955,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE7,CG_SAMPLE7,"SAMPLE7",2956,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE7,CG_SAMPLE7,"SAMPLE7",2956,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE8,CG_SAMPLE8,"SAMPLE8",2957,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE8,CG_SAMPLE8,"SAMPLE8",2957,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE9,CG_SAMPLE9,"SAMPLE9",2958,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE9,CG_SAMPLE9,"SAMPLE9",2958,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE10,CG_SAMPLE10,"SAMPLE10",2959,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE10,CG_SAMPLE10,"SAMPLE10",2959,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE11,CG_SAMPLE11,"SAMPLE11",2960,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE11,CG_SAMPLE11,"SAMPLE11",2960,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE12,CG_SAMPLE12,"SAMPLE12",2961,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE12,CG_SAMPLE12,"SAMPLE12",2961,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE13,CG_SAMPLE13,"SAMPLE13",2962,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE13,CG_SAMPLE13,"SAMPLE13",2962,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE14,CG_SAMPLE14,"SAMPLE14",2963,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE14,CG_SAMPLE14,"SAMPLE14",2963,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SAMPLE15,CG_SAMPLE15,"SAMPLE15",2964,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SAMPLE15,CG_SAMPLE15,"SAMPLE15",2964,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight0,CG_BLENDWEIGHT0,"BLENDWEIGHT0",3028,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight0,CG_BLENDWEIGHT0,"BLENDWEIGHT0",3028,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight1,CG_BLENDWEIGHT1,"BLENDWEIGHT1",3029,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight1,CG_BLENDWEIGHT1,"BLENDWEIGHT1",3029,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight2,CG_BLENDWEIGHT2,"BLENDWEIGHT2",3030,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight2,CG_BLENDWEIGHT2,"BLENDWEIGHT2",3030,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight3,CG_BLENDWEIGHT3,"BLENDWEIGHT3",3031,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight3,CG_BLENDWEIGHT3,"BLENDWEIGHT3",3031,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight4,CG_BLENDWEIGHT4,"BLENDWEIGHT4",3032,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight4,CG_BLENDWEIGHT4,"BLENDWEIGHT4",3032,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight5,CG_BLENDWEIGHT5,"BLENDWEIGHT5",3033,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight5,CG_BLENDWEIGHT5,"BLENDWEIGHT5",3033,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight6,CG_BLENDWEIGHT6,"BLENDWEIGHT6",3034,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight6,CG_BLENDWEIGHT6,"BLENDWEIGHT6",3034,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight7,CG_BLENDWEIGHT7,"BLENDWEIGHT7",3035,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight7,CG_BLENDWEIGHT7,"BLENDWEIGHT7",3035,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight8,CG_BLENDWEIGHT8,"BLENDWEIGHT8",3036,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight8,CG_BLENDWEIGHT8,"BLENDWEIGHT8",3036,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight9,CG_BLENDWEIGHT9,"BLENDWEIGHT9",3037,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight9,CG_BLENDWEIGHT9,"BLENDWEIGHT9",3037,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight10,CG_BLENDWEIGHT10,"BLENDWEIGHT10",3038,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight10,CG_BLENDWEIGHT10,"BLENDWEIGHT10",3038,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight11,CG_BLENDWEIGHT11,"BLENDWEIGHT11",3039,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight11,CG_BLENDWEIGHT11,"BLENDWEIGHT11",3039,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight12,CG_BLENDWEIGHT12,"BLENDWEIGHT12",3040,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight12,CG_BLENDWEIGHT12,"BLENDWEIGHT12",3040,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight13,CG_BLENDWEIGHT13,"BLENDWEIGHT13",3041,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight13,CG_BLENDWEIGHT13,"BLENDWEIGHT13",3041,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight14,CG_BLENDWEIGHT14,"BLENDWEIGHT14",3042,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight14,CG_BLENDWEIGHT14,"BLENDWEIGHT14",3042,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(BlendWeight15,CG_BLENDWEIGHT15,"BLENDWEIGHT15",3043,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(BlendWeight15,CG_BLENDWEIGHT15,"BLENDWEIGHT15",3043,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal0,CG_NORMAL0,"NORMAL0",3092,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal0,CG_NORMAL0,"NORMAL0",3092,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal1,CG_NORMAL1,"NORMAL1",3093,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal1,CG_NORMAL1,"NORMAL1",3093,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal2,CG_NORMAL2,"NORMAL2",3094,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal2,CG_NORMAL2,"NORMAL2",3094,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal3,CG_NORMAL3,"NORMAL3",3095,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal3,CG_NORMAL3,"NORMAL3",3095,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal4,CG_NORMAL4,"NORMAL4",3096,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal4,CG_NORMAL4,"NORMAL4",3096,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal5,CG_NORMAL5,"NORMAL5",3097,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal5,CG_NORMAL5,"NORMAL5",3097,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal6,CG_NORMAL6,"NORMAL6",3098,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal6,CG_NORMAL6,"NORMAL6",3098,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal7,CG_NORMAL7,"NORMAL7",3099,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal7,CG_NORMAL7,"NORMAL7",3099,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal8,CG_NORMAL8,"NORMAL8",3100,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal8,CG_NORMAL8,"NORMAL8",3100,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal9,CG_NORMAL9,"NORMAL9",3101,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal9,CG_NORMAL9,"NORMAL9",3101,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal10,CG_NORMAL10,"NORMAL10",3102,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal10,CG_NORMAL10,"NORMAL10",3102,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal11,CG_NORMAL11,"NORMAL11",3103,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal11,CG_NORMAL11,"NORMAL11",3103,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal12,CG_NORMAL12,"NORMAL12",3104,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal12,CG_NORMAL12,"NORMAL12",3104,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal13,CG_NORMAL13,"NORMAL13",3105,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal13,CG_NORMAL13,"NORMAL13",3105,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal14,CG_NORMAL14,"NORMAL14",3106,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal14,CG_NORMAL14,"NORMAL14",3106,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Normal15,CG_NORMAL15,"NORMAL15",3107,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Normal15,CG_NORMAL15,"NORMAL15",3107,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(FogCoord,CG_FOGCOORD,"FOGCOORD",3156,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(FogCoord,CG_FOGCOORD,"FOGCOORD",3156,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord0,CG_TEXCOORD0,"TEXCOORD0",3220,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord0,CG_TEXCOORD0,"TEXCOORD0",3220,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord1,CG_TEXCOORD1,"TEXCOORD1",3221,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord1,CG_TEXCOORD1,"TEXCOORD1",3221,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord2,CG_TEXCOORD2,"TEXCOORD2",3222,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord2,CG_TEXCOORD2,"TEXCOORD2",3222,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord3,CG_TEXCOORD3,"TEXCOORD3",3223,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord3,CG_TEXCOORD3,"TEXCOORD3",3223,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord4,CG_TEXCOORD4,"TEXCOORD4",3224,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord4,CG_TEXCOORD4,"TEXCOORD4",3224,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord5,CG_TEXCOORD5,"TEXCOORD5",3225,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord5,CG_TEXCOORD5,"TEXCOORD5",3225,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord6,CG_TEXCOORD6,"TEXCOORD6",3226,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord6,CG_TEXCOORD6,"TEXCOORD6",3226,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord7,CG_TEXCOORD7,"TEXCOORD7",3227,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord7,CG_TEXCOORD7,"TEXCOORD7",3227,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord8,CG_TEXCOORD8,"TEXCOORD8",3228,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord8,CG_TEXCOORD8,"TEXCOORD8",3228,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord9,CG_TEXCOORD9,"TEXCOORD9",3229,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord9,CG_TEXCOORD9,"TEXCOORD9",3229,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord10,CG_TEXCOORD10,"TEXCOORD10",3230,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord10,CG_TEXCOORD10,"TEXCOORD10",3230,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord11,CG_TEXCOORD11,"TEXCOORD11",3231,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord11,CG_TEXCOORD11,"TEXCOORD11",3231,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord12,CG_TEXCOORD12,"TEXCOORD12",3232,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord12,CG_TEXCOORD12,"TEXCOORD12",3232,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord13,CG_TEXCOORD13,"TEXCOORD13",3233,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord13,CG_TEXCOORD13,"TEXCOORD13",3233,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord14,CG_TEXCOORD14,"TEXCOORD14",3234,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord14,CG_TEXCOORD14,"TEXCOORD14",3234,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TexCoord15,CG_TEXCOORD15,"TEXCOORD15",3235,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TexCoord15,CG_TEXCOORD15,"TEXCOORD15",3235,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(CombinerConst0,CG_COMBINER_CONST0,"COMBINER_CONST0",3284,0,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(CombinerConst0,CG_COMBINER_CONST0,"COMBINER_CONST0",3284,0,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(CombinerConst1,CG_COMBINER_CONST1,"COMBINER_CONST1",3285,0,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(CombinerConst1,CG_COMBINER_CONST1,"COMBINER_CONST1",3285,0,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(CombinerStageConst0,CG_COMBINER_STAGE_CONST0,"COMBINER_STAGE_CONST0",3286,1,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(CombinerStageConst0,CG_COMBINER_STAGE_CONST0,"COMBINER_STAGE_CONST0",3286,1,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(CombinerStageConst1,CG_COMBINER_STAGE_CONST1,"COMBINER_STAGE_CONST1",3287,1,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(CombinerStageConst1,CG_COMBINER_STAGE_CONST1,"COMBINER_STAGE_CONST1",3287,1,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(OffsetTextureMatrix,CG_OFFSET_TEXTURE_MATRIX,"OFFSET_TEXTURE_MATRIX",3288,0,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(OffsetTextureMatrix,CG_OFFSET_TEXTURE_MATRIX,"OFFSET_TEXTURE_MATRIX",3288,0,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(OffsetTextureScale,CG_OFFSET_TEXTURE_SCALE,"OFFSET_TEXTURE_SCALE",3289,0,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(OffsetTextureScale,CG_OFFSET_TEXTURE_SCALE,"OFFSET_TEXTURE_SCALE",3289,0,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(OffsetTextureBias,CG_OFFSET_TEXTURE_BIAS,"OFFSET_TEXTURE_BIAS",3290,0,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(OffsetTextureBias,CG_OFFSET_TEXTURE_BIAS,"OFFSET_TEXTURE_BIAS",3290,0,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(ConstEye,CG_CONST_EYE,"CONST_EYE",3291,0,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(ConstEye,CG_CONST_EYE,"CONST_EYE",3291,0,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(Coverage, CG_COVERAGE, "COVERAGE", 3292, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Coverage, CG_COVERAGE, "COVERAGE", 3292, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(TessFactor,CG_TESSFACTOR,"TESSFACTOR",3255,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(TessFactor,CG_TESSFACTOR,"TESSFACTOR",3255,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(GLSLUniform,CG_GLSL_UNIFORM,"glsl_uniform",3300,1,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(GLSLUniform,CG_GLSL_UNIFORM,"glsl_uniform",3300,1,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(GLSLAttrib,CG_GLSL_ATTRIB,"glsl_attrib",3301,1,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(GLSLAttrib,CG_GLSL_ATTRIB,"glsl_attrib",3301,1,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Env,CG_ENV,"ENV",3302,1,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Env,CG_ENV,"ENV",3302,1,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(HLSLUniform,CG_HLSL_UNIFORM,"hlsl_uniform",3559,1,CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(HLSLUniform,CG_HLSL_UNIFORM,"hlsl_uniform",3559,1,CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(HLSLAttrib,CG_HLSL_VARYING,"hlsl_attrib",3560,1,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(HLSLAttrib,CG_HLSL_VARYING,"hlsl_attrib",3560,1,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SamplerResource,CG_SAMPLER_RES, "SAMPLER_RES", 3561, 1, CGI_UNIFORM_PARAM) CG_BINDLOCATION_MACRO(SamplerResource,CG_SAMPLER_RES, "SAMPLER_RES", 3561, 1, CGI_UNIFORM_PARAM)
CG_BINDLOCATION_MACRO(LastColor0, CG_LASTCOL0, "LASTCOL0", 4400, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor0, CG_LASTCOL0, "LASTCOL0", 4400, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(LastColor1, CG_LASTCOL1, "LASTCOL1", 4401, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor1, CG_LASTCOL1, "LASTCOL1", 4401, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(LastColor2, CG_LASTCOL2, "LASTCOL2", 4402, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor2, CG_LASTCOL2, "LASTCOL2", 4402, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(LastColor3, CG_LASTCOL3, "LASTCOL3", 4403, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor3, CG_LASTCOL3, "LASTCOL3", 4403, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(LastColor4, CG_LASTCOL4, "LASTCOL4", 4404, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor4, CG_LASTCOL4, "LASTCOL4", 4404, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(LastColor5, CG_LASTCOL5, "LASTCOL5", 4405, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor5, CG_LASTCOL5, "LASTCOL5", 4405, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(LastColor6, CG_LASTCOL6, "LASTCOL6", 4406, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor6, CG_LASTCOL6, "LASTCOL6", 4406, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(LastColor7, CG_LASTCOL7, "LASTCOL7", 4407, 0, CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(LastColor7, CG_LASTCOL7, "LASTCOL7", 4407, 0, CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Face,CG_FACE,"FACE",4410,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Face,CG_FACE,"FACE",4410,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(PrimitiveId,CG_PRIMITIVEID,"PRIMITIVEID",4411,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(PrimitiveId,CG_PRIMITIVEID,"PRIMITIVEID",4411,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(InstanceId,CG_INSTANCEID,"INSTANCEID",4412,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(InstanceId,CG_INSTANCEID,"INSTANCEID",4412,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SampleId,CG_SAMPLEID,"SAMPLEID",4413,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SampleId,CG_SAMPLEID,"SAMPLEID",4413,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(VertexId,CG_VERTEXID,"VERTEXID",4414,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(VertexId,CG_VERTEXID,"VERTEXID",4414,0,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(Layer,CG_LAYER,"LAYER",4415,1,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(Layer,CG_LAYER,"LAYER",4415,1,CG_VARYING_PARAM)
CG_BINDLOCATION_MACRO(SampleMask,CG_SAMPLEMASK,"SAMPLEMASK",4416,0,CG_VARYING_PARAM) CG_BINDLOCATION_MACRO(SampleMask,CG_SAMPLEMASK,"SAMPLEMASK",4416,0,CG_VARYING_PARAM)
#undef CG_BINDLOCATION_MACRO #undef CG_BINDLOCATION_MACRO

View File

@@ -1,191 +1,191 @@
/* /*
* *
* Copyright (c) 2002-2007, NVIDIA Corporation. * Copyright (c) 2002-2007, NVIDIA Corporation.
* *
* *
* *
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation, * of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes * modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do * acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software. * not use, install, modify or redistribute this NVIDIA software.
* *
* *
* *
* In consideration of your agreement to abide by the following terms, and * In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license, * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA * Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms; * Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the * provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and * copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the * disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without * to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated * specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted * in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be * by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA * infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder. * Software may be incorporated. No hardware is licensed hereunder.
* *
* *
* *
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
* *
* *
* *
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
/* /*
* The following macro invocations define the supported CG basic data types. * The following macro invocations define the supported CG basic data types.
* *
* The macros have the form : * The macros have the form :
* *
* CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, nrows, ncols, pc_name) * CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, nrows, ncols, pc_name)
* *
* name : The name of the data type. * name : The name of the data type.
* compiler_name : The name of the data type within the compiler syntax. * compiler_name : The name of the data type within the compiler syntax.
* enum_name : The C enumerant. * enum_name : The C enumerant.
* base_name : The C enumerant of the base type. * base_name : The C enumerant of the base type.
* nrows : Number of rows for matrix types. Should be 0 other-wise. * nrows : Number of rows for matrix types. Should be 0 other-wise.
* ncols : Number of columns for scalar, vector, and matrix types. * ncols : Number of columns for scalar, vector, and matrix types.
* pc_name : The C enumerant of the parameter class. * pc_name : The C enumerant of the parameter class.
* *
*/ */
CG_DATATYPE_MACRO(Half,half,CG_HALF,CG_HALF,0,1,CG_PARAMETERCLASS_SCALAR) CG_DATATYPE_MACRO(Half,half,CG_HALF,CG_HALF,0,1,CG_PARAMETERCLASS_SCALAR)
CG_DATATYPE_MACRO(Half2,half2,CG_HALF2,CG_HALF,0,2,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Half2,half2,CG_HALF2,CG_HALF,0,2,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Half3,half3,CG_HALF3,CG_HALF,0,3,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Half3,half3,CG_HALF3,CG_HALF,0,3,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Half4,half4,CG_HALF4,CG_HALF,0,4,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Half4,half4,CG_HALF4,CG_HALF,0,4,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Half1x1,half1x1,CG_HALF1x1,CG_HALF,1,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half1x1,half1x1,CG_HALF1x1,CG_HALF,1,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half1x2,half1x2,CG_HALF1x2,CG_HALF,1,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half1x2,half1x2,CG_HALF1x2,CG_HALF,1,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half1x3,half1x3,CG_HALF1x3,CG_HALF,1,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half1x3,half1x3,CG_HALF1x3,CG_HALF,1,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half1x4,half1x4,CG_HALF1x4,CG_HALF,1,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half1x4,half1x4,CG_HALF1x4,CG_HALF,1,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half2x1,half2x1,CG_HALF2x1,CG_HALF,2,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half2x1,half2x1,CG_HALF2x1,CG_HALF,2,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half2x2,half2x2,CG_HALF2x2,CG_HALF,2,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half2x2,half2x2,CG_HALF2x2,CG_HALF,2,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half2x3,half2x3,CG_HALF2x3,CG_HALF,2,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half2x3,half2x3,CG_HALF2x3,CG_HALF,2,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half2x4,half2x4,CG_HALF2x4,CG_HALF,2,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half2x4,half2x4,CG_HALF2x4,CG_HALF,2,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half3x1,half3x1,CG_HALF3x1,CG_HALF,3,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half3x1,half3x1,CG_HALF3x1,CG_HALF,3,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half3x2,half3x2,CG_HALF3x2,CG_HALF,3,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half3x2,half3x2,CG_HALF3x2,CG_HALF,3,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half3x3,half3x3,CG_HALF3x3,CG_HALF,3,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half3x3,half3x3,CG_HALF3x3,CG_HALF,3,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half3x4,half3x4,CG_HALF3x4,CG_HALF,3,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half3x4,half3x4,CG_HALF3x4,CG_HALF,3,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half4x1,half4x1,CG_HALF4x1,CG_HALF,4,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half4x1,half4x1,CG_HALF4x1,CG_HALF,4,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half4x2,half4x2,CG_HALF4x2,CG_HALF,4,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half4x2,half4x2,CG_HALF4x2,CG_HALF,4,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half4x3,half4x3,CG_HALF4x3,CG_HALF,4,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half4x3,half4x3,CG_HALF4x3,CG_HALF,4,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half4x4,half4x4,CG_HALF4x4,CG_HALF,4,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Half4x4,half4x4,CG_HALF4x4,CG_HALF,4,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float,float,CG_FLOAT,CG_FLOAT,0,1,CG_PARAMETERCLASS_SCALAR) CG_DATATYPE_MACRO(Float,float,CG_FLOAT,CG_FLOAT,0,1,CG_PARAMETERCLASS_SCALAR)
CG_DATATYPE_MACRO(Float2,float2,CG_FLOAT2,CG_FLOAT,0,2,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Float2,float2,CG_FLOAT2,CG_FLOAT,0,2,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Float3,float3,CG_FLOAT3,CG_FLOAT,0,3,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Float3,float3,CG_FLOAT3,CG_FLOAT,0,3,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Float4,float4,CG_FLOAT4,CG_FLOAT,0,4,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Float4,float4,CG_FLOAT4,CG_FLOAT,0,4,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Float1x1,float1x1,CG_FLOAT1x1,CG_FLOAT,1,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float1x1,float1x1,CG_FLOAT1x1,CG_FLOAT,1,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float1x2,float1x2,CG_FLOAT1x2,CG_FLOAT,1,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float1x2,float1x2,CG_FLOAT1x2,CG_FLOAT,1,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float1x3,float1x3,CG_FLOAT1x3,CG_FLOAT,1,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float1x3,float1x3,CG_FLOAT1x3,CG_FLOAT,1,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float1x4,float1x4,CG_FLOAT1x4,CG_FLOAT,1,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float1x4,float1x4,CG_FLOAT1x4,CG_FLOAT,1,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float2x1,float2x1,CG_FLOAT2x1,CG_FLOAT,2,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float2x1,float2x1,CG_FLOAT2x1,CG_FLOAT,2,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float2x2,float2x2,CG_FLOAT2x2,CG_FLOAT,2,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float2x2,float2x2,CG_FLOAT2x2,CG_FLOAT,2,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float2x3,float2x3,CG_FLOAT2x3,CG_FLOAT,2,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float2x3,float2x3,CG_FLOAT2x3,CG_FLOAT,2,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float2x4,float2x4,CG_FLOAT2x4,CG_FLOAT,2,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float2x4,float2x4,CG_FLOAT2x4,CG_FLOAT,2,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float3x1,float3x1,CG_FLOAT3x1,CG_FLOAT,3,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float3x1,float3x1,CG_FLOAT3x1,CG_FLOAT,3,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float3x2,float3x2,CG_FLOAT3x2,CG_FLOAT,3,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float3x2,float3x2,CG_FLOAT3x2,CG_FLOAT,3,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float3x3,float3x3,CG_FLOAT3x3,CG_FLOAT,3,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float3x3,float3x3,CG_FLOAT3x3,CG_FLOAT,3,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float3x4,float3x4,CG_FLOAT3x4,CG_FLOAT,3,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float3x4,float3x4,CG_FLOAT3x4,CG_FLOAT,3,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float4x1,float4x1,CG_FLOAT4x1,CG_FLOAT,4,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float4x1,float4x1,CG_FLOAT4x1,CG_FLOAT,4,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float4x2,float4x2,CG_FLOAT4x2,CG_FLOAT,4,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float4x2,float4x2,CG_FLOAT4x2,CG_FLOAT,4,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float4x3,float4x3,CG_FLOAT4x3,CG_FLOAT,4,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float4x3,float4x3,CG_FLOAT4x3,CG_FLOAT,4,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Float4x4,float4x4,CG_FLOAT4x4,CG_FLOAT,4,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Float4x4,float4x4,CG_FLOAT4x4,CG_FLOAT,4,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Sampler1D,sampler1D,CG_SAMPLER1D,CG_SAMPLER1D,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(Sampler1D,sampler1D,CG_SAMPLER1D,CG_SAMPLER1D,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(Sampler2D,sampler2D,CG_SAMPLER2D,CG_SAMPLER2D,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(Sampler2D,sampler2D,CG_SAMPLER2D,CG_SAMPLER2D,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(Sampler3D,sampler3D,CG_SAMPLER3D,CG_SAMPLER3D,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(Sampler3D,sampler3D,CG_SAMPLER3D,CG_SAMPLER3D,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(SamplerRECT,samplerRECT,CG_SAMPLERRECT,CG_SAMPLERRECT,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(SamplerRECT,samplerRECT,CG_SAMPLERRECT,CG_SAMPLERRECT,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(SamplerCUBE,samplerCUBE,CG_SAMPLERCUBE,CG_SAMPLERCUBE,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(SamplerCUBE,samplerCUBE,CG_SAMPLERCUBE,CG_SAMPLERCUBE,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(Fixed,fixed,CG_FIXED,CG_FIXED,0,1,CG_PARAMETERCLASS_SCALAR) CG_DATATYPE_MACRO(Fixed,fixed,CG_FIXED,CG_FIXED,0,1,CG_PARAMETERCLASS_SCALAR)
CG_DATATYPE_MACRO(Fixed2,fixed2,CG_FIXED2,CG_FIXED,0,2,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Fixed2,fixed2,CG_FIXED2,CG_FIXED,0,2,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Fixed3,fixed3,CG_FIXED3,CG_FIXED,0,3,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Fixed3,fixed3,CG_FIXED3,CG_FIXED,0,3,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Fixed4,fixed4,CG_FIXED4,CG_FIXED,0,4,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Fixed4,fixed4,CG_FIXED4,CG_FIXED,0,4,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Fixed1x1,fixed1x1,CG_FIXED1x1,CG_FIXED,1,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed1x1,fixed1x1,CG_FIXED1x1,CG_FIXED,1,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed1x2,fixed1x2,CG_FIXED1x2,CG_FIXED,1,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed1x2,fixed1x2,CG_FIXED1x2,CG_FIXED,1,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed1x3,fixed1x3,CG_FIXED1x3,CG_FIXED,1,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed1x3,fixed1x3,CG_FIXED1x3,CG_FIXED,1,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed1x4,fixed1x4,CG_FIXED1x4,CG_FIXED,1,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed1x4,fixed1x4,CG_FIXED1x4,CG_FIXED,1,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed2x1,fixed2x1,CG_FIXED2x1,CG_FIXED,2,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed2x1,fixed2x1,CG_FIXED2x1,CG_FIXED,2,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed2x2,fixed2x2,CG_FIXED2x2,CG_FIXED,2,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed2x2,fixed2x2,CG_FIXED2x2,CG_FIXED,2,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed2x3,fixed2x3,CG_FIXED2x3,CG_FIXED,2,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed2x3,fixed2x3,CG_FIXED2x3,CG_FIXED,2,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed2x4,fixed2x4,CG_FIXED2x4,CG_FIXED,2,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed2x4,fixed2x4,CG_FIXED2x4,CG_FIXED,2,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed3x1,fixed3x1,CG_FIXED3x1,CG_FIXED,3,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed3x1,fixed3x1,CG_FIXED3x1,CG_FIXED,3,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed3x2,fixed3x2,CG_FIXED3x2,CG_FIXED,3,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed3x2,fixed3x2,CG_FIXED3x2,CG_FIXED,3,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed3x3,fixed3x3,CG_FIXED3x3,CG_FIXED,3,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed3x3,fixed3x3,CG_FIXED3x3,CG_FIXED,3,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed3x4,fixed3x4,CG_FIXED3x4,CG_FIXED,3,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed3x4,fixed3x4,CG_FIXED3x4,CG_FIXED,3,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed4x1,fixed4x1,CG_FIXED4x1,CG_FIXED,4,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed4x1,fixed4x1,CG_FIXED4x1,CG_FIXED,4,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed4x2,fixed4x2,CG_FIXED4x2,CG_FIXED,4,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed4x2,fixed4x2,CG_FIXED4x2,CG_FIXED,4,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed4x3,fixed4x3,CG_FIXED4x3,CG_FIXED,4,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed4x3,fixed4x3,CG_FIXED4x3,CG_FIXED,4,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Fixed4x4,fixed4x4,CG_FIXED4x4,CG_FIXED,4,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Fixed4x4,fixed4x4,CG_FIXED4x4,CG_FIXED,4,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Half1,half1,CG_HALF1,CG_HALF,0,1,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Half1,half1,CG_HALF1,CG_HALF,0,1,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Float1,float1,CG_FLOAT1,CG_FLOAT,0,1,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Float1,float1,CG_FLOAT1,CG_FLOAT,0,1,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Fixed1,fixed1,CG_FIXED1,CG_FIXED,0,1,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Fixed1,fixed1,CG_FIXED1,CG_FIXED,0,1,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Int,int,CG_INT,CG_INT,0,1,CG_PARAMETERCLASS_SCALAR) CG_DATATYPE_MACRO(Int,int,CG_INT,CG_INT,0,1,CG_PARAMETERCLASS_SCALAR)
CG_DATATYPE_MACRO(Int1,int1,CG_INT1,CG_INT,0,1,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Int1,int1,CG_INT1,CG_INT,0,1,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Int2,int2,CG_INT2,CG_INT,0,2,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Int2,int2,CG_INT2,CG_INT,0,2,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Int3,int3,CG_INT3,CG_INT,0,3,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Int3,int3,CG_INT3,CG_INT,0,3,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Int4,int4,CG_INT4,CG_INT,0,4,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Int4,int4,CG_INT4,CG_INT,0,4,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Int1x1,int1x1,CG_INT1x1,CG_INT,1,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int1x1,int1x1,CG_INT1x1,CG_INT,1,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int1x2,int1x2,CG_INT1x2,CG_INT,1,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int1x2,int1x2,CG_INT1x2,CG_INT,1,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int1x3,int1x3,CG_INT1x3,CG_INT,1,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int1x3,int1x3,CG_INT1x3,CG_INT,1,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int1x4,int1x4,CG_INT1x4,CG_INT,1,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int1x4,int1x4,CG_INT1x4,CG_INT,1,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int2x1,int2x1,CG_INT2x1,CG_INT,2,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int2x1,int2x1,CG_INT2x1,CG_INT,2,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int2x2,int2x2,CG_INT2x2,CG_INT,2,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int2x2,int2x2,CG_INT2x2,CG_INT,2,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int2x3,int2x3,CG_INT2x3,CG_INT,2,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int2x3,int2x3,CG_INT2x3,CG_INT,2,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int2x4,int2x4,CG_INT2x4,CG_INT,2,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int2x4,int2x4,CG_INT2x4,CG_INT,2,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int3x1,int3x1,CG_INT3x1,CG_INT,3,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int3x1,int3x1,CG_INT3x1,CG_INT,3,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int3x2,int3x2,CG_INT3x2,CG_INT,3,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int3x2,int3x2,CG_INT3x2,CG_INT,3,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int3x3,int3x3,CG_INT3x3,CG_INT,3,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int3x3,int3x3,CG_INT3x3,CG_INT,3,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int3x4,int3x4,CG_INT3x4,CG_INT,3,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int3x4,int3x4,CG_INT3x4,CG_INT,3,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int4x1,int4x1,CG_INT4x1,CG_INT,4,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int4x1,int4x1,CG_INT4x1,CG_INT,4,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int4x2,int4x2,CG_INT4x2,CG_INT,4,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int4x2,int4x2,CG_INT4x2,CG_INT,4,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int4x3,int4x3,CG_INT4x3,CG_INT,4,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int4x3,int4x3,CG_INT4x3,CG_INT,4,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Int4x4,int4x4,CG_INT4x4,CG_INT,4,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Int4x4,int4x4,CG_INT4x4,CG_INT,4,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool,bool,CG_BOOL,CG_BOOL,0,1,CG_PARAMETERCLASS_SCALAR) CG_DATATYPE_MACRO(Bool,bool,CG_BOOL,CG_BOOL,0,1,CG_PARAMETERCLASS_SCALAR)
CG_DATATYPE_MACRO(Bool1,bool1,CG_BOOL1,CG_BOOL,0,1,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Bool1,bool1,CG_BOOL1,CG_BOOL,0,1,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Bool2,bool2,CG_BOOL2,CG_BOOL,0,2,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Bool2,bool2,CG_BOOL2,CG_BOOL,0,2,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Bool3,bool3,CG_BOOL3,CG_BOOL,0,3,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Bool3,bool3,CG_BOOL3,CG_BOOL,0,3,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Bool4,bool4,CG_BOOL4,CG_BOOL,0,4,CG_PARAMETERCLASS_VECTOR) CG_DATATYPE_MACRO(Bool4,bool4,CG_BOOL4,CG_BOOL,0,4,CG_PARAMETERCLASS_VECTOR)
CG_DATATYPE_MACRO(Bool1x1,bool1x1,CG_BOOL1x1,CG_BOOL,1,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool1x1,bool1x1,CG_BOOL1x1,CG_BOOL,1,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool1x2,bool1x2,CG_BOOL1x2,CG_BOOL,1,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool1x2,bool1x2,CG_BOOL1x2,CG_BOOL,1,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool1x3,bool1x3,CG_BOOL1x3,CG_BOOL,1,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool1x3,bool1x3,CG_BOOL1x3,CG_BOOL,1,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool1x4,bool1x4,CG_BOOL1x4,CG_BOOL,1,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool1x4,bool1x4,CG_BOOL1x4,CG_BOOL,1,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool2x1,bool2x1,CG_BOOL2x1,CG_BOOL,2,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool2x1,bool2x1,CG_BOOL2x1,CG_BOOL,2,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool2x2,bool2x2,CG_BOOL2x2,CG_BOOL,2,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool2x2,bool2x2,CG_BOOL2x2,CG_BOOL,2,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool2x3,bool2x3,CG_BOOL2x3,CG_BOOL,2,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool2x3,bool2x3,CG_BOOL2x3,CG_BOOL,2,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool2x4,bool2x4,CG_BOOL2x4,CG_BOOL,2,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool2x4,bool2x4,CG_BOOL2x4,CG_BOOL,2,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool3x1,bool3x1,CG_BOOL3x1,CG_BOOL,3,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool3x1,bool3x1,CG_BOOL3x1,CG_BOOL,3,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool3x2,bool3x2,CG_BOOL3x2,CG_BOOL,3,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool3x2,bool3x2,CG_BOOL3x2,CG_BOOL,3,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool3x3,bool3x3,CG_BOOL3x3,CG_BOOL,3,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool3x3,bool3x3,CG_BOOL3x3,CG_BOOL,3,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool3x4,bool3x4,CG_BOOL3x4,CG_BOOL,3,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool3x4,bool3x4,CG_BOOL3x4,CG_BOOL,3,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool4x1,bool4x1,CG_BOOL4x1,CG_BOOL,4,1,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool4x1,bool4x1,CG_BOOL4x1,CG_BOOL,4,1,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool4x2,bool4x2,CG_BOOL4x2,CG_BOOL,4,2,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool4x2,bool4x2,CG_BOOL4x2,CG_BOOL,4,2,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool4x3,bool4x3,CG_BOOL4x3,CG_BOOL,4,3,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool4x3,bool4x3,CG_BOOL4x3,CG_BOOL,4,3,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(Bool4x4,bool4x4,CG_BOOL4x4,CG_BOOL,4,4,CG_PARAMETERCLASS_MATRIX) CG_DATATYPE_MACRO(Bool4x4,bool4x4,CG_BOOL4x4,CG_BOOL,4,4,CG_PARAMETERCLASS_MATRIX)
CG_DATATYPE_MACRO(String,string,CG_STRING,CG_STRING,0,1,CG_PARAMETERCLASS_OBJECT) CG_DATATYPE_MACRO(String,string,CG_STRING,CG_STRING,0,1,CG_PARAMETERCLASS_OBJECT)
CG_DATATYPE_MACRO(Program,program,CG_PROGRAM_TYPE,CG_PROGRAM_TYPE,0,0,CG_PARAMETERCLASS_OBJECT) CG_DATATYPE_MACRO(Program,program,CG_PROGRAM_TYPE,CG_PROGRAM_TYPE,0,0,CG_PARAMETERCLASS_OBJECT)
CG_DATATYPE_MACRO(Texture,texture,CG_TEXTURE,CG_TEXTURE,0,0,CG_PARAMETERCLASS_OBJECT) CG_DATATYPE_MACRO(Texture,texture,CG_TEXTURE,CG_TEXTURE,0,0,CG_PARAMETERCLASS_OBJECT)
CG_DATATYPE_MACRO(Sampler1DARRAY,sampler1DARRAY,CG_SAMPLER1DARRAY,CG_SAMPLER1DARRAY,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(Sampler1DARRAY,sampler1DARRAY,CG_SAMPLER1DARRAY,CG_SAMPLER1DARRAY,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(Sampler2DARRAY,sampler2DARRAY,CG_SAMPLER2DARRAY,CG_SAMPLER2DARRAY,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(Sampler2DARRAY,sampler2DARRAY,CG_SAMPLER2DARRAY,CG_SAMPLER2DARRAY,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(SamplerCUBEARRAY,samplerCUBEARRAY,CG_SAMPLERCUBEARRAY,CG_SAMPLERCUBEARRAY,0,0,CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(SamplerCUBEARRAY,samplerCUBEARRAY,CG_SAMPLERCUBEARRAY,CG_SAMPLERCUBEARRAY,0,0,CG_PARAMETERCLASS_SAMPLER)
CG_DATATYPE_MACRO(VertexShader, vertexshader, CG_VERTEXSHADER_TYPE, CG_VERTEXSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT) CG_DATATYPE_MACRO(VertexShader, vertexshader, CG_VERTEXSHADER_TYPE, CG_VERTEXSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT)
CG_DATATYPE_MACRO(PixelShader, pixelshader, CG_PIXELSHADER_TYPE, CG_PIXELSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT) CG_DATATYPE_MACRO(PixelShader, pixelshader, CG_PIXELSHADER_TYPE, CG_PIXELSHADER_TYPE, 0, 0, CG_PARAMETERCLASS_OBJECT)
CG_DATATYPE_MACRO(Sampler, sampler, CG_SAMPLER, CG_SAMPLER, 0, 0, CG_PARAMETERCLASS_SAMPLER) CG_DATATYPE_MACRO(Sampler, sampler, CG_SAMPLER, CG_SAMPLER, 0, 0, CG_PARAMETERCLASS_SAMPLER)
#undef CG_DATATYPE_MACRO #undef CG_DATATYPE_MACRO

View File

@@ -1,112 +1,112 @@
/* /*
* *
* Copyright (c) 2002-2007, NVIDIA Corporation. * Copyright (c) 2002-2007, NVIDIA Corporation.
* *
* *
* *
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation, * of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes * modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do * acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software. * not use, install, modify or redistribute this NVIDIA software.
* *
* *
* *
* In consideration of your agreement to abide by the following terms, and * In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license, * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA * Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms; * Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the * provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and * copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the * disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without * to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated * specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted * in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be * by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA * infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder. * Software may be incorporated. No hardware is licensed hereunder.
* *
* *
* *
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
* *
* *
* *
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
/* /*
* The following macro invocations define the supported CG basic data types. * The following macro invocations define the supported CG basic data types.
* *
* The macros have the form : * The macros have the form :
* *
* CG_ENUM_MACRO(enum_name, enum_val) * CG_ENUM_MACRO(enum_name, enum_val)
* *
* enum_name : The C enumerant name. * enum_name : The C enumerant name.
* enum_val : The enumerant value. * enum_val : The enumerant value.
* *
*/ */
CG_ENUM_MACRO(CG_UNKNOWN, 4096) CG_ENUM_MACRO(CG_UNKNOWN, 4096)
CG_ENUM_MACRO(CG_IN, 4097) CG_ENUM_MACRO(CG_IN, 4097)
CG_ENUM_MACRO(CG_OUT, 4098) CG_ENUM_MACRO(CG_OUT, 4098)
CG_ENUM_MACRO(CG_INOUT, 4099) CG_ENUM_MACRO(CG_INOUT, 4099)
CG_ENUM_MACRO(CG_MIXED, 4100) CG_ENUM_MACRO(CG_MIXED, 4100)
CG_ENUM_MACRO(CG_VARYING, 4101) CG_ENUM_MACRO(CG_VARYING, 4101)
CG_ENUM_MACRO(CG_UNIFORM, 4102) CG_ENUM_MACRO(CG_UNIFORM, 4102)
CG_ENUM_MACRO(CG_CONSTANT, 4103) CG_ENUM_MACRO(CG_CONSTANT, 4103)
CG_ENUM_MACRO(CG_PROGRAM_SOURCE, 4104) CG_ENUM_MACRO(CG_PROGRAM_SOURCE, 4104)
CG_ENUM_MACRO(CG_PROGRAM_ENTRY, 4105) CG_ENUM_MACRO(CG_PROGRAM_ENTRY, 4105)
CG_ENUM_MACRO(CG_COMPILED_PROGRAM, 4106) CG_ENUM_MACRO(CG_COMPILED_PROGRAM, 4106)
CG_ENUM_MACRO(CG_PROGRAM_PROFILE, 4107) CG_ENUM_MACRO(CG_PROGRAM_PROFILE, 4107)
CG_ENUM_MACRO(CG_GLOBAL, 4108) CG_ENUM_MACRO(CG_GLOBAL, 4108)
CG_ENUM_MACRO(CG_PROGRAM, 4109) CG_ENUM_MACRO(CG_PROGRAM, 4109)
CG_ENUM_MACRO(CG_DEFAULT, 4110) CG_ENUM_MACRO(CG_DEFAULT, 4110)
CG_ENUM_MACRO(CG_ERROR, 4111) CG_ENUM_MACRO(CG_ERROR, 4111)
CG_ENUM_MACRO(CG_SOURCE, 4112) CG_ENUM_MACRO(CG_SOURCE, 4112)
CG_ENUM_MACRO(CG_OBJECT, 4113) CG_ENUM_MACRO(CG_OBJECT, 4113)
CG_ENUM_MACRO(CG_COMPILE_MANUAL, 4114) CG_ENUM_MACRO(CG_COMPILE_MANUAL, 4114)
CG_ENUM_MACRO(CG_COMPILE_IMMEDIATE, 4115) CG_ENUM_MACRO(CG_COMPILE_IMMEDIATE, 4115)
CG_ENUM_MACRO(CG_COMPILE_LAZY, 4116) CG_ENUM_MACRO(CG_COMPILE_LAZY, 4116)
CG_ENUM_MACRO(CG_CURRENT, 4117) CG_ENUM_MACRO(CG_CURRENT, 4117)
CG_ENUM_MACRO(CG_LITERAL, 4118) CG_ENUM_MACRO(CG_LITERAL, 4118)
CG_ENUM_MACRO(CG_VERSION, 4119) CG_ENUM_MACRO(CG_VERSION, 4119)
CG_ENUM_MACRO(CG_ROW_MAJOR, 4120) CG_ENUM_MACRO(CG_ROW_MAJOR, 4120)
CG_ENUM_MACRO(CG_COLUMN_MAJOR, 4121) CG_ENUM_MACRO(CG_COLUMN_MAJOR, 4121)
CG_ENUM_MACRO(CG_FRAGMENT, 4122) CG_ENUM_MACRO(CG_FRAGMENT, 4122)
CG_ENUM_MACRO(CG_VERTEX, 4123) CG_ENUM_MACRO(CG_VERTEX, 4123)
CG_ENUM_MACRO(CG_POINT, 4124) CG_ENUM_MACRO(CG_POINT, 4124)
CG_ENUM_MACRO(CG_LINE, 4125) CG_ENUM_MACRO(CG_LINE, 4125)
CG_ENUM_MACRO(CG_LINE_ADJ, 4126) CG_ENUM_MACRO(CG_LINE_ADJ, 4126)
CG_ENUM_MACRO(CG_TRIANGLE, 4127) CG_ENUM_MACRO(CG_TRIANGLE, 4127)
CG_ENUM_MACRO(CG_TRIANGLE_ADJ, 4128) CG_ENUM_MACRO(CG_TRIANGLE_ADJ, 4128)
CG_ENUM_MACRO(CG_POINT_OUT, 4129) CG_ENUM_MACRO(CG_POINT_OUT, 4129)
CG_ENUM_MACRO(CG_LINE_OUT, 4130) CG_ENUM_MACRO(CG_LINE_OUT, 4130)
CG_ENUM_MACRO(CG_TRIANGLE_OUT, 4131) CG_ENUM_MACRO(CG_TRIANGLE_OUT, 4131)
CG_ENUM_MACRO(CG_IMMEDIATE_PARAMETER_SETTING, 4132) CG_ENUM_MACRO(CG_IMMEDIATE_PARAMETER_SETTING, 4132)
CG_ENUM_MACRO(CG_DEFERRED_PARAMETER_SETTING, 4133) CG_ENUM_MACRO(CG_DEFERRED_PARAMETER_SETTING, 4133)
CG_ENUM_MACRO(CG_NO_LOCKS_POLICY, 4134) CG_ENUM_MACRO(CG_NO_LOCKS_POLICY, 4134)
CG_ENUM_MACRO(CG_THREAD_SAFE_POLICY, 4135) CG_ENUM_MACRO(CG_THREAD_SAFE_POLICY, 4135)
CG_ENUM_MACRO(CG_FORCE_UPPER_CASE_POLICY, 4136) CG_ENUM_MACRO(CG_FORCE_UPPER_CASE_POLICY, 4136)
CG_ENUM_MACRO(CG_UNCHANGED_CASE_POLICY, 4137) CG_ENUM_MACRO(CG_UNCHANGED_CASE_POLICY, 4137)
#undef CG_ENUM_MACRO #undef CG_ENUM_MACRO

View File

@@ -1,320 +1,320 @@
/* /*
* *
* Copyright (c) 2002-2007, NVIDIA Corporation. * Copyright (c) 2002-2007, NVIDIA Corporation.
* *
* *
* *
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation, * of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes * modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do * acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software. * not use, install, modify or redistribute this NVIDIA software.
* *
* *
* *
* In consideration of your agreement to abide by the following terms, and * In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license, * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA * Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms; * Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the * provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and * copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the * disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without * to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated * specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted * in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be * by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA * infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder. * Software may be incorporated. No hardware is licensed hereunder.
* *
* *
* *
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
* *
* *
* *
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
/* /*
* The following macro invocations define error codes returned by various cg * The following macro invocations define error codes returned by various cg
* API functions. * API functions.
* *
* The macros have the form : * The macros have the form :
* *
* CG_ERROR_MACRO(code, enum_name, message) * CG_ERROR_MACRO(code, enum_name, message)
* *
* code : The integer error code associated with the error. * code : The integer error code associated with the error.
* enum_name : The name of enumerant of the error code in the API. * enum_name : The name of enumerant of the error code in the API.
* message : A description string associated with the error. * message : A description string associated with the error.
* *
*/ */
CG_ERROR_MACRO(0, CG_ERROR_MACRO(0,
CG_NO_ERROR, CG_NO_ERROR,
"No error has occurred.") "No error has occurred.")
CG_ERROR_MACRO(1, CG_ERROR_MACRO(1,
CG_COMPILER_ERROR, CG_COMPILER_ERROR,
"The compile returned an error.") "The compile returned an error.")
CG_ERROR_MACRO(2, CG_ERROR_MACRO(2,
CG_INVALID_PARAMETER_ERROR, CG_INVALID_PARAMETER_ERROR,
"The parameter used is invalid.") "The parameter used is invalid.")
CG_ERROR_MACRO(3, CG_ERROR_MACRO(3,
CG_INVALID_PROFILE_ERROR, CG_INVALID_PROFILE_ERROR,
"The profile is not supported.") "The profile is not supported.")
CG_ERROR_MACRO(4, CG_ERROR_MACRO(4,
CG_PROGRAM_LOAD_ERROR, CG_PROGRAM_LOAD_ERROR,
"The program could not load.") "The program could not load.")
CG_ERROR_MACRO(5, CG_ERROR_MACRO(5,
CG_PROGRAM_BIND_ERROR, CG_PROGRAM_BIND_ERROR,
"The program could not bind.") "The program could not bind.")
CG_ERROR_MACRO(6, CG_ERROR_MACRO(6,
CG_PROGRAM_NOT_LOADED_ERROR, CG_PROGRAM_NOT_LOADED_ERROR,
"The program must be loaded before this operation may be used.") "The program must be loaded before this operation may be used.")
CG_ERROR_MACRO(7, CG_ERROR_MACRO(7,
CG_UNSUPPORTED_GL_EXTENSION_ERROR, CG_UNSUPPORTED_GL_EXTENSION_ERROR,
"An unsupported GL extension was required to perform this operation.") "An unsupported GL extension was required to perform this operation.")
CG_ERROR_MACRO(8, CG_ERROR_MACRO(8,
CG_INVALID_VALUE_TYPE_ERROR, CG_INVALID_VALUE_TYPE_ERROR,
"An unknown value type was assigned to a parameter.") "An unknown value type was assigned to a parameter.")
CG_ERROR_MACRO(9, CG_ERROR_MACRO(9,
CG_NOT_MATRIX_PARAM_ERROR, CG_NOT_MATRIX_PARAM_ERROR,
"The parameter is not of matrix type.") "The parameter is not of matrix type.")
CG_ERROR_MACRO(10, CG_ERROR_MACRO(10,
CG_INVALID_ENUMERANT_ERROR, CG_INVALID_ENUMERANT_ERROR,
"The enumerant parameter has an invalid value.") "The enumerant parameter has an invalid value.")
CG_ERROR_MACRO(11, CG_ERROR_MACRO(11,
CG_NOT_4x4_MATRIX_ERROR, CG_NOT_4x4_MATRIX_ERROR,
"The parameter must be a 4x4 matrix type.") "The parameter must be a 4x4 matrix type.")
CG_ERROR_MACRO(12, CG_ERROR_MACRO(12,
CG_FILE_READ_ERROR, CG_FILE_READ_ERROR,
"The file could not be read.") "The file could not be read.")
CG_ERROR_MACRO(13, CG_ERROR_MACRO(13,
CG_FILE_WRITE_ERROR, CG_FILE_WRITE_ERROR,
"The file could not be written.") "The file could not be written.")
CG_ERROR_MACRO(14, CG_ERROR_MACRO(14,
CG_NVPARSE_ERROR, CG_NVPARSE_ERROR,
"nvparse could not successfully parse the output from the Cg " "nvparse could not successfully parse the output from the Cg "
"compiler backend.") "compiler backend.")
CG_ERROR_MACRO(15, CG_ERROR_MACRO(15,
CG_MEMORY_ALLOC_ERROR, CG_MEMORY_ALLOC_ERROR,
"Memory allocation failed.") "Memory allocation failed.")
CG_ERROR_MACRO(16, CG_ERROR_MACRO(16,
CG_INVALID_CONTEXT_HANDLE_ERROR, CG_INVALID_CONTEXT_HANDLE_ERROR,
"Invalid context handle.") "Invalid context handle.")
CG_ERROR_MACRO(17, CG_ERROR_MACRO(17,
CG_INVALID_PROGRAM_HANDLE_ERROR, CG_INVALID_PROGRAM_HANDLE_ERROR,
"Invalid program handle.") "Invalid program handle.")
CG_ERROR_MACRO(18, CG_ERROR_MACRO(18,
CG_INVALID_PARAM_HANDLE_ERROR, CG_INVALID_PARAM_HANDLE_ERROR,
"Invalid parameter handle.") "Invalid parameter handle.")
CG_ERROR_MACRO(19, CG_ERROR_MACRO(19,
CG_UNKNOWN_PROFILE_ERROR, CG_UNKNOWN_PROFILE_ERROR,
"The specified profile is unknown.") "The specified profile is unknown.")
CG_ERROR_MACRO(20, CG_ERROR_MACRO(20,
CG_VAR_ARG_ERROR, CG_VAR_ARG_ERROR,
"The variable arguments were specified incorrectly.") "The variable arguments were specified incorrectly.")
CG_ERROR_MACRO(21, CG_ERROR_MACRO(21,
CG_INVALID_DIMENSION_ERROR, CG_INVALID_DIMENSION_ERROR,
"The dimension value is invalid.") "The dimension value is invalid.")
CG_ERROR_MACRO(22, CG_ERROR_MACRO(22,
CG_ARRAY_PARAM_ERROR, CG_ARRAY_PARAM_ERROR,
"The parameter must be an array.") "The parameter must be an array.")
CG_ERROR_MACRO(23, CG_ERROR_MACRO(23,
CG_OUT_OF_ARRAY_BOUNDS_ERROR, CG_OUT_OF_ARRAY_BOUNDS_ERROR,
"Index into the array is out of bounds.") "Index into the array is out of bounds.")
CG_ERROR_MACRO(24, CG_ERROR_MACRO(24,
CG_CONFLICTING_TYPES_ERROR, CG_CONFLICTING_TYPES_ERROR,
"A type being added to the context conflicts with an " "A type being added to the context conflicts with an "
"existing type.") "existing type.")
CG_ERROR_MACRO(25, CG_ERROR_MACRO(25,
CG_CONFLICTING_PARAMETER_TYPES_ERROR, CG_CONFLICTING_PARAMETER_TYPES_ERROR,
"The parameters being bound have conflicting types.") "The parameters being bound have conflicting types.")
CG_ERROR_MACRO(26, CG_ERROR_MACRO(26,
CG_PARAMETER_IS_NOT_SHARED_ERROR, CG_PARAMETER_IS_NOT_SHARED_ERROR,
"The parameter must be global.") "The parameter must be global.")
CG_ERROR_MACRO(27, CG_ERROR_MACRO(27,
CG_INVALID_PARAMETER_VARIABILITY_ERROR, CG_INVALID_PARAMETER_VARIABILITY_ERROR,
"The parameter could not be changed to the given variability.") "The parameter could not be changed to the given variability.")
CG_ERROR_MACRO(28, CG_ERROR_MACRO(28,
CG_CANNOT_DESTROY_PARAMETER_ERROR, CG_CANNOT_DESTROY_PARAMETER_ERROR,
"Cannot destroy the parameter. It is bound to other parameters " "Cannot destroy the parameter. It is bound to other parameters "
"or is not a root parameter.") "or is not a root parameter.")
CG_ERROR_MACRO(29, CG_ERROR_MACRO(29,
CG_NOT_ROOT_PARAMETER_ERROR, CG_NOT_ROOT_PARAMETER_ERROR,
"The parameter is not a root parameter.") "The parameter is not a root parameter.")
CG_ERROR_MACRO(30, CG_ERROR_MACRO(30,
CG_PARAMETERS_DO_NOT_MATCH_ERROR, CG_PARAMETERS_DO_NOT_MATCH_ERROR,
"The two parameters being bound do not match.") "The two parameters being bound do not match.")
CG_ERROR_MACRO(31, CG_ERROR_MACRO(31,
CG_IS_NOT_PROGRAM_PARAMETER_ERROR, CG_IS_NOT_PROGRAM_PARAMETER_ERROR,
"The parameter is not a program parameter.") "The parameter is not a program parameter.")
CG_ERROR_MACRO(32, CG_ERROR_MACRO(32,
CG_INVALID_PARAMETER_TYPE_ERROR, CG_INVALID_PARAMETER_TYPE_ERROR,
"The type of the parameter is invalid.") "The type of the parameter is invalid.")
CG_ERROR_MACRO(33, CG_ERROR_MACRO(33,
CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR, CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR,
"The parameter must be a resizable array.") "The parameter must be a resizable array.")
CG_ERROR_MACRO(34, CG_ERROR_MACRO(34,
CG_INVALID_SIZE_ERROR, CG_INVALID_SIZE_ERROR,
"The size value is invalid.") "The size value is invalid.")
CG_ERROR_MACRO(35, CG_ERROR_MACRO(35,
CG_BIND_CREATES_CYCLE_ERROR, CG_BIND_CREATES_CYCLE_ERROR,
"Cannot bind the given parameters. Binding will form a cycle.") "Cannot bind the given parameters. Binding will form a cycle.")
CG_ERROR_MACRO(36, CG_ERROR_MACRO(36,
CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR, CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR,
"Cannot bind the given parameters. Array types do not match.") "Cannot bind the given parameters. Array types do not match.")
CG_ERROR_MACRO(37, CG_ERROR_MACRO(37,
CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR, CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR,
"Cannot bind the given parameters. " "Cannot bind the given parameters. "
"Array dimensions do not match.") "Array dimensions do not match.")
CG_ERROR_MACRO(38, CG_ERROR_MACRO(38,
CG_ARRAY_HAS_WRONG_DIMENSION_ERROR, CG_ARRAY_HAS_WRONG_DIMENSION_ERROR,
"The array has the wrong dimension.") "The array has the wrong dimension.")
CG_ERROR_MACRO(39, CG_ERROR_MACRO(39,
CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR, CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR,
"Connecting the parameters failed because The type of the " "Connecting the parameters failed because The type of the "
"source parameter is not defined within the given program " "source parameter is not defined within the given program "
"or does not match the type with the same name in the program.") "or does not match the type with the same name in the program.")
CG_ERROR_MACRO(40, CG_ERROR_MACRO(40,
CG_INVALID_EFFECT_HANDLE_ERROR, CG_INVALID_EFFECT_HANDLE_ERROR,
"Invalid effect handle.") "Invalid effect handle.")
CG_ERROR_MACRO(41, CG_ERROR_MACRO(41,
CG_INVALID_STATE_HANDLE_ERROR, CG_INVALID_STATE_HANDLE_ERROR,
"Invalid state handle.") "Invalid state handle.")
CG_ERROR_MACRO(42, CG_ERROR_MACRO(42,
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR, CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR,
"Invalid stateassignment handle.") "Invalid stateassignment handle.")
CG_ERROR_MACRO(43, CG_ERROR_MACRO(43,
CG_INVALID_PASS_HANDLE_ERROR, CG_INVALID_PASS_HANDLE_ERROR,
"Invalid pass handle.") "Invalid pass handle.")
CG_ERROR_MACRO(44, CG_ERROR_MACRO(44,
CG_INVALID_ANNOTATION_HANDLE_ERROR, CG_INVALID_ANNOTATION_HANDLE_ERROR,
"Invalid annotation handle.") "Invalid annotation handle.")
CG_ERROR_MACRO(45, CG_ERROR_MACRO(45,
CG_INVALID_TECHNIQUE_HANDLE_ERROR, CG_INVALID_TECHNIQUE_HANDLE_ERROR,
"Invalid technique handle.") "Invalid technique handle.")
// Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead. // Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead.
CG_ERROR_MACRO(46, CG_ERROR_MACRO(46,
CG_INVALID_PARAMETER_HANDLE_ERROR, CG_INVALID_PARAMETER_HANDLE_ERROR,
"Invalid parameter handle.") "Invalid parameter handle.")
CG_ERROR_MACRO(47, CG_ERROR_MACRO(47,
CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR, CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR,
"Operation is not valid for this type of stateassignment.") "Operation is not valid for this type of stateassignment.")
CG_ERROR_MACRO(48, CG_ERROR_MACRO(48,
CG_INVALID_FUNCTION_HANDLE_ERROR, CG_INVALID_FUNCTION_HANDLE_ERROR,
"Invalid function handle.") "Invalid function handle.")
CG_ERROR_MACRO(49, CG_ERROR_MACRO(49,
CG_INVALID_TECHNIQUE_ERROR, CG_INVALID_TECHNIQUE_ERROR,
"Technique did not pass validation.") "Technique did not pass validation.")
CG_ERROR_MACRO(50, CG_ERROR_MACRO(50,
CG_INVALID_POINTER_ERROR, CG_INVALID_POINTER_ERROR,
"The supplied pointer is NULL.") "The supplied pointer is NULL.")
CG_ERROR_MACRO(51, CG_ERROR_MACRO(51,
CG_NOT_ENOUGH_DATA_ERROR, CG_NOT_ENOUGH_DATA_ERROR,
"Not enough data was provided.") "Not enough data was provided.")
CG_ERROR_MACRO(52, CG_ERROR_MACRO(52,
CG_NON_NUMERIC_PARAMETER_ERROR, CG_NON_NUMERIC_PARAMETER_ERROR,
"The parameter is not of a numeric type.") "The parameter is not of a numeric type.")
CG_ERROR_MACRO(53, CG_ERROR_MACRO(53,
CG_ARRAY_SIZE_MISMATCH_ERROR, CG_ARRAY_SIZE_MISMATCH_ERROR,
"The specified array sizes are not compatible with the given array.") "The specified array sizes are not compatible with the given array.")
CG_ERROR_MACRO(54, CG_ERROR_MACRO(54,
CG_CANNOT_SET_NON_UNIFORM_PARAMETER_ERROR, CG_CANNOT_SET_NON_UNIFORM_PARAMETER_ERROR,
"Cannot set the value of a non-uniform parameter.") "Cannot set the value of a non-uniform parameter.")
CG_ERROR_MACRO(55, CG_ERROR_MACRO(55,
CG_DUPLICATE_NAME_ERROR, CG_DUPLICATE_NAME_ERROR,
"This name is already in use.") "This name is already in use.")
CG_ERROR_MACRO(56, CG_ERROR_MACRO(56,
CG_INVALID_OBJ_HANDLE_ERROR, CG_INVALID_OBJ_HANDLE_ERROR,
"Invalid object handle.") "Invalid object handle.")
CG_ERROR_MACRO(57, CG_ERROR_MACRO(57,
CG_INVALID_BUFFER_HANDLE_ERROR, CG_INVALID_BUFFER_HANDLE_ERROR,
"Invalid buffer handle.") "Invalid buffer handle.")
CG_ERROR_MACRO(58, CG_ERROR_MACRO(58,
CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR, CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR,
"Buffer index is out of bounds.") "Buffer index is out of bounds.")
CG_ERROR_MACRO(59, CG_ERROR_MACRO(59,
CG_BUFFER_ALREADY_MAPPED_ERROR, CG_BUFFER_ALREADY_MAPPED_ERROR,
"The buffer is already mapped.") "The buffer is already mapped.")
CG_ERROR_MACRO(60, CG_ERROR_MACRO(60,
CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR, CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR,
"The buffer cannot be updated.") "The buffer cannot be updated.")
#undef CG_ERROR_MACRO #undef CG_ERROR_MACRO

View File

@@ -1,95 +1,95 @@
/* /*
* *
* Copyright (c) 2002-2007, NVIDIA Corporation. * Copyright (c) 2002-2007, NVIDIA Corporation.
* *
* *
* *
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration * NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
* of your agreement to the following terms, and your use, installation, * of your agreement to the following terms, and your use, installation,
* modification or redistribution of this NVIDIA software constitutes * modification or redistribution of this NVIDIA software constitutes
* acceptance of these terms. If you do not agree with these terms, please do * acceptance of these terms. If you do not agree with these terms, please do
* not use, install, modify or redistribute this NVIDIA software. * not use, install, modify or redistribute this NVIDIA software.
* *
* *
* *
* In consideration of your agreement to abide by the following terms, and * In consideration of your agreement to abide by the following terms, and
* subject to these terms, NVIDIA grants you a personal, non-exclusive license, * subject to these terms, NVIDIA grants you a personal, non-exclusive license,
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA * under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
* Software"), to use, reproduce, modify and redistribute the NVIDIA * Software"), to use, reproduce, modify and redistribute the NVIDIA
* Software, with or without modifications, in source and/or binary forms; * Software, with or without modifications, in source and/or binary forms;
* provided that if you redistribute the NVIDIA Software, you must retain the * provided that if you redistribute the NVIDIA Software, you must retain the
* copyright notice of NVIDIA, this notice and the following text and * copyright notice of NVIDIA, this notice and the following text and
* disclaimers in all such redistributions of the NVIDIA Software. Neither the * disclaimers in all such redistributions of the NVIDIA Software. Neither the
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used * name, trademarks, service marks nor logos of NVIDIA Corporation may be used
* to endorse or promote products derived from the NVIDIA Software without * to endorse or promote products derived from the NVIDIA Software without
* specific prior written permission from NVIDIA. Except as expressly stated * specific prior written permission from NVIDIA. Except as expressly stated
* in this notice, no other rights or licenses express or implied, are granted * in this notice, no other rights or licenses express or implied, are granted
* by NVIDIA herein, including but not limited to any patent rights that may be * by NVIDIA herein, including but not limited to any patent rights that may be
* infringed by your derivative works or by other works in which the NVIDIA * infringed by your derivative works or by other works in which the NVIDIA
* Software may be incorporated. No hardware is licensed hereunder. * Software may be incorporated. No hardware is licensed hereunder.
* *
* *
* *
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT * THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. * EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
* *
* *
* *
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST * EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
* PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, * PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, * REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING * HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED * NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
/* /*
* The following macro invocations define the supported CG profiles. * The following macro invocations define the supported CG profiles.
* *
* The macros have the form : * The macros have the form :
* *
* CG_PROFILE_MACRO(name, compiler_id, compiler_opt) * CG_PROFILE_MACRO(name, compiler_id, compiler_opt)
* *
* name : The name of the profile. Used consistently with the API. * name : The name of the profile. Used consistently with the API.
* compiler_id : The identifier string for the profile used by the compiler. * compiler_id : The identifier string for the profile used by the compiler.
* compiler_id_caps : compiler_id in caps. * compiler_id_caps : compiler_id in caps.
* compiler_opt : The command-line switch used to force compilation into * compiler_opt : The command-line switch used to force compilation into
* the profile. * the profile.
* int_id : Integer enumerant associated with this bind location. * int_id : Integer enumerant associated with this bind location.
* vertex_profile : Non-zero if this is a vertex profile, otherwise it * vertex_profile : Non-zero if this is a vertex profile, otherwise it
* is considered to be a fragment profile. * is considered to be a fragment profile.
* *
* *
*/ */
#define CG_IN_PROFILES_INCLUDE #define CG_IN_PROFILES_INCLUDE
#include <Cg/cgGL_profiles.h> #include <Cg/cgGL_profiles.h>
CG_PROFILE_MACRO(DX9Vertex11,vs_1_1,VS_1_1,"vs_1_1",6153,1) CG_PROFILE_MACRO(DX9Vertex11,vs_1_1,VS_1_1,"vs_1_1",6153,1)
CG_PROFILE_MACRO(DX9Vertex20,vs_2_0,VS_2_0,"vs_2_0",6154,1) CG_PROFILE_MACRO(DX9Vertex20,vs_2_0,VS_2_0,"vs_2_0",6154,1)
CG_PROFILE_MACRO(DX9Vertex2x,vs_2_x,VS_2_X,"vs_2_x",6155,1) CG_PROFILE_MACRO(DX9Vertex2x,vs_2_x,VS_2_X,"vs_2_x",6155,1)
CG_PROFILE_MACRO(DX9Vertex2sw,vs_2_sw,VS_2_SW,"vs_2_sw",6156,1) CG_PROFILE_MACRO(DX9Vertex2sw,vs_2_sw,VS_2_SW,"vs_2_sw",6156,1)
CG_PROFILE_MACRO(DX9Vertex30,vs_3_0,VS_3_0,"vs_3_0",6157,1) CG_PROFILE_MACRO(DX9Vertex30,vs_3_0,VS_3_0,"vs_3_0",6157,1)
CG_PROFILE_MACRO(DX9VertexHLSL,hlslv, HLSLV,"hlslv",6158,1) CG_PROFILE_MACRO(DX9VertexHLSL,hlslv, HLSLV,"hlslv",6158,1)
CG_PROFILE_MACRO(DX9Pixel11,ps_1_1,PS_1_1,"ps_1_1",6159,0) CG_PROFILE_MACRO(DX9Pixel11,ps_1_1,PS_1_1,"ps_1_1",6159,0)
CG_PROFILE_MACRO(DX9Pixel12,ps_1_2,PS_1_2,"ps_1_2",6160,0) CG_PROFILE_MACRO(DX9Pixel12,ps_1_2,PS_1_2,"ps_1_2",6160,0)
CG_PROFILE_MACRO(DX9Pixel13,ps_1_3,PS_1_3,"ps_1_3",6161,0) CG_PROFILE_MACRO(DX9Pixel13,ps_1_3,PS_1_3,"ps_1_3",6161,0)
CG_PROFILE_MACRO(DX9Pixel20,ps_2_0,PS_2_0,"ps_2_0",6162,0) CG_PROFILE_MACRO(DX9Pixel20,ps_2_0,PS_2_0,"ps_2_0",6162,0)
CG_PROFILE_MACRO(DX9Pixel2x,ps_2_x,PS_2_X,"ps_2_x",6163,0) CG_PROFILE_MACRO(DX9Pixel2x,ps_2_x,PS_2_X,"ps_2_x",6163,0)
CG_PROFILE_MACRO(DX9Pixel2sw,ps_2_sw,PS_2_SW,"ps_2_sw",6164,0) CG_PROFILE_MACRO(DX9Pixel2sw,ps_2_sw,PS_2_SW,"ps_2_sw",6164,0)
CG_PROFILE_MACRO(DX9Pixel30,ps_3_0,PS_3_0,"ps_3_0",6165,0) CG_PROFILE_MACRO(DX9Pixel30,ps_3_0,PS_3_0,"ps_3_0",6165,0)
CG_PROFILE_MACRO(DX9PixelHLSL,hlslf,HLSLF,"hlslf",6166,0) CG_PROFILE_MACRO(DX9PixelHLSL,hlslf,HLSLF,"hlslf",6166,0)
CG_PROFILE_MACRO(Generic, generic, GENERIC, "generic", 7002,0) CG_PROFILE_MACRO(Generic, generic, GENERIC, "generic", 7002,0)
#undef CG_PROFILE_MACRO #undef CG_PROFILE_MACRO
#undef CG_IN_PROFILES_INCLUDE #undef CG_IN_PROFILES_INCLUDE

3414
Externals/GLew/fgl.h vendored

File diff suppressed because it is too large Load Diff

420
Externals/GLew/fglu.h vendored
View File

@@ -1,210 +1,210 @@
C GLUT version of "GL/fgl.h" C GLUT version of "GL/fgl.h"
C Modifications from SGI IRIX 5.3 version: C Modifications from SGI IRIX 5.3 version:
C 1) F prefix removed from GLU constants. C 1) F prefix removed from GLU constants.
C 2) Fix GLU_TRUE and GLU_FALSE. C 2) Fix GLU_TRUE and GLU_FALSE.
C *** Generic constants *** C *** Generic constants ***
C Errors: (return value 0 = no error) C Errors: (return value 0 = no error)
integer*4 GLU_INVALID_ENUM integer*4 GLU_INVALID_ENUM
parameter ( GLU_INVALID_ENUM = 100900 ) parameter ( GLU_INVALID_ENUM = 100900 )
integer*4 GLU_INVALID_VALUE integer*4 GLU_INVALID_VALUE
parameter ( GLU_INVALID_VALUE = 100901 ) parameter ( GLU_INVALID_VALUE = 100901 )
integer*4 GLU_OUT_OF_MEMORY integer*4 GLU_OUT_OF_MEMORY
parameter ( GLU_OUT_OF_MEMORY = 100902 ) parameter ( GLU_OUT_OF_MEMORY = 100902 )
C For laughs: C For laughs:
integer*4 GLU_TRUE integer*4 GLU_TRUE
parameter ( GLU_TRUE = 1 ) parameter ( GLU_TRUE = 1 )
integer*4 GLU_FALSE integer*4 GLU_FALSE
parameter ( GLU_FALSE = 0 ) parameter ( GLU_FALSE = 0 )
C *** Quadric constants *** C *** Quadric constants ***
C Types of normals: C Types of normals:
integer*4 GLU_SMOOTH integer*4 GLU_SMOOTH
parameter ( GLU_SMOOTH = 100000 ) parameter ( GLU_SMOOTH = 100000 )
integer*4 GLU_FLAT integer*4 GLU_FLAT
parameter ( GLU_FLAT = 100001 ) parameter ( GLU_FLAT = 100001 )
integer*4 GLU_NONE integer*4 GLU_NONE
parameter ( GLU_NONE = 100002 ) parameter ( GLU_NONE = 100002 )
C DrawStyle types: C DrawStyle types:
integer*4 GLU_POINT integer*4 GLU_POINT
parameter ( GLU_POINT = 100010 ) parameter ( GLU_POINT = 100010 )
integer*4 GLU_LINE integer*4 GLU_LINE
parameter ( GLU_LINE = 100011 ) parameter ( GLU_LINE = 100011 )
integer*4 GLU_FILL integer*4 GLU_FILL
parameter ( GLU_FILL = 100012 ) parameter ( GLU_FILL = 100012 )
integer*4 GLU_SILHOUETTE integer*4 GLU_SILHOUETTE
parameter ( GLU_SILHOUETTE = 100013 ) parameter ( GLU_SILHOUETTE = 100013 )
C Orientation types: C Orientation types:
integer*4 GLU_OUTSIDE integer*4 GLU_OUTSIDE
parameter ( GLU_OUTSIDE = 100020 ) parameter ( GLU_OUTSIDE = 100020 )
integer*4 GLU_INSIDE integer*4 GLU_INSIDE
parameter ( GLU_INSIDE = 100021 ) parameter ( GLU_INSIDE = 100021 )
C Callback types: C Callback types:
C GLU_ERROR 100103 C GLU_ERROR 100103
C *** Tesselation constants *** C *** Tesselation constants ***
C Callback types: C Callback types:
integer*4 GLU_BEGIN integer*4 GLU_BEGIN
parameter ( GLU_BEGIN = 100100 ) parameter ( GLU_BEGIN = 100100 )
integer*4 GLU_VERTEX integer*4 GLU_VERTEX
parameter ( GLU_VERTEX = 100101 ) parameter ( GLU_VERTEX = 100101 )
integer*4 GLU_END integer*4 GLU_END
parameter ( GLU_END = 100102 ) parameter ( GLU_END = 100102 )
integer*4 GLU_ERROR integer*4 GLU_ERROR
parameter ( GLU_ERROR = 100103 ) parameter ( GLU_ERROR = 100103 )
integer*4 GLU_EDGE_FLAG integer*4 GLU_EDGE_FLAG
parameter ( GLU_EDGE_FLAG = 100104 ) parameter ( GLU_EDGE_FLAG = 100104 )
C Contours types: C Contours types:
integer*4 GLU_CW integer*4 GLU_CW
parameter ( GLU_CW = 100120 ) parameter ( GLU_CW = 100120 )
integer*4 GLU_CCW integer*4 GLU_CCW
parameter ( GLU_CCW = 100121 ) parameter ( GLU_CCW = 100121 )
integer*4 GLU_INTERIOR integer*4 GLU_INTERIOR
parameter ( GLU_INTERIOR = 100122 ) parameter ( GLU_INTERIOR = 100122 )
integer*4 GLU_EXTERIOR integer*4 GLU_EXTERIOR
parameter ( GLU_EXTERIOR = 100123 ) parameter ( GLU_EXTERIOR = 100123 )
integer*4 GLU_UNKNOWN integer*4 GLU_UNKNOWN
parameter ( GLU_UNKNOWN = 100124 ) parameter ( GLU_UNKNOWN = 100124 )
integer*4 GLU_TESS_ERROR1 integer*4 GLU_TESS_ERROR1
parameter ( GLU_TESS_ERROR1 = 100151 ) parameter ( GLU_TESS_ERROR1 = 100151 )
integer*4 GLU_TESS_ERROR2 integer*4 GLU_TESS_ERROR2
parameter ( GLU_TESS_ERROR2 = 100152 ) parameter ( GLU_TESS_ERROR2 = 100152 )
integer*4 GLU_TESS_ERROR3 integer*4 GLU_TESS_ERROR3
parameter ( GLU_TESS_ERROR3 = 100153 ) parameter ( GLU_TESS_ERROR3 = 100153 )
integer*4 GLU_TESS_ERROR4 integer*4 GLU_TESS_ERROR4
parameter ( GLU_TESS_ERROR4 = 100154 ) parameter ( GLU_TESS_ERROR4 = 100154 )
integer*4 GLU_TESS_ERROR5 integer*4 GLU_TESS_ERROR5
parameter ( GLU_TESS_ERROR5 = 100155 ) parameter ( GLU_TESS_ERROR5 = 100155 )
integer*4 GLU_TESS_ERROR6 integer*4 GLU_TESS_ERROR6
parameter ( GLU_TESS_ERROR6 = 100156 ) parameter ( GLU_TESS_ERROR6 = 100156 )
integer*4 GLU_TESS_ERROR7 integer*4 GLU_TESS_ERROR7
parameter ( GLU_TESS_ERROR7 = 100157 ) parameter ( GLU_TESS_ERROR7 = 100157 )
integer*4 GLU_TESS_ERROR8 integer*4 GLU_TESS_ERROR8
parameter ( GLU_TESS_ERROR8 = 100158 ) parameter ( GLU_TESS_ERROR8 = 100158 )
C *** NURBS constants *** C *** NURBS constants ***
C Properties: C Properties:
integer*4 GLU_AUTO_LOAD_MATRIX integer*4 GLU_AUTO_LOAD_MATRIX
parameter ( GLU_AUTO_LOAD_MATRIX = 100200 ) parameter ( GLU_AUTO_LOAD_MATRIX = 100200 )
integer*4 GLU_CULLING integer*4 GLU_CULLING
parameter ( GLU_CULLING = 100201 ) parameter ( GLU_CULLING = 100201 )
integer*4 GLU_SAMPLING_TOLERANCE integer*4 GLU_SAMPLING_TOLERANCE
parameter ( GLU_SAMPLING_TOLERANCE = 100203 ) parameter ( GLU_SAMPLING_TOLERANCE = 100203 )
integer*4 GLU_DISPLAY_MODE integer*4 GLU_DISPLAY_MODE
parameter ( GLU_DISPLAY_MODE = 100204 ) parameter ( GLU_DISPLAY_MODE = 100204 )
C Trimming curve types C Trimming curve types
integer*4 GLU_MAP1_TRIM_2 integer*4 GLU_MAP1_TRIM_2
parameter ( GLU_MAP1_TRIM_2 = 100210 ) parameter ( GLU_MAP1_TRIM_2 = 100210 )
integer*4 GLU_MAP1_TRIM_3 integer*4 GLU_MAP1_TRIM_3
parameter ( GLU_MAP1_TRIM_3 = 100211 ) parameter ( GLU_MAP1_TRIM_3 = 100211 )
C Display modes: C Display modes:
C GLU_FILL 100012 C GLU_FILL 100012
integer*4 GLU_OUTLINE_POLYGON integer*4 GLU_OUTLINE_POLYGON
parameter ( GLU_OUTLINE_POLYGON = 100240 ) parameter ( GLU_OUTLINE_POLYGON = 100240 )
integer*4 GLU_OUTLINE_PATCH integer*4 GLU_OUTLINE_PATCH
parameter ( GLU_OUTLINE_PATCH = 100241 ) parameter ( GLU_OUTLINE_PATCH = 100241 )
C Callbacks: C Callbacks:
C GLU_ERROR 100103 C GLU_ERROR 100103
C Errors: C Errors:
integer*4 GLU_NURBS_ERROR1 integer*4 GLU_NURBS_ERROR1
parameter ( GLU_NURBS_ERROR1 = 100251 ) parameter ( GLU_NURBS_ERROR1 = 100251 )
integer*4 GLU_NURBS_ERROR2 integer*4 GLU_NURBS_ERROR2
parameter ( GLU_NURBS_ERROR2 = 100252 ) parameter ( GLU_NURBS_ERROR2 = 100252 )
integer*4 GLU_NURBS_ERROR3 integer*4 GLU_NURBS_ERROR3
parameter ( GLU_NURBS_ERROR3 = 100253 ) parameter ( GLU_NURBS_ERROR3 = 100253 )
integer*4 GLU_NURBS_ERROR4 integer*4 GLU_NURBS_ERROR4
parameter ( GLU_NURBS_ERROR4 = 100254 ) parameter ( GLU_NURBS_ERROR4 = 100254 )
integer*4 GLU_NURBS_ERROR5 integer*4 GLU_NURBS_ERROR5
parameter ( GLU_NURBS_ERROR5 = 100255 ) parameter ( GLU_NURBS_ERROR5 = 100255 )
integer*4 GLU_NURBS_ERROR6 integer*4 GLU_NURBS_ERROR6
parameter ( GLU_NURBS_ERROR6 = 100256 ) parameter ( GLU_NURBS_ERROR6 = 100256 )
integer*4 GLU_NURBS_ERROR7 integer*4 GLU_NURBS_ERROR7
parameter ( GLU_NURBS_ERROR7 = 100257 ) parameter ( GLU_NURBS_ERROR7 = 100257 )
integer*4 GLU_NURBS_ERROR8 integer*4 GLU_NURBS_ERROR8
parameter ( GLU_NURBS_ERROR8 = 100258 ) parameter ( GLU_NURBS_ERROR8 = 100258 )
integer*4 GLU_NURBS_ERROR9 integer*4 GLU_NURBS_ERROR9
parameter ( GLU_NURBS_ERROR9 = 100259 ) parameter ( GLU_NURBS_ERROR9 = 100259 )
integer*4 GLU_NURBS_ERROR10 integer*4 GLU_NURBS_ERROR10
parameter ( GLU_NURBS_ERROR10 = 100260 ) parameter ( GLU_NURBS_ERROR10 = 100260 )
integer*4 GLU_NURBS_ERROR11 integer*4 GLU_NURBS_ERROR11
parameter ( GLU_NURBS_ERROR11 = 100261 ) parameter ( GLU_NURBS_ERROR11 = 100261 )
integer*4 GLU_NURBS_ERROR12 integer*4 GLU_NURBS_ERROR12
parameter ( GLU_NURBS_ERROR12 = 100262 ) parameter ( GLU_NURBS_ERROR12 = 100262 )
integer*4 GLU_NURBS_ERROR13 integer*4 GLU_NURBS_ERROR13
parameter ( GLU_NURBS_ERROR13 = 100263 ) parameter ( GLU_NURBS_ERROR13 = 100263 )
integer*4 GLU_NURBS_ERROR14 integer*4 GLU_NURBS_ERROR14
parameter ( GLU_NURBS_ERROR14 = 100264 ) parameter ( GLU_NURBS_ERROR14 = 100264 )
integer*4 GLU_NURBS_ERROR15 integer*4 GLU_NURBS_ERROR15
parameter ( GLU_NURBS_ERROR15 = 100265 ) parameter ( GLU_NURBS_ERROR15 = 100265 )
integer*4 GLU_NURBS_ERROR16 integer*4 GLU_NURBS_ERROR16
parameter ( GLU_NURBS_ERROR16 = 100266 ) parameter ( GLU_NURBS_ERROR16 = 100266 )
integer*4 GLU_NURBS_ERROR17 integer*4 GLU_NURBS_ERROR17
parameter ( GLU_NURBS_ERROR17 = 100267 ) parameter ( GLU_NURBS_ERROR17 = 100267 )
integer*4 GLU_NURBS_ERROR18 integer*4 GLU_NURBS_ERROR18
parameter ( GLU_NURBS_ERROR18 = 100268 ) parameter ( GLU_NURBS_ERROR18 = 100268 )
integer*4 GLU_NURBS_ERROR19 integer*4 GLU_NURBS_ERROR19
parameter ( GLU_NURBS_ERROR19 = 100269 ) parameter ( GLU_NURBS_ERROR19 = 100269 )
integer*4 GLU_NURBS_ERROR20 integer*4 GLU_NURBS_ERROR20
parameter ( GLU_NURBS_ERROR20 = 100270 ) parameter ( GLU_NURBS_ERROR20 = 100270 )
integer*4 GLU_NURBS_ERROR21 integer*4 GLU_NURBS_ERROR21
parameter ( GLU_NURBS_ERROR21 = 100271 ) parameter ( GLU_NURBS_ERROR21 = 100271 )
integer*4 GLU_NURBS_ERROR22 integer*4 GLU_NURBS_ERROR22
parameter ( GLU_NURBS_ERROR22 = 100272 ) parameter ( GLU_NURBS_ERROR22 = 100272 )
integer*4 GLU_NURBS_ERROR23 integer*4 GLU_NURBS_ERROR23
parameter ( GLU_NURBS_ERROR23 = 100273 ) parameter ( GLU_NURBS_ERROR23 = 100273 )
integer*4 GLU_NURBS_ERROR24 integer*4 GLU_NURBS_ERROR24
parameter ( GLU_NURBS_ERROR24 = 100274 ) parameter ( GLU_NURBS_ERROR24 = 100274 )
integer*4 GLU_NURBS_ERROR25 integer*4 GLU_NURBS_ERROR25
parameter ( GLU_NURBS_ERROR25 = 100275 ) parameter ( GLU_NURBS_ERROR25 = 100275 )
integer*4 GLU_NURBS_ERROR26 integer*4 GLU_NURBS_ERROR26
parameter ( GLU_NURBS_ERROR26 = 100276 ) parameter ( GLU_NURBS_ERROR26 = 100276 )
integer*4 GLU_NURBS_ERROR27 integer*4 GLU_NURBS_ERROR27
parameter ( GLU_NURBS_ERROR27 = 100277 ) parameter ( GLU_NURBS_ERROR27 = 100277 )
integer*4 GLU_NURBS_ERROR28 integer*4 GLU_NURBS_ERROR28
parameter ( GLU_NURBS_ERROR28 = 100278 ) parameter ( GLU_NURBS_ERROR28 = 100278 )
integer*4 GLU_NURBS_ERROR29 integer*4 GLU_NURBS_ERROR29
parameter ( GLU_NURBS_ERROR29 = 100279 ) parameter ( GLU_NURBS_ERROR29 = 100279 )
integer*4 GLU_NURBS_ERROR30 integer*4 GLU_NURBS_ERROR30
parameter ( GLU_NURBS_ERROR30 = 100280 ) parameter ( GLU_NURBS_ERROR30 = 100280 )
integer*4 GLU_NURBS_ERROR31 integer*4 GLU_NURBS_ERROR31
parameter ( GLU_NURBS_ERROR31 = 100281 ) parameter ( GLU_NURBS_ERROR31 = 100281 )
integer*4 GLU_NURBS_ERROR32 integer*4 GLU_NURBS_ERROR32
parameter ( GLU_NURBS_ERROR32 = 100282 ) parameter ( GLU_NURBS_ERROR32 = 100282 )
integer*4 GLU_NURBS_ERROR33 integer*4 GLU_NURBS_ERROR33
parameter ( GLU_NURBS_ERROR33 = 100283 ) parameter ( GLU_NURBS_ERROR33 = 100283 )
integer*4 GLU_NURBS_ERROR34 integer*4 GLU_NURBS_ERROR34
parameter ( GLU_NURBS_ERROR34 = 100284 ) parameter ( GLU_NURBS_ERROR34 = 100284 )
integer*4 GLU_NURBS_ERROR35 integer*4 GLU_NURBS_ERROR35
parameter ( GLU_NURBS_ERROR35 = 100285 ) parameter ( GLU_NURBS_ERROR35 = 100285 )
integer*4 GLU_NURBS_ERROR36 integer*4 GLU_NURBS_ERROR36
parameter ( GLU_NURBS_ERROR36 = 100286 ) parameter ( GLU_NURBS_ERROR36 = 100286 )
integer*4 GLU_NURBS_ERROR37 integer*4 GLU_NURBS_ERROR37
parameter ( GLU_NURBS_ERROR37 = 100287 ) parameter ( GLU_NURBS_ERROR37 = 100287 )
character*128 fgluErrorString character*128 fgluErrorString
character*128 fgluGetString character*128 fgluGetString
integer*4 fgluBuild1DMipmaps integer*4 fgluBuild1DMipmaps
integer*4 fgluBuild2DMipmaps integer*4 fgluBuild2DMipmaps
integer*4 fgluProject integer*4 fgluProject
integer*4 fgluScaleImage integer*4 fgluScaleImage
integer*4 fgluUnProject integer*4 fgluUnProject

642
Externals/GLew/fglut.h vendored
View File

@@ -1,321 +1,321 @@
C Copyright (c) Mark J. Kilgard, 1994. C Copyright (c) Mark J. Kilgard, 1994.
C This program is freely distributable without licensing fees C This program is freely distributable without licensing fees
C and is provided without guarantee or warrantee expressed or C and is provided without guarantee or warrantee expressed or
C implied. This program is -not- in the public domain. C implied. This program is -not- in the public domain.
C GLUT Fortran header file C GLUT Fortran header file
C display mode bit masks C display mode bit masks
integer*4 GLUT_RGB integer*4 GLUT_RGB
parameter ( GLUT_RGB = 0 ) parameter ( GLUT_RGB = 0 )
integer*4 GLUT_RGBA integer*4 GLUT_RGBA
parameter ( GLUT_RGBA = 0 ) parameter ( GLUT_RGBA = 0 )
integer*4 GLUT_INDEX integer*4 GLUT_INDEX
parameter ( GLUT_INDEX = 1 ) parameter ( GLUT_INDEX = 1 )
integer*4 GLUT_SINGLE integer*4 GLUT_SINGLE
parameter ( GLUT_SINGLE = 0 ) parameter ( GLUT_SINGLE = 0 )
integer*4 GLUT_DOUBLE integer*4 GLUT_DOUBLE
parameter ( GLUT_DOUBLE = 2 ) parameter ( GLUT_DOUBLE = 2 )
integer*4 GLUT_ACCUM integer*4 GLUT_ACCUM
parameter ( GLUT_ACCUM = 4 ) parameter ( GLUT_ACCUM = 4 )
integer*4 GLUT_ALPHA integer*4 GLUT_ALPHA
parameter ( GLUT_ALPHA = 8 ) parameter ( GLUT_ALPHA = 8 )
integer*4 GLUT_DEPTH integer*4 GLUT_DEPTH
parameter ( GLUT_DEPTH = 16 ) parameter ( GLUT_DEPTH = 16 )
integer*4 GLUT_STENCIL integer*4 GLUT_STENCIL
parameter ( GLUT_STENCIL = 32 ) parameter ( GLUT_STENCIL = 32 )
integer*4 GLUT_MULTISAMPLE integer*4 GLUT_MULTISAMPLE
parameter ( GLUT_MULTISAMPLE = 128 ) parameter ( GLUT_MULTISAMPLE = 128 )
integer*4 GLUT_STEREO integer*4 GLUT_STEREO
parameter ( GLUT_STEREO = 256 ) parameter ( GLUT_STEREO = 256 )
C mouse buttons C mouse buttons
integer*4 GLUT_LEFT_BUTTON integer*4 GLUT_LEFT_BUTTON
parameter ( GLUT_LEFT_BUTTON = 0 ) parameter ( GLUT_LEFT_BUTTON = 0 )
integer*4 GLUT_MIDDLE_BUTTON integer*4 GLUT_MIDDLE_BUTTON
parameter ( GLUT_MIDDLE_BUTTON = 1 ) parameter ( GLUT_MIDDLE_BUTTON = 1 )
integer*4 GLUT_RIGHT_BUTTON integer*4 GLUT_RIGHT_BUTTON
parameter ( GLUT_RIGHT_BUTTON = 2 ) parameter ( GLUT_RIGHT_BUTTON = 2 )
C mouse button callback state C mouse button callback state
integer*4 GLUT_DOWN integer*4 GLUT_DOWN
parameter ( GLUT_DOWN = 0 ) parameter ( GLUT_DOWN = 0 )
integer*4 GLUT_UP integer*4 GLUT_UP
parameter ( GLUT_UP = 1 ) parameter ( GLUT_UP = 1 )
C special key callback values C special key callback values
integer*4 GLUT_KEY_F1 integer*4 GLUT_KEY_F1
parameter ( GLUT_KEY_F1 = 1 ) parameter ( GLUT_KEY_F1 = 1 )
integer*4 GLUT_KEY_F2 integer*4 GLUT_KEY_F2
parameter ( GLUT_KEY_F2 = 2 ) parameter ( GLUT_KEY_F2 = 2 )
integer*4 GLUT_KEY_F3 integer*4 GLUT_KEY_F3
parameter ( GLUT_KEY_F3 = 3 ) parameter ( GLUT_KEY_F3 = 3 )
integer*4 GLUT_KEY_F4 integer*4 GLUT_KEY_F4
parameter ( GLUT_KEY_F4 = 4 ) parameter ( GLUT_KEY_F4 = 4 )
integer*4 GLUT_KEY_F5 integer*4 GLUT_KEY_F5
parameter ( GLUT_KEY_F5 = 5 ) parameter ( GLUT_KEY_F5 = 5 )
integer*4 GLUT_KEY_F6 integer*4 GLUT_KEY_F6
parameter ( GLUT_KEY_F6 = 6 ) parameter ( GLUT_KEY_F6 = 6 )
integer*4 GLUT_KEY_F7 integer*4 GLUT_KEY_F7
parameter ( GLUT_KEY_F7 = 7 ) parameter ( GLUT_KEY_F7 = 7 )
integer*4 GLUT_KEY_F8 integer*4 GLUT_KEY_F8
parameter ( GLUT_KEY_F8 = 8 ) parameter ( GLUT_KEY_F8 = 8 )
integer*4 GLUT_KEY_F9 integer*4 GLUT_KEY_F9
parameter ( GLUT_KEY_F9 = 9 ) parameter ( GLUT_KEY_F9 = 9 )
integer*4 GLUT_KEY_F10 integer*4 GLUT_KEY_F10
parameter ( GLUT_KEY_F10 = 10 ) parameter ( GLUT_KEY_F10 = 10 )
integer*4 GLUT_KEY_F11 integer*4 GLUT_KEY_F11
parameter ( GLUT_KEY_F11 = 11 ) parameter ( GLUT_KEY_F11 = 11 )
integer*4 GLUT_KEY_F12 integer*4 GLUT_KEY_F12
parameter ( GLUT_KEY_F12 = 12 ) parameter ( GLUT_KEY_F12 = 12 )
integer*4 GLUT_KEY_LEFT integer*4 GLUT_KEY_LEFT
parameter ( GLUT_KEY_LEFT = 100 ) parameter ( GLUT_KEY_LEFT = 100 )
integer*4 GLUT_KEY_UP integer*4 GLUT_KEY_UP
parameter ( GLUT_KEY_UP = 101 ) parameter ( GLUT_KEY_UP = 101 )
integer*4 GLUT_KEY_RIGHT integer*4 GLUT_KEY_RIGHT
parameter ( GLUT_KEY_RIGHT = 102 ) parameter ( GLUT_KEY_RIGHT = 102 )
integer*4 GLUT_KEY_DOWN integer*4 GLUT_KEY_DOWN
parameter ( GLUT_KEY_DOWN = 103 ) parameter ( GLUT_KEY_DOWN = 103 )
integer*4 GLUT_KEY_PAGE_UP integer*4 GLUT_KEY_PAGE_UP
parameter ( GLUT_KEY_PAGE_UP = 104 ) parameter ( GLUT_KEY_PAGE_UP = 104 )
integer*4 GLUT_KEY_PAGE_DOWN integer*4 GLUT_KEY_PAGE_DOWN
parameter ( GLUT_KEY_PAGE_DOWN = 105 ) parameter ( GLUT_KEY_PAGE_DOWN = 105 )
integer*4 GLUT_KEY_HOME integer*4 GLUT_KEY_HOME
parameter ( GLUT_KEY_HOME = 106 ) parameter ( GLUT_KEY_HOME = 106 )
integer*4 GLUT_KEY_END integer*4 GLUT_KEY_END
parameter ( GLUT_KEY_END = 107 ) parameter ( GLUT_KEY_END = 107 )
integer*4 GLUT_KEY_INSERT integer*4 GLUT_KEY_INSERT
parameter ( GLUT_KEY_INSERT = 108 ) parameter ( GLUT_KEY_INSERT = 108 )
C entry/exit callback state C entry/exit callback state
integer*4 GLUT_LEFT integer*4 GLUT_LEFT
parameter ( GLUT_LEFT = 0 ) parameter ( GLUT_LEFT = 0 )
integer*4 GLUT_ENTERED integer*4 GLUT_ENTERED
parameter ( GLUT_ENTERED = 1 ) parameter ( GLUT_ENTERED = 1 )
C menu usage callback state C menu usage callback state
integer*4 GLUT_MENU_NOT_IN_USE integer*4 GLUT_MENU_NOT_IN_USE
parameter ( GLUT_MENU_NOT_IN_USE = 0 ) parameter ( GLUT_MENU_NOT_IN_USE = 0 )
integer*4 GLUT_MENU_IN_USE integer*4 GLUT_MENU_IN_USE
parameter ( GLUT_MENU_IN_USE = 1 ) parameter ( GLUT_MENU_IN_USE = 1 )
C visibility callback state C visibility callback state
integer*4 GLUT_NOT_VISIBLE integer*4 GLUT_NOT_VISIBLE
parameter ( GLUT_NOT_VISIBLE = 0 ) parameter ( GLUT_NOT_VISIBLE = 0 )
integer*4 GLUT_VISIBLE integer*4 GLUT_VISIBLE
parameter ( GLUT_VISIBLE = 1 ) parameter ( GLUT_VISIBLE = 1 )
C color index component selection values C color index component selection values
integer*4 GLUT_RED integer*4 GLUT_RED
parameter ( GLUT_RED = 0 ) parameter ( GLUT_RED = 0 )
integer*4 GLUT_GREEN integer*4 GLUT_GREEN
parameter ( GLUT_GREEN = 1 ) parameter ( GLUT_GREEN = 1 )
integer*4 GLUT_BLUE integer*4 GLUT_BLUE
parameter ( GLUT_BLUE = 2 ) parameter ( GLUT_BLUE = 2 )
C XXX Unfortunately, SGI's Fortran compiler links with C XXX Unfortunately, SGI's Fortran compiler links with
C EXTERNAL data even if it is not used. This defeats C EXTERNAL data even if it is not used. This defeats
C the purpose of GLUT naming fonts via opaque symbols. C the purpose of GLUT naming fonts via opaque symbols.
C This means GLUT Fortran programmers should explicitly C This means GLUT Fortran programmers should explicitly
C declared EXTERNAL GLUT fonts in subroutines where C declared EXTERNAL GLUT fonts in subroutines where
C the fonts are used. C the fonts are used.
C stroke font opaque names C stroke font opaque names
C external GLUT_STROKE_ROMAN C external GLUT_STROKE_ROMAN
C external GLUT_STROKE_MONO_ROMAN C external GLUT_STROKE_MONO_ROMAN
C bitmap font opaque names C bitmap font opaque names
C external GLUT_BITMAP_9_BY_15 C external GLUT_BITMAP_9_BY_15
C external GLUT_BITMAP_8_BY_13 C external GLUT_BITMAP_8_BY_13
C external GLUT_BITMAP_TIMES_ROMAN_10 C external GLUT_BITMAP_TIMES_ROMAN_10
C external GLUT_BITMAP_TIMES_ROMAN_24 C external GLUT_BITMAP_TIMES_ROMAN_24
C external GLUT_BITMAP_HELVETICA_10 C external GLUT_BITMAP_HELVETICA_10
C external GLUT_BITMAP_HELVETICA_12 C external GLUT_BITMAP_HELVETICA_12
C external GLUT_BITMAP_HELVETICA_18 C external GLUT_BITMAP_HELVETICA_18
C glutGet parameters C glutGet parameters
integer*4 GLUT_WINDOW_X integer*4 GLUT_WINDOW_X
parameter ( GLUT_WINDOW_X = 100 ) parameter ( GLUT_WINDOW_X = 100 )
integer*4 GLUT_WINDOW_Y integer*4 GLUT_WINDOW_Y
parameter ( GLUT_WINDOW_Y = 101 ) parameter ( GLUT_WINDOW_Y = 101 )
integer*4 GLUT_WINDOW_WIDTH integer*4 GLUT_WINDOW_WIDTH
parameter ( GLUT_WINDOW_WIDTH = 102 ) parameter ( GLUT_WINDOW_WIDTH = 102 )
integer*4 GLUT_WINDOW_HEIGHT integer*4 GLUT_WINDOW_HEIGHT
parameter ( GLUT_WINDOW_HEIGHT = 103 ) parameter ( GLUT_WINDOW_HEIGHT = 103 )
integer*4 GLUT_WINDOW_BUFFER_SIZE integer*4 GLUT_WINDOW_BUFFER_SIZE
parameter ( GLUT_WINDOW_BUFFER_SIZE = 104 ) parameter ( GLUT_WINDOW_BUFFER_SIZE = 104 )
integer*4 GLUT_WINDOW_STENCIL_SIZE integer*4 GLUT_WINDOW_STENCIL_SIZE
parameter ( GLUT_WINDOW_STENCIL_SIZE = 105 ) parameter ( GLUT_WINDOW_STENCIL_SIZE = 105 )
integer*4 GLUT_WINDOW_DEPTH_SIZE integer*4 GLUT_WINDOW_DEPTH_SIZE
parameter ( GLUT_WINDOW_DEPTH_SIZE = 106 ) parameter ( GLUT_WINDOW_DEPTH_SIZE = 106 )
integer*4 GLUT_WINDOW_RED_SIZE integer*4 GLUT_WINDOW_RED_SIZE
parameter ( GLUT_WINDOW_RED_SIZE = 107 ) parameter ( GLUT_WINDOW_RED_SIZE = 107 )
integer*4 GLUT_WINDOW_GREEN_SIZE integer*4 GLUT_WINDOW_GREEN_SIZE
parameter ( GLUT_WINDOW_GREEN_SIZE = 108 ) parameter ( GLUT_WINDOW_GREEN_SIZE = 108 )
integer*4 GLUT_WINDOW_BLUE_SIZE integer*4 GLUT_WINDOW_BLUE_SIZE
parameter ( GLUT_WINDOW_BLUE_SIZE = 109 ) parameter ( GLUT_WINDOW_BLUE_SIZE = 109 )
integer*4 GLUT_WINDOW_ALPHA_SIZE integer*4 GLUT_WINDOW_ALPHA_SIZE
parameter ( GLUT_WINDOW_ALPHA_SIZE = 110 ) parameter ( GLUT_WINDOW_ALPHA_SIZE = 110 )
integer*4 GLUT_WINDOW_ACCUM_RED_SIZE integer*4 GLUT_WINDOW_ACCUM_RED_SIZE
parameter ( GLUT_WINDOW_ACCUM_RED_SIZE = 111 ) parameter ( GLUT_WINDOW_ACCUM_RED_SIZE = 111 )
integer*4 GLUT_WINDOW_ACCUM_GREEN_SIZE integer*4 GLUT_WINDOW_ACCUM_GREEN_SIZE
parameter ( GLUT_WINDOW_ACCUM_GREEN_SIZE = 112 ) parameter ( GLUT_WINDOW_ACCUM_GREEN_SIZE = 112 )
integer*4 GLUT_WINDOW_ACCUM_BLUE_SIZE integer*4 GLUT_WINDOW_ACCUM_BLUE_SIZE
parameter ( GLUT_WINDOW_ACCUM_BLUE_SIZE = 113 ) parameter ( GLUT_WINDOW_ACCUM_BLUE_SIZE = 113 )
integer*4 GLUT_WINDOW_ACCUM_ALPHA_SIZE integer*4 GLUT_WINDOW_ACCUM_ALPHA_SIZE
parameter ( GLUT_WINDOW_ACCUM_ALPHA_SIZE = 114 ) parameter ( GLUT_WINDOW_ACCUM_ALPHA_SIZE = 114 )
integer*4 GLUT_WINDOW_DOUBLEBUFFER integer*4 GLUT_WINDOW_DOUBLEBUFFER
parameter ( GLUT_WINDOW_DOUBLEBUFFER = 115 ) parameter ( GLUT_WINDOW_DOUBLEBUFFER = 115 )
integer*4 GLUT_WINDOW_RGBA integer*4 GLUT_WINDOW_RGBA
parameter ( GLUT_WINDOW_RGBA = 116 ) parameter ( GLUT_WINDOW_RGBA = 116 )
integer*4 GLUT_WINDOW_PARENT integer*4 GLUT_WINDOW_PARENT
parameter ( GLUT_WINDOW_PARENT = 117 ) parameter ( GLUT_WINDOW_PARENT = 117 )
integer*4 GLUT_WINDOW_NUM_CHILDREN integer*4 GLUT_WINDOW_NUM_CHILDREN
parameter ( GLUT_WINDOW_NUM_CHILDREN = 118 ) parameter ( GLUT_WINDOW_NUM_CHILDREN = 118 )
integer*4 GLUT_WINDOW_COLORMAP_SIZE integer*4 GLUT_WINDOW_COLORMAP_SIZE
parameter ( GLUT_WINDOW_COLORMAP_SIZE = 119 ) parameter ( GLUT_WINDOW_COLORMAP_SIZE = 119 )
integer*4 GLUT_WINDOW_NUM_SAMPLES integer*4 GLUT_WINDOW_NUM_SAMPLES
parameter ( GLUT_WINDOW_NUM_SAMPLES = 120 ) parameter ( GLUT_WINDOW_NUM_SAMPLES = 120 )
integer*4 GLUT_WINDOW_STEREO integer*4 GLUT_WINDOW_STEREO
parameter ( GLUT_WINDOW_STEREO = 121 ) parameter ( GLUT_WINDOW_STEREO = 121 )
integer*4 GLUT_WINDOW_CURSOR integer*4 GLUT_WINDOW_CURSOR
parameter ( GLUT_WINDOW_CURSOR = 122 ) parameter ( GLUT_WINDOW_CURSOR = 122 )
integer*4 GLUT_SCREEN_WIDTH integer*4 GLUT_SCREEN_WIDTH
parameter ( GLUT_SCREEN_WIDTH = 200 ) parameter ( GLUT_SCREEN_WIDTH = 200 )
integer*4 GLUT_SCREEN_HEIGHT integer*4 GLUT_SCREEN_HEIGHT
parameter ( GLUT_SCREEN_HEIGHT = 201 ) parameter ( GLUT_SCREEN_HEIGHT = 201 )
integer*4 GLUT_SCREEN_WIDTH_MM integer*4 GLUT_SCREEN_WIDTH_MM
parameter ( GLUT_SCREEN_WIDTH_MM = 202 ) parameter ( GLUT_SCREEN_WIDTH_MM = 202 )
integer*4 GLUT_SCREEN_HEIGHT_MM integer*4 GLUT_SCREEN_HEIGHT_MM
parameter ( GLUT_SCREEN_HEIGHT_MM = 203 ) parameter ( GLUT_SCREEN_HEIGHT_MM = 203 )
integer*4 GLUT_MENU_NUM_ITEMS integer*4 GLUT_MENU_NUM_ITEMS
parameter ( GLUT_MENU_NUM_ITEMS = 300 ) parameter ( GLUT_MENU_NUM_ITEMS = 300 )
integer*4 GLUT_DISPLAY_MODE_POSSIBLE integer*4 GLUT_DISPLAY_MODE_POSSIBLE
parameter ( GLUT_DISPLAY_MODE_POSSIBLE = 400 ) parameter ( GLUT_DISPLAY_MODE_POSSIBLE = 400 )
integer*4 GLUT_INIT_WINDOW_X integer*4 GLUT_INIT_WINDOW_X
parameter ( GLUT_INIT_WINDOW_X = 500 ) parameter ( GLUT_INIT_WINDOW_X = 500 )
integer*4 GLUT_INIT_WINDOW_Y integer*4 GLUT_INIT_WINDOW_Y
parameter ( GLUT_INIT_WINDOW_Y = 501 ) parameter ( GLUT_INIT_WINDOW_Y = 501 )
integer*4 GLUT_INIT_WINDOW_WIDTH integer*4 GLUT_INIT_WINDOW_WIDTH
parameter ( GLUT_INIT_WINDOW_WIDTH = 502 ) parameter ( GLUT_INIT_WINDOW_WIDTH = 502 )
integer*4 GLUT_INIT_WINDOW_HEIGHT integer*4 GLUT_INIT_WINDOW_HEIGHT
parameter ( GLUT_INIT_WINDOW_HEIGHT = 503 ) parameter ( GLUT_INIT_WINDOW_HEIGHT = 503 )
integer*4 GLUT_INIT_DISPLAY_MODE integer*4 GLUT_INIT_DISPLAY_MODE
parameter ( GLUT_INIT_DISPLAY_MODE = 504 ) parameter ( GLUT_INIT_DISPLAY_MODE = 504 )
integer*4 GLUT_ELAPSED_TIME integer*4 GLUT_ELAPSED_TIME
parameter ( GLUT_ELAPSED_TIME = 700 ) parameter ( GLUT_ELAPSED_TIME = 700 )
C glutDeviceGet parameters C glutDeviceGet parameters
integer*4 GLUT_HAS_KEYBOARD integer*4 GLUT_HAS_KEYBOARD
parameter ( GLUT_HAS_KEYBOARD = 600 ) parameter ( GLUT_HAS_KEYBOARD = 600 )
integer*4 GLUT_HAS_MOUSE integer*4 GLUT_HAS_MOUSE
parameter ( GLUT_HAS_MOUSE = 601 ) parameter ( GLUT_HAS_MOUSE = 601 )
integer*4 GLUT_HAS_SPACEBALL integer*4 GLUT_HAS_SPACEBALL
parameter ( GLUT_HAS_SPACEBALL = 602 ) parameter ( GLUT_HAS_SPACEBALL = 602 )
integer*4 GLUT_HAS_DIAL_AND_BUTTON_BOX integer*4 GLUT_HAS_DIAL_AND_BUTTON_BOX
parameter ( GLUT_HAS_DIAL_AND_BUTTON_BOX = 603 ) parameter ( GLUT_HAS_DIAL_AND_BUTTON_BOX = 603 )
integer*4 GLUT_HAS_TABLET integer*4 GLUT_HAS_TABLET
parameter ( GLUT_HAS_TABLET = 604 ) parameter ( GLUT_HAS_TABLET = 604 )
integer*4 GLUT_NUM_MOUSE_BUTTONS integer*4 GLUT_NUM_MOUSE_BUTTONS
parameter ( GLUT_NUM_MOUSE_BUTTONS = 605 ) parameter ( GLUT_NUM_MOUSE_BUTTONS = 605 )
integer*4 GLUT_NUM_SPACEBALL_BUTTONS integer*4 GLUT_NUM_SPACEBALL_BUTTONS
parameter ( GLUT_NUM_SPACEBALL_BUTTONS = 606 ) parameter ( GLUT_NUM_SPACEBALL_BUTTONS = 606 )
integer*4 GLUT_NUM_BUTTON_BOX_BUTTONS integer*4 GLUT_NUM_BUTTON_BOX_BUTTONS
parameter ( GLUT_NUM_BUTTON_BOX_BUTTONS = 607 ) parameter ( GLUT_NUM_BUTTON_BOX_BUTTONS = 607 )
integer*4 GLUT_NUM_DIALS integer*4 GLUT_NUM_DIALS
parameter ( GLUT_NUM_DIALS = 608 ) parameter ( GLUT_NUM_DIALS = 608 )
integer*4 GLUT_NUM_TABLET_BUTTONS integer*4 GLUT_NUM_TABLET_BUTTONS
parameter ( GLUT_NUM_TABLET_BUTTONS = 609 ) parameter ( GLUT_NUM_TABLET_BUTTONS = 609 )
C glutLayerGet parameters C glutLayerGet parameters
integer*4 GLUT_OVERLAY_POSSIBLE integer*4 GLUT_OVERLAY_POSSIBLE
parameter ( GLUT_OVERLAY_POSSIBLE = 800 ) parameter ( GLUT_OVERLAY_POSSIBLE = 800 )
integer*4 GLUT_LAYER_IN_USE integer*4 GLUT_LAYER_IN_USE
parameter ( GLUT_LAYER_IN_USE = 801 ) parameter ( GLUT_LAYER_IN_USE = 801 )
integer*4 GLUT_HAS_OVERLAY integer*4 GLUT_HAS_OVERLAY
parameter ( GLUT_HAS_OVERLAY = 802 ) parameter ( GLUT_HAS_OVERLAY = 802 )
integer*4 GLUT_TRANSPARENT_INDEX integer*4 GLUT_TRANSPARENT_INDEX
parameter ( GLUT_TRANSPARENT_INDEX = 803 ) parameter ( GLUT_TRANSPARENT_INDEX = 803 )
integer*4 GLUT_NORMAL_DAMAGED integer*4 GLUT_NORMAL_DAMAGED
parameter ( GLUT_NORMAL_DAMAGED = 804 ) parameter ( GLUT_NORMAL_DAMAGED = 804 )
integer*4 GLUT_OVERLAY_DAMAGED integer*4 GLUT_OVERLAY_DAMAGED
parameter ( GLUT_OVERLAY_DAMAGED = 805 ) parameter ( GLUT_OVERLAY_DAMAGED = 805 )
C glutUseLayer parameters C glutUseLayer parameters
integer*4 GLUT_NORMAL integer*4 GLUT_NORMAL
parameter ( GLUT_NORMAL = 0 ) parameter ( GLUT_NORMAL = 0 )
integer*4 GLUT_OVERLAY integer*4 GLUT_OVERLAY
parameter ( GLUT_OVERLAY = 1 ) parameter ( GLUT_OVERLAY = 1 )
C glutGetModifiers return mask C glutGetModifiers return mask
integer*4 GLUT_ACTIVE_SHIFT integer*4 GLUT_ACTIVE_SHIFT
parameter ( GLUT_ACTIVE_SHIFT = 1 ) parameter ( GLUT_ACTIVE_SHIFT = 1 )
integer*4 GLUT_ACTIVE_CTRL integer*4 GLUT_ACTIVE_CTRL
parameter ( GLUT_ACTIVE_CTRL = 2 ) parameter ( GLUT_ACTIVE_CTRL = 2 )
integer*4 GLUT_ACTIVE_ALT integer*4 GLUT_ACTIVE_ALT
parameter ( GLUT_ACTIVE_ALT = 4 ) parameter ( GLUT_ACTIVE_ALT = 4 )
C glutSetCursor parameters C glutSetCursor parameters
integer*4 GLUT_CURSOR_RIGHT_ARROW integer*4 GLUT_CURSOR_RIGHT_ARROW
parameter ( GLUT_CURSOR_RIGHT_ARROW = 0 ) parameter ( GLUT_CURSOR_RIGHT_ARROW = 0 )
integer*4 GLUT_CURSOR_LEFT_ARROW integer*4 GLUT_CURSOR_LEFT_ARROW
parameter ( GLUT_CURSOR_LEFT_ARROW = 1 ) parameter ( GLUT_CURSOR_LEFT_ARROW = 1 )
integer*4 GLUT_CURSOR_INFO integer*4 GLUT_CURSOR_INFO
parameter ( GLUT_CURSOR_INFO = 2 ) parameter ( GLUT_CURSOR_INFO = 2 )
integer*4 GLUT_CURSOR_DESTROY integer*4 GLUT_CURSOR_DESTROY
parameter ( GLUT_CURSOR_DESTROY = 3 ) parameter ( GLUT_CURSOR_DESTROY = 3 )
integer*4 GLUT_CURSOR_HELP integer*4 GLUT_CURSOR_HELP
parameter ( GLUT_CURSOR_HELP = 4 ) parameter ( GLUT_CURSOR_HELP = 4 )
integer*4 GLUT_CURSOR_CYCLE integer*4 GLUT_CURSOR_CYCLE
parameter ( GLUT_CURSOR_CYCLE = 5 ) parameter ( GLUT_CURSOR_CYCLE = 5 )
integer*4 GLUT_CURSOR_SPRAY integer*4 GLUT_CURSOR_SPRAY
parameter ( GLUT_CURSOR_SPRAY = 6 ) parameter ( GLUT_CURSOR_SPRAY = 6 )
integer*4 GLUT_CURSOR_WAIT integer*4 GLUT_CURSOR_WAIT
parameter ( GLUT_CURSOR_WAIT = 7 ) parameter ( GLUT_CURSOR_WAIT = 7 )
integer*4 GLUT_CURSOR_TEXT integer*4 GLUT_CURSOR_TEXT
parameter ( GLUT_CURSOR_TEXT = 8 ) parameter ( GLUT_CURSOR_TEXT = 8 )
integer*4 GLUT_CURSOR_CROSSHAIR integer*4 GLUT_CURSOR_CROSSHAIR
parameter ( GLUT_CURSOR_CROSSHAIR = 9 ) parameter ( GLUT_CURSOR_CROSSHAIR = 9 )
integer*4 GLUT_CURSOR_UP_DOWN integer*4 GLUT_CURSOR_UP_DOWN
parameter ( GLUT_CURSOR_UP_DOWN = 10 ) parameter ( GLUT_CURSOR_UP_DOWN = 10 )
integer*4 GLUT_CURSOR_LEFT_RIGHT integer*4 GLUT_CURSOR_LEFT_RIGHT
parameter ( GLUT_CURSOR_LEFT_RIGHT = 11 ) parameter ( GLUT_CURSOR_LEFT_RIGHT = 11 )
integer*4 GLUT_CURSOR_TOP_SIDE integer*4 GLUT_CURSOR_TOP_SIDE
parameter ( GLUT_CURSOR_TOP_SIDE = 12 ) parameter ( GLUT_CURSOR_TOP_SIDE = 12 )
integer*4 GLUT_CURSOR_BOTTOM_SIDE integer*4 GLUT_CURSOR_BOTTOM_SIDE
parameter ( GLUT_CURSOR_BOTTOM_SIDE = 13 ) parameter ( GLUT_CURSOR_BOTTOM_SIDE = 13 )
integer*4 GLUT_CURSOR_LEFT_SIDE integer*4 GLUT_CURSOR_LEFT_SIDE
parameter ( GLUT_CURSOR_LEFT_SIDE = 14 ) parameter ( GLUT_CURSOR_LEFT_SIDE = 14 )
integer*4 GLUT_CURSOR_RIGHT_SIDE integer*4 GLUT_CURSOR_RIGHT_SIDE
parameter ( GLUT_CURSOR_RIGHT_SIDE = 15 ) parameter ( GLUT_CURSOR_RIGHT_SIDE = 15 )
integer*4 GLUT_CURSOR_TOP_LEFT_CORNER integer*4 GLUT_CURSOR_TOP_LEFT_CORNER
parameter ( GLUT_CURSOR_TOP_LEFT_CORNER = 16 ) parameter ( GLUT_CURSOR_TOP_LEFT_CORNER = 16 )
integer*4 GLUT_CURSOR_TOP_RIGHT_CORNER integer*4 GLUT_CURSOR_TOP_RIGHT_CORNER
parameter ( GLUT_CURSOR_TOP_RIGHT_CORNER = 17 ) parameter ( GLUT_CURSOR_TOP_RIGHT_CORNER = 17 )
integer*4 GLUT_CURSOR_BOTTOM_RIGHT_CORNER integer*4 GLUT_CURSOR_BOTTOM_RIGHT_CORNER
parameter ( GLUT_CURSOR_BOTTOM_RIGHT_CORNER = 18 ) parameter ( GLUT_CURSOR_BOTTOM_RIGHT_CORNER = 18 )
integer*4 GLUT_CURSOR_BOTTOM_LEFT_CORNER integer*4 GLUT_CURSOR_BOTTOM_LEFT_CORNER
parameter ( GLUT_CURSOR_BOTTOM_LEFT_CORNER = 19 ) parameter ( GLUT_CURSOR_BOTTOM_LEFT_CORNER = 19 )
integer*4 GLUT_CURSOR_INHERIT integer*4 GLUT_CURSOR_INHERIT
parameter ( GLUT_CURSOR_INHERIT = 100 ) parameter ( GLUT_CURSOR_INHERIT = 100 )
integer*4 GLUT_CURSOR_NONE integer*4 GLUT_CURSOR_NONE
parameter ( GLUT_CURSOR_NONE = 101 ) parameter ( GLUT_CURSOR_NONE = 101 )
integer*4 GLUT_CURSOR_FULL_CROSSHAIR integer*4 GLUT_CURSOR_FULL_CROSSHAIR
parameter ( GLUT_CURSOR_FULL_CROSSHAIR = 102 ) parameter ( GLUT_CURSOR_FULL_CROSSHAIR = 102 )
C GLUT functions C GLUT functions
integer*4 glutcreatewindow integer*4 glutcreatewindow
integer*4 glutcreatesubwindow integer*4 glutcreatesubwindow
integer*4 glutgetwindow integer*4 glutgetwindow
integer*4 glutcreatemenu integer*4 glutcreatemenu
integer*4 glutgetmenu integer*4 glutgetmenu
real glutgetcolor real glutgetcolor
integer*4 glutget integer*4 glutget
integer*4 glutdeviceget integer*4 glutdeviceget
integer*4 glutextensionsupported integer*4 glutextensionsupported
C GLUT NULL name C GLUT NULL name
external glutnull external glutnull

3828
Externals/GLew/gl.h vendored

File diff suppressed because it is too large Load Diff

12990
Externals/GLew/glext.h vendored

File diff suppressed because it is too large Load Diff

4426
Externals/GLew/glprocs.h vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,137 +1,137 @@
#ifndef __glsmap_h__ #ifndef __glsmap_h__
#define __glsmap_h__ #define __glsmap_h__
/* Copyright (c) Mark J. Kilgard, 1998. */ /* Copyright (c) Mark J. Kilgard, 1998. */
/* This program is freely distributable without licensing fees /* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */ implied. This program is -not- in the public domain. */
#if defined(_WIN32) #if defined(_WIN32)
/* Try hard to avoid including <windows.h> to avoid name space pollution, /* Try hard to avoid including <windows.h> to avoid name space pollution,
but Win32's <GL/gl.h> needs APIENTRY and WINGDIAPI defined properly. */ but Win32's <GL/gl.h> needs APIENTRY and WINGDIAPI defined properly. */
# if 0 # if 0
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# include <windows.h> # include <windows.h>
# else # else
/* XXX This is from Win32's <windef.h> */ /* XXX This is from Win32's <windef.h> */
# ifndef APIENTRY # ifndef APIENTRY
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
# define APIENTRY __stdcall # define APIENTRY __stdcall
# else # else
# define APIENTRY # define APIENTRY
# endif # endif
# endif # endif
# ifndef CALLBACK # ifndef CALLBACK
/* XXX This is from Win32's <winnt.h> */ /* XXX This is from Win32's <winnt.h> */
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) # if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
# define CALLBACK __stdcall # define CALLBACK __stdcall
# else # else
# define CALLBACK # define CALLBACK
# endif # endif
# endif # endif
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */ /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
# ifndef WINGDIAPI # ifndef WINGDIAPI
# define WINGDIAPI __declspec(dllimport) # define WINGDIAPI __declspec(dllimport)
# endif # endif
/* XXX This is from Win32's <ctype.h> */ /* XXX This is from Win32's <ctype.h> */
# ifndef _WCHAR_T_DEFINED # ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t; typedef unsigned short wchar_t;
# define _WCHAR_T_DEFINED # define _WCHAR_T_DEFINED
# endif # endif
# endif # endif
#pragma warning (disable:4244) /* Disable bogus conversion warnings. */ #pragma warning (disable:4244) /* Disable bogus conversion warnings. */
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ #pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
#endif /* _WIN32 */ #endif /* _WIN32 */
#include <GL/gl.h> #include <GL/gl.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef enum { typedef enum {
SMAP_CLEAR_SMAP_TEXTURE = 0x1, SMAP_CLEAR_SMAP_TEXTURE = 0x1,
SMAP_GENERATE_VIEW_MIPMAPS = 0x2, SMAP_GENERATE_VIEW_MIPMAPS = 0x2,
SMAP_GENERATE_SMAP_MIPMAPS = 0x4, SMAP_GENERATE_SMAP_MIPMAPS = 0x4,
SMAP_GENERATE_MIPMAPS = 0x6 /* both of above */ SMAP_GENERATE_MIPMAPS = 0x6 /* both of above */
} SphereMapFlags; } SphereMapFlags;
/* Cube view enumerants. */ /* Cube view enumerants. */
enum { enum {
SMAP_FRONT = 0, SMAP_FRONT = 0,
SMAP_TOP = 1, SMAP_TOP = 1,
SMAP_BOTTOM = 2, SMAP_BOTTOM = 2,
SMAP_LEFT = 3, SMAP_LEFT = 3,
SMAP_RIGHT = 4, SMAP_RIGHT = 4,
SMAP_BACK = 5 SMAP_BACK = 5
}; };
typedef struct _SphereMap SphereMap; typedef struct _SphereMap SphereMap;
extern SphereMap *smapCreateSphereMap(SphereMap *shareSmap); extern SphereMap *smapCreateSphereMap(SphereMap *shareSmap);
extern void smapDestroySphereMap(SphereMap *smap); extern void smapDestroySphereMap(SphereMap *smap);
extern void smapConfigureSphereMapMesh(SphereMap *smap, int steps, int rings, int edgeExtend); extern void smapConfigureSphereMapMesh(SphereMap *smap, int steps, int rings, int edgeExtend);
extern void smapSetSphereMapTexObj(SphereMap *smap, GLuint texobj); extern void smapSetSphereMapTexObj(SphereMap *smap, GLuint texobj);
extern void smapSetViewTexObj(SphereMap *smap, GLuint texobj); extern void smapSetViewTexObj(SphereMap *smap, GLuint texobj);
extern void smapSetViewTexObjs(SphereMap *smap, GLuint texobjs[6]); extern void smapSetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
extern void smapGetSphereMapTexObj(SphereMap *smap, GLuint *texobj); extern void smapGetSphereMapTexObj(SphereMap *smap, GLuint *texobj);
extern void smapGetViewTexObj(SphereMap *smap, GLuint *texobj); extern void smapGetViewTexObj(SphereMap *smap, GLuint *texobj);
extern void smapGetViewTexObjs(SphereMap *smap, GLuint texobjs[6]); extern void smapGetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
extern void smapSetFlags(SphereMap *smap, SphereMapFlags flags); extern void smapSetFlags(SphereMap *smap, SphereMapFlags flags);
extern void smapGetFlags(SphereMap *smap, SphereMapFlags *flags); extern void smapGetFlags(SphereMap *smap, SphereMapFlags *flags);
extern void smapSetViewOrigin(SphereMap *smap, GLint x, GLint y); extern void smapSetViewOrigin(SphereMap *smap, GLint x, GLint y);
extern void smapSetSphereMapOrigin(SphereMap *smap, GLint x, GLint y); extern void smapSetSphereMapOrigin(SphereMap *smap, GLint x, GLint y);
extern void smapGetViewOrigin(SphereMap *smap, GLint *x, GLint *y); extern void smapGetViewOrigin(SphereMap *smap, GLint *x, GLint *y);
extern void smapGetSphereMapOrigin(SphereMap *smap, GLint *x, GLint *y); extern void smapGetSphereMapOrigin(SphereMap *smap, GLint *x, GLint *y);
extern void smapSetEye(SphereMap *smap, GLfloat eyex, GLfloat eyey, GLfloat eyez); extern void smapSetEye(SphereMap *smap, GLfloat eyex, GLfloat eyey, GLfloat eyez);
extern void smapSetEyeVector(SphereMap *smap, GLfloat *eye); extern void smapSetEyeVector(SphereMap *smap, GLfloat *eye);
extern void smapSetUp(SphereMap *smap, GLfloat upx, GLfloat upy, GLfloat upz); extern void smapSetUp(SphereMap *smap, GLfloat upx, GLfloat upy, GLfloat upz);
extern void smapSetUpVector(SphereMap *smap, GLfloat *up); extern void smapSetUpVector(SphereMap *smap, GLfloat *up);
extern void smapSetObject(SphereMap *smap, GLfloat objx, GLfloat objy, GLfloat objz); extern void smapSetObject(SphereMap *smap, GLfloat objx, GLfloat objy, GLfloat objz);
extern void smapSetObjectVector(SphereMap *smap, GLfloat *obj); extern void smapSetObjectVector(SphereMap *smap, GLfloat *obj);
extern void smapGetEye(SphereMap *smap, GLfloat *eyex, GLfloat *eyey, GLfloat *eyez); extern void smapGetEye(SphereMap *smap, GLfloat *eyex, GLfloat *eyey, GLfloat *eyez);
extern void smapGetEyeVector(SphereMap *smap, GLfloat *eye); extern void smapGetEyeVector(SphereMap *smap, GLfloat *eye);
extern void smapGetUp(SphereMap *smap, GLfloat *upx, GLfloat *upy, GLfloat *upz); extern void smapGetUp(SphereMap *smap, GLfloat *upx, GLfloat *upy, GLfloat *upz);
extern void smapGetUpVector(SphereMap *smap, GLfloat *up); extern void smapGetUpVector(SphereMap *smap, GLfloat *up);
extern void smapGetObject(SphereMap *smap, GLfloat *objx, GLfloat *objy, GLfloat *objz); extern void smapGetObject(SphereMap *smap, GLfloat *objx, GLfloat *objy, GLfloat *objz);
extern void smapGetObjectVector(SphereMap *smap, GLfloat *obj); extern void smapGetObjectVector(SphereMap *smap, GLfloat *obj);
extern void smapSetNearFar(SphereMap *smap, GLfloat viewNear, GLfloat viewFar); extern void smapSetNearFar(SphereMap *smap, GLfloat viewNear, GLfloat viewFar);
extern void smapGetNearFar(SphereMap *smap, GLfloat *viewNear, GLfloat *viewFar); extern void smapGetNearFar(SphereMap *smap, GLfloat *viewNear, GLfloat *viewFar);
extern void smapSetSphereMapTexDim(SphereMap *smap, GLsizei texdim); extern void smapSetSphereMapTexDim(SphereMap *smap, GLsizei texdim);
extern void smapSetViewTexDim(SphereMap *smap, GLsizei texdim); extern void smapSetViewTexDim(SphereMap *smap, GLsizei texdim);
extern void smapGetSphereMapTexDim(SphereMap *smap, GLsizei *texdim); extern void smapGetSphereMapTexDim(SphereMap *smap, GLsizei *texdim);
extern void smapGetViewTexDim(SphereMap *smap, GLsizei *texdim); extern void smapGetViewTexDim(SphereMap *smap, GLsizei *texdim);
extern void smapSetContextData(SphereMap *smap, void *context); extern void smapSetContextData(SphereMap *smap, void *context);
extern void smapGetContextData(SphereMap *smap, void **context); extern void smapGetContextData(SphereMap *smap, void **context);
extern void smapSetPositionLightsFunc(SphereMap *smap, void (*positionLights)(int view, void *context)); extern void smapSetPositionLightsFunc(SphereMap *smap, void (*positionLights)(int view, void *context));
extern void smapSetDrawViewFunc(SphereMap *smap, void (*drawView)(int view, void *context)); extern void smapSetDrawViewFunc(SphereMap *smap, void (*drawView)(int view, void *context));
extern void smapGetPositionLightsFunc(SphereMap *smap, void (**positionLights)(int view, void *context)); extern void smapGetPositionLightsFunc(SphereMap *smap, void (**positionLights)(int view, void *context));
extern void smapGetDrawViewFunc(SphereMap *smap, void (**drawView)(int view, void *context)); extern void smapGetDrawViewFunc(SphereMap *smap, void (**drawView)(int view, void *context));
extern void smapGenViewTex(SphereMap *smap, int view); extern void smapGenViewTex(SphereMap *smap, int view);
extern void smapGenViewTexs(SphereMap *smap); extern void smapGenViewTexs(SphereMap *smap);
extern void smapGenSphereMapFromViewTexs(SphereMap *smap); extern void smapGenSphereMapFromViewTexs(SphereMap *smap);
extern void smapGenSphereMap(SphereMap *smap); extern void smapGenSphereMap(SphereMap *smap);
extern void smapGenSphereMapWithOneViewTex(SphereMap *smap); extern void smapGenSphereMapWithOneViewTex(SphereMap *smap);
extern int smapRvecToSt(float rvec[3], float st[2]); extern int smapRvecToSt(float rvec[3], float st[2]);
extern void smapStToRvec(float *st, float *rvec); extern void smapStToRvec(float *st, float *rvec);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __glsmap_h__ */ #endif /* __glsmap_h__ */

486
Externals/GLew/glx.h vendored
View File

@@ -1,243 +1,243 @@
#ifndef __glx_h__ #ifndef __glx_h__
#define __glx_h__ #define __glx_h__
/* /*
** The contents of this file are subject to the GLX Public License Version 1.0 ** The contents of this file are subject to the GLX Public License Version 1.0
** (the "License"). You may not use this file except in compliance with the ** (the "License"). You may not use this file except in compliance with the
** License. You may obtain a copy of the License at Silicon Graphics, Inc., ** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 ** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
** or at http://www.sgi.com/software/opensource/glx/license.html. ** or at http://www.sgi.com/software/opensource/glx/license.html.
** **
** Software distributed under the License is distributed on an "AS IS" ** Software distributed under the License is distributed on an "AS IS"
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY ** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR ** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific ** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
** language governing rights and limitations under the License. ** language governing rights and limitations under the License.
** **
** The Original Software is GLX version 1.2 source code, released February, ** The Original Software is GLX version 1.2 source code, released February,
** 1999. The developer of the Original Software is Silicon Graphics, Inc. ** 1999. The developer of the Original Software is Silicon Graphics, Inc.
** Those portions of the Subject Software created by Silicon Graphics, Inc. ** Those portions of the Subject Software created by Silicon Graphics, Inc.
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. ** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
** **
** $Header: /teleimm/telev/inc/GL/glx.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $ ** $Header: /teleimm/telev/inc/GL/glx.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $
*/ */
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glxtokens.h> #include <GL/glxtokens.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* GLX resources. * GLX resources.
*/ */
typedef XID GLXContextID; typedef XID GLXContextID;
typedef XID GLXPixmap; typedef XID GLXPixmap;
typedef XID GLXDrawable; typedef XID GLXDrawable;
typedef XID GLXPbuffer; typedef XID GLXPbuffer;
typedef XID GLXWindow; typedef XID GLXWindow;
typedef XID GLXFBConfigID; typedef XID GLXFBConfigID;
/* /*
* GLXContext is a pointer to opaque data. * GLXContext is a pointer to opaque data.
*/ */
typedef struct __GLXcontextRec *GLXContext; typedef struct __GLXcontextRec *GLXContext;
/* /*
* GLXFBConfig is a pointer to opaque data. * GLXFBConfig is a pointer to opaque data.
*/ */
typedef struct __GLXFBConfigRec *GLXFBConfig; typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
/**********************************************************************/ /**********************************************************************/
/* /*
* GLX 1.0 functions. * GLX 1.0 functions.
*/ */
extern XVisualInfo* glXChooseVisual(Display *dpy, int screen, extern XVisualInfo* glXChooseVisual(Display *dpy, int screen,
int *attrib_list); int *attrib_list);
extern void glXCopyContext(Display *dpy, GLXContext src, extern void glXCopyContext(Display *dpy, GLXContext src,
GLXContext dst, unsigned int mask); GLXContext dst, unsigned int mask);
extern GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis, extern GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis,
GLXContext share_list, Bool direct); GLXContext share_list, Bool direct);
extern GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis, extern GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis,
Pixmap pixmap); Pixmap pixmap);
extern void glXDestroyContext(Display *dpy, GLXContext ctx); extern void glXDestroyContext(Display *dpy, GLXContext ctx);
extern void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pix); extern void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pix);
extern int glXGetConfig(Display *dpy, XVisualInfo *vis, extern int glXGetConfig(Display *dpy, XVisualInfo *vis,
int attrib, int *value); int attrib, int *value);
extern GLXContext glXGetCurrentContext(void); extern GLXContext glXGetCurrentContext(void);
extern GLXDrawable glXGetCurrentDrawable(void); extern GLXDrawable glXGetCurrentDrawable(void);
extern Bool glXIsDirect(Display *dpy, GLXContext ctx); extern Bool glXIsDirect(Display *dpy, GLXContext ctx);
extern Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, extern Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable,
GLXContext ctx); GLXContext ctx);
extern Bool glXQueryExtension(Display *dpy, int *error_base, int *event_base); extern Bool glXQueryExtension(Display *dpy, int *error_base, int *event_base);
extern Bool glXQueryVersion(Display *dpy, int *major, int *minor); extern Bool glXQueryVersion(Display *dpy, int *major, int *minor);
extern void glXSwapBuffers(Display *dpy, GLXDrawable drawable); extern void glXSwapBuffers(Display *dpy, GLXDrawable drawable);
extern void glXUseXFont(Font font, int first, int count, int list_base); extern void glXUseXFont(Font font, int first, int count, int list_base);
extern void glXWaitGL(void); extern void glXWaitGL(void);
extern void glXWaitX(void); extern void glXWaitX(void);
/* /*
* GLX 1.1 functions. * GLX 1.1 functions.
*/ */
extern const char *glXGetClientString(Display *dpy, int name); extern const char *glXGetClientString(Display *dpy, int name);
extern const char *glXQueryServerString(Display *dpy, int screen, int name); extern const char *glXQueryServerString(Display *dpy, int screen, int name);
extern const char *glXQueryExtensionsString(Display *dpy, int screen); extern const char *glXQueryExtensionsString(Display *dpy, int screen);
/* /*
* GLX 1.2 functions. * GLX 1.2 functions.
*/ */
extern Display *glXGetCurrentDisplay(void); extern Display *glXGetCurrentDisplay(void);
/* /*
* GLX 1.3 functions. * GLX 1.3 functions.
*/ */
extern GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen, extern GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen,
const int *attrib_list, int *nelements); const int *attrib_list, int *nelements);
extern GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, extern GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config,
int render_type, GLXContext share_list, int render_type, GLXContext share_list,
Bool direct); Bool direct);
extern GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, extern GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config,
const int *attrib_list); const int *attrib_list);
extern GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config, extern GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config,
Pixmap pixmap, const int *attrib_list); Pixmap pixmap, const int *attrib_list);
extern GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config, extern GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config,
Window win, const int *attrib_list); Window win, const int *attrib_list);
extern void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf); extern void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf);
extern void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap); extern void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap);
extern void glXDestroyWindow(Display *dpy, GLXWindow win); extern void glXDestroyWindow(Display *dpy, GLXWindow win);
extern GLXDrawable glXGetCurrentReadDrawable(void); extern GLXDrawable glXGetCurrentReadDrawable(void);
extern int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, extern int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config,
int attribute, int *value); int attribute, int *value);
extern GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements); extern GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements);
extern void glXGetSelectedEvent(Display *dpy, GLXDrawable draw, extern void glXGetSelectedEvent(Display *dpy, GLXDrawable draw,
unsigned long *event_mask); unsigned long *event_mask);
extern XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config); extern XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config);
extern Bool glXMakeContextCurrent(Display *display, GLXDrawable draw, extern Bool glXMakeContextCurrent(Display *display, GLXDrawable draw,
GLXDrawable read, GLXContext ctx); GLXDrawable read, GLXContext ctx);
extern int glXQueryContext(Display *dpy, GLXContext ctx, extern int glXQueryContext(Display *dpy, GLXContext ctx,
int attribute, int *value); int attribute, int *value);
extern void glXQueryDrawable(Display *dpy, GLXDrawable draw, extern void glXQueryDrawable(Display *dpy, GLXDrawable draw,
int attribute, unsigned int *value); int attribute, unsigned int *value);
extern void glXSelectEvent(Display *dpy, GLXDrawable draw, extern void glXSelectEvent(Display *dpy, GLXDrawable draw,
unsigned long event_mask); unsigned long event_mask);
/**********************************************************************/ /**********************************************************************/
/* /*
* ARB_get_proc_address * ARB_get_proc_address
*/ */
extern void (*glXGetProcAddressARB(const GLubyte *procName))(void); extern void (*glXGetProcAddressARB(const GLubyte *procName))(void);
/* /*
* EXT_import_context * EXT_import_context
*/ */
extern void glXFreeContextEXT(Display *dpy, GLXContext ctx); extern void glXFreeContextEXT(Display *dpy, GLXContext ctx);
extern GLXContextID glXGetContextIDEXT(const GLXContext ctx); extern GLXContextID glXGetContextIDEXT(const GLXContext ctx);
extern GLXDrawable glXGetCurrentDrawableEXT(void); extern GLXDrawable glXGetCurrentDrawableEXT(void);
extern GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID); extern GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID);
extern int glXQueryContextInfoEXT(Display *dpy, GLXContext ctx, extern int glXQueryContextInfoEXT(Display *dpy, GLXContext ctx,
int attribute, int *value); int attribute, int *value);
/* /*
* SGI_video_sync * SGI_video_sync
*/ */
extern int glXGetVideoSyncSGI(unsigned int *count); extern int glXGetVideoSyncSGI(unsigned int *count);
extern int glXWaitVideoSyncSGI(int divisor, int remainder, extern int glXWaitVideoSyncSGI(int divisor, int remainder,
unsigned int *count); unsigned int *count);
extern int glXGetRefreshRateSGI(unsigned int *rate); extern int glXGetRefreshRateSGI(unsigned int *rate);
/* /*
* SGIX_swap_group * SGIX_swap_group
*/ */
extern void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, extern void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
GLXDrawable member); GLXDrawable member);
/* /*
* SGIX_swap_barrier * SGIX_swap_barrier
*/ */
extern void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, extern void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable,
int barrier); int barrier);
extern Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max); extern Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max);
/**********************************************************************/ /**********************************************************************/
/*** Should these go here, or in another header? */ /*** Should these go here, or in another header? */
/* /*
* GLX Events * GLX Events
*/ */
typedef struct { typedef struct {
int event_type; /* GLX_DAMAGED or GLX_SAVED */ int event_type; /* GLX_DAMAGED or GLX_SAVED */
int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
unsigned long serial; /* # of last request processed by server */ unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came for SendEvent request */ Bool send_event; /* true if this came for SendEvent request */
Display *display; /* display the event was read from */ Display *display; /* display the event was read from */
GLXDrawable drawable; /* XID of Drawable */ GLXDrawable drawable; /* XID of Drawable */
unsigned int buffer_mask; /* mask indicating which buffers are affected */ unsigned int buffer_mask; /* mask indicating which buffers are affected */
unsigned int aux_buffer; /* which aux buffer was affected */ unsigned int aux_buffer; /* which aux buffer was affected */
int x, y; int x, y;
int width, height; int width, height;
int count; /* if nonzero, at least this many more */ int count; /* if nonzero, at least this many more */
} GLXPbufferClobberEvent; } GLXPbufferClobberEvent;
typedef union __GLXEvent { typedef union __GLXEvent {
GLXPbufferClobberEvent glxpbufferclobber; GLXPbufferClobberEvent glxpbufferclobber;
long pad[24]; long pad[24];
} GLXEvent; } GLXEvent;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* !__glx_h__ */ #endif /* !__glx_h__ */

1230
Externals/GLew/glxext.h vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,252 +1,252 @@
#ifndef __glxtokens_h__ #ifndef __glxtokens_h__
#define __glxtokens_h__ #define __glxtokens_h__
/* /*
** The contents of this file are subject to the GLX Public License Version 1.0 ** The contents of this file are subject to the GLX Public License Version 1.0
** (the "License"). You may not use this file except in compliance with the ** (the "License"). You may not use this file except in compliance with the
** License. You may obtain a copy of the License at Silicon Graphics, Inc., ** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 ** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
** or at http://www.sgi.com/software/opensource/glx/license.html. ** or at http://www.sgi.com/software/opensource/glx/license.html.
** **
** Software distributed under the License is distributed on an "AS IS" ** Software distributed under the License is distributed on an "AS IS"
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY ** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR ** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific ** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
** language governing rights and limitations under the License. ** language governing rights and limitations under the License.
** **
** The Original Software is GLX version 1.2 source code, released February, ** The Original Software is GLX version 1.2 source code, released February,
** 1999. The developer of the Original Software is Silicon Graphics, Inc. ** 1999. The developer of the Original Software is Silicon Graphics, Inc.
** Those portions of the Subject Software created by Silicon Graphics, Inc. ** Those portions of the Subject Software created by Silicon Graphics, Inc.
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. ** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
** **
** $Header: /teleimm/telev/inc/GL/glxtokens.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $ ** $Header: /teleimm/telev/inc/GL/glxtokens.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define GLX_VERSION_1_1 1 #define GLX_VERSION_1_1 1
#define GLX_VERSION_1_2 1 #define GLX_VERSION_1_2 1
/* /*
* Names for attributes to glXGetConfig. * Names for attributes to glXGetConfig.
*/ */
#define GLX_USE_GL 1 /* support GLX rendering */ #define GLX_USE_GL 1 /* support GLX rendering */
#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */ #define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
#define GLX_LEVEL 3 /* level in plane stacking */ #define GLX_LEVEL 3 /* level in plane stacking */
#define GLX_RGBA 4 /* true if RGBA mode */ #define GLX_RGBA 4 /* true if RGBA mode */
#define GLX_DOUBLEBUFFER 5 /* double buffering supported */ #define GLX_DOUBLEBUFFER 5 /* double buffering supported */
#define GLX_STEREO 6 /* stereo buffering supported */ #define GLX_STEREO 6 /* stereo buffering supported */
#define GLX_AUX_BUFFERS 7 /* number of aux buffers */ #define GLX_AUX_BUFFERS 7 /* number of aux buffers */
#define GLX_RED_SIZE 8 /* number of red component bits */ #define GLX_RED_SIZE 8 /* number of red component bits */
#define GLX_GREEN_SIZE 9 /* number of green component bits */ #define GLX_GREEN_SIZE 9 /* number of green component bits */
#define GLX_BLUE_SIZE 10 /* number of blue component bits */ #define GLX_BLUE_SIZE 10 /* number of blue component bits */
#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */ #define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
#define GLX_DEPTH_SIZE 12 /* number of depth bits */ #define GLX_DEPTH_SIZE 12 /* number of depth bits */
#define GLX_STENCIL_SIZE 13 /* number of stencil bits */ #define GLX_STENCIL_SIZE 13 /* number of stencil bits */
#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */ #define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */
#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */ #define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */
#define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */ #define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */
#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */ #define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */
#define GLX_SAMPLE_BUFFERS_ARB 100000 /* number of multisample buffers */ #define GLX_SAMPLE_BUFFERS_ARB 100000 /* number of multisample buffers */
#define GLX_SAMPLES_ARB 100001 /* number of multisample samples */ #define GLX_SAMPLES_ARB 100001 /* number of multisample samples */
/* /*
* FBConfig-specific attributes * FBConfig-specific attributes
*/ */
#define GLX_X_VISUAL_TYPE 0x22 #define GLX_X_VISUAL_TYPE 0x22
#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT */ #define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT */
#define GLX_TRANSPARENT_TYPE 0x23 #define GLX_TRANSPARENT_TYPE 0x23
#define GLX_TRANSPARENT_INDEX_VALUE 0x24 #define GLX_TRANSPARENT_INDEX_VALUE 0x24
#define GLX_TRANSPARENT_RED_VALUE 0x25 #define GLX_TRANSPARENT_RED_VALUE 0x25
#define GLX_TRANSPARENT_GREEN_VALUE 0x26 #define GLX_TRANSPARENT_GREEN_VALUE 0x26
#define GLX_TRANSPARENT_BLUE_VALUE 0x27 #define GLX_TRANSPARENT_BLUE_VALUE 0x27
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28
#define GLX_DRAWABLE_TYPE 0x8010 #define GLX_DRAWABLE_TYPE 0x8010
#define GLX_RENDER_TYPE 0x8011 #define GLX_RENDER_TYPE 0x8011
#define GLX_X_RENDERABLE 0x8012 #define GLX_X_RENDERABLE 0x8012
#define GLX_FBCONFIG_ID 0x8013 #define GLX_FBCONFIG_ID 0x8013
#define GLX_MAX_PBUFFER_WIDTH 0x8016 #define GLX_MAX_PBUFFER_WIDTH 0x8016
#define GLX_MAX_PBUFFER_HEIGHT 0x8017 #define GLX_MAX_PBUFFER_HEIGHT 0x8017
#define GLX_MAX_PBUFFER_PIXELS 0x8018 #define GLX_MAX_PBUFFER_PIXELS 0x8018
#define GLX_VISUAL_ID 0x800B #define GLX_VISUAL_ID 0x800B
#define GLX_DRAWABLE_TYPE_SGIX GLX_DRAWABLE_TYPE #define GLX_DRAWABLE_TYPE_SGIX GLX_DRAWABLE_TYPE
#define GLX_RENDER_TYPE_SGIX GLX_RENDER_TYPE #define GLX_RENDER_TYPE_SGIX GLX_RENDER_TYPE
#define GLX_X_RENDERABLE_SGIX GLX_X_RENDERABLE #define GLX_X_RENDERABLE_SGIX GLX_X_RENDERABLE
#define GLX_FBCONFIG_ID_SGIX GLX_FBCONFIG_ID #define GLX_FBCONFIG_ID_SGIX GLX_FBCONFIG_ID
#define GLX_MAX_PBUFFER_WIDTH_SGIX GLX_MAX_PBUFFER_WIDTH #define GLX_MAX_PBUFFER_WIDTH_SGIX GLX_MAX_PBUFFER_WIDTH
#define GLX_MAX_PBUFFER_HEIGHT_SGIX GLX_MAX_PBUFFER_HEIGHT #define GLX_MAX_PBUFFER_HEIGHT_SGIX GLX_MAX_PBUFFER_HEIGHT
#define GLX_MAX_PBUFFER_PIXELS_SGIX GLX_MAX_PBUFFER_PIXELS #define GLX_MAX_PBUFFER_PIXELS_SGIX GLX_MAX_PBUFFER_PIXELS
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
/* /*
* Error return values from glXGetConfig. Success is indicated by * Error return values from glXGetConfig. Success is indicated by
* a value of 0. * a value of 0.
*/ */
#define GLX_BAD_SCREEN 1 /* screen # is bad */ #define GLX_BAD_SCREEN 1 /* screen # is bad */
#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */ #define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */
#define GLX_NO_EXTENSION 3 /* no glx extension on server */ #define GLX_NO_EXTENSION 3 /* no glx extension on server */
#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */ #define GLX_BAD_VISUAL 4 /* visual # not known by GLX */
#define GLX_BAD_CONTEXT 5 #define GLX_BAD_CONTEXT 5
#define GLX_BAD_VALUE 6 #define GLX_BAD_VALUE 6
#define GLX_BAD_ENUM 7 #define GLX_BAD_ENUM 7
/* FBConfig attribute values */ /* FBConfig attribute values */
/* /*
* Generic "don't care" value for glX ChooseFBConfig attributes (except * Generic "don't care" value for glX ChooseFBConfig attributes (except
* GLX_LEVEL). * GLX_LEVEL).
*/ */
#define GLX_DONT_CARE 0xFFFFFFFF #define GLX_DONT_CARE 0xFFFFFFFF
/* GLX_RENDER_TYPE bits */ /* GLX_RENDER_TYPE bits */
#define GLX_RGBA_BIT 0x00000001 #define GLX_RGBA_BIT 0x00000001
#define GLX_COLOR_INDEX_BIT 0x00000002 #define GLX_COLOR_INDEX_BIT 0x00000002
#define GLX_RGBA_BIT_SGIX GLX_RGBA_BIT #define GLX_RGBA_BIT_SGIX GLX_RGBA_BIT
#define GLX_COLOR_INDEX_BIT_SGIX GLX_COLOR_INDEX_BIT #define GLX_COLOR_INDEX_BIT_SGIX GLX_COLOR_INDEX_BIT
/* GLX_DRAWABLE_TYPE bits */ /* GLX_DRAWABLE_TYPE bits */
#define GLX_WINDOW_BIT 0x00000001 #define GLX_WINDOW_BIT 0x00000001
#define GLX_PIXMAP_BIT 0x00000002 #define GLX_PIXMAP_BIT 0x00000002
#define GLX_PBUFFER_BIT 0x00000004 #define GLX_PBUFFER_BIT 0x00000004
#define GLX_WINDOW_BIT_SGIX GLX_WINDOW_BIT #define GLX_WINDOW_BIT_SGIX GLX_WINDOW_BIT
#define GLX_PIXMAP_BIT_SGIX GLX_PIXMAP_BIT #define GLX_PIXMAP_BIT_SGIX GLX_PIXMAP_BIT
#define GLX_PBUFFER_BIT_SGIX GLX_PBUFFER_BIT #define GLX_PBUFFER_BIT_SGIX GLX_PBUFFER_BIT
/* GLX_CONFIG_CAVEAT attribute values */ /* GLX_CONFIG_CAVEAT attribute values */
#define GLX_NONE 0x8000 #define GLX_NONE 0x8000
#define GLX_SLOW_CONFIG 0x8001 #define GLX_SLOW_CONFIG 0x8001
#define GLX_NON_CONFORMANT_CONFIG 0x800D #define GLX_NON_CONFORMANT_CONFIG 0x800D
/* GLX_X_VISUAL_TYPE attribute values */ /* GLX_X_VISUAL_TYPE attribute values */
#define GLX_TRUE_COLOR 0x8002 #define GLX_TRUE_COLOR 0x8002
#define GLX_DIRECT_COLOR 0x8003 #define GLX_DIRECT_COLOR 0x8003
#define GLX_PSEUDO_COLOR 0x8004 #define GLX_PSEUDO_COLOR 0x8004
#define GLX_STATIC_COLOR 0x8005 #define GLX_STATIC_COLOR 0x8005
#define GLX_GRAY_SCALE 0x8006 #define GLX_GRAY_SCALE 0x8006
#define GLX_STATIC_GRAY 0x8007 #define GLX_STATIC_GRAY 0x8007
/* GLX_TRANSPARENT_TYPE attribute values */ /* GLX_TRANSPARENT_TYPE attribute values */
/* #define GLX_NONE 0x8000 */ /* #define GLX_NONE 0x8000 */
#define GLX_TRANSPARENT_RGB 0x8008 #define GLX_TRANSPARENT_RGB 0x8008
#define GLX_TRANSPARENT_INDEX 0x8009 #define GLX_TRANSPARENT_INDEX 0x8009
/* glXCreateGLXPbuffer attributes */ /* glXCreateGLXPbuffer attributes */
#define GLX_PRESERVED_CONTENTS 0x801B #define GLX_PRESERVED_CONTENTS 0x801B
#define GLX_LARGEST_PBUFFER 0x801C #define GLX_LARGEST_PBUFFER 0x801C
#define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */ #define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */
#define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */ #define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */
#define GLX_PRESERVED_CONTENTS_SGIX GLX_PRESERVED_CONTENTS #define GLX_PRESERVED_CONTENTS_SGIX GLX_PRESERVED_CONTENTS
#define GLX_LARGEST_PBUFFER_SGIX GLX_LARGEST_PBUFFER #define GLX_LARGEST_PBUFFER_SGIX GLX_LARGEST_PBUFFER
/* glXQueryGLXPBuffer attributes */ /* glXQueryGLXPBuffer attributes */
#define GLX_WIDTH 0x801D #define GLX_WIDTH 0x801D
#define GLX_HEIGHT 0x801E #define GLX_HEIGHT 0x801E
#define GLX_EVENT_MASK 0x801F #define GLX_EVENT_MASK 0x801F
#define GLX_WIDTH_SGIX GLX_WIDTH #define GLX_WIDTH_SGIX GLX_WIDTH
#define GLX_HEIGHT_SGIX GLX_HEIGHT #define GLX_HEIGHT_SGIX GLX_HEIGHT
#define GLX_EVENT_MASK_SGIX GLX_EVENT_MASK #define GLX_EVENT_MASK_SGIX GLX_EVENT_MASK
/* glXCreateNewContext render_type attribute values */ /* glXCreateNewContext render_type attribute values */
#define GLX_RGBA_TYPE 0x8014 #define GLX_RGBA_TYPE 0x8014
#define GLX_COLOR_INDEX_TYPE 0x8015 #define GLX_COLOR_INDEX_TYPE 0x8015
#define GLX_RGBA_TYPE_SGIX GLX_RGBA_TYPE #define GLX_RGBA_TYPE_SGIX GLX_RGBA_TYPE
#define GLX_COLOR_INDEX_TYPE_SGIX GLX_COLOR_INDEX_TYPE #define GLX_COLOR_INDEX_TYPE_SGIX GLX_COLOR_INDEX_TYPE
/* glXQueryContext attributes */ /* glXQueryContext attributes */
/* #define GLX_FBCONFIG_ID 0x8013 */ /* #define GLX_FBCONFIG_ID 0x8013 */
/* #define GLX_RENDER_TYPE 0x8011 */ /* #define GLX_RENDER_TYPE 0x8011 */
#define GLX_SCREEN 0x800C #define GLX_SCREEN 0x800C
/* glXSelectEvent event mask bits */ /* glXSelectEvent event mask bits */
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 #define GLX_PBUFFER_CLOBBER_MASK 0x08000000
#define GLX_PBUFFER_CLOBBER_MASK_SGIX GLX_PBUFFER_CLOBBER_MASK #define GLX_PBUFFER_CLOBBER_MASK_SGIX GLX_PBUFFER_CLOBBER_MASK
/* GLXPbufferClobberEvent event_type values */ /* GLXPbufferClobberEvent event_type values */
#define GLX_DAMAGED 0x8020 #define GLX_DAMAGED 0x8020
#define GLX_SAVED 0x8021 #define GLX_SAVED 0x8021
#define GLX_DAMAGED_SGIX GLX_DAMAGED #define GLX_DAMAGED_SGIX GLX_DAMAGED
#define GLX_SAVED_SGIX GLX_SAVED #define GLX_SAVED_SGIX GLX_SAVED
/* GLXPbufferClobberEvent draw_type values */ /* GLXPbufferClobberEvent draw_type values */
#define GLX_WINDOW 0x8022 #define GLX_WINDOW 0x8022
#define GLX_PBUFFER 0x8023 #define GLX_PBUFFER 0x8023
#define GLX_WINDOW_SGIX GLX_WINDOW #define GLX_WINDOW_SGIX GLX_WINDOW
#define GLX_PBUFFER_SGIX GLX_PBUFFER #define GLX_PBUFFER_SGIX GLX_PBUFFER
/* GLXPbufferClobberEvent buffer_mask bits */ /* GLXPbufferClobberEvent buffer_mask bits */
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
#define GLX_AUX_BUFFERS_BIT 0x00000010 #define GLX_AUX_BUFFERS_BIT 0x00000010
#define GLX_DEPTH_BUFFER_BIT 0x00000020 #define GLX_DEPTH_BUFFER_BIT 0x00000020
#define GLX_STENCIL_BUFFER_BIT 0x00000040 #define GLX_STENCIL_BUFFER_BIT 0x00000040
#define GLX_ACCUM_BUFFER_BIT 0x00000080 #define GLX_ACCUM_BUFFER_BIT 0x00000080
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX GLX_FRONT_LEFT_BUFFER_BIT #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX GLX_FRONT_LEFT_BUFFER_BIT
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX GLX_FRONT_RIGHT_BUFFER_BIT #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX GLX_FRONT_RIGHT_BUFFER_BIT
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX GLX_BACK_LEFT_BUFFER_BIT #define GLX_BACK_LEFT_BUFFER_BIT_SGIX GLX_BACK_LEFT_BUFFER_BIT
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX GLX_BACK_RIGHT_BUFFER_BIT #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX GLX_BACK_RIGHT_BUFFER_BIT
#define GLX_AUX_BUFFERS_BIT_SGIX GLX_AUX_BUFFERS_BIT #define GLX_AUX_BUFFERS_BIT_SGIX GLX_AUX_BUFFERS_BIT
#define GLX_DEPTH_BUFFER_BIT_SGIX GLX_DEPTH_BUFFER_BIT #define GLX_DEPTH_BUFFER_BIT_SGIX GLX_DEPTH_BUFFER_BIT
#define GLX_STENCIL_BUFFER_BIT_SGIX GLX_STENCIL_BUFFER_BIT #define GLX_STENCIL_BUFFER_BIT_SGIX GLX_STENCIL_BUFFER_BIT
#define GLX_ACCUM_BUFFER_BIT_SGIX GLX_ACCUM_BUFFER_BIT #define GLX_ACCUM_BUFFER_BIT_SGIX GLX_ACCUM_BUFFER_BIT
/* /*
* Extension return values from glXGetConfig. These are also * Extension return values from glXGetConfig. These are also
* accepted as parameter values for glXChooseVisual. * accepted as parameter values for glXChooseVisual.
*/ */
#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */ #define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */
#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */ #define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */ #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */ #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */ #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */ #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */ #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */
/* Property values for visual_type */ /* Property values for visual_type */
#define GLX_TRUE_COLOR_EXT 0x8002 #define GLX_TRUE_COLOR_EXT 0x8002
#define GLX_DIRECT_COLOR_EXT 0x8003 #define GLX_DIRECT_COLOR_EXT 0x8003
#define GLX_PSEUDO_COLOR_EXT 0x8004 #define GLX_PSEUDO_COLOR_EXT 0x8004
#define GLX_STATIC_COLOR_EXT 0x8005 #define GLX_STATIC_COLOR_EXT 0x8005
#define GLX_GRAY_SCALE_EXT 0x8006 #define GLX_GRAY_SCALE_EXT 0x8006
#define GLX_STATIC_GRAY_EXT 0x8007 #define GLX_STATIC_GRAY_EXT 0x8007
/* Property values for transparent pixel */ /* Property values for transparent pixel */
#define GLX_NONE_EXT 0x8000 #define GLX_NONE_EXT 0x8000
#define GLX_TRANSPARENT_RGB_EXT 0x8008 #define GLX_TRANSPARENT_RGB_EXT 0x8008
#define GLX_TRANSPARENT_INDEX_EXT 0x8009 #define GLX_TRANSPARENT_INDEX_EXT 0x8009
/* Property values for visual_rating */ /* Property values for visual_rating */
#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */ #define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */
#define GLX_SLOW_VISUAL_EXT 0x8001 #define GLX_SLOW_VISUAL_EXT 0x8001
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
/* /*
* Names for attributes to glXGetClientString. * Names for attributes to glXGetClientString.
*/ */
#define GLX_VENDOR 0x1 #define GLX_VENDOR 0x1
#define GLX_VERSION 0x2 #define GLX_VERSION 0x2
#define GLX_EXTENSIONS 0x3 #define GLX_EXTENSIONS 0x3
/* /*
* Names for attributes to glXQueryContextInfoEXT. * Names for attributes to glXQueryContextInfoEXT.
*/ */
#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */ #define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */
#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */ #define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */
#define GLX_SCREEN_EXT 0x800C /* screen number */ #define GLX_SCREEN_EXT 0x800C /* screen number */
/* NV_float_buffer */ /* NV_float_buffer */
#define GLX_FLOAT_COMPONENTS_NV 0x20B0 #define GLX_FLOAT_COMPONENTS_NV 0x20B0
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* !__glxtokens_h__ */ #endif /* !__glxtokens_h__ */

410
Externals/GLew/tube.h vendored
View File

@@ -1,205 +1,205 @@
/* /*
* tube.h * tube.h
* *
* FUNCTION: * FUNCTION:
* Tubing and Extrusion header file. * Tubing and Extrusion header file.
* This file provides protypes and defines for the extrusion * This file provides protypes and defines for the extrusion
* and tubing primitives. * and tubing primitives.
* *
* HISTORY: * HISTORY:
* Linas Vepstas 1990, 1991 * Linas Vepstas 1990, 1991
*/ */
#ifndef __TUBE_H__ #ifndef __TUBE_H__
#define __TUBE_H__ #define __TUBE_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
GLE API revision history: GLE API revision history:
GLE_API_VERSION is updated to reflect GLE API changes (interface GLE_API_VERSION is updated to reflect GLE API changes (interface
changes, semantic changes, deletions, or additions). changes, semantic changes, deletions, or additions).
GLE_API_VERSION=228 GLUT 3.7 release of GLE. GLE_API_VERSION=228 GLUT 3.7 release of GLE.
**/ **/
#ifndef GLE_API_VERSION /* allow this to be overriden */ #ifndef GLE_API_VERSION /* allow this to be overriden */
#define GLE_API_VERSION 228 #define GLE_API_VERSION 228
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#define OPENGL_10 #define OPENGL_10
#endif #endif
/* some types */ /* some types */
#define gleDouble double #define gleDouble double
typedef gleDouble gleAffine[2][3]; typedef gleDouble gleAffine[2][3];
/* ====================================================== */ /* ====================================================== */
/* defines for tubing join styles */ /* defines for tubing join styles */
#define TUBE_JN_RAW 0x1 #define TUBE_JN_RAW 0x1
#define TUBE_JN_ANGLE 0x2 #define TUBE_JN_ANGLE 0x2
#define TUBE_JN_CUT 0x3 #define TUBE_JN_CUT 0x3
#define TUBE_JN_ROUND 0x4 #define TUBE_JN_ROUND 0x4
#define TUBE_JN_MASK 0xf /* mask bits */ #define TUBE_JN_MASK 0xf /* mask bits */
#define TUBE_JN_CAP 0x10 #define TUBE_JN_CAP 0x10
/* determine how normal vectors are to be handled */ /* determine how normal vectors are to be handled */
#define TUBE_NORM_FACET 0x100 #define TUBE_NORM_FACET 0x100
#define TUBE_NORM_EDGE 0x200 #define TUBE_NORM_EDGE 0x200
#define TUBE_NORM_PATH_EDGE 0x400 /* for spiral, lathe, helix primitives */ #define TUBE_NORM_PATH_EDGE 0x400 /* for spiral, lathe, helix primitives */
#define TUBE_NORM_MASK 0xf00 /* mask bits */ #define TUBE_NORM_MASK 0xf00 /* mask bits */
/* closed or open countours */ /* closed or open countours */
#define TUBE_CONTOUR_CLOSED 0x1000 #define TUBE_CONTOUR_CLOSED 0x1000
#define GLE_TEXTURE_ENABLE 0x10000 #define GLE_TEXTURE_ENABLE 0x10000
#define GLE_TEXTURE_STYLE_MASK 0xff #define GLE_TEXTURE_STYLE_MASK 0xff
#define GLE_TEXTURE_VERTEX_FLAT 1 #define GLE_TEXTURE_VERTEX_FLAT 1
#define GLE_TEXTURE_NORMAL_FLAT 2 #define GLE_TEXTURE_NORMAL_FLAT 2
#define GLE_TEXTURE_VERTEX_CYL 3 #define GLE_TEXTURE_VERTEX_CYL 3
#define GLE_TEXTURE_NORMAL_CYL 4 #define GLE_TEXTURE_NORMAL_CYL 4
#define GLE_TEXTURE_VERTEX_SPH 5 #define GLE_TEXTURE_VERTEX_SPH 5
#define GLE_TEXTURE_NORMAL_SPH 6 #define GLE_TEXTURE_NORMAL_SPH 6
#define GLE_TEXTURE_VERTEX_MODEL_FLAT 7 #define GLE_TEXTURE_VERTEX_MODEL_FLAT 7
#define GLE_TEXTURE_NORMAL_MODEL_FLAT 8 #define GLE_TEXTURE_NORMAL_MODEL_FLAT 8
#define GLE_TEXTURE_VERTEX_MODEL_CYL 9 #define GLE_TEXTURE_VERTEX_MODEL_CYL 9
#define GLE_TEXTURE_NORMAL_MODEL_CYL 10 #define GLE_TEXTURE_NORMAL_MODEL_CYL 10
#define GLE_TEXTURE_VERTEX_MODEL_SPH 11 #define GLE_TEXTURE_VERTEX_MODEL_SPH 11
#define GLE_TEXTURE_NORMAL_MODEL_SPH 12 #define GLE_TEXTURE_NORMAL_MODEL_SPH 12
#ifdef GL_32 #ifdef GL_32
/* HACK for GL 3.2 -- needed because no way to tell if lighting is on. */ /* HACK for GL 3.2 -- needed because no way to tell if lighting is on. */
#define TUBE_LIGHTING_ON 0x80000000 #define TUBE_LIGHTING_ON 0x80000000
#define gleExtrusion extrusion #define gleExtrusion extrusion
#define gleSetJoinStyle setjoinstyle #define gleSetJoinStyle setjoinstyle
#define gleGetJoinStyle getjoinstyle #define gleGetJoinStyle getjoinstyle
#define glePolyCone polycone #define glePolyCone polycone
#define glePolyCylinder polycylinder #define glePolyCylinder polycylinder
#define gleSuperExtrusion super_extrusion #define gleSuperExtrusion super_extrusion
#define gleTwistExtrusion twist_extrusion #define gleTwistExtrusion twist_extrusion
#define gleSpiral spiral #define gleSpiral spiral
#define gleLathe lathe #define gleLathe lathe
#define gleHelicoid helicoid #define gleHelicoid helicoid
#define gleToroid toroid #define gleToroid toroid
#define gleScrew screw #define gleScrew screw
#endif /* GL_32 */ #endif /* GL_32 */
extern int gleGetJoinStyle (void); extern int gleGetJoinStyle (void);
extern void gleSetJoinStyle (int style); /* bitwise OR of flags */ extern void gleSetJoinStyle (int style); /* bitwise OR of flags */
extern int gleGetNumSlices(void); extern int gleGetNumSlices(void);
extern void gleSetNumSlices(int slices); extern void gleSetNumSlices(int slices);
/* draw polyclinder, specified as a polyline */ /* draw polyclinder, specified as a polyline */
extern void glePolyCylinder (int npoints, /* num points in polyline */ extern void glePolyCylinder (int npoints, /* num points in polyline */
gleDouble point_array[][3], /* polyline vertces */ gleDouble point_array[][3], /* polyline vertces */
float color_array[][3], /* colors at polyline verts */ float color_array[][3], /* colors at polyline verts */
gleDouble radius); /* radius of polycylinder */ gleDouble radius); /* radius of polycylinder */
/* draw polycone, specified as a polyline with radii */ /* draw polycone, specified as a polyline with radii */
extern void glePolyCone (int npoints, /* numpoints in poly-line */ extern void glePolyCone (int npoints, /* numpoints in poly-line */
gleDouble point_array[][3], /* polyline vertices */ gleDouble point_array[][3], /* polyline vertices */
float color_array[][3], /* colors at polyline verts */ float color_array[][3], /* colors at polyline verts */
gleDouble radius_array[]); /* cone radii at polyline verts */ gleDouble radius_array[]); /* cone radii at polyline verts */
/* extrude arbitrary 2D contour along arbitrary 3D path */ /* extrude arbitrary 2D contour along arbitrary 3D path */
extern void gleExtrusion (int ncp, /* number of contour points */ extern void gleExtrusion (int ncp, /* number of contour points */
gleDouble contour[][2], /* 2D contour */ gleDouble contour[][2], /* 2D contour */
gleDouble cont_normal[][2], /* 2D contour normals */ gleDouble cont_normal[][2], /* 2D contour normals */
gleDouble up[3], /* up vector for contour */ gleDouble up[3], /* up vector for contour */
int npoints, /* numpoints in poly-line */ int npoints, /* numpoints in poly-line */
gleDouble point_array[][3], /* polyline vertices */ gleDouble point_array[][3], /* polyline vertices */
float color_array[][3]); /* colors at polyline verts */ float color_array[][3]); /* colors at polyline verts */
/* extrude 2D contour, specifying local rotations (twists) */ /* extrude 2D contour, specifying local rotations (twists) */
extern void gleTwistExtrusion (int ncp, /* number of contour points */ extern void gleTwistExtrusion (int ncp, /* number of contour points */
gleDouble contour[][2], /* 2D contour */ gleDouble contour[][2], /* 2D contour */
gleDouble cont_normal[][2], /* 2D contour normals */ gleDouble cont_normal[][2], /* 2D contour normals */
gleDouble up[3], /* up vector for contour */ gleDouble up[3], /* up vector for contour */
int npoints, /* numpoints in poly-line */ int npoints, /* numpoints in poly-line */
gleDouble point_array[][3], /* polyline vertices */ gleDouble point_array[][3], /* polyline vertices */
float color_array[][3], /* color at polyline verts */ float color_array[][3], /* color at polyline verts */
gleDouble twist_array[]); /* countour twists (in degrees) */ gleDouble twist_array[]); /* countour twists (in degrees) */
/* extrude 2D contour, specifying local affine tranformations */ /* extrude 2D contour, specifying local affine tranformations */
extern void gleSuperExtrusion (int ncp, /* number of contour points */ extern void gleSuperExtrusion (int ncp, /* number of contour points */
gleDouble contour[][2], /* 2D contour */ gleDouble contour[][2], /* 2D contour */
gleDouble cont_normal[][2], /* 2D contour normals */ gleDouble cont_normal[][2], /* 2D contour normals */
gleDouble up[3], /* up vector for contour */ gleDouble up[3], /* up vector for contour */
int npoints, /* numpoints in poly-line */ int npoints, /* numpoints in poly-line */
gleDouble point_array[][3], /* polyline vertices */ gleDouble point_array[][3], /* polyline vertices */
float color_array[][3], /* color at polyline verts */ float color_array[][3], /* color at polyline verts */
gleDouble xform_array[][2][3]); /* 2D contour xforms */ gleDouble xform_array[][2][3]); /* 2D contour xforms */
/* spiral moves contour along helical path by parallel transport */ /* spiral moves contour along helical path by parallel transport */
extern void gleSpiral (int ncp, /* number of contour points */ extern void gleSpiral (int ncp, /* number of contour points */
gleDouble contour[][2], /* 2D contour */ gleDouble contour[][2], /* 2D contour */
gleDouble cont_normal[][2], /* 2D contour normals */ gleDouble cont_normal[][2], /* 2D contour normals */
gleDouble up[3], /* up vector for contour */ gleDouble up[3], /* up vector for contour */
gleDouble startRadius, /* spiral starts in x-y plane */ gleDouble startRadius, /* spiral starts in x-y plane */
gleDouble drdTheta, /* change in radius per revolution */ gleDouble drdTheta, /* change in radius per revolution */
gleDouble startZ, /* starting z value */ gleDouble startZ, /* starting z value */
gleDouble dzdTheta, /* change in Z per revolution */ gleDouble dzdTheta, /* change in Z per revolution */
gleDouble startXform[2][3], /* starting contour affine xform */ gleDouble startXform[2][3], /* starting contour affine xform */
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */ gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
gleDouble startTheta, /* start angle in x-y plane */ gleDouble startTheta, /* start angle in x-y plane */
gleDouble sweepTheta); /* degrees to spiral around */ gleDouble sweepTheta); /* degrees to spiral around */
/* lathe moves contour along helical path by helically shearing 3D space */ /* lathe moves contour along helical path by helically shearing 3D space */
extern void gleLathe (int ncp, /* number of contour points */ extern void gleLathe (int ncp, /* number of contour points */
gleDouble contour[][2], /* 2D contour */ gleDouble contour[][2], /* 2D contour */
gleDouble cont_normal[][2], /* 2D contour normals */ gleDouble cont_normal[][2], /* 2D contour normals */
gleDouble up[3], /* up vector for contour */ gleDouble up[3], /* up vector for contour */
gleDouble startRadius, /* spiral starts in x-y plane */ gleDouble startRadius, /* spiral starts in x-y plane */
gleDouble drdTheta, /* change in radius per revolution */ gleDouble drdTheta, /* change in radius per revolution */
gleDouble startZ, /* starting z value */ gleDouble startZ, /* starting z value */
gleDouble dzdTheta, /* change in Z per revolution */ gleDouble dzdTheta, /* change in Z per revolution */
gleDouble startXform[2][3], /* starting contour affine xform */ gleDouble startXform[2][3], /* starting contour affine xform */
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */ gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
gleDouble startTheta, /* start angle in x-y plane */ gleDouble startTheta, /* start angle in x-y plane */
gleDouble sweepTheta); /* degrees to spiral around */ gleDouble sweepTheta); /* degrees to spiral around */
/* similar to spiral, except contour is a circle */ /* similar to spiral, except contour is a circle */
extern void gleHelicoid (gleDouble rToroid, /* circle contour (torus) radius */ extern void gleHelicoid (gleDouble rToroid, /* circle contour (torus) radius */
gleDouble startRadius, /* spiral starts in x-y plane */ gleDouble startRadius, /* spiral starts in x-y plane */
gleDouble drdTheta, /* change in radius per revolution */ gleDouble drdTheta, /* change in radius per revolution */
gleDouble startZ, /* starting z value */ gleDouble startZ, /* starting z value */
gleDouble dzdTheta, /* change in Z per revolution */ gleDouble dzdTheta, /* change in Z per revolution */
gleDouble startXform[2][3], /* starting contour affine xform */ gleDouble startXform[2][3], /* starting contour affine xform */
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */ gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
gleDouble startTheta, /* start angle in x-y plane */ gleDouble startTheta, /* start angle in x-y plane */
gleDouble sweepTheta); /* degrees to spiral around */ gleDouble sweepTheta); /* degrees to spiral around */
/* similar to lathe, except contour is a circle */ /* similar to lathe, except contour is a circle */
extern void gleToroid (gleDouble rToroid, /* circle contour (torus) radius */ extern void gleToroid (gleDouble rToroid, /* circle contour (torus) radius */
gleDouble startRadius, /* spiral starts in x-y plane */ gleDouble startRadius, /* spiral starts in x-y plane */
gleDouble drdTheta, /* change in radius per revolution */ gleDouble drdTheta, /* change in radius per revolution */
gleDouble startZ, /* starting z value */ gleDouble startZ, /* starting z value */
gleDouble dzdTheta, /* change in Z per revolution */ gleDouble dzdTheta, /* change in Z per revolution */
gleDouble startXform[2][3], /* starting contour affine xform */ gleDouble startXform[2][3], /* starting contour affine xform */
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */ gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
gleDouble startTheta, /* start angle in x-y plane */ gleDouble startTheta, /* start angle in x-y plane */
gleDouble sweepTheta); /* degrees to spiral around */ gleDouble sweepTheta); /* degrees to spiral around */
/* draws a screw shape */ /* draws a screw shape */
extern void gleScrew (int ncp, /* number of contour points */ extern void gleScrew (int ncp, /* number of contour points */
gleDouble contour[][2], /* 2D contour */ gleDouble contour[][2], /* 2D contour */
gleDouble cont_normal[][2], /* 2D contour normals */ gleDouble cont_normal[][2], /* 2D contour normals */
gleDouble up[3], /* up vector for contour */ gleDouble up[3], /* up vector for contour */
gleDouble startz, /* start of segment */ gleDouble startz, /* start of segment */
gleDouble endz, /* end of segment */ gleDouble endz, /* end of segment */
gleDouble twist); /* number of rotations */ gleDouble twist); /* number of rotations */
extern void gleTextureMode (int mode); extern void gleTextureMode (int mode);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __TUBE_H__ */ #endif /* __TUBE_H__ */
/* ================== END OF FILE ======================= */ /* ================== END OF FILE ======================= */

1222
Externals/GLew/wglext.h vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,58 +1,58 @@
#ifndef __win32_glx_h__ #ifndef __win32_glx_h__
#define __win32_glx_h__ #define __win32_glx_h__
/* Copyright (c) Nate Robins, 1997. */ /* Copyright (c) Nate Robins, 1997. */
/* This program is freely distributable without licensing fees /* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */ implied. This program is -not- in the public domain. */
#include "win32_x11.h" #include "win32_x11.h"
/* Type definitions (conversions). */ /* Type definitions (conversions). */
typedef HGLRC GLXContext; typedef HGLRC GLXContext;
#define GLX_USE_GL 1 /* support GLX rendering */ #define GLX_USE_GL 1 /* support GLX rendering */
#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */ #define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
#define GLX_LEVEL 3 /* level in plane stacking */ #define GLX_LEVEL 3 /* level in plane stacking */
#define GLX_RGBA 4 /* true if RGBA mode */ #define GLX_RGBA 4 /* true if RGBA mode */
#define GLX_DOUBLEBUFFER 5 /* double buffering supported */ #define GLX_DOUBLEBUFFER 5 /* double buffering supported */
#define GLX_STEREO 6 /* stereo buffering supported */ #define GLX_STEREO 6 /* stereo buffering supported */
#define GLX_AUX_BUFFERS 7 /* number of aux buffers */ #define GLX_AUX_BUFFERS 7 /* number of aux buffers */
#define GLX_RED_SIZE 8 /* number of red component bits */ #define GLX_RED_SIZE 8 /* number of red component bits */
#define GLX_GREEN_SIZE 9 /* number of green component bits */ #define GLX_GREEN_SIZE 9 /* number of green component bits */
#define GLX_BLUE_SIZE 10 /* number of blue component bits */ #define GLX_BLUE_SIZE 10 /* number of blue component bits */
#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */ #define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
#define GLX_DEPTH_SIZE 12 /* number of depth bits */ #define GLX_DEPTH_SIZE 12 /* number of depth bits */
#define GLX_STENCIL_SIZE 13 /* number of stencil bits */ #define GLX_STENCIL_SIZE 13 /* number of stencil bits */
#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */ #define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */
#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */ #define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */
#define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */ #define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */
#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */ #define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */
#define GLX_BAD_ATTRIB 2 #define GLX_BAD_ATTRIB 2
#define GLX_BAD_VISUAL 4 #define GLX_BAD_VISUAL 4
/* Functions emulated by macros. */ /* Functions emulated by macros. */
#define glXDestroyContext(display, context) \ #define glXDestroyContext(display, context) \
wglDeleteContext(context) wglDeleteContext(context)
/* Function prototypes. */ /* Function prototypes. */
extern GLXContext glXCreateContext( extern GLXContext glXCreateContext(
Display* display, Display* display,
XVisualInfo* visinfo, XVisualInfo* visinfo,
GLXContext share, GLXContext share,
Bool direct); Bool direct);
extern int glXGetConfig( extern int glXGetConfig(
Display* display, Display* display,
XVisualInfo* visual, XVisualInfo* visual,
int attrib, int attrib,
int* value); int* value);
extern XVisualInfo* glXChooseVisual( extern XVisualInfo* glXChooseVisual(
Display* display, Display* display,
int screen, int screen,
int* attribList); int* attribList);
#endif /* __win32_glx_h__ */ #endif /* __win32_glx_h__ */

View File

@@ -1,319 +1,319 @@
#ifndef __win32_x11_h__ #ifndef __win32_x11_h__
#define __win32_x11_h__ #define __win32_x11_h__
/* Copyright (c) Nate Robins, 1997. */ /* Copyright (c) Nate Robins, 1997. */
/* This program is freely distributable without licensing fees /* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */ implied. This program is -not- in the public domain. */
#include <stdlib.h> #include <stdlib.h>
#include <windows.h> #include <windows.h>
/* Type definitions (conversions) */ /* Type definitions (conversions) */
typedef int Visual; /* Win32 equivalent of X11 type */ typedef int Visual; /* Win32 equivalent of X11 type */
typedef HWND Window; typedef HWND Window;
typedef HPALETTE Colormap; typedef HPALETTE Colormap;
typedef PIXELFORMATDESCRIPTOR XVisualInfo; typedef PIXELFORMATDESCRIPTOR XVisualInfo;
typedef BOOL Bool; typedef BOOL Bool;
typedef MSG XEvent; typedef MSG XEvent;
typedef HDC Display; typedef HDC Display;
typedef HCURSOR Cursor; typedef HCURSOR Cursor;
typedef int Atom; /* dummies */ typedef int Atom; /* dummies */
typedef int XDevice; typedef int XDevice;
typedef int Status; typedef int Status;
#define True TRUE /* Win32 equivalents of X11 booleans */ #define True TRUE /* Win32 equivalents of X11 booleans */
#define False FALSE #define False FALSE
#define None 0L /* universal null resource or null atom */ #define None 0L /* universal null resource or null atom */
/* Input Event Masks. Used as event-mask window attribute and as arguments /* Input Event Masks. Used as event-mask window attribute and as arguments
to Grab requests. Not to be confused with event names. */ to Grab requests. Not to be confused with event names. */
#define NoEventMask 0L #define NoEventMask 0L
#define KeyPressMask (1L<<0) #define KeyPressMask (1L<<0)
#define KeyReleaseMask (1L<<1) #define KeyReleaseMask (1L<<1)
#define ButtonPressMask (1L<<2) #define ButtonPressMask (1L<<2)
#define ButtonReleaseMask (1L<<3) #define ButtonReleaseMask (1L<<3)
#define EnterWindowMask (1L<<4) #define EnterWindowMask (1L<<4)
#define LeaveWindowMask (1L<<5) #define LeaveWindowMask (1L<<5)
#define PointerMotionMask (1L<<6) #define PointerMotionMask (1L<<6)
#define PointerMotionHintMask (1L<<7) #define PointerMotionHintMask (1L<<7)
#define Button1MotionMask (1L<<8) #define Button1MotionMask (1L<<8)
#define Button2MotionMask (1L<<9) #define Button2MotionMask (1L<<9)
#define Button3MotionMask (1L<<10) #define Button3MotionMask (1L<<10)
#define Button4MotionMask (1L<<11) #define Button4MotionMask (1L<<11)
#define Button5MotionMask (1L<<12) #define Button5MotionMask (1L<<12)
#define ButtonMotionMask (1L<<13) #define ButtonMotionMask (1L<<13)
#define KeymapStateMask (1L<<14) #define KeymapStateMask (1L<<14)
#define ExposureMask (1L<<15) #define ExposureMask (1L<<15)
#define VisibilityChangeMask (1L<<16) #define VisibilityChangeMask (1L<<16)
#define StructureNotifyMask (1L<<17) #define StructureNotifyMask (1L<<17)
#define ResizeRedirectMask (1L<<18) #define ResizeRedirectMask (1L<<18)
#define SubstructureNotifyMask (1L<<19) #define SubstructureNotifyMask (1L<<19)
#define SubstructureRedirectMask (1L<<20) #define SubstructureRedirectMask (1L<<20)
#define FocusChangeMask (1L<<21) #define FocusChangeMask (1L<<21)
#define PropertyChangeMask (1L<<22) #define PropertyChangeMask (1L<<22)
#define ColormapChangeMask (1L<<23) #define ColormapChangeMask (1L<<23)
#define OwnerGrabButtonMask (1L<<24) #define OwnerGrabButtonMask (1L<<24)
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of /* Key masks. Used as modifiers to GrabButton and GrabKey, results of
QueryPointer, state in various key-, mouse-, and button-related QueryPointer, state in various key-, mouse-, and button-related
events. */ events. */
#define ShiftMask (1<<0) #define ShiftMask (1<<0)
#define LockMask (1<<1) #define LockMask (1<<1)
#define ControlMask (1<<2) #define ControlMask (1<<2)
#define Mod1Mask (1<<3) #define Mod1Mask (1<<3)
#define Mod2Mask (1<<4) #define Mod2Mask (1<<4)
#define Mod3Mask (1<<5) #define Mod3Mask (1<<5)
#define Mod4Mask (1<<6) #define Mod4Mask (1<<6)
#define Mod5Mask (1<<7) #define Mod5Mask (1<<7)
/* Window classes used by CreateWindow */ /* Window classes used by CreateWindow */
/* Note that CopyFromParent is already defined as 0 above */ /* Note that CopyFromParent is already defined as 0 above */
#define InputOutput 1 #define InputOutput 1
#define InputOnly 2 #define InputOnly 2
/* Window attributes for CreateWindow and ChangeWindowAttributes */ /* Window attributes for CreateWindow and ChangeWindowAttributes */
#define CWBackPixmap (1L<<0) #define CWBackPixmap (1L<<0)
#define CWBackPixel (1L<<1) #define CWBackPixel (1L<<1)
#define CWBorderPixmap (1L<<2) #define CWBorderPixmap (1L<<2)
#define CWBorderPixel (1L<<3) #define CWBorderPixel (1L<<3)
#define CWBitGravity (1L<<4) #define CWBitGravity (1L<<4)
#define CWWinGravity (1L<<5) #define CWWinGravity (1L<<5)
#define CWBackingStore (1L<<6) #define CWBackingStore (1L<<6)
#define CWBackingPlanes (1L<<7) #define CWBackingPlanes (1L<<7)
#define CWBackingPixel (1L<<8) #define CWBackingPixel (1L<<8)
#define CWOverrideRedirect (1L<<9) #define CWOverrideRedirect (1L<<9)
#define CWSaveUnder (1L<<10) #define CWSaveUnder (1L<<10)
#define CWEventMask (1L<<11) #define CWEventMask (1L<<11)
#define CWDontPropagate (1L<<12) #define CWDontPropagate (1L<<12)
#define CWColormap (1L<<13) #define CWColormap (1L<<13)
#define CWCursor (1L<<14) #define CWCursor (1L<<14)
/* ConfigureWindow structure */ /* ConfigureWindow structure */
#define CWX (1<<0) #define CWX (1<<0)
#define CWY (1<<1) #define CWY (1<<1)
#define CWWidth (1<<2) #define CWWidth (1<<2)
#define CWHeight (1<<3) #define CWHeight (1<<3)
#define CWBorderWidth (1<<4) #define CWBorderWidth (1<<4)
#define CWSibling (1<<5) #define CWSibling (1<<5)
#define CWStackMode (1<<6) #define CWStackMode (1<<6)
/* Used in GetWindowAttributes reply */ /* Used in GetWindowAttributes reply */
#define IsUnmapped 0 #define IsUnmapped 0
#define IsUnviewable 1 #define IsUnviewable 1
#define IsViewable 2 #define IsViewable 2
/* Window stacking method (in configureWindow) */ /* Window stacking method (in configureWindow) */
#define Above 0 #define Above 0
#define Below 1 #define Below 1
#define TopIf 2 #define TopIf 2
#define BottomIf 3 #define BottomIf 3
#define Opposite 4 #define Opposite 4
/* For CreateColormap */ /* For CreateColormap */
#define AllocNone 0 /* create map with no entries */ #define AllocNone 0 /* create map with no entries */
#define AllocAll 1 /* allocate entire map writeable */ #define AllocAll 1 /* allocate entire map writeable */
/* Flags used in StoreNamedColor, StoreColors */ /* Flags used in StoreNamedColor, StoreColors */
#define DoRed (1<<0) #define DoRed (1<<0)
#define DoGreen (1<<1) #define DoGreen (1<<1)
#define DoBlue (1<<2) #define DoBlue (1<<2)
/* /*
* Bitmask returned by XParseGeometry(). Each bit tells if the corresponding * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
* value (x, y, width, height) was found in the parsed string. * value (x, y, width, height) was found in the parsed string.
*/ */
#define NoValue 0x0000 #define NoValue 0x0000
#define XValue 0x0001 #define XValue 0x0001
#define YValue 0x0002 #define YValue 0x0002
#define WidthValue 0x0004 #define WidthValue 0x0004
#define HeightValue 0x0008 #define HeightValue 0x0008
#define AllValues 0x000F #define AllValues 0x000F
#define XNegative 0x0010 #define XNegative 0x0010
#define YNegative 0x0020 #define YNegative 0x0020
/* flags argument in size hints */ /* flags argument in size hints */
#define USPosition (1L << 0) /* user specified x, y */ #define USPosition (1L << 0) /* user specified x, y */
#define USSize (1L << 1) /* user specified width, height */ #define USSize (1L << 1) /* user specified width, height */
/* definitions for initial window state */ /* definitions for initial window state */
#define WithdrawnState 0 /* for windows that are not mapped */ #define WithdrawnState 0 /* for windows that are not mapped */
#define NormalState 1 /* most applications want to start this way */ #define NormalState 1 /* most applications want to start this way */
#define IconicState 3 /* application wants to start as an icon */ #define IconicState 3 /* application wants to start as an icon */
#define GameModeState 4 /* Win32 GLUT only (not in Xlib!). */ #define GameModeState 4 /* Win32 GLUT only (not in Xlib!). */
/* Type definitions */ /* Type definitions */
typedef struct { typedef struct {
unsigned int background_pixmap; /* background pixmap */ unsigned int background_pixmap; /* background pixmap */
unsigned long background_pixel; /* background pixel */ unsigned long background_pixel; /* background pixel */
unsigned long border_pixel; /* border pixel value */ unsigned long border_pixel; /* border pixel value */
long event_mask; /* set of events that should be saved */ long event_mask; /* set of events that should be saved */
long do_not_propagate_mask; /* set of events that should not propagate */ long do_not_propagate_mask; /* set of events that should not propagate */
Bool override_redirect; /* boolean value for override-redirect */ Bool override_redirect; /* boolean value for override-redirect */
Colormap colormap; /* color map to be associated with window */ Colormap colormap; /* color map to be associated with window */
} XSetWindowAttributes; } XSetWindowAttributes;
typedef struct { typedef struct {
unsigned long pixel; unsigned long pixel;
unsigned short red, green, blue; unsigned short red, green, blue;
char flags; /* do_red, do_green, do_blue */ char flags; /* do_red, do_green, do_blue */
} XColor; } XColor;
typedef struct { typedef struct {
unsigned char *value; /* same as Property routines */ unsigned char *value; /* same as Property routines */
Atom encoding; /* prop type */ Atom encoding; /* prop type */
int format; /* prop data format: 8, 16, or 32 */ int format; /* prop data format: 8, 16, or 32 */
unsigned long nitems; /* number of data items in value */ unsigned long nitems; /* number of data items in value */
} XTextProperty; } XTextProperty;
typedef struct { typedef struct {
long flags; /* marks which fields in this structure are defined */ long flags; /* marks which fields in this structure are defined */
int x, y; /* obsolete for new window mgrs, but clients */ int x, y; /* obsolete for new window mgrs, but clients */
int width, height; /* should set so old wm's don't mess up */ int width, height; /* should set so old wm's don't mess up */
} XSizeHints; } XSizeHints;
/* Functions emulated by macros. */ /* Functions emulated by macros. */
#define XFreeColormap(display, colormap) \ #define XFreeColormap(display, colormap) \
DeleteObject(colormap) DeleteObject(colormap)
#define XCreateFontCursor(display, shape) \ #define XCreateFontCursor(display, shape) \
LoadCursor(NULL, shape) LoadCursor(NULL, shape)
#define XDefineCursor(display, window, cursor) \ #define XDefineCursor(display, window, cursor) \
SetCursor(cursor) SetCursor(cursor)
#define XFlush(display) \ #define XFlush(display) \
/* Nothing. */ /* Nothing. */
#define DisplayWidth(display, screen) \ #define DisplayWidth(display, screen) \
GetSystemMetrics(SM_CXSCREEN) GetSystemMetrics(SM_CXSCREEN)
#define DisplayHeight(display, screen) \ #define DisplayHeight(display, screen) \
GetSystemMetrics(SM_CYSCREEN) GetSystemMetrics(SM_CYSCREEN)
#define XMapWindow(display, window) \ #define XMapWindow(display, window) \
ShowWindow(window, SW_SHOWNORMAL) ShowWindow(window, SW_SHOWNORMAL)
#define XUnmapWindow(display, window) \ #define XUnmapWindow(display, window) \
ShowWindow(window, SW_HIDE) ShowWindow(window, SW_HIDE)
#define XIconifyWindow(display, window, screen) \ #define XIconifyWindow(display, window, screen) \
ShowWindow(window, SW_MINIMIZE) ShowWindow(window, SW_MINIMIZE)
#define XWithdrawWindow(display, window, screen) \ #define XWithdrawWindow(display, window, screen) \
ShowWindow(window, SW_HIDE) ShowWindow(window, SW_HIDE)
#define XLowerWindow(display, window) \ #define XLowerWindow(display, window) \
SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE) SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
#define XSetWMName(display, window, tp) \ #define XSetWMName(display, window, tp) \
SetWindowText(window, (tp)->value) SetWindowText(window, (tp)->value)
/* There really isn't a way to set the icon name separate from the /* There really isn't a way to set the icon name separate from the
windows name in Win32, so, just set the windows name. */ windows name in Win32, so, just set the windows name. */
#define XSetWMIconName(display, window, tp) \ #define XSetWMIconName(display, window, tp) \
XSetWMName(display, window, tp) XSetWMName(display, window, tp)
#define XDestroyWindow(display, window) \ #define XDestroyWindow(display, window) \
DestroyWindow(window) DestroyWindow(window)
/* Anything that needs to be freed was allocated with malloc in our /* Anything that needs to be freed was allocated with malloc in our
fake X windows library for Win32, so free it with plain old fake X windows library for Win32, so free it with plain old
free(). */ free(). */
#define XFree(data) \ #define XFree(data) \
free(data) free(data)
/* Nothing to be done for this...the pointer is always 'ungrabbed' /* Nothing to be done for this...the pointer is always 'ungrabbed'
in Win32. */ in Win32. */
#define XUngrabPointer(display, time) \ #define XUngrabPointer(display, time) \
/* Nothing. */ /* Nothing. */
/* Function prototypes. */ /* Function prototypes. */
extern XVisualInfo* XGetVisualInfo( extern XVisualInfo* XGetVisualInfo(
Display* display, Display* display,
long mask, long mask,
XVisualInfo* ttemplate, /* Avoid class with C++ keyword. */ XVisualInfo* ttemplate, /* Avoid class with C++ keyword. */
int*nitems); int*nitems);
extern Colormap XCreateColormap( extern Colormap XCreateColormap(
Display* display, Display* display,
Window root, Window root,
Visual* visual, Visual* visual,
int alloc); int alloc);
extern void XAllocColorCells( extern void XAllocColorCells(
Display* display, Display* display,
Colormap colormap, Colormap colormap,
Bool contig, Bool contig,
unsigned long plane_masks_return[], unsigned long plane_masks_return[],
unsigned int nplanes, unsigned int nplanes,
unsigned long pixels_return[], unsigned long pixels_return[],
unsigned int npixels); unsigned int npixels);
extern void XStoreColor( extern void XStoreColor(
Display* display, Display* display,
Colormap colormap, Colormap colormap,
XColor* color); XColor* color);
extern void XSetWindowColormap( extern void XSetWindowColormap(
Display* display, Display* display,
Window window, Window window,
Colormap colormap); Colormap colormap);
extern Bool XTranslateCoordinates( extern Bool XTranslateCoordinates(
Display *display, Display *display,
Window src, Window dst, Window src, Window dst,
int src_x, int src_y, int src_x, int src_y,
int* dest_x_return, int* dest_y_return, int* dest_x_return, int* dest_y_return,
Window* child_return); Window* child_return);
extern Status XGetGeometry( extern Status XGetGeometry(
Display* display, Display* display,
Window window, Window window,
Window* root_return, Window* root_return,
int* x_return, int* y_return, int* x_return, int* y_return,
unsigned int* width_return, unsigned int* height_return, unsigned int* width_return, unsigned int* height_return,
unsigned int *border_width_return, unsigned int *border_width_return,
unsigned int* depth_return); unsigned int* depth_return);
extern int DisplayWidthMM( extern int DisplayWidthMM(
Display* display, Display* display,
int screen); int screen);
extern int DisplayHeightMM( extern int DisplayHeightMM(
Display* display, Display* display,
int screen); int screen);
extern void XWarpPointer( extern void XWarpPointer(
Display* display, Display* display,
Window src, Window dst, Window src, Window dst,
int src_x, int src_y, int src_x, int src_y,
int src_width, int src_height, int src_width, int src_height,
int dst_x, int dst_y); int dst_x, int dst_y);
extern int XParseGeometry( extern int XParseGeometry(
char* string, char* string,
int* x, int* y, int* x, int* y,
unsigned int* width, unsigned int* height); unsigned int* width, unsigned int* height);
extern int XPending( extern int XPending(
Display* display); Display* display);
#endif /* __win32_x11_h__ */ #endif /* __win32_x11_h__ */

3376
Externals/WTL80/atlapp.h vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1248
Externals/WTL80/atlddx.h vendored

File diff suppressed because it is too large Load Diff

12424
Externals/WTL80/atldlgs.h vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

7700
Externals/WTL80/atlgdi.h vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,262 +1,262 @@
// Windows Template Library - WTL version 8.0 // Windows Template Library - WTL version 8.0
// Copyright (C) Microsoft Corporation. All rights reserved. // Copyright (C) Microsoft Corporation. All rights reserved.
// //
// This file is a part of the Windows Template Library. // This file is a part of the Windows Template Library.
// The use and distribution terms for this software are covered by the // The use and distribution terms for this software are covered by the
// Common Public License 1.0 (http://opensource.org/osi3.0/licenses/cpl1.0.php) // Common Public License 1.0 (http://opensource.org/osi3.0/licenses/cpl1.0.php)
// which can be found in the file CPL.TXT at the root of this distribution. // which can be found in the file CPL.TXT at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by // By using this software in any fashion, you are agreeing to be bound by
// the terms of this license. You must not remove this notice, or // the terms of this license. You must not remove this notice, or
// any other, from this software. // any other, from this software.
#ifndef __ATLRES_H__ #ifndef __ATLRES_H__
#define __ATLRES_H__ #define __ATLRES_H__
#pragma once #pragma once
#if defined(_WIN32_WCE) && !defined(__ATLRESCE_H__) #if defined(_WIN32_WCE) && !defined(__ATLRESCE_H__)
#error Use atlresCE.h instead of atlres.h for Windows CE #error Use atlresCE.h instead of atlres.h for Windows CE
#endif #endif
#ifdef RC_INVOKED #ifdef RC_INVOKED
#ifndef _INC_WINDOWS #ifndef _INC_WINDOWS
#define _INC_WINDOWS #define _INC_WINDOWS
#ifndef _WIN32_WCE #ifndef _WIN32_WCE
#define VS_VERSION_INFO 1 #define VS_VERSION_INFO 1
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols #define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
#ifndef WINVER #ifndef WINVER
#define WINVER 0x0400 // default to Windows Version 4.0 #define WINVER 0x0400 // default to Windows Version 4.0
#endif // !WINVER #endif // !WINVER
#include <winresrc.h> #include <winresrc.h>
// operation messages sent to DLGINIT // operation messages sent to DLGINIT
#define LB_ADDSTRING (WM_USER+1) #define LB_ADDSTRING (WM_USER+1)
#define CB_ADDSTRING (WM_USER+3) #define CB_ADDSTRING (WM_USER+3)
#endif // !_WIN32_WCE #endif // !_WIN32_WCE
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#undef APSTUDIO_HIDDEN_SYMBOLS #undef APSTUDIO_HIDDEN_SYMBOLS
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
#ifdef IDC_STATIC #ifdef IDC_STATIC
#undef IDC_STATIC #undef IDC_STATIC
#endif // IDC_STATIC #endif // IDC_STATIC
#define IDC_STATIC (-1) #define IDC_STATIC (-1)
#endif // !_INC_WINDOWS #endif // !_INC_WINDOWS
#endif // RC_INVOKED #endif // RC_INVOKED
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#define APSTUDIO_HIDDEN_SYMBOLS #define APSTUDIO_HIDDEN_SYMBOLS
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// ATL resource types // ATL resource types
#ifndef RC_INVOKED #ifndef RC_INVOKED
#define RT_DLGINIT MAKEINTRESOURCE(240) #define RT_DLGINIT MAKEINTRESOURCE(240)
#define RT_TOOLBAR MAKEINTRESOURCE(241) #define RT_TOOLBAR MAKEINTRESOURCE(241)
#endif // RC_INVOKED #endif // RC_INVOKED
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#undef APSTUDIO_HIDDEN_SYMBOLS #undef APSTUDIO_HIDDEN_SYMBOLS
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Standard window components // Standard window components
#define ID_SEPARATOR 0 // special separator value #define ID_SEPARATOR 0 // special separator value
#define ID_DEFAULT_PANE 0 // default status bar pane #define ID_DEFAULT_PANE 0 // default status bar pane
#ifndef RC_INVOKED // code only #ifndef RC_INVOKED // code only
// standard control bars (IDW = window ID) // standard control bars (IDW = window ID)
#define ATL_IDW_TOOLBAR 0xE800 // main Toolbar for window #define ATL_IDW_TOOLBAR 0xE800 // main Toolbar for window
#define ATL_IDW_STATUS_BAR 0xE801 // Status bar window #define ATL_IDW_STATUS_BAR 0xE801 // Status bar window
#define ATL_IDW_COMMAND_BAR 0xE802 // Command bar window #define ATL_IDW_COMMAND_BAR 0xE802 // Command bar window
// parts of a frame window // parts of a frame window
#define ATL_IDW_CLIENT 0xE900 #define ATL_IDW_CLIENT 0xE900
#define ATL_IDW_PANE_FIRST 0xE900 // first pane (256 max) #define ATL_IDW_PANE_FIRST 0xE900 // first pane (256 max)
#define ATL_IDW_PANE_LAST 0xE9FF #define ATL_IDW_PANE_LAST 0xE9FF
#define ATL_IDW_HSCROLL_FIRST 0xEA00 // first Horz scrollbar (16 max) #define ATL_IDW_HSCROLL_FIRST 0xEA00 // first Horz scrollbar (16 max)
#define ATL_IDW_VSCROLL_FIRST 0xEA10 // first Vert scrollbar (16 max) #define ATL_IDW_VSCROLL_FIRST 0xEA10 // first Vert scrollbar (16 max)
#define ATL_IDW_SIZE_BOX 0xEA20 // size box for splitters #define ATL_IDW_SIZE_BOX 0xEA20 // size box for splitters
#define ATL_IDW_PANE_SAVE 0xEA21 // to shift ATL_IDW_PANE_FIRST #define ATL_IDW_PANE_SAVE 0xEA21 // to shift ATL_IDW_PANE_FIRST
// bands for a rebar // bands for a rebar
#define ATL_IDW_BAND_FIRST 0xEB00 #define ATL_IDW_BAND_FIRST 0xEB00
#define ATL_IDW_BAND_LAST 0xEBFF #define ATL_IDW_BAND_LAST 0xEBFF
#endif // !RC_INVOKED #endif // !RC_INVOKED
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Standard Commands // Standard Commands
// File commands // File commands
#define ID_FILE_NEW 0xE100 #define ID_FILE_NEW 0xE100
#define ID_FILE_OPEN 0xE101 #define ID_FILE_OPEN 0xE101
#define ID_FILE_CLOSE 0xE102 #define ID_FILE_CLOSE 0xE102
#define ID_FILE_SAVE 0xE103 #define ID_FILE_SAVE 0xE103
#define ID_FILE_SAVE_AS 0xE104 #define ID_FILE_SAVE_AS 0xE104
#define ID_FILE_PAGE_SETUP 0xE105 #define ID_FILE_PAGE_SETUP 0xE105
#define ID_FILE_PRINT_SETUP 0xE106 #define ID_FILE_PRINT_SETUP 0xE106
#define ID_FILE_PRINT 0xE107 #define ID_FILE_PRINT 0xE107
#define ID_FILE_PRINT_DIRECT 0xE108 #define ID_FILE_PRINT_DIRECT 0xE108
#define ID_FILE_PRINT_PREVIEW 0xE109 #define ID_FILE_PRINT_PREVIEW 0xE109
#define ID_FILE_UPDATE 0xE10A #define ID_FILE_UPDATE 0xE10A
#define ID_FILE_SAVE_COPY_AS 0xE10B #define ID_FILE_SAVE_COPY_AS 0xE10B
#define ID_FILE_SEND_MAIL 0xE10C #define ID_FILE_SEND_MAIL 0xE10C
#define ID_FILE_MRU_FIRST 0xE110 #define ID_FILE_MRU_FIRST 0xE110
#define ID_FILE_MRU_FILE1 0xE110 // range - 16 max #define ID_FILE_MRU_FILE1 0xE110 // range - 16 max
#define ID_FILE_MRU_FILE2 0xE111 #define ID_FILE_MRU_FILE2 0xE111
#define ID_FILE_MRU_FILE3 0xE112 #define ID_FILE_MRU_FILE3 0xE112
#define ID_FILE_MRU_FILE4 0xE113 #define ID_FILE_MRU_FILE4 0xE113
#define ID_FILE_MRU_FILE5 0xE114 #define ID_FILE_MRU_FILE5 0xE114
#define ID_FILE_MRU_FILE6 0xE115 #define ID_FILE_MRU_FILE6 0xE115
#define ID_FILE_MRU_FILE7 0xE116 #define ID_FILE_MRU_FILE7 0xE116
#define ID_FILE_MRU_FILE8 0xE117 #define ID_FILE_MRU_FILE8 0xE117
#define ID_FILE_MRU_FILE9 0xE118 #define ID_FILE_MRU_FILE9 0xE118
#define ID_FILE_MRU_FILE10 0xE119 #define ID_FILE_MRU_FILE10 0xE119
#define ID_FILE_MRU_FILE11 0xE11A #define ID_FILE_MRU_FILE11 0xE11A
#define ID_FILE_MRU_FILE12 0xE11B #define ID_FILE_MRU_FILE12 0xE11B
#define ID_FILE_MRU_FILE13 0xE11C #define ID_FILE_MRU_FILE13 0xE11C
#define ID_FILE_MRU_FILE14 0xE11D #define ID_FILE_MRU_FILE14 0xE11D
#define ID_FILE_MRU_FILE15 0xE11E #define ID_FILE_MRU_FILE15 0xE11E
#define ID_FILE_MRU_FILE16 0xE11F #define ID_FILE_MRU_FILE16 0xE11F
#define ID_FILE_MRU_LAST 0xE11F #define ID_FILE_MRU_LAST 0xE11F
// Edit commands // Edit commands
#define ID_EDIT_CLEAR 0xE120 #define ID_EDIT_CLEAR 0xE120
#define ID_EDIT_CLEAR_ALL 0xE121 #define ID_EDIT_CLEAR_ALL 0xE121
#define ID_EDIT_COPY 0xE122 #define ID_EDIT_COPY 0xE122
#define ID_EDIT_CUT 0xE123 #define ID_EDIT_CUT 0xE123
#define ID_EDIT_FIND 0xE124 #define ID_EDIT_FIND 0xE124
#define ID_EDIT_PASTE 0xE125 #define ID_EDIT_PASTE 0xE125
#define ID_EDIT_PASTE_LINK 0xE126 #define ID_EDIT_PASTE_LINK 0xE126
#define ID_EDIT_PASTE_SPECIAL 0xE127 #define ID_EDIT_PASTE_SPECIAL 0xE127
#define ID_EDIT_REPEAT 0xE128 #define ID_EDIT_REPEAT 0xE128
#define ID_EDIT_REPLACE 0xE129 #define ID_EDIT_REPLACE 0xE129
#define ID_EDIT_SELECT_ALL 0xE12A #define ID_EDIT_SELECT_ALL 0xE12A
#define ID_EDIT_UNDO 0xE12B #define ID_EDIT_UNDO 0xE12B
#define ID_EDIT_REDO 0xE12C #define ID_EDIT_REDO 0xE12C
// Window commands // Window commands
#define ID_WINDOW_NEW 0xE130 #define ID_WINDOW_NEW 0xE130
#define ID_WINDOW_ARRANGE 0xE131 #define ID_WINDOW_ARRANGE 0xE131
#define ID_WINDOW_CASCADE 0xE132 #define ID_WINDOW_CASCADE 0xE132
#define ID_WINDOW_TILE_HORZ 0xE133 #define ID_WINDOW_TILE_HORZ 0xE133
#define ID_WINDOW_TILE_VERT 0xE134 #define ID_WINDOW_TILE_VERT 0xE134
#define ID_WINDOW_SPLIT 0xE135 #define ID_WINDOW_SPLIT 0xE135
#ifndef RC_INVOKED // code only #ifndef RC_INVOKED // code only
#define ATL_IDM_WINDOW_FIRST 0xE130 #define ATL_IDM_WINDOW_FIRST 0xE130
#define ATL_IDM_WINDOW_LAST 0xE13F #define ATL_IDM_WINDOW_LAST 0xE13F
#define ATL_IDM_FIRST_MDICHILD 0xFF00 // window list starts here #define ATL_IDM_FIRST_MDICHILD 0xFF00 // window list starts here
#define ATL_IDM_LAST_MDICHILD 0xFFFD #define ATL_IDM_LAST_MDICHILD 0xFFFD
#endif // !RC_INVOKED #endif // !RC_INVOKED
// TabView // TabView
#define ID_WINDOW_TABFIRST 0xFF00 // = ATL_IDM_FIRST_MDICHILD #define ID_WINDOW_TABFIRST 0xFF00 // = ATL_IDM_FIRST_MDICHILD
#define ID_WINDOW_TABLAST 0xFFFD #define ID_WINDOW_TABLAST 0xFFFD
#define ID_WINDOW_SHOWTABLIST 0xFFFE #define ID_WINDOW_SHOWTABLIST 0xFFFE
// Help and App commands // Help and App commands
#define ID_APP_ABOUT 0xE140 #define ID_APP_ABOUT 0xE140
#define ID_APP_EXIT 0xE141 #define ID_APP_EXIT 0xE141
#define ID_HELP_INDEX 0xE142 #define ID_HELP_INDEX 0xE142
#define ID_HELP_FINDER 0xE143 #define ID_HELP_FINDER 0xE143
#define ID_HELP_USING 0xE144 #define ID_HELP_USING 0xE144
#define ID_CONTEXT_HELP 0xE145 // shift-F1 #define ID_CONTEXT_HELP 0xE145 // shift-F1
// special commands for processing help // special commands for processing help
#define ID_HELP 0xE146 // first attempt for F1 #define ID_HELP 0xE146 // first attempt for F1
#define ID_DEFAULT_HELP 0xE147 // last attempt #define ID_DEFAULT_HELP 0xE147 // last attempt
// Misc // Misc
#define ID_NEXT_PANE 0xE150 #define ID_NEXT_PANE 0xE150
#define ID_PREV_PANE 0xE151 #define ID_PREV_PANE 0xE151
#define ID_PANE_CLOSE 0xE152 #define ID_PANE_CLOSE 0xE152
// Format // Format
#define ID_FORMAT_FONT 0xE160 #define ID_FORMAT_FONT 0xE160
// Scroll // Scroll
#define ID_SCROLL_UP 0xE170 #define ID_SCROLL_UP 0xE170
#define ID_SCROLL_DOWN 0xE171 #define ID_SCROLL_DOWN 0xE171
#define ID_SCROLL_PAGE_UP 0xE172 #define ID_SCROLL_PAGE_UP 0xE172
#define ID_SCROLL_PAGE_DOWN 0xE173 #define ID_SCROLL_PAGE_DOWN 0xE173
#define ID_SCROLL_TOP 0xE174 #define ID_SCROLL_TOP 0xE174
#define ID_SCROLL_BOTTOM 0xE175 #define ID_SCROLL_BOTTOM 0xE175
#define ID_SCROLL_LEFT 0xE176 #define ID_SCROLL_LEFT 0xE176
#define ID_SCROLL_RIGHT 0xE177 #define ID_SCROLL_RIGHT 0xE177
#define ID_SCROLL_PAGE_LEFT 0xE178 #define ID_SCROLL_PAGE_LEFT 0xE178
#define ID_SCROLL_PAGE_RIGHT 0xE179 #define ID_SCROLL_PAGE_RIGHT 0xE179
#define ID_SCROLL_ALL_LEFT 0xE17A #define ID_SCROLL_ALL_LEFT 0xE17A
#define ID_SCROLL_ALL_RIGHT 0xE17B #define ID_SCROLL_ALL_RIGHT 0xE17B
// OLE commands // OLE commands
#define ID_OLE_INSERT_NEW 0xE200 #define ID_OLE_INSERT_NEW 0xE200
#define ID_OLE_EDIT_LINKS 0xE201 #define ID_OLE_EDIT_LINKS 0xE201
#define ID_OLE_EDIT_CONVERT 0xE202 #define ID_OLE_EDIT_CONVERT 0xE202
#define ID_OLE_EDIT_CHANGE_ICON 0xE203 #define ID_OLE_EDIT_CHANGE_ICON 0xE203
#define ID_OLE_EDIT_PROPERTIES 0xE204 #define ID_OLE_EDIT_PROPERTIES 0xE204
#define ID_OLE_VERB_FIRST 0xE210 // range - 16 max #define ID_OLE_VERB_FIRST 0xE210 // range - 16 max
#ifndef RC_INVOKED // code only #ifndef RC_INVOKED // code only
#define ID_OLE_VERB_LAST 0xE21F #define ID_OLE_VERB_LAST 0xE21F
#endif // !RC_INVOKED #endif // !RC_INVOKED
// View commands (same number used as IDW used for toolbar and status bar) // View commands (same number used as IDW used for toolbar and status bar)
#define ID_VIEW_TOOLBAR 0xE800 #define ID_VIEW_TOOLBAR 0xE800
#define ID_VIEW_STATUS_BAR 0xE801 #define ID_VIEW_STATUS_BAR 0xE801
#define ID_VIEW_REFRESH 0xE803 #define ID_VIEW_REFRESH 0xE803
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Standard control IDs // Standard control IDs
#ifdef IDC_STATIC #ifdef IDC_STATIC
#undef IDC_STATIC #undef IDC_STATIC
#endif // IDC_STATIC #endif // IDC_STATIC
#define IDC_STATIC (-1) // all static controls #define IDC_STATIC (-1) // all static controls
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Standard string error/warnings // Standard string error/warnings
// idle status bar message // idle status bar message
#define ATL_IDS_IDLEMESSAGE 0xE001 #define ATL_IDS_IDLEMESSAGE 0xE001
#ifndef RC_INVOKED // code only #ifndef RC_INVOKED // code only
#define ATL_IDS_SCFIRST 0xEF00 #define ATL_IDS_SCFIRST 0xEF00
#endif // !RC_INVOKED #endif // !RC_INVOKED
#define ATL_IDS_SCSIZE 0xEF00 #define ATL_IDS_SCSIZE 0xEF00
#define ATL_IDS_SCMOVE 0xEF01 #define ATL_IDS_SCMOVE 0xEF01
#define ATL_IDS_SCMINIMIZE 0xEF02 #define ATL_IDS_SCMINIMIZE 0xEF02
#define ATL_IDS_SCMAXIMIZE 0xEF03 #define ATL_IDS_SCMAXIMIZE 0xEF03
#define ATL_IDS_SCNEXTWINDOW 0xEF04 #define ATL_IDS_SCNEXTWINDOW 0xEF04
#define ATL_IDS_SCPREVWINDOW 0xEF05 #define ATL_IDS_SCPREVWINDOW 0xEF05
#define ATL_IDS_SCCLOSE 0xEF06 #define ATL_IDS_SCCLOSE 0xEF06
#define ATL_IDS_SCRESTORE 0xEF12 #define ATL_IDS_SCRESTORE 0xEF12
#define ATL_IDS_SCTASKLIST 0xEF13 #define ATL_IDS_SCTASKLIST 0xEF13
#define ATL_IDS_MDICHILD 0xEF1F #define ATL_IDS_MDICHILD 0xEF1F
#define ATL_IDS_MRU_FILE 0xEFDA #define ATL_IDS_MRU_FILE 0xEFDA
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Misc. control IDs // Misc. control IDs
// Property Sheet control id's (determined with Spy++) // Property Sheet control id's (determined with Spy++)
#define ID_APPLY_NOW 0x3021 #define ID_APPLY_NOW 0x3021
#define ID_WIZBACK 0x3023 #define ID_WIZBACK 0x3023
#define ID_WIZNEXT 0x3024 #define ID_WIZNEXT 0x3024
#define ID_WIZFINISH 0x3025 #define ID_WIZFINISH 0x3025
#define ATL_IDC_TAB_CONTROL 0x3020 #define ATL_IDC_TAB_CONTROL 0x3020
#endif // __ATLRES_H__ #endif // __ATLRES_H__

View File

@@ -1,93 +1,93 @@
// Windows Template Library - WTL version 8.0 // Windows Template Library - WTL version 8.0
// Copyright (C) Microsoft Corporation. All rights reserved. // Copyright (C) Microsoft Corporation. All rights reserved.
// //
// This file is a part of the Windows Template Library. // This file is a part of the Windows Template Library.
// The use and distribution terms for this software are covered by the // The use and distribution terms for this software are covered by the
// Common Public License 1.0 (http://opensource.org/osi3.0/licenses/cpl1.0.php) // Common Public License 1.0 (http://opensource.org/osi3.0/licenses/cpl1.0.php)
// which can be found in the file CPL.TXT at the root of this distribution. // which can be found in the file CPL.TXT at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by // By using this software in any fashion, you are agreeing to be bound by
// the terms of this license. You must not remove this notice, or // the terms of this license. You must not remove this notice, or
// any other, from this software. // any other, from this software.
#ifndef __ATLRESCE_H__ #ifndef __ATLRESCE_H__
#define __ATLRESCE_H__ #define __ATLRESCE_H__
#pragma once #pragma once
#ifndef _WIN32_WCE #ifndef _WIN32_WCE
#error atlresCE.h is only for Windows CE #error atlresCE.h is only for Windows CE
#endif #endif
#ifdef RC_INVOKED #ifdef RC_INVOKED
#ifndef _INC_WINDOWS #ifndef _INC_WINDOWS
#define VS_VERSION_INFO 1 #define VS_VERSION_INFO 1
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols #define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
#ifndef WINVER #ifndef WINVER
#define WINVER 0x0400 // default to Windows Version 4.0 #define WINVER 0x0400 // default to Windows Version 4.0
#endif // !WINVER #endif // !WINVER
#if !defined(WCEOLE_ENABLE_DIALOGEX) #if !defined(WCEOLE_ENABLE_DIALOGEX)
#define DIALOGEX DIALOG DISCARDABLE #define DIALOGEX DIALOG DISCARDABLE
#endif #endif
#include <commctrl.h> #include <commctrl.h>
#define SHMENUBAR RCDATA #define SHMENUBAR RCDATA
#if defined(SHELLSDK_MODULES_AYGSHELL) #if defined(SHELLSDK_MODULES_AYGSHELL)
#include <aygshell.h> #include <aygshell.h>
#else #else
#define NOMENU 0xFFFF #define NOMENU 0xFFFF
#define IDS_SHNEW 1 #define IDS_SHNEW 1
#define IDM_SHAREDNEW 10 #define IDM_SHAREDNEW 10
#define IDM_SHAREDNEWDEFAULT 11 #define IDM_SHAREDNEWDEFAULT 11
#endif #endif
#ifndef I_IMAGENONE #ifndef I_IMAGENONE
#define I_IMAGENONE (-2) #define I_IMAGENONE (-2)
#endif #endif
#include <windows.h> #include <windows.h>
#endif // !_INC_WINDOWS #endif // !_INC_WINDOWS
#endif // RC_INVOKED #endif // RC_INVOKED
#include "atlres.h" #include "atlres.h"
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#undef APSTUDIO_HIDDEN_SYMBOLS #undef APSTUDIO_HIDDEN_SYMBOLS
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
// Visual Studio dialog editor bug fix // Visual Studio dialog editor bug fix
#ifndef DS_FIXEDSYS #ifndef DS_FIXEDSYS
#define DS_FIXEDSYS 0 #define DS_FIXEDSYS 0
#endif #endif
#define IDC_INFOSTATIC 0xFFFE // == IDC_STATIC -1 #define IDC_INFOSTATIC 0xFFFE // == IDC_STATIC -1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Smartphone and PPC 2005 Resource IDs // Smartphone and PPC 2005 Resource IDs
// Command and associated string resource IDs // Command and associated string resource IDs
#define ID_MENU_OK 0xE790 #define ID_MENU_OK 0xE790
#define ID_MENU_CANCEL 0xE791 #define ID_MENU_CANCEL 0xE791
#define ID_MENU 0xE792 #define ID_MENU 0xE792
#define ID_ACTION 0xE793 #define ID_ACTION 0xE793
#define ID_VIEW_FULLSCREEN 0xE802 #define ID_VIEW_FULLSCREEN 0xE802
// MenuBar resource IDs // MenuBar resource IDs
#define ATL_IDM_MENU_DONE 0xE701 #define ATL_IDM_MENU_DONE 0xE701
#define ATL_IDM_MENU_CANCEL 0xE702 #define ATL_IDM_MENU_CANCEL 0xE702
#define ATL_IDM_MENU_DONECANCEL 0xE703 #define ATL_IDM_MENU_DONECANCEL 0xE703
// Default device MenuBar control ID and MenuBar resource ID // Default device MenuBar control ID and MenuBar resource ID
#define ATL_IDW_MENU_BAR 0xE802 #define ATL_IDW_MENU_BAR 0xE802
// SmartPhone spinned controls ID offset for CSpinCtrl // SmartPhone spinned controls ID offset for CSpinCtrl
#define ATL_IDW_SPIN_ID 9999 #define ATL_IDW_SPIN_ID 9999
#endif // __ATLRESCE_H__ #endif // __ATLRESCE_H__

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -50,16 +50,16 @@
/* Information output macros */ /* Information output macros */
#define WIIUSE_INFO(fmt, ...) fprintf(stderr, "[INFO] " fmt "\n", ##__VA_ARGS__) #define WIIUSE_INFO(fmt, ...) fprintf(stderr, "[INFO] " fmt "\n", ##__VA_ARGS__)
#ifdef WITH_WIIUSE_DEBUG #ifdef WITH_WIIUSE_DEBUG
#ifdef WIN32 #ifdef WIN32
#define WIIUSE_DEBUG(fmt, ...) do { \ #define WIIUSE_DEBUG(fmt, ...) do { \
char* file = __FILE__; \ char* file = __FILE__; \
int i = strlen(file) - 1; \ int i = strlen(file) - 1; \
for (; i && (file[i] != '\\'); --i); \ for (; i && (file[i] != '\\'); --i); \
fprintf(stderr, "[DEBUG] %s:%i: " fmt "\n", file+i+1, __LINE__, ##__VA_ARGS__); \ fprintf(stderr, "[DEBUG] %s:%i: " fmt "\n", file+i+1, __LINE__, ##__VA_ARGS__); \
} while (0) } while (0)
#else #else
#define WIIUSE_DEBUG(fmt, ...) fprintf(stderr, "[DEBUG] " __FILE__ ":%i: " fmt "\n", __LINE__, ##__VA_ARGS__) #define WIIUSE_DEBUG(fmt, ...) fprintf(stderr, "[DEBUG] " __FILE__ ":%i: " fmt "\n", __LINE__, ##__VA_ARGS__)
#endif #endif
#else #else
#define WIIUSE_DEBUG(fmt, ...) #define WIIUSE_DEBUG(fmt, ...)

View File

@@ -44,7 +44,7 @@ extern "C" {
void wiiuse_pressed_buttons(struct wiimote_t* wm, byte* msg); void wiiuse_pressed_buttons(struct wiimote_t* wm, byte* msg);
void handshake_expansion(struct wiimote_t* wm, byte* data, unsigned short len); void handshake_expansion(struct wiimote_t* wm, byte* data, unsigned short len);
void disable_expansion(struct wiimote_t* wm); void disable_expansion(struct wiimote_t* wm);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -39,14 +39,14 @@
#ifndef OS_H_INCLUDED #ifndef OS_H_INCLUDED
#define OS_H_INCLUDED #define OS_H_INCLUDED
#ifdef WIN32 #ifdef WIN32
/* windows */ /* windows */
#define isnan(x) _isnan(x) #define isnan(x) _isnan(x)
#define isinf(x) !_finite(x) #define isinf(x) !_finite(x)
/* disable warnings I don't care about */ /* disable warnings I don't care about */
#pragma warning(disable:4244) /* possible loss of data conversion */ #pragma warning(disable:4244) /* possible loss of data conversion */
#pragma warning(disable:4273) /* inconsistent dll linkage */ #pragma warning(disable:4273) /* inconsistent dll linkage */
#pragma warning(disable:4217) #pragma warning(disable:4217)
#else #else
/* nix */ /* nix */

File diff suppressed because it is too large Load Diff

View File

@@ -153,8 +153,8 @@
#define EXP_ID_CODE_CLASSIC_CONTROLLER 0x9A1EFDFD #define EXP_ID_CODE_CLASSIC_CONTROLLER 0x9A1EFDFD
#define EXP_ID_CODE_GUITAR 0x9A1EFDFB #define EXP_ID_CODE_GUITAR 0x9A1EFDFB
#define EXP_HANDSHAKE_LEN 224 #define EXP_HANDSHAKE_LEN 224
/******************** /********************
* *
* End Wiimote internal codes * End Wiimote internal codes
@@ -205,10 +205,10 @@
#define WIIUSE_DEFAULT_SMOOTH_ALPHA 0.07f #define WIIUSE_DEFAULT_SMOOTH_ALPHA 0.07f
#define SMOOTH_ROLL 0x01 #define SMOOTH_ROLL 0x01
#define SMOOTH_PITCH 0x02 #define SMOOTH_PITCH 0x02
#include "wiiuse.h" #include "wiiuse.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@@ -1,52 +1,52 @@
/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ /* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */
/* see jconfig.doc for explanations */ /* see jconfig.doc for explanations */
#define HAVE_PROTOTYPES #define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR #define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT #define HAVE_UNSIGNED_SHORT
/* #define void char */ /* #define void char */
/* #define const */ /* #define const */
#undef CHAR_IS_UNSIGNED #undef CHAR_IS_UNSIGNED
#define HAVE_STDDEF_H #define HAVE_STDDEF_H
#define HAVE_STDLIB_H #define HAVE_STDLIB_H
#undef NEED_BSD_STRINGS #undef NEED_BSD_STRINGS
#undef NEED_SYS_TYPES_H #undef NEED_SYS_TYPES_H
//#define NEED_FAR_POINTERS /* for small or medium memory model */ //#define NEED_FAR_POINTERS /* for small or medium memory model */
#undef NEED_SHORT_EXTERNAL_NAMES #undef NEED_SHORT_EXTERNAL_NAMES
#undef INCOMPLETE_TYPES_BROKEN #undef INCOMPLETE_TYPES_BROKEN
#ifdef JPEG_INTERNALS #ifdef JPEG_INTERNALS
#undef RIGHT_SHIFT_IS_UNSIGNED #undef RIGHT_SHIFT_IS_UNSIGNED
//#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ //#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */
#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */
//#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ //#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */
#define NEED_FHEAPMIN /* far heap management routines are broken */ #define NEED_FHEAPMIN /* far heap management routines are broken */
#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ #define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */
/* Note: the above define is known to improve the code with Microsoft C 6.00A. /* Note: the above define is known to improve the code with Microsoft C 6.00A.
* I do not know whether it is good for later compiler versions. * I do not know whether it is good for later compiler versions.
* Please report any info on this point to jpeg-info@uunet.uu.net. * Please report any info on this point to jpeg-info@uunet.uu.net.
*/ */
#endif /* JPEG_INTERNALS */ #endif /* JPEG_INTERNALS */
#ifdef JPEG_CJPEG_DJPEG #ifdef JPEG_CJPEG_DJPEG
#define BMP_SUPPORTED /* BMP image file format */ #define BMP_SUPPORTED /* BMP image file format */
#define GIF_SUPPORTED /* GIF image file format */ #define GIF_SUPPORTED /* GIF image file format */
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
#undef RLE_SUPPORTED /* Utah RLE image file format */ #undef RLE_SUPPORTED /* Utah RLE image file format */
#define TARGA_SUPPORTED /* Targa image file format */ #define TARGA_SUPPORTED /* Targa image file format */
#define TWO_FILE_COMMANDLINE #define TWO_FILE_COMMANDLINE
#define USE_SETMODE /* Microsoft has setmode() */ #define USE_SETMODE /* Microsoft has setmode() */
#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ #define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */
#undef DONT_USE_B_MODE #undef DONT_USE_B_MODE
#undef PROGRESS_REPORT /* optional */ #undef PROGRESS_REPORT /* optional */
#endif /* JPEG_CJPEG_DJPEG */ #endif /* JPEG_CJPEG_DJPEG */

View File

@@ -1,363 +1,363 @@
/* /*
* jmorecfg.h * jmorecfg.h
* *
* Copyright (C) 1991-1997, Thomas G. Lane. * Copyright (C) 1991-1997, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
* This file contains additional configuration options that customize the * This file contains additional configuration options that customize the
* JPEG software for special applications or support machine-dependent * JPEG software for special applications or support machine-dependent
* optimizations. Most users will not need to touch this file. * optimizations. Most users will not need to touch this file.
*/ */
/* /*
* Define BITS_IN_JSAMPLE as either * Define BITS_IN_JSAMPLE as either
* 8 for 8-bit sample values (the usual setting) * 8 for 8-bit sample values (the usual setting)
* 12 for 12-bit sample values * 12 for 12-bit sample values
* Only 8 and 12 are legal data precisions for lossy JPEG according to the * Only 8 and 12 are legal data precisions for lossy JPEG according to the
* JPEG standard, and the IJG code does not support anything else! * JPEG standard, and the IJG code does not support anything else!
* We do not support run-time selection of data precision, sorry. * We do not support run-time selection of data precision, sorry.
*/ */
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
/* /*
* Maximum number of components (color channels) allowed in JPEG image. * Maximum number of components (color channels) allowed in JPEG image.
* To meet the letter of the JPEG spec, set this to 255. However, darn * To meet the letter of the JPEG spec, set this to 255. However, darn
* few applications need more than 4 channels (maybe 5 for CMYK + alpha * few applications need more than 4 channels (maybe 5 for CMYK + alpha
* mask). We recommend 10 as a reasonable compromise; use 4 if you are * mask). We recommend 10 as a reasonable compromise; use 4 if you are
* really short on memory. (Each allowed component costs a hundred or so * really short on memory. (Each allowed component costs a hundred or so
* bytes of storage, whether actually used in an image or not.) * bytes of storage, whether actually used in an image or not.)
*/ */
#define MAX_COMPONENTS 10 /* maximum number of image components */ #define MAX_COMPONENTS 10 /* maximum number of image components */
/* /*
* Basic data types. * Basic data types.
* You may need to change these if you have a machine with unusual data * You may need to change these if you have a machine with unusual data
* type sizes; for example, "char" not 8 bits, "short" not 16 bits, * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
* or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
* but it had better be at least 16. * but it had better be at least 16.
*/ */
/* Representation of a single sample (pixel element value). /* Representation of a single sample (pixel element value).
* We frequently allocate large arrays of these, so it's important to keep * We frequently allocate large arrays of these, so it's important to keep
* them small. But if you have memory to burn and access to char or short * them small. But if you have memory to burn and access to char or short
* arrays is very slow on your hardware, you might want to change these. * arrays is very slow on your hardware, you might want to change these.
*/ */
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
/* JSAMPLE should be the smallest type that will hold the values 0..255. /* JSAMPLE should be the smallest type that will hold the values 0..255.
* You can use a signed char by having GETJSAMPLE mask it with 0xFF. * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
*/ */
#ifdef HAVE_UNSIGNED_CHAR #ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char JSAMPLE; typedef unsigned char JSAMPLE;
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int) (value))
#else /* not HAVE_UNSIGNED_CHAR */ #else /* not HAVE_UNSIGNED_CHAR */
typedef char JSAMPLE; typedef char JSAMPLE;
#ifdef CHAR_IS_UNSIGNED #ifdef CHAR_IS_UNSIGNED
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int) (value))
#else #else
#define GETJSAMPLE(value) ((int) (value) & 0xFF) #define GETJSAMPLE(value) ((int) (value) & 0xFF)
#endif /* CHAR_IS_UNSIGNED */ #endif /* CHAR_IS_UNSIGNED */
#endif /* HAVE_UNSIGNED_CHAR */ #endif /* HAVE_UNSIGNED_CHAR */
#define MAXJSAMPLE 255 #define MAXJSAMPLE 255
#define CENTERJSAMPLE 128 #define CENTERJSAMPLE 128
#endif /* BITS_IN_JSAMPLE == 8 */ #endif /* BITS_IN_JSAMPLE == 8 */
#if BITS_IN_JSAMPLE == 12 #if BITS_IN_JSAMPLE == 12
/* JSAMPLE should be the smallest type that will hold the values 0..4095. /* JSAMPLE should be the smallest type that will hold the values 0..4095.
* On nearly all machines "short" will do nicely. * On nearly all machines "short" will do nicely.
*/ */
typedef short JSAMPLE; typedef short JSAMPLE;
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int) (value))
#define MAXJSAMPLE 4095 #define MAXJSAMPLE 4095
#define CENTERJSAMPLE 2048 #define CENTERJSAMPLE 2048
#endif /* BITS_IN_JSAMPLE == 12 */ #endif /* BITS_IN_JSAMPLE == 12 */
/* Representation of a DCT frequency coefficient. /* Representation of a DCT frequency coefficient.
* This should be a signed value of at least 16 bits; "short" is usually OK. * This should be a signed value of at least 16 bits; "short" is usually OK.
* Again, we allocate large arrays of these, but you can change to int * Again, we allocate large arrays of these, but you can change to int
* if you have memory to burn and "short" is really slow. * if you have memory to burn and "short" is really slow.
*/ */
typedef short JCOEF; typedef short JCOEF;
/* Compressed datastreams are represented as arrays of JOCTET. /* Compressed datastreams are represented as arrays of JOCTET.
* These must be EXACTLY 8 bits wide, at least once they are written to * These must be EXACTLY 8 bits wide, at least once they are written to
* external storage. Note that when using the stdio data source/destination * external storage. Note that when using the stdio data source/destination
* managers, this is also the data type passed to fread/fwrite. * managers, this is also the data type passed to fread/fwrite.
*/ */
#ifdef HAVE_UNSIGNED_CHAR #ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char JOCTET; typedef unsigned char JOCTET;
#define GETJOCTET(value) (value) #define GETJOCTET(value) (value)
#else /* not HAVE_UNSIGNED_CHAR */ #else /* not HAVE_UNSIGNED_CHAR */
typedef char JOCTET; typedef char JOCTET;
#ifdef CHAR_IS_UNSIGNED #ifdef CHAR_IS_UNSIGNED
#define GETJOCTET(value) (value) #define GETJOCTET(value) (value)
#else #else
#define GETJOCTET(value) ((value) & 0xFF) #define GETJOCTET(value) ((value) & 0xFF)
#endif /* CHAR_IS_UNSIGNED */ #endif /* CHAR_IS_UNSIGNED */
#endif /* HAVE_UNSIGNED_CHAR */ #endif /* HAVE_UNSIGNED_CHAR */
/* These typedefs are used for various table entries and so forth. /* These typedefs are used for various table entries and so forth.
* They must be at least as wide as specified; but making them too big * They must be at least as wide as specified; but making them too big
* won't cost a huge amount of memory, so we don't provide special * won't cost a huge amount of memory, so we don't provide special
* extraction code like we did for JSAMPLE. (In other words, these * extraction code like we did for JSAMPLE. (In other words, these
* typedefs live at a different point on the speed/space tradeoff curve.) * typedefs live at a different point on the speed/space tradeoff curve.)
*/ */
/* UINT8 must hold at least the values 0..255. */ /* UINT8 must hold at least the values 0..255. */
#ifdef HAVE_UNSIGNED_CHAR #ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char UINT8; typedef unsigned char UINT8;
#else /* not HAVE_UNSIGNED_CHAR */ #else /* not HAVE_UNSIGNED_CHAR */
#ifdef CHAR_IS_UNSIGNED #ifdef CHAR_IS_UNSIGNED
typedef char UINT8; typedef char UINT8;
#else /* not CHAR_IS_UNSIGNED */ #else /* not CHAR_IS_UNSIGNED */
typedef short UINT8; typedef short UINT8;
#endif /* CHAR_IS_UNSIGNED */ #endif /* CHAR_IS_UNSIGNED */
#endif /* HAVE_UNSIGNED_CHAR */ #endif /* HAVE_UNSIGNED_CHAR */
/* UINT16 must hold at least the values 0..65535. */ /* UINT16 must hold at least the values 0..65535. */
#ifdef HAVE_UNSIGNED_SHORT #ifdef HAVE_UNSIGNED_SHORT
typedef unsigned short UINT16; typedef unsigned short UINT16;
#else /* not HAVE_UNSIGNED_SHORT */ #else /* not HAVE_UNSIGNED_SHORT */
typedef unsigned int UINT16; typedef unsigned int UINT16;
#endif /* HAVE_UNSIGNED_SHORT */ #endif /* HAVE_UNSIGNED_SHORT */
/* INT16 must hold at least the values -32768..32767. */ /* INT16 must hold at least the values -32768..32767. */
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ #ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
typedef short INT16; typedef short INT16;
#endif #endif
/* INT32 must hold at least signed 32-bit values. */ /* INT32 must hold at least signed 32-bit values. */
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
typedef long INT32; typedef long INT32;
#endif #endif
/* Datatype used for image dimensions. The JPEG standard only supports /* Datatype used for image dimensions. The JPEG standard only supports
* images up to 64K*64K due to 16-bit fields in SOF markers. Therefore * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore
* "unsigned int" is sufficient on all machines. However, if you need to * "unsigned int" is sufficient on all machines. However, if you need to
* handle larger images and you don't mind deviating from the spec, you * handle larger images and you don't mind deviating from the spec, you
* can change this datatype. * can change this datatype.
*/ */
typedef unsigned int JDIMENSION; typedef unsigned int JDIMENSION;
#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ #define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */
/* These macros are used in all function definitions and extern declarations. /* These macros are used in all function definitions and extern declarations.
* You could modify them if you need to change function linkage conventions; * You could modify them if you need to change function linkage conventions;
* in particular, you'll need to do that to make the library a Windows DLL. * in particular, you'll need to do that to make the library a Windows DLL.
* Another application is to make all functions global for use with debuggers * Another application is to make all functions global for use with debuggers
* or code profilers that require it. * or code profilers that require it.
*/ */
/* a function called through method pointers: */ /* a function called through method pointers: */
#define METHODDEF(type) static type #define METHODDEF(type) static type
/* a function used only in its module: */ /* a function used only in its module: */
#define LOCAL(type) static type #define LOCAL(type) static type
/* a function referenced thru EXTERNs: */ /* a function referenced thru EXTERNs: */
#define GLOBAL(type) type #define GLOBAL(type) type
/* a reference to a GLOBAL function: */ /* a reference to a GLOBAL function: */
#define EXTERN(type) extern type #define EXTERN(type) extern type
/* This macro is used to declare a "method", that is, a function pointer. /* This macro is used to declare a "method", that is, a function pointer.
* We want to supply prototype parameters if the compiler can cope. * We want to supply prototype parameters if the compiler can cope.
* Note that the arglist parameter must be parenthesized! * Note that the arglist parameter must be parenthesized!
* Again, you can customize this if you need special linkage keywords. * Again, you can customize this if you need special linkage keywords.
*/ */
#ifdef HAVE_PROTOTYPES #ifdef HAVE_PROTOTYPES
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
#else #else
#define JMETHOD(type,methodname,arglist) type (*methodname) () #define JMETHOD(type,methodname,arglist) type (*methodname) ()
#endif #endif
/* Here is the pseudo-keyword for declaring pointers that must be "far" /* Here is the pseudo-keyword for declaring pointers that must be "far"
* on 80x86 machines. Most of the specialized coding for 80x86 is handled * on 80x86 machines. Most of the specialized coding for 80x86 is handled
* by just saying "FAR *" where such a pointer is needed. In a few places * by just saying "FAR *" where such a pointer is needed. In a few places
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
*/ */
#ifdef NEED_FAR_POINTERS #ifdef NEED_FAR_POINTERS
#define FAR far #define FAR far
#else #else
#define FAR #define FAR
#endif #endif
/* /*
* On a few systems, type boolean and/or its values FALSE, TRUE may appear * On a few systems, type boolean and/or its values FALSE, TRUE may appear
* in standard header files. Or you may have conflicts with application- * in standard header files. Or you may have conflicts with application-
* specific header files that you want to include together with these files. * specific header files that you want to include together with these files.
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work. * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
*/ */
#ifndef HAVE_BOOLEAN #ifndef HAVE_BOOLEAN
typedef int boolean; typedef int boolean;
#endif #endif
#ifndef FALSE /* in case these macros already exist */ #ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */ #define FALSE 0 /* values of boolean */
#endif #endif
#ifndef TRUE #ifndef TRUE
#define TRUE 1 #define TRUE 1
#endif #endif
/* /*
* The remaining options affect code selection within the JPEG library, * The remaining options affect code selection within the JPEG library,
* but they don't need to be visible to most applications using the library. * but they don't need to be visible to most applications using the library.
* To minimize application namespace pollution, the symbols won't be * To minimize application namespace pollution, the symbols won't be
* defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
*/ */
#ifdef JPEG_INTERNALS #ifdef JPEG_INTERNALS
#define JPEG_INTERNAL_OPTIONS #define JPEG_INTERNAL_OPTIONS
#endif #endif
#ifdef JPEG_INTERNAL_OPTIONS #ifdef JPEG_INTERNAL_OPTIONS
/* /*
* These defines indicate whether to include various optional functions. * These defines indicate whether to include various optional functions.
* Undefining some of these symbols will produce a smaller but less capable * Undefining some of these symbols will produce a smaller but less capable
* library. Note that you can leave certain source files out of the * library. Note that you can leave certain source files out of the
* compilation/linking process if you've #undef'd the corresponding symbols. * compilation/linking process if you've #undef'd the corresponding symbols.
* (You may HAVE to do that if your compiler doesn't like null source files.) * (You may HAVE to do that if your compiler doesn't like null source files.)
*/ */
/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */ /* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */
/* Capability options common to encoder and decoder: */ /* Capability options common to encoder and decoder: */
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ #define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ #define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ #define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
/* Encoder capability options: */ /* Encoder capability options: */
#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ #undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ #define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
/* Note: if you selected 12-bit data precision, it is dangerous to turn off /* Note: if you selected 12-bit data precision, it is dangerous to turn off
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
* precision, so jchuff.c normally uses entropy optimization to compute * precision, so jchuff.c normally uses entropy optimization to compute
* usable tables for higher precision. If you don't want to do optimization, * usable tables for higher precision. If you don't want to do optimization,
* you'll have to supply different default Huffman tables. * you'll have to supply different default Huffman tables.
* The exact same statements apply for progressive JPEG: the default tables * The exact same statements apply for progressive JPEG: the default tables
* don't work for progressive mode. (This may get fixed, however.) * don't work for progressive mode. (This may get fixed, however.)
*/ */
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ #define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
/* Decoder capability options: */ /* Decoder capability options: */
#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ #undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ #define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ #define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ #define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ #undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ #define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ #define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ #define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
/* more capability options later, no doubt */ /* more capability options later, no doubt */
/* /*
* Ordering of RGB data in scanlines passed to or from the application. * Ordering of RGB data in scanlines passed to or from the application.
* If your application wants to deal with data in the order B,G,R, just * If your application wants to deal with data in the order B,G,R, just
* change these macros. You can also deal with formats such as R,G,B,X * change these macros. You can also deal with formats such as R,G,B,X
* (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing
* the offsets will also change the order in which colormap data is organized. * the offsets will also change the order in which colormap data is organized.
* RESTRICTIONS: * RESTRICTIONS:
* 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
* 2. These macros only affect RGB<=>YCbCr color conversion, so they are not * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
* useful if you are using JPEG color spaces other than YCbCr or grayscale. * useful if you are using JPEG color spaces other than YCbCr or grayscale.
* 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
* is not 3 (they don't understand about dummy color components!). So you * is not 3 (they don't understand about dummy color components!). So you
* can't use color quantization if you change that value. * can't use color quantization if you change that value.
*/ */
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ #define RGB_RED 0 /* Offset of Red in an RGB scanline element */
#define RGB_GREEN 1 /* Offset of Green */ #define RGB_GREEN 1 /* Offset of Green */
#define RGB_BLUE 2 /* Offset of Blue */ #define RGB_BLUE 2 /* Offset of Blue */
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
/* Definitions for speed-related optimizations. */ /* Definitions for speed-related optimizations. */
/* If your compiler supports inline functions, define INLINE /* If your compiler supports inline functions, define INLINE
* as the inline keyword; otherwise define it as empty. * as the inline keyword; otherwise define it as empty.
*/ */
#ifndef INLINE #ifndef INLINE
#ifdef __GNUC__ /* for instance, GNU C knows about inline */ #ifdef __GNUC__ /* for instance, GNU C knows about inline */
#define INLINE __inline__ #define INLINE __inline__
#endif #endif
#ifndef INLINE #ifndef INLINE
#define INLINE /* default is to define it as empty */ #define INLINE /* default is to define it as empty */
#endif #endif
#endif #endif
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying /* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
* two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
* as short on such a machine. MULTIPLIER must be at least 16 bits wide. * as short on such a machine. MULTIPLIER must be at least 16 bits wide.
*/ */
#ifndef MULTIPLIER #ifndef MULTIPLIER
#define MULTIPLIER int /* type for fastest integer multiply */ #define MULTIPLIER int /* type for fastest integer multiply */
#endif #endif
/* FAST_FLOAT should be either float or double, whichever is done faster /* FAST_FLOAT should be either float or double, whichever is done faster
* by your compiler. (Note that this type is only used in the floating point * by your compiler. (Note that this type is only used in the floating point
* DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
* Typically, float is faster in ANSI C compilers, while double is faster in * Typically, float is faster in ANSI C compilers, while double is faster in
* pre-ANSI compilers (because they insist on converting to double anyway). * pre-ANSI compilers (because they insist on converting to double anyway).
* The code below therefore chooses float if we have ANSI-style prototypes. * The code below therefore chooses float if we have ANSI-style prototypes.
*/ */
#ifndef FAST_FLOAT #ifndef FAST_FLOAT
#ifdef HAVE_PROTOTYPES #ifdef HAVE_PROTOTYPES
#define FAST_FLOAT float #define FAST_FLOAT float
#else #else
#define FAST_FLOAT double #define FAST_FLOAT double
#endif #endif
#endif #endif
#endif /* JPEG_INTERNAL_OPTIONS */ #endif /* JPEG_INTERNAL_OPTIONS */

File diff suppressed because it is too large Load Diff

View File

@@ -1,249 +1,249 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: msvc/wx/msw/setup.h // Name: msvc/wx/msw/setup.h
// Purpose: wrapper around the real wx/setup.h for Visual C++ // Purpose: wrapper around the real wx/setup.h for Visual C++
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 2004-12-12 // Created: 2004-12-12
// RCS-ID: $Id: setup.h 43687 2006-11-27 15:03:59Z VZ $ // RCS-ID: $Id: setup.h 43687 2006-11-27 15:03:59Z VZ $
// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but // VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined // the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
// explicitly! // explicitly!
#ifdef _MSC_VER #ifdef _MSC_VER
#ifdef _UNICODE #ifdef _UNICODE
#ifdef WXUSINGDLL #ifdef WXUSINGDLL
#ifdef _DEBUG #ifdef _DEBUG
#include "../../../lib/vc_dll/mswud/wx/setup.h" #include "../../../lib/vc_dll/mswud/wx/setup.h"
#else #else
#include "../../../lib/vc_dll/mswu/wx/setup.h" #include "../../../lib/vc_dll/mswu/wx/setup.h"
#endif #endif
#else #else
#ifdef _DEBUG #ifdef _DEBUG
#include "../../../lib/vc_lib/mswud/wx/setup.h" #include "../../../lib/vc_lib/mswud/wx/setup.h"
#else #else
#include "../../../lib/vc_lib/mswu/wx/setup.h" #include "../../../lib/vc_lib/mswu/wx/setup.h"
#endif #endif
#endif #endif
#ifdef _DEBUG #ifdef _DEBUG
#pragma comment(lib,"wxbase28ud") #pragma comment(lib,"wxbase28ud")
#pragma comment(lib,"wxbase28ud_net") #pragma comment(lib,"wxbase28ud_net")
#pragma comment(lib,"wxbase28ud_xml") #pragma comment(lib,"wxbase28ud_xml")
#if wxUSE_REGEX #if wxUSE_REGEX
#pragma comment(lib,"wxregexud") #pragma comment(lib,"wxregexud")
#endif #endif
#if wxUSE_GUI #if wxUSE_GUI
#if wxUSE_XML #if wxUSE_XML
#pragma comment(lib,"wxexpatd") #pragma comment(lib,"wxexpatd")
#endif #endif
#if wxUSE_LIBJPEG #if wxUSE_LIBJPEG
#pragma comment(lib,"wxjpegd") #pragma comment(lib,"wxjpegd")
#endif #endif
#if wxUSE_LIBPNG #if wxUSE_LIBPNG
#pragma comment(lib,"wxpngd") #pragma comment(lib,"wxpngd")
#endif #endif
#if wxUSE_LIBTIFF #if wxUSE_LIBTIFF
#pragma comment(lib,"wxtiffd") #pragma comment(lib,"wxtiffd")
#endif #endif
#if wxUSE_ZLIB #if wxUSE_ZLIB
#pragma comment(lib,"wxzlibd") #pragma comment(lib,"wxzlibd")
#endif #endif
#pragma comment(lib,"wxmsw28ud_adv") #pragma comment(lib,"wxmsw28ud_adv")
#pragma comment(lib,"wxmsw28ud_core") #pragma comment(lib,"wxmsw28ud_core")
#pragma comment(lib,"wxmsw28ud_html") #pragma comment(lib,"wxmsw28ud_html")
#if wxUSE_GLCANVAS #if wxUSE_GLCANVAS
#pragma comment(lib,"wxmsw28ud_gl") #pragma comment(lib,"wxmsw28ud_gl")
#endif #endif
#if wxUSE_DEBUGREPORT #if wxUSE_DEBUGREPORT
#pragma comment(lib,"wxmsw28ud_qa") #pragma comment(lib,"wxmsw28ud_qa")
#endif #endif
#if wxUSE_XRC #if wxUSE_XRC
#pragma comment(lib,"wxmsw28ud_xrc") #pragma comment(lib,"wxmsw28ud_xrc")
#endif #endif
#if wxUSE_AUI #if wxUSE_AUI
#pragma comment(lib,"wxmsw28ud_aui") #pragma comment(lib,"wxmsw28ud_aui")
#endif #endif
#if wxUSE_RICHTEXT #if wxUSE_RICHTEXT
#pragma comment(lib,"wxmsw28ud_richtext") #pragma comment(lib,"wxmsw28ud_richtext")
#endif #endif
#if wxUSE_MEDIACTRL #if wxUSE_MEDIACTRL
#pragma comment(lib,"wxmsw28ud_media") #pragma comment(lib,"wxmsw28ud_media")
#endif #endif
#if wxUSE_ODBC #if wxUSE_ODBC
#pragma comment(lib,"wxbase28ud_odbc") #pragma comment(lib,"wxbase28ud_odbc")
#endif #endif
#endif // wxUSE_GUI #endif // wxUSE_GUI
#else // release #else // release
#pragma comment(lib,"wxbase28u") #pragma comment(lib,"wxbase28u")
#pragma comment(lib,"wxbase28u_net") #pragma comment(lib,"wxbase28u_net")
#pragma comment(lib,"wxbase28u_xml") #pragma comment(lib,"wxbase28u_xml")
#if wxUSE_REGEX #if wxUSE_REGEX
#pragma comment(lib,"wxregexu") #pragma comment(lib,"wxregexu")
#endif #endif
#if wxUSE_GUI #if wxUSE_GUI
#if wxUSE_XML #if wxUSE_XML
#pragma comment(lib,"wxexpat") #pragma comment(lib,"wxexpat")
#endif #endif
#if wxUSE_LIBJPEG #if wxUSE_LIBJPEG
#pragma comment(lib,"wxjpeg") #pragma comment(lib,"wxjpeg")
#endif #endif
#if wxUSE_LIBPNG #if wxUSE_LIBPNG
#pragma comment(lib,"wxpng") #pragma comment(lib,"wxpng")
#endif #endif
#if wxUSE_LIBTIFF #if wxUSE_LIBTIFF
#pragma comment(lib,"wxtiff") #pragma comment(lib,"wxtiff")
#endif #endif
#if wxUSE_ZLIB #if wxUSE_ZLIB
#pragma comment(lib,"wxzlib") #pragma comment(lib,"wxzlib")
#endif #endif
#pragma comment(lib,"wxmsw28u_adv") #pragma comment(lib,"wxmsw28u_adv")
#pragma comment(lib,"wxmsw28u_core") #pragma comment(lib,"wxmsw28u_core")
#pragma comment(lib,"wxmsw28u_html") #pragma comment(lib,"wxmsw28u_html")
#if wxUSE_GLCANVAS #if wxUSE_GLCANVAS
#pragma comment(lib,"wxmsw28u_gl") #pragma comment(lib,"wxmsw28u_gl")
#endif #endif
#if wxUSE_DEBUGREPORT #if wxUSE_DEBUGREPORT
#pragma comment(lib,"wxmsw28u_qa") #pragma comment(lib,"wxmsw28u_qa")
#endif #endif
#if wxUSE_XRC #if wxUSE_XRC
#pragma comment(lib,"wxmsw28u_xrc") #pragma comment(lib,"wxmsw28u_xrc")
#endif #endif
#if wxUSE_AUI #if wxUSE_AUI
#pragma comment(lib,"wxmsw28u_aui") #pragma comment(lib,"wxmsw28u_aui")
#endif #endif
#if wxUSE_RICHTEXT #if wxUSE_RICHTEXT
#pragma comment(lib,"wxmsw28u_richtext") #pragma comment(lib,"wxmsw28u_richtext")
#endif #endif
#if wxUSE_MEDIACTRL #if wxUSE_MEDIACTRL
#pragma comment(lib,"wxmsw28u_media") #pragma comment(lib,"wxmsw28u_media")
#endif #endif
#if wxUSE_ODBC #if wxUSE_ODBC
#pragma comment(lib,"wxbase28u_odbc") #pragma comment(lib,"wxbase28u_odbc")
#endif #endif
#endif // wxUSE_GUI #endif // wxUSE_GUI
#endif // debug/release #endif // debug/release
#else // !_UNICODE #else // !_UNICODE
#ifdef WXUSINGDLL #ifdef WXUSINGDLL
#ifdef _DEBUG #ifdef _DEBUG
#include "../../../lib/vc_dll/mswd/wx/setup.h" #include "../../../lib/vc_dll/mswd/wx/setup.h"
#else #else
#include "../../../lib/vc_dll/msw/wx/setup.h" #include "../../../lib/vc_dll/msw/wx/setup.h"
#endif #endif
#else // static lib #else // static lib
#ifdef _DEBUG #ifdef _DEBUG
#include "../../../lib/vc_lib/mswd/wx/setup.h" #include "../../../lib/vc_lib/mswd/wx/setup.h"
#else #else
#include "../../../lib/vc_lib/msw/wx/setup.h" #include "../../../lib/vc_lib/msw/wx/setup.h"
#endif #endif
#endif // shared/static #endif // shared/static
#ifdef _DEBUG #ifdef _DEBUG
#pragma comment(lib,"wxbase28d") #pragma comment(lib,"wxbase28d")
#pragma comment(lib,"wxbase28d_net") #pragma comment(lib,"wxbase28d_net")
#pragma comment(lib,"wxbase28d_xml") #pragma comment(lib,"wxbase28d_xml")
#if wxUSE_REGEX #if wxUSE_REGEX
#pragma comment(lib,"wxregexd") #pragma comment(lib,"wxregexd")
#endif #endif
#if wxUSE_GUI #if wxUSE_GUI
#if wxUSE_XML #if wxUSE_XML
#pragma comment(lib,"wxexpatd") #pragma comment(lib,"wxexpatd")
#endif #endif
#if wxUSE_LIBJPEG #if wxUSE_LIBJPEG
#pragma comment(lib,"wxjpegd") #pragma comment(lib,"wxjpegd")
#endif #endif
#if wxUSE_LIBPNG #if wxUSE_LIBPNG
#pragma comment(lib,"wxpngd") #pragma comment(lib,"wxpngd")
#endif #endif
#if wxUSE_LIBTIFF #if wxUSE_LIBTIFF
#pragma comment(lib,"wxtiffd") #pragma comment(lib,"wxtiffd")
#endif #endif
#if wxUSE_ZLIB #if wxUSE_ZLIB
#pragma comment(lib,"wxzlibd") #pragma comment(lib,"wxzlibd")
#endif #endif
#pragma comment(lib,"wxmsw28d_adv") #pragma comment(lib,"wxmsw28d_adv")
#pragma comment(lib,"wxmsw28d_core") #pragma comment(lib,"wxmsw28d_core")
#pragma comment(lib,"wxmsw28d_html") #pragma comment(lib,"wxmsw28d_html")
#if wxUSE_GLCANVAS #if wxUSE_GLCANVAS
#pragma comment(lib,"wxmsw28d_gl") #pragma comment(lib,"wxmsw28d_gl")
#endif #endif
#if wxUSE_DEBUGREPORT #if wxUSE_DEBUGREPORT
#pragma comment(lib,"wxmsw28d_qa") #pragma comment(lib,"wxmsw28d_qa")
#endif #endif
#if wxUSE_XRC #if wxUSE_XRC
#pragma comment(lib,"wxmsw28d_xrc") #pragma comment(lib,"wxmsw28d_xrc")
#endif #endif
#if wxUSE_AUI #if wxUSE_AUI
#pragma comment(lib,"wxmsw28d_aui") #pragma comment(lib,"wxmsw28d_aui")
#endif #endif
#if wxUSE_RICHTEXT #if wxUSE_RICHTEXT
#pragma comment(lib,"wxmsw28d_richtext") #pragma comment(lib,"wxmsw28d_richtext")
#endif #endif
#if wxUSE_MEDIACTRL #if wxUSE_MEDIACTRL
#pragma comment(lib,"wxmsw28d_media") #pragma comment(lib,"wxmsw28d_media")
#endif #endif
#if wxUSE_ODBC #if wxUSE_ODBC
#pragma comment(lib,"wxbase28d_odbc") #pragma comment(lib,"wxbase28d_odbc")
#endif #endif
#endif // wxUSE_GUI #endif // wxUSE_GUI
#else // release #else // release
#pragma comment(lib,"wxbase28") #pragma comment(lib,"wxbase28")
#pragma comment(lib,"wxbase28_net") #pragma comment(lib,"wxbase28_net")
#pragma comment(lib,"wxbase28_xml") #pragma comment(lib,"wxbase28_xml")
#if wxUSE_REGEX #if wxUSE_REGEX
#pragma comment(lib,"wxregex") #pragma comment(lib,"wxregex")
#endif #endif
#if wxUSE_GUI #if wxUSE_GUI
#if wxUSE_XML #if wxUSE_XML
#pragma comment(lib,"wxexpat") #pragma comment(lib,"wxexpat")
#endif #endif
#if wxUSE_LIBJPEG #if wxUSE_LIBJPEG
#pragma comment(lib,"wxjpeg") #pragma comment(lib,"wxjpeg")
#endif #endif
#if wxUSE_LIBPNG #if wxUSE_LIBPNG
#pragma comment(lib,"wxpng") #pragma comment(lib,"wxpng")
#endif #endif
#if wxUSE_LIBTIFF #if wxUSE_LIBTIFF
#pragma comment(lib,"wxtiff") #pragma comment(lib,"wxtiff")
#endif #endif
#if wxUSE_ZLIB #if wxUSE_ZLIB
#pragma comment(lib,"wxzlib") #pragma comment(lib,"wxzlib")
#endif #endif
#pragma comment(lib,"wxmsw28_adv") #pragma comment(lib,"wxmsw28_adv")
#pragma comment(lib,"wxmsw28_core") #pragma comment(lib,"wxmsw28_core")
#pragma comment(lib,"wxmsw28_html") #pragma comment(lib,"wxmsw28_html")
#if wxUSE_GLCANVAS #if wxUSE_GLCANVAS
#pragma comment(lib,"wxmsw28_gl") #pragma comment(lib,"wxmsw28_gl")
#endif #endif
#if wxUSE_DEBUGREPORT #if wxUSE_DEBUGREPORT
#pragma comment(lib,"wxmsw28_qa") #pragma comment(lib,"wxmsw28_qa")
#endif #endif
#if wxUSE_XRC #if wxUSE_XRC
#pragma comment(lib,"wxmsw28_xrc") #pragma comment(lib,"wxmsw28_xrc")
#endif #endif
#if wxUSE_AUI #if wxUSE_AUI
#pragma comment(lib,"wxmsw28_aui") #pragma comment(lib,"wxmsw28_aui")
#endif #endif
#if wxUSE_RICHTEXT #if wxUSE_RICHTEXT
#pragma comment(lib,"wxmsw28_richtext") #pragma comment(lib,"wxmsw28_richtext")
#endif #endif
#if wxUSE_MEDIACTRL #if wxUSE_MEDIACTRL
#pragma comment(lib,"wxmsw28_media") #pragma comment(lib,"wxmsw28_media")
#endif #endif
#if wxUSE_ODBC #if wxUSE_ODBC
#pragma comment(lib,"wxbase28_odbc") #pragma comment(lib,"wxbase28_odbc")
#endif #endif
#endif // wxUSE_GUI #endif // wxUSE_GUI
#endif // debug/release #endif // debug/release
#endif // _UNICODE/!_UNICODE #endif // _UNICODE/!_UNICODE
#else #else
#error "This file should only be included when using Microsoft Visual C++" #error "This file should only be included when using Microsoft Visual C++"
#endif #endif

View File

@@ -1,155 +1,155 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/aboutdlg.h // Name: wx/aboutdlg.h
// Purpose: declaration of wxAboutDialog class // Purpose: declaration of wxAboutDialog class
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Created: 2006-10-07 // Created: 2006-10-07
// RCS-ID: $Id: aboutdlg.h 41813 2006-10-09 16:56:18Z RD $ // RCS-ID: $Id: aboutdlg.h 41813 2006-10-09 16:56:18Z RD $
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ABOUTDLG_H_ #ifndef _WX_ABOUTDLG_H_
#define _WX_ABOUTDLG_H_ #define _WX_ABOUTDLG_H_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_ABOUTDLG #if wxUSE_ABOUTDLG
#include "wx/app.h" #include "wx/app.h"
#include "wx/icon.h" #include "wx/icon.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxAboutDialogInfo: information shown by the standard "About" dialog // wxAboutDialogInfo: information shown by the standard "About" dialog
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxAboutDialogInfo class WXDLLIMPEXP_ADV wxAboutDialogInfo
{ {
public: public:
// all fields are initially uninitialized // all fields are initially uninitialized
wxAboutDialogInfo() { } wxAboutDialogInfo() { }
// accessors for various simply fields // accessors for various simply fields
// ----------------------------------- // -----------------------------------
// name of the program, if not used defaults wxApp::GetAppName() // name of the program, if not used defaults wxApp::GetAppName()
void SetName(const wxString& name) { m_name = name; } void SetName(const wxString& name) { m_name = name; }
wxString GetName() const wxString GetName() const
{ return m_name.empty() ? wxTheApp->GetAppName() : m_name; } { return m_name.empty() ? wxTheApp->GetAppName() : m_name; }
// version of the program, in free format (but without "version" word) // version of the program, in free format (but without "version" word)
void SetVersion(const wxString& version) { m_version = version; } void SetVersion(const wxString& version) { m_version = version; }
bool HasVersion() const { return !m_version.empty(); } bool HasVersion() const { return !m_version.empty(); }
wxString GetVersion() const { return m_version; } wxString GetVersion() const { return m_version; }
// brief, but possibly multiline, description of the program // brief, but possibly multiline, description of the program
void SetDescription(const wxString& desc) { m_description = desc; } void SetDescription(const wxString& desc) { m_description = desc; }
bool HasDescription() const { return !m_description.empty(); } bool HasDescription() const { return !m_description.empty(); }
wxString GetDescription() const { return m_description; } wxString GetDescription() const { return m_description; }
// short string containing the program copyright information // short string containing the program copyright information
void SetCopyright(const wxString& copyright) { m_copyright = copyright; } void SetCopyright(const wxString& copyright) { m_copyright = copyright; }
bool HasCopyright() const { return !m_copyright.empty(); } bool HasCopyright() const { return !m_copyright.empty(); }
wxString GetCopyright() const { return m_copyright; } wxString GetCopyright() const { return m_copyright; }
// long, multiline string containing the text of the program licence // long, multiline string containing the text of the program licence
void SetLicence(const wxString& licence) { m_licence = licence; } void SetLicence(const wxString& licence) { m_licence = licence; }
void SetLicense(const wxString& licence) { m_licence = licence; } void SetLicense(const wxString& licence) { m_licence = licence; }
bool HasLicence() const { return !m_licence.empty(); } bool HasLicence() const { return !m_licence.empty(); }
wxString GetLicence() const { return m_licence; } wxString GetLicence() const { return m_licence; }
// icon to be shown in the dialog, defaults to the main frame icon // icon to be shown in the dialog, defaults to the main frame icon
void SetIcon(const wxIcon& icon) { m_icon = icon; } void SetIcon(const wxIcon& icon) { m_icon = icon; }
bool HasIcon() const { return m_icon.Ok(); } bool HasIcon() const { return m_icon.Ok(); }
wxIcon GetIcon() const; wxIcon GetIcon() const;
// web site for the program and its description (defaults to URL itself if // web site for the program and its description (defaults to URL itself if
// empty) // empty)
void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString) void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString)
{ {
m_url = url; m_url = url;
m_urlDesc = desc.empty() ? url : desc; m_urlDesc = desc.empty() ? url : desc;
} }
bool HasWebSite() const { return !m_url.empty(); } bool HasWebSite() const { return !m_url.empty(); }
wxString GetWebSiteURL() const { return m_url; } wxString GetWebSiteURL() const { return m_url; }
wxString GetWebSiteDescription() const { return m_urlDesc; } wxString GetWebSiteDescription() const { return m_urlDesc; }
// accessors for the arrays // accessors for the arrays
// ------------------------ // ------------------------
// the list of developers of the program // the list of developers of the program
void SetDevelopers(const wxArrayString& developers) void SetDevelopers(const wxArrayString& developers)
{ m_developers = developers; } { m_developers = developers; }
void AddDeveloper(const wxString& developer) void AddDeveloper(const wxString& developer)
{ m_developers.push_back(developer); } { m_developers.push_back(developer); }
bool HasDevelopers() const { return !m_developers.empty(); } bool HasDevelopers() const { return !m_developers.empty(); }
const wxArrayString& GetDevelopers() const { return m_developers; } const wxArrayString& GetDevelopers() const { return m_developers; }
// the list of documentation writers // the list of documentation writers
void SetDocWriters(const wxArrayString& docwriters) void SetDocWriters(const wxArrayString& docwriters)
{ m_docwriters = docwriters; } { m_docwriters = docwriters; }
void AddDocWriter(const wxString& docwriter) void AddDocWriter(const wxString& docwriter)
{ m_docwriters.push_back(docwriter); } { m_docwriters.push_back(docwriter); }
bool HasDocWriters() const { return !m_docwriters.empty(); } bool HasDocWriters() const { return !m_docwriters.empty(); }
const wxArrayString& GetDocWriters() const { return m_docwriters; } const wxArrayString& GetDocWriters() const { return m_docwriters; }
// the list of artists for the program art // the list of artists for the program art
void SetArtists(const wxArrayString& artists) void SetArtists(const wxArrayString& artists)
{ m_artists = artists; } { m_artists = artists; }
void AddArtist(const wxString& artist) void AddArtist(const wxString& artist)
{ m_artists.push_back(artist); } { m_artists.push_back(artist); }
bool HasArtists() const { return !m_artists.empty(); } bool HasArtists() const { return !m_artists.empty(); }
const wxArrayString& GetArtists() const { return m_artists; } const wxArrayString& GetArtists() const { return m_artists; }
// the list of translators // the list of translators
void SetTranslators(const wxArrayString& translators) void SetTranslators(const wxArrayString& translators)
{ m_translators = translators; } { m_translators = translators; }
void AddTranslator(const wxString& translator) void AddTranslator(const wxString& translator)
{ m_translators.push_back(translator); } { m_translators.push_back(translator); }
bool HasTranslators() const { return !m_translators.empty(); } bool HasTranslators() const { return !m_translators.empty(); }
const wxArrayString& GetTranslators() const { return m_translators; } const wxArrayString& GetTranslators() const { return m_translators; }
// implementation only // implementation only
// ------------------- // -------------------
// "simple" about dialog shows only textual information (with possibly // "simple" about dialog shows only textual information (with possibly
// default icon but without hyperlink nor any long texts such as the // default icon but without hyperlink nor any long texts such as the
// licence text) // licence text)
bool IsSimple() const bool IsSimple() const
{ return !HasWebSite() && !HasIcon() && !HasLicence(); } { return !HasWebSite() && !HasIcon() && !HasLicence(); }
// get the description and credits (i.e. all of developers, doc writers, // get the description and credits (i.e. all of developers, doc writers,
// artists and translators) as a one long multiline string // artists and translators) as a one long multiline string
wxString GetDescriptionAndCredits() const; wxString GetDescriptionAndCredits() const;
private: private:
wxString m_name, wxString m_name,
m_version, m_version,
m_description, m_description,
m_copyright, m_copyright,
m_licence; m_licence;
wxIcon m_icon; wxIcon m_icon;
wxString m_url, wxString m_url,
m_urlDesc; m_urlDesc;
wxArrayString m_developers, wxArrayString m_developers,
m_docwriters, m_docwriters,
m_artists, m_artists,
m_translators; m_translators;
}; };
// functions to show the about dialog box // functions to show the about dialog box
WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info); WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info);
#endif // wxUSE_ABOUTDLG #endif // wxUSE_ABOUTDLG
#endif // _WX_ABOUTDLG_H_ #endif // _WX_ABOUTDLG_H_

View File

@@ -1,171 +1,171 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/accel.h // Name: wx/accel.h
// Purpose: wxAcceleratorEntry and wxAcceleratorTable classes // Purpose: wxAcceleratorEntry and wxAcceleratorTable classes
// Author: Julian Smart, Robert Roebling, Vadim Zeitlin // Author: Julian Smart, Robert Roebling, Vadim Zeitlin
// Modified by: // Modified by:
// Created: 31.05.01 (extracted from other files) // Created: 31.05.01 (extracted from other files)
// RCS-ID: $Id: accel.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: accel.h 53135 2008-04-12 02:31:04Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ACCEL_H_BASE_ #ifndef _WX_ACCEL_H_BASE_
#define _WX_ACCEL_H_BASE_ #define _WX_ACCEL_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_ACCEL #if wxUSE_ACCEL
#include "wx/object.h" #include "wx/object.h"
class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable; class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
class WXDLLIMPEXP_FWD_CORE wxMenuItem; class WXDLLIMPEXP_FWD_CORE wxMenuItem;
class WXDLLIMPEXP_FWD_CORE wxKeyEvent; class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxAcceleratorEntry flags // wxAcceleratorEntry flags
enum enum
{ {
wxACCEL_NORMAL = 0x0000, // no modifiers wxACCEL_NORMAL = 0x0000, // no modifiers
wxACCEL_ALT = 0x0001, // hold Alt key down wxACCEL_ALT = 0x0001, // hold Alt key down
wxACCEL_CTRL = 0x0002, // hold Ctrl key down wxACCEL_CTRL = 0x0002, // hold Ctrl key down
wxACCEL_SHIFT = 0x0004, // hold Shift key down wxACCEL_SHIFT = 0x0004, // hold Shift key down
#if defined(__WXMAC__) || defined(__WXCOCOA__) #if defined(__WXMAC__) || defined(__WXCOCOA__)
wxACCEL_CMD = 0x0008 // Command key on OS X wxACCEL_CMD = 0x0008 // Command key on OS X
#else #else
wxACCEL_CMD = wxACCEL_CTRL wxACCEL_CMD = wxACCEL_CTRL
#endif #endif
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// an entry in wxAcceleratorTable corresponds to one accelerator // an entry in wxAcceleratorTable corresponds to one accelerator
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxAcceleratorEntry class WXDLLEXPORT wxAcceleratorEntry
{ {
public: public:
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0, wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
wxMenuItem *item = NULL) wxMenuItem *item = NULL)
: m_flags(flags) : m_flags(flags)
, m_keyCode(keyCode) , m_keyCode(keyCode)
, m_command(cmd) , m_command(cmd)
, m_item(item) , m_item(item)
{ } { }
wxAcceleratorEntry(const wxAcceleratorEntry& entry) wxAcceleratorEntry(const wxAcceleratorEntry& entry)
: m_flags(entry.m_flags) : m_flags(entry.m_flags)
, m_keyCode(entry.m_keyCode) , m_keyCode(entry.m_keyCode)
, m_command(entry.m_command) , m_command(entry.m_command)
, m_item(entry.m_item) , m_item(entry.m_item)
{ } { }
// create accelerator corresponding to the specified string, return NULL if // create accelerator corresponding to the specified string, return NULL if
// string couldn't be parsed or a pointer to be deleted by the caller // string couldn't be parsed or a pointer to be deleted by the caller
static wxAcceleratorEntry *Create(const wxString& str); static wxAcceleratorEntry *Create(const wxString& str);
wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry) wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
{ {
Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item); Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
return *this; return *this;
} }
void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL) void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
{ {
m_flags = flags; m_flags = flags;
m_keyCode = keyCode; m_keyCode = keyCode;
m_command = cmd; m_command = cmd;
m_item = item; m_item = item;
} }
void SetMenuItem(wxMenuItem *item) { m_item = item; } void SetMenuItem(wxMenuItem *item) { m_item = item; }
int GetFlags() const { return m_flags; } int GetFlags() const { return m_flags; }
int GetKeyCode() const { return m_keyCode; } int GetKeyCode() const { return m_keyCode; }
int GetCommand() const { return m_command; } int GetCommand() const { return m_command; }
wxMenuItem *GetMenuItem() const { return m_item; } wxMenuItem *GetMenuItem() const { return m_item; }
bool operator==(const wxAcceleratorEntry& entry) const bool operator==(const wxAcceleratorEntry& entry) const
{ {
return m_flags == entry.m_flags && return m_flags == entry.m_flags &&
m_keyCode == entry.m_keyCode && m_keyCode == entry.m_keyCode &&
m_command == entry.m_command && m_command == entry.m_command &&
m_item == entry.m_item; m_item == entry.m_item;
} }
bool operator!=(const wxAcceleratorEntry& entry) const bool operator!=(const wxAcceleratorEntry& entry) const
{ return !(*this == entry); } { return !(*this == entry); }
#if defined(__WXMOTIF__) #if defined(__WXMOTIF__)
// Implementation use only // Implementation use only
bool MatchesEvent(const wxKeyEvent& event) const; bool MatchesEvent(const wxKeyEvent& event) const;
#endif #endif
bool IsOk() const bool IsOk() const
{ {
return m_flags != 0 && return m_flags != 0 &&
m_keyCode != 0; m_keyCode != 0;
} }
// string <-> wxAcceleratorEntry conversion // string <-> wxAcceleratorEntry conversion
// ---------------------------------------- // ----------------------------------------
// returns a wxString for the this accelerator. // returns a wxString for the this accelerator.
// this function formats it using the <flags>-<keycode> format // this function formats it using the <flags>-<keycode> format
// where <flags> maybe a hyphen-separed list of "shift|alt|ctrl" // where <flags> maybe a hyphen-separed list of "shift|alt|ctrl"
wxString ToString() const; wxString ToString() const;
// returns true if the given string correctly initialized this object // returns true if the given string correctly initialized this object
// (i.e. if IsOk() returns true after this call) // (i.e. if IsOk() returns true after this call)
bool FromString(const wxString& str); bool FromString(const wxString& str);
private: private:
// common part of Create() and FromString() // common part of Create() and FromString()
static bool ParseAccel(const wxString& str, int *flags, int *keycode); static bool ParseAccel(const wxString& str, int *flags, int *keycode);
int m_flags; // combination of wxACCEL_XXX constants int m_flags; // combination of wxACCEL_XXX constants
int m_keyCode; // ASCII or virtual keycode int m_keyCode; // ASCII or virtual keycode
int m_command; // Command id to generate int m_command; // Command id to generate
// the menu item this entry corresponds to, may be NULL // the menu item this entry corresponds to, may be NULL
wxMenuItem *m_item; wxMenuItem *m_item;
// for compatibility with old code, use accessors now! // for compatibility with old code, use accessors now!
friend class WXDLLIMPEXP_FWD_CORE wxMenu; friend class WXDLLIMPEXP_FWD_CORE wxMenu;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// include wxAcceleratorTable class declaration, it is only used by the library // include wxAcceleratorTable class declaration, it is only used by the library
// and so doesn't have any published user visible interface // and so doesn't have any published user visible interface
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/generic/accel.h" #include "wx/generic/accel.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/accel.h" #include "wx/msw/accel.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/accel.h" #include "wx/motif/accel.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/accel.h" #include "wx/gtk/accel.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/accel.h" #include "wx/gtk1/accel.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/accel.h" #include "wx/mac/accel.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/generic/accel.h" #include "wx/generic/accel.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/accel.h" #include "wx/os2/accel.h"
#endif #endif
extern WXDLLEXPORT_DATA(wxAcceleratorTable) wxNullAcceleratorTable; extern WXDLLEXPORT_DATA(wxAcceleratorTable) wxNullAcceleratorTable;
#endif // wxUSE_ACCEL #endif // wxUSE_ACCEL
#endif #endif
// _WX_ACCEL_H_BASE_ // _WX_ACCEL_H_BASE_

View File

@@ -1,377 +1,377 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/access.h // Name: wx/access.h
// Purpose: Accessibility classes // Purpose: Accessibility classes
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 2003-02-12 // Created: 2003-02-12
// RCS-ID: $Id: access.h 51246 2008-01-16 12:56:37Z VZ $ // RCS-ID: $Id: access.h 51246 2008-01-16 12:56:37Z VZ $
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ACCESSBASE_H_ #ifndef _WX_ACCESSBASE_H_
#define _WX_ACCESSBASE_H_ #define _WX_ACCESSBASE_H_
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers we have to include here // headers we have to include here
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_ACCESSIBILITY #if wxUSE_ACCESSIBILITY
#include "wx/variant.h" #include "wx/variant.h"
typedef enum typedef enum
{ {
wxACC_FAIL, wxACC_FAIL,
wxACC_FALSE, wxACC_FALSE,
wxACC_OK, wxACC_OK,
wxACC_NOT_IMPLEMENTED, wxACC_NOT_IMPLEMENTED,
wxACC_NOT_SUPPORTED wxACC_NOT_SUPPORTED
} wxAccStatus; } wxAccStatus;
// Child ids are integer identifiers from 1 up. // Child ids are integer identifiers from 1 up.
// So zero represents 'this' object. // So zero represents 'this' object.
#define wxACC_SELF 0 #define wxACC_SELF 0
// Navigation constants // Navigation constants
typedef enum typedef enum
{ {
wxNAVDIR_DOWN, wxNAVDIR_DOWN,
wxNAVDIR_FIRSTCHILD, wxNAVDIR_FIRSTCHILD,
wxNAVDIR_LASTCHILD, wxNAVDIR_LASTCHILD,
wxNAVDIR_LEFT, wxNAVDIR_LEFT,
wxNAVDIR_NEXT, wxNAVDIR_NEXT,
wxNAVDIR_PREVIOUS, wxNAVDIR_PREVIOUS,
wxNAVDIR_RIGHT, wxNAVDIR_RIGHT,
wxNAVDIR_UP wxNAVDIR_UP
} wxNavDir; } wxNavDir;
// Role constants // Role constants
typedef enum { typedef enum {
wxROLE_NONE, wxROLE_NONE,
wxROLE_SYSTEM_ALERT, wxROLE_SYSTEM_ALERT,
wxROLE_SYSTEM_ANIMATION, wxROLE_SYSTEM_ANIMATION,
wxROLE_SYSTEM_APPLICATION, wxROLE_SYSTEM_APPLICATION,
wxROLE_SYSTEM_BORDER, wxROLE_SYSTEM_BORDER,
wxROLE_SYSTEM_BUTTONDROPDOWN, wxROLE_SYSTEM_BUTTONDROPDOWN,
wxROLE_SYSTEM_BUTTONDROPDOWNGRID, wxROLE_SYSTEM_BUTTONDROPDOWNGRID,
wxROLE_SYSTEM_BUTTONMENU, wxROLE_SYSTEM_BUTTONMENU,
wxROLE_SYSTEM_CARET, wxROLE_SYSTEM_CARET,
wxROLE_SYSTEM_CELL, wxROLE_SYSTEM_CELL,
wxROLE_SYSTEM_CHARACTER, wxROLE_SYSTEM_CHARACTER,
wxROLE_SYSTEM_CHART, wxROLE_SYSTEM_CHART,
wxROLE_SYSTEM_CHECKBUTTON, wxROLE_SYSTEM_CHECKBUTTON,
wxROLE_SYSTEM_CLIENT, wxROLE_SYSTEM_CLIENT,
wxROLE_SYSTEM_CLOCK, wxROLE_SYSTEM_CLOCK,
wxROLE_SYSTEM_COLUMN, wxROLE_SYSTEM_COLUMN,
wxROLE_SYSTEM_COLUMNHEADER, wxROLE_SYSTEM_COLUMNHEADER,
wxROLE_SYSTEM_COMBOBOX, wxROLE_SYSTEM_COMBOBOX,
wxROLE_SYSTEM_CURSOR, wxROLE_SYSTEM_CURSOR,
wxROLE_SYSTEM_DIAGRAM, wxROLE_SYSTEM_DIAGRAM,
wxROLE_SYSTEM_DIAL, wxROLE_SYSTEM_DIAL,
wxROLE_SYSTEM_DIALOG, wxROLE_SYSTEM_DIALOG,
wxROLE_SYSTEM_DOCUMENT, wxROLE_SYSTEM_DOCUMENT,
wxROLE_SYSTEM_DROPLIST, wxROLE_SYSTEM_DROPLIST,
wxROLE_SYSTEM_EQUATION, wxROLE_SYSTEM_EQUATION,
wxROLE_SYSTEM_GRAPHIC, wxROLE_SYSTEM_GRAPHIC,
wxROLE_SYSTEM_GRIP, wxROLE_SYSTEM_GRIP,
wxROLE_SYSTEM_GROUPING, wxROLE_SYSTEM_GROUPING,
wxROLE_SYSTEM_HELPBALLOON, wxROLE_SYSTEM_HELPBALLOON,
wxROLE_SYSTEM_HOTKEYFIELD, wxROLE_SYSTEM_HOTKEYFIELD,
wxROLE_SYSTEM_INDICATOR, wxROLE_SYSTEM_INDICATOR,
wxROLE_SYSTEM_LINK, wxROLE_SYSTEM_LINK,
wxROLE_SYSTEM_LIST, wxROLE_SYSTEM_LIST,
wxROLE_SYSTEM_LISTITEM, wxROLE_SYSTEM_LISTITEM,
wxROLE_SYSTEM_MENUBAR, wxROLE_SYSTEM_MENUBAR,
wxROLE_SYSTEM_MENUITEM, wxROLE_SYSTEM_MENUITEM,
wxROLE_SYSTEM_MENUPOPUP, wxROLE_SYSTEM_MENUPOPUP,
wxROLE_SYSTEM_OUTLINE, wxROLE_SYSTEM_OUTLINE,
wxROLE_SYSTEM_OUTLINEITEM, wxROLE_SYSTEM_OUTLINEITEM,
wxROLE_SYSTEM_PAGETAB, wxROLE_SYSTEM_PAGETAB,
wxROLE_SYSTEM_PAGETABLIST, wxROLE_SYSTEM_PAGETABLIST,
wxROLE_SYSTEM_PANE, wxROLE_SYSTEM_PANE,
wxROLE_SYSTEM_PROGRESSBAR, wxROLE_SYSTEM_PROGRESSBAR,
wxROLE_SYSTEM_PROPERTYPAGE, wxROLE_SYSTEM_PROPERTYPAGE,
wxROLE_SYSTEM_PUSHBUTTON, wxROLE_SYSTEM_PUSHBUTTON,
wxROLE_SYSTEM_RADIOBUTTON, wxROLE_SYSTEM_RADIOBUTTON,
wxROLE_SYSTEM_ROW, wxROLE_SYSTEM_ROW,
wxROLE_SYSTEM_ROWHEADER, wxROLE_SYSTEM_ROWHEADER,
wxROLE_SYSTEM_SCROLLBAR, wxROLE_SYSTEM_SCROLLBAR,
wxROLE_SYSTEM_SEPARATOR, wxROLE_SYSTEM_SEPARATOR,
wxROLE_SYSTEM_SLIDER, wxROLE_SYSTEM_SLIDER,
wxROLE_SYSTEM_SOUND, wxROLE_SYSTEM_SOUND,
wxROLE_SYSTEM_SPINBUTTON, wxROLE_SYSTEM_SPINBUTTON,
wxROLE_SYSTEM_STATICTEXT, wxROLE_SYSTEM_STATICTEXT,
wxROLE_SYSTEM_STATUSBAR, wxROLE_SYSTEM_STATUSBAR,
wxROLE_SYSTEM_TABLE, wxROLE_SYSTEM_TABLE,
wxROLE_SYSTEM_TEXT, wxROLE_SYSTEM_TEXT,
wxROLE_SYSTEM_TITLEBAR, wxROLE_SYSTEM_TITLEBAR,
wxROLE_SYSTEM_TOOLBAR, wxROLE_SYSTEM_TOOLBAR,
wxROLE_SYSTEM_TOOLTIP, wxROLE_SYSTEM_TOOLTIP,
wxROLE_SYSTEM_WHITESPACE, wxROLE_SYSTEM_WHITESPACE,
wxROLE_SYSTEM_WINDOW wxROLE_SYSTEM_WINDOW
} wxAccRole; } wxAccRole;
// Object types // Object types
typedef enum { typedef enum {
wxOBJID_WINDOW = 0x00000000, wxOBJID_WINDOW = 0x00000000,
wxOBJID_SYSMENU = 0xFFFFFFFF, wxOBJID_SYSMENU = 0xFFFFFFFF,
wxOBJID_TITLEBAR = 0xFFFFFFFE, wxOBJID_TITLEBAR = 0xFFFFFFFE,
wxOBJID_MENU = 0xFFFFFFFD, wxOBJID_MENU = 0xFFFFFFFD,
wxOBJID_CLIENT = 0xFFFFFFFC, wxOBJID_CLIENT = 0xFFFFFFFC,
wxOBJID_VSCROLL = 0xFFFFFFFB, wxOBJID_VSCROLL = 0xFFFFFFFB,
wxOBJID_HSCROLL = 0xFFFFFFFA, wxOBJID_HSCROLL = 0xFFFFFFFA,
wxOBJID_SIZEGRIP = 0xFFFFFFF9, wxOBJID_SIZEGRIP = 0xFFFFFFF9,
wxOBJID_CARET = 0xFFFFFFF8, wxOBJID_CARET = 0xFFFFFFF8,
wxOBJID_CURSOR = 0xFFFFFFF7, wxOBJID_CURSOR = 0xFFFFFFF7,
wxOBJID_ALERT = 0xFFFFFFF6, wxOBJID_ALERT = 0xFFFFFFF6,
wxOBJID_SOUND = 0xFFFFFFF5 wxOBJID_SOUND = 0xFFFFFFF5
} wxAccObject; } wxAccObject;
// Accessible states // Accessible states
#define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001 #define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001
#define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002 #define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002
#define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004 #define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004
#define wxACC_STATE_SYSTEM_ANIMATED 0x00000008 #define wxACC_STATE_SYSTEM_ANIMATED 0x00000008
#define wxACC_STATE_SYSTEM_BUSY 0x00000010 #define wxACC_STATE_SYSTEM_BUSY 0x00000010
#define wxACC_STATE_SYSTEM_CHECKED 0x00000020 #define wxACC_STATE_SYSTEM_CHECKED 0x00000020
#define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040 #define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040
#define wxACC_STATE_SYSTEM_DEFAULT 0x00000080 #define wxACC_STATE_SYSTEM_DEFAULT 0x00000080
#define wxACC_STATE_SYSTEM_EXPANDED 0x00000100 #define wxACC_STATE_SYSTEM_EXPANDED 0x00000100
#define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200 #define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200
#define wxACC_STATE_SYSTEM_FLOATING 0x00000400 #define wxACC_STATE_SYSTEM_FLOATING 0x00000400
#define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800 #define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800
#define wxACC_STATE_SYSTEM_FOCUSED 0x00001000 #define wxACC_STATE_SYSTEM_FOCUSED 0x00001000
#define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000 #define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000
#define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000 #define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000
#define wxACC_STATE_SYSTEM_MARQUEED 0x00008000 #define wxACC_STATE_SYSTEM_MARQUEED 0x00008000
#define wxACC_STATE_SYSTEM_MIXED 0x00010000 #define wxACC_STATE_SYSTEM_MIXED 0x00010000
#define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000 #define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000
#define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000 #define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000
#define wxACC_STATE_SYSTEM_PRESSED 0x00080000 #define wxACC_STATE_SYSTEM_PRESSED 0x00080000
#define wxACC_STATE_SYSTEM_PROTECTED 0x00100000 #define wxACC_STATE_SYSTEM_PROTECTED 0x00100000
#define wxACC_STATE_SYSTEM_READONLY 0x00200000 #define wxACC_STATE_SYSTEM_READONLY 0x00200000
#define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000 #define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000
#define wxACC_STATE_SYSTEM_SELECTED 0x00800000 #define wxACC_STATE_SYSTEM_SELECTED 0x00800000
#define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000 #define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000
#define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000 #define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000
// Selection flag // Selection flag
typedef enum typedef enum
{ {
wxACC_SEL_NONE = 0, wxACC_SEL_NONE = 0,
wxACC_SEL_TAKEFOCUS = 1, wxACC_SEL_TAKEFOCUS = 1,
wxACC_SEL_TAKESELECTION = 2, wxACC_SEL_TAKESELECTION = 2,
wxACC_SEL_EXTENDSELECTION = 4, wxACC_SEL_EXTENDSELECTION = 4,
wxACC_SEL_ADDSELECTION = 8, wxACC_SEL_ADDSELECTION = 8,
wxACC_SEL_REMOVESELECTION = 16 wxACC_SEL_REMOVESELECTION = 16
} wxAccSelectionFlags; } wxAccSelectionFlags;
// Accessibility event identifiers // Accessibility event identifiers
#define wxACC_EVENT_SYSTEM_SOUND 0x0001 #define wxACC_EVENT_SYSTEM_SOUND 0x0001
#define wxACC_EVENT_SYSTEM_ALERT 0x0002 #define wxACC_EVENT_SYSTEM_ALERT 0x0002
#define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003 #define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003
#define wxACC_EVENT_SYSTEM_MENUSTART 0x0004 #define wxACC_EVENT_SYSTEM_MENUSTART 0x0004
#define wxACC_EVENT_SYSTEM_MENUEND 0x0005 #define wxACC_EVENT_SYSTEM_MENUEND 0x0005
#define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006 #define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006
#define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007 #define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007
#define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008 #define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008
#define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009 #define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009
#define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A #define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A
#define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B #define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B
#define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C #define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
#define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D #define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D
#define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E #define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E
#define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F #define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F
#define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010 #define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010
#define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011 #define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011
#define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012 #define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012
#define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013 #define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013
#define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014 #define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014
#define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015 #define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015
#define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016 #define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016
#define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017 #define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017
#define wxACC_EVENT_OBJECT_CREATE 0x8000 #define wxACC_EVENT_OBJECT_CREATE 0x8000
#define wxACC_EVENT_OBJECT_DESTROY 0x8001 #define wxACC_EVENT_OBJECT_DESTROY 0x8001
#define wxACC_EVENT_OBJECT_SHOW 0x8002 #define wxACC_EVENT_OBJECT_SHOW 0x8002
#define wxACC_EVENT_OBJECT_HIDE 0x8003 #define wxACC_EVENT_OBJECT_HIDE 0x8003
#define wxACC_EVENT_OBJECT_REORDER 0x8004 #define wxACC_EVENT_OBJECT_REORDER 0x8004
#define wxACC_EVENT_OBJECT_FOCUS 0x8005 #define wxACC_EVENT_OBJECT_FOCUS 0x8005
#define wxACC_EVENT_OBJECT_SELECTION 0x8006 #define wxACC_EVENT_OBJECT_SELECTION 0x8006
#define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007 #define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007
#define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008 #define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008
#define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009 #define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009
#define wxACC_EVENT_OBJECT_STATECHANGE 0x800A #define wxACC_EVENT_OBJECT_STATECHANGE 0x800A
#define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B #define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B
#define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C #define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C
#define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D #define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
#define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E #define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E
#define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F #define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F
#define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010 #define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010
#define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011 #define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011
#define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012 #define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxAccessible // wxAccessible
// All functions return an indication of success, failure, or not implemented. // All functions return an indication of success, failure, or not implemented.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxAccessible; class WXDLLIMPEXP_FWD_CORE wxAccessible;
class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxPoint; class WXDLLIMPEXP_FWD_CORE wxPoint;
class WXDLLIMPEXP_FWD_CORE wxRect; class WXDLLIMPEXP_FWD_CORE wxRect;
class WXDLLEXPORT wxAccessibleBase : public wxObject class WXDLLEXPORT wxAccessibleBase : public wxObject
{ {
DECLARE_NO_COPY_CLASS(wxAccessibleBase) DECLARE_NO_COPY_CLASS(wxAccessibleBase)
public: public:
wxAccessibleBase(wxWindow* win): m_window(win) {} wxAccessibleBase(wxWindow* win): m_window(win) {}
virtual ~wxAccessibleBase() {} virtual ~wxAccessibleBase() {}
// Overridables // Overridables
// Can return either a child object, or an integer // Can return either a child object, or an integer
// representing the child element, starting from 1. // representing the child element, starting from 1.
// pt is in screen coordinates. // pt is in screen coordinates.
virtual wxAccStatus HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject)) virtual wxAccStatus HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Returns the rectangle for this object (id = 0) or a child element (id > 0). // Returns the rectangle for this object (id = 0) or a child element (id > 0).
// rect is in screen coordinates. // rect is in screen coordinates.
virtual wxAccStatus GetLocation(wxRect& WXUNUSED(rect), int WXUNUSED(elementId)) virtual wxAccStatus GetLocation(wxRect& WXUNUSED(rect), int WXUNUSED(elementId))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Navigates from fromId to toId/toObject. // Navigates from fromId to toId/toObject.
virtual wxAccStatus Navigate(wxNavDir WXUNUSED(navDir), int WXUNUSED(fromId), virtual wxAccStatus Navigate(wxNavDir WXUNUSED(navDir), int WXUNUSED(fromId),
int* WXUNUSED(toId), wxAccessible** WXUNUSED(toObject)) int* WXUNUSED(toId), wxAccessible** WXUNUSED(toObject))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Gets the name of the specified object. // Gets the name of the specified object.
virtual wxAccStatus GetName(int WXUNUSED(childId), wxString* WXUNUSED(name)) virtual wxAccStatus GetName(int WXUNUSED(childId), wxString* WXUNUSED(name))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Gets the number of children. // Gets the number of children.
virtual wxAccStatus GetChildCount(int* WXUNUSED(childCount)) virtual wxAccStatus GetChildCount(int* WXUNUSED(childCount))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Gets the specified child (starting from 1). // Gets the specified child (starting from 1).
// If *child is NULL and return value is wxACC_OK, // If *child is NULL and return value is wxACC_OK,
// this means that the child is a simple element and // this means that the child is a simple element and
// not an accessible object. // not an accessible object.
virtual wxAccStatus GetChild(int WXUNUSED(childId), wxAccessible** WXUNUSED(child)) virtual wxAccStatus GetChild(int WXUNUSED(childId), wxAccessible** WXUNUSED(child))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Gets the parent, or NULL. // Gets the parent, or NULL.
virtual wxAccStatus GetParent(wxAccessible** WXUNUSED(parent)) virtual wxAccStatus GetParent(wxAccessible** WXUNUSED(parent))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Performs the default action. childId is 0 (the action for this object) // Performs the default action. childId is 0 (the action for this object)
// or > 0 (the action for a child). // or > 0 (the action for a child).
// Return wxACC_NOT_SUPPORTED if there is no default action for this // Return wxACC_NOT_SUPPORTED if there is no default action for this
// window (e.g. an edit control). // window (e.g. an edit control).
virtual wxAccStatus DoDefaultAction(int WXUNUSED(childId)) virtual wxAccStatus DoDefaultAction(int WXUNUSED(childId))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Gets the default action for this object (0) or > 0 (the action for a child). // Gets the default action for this object (0) or > 0 (the action for a child).
// Return wxACC_OK even if there is no action. actionName is the action, or the empty // Return wxACC_OK even if there is no action. actionName is the action, or the empty
// string if there is no action. // string if there is no action.
// The retrieved string describes the action that is performed on an object, // The retrieved string describes the action that is performed on an object,
// not what the object does as a result. For example, a toolbar button that prints // not what the object does as a result. For example, a toolbar button that prints
// a document has a default action of "Press" rather than "Prints the current document." // a document has a default action of "Press" rather than "Prints the current document."
virtual wxAccStatus GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName)) virtual wxAccStatus GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Returns the description for this object or a child. // Returns the description for this object or a child.
virtual wxAccStatus GetDescription(int WXUNUSED(childId), wxString* WXUNUSED(description)) virtual wxAccStatus GetDescription(int WXUNUSED(childId), wxString* WXUNUSED(description))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Returns help text for this object or a child, similar to tooltip text. // Returns help text for this object or a child, similar to tooltip text.
virtual wxAccStatus GetHelpText(int WXUNUSED(childId), wxString* WXUNUSED(helpText)) virtual wxAccStatus GetHelpText(int WXUNUSED(childId), wxString* WXUNUSED(helpText))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Returns the keyboard shortcut for this object or child. // Returns the keyboard shortcut for this object or child.
// Return e.g. ALT+K // Return e.g. ALT+K
virtual wxAccStatus GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut)) virtual wxAccStatus GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Returns a role constant. // Returns a role constant.
virtual wxAccStatus GetRole(int WXUNUSED(childId), wxAccRole* WXUNUSED(role)) virtual wxAccStatus GetRole(int WXUNUSED(childId), wxAccRole* WXUNUSED(role))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Returns a state constant. // Returns a state constant.
virtual wxAccStatus GetState(int WXUNUSED(childId), long* WXUNUSED(state)) virtual wxAccStatus GetState(int WXUNUSED(childId), long* WXUNUSED(state))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Returns a localized string representing the value for the object // Returns a localized string representing the value for the object
// or child. // or child.
virtual wxAccStatus GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue)) virtual wxAccStatus GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Selects the object or child. // Selects the object or child.
virtual wxAccStatus Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags)) virtual wxAccStatus Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
// Gets the window with the keyboard focus. // Gets the window with the keyboard focus.
// If childId is 0 and child is NULL, no object in // If childId is 0 and child is NULL, no object in
// this subhierarchy has the focus. // this subhierarchy has the focus.
// If this object has the focus, child should be 'this'. // If this object has the focus, child should be 'this'.
virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child)) virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
#if wxUSE_VARIANT #if wxUSE_VARIANT
// Gets a variant representing the selected children // Gets a variant representing the selected children
// of this object. // of this object.
// Acceptable values: // Acceptable values:
// - a null variant (IsNull() returns TRUE) // - a null variant (IsNull() returns TRUE)
// - a list variant (GetType() == wxT("list")) // - a list variant (GetType() == wxT("list"))
// - an integer representing the selected child element, // - an integer representing the selected child element,
// or 0 if this object is selected (GetType() == wxT("long")) // or 0 if this object is selected (GetType() == wxT("long"))
// - a "void*" pointer to a wxAccessible child object // - a "void*" pointer to a wxAccessible child object
virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections)) virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections))
{ return wxACC_NOT_IMPLEMENTED; } { return wxACC_NOT_IMPLEMENTED; }
#endif // wxUSE_VARIANT #endif // wxUSE_VARIANT
// Accessors // Accessors
// Returns the window associated with this object. // Returns the window associated with this object.
wxWindow* GetWindow() { return m_window; } wxWindow* GetWindow() { return m_window; }
// Sets the window associated with this object. // Sets the window associated with this object.
void SetWindow(wxWindow* window) { m_window = window; } void SetWindow(wxWindow* window) { m_window = window; }
// Operations // Operations
// Each platform's implementation must define this // Each platform's implementation must define this
// static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType, // static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType,
// int objectId); // int objectId);
private: private:
// Data members // Data members
wxWindow* m_window; wxWindow* m_window;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// now include the declaration of the real class // now include the declaration of the real class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/ole/access.h" #include "wx/msw/ole/access.h"
#endif #endif
#endif // wxUSE_ACCESSIBILITY #endif // wxUSE_ACCESSIBILITY
#endif // _WX_ACCESSBASE_H_ #endif // _WX_ACCESSBASE_H_

View File

@@ -1,48 +1,48 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: include/wx/afterstd.h // Name: include/wx/afterstd.h
// Purpose: #include after STL headers // Purpose: #include after STL headers
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 07/07/03 // Created: 07/07/03
// RCS-ID: $Id: afterstd.h 42906 2006-11-01 14:16:42Z VZ $ // RCS-ID: $Id: afterstd.h 42906 2006-11-01 14:16:42Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/** /**
See the comments in beforestd.h. See the comments in beforestd.h.
*/ */
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/winundef.h" #include "wx/msw/winundef.h"
#endif #endif
// undo what we did in wx/beforestd.h // undo what we did in wx/beforestd.h
#if defined(__VISUALC__) && __VISUALC__ <= 1201 #if defined(__VISUALC__) && __VISUALC__ <= 1201
// MSVC 5 does not have this // MSVC 5 does not have this
#if _MSC_VER > 1100 #if _MSC_VER > 1100
// don't restore this one for VC6, it gives it in each try/catch which is a // don't restore this one for VC6, it gives it in each try/catch which is a
// bit annoying to say the least // bit annoying to say the least
#if _MSC_VER >= 0x1300 #if _MSC_VER >= 0x1300
// unreachable code // unreachable code
#pragma warning(default:4702) #pragma warning(default:4702)
#endif // VC++ >= 7 #endif // VC++ >= 7
#pragma warning(pop) #pragma warning(pop)
#else #else
// 'expression' : signed/unsigned mismatch // 'expression' : signed/unsigned mismatch
#pragma warning(default:4018) #pragma warning(default:4018)
// 'identifier' : unreferenced formal parameter // 'identifier' : unreferenced formal parameter
#pragma warning(default:4100) #pragma warning(default:4100)
// 'conversion' : conversion from 'type1' to 'type2', // 'conversion' : conversion from 'type1' to 'type2',
// possible loss of data // possible loss of data
#pragma warning(default:4244) #pragma warning(default:4244)
// C++ language change: to explicitly specialize class template // C++ language change: to explicitly specialize class template
// 'identifier' use the following syntax // 'identifier' use the following syntax
#pragma warning(default:4663) #pragma warning(default:4663)
#endif #endif
#endif #endif

View File

@@ -1,77 +1,77 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/anidecod.h // Name: wx/anidecod.h
// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation // Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
// Author: Francesco Montorsi // Author: Francesco Montorsi
// CVS-ID: $Id: anidecod.h 45563 2007-04-21 18:17:50Z VZ $ // CVS-ID: $Id: anidecod.h 45563 2007-04-21 18:17:50Z VZ $
// Copyright: (c) 2006 Francesco Montorsi // Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ANIDECOD_H #ifndef _WX_ANIDECOD_H
#define _WX_ANIDECOD_H #define _WX_ANIDECOD_H
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_STREAMS && wxUSE_ICO_CUR #if wxUSE_STREAMS && wxUSE_ICO_CUR
#include "wx/stream.h" #include "wx/stream.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/animdecod.h" #include "wx/animdecod.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
class /*WXDLLEXPORT*/ wxANIFrameInfo; class /*WXDLLEXPORT*/ wxANIFrameInfo;
WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray); WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray); WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// wxANIDecoder class // wxANIDecoder class
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder
{ {
public: public:
// constructor, destructor, etc. // constructor, destructor, etc.
wxANIDecoder(); wxANIDecoder();
~wxANIDecoder(); ~wxANIDecoder();
virtual wxSize GetFrameSize(unsigned int frame) const; virtual wxSize GetFrameSize(unsigned int frame) const;
virtual wxPoint GetFramePosition(unsigned int frame) const; virtual wxPoint GetFramePosition(unsigned int frame) const;
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const; virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
virtual long GetDelay(unsigned int frame) const; virtual long GetDelay(unsigned int frame) const;
virtual wxColour GetTransparentColour(unsigned int frame) const; virtual wxColour GetTransparentColour(unsigned int frame) const;
// implementation of wxAnimationDecoder's pure virtuals // implementation of wxAnimationDecoder's pure virtuals
virtual bool CanRead( wxInputStream& stream ) const; virtual bool CanRead( wxInputStream& stream ) const;
virtual bool Load( wxInputStream& stream ); virtual bool Load( wxInputStream& stream );
bool ConvertToImage(unsigned int frame, wxImage *image) const; bool ConvertToImage(unsigned int frame, wxImage *image) const;
wxAnimationDecoder *Clone() const wxAnimationDecoder *Clone() const
{ return new wxANIDecoder; } { return new wxANIDecoder; }
wxAnimationType GetType() const wxAnimationType GetType() const
{ return wxANIMATION_TYPE_ANI; } { return wxANIMATION_TYPE_ANI; }
private: private:
// frames stored as wxImage(s): ANI files are meant to be used mostly for animated // frames stored as wxImage(s): ANI files are meant to be used mostly for animated
// cursors and thus they do not use any optimization to encode differences between // cursors and thus they do not use any optimization to encode differences between
// two frames: they are just a list of images to display sequentially. // two frames: they are just a list of images to display sequentially.
wxImageArray m_images; wxImageArray m_images;
// the info about each image stored in m_images. // the info about each image stored in m_images.
// NB: m_info.GetCount() may differ from m_images.GetCount()! // NB: m_info.GetCount() may differ from m_images.GetCount()!
wxANIFrameInfoArray m_info; wxANIFrameInfoArray m_info;
// this is the wxCURHandler used to load the ICON chunk of the ANI files // this is the wxCURHandler used to load the ICON chunk of the ANI files
static wxCURHandler sm_handler; static wxCURHandler sm_handler;
DECLARE_NO_COPY_CLASS(wxANIDecoder) DECLARE_NO_COPY_CLASS(wxANIDecoder)
}; };
#endif // wxUSE_STREAM && wxUSE_ICO_CUR #endif // wxUSE_STREAM && wxUSE_ICO_CUR
#endif // _WX_ANIDECOD_H #endif // _WX_ANIDECOD_H

View File

@@ -1,124 +1,124 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/animate.h // Name: wx/animate.h
// Purpose: wxAnimation and wxAnimationCtrl // Purpose: wxAnimation and wxAnimationCtrl
// Author: Julian Smart and Guillermo Rodriguez Garcia // Author: Julian Smart and Guillermo Rodriguez Garcia
// Modified by: Francesco Montorsi // Modified by: Francesco Montorsi
// Created: 13/8/99 // Created: 13/8/99
// RCS-ID: $Id: animate.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: animate.h 53135 2008-04-12 02:31:04Z VZ $
// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia // Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ANIMATE_H_ #ifndef _WX_ANIMATE_H_
#define _WX_ANIMATE_H_ #define _WX_ANIMATE_H_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_ANIMATIONCTRL #if wxUSE_ANIMATIONCTRL
#include "wx/animdecod.h" #include "wx/animdecod.h"
#include "wx/control.h" #include "wx/control.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
class WXDLLIMPEXP_FWD_ADV wxAnimation; class WXDLLIMPEXP_FWD_ADV wxAnimation;
extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation; extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation;
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxAnimationBase // wxAnimationBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxAnimationBase : public wxGDIObject class WXDLLIMPEXP_ADV wxAnimationBase : public wxGDIObject
{ {
public: public:
wxAnimationBase() {} wxAnimationBase() {}
virtual bool IsOk() const = 0; virtual bool IsOk() const = 0;
// can be -1 // can be -1
virtual int GetDelay(unsigned int frame) const = 0; virtual int GetDelay(unsigned int frame) const = 0;
virtual unsigned int GetFrameCount() const = 0; virtual unsigned int GetFrameCount() const = 0;
virtual wxImage GetFrame(unsigned int frame) const = 0; virtual wxImage GetFrame(unsigned int frame) const = 0;
virtual wxSize GetSize() const = 0; virtual wxSize GetSize() const = 0;
virtual bool LoadFile(const wxString& name, virtual bool LoadFile(const wxString& name,
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0; wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
virtual bool Load(wxInputStream& stream, virtual bool Load(wxInputStream& stream,
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0; wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
protected: protected:
DECLARE_ABSTRACT_CLASS(wxAnimationBase) DECLARE_ABSTRACT_CLASS(wxAnimationBase)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxAnimationCtrlBase // wxAnimationCtrlBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// do not autoresize to the animation's size when SetAnimation() is called // do not autoresize to the animation's size when SetAnimation() is called
#define wxAC_NO_AUTORESIZE (0x0010) #define wxAC_NO_AUTORESIZE (0x0010)
// default style does not include wxAC_NO_AUTORESIZE, that is, the control // default style does not include wxAC_NO_AUTORESIZE, that is, the control
// auto-resizes by default to fit the new animation when SetAnimation() is called // auto-resizes by default to fit the new animation when SetAnimation() is called
#define wxAC_DEFAULT_STYLE (wxNO_BORDER) #define wxAC_DEFAULT_STYLE (wxNO_BORDER)
class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl
{ {
public: public:
wxAnimationCtrlBase() { } wxAnimationCtrlBase() { }
// public API // public API
virtual bool LoadFile(const wxString& filename, virtual bool LoadFile(const wxString& filename,
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0; wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
virtual void SetAnimation(const wxAnimation &anim) = 0; virtual void SetAnimation(const wxAnimation &anim) = 0;
virtual wxAnimation GetAnimation() const = 0; virtual wxAnimation GetAnimation() const = 0;
virtual bool Play() = 0; virtual bool Play() = 0;
virtual void Stop() = 0; virtual void Stop() = 0;
virtual bool IsPlaying() const = 0; virtual bool IsPlaying() const = 0;
virtual void SetInactiveBitmap(const wxBitmap &bmp); virtual void SetInactiveBitmap(const wxBitmap &bmp);
// always return the original bitmap set in this control // always return the original bitmap set in this control
wxBitmap GetInactiveBitmap() const wxBitmap GetInactiveBitmap() const
{ return m_bmpStatic; } { return m_bmpStatic; }
protected: protected:
// the inactive bitmap as it was set by the user // the inactive bitmap as it was set by the user
wxBitmap m_bmpStatic; wxBitmap m_bmpStatic;
// the inactive bitmap currently shown in the control // the inactive bitmap currently shown in the control
// (may differ in the size from m_bmpStatic) // (may differ in the size from m_bmpStatic)
wxBitmap m_bmpStaticReal; wxBitmap m_bmpStaticReal;
// updates m_bmpStaticReal from m_bmpStatic if needed // updates m_bmpStaticReal from m_bmpStatic if needed
virtual void UpdateStaticImage(); virtual void UpdateStaticImage();
// called by SetInactiveBitmap // called by SetInactiveBitmap
virtual void DisplayStaticImage() = 0; virtual void DisplayStaticImage() = 0;
private: private:
DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase) DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// include the platform-specific version of the wxAnimationCtrl class // include the platform-specific version of the wxAnimationCtrl class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/animate.h" #include "wx/gtk/animate.h"
#else #else
#include "wx/generic/animate.h" #include "wx/generic/animate.h"
#endif #endif
#endif // wxUSE_ANIMATIONCTRL #endif // wxUSE_ANIMATIONCTRL
#endif // _WX_ANIMATE_H_ #endif // _WX_ANIMATE_H_

View File

@@ -1,146 +1,146 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/animdecod.h // Name: wx/animdecod.h
// Purpose: wxAnimationDecoder // Purpose: wxAnimationDecoder
// Author: Francesco Montorsi // Author: Francesco Montorsi
// CVS-ID: $Id: animdecod.h 49563 2007-10-31 20:46:21Z VZ $ // CVS-ID: $Id: animdecod.h 49563 2007-10-31 20:46:21Z VZ $
// Copyright: (c) 2006 Francesco Montorsi // Copyright: (c) 2006 Francesco Montorsi
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ANIMDECOD_H #ifndef _WX_ANIMDECOD_H
#define _WX_ANIMDECOD_H #define _WX_ANIMDECOD_H
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_STREAMS #if wxUSE_STREAMS
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
class WXDLLIMPEXP_FWD_BASE wxInputStream; class WXDLLIMPEXP_FWD_BASE wxInputStream;
class WXDLLIMPEXP_FWD_CORE wxImage; class WXDLLIMPEXP_FWD_CORE wxImage;
/* /*
Differences between a wxAnimationDecoder and a wxImageHandler: Differences between a wxAnimationDecoder and a wxImageHandler:
1) wxImageHandlers always load an input stream directly into a given wxImage 1) wxImageHandlers always load an input stream directly into a given wxImage
object converting from the format-specific data representation to the object converting from the format-specific data representation to the
wxImage native format (RGB24). wxImage native format (RGB24).
wxAnimationDecoders always load an input stream using some optimized format wxAnimationDecoders always load an input stream using some optimized format
to store it which is format-depedent. This allows to store a (possibly big) to store it which is format-depedent. This allows to store a (possibly big)
animation using a format which is a good compromise between required memory animation using a format which is a good compromise between required memory
and time required to blit in on the screen. and time required to blit in on the screen.
2) wxAnimationDecoders contain the animation data in some internal var. 2) wxAnimationDecoders contain the animation data in some internal var.
That's why they derive from wxObjectRefData: they are data which can be shared. That's why they derive from wxObjectRefData: they are data which can be shared.
3) wxAnimationDecoders can be used by a wxImageHandler to retrieve a frame 3) wxAnimationDecoders can be used by a wxImageHandler to retrieve a frame
in wxImage format; the viceversa cannot be done. in wxImage format; the viceversa cannot be done.
4) wxAnimationDecoders are decoders only, thus do not support save features. 4) wxAnimationDecoders are decoders only, thus do not support save features.
5) wxAnimationDecoders are directly used by wxAnimation (generic implementation) 5) wxAnimationDecoders are directly used by wxAnimation (generic implementation)
as wxObjectRefData while they need to be 'wrapped' by a wxImageHandler for as wxObjectRefData while they need to be 'wrapped' by a wxImageHandler for
wxImage uses. wxImage uses.
*/ */
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Constants // Constants
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// NB: the values of these enum items are not casual but coincide with the // NB: the values of these enum items are not casual but coincide with the
// GIF disposal codes. Do not change them !! // GIF disposal codes. Do not change them !!
enum wxAnimationDisposal enum wxAnimationDisposal
{ {
// No disposal specified. The decoder is not required to take any action. // No disposal specified. The decoder is not required to take any action.
wxANIM_UNSPECIFIED = -1, wxANIM_UNSPECIFIED = -1,
// Do not dispose. The graphic is to be left in place. // Do not dispose. The graphic is to be left in place.
wxANIM_DONOTREMOVE = 0, wxANIM_DONOTREMOVE = 0,
// Restore to background color. The area used by the graphic must be // Restore to background color. The area used by the graphic must be
// restored to the background color. // restored to the background color.
wxANIM_TOBACKGROUND = 1, wxANIM_TOBACKGROUND = 1,
// Restore to previous. The decoder is required to restore the area // Restore to previous. The decoder is required to restore the area
// overwritten by the graphic with what was there prior to rendering the graphic. // overwritten by the graphic with what was there prior to rendering the graphic.
wxANIM_TOPREVIOUS = 2 wxANIM_TOPREVIOUS = 2
}; };
enum wxAnimationType enum wxAnimationType
{ {
wxANIMATION_TYPE_INVALID, wxANIMATION_TYPE_INVALID,
wxANIMATION_TYPE_GIF, wxANIMATION_TYPE_GIF,
wxANIMATION_TYPE_ANI, wxANIMATION_TYPE_ANI,
wxANIMATION_TYPE_ANY wxANIMATION_TYPE_ANY
}; };
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// wxAnimationDecoder class // wxAnimationDecoder class
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData
{ {
public: public:
wxAnimationDecoder() wxAnimationDecoder()
{ {
m_background = wxNullColour; m_background = wxNullColour;
m_nFrames = 0; m_nFrames = 0;
} }
virtual ~wxAnimationDecoder() { } virtual ~wxAnimationDecoder() { }
virtual bool Load( wxInputStream& stream ) = 0; virtual bool Load( wxInputStream& stream ) = 0;
virtual bool CanRead( wxInputStream& stream ) const = 0; virtual bool CanRead( wxInputStream& stream ) const = 0;
virtual wxAnimationDecoder *Clone() const = 0; virtual wxAnimationDecoder *Clone() const = 0;
virtual wxAnimationType GetType() const = 0; virtual wxAnimationType GetType() const = 0;
// convert given frame to wxImage // convert given frame to wxImage
virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0; virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0;
// frame specific data getters // frame specific data getters
// not all frames may be of the same size; e.g. GIF allows to // not all frames may be of the same size; e.g. GIF allows to
// specify that between two frames only a smaller portion of the // specify that between two frames only a smaller portion of the
// entire animation has changed. // entire animation has changed.
virtual wxSize GetFrameSize(unsigned int frame) const = 0; virtual wxSize GetFrameSize(unsigned int frame) const = 0;
// the position of this frame in case it's not as big as m_szAnimation // the position of this frame in case it's not as big as m_szAnimation
// or wxPoint(0,0) otherwise. // or wxPoint(0,0) otherwise.
virtual wxPoint GetFramePosition(unsigned int frame) const = 0; virtual wxPoint GetFramePosition(unsigned int frame) const = 0;
// what should be done after displaying this frame. // what should be done after displaying this frame.
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0; virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0;
// the number of milliseconds this frame should be displayed. // the number of milliseconds this frame should be displayed.
// if returns -1 then the frame must be displayed forever. // if returns -1 then the frame must be displayed forever.
virtual long GetDelay(unsigned int frame) const = 0; virtual long GetDelay(unsigned int frame) const = 0;
// the transparent colour for this frame if any or wxNullColour. // the transparent colour for this frame if any or wxNullColour.
virtual wxColour GetTransparentColour(unsigned int frame) const = 0; virtual wxColour GetTransparentColour(unsigned int frame) const = 0;
// get global data // get global data
wxSize GetAnimationSize() const { return m_szAnimation; } wxSize GetAnimationSize() const { return m_szAnimation; }
wxColour GetBackgroundColour() const { return m_background; } wxColour GetBackgroundColour() const { return m_background; }
unsigned int GetFrameCount() const { return m_nFrames; } unsigned int GetFrameCount() const { return m_nFrames; }
protected: protected:
wxSize m_szAnimation; wxSize m_szAnimation;
unsigned int m_nFrames; unsigned int m_nFrames;
// this is the colour to use for the wxANIM_TOBACKGROUND disposal. // this is the colour to use for the wxANIM_TOBACKGROUND disposal.
// if not specified by the animation, it's set to wxNullColour // if not specified by the animation, it's set to wxNullColour
wxColour m_background; wxColour m_background;
}; };
#endif // wxUSE_STREAM #endif // wxUSE_STREAM
#endif // _WX_ANIMDECOD_H #endif // _WX_ANIMDECOD_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,272 +1,272 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/apptrait.h // Name: wx/apptrait.h
// Purpose: declaration of wxAppTraits and derived classes // Purpose: declaration of wxAppTraits and derived classes
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 19.06.2003 // Created: 19.06.2003
// RCS-ID: $Id: apptrait.h 49804 2007-11-10 01:09:42Z VZ $ // RCS-ID: $Id: apptrait.h 49804 2007-11-10 01:09:42Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_APPTRAIT_H_ #ifndef _WX_APPTRAIT_H_
#define _WX_APPTRAIT_H_ #define _WX_APPTRAIT_H_
#include "wx/string.h" #include "wx/string.h"
#include "wx/platinfo.h" #include "wx/platinfo.h"
class WXDLLIMPEXP_FWD_BASE wxObject; class WXDLLIMPEXP_FWD_BASE wxObject;
class WXDLLIMPEXP_FWD_BASE wxAppTraits; class WXDLLIMPEXP_FWD_BASE wxAppTraits;
#if wxUSE_FONTMAP #if wxUSE_FONTMAP
class WXDLLIMPEXP_FWD_CORE wxFontMapper; class WXDLLIMPEXP_FWD_CORE wxFontMapper;
#endif // wxUSE_FONTMAP #endif // wxUSE_FONTMAP
class WXDLLIMPEXP_FWD_BASE wxLog; class WXDLLIMPEXP_FWD_BASE wxLog;
class WXDLLIMPEXP_FWD_BASE wxMessageOutput; class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
class WXDLLIMPEXP_FWD_CORE wxRendererNative; class WXDLLIMPEXP_FWD_CORE wxRendererNative;
class WXDLLIMPEXP_FWD_BASE wxString; class WXDLLIMPEXP_FWD_BASE wxString;
class GSocketGUIFunctionsTable; class GSocketGUIFunctionsTable;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxAppTraits: this class defines various configurable aspects of wxApp // wxAppTraits: this class defines various configurable aspects of wxApp
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxStandardPathsBase; class WXDLLIMPEXP_FWD_BASE wxStandardPathsBase;
class WXDLLIMPEXP_BASE wxAppTraitsBase class WXDLLIMPEXP_BASE wxAppTraitsBase
{ {
public: public:
// needed since this class declares virtual members // needed since this class declares virtual members
virtual ~wxAppTraitsBase() { } virtual ~wxAppTraitsBase() { }
// hooks for creating the global objects, may be overridden by the user // hooks for creating the global objects, may be overridden by the user
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
#if wxUSE_LOG #if wxUSE_LOG
// create the default log target // create the default log target
virtual wxLog *CreateLogTarget() = 0; virtual wxLog *CreateLogTarget() = 0;
#endif // wxUSE_LOG #endif // wxUSE_LOG
// create the global object used for printing out messages // create the global object used for printing out messages
virtual wxMessageOutput *CreateMessageOutput() = 0; virtual wxMessageOutput *CreateMessageOutput() = 0;
#if wxUSE_FONTMAP #if wxUSE_FONTMAP
// create the global font mapper object used for encodings/charset mapping // create the global font mapper object used for encodings/charset mapping
virtual wxFontMapper *CreateFontMapper() = 0; virtual wxFontMapper *CreateFontMapper() = 0;
#endif // wxUSE_FONTMAP #endif // wxUSE_FONTMAP
// get the renderer to use for drawing the generic controls (return value // get the renderer to use for drawing the generic controls (return value
// may be NULL in which case the default renderer for the current platform // may be NULL in which case the default renderer for the current platform
// is used); this is used in GUI only and always returns NULL in console // is used); this is used in GUI only and always returns NULL in console
// //
// NB: returned pointer will be deleted by the caller // NB: returned pointer will be deleted by the caller
virtual wxRendererNative *CreateRenderer() = 0; virtual wxRendererNative *CreateRenderer() = 0;
#if wxUSE_STDPATHS #if wxUSE_STDPATHS
// wxStandardPaths object is normally the same for wxBase and wxGUI // wxStandardPaths object is normally the same for wxBase and wxGUI
// except in the case of wxMac and wxCocoa // except in the case of wxMac and wxCocoa
virtual wxStandardPathsBase& GetStandardPaths(); virtual wxStandardPathsBase& GetStandardPaths();
#endif // wxUSE_STDPATHS #endif // wxUSE_STDPATHS
// functions abstracting differences between GUI and console modes // functions abstracting differences between GUI and console modes
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
// show the assert dialog with the specified message in GUI or just print // show the assert dialog with the specified message in GUI or just print
// the string to stderr in console mode // the string to stderr in console mode
// //
// base class version has an implementation (in spite of being pure // base class version has an implementation (in spite of being pure
// virtual) in base/appbase.cpp which can be called as last resort. // virtual) in base/appbase.cpp which can be called as last resort.
// //
// return true to suppress subsequent asserts, false to continue as before // return true to suppress subsequent asserts, false to continue as before
virtual bool ShowAssertDialog(const wxString& msg) = 0; virtual bool ShowAssertDialog(const wxString& msg) = 0;
#endif // __WXDEBUG__ #endif // __WXDEBUG__
// return true if fprintf(stderr) goes somewhere, false otherwise // return true if fprintf(stderr) goes somewhere, false otherwise
virtual bool HasStderr() = 0; virtual bool HasStderr() = 0;
// managing "pending delete" list: in GUI mode we can't immediately delete // managing "pending delete" list: in GUI mode we can't immediately delete
// some objects because there may be unprocessed events for them and so we // some objects because there may be unprocessed events for them and so we
// only do it during the next idle loop iteration while this is, of course, // only do it during the next idle loop iteration while this is, of course,
// unnecessary in wxBase, so we have a few functions to abstract these // unnecessary in wxBase, so we have a few functions to abstract these
// operations // operations
// add the object to the pending delete list in GUI, delete it immediately // add the object to the pending delete list in GUI, delete it immediately
// in wxBase // in wxBase
virtual void ScheduleForDestroy(wxObject *object) = 0; virtual void ScheduleForDestroy(wxObject *object) = 0;
// remove this object from the pending delete list in GUI, do nothing in // remove this object from the pending delete list in GUI, do nothing in
// wxBase // wxBase
virtual void RemoveFromPendingDelete(wxObject *object) = 0; virtual void RemoveFromPendingDelete(wxObject *object) = 0;
#if wxUSE_SOCKETS #if wxUSE_SOCKETS
// return table of GUI callbacks for GSocket code or NULL in wxBase. This // return table of GUI callbacks for GSocket code or NULL in wxBase. This
// is needed because networking classes are in their own library and so // is needed because networking classes are in their own library and so
// they can't directly call GUI functions (the same net library can be // they can't directly call GUI functions (the same net library can be
// used in both GUI and base apps). To complicate it further, GUI library // used in both GUI and base apps). To complicate it further, GUI library
// ("wxCore") doesn't depend on networking library and so only a functions // ("wxCore") doesn't depend on networking library and so only a functions
// table can be passed around // table can be passed around
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0; virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
#endif #endif
// return information about the (native) toolkit currently used and its // return information about the (native) toolkit currently used and its
// runtime (not compile-time) version. // runtime (not compile-time) version.
// returns wxPORT_BASE for console applications and one of the remaining // returns wxPORT_BASE for console applications and one of the remaining
// wxPORT_* values for GUI applications. // wxPORT_* values for GUI applications.
virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const = 0; virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const = 0;
// return true if the port is using wxUniversal for the GUI, false if not // return true if the port is using wxUniversal for the GUI, false if not
virtual bool IsUsingUniversalWidgets() const = 0; virtual bool IsUsingUniversalWidgets() const = 0;
// return the name of the Desktop Environment such as // return the name of the Desktop Environment such as
// "KDE" or "GNOME". May return an empty string. // "KDE" or "GNOME". May return an empty string.
virtual wxString GetDesktopEnvironment() const { return wxEmptyString; } virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
protected: protected:
#if wxUSE_STACKWALKER && defined( __WXDEBUG__ ) #if wxUSE_STACKWALKER && defined( __WXDEBUG__ )
// utility function: returns the stack frame as a plain wxString // utility function: returns the stack frame as a plain wxString
virtual wxString GetAssertStackTrace(); virtual wxString GetAssertStackTrace();
#endif #endif
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// include the platform-specific version of the class // include the platform-specific version of the class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the // NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
// Unix code (and otherwise __UNIX__ wouldn't be defined) // Unix code (and otherwise __UNIX__ wouldn't be defined)
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port // ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
#if defined(__WXPALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/apptbase.h" #include "wx/palmos/apptbase.h"
#elif defined(__WIN32__) #elif defined(__WIN32__)
#include "wx/msw/apptbase.h" #include "wx/msw/apptbase.h"
#elif defined(__UNIX__) && !defined(__EMX__) #elif defined(__UNIX__) && !defined(__EMX__)
#include "wx/unix/apptbase.h" #include "wx/unix/apptbase.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/apptbase.h" #include "wx/mac/apptbase.h"
#elif defined(__OS2__) #elif defined(__OS2__)
#include "wx/os2/apptbase.h" #include "wx/os2/apptbase.h"
#else // no platform-specific methods to add to wxAppTraits #else // no platform-specific methods to add to wxAppTraits
// wxAppTraits must be a class because it was forward declared as class // wxAppTraits must be a class because it was forward declared as class
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
{ {
}; };
#endif // platform #endif // platform
// ============================================================================ // ============================================================================
// standard traits for console and GUI applications // standard traits for console and GUI applications
// ============================================================================ // ============================================================================
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps // wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits
{ {
public: public:
#if wxUSE_LOG #if wxUSE_LOG
virtual wxLog *CreateLogTarget(); virtual wxLog *CreateLogTarget();
#endif // wxUSE_LOG #endif // wxUSE_LOG
virtual wxMessageOutput *CreateMessageOutput(); virtual wxMessageOutput *CreateMessageOutput();
#if wxUSE_FONTMAP #if wxUSE_FONTMAP
virtual wxFontMapper *CreateFontMapper(); virtual wxFontMapper *CreateFontMapper();
#endif // wxUSE_FONTMAP #endif // wxUSE_FONTMAP
virtual wxRendererNative *CreateRenderer(); virtual wxRendererNative *CreateRenderer();
#if wxUSE_SOCKETS #if wxUSE_SOCKETS
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable(); virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
#endif #endif
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
virtual bool ShowAssertDialog(const wxString& msg); virtual bool ShowAssertDialog(const wxString& msg);
#endif // __WXDEBUG__ #endif // __WXDEBUG__
virtual bool HasStderr(); virtual bool HasStderr();
virtual void ScheduleForDestroy(wxObject *object); virtual void ScheduleForDestroy(wxObject *object);
virtual void RemoveFromPendingDelete(wxObject *object); virtual void RemoveFromPendingDelete(wxObject *object);
// the GetToolkitVersion for console application is always the same // the GetToolkitVersion for console application is always the same
virtual wxPortId GetToolkitVersion(int *verMaj, int *verMin) const virtual wxPortId GetToolkitVersion(int *verMaj, int *verMin) const
{ {
// no toolkits (wxBase is for console applications without GUI support) // no toolkits (wxBase is for console applications without GUI support)
// NB: zero means "no toolkit", -1 means "not initialized yet" // NB: zero means "no toolkit", -1 means "not initialized yet"
// so we must use zero here! // so we must use zero here!
if (verMaj) *verMaj = 0; if (verMaj) *verMaj = 0;
if (verMin) *verMin = 0; if (verMin) *verMin = 0;
return wxPORT_BASE; return wxPORT_BASE;
} }
virtual bool IsUsingUniversalWidgets() const { return false; } virtual bool IsUsingUniversalWidgets() const { return false; }
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxGUIAppTraitsBase: wxAppTraits implementation for the GUI apps // wxGUIAppTraitsBase: wxAppTraits implementation for the GUI apps
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_GUI #if wxUSE_GUI
class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits
{ {
public: public:
#if wxUSE_LOG #if wxUSE_LOG
virtual wxLog *CreateLogTarget(); virtual wxLog *CreateLogTarget();
#endif // wxUSE_LOG #endif // wxUSE_LOG
virtual wxMessageOutput *CreateMessageOutput(); virtual wxMessageOutput *CreateMessageOutput();
#if wxUSE_FONTMAP #if wxUSE_FONTMAP
virtual wxFontMapper *CreateFontMapper(); virtual wxFontMapper *CreateFontMapper();
#endif // wxUSE_FONTMAP #endif // wxUSE_FONTMAP
virtual wxRendererNative *CreateRenderer(); virtual wxRendererNative *CreateRenderer();
#if wxUSE_SOCKETS #if wxUSE_SOCKETS
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable(); virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
#endif #endif
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
virtual bool ShowAssertDialog(const wxString& msg); virtual bool ShowAssertDialog(const wxString& msg);
#endif // __WXDEBUG__ #endif // __WXDEBUG__
virtual bool HasStderr(); virtual bool HasStderr();
virtual void ScheduleForDestroy(wxObject *object); virtual void ScheduleForDestroy(wxObject *object);
virtual void RemoveFromPendingDelete(wxObject *object); virtual void RemoveFromPendingDelete(wxObject *object);
virtual bool IsUsingUniversalWidgets() const virtual bool IsUsingUniversalWidgets() const
{ {
#ifdef __WXUNIVERSAL__ #ifdef __WXUNIVERSAL__
return true; return true;
#else #else
return false; return false;
#endif #endif
} }
}; };
#endif // wxUSE_GUI #endif // wxUSE_GUI
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// include the platform-specific version of the classes above // include the platform-specific version of the classes above
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port // ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
#if defined(__WXPALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/apptrait.h" #include "wx/palmos/apptrait.h"
#elif defined(__WIN32__) #elif defined(__WIN32__)
#include "wx/msw/apptrait.h" #include "wx/msw/apptrait.h"
#elif defined(__OS2__) #elif defined(__OS2__)
#include "wx/os2/apptrait.h" #include "wx/os2/apptrait.h"
#elif defined(__UNIX__) #elif defined(__UNIX__)
#include "wx/unix/apptrait.h" #include "wx/unix/apptrait.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/apptrait.h" #include "wx/mac/apptrait.h"
#elif defined(__DOS__) #elif defined(__DOS__)
#include "wx/msdos/apptrait.h" #include "wx/msdos/apptrait.h"
#else #else
#if wxUSE_GUI #if wxUSE_GUI
class wxGUIAppTraits : public wxGUIAppTraitsBase class wxGUIAppTraits : public wxGUIAppTraitsBase
{ {
}; };
#endif // wxUSE_GUI #endif // wxUSE_GUI
class wxConsoleAppTraits: public wxConsoleAppTraitsBase class wxConsoleAppTraits: public wxConsoleAppTraitsBase
{ {
}; };
#endif // platform #endif // platform
#endif // _WX_APPTRAIT_H_ #endif // _WX_APPTRAIT_H_

View File

@@ -1,381 +1,381 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/archive.h // Name: wx/archive.h
// Purpose: Streams for archive formats // Purpose: Streams for archive formats
// Author: Mike Wetherell // Author: Mike Wetherell
// RCS-ID: $Id: archive.h 43445 2006-11-16 14:30:20Z MW $ // RCS-ID: $Id: archive.h 43445 2006-11-16 14:30:20Z MW $
// Copyright: (c) 2004 Mike Wetherell // Copyright: (c) 2004 Mike Wetherell
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ARCHIVE_H__ #ifndef _WX_ARCHIVE_H__
#define _WX_ARCHIVE_H__ #define _WX_ARCHIVE_H__
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS #if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
#include "wx/stream.h" #include "wx/stream.h"
#include "wx/filename.h" #include "wx/filename.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxArchiveNotifier // wxArchiveNotifier
class WXDLLIMPEXP_BASE wxArchiveNotifier class WXDLLIMPEXP_BASE wxArchiveNotifier
{ {
public: public:
virtual ~wxArchiveNotifier() { } virtual ~wxArchiveNotifier() { }
virtual void OnEntryUpdated(class wxArchiveEntry& entry) = 0; virtual void OnEntryUpdated(class wxArchiveEntry& entry) = 0;
}; };
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxArchiveEntry // wxArchiveEntry
// //
// Holds an entry's meta data, such as filename and timestamp. // Holds an entry's meta data, such as filename and timestamp.
class WXDLLIMPEXP_BASE wxArchiveEntry : public wxObject class WXDLLIMPEXP_BASE wxArchiveEntry : public wxObject
{ {
public: public:
virtual ~wxArchiveEntry() { } virtual ~wxArchiveEntry() { }
virtual wxDateTime GetDateTime() const = 0; virtual wxDateTime GetDateTime() const = 0;
virtual wxFileOffset GetSize() const = 0; virtual wxFileOffset GetSize() const = 0;
virtual wxFileOffset GetOffset() const = 0; virtual wxFileOffset GetOffset() const = 0;
virtual bool IsDir() const = 0; virtual bool IsDir() const = 0;
virtual bool IsReadOnly() const = 0; virtual bool IsReadOnly() const = 0;
virtual wxString GetInternalName() const = 0; virtual wxString GetInternalName() const = 0;
virtual wxPathFormat GetInternalFormat() const = 0; virtual wxPathFormat GetInternalFormat() const = 0;
virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0; virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0;
virtual void SetDateTime(const wxDateTime& dt) = 0; virtual void SetDateTime(const wxDateTime& dt) = 0;
virtual void SetSize(wxFileOffset size) = 0; virtual void SetSize(wxFileOffset size) = 0;
virtual void SetIsDir(bool isDir = true) = 0; virtual void SetIsDir(bool isDir = true) = 0;
virtual void SetIsReadOnly(bool isReadOnly = true) = 0; virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
virtual void SetName(const wxString& name, virtual void SetName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE) = 0; wxPathFormat format = wxPATH_NATIVE) = 0;
wxArchiveEntry *Clone() const { return DoClone(); } wxArchiveEntry *Clone() const { return DoClone(); }
void SetNotifier(wxArchiveNotifier& notifier); void SetNotifier(wxArchiveNotifier& notifier);
virtual void UnsetNotifier() { m_notifier = NULL; } virtual void UnsetNotifier() { m_notifier = NULL; }
protected: protected:
wxArchiveEntry() : m_notifier(NULL) { } wxArchiveEntry() : m_notifier(NULL) { }
wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { } wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { }
virtual void SetOffset(wxFileOffset offset) = 0; virtual void SetOffset(wxFileOffset offset) = 0;
virtual wxArchiveEntry* DoClone() const = 0; virtual wxArchiveEntry* DoClone() const = 0;
wxArchiveNotifier *GetNotifier() const { return m_notifier; } wxArchiveNotifier *GetNotifier() const { return m_notifier; }
wxArchiveEntry& operator=(const wxArchiveEntry& entry); wxArchiveEntry& operator=(const wxArchiveEntry& entry);
private: private:
wxArchiveNotifier *m_notifier; wxArchiveNotifier *m_notifier;
DECLARE_ABSTRACT_CLASS(wxArchiveEntry) DECLARE_ABSTRACT_CLASS(wxArchiveEntry)
}; };
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxArchiveInputStream // wxArchiveInputStream
// //
// GetNextEntry() returns an wxArchiveEntry object containing the meta-data // GetNextEntry() returns an wxArchiveEntry object containing the meta-data
// for the next entry in the archive (and gives away ownership). Reading from // for the next entry in the archive (and gives away ownership). Reading from
// the wxArchiveInputStream then returns the entry's data. Eof() becomes true // the wxArchiveInputStream then returns the entry's data. Eof() becomes true
// after an attempt has been made to read past the end of the entry's data. // after an attempt has been made to read past the end of the entry's data.
// //
// When there are no more entries, GetNextEntry() returns NULL and sets Eof(). // When there are no more entries, GetNextEntry() returns NULL and sets Eof().
class WXDLLIMPEXP_BASE wxArchiveInputStream : public wxFilterInputStream class WXDLLIMPEXP_BASE wxArchiveInputStream : public wxFilterInputStream
{ {
public: public:
typedef wxArchiveEntry entry_type; typedef wxArchiveEntry entry_type;
virtual ~wxArchiveInputStream() { } virtual ~wxArchiveInputStream() { }
virtual bool OpenEntry(wxArchiveEntry& entry) = 0; virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
virtual bool CloseEntry() = 0; virtual bool CloseEntry() = 0;
wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); } wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); }
virtual char Peek() { return wxInputStream::Peek(); } virtual char Peek() { return wxInputStream::Peek(); }
protected: protected:
wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv); wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv);
wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv); wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv);
virtual wxArchiveEntry *DoGetNextEntry() = 0; virtual wxArchiveEntry *DoGetNextEntry() = 0;
wxMBConv& GetConv() const { return m_conv; } wxMBConv& GetConv() const { return m_conv; }
private: private:
wxMBConv& m_conv; wxMBConv& m_conv;
}; };
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxArchiveOutputStream // wxArchiveOutputStream
// //
// PutNextEntry is used to create a new entry in the output archive, then // PutNextEntry is used to create a new entry in the output archive, then
// the entry's data is written to the wxArchiveOutputStream. // the entry's data is written to the wxArchiveOutputStream.
// //
// Only one entry can be open for output at a time; another call to // Only one entry can be open for output at a time; another call to
// PutNextEntry closes the current entry and begins the next. // PutNextEntry closes the current entry and begins the next.
// //
// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership // The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership
// of the entry object. // of the entry object.
class WXDLLIMPEXP_BASE wxArchiveOutputStream : public wxFilterOutputStream class WXDLLIMPEXP_BASE wxArchiveOutputStream : public wxFilterOutputStream
{ {
public: public:
virtual ~wxArchiveOutputStream() { } virtual ~wxArchiveOutputStream() { }
virtual bool PutNextEntry(wxArchiveEntry *entry) = 0; virtual bool PutNextEntry(wxArchiveEntry *entry) = 0;
virtual bool PutNextEntry(const wxString& name, virtual bool PutNextEntry(const wxString& name,
const wxDateTime& dt = wxDateTime::Now(), const wxDateTime& dt = wxDateTime::Now(),
wxFileOffset size = wxInvalidOffset) = 0; wxFileOffset size = wxInvalidOffset) = 0;
virtual bool PutNextDirEntry(const wxString& name, virtual bool PutNextDirEntry(const wxString& name,
const wxDateTime& dt = wxDateTime::Now()) = 0; const wxDateTime& dt = wxDateTime::Now()) = 0;
virtual bool CopyEntry(wxArchiveEntry *entry, virtual bool CopyEntry(wxArchiveEntry *entry,
wxArchiveInputStream& stream) = 0; wxArchiveInputStream& stream) = 0;
virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0; virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0;
virtual bool CloseEntry() = 0; virtual bool CloseEntry() = 0;
protected: protected:
wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv); wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv);
wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv); wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv);
wxMBConv& GetConv() const { return m_conv; } wxMBConv& GetConv() const { return m_conv; }
private: private:
wxMBConv& m_conv; wxMBConv& m_conv;
}; };
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxArchiveIterator // wxArchiveIterator
// //
// An input iterator that can be used to transfer an archive's catalog to // An input iterator that can be used to transfer an archive's catalog to
// a container. // a container.
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR #if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
#include <iterator> #include <iterator>
#include <utility> #include <utility>
template <class X, class Y> inline template <class X, class Y> inline
void _wxSetArchiveIteratorValue( void _wxSetArchiveIteratorValue(
X& val, Y entry, void *WXUNUSED(d)) X& val, Y entry, void *WXUNUSED(d))
{ {
val = X(entry); val = X(entry);
} }
template <class X, class Y, class Z> inline template <class X, class Y, class Z> inline
void _wxSetArchiveIteratorValue( void _wxSetArchiveIteratorValue(
std::pair<X, Y>& val, Z entry, Z WXUNUSED(d)) std::pair<X, Y>& val, Z entry, Z WXUNUSED(d))
{ {
val = std::make_pair(X(entry->GetInternalName()), Y(entry)); val = std::make_pair(X(entry->GetInternalName()), Y(entry));
} }
#if defined _MSC_VER && _MSC_VER < 1300 #if defined _MSC_VER && _MSC_VER < 1300
template <class Arc, class T = Arc::entry_type*> template <class Arc, class T = Arc::entry_type*>
#else #else
template <class Arc, class T = typename Arc::entry_type*> template <class Arc, class T = typename Arc::entry_type*>
#endif #endif
class wxArchiveIterator class wxArchiveIterator
{ {
public: public:
typedef std::input_iterator_tag iterator_category; typedef std::input_iterator_tag iterator_category;
typedef T value_type; typedef T value_type;
typedef ptrdiff_t difference_type; typedef ptrdiff_t difference_type;
typedef T* pointer; typedef T* pointer;
typedef T& reference; typedef T& reference;
wxArchiveIterator() : m_rep(NULL) { } wxArchiveIterator() : m_rep(NULL) { }
wxArchiveIterator(Arc& arc) { wxArchiveIterator(Arc& arc) {
typename Arc::entry_type* entry = arc.GetNextEntry(); typename Arc::entry_type* entry = arc.GetNextEntry();
m_rep = entry ? new Rep(arc, entry) : NULL; m_rep = entry ? new Rep(arc, entry) : NULL;
} }
wxArchiveIterator(const wxArchiveIterator& it) : m_rep(it.m_rep) { wxArchiveIterator(const wxArchiveIterator& it) : m_rep(it.m_rep) {
if (m_rep) if (m_rep)
m_rep->AddRef(); m_rep->AddRef();
} }
~wxArchiveIterator() { ~wxArchiveIterator() {
if (m_rep) if (m_rep)
m_rep->UnRef(); m_rep->UnRef();
} }
const T& operator *() const { const T& operator *() const {
return m_rep->GetValue(); return m_rep->GetValue();
} }
const T* operator ->() const { const T* operator ->() const {
return &**this; return &**this;
} }
wxArchiveIterator& operator =(const wxArchiveIterator& it) { wxArchiveIterator& operator =(const wxArchiveIterator& it) {
if (it.m_rep) if (it.m_rep)
it.m_rep.AddRef(); it.m_rep.AddRef();
if (m_rep) if (m_rep)
m_rep.UnRef(); m_rep.UnRef();
m_rep = it.m_rep; m_rep = it.m_rep;
return *this; return *this;
} }
wxArchiveIterator& operator ++() { wxArchiveIterator& operator ++() {
m_rep = m_rep->Next(); m_rep = m_rep->Next();
return *this; return *this;
} }
wxArchiveIterator operator ++(int) { wxArchiveIterator operator ++(int) {
wxArchiveIterator it(*this); wxArchiveIterator it(*this);
++(*this); ++(*this);
return it; return it;
} }
bool operator ==(const wxArchiveIterator& j) const { bool operator ==(const wxArchiveIterator& j) const {
return m_rep == j.m_rep; return m_rep == j.m_rep;
} }
bool operator !=(const wxArchiveIterator& j) const { bool operator !=(const wxArchiveIterator& j) const {
return !(*this == j); return !(*this == j);
} }
private: private:
class Rep { class Rep {
Arc& m_arc; Arc& m_arc;
typename Arc::entry_type* m_entry; typename Arc::entry_type* m_entry;
T m_value; T m_value;
int m_ref; int m_ref;
public: public:
Rep(Arc& arc, typename Arc::entry_type* entry) Rep(Arc& arc, typename Arc::entry_type* entry)
: m_arc(arc), m_entry(entry), m_value(), m_ref(1) { } : m_arc(arc), m_entry(entry), m_value(), m_ref(1) { }
~Rep() ~Rep()
{ delete m_entry; } { delete m_entry; }
void AddRef() { void AddRef() {
m_ref++; m_ref++;
} }
void UnRef() { void UnRef() {
if (--m_ref == 0) if (--m_ref == 0)
delete this; delete this;
} }
Rep *Next() { Rep *Next() {
typename Arc::entry_type* entry = m_arc.GetNextEntry(); typename Arc::entry_type* entry = m_arc.GetNextEntry();
if (!entry) { if (!entry) {
UnRef(); UnRef();
return NULL; return NULL;
} }
if (m_ref > 1) { if (m_ref > 1) {
m_ref--; m_ref--;
return new Rep(m_arc, entry); return new Rep(m_arc, entry);
} }
delete m_entry; delete m_entry;
m_entry = entry; m_entry = entry;
m_value = T(); m_value = T();
return this; return this;
} }
const T& GetValue() { const T& GetValue() {
if (m_entry) { if (m_entry) {
_wxSetArchiveIteratorValue(m_value, m_entry, m_entry); _wxSetArchiveIteratorValue(m_value, m_entry, m_entry);
m_entry = NULL; m_entry = NULL;
} }
return m_value; return m_value;
} }
} *m_rep; } *m_rep;
}; };
typedef wxArchiveIterator<wxArchiveInputStream> wxArchiveIter; typedef wxArchiveIterator<wxArchiveInputStream> wxArchiveIter;
typedef wxArchiveIterator<wxArchiveInputStream, typedef wxArchiveIterator<wxArchiveInputStream,
std::pair<wxString, wxArchiveEntry*> > wxArchivePairIter; std::pair<wxString, wxArchiveEntry*> > wxArchivePairIter;
#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR #endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// wxArchiveClassFactory // wxArchiveClassFactory
// //
// A wxArchiveClassFactory instance for a particular archive type allows // A wxArchiveClassFactory instance for a particular archive type allows
// the creation of the other classes that may be needed. // the creation of the other classes that may be needed.
void WXDLLIMPEXP_BASE wxUseArchiveClasses(); void WXDLLIMPEXP_BASE wxUseArchiveClasses();
class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxFilterClassFactoryBase class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxFilterClassFactoryBase
{ {
public: public:
typedef wxArchiveEntry entry_type; typedef wxArchiveEntry entry_type;
typedef wxArchiveInputStream instream_type; typedef wxArchiveInputStream instream_type;
typedef wxArchiveOutputStream outstream_type; typedef wxArchiveOutputStream outstream_type;
typedef wxArchiveNotifier notifier_type; typedef wxArchiveNotifier notifier_type;
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR #if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIter iter_type; typedef wxArchiveIter iter_type;
typedef wxArchivePairIter pairiter_type; typedef wxArchivePairIter pairiter_type;
#endif #endif
virtual ~wxArchiveClassFactory() { } virtual ~wxArchiveClassFactory() { }
wxArchiveEntry *NewEntry() const wxArchiveEntry *NewEntry() const
{ return DoNewEntry(); } { return DoNewEntry(); }
wxArchiveInputStream *NewStream(wxInputStream& stream) const wxArchiveInputStream *NewStream(wxInputStream& stream) const
{ return DoNewStream(stream); } { return DoNewStream(stream); }
wxArchiveOutputStream *NewStream(wxOutputStream& stream) const wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
{ return DoNewStream(stream); } { return DoNewStream(stream); }
wxArchiveInputStream *NewStream(wxInputStream *stream) const wxArchiveInputStream *NewStream(wxInputStream *stream) const
{ return DoNewStream(stream); } { return DoNewStream(stream); }
wxArchiveOutputStream *NewStream(wxOutputStream *stream) const wxArchiveOutputStream *NewStream(wxOutputStream *stream) const
{ return DoNewStream(stream); } { return DoNewStream(stream); }
virtual wxString GetInternalName( virtual wxString GetInternalName(
const wxString& name, const wxString& name,
wxPathFormat format = wxPATH_NATIVE) const = 0; wxPathFormat format = wxPATH_NATIVE) const = 0;
void SetConv(wxMBConv& conv) { m_pConv = &conv; } void SetConv(wxMBConv& conv) { m_pConv = &conv; }
wxMBConv& GetConv() const wxMBConv& GetConv() const
{ if (m_pConv) return *m_pConv; else return wxConvLocal; } { if (m_pConv) return *m_pConv; else return wxConvLocal; }
static const wxArchiveClassFactory *Find(const wxChar *protocol, static const wxArchiveClassFactory *Find(const wxChar *protocol,
wxStreamProtocolType type wxStreamProtocolType type
= wxSTREAM_PROTOCOL); = wxSTREAM_PROTOCOL);
static const wxArchiveClassFactory *GetFirst(); static const wxArchiveClassFactory *GetFirst();
const wxArchiveClassFactory *GetNext() const { return m_next; } const wxArchiveClassFactory *GetNext() const { return m_next; }
void PushFront() { Remove(); m_next = sm_first; sm_first = this; } void PushFront() { Remove(); m_next = sm_first; sm_first = this; }
void Remove(); void Remove();
protected: protected:
// old compilers don't support covarient returns, so 'Do' methods are // old compilers don't support covarient returns, so 'Do' methods are
// used to simulate them // used to simulate them
virtual wxArchiveEntry *DoNewEntry() const = 0; virtual wxArchiveEntry *DoNewEntry() const = 0;
virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0; virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0;
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0; virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
virtual wxArchiveInputStream *DoNewStream(wxInputStream *stream) const = 0; virtual wxArchiveInputStream *DoNewStream(wxInputStream *stream) const = 0;
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const = 0; virtual wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const = 0;
wxArchiveClassFactory() : m_pConv(NULL), m_next(this) { } wxArchiveClassFactory() : m_pConv(NULL), m_next(this) { }
wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f)) wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
{ return *this; } { return *this; }
private: private:
wxMBConv *m_pConv; wxMBConv *m_pConv;
static wxArchiveClassFactory *sm_first; static wxArchiveClassFactory *sm_first;
wxArchiveClassFactory *m_next; wxArchiveClassFactory *m_next;
DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory) DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
}; };
#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS #endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
#endif // _WX_ARCHIVE_H__ #endif // _WX_ARCHIVE_H__

View File

@@ -1,372 +1,372 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: include/wx/arrstr.h // Name: include/wx/arrstr.h
// Purpose: wxArrayString class // Purpose: wxArrayString class
// Author: Mattia Barbon and Vadim Zeitlin // Author: Mattia Barbon and Vadim Zeitlin
// Modified by: // Modified by:
// Created: 07/07/03 // Created: 07/07/03
// RCS-ID: $Id: arrstr.h 33888 2005-04-26 19:24:12Z MBN $ // RCS-ID: $Id: arrstr.h 33888 2005-04-26 19:24:12Z MBN $
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ARRSTR_H #ifndef _WX_ARRSTR_H
#define _WX_ARRSTR_H #define _WX_ARRSTR_H
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/string.h" #include "wx/string.h"
WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*); WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*); WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
#if wxUSE_STL #if wxUSE_STL
#include "wx/dynarray.h" #include "wx/dynarray.h"
typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*); typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*);
typedef wxString _wxArraywxBaseArrayStringBase; typedef wxString _wxArraywxBaseArrayStringBase;
_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase, _WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase,
wxArray_SortFunction<wxString>, wxArray_SortFunction<wxString>,
class WXDLLIMPEXP_BASE); class WXDLLIMPEXP_BASE);
WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase, WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase,
wxBaseArrayStringBase, WXDLLIMPEXP_BASE); wxBaseArrayStringBase, WXDLLIMPEXP_BASE);
_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase, _WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase,
wxBaseArrayStringBase, = wxStringSortAscending, wxBaseArrayStringBase, = wxStringSortAscending,
class WXDLLIMPEXP_BASE, CMPFUNCwxString); class WXDLLIMPEXP_BASE, CMPFUNCwxString);
class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase
{ {
public: public:
// type of function used by wxArrayString::Sort() // type of function used by wxArrayString::Sort()
typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first, typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
const wxString& second); const wxString& second);
wxArrayString() { } wxArrayString() { }
wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { } wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
wxArrayString(size_t sz, const wxChar** a); wxArrayString(size_t sz, const wxChar** a);
wxArrayString(size_t sz, const wxString* a); wxArrayString(size_t sz, const wxString* a);
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const; int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
void Sort(bool reverseOrder = false); void Sort(bool reverseOrder = false);
void Sort(CompareFunction function); void Sort(CompareFunction function);
void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); } void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); }
size_t Add(const wxString& string, size_t copies = 1) size_t Add(const wxString& string, size_t copies = 1)
{ {
wxArrayStringBase::Add(string, copies); wxArrayStringBase::Add(string, copies);
return size() - copies; return size() - copies;
} }
}; };
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
{ {
public: public:
wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending) wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending)
{ } { }
wxSortedArrayString(const wxSortedArrayString& array) wxSortedArrayString(const wxSortedArrayString& array)
: wxSortedArrayStringBase(array) : wxSortedArrayStringBase(array)
{ } { }
wxSortedArrayString(const wxArrayString& src) wxSortedArrayString(const wxArrayString& src)
: wxSortedArrayStringBase(wxStringSortAscending) : wxSortedArrayStringBase(wxStringSortAscending)
{ {
reserve(src.size()); reserve(src.size());
for ( size_t n = 0; n < src.size(); n++ ) for ( size_t n = 0; n < src.size(); n++ )
Add(src[n]); Add(src[n]);
} }
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const; int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
}; };
#else // if !wxUSE_STL #else // if !wxUSE_STL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// The string array uses it's knowledge of internal structure of the wxString // The string array uses it's knowledge of internal structure of the wxString
// class to optimize string storage. Normally, we would store pointers to // class to optimize string storage. Normally, we would store pointers to
// string, but as wxString is, in fact, itself a pointer (sizeof(wxString) is // string, but as wxString is, in fact, itself a pointer (sizeof(wxString) is
// sizeof(char *)) we store these pointers instead. The cast to "wxString *" is // sizeof(char *)) we store these pointers instead. The cast to "wxString *" is
// really all we need to turn such pointer into a string! // really all we need to turn such pointer into a string!
// //
// Of course, it can be called a dirty hack, but we use twice less memory and // Of course, it can be called a dirty hack, but we use twice less memory and
// this approach is also more speed efficient, so it's probably worth it. // this approach is also more speed efficient, so it's probably worth it.
// //
// Usage notes: when a string is added/inserted, a new copy of it is created, // Usage notes: when a string is added/inserted, a new copy of it is created,
// so the original string may be safely deleted. When a string is retrieved // so the original string may be safely deleted. When a string is retrieved
// from the array (operator[] or Item() method), a reference is returned. // from the array (operator[] or Item() method), a reference is returned.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxArrayString class WXDLLIMPEXP_BASE wxArrayString
{ {
public: public:
// type of function used by wxArrayString::Sort() // type of function used by wxArrayString::Sort()
typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first, typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
const wxString& second); const wxString& second);
// type of function used by wxArrayString::Sort(), for compatibility with // type of function used by wxArrayString::Sort(), for compatibility with
// wxArray // wxArray
typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first, typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first,
wxString* second); wxString* second);
// constructors and destructor // constructors and destructor
// default ctor // default ctor
wxArrayString() { Init(false); } wxArrayString() { Init(false); }
// if autoSort is true, the array is always sorted (in alphabetical order) // if autoSort is true, the array is always sorted (in alphabetical order)
// //
// NB: the reason for using int and not bool is that like this we can avoid // NB: the reason for using int and not bool is that like this we can avoid
// using this ctor for implicit conversions from "const char *" (which // using this ctor for implicit conversions from "const char *" (which
// we'd like to be implicitly converted to wxString instead!) // we'd like to be implicitly converted to wxString instead!)
// //
// of course, using explicit would be even better - if all compilers // of course, using explicit would be even better - if all compilers
// supported it... // supported it...
wxArrayString(int autoSort) { Init(autoSort != 0); } wxArrayString(int autoSort) { Init(autoSort != 0); }
// C string array ctor // C string array ctor
wxArrayString(size_t sz, const wxChar** a); wxArrayString(size_t sz, const wxChar** a);
// wxString string array ctor // wxString string array ctor
wxArrayString(size_t sz, const wxString* a); wxArrayString(size_t sz, const wxString* a);
// copy ctor // copy ctor
wxArrayString(const wxArrayString& array); wxArrayString(const wxArrayString& array);
// assignment operator // assignment operator
wxArrayString& operator=(const wxArrayString& src); wxArrayString& operator=(const wxArrayString& src);
// not virtual, this class should not be derived from // not virtual, this class should not be derived from
~wxArrayString(); ~wxArrayString();
// memory management // memory management
// empties the list, but doesn't release memory // empties the list, but doesn't release memory
void Empty(); void Empty();
// empties the list and releases memory // empties the list and releases memory
void Clear(); void Clear();
// preallocates memory for given number of items // preallocates memory for given number of items
void Alloc(size_t nCount); void Alloc(size_t nCount);
// minimzes the memory usage (by freeing all extra memory) // minimzes the memory usage (by freeing all extra memory)
void Shrink(); void Shrink();
// simple accessors // simple accessors
// number of elements in the array // number of elements in the array
size_t GetCount() const { return m_nCount; } size_t GetCount() const { return m_nCount; }
// is it empty? // is it empty?
bool IsEmpty() const { return m_nCount == 0; } bool IsEmpty() const { return m_nCount == 0; }
// number of elements in the array (GetCount is preferred API) // number of elements in the array (GetCount is preferred API)
size_t Count() const { return m_nCount; } size_t Count() const { return m_nCount; }
// items access (range checking is done in debug version) // items access (range checking is done in debug version)
// get item at position uiIndex // get item at position uiIndex
wxString& Item(size_t nIndex) const wxString& Item(size_t nIndex) const
{ {
wxASSERT_MSG( nIndex < m_nCount, wxASSERT_MSG( nIndex < m_nCount,
_T("wxArrayString: index out of bounds") ); _T("wxArrayString: index out of bounds") );
return *(wxString *)&(m_pItems[nIndex]); return *(wxString *)&(m_pItems[nIndex]);
} }
// same as Item() // same as Item()
wxString& operator[](size_t nIndex) const { return Item(nIndex); } wxString& operator[](size_t nIndex) const { return Item(nIndex); }
// get last item // get last item
wxString& Last() const wxString& Last() const
{ {
wxASSERT_MSG( !IsEmpty(), wxASSERT_MSG( !IsEmpty(),
_T("wxArrayString: index out of bounds") ); _T("wxArrayString: index out of bounds") );
return Item(Count() - 1); return Item(Count() - 1);
} }
// return a wxString[], useful for the controls which // return a wxString[], useful for the controls which
// take one in their ctor. You must delete[] it yourself // take one in their ctor. You must delete[] it yourself
// once you are done with it. Will return NULL if the // once you are done with it. Will return NULL if the
// ArrayString was empty. // ArrayString was empty.
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( wxString* GetStringArray() const ); wxDEPRECATED( wxString* GetStringArray() const );
#endif #endif
// item management // item management
// Search the element in the array, starting from the beginning if // Search the element in the array, starting from the beginning if
// bFromEnd is false or from end otherwise. If bCase, comparison is case // bFromEnd is false or from end otherwise. If bCase, comparison is case
// sensitive (default). Returns index of the first item matched or // sensitive (default). Returns index of the first item matched or
// wxNOT_FOUND // wxNOT_FOUND
int Index (const wxChar *sz, bool bCase = true, bool bFromEnd = false) const; int Index (const wxChar *sz, bool bCase = true, bool bFromEnd = false) const;
// add new element at the end (if the array is not sorted), return its // add new element at the end (if the array is not sorted), return its
// index // index
size_t Add(const wxString& str, size_t nInsert = 1); size_t Add(const wxString& str, size_t nInsert = 1);
// add new element at given position // add new element at given position
void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1); void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1);
// expand the array to have count elements // expand the array to have count elements
void SetCount(size_t count); void SetCount(size_t count);
// remove first item matching this value // remove first item matching this value
void Remove(const wxChar *sz); void Remove(const wxChar *sz);
// remove item by index // remove item by index
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) ); wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
#endif #endif
void RemoveAt(size_t nIndex, size_t nRemove = 1); void RemoveAt(size_t nIndex, size_t nRemove = 1);
// sorting // sorting
// sort array elements in alphabetical order (or reversed alphabetical // sort array elements in alphabetical order (or reversed alphabetical
// order if reverseOrder parameter is true) // order if reverseOrder parameter is true)
void Sort(bool reverseOrder = false); void Sort(bool reverseOrder = false);
// sort array elements using specified comparaison function // sort array elements using specified comparaison function
void Sort(CompareFunction compareFunction); void Sort(CompareFunction compareFunction);
void Sort(CompareFunction2 compareFunction); void Sort(CompareFunction2 compareFunction);
// comparison // comparison
// compare two arrays case sensitively // compare two arrays case sensitively
bool operator==(const wxArrayString& a) const; bool operator==(const wxArrayString& a) const;
// compare two arrays case sensitively // compare two arrays case sensitively
bool operator!=(const wxArrayString& a) const { return !(*this == a); } bool operator!=(const wxArrayString& a) const { return !(*this == a); }
// STL-like interface // STL-like interface
typedef wxString value_type; typedef wxString value_type;
typedef value_type* pointer; typedef value_type* pointer;
typedef const value_type* const_pointer; typedef const value_type* const_pointer;
typedef value_type* iterator; typedef value_type* iterator;
typedef const value_type* const_iterator; typedef const value_type* const_iterator;
typedef value_type& reference; typedef value_type& reference;
typedef const value_type& const_reference; typedef const value_type& const_reference;
typedef int difference_type; typedef int difference_type;
typedef size_t size_type; typedef size_t size_type;
// TODO: this code duplicates the one in dynarray.h // TODO: this code duplicates the one in dynarray.h
class reverse_iterator class reverse_iterator
{ {
typedef wxString value_type; typedef wxString value_type;
typedef value_type* pointer; typedef value_type* pointer;
typedef value_type& reference; typedef value_type& reference;
typedef reverse_iterator itor; typedef reverse_iterator itor;
friend itor operator+(int o, const itor& it); friend itor operator+(int o, const itor& it);
friend itor operator+(const itor& it, int o); friend itor operator+(const itor& it, int o);
friend itor operator-(const itor& it, int o); friend itor operator-(const itor& it, int o);
friend difference_type operator -(const itor& i1, const itor& i2); friend difference_type operator -(const itor& i1, const itor& i2);
public: public:
pointer m_ptr; pointer m_ptr;
reverse_iterator() : m_ptr(NULL) { } reverse_iterator() : m_ptr(NULL) { }
reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { }
reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
reference operator*() const { return *m_ptr; } reference operator*() const { return *m_ptr; }
pointer operator->() const { return m_ptr; } pointer operator->() const { return m_ptr; }
itor& operator++() { --m_ptr; return *this; } itor& operator++() { --m_ptr; return *this; }
const itor operator++(int) const itor operator++(int)
{ reverse_iterator tmp = *this; --m_ptr; return tmp; } { reverse_iterator tmp = *this; --m_ptr; return tmp; }
itor& operator--() { ++m_ptr; return *this; } itor& operator--() { ++m_ptr; return *this; }
const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }
bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; } bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }
bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; } bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }
}; };
class const_reverse_iterator class const_reverse_iterator
{ {
typedef wxString value_type; typedef wxString value_type;
typedef const value_type* pointer; typedef const value_type* pointer;
typedef const value_type& reference; typedef const value_type& reference;
typedef const_reverse_iterator itor; typedef const_reverse_iterator itor;
friend itor operator+(int o, const itor& it); friend itor operator+(int o, const itor& it);
friend itor operator+(const itor& it, int o); friend itor operator+(const itor& it, int o);
friend itor operator-(const itor& it, int o); friend itor operator-(const itor& it, int o);
friend difference_type operator -(const itor& i1, const itor& i2); friend difference_type operator -(const itor& i1, const itor& i2);
public: public:
pointer m_ptr; pointer m_ptr;
const_reverse_iterator() : m_ptr(NULL) { } const_reverse_iterator() : m_ptr(NULL) { }
const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { }
const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }
reference operator*() const { return *m_ptr; } reference operator*() const { return *m_ptr; }
pointer operator->() const { return m_ptr; } pointer operator->() const { return m_ptr; }
itor& operator++() { --m_ptr; return *this; } itor& operator++() { --m_ptr; return *this; }
const itor operator++(int) const itor operator++(int)
{ itor tmp = *this; --m_ptr; return tmp; } { itor tmp = *this; --m_ptr; return tmp; }
itor& operator--() { ++m_ptr; return *this; } itor& operator--() { ++m_ptr; return *this; }
const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }
bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; } bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }
bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; } bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }
}; };
wxArrayString(const_iterator first, const_iterator last) wxArrayString(const_iterator first, const_iterator last)
{ Init(false); assign(first, last); } { Init(false); assign(first, last); }
wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); } wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); }
void assign(const_iterator first, const_iterator last); void assign(const_iterator first, const_iterator last);
void assign(size_type n, const_reference v) void assign(size_type n, const_reference v)
{ clear(); Add(v, n); } { clear(); Add(v, n); }
reference back() { return *(end() - 1); } reference back() { return *(end() - 1); }
const_reference back() const { return *(end() - 1); } const_reference back() const { return *(end() - 1); }
iterator begin() { return (wxString *)&(m_pItems[0]); } iterator begin() { return (wxString *)&(m_pItems[0]); }
const_iterator begin() const { return (wxString *)&(m_pItems[0]); } const_iterator begin() const { return (wxString *)&(m_pItems[0]); }
size_type capacity() const { return m_nSize; } size_type capacity() const { return m_nSize; }
void clear() { Clear(); } void clear() { Clear(); }
bool empty() const { return IsEmpty(); } bool empty() const { return IsEmpty(); }
iterator end() { return begin() + GetCount(); } iterator end() { return begin() + GetCount(); }
const_iterator end() const { return begin() + GetCount(); } const_iterator end() const { return begin() + GetCount(); }
iterator erase(iterator first, iterator last) iterator erase(iterator first, iterator last)
{ {
size_t idx = first - begin(); size_t idx = first - begin();
RemoveAt(idx, last - first); RemoveAt(idx, last - first);
return begin() + idx; return begin() + idx;
} }
iterator erase(iterator it) { return erase(it, it + 1); } iterator erase(iterator it) { return erase(it, it + 1); }
reference front() { return *begin(); } reference front() { return *begin(); }
const_reference front() const { return *begin(); } const_reference front() const { return *begin(); }
void insert(iterator it, size_type n, const_reference v) void insert(iterator it, size_type n, const_reference v)
{ Insert(v, it - begin(), n); } { Insert(v, it - begin(), n); }
iterator insert(iterator it, const_reference v = value_type()) iterator insert(iterator it, const_reference v = value_type())
{ size_t idx = it - begin(); Insert(v, idx); return begin() + idx; } { size_t idx = it - begin(); Insert(v, idx); return begin() + idx; }
void insert(iterator it, const_iterator first, const_iterator last); void insert(iterator it, const_iterator first, const_iterator last);
size_type max_size() const { return INT_MAX; } size_type max_size() const { return INT_MAX; }
void pop_back() { RemoveAt(GetCount() - 1); } void pop_back() { RemoveAt(GetCount() - 1); }
void push_back(const_reference v) { Add(v); } void push_back(const_reference v) { Add(v); }
reverse_iterator rbegin() { return reverse_iterator(end() - 1); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); }
const_reverse_iterator rbegin() const; const_reverse_iterator rbegin() const;
reverse_iterator rend() { return reverse_iterator(begin() - 1); } reverse_iterator rend() { return reverse_iterator(begin() - 1); }
const_reverse_iterator rend() const; const_reverse_iterator rend() const;
void reserve(size_type n) /* base::reserve*/; void reserve(size_type n) /* base::reserve*/;
void resize(size_type n, value_type v = value_type()); void resize(size_type n, value_type v = value_type());
size_type size() const { return GetCount(); } size_type size() const { return GetCount(); }
protected: protected:
void Init(bool autoSort); // common part of all ctors void Init(bool autoSort); // common part of all ctors
void Copy(const wxArrayString& src); // copies the contents of another array void Copy(const wxArrayString& src); // copies the contents of another array
private: private:
void Grow(size_t nIncrement = 0); // makes array bigger if needed void Grow(size_t nIncrement = 0); // makes array bigger if needed
void Free(); // free all the strings stored void Free(); // free all the strings stored
void DoSort(); // common part of all Sort() variants void DoSort(); // common part of all Sort() variants
size_t m_nSize, // current size of the array size_t m_nSize, // current size of the array
m_nCount; // current number of elements m_nCount; // current number of elements
wxChar **m_pItems; // pointer to data wxChar **m_pItems; // pointer to data
bool m_autoSort; // if true, keep the array always sorted bool m_autoSort; // if true, keep the array always sorted
}; };
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString
{ {
public: public:
wxSortedArrayString() : wxArrayString(true) wxSortedArrayString() : wxArrayString(true)
{ } { }
wxSortedArrayString(const wxArrayString& array) : wxArrayString(true) wxSortedArrayString(const wxArrayString& array) : wxArrayString(true)
{ Copy(array); } { Copy(array); }
}; };
#endif // !wxUSE_STL #endif // !wxUSE_STL
// this class provides a temporary wxString* from a // this class provides a temporary wxString* from a
// wxArrayString // wxArrayString
class WXDLLIMPEXP_BASE wxCArrayString class WXDLLIMPEXP_BASE wxCArrayString
{ {
public: public:
wxCArrayString( const wxArrayString& array ) wxCArrayString( const wxArrayString& array )
: m_array( array ), m_strings( NULL ) : m_array( array ), m_strings( NULL )
{ } { }
~wxCArrayString() { delete[] m_strings; } ~wxCArrayString() { delete[] m_strings; }
size_t GetCount() const { return m_array.GetCount(); } size_t GetCount() const { return m_array.GetCount(); }
wxString* GetStrings() wxString* GetStrings()
{ {
if( m_strings ) return m_strings; if( m_strings ) return m_strings;
size_t count = m_array.GetCount(); size_t count = m_array.GetCount();
m_strings = new wxString[count]; m_strings = new wxString[count];
for( size_t i = 0; i < count; ++i ) for( size_t i = 0; i < count; ++i )
m_strings[i] = m_array[i]; m_strings[i] = m_array[i];
return m_strings; return m_strings;
} }
private: private:
const wxArrayString& m_array; const wxArrayString& m_array;
wxString* m_strings; wxString* m_strings;
}; };
#endif #endif

View File

@@ -1,200 +1,200 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/artprov.h // Name: wx/artprov.h
// Purpose: wxArtProvider class // Purpose: wxArtProvider class
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Modified by: // Modified by:
// Created: 18/03/2002 // Created: 18/03/2002
// RCS-ID: $Id: artprov.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: artprov.h 53135 2008-04-12 02:31:04Z VZ $
// Copyright: (c) Vaclav Slavik // Copyright: (c) Vaclav Slavik
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ARTPROV_H_ #ifndef _WX_ARTPROV_H_
#define _WX_ARTPROV_H_ #define _WX_ARTPROV_H_
#include "wx/string.h" #include "wx/string.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/icon.h" #include "wx/icon.h"
class WXDLLIMPEXP_FWD_CORE wxArtProvidersList; class WXDLLIMPEXP_FWD_CORE wxArtProvidersList;
class WXDLLIMPEXP_FWD_CORE wxArtProviderCache; class WXDLLIMPEXP_FWD_CORE wxArtProviderCache;
class wxArtProviderModule; class wxArtProviderModule;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Types // Types
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
typedef wxString wxArtClient; typedef wxString wxArtClient;
typedef wxString wxArtID; typedef wxString wxArtID;
#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + _T("_C")) #define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + _T("_C"))
#define wxART_MAKE_CLIENT_ID(id) _T(#id) _T("_C") #define wxART_MAKE_CLIENT_ID(id) _T(#id) _T("_C")
#define wxART_MAKE_ART_ID_FROM_STR(id) (id) #define wxART_MAKE_ART_ID_FROM_STR(id) (id)
#define wxART_MAKE_ART_ID(id) _T(#id) #define wxART_MAKE_ART_ID(id) _T(#id)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Art clients // Art clients
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#define wxART_TOOLBAR wxART_MAKE_CLIENT_ID(wxART_TOOLBAR) #define wxART_TOOLBAR wxART_MAKE_CLIENT_ID(wxART_TOOLBAR)
#define wxART_MENU wxART_MAKE_CLIENT_ID(wxART_MENU) #define wxART_MENU wxART_MAKE_CLIENT_ID(wxART_MENU)
#define wxART_FRAME_ICON wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON) #define wxART_FRAME_ICON wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON)
#define wxART_CMN_DIALOG wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG) #define wxART_CMN_DIALOG wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG)
#define wxART_HELP_BROWSER wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER) #define wxART_HELP_BROWSER wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER)
#define wxART_MESSAGE_BOX wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX) #define wxART_MESSAGE_BOX wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX)
#define wxART_BUTTON wxART_MAKE_CLIENT_ID(wxART_BUTTON) #define wxART_BUTTON wxART_MAKE_CLIENT_ID(wxART_BUTTON)
#define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER) #define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Art IDs // Art IDs
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#define wxART_ADD_BOOKMARK wxART_MAKE_ART_ID(wxART_ADD_BOOKMARK) #define wxART_ADD_BOOKMARK wxART_MAKE_ART_ID(wxART_ADD_BOOKMARK)
#define wxART_DEL_BOOKMARK wxART_MAKE_ART_ID(wxART_DEL_BOOKMARK) #define wxART_DEL_BOOKMARK wxART_MAKE_ART_ID(wxART_DEL_BOOKMARK)
#define wxART_HELP_SIDE_PANEL wxART_MAKE_ART_ID(wxART_HELP_SIDE_PANEL) #define wxART_HELP_SIDE_PANEL wxART_MAKE_ART_ID(wxART_HELP_SIDE_PANEL)
#define wxART_HELP_SETTINGS wxART_MAKE_ART_ID(wxART_HELP_SETTINGS) #define wxART_HELP_SETTINGS wxART_MAKE_ART_ID(wxART_HELP_SETTINGS)
#define wxART_HELP_BOOK wxART_MAKE_ART_ID(wxART_HELP_BOOK) #define wxART_HELP_BOOK wxART_MAKE_ART_ID(wxART_HELP_BOOK)
#define wxART_HELP_FOLDER wxART_MAKE_ART_ID(wxART_HELP_FOLDER) #define wxART_HELP_FOLDER wxART_MAKE_ART_ID(wxART_HELP_FOLDER)
#define wxART_HELP_PAGE wxART_MAKE_ART_ID(wxART_HELP_PAGE) #define wxART_HELP_PAGE wxART_MAKE_ART_ID(wxART_HELP_PAGE)
#define wxART_GO_BACK wxART_MAKE_ART_ID(wxART_GO_BACK) #define wxART_GO_BACK wxART_MAKE_ART_ID(wxART_GO_BACK)
#define wxART_GO_FORWARD wxART_MAKE_ART_ID(wxART_GO_FORWARD) #define wxART_GO_FORWARD wxART_MAKE_ART_ID(wxART_GO_FORWARD)
#define wxART_GO_UP wxART_MAKE_ART_ID(wxART_GO_UP) #define wxART_GO_UP wxART_MAKE_ART_ID(wxART_GO_UP)
#define wxART_GO_DOWN wxART_MAKE_ART_ID(wxART_GO_DOWN) #define wxART_GO_DOWN wxART_MAKE_ART_ID(wxART_GO_DOWN)
#define wxART_GO_TO_PARENT wxART_MAKE_ART_ID(wxART_GO_TO_PARENT) #define wxART_GO_TO_PARENT wxART_MAKE_ART_ID(wxART_GO_TO_PARENT)
#define wxART_GO_HOME wxART_MAKE_ART_ID(wxART_GO_HOME) #define wxART_GO_HOME wxART_MAKE_ART_ID(wxART_GO_HOME)
#define wxART_FILE_OPEN wxART_MAKE_ART_ID(wxART_FILE_OPEN) #define wxART_FILE_OPEN wxART_MAKE_ART_ID(wxART_FILE_OPEN)
#define wxART_FILE_SAVE wxART_MAKE_ART_ID(wxART_FILE_SAVE) #define wxART_FILE_SAVE wxART_MAKE_ART_ID(wxART_FILE_SAVE)
#define wxART_FILE_SAVE_AS wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS) #define wxART_FILE_SAVE_AS wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS)
#define wxART_PRINT wxART_MAKE_ART_ID(wxART_PRINT) #define wxART_PRINT wxART_MAKE_ART_ID(wxART_PRINT)
#define wxART_HELP wxART_MAKE_ART_ID(wxART_HELP) #define wxART_HELP wxART_MAKE_ART_ID(wxART_HELP)
#define wxART_TIP wxART_MAKE_ART_ID(wxART_TIP) #define wxART_TIP wxART_MAKE_ART_ID(wxART_TIP)
#define wxART_REPORT_VIEW wxART_MAKE_ART_ID(wxART_REPORT_VIEW) #define wxART_REPORT_VIEW wxART_MAKE_ART_ID(wxART_REPORT_VIEW)
#define wxART_LIST_VIEW wxART_MAKE_ART_ID(wxART_LIST_VIEW) #define wxART_LIST_VIEW wxART_MAKE_ART_ID(wxART_LIST_VIEW)
#define wxART_NEW_DIR wxART_MAKE_ART_ID(wxART_NEW_DIR) #define wxART_NEW_DIR wxART_MAKE_ART_ID(wxART_NEW_DIR)
#define wxART_HARDDISK wxART_MAKE_ART_ID(wxART_HARDDISK) #define wxART_HARDDISK wxART_MAKE_ART_ID(wxART_HARDDISK)
#define wxART_FLOPPY wxART_MAKE_ART_ID(wxART_FLOPPY) #define wxART_FLOPPY wxART_MAKE_ART_ID(wxART_FLOPPY)
#define wxART_CDROM wxART_MAKE_ART_ID(wxART_CDROM) #define wxART_CDROM wxART_MAKE_ART_ID(wxART_CDROM)
#define wxART_REMOVABLE wxART_MAKE_ART_ID(wxART_REMOVABLE) #define wxART_REMOVABLE wxART_MAKE_ART_ID(wxART_REMOVABLE)
#define wxART_FOLDER wxART_MAKE_ART_ID(wxART_FOLDER) #define wxART_FOLDER wxART_MAKE_ART_ID(wxART_FOLDER)
#define wxART_FOLDER_OPEN wxART_MAKE_ART_ID(wxART_FOLDER_OPEN) #define wxART_FOLDER_OPEN wxART_MAKE_ART_ID(wxART_FOLDER_OPEN)
#define wxART_GO_DIR_UP wxART_MAKE_ART_ID(wxART_GO_DIR_UP) #define wxART_GO_DIR_UP wxART_MAKE_ART_ID(wxART_GO_DIR_UP)
#define wxART_EXECUTABLE_FILE wxART_MAKE_ART_ID(wxART_EXECUTABLE_FILE) #define wxART_EXECUTABLE_FILE wxART_MAKE_ART_ID(wxART_EXECUTABLE_FILE)
#define wxART_NORMAL_FILE wxART_MAKE_ART_ID(wxART_NORMAL_FILE) #define wxART_NORMAL_FILE wxART_MAKE_ART_ID(wxART_NORMAL_FILE)
#define wxART_TICK_MARK wxART_MAKE_ART_ID(wxART_TICK_MARK) #define wxART_TICK_MARK wxART_MAKE_ART_ID(wxART_TICK_MARK)
#define wxART_CROSS_MARK wxART_MAKE_ART_ID(wxART_CROSS_MARK) #define wxART_CROSS_MARK wxART_MAKE_ART_ID(wxART_CROSS_MARK)
#define wxART_ERROR wxART_MAKE_ART_ID(wxART_ERROR) #define wxART_ERROR wxART_MAKE_ART_ID(wxART_ERROR)
#define wxART_QUESTION wxART_MAKE_ART_ID(wxART_QUESTION) #define wxART_QUESTION wxART_MAKE_ART_ID(wxART_QUESTION)
#define wxART_WARNING wxART_MAKE_ART_ID(wxART_WARNING) #define wxART_WARNING wxART_MAKE_ART_ID(wxART_WARNING)
#define wxART_INFORMATION wxART_MAKE_ART_ID(wxART_INFORMATION) #define wxART_INFORMATION wxART_MAKE_ART_ID(wxART_INFORMATION)
#define wxART_MISSING_IMAGE wxART_MAKE_ART_ID(wxART_MISSING_IMAGE) #define wxART_MISSING_IMAGE wxART_MAKE_ART_ID(wxART_MISSING_IMAGE)
#define wxART_COPY wxART_MAKE_ART_ID(wxART_COPY) #define wxART_COPY wxART_MAKE_ART_ID(wxART_COPY)
#define wxART_CUT wxART_MAKE_ART_ID(wxART_CUT) #define wxART_CUT wxART_MAKE_ART_ID(wxART_CUT)
#define wxART_PASTE wxART_MAKE_ART_ID(wxART_PASTE) #define wxART_PASTE wxART_MAKE_ART_ID(wxART_PASTE)
#define wxART_DELETE wxART_MAKE_ART_ID(wxART_DELETE) #define wxART_DELETE wxART_MAKE_ART_ID(wxART_DELETE)
#define wxART_NEW wxART_MAKE_ART_ID(wxART_NEW) #define wxART_NEW wxART_MAKE_ART_ID(wxART_NEW)
#define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO) #define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO)
#define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO) #define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO)
#define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT) #define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT)
#define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND) #define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND)
#define wxART_FIND_AND_REPLACE wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE) #define wxART_FIND_AND_REPLACE wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxArtProvider class // wxArtProvider class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxArtProvider : public wxObject class WXDLLEXPORT wxArtProvider : public wxObject
{ {
public: public:
// Dtor removes the provider from providers stack if it's still on it // Dtor removes the provider from providers stack if it's still on it
virtual ~wxArtProvider(); virtual ~wxArtProvider();
// Add new provider to the top of providers stack (i.e. the provider will // Add new provider to the top of providers stack (i.e. the provider will
// be queried first of all). // be queried first of all).
static void Push(wxArtProvider *provider); static void Push(wxArtProvider *provider);
// Add new provider to the bottom of providers stack (i.e. the provider // Add new provider to the bottom of providers stack (i.e. the provider
// will be queried as the last one). // will be queried as the last one).
static void Insert(wxArtProvider *provider); static void Insert(wxArtProvider *provider);
// Remove latest added provider and delete it. // Remove latest added provider and delete it.
static bool Pop(); static bool Pop();
// Remove provider from providers stack but don't delete it. // Remove provider from providers stack but don't delete it.
static bool Remove(wxArtProvider *provider); static bool Remove(wxArtProvider *provider);
// Delete the given provider and remove it from the providers stack. // Delete the given provider and remove it from the providers stack.
static bool Delete(wxArtProvider *provider); static bool Delete(wxArtProvider *provider);
// Query the providers for bitmap with given ID and return it. Return // Query the providers for bitmap with given ID and return it. Return
// wxNullBitmap if no provider provides it. // wxNullBitmap if no provider provides it.
static wxBitmap GetBitmap(const wxArtID& id, static wxBitmap GetBitmap(const wxArtID& id,
const wxArtClient& client = wxART_OTHER, const wxArtClient& client = wxART_OTHER,
const wxSize& size = wxDefaultSize); const wxSize& size = wxDefaultSize);
// Query the providers for icon with given ID and return it. Return // Query the providers for icon with given ID and return it. Return
// wxNullIcon if no provider provides it. // wxNullIcon if no provider provides it.
static wxIcon GetIcon(const wxArtID& id, static wxIcon GetIcon(const wxArtID& id,
const wxArtClient& client = wxART_OTHER, const wxArtClient& client = wxART_OTHER,
const wxSize& size = wxDefaultSize); const wxSize& size = wxDefaultSize);
// Get the size hint of an icon from a specific wxArtClient, queries // Get the size hint of an icon from a specific wxArtClient, queries
// the topmost provider if platform_dependent = false // the topmost provider if platform_dependent = false
static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false); static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
// use the corresponding methods without redundant "Provider" suffix // use the corresponding methods without redundant "Provider" suffix
wxDEPRECATED( static void PushProvider(wxArtProvider *provider) ); wxDEPRECATED( static void PushProvider(wxArtProvider *provider) );
wxDEPRECATED( static void InsertProvider(wxArtProvider *provider) ); wxDEPRECATED( static void InsertProvider(wxArtProvider *provider) );
wxDEPRECATED( static bool PopProvider() ); wxDEPRECATED( static bool PopProvider() );
// use Delete() if this is what you really need, or just delete the // use Delete() if this is what you really need, or just delete the
// provider pointer, do not use Remove() as it does not delete the pointer // provider pointer, do not use Remove() as it does not delete the pointer
// unlike RemoveProvider() which does // unlike RemoveProvider() which does
wxDEPRECATED( static bool RemoveProvider(wxArtProvider *provider) ); wxDEPRECATED( static bool RemoveProvider(wxArtProvider *provider) );
#endif // WXWIN_COMPATIBILITY_2_6 #endif // WXWIN_COMPATIBILITY_2_6
protected: protected:
friend class wxArtProviderModule; friend class wxArtProviderModule;
// Initializes default provider // Initializes default provider
static void InitStdProvider(); static void InitStdProvider();
// Initializes platform's native provider, if available (e.g. GTK2) // Initializes platform's native provider, if available (e.g. GTK2)
static void InitNativeProvider(); static void InitNativeProvider();
// Destroy caches & all providers // Destroy caches & all providers
static void CleanUpProviders(); static void CleanUpProviders();
// Get the default size of an icon for a specific client // Get the default size of an icon for a specific client
virtual wxSize DoGetSizeHint(const wxArtClient& client) virtual wxSize DoGetSizeHint(const wxArtClient& client)
{ {
return GetSizeHint(client, true); return GetSizeHint(client, true);
} }
// Derived classes must override this method to create requested // Derived classes must override this method to create requested
// art resource. This method is called only once per instance's // art resource. This method is called only once per instance's
// lifetime for each requested wxArtID. // lifetime for each requested wxArtID.
virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id), virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id),
const wxArtClient& WXUNUSED(client), const wxArtClient& WXUNUSED(client),
const wxSize& WXUNUSED(size)) = 0; const wxSize& WXUNUSED(size)) = 0;
private: private:
static void CommonAddingProvider(); static void CommonAddingProvider();
private: private:
// list of providers: // list of providers:
static wxArtProvidersList *sm_providers; static wxArtProvidersList *sm_providers;
// art resources cache (so that CreateXXX is not called that often): // art resources cache (so that CreateXXX is not called that often):
static wxArtProviderCache *sm_cache; static wxArtProviderCache *sm_cache;
DECLARE_ABSTRACT_CLASS(wxArtProvider) DECLARE_ABSTRACT_CLASS(wxArtProvider)
}; };
#endif // _WX_ARTPROV_H_ #endif // _WX_ARTPROV_H_

View File

@@ -1,22 +1,22 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/aui/aui.h // Name: wx/aui/aui.h
// Purpose: wxaui: wx advanced user interface - docking window manager // Purpose: wxaui: wx advanced user interface - docking window manager
// Author: Benjamin I. Williams // Author: Benjamin I. Williams
// Modified by: // Modified by:
// Created: 2005-05-17 // Created: 2005-05-17
// RCS-ID: $Id: aui.h 40232 2006-07-22 13:14:07Z BIW $ // RCS-ID: $Id: aui.h 40232 2006-07-22 13:14:07Z BIW $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1 // Licence: wxWindows Library Licence, Version 3.1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_AUI_H_ #ifndef _WX_AUI_H_
#define _WX_AUI_H_ #define _WX_AUI_H_
#include "wx/aui/framemanager.h" #include "wx/aui/framemanager.h"
#include "wx/aui/dockart.h" #include "wx/aui/dockart.h"
#include "wx/aui/floatpane.h" #include "wx/aui/floatpane.h"
#include "wx/aui/auibook.h" #include "wx/aui/auibook.h"
#include "wx/aui/tabmdi.h" #include "wx/aui/tabmdi.h"
#endif // _WX_AUI_H_ #endif // _WX_AUI_H_

File diff suppressed because it is too large Load Diff

View File

@@ -1,173 +1,173 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/aui/dockart.h // Name: wx/aui/dockart.h
// Purpose: wxaui: wx advanced user interface - docking window manager // Purpose: wxaui: wx advanced user interface - docking window manager
// Author: Benjamin I. Williams // Author: Benjamin I. Williams
// Modified by: // Modified by:
// Created: 2005-05-17 // Created: 2005-05-17
// RCS-ID: $Id: dockart.h 43154 2006-11-07 10:29:02Z BIW $ // RCS-ID: $Id: dockart.h 43154 2006-11-07 10:29:02Z BIW $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1 // Licence: wxWindows Library Licence, Version 3.1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DOCKART_H_ #ifndef _WX_DOCKART_H_
#define _WX_DOCKART_H_ #define _WX_DOCKART_H_
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_AUI #if wxUSE_AUI
#include "wx/pen.h" #include "wx/pen.h"
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/colour.h" #include "wx/colour.h"
// dock art provider code - a dock provider provides all drawing // dock art provider code - a dock provider provides all drawing
// functionality to the wxAui dock manager. This allows the dock // functionality to the wxAui dock manager. This allows the dock
// manager to have plugable look-and-feels // manager to have plugable look-and-feels
class WXDLLIMPEXP_AUI wxAuiDockArt class WXDLLIMPEXP_AUI wxAuiDockArt
{ {
public: public:
wxAuiDockArt() { } wxAuiDockArt() { }
virtual ~wxAuiDockArt() { } virtual ~wxAuiDockArt() { }
virtual int GetMetric(int id) = 0; virtual int GetMetric(int id) = 0;
virtual void SetMetric(int id, int new_val) = 0; virtual void SetMetric(int id, int new_val) = 0;
virtual void SetFont(int id, const wxFont& font) = 0; virtual void SetFont(int id, const wxFont& font) = 0;
virtual wxFont GetFont(int id) = 0; virtual wxFont GetFont(int id) = 0;
virtual wxColour GetColour(int id) = 0; virtual wxColour GetColour(int id) = 0;
virtual void SetColour(int id, const wxColor& colour) = 0; virtual void SetColour(int id, const wxColor& colour) = 0;
wxColour GetColor(int id) { return GetColour(id); } wxColour GetColor(int id) { return GetColour(id); }
void SetColor(int id, const wxColour& color) { SetColour(id, color); } void SetColor(int id, const wxColour& color) { SetColour(id, color); }
virtual void DrawSash(wxDC& dc, virtual void DrawSash(wxDC& dc,
wxWindow* window, wxWindow* window,
int orientation, int orientation,
const wxRect& rect) = 0; const wxRect& rect) = 0;
virtual void DrawBackground(wxDC& dc, virtual void DrawBackground(wxDC& dc,
wxWindow* window, wxWindow* window,
int orientation, int orientation,
const wxRect& rect) = 0; const wxRect& rect) = 0;
virtual void DrawCaption(wxDC& dc, virtual void DrawCaption(wxDC& dc,
wxWindow* window, wxWindow* window,
const wxString& text, const wxString& text,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane) = 0; wxAuiPaneInfo& pane) = 0;
virtual void DrawGripper(wxDC& dc, virtual void DrawGripper(wxDC& dc,
wxWindow* window, wxWindow* window,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane) = 0; wxAuiPaneInfo& pane) = 0;
virtual void DrawBorder(wxDC& dc, virtual void DrawBorder(wxDC& dc,
wxWindow* window, wxWindow* window,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane) = 0; wxAuiPaneInfo& pane) = 0;
virtual void DrawPaneButton(wxDC& dc, virtual void DrawPaneButton(wxDC& dc,
wxWindow* window, wxWindow* window,
int button, int button,
int button_state, int button_state,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane) = 0; wxAuiPaneInfo& pane) = 0;
}; };
// this is the default art provider for wxAuiManager. Dock art // this is the default art provider for wxAuiManager. Dock art
// can be customized by creating a class derived from this one, // can be customized by creating a class derived from this one,
// or replacing this class entirely // or replacing this class entirely
class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
{ {
public: public:
wxAuiDefaultDockArt(); wxAuiDefaultDockArt();
int GetMetric(int metric_id); int GetMetric(int metric_id);
void SetMetric(int metric_id, int new_val); void SetMetric(int metric_id, int new_val);
wxColour GetColour(int id); wxColour GetColour(int id);
void SetColour(int id, const wxColor& colour); void SetColour(int id, const wxColor& colour);
void SetFont(int id, const wxFont& font); void SetFont(int id, const wxFont& font);
wxFont GetFont(int id); wxFont GetFont(int id);
void DrawSash(wxDC& dc, void DrawSash(wxDC& dc,
wxWindow *window, wxWindow *window,
int orientation, int orientation,
const wxRect& rect); const wxRect& rect);
void DrawBackground(wxDC& dc, void DrawBackground(wxDC& dc,
wxWindow *window, wxWindow *window,
int orientation, int orientation,
const wxRect& rect); const wxRect& rect);
void DrawCaption(wxDC& dc, void DrawCaption(wxDC& dc,
wxWindow *window, wxWindow *window,
const wxString& text, const wxString& text,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane); wxAuiPaneInfo& pane);
void DrawGripper(wxDC& dc, void DrawGripper(wxDC& dc,
wxWindow *window, wxWindow *window,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane); wxAuiPaneInfo& pane);
void DrawBorder(wxDC& dc, void DrawBorder(wxDC& dc,
wxWindow *window, wxWindow *window,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane); wxAuiPaneInfo& pane);
void DrawPaneButton(wxDC& dc, void DrawPaneButton(wxDC& dc,
wxWindow *window, wxWindow *window,
int button, int button,
int button_state, int button_state,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane); wxAuiPaneInfo& pane);
protected: protected:
void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active); void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
protected: protected:
wxPen m_border_pen; wxPen m_border_pen;
wxBrush m_sash_brush; wxBrush m_sash_brush;
wxBrush m_background_brush; wxBrush m_background_brush;
wxBrush m_gripper_brush; wxBrush m_gripper_brush;
wxFont m_caption_font; wxFont m_caption_font;
wxBitmap m_inactive_close_bitmap; wxBitmap m_inactive_close_bitmap;
wxBitmap m_inactive_pin_bitmap; wxBitmap m_inactive_pin_bitmap;
wxBitmap m_inactive_maximize_bitmap; wxBitmap m_inactive_maximize_bitmap;
wxBitmap m_inactive_restore_bitmap; wxBitmap m_inactive_restore_bitmap;
wxBitmap m_active_close_bitmap; wxBitmap m_active_close_bitmap;
wxBitmap m_active_pin_bitmap; wxBitmap m_active_pin_bitmap;
wxBitmap m_active_maximize_bitmap; wxBitmap m_active_maximize_bitmap;
wxBitmap m_active_restore_bitmap; wxBitmap m_active_restore_bitmap;
wxPen m_gripper_pen1; wxPen m_gripper_pen1;
wxPen m_gripper_pen2; wxPen m_gripper_pen2;
wxPen m_gripper_pen3; wxPen m_gripper_pen3;
wxColour m_base_colour; wxColour m_base_colour;
wxColour m_active_caption_colour; wxColour m_active_caption_colour;
wxColour m_active_caption_gradient_colour; wxColour m_active_caption_gradient_colour;
wxColour m_active_caption_text_colour; wxColour m_active_caption_text_colour;
wxColour m_inactive_caption_colour; wxColour m_inactive_caption_colour;
wxColour m_inactive_caption_gradient_colour; wxColour m_inactive_caption_gradient_colour;
wxColour m_inactive_caption_text_colour; wxColour m_inactive_caption_text_colour;
int m_border_size; int m_border_size;
int m_caption_size; int m_caption_size;
int m_sash_size; int m_sash_size;
int m_button_size; int m_button_size;
int m_gripper_size; int m_gripper_size;
int m_gradient_type; int m_gradient_type;
}; };
#endif // wxUSE_AUI #endif // wxUSE_AUI
#endif //_WX_DOCKART_H_ #endif //_WX_DOCKART_H_

View File

@@ -1,81 +1,81 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/aui/floatpane.h // Name: wx/aui/floatpane.h
// Purpose: wxaui: wx advanced user interface - docking window manager // Purpose: wxaui: wx advanced user interface - docking window manager
// Author: Benjamin I. Williams // Author: Benjamin I. Williams
// Modified by: // Modified by:
// Created: 2005-05-17 // Created: 2005-05-17
// RCS-ID: $Id: floatpane.h 43467 2006-11-17 13:07:01Z BIW $ // RCS-ID: $Id: floatpane.h 43467 2006-11-17 13:07:01Z BIW $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1 // Licence: wxWindows Library Licence, Version 3.1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FLOATPANE_H_ #ifndef _WX_FLOATPANE_H_
#define _WX_FLOATPANE_H_ #define _WX_FLOATPANE_H_
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_AUI #if wxUSE_AUI
#include "wx/frame.h" #include "wx/frame.h"
#if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ ) #if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
#include "wx/minifram.h" #include "wx/minifram.h"
#define wxAuiFloatingFrameBaseClass wxMiniFrame #define wxAuiFloatingFrameBaseClass wxMiniFrame
#else #else
#define wxAuiFloatingFrameBaseClass wxFrame #define wxAuiFloatingFrameBaseClass wxFrame
#endif #endif
class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
{ {
public: public:
wxAuiFloatingFrame(wxWindow* parent, wxAuiFloatingFrame(wxWindow* parent,
wxAuiManager* owner_mgr, wxAuiManager* owner_mgr,
const wxAuiPaneInfo& pane, const wxAuiPaneInfo& pane,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
wxCLIP_CHILDREN wxCLIP_CHILDREN
); );
virtual ~wxAuiFloatingFrame(); virtual ~wxAuiFloatingFrame();
void SetPaneWindow(const wxAuiPaneInfo& pane); void SetPaneWindow(const wxAuiPaneInfo& pane);
wxAuiManager* GetOwnerManager() const; wxAuiManager* GetOwnerManager() const;
protected: protected:
virtual void OnMoveStart(); virtual void OnMoveStart();
virtual void OnMoving(const wxRect& window_rect, wxDirection dir); virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
virtual void OnMoveFinished(); virtual void OnMoveFinished();
private: private:
void OnSize(wxSizeEvent& event); void OnSize(wxSizeEvent& event);
void OnClose(wxCloseEvent& event); void OnClose(wxCloseEvent& event);
void OnMoveEvent(wxMoveEvent& event); void OnMoveEvent(wxMoveEvent& event);
void OnIdle(wxIdleEvent& event); void OnIdle(wxIdleEvent& event);
void OnActivate(wxActivateEvent& event); void OnActivate(wxActivateEvent& event);
static bool isMouseDown(); static bool isMouseDown();
private: private:
wxWindow* m_pane_window; // pane window being managed wxWindow* m_pane_window; // pane window being managed
bool m_solid_drag; // true if system uses solid window drag bool m_solid_drag; // true if system uses solid window drag
bool m_moving; bool m_moving;
wxRect m_last_rect; wxRect m_last_rect;
wxRect m_last2_rect; wxRect m_last2_rect;
wxRect m_last3_rect; wxRect m_last3_rect;
wxSize m_last_size; wxSize m_last_size;
wxDirection m_lastDirection; wxDirection m_lastDirection;
wxAuiManager* m_owner_mgr; wxAuiManager* m_owner_mgr;
wxAuiManager m_mgr; wxAuiManager m_mgr;
#ifndef SWIG #ifndef SWIG
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxAuiFloatingFrame) DECLARE_CLASS(wxAuiFloatingFrame)
#endif // SWIG #endif // SWIG
}; };
#endif // wxUSE_AUI #endif // wxUSE_AUI
#endif //_WX_FLOATPANE_H_ #endif //_WX_FLOATPANE_H_

File diff suppressed because it is too large Load Diff

View File

@@ -1,269 +1,269 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/tabmdi.h // Name: wx/generic/tabmdi.h
// Purpose: Generic MDI (Multiple Document Interface) classes // Purpose: Generic MDI (Multiple Document Interface) classes
// Author: Hans Van Leemputten // Author: Hans Van Leemputten
// Modified by: Benjamin I. Williams / Kirix Corporation // Modified by: Benjamin I. Williams / Kirix Corporation
// Created: 29/07/2002 // Created: 29/07/2002
// RCS-ID: $Id: tabmdi.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: tabmdi.h 53135 2008-04-12 02:31:04Z VZ $
// Copyright: (c) Hans Van Leemputten // Copyright: (c) Hans Van Leemputten
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_AUITABMDI_H_ #ifndef _WX_AUITABMDI_H_
#define _WX_AUITABMDI_H_ #define _WX_AUITABMDI_H_
#if wxUSE_AUI #if wxUSE_AUI
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/panel.h" #include "wx/panel.h"
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/aui/auibook.h" #include "wx/aui/auibook.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// classes // classes
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_AUI wxAuiMDIParentFrame; class WXDLLIMPEXP_FWD_AUI wxAuiMDIParentFrame;
class WXDLLIMPEXP_FWD_AUI wxAuiMDIClientWindow; class WXDLLIMPEXP_FWD_AUI wxAuiMDIClientWindow;
class WXDLLIMPEXP_FWD_AUI wxAuiMDIChildFrame; class WXDLLIMPEXP_FWD_AUI wxAuiMDIChildFrame;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxAuiMDIParentFrame // wxAuiMDIParentFrame
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame
{ {
public: public:
wxAuiMDIParentFrame(); wxAuiMDIParentFrame();
wxAuiMDIParentFrame(wxWindow *parent, wxAuiMDIParentFrame(wxWindow *parent,
wxWindowID winid, wxWindowID winid,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr); const wxString& name = wxFrameNameStr);
~wxAuiMDIParentFrame(); ~wxAuiMDIParentFrame();
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID winid, wxWindowID winid,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr ); const wxString& name = wxFrameNameStr );
void SetArtProvider(wxAuiTabArt* provider); void SetArtProvider(wxAuiTabArt* provider);
wxAuiTabArt* GetArtProvider(); wxAuiTabArt* GetArtProvider();
wxAuiNotebook* GetNotebook() const; wxAuiNotebook* GetNotebook() const;
#if wxUSE_MENUS #if wxUSE_MENUS
wxMenu* GetWindowMenu() const { return m_pWindowMenu; } wxMenu* GetWindowMenu() const { return m_pWindowMenu; }
void SetWindowMenu(wxMenu* pMenu); void SetWindowMenu(wxMenu* pMenu);
virtual void SetMenuBar(wxMenuBar *pMenuBar); virtual void SetMenuBar(wxMenuBar *pMenuBar);
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
void SetChildMenuBar(wxAuiMDIChildFrame *pChild); void SetChildMenuBar(wxAuiMDIChildFrame *pChild);
virtual bool ProcessEvent(wxEvent& event); virtual bool ProcessEvent(wxEvent& event);
wxAuiMDIChildFrame *GetActiveChild() const; wxAuiMDIChildFrame *GetActiveChild() const;
void SetActiveChild(wxAuiMDIChildFrame* pChildFrame); void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
wxAuiMDIClientWindow *GetClientWindow() const; wxAuiMDIClientWindow *GetClientWindow() const;
virtual wxAuiMDIClientWindow *OnCreateClient(); virtual wxAuiMDIClientWindow *OnCreateClient();
virtual void Cascade() { /* Has no effect */ } virtual void Cascade() { /* Has no effect */ }
virtual void Tile(wxOrientation orient = wxHORIZONTAL); virtual void Tile(wxOrientation orient = wxHORIZONTAL);
virtual void ArrangeIcons() { /* Has no effect */ } virtual void ArrangeIcons() { /* Has no effect */ }
virtual void ActivateNext(); virtual void ActivateNext();
virtual void ActivatePrevious(); virtual void ActivatePrevious();
protected: protected:
wxAuiMDIClientWindow* m_pClientWindow; wxAuiMDIClientWindow* m_pClientWindow;
wxAuiMDIChildFrame* m_pActiveChild; wxAuiMDIChildFrame* m_pActiveChild;
wxEvent* m_pLastEvt; wxEvent* m_pLastEvt;
#if wxUSE_MENUS #if wxUSE_MENUS
wxMenu *m_pWindowMenu; wxMenu *m_pWindowMenu;
wxMenuBar *m_pMyMenuBar; wxMenuBar *m_pMyMenuBar;
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
protected: protected:
void Init(); void Init();
#if wxUSE_MENUS #if wxUSE_MENUS
void RemoveWindowMenu(wxMenuBar *pMenuBar); void RemoveWindowMenu(wxMenuBar *pMenuBar);
void AddWindowMenu(wxMenuBar *pMenuBar); void AddWindowMenu(wxMenuBar *pMenuBar);
void DoHandleMenu(wxCommandEvent &event); void DoHandleMenu(wxCommandEvent &event);
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
virtual void DoGetClientSize(int *width, int *height) const; virtual void DoGetClientSize(int *width, int *height) const;
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame) DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame)
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxAuiMDIChildFrame // wxAuiMDIChildFrame
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel
{ {
public: public:
wxAuiMDIChildFrame(); wxAuiMDIChildFrame();
wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent, wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
wxWindowID winid, wxWindowID winid,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr); const wxString& name = wxFrameNameStr);
virtual ~wxAuiMDIChildFrame(); virtual ~wxAuiMDIChildFrame();
bool Create(wxAuiMDIParentFrame *parent, bool Create(wxAuiMDIParentFrame *parent,
wxWindowID winid, wxWindowID winid,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr); const wxString& name = wxFrameNameStr);
#if wxUSE_MENUS #if wxUSE_MENUS
virtual void SetMenuBar(wxMenuBar *menu_bar); virtual void SetMenuBar(wxMenuBar *menu_bar);
virtual wxMenuBar *GetMenuBar() const; virtual wxMenuBar *GetMenuBar() const;
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
virtual void SetTitle(const wxString& title); virtual void SetTitle(const wxString& title);
virtual wxString GetTitle() const; virtual wxString GetTitle() const;
virtual void SetIcons(const wxIconBundle& icons); virtual void SetIcons(const wxIconBundle& icons);
virtual const wxIconBundle& GetIcons() const; virtual const wxIconBundle& GetIcons() const;
virtual void SetIcon(const wxIcon& icon); virtual void SetIcon(const wxIcon& icon);
virtual const wxIcon& GetIcon() const; virtual const wxIcon& GetIcon() const;
virtual void Activate(); virtual void Activate();
virtual bool Destroy(); virtual bool Destroy();
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
// no status bars // no status bars
virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1, virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1,
long WXUNUSED(style) = 1, long WXUNUSED(style) = 1,
wxWindowID WXUNUSED(winid) = 1, wxWindowID WXUNUSED(winid) = 1,
const wxString& WXUNUSED(name) = wxEmptyString) const wxString& WXUNUSED(name) = wxEmptyString)
{ return (wxStatusBar*)NULL; } { return (wxStatusBar*)NULL; }
virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; } virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; }
virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {} virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {}
virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {} virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
#endif #endif
// no size hints // no size hints
virtual void DoSetSizeHints(int WXUNUSED(minW), virtual void DoSetSizeHints(int WXUNUSED(minW),
int WXUNUSED(minH), int WXUNUSED(minH),
int WXUNUSED(maxW) = wxDefaultCoord, int WXUNUSED(maxW) = wxDefaultCoord,
int WXUNUSED(maxH) = wxDefaultCoord, int WXUNUSED(maxH) = wxDefaultCoord,
int WXUNUSED(incW) = wxDefaultCoord, int WXUNUSED(incW) = wxDefaultCoord,
int WXUNUSED(incH) = wxDefaultCoord) {} int WXUNUSED(incH) = wxDefaultCoord) {}
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
// no toolbar bars // no toolbar bars
virtual wxToolBar* CreateToolBar(long WXUNUSED(style), virtual wxToolBar* CreateToolBar(long WXUNUSED(style),
wxWindowID WXUNUSED(winid), wxWindowID WXUNUSED(winid),
const wxString& WXUNUSED(name)) const wxString& WXUNUSED(name))
{ return (wxToolBar*)NULL; } { return (wxToolBar*)NULL; }
virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; } virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
#endif #endif
// no maximize etc // no maximize etc
virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ } virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ }
virtual void Restore() { /* Has no effect */ } virtual void Restore() { /* Has no effect */ }
virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ } virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ }
virtual bool IsMaximized() const { return true; } virtual bool IsMaximized() const { return true; }
virtual bool IsIconized() const { return false; } virtual bool IsIconized() const { return false; }
virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; } virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; }
virtual bool IsFullScreen() const { return false; } virtual bool IsFullScreen() const { return false; }
virtual bool IsTopLevel() const { return false; } virtual bool IsTopLevel() const { return false; }
void OnMenuHighlight(wxMenuEvent& evt); void OnMenuHighlight(wxMenuEvent& evt);
void OnActivate(wxActivateEvent& evt); void OnActivate(wxActivateEvent& evt);
void OnCloseWindow(wxCloseEvent& evt); void OnCloseWindow(wxCloseEvent& evt);
void SetMDIParentFrame(wxAuiMDIParentFrame* parent); void SetMDIParentFrame(wxAuiMDIParentFrame* parent);
wxAuiMDIParentFrame* GetMDIParentFrame() const; wxAuiMDIParentFrame* GetMDIParentFrame() const;
protected: protected:
void Init(); void Init();
virtual bool Show(bool show = true); virtual bool Show(bool show = true);
virtual void DoSetSize(int x, int y, int width, int height, int size_flags); virtual void DoSetSize(int x, int y, int width, int height, int size_flags);
virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoMoveWindow(int x, int y, int width, int height);
public: public:
// This function needs to be called when a size change is confirmed, // This function needs to be called when a size change is confirmed,
// we needed this function to prevent anybody from the outside // we needed this function to prevent anybody from the outside
// changing the panel... it messes the UI layout when we would allow it. // changing the panel... it messes the UI layout when we would allow it.
void ApplyMDIChildFrameRect(); void ApplyMDIChildFrameRect();
void DoShow(bool show); void DoShow(bool show);
protected: protected:
wxAuiMDIParentFrame* m_pMDIParentFrame; wxAuiMDIParentFrame* m_pMDIParentFrame;
wxRect m_mdi_newrect; wxRect m_mdi_newrect;
wxRect m_mdi_currect; wxRect m_mdi_currect;
wxString m_title; wxString m_title;
wxIcon m_icon; wxIcon m_icon;
wxIconBundle m_icon_bundle; wxIconBundle m_icon_bundle;
bool m_activate_on_create; bool m_activate_on_create;
#if wxUSE_MENUS #if wxUSE_MENUS
wxMenuBar* m_pMenuBar; wxMenuBar* m_pMenuBar;
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
private: private:
DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame) DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
friend class wxAuiMDIClientWindow; friend class wxAuiMDIClientWindow;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxAuiMDIClientWindow // wxAuiMDIClientWindow
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook
{ {
public: public:
wxAuiMDIClientWindow(); wxAuiMDIClientWindow();
wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0); wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
~wxAuiMDIClientWindow(); ~wxAuiMDIClientWindow();
virtual bool CreateClient(wxAuiMDIParentFrame *parent, virtual bool CreateClient(wxAuiMDIParentFrame *parent,
long style = wxVSCROLL | wxHSCROLL); long style = wxVSCROLL | wxHSCROLL);
virtual int SetSelection(size_t page); virtual int SetSelection(size_t page);
protected: protected:
void PageChanged(int old_selection, int new_selection); void PageChanged(int old_selection, int new_selection);
void OnPageClose(wxAuiNotebookEvent& evt); void OnPageClose(wxAuiNotebookEvent& evt);
void OnPageChanged(wxAuiNotebookEvent& evt); void OnPageChanged(wxAuiNotebookEvent& evt);
void OnSize(wxSizeEvent& evt); void OnSize(wxSizeEvent& evt);
private: private:
DECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow) DECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#endif // wxUSE_AUI #endif // wxUSE_AUI
#endif // _WX_AUITABMDI_H_ #endif // _WX_AUITABMDI_H_

View File

@@ -1,65 +1,65 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: include/wx/beforestd.h // Name: include/wx/beforestd.h
// Purpose: #include before STL headers // Purpose: #include before STL headers
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 07/07/03 // Created: 07/07/03
// RCS-ID: $Id: beforestd.h 42906 2006-11-01 14:16:42Z VZ $ // RCS-ID: $Id: beforestd.h 42906 2006-11-01 14:16:42Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/** /**
Unfortunately, when compiling at maximum warning level, the standard Unfortunately, when compiling at maximum warning level, the standard
headers themselves may generate warnings -- and really lots of them. So headers themselves may generate warnings -- and really lots of them. So
before including them, this header should be included to temporarily before including them, this header should be included to temporarily
suppress the warnings and after this the header afterstd.h should be suppress the warnings and after this the header afterstd.h should be
included to enable them back again. included to enable them back again.
Note that there are intentionally no inclusion guards in this file, because Note that there are intentionally no inclusion guards in this file, because
it can be included several times. it can be included several times.
*/ */
// VC 7.x isn't as bad as VC6 and doesn't give these warnings but eVC (which // VC 7.x isn't as bad as VC6 and doesn't give these warnings but eVC (which
// defines _MSC_VER as 1201) does need to be included as it's VC6-like // defines _MSC_VER as 1201) does need to be included as it's VC6-like
#if defined(__VISUALC__) && __VISUALC__ <= 1201 #if defined(__VISUALC__) && __VISUALC__ <= 1201
// MSVC 5 does not have this // MSVC 5 does not have this
#if __VISUALC__ > 1100 #if __VISUALC__ > 1100
// we have to disable (and reenable in afterstd.h) this one because, // we have to disable (and reenable in afterstd.h) this one because,
// even though it is of level 4, it is not disabled by warning(push, 1) // even though it is of level 4, it is not disabled by warning(push, 1)
// below for VC7.1! // below for VC7.1!
// unreachable code // unreachable code
#pragma warning(disable:4702) #pragma warning(disable:4702)
#pragma warning(push, 1) #pragma warning(push, 1)
#else // VC 5 #else // VC 5
// 'expression' : signed/unsigned mismatch // 'expression' : signed/unsigned mismatch
#pragma warning(disable:4018) #pragma warning(disable:4018)
// 'identifier' : unreferenced formal parameter // 'identifier' : unreferenced formal parameter
#pragma warning(disable:4100) #pragma warning(disable:4100)
// 'conversion' : conversion from 'type1' to 'type2', // 'conversion' : conversion from 'type1' to 'type2',
// possible loss of data // possible loss of data
#pragma warning(disable:4244) #pragma warning(disable:4244)
// C++ language change: to explicitly specialize class template // C++ language change: to explicitly specialize class template
// 'identifier' use the following syntax // 'identifier' use the following syntax
#pragma warning(disable:4663) #pragma warning(disable:4663)
#endif #endif
// these warning have to be disabled and not just temporarily disabled // these warning have to be disabled and not just temporarily disabled
// because they will be given at the end of the compilation of the // because they will be given at the end of the compilation of the
// current source and there is absolutely nothing we can do about them // current source and there is absolutely nothing we can do about them
// 'foo': unreferenced inline function has been removed // 'foo': unreferenced inline function has been removed
#pragma warning(disable:4514) #pragma warning(disable:4514)
// 'function' : function not inlined // 'function' : function not inlined
#pragma warning(disable:4710) #pragma warning(disable:4710)
// 'id': identifier was truncated to 'num' characters in the debug info // 'id': identifier was truncated to 'num' characters in the debug info
#pragma warning(disable:4786) #pragma warning(disable:4786)
#endif // VC++ < 7 #endif // VC++ < 7

View File

@@ -1,241 +1,241 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/bitmap.h // Name: wx/bitmap.h
// Purpose: wxBitmap class interface // Purpose: wxBitmap class interface
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Modified by: // Modified by:
// Created: 22.04.01 // Created: 22.04.01
// RCS-ID: $Id: bitmap.h 49563 2007-10-31 20:46:21Z VZ $ // RCS-ID: $Id: bitmap.h 49563 2007-10-31 20:46:21Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BITMAP_H_BASE_ #ifndef _WX_BITMAP_H_BASE_
#define _WX_BITMAP_H_BASE_ #define _WX_BITMAP_H_BASE_
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/string.h" #include "wx/string.h"
#include "wx/gdicmn.h" // for wxBitmapType #include "wx/gdicmn.h" // for wxBitmapType
#include "wx/colour.h" #include "wx/colour.h"
class WXDLLIMPEXP_FWD_CORE wxBitmap; class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
class WXDLLIMPEXP_FWD_CORE wxIcon; class WXDLLIMPEXP_FWD_CORE wxIcon;
class WXDLLIMPEXP_FWD_CORE wxImage; class WXDLLIMPEXP_FWD_CORE wxImage;
class WXDLLIMPEXP_FWD_CORE wxMask; class WXDLLIMPEXP_FWD_CORE wxMask;
class WXDLLIMPEXP_FWD_CORE wxPalette; class WXDLLIMPEXP_FWD_CORE wxPalette;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxVariant support // wxVariant support
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_VARIANT #if wxUSE_VARIANT
#include "wx/variant.h" #include "wx/variant.h"
DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLEXPORT) DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLEXPORT)
#endif #endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxMask represents the transparent area of the bitmap // wxMask represents the transparent area of the bitmap
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxMaskBase : public wxObject class WXDLLEXPORT wxMaskBase : public wxObject
{ {
public: public:
// create the mask from bitmap pixels of the given colour // create the mask from bitmap pixels of the given colour
bool Create(const wxBitmap& bitmap, const wxColour& colour); bool Create(const wxBitmap& bitmap, const wxColour& colour);
#if wxUSE_PALETTE #if wxUSE_PALETTE
// create the mask from bitmap pixels with the given palette index // create the mask from bitmap pixels with the given palette index
bool Create(const wxBitmap& bitmap, int paletteIndex); bool Create(const wxBitmap& bitmap, int paletteIndex);
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
// create the mask from the given mono bitmap // create the mask from the given mono bitmap
bool Create(const wxBitmap& bitmap); bool Create(const wxBitmap& bitmap);
protected: protected:
// this function is called from Create() to free the existing mask data // this function is called from Create() to free the existing mask data
virtual void FreeData() = 0; virtual void FreeData() = 0;
// these functions must be overridden to implement the corresponding public // these functions must be overridden to implement the corresponding public
// Create() methods, they shouldn't call FreeData() as it's already called // Create() methods, they shouldn't call FreeData() as it's already called
// by the public wrappers // by the public wrappers
virtual bool InitFromColour(const wxBitmap& bitmap, virtual bool InitFromColour(const wxBitmap& bitmap,
const wxColour& colour) = 0; const wxColour& colour) = 0;
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0; virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
}; };
#if defined(__WXMGL__) || \ #if defined(__WXMGL__) || \
defined(__WXDFB__) || \ defined(__WXDFB__) || \
defined(__WXMAC__) || \ defined(__WXMAC__) || \
defined(__WXGTK__) || \ defined(__WXGTK__) || \
defined(__WXCOCOA__) || \ defined(__WXCOCOA__) || \
defined(__WXMOTIF__) || \ defined(__WXMOTIF__) || \
defined(__WXX11__) defined(__WXX11__)
#define wxUSE_BITMAP_BASE 1 #define wxUSE_BITMAP_BASE 1
#else #else
#define wxUSE_BITMAP_BASE 0 #define wxUSE_BITMAP_BASE 0
#endif #endif
// Only used by some ports // Only used by some ports
// FIXME -- make all ports (but MSW which uses wxGDIImage) use these base classes // FIXME -- make all ports (but MSW which uses wxGDIImage) use these base classes
#if wxUSE_BITMAP_BASE #if wxUSE_BITMAP_BASE
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxBitmapHandler: class which knows how to create/load/save bitmaps in // wxBitmapHandler: class which knows how to create/load/save bitmaps in
// different formats // different formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxBitmapHandlerBase : public wxObject class WXDLLEXPORT wxBitmapHandlerBase : public wxObject
{ {
public: public:
wxBitmapHandlerBase() { m_type = wxBITMAP_TYPE_INVALID; } wxBitmapHandlerBase() { m_type = wxBITMAP_TYPE_INVALID; }
virtual ~wxBitmapHandlerBase() { } virtual ~wxBitmapHandlerBase() { }
virtual bool Create(wxBitmap *bitmap, const void* data, long flags, virtual bool Create(wxBitmap *bitmap, const void* data, long flags,
int width, int height, int depth = 1); int width, int height, int depth = 1);
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight); int desiredWidth, int desiredHeight);
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name,
int type, const wxPalette *palette = NULL); int type, const wxPalette *palette = NULL);
void SetName(const wxString& name) { m_name = name; } void SetName(const wxString& name) { m_name = name; }
void SetExtension(const wxString& ext) { m_extension = ext; } void SetExtension(const wxString& ext) { m_extension = ext; }
void SetType(wxBitmapType type) { m_type = type; } void SetType(wxBitmapType type) { m_type = type; }
const wxString& GetName() const { return m_name; } const wxString& GetName() const { return m_name; }
const wxString& GetExtension() const { return m_extension; } const wxString& GetExtension() const { return m_extension; }
wxBitmapType GetType() const { return m_type; } wxBitmapType GetType() const { return m_type; }
private: private:
wxString m_name; wxString m_name;
wxString m_extension; wxString m_extension;
wxBitmapType m_type; wxBitmapType m_type;
DECLARE_ABSTRACT_CLASS(wxBitmapHandlerBase) DECLARE_ABSTRACT_CLASS(wxBitmapHandlerBase)
}; };
class WXDLLEXPORT wxBitmapBase : public wxGDIObject class WXDLLEXPORT wxBitmapBase : public wxGDIObject
{ {
public: public:
/* /*
Derived class must implement these: Derived class must implement these:
wxBitmap(); wxBitmap();
wxBitmap(int width, int height, int depth = -1); wxBitmap(int width, int height, int depth = -1);
wxBitmap(const char bits[], int width, int height, int depth = 1); wxBitmap(const char bits[], int width, int height, int depth = 1);
wxBitmap(const char* const* bits); wxBitmap(const char* const* bits);
wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM); wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
wxBitmap(const wxImage& image, int depth = -1); wxBitmap(const wxImage& image, int depth = -1);
bool Create(int width, int height, int depth = -1); bool Create(int width, int height, int depth = -1);
static void InitStandardHandlers(); static void InitStandardHandlers();
*/ */
virtual bool Ok() const { return IsOk(); } virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const = 0; virtual bool IsOk() const = 0;
virtual int GetHeight() const = 0; virtual int GetHeight() const = 0;
virtual int GetWidth() const = 0; virtual int GetWidth() const = 0;
virtual int GetDepth() const = 0; virtual int GetDepth() const = 0;
virtual wxImage ConvertToImage() const = 0; virtual wxImage ConvertToImage() const = 0;
virtual wxMask *GetMask() const = 0; virtual wxMask *GetMask() const = 0;
virtual void SetMask(wxMask *mask) = 0; virtual void SetMask(wxMask *mask) = 0;
virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0; virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0;
virtual bool SaveFile(const wxString &name, wxBitmapType type, virtual bool SaveFile(const wxString &name, wxBitmapType type,
const wxPalette *palette = (wxPalette *)NULL) const = 0; const wxPalette *palette = (wxPalette *)NULL) const = 0;
virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0; virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0;
/* /*
If raw bitmap access is supported (see wx/rawbmp.h), the following If raw bitmap access is supported (see wx/rawbmp.h), the following
methods should be implemented: methods should be implemented:
virtual bool GetRawData(wxRawBitmapData *data) = 0; virtual bool GetRawData(wxRawBitmapData *data) = 0;
virtual void UngetRawData(wxRawBitmapData *data) = 0; virtual void UngetRawData(wxRawBitmapData *data) = 0;
*/ */
#if wxUSE_PALETTE #if wxUSE_PALETTE
virtual wxPalette *GetPalette() const = 0; virtual wxPalette *GetPalette() const = 0;
virtual void SetPalette(const wxPalette& palette) = 0; virtual void SetPalette(const wxPalette& palette) = 0;
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
// copies the contents and mask of the given (colour) icon to the bitmap // copies the contents and mask of the given (colour) icon to the bitmap
virtual bool CopyFromIcon(const wxIcon& icon) = 0; virtual bool CopyFromIcon(const wxIcon& icon) = 0;
// implementation: // implementation:
virtual void SetHeight(int height) = 0; virtual void SetHeight(int height) = 0;
virtual void SetWidth(int width) = 0; virtual void SetWidth(int width) = 0;
virtual void SetDepth(int depth) = 0; virtual void SetDepth(int depth) = 0;
// Format handling // Format handling
static inline wxList& GetHandlers() { return sm_handlers; } static inline wxList& GetHandlers() { return sm_handlers; }
static void AddHandler(wxBitmapHandlerBase *handler); static void AddHandler(wxBitmapHandlerBase *handler);
static void InsertHandler(wxBitmapHandlerBase *handler); static void InsertHandler(wxBitmapHandlerBase *handler);
static bool RemoveHandler(const wxString& name); static bool RemoveHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& name); static wxBitmapHandler *FindHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType); static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType);
static wxBitmapHandler *FindHandler(wxBitmapType bitmapType); static wxBitmapHandler *FindHandler(wxBitmapType bitmapType);
//static void InitStandardHandlers(); //static void InitStandardHandlers();
// (wxBitmap must implement this one) // (wxBitmap must implement this one)
static void CleanUpHandlers(); static void CleanUpHandlers();
// this method is only used by the generic implementation of wxMask // this method is only used by the generic implementation of wxMask
// currently but could be useful elsewhere in the future: it can be // currently but could be useful elsewhere in the future: it can be
// overridden to quantize the colour to correspond to bitmap colour depth // overridden to quantize the colour to correspond to bitmap colour depth
// if necessary; default implementation simply returns the colour as is // if necessary; default implementation simply returns the colour as is
virtual wxColour QuantizeColour(const wxColour& colour) const virtual wxColour QuantizeColour(const wxColour& colour) const
{ {
return colour; return colour;
} }
protected: protected:
static wxList sm_handlers; static wxList sm_handlers;
DECLARE_ABSTRACT_CLASS(wxBitmapBase) DECLARE_ABSTRACT_CLASS(wxBitmapBase)
}; };
#endif // wxUSE_BITMAP_BASE #endif // wxUSE_BITMAP_BASE
#if defined(__WXPALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/bitmap.h" #include "wx/palmos/bitmap.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/bitmap.h" #include "wx/msw/bitmap.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/x11/bitmap.h" #include "wx/x11/bitmap.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/bitmap.h" #include "wx/gtk/bitmap.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/bitmap.h" #include "wx/gtk1/bitmap.h"
#elif defined(__WXX11__) #elif defined(__WXX11__)
#include "wx/x11/bitmap.h" #include "wx/x11/bitmap.h"
#elif defined(__WXMGL__) #elif defined(__WXMGL__)
#include "wx/mgl/bitmap.h" #include "wx/mgl/bitmap.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#include "wx/dfb/bitmap.h" #include "wx/dfb/bitmap.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/bitmap.h" #include "wx/mac/bitmap.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/bitmap.h" #include "wx/cocoa/bitmap.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/bitmap.h" #include "wx/os2/bitmap.h"
#endif #endif
// we must include generic mask.h after wxBitmap definition // we must include generic mask.h after wxBitmap definition
#if defined(__WXMGL__) || defined(__WXDFB__) #if defined(__WXMGL__) || defined(__WXDFB__)
#define wxUSE_GENERIC_MASK 1 #define wxUSE_GENERIC_MASK 1
#else #else
#define wxUSE_GENERIC_MASK 0 #define wxUSE_GENERIC_MASK 0
#endif #endif
#if wxUSE_GENERIC_MASK #if wxUSE_GENERIC_MASK
#include "wx/generic/mask.h" #include "wx/generic/mask.h"
#endif #endif
#endif // _WX_BITMAP_H_BASE_ #endif // _WX_BITMAP_H_BASE_

View File

@@ -1,122 +1,122 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/bmpbutton.h // Name: wx/bmpbutton.h
// Purpose: wxBitmapButton class interface // Purpose: wxBitmapButton class interface
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 25.08.00 // Created: 25.08.00
// RCS-ID: $Id: bmpbuttn.h 45498 2007-04-16 13:03:05Z VZ $ // RCS-ID: $Id: bmpbuttn.h 45498 2007-04-16 13:03:05Z VZ $
// Copyright: (c) 2000 Vadim Zeitlin // Copyright: (c) 2000 Vadim Zeitlin
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BMPBUTTON_H_BASE_ #ifndef _WX_BMPBUTTON_H_BASE_
#define _WX_BMPBUTTON_H_BASE_ #define _WX_BMPBUTTON_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_BMPBUTTON #if wxUSE_BMPBUTTON
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/button.h" #include "wx/button.h"
extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxBitmapButton: a button which shows bitmaps instead of the usual string. // wxBitmapButton: a button which shows bitmaps instead of the usual string.
// It has different bitmaps for different states (focused/disabled/pressed) // It has different bitmaps for different states (focused/disabled/pressed)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxBitmapButtonBase : public wxButton class WXDLLEXPORT wxBitmapButtonBase : public wxButton
{ {
public: public:
wxBitmapButtonBase() wxBitmapButtonBase()
{ {
m_marginX = m_marginX =
m_marginY = 0; m_marginY = 0;
} }
// set the bitmaps // set the bitmaps
void SetBitmapLabel(const wxBitmap& bitmap) void SetBitmapLabel(const wxBitmap& bitmap)
{ m_bmpNormal = bitmap; OnSetBitmap(); } { m_bmpNormal = bitmap; OnSetBitmap(); }
void SetBitmapSelected(const wxBitmap& sel) void SetBitmapSelected(const wxBitmap& sel)
{ m_bmpSelected = sel; OnSetBitmap(); } { m_bmpSelected = sel; OnSetBitmap(); }
void SetBitmapFocus(const wxBitmap& focus) void SetBitmapFocus(const wxBitmap& focus)
{ m_bmpFocus = focus; OnSetBitmap(); } { m_bmpFocus = focus; OnSetBitmap(); }
void SetBitmapDisabled(const wxBitmap& disabled) void SetBitmapDisabled(const wxBitmap& disabled)
{ m_bmpDisabled = disabled; OnSetBitmap(); } { m_bmpDisabled = disabled; OnSetBitmap(); }
void SetBitmapHover(const wxBitmap& hover) void SetBitmapHover(const wxBitmap& hover)
{ m_bmpHover = hover; OnSetBitmap(); } { m_bmpHover = hover; OnSetBitmap(); }
// retrieve the bitmaps // retrieve the bitmaps
const wxBitmap& GetBitmapLabel() const { return m_bmpNormal; } const wxBitmap& GetBitmapLabel() const { return m_bmpNormal; }
const wxBitmap& GetBitmapSelected() const { return m_bmpSelected; } const wxBitmap& GetBitmapSelected() const { return m_bmpSelected; }
const wxBitmap& GetBitmapFocus() const { return m_bmpFocus; } const wxBitmap& GetBitmapFocus() const { return m_bmpFocus; }
const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; } const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
const wxBitmap& GetBitmapHover() const { return m_bmpHover; } const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
wxBitmap& GetBitmapLabel() { return m_bmpNormal; } wxBitmap& GetBitmapLabel() { return m_bmpNormal; }
wxBitmap& GetBitmapSelected() { return m_bmpSelected; } wxBitmap& GetBitmapSelected() { return m_bmpSelected; }
wxBitmap& GetBitmapFocus() { return m_bmpFocus; } wxBitmap& GetBitmapFocus() { return m_bmpFocus; }
wxBitmap& GetBitmapDisabled() { return m_bmpDisabled; } wxBitmap& GetBitmapDisabled() { return m_bmpDisabled; }
wxBitmap& GetBitmapHover() { return m_bmpHover; } wxBitmap& GetBitmapHover() { return m_bmpHover; }
// set/get the margins around the button // set/get the margins around the button
virtual void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } virtual void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
int GetMarginX() const { return m_marginX; } int GetMarginX() const { return m_marginX; }
int GetMarginY() const { return m_marginY; } int GetMarginY() const { return m_marginY; }
// deprecated synonym for SetBitmapLabel() // deprecated synonym for SetBitmapLabel()
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
wxDEPRECATED( void SetLabel(const wxBitmap& bitmap) ); wxDEPRECATED( void SetLabel(const wxBitmap& bitmap) );
// prevent virtual function hiding // prevent virtual function hiding
virtual void SetLabel(const wxString& label) virtual void SetLabel(const wxString& label)
{ wxWindow::SetLabel(label); } { wxWindow::SetLabel(label); }
#endif // WXWIN_COMPATIBILITY_2_6 #endif // WXWIN_COMPATIBILITY_2_6
protected: protected:
// function called when any of the bitmaps changes // function called when any of the bitmaps changes
virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); } virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); }
// the bitmaps for various states // the bitmaps for various states
wxBitmap m_bmpNormal, wxBitmap m_bmpNormal,
m_bmpSelected, m_bmpSelected,
m_bmpFocus, m_bmpFocus,
m_bmpDisabled, m_bmpDisabled,
m_bmpHover; m_bmpHover;
// the margins around the bitmap // the margins around the bitmap
int m_marginX, int m_marginX,
m_marginY; m_marginY;
DECLARE_NO_COPY_CLASS(wxBitmapButtonBase) DECLARE_NO_COPY_CLASS(wxBitmapButtonBase)
}; };
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
inline void wxBitmapButtonBase::SetLabel(const wxBitmap& bitmap) inline void wxBitmapButtonBase::SetLabel(const wxBitmap& bitmap)
{ {
SetBitmapLabel(bitmap); SetBitmapLabel(bitmap);
} }
#endif // WXWIN_COMPATIBILITY_2_6 #endif // WXWIN_COMPATIBILITY_2_6
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/bmpbuttn.h" #include "wx/univ/bmpbuttn.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/bmpbuttn.h" #include "wx/msw/bmpbuttn.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/bmpbuttn.h" #include "wx/motif/bmpbuttn.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/bmpbuttn.h" #include "wx/gtk/bmpbuttn.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/bmpbuttn.h" #include "wx/gtk1/bmpbuttn.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/bmpbuttn.h" #include "wx/mac/bmpbuttn.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/bmpbuttn.h" #include "wx/cocoa/bmpbuttn.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/bmpbuttn.h" #include "wx/os2/bmpbuttn.h"
#endif #endif
#endif // wxUSE_BMPBUTTON #endif // wxUSE_BMPBUTTON
#endif // _WX_BMPBUTTON_H_BASE_ #endif // _WX_BMPBUTTON_H_BASE_

View File

@@ -1,49 +1,49 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/bmpcbox.h // Name: wx/bmpcbox.h
// Purpose: wxBitmapComboBox base header // Purpose: wxBitmapComboBox base header
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Aug-31-2006 // Created: Aug-31-2006
// Copyright: (c) Jaakko Salli // Copyright: (c) Jaakko Salli
// RCS-ID: $Id: bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $ // RCS-ID: $Id: bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BMPCBOX_H_BASE_ #ifndef _WX_BMPCBOX_H_BASE_
#define _WX_BMPCBOX_H_BASE_ #define _WX_BMPCBOX_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_BITMAPCOMBOBOX #if wxUSE_BITMAPCOMBOBOX
#include "wx/bitmap.h" #include "wx/bitmap.h"
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[]; extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[];
class WXDLLIMPEXP_ADV wxBitmapComboBoxBase class WXDLLIMPEXP_ADV wxBitmapComboBoxBase
{ {
public: public:
// ctors and such // ctors and such
wxBitmapComboBoxBase() { } wxBitmapComboBoxBase() { }
virtual ~wxBitmapComboBoxBase() { } virtual ~wxBitmapComboBoxBase() { }
// Returns the image of the item with the given index. // Returns the image of the item with the given index.
virtual wxBitmap GetItemBitmap(unsigned int n) const = 0; virtual wxBitmap GetItemBitmap(unsigned int n) const = 0;
// Sets the image for the given item. // Sets the image for the given item.
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0; virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
// Returns size of the image used in list // Returns size of the image used in list
virtual wxSize GetBitmapSize() const = 0; virtual wxSize GetBitmapSize() const = 0;
}; };
#include "wx/generic/bmpcbox.h" #include "wx/generic/bmpcbox.h"
#endif // wxUSE_BITMAPCOMBOBOX #endif // wxUSE_BITMAPCOMBOBOX
#endif // _WX_BMPCBOX_H_BASE_ #endif // _WX_BMPCBOX_H_BASE_

View File

@@ -1,403 +1,403 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/bookctrl.h // Name: wx/bookctrl.h
// Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook // Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 19.08.03 // Created: 19.08.03
// RCS-ID: $Id: bookctrl.h 49563 2007-10-31 20:46:21Z VZ $ // RCS-ID: $Id: bookctrl.h 49563 2007-10-31 20:46:21Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BOOKCTRL_H_ #ifndef _WX_BOOKCTRL_H_
#define _WX_BOOKCTRL_H_ #define _WX_BOOKCTRL_H_
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_BOOKCTRL #if wxUSE_BOOKCTRL
#include "wx/control.h" #include "wx/control.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages); WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
class WXDLLIMPEXP_FWD_CORE wxImageList; class WXDLLIMPEXP_FWD_CORE wxImageList;
class WXDLLIMPEXP_FWD_CORE wxBookCtrlBaseEvent; class WXDLLIMPEXP_FWD_CORE wxBookCtrlBaseEvent;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxBookCtrl hit results // wxBookCtrl hit results
enum enum
{ {
wxBK_HITTEST_NOWHERE = 1, // not on tab wxBK_HITTEST_NOWHERE = 1, // not on tab
wxBK_HITTEST_ONICON = 2, // on icon wxBK_HITTEST_ONICON = 2, // on icon
wxBK_HITTEST_ONLABEL = 4, // on label wxBK_HITTEST_ONLABEL = 4, // on label
wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL, wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL,
wxBK_HITTEST_ONPAGE = 8 // not on tab control, but over the selected page wxBK_HITTEST_ONPAGE = 8 // not on tab control, but over the selected page
}; };
// wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook) // wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook)
#define wxBK_DEFAULT 0x0000 #define wxBK_DEFAULT 0x0000
#define wxBK_TOP 0x0010 #define wxBK_TOP 0x0010
#define wxBK_BOTTOM 0x0020 #define wxBK_BOTTOM 0x0020
#define wxBK_LEFT 0x0040 #define wxBK_LEFT 0x0040
#define wxBK_RIGHT 0x0080 #define wxBK_RIGHT 0x0080
#define wxBK_ALIGN_MASK (wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT) #define wxBK_ALIGN_MASK (wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxBookCtrlBase // wxBookCtrlBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxBookCtrlBase : public wxControl class WXDLLEXPORT wxBookCtrlBase : public wxControl
{ {
public: public:
// construction // construction
// ------------ // ------------
wxBookCtrlBase() wxBookCtrlBase()
{ {
Init(); Init();
} }
wxBookCtrlBase(wxWindow *parent, wxBookCtrlBase(wxWindow *parent,
wxWindowID winid, wxWindowID winid,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxEmptyString) const wxString& name = wxEmptyString)
{ {
Init(); Init();
(void)Create(parent, winid, pos, size, style, name); (void)Create(parent, winid, pos, size, style, name);
} }
// quasi ctor // quasi ctor
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID winid, wxWindowID winid,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxEmptyString); const wxString& name = wxEmptyString);
// dtor // dtor
virtual ~wxBookCtrlBase(); virtual ~wxBookCtrlBase();
// accessors // accessors
// --------- // ---------
// get number of pages in the dialog // get number of pages in the dialog
virtual size_t GetPageCount() const { return m_pages.size(); } virtual size_t GetPageCount() const { return m_pages.size(); }
// get the panel which represents the given page // get the panel which represents the given page
wxWindow *GetPage(size_t n) { return m_pages[n]; } wxWindow *GetPage(size_t n) { return m_pages[n]; }
wxWindow *GetPage(size_t n) const { return m_pages[n]; } wxWindow *GetPage(size_t n) const { return m_pages[n]; }
// get the current page or NULL if none // get the current page or NULL if none
wxWindow *GetCurrentPage() const wxWindow *GetCurrentPage() const
{ {
const int n = GetSelection(); const int n = GetSelection();
return n == wxNOT_FOUND ? NULL : GetPage(n); return n == wxNOT_FOUND ? NULL : GetPage(n);
} }
// get the currently selected page or wxNOT_FOUND if none // get the currently selected page or wxNOT_FOUND if none
virtual int GetSelection() const = 0; virtual int GetSelection() const = 0;
// set/get the title of a page // set/get the title of a page
virtual bool SetPageText(size_t n, const wxString& strText) = 0; virtual bool SetPageText(size_t n, const wxString& strText) = 0;
virtual wxString GetPageText(size_t n) const = 0; virtual wxString GetPageText(size_t n) const = 0;
// image list stuff: each page may have an image associated with it (all // image list stuff: each page may have an image associated with it (all
// images belong to the same image list) // images belong to the same image list)
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// sets the image list to use, it is *not* deleted by the control // sets the image list to use, it is *not* deleted by the control
virtual void SetImageList(wxImageList *imageList); virtual void SetImageList(wxImageList *imageList);
// as SetImageList() but we will delete the image list ourselves // as SetImageList() but we will delete the image list ourselves
void AssignImageList(wxImageList *imageList); void AssignImageList(wxImageList *imageList);
// get pointer (may be NULL) to the associated image list // get pointer (may be NULL) to the associated image list
wxImageList* GetImageList() const { return m_imageList; } wxImageList* GetImageList() const { return m_imageList; }
// sets/returns item's image index in the current image list // sets/returns item's image index in the current image list
virtual int GetPageImage(size_t n) const = 0; virtual int GetPageImage(size_t n) const = 0;
virtual bool SetPageImage(size_t n, int imageId) = 0; virtual bool SetPageImage(size_t n, int imageId) = 0;
// geometry // geometry
// -------- // --------
// resize the notebook so that all pages will have the specified size // resize the notebook so that all pages will have the specified size
virtual void SetPageSize(const wxSize& size); virtual void SetPageSize(const wxSize& size);
// calculate the size of the control from the size of its page // calculate the size of the control from the size of its page
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0; virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
// get/set size of area between book control area and page area // get/set size of area between book control area and page area
unsigned int GetInternalBorder() const { return m_internalBorder; } unsigned int GetInternalBorder() const { return m_internalBorder; }
void SetInternalBorder(unsigned int border) { m_internalBorder = border; } void SetInternalBorder(unsigned int border) { m_internalBorder = border; }
// Sets/gets the margin around the controller // Sets/gets the margin around the controller
void SetControlMargin(int margin) { m_controlMargin = margin; } void SetControlMargin(int margin) { m_controlMargin = margin; }
int GetControlMargin() const { return m_controlMargin; } int GetControlMargin() const { return m_controlMargin; }
// returns true if we have wxBK_TOP or wxBK_BOTTOM style // returns true if we have wxBK_TOP or wxBK_BOTTOM style
bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); } bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); }
// set/get option to shrink to fit current page // set/get option to shrink to fit current page
void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; } void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; }
bool GetFitToCurrentPage() const { return m_fitToCurrentPage; } bool GetFitToCurrentPage() const { return m_fitToCurrentPage; }
// returns the sizer containing the control, if any // returns the sizer containing the control, if any
wxSizer* GetControlSizer() const { return m_controlSizer; } wxSizer* GetControlSizer() const { return m_controlSizer; }
// operations // operations
// ---------- // ----------
// remove one page from the control and delete it // remove one page from the control and delete it
virtual bool DeletePage(size_t n); virtual bool DeletePage(size_t n);
// remove one page from the notebook, without deleting it // remove one page from the notebook, without deleting it
virtual bool RemovePage(size_t n) virtual bool RemovePage(size_t n)
{ {
DoInvalidateBestSize(); DoInvalidateBestSize();
return DoRemovePage(n) != NULL; return DoRemovePage(n) != NULL;
} }
// remove all pages and delete them // remove all pages and delete them
virtual bool DeleteAllPages() virtual bool DeleteAllPages()
{ {
DoInvalidateBestSize(); DoInvalidateBestSize();
WX_CLEAR_ARRAY(m_pages); WX_CLEAR_ARRAY(m_pages);
return true; return true;
} }
// adds a new page to the control // adds a new page to the control
virtual bool AddPage(wxWindow *page, virtual bool AddPage(wxWindow *page,
const wxString& text, const wxString& text,
bool bSelect = false, bool bSelect = false,
int imageId = -1) int imageId = -1)
{ {
DoInvalidateBestSize(); DoInvalidateBestSize();
return InsertPage(GetPageCount(), page, text, bSelect, imageId); return InsertPage(GetPageCount(), page, text, bSelect, imageId);
} }
// the same as AddPage(), but adds the page at the specified position // the same as AddPage(), but adds the page at the specified position
virtual bool InsertPage(size_t n, virtual bool InsertPage(size_t n,
wxWindow *page, wxWindow *page,
const wxString& text, const wxString& text,
bool bSelect = false, bool bSelect = false,
int imageId = -1) = 0; int imageId = -1) = 0;
// set the currently selected page, return the index of the previously // set the currently selected page, return the index of the previously
// selected one (or -1 on error) // selected one (or -1 on error)
// //
// NB: this function will generate PAGE_CHANGING/ED events // NB: this function will generate PAGE_CHANGING/ED events
virtual int SetSelection(size_t n) = 0; virtual int SetSelection(size_t n) = 0;
// acts as SetSelection but does not generate events // acts as SetSelection but does not generate events
virtual int ChangeSelection(size_t n) = 0; virtual int ChangeSelection(size_t n) = 0;
// cycle thru the pages // cycle thru the pages
void AdvanceSelection(bool forward = true) void AdvanceSelection(bool forward = true)
{ {
int nPage = GetNextPage(forward); int nPage = GetNextPage(forward);
if ( nPage != -1 ) if ( nPage != -1 )
{ {
// cast is safe because of the check above // cast is safe because of the check above
SetSelection((size_t)nPage); SetSelection((size_t)nPage);
} }
} }
// hit test: returns which page is hit and, optionally, where (icon, label) // hit test: returns which page is hit and, optionally, where (icon, label)
virtual int HitTest(const wxPoint& WXUNUSED(pt), virtual int HitTest(const wxPoint& WXUNUSED(pt),
long * WXUNUSED(flags) = NULL) const long * WXUNUSED(flags) = NULL) const
{ {
return wxNOT_FOUND; return wxNOT_FOUND;
} }
// we do have multiple pages // we do have multiple pages
virtual bool HasMultiplePages() const { return true; } virtual bool HasMultiplePages() const { return true; }
protected: protected:
// flags for DoSetSelection() // flags for DoSetSelection()
enum enum
{ {
SetSelection_SendEvent = 1 SetSelection_SendEvent = 1
}; };
// set the selection to the given page, sending the events (which can // set the selection to the given page, sending the events (which can
// possibly prevent the page change from taking place) if SendEvent flag is // possibly prevent the page change from taking place) if SendEvent flag is
// included // included
virtual int DoSetSelection(size_t nPage, int flags = 0); virtual int DoSetSelection(size_t nPage, int flags = 0);
// if the derived class uses DoSetSelection() for implementing // if the derived class uses DoSetSelection() for implementing
// [Set|Change]Selection, it must override UpdateSelectedPage(), // [Set|Change]Selection, it must override UpdateSelectedPage(),
// CreatePageChangingEvent() and MakeChangedEvent(), but as it might not // CreatePageChangingEvent() and MakeChangedEvent(), but as it might not
// use it, these functions are not pure virtual // use it, these functions are not pure virtual
// called to notify the control about a new current page // called to notify the control about a new current page
virtual void UpdateSelectedPage(size_t WXUNUSED(newsel)) virtual void UpdateSelectedPage(size_t WXUNUSED(newsel))
{ wxFAIL_MSG(wxT("Override this function!")); } { wxFAIL_MSG(wxT("Override this function!")); }
// create a new "page changing" event // create a new "page changing" event
virtual wxBookCtrlBaseEvent* CreatePageChangingEvent() const virtual wxBookCtrlBaseEvent* CreatePageChangingEvent() const
{ wxFAIL_MSG(wxT("Override this function!")); return NULL; } { wxFAIL_MSG(wxT("Override this function!")); return NULL; }
// modify the event created by CreatePageChangingEvent() to "page changed" // modify the event created by CreatePageChangingEvent() to "page changed"
// event, usually by just calling SetEventType() on it // event, usually by just calling SetEventType() on it
virtual void MakeChangedEvent(wxBookCtrlBaseEvent& WXUNUSED(event)) virtual void MakeChangedEvent(wxBookCtrlBaseEvent& WXUNUSED(event))
{ wxFAIL_MSG(wxT("Override this function!")); } { wxFAIL_MSG(wxT("Override this function!")); }
// Should we accept NULL page pointers in Add/InsertPage()? // Should we accept NULL page pointers in Add/InsertPage()?
// //
// Default is no but derived classes may override it if they can treat NULL // Default is no but derived classes may override it if they can treat NULL
// pages in some sensible way (e.g. wxTreebook overrides this to allow // pages in some sensible way (e.g. wxTreebook overrides this to allow
// having nodes without any associated page) // having nodes without any associated page)
virtual bool AllowNullPage() const { return false; } virtual bool AllowNullPage() const { return false; }
// remove the page and return a pointer to it // remove the page and return a pointer to it
virtual wxWindow *DoRemovePage(size_t page) = 0; virtual wxWindow *DoRemovePage(size_t page) = 0;
// our best size is the size which fits all our pages // our best size is the size which fits all our pages
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
// helper: get the next page wrapping if we reached the end // helper: get the next page wrapping if we reached the end
int GetNextPage(bool forward) const; int GetNextPage(bool forward) const;
// Lay out controls // Lay out controls
void DoSize(); void DoSize();
// This method also invalidates the size of the controller and should be // This method also invalidates the size of the controller and should be
// called instead of just InvalidateBestSize() whenever pages are added or // called instead of just InvalidateBestSize() whenever pages are added or
// removed as this also affects the controller // removed as this also affects the controller
void DoInvalidateBestSize(); void DoInvalidateBestSize();
#if wxUSE_HELP #if wxUSE_HELP
// Show the help for the corresponding page // Show the help for the corresponding page
void OnHelp(wxHelpEvent& event); void OnHelp(wxHelpEvent& event);
#endif // wxUSE_HELP #endif // wxUSE_HELP
// the array of all pages of this control // the array of all pages of this control
wxArrayPages m_pages; wxArrayPages m_pages;
// the associated image list or NULL // the associated image list or NULL
wxImageList *m_imageList; wxImageList *m_imageList;
// true if we must delete m_imageList // true if we must delete m_imageList
bool m_ownsImageList; bool m_ownsImageList;
// get the page area // get the page area
wxRect GetPageRect() const; wxRect GetPageRect() const;
// event handlers // event handlers
virtual wxSize GetControllerSize() const; virtual wxSize GetControllerSize() const;
void OnSize(wxSizeEvent& event); void OnSize(wxSizeEvent& event);
// controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook) // controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook)
wxControl *m_bookctrl; wxControl *m_bookctrl;
// Whether to shrink to fit current page // Whether to shrink to fit current page
bool m_fitToCurrentPage; bool m_fitToCurrentPage;
// the sizer containing the choice control // the sizer containing the choice control
wxSizer *m_controlSizer; wxSizer *m_controlSizer;
// the margin around the choice control // the margin around the choice control
int m_controlMargin; int m_controlMargin;
private: private:
// common part of all ctors // common part of all ctors
void Init(); void Init();
// internal border // internal border
unsigned int m_internalBorder; unsigned int m_internalBorder;
DECLARE_ABSTRACT_CLASS(wxBookCtrlBase) DECLARE_ABSTRACT_CLASS(wxBookCtrlBase)
DECLARE_NO_COPY_CLASS(wxBookCtrlBase) DECLARE_NO_COPY_CLASS(wxBookCtrlBase)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxBookCtrlBaseEvent: page changing events generated by derived classes // wxBookCtrlBaseEvent: page changing events generated by derived classes
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent
{ {
public: public:
wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
int nSel = -1, int nOldSel = -1) int nSel = -1, int nOldSel = -1)
: wxNotifyEvent(commandType, winid) : wxNotifyEvent(commandType, winid)
{ {
m_nSel = nSel; m_nSel = nSel;
m_nOldSel = nOldSel; m_nOldSel = nOldSel;
} }
wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event) wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event)
: wxNotifyEvent(event) : wxNotifyEvent(event)
{ {
m_nSel = event.m_nSel; m_nSel = event.m_nSel;
m_nOldSel = event.m_nOldSel; m_nOldSel = event.m_nOldSel;
} }
// accessors // accessors
// the currently selected page (-1 if none) // the currently selected page (-1 if none)
int GetSelection() const { return m_nSel; } int GetSelection() const { return m_nSel; }
void SetSelection(int nSel) { m_nSel = nSel; } void SetSelection(int nSel) { m_nSel = nSel; }
// the page that was selected before the change (-1 if none) // the page that was selected before the change (-1 if none)
int GetOldSelection() const { return m_nOldSel; } int GetOldSelection() const { return m_nOldSel; }
void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; } void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
private: private:
int m_nSel, // currently selected page int m_nSel, // currently selected page
m_nOldSel; // previously selected page m_nOldSel; // previously selected page
}; };
// make a default book control for given platform // make a default book control for given platform
#if wxUSE_NOTEBOOK #if wxUSE_NOTEBOOK
// dedicated to majority of desktops // dedicated to majority of desktops
#include "wx/notebook.h" #include "wx/notebook.h"
#define wxBookCtrl wxNotebook #define wxBookCtrl wxNotebook
#define wxBookCtrlEvent wxNotebookEvent #define wxBookCtrlEvent wxNotebookEvent
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
#define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn)
#define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn)
#define wxBookctrlEventHandler(func) wxNotebookEventHandler(func) #define wxBookctrlEventHandler(func) wxNotebookEventHandler(func)
#else #else
// dedicated to Smartphones // dedicated to Smartphones
#include "wx/choicebk.h" #include "wx/choicebk.h"
#define wxBookCtrl wxChoicebook #define wxBookCtrl wxChoicebook
#define wxBookCtrlEvent wxChoicebookEvent #define wxBookCtrlEvent wxChoicebookEvent
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING
#define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn)
#define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn)
#define wxBookctrlEventHandler(func) wxChoicebookEventHandler(func) #define wxBookctrlEventHandler(func) wxChoicebookEventHandler(func)
#endif #endif
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
#define wxBC_TOP wxBK_TOP #define wxBC_TOP wxBK_TOP
#define wxBC_BOTTOM wxBK_BOTTOM #define wxBC_BOTTOM wxBK_BOTTOM
#define wxBC_LEFT wxBK_LEFT #define wxBC_LEFT wxBK_LEFT
#define wxBC_RIGHT wxBK_RIGHT #define wxBC_RIGHT wxBK_RIGHT
#define wxBC_DEFAULT wxBK_DEFAULT #define wxBC_DEFAULT wxBK_DEFAULT
#endif #endif
#endif // wxUSE_BOOKCTRL #endif // wxUSE_BOOKCTRL
#endif // _WX_BOOKCTRL_H_ #endif // _WX_BOOKCTRL_H_

View File

@@ -1,54 +1,54 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/brush.h // Name: wx/brush.h
// Purpose: Includes platform-specific wxBrush file // Purpose: Includes platform-specific wxBrush file
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: // Created:
// RCS-ID: $Id: brush.h 40865 2006-08-27 09:42:42Z VS $ // RCS-ID: $Id: brush.h 40865 2006-08-27 09:42:42Z VS $
// Copyright: Julian Smart // Copyright: Julian Smart
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BRUSH_H_BASE_ #ifndef _WX_BRUSH_H_BASE_
#define _WX_BRUSH_H_BASE_ #define _WX_BRUSH_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/object.h" #include "wx/object.h"
#include "wx/gdiobj.h" #include "wx/gdiobj.h"
// wxBrushBase // wxBrushBase
class WXDLLEXPORT wxBrushBase: public wxGDIObject class WXDLLEXPORT wxBrushBase: public wxGDIObject
{ {
public: public:
virtual ~wxBrushBase() { } virtual ~wxBrushBase() { }
virtual int GetStyle() const = 0; virtual int GetStyle() const = 0;
virtual bool IsHatch() const virtual bool IsHatch() const
{ return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); } { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
}; };
#if defined(__WXPALMOS__) #if defined(__WXPALMOS__)
#include "wx/palmos/brush.h" #include "wx/palmos/brush.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/brush.h" #include "wx/msw/brush.h"
#elif defined(__WXMOTIF__) || defined(__WXX11__) #elif defined(__WXMOTIF__) || defined(__WXX11__)
#include "wx/x11/brush.h" #include "wx/x11/brush.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/brush.h" #include "wx/gtk/brush.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/brush.h" #include "wx/gtk1/brush.h"
#elif defined(__WXMGL__) #elif defined(__WXMGL__)
#include "wx/mgl/brush.h" #include "wx/mgl/brush.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#include "wx/dfb/brush.h" #include "wx/dfb/brush.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/brush.h" #include "wx/mac/brush.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/brush.h" #include "wx/cocoa/brush.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/brush.h" #include "wx/os2/brush.h"
#endif #endif
#endif #endif
// _WX_BRUSH_H_BASE_ // _WX_BRUSH_H_BASE_

View File

@@ -1,314 +1,314 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/buffer.h // Name: wx/buffer.h
// Purpose: auto buffer classes: buffers which automatically free memory // Purpose: auto buffer classes: buffers which automatically free memory
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 12.04.99 // Created: 12.04.99
// RCS-ID: $Id: buffer.h 45761 2007-05-02 17:09:30Z VS $ // RCS-ID: $Id: buffer.h 45761 2007-05-02 17:09:30Z VS $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BUFFER_H #ifndef _WX_BUFFER_H
#define _WX_BUFFER_H #define _WX_BUFFER_H
#include "wx/wxchar.h" #include "wx/wxchar.h"
#include <stdlib.h> // malloc() and free() #include <stdlib.h> // malloc() and free()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Special classes for (wide) character strings: they use malloc/free instead // Special classes for (wide) character strings: they use malloc/free instead
// of new/delete // of new/delete
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#define DEFINE_BUFFER(classname, chartype, strdupfunc) \ #define DEFINE_BUFFER(classname, chartype, strdupfunc) \
class WXDLLIMPEXP_BASE classname \ class WXDLLIMPEXP_BASE classname \
{ \ { \
public: \ public: \
classname(const chartype *str = NULL) \ classname(const chartype *str = NULL) \
: m_str(str ? strdupfunc(str) : NULL) \ : m_str(str ? strdupfunc(str) : NULL) \
{ \ { \
} \ } \
\ \
classname(size_t len) \ classname(size_t len) \
: m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \ : m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \
{ \ { \
m_str[len] = (chartype)0; \ m_str[len] = (chartype)0; \
} \ } \
\ \
/* no need to check for NULL, free() does it */ \ /* no need to check for NULL, free() does it */ \
~classname() { free(m_str); } \ ~classname() { free(m_str); } \
\ \
/* \ /* \
WARNING: \ WARNING: \
\ \
the copy ctor and assignment operators change the passed in object \ the copy ctor and assignment operators change the passed in object \
even although it is declared as "const", so: \ even although it is declared as "const", so: \
\ \
a) it shouldn't be really const \ a) it shouldn't be really const \
b) you shouldn't use it afterwards (or know that it was reset) \ b) you shouldn't use it afterwards (or know that it was reset) \
\ \
This is very ugly but is unfortunately needed to make the normal use\ This is very ugly but is unfortunately needed to make the normal use\
of classname buffer objects possible and is very similar to what \ of classname buffer objects possible and is very similar to what \
std::auto_ptr<> does (as if it were an excuse...) \ std::auto_ptr<> does (as if it were an excuse...) \
*/ \ */ \
\ \
/* \ /* \
because of the remark above, release() is declared const even if it \ because of the remark above, release() is declared const even if it \
isn't really const \ isn't really const \
*/ \ */ \
chartype *release() const \ chartype *release() const \
{ \ { \
chartype *p = m_str; \ chartype *p = m_str; \
((classname *)this)->m_str = NULL; \ ((classname *)this)->m_str = NULL; \
return p; \ return p; \
} \ } \
\ \
void reset() \ void reset() \
{ \ { \
free(m_str); \ free(m_str); \
m_str = NULL; \ m_str = NULL; \
} \ } \
\ \
classname(const classname& src) \ classname(const classname& src) \
: m_str(src.release()) \ : m_str(src.release()) \
{ \ { \
} \ } \
\ \
classname& operator=(const chartype *str) \ classname& operator=(const chartype *str) \
{ \ { \
free(m_str); \ free(m_str); \
m_str = str ? strdupfunc(str) : NULL; \ m_str = str ? strdupfunc(str) : NULL; \
return *this; \ return *this; \
} \ } \
\ \
classname& operator=(const classname& src) \ classname& operator=(const classname& src) \
{ \ { \
free(m_str); \ free(m_str); \
m_str = src.release(); \ m_str = src.release(); \
\ \
return *this; \ return *this; \
} \ } \
\ \
bool extend(size_t len) \ bool extend(size_t len) \
{ \ { \
chartype * \ chartype * \
str = (chartype *)realloc(m_str, (len + 1)*sizeof(chartype)); \ str = (chartype *)realloc(m_str, (len + 1)*sizeof(chartype)); \
if ( !str ) \ if ( !str ) \
return false; \ return false; \
\ \
m_str = str; \ m_str = str; \
\ \
return true; \ return true; \
} \ } \
\ \
chartype *data() { return m_str; } \ chartype *data() { return m_str; } \
const chartype *data() const { return m_str; } \ const chartype *data() const { return m_str; } \
operator const chartype *() const { return m_str; } \ operator const chartype *() const { return m_str; } \
chartype operator[](size_t n) const { return m_str[n]; } \ chartype operator[](size_t n) const { return m_str[n]; } \
\ \
private: \ private: \
chartype *m_str; \ chartype *m_str; \
} }
#if wxABI_VERSION >= 20804 #if wxABI_VERSION >= 20804
// needed for wxString::char_str() and wchar_str() // needed for wxString::char_str() and wchar_str()
#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \ #define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
class WXDLLIMPEXP_BASE classname : public baseclass \ class WXDLLIMPEXP_BASE classname : public baseclass \
{ \ { \
public: \ public: \
classname(const baseclass& src) : baseclass(src) {} \ classname(const baseclass& src) : baseclass(src) {} \
classname(const chartype *str = NULL) : baseclass(str) {} \ classname(const chartype *str = NULL) : baseclass(str) {} \
\ \
operator chartype*() { return this->data(); } \ operator chartype*() { return this->data(); } \
} }
#endif // wxABI_VERSION >= 20804 #endif // wxABI_VERSION >= 20804
DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA); DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
#if wxABI_VERSION >= 20804 #if wxABI_VERSION >= 20804
DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char); DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
#endif #endif
#if wxUSE_WCHAR_T #if wxUSE_WCHAR_T
DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW); DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
#if wxABI_VERSION >= 20804 #if wxABI_VERSION >= 20804
DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t); DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
#endif #endif
#endif // wxUSE_WCHAR_T #endif // wxUSE_WCHAR_T
#undef DEFINE_BUFFER #undef DEFINE_BUFFER
#undef DEFINE_WRITABLE_BUFFER #undef DEFINE_WRITABLE_BUFFER
#if wxUSE_UNICODE #if wxUSE_UNICODE
typedef wxWCharBuffer wxWxCharBuffer; typedef wxWCharBuffer wxWxCharBuffer;
#define wxMB2WXbuf wxWCharBuffer #define wxMB2WXbuf wxWCharBuffer
#define wxWX2MBbuf wxCharBuffer #define wxWX2MBbuf wxCharBuffer
#define wxWC2WXbuf wxChar* #define wxWC2WXbuf wxChar*
#define wxWX2WCbuf wxChar* #define wxWX2WCbuf wxChar*
#else // ANSI #else // ANSI
typedef wxCharBuffer wxWxCharBuffer; typedef wxCharBuffer wxWxCharBuffer;
#define wxMB2WXbuf wxChar* #define wxMB2WXbuf wxChar*
#define wxWX2MBbuf wxChar* #define wxWX2MBbuf wxChar*
#define wxWC2WXbuf wxCharBuffer #define wxWC2WXbuf wxCharBuffer
#define wxWX2WCbuf wxWCharBuffer #define wxWX2WCbuf wxWCharBuffer
#endif // Unicode/ANSI #endif // Unicode/ANSI
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// A class for holding growable data buffers (not necessarily strings) // A class for holding growable data buffers (not necessarily strings)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// This class manages the actual data buffer pointer and is ref-counted. // This class manages the actual data buffer pointer and is ref-counted.
class wxMemoryBufferData class wxMemoryBufferData
{ {
public: public:
// the initial size and also the size added by ResizeIfNeeded() // the initial size and also the size added by ResizeIfNeeded()
enum { DefBufSize = 1024 }; enum { DefBufSize = 1024 };
friend class wxMemoryBuffer; friend class wxMemoryBuffer;
// everyting is private as it can only be used by wxMemoryBuffer // everyting is private as it can only be used by wxMemoryBuffer
private: private:
wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize) wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize)
: m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0) : m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0)
{ {
} }
~wxMemoryBufferData() { free(m_data); } ~wxMemoryBufferData() { free(m_data); }
void ResizeIfNeeded(size_t newSize) void ResizeIfNeeded(size_t newSize)
{ {
if (newSize > m_size) if (newSize > m_size)
{ {
void *dataOld = m_data; void *dataOld = m_data;
m_data = realloc(m_data, newSize + wxMemoryBufferData::DefBufSize); m_data = realloc(m_data, newSize + wxMemoryBufferData::DefBufSize);
if ( !m_data ) if ( !m_data )
{ {
free(dataOld); free(dataOld);
} }
m_size = newSize + wxMemoryBufferData::DefBufSize; m_size = newSize + wxMemoryBufferData::DefBufSize;
} }
} }
void IncRef() { m_ref += 1; } void IncRef() { m_ref += 1; }
void DecRef() void DecRef()
{ {
m_ref -= 1; m_ref -= 1;
if (m_ref == 0) // are there no more references? if (m_ref == 0) // are there no more references?
delete this; delete this;
} }
// the buffer containing the data // the buffer containing the data
void *m_data; void *m_data;
// the size of the buffer // the size of the buffer
size_t m_size; size_t m_size;
// the amount of data currently in the buffer // the amount of data currently in the buffer
size_t m_len; size_t m_len;
// the reference count // the reference count
size_t m_ref; size_t m_ref;
DECLARE_NO_COPY_CLASS(wxMemoryBufferData) DECLARE_NO_COPY_CLASS(wxMemoryBufferData)
}; };
class wxMemoryBuffer class wxMemoryBuffer
{ {
public: public:
// ctor and dtor // ctor and dtor
wxMemoryBuffer(size_t size = wxMemoryBufferData::DefBufSize) wxMemoryBuffer(size_t size = wxMemoryBufferData::DefBufSize)
{ {
m_bufdata = new wxMemoryBufferData(size); m_bufdata = new wxMemoryBufferData(size);
m_bufdata->IncRef(); m_bufdata->IncRef();
} }
~wxMemoryBuffer() { m_bufdata->DecRef(); } ~wxMemoryBuffer() { m_bufdata->DecRef(); }
// copy and assignment // copy and assignment
wxMemoryBuffer(const wxMemoryBuffer& src) wxMemoryBuffer(const wxMemoryBuffer& src)
: m_bufdata(src.m_bufdata) : m_bufdata(src.m_bufdata)
{ {
m_bufdata->IncRef(); m_bufdata->IncRef();
} }
wxMemoryBuffer& operator=(const wxMemoryBuffer& src) wxMemoryBuffer& operator=(const wxMemoryBuffer& src)
{ {
m_bufdata->DecRef(); m_bufdata->DecRef();
m_bufdata = src.m_bufdata; m_bufdata = src.m_bufdata;
m_bufdata->IncRef(); m_bufdata->IncRef();
return *this; return *this;
} }
// Accessors // Accessors
void *GetData() const { return m_bufdata->m_data; } void *GetData() const { return m_bufdata->m_data; }
size_t GetBufSize() const { return m_bufdata->m_size; } size_t GetBufSize() const { return m_bufdata->m_size; }
size_t GetDataLen() const { return m_bufdata->m_len; } size_t GetDataLen() const { return m_bufdata->m_len; }
void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); } void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
void SetDataLen(size_t len) void SetDataLen(size_t len)
{ {
wxASSERT(len <= m_bufdata->m_size); wxASSERT(len <= m_bufdata->m_size);
m_bufdata->m_len = len; m_bufdata->m_len = len;
} }
// Ensure the buffer is big enough and return a pointer to it // Ensure the buffer is big enough and return a pointer to it
void *GetWriteBuf(size_t sizeNeeded) void *GetWriteBuf(size_t sizeNeeded)
{ {
m_bufdata->ResizeIfNeeded(sizeNeeded); m_bufdata->ResizeIfNeeded(sizeNeeded);
return m_bufdata->m_data; return m_bufdata->m_data;
} }
// Update the length after the write // Update the length after the write
void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); } void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); }
// Like the above, but appends to the buffer // Like the above, but appends to the buffer
void *GetAppendBuf(size_t sizeNeeded) void *GetAppendBuf(size_t sizeNeeded)
{ {
m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded); m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded);
return (char*)m_bufdata->m_data + m_bufdata->m_len; return (char*)m_bufdata->m_data + m_bufdata->m_len;
} }
// Update the length after the append // Update the length after the append
void UngetAppendBuf(size_t sizeUsed) void UngetAppendBuf(size_t sizeUsed)
{ {
SetDataLen(m_bufdata->m_len + sizeUsed); SetDataLen(m_bufdata->m_len + sizeUsed);
} }
// Other ways to append to the buffer // Other ways to append to the buffer
void AppendByte(char data) void AppendByte(char data)
{ {
wxCHECK_RET( m_bufdata->m_data, _T("invalid wxMemoryBuffer") ); wxCHECK_RET( m_bufdata->m_data, _T("invalid wxMemoryBuffer") );
m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1); m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1);
*(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data; *(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data;
m_bufdata->m_len += 1; m_bufdata->m_len += 1;
} }
void AppendData(const void *data, size_t len) void AppendData(const void *data, size_t len)
{ {
memcpy(GetAppendBuf(len), data, len); memcpy(GetAppendBuf(len), data, len);
UngetAppendBuf(len); UngetAppendBuf(len);
} }
operator const char *() const { return (const char*)GetData(); } operator const char *() const { return (const char*)GetData(); }
private: private:
wxMemoryBufferData* m_bufdata; wxMemoryBufferData* m_bufdata;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// template class for any kind of data // template class for any kind of data
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// TODO // TODO
#endif // _WX_BUFFER_H #endif // _WX_BUFFER_H

View File

@@ -1,149 +1,149 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/build.h // Name: wx/build.h
// Purpose: Runtime build options checking // Purpose: Runtime build options checking
// Author: Vadim Zeitlin, Vaclav Slavik // Author: Vadim Zeitlin, Vaclav Slavik
// Modified by: // Modified by:
// Created: 07.05.02 // Created: 07.05.02
// RCS-ID: $Id: build.h 35858 2005-10-09 15:48:42Z MBN $ // RCS-ID: $Id: build.h 35858 2005-10-09 15:48:42Z MBN $
// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BUILD_H_ #ifndef _WX_BUILD_H_
#define _WX_BUILD_H_ #define _WX_BUILD_H_
#include "wx/version.h" #include "wx/version.h"
// NB: This file contains macros for checking binary compatibility of libraries // NB: This file contains macros for checking binary compatibility of libraries
// in multilib buildm, plugins and user components. // in multilib buildm, plugins and user components.
// The WX_BUILD_OPTIONS_SIGNATURE macro expands into string that should // The WX_BUILD_OPTIONS_SIGNATURE macro expands into string that should
// uniquely identify binary compatible builds: i.e. if two builds of the // uniquely identify binary compatible builds: i.e. if two builds of the
// library are binary compatible, their signature string should be the // library are binary compatible, their signature string should be the
// same; if two builds are binary incompatible, their signatures should // same; if two builds are binary incompatible, their signatures should
// be different. // be different.
// //
// Therefore, wxUSE_XXX flags that affect binary compatibility (vtables, // Therefore, wxUSE_XXX flags that affect binary compatibility (vtables,
// function signatures) should be accounted for here. So should compilers // function signatures) should be accounted for here. So should compilers
// and compiler versions (but note that binary compatible compiler versions // and compiler versions (but note that binary compatible compiler versions
// such as gcc-2.95.2 and gcc-2.95.3 should have same signature!). // such as gcc-2.95.2 and gcc-2.95.3 should have same signature!).
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// WX_BUILD_OPTIONS_SIGNATURE // WX_BUILD_OPTIONS_SIGNATURE
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x) #define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x)
#define __WX_BO_STRINGIZE0(x) #x #define __WX_BO_STRINGIZE0(x) #x
#if (wxMINOR_VERSION % 2) == 0 #if (wxMINOR_VERSION % 2) == 0
#define __WX_BO_VERSION(x,y,z) \ #define __WX_BO_VERSION(x,y,z) \
__WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y)
#else #else
#define __WX_BO_VERSION(x,y,z) \ #define __WX_BO_VERSION(x,y,z) \
__WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z) __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z)
#endif #endif
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
#define __WX_BO_DEBUG "debug" #define __WX_BO_DEBUG "debug"
#else #else
#define __WX_BO_DEBUG "no debug" #define __WX_BO_DEBUG "no debug"
#endif #endif
#if wxUSE_UNICODE #if wxUSE_UNICODE
#define __WX_BO_UNICODE "Unicode" #define __WX_BO_UNICODE "Unicode"
#else #else
#define __WX_BO_UNICODE "ANSI" #define __WX_BO_UNICODE "ANSI"
#endif #endif
// GCC and Intel C++ share same C++ ABI (and possibly others in the future), // GCC and Intel C++ share same C++ ABI (and possibly others in the future),
// check if compiler versions are compatible: // check if compiler versions are compatible:
#if defined(__GXX_ABI_VERSION) #if defined(__GXX_ABI_VERSION)
#define __WX_BO_COMPILER \ #define __WX_BO_COMPILER \
",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION) ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
#elif defined(__INTEL_COMPILER) #elif defined(__INTEL_COMPILER)
#define __WX_BO_COMPILER ",Intel C++" #define __WX_BO_COMPILER ",Intel C++"
#elif defined(__GNUG__) #elif defined(__GNUG__)
#define __WX_BO_COMPILER ",GCC " \ #define __WX_BO_COMPILER ",GCC " \
__WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__) __WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__)
#elif defined(__VISUALC__) #elif defined(__VISUALC__)
#define __WX_BO_COMPILER ",Visual C++" #define __WX_BO_COMPILER ",Visual C++"
#elif defined(__BORLANDC__) #elif defined(__BORLANDC__)
#define __WX_BO_COMPILER ",Borland C++" #define __WX_BO_COMPILER ",Borland C++"
#elif defined(__DIGITALMARS__) #elif defined(__DIGITALMARS__)
#define __WX_BO_COMPILER ",DigitalMars" #define __WX_BO_COMPILER ",DigitalMars"
#elif defined(__WATCOMC__) #elif defined(__WATCOMC__)
#define __WX_BO_COMPILER ",Watcom C++" #define __WX_BO_COMPILER ",Watcom C++"
#else #else
#define __WX_BO_COMPILER #define __WX_BO_COMPILER
#endif #endif
// WXWIN_COMPATIBILITY macros affect presence of virtual functions // WXWIN_COMPATIBILITY macros affect presence of virtual functions
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
#define __WX_BO_WXWIN_COMPAT_2_4 ",compatible with 2.4" #define __WX_BO_WXWIN_COMPAT_2_4 ",compatible with 2.4"
#else #else
#define __WX_BO_WXWIN_COMPAT_2_4 #define __WX_BO_WXWIN_COMPAT_2_4
#endif #endif
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
#define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6" #define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6"
#else #else
#define __WX_BO_WXWIN_COMPAT_2_6 #define __WX_BO_WXWIN_COMPAT_2_6
#endif #endif
// deriving wxWin containers from STL ones changes them completely: // deriving wxWin containers from STL ones changes them completely:
#if wxUSE_STL #if wxUSE_STL
#define __WX_BO_STL ",STL containers" #define __WX_BO_STL ",STL containers"
#else #else
#define __WX_BO_STL ",wx containers" #define __WX_BO_STL ",wx containers"
#endif #endif
// This macro is passed as argument to wxConsoleApp::CheckBuildOptions() // This macro is passed as argument to wxConsoleApp::CheckBuildOptions()
#define WX_BUILD_OPTIONS_SIGNATURE \ #define WX_BUILD_OPTIONS_SIGNATURE \
__WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \ __WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \ " (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
__WX_BO_COMPILER \ __WX_BO_COMPILER \
__WX_BO_STL \ __WX_BO_STL \
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \ __WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
")" ")"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// WX_CHECK_BUILD_OPTIONS // WX_CHECK_BUILD_OPTIONS
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Use this macro to check build options. Adding it to a file in DLL will // Use this macro to check build options. Adding it to a file in DLL will
// ensure that the DLL checks build options in same way IMPLEMENT_APP() does. // ensure that the DLL checks build options in same way IMPLEMENT_APP() does.
#define WX_CHECK_BUILD_OPTIONS(libName) \ #define WX_CHECK_BUILD_OPTIONS(libName) \
static struct wxBuildOptionsChecker \ static struct wxBuildOptionsChecker \
{ \ { \
wxBuildOptionsChecker() \ wxBuildOptionsChecker() \
{ \ { \
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \ wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
libName); \ libName); \
} \ } \
} gs_buildOptionsCheck; } gs_buildOptionsCheck;
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxBuildOptions // wxBuildOptions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// NB: Don't use this class in new code, it relies on the ctor being always // NB: Don't use this class in new code, it relies on the ctor being always
// inlined. WX_BUILD_OPTIONS_SIGNATURE always works. // inlined. WX_BUILD_OPTIONS_SIGNATURE always works.
class wxBuildOptions class wxBuildOptions
{ {
public: public:
// the ctor must be inline to get the compilation settings of the code // the ctor must be inline to get the compilation settings of the code
// which included this header // which included this header
wxBuildOptions() : m_signature(WX_BUILD_OPTIONS_SIGNATURE) {} wxBuildOptions() : m_signature(WX_BUILD_OPTIONS_SIGNATURE) {}
private: private:
const char *m_signature; const char *m_signature;
// actually only CheckBuildOptions() should be our friend but well... // actually only CheckBuildOptions() should be our friend but well...
friend class wxAppConsole; friend class wxAppConsole;
}; };
#endif // WXWIN_COMPATIBILITY_2_4 #endif // WXWIN_COMPATIBILITY_2_4
#endif // _WX_BUILD_H_ #endif // _WX_BUILD_H_

View File

@@ -1,21 +1,21 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/busyinfo.h // Name: wx/busyinfo.h
// Purpose: Information window (when app is busy) // Purpose: Information window (when app is busy)
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Copyright: (c) 1999 Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik
// RCS-ID: $Id: busyinfo.h 37158 2006-01-26 15:40:46Z ABX $ // RCS-ID: $Id: busyinfo.h 37158 2006-01-26 15:40:46Z ABX $
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef __BUSYINFO_H_BASE__ #ifndef __BUSYINFO_H_BASE__
#define __BUSYINFO_H_BASE__ #define __BUSYINFO_H_BASE__
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_BUSYINFO #if wxUSE_BUSYINFO
#include "wx/generic/busyinfo.h" #include "wx/generic/busyinfo.h"
#endif // wxUSE_BUSYINFO #endif // wxUSE_BUSYINFO
#endif // __BUSYINFO_H_BASE__ #endif // __BUSYINFO_H_BASE__

View File

@@ -1,106 +1,106 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/button.h // Name: wx/button.h
// Purpose: wxButtonBase class // Purpose: wxButtonBase class
// Author: Vadim Zetlin // Author: Vadim Zetlin
// Modified by: // Modified by:
// Created: 15.08.00 // Created: 15.08.00
// RCS-ID: $Id: button.h 49563 2007-10-31 20:46:21Z VZ $ // RCS-ID: $Id: button.h 49563 2007-10-31 20:46:21Z VZ $
// Copyright: (c) Vadim Zetlin // Copyright: (c) Vadim Zetlin
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BUTTON_H_BASE_ #ifndef _WX_BUTTON_H_BASE_
#define _WX_BUTTON_H_BASE_ #define _WX_BUTTON_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxButton flags shared with other classes // wxButton flags shared with other classes
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON #if wxUSE_TOGGLEBTN || wxUSE_BUTTON
// These flags affect label alignment // These flags affect label alignment
#define wxBU_LEFT 0x0040 #define wxBU_LEFT 0x0040
#define wxBU_TOP 0x0080 #define wxBU_TOP 0x0080
#define wxBU_RIGHT 0x0100 #define wxBU_RIGHT 0x0100
#define wxBU_BOTTOM 0x0200 #define wxBU_BOTTOM 0x0200
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM ) #define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
#endif #endif
#if wxUSE_BUTTON #if wxUSE_BUTTON
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxButton specific flags // wxButton specific flags
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// These two flags are obsolete // These two flags are obsolete
#define wxBU_NOAUTODRAW 0x0000 #define wxBU_NOAUTODRAW 0x0000
#define wxBU_AUTODRAW 0x0004 #define wxBU_AUTODRAW 0x0004
// by default, the buttons will be created with some (system dependent) // by default, the buttons will be created with some (system dependent)
// minimal size to make them look nicer, giving this style will make them as // minimal size to make them look nicer, giving this style will make them as
// small as possible // small as possible
#define wxBU_EXACTFIT 0x0001 #define wxBU_EXACTFIT 0x0001
#include "wx/control.h" #include "wx/control.h"
class WXDLLIMPEXP_FWD_CORE wxBitmap; class WXDLLIMPEXP_FWD_CORE wxBitmap;
extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxButton: a push button // wxButton: a push button
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxButtonBase : public wxControl class WXDLLEXPORT wxButtonBase : public wxControl
{ {
public: public:
wxButtonBase() { } wxButtonBase() { }
// show the image in the button in addition to the label // show the image in the button in addition to the label
virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { } virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
// set the margins around the image // set the margins around the image
virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { } virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { }
// this wxButton method is called when the button becomes the default one // this wxButton method is called when the button becomes the default one
// on its panel // on its panel
virtual void SetDefault() { } virtual void SetDefault() { }
// Buttons on MSW can look bad if they are not native colours, because // Buttons on MSW can look bad if they are not native colours, because
// then they become owner-drawn and not theme-drawn. Disable it here // then they become owner-drawn and not theme-drawn. Disable it here
// in wxButtonBase to make it consistent. // in wxButtonBase to make it consistent.
virtual bool ShouldInheritColours() const { return false; } virtual bool ShouldInheritColours() const { return false; }
// returns the default button size for this platform // returns the default button size for this platform
static wxSize GetDefaultSize(); static wxSize GetDefaultSize();
protected: protected:
DECLARE_NO_COPY_CLASS(wxButtonBase) DECLARE_NO_COPY_CLASS(wxButtonBase)
}; };
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/button.h" #include "wx/univ/button.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/button.h" #include "wx/msw/button.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/button.h" #include "wx/motif/button.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/button.h" #include "wx/gtk/button.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/button.h" #include "wx/gtk1/button.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/button.h" #include "wx/mac/button.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/button.h" #include "wx/cocoa/button.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/button.h" #include "wx/os2/button.h"
#elif defined(__WXPALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/button.h" #include "wx/palmos/button.h"
#endif #endif
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON
#endif #endif
// _WX_BUTTON_H_BASE_ // _WX_BUTTON_H_BASE_

View File

@@ -1,232 +1,232 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/calctrl.h // Name: wx/calctrl.h
// Purpose: date-picker control // Purpose: date-picker control
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 29.12.99 // Created: 29.12.99
// RCS-ID: $Id: calctrl.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: calctrl.h 53135 2008-04-12 02:31:04Z VZ $
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/* /*
TODO TODO
1. implement multiple selections for date ranges 1. implement multiple selections for date ranges
2. background bitmap for the calendar? 2. background bitmap for the calendar?
*/ */
#ifndef _WX_CALCTRL_H_ #ifndef _WX_CALCTRL_H_
#define _WX_CALCTRL_H_ #define _WX_CALCTRL_H_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_CALENDARCTRL #if wxUSE_CALENDARCTRL
#include "wx/dateevt.h" #include "wx/dateevt.h"
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/font.h" #include "wx/font.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCalendarCtrl flags // wxCalendarCtrl flags
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
enum enum
{ {
// show Sunday as the first day of the week (default) // show Sunday as the first day of the week (default)
wxCAL_SUNDAY_FIRST = 0x0000, wxCAL_SUNDAY_FIRST = 0x0000,
// show Monder as the first day of the week // show Monder as the first day of the week
wxCAL_MONDAY_FIRST = 0x0001, wxCAL_MONDAY_FIRST = 0x0001,
// highlight holidays // highlight holidays
wxCAL_SHOW_HOLIDAYS = 0x0002, wxCAL_SHOW_HOLIDAYS = 0x0002,
// disable the year change control, show only the month change one // disable the year change control, show only the month change one
wxCAL_NO_YEAR_CHANGE = 0x0004, wxCAL_NO_YEAR_CHANGE = 0x0004,
// don't allow changing neither month nor year (implies // don't allow changing neither month nor year (implies
// wxCAL_NO_YEAR_CHANGE) // wxCAL_NO_YEAR_CHANGE)
wxCAL_NO_MONTH_CHANGE = 0x000c, wxCAL_NO_MONTH_CHANGE = 0x000c,
// use MS-style month-selection instead of combo-spin combination // use MS-style month-selection instead of combo-spin combination
wxCAL_SEQUENTIAL_MONTH_SELECTION = 0x0010, wxCAL_SEQUENTIAL_MONTH_SELECTION = 0x0010,
// show the neighbouring weeks in the previous and next month // show the neighbouring weeks in the previous and next month
wxCAL_SHOW_SURROUNDING_WEEKS = 0x0020 wxCAL_SHOW_SURROUNDING_WEEKS = 0x0020
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// return values for the HitTest() method // return values for the HitTest() method
enum wxCalendarHitTestResult enum wxCalendarHitTestResult
{ {
wxCAL_HITTEST_NOWHERE, // outside of anything wxCAL_HITTEST_NOWHERE, // outside of anything
wxCAL_HITTEST_HEADER, // on the header (weekdays) wxCAL_HITTEST_HEADER, // on the header (weekdays)
wxCAL_HITTEST_DAY, // on a day in the calendar wxCAL_HITTEST_DAY, // on a day in the calendar
wxCAL_HITTEST_INCMONTH, wxCAL_HITTEST_INCMONTH,
wxCAL_HITTEST_DECMONTH, wxCAL_HITTEST_DECMONTH,
wxCAL_HITTEST_SURROUNDING_WEEK wxCAL_HITTEST_SURROUNDING_WEEK
}; };
// border types for a date // border types for a date
enum wxCalendarDateBorder enum wxCalendarDateBorder
{ {
wxCAL_BORDER_NONE, // no border (default) wxCAL_BORDER_NONE, // no border (default)
wxCAL_BORDER_SQUARE, // a rectangular border wxCAL_BORDER_SQUARE, // a rectangular border
wxCAL_BORDER_ROUND // a round border wxCAL_BORDER_ROUND // a round border
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCalendarDateAttr: custom attributes for a calendar date // wxCalendarDateAttr: custom attributes for a calendar date
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxCalendarDateAttr class WXDLLIMPEXP_ADV wxCalendarDateAttr
{ {
#if !defined(__VISAGECPP__) #if !defined(__VISAGECPP__)
protected: protected:
// This has to be before the use of Init(), for MSVC++ 1.5 // This has to be before the use of Init(), for MSVC++ 1.5
// But dorks up Visualage! // But dorks up Visualage!
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE) void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
{ {
m_border = border; m_border = border;
m_holiday = false; m_holiday = false;
} }
#endif #endif
public: public:
// ctors // ctors
wxCalendarDateAttr() { Init(); } wxCalendarDateAttr() { Init(); }
wxCalendarDateAttr(const wxColour& colText, wxCalendarDateAttr(const wxColour& colText,
const wxColour& colBack = wxNullColour, const wxColour& colBack = wxNullColour,
const wxColour& colBorder = wxNullColour, const wxColour& colBorder = wxNullColour,
const wxFont& font = wxNullFont, const wxFont& font = wxNullFont,
wxCalendarDateBorder border = wxCAL_BORDER_NONE) wxCalendarDateBorder border = wxCAL_BORDER_NONE)
: m_colText(colText), m_colBack(colBack), : m_colText(colText), m_colBack(colBack),
m_colBorder(colBorder), m_font(font) m_colBorder(colBorder), m_font(font)
{ {
Init(border); Init(border);
} }
wxCalendarDateAttr(wxCalendarDateBorder border, wxCalendarDateAttr(wxCalendarDateBorder border,
const wxColour& colBorder = wxNullColour) const wxColour& colBorder = wxNullColour)
: m_colBorder(colBorder) : m_colBorder(colBorder)
{ {
Init(border); Init(border);
} }
// setters // setters
void SetTextColour(const wxColour& colText) { m_colText = colText; } void SetTextColour(const wxColour& colText) { m_colText = colText; }
void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; } void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
void SetBorderColour(const wxColour& col) { m_colBorder = col; } void SetBorderColour(const wxColour& col) { m_colBorder = col; }
void SetFont(const wxFont& font) { m_font = font; } void SetFont(const wxFont& font) { m_font = font; }
void SetBorder(wxCalendarDateBorder border) { m_border = border; } void SetBorder(wxCalendarDateBorder border) { m_border = border; }
void SetHoliday(bool holiday) { m_holiday = holiday; } void SetHoliday(bool holiday) { m_holiday = holiday; }
// accessors // accessors
bool HasTextColour() const { return m_colText.Ok(); } bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); } bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasBorderColour() const { return m_colBorder.Ok(); } bool HasBorderColour() const { return m_colBorder.Ok(); }
bool HasFont() const { return m_font.Ok(); } bool HasFont() const { return m_font.Ok(); }
bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; } bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
bool IsHoliday() const { return m_holiday; } bool IsHoliday() const { return m_holiday; }
const wxColour& GetTextColour() const { return m_colText; } const wxColour& GetTextColour() const { return m_colText; }
const wxColour& GetBackgroundColour() const { return m_colBack; } const wxColour& GetBackgroundColour() const { return m_colBack; }
const wxColour& GetBorderColour() const { return m_colBorder; } const wxColour& GetBorderColour() const { return m_colBorder; }
const wxFont& GetFont() const { return m_font; } const wxFont& GetFont() const { return m_font; }
wxCalendarDateBorder GetBorder() const { return m_border; } wxCalendarDateBorder GetBorder() const { return m_border; }
#if defined(__VISAGECPP__) #if defined(__VISAGECPP__)
protected: protected:
// This has to be here for VisualAge // This has to be here for VisualAge
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE) void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
{ {
m_border = border; m_border = border;
m_holiday = false; m_holiday = false;
} }
#endif #endif
private: private:
wxColour m_colText, wxColour m_colText,
m_colBack, m_colBack,
m_colBorder; m_colBorder;
wxFont m_font; wxFont m_font;
wxCalendarDateBorder m_border; wxCalendarDateBorder m_border;
bool m_holiday; bool m_holiday;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCalendarCtrl events // wxCalendarCtrl events
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl; class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
{ {
friend class wxCalendarCtrl; friend class wxCalendarCtrl;
public: public:
wxCalendarEvent() { Init(); } wxCalendarEvent() { Init(); }
inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type); inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; } void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
wxDateTime::WeekDay GetWeekDay() const { return m_wday; } wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
protected: protected:
void Init() void Init()
{ {
m_wday = wxDateTime::Inv_WeekDay; m_wday = wxDateTime::Inv_WeekDay;
} }
private: private:
wxDateTime::WeekDay m_wday; wxDateTime::WeekDay m_wday;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent) DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCalendarCtrl // wxCalendarCtrl
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// so far we only have a generic version, so keep it simple // so far we only have a generic version, so keep it simple
#include "wx/generic/calctrl.h" #include "wx/generic/calctrl.h"
// now we can define the inline ctor using wxCalendarCtrl // now we can define the inline ctor using wxCalendarCtrl
inline inline
wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type) wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
: wxDateEvent(cal, cal->GetDate(), type) : wxDateEvent(cal, cal->GetDate(), type)
{ {
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// calendar event types and macros for handling them // calendar event types and macros for handling them
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES() BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_SEL_CHANGED, 950) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_SEL_CHANGED, 950)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DAY_CHANGED, 951) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DAY_CHANGED, 951)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_MONTH_CHANGED, 952) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_MONTH_CHANGED, 952)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_YEAR_CHANGED, 953) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_YEAR_CHANGED, 953)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DOUBLECLICKED, 954) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DOUBLECLICKED, 954)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEKDAY_CLICKED, 955) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEKDAY_CLICKED, 955)
END_DECLARE_EVENT_TYPES() END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&); typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
#define wxCalendarEventHandler(func) \ #define wxCalendarEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func) (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
#define wx__DECLARE_CALEVT(evt, id, fn) \ #define wx__DECLARE_CALEVT(evt, id, fn) \
wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(fn)) wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(fn))
#define EVT_CALENDAR(id, fn) wx__DECLARE_CALEVT(DOUBLECLICKED, id, fn) #define EVT_CALENDAR(id, fn) wx__DECLARE_CALEVT(DOUBLECLICKED, id, fn)
#define EVT_CALENDAR_SEL_CHANGED(id, fn) wx__DECLARE_CALEVT(SEL_CHANGED, id, fn) #define EVT_CALENDAR_SEL_CHANGED(id, fn) wx__DECLARE_CALEVT(SEL_CHANGED, id, fn)
#define EVT_CALENDAR_DAY(id, fn) wx__DECLARE_CALEVT(DAY_CHANGED, id, fn) #define EVT_CALENDAR_DAY(id, fn) wx__DECLARE_CALEVT(DAY_CHANGED, id, fn)
#define EVT_CALENDAR_MONTH(id, fn) wx__DECLARE_CALEVT(MONTH_CHANGED, id, fn) #define EVT_CALENDAR_MONTH(id, fn) wx__DECLARE_CALEVT(MONTH_CHANGED, id, fn)
#define EVT_CALENDAR_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn) #define EVT_CALENDAR_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn)
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn) #define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
#endif // wxUSE_CALENDARCTRL #endif // wxUSE_CALENDARCTRL
#endif // _WX_CALCTRL_H_ #endif // _WX_CALCTRL_H_

View File

@@ -1,252 +1,252 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/caret.h // Name: wx/caret.h
// Purpose: wxCaretBase class - the interface of wxCaret // Purpose: wxCaretBase class - the interface of wxCaret
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 23.05.99 // Created: 23.05.99
// RCS-ID: $Id: caret.h 49804 2007-11-10 01:09:42Z VZ $ // RCS-ID: $Id: caret.h 49804 2007-11-10 01:09:42Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CARET_H_BASE_ #ifndef _WX_CARET_H_BASE_
#define _WX_CARET_H_BASE_ #define _WX_CARET_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_CARET #if wxUSE_CARET
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// forward declarations // forward declarations
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxWindowBase; class WXDLLIMPEXP_FWD_CORE wxWindowBase;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers we have to include // headers we have to include
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/gdicmn.h" // for wxPoint, wxSize #include "wx/gdicmn.h" // for wxPoint, wxSize
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// A caret is a blinking cursor showing the position where the typed text will // A caret is a blinking cursor showing the position where the typed text will
// appear. It can be either a solid block or a custom bitmap (TODO) // appear. It can be either a solid block or a custom bitmap (TODO)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxCaretBase class WXDLLEXPORT wxCaretBase
{ {
public: public:
// ctors // ctors
// ----- // -----
// default - use Create // default - use Create
wxCaretBase() { Init(); } wxCaretBase() { Init(); }
// create the caret of given (in pixels) width and height and associate // create the caret of given (in pixels) width and height and associate
// with the given window // with the given window
wxCaretBase(wxWindowBase *window, int width, int height) wxCaretBase(wxWindowBase *window, int width, int height)
{ {
Init(); Init();
(void)Create(window, width, height); (void)Create(window, width, height);
} }
// same as above // same as above
wxCaretBase(wxWindowBase *window, const wxSize& size) wxCaretBase(wxWindowBase *window, const wxSize& size)
{ {
Init(); Init();
(void)Create(window, size); (void)Create(window, size);
} }
// a virtual dtor has been provided since this class has virtual members // a virtual dtor has been provided since this class has virtual members
virtual ~wxCaretBase() { } virtual ~wxCaretBase() { }
// Create() functions - same as ctor but returns the success code // Create() functions - same as ctor but returns the success code
// -------------------------------------------------------------- // --------------------------------------------------------------
// same as ctor // same as ctor
bool Create(wxWindowBase *window, int width, int height) bool Create(wxWindowBase *window, int width, int height)
{ return DoCreate(window, width, height); } { return DoCreate(window, width, height); }
// same as ctor // same as ctor
bool Create(wxWindowBase *window, const wxSize& size) bool Create(wxWindowBase *window, const wxSize& size)
{ return DoCreate(window, size.x, size.y); } { return DoCreate(window, size.x, size.y); }
// accessors // accessors
// --------- // ---------
// is the caret valid? // is the caret valid?
bool IsOk() const { return m_width != 0 && m_height != 0; } bool IsOk() const { return m_width != 0 && m_height != 0; }
// is the caret currently shown? // is the caret currently shown?
bool IsVisible() const { return m_countVisible > 0; } bool IsVisible() const { return m_countVisible > 0; }
// get the caret position // get the caret position
void GetPosition(int *x, int *y) const void GetPosition(int *x, int *y) const
{ {
if ( x ) *x = m_x; if ( x ) *x = m_x;
if ( y ) *y = m_y; if ( y ) *y = m_y;
} }
wxPoint GetPosition() const { return wxPoint(m_x, m_y); } wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
// get the caret size // get the caret size
void GetSize(int *width, int *height) const void GetSize(int *width, int *height) const
{ {
if ( width ) *width = m_width; if ( width ) *width = m_width;
if ( height ) *height = m_height; if ( height ) *height = m_height;
} }
wxSize GetSize() const { return wxSize(m_width, m_height); } wxSize GetSize() const { return wxSize(m_width, m_height); }
// get the window we're associated with // get the window we're associated with
wxWindow *GetWindow() const { return (wxWindow *)m_window; } wxWindow *GetWindow() const { return (wxWindow *)m_window; }
// change the size of the caret // change the size of the caret
void SetSize(int width, int height) { void SetSize(int width, int height) {
m_width = width; m_width = width;
m_height = height; m_height = height;
DoSize(); DoSize();
} }
void SetSize(const wxSize& size) { SetSize(size.x, size.y); } void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
// operations // operations
// ---------- // ----------
// move the caret to given position (in logical coords) // move the caret to given position (in logical coords)
void Move(int x, int y) { m_x = x; m_y = y; DoMove(); } void Move(int x, int y) { m_x = x; m_y = y; DoMove(); }
void Move(const wxPoint& pt) { m_x = pt.x; m_y = pt.y; DoMove(); } void Move(const wxPoint& pt) { m_x = pt.x; m_y = pt.y; DoMove(); }
// show/hide the caret (should be called by wxWindow when needed): // show/hide the caret (should be called by wxWindow when needed):
// Show() must be called as many times as Hide() + 1 to make the caret // Show() must be called as many times as Hide() + 1 to make the caret
// visible // visible
virtual void Show(bool show = true) virtual void Show(bool show = true)
{ {
if ( show ) if ( show )
{ {
if ( m_countVisible++ == 0 ) if ( m_countVisible++ == 0 )
DoShow(); DoShow();
} }
else else
{ {
if ( --m_countVisible == 0 ) if ( --m_countVisible == 0 )
DoHide(); DoHide();
} }
} }
virtual void Hide() { Show(false); } virtual void Hide() { Show(false); }
// blink time is measured in milliseconds and is the time elapsed // blink time is measured in milliseconds and is the time elapsed
// between 2 inversions of the caret (blink time of the caret is common // between 2 inversions of the caret (blink time of the caret is common
// to all carets in the Universe, so these functions are static) // to all carets in the Universe, so these functions are static)
static int GetBlinkTime(); static int GetBlinkTime();
static void SetBlinkTime(int milliseconds); static void SetBlinkTime(int milliseconds);
// implementation from now on // implementation from now on
// -------------------------- // --------------------------
// these functions should be called by wxWindow when the window gets/loses // these functions should be called by wxWindow when the window gets/loses
// the focus - we create/show and hide/destroy the caret here // the focus - we create/show and hide/destroy the caret here
virtual void OnSetFocus() { } virtual void OnSetFocus() { }
virtual void OnKillFocus() { } virtual void OnKillFocus() { }
protected: protected:
// these functions may be overriden in the derived classes, but they // these functions may be overriden in the derived classes, but they
// should call the base class version first // should call the base class version first
virtual bool DoCreate(wxWindowBase *window, int width, int height) virtual bool DoCreate(wxWindowBase *window, int width, int height)
{ {
m_window = window; m_window = window;
m_width = width; m_width = width;
m_height = height; m_height = height;
return true; return true;
} }
// pure virtuals to implement in the derived class // pure virtuals to implement in the derived class
virtual void DoShow() = 0; virtual void DoShow() = 0;
virtual void DoHide() = 0; virtual void DoHide() = 0;
virtual void DoMove() = 0; virtual void DoMove() = 0;
virtual void DoSize() { } virtual void DoSize() { }
// the common initialization // the common initialization
void Init() void Init()
{ {
m_window = (wxWindowBase *)NULL; m_window = (wxWindowBase *)NULL;
m_x = m_y = 0; m_x = m_y = 0;
m_width = m_height = 0; m_width = m_height = 0;
m_countVisible = 0; m_countVisible = 0;
} }
// the size of the caret // the size of the caret
int m_width, m_height; int m_width, m_height;
// the position of the caret // the position of the caret
int m_x, m_y; int m_x, m_y;
// the window we're associated with // the window we're associated with
wxWindowBase *m_window; wxWindowBase *m_window;
// visibility count: the caret is visible only if it's positive // visibility count: the caret is visible only if it's positive
int m_countVisible; int m_countVisible;
private: private:
DECLARE_NO_COPY_CLASS(wxCaretBase) DECLARE_NO_COPY_CLASS(wxCaretBase)
}; };
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// now include the real thing // now include the real thing
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/caret.h" #include "wx/msw/caret.h"
#else #else
#include "wx/generic/caret.h" #include "wx/generic/caret.h"
#endif // platform #endif // platform
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCaretSuspend: a simple class which hides the caret in its ctor and // wxCaretSuspend: a simple class which hides the caret in its ctor and
// restores it in the dtor, this should be used when drawing on the screen to // restores it in the dtor, this should be used when drawing on the screen to
// avoid overdrawing the caret // avoid overdrawing the caret
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef wxHAS_CARET_USING_OVERLAYS #ifdef wxHAS_CARET_USING_OVERLAYS
// we don't need to hide the caret if it's rendered using overlays // we don't need to hide the caret if it's rendered using overlays
class WXDLLEXPORT wxCaretSuspend class WXDLLEXPORT wxCaretSuspend
{ {
public: public:
wxCaretSuspend(wxWindow *WXUNUSED(win)) {} wxCaretSuspend(wxWindow *WXUNUSED(win)) {}
DECLARE_NO_COPY_CLASS(wxCaretSuspend) DECLARE_NO_COPY_CLASS(wxCaretSuspend)
}; };
#else // !wxHAS_CARET_USING_OVERLAYS #else // !wxHAS_CARET_USING_OVERLAYS
class WXDLLEXPORT wxCaretSuspend class WXDLLEXPORT wxCaretSuspend
{ {
public: public:
wxCaretSuspend(wxWindow *win) wxCaretSuspend(wxWindow *win)
{ {
m_caret = win->GetCaret(); m_caret = win->GetCaret();
m_show = false; m_show = false;
if ( m_caret && m_caret->IsVisible() ) if ( m_caret && m_caret->IsVisible() )
{ {
m_caret->Hide(); m_caret->Hide();
m_show = true; m_show = true;
} }
} }
~wxCaretSuspend() ~wxCaretSuspend()
{ {
if ( m_caret && m_show ) if ( m_caret && m_show )
m_caret->Show(); m_caret->Show();
} }
private: private:
wxCaret *m_caret; wxCaret *m_caret;
bool m_show; bool m_show;
DECLARE_NO_COPY_CLASS(wxCaretSuspend) DECLARE_NO_COPY_CLASS(wxCaretSuspend)
}; };
#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS #endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
#endif // wxUSE_CARET #endif // wxUSE_CARET
#endif // _WX_CARET_H_BASE_ #endif // _WX_CARET_H_BASE_

View File

@@ -1,156 +1,156 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/checkbox.h // Name: wx/checkbox.h
// Purpose: wxCheckBox class interface // Purpose: wxCheckBox class interface
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 07.09.00 // Created: 07.09.00
// RCS-ID: $Id: checkbox.h 39901 2006-06-30 10:51:44Z VS $ // RCS-ID: $Id: checkbox.h 39901 2006-06-30 10:51:44Z VS $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKBOX_H_BASE_ #ifndef _WX_CHECKBOX_H_BASE_
#define _WX_CHECKBOX_H_BASE_ #define _WX_CHECKBOX_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_CHECKBOX #if wxUSE_CHECKBOX
#include "wx/control.h" #include "wx/control.h"
/* /*
* wxCheckBox style flags * wxCheckBox style flags
* (Using wxCHK_* because wxCB_* is used by wxComboBox). * (Using wxCHK_* because wxCB_* is used by wxComboBox).
* Determine whether to use a 3-state or 2-state * Determine whether to use a 3-state or 2-state
* checkbox. 3-state enables to differentiate * checkbox. 3-state enables to differentiate
* between 'unchecked', 'checked' and 'undetermined'. * between 'unchecked', 'checked' and 'undetermined'.
*/ */
#define wxCHK_2STATE 0x0000 #define wxCHK_2STATE 0x0000
#define wxCHK_3STATE 0x1000 #define wxCHK_3STATE 0x1000
/* /*
* If this style is set the user can set the checkbox to the * If this style is set the user can set the checkbox to the
* undetermined state. If not set the undetermined set can only * undetermined state. If not set the undetermined set can only
* be set programmatically. * be set programmatically.
* This style can only be used with 3 state checkboxes. * This style can only be used with 3 state checkboxes.
*/ */
#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000 #define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
/* /*
* The possible states of a 3-state checkbox (Compatible * The possible states of a 3-state checkbox (Compatible
* with the 2-state checkbox). * with the 2-state checkbox).
*/ */
enum wxCheckBoxState enum wxCheckBoxState
{ {
wxCHK_UNCHECKED, wxCHK_UNCHECKED,
wxCHK_CHECKED, wxCHK_CHECKED,
wxCHK_UNDETERMINED /* 3-state checkbox only */ wxCHK_UNDETERMINED /* 3-state checkbox only */
}; };
extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCheckBox: a control which shows a label and a box which may be checked // wxCheckBox: a control which shows a label and a box which may be checked
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxCheckBoxBase : public wxControl class WXDLLEXPORT wxCheckBoxBase : public wxControl
{ {
public: public:
wxCheckBoxBase() { } wxCheckBoxBase() { }
// set/get the checked status of the listbox // set/get the checked status of the listbox
virtual void SetValue(bool value) = 0; virtual void SetValue(bool value) = 0;
virtual bool GetValue() const = 0; virtual bool GetValue() const = 0;
bool IsChecked() const bool IsChecked() const
{ {
wxASSERT_MSG( !Is3State(), wxT("Calling IsChecked() doesn't make sense for") wxASSERT_MSG( !Is3State(), wxT("Calling IsChecked() doesn't make sense for")
wxT(" a three state checkbox, Use Get3StateValue() instead") ); wxT(" a three state checkbox, Use Get3StateValue() instead") );
return GetValue(); return GetValue();
} }
wxCheckBoxState Get3StateValue() const wxCheckBoxState Get3StateValue() const
{ {
wxCheckBoxState state = DoGet3StateValue(); wxCheckBoxState state = DoGet3StateValue();
if ( state == wxCHK_UNDETERMINED && !Is3State() ) if ( state == wxCHK_UNDETERMINED && !Is3State() )
{ {
// Undetermined state with a 2-state checkbox?? // Undetermined state with a 2-state checkbox??
wxFAIL_MSG( wxT("DoGet3StateValue() says the 2-state checkbox is ") wxFAIL_MSG( wxT("DoGet3StateValue() says the 2-state checkbox is ")
wxT("in an undetermined/third state") ); wxT("in an undetermined/third state") );
state = wxCHK_UNCHECKED; state = wxCHK_UNCHECKED;
} }
return state; return state;
} }
void Set3StateValue(wxCheckBoxState state) void Set3StateValue(wxCheckBoxState state)
{ {
if ( state == wxCHK_UNDETERMINED && !Is3State() ) if ( state == wxCHK_UNDETERMINED && !Is3State() )
{ {
wxFAIL_MSG(wxT("Setting a 2-state checkbox to undetermined state")); wxFAIL_MSG(wxT("Setting a 2-state checkbox to undetermined state"));
state = wxCHK_UNCHECKED; state = wxCHK_UNCHECKED;
} }
DoSet3StateValue(state); DoSet3StateValue(state);
} }
bool Is3State() const { return HasFlag(wxCHK_3STATE); } bool Is3State() const { return HasFlag(wxCHK_3STATE); }
bool Is3rdStateAllowedForUser() const bool Is3rdStateAllowedForUser() const
{ {
return HasFlag(wxCHK_ALLOW_3RD_STATE_FOR_USER); return HasFlag(wxCHK_ALLOW_3RD_STATE_FOR_USER);
} }
virtual bool HasTransparentBackground() { return true; } virtual bool HasTransparentBackground() { return true; }
// wxCheckBox-specific processing after processing the update event // wxCheckBox-specific processing after processing the update event
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) virtual void DoUpdateWindowUI(wxUpdateUIEvent& event)
{ {
wxControl::DoUpdateWindowUI(event); wxControl::DoUpdateWindowUI(event);
if ( event.GetSetChecked() ) if ( event.GetSetChecked() )
SetValue(event.GetChecked()); SetValue(event.GetChecked());
} }
protected: protected:
virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; } virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; }
virtual wxCheckBoxState DoGet3StateValue() const virtual wxCheckBoxState DoGet3StateValue() const
{ {
wxFAIL; wxFAIL;
return wxCHK_UNCHECKED; return wxCHK_UNCHECKED;
} }
private: private:
DECLARE_NO_COPY_CLASS(wxCheckBoxBase) DECLARE_NO_COPY_CLASS(wxCheckBoxBase)
}; };
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/checkbox.h" #include "wx/univ/checkbox.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/checkbox.h" #include "wx/msw/checkbox.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/checkbox.h" #include "wx/motif/checkbox.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/checkbox.h" #include "wx/gtk/checkbox.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/checkbox.h" #include "wx/gtk1/checkbox.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/checkbox.h" #include "wx/mac/checkbox.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/checkbox.h" #include "wx/cocoa/checkbox.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/checkbox.h" #include "wx/os2/checkbox.h"
#elif defined(__WXPALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/checkbox.h" #include "wx/palmos/checkbox.h"
#endif #endif
#endif // wxUSE_CHECKBOX #endif // wxUSE_CHECKBOX
#endif #endif
// _WX_CHECKBOX_H_BASE_ // _WX_CHECKBOX_H_BASE_

View File

@@ -1,64 +1,64 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/checklst.h // Name: wx/checklst.h
// Purpose: wxCheckListBox class interface // Purpose: wxCheckListBox class interface
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 12.09.00 // Created: 12.09.00
// RCS-ID: $Id: checklst.h 38319 2006-03-23 22:05:23Z VZ $ // RCS-ID: $Id: checklst.h 38319 2006-03-23 22:05:23Z VZ $
// Copyright: (c) Vadim Zeitlin // Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKLST_H_BASE_ #ifndef _WX_CHECKLST_H_BASE_
#define _WX_CHECKLST_H_BASE_ #define _WX_CHECKLST_H_BASE_
#if wxUSE_CHECKLISTBOX #if wxUSE_CHECKLISTBOX
#include "wx/listbox.h" #include "wx/listbox.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCheckListBox: a listbox whose items may be checked // wxCheckListBox: a listbox whose items may be checked
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxCheckListBoxBase : public class WXDLLEXPORT wxCheckListBoxBase : public
#ifdef __WXWINCE__ #ifdef __WXWINCE__
// keep virtuals synchronised // keep virtuals synchronised
wxListBoxBase wxListBoxBase
#else #else
wxListBox wxListBox
#endif #endif
{ {
public: public:
wxCheckListBoxBase() { } wxCheckListBoxBase() { }
// check list box specific methods // check list box specific methods
virtual bool IsChecked(unsigned int item) const = 0; virtual bool IsChecked(unsigned int item) const = 0;
virtual void Check(unsigned int item, bool check = true) = 0; virtual void Check(unsigned int item, bool check = true) = 0;
DECLARE_NO_COPY_CLASS(wxCheckListBoxBase) DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
}; };
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/checklst.h" #include "wx/univ/checklst.h"
#elif defined(__WXWINCE__) #elif defined(__WXWINCE__)
#include "wx/msw/wince/checklst.h" #include "wx/msw/wince/checklst.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/checklst.h" #include "wx/msw/checklst.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/checklst.h" #include "wx/motif/checklst.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/checklst.h" #include "wx/gtk/checklst.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/checklst.h" #include "wx/gtk1/checklst.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/checklst.h" #include "wx/mac/checklst.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/checklst.h" #include "wx/cocoa/checklst.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/checklst.h" #include "wx/os2/checklst.h"
#endif #endif
#endif // wxUSE_CHECKLISTBOX #endif // wxUSE_CHECKLISTBOX
#endif #endif
// _WX_CHECKLST_H_BASE_ // _WX_CHECKLST_H_BASE_

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +1,22 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/choicdgg.h // Name: wx/choicdgg.h
// Purpose: Includes generic choice dialog file // Purpose: Includes generic choice dialog file
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: // Created:
// RCS-ID: $Id: choicdlg.h 33948 2005-05-04 18:57:50Z JS $ // RCS-ID: $Id: choicdlg.h 33948 2005-05-04 18:57:50Z JS $
// Copyright: Julian Smart // Copyright: Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHOICDLG_H_BASE_ #ifndef _WX_CHOICDLG_H_BASE_
#define _WX_CHOICDLG_H_BASE_ #define _WX_CHOICDLG_H_BASE_
#if wxUSE_CHOICEDLG #if wxUSE_CHOICEDLG
#include "wx/generic/choicdgg.h" #include "wx/generic/choicdgg.h"
#endif #endif
#endif #endif
// _WX_CHOICDLG_H_BASE_ // _WX_CHOICDLG_H_BASE_

View File

@@ -1,88 +1,88 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/choice.h // Name: wx/choice.h
// Purpose: wxChoice class interface // Purpose: wxChoice class interface
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 26.07.99 // Created: 26.07.99
// RCS-ID: $Id: choice.h 42727 2006-10-30 16:04:27Z VZ $ // RCS-ID: $Id: choice.h 42727 2006-10-30 16:04:27Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHOICE_H_BASE_ #ifndef _WX_CHOICE_H_BASE_
#define _WX_CHOICE_H_BASE_ #define _WX_CHOICE_H_BASE_
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_CHOICE #if wxUSE_CHOICE
#include "wx/ctrlsub.h" // the base class #include "wx/ctrlsub.h" // the base class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// global data // global data
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxChoice allows to select one of a non-modifiable list of strings // wxChoice allows to select one of a non-modifiable list of strings
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxChoiceBase : public wxControlWithItems class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
{ {
public: public:
wxChoiceBase() { } wxChoiceBase() { }
virtual ~wxChoiceBase(); virtual ~wxChoiceBase();
// all generic methods are in wxControlWithItems // all generic methods are in wxControlWithItems
// get the current selection: this can only be different from the normal // get the current selection: this can only be different from the normal
// selection if the popup items list is currently opened and the user // selection if the popup items list is currently opened and the user
// selected some item in it but didn't close the list yet; otherwise (and // selected some item in it but didn't close the list yet; otherwise (and
// currently always on platforms other than MSW) this is the same as // currently always on platforms other than MSW) this is the same as
// GetSelection() // GetSelection()
virtual int GetCurrentSelection() const { return GetSelection(); } virtual int GetCurrentSelection() const { return GetSelection(); }
// set/get the number of columns in the control (as they're not supported on // set/get the number of columns in the control (as they're not supported on
// most platforms, they do nothing by default) // most platforms, they do nothing by default)
virtual void SetColumns(int WXUNUSED(n) = 1 ) { } virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
virtual int GetColumns() const { return 1 ; } virtual int GetColumns() const { return 1 ; }
// emulate selecting the item event.GetInt() // emulate selecting the item event.GetInt()
void Command(wxCommandEvent& event); void Command(wxCommandEvent& event);
private: private:
DECLARE_NO_COPY_CLASS(wxChoiceBase) DECLARE_NO_COPY_CLASS(wxChoiceBase)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// include the platform-dependent class definition // include the platform-dependent class definition
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/choice.h" #include "wx/univ/choice.h"
#elif defined(__SMARTPHONE__) && defined(__WXWINCE__) #elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
#include "wx/msw/wince/choicece.h" #include "wx/msw/wince/choicece.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/choice.h" #include "wx/msw/choice.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/choice.h" #include "wx/motif/choice.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/choice.h" #include "wx/gtk/choice.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/choice.h" #include "wx/gtk1/choice.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/choice.h" #include "wx/mac/choice.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/choice.h" #include "wx/cocoa/choice.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/choice.h" #include "wx/os2/choice.h"
#endif #endif
#endif // wxUSE_CHOICE #endif // wxUSE_CHOICE
#endif // _WX_CHOICE_H_BASE_ #endif // _WX_CHOICE_H_BASE_

View File

@@ -1,154 +1,154 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/choicebk.h // Name: wx/choicebk.h
// Purpose: wxChoicebook: wxChoice and wxNotebook combination // Purpose: wxChoicebook: wxChoice and wxNotebook combination
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h // Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
// Created: 15.09.04 // Created: 15.09.04
// RCS-ID: $Id: choicebk.h 49804 2007-11-10 01:09:42Z VZ $ // RCS-ID: $Id: choicebk.h 49804 2007-11-10 01:09:42Z VZ $
// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba // Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHOICEBOOK_H_ #ifndef _WX_CHOICEBOOK_H_
#define _WX_CHOICEBOOK_H_ #define _WX_CHOICEBOOK_H_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_CHOICEBOOK #if wxUSE_CHOICEBOOK
#include "wx/bookctrl.h" #include "wx/bookctrl.h"
#include "wx/choice.h" #include "wx/choice.h"
class WXDLLIMPEXP_FWD_CORE wxChoice; class WXDLLIMPEXP_FWD_CORE wxChoice;
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED;
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING;
// wxChoicebook flags // wxChoicebook flags
#define wxCHB_DEFAULT wxBK_DEFAULT #define wxCHB_DEFAULT wxBK_DEFAULT
#define wxCHB_TOP wxBK_TOP #define wxCHB_TOP wxBK_TOP
#define wxCHB_BOTTOM wxBK_BOTTOM #define wxCHB_BOTTOM wxBK_BOTTOM
#define wxCHB_LEFT wxBK_LEFT #define wxCHB_LEFT wxBK_LEFT
#define wxCHB_RIGHT wxBK_RIGHT #define wxCHB_RIGHT wxBK_RIGHT
#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK #define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxChoicebook // wxChoicebook
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase
{ {
public: public:
wxChoicebook() wxChoicebook()
{ {
Init(); Init();
} }
wxChoicebook(wxWindow *parent, wxChoicebook(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxEmptyString) const wxString& name = wxEmptyString)
{ {
Init(); Init();
(void)Create(parent, id, pos, size, style, name); (void)Create(parent, id, pos, size, style, name);
} }
// quasi ctor // quasi ctor
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxEmptyString); const wxString& name = wxEmptyString);
virtual int GetSelection() const; virtual int GetSelection() const;
virtual bool SetPageText(size_t n, const wxString& strText); virtual bool SetPageText(size_t n, const wxString& strText);
virtual wxString GetPageText(size_t n) const; virtual wxString GetPageText(size_t n) const;
virtual int GetPageImage(size_t n) const; virtual int GetPageImage(size_t n) const;
virtual bool SetPageImage(size_t n, int imageId); virtual bool SetPageImage(size_t n, int imageId);
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
virtual bool InsertPage(size_t n, virtual bool InsertPage(size_t n,
wxWindow *page, wxWindow *page,
const wxString& text, const wxString& text,
bool bSelect = false, bool bSelect = false,
int imageId = -1); int imageId = -1);
virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); } virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); }
virtual int ChangeSelection(size_t n) { return DoSetSelection(n); } virtual int ChangeSelection(size_t n) { return DoSetSelection(n); }
virtual void SetImageList(wxImageList *imageList); virtual void SetImageList(wxImageList *imageList);
virtual bool DeleteAllPages(); virtual bool DeleteAllPages();
// returns the choice control // returns the choice control
wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; } wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
protected: protected:
virtual wxWindow *DoRemovePage(size_t page); virtual wxWindow *DoRemovePage(size_t page);
// get the size which the choice control should have // get the size which the choice control should have
virtual wxSize GetControllerSize() const; virtual wxSize GetControllerSize() const;
void UpdateSelectedPage(size_t newsel) void UpdateSelectedPage(size_t newsel)
{ {
m_selection = newsel; m_selection = newsel;
GetChoiceCtrl()->Select(newsel); GetChoiceCtrl()->Select(newsel);
} }
wxBookCtrlBaseEvent* CreatePageChangingEvent() const; wxBookCtrlBaseEvent* CreatePageChangingEvent() const;
void MakeChangedEvent(wxBookCtrlBaseEvent &event); void MakeChangedEvent(wxBookCtrlBaseEvent &event);
// event handlers // event handlers
void OnChoiceSelected(wxCommandEvent& event); void OnChoiceSelected(wxCommandEvent& event);
// the currently selected page or wxNOT_FOUND if none // the currently selected page or wxNOT_FOUND if none
int m_selection; int m_selection;
private: private:
// common part of all constructors // common part of all constructors
void Init(); void Init();
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoicebook) DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoicebook)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// choicebook event class and related stuff // choicebook event class and related stuff
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlBaseEvent class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlBaseEvent
{ {
public: public:
wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
int nSel = -1, int nOldSel = -1) int nSel = -1, int nOldSel = -1)
: wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel) : wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel)
{ {
} }
wxChoicebookEvent(const wxChoicebookEvent& event) wxChoicebookEvent(const wxChoicebookEvent& event)
: wxBookCtrlBaseEvent(event) : wxBookCtrlBaseEvent(event)
{ {
} }
virtual wxEvent *Clone() const { return new wxChoicebookEvent(*this); } virtual wxEvent *Clone() const { return new wxChoicebookEvent(*this); }
private: private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChoicebookEvent) DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChoicebookEvent)
}; };
typedef void (wxEvtHandler::*wxChoicebookEventFunction)(wxChoicebookEvent&); typedef void (wxEvtHandler::*wxChoicebookEventFunction)(wxChoicebookEvent&);
#define wxChoicebookEventHandler(func) \ #define wxChoicebookEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChoicebookEventFunction, &func) (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChoicebookEventFunction, &func)
#define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \ #define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn)) wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn))
#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \ #define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn)) wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn))
#endif // wxUSE_CHOICEBOOK #endif // wxUSE_CHOICEBOOK
#endif // _WX_CHOICEBOOK_H_ #endif // _WX_CHOICEBOOK_H_

View File

@@ -1,145 +1,145 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/clipbrd.h // Name: wx/clipbrd.h
// Purpose: wxClipboad class and clipboard functions // Purpose: wxClipboad class and clipboard functions
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 19.10.99 // Created: 19.10.99
// RCS-ID: $Id: clipbrd.h 49563 2007-10-31 20:46:21Z VZ $ // RCS-ID: $Id: clipbrd.h 49563 2007-10-31 20:46:21Z VZ $
// Copyright: (c) wxWidgets Team // Copyright: (c) wxWidgets Team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CLIPBRD_H_BASE_ #ifndef _WX_CLIPBRD_H_BASE_
#define _WX_CLIPBRD_H_BASE_ #define _WX_CLIPBRD_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_CLIPBOARD #if wxUSE_CLIPBOARD
#include "wx/object.h" #include "wx/object.h"
#include "wx/wxchar.h" #include "wx/wxchar.h"
class WXDLLIMPEXP_FWD_CORE wxDataFormat; class WXDLLIMPEXP_FWD_CORE wxDataFormat;
class WXDLLIMPEXP_FWD_CORE wxDataObject; class WXDLLIMPEXP_FWD_CORE wxDataObject;
class WXDLLIMPEXP_FWD_CORE wxClipboard; class WXDLLIMPEXP_FWD_CORE wxClipboard;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxClipboard represents the system clipboard. Normally, you should use // wxClipboard represents the system clipboard. Normally, you should use
// wxTheClipboard which is a global pointer to the (unique) clipboard. // wxTheClipboard which is a global pointer to the (unique) clipboard.
// //
// Clipboard can be used to copy data to/paste data from. It works together // Clipboard can be used to copy data to/paste data from. It works together
// with wxDataObject. // with wxDataObject.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxClipboardBase : public wxObject class WXDLLEXPORT wxClipboardBase : public wxObject
{ {
public: public:
wxClipboardBase() {} wxClipboardBase() {}
// open the clipboard before Add/SetData() and GetData() // open the clipboard before Add/SetData() and GetData()
virtual bool Open() = 0; virtual bool Open() = 0;
// close the clipboard after Add/SetData() and GetData() // close the clipboard after Add/SetData() and GetData()
virtual void Close() = 0; virtual void Close() = 0;
// query whether the clipboard is opened // query whether the clipboard is opened
virtual bool IsOpened() const = 0; virtual bool IsOpened() const = 0;
// add to the clipboard data // add to the clipboard data
// //
// NB: the clipboard owns the pointer and will delete it, so data must be // NB: the clipboard owns the pointer and will delete it, so data must be
// allocated on the heap // allocated on the heap
virtual bool AddData( wxDataObject *data ) = 0; virtual bool AddData( wxDataObject *data ) = 0;
// set the clipboard data, this is the same as Clear() followed by // set the clipboard data, this is the same as Clear() followed by
// AddData() // AddData()
virtual bool SetData( wxDataObject *data ) = 0; virtual bool SetData( wxDataObject *data ) = 0;
// ask if data in correct format is available // ask if data in correct format is available
virtual bool IsSupported( const wxDataFormat& format ) = 0; virtual bool IsSupported( const wxDataFormat& format ) = 0;
// fill data with data on the clipboard (if available) // fill data with data on the clipboard (if available)
virtual bool GetData( wxDataObject& data ) = 0; virtual bool GetData( wxDataObject& data ) = 0;
// clears wxTheClipboard and the system's clipboard if possible // clears wxTheClipboard and the system's clipboard if possible
virtual void Clear() = 0; virtual void Clear() = 0;
// flushes the clipboard: this means that the data which is currently on // flushes the clipboard: this means that the data which is currently on
// clipboard will stay available even after the application exits (possibly // clipboard will stay available even after the application exits (possibly
// eating memory), otherwise the clipboard will be emptied on exit // eating memory), otherwise the clipboard will be emptied on exit
virtual bool Flush() { return false; } virtual bool Flush() { return false; }
// X11 has two clipboards which get selected by this call. Empty on MSW. // X11 has two clipboards which get selected by this call. Empty on MSW.
virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { } virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
// Returns global instance (wxTheClipboard) of the object: // Returns global instance (wxTheClipboard) of the object:
static wxClipboard *Get(); static wxClipboard *Get();
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// globals // globals
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// The global clipboard object - backward compatible access macro: // The global clipboard object - backward compatible access macro:
#define wxTheClipboard (wxClipboard::Get()) #define wxTheClipboard (wxClipboard::Get())
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// include platform-specific class declaration // include platform-specific class declaration
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include "wx/msw/clipbrd.h" #include "wx/msw/clipbrd.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/clipbrd.h" #include "wx/motif/clipbrd.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/clipbrd.h" #include "wx/gtk/clipbrd.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/clipbrd.h" #include "wx/gtk1/clipbrd.h"
#elif defined(__WXX11__) #elif defined(__WXX11__)
#include "wx/x11/clipbrd.h" #include "wx/x11/clipbrd.h"
#elif defined(__WXMGL__) #elif defined(__WXMGL__)
#include "wx/mgl/clipbrd.h" #include "wx/mgl/clipbrd.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/clipbrd.h" #include "wx/mac/clipbrd.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/clipbrd.h" #include "wx/cocoa/clipbrd.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/clipbrd.h" #include "wx/os2/clipbrd.h"
#endif #endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// helpful class for opening the clipboard and automatically closing it // helpful class for opening the clipboard and automatically closing it
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxClipboardLocker class WXDLLEXPORT wxClipboardLocker
{ {
public: public:
wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL) wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL)
{ {
m_clipboard = clipboard ? clipboard : wxTheClipboard; m_clipboard = clipboard ? clipboard : wxTheClipboard;
if ( m_clipboard ) if ( m_clipboard )
{ {
m_clipboard->Open(); m_clipboard->Open();
} }
} }
bool operator!() const { return !m_clipboard->IsOpened(); } bool operator!() const { return !m_clipboard->IsOpened(); }
~wxClipboardLocker() ~wxClipboardLocker()
{ {
if ( m_clipboard ) if ( m_clipboard )
{ {
m_clipboard->Close(); m_clipboard->Close();
} }
} }
private: private:
wxClipboard *m_clipboard; wxClipboard *m_clipboard;
DECLARE_NO_COPY_CLASS(wxClipboardLocker) DECLARE_NO_COPY_CLASS(wxClipboardLocker)
}; };
#endif // wxUSE_CLIPBOARD #endif // wxUSE_CLIPBOARD
#endif // _WX_CLIPBRD_H_BASE_ #endif // _WX_CLIPBRD_H_BASE_

View File

@@ -1,273 +1,273 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/clntdata.h // Name: wx/clntdata.h
// Purpose: A mixin class for holding a wxClientData or void pointer // Purpose: A mixin class for holding a wxClientData or void pointer
// Author: Robin Dunn // Author: Robin Dunn
// Modified by: // Modified by:
// Created: 9-Oct-2001 // Created: 9-Oct-2001
// RCS-ID: $Id: clntdata.h 36973 2006-01-18 16:45:41Z JS $ // RCS-ID: $Id: clntdata.h 36973 2006-01-18 16:45:41Z JS $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CLNTDATAH__ #ifndef _WX_CLNTDATAH__
#define _WX_CLNTDATAH__ #define _WX_CLNTDATAH__
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/hashmap.h" #include "wx/hashmap.h"
typedef int (*wxShadowObjectMethod)(void*, void*); typedef int (*wxShadowObjectMethod)(void*, void*);
WX_DECLARE_STRING_HASH_MAP_WITH_DECL( WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
wxShadowObjectMethod, wxShadowObjectMethod,
wxShadowObjectMethods, wxShadowObjectMethods,
class WXDLLIMPEXP_BASE class WXDLLIMPEXP_BASE
); );
WX_DECLARE_STRING_HASH_MAP_WITH_DECL( WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
void *, void *,
wxShadowObjectFields, wxShadowObjectFields,
class WXDLLIMPEXP_BASE class WXDLLIMPEXP_BASE
); );
class WXDLLIMPEXP_BASE wxShadowObject class WXDLLIMPEXP_BASE wxShadowObject
{ {
public: public:
wxShadowObject() { } wxShadowObject() { }
void AddMethod( const wxString &name, wxShadowObjectMethod method ) void AddMethod( const wxString &name, wxShadowObjectMethod method )
{ {
wxShadowObjectMethods::iterator it = m_methods.find( name ); wxShadowObjectMethods::iterator it = m_methods.find( name );
if (it == m_methods.end()) if (it == m_methods.end())
m_methods[ name ] = method; m_methods[ name ] = method;
else else
it->second = method; it->second = method;
} }
bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue ) bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue )
{ {
wxShadowObjectMethods::iterator it = m_methods.find( name ); wxShadowObjectMethods::iterator it = m_methods.find( name );
if (it == m_methods.end()) if (it == m_methods.end())
return false; return false;
wxShadowObjectMethod method = it->second; wxShadowObjectMethod method = it->second;
int ret = (*method)(window, param); int ret = (*method)(window, param);
if (returnValue) if (returnValue)
*returnValue = ret; *returnValue = ret;
return true; return true;
} }
void AddField( const wxString &name, void* initialValue = NULL ) void AddField( const wxString &name, void* initialValue = NULL )
{ {
wxShadowObjectFields::iterator it = m_fields.find( name ); wxShadowObjectFields::iterator it = m_fields.find( name );
if (it == m_fields.end()) if (it == m_fields.end())
m_fields[ name ] = initialValue; m_fields[ name ] = initialValue;
else else
it->second = initialValue; it->second = initialValue;
} }
void SetField( const wxString &name, void* value ) void SetField( const wxString &name, void* value )
{ {
wxShadowObjectFields::iterator it = m_fields.find( name ); wxShadowObjectFields::iterator it = m_fields.find( name );
if (it == m_fields.end()) if (it == m_fields.end())
return; return;
it->second = value; it->second = value;
} }
void* GetField( const wxString &name, void *defaultValue = NULL ) void* GetField( const wxString &name, void *defaultValue = NULL )
{ {
wxShadowObjectFields::iterator it = m_fields.find( name ); wxShadowObjectFields::iterator it = m_fields.find( name );
if (it == m_fields.end()) if (it == m_fields.end())
return defaultValue; return defaultValue;
return it->second; return it->second;
} }
private: private:
wxShadowObjectMethods m_methods; wxShadowObjectMethods m_methods;
wxShadowObjectFields m_fields; wxShadowObjectFields m_fields;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// what kind of client data do we have? // what kind of client data do we have?
enum wxClientDataType enum wxClientDataType
{ {
wxClientData_None, // we don't know yet because we don't have it at all wxClientData_None, // we don't know yet because we don't have it at all
wxClientData_Object, // our client data is typed and we own it wxClientData_Object, // our client data is typed and we own it
wxClientData_Void // client data is untyped and we don't own it wxClientData_Void // client data is untyped and we don't own it
}; };
class WXDLLIMPEXP_BASE wxClientData class WXDLLIMPEXP_BASE wxClientData
{ {
public: public:
wxClientData() { } wxClientData() { }
virtual ~wxClientData() { } virtual ~wxClientData() { }
}; };
class WXDLLIMPEXP_BASE wxStringClientData : public wxClientData class WXDLLIMPEXP_BASE wxStringClientData : public wxClientData
{ {
public: public:
wxStringClientData() : m_data() { } wxStringClientData() : m_data() { }
wxStringClientData( const wxString &data ) : m_data(data) { } wxStringClientData( const wxString &data ) : m_data(data) { }
void SetData( const wxString &data ) { m_data = data; } void SetData( const wxString &data ) { m_data = data; }
const wxString& GetData() const { return m_data; } const wxString& GetData() const { return m_data; }
private: private:
wxString m_data; wxString m_data;
}; };
// This class is a mixin that provides storage and management of "client // This class is a mixin that provides storage and management of "client
// data." The client data stored can either be a pointer to a wxClientData // data." The client data stored can either be a pointer to a wxClientData
// object in which case it is managed by the container (i.e. it will delete // object in which case it is managed by the container (i.e. it will delete
// the data when it's destroyed) or an untyped pointer which won't be deleted // the data when it's destroyed) or an untyped pointer which won't be deleted
// by the container - but not both of them // by the container - but not both of them
// //
// NOTE: This functionality is currently duplicated in wxEvtHandler in order // NOTE: This functionality is currently duplicated in wxEvtHandler in order
// to avoid having more than one vtable in that class hierarchy. // to avoid having more than one vtable in that class hierarchy.
class WXDLLIMPEXP_BASE wxClientDataContainer class WXDLLIMPEXP_BASE wxClientDataContainer
{ {
public: public:
wxClientDataContainer(); wxClientDataContainer();
virtual ~wxClientDataContainer(); virtual ~wxClientDataContainer();
void SetClientObject( wxClientData *data ) { DoSetClientObject(data); } void SetClientObject( wxClientData *data ) { DoSetClientObject(data); }
wxClientData *GetClientObject() const { return DoGetClientObject(); } wxClientData *GetClientObject() const { return DoGetClientObject(); }
void SetClientData( void *data ) { DoSetClientData(data); } void SetClientData( void *data ) { DoSetClientData(data); }
void *GetClientData() const { return DoGetClientData(); } void *GetClientData() const { return DoGetClientData(); }
protected: protected:
// The user data: either an object which will be deleted by the container // The user data: either an object which will be deleted by the container
// when it's deleted or some raw pointer which we do nothing with. Only // when it's deleted or some raw pointer which we do nothing with. Only
// one type of data can be used with the given window, i.e. you cannot set // one type of data can be used with the given window, i.e. you cannot set
// the void data and then associate the container with wxClientData or vice // the void data and then associate the container with wxClientData or vice
// versa. // versa.
union union
{ {
wxClientData *m_clientObject; wxClientData *m_clientObject;
void *m_clientData; void *m_clientData;
}; };
// client data accessors // client data accessors
virtual void DoSetClientObject( wxClientData *data ); virtual void DoSetClientObject( wxClientData *data );
virtual wxClientData *DoGetClientObject() const; virtual wxClientData *DoGetClientObject() const;
virtual void DoSetClientData( void *data ); virtual void DoSetClientData( void *data );
virtual void *DoGetClientData() const; virtual void *DoGetClientData() const;
// what kind of data do we have? // what kind of data do we have?
wxClientDataType m_clientDataType; wxClientDataType m_clientDataType;
}; };
#include "wx/vector.h" #include "wx/vector.h"
struct WXDLLIMPEXP_BASE wxClientDataDictionaryPair struct WXDLLIMPEXP_BASE wxClientDataDictionaryPair
{ {
wxClientDataDictionaryPair( size_t idx ) : index( idx ), data( 0 ) { } wxClientDataDictionaryPair( size_t idx ) : index( idx ), data( 0 ) { }
size_t index; size_t index;
wxClientData* data; wxClientData* data;
}; };
_WX_DECLARE_VECTOR( _WX_DECLARE_VECTOR(
wxClientDataDictionaryPair, wxClientDataDictionaryPair,
wxClientDataDictionaryPairVector, wxClientDataDictionaryPairVector,
WXDLLIMPEXP_BASE WXDLLIMPEXP_BASE
); );
// this class is used internally to maintain the association between items // this class is used internally to maintain the association between items
// of (some subclasses of) wxControlWithItems and their client data // of (some subclasses of) wxControlWithItems and their client data
// NOTE: this class does not keep track of whether it contains // NOTE: this class does not keep track of whether it contains
// wxClientData or void*. The client must ensure that // wxClientData or void*. The client must ensure that
// it does not contain a mix of the two, and that // it does not contain a mix of the two, and that
// DestroyData is called if it contains wxClientData // DestroyData is called if it contains wxClientData
class WXDLLIMPEXP_BASE wxClientDataDictionary class WXDLLIMPEXP_BASE wxClientDataDictionary
{ {
public: public:
wxClientDataDictionary() {} wxClientDataDictionary() {}
// deletes all the data // deletes all the data
void DestroyData() void DestroyData()
{ {
for( size_t i = 0, end = m_vec.size(); i != end; ++i ) for( size_t i = 0, end = m_vec.size(); i != end; ++i )
delete m_vec[i].data; delete m_vec[i].data;
m_vec.clear(); m_vec.clear();
} }
// if data for the given index is not present, add it, // if data for the given index is not present, add it,
// if it is present, delete the old data and replace it with // if it is present, delete the old data and replace it with
// the new one // the new one
void Set( size_t index, wxClientData* data, bool doDelete ) void Set( size_t index, wxClientData* data, bool doDelete )
{ {
size_t ptr = Find( index ); size_t ptr = Find( index );
if( !data ) if( !data )
{ {
if( ptr == m_vec.size() ) return; if( ptr == m_vec.size() ) return;
if( doDelete ) if( doDelete )
delete m_vec[ptr].data; delete m_vec[ptr].data;
m_vec.erase( ptr ); m_vec.erase( ptr );
} }
else else
{ {
if( ptr == m_vec.size() ) if( ptr == m_vec.size() )
{ {
m_vec.push_back( wxClientDataDictionaryPair( index ) ); m_vec.push_back( wxClientDataDictionaryPair( index ) );
ptr = m_vec.size() - 1; ptr = m_vec.size() - 1;
} }
if( doDelete ) if( doDelete )
delete m_vec[ptr].data; delete m_vec[ptr].data;
m_vec[ptr].data = data; m_vec[ptr].data = data;
} }
} }
// get the data associated with the given index, // get the data associated with the given index,
// return 0 if not found // return 0 if not found
wxClientData* Get( size_t index ) const wxClientData* Get( size_t index ) const
{ {
size_t it = Find( index ); size_t it = Find( index );
if( it == m_vec.size() ) return 0; if( it == m_vec.size() ) return 0;
return (wxClientData*)m_vec[it].data; // const cast return (wxClientData*)m_vec[it].data; // const cast
} }
// delete the data associated with the given index // delete the data associated with the given index
// it also decreases by one the indices of all the elements // it also decreases by one the indices of all the elements
// with an index greater than the given index // with an index greater than the given index
void Delete( size_t index, bool doDelete ) void Delete( size_t index, bool doDelete )
{ {
size_t todel = m_vec.size(); size_t todel = m_vec.size();
for( size_t i = 0, end = m_vec.size(); i != end; ++i ) for( size_t i = 0, end = m_vec.size(); i != end; ++i )
{ {
if( m_vec[i].index == index ) if( m_vec[i].index == index )
todel = i; todel = i;
else if( m_vec[i].index > index ) else if( m_vec[i].index > index )
--(m_vec[i].index); --(m_vec[i].index);
} }
if( todel != m_vec.size() ) if( todel != m_vec.size() )
{ {
if( doDelete ) if( doDelete )
delete m_vec[todel].data; delete m_vec[todel].data;
m_vec.erase( todel ); m_vec.erase( todel );
} }
} }
private: private:
// returns MyVec.size() if not found // returns MyVec.size() if not found
size_t Find( size_t index ) const size_t Find( size_t index ) const
{ {
for( size_t i = 0, end = m_vec.size(); i != end; ++i ) for( size_t i = 0, end = m_vec.size(); i != end; ++i )
{ {
if( m_vec[i].index == index ) if( m_vec[i].index == index )
return i; return i;
} }
return m_vec.size(); return m_vec.size();
} }
wxClientDataDictionaryPairVector m_vec; wxClientDataDictionaryPairVector m_vec;
}; };
#endif // _WX_CLNTDATAH__ #endif // _WX_CLNTDATAH__

View File

@@ -1,200 +1,200 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/clrpicker.h // Name: wx/clrpicker.h
// Purpose: wxColourPickerCtrl base header // Purpose: wxColourPickerCtrl base header
// Author: Francesco Montorsi (based on Vadim Zeitlin's code) // Author: Francesco Montorsi (based on Vadim Zeitlin's code)
// Modified by: // Modified by:
// Created: 14/4/2006 // Created: 14/4/2006
// Copyright: (c) Vadim Zeitlin, Francesco Montorsi // Copyright: (c) Vadim Zeitlin, Francesco Montorsi
// RCS-ID: $Id: clrpicker.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: clrpicker.h 53135 2008-04-12 02:31:04Z VZ $
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CLRPICKER_H_BASE_ #ifndef _WX_CLRPICKER_H_BASE_
#define _WX_CLRPICKER_H_BASE_ #define _WX_CLRPICKER_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_COLOURPICKERCTRL #if wxUSE_COLOURPICKERCTRL
#include "wx/pickerbase.h" #include "wx/pickerbase.h"
class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent; class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent;
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[];
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxColourPickerWidgetBase: a generic abstract interface which must be // wxColourPickerWidgetBase: a generic abstract interface which must be
// implemented by controls used by wxColourPickerCtrl // implemented by controls used by wxColourPickerCtrl
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxColourPickerWidgetBase class WXDLLIMPEXP_CORE wxColourPickerWidgetBase
{ {
public: public:
wxColourPickerWidgetBase() { m_colour = *wxBLACK; } wxColourPickerWidgetBase() { m_colour = *wxBLACK; }
virtual ~wxColourPickerWidgetBase() {} virtual ~wxColourPickerWidgetBase() {}
wxColour GetColour() const wxColour GetColour() const
{ return m_colour; } { return m_colour; }
virtual void SetColour(const wxColour &col) virtual void SetColour(const wxColour &col)
{ m_colour = col; UpdateColour(); } { m_colour = col; UpdateColour(); }
virtual void SetColour(const wxString &col) virtual void SetColour(const wxString &col)
{ m_colour.Set(col); UpdateColour(); } { m_colour.Set(col); UpdateColour(); }
protected: protected:
virtual void UpdateColour() = 0; virtual void UpdateColour() = 0;
// the current colour (may be invalid if none) // the current colour (may be invalid if none)
wxColour m_colour; wxColour m_colour;
}; };
// Styles which must be supported by all controls implementing wxColourPickerWidgetBase // Styles which must be supported by all controls implementing wxColourPickerWidgetBase
// NB: these styles must be defined to carefully-chosen values to // NB: these styles must be defined to carefully-chosen values to
// avoid conflicts with wxButton's styles // avoid conflicts with wxButton's styles
// show the colour in HTML form (#AABBCC) as colour button label // show the colour in HTML form (#AABBCC) as colour button label
// (instead of no label at all) // (instead of no label at all)
// NOTE: this style is supported just by wxColourButtonGeneric and // NOTE: this style is supported just by wxColourButtonGeneric and
// thus is not exposed in wxColourPickerCtrl // thus is not exposed in wxColourPickerCtrl
#define wxCLRP_SHOW_LABEL 0x0008 #define wxCLRP_SHOW_LABEL 0x0008
// map platform-dependent controls which implement the wxColourPickerWidgetBase // map platform-dependent controls which implement the wxColourPickerWidgetBase
// under the name "wxColourPickerWidget". // under the name "wxColourPickerWidget".
// NOTE: wxColourPickerCtrl allocates a wxColourPickerWidget and relies on the // NOTE: wxColourPickerCtrl allocates a wxColourPickerWidget and relies on the
// fact that all classes being mapped as wxColourPickerWidget have the // fact that all classes being mapped as wxColourPickerWidget have the
// same prototype for their contructor (and also explains why we use // same prototype for their contructor (and also explains why we use
// define instead of a typedef) // define instead of a typedef)
// since GTK > 2.4, there is GtkColorButton // since GTK > 2.4, there is GtkColorButton
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__) #if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/clrpicker.h" #include "wx/gtk/clrpicker.h"
#define wxColourPickerWidget wxColourButton #define wxColourPickerWidget wxColourButton
#else #else
#include "wx/generic/clrpickerg.h" #include "wx/generic/clrpickerg.h"
#define wxColourPickerWidget wxGenericColourButton #define wxColourPickerWidget wxGenericColourButton
#endif #endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxColourPickerCtrl: platform-independent class which embeds a // wxColourPickerCtrl: platform-independent class which embeds a
// platform-dependent wxColourPickerWidget and, if wxCLRP_USE_TEXTCTRL style is // platform-dependent wxColourPickerWidget and, if wxCLRP_USE_TEXTCTRL style is
// used, a textctrl next to it. // used, a textctrl next to it.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL) #define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
#define wxCLRP_DEFAULT_STYLE 0 #define wxCLRP_DEFAULT_STYLE 0
class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase
{ {
public: public:
wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {} wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {}
virtual ~wxColourPickerCtrl() {} virtual ~wxColourPickerCtrl() {}
wxColourPickerCtrl(wxWindow *parent, wxWindowID id, wxColourPickerCtrl(wxWindow *parent, wxWindowID id,
const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition, const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxColourPickerCtrlNameStr) const wxString& name = wxColourPickerCtrlNameStr)
: m_bIgnoreNextTextCtrlUpdate(false) : m_bIgnoreNextTextCtrlUpdate(false)
{ Create(parent, id, col, pos, size, style, validator, name); } { Create(parent, id, col, pos, size, style, validator, name); }
bool Create(wxWindow *parent, wxWindowID id, bool Create(wxWindow *parent, wxWindowID id,
const wxColour& col = *wxBLACK, const wxColour& col = *wxBLACK,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxCLRP_DEFAULT_STYLE, long style = wxCLRP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxColourPickerCtrlNameStr); const wxString& name = wxColourPickerCtrlNameStr);
public: // public API public: // public API
// get the colour chosen // get the colour chosen
wxColour GetColour() const wxColour GetColour() const
{ return ((wxColourPickerWidget *)m_picker)->GetColour(); } { return ((wxColourPickerWidget *)m_picker)->GetColour(); }
// set currently displayed color // set currently displayed color
void SetColour(const wxColour& col); void SetColour(const wxColour& col);
// set colour using RGB(r,g,b) syntax or considering given text as a colour name; // set colour using RGB(r,g,b) syntax or considering given text as a colour name;
// returns true if the given text was successfully recognized. // returns true if the given text was successfully recognized.
bool SetColour(const wxString& text); bool SetColour(const wxString& text);
public: // internal functions public: // internal functions
// update the button colour to match the text control contents // update the button colour to match the text control contents
void UpdatePickerFromTextCtrl(); void UpdatePickerFromTextCtrl();
// update the text control to match the button's colour // update the text control to match the button's colour
void UpdateTextCtrlFromPicker(); void UpdateTextCtrlFromPicker();
// event handler for our picker // event handler for our picker
void OnColourChange(wxColourPickerEvent &); void OnColourChange(wxColourPickerEvent &);
protected: protected:
virtual long GetPickerStyle(long style) const virtual long GetPickerStyle(long style) const
{ return (style & wxCLRP_SHOW_LABEL); } { return (style & wxCLRP_SHOW_LABEL); }
// true if the next UpdateTextCtrl() call is to ignore // true if the next UpdateTextCtrl() call is to ignore
bool m_bIgnoreNextTextCtrlUpdate; bool m_bIgnoreNextTextCtrlUpdate;
private: private:
DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl) DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxColourPickerEvent: used by wxColourPickerCtrl only // wxColourPickerEvent: used by wxColourPickerCtrl only
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES() BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, 1102) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, 1102)
END_DECLARE_EVENT_TYPES() END_DECLARE_EVENT_TYPES()
class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent
{ {
public: public:
wxColourPickerEvent() {} wxColourPickerEvent() {}
wxColourPickerEvent(wxObject *generator, int id, const wxColour &col) wxColourPickerEvent(wxObject *generator, int id, const wxColour &col)
: wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id), : wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id),
m_colour(col) m_colour(col)
{ {
SetEventObject(generator); SetEventObject(generator);
} }
wxColour GetColour() const { return m_colour; } wxColour GetColour() const { return m_colour; }
void SetColour(const wxColour &c) { m_colour = c; } void SetColour(const wxColour &c) { m_colour = c; }
// default copy ctor, assignment operator and dtor are ok // default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const { return new wxColourPickerEvent(*this); } virtual wxEvent *Clone() const { return new wxColourPickerEvent(*this); }
private: private:
wxColour m_colour; wxColour m_colour;
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxColourPickerEvent) DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxColourPickerEvent)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event types and macros // event types and macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&); typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&);
#define wxColourPickerEventHandler(func) \ #define wxColourPickerEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxColourPickerEventFunction, &func) (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxColourPickerEventFunction, &func)
#define EVT_COLOURPICKER_CHANGED(id, fn) \ #define EVT_COLOURPICKER_CHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn)) wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn))
#endif // wxUSE_COLOURPICKERCTRL #endif // wxUSE_COLOURPICKERCTRL
#endif // _WX_CLRPICKER_H_BASE_ #endif // _WX_CLRPICKER_H_BASE_

View File

@@ -1,239 +1,239 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/cmdline.h // Name: wx/cmdline.h
// Purpose: wxCmdLineParser and related classes for parsing the command // Purpose: wxCmdLineParser and related classes for parsing the command
// line options // line options
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 04.01.00 // Created: 04.01.00
// RCS-ID: $Id: cmdline.h 49563 2007-10-31 20:46:21Z VZ $ // RCS-ID: $Id: cmdline.h 49563 2007-10-31 20:46:21Z VZ $
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CMDLINE_H_ #ifndef _WX_CMDLINE_H_
#define _WX_CMDLINE_H_ #define _WX_CMDLINE_H_
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
#if wxUSE_CMDLINE_PARSER #if wxUSE_CMDLINE_PARSER
class WXDLLIMPEXP_FWD_BASE wxDateTime; class WXDLLIMPEXP_FWD_BASE wxDateTime;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// by default, options are optional (sic) and each call to AddParam() allows // by default, options are optional (sic) and each call to AddParam() allows
// one more parameter - this may be changed by giving non-default flags to it // one more parameter - this may be changed by giving non-default flags to it
enum enum
{ {
wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
wxCMD_LINE_NEEDS_SEPARATOR = 0x10 // must have sep before the value wxCMD_LINE_NEEDS_SEPARATOR = 0x10 // must have sep before the value
}; };
// an option value or parameter may be a string (the most common case), a // an option value or parameter may be a string (the most common case), a
// number or a date // number or a date
enum wxCmdLineParamType enum wxCmdLineParamType
{ {
wxCMD_LINE_VAL_STRING, // should be 0 (default) wxCMD_LINE_VAL_STRING, // should be 0 (default)
wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_VAL_NUMBER,
wxCMD_LINE_VAL_DATE, wxCMD_LINE_VAL_DATE,
wxCMD_LINE_VAL_NONE wxCMD_LINE_VAL_NONE
}; };
// for constructing the cmd line description using Init() // for constructing the cmd line description using Init()
enum wxCmdLineEntryType enum wxCmdLineEntryType
{ {
wxCMD_LINE_SWITCH, wxCMD_LINE_SWITCH,
wxCMD_LINE_OPTION, wxCMD_LINE_OPTION,
wxCMD_LINE_PARAM, wxCMD_LINE_PARAM,
wxCMD_LINE_NONE // to terminate the list wxCMD_LINE_NONE // to terminate the list
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCmdLineEntryDesc is a description of one command line // wxCmdLineEntryDesc is a description of one command line
// switch/option/parameter // switch/option/parameter
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
struct wxCmdLineEntryDesc struct wxCmdLineEntryDesc
{ {
wxCmdLineEntryType kind; wxCmdLineEntryType kind;
const wxChar *shortName; const wxChar *shortName;
const wxChar *longName; const wxChar *longName;
const wxChar *description; const wxChar *description;
wxCmdLineParamType type; wxCmdLineParamType type;
int flags; int flags;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCmdLineParser is a class for parsing command line. // wxCmdLineParser is a class for parsing command line.
// //
// It has the following features: // It has the following features:
// //
// 1. distinguishes options, switches and parameters; allows option grouping // 1. distinguishes options, switches and parameters; allows option grouping
// 2. allows both short and long options // 2. allows both short and long options
// 3. automatically generates the usage message from the cmd line description // 3. automatically generates the usage message from the cmd line description
// 4. does type checks on the options values (number, date, ...) // 4. does type checks on the options values (number, date, ...)
// //
// To use it you should: // To use it you should:
// //
// 1. construct it giving it the cmd line to parse and optionally its desc // 1. construct it giving it the cmd line to parse and optionally its desc
// 2. construct the cmd line description using AddXXX() if not done in (1) // 2. construct the cmd line description using AddXXX() if not done in (1)
// 3. call Parse() // 3. call Parse()
// 4. use GetXXX() to retrieve the parsed info // 4. use GetXXX() to retrieve the parsed info
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxCmdLineParser class WXDLLIMPEXP_BASE wxCmdLineParser
{ {
public: public:
// ctors and initializers // ctors and initializers
// ---------------------- // ----------------------
// default ctor or ctor giving the cmd line in either Unix or Win form // default ctor or ctor giving the cmd line in either Unix or Win form
wxCmdLineParser() { Init(); } wxCmdLineParser() { Init(); }
wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); } wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); }
#if wxUSE_UNICODE #if wxUSE_UNICODE
wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); } wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); }
#endif // wxUSE_UNICODE #endif // wxUSE_UNICODE
wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); } wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); }
// the same as above, but also gives the cmd line description - otherwise, // the same as above, but also gives the cmd line description - otherwise,
// use AddXXX() later // use AddXXX() later
wxCmdLineParser(const wxCmdLineEntryDesc *desc) wxCmdLineParser(const wxCmdLineEntryDesc *desc)
{ Init(); SetDesc(desc); } { Init(); SetDesc(desc); }
wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv) wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv)
{ Init(); SetCmdLine(argc, argv); SetDesc(desc); } { Init(); SetCmdLine(argc, argv); SetDesc(desc); }
#if wxUSE_UNICODE #if wxUSE_UNICODE
wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv) wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv)
{ Init(); SetCmdLine(argc, argv); SetDesc(desc); } { Init(); SetCmdLine(argc, argv); SetDesc(desc); }
#endif // wxUSE_UNICODE #endif // wxUSE_UNICODE
wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline) wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline)
{ Init(); SetCmdLine(cmdline); SetDesc(desc); } { Init(); SetCmdLine(cmdline); SetDesc(desc); }
// set cmd line to parse after using one of the ctors which don't do it // set cmd line to parse after using one of the ctors which don't do it
void SetCmdLine(int argc, char **argv); void SetCmdLine(int argc, char **argv);
#if wxUSE_UNICODE #if wxUSE_UNICODE
void SetCmdLine(int argc, wxChar **argv); void SetCmdLine(int argc, wxChar **argv);
#endif // wxUSE_UNICODE #endif // wxUSE_UNICODE
void SetCmdLine(const wxString& cmdline); void SetCmdLine(const wxString& cmdline);
// not virtual, don't use this class polymorphically // not virtual, don't use this class polymorphically
~wxCmdLineParser(); ~wxCmdLineParser();
// set different parser options // set different parser options
// ---------------------------- // ----------------------------
// by default, '-' is switch char under Unix, '-' or '/' under Win: // by default, '-' is switch char under Unix, '-' or '/' under Win:
// switchChars contains all characters with which an option or switch may // switchChars contains all characters with which an option or switch may
// start // start
void SetSwitchChars(const wxString& switchChars); void SetSwitchChars(const wxString& switchChars);
// long options are not POSIX-compliant, this option allows to disable them // long options are not POSIX-compliant, this option allows to disable them
void EnableLongOptions(bool enable = true); void EnableLongOptions(bool enable = true);
void DisableLongOptions() { EnableLongOptions(false); } void DisableLongOptions() { EnableLongOptions(false); }
bool AreLongOptionsEnabled(); bool AreLongOptionsEnabled();
// extra text may be shown by Usage() method if set by this function // extra text may be shown by Usage() method if set by this function
void SetLogo(const wxString& logo); void SetLogo(const wxString& logo);
// construct the cmd line description // construct the cmd line description
// ---------------------------------- // ----------------------------------
// take the cmd line description from the wxCMD_LINE_NONE terminated table // take the cmd line description from the wxCMD_LINE_NONE terminated table
void SetDesc(const wxCmdLineEntryDesc *desc); void SetDesc(const wxCmdLineEntryDesc *desc);
// a switch: i.e. an option without value // a switch: i.e. an option without value
void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString, void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
const wxString& desc = wxEmptyString, const wxString& desc = wxEmptyString,
int flags = 0); int flags = 0);
// an option taking a value of the given type // an option taking a value of the given type
void AddOption(const wxString& name, const wxString& lng = wxEmptyString, void AddOption(const wxString& name, const wxString& lng = wxEmptyString,
const wxString& desc = wxEmptyString, const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0); int flags = 0);
// a parameter // a parameter
void AddParam(const wxString& desc = wxEmptyString, void AddParam(const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0); int flags = 0);
// actions // actions
// ------- // -------
// parse the command line, return 0 if ok, -1 if "-h" or "--help" option // parse the command line, return 0 if ok, -1 if "-h" or "--help" option
// was encountered and the help message was given or a positive value if a // was encountered and the help message was given or a positive value if a
// syntax error occurred // syntax error occurred
// //
// if showUsage is true, Usage() is called in case of syntax error or if // if showUsage is true, Usage() is called in case of syntax error or if
// help was requested // help was requested
int Parse(bool showUsage = true); int Parse(bool showUsage = true);
// give the usage message describing all program options // give the usage message describing all program options
void Usage(); void Usage();
// get the command line arguments // get the command line arguments
// ------------------------------ // ------------------------------
// returns true if the given switch was found // returns true if the given switch was found
bool Found(const wxString& name) const; bool Found(const wxString& name) const;
// returns true if an option taking a string value was found and stores the // returns true if an option taking a string value was found and stores the
// value in the provided pointer // value in the provided pointer
bool Found(const wxString& name, wxString *value) const; bool Found(const wxString& name, wxString *value) const;
// returns true if an option taking an integer value was found and stores // returns true if an option taking an integer value was found and stores
// the value in the provided pointer // the value in the provided pointer
bool Found(const wxString& name, long *value) const; bool Found(const wxString& name, long *value) const;
#if wxUSE_DATETIME #if wxUSE_DATETIME
// returns true if an option taking a date value was found and stores the // returns true if an option taking a date value was found and stores the
// value in the provided pointer // value in the provided pointer
bool Found(const wxString& name, wxDateTime *value) const; bool Found(const wxString& name, wxDateTime *value) const;
#endif // wxUSE_DATETIME #endif // wxUSE_DATETIME
// gets the number of parameters found // gets the number of parameters found
size_t GetParamCount() const; size_t GetParamCount() const;
// gets the value of Nth parameter (as string only for now) // gets the value of Nth parameter (as string only for now)
wxString GetParam(size_t n = 0u) const; wxString GetParam(size_t n = 0u) const;
// Resets switches and options // Resets switches and options
void Reset(); void Reset();
// break down the command line in arguments // break down the command line in arguments
static wxArrayString ConvertStringToArgs(const wxChar *cmdline); static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
private: private:
// get usage string // get usage string
wxString GetUsageString(); wxString GetUsageString();
// common part of all ctors // common part of all ctors
void Init(); void Init();
struct wxCmdLineParserData *m_data; struct wxCmdLineParserData *m_data;
DECLARE_NO_COPY_CLASS(wxCmdLineParser) DECLARE_NO_COPY_CLASS(wxCmdLineParser)
}; };
#else // !wxUSE_CMDLINE_PARSER #else // !wxUSE_CMDLINE_PARSER
// this function is always available (even if !wxUSE_CMDLINE_PARSER) because it // this function is always available (even if !wxUSE_CMDLINE_PARSER) because it
// is used by wxWin itself under Windows // is used by wxWin itself under Windows
class WXDLLIMPEXP_BASE wxCmdLineParser class WXDLLIMPEXP_BASE wxCmdLineParser
{ {
public: public:
static wxArrayString ConvertStringToArgs(const wxChar *cmdline); static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
}; };
#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER #endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER
#endif // _WX_CMDLINE_H_ #endif // _WX_CMDLINE_H_

View File

@@ -1,144 +1,144 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/cmdproc.h // Name: wx/cmdproc.h
// Purpose: undo/redo capable command processing framework // Purpose: undo/redo capable command processing framework
// Author: Julian Smart (extracted from docview.h by VZ) // Author: Julian Smart (extracted from docview.h by VZ)
// Modified by: // Modified by:
// Created: 05.11.00 // Created: 05.11.00
// RCS-ID: $Id: cmdproc.h 49804 2007-11-10 01:09:42Z VZ $ // RCS-ID: $Id: cmdproc.h 49804 2007-11-10 01:09:42Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CMDPROC_H_ #ifndef _WX_CMDPROC_H_
#define _WX_CMDPROC_H_ #define _WX_CMDPROC_H_
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/object.h" #include "wx/object.h"
#include "wx/list.h" #include "wx/list.h"
class WXDLLIMPEXP_FWD_CORE wxMenu; class WXDLLIMPEXP_FWD_CORE wxMenu;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCommand: a single command capable of performing itself // wxCommand: a single command capable of performing itself
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxCommand : public wxObject class WXDLLEXPORT wxCommand : public wxObject
{ {
public: public:
wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString); wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString);
virtual ~wxCommand(){} virtual ~wxCommand(){}
// Override this to perform a command // Override this to perform a command
virtual bool Do() = 0; virtual bool Do() = 0;
// Override this to undo a command // Override this to undo a command
virtual bool Undo() = 0; virtual bool Undo() = 0;
virtual bool CanUndo() const { return m_canUndo; } virtual bool CanUndo() const { return m_canUndo; }
virtual wxString GetName() const { return m_commandName; } virtual wxString GetName() const { return m_commandName; }
protected: protected:
bool m_canUndo; bool m_canUndo;
wxString m_commandName; wxString m_commandName;
private: private:
DECLARE_CLASS(wxCommand) DECLARE_CLASS(wxCommand)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCommandProcessor: wxCommand manager // wxCommandProcessor: wxCommand manager
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxCommandProcessor : public wxObject class WXDLLEXPORT wxCommandProcessor : public wxObject
{ {
public: public:
// if max number of commands is -1, it is unlimited // if max number of commands is -1, it is unlimited
wxCommandProcessor(int maxCommands = -1); wxCommandProcessor(int maxCommands = -1);
virtual ~wxCommandProcessor(); virtual ~wxCommandProcessor();
// Pass a command to the processor. The processor calls Do(); if // Pass a command to the processor. The processor calls Do(); if
// successful, is appended to the command history unless storeIt is false. // successful, is appended to the command history unless storeIt is false.
virtual bool Submit(wxCommand *command, bool storeIt = true); virtual bool Submit(wxCommand *command, bool storeIt = true);
// just store the command without executing it // just store the command without executing it
virtual void Store(wxCommand *command); virtual void Store(wxCommand *command);
virtual bool Undo(); virtual bool Undo();
virtual bool Redo(); virtual bool Redo();
virtual bool CanUndo() const; virtual bool CanUndo() const;
virtual bool CanRedo() const; virtual bool CanRedo() const;
// Initialises the current command and menu strings. // Initialises the current command and menu strings.
virtual void Initialize(); virtual void Initialize();
// Sets the Undo/Redo menu strings for the current menu. // Sets the Undo/Redo menu strings for the current menu.
virtual void SetMenuStrings(); virtual void SetMenuStrings();
// Gets the current Undo menu label. // Gets the current Undo menu label.
wxString GetUndoMenuLabel() const; wxString GetUndoMenuLabel() const;
// Gets the current Undo menu label. // Gets the current Undo menu label.
wxString GetRedoMenuLabel() const; wxString GetRedoMenuLabel() const;
#if wxUSE_MENUS #if wxUSE_MENUS
// Call this to manage an edit menu. // Call this to manage an edit menu.
void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; } void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; }
wxMenu *GetEditMenu() const { return m_commandEditMenu; } wxMenu *GetEditMenu() const { return m_commandEditMenu; }
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
// command list access // command list access
wxList& GetCommands() { return m_commands; } wxList& GetCommands() { return m_commands; }
const wxList& GetCommands() const { return m_commands; } const wxList& GetCommands() const { return m_commands; }
wxCommand *GetCurrentCommand() const wxCommand *GetCurrentCommand() const
{ {
return (wxCommand *)(m_currentCommand ? m_currentCommand->GetData() : NULL); return (wxCommand *)(m_currentCommand ? m_currentCommand->GetData() : NULL);
} }
int GetMaxCommands() const { return m_maxNoCommands; } int GetMaxCommands() const { return m_maxNoCommands; }
virtual void ClearCommands(); virtual void ClearCommands();
// Has the current project been changed? // Has the current project been changed?
virtual bool IsDirty() const virtual bool IsDirty() const
{ {
return m_currentCommand && (m_lastSavedCommand != m_currentCommand); return m_currentCommand && (m_lastSavedCommand != m_currentCommand);
} }
// Mark the current command as the one where the last save took place // Mark the current command as the one where the last save took place
void MarkAsSaved() void MarkAsSaved()
{ {
m_lastSavedCommand = m_currentCommand; m_lastSavedCommand = m_currentCommand;
} }
// By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y" // By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y"
const wxString& GetUndoAccelerator() const { return m_undoAccelerator; } const wxString& GetUndoAccelerator() const { return m_undoAccelerator; }
const wxString& GetRedoAccelerator() const { return m_redoAccelerator; } const wxString& GetRedoAccelerator() const { return m_redoAccelerator; }
void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; } void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; }
void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; } void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; }
protected: protected:
// for further flexibility, command processor doesn't call wxCommand::Do() // for further flexibility, command processor doesn't call wxCommand::Do()
// and Undo() directly but uses these functions which can be overridden in // and Undo() directly but uses these functions which can be overridden in
// the derived class // the derived class
virtual bool DoCommand(wxCommand& cmd); virtual bool DoCommand(wxCommand& cmd);
virtual bool UndoCommand(wxCommand& cmd); virtual bool UndoCommand(wxCommand& cmd);
int m_maxNoCommands; int m_maxNoCommands;
wxList m_commands; wxList m_commands;
wxList::compatibility_iterator m_currentCommand, wxList::compatibility_iterator m_currentCommand,
m_lastSavedCommand; m_lastSavedCommand;
#if wxUSE_MENUS #if wxUSE_MENUS
wxMenu* m_commandEditMenu; wxMenu* m_commandEditMenu;
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
wxString m_undoAccelerator; wxString m_undoAccelerator;
wxString m_redoAccelerator; wxString m_redoAccelerator;
private: private:
DECLARE_DYNAMIC_CLASS(wxCommandProcessor) DECLARE_DYNAMIC_CLASS(wxCommandProcessor)
DECLARE_NO_COPY_CLASS(wxCommandProcessor) DECLARE_NO_COPY_CLASS(wxCommandProcessor)
}; };
#endif // _WX_CMDPROC_H_ #endif // _WX_CMDPROC_H_

View File

@@ -1,454 +1,454 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/cmndata.h // Name: wx/cmndata.h
// Purpose: Common GDI data classes // Purpose: Common GDI data classes
// Author: Julian Smart and others // Author: Julian Smart and others
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id: cmndata.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: cmndata.h 53135 2008-04-12 02:31:04Z VZ $
// Copyright: (c) // Copyright: (c)
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CMNDATA_H_BASE_ #ifndef _WX_CMNDATA_H_BASE_
#define _WX_CMNDATA_H_BASE_ #define _WX_CMNDATA_H_BASE_
#include "wx/window.h" #include "wx/window.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/encinfo.h" #include "wx/encinfo.h"
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#if wxUSE_STREAMS #if wxUSE_STREAMS
#include "wx/stream.h" #include "wx/stream.h"
#endif #endif
class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase; class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase;
class WXDLLEXPORT wxColourData: public wxObject class WXDLLEXPORT wxColourData: public wxObject
{ {
public: public:
wxColourData(); wxColourData();
wxColourData(const wxColourData& data); wxColourData(const wxColourData& data);
virtual ~wxColourData(); virtual ~wxColourData();
void SetChooseFull(bool flag) { m_chooseFull = flag; } void SetChooseFull(bool flag) { m_chooseFull = flag; }
bool GetChooseFull() const { return m_chooseFull; } bool GetChooseFull() const { return m_chooseFull; }
void SetColour(const wxColour& colour) { m_dataColour = colour; } void SetColour(const wxColour& colour) { m_dataColour = colour; }
const wxColour& GetColour() const { return m_dataColour; } const wxColour& GetColour() const { return m_dataColour; }
wxColour& GetColour() { return m_dataColour; } wxColour& GetColour() { return m_dataColour; }
// Array of 16 custom colours // Array of 16 custom colours
void SetCustomColour(int i, const wxColour& colour); void SetCustomColour(int i, const wxColour& colour);
wxColour GetCustomColour(int i); wxColour GetCustomColour(int i);
void operator=(const wxColourData& data); void operator=(const wxColourData& data);
public: public:
wxColour m_dataColour; wxColour m_dataColour;
wxColour m_custColours[16]; wxColour m_custColours[16];
bool m_chooseFull; bool m_chooseFull;
private: private:
DECLARE_DYNAMIC_CLASS(wxColourData) DECLARE_DYNAMIC_CLASS(wxColourData)
}; };
class WXDLLEXPORT wxFontData : public wxObject class WXDLLEXPORT wxFontData : public wxObject
{ {
public: public:
wxFontData(); wxFontData();
virtual ~wxFontData(); virtual ~wxFontData();
wxFontData(const wxFontData& data) wxFontData(const wxFontData& data)
: wxObject(), : wxObject(),
m_fontColour(data.m_fontColour), m_fontColour(data.m_fontColour),
m_showHelp(data.m_showHelp), m_showHelp(data.m_showHelp),
m_allowSymbols(data.m_allowSymbols), m_allowSymbols(data.m_allowSymbols),
m_enableEffects(data.m_enableEffects), m_enableEffects(data.m_enableEffects),
m_initialFont(data.m_initialFont), m_initialFont(data.m_initialFont),
m_chosenFont(data.m_chosenFont), m_chosenFont(data.m_chosenFont),
m_minSize(data.m_minSize), m_minSize(data.m_minSize),
m_maxSize(data.m_maxSize), m_maxSize(data.m_maxSize),
m_encoding(data.m_encoding), m_encoding(data.m_encoding),
m_encodingInfo(data.m_encodingInfo) m_encodingInfo(data.m_encodingInfo)
{ {
} }
wxFontData& operator=(const wxFontData& data) wxFontData& operator=(const wxFontData& data)
{ {
wxObject::operator=(data); wxObject::operator=(data);
m_fontColour = data.m_fontColour; m_fontColour = data.m_fontColour;
m_showHelp = data.m_showHelp; m_showHelp = data.m_showHelp;
m_allowSymbols = data.m_allowSymbols; m_allowSymbols = data.m_allowSymbols;
m_enableEffects = data.m_enableEffects; m_enableEffects = data.m_enableEffects;
m_initialFont = data.m_initialFont; m_initialFont = data.m_initialFont;
m_chosenFont = data.m_chosenFont; m_chosenFont = data.m_chosenFont;
m_minSize = data.m_minSize; m_minSize = data.m_minSize;
m_maxSize = data.m_maxSize; m_maxSize = data.m_maxSize;
m_encoding = data.m_encoding; m_encoding = data.m_encoding;
m_encodingInfo = data.m_encodingInfo; m_encodingInfo = data.m_encodingInfo;
return *this; return *this;
} }
void SetAllowSymbols(bool flag) { m_allowSymbols = flag; } void SetAllowSymbols(bool flag) { m_allowSymbols = flag; }
bool GetAllowSymbols() const { return m_allowSymbols; } bool GetAllowSymbols() const { return m_allowSymbols; }
void SetColour(const wxColour& colour) { m_fontColour = colour; } void SetColour(const wxColour& colour) { m_fontColour = colour; }
const wxColour& GetColour() const { return m_fontColour; } const wxColour& GetColour() const { return m_fontColour; }
void SetShowHelp(bool flag) { m_showHelp = flag; } void SetShowHelp(bool flag) { m_showHelp = flag; }
bool GetShowHelp() const { return m_showHelp; } bool GetShowHelp() const { return m_showHelp; }
void EnableEffects(bool flag) { m_enableEffects = flag; } void EnableEffects(bool flag) { m_enableEffects = flag; }
bool GetEnableEffects() const { return m_enableEffects; } bool GetEnableEffects() const { return m_enableEffects; }
void SetInitialFont(const wxFont& font) { m_initialFont = font; } void SetInitialFont(const wxFont& font) { m_initialFont = font; }
wxFont GetInitialFont() const { return m_initialFont; } wxFont GetInitialFont() const { return m_initialFont; }
void SetChosenFont(const wxFont& font) { m_chosenFont = font; } void SetChosenFont(const wxFont& font) { m_chosenFont = font; }
wxFont GetChosenFont() const { return m_chosenFont; } wxFont GetChosenFont() const { return m_chosenFont; }
void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; } void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; }
// encoding info is split into 2 parts: the logical wxWin encoding // encoding info is split into 2 parts: the logical wxWin encoding
// (wxFontEncoding) and a structure containing the native parameters for // (wxFontEncoding) and a structure containing the native parameters for
// it (wxNativeEncodingInfo) // it (wxNativeEncodingInfo)
wxFontEncoding GetEncoding() const { return m_encoding; } wxFontEncoding GetEncoding() const { return m_encoding; }
void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; } void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; }
wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; } wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; }
// public for backwards compatibility only: don't use directly // public for backwards compatibility only: don't use directly
public: public:
wxColour m_fontColour; wxColour m_fontColour;
bool m_showHelp; bool m_showHelp;
bool m_allowSymbols; bool m_allowSymbols;
bool m_enableEffects; bool m_enableEffects;
wxFont m_initialFont; wxFont m_initialFont;
wxFont m_chosenFont; wxFont m_chosenFont;
int m_minSize; int m_minSize;
int m_maxSize; int m_maxSize;
private: private:
wxFontEncoding m_encoding; wxFontEncoding m_encoding;
wxNativeEncodingInfo m_encodingInfo; wxNativeEncodingInfo m_encodingInfo;
private: private:
DECLARE_DYNAMIC_CLASS(wxFontData) DECLARE_DYNAMIC_CLASS(wxFontData)
}; };
#if wxUSE_PRINTING_ARCHITECTURE #if wxUSE_PRINTING_ARCHITECTURE
/* /*
* wxPrintData * wxPrintData
* Encapsulates printer information (not printer dialog information) * Encapsulates printer information (not printer dialog information)
*/ */
enum wxPrintBin enum wxPrintBin
{ {
wxPRINTBIN_DEFAULT, wxPRINTBIN_DEFAULT,
wxPRINTBIN_ONLYONE, wxPRINTBIN_ONLYONE,
wxPRINTBIN_LOWER, wxPRINTBIN_LOWER,
wxPRINTBIN_MIDDLE, wxPRINTBIN_MIDDLE,
wxPRINTBIN_MANUAL, wxPRINTBIN_MANUAL,
wxPRINTBIN_ENVELOPE, wxPRINTBIN_ENVELOPE,
wxPRINTBIN_ENVMANUAL, wxPRINTBIN_ENVMANUAL,
wxPRINTBIN_AUTO, wxPRINTBIN_AUTO,
wxPRINTBIN_TRACTOR, wxPRINTBIN_TRACTOR,
wxPRINTBIN_SMALLFMT, wxPRINTBIN_SMALLFMT,
wxPRINTBIN_LARGEFMT, wxPRINTBIN_LARGEFMT,
wxPRINTBIN_LARGECAPACITY, wxPRINTBIN_LARGECAPACITY,
wxPRINTBIN_CASSETTE, wxPRINTBIN_CASSETTE,
wxPRINTBIN_FORMSOURCE, wxPRINTBIN_FORMSOURCE,
wxPRINTBIN_USER wxPRINTBIN_USER
}; };
const int wxPRINTMEDIA_DEFAULT = 0; const int wxPRINTMEDIA_DEFAULT = 0;
class WXDLLEXPORT wxPrintData: public wxObject class WXDLLEXPORT wxPrintData: public wxObject
{ {
public: public:
wxPrintData(); wxPrintData();
wxPrintData(const wxPrintData& printData); wxPrintData(const wxPrintData& printData);
virtual ~wxPrintData(); virtual ~wxPrintData();
int GetNoCopies() const { return m_printNoCopies; } int GetNoCopies() const { return m_printNoCopies; }
bool GetCollate() const { return m_printCollate; } bool GetCollate() const { return m_printCollate; }
int GetOrientation() const { return m_printOrientation; } int GetOrientation() const { return m_printOrientation; }
bool IsOrientationReversed() const { return m_printOrientationReversed; } bool IsOrientationReversed() const { return m_printOrientationReversed; }
// Is this data OK for showing the print dialog? // Is this data OK for showing the print dialog?
bool Ok() const { return IsOk(); } bool Ok() const { return IsOk(); }
bool IsOk() const ; bool IsOk() const ;
const wxString& GetPrinterName() const { return m_printerName; } const wxString& GetPrinterName() const { return m_printerName; }
bool GetColour() const { return m_colour; } bool GetColour() const { return m_colour; }
wxDuplexMode GetDuplex() const { return m_duplexMode; } wxDuplexMode GetDuplex() const { return m_duplexMode; }
wxPaperSize GetPaperId() const { return m_paperId; } wxPaperSize GetPaperId() const { return m_paperId; }
const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size
// in wxPageSetupDialogData // in wxPageSetupDialogData
wxPrintQuality GetQuality() const { return m_printQuality; } wxPrintQuality GetQuality() const { return m_printQuality; }
wxPrintBin GetBin() const { return m_bin; } wxPrintBin GetBin() const { return m_bin; }
wxPrintMode GetPrintMode() const { return m_printMode; } wxPrintMode GetPrintMode() const { return m_printMode; }
int GetMedia() const { return m_media; } int GetMedia() const { return m_media; }
void SetNoCopies(int v) { m_printNoCopies = v; } void SetNoCopies(int v) { m_printNoCopies = v; }
void SetCollate(bool flag) { m_printCollate = flag; } void SetCollate(bool flag) { m_printCollate = flag; }
void SetOrientation(int orient) { m_printOrientation = orient; } void SetOrientation(int orient) { m_printOrientation = orient; }
void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; } void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; }
void SetPrinterName(const wxString& name) { m_printerName = name; } void SetPrinterName(const wxString& name) { m_printerName = name; }
void SetColour(bool colour) { m_colour = colour; } void SetColour(bool colour) { m_colour = colour; }
void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; } void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; }
void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; } void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; }
void SetPaperSize(const wxSize& sz) { m_paperSize = sz; } void SetPaperSize(const wxSize& sz) { m_paperSize = sz; }
void SetQuality(wxPrintQuality quality) { m_printQuality = quality; } void SetQuality(wxPrintQuality quality) { m_printQuality = quality; }
void SetBin(wxPrintBin bin) { m_bin = bin; } void SetBin(wxPrintBin bin) { m_bin = bin; }
void SetMedia(int media) { m_media = media; } void SetMedia(int media) { m_media = media; }
void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; } void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
wxString GetFilename() const { return m_filename; } wxString GetFilename() const { return m_filename; }
void SetFilename( const wxString &filename ) { m_filename = filename; } void SetFilename( const wxString &filename ) { m_filename = filename; }
void operator=(const wxPrintData& data); void operator=(const wxPrintData& data);
char* GetPrivData() const { return m_privData; } char* GetPrivData() const { return m_privData; }
int GetPrivDataLen() const { return m_privDataLen; } int GetPrivDataLen() const { return m_privDataLen; }
void SetPrivData( char *privData, int len ); void SetPrivData( char *privData, int len );
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
// PostScript-specific data // PostScript-specific data
wxString GetPrinterCommand() const; wxString GetPrinterCommand() const;
wxString GetPrinterOptions() const; wxString GetPrinterOptions() const;
wxString GetPreviewCommand() const; wxString GetPreviewCommand() const;
wxString GetFontMetricPath() const; wxString GetFontMetricPath() const;
double GetPrinterScaleX() const; double GetPrinterScaleX() const;
double GetPrinterScaleY() const; double GetPrinterScaleY() const;
long GetPrinterTranslateX() const; long GetPrinterTranslateX() const;
long GetPrinterTranslateY() const; long GetPrinterTranslateY() const;
void SetPrinterCommand(const wxString& command); void SetPrinterCommand(const wxString& command);
void SetPrinterOptions(const wxString& options); void SetPrinterOptions(const wxString& options);
void SetPreviewCommand(const wxString& command); void SetPreviewCommand(const wxString& command);
void SetFontMetricPath(const wxString& path); void SetFontMetricPath(const wxString& path);
void SetPrinterScaleX(double x); void SetPrinterScaleX(double x);
void SetPrinterScaleY(double y); void SetPrinterScaleY(double y);
void SetPrinterScaling(double x, double y); void SetPrinterScaling(double x, double y);
void SetPrinterTranslateX(long x); void SetPrinterTranslateX(long x);
void SetPrinterTranslateY(long y); void SetPrinterTranslateY(long y);
void SetPrinterTranslation(long x, long y); void SetPrinterTranslation(long x, long y);
#endif #endif
// Convert between wxPrintData and native data // Convert between wxPrintData and native data
void ConvertToNative(); void ConvertToNative();
void ConvertFromNative(); void ConvertFromNative();
// Holds the native print data // Holds the native print data
wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; } wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; }
private: private:
wxPrintBin m_bin; wxPrintBin m_bin;
int m_media; int m_media;
wxPrintMode m_printMode; wxPrintMode m_printMode;
int m_printNoCopies; int m_printNoCopies;
int m_printOrientation; int m_printOrientation;
bool m_printOrientationReversed; bool m_printOrientationReversed;
bool m_printCollate; bool m_printCollate;
wxString m_printerName; wxString m_printerName;
bool m_colour; bool m_colour;
wxDuplexMode m_duplexMode; wxDuplexMode m_duplexMode;
wxPrintQuality m_printQuality; wxPrintQuality m_printQuality;
wxPaperSize m_paperId; wxPaperSize m_paperId;
wxSize m_paperSize; wxSize m_paperSize;
wxString m_filename; wxString m_filename;
char* m_privData; char* m_privData;
int m_privDataLen; int m_privDataLen;
wxPrintNativeDataBase *m_nativeData; wxPrintNativeDataBase *m_nativeData;
private: private:
DECLARE_DYNAMIC_CLASS(wxPrintData) DECLARE_DYNAMIC_CLASS(wxPrintData)
}; };
/* /*
* wxPrintDialogData * wxPrintDialogData
* Encapsulates information displayed and edited in the printer dialog box. * Encapsulates information displayed and edited in the printer dialog box.
* Contains a wxPrintData object which is filled in according to the values retrieved * Contains a wxPrintData object which is filled in according to the values retrieved
* from the dialog. * from the dialog.
*/ */
class WXDLLEXPORT wxPrintDialogData: public wxObject class WXDLLEXPORT wxPrintDialogData: public wxObject
{ {
public: public:
wxPrintDialogData(); wxPrintDialogData();
wxPrintDialogData(const wxPrintDialogData& dialogData); wxPrintDialogData(const wxPrintDialogData& dialogData);
wxPrintDialogData(const wxPrintData& printData); wxPrintDialogData(const wxPrintData& printData);
virtual ~wxPrintDialogData(); virtual ~wxPrintDialogData();
int GetFromPage() const { return m_printFromPage; } int GetFromPage() const { return m_printFromPage; }
int GetToPage() const { return m_printToPage; } int GetToPage() const { return m_printToPage; }
int GetMinPage() const { return m_printMinPage; } int GetMinPage() const { return m_printMinPage; }
int GetMaxPage() const { return m_printMaxPage; } int GetMaxPage() const { return m_printMaxPage; }
int GetNoCopies() const { return m_printNoCopies; } int GetNoCopies() const { return m_printNoCopies; }
bool GetAllPages() const { return m_printAllPages; } bool GetAllPages() const { return m_printAllPages; }
bool GetSelection() const { return m_printSelection; } bool GetSelection() const { return m_printSelection; }
bool GetCollate() const { return m_printCollate; } bool GetCollate() const { return m_printCollate; }
bool GetPrintToFile() const { return m_printToFile; } bool GetPrintToFile() const { return m_printToFile; }
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
bool GetSetupDialog() const { return m_printSetupDialog; } bool GetSetupDialog() const { return m_printSetupDialog; }
#endif #endif
void SetFromPage(int v) { m_printFromPage = v; } void SetFromPage(int v) { m_printFromPage = v; }
void SetToPage(int v) { m_printToPage = v; } void SetToPage(int v) { m_printToPage = v; }
void SetMinPage(int v) { m_printMinPage = v; } void SetMinPage(int v) { m_printMinPage = v; }
void SetMaxPage(int v) { m_printMaxPage = v; } void SetMaxPage(int v) { m_printMaxPage = v; }
void SetNoCopies(int v) { m_printNoCopies = v; } void SetNoCopies(int v) { m_printNoCopies = v; }
void SetAllPages(bool flag) { m_printAllPages = flag; } void SetAllPages(bool flag) { m_printAllPages = flag; }
void SetSelection(bool flag) { m_printSelection = flag; } void SetSelection(bool flag) { m_printSelection = flag; }
void SetCollate(bool flag) { m_printCollate = flag; } void SetCollate(bool flag) { m_printCollate = flag; }
void SetPrintToFile(bool flag) { m_printToFile = flag; } void SetPrintToFile(bool flag) { m_printToFile = flag; }
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
void SetSetupDialog(bool flag) { m_printSetupDialog = flag; } void SetSetupDialog(bool flag) { m_printSetupDialog = flag; }
#endif #endif
void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; } void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; }
void EnableSelection(bool flag) { m_printEnableSelection = flag; } void EnableSelection(bool flag) { m_printEnableSelection = flag; }
void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; } void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; }
void EnableHelp(bool flag) { m_printEnableHelp = flag; } void EnableHelp(bool flag) { m_printEnableHelp = flag; }
bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; } bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; }
bool GetEnableSelection() const { return m_printEnableSelection; } bool GetEnableSelection() const { return m_printEnableSelection; }
bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; } bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; }
bool GetEnableHelp() const { return m_printEnableHelp; } bool GetEnableHelp() const { return m_printEnableHelp; }
// Is this data OK for showing the print dialog? // Is this data OK for showing the print dialog?
bool Ok() const { return IsOk(); } bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; } bool IsOk() const { return m_printData.Ok() ; }
wxPrintData& GetPrintData() { return m_printData; } wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& printData) { m_printData = printData; } void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
void operator=(const wxPrintDialogData& data); void operator=(const wxPrintDialogData& data);
void operator=(const wxPrintData& data); // Sets internal m_printData member void operator=(const wxPrintData& data); // Sets internal m_printData member
private: private:
int m_printFromPage; int m_printFromPage;
int m_printToPage; int m_printToPage;
int m_printMinPage; int m_printMinPage;
int m_printMaxPage; int m_printMaxPage;
int m_printNoCopies; int m_printNoCopies;
bool m_printAllPages; bool m_printAllPages;
bool m_printCollate; bool m_printCollate;
bool m_printToFile; bool m_printToFile;
bool m_printSelection; bool m_printSelection;
bool m_printEnableSelection; bool m_printEnableSelection;
bool m_printEnablePageNumbers; bool m_printEnablePageNumbers;
bool m_printEnableHelp; bool m_printEnableHelp;
bool m_printEnablePrintToFile; bool m_printEnablePrintToFile;
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_4
bool m_printSetupDialog; bool m_printSetupDialog;
#endif #endif
wxPrintData m_printData; wxPrintData m_printData;
private: private:
DECLARE_DYNAMIC_CLASS(wxPrintDialogData) DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
}; };
/* /*
* This is the data used (and returned) by the wxPageSetupDialog. * This is the data used (and returned) by the wxPageSetupDialog.
*/ */
// Compatibility with old name // Compatibility with old name
#define wxPageSetupData wxPageSetupDialogData #define wxPageSetupData wxPageSetupDialogData
class WXDLLEXPORT wxPageSetupDialogData: public wxObject class WXDLLEXPORT wxPageSetupDialogData: public wxObject
{ {
public: public:
wxPageSetupDialogData(); wxPageSetupDialogData();
wxPageSetupDialogData(const wxPageSetupDialogData& dialogData); wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
wxPageSetupDialogData(const wxPrintData& printData); wxPageSetupDialogData(const wxPrintData& printData);
virtual ~wxPageSetupDialogData(); virtual ~wxPageSetupDialogData();
wxSize GetPaperSize() const { return m_paperSize; } wxSize GetPaperSize() const { return m_paperSize; }
wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); } wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); }
wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; } wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; }
wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; } wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; }
wxPoint GetMarginTopLeft() const { return m_marginTopLeft; } wxPoint GetMarginTopLeft() const { return m_marginTopLeft; }
wxPoint GetMarginBottomRight() const { return m_marginBottomRight; } wxPoint GetMarginBottomRight() const { return m_marginBottomRight; }
bool GetDefaultMinMargins() const { return m_defaultMinMargins; } bool GetDefaultMinMargins() const { return m_defaultMinMargins; }
bool GetEnableMargins() const { return m_enableMargins; } bool GetEnableMargins() const { return m_enableMargins; }
bool GetEnableOrientation() const { return m_enableOrientation; } bool GetEnableOrientation() const { return m_enableOrientation; }
bool GetEnablePaper() const { return m_enablePaper; } bool GetEnablePaper() const { return m_enablePaper; }
bool GetEnablePrinter() const { return m_enablePrinter; } bool GetEnablePrinter() const { return m_enablePrinter; }
bool GetDefaultInfo() const { return m_getDefaultInfo; } bool GetDefaultInfo() const { return m_getDefaultInfo; }
bool GetEnableHelp() const { return m_enableHelp; } bool GetEnableHelp() const { return m_enableHelp; }
// Is this data OK for showing the page setup dialog? // Is this data OK for showing the page setup dialog?
bool Ok() const { return IsOk(); } bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; } bool IsOk() const { return m_printData.Ok() ; }
// If a corresponding paper type is found in the paper database, will set the m_printData // If a corresponding paper type is found in the paper database, will set the m_printData
// paper size id member as well. // paper size id member as well.
void SetPaperSize(const wxSize& sz); void SetPaperSize(const wxSize& sz);
void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); } void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); }
// Sets the wxPrintData id, plus the paper width/height if found in the paper database. // Sets the wxPrintData id, plus the paper width/height if found in the paper database.
void SetPaperSize(wxPaperSize id); void SetPaperSize(wxPaperSize id);
void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; } void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; }
void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; } void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; }
void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; } void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; }
void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; } void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; }
void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; } void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; }
void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; } void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; }
void EnableMargins(bool flag) { m_enableMargins = flag; } void EnableMargins(bool flag) { m_enableMargins = flag; }
void EnableOrientation(bool flag) { m_enableOrientation = flag; } void EnableOrientation(bool flag) { m_enableOrientation = flag; }
void EnablePaper(bool flag) { m_enablePaper = flag; } void EnablePaper(bool flag) { m_enablePaper = flag; }
void EnablePrinter(bool flag) { m_enablePrinter = flag; } void EnablePrinter(bool flag) { m_enablePrinter = flag; }
void EnableHelp(bool flag) { m_enableHelp = flag; } void EnableHelp(bool flag) { m_enableHelp = flag; }
// Use paper size defined in this object to set the wxPrintData // Use paper size defined in this object to set the wxPrintData
// paper id // paper id
void CalculateIdFromPaperSize(); void CalculateIdFromPaperSize();
// Use paper id in wxPrintData to set this object's paper size // Use paper id in wxPrintData to set this object's paper size
void CalculatePaperSizeFromId(); void CalculatePaperSizeFromId();
wxPageSetupDialogData& operator=(const wxPageSetupData& data); wxPageSetupDialogData& operator=(const wxPageSetupData& data);
wxPageSetupDialogData& operator=(const wxPrintData& data); wxPageSetupDialogData& operator=(const wxPrintData& data);
wxPrintData& GetPrintData() { return m_printData; } wxPrintData& GetPrintData() { return m_printData; }
const wxPrintData& GetPrintData() const { return m_printData; } const wxPrintData& GetPrintData() const { return m_printData; }
void SetPrintData(const wxPrintData& printData); void SetPrintData(const wxPrintData& printData);
private: private:
wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?) wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
wxPoint m_minMarginTopLeft; wxPoint m_minMarginTopLeft;
wxPoint m_minMarginBottomRight; wxPoint m_minMarginBottomRight;
wxPoint m_marginTopLeft; wxPoint m_marginTopLeft;
wxPoint m_marginBottomRight; wxPoint m_marginBottomRight;
bool m_defaultMinMargins; bool m_defaultMinMargins;
bool m_enableMargins; bool m_enableMargins;
bool m_enableOrientation; bool m_enableOrientation;
bool m_enablePaper; bool m_enablePaper;
bool m_enablePrinter; bool m_enablePrinter;
bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
bool m_enableHelp; bool m_enableHelp;
wxPrintData m_printData; wxPrintData m_printData;
private: private:
DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData) DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
}; };
#endif // wxUSE_PRINTING_ARCHITECTURE #endif // wxUSE_PRINTING_ARCHITECTURE
#endif #endif
// _WX_CMNDATA_H_BASE_ // _WX_CMNDATA_H_BASE_

View File

@@ -1,104 +1,104 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/collpane.h // Name: wx/collpane.h
// Purpose: wxCollapsiblePane // Purpose: wxCollapsiblePane
// Author: Francesco Montorsi // Author: Francesco Montorsi
// Modified by: // Modified by:
// Created: 8/10/2006 // Created: 8/10/2006
// RCS-ID: $Id: collpane.h 43300 2006-11-11 07:32:08Z RD $ // RCS-ID: $Id: collpane.h 43300 2006-11-11 07:32:08Z RD $
// Copyright: (c) Francesco Montorsi // Copyright: (c) Francesco Montorsi
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLLAPSABLE_PANE_H_BASE_ #ifndef _WX_COLLAPSABLE_PANE_H_BASE_
#define _WX_COLLAPSABLE_PANE_H_BASE_ #define _WX_COLLAPSABLE_PANE_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_COLLPANE #if wxUSE_COLLPANE
#include "wx/control.h" #include "wx/control.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCollapsiblePaneBase: interface for wxCollapsiblePane // wxCollapsiblePaneBase: interface for wxCollapsiblePane
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER) #define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER)
#define wxCP_NO_TLW_RESIZE (0x0002) #define wxCP_NO_TLW_RESIZE (0x0002)
class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl
{ {
public: public:
wxCollapsiblePaneBase() {} wxCollapsiblePaneBase() {}
virtual void Collapse(bool collapse = true) = 0; virtual void Collapse(bool collapse = true) = 0;
void Expand() { Collapse(false); } void Expand() { Collapse(false); }
virtual bool IsCollapsed() const = 0; virtual bool IsCollapsed() const = 0;
bool IsExpanded() const { return !IsCollapsed(); } bool IsExpanded() const { return !IsCollapsed(); }
virtual wxWindow *GetPane() const = 0; virtual wxWindow *GetPane() const = 0;
virtual wxString GetLabel() const = 0; virtual wxString GetLabel() const = 0;
virtual void SetLabel(const wxString& label) = 0; virtual void SetLabel(const wxString& label) = 0;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event types and macros // event types and macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BEGIN_DECLARE_EVENT_TYPES() BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, 1102) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, 1102)
END_DECLARE_EVENT_TYPES() END_DECLARE_EVENT_TYPES()
class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent
{ {
public: public:
wxCollapsiblePaneEvent() {} wxCollapsiblePaneEvent() {}
wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed) wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed)
: wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id), : wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id),
m_bCollapsed(collapsed) m_bCollapsed(collapsed)
{ {
SetEventObject(generator); SetEventObject(generator);
} }
bool GetCollapsed() const { return m_bCollapsed; } bool GetCollapsed() const { return m_bCollapsed; }
void SetCollapsed(bool c) { m_bCollapsed = c; } void SetCollapsed(bool c) { m_bCollapsed = c; }
// default copy ctor, assignment operator and dtor are ok // default copy ctor, assignment operator and dtor are ok
virtual wxEvent *Clone() const { return new wxCollapsiblePaneEvent(*this); } virtual wxEvent *Clone() const { return new wxCollapsiblePaneEvent(*this); }
private: private:
bool m_bCollapsed; bool m_bCollapsed;
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCollapsiblePaneEvent) DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCollapsiblePaneEvent)
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event types and macros // event types and macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&); typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&);
#define wxCollapsiblePaneEventHandler(func) \ #define wxCollapsiblePaneEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func) (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func)
#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \ #define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn)) wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__) #if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/collpane.h" #include "wx/gtk/collpane.h"
#else #else
#include "wx/generic/collpaneg.h" #include "wx/generic/collpaneg.h"
// use #define and not a typedef to allow forward declaring the class // use #define and not a typedef to allow forward declaring the class
#define wxCollapsiblePane wxGenericCollapsiblePane #define wxCollapsiblePane wxGenericCollapsiblePane
#endif #endif
#endif // wxUSE_COLLPANE #endif // wxUSE_COLLPANE
#endif // _WX_COLLAPSABLE_PANE_H_BASE_ #endif // _WX_COLLAPSABLE_PANE_H_BASE_

View File

@@ -1,41 +1,41 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/colrdlgg.h // Name: wx/colrdlgg.h
// Purpose: wxColourDialog // Purpose: wxColourDialog
// Author: Vadim Zeitiln // Author: Vadim Zeitiln
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id: colordlg.h 36623 2006-01-02 14:26:36Z JS $ // RCS-ID: $Id: colordlg.h 36623 2006-01-02 14:26:36Z JS $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLORDLG_H_BASE_ #ifndef _WX_COLORDLG_H_BASE_
#define _WX_COLORDLG_H_BASE_ #define _WX_COLORDLG_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_COLOURDLG #if wxUSE_COLOURDLG
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/colordlg.h" #include "wx/msw/colordlg.h"
#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__) #elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
#include "wx/mac/colordlg.h" #include "wx/mac/colordlg.h"
#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/colordlg.h" #include "wx/gtk/colordlg.h"
#elif defined(__WXPALMOS__) #elif defined(__WXPALMOS__)
#include "wx/palmos/colordlg.h" #include "wx/palmos/colordlg.h"
#else #else
#include "wx/generic/colrdlgg.h" #include "wx/generic/colrdlgg.h"
#define wxColourDialog wxGenericColourDialog #define wxColourDialog wxGenericColourDialog
#endif #endif
// get the colour from user and return it // get the colour from user and return it
wxColour WXDLLEXPORT wxColour WXDLLEXPORT
wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL, wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString); const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString);
#endif // wxUSE_COLOURDLG #endif // wxUSE_COLOURDLG
#endif #endif
// _WX_COLORDLG_H_BASE_ // _WX_COLORDLG_H_BASE_

View File

@@ -1,154 +1,154 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: wx/colour.h // Name: wx/colour.h
// Purpose: wxColourBase definition // Purpose: wxColourBase definition
// Author: Julian Smart // Author: Julian Smart
// Modified by: Francesco Montorsi // Modified by: Francesco Montorsi
// Created: // Created:
// RCS-ID: $Id: colour.h 53135 2008-04-12 02:31:04Z VZ $ // RCS-ID: $Id: colour.h 53135 2008-04-12 02:31:04Z VZ $
// Copyright: Julian Smart // Copyright: Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLOUR_H_BASE_ #ifndef _WX_COLOUR_H_BASE_
#define _WX_COLOUR_H_BASE_ #define _WX_COLOUR_H_BASE_
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/gdiobj.h" #include "wx/gdiobj.h"
class WXDLLIMPEXP_FWD_CORE wxColour; class WXDLLIMPEXP_FWD_CORE wxColour;
// the standard wxColour constructors; // the standard wxColour constructors;
// this macro avoids to repeat these lines across all colour.h files, since // this macro avoids to repeat these lines across all colour.h files, since
// Set() is a virtual function and thus cannot be called by wxColourBase // Set() is a virtual function and thus cannot be called by wxColourBase
// constructors // constructors
#define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \ #define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \
wxColour( ChannelType red, ChannelType green, ChannelType blue, \ wxColour( ChannelType red, ChannelType green, ChannelType blue, \
ChannelType alpha = wxALPHA_OPAQUE ) \ ChannelType alpha = wxALPHA_OPAQUE ) \
{ Set(red, green, blue, alpha); } \ { Set(red, green, blue, alpha); } \
wxColour( unsigned long colRGB ) { Set(colRGB); } \ wxColour( unsigned long colRGB ) { Set(colRGB); } \
wxColour(const wxString &colourName) { Set(colourName); } \ wxColour(const wxString &colourName) { Set(colourName); } \
wxColour(const wxChar *colourName) { Set(colourName); } wxColour(const wxChar *colourName) { Set(colourName); }
// flags for wxColour -> wxString conversion (see wxColour::GetAsString) // flags for wxColour -> wxString conversion (see wxColour::GetAsString)
#define wxC2S_NAME 1 // return colour name, when possible #define wxC2S_NAME 1 // return colour name, when possible
#define wxC2S_CSS_SYNTAX 2 // return colour in rgb(r,g,b) syntax #define wxC2S_CSS_SYNTAX 2 // return colour in rgb(r,g,b) syntax
#define wxC2S_HTML_SYNTAX 4 // return colour in #rrggbb syntax #define wxC2S_HTML_SYNTAX 4 // return colour in #rrggbb syntax
const unsigned char wxALPHA_TRANSPARENT = 0; const unsigned char wxALPHA_TRANSPARENT = 0;
const unsigned char wxALPHA_OPAQUE = 0xff; const unsigned char wxALPHA_OPAQUE = 0xff;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxVariant support // wxVariant support
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_VARIANT #if wxUSE_VARIANT
#include "wx/variant.h" #include "wx/variant.h"
DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT) DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT)
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxColourBase: this class has no data members, just some functions to avoid // wxColourBase: this class has no data members, just some functions to avoid
// code redundancy in all native wxColour implementations // code redundancy in all native wxColour implementations
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLEXPORT wxColourBase : public wxGDIObject class WXDLLEXPORT wxColourBase : public wxGDIObject
{ {
public: public:
// type of a single colour component // type of a single colour component
typedef unsigned char ChannelType; typedef unsigned char ChannelType;
wxColourBase() {} wxColourBase() {}
virtual ~wxColourBase() {} virtual ~wxColourBase() {}
// Set() functions // Set() functions
// --------------- // ---------------
void Set(ChannelType red, void Set(ChannelType red,
ChannelType green, ChannelType green,
ChannelType blue, ChannelType blue,
ChannelType alpha = wxALPHA_OPAQUE) ChannelType alpha = wxALPHA_OPAQUE)
{ InitRGBA(red,green,blue, alpha); } { InitRGBA(red,green,blue, alpha); }
// implemented in colourcmn.cpp // implemented in colourcmn.cpp
bool Set(const wxChar *str) bool Set(const wxChar *str)
{ return FromString(str); } { return FromString(str); }
bool Set(const wxString &str) bool Set(const wxString &str)
{ return FromString(str); } { return FromString(str); }
void Set(unsigned long colRGB) void Set(unsigned long colRGB)
{ {
// we don't need to know sizeof(long) here because we assume that the three // we don't need to know sizeof(long) here because we assume that the three
// least significant bytes contain the R, G and B values // least significant bytes contain the R, G and B values
Set((ChannelType)(0xFF & colRGB), Set((ChannelType)(0xFF & colRGB),
(ChannelType)(0xFF & (colRGB >> 8)), (ChannelType)(0xFF & (colRGB >> 8)),
(ChannelType)(0xFF & (colRGB >> 16))); (ChannelType)(0xFF & (colRGB >> 16)));
} }
// accessors // accessors
// --------- // ---------
virtual bool Ok() const { return IsOk(); } virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const = 0; virtual bool IsOk() const = 0;
virtual ChannelType Red() const = 0; virtual ChannelType Red() const = 0;
virtual ChannelType Green() const = 0; virtual ChannelType Green() const = 0;
virtual ChannelType Blue() const = 0; virtual ChannelType Blue() const = 0;
virtual ChannelType Alpha() const virtual ChannelType Alpha() const
{ return wxALPHA_OPAQUE ; } { return wxALPHA_OPAQUE ; }
// implemented in colourcmn.cpp // implemented in colourcmn.cpp
virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const; virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
// old, deprecated // old, deprecated
// --------------- // ---------------
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
wxDEPRECATED( static wxColour CreateByName(const wxString& name) ); wxDEPRECATED( static wxColour CreateByName(const wxString& name) );
wxDEPRECATED( void InitFromName(const wxString& col) ); wxDEPRECATED( void InitFromName(const wxString& col) );
#endif #endif
protected: protected:
virtual void virtual void
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0; InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0;
virtual bool FromString(const wxChar *s); virtual bool FromString(const wxChar *s);
}; };
#if defined(__WXPALMOS__) #if defined(__WXPALMOS__)
#include "wx/generic/colour.h" #include "wx/generic/colour.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/colour.h" #include "wx/msw/colour.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/colour.h" #include "wx/motif/colour.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)
#include "wx/gtk/colour.h" #include "wx/gtk/colour.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/colour.h" #include "wx/gtk1/colour.h"
#elif defined(__WXMGL__) #elif defined(__WXMGL__)
#include "wx/generic/colour.h" #include "wx/generic/colour.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#include "wx/generic/colour.h" #include "wx/generic/colour.h"
#elif defined(__WXX11__) #elif defined(__WXX11__)
#include "wx/x11/colour.h" #include "wx/x11/colour.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/mac/colour.h" #include "wx/mac/colour.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/colour.h" #include "wx/cocoa/colour.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/colour.h" #include "wx/os2/colour.h"
#endif #endif
#define wxColor wxColour #define wxColor wxColour
#endif // _WX_COLOUR_H_BASE_ #endif // _WX_COLOUR_H_BASE_

Some files were not shown because too many files have changed in this diff Show More