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:
parent
bbb98d8e2e
commit
e6fe5ec42f
|
@ -1,28 +1,28 @@
|
|||
/* $VER: ppc_disasm V0.1 (23.05.1998)
|
||||
*
|
||||
* Disassembler module for the PowerPC microprocessor family
|
||||
* Copyright (c) 1998-2000 Frank Wille
|
||||
*
|
||||
* ppc_disasm.c is freeware and may be freely redistributed as long as
|
||||
* no modifications are made and nothing is charged for it.
|
||||
* Non-commercial usage is allowed without any restrictions.
|
||||
* EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
|
||||
* SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
|
||||
*
|
||||
*
|
||||
* v0.1 (23.05.1998) phx
|
||||
* First version, which implements all PowerPC instructions.
|
||||
* v0.0 (09.05.1998) phx
|
||||
* File created.
|
||||
*/
|
||||
|
||||
|
||||
// Yeah, this does not really belong in bochs_disasm, but hey, it's a disasm and it needed a common location...
|
||||
|
||||
#ifndef _POWERPC_DISASM
|
||||
#define _POWERPC_DISASM
|
||||
|
||||
const char *DisassembleGekko(unsigned int opcode, unsigned int curInstAddr);
|
||||
const char *GetGRPName(unsigned int index);
|
||||
|
||||
#endif
|
||||
/* $VER: ppc_disasm V0.1 (23.05.1998)
|
||||
*
|
||||
* Disassembler module for the PowerPC microprocessor family
|
||||
* Copyright (c) 1998-2000 Frank Wille
|
||||
*
|
||||
* ppc_disasm.c is freeware and may be freely redistributed as long as
|
||||
* no modifications are made and nothing is charged for it.
|
||||
* Non-commercial usage is allowed without any restrictions.
|
||||
* EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
|
||||
* SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
|
||||
*
|
||||
*
|
||||
* v0.1 (23.05.1998) phx
|
||||
* First version, which implements all PowerPC instructions.
|
||||
* v0.0 (09.05.1998) phx
|
||||
* File created.
|
||||
*/
|
||||
|
||||
|
||||
// Yeah, this does not really belong in bochs_disasm, but hey, it's a disasm and it needed a common location...
|
||||
|
||||
#ifndef _POWERPC_DISASM
|
||||
#define _POWERPC_DISASM
|
||||
|
||||
const char *DisassembleGekko(unsigned int opcode, unsigned int curInstAddr);
|
||||
const char *GetGRPName(unsigned int index);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
#ifndef _BOCHS_CONFIG_H
|
||||
#define _BOCHS_CONFIG_H
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef signed __int8 Bit8s;
|
||||
typedef signed __int16 Bit16s;
|
||||
typedef signed __int32 Bit32s;
|
||||
typedef signed __int64 Bit64s;
|
||||
|
||||
typedef unsigned __int8 Bit8u;
|
||||
typedef unsigned __int16 Bit16u;
|
||||
typedef unsigned __int32 Bit32u;
|
||||
typedef unsigned __int64 Bit64u;
|
||||
|
||||
typedef bool bx_bool;
|
||||
typedef Bit64u bx_address;
|
||||
|
||||
#define BX_CPP_INLINE inline
|
||||
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef int8_t Bit8s;
|
||||
typedef int16_t Bit16s;
|
||||
typedef int32_t Bit32s;
|
||||
typedef int64_t Bit64s;
|
||||
|
||||
typedef uint8_t Bit8u;
|
||||
typedef uint16_t Bit16u;
|
||||
typedef uint32_t Bit32u;
|
||||
typedef uint64_t Bit64u;
|
||||
|
||||
typedef bool bx_bool;
|
||||
typedef Bit64u bx_address;
|
||||
|
||||
#define BX_CPP_INLINE inline
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifndef _BOCHS_CONFIG_H
|
||||
#define _BOCHS_CONFIG_H
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef signed __int8 Bit8s;
|
||||
typedef signed __int16 Bit16s;
|
||||
typedef signed __int32 Bit32s;
|
||||
typedef signed __int64 Bit64s;
|
||||
|
||||
typedef unsigned __int8 Bit8u;
|
||||
typedef unsigned __int16 Bit16u;
|
||||
typedef unsigned __int32 Bit32u;
|
||||
typedef unsigned __int64 Bit64u;
|
||||
|
||||
typedef bool bx_bool;
|
||||
typedef Bit64u bx_address;
|
||||
|
||||
#define BX_CPP_INLINE inline
|
||||
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef int8_t Bit8s;
|
||||
typedef int16_t Bit16s;
|
||||
typedef int32_t Bit32s;
|
||||
typedef int64_t Bit64s;
|
||||
|
||||
typedef uint8_t Bit8u;
|
||||
typedef uint16_t Bit16u;
|
||||
typedef uint32_t Bit32u;
|
||||
typedef uint64_t Bit64u;
|
||||
|
||||
typedef bool bx_bool;
|
||||
typedef Bit64u bx_address;
|
||||
|
||||
#define BX_CPP_INLINE inline
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,423 +1,423 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _cggl_h
|
||||
#define _cggl_h
|
||||
|
||||
#include <Cg/cg.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef APIENTRY /* From Win32's <windef.h> */
|
||||
# define CGGL_APIENTRY_DEFINED
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
# ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */
|
||||
# define CGGL_WINGDIAPI_DEFINED
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/* Set up for either Win32 import/export/lib. */
|
||||
#ifndef CGGL_API
|
||||
# ifdef _WIN32
|
||||
# ifdef CGGL_EXPORTS
|
||||
# define CGGL_API __declspec(dllexport)
|
||||
# elif defined (CG_LIB)
|
||||
# define CGGL_API
|
||||
# else
|
||||
# define CGGL_API __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define CGGL_API
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CGGLENTRY
|
||||
# ifdef _WIN32
|
||||
# define CGGLENTRY __cdecl
|
||||
# else
|
||||
# define CGGLENTRY
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/*** cgGL Type Definitions ***/
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CG_GL_MATRIX_IDENTITY = 0,
|
||||
CG_GL_MATRIX_TRANSPOSE = 1,
|
||||
CG_GL_MATRIX_INVERSE = 2,
|
||||
CG_GL_MATRIX_INVERSE_TRANSPOSE = 3,
|
||||
|
||||
CG_GL_MODELVIEW_MATRIX,
|
||||
CG_GL_PROJECTION_MATRIX,
|
||||
CG_GL_TEXTURE_MATRIX,
|
||||
CG_GL_MODELVIEW_PROJECTION_MATRIX,
|
||||
|
||||
CG_GL_VERTEX,
|
||||
CG_GL_FRAGMENT,
|
||||
CG_GL_GEOMETRY
|
||||
|
||||
} CGGLenum;
|
||||
|
||||
|
||||
#ifndef CGGL_EXPLICIT
|
||||
|
||||
/******************************************************************************
|
||||
*** Profile Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API CGbool CGGLENTRY cgGLIsProfileSupported(CGprofile profile);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLEnableProfile(CGprofile profile);
|
||||
CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile);
|
||||
|
||||
CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type);
|
||||
CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile);
|
||||
|
||||
/******************************************************************************
|
||||
*** Program Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program);
|
||||
CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program);
|
||||
CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program);
|
||||
CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile);
|
||||
CGGL_API GLuint CGGLENTRY cgGLGetProgramID(CGprogram program);
|
||||
|
||||
/******************************************************************************
|
||||
*** Parameter Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1f(CGparameter param,
|
||||
float x);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter2f(CGparameter param,
|
||||
float x,
|
||||
float y);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param,
|
||||
float x,
|
||||
float y,
|
||||
float z);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param,
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float w);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1fv(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 cgGLSetParameter4fv(CGparameter param, const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1d(CGparameter param,
|
||||
double x);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter2d(CGparameter param,
|
||||
double x,
|
||||
double y);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param,
|
||||
double x,
|
||||
double y,
|
||||
double z);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param,
|
||||
double x,
|
||||
double y,
|
||||
double z,
|
||||
double w);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1dv(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 cgGLSetParameter4dv(CGparameter param, const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameter1f(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 cgGLGetParameter4f(CGparameter param, float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameter1d(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 cgGLGetParameter4d(CGparameter param, double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterPointer(CGparameter param,
|
||||
GLint fsize,
|
||||
GLenum type,
|
||||
GLsizei stride,
|
||||
const GLvoid *pointer);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLEnableClientState(CGparameter param);
|
||||
CGGL_API void CGGLENTRY cgGLDisableClientState(CGparameter param);
|
||||
|
||||
/******************************************************************************
|
||||
*** Matrix Parameter Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdr(CGparameter param,
|
||||
const double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfr(CGparameter param,
|
||||
const float *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdc(CGparameter param,
|
||||
const double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfc(CGparameter param,
|
||||
const float *matrix);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdr(CGparameter param, double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfr(CGparameter param, float *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdc(CGparameter param, double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfc(CGparameter param, float *matrix);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetStateMatrixParameter(CGparameter param,
|
||||
CGGLenum matrix,
|
||||
CGGLenum transform);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *matrices);
|
||||
|
||||
/******************************************************************************
|
||||
*** Texture Parameter Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetTextureParameter(CGparameter param, GLuint texobj);
|
||||
CGGL_API GLuint CGGLENTRY cgGLGetTextureParameter(CGparameter param);
|
||||
CGGL_API void CGGLENTRY cgGLEnableTextureParameter(CGparameter param);
|
||||
CGGL_API void CGGLENTRY cgGLDisableTextureParameter(CGparameter param);
|
||||
CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag);
|
||||
CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj);
|
||||
CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLEnableProgramProfiles( CGprogram program );
|
||||
CGGL_API void CGGLENTRY cgGLDisableProgramProfiles( CGprogram program );
|
||||
|
||||
/******************************************************************************
|
||||
*** Misc Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetDebugMode( CGbool debug );
|
||||
|
||||
/******************************************************************************
|
||||
*** Buffer Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage);
|
||||
CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CGGL_APIENTRY_DEFINED
|
||||
# undef CGGL_APIENTRY_DEFINED
|
||||
# undef APIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef CGGL_WINGDIAPI_DEFINED
|
||||
# undef CGGL_WINGDIAPI_DEFINED
|
||||
# undef WINGDIAPI
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _cggl_h
|
||||
#define _cggl_h
|
||||
|
||||
#include <Cg/cg.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef APIENTRY /* From Win32's <windef.h> */
|
||||
# define CGGL_APIENTRY_DEFINED
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
# ifndef WINGDIAPI /* From Win32's <wingdi.h> and <winnt.h> */
|
||||
# define CGGL_WINGDIAPI_DEFINED
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/* Set up for either Win32 import/export/lib. */
|
||||
#ifndef CGGL_API
|
||||
# ifdef _WIN32
|
||||
# ifdef CGGL_EXPORTS
|
||||
# define CGGL_API __declspec(dllexport)
|
||||
# elif defined (CG_LIB)
|
||||
# define CGGL_API
|
||||
# else
|
||||
# define CGGL_API __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define CGGL_API
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CGGLENTRY
|
||||
# ifdef _WIN32
|
||||
# define CGGLENTRY __cdecl
|
||||
# else
|
||||
# define CGGLENTRY
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/*** cgGL Type Definitions ***/
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CG_GL_MATRIX_IDENTITY = 0,
|
||||
CG_GL_MATRIX_TRANSPOSE = 1,
|
||||
CG_GL_MATRIX_INVERSE = 2,
|
||||
CG_GL_MATRIX_INVERSE_TRANSPOSE = 3,
|
||||
|
||||
CG_GL_MODELVIEW_MATRIX,
|
||||
CG_GL_PROJECTION_MATRIX,
|
||||
CG_GL_TEXTURE_MATRIX,
|
||||
CG_GL_MODELVIEW_PROJECTION_MATRIX,
|
||||
|
||||
CG_GL_VERTEX,
|
||||
CG_GL_FRAGMENT,
|
||||
CG_GL_GEOMETRY
|
||||
|
||||
} CGGLenum;
|
||||
|
||||
|
||||
#ifndef CGGL_EXPLICIT
|
||||
|
||||
/******************************************************************************
|
||||
*** Profile Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API CGbool CGGLENTRY cgGLIsProfileSupported(CGprofile profile);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLEnableProfile(CGprofile profile);
|
||||
CGGL_API void CGGLENTRY cgGLDisableProfile(CGprofile profile);
|
||||
|
||||
CGGL_API CGprofile CGGLENTRY cgGLGetLatestProfile(CGGLenum profile_type);
|
||||
CGGL_API void CGGLENTRY cgGLSetOptimalOptions(CGprofile profile);
|
||||
|
||||
/******************************************************************************
|
||||
*** Program Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLLoadProgram(CGprogram program);
|
||||
CGGL_API CGbool CGGLENTRY cgGLIsProgramLoaded(CGprogram program);
|
||||
CGGL_API void CGGLENTRY cgGLBindProgram(CGprogram program);
|
||||
CGGL_API void CGGLENTRY cgGLUnbindProgram(CGprofile profile);
|
||||
CGGL_API GLuint CGGLENTRY cgGLGetProgramID(CGprogram program);
|
||||
|
||||
/******************************************************************************
|
||||
*** Parameter Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1f(CGparameter param,
|
||||
float x);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter2f(CGparameter param,
|
||||
float x,
|
||||
float y);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter3f(CGparameter param,
|
||||
float x,
|
||||
float y,
|
||||
float z);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter4f(CGparameter param,
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float w);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1fv(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 cgGLSetParameter4fv(CGparameter param, const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1d(CGparameter param,
|
||||
double x);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter2d(CGparameter param,
|
||||
double x,
|
||||
double y);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter3d(CGparameter param,
|
||||
double x,
|
||||
double y,
|
||||
double z);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter4d(CGparameter param,
|
||||
double x,
|
||||
double y,
|
||||
double z,
|
||||
double w);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameter1dv(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 cgGLSetParameter4dv(CGparameter param, const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameter1f(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 cgGLGetParameter4f(CGparameter param, float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameter1d(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 cgGLGetParameter4d(CGparameter param, double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray1f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray2f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray3f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray4f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray1d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray2d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray3d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterArray4d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray1f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray2f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray3f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray4f(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray1d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray2d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray3d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetParameterArray4d(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *v);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetParameterPointer(CGparameter param,
|
||||
GLint fsize,
|
||||
GLenum type,
|
||||
GLsizei stride,
|
||||
const GLvoid *pointer);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLEnableClientState(CGparameter param);
|
||||
CGGL_API void CGGLENTRY cgGLDisableClientState(CGparameter param);
|
||||
|
||||
/******************************************************************************
|
||||
*** Matrix Parameter Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdr(CGparameter param,
|
||||
const double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfr(CGparameter param,
|
||||
const float *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterdc(CGparameter param,
|
||||
const double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterfc(CGparameter param,
|
||||
const float *matrix);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdr(CGparameter param, double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfr(CGparameter param, float *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterdc(CGparameter param, double *matrix);
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterfc(CGparameter param, float *matrix);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetStateMatrixParameter(CGparameter param,
|
||||
CGGLenum matrix,
|
||||
CGGLenum transform);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArrayfr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetMatrixParameterArraydr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
const double *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArrayfr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
float *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydc(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *matrices);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLGetMatrixParameterArraydr(CGparameter param,
|
||||
long offset,
|
||||
long nelements,
|
||||
double *matrices);
|
||||
|
||||
/******************************************************************************
|
||||
*** Texture Parameter Managment Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetTextureParameter(CGparameter param, GLuint texobj);
|
||||
CGGL_API GLuint CGGLENTRY cgGLGetTextureParameter(CGparameter param);
|
||||
CGGL_API void CGGLENTRY cgGLEnableTextureParameter(CGparameter param);
|
||||
CGGL_API void CGGLENTRY cgGLDisableTextureParameter(CGparameter param);
|
||||
CGGL_API GLenum CGGLENTRY cgGLGetTextureEnum(CGparameter param);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag);
|
||||
CGGL_API CGbool CGGLENTRY cgGLGetManageTextureParameters(CGcontext ctx);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetupSampler(CGparameter param, GLuint texobj);
|
||||
CGGL_API void CGGLENTRY cgGLRegisterStates(CGcontext);
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLEnableProgramProfiles( CGprogram program );
|
||||
CGGL_API void CGGLENTRY cgGLDisableProgramProfiles( CGprogram program );
|
||||
|
||||
/******************************************************************************
|
||||
*** Misc Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API void CGGLENTRY cgGLSetDebugMode( CGbool debug );
|
||||
|
||||
/******************************************************************************
|
||||
*** Buffer Functions
|
||||
*****************************************************************************/
|
||||
|
||||
CGGL_API CGbuffer CGGLENTRY cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage);
|
||||
CGGL_API GLuint CGGLENTRY cgGLGetBufferObject(CGbuffer buffer);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CGGL_APIENTRY_DEFINED
|
||||
# undef CGGL_APIENTRY_DEFINED
|
||||
# undef APIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef CGGL_WINGDIAPI_DEFINED
|
||||
# undef CGGL_WINGDIAPI_DEFINED
|
||||
# undef WINGDIAPI
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,70 +1,70 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_PROFILE_MACRO(Vertex,vp20,VP20,"vp20",6146,1)
|
||||
CG_PROFILE_MACRO(Fragment20,fp20,FP20,"fp20",6147,0)
|
||||
CG_PROFILE_MACRO(Vertex30,vp30,VP30,"vp30",6148,1)
|
||||
CG_PROFILE_MACRO(Fragment,fp30,FP30,"fp30",6149,0)
|
||||
CG_PROFILE_MACRO(ARBVertex,arbvp1,ARBVP1,"arbvp1",6150,1)
|
||||
CG_PROFILE_MACRO(Fragment40,fp40,FP40,"fp40",6151,0)
|
||||
CG_PROFILE_MACRO(ARBFragment,arbfp1,ARBFP1,"arbfp1",7000,0)
|
||||
CG_PROFILE_MACRO(Vertex40,vp40,VP40,"vp40",7001,1)
|
||||
CG_PROFILE_MACRO(GLSLVertex,glslv,GLSLV,"glslv",7007,1)
|
||||
CG_PROFILE_MACRO(GLSLFragment,glslf,GLSLF,"glslf",7008,0)
|
||||
CG_PROFILE_MACRO(GLSLCombined, glslc, GLSLC, "glslc", 7009, 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(GPUGeometry,gpu_gp,GPU_GP,"gp4gp",7012,0)
|
||||
|
||||
#ifndef CG_IN_PROFILES_INCLUDE
|
||||
# undef CG_PROFILE_MACRO
|
||||
#endif
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_PROFILE_MACRO(Vertex,vp20,VP20,"vp20",6146,1)
|
||||
CG_PROFILE_MACRO(Fragment20,fp20,FP20,"fp20",6147,0)
|
||||
CG_PROFILE_MACRO(Vertex30,vp30,VP30,"vp30",6148,1)
|
||||
CG_PROFILE_MACRO(Fragment,fp30,FP30,"fp30",6149,0)
|
||||
CG_PROFILE_MACRO(ARBVertex,arbvp1,ARBVP1,"arbvp1",6150,1)
|
||||
CG_PROFILE_MACRO(Fragment40,fp40,FP40,"fp40",6151,0)
|
||||
CG_PROFILE_MACRO(ARBFragment,arbfp1,ARBFP1,"arbfp1",7000,0)
|
||||
CG_PROFILE_MACRO(Vertex40,vp40,VP40,"vp40",7001,1)
|
||||
CG_PROFILE_MACRO(GLSLVertex,glslv,GLSLV,"glslv",7007,1)
|
||||
CG_PROFILE_MACRO(GLSLFragment,glslf,GLSLF,"glslf",7008,0)
|
||||
CG_PROFILE_MACRO(GLSLCombined, glslc, GLSLC, "glslc", 7009, 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(GPUGeometry,gpu_gp,GPU_GP,"gp4gp",7012,0)
|
||||
|
||||
#ifndef CG_IN_PROFILES_INCLUDE
|
||||
# undef CG_PROFILE_MACRO
|
||||
#endif
|
||||
|
|
|
@ -1,382 +1,382 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic hardware
|
||||
* bind locations.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_BINDLOCATION_MACRO(name, compiler_name, enum_int)
|
||||
*
|
||||
* name : The name of the location.
|
||||
* enum_name : The C enumerant.
|
||||
* compiler_name : The name of the location within the compiler syntax.
|
||||
* int_id : Integer enumerant associated with this bind location.
|
||||
* (3256 is reservered for CG_UNDEFINED)
|
||||
* addressable : The bind location must have an integer address
|
||||
* associated with it.
|
||||
* ParamType : the cgParamType of this register.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
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(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(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(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(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(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(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(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(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(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(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(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(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(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(Attr0,CG_ATTR0,"ATTR0",2113,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(Attr3,CG_ATTR3,"ATTR3",2116,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(Attr6,CG_ATTR6,"ATTR6",2119,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(Attr9,CG_ATTR9,"ATTR9",2122,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(Attr12,CG_ATTR12,"ATTR12",2125,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(Attr15,CG_ATTR15,"ATTR15",2128,0,CG_VARYING_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(Tex1,CG_TEX1,"TEX1",2180,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(Tex4,CG_TEX4,"TEX4",2193,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(Tex7,CG_TEX7,"TEX7",2196,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(Col1,CG_COL1,"COL1",2246,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(PSiz,CG_PSIZ,"PSIZ",2309,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(Clp2,CG_CLP2,"CLP2",2312,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(Clp5,CG_CLP5,"CLP5",2315,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(Position0,CG_POSITION0,"POSITION0",2437,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(Position3,CG_POSITION3,"POSITION3",2440,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(Position6,CG_POSITION6,"POSITION6",2443,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(Position9,CG_POSITION9,"POSITION9",2446,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(Position12,CG_POSITION12,"POSITION12",2449,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(Position15,CG_POSITION15,"POSITION15",2452,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(Tangent1,CG_TANGENT1,"TANGENT1",2566,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(Tangent4,CG_TANGENT4,"TANGENT4",2569,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(Tangent7,CG_TANGENT7,"TANGENT7",2572,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(Tangent10,CG_TANGENT10,"TANGENT10",2575,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(Tangent13,CG_TANGENT13,"TANGENT13",2578,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(Specular0,CG_SPECULAR0,"SPECULAR0",2629,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(BlendIndices2,CG_BLENDINDICES2,"BLENDINDICES2",2695,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(BlendIndices5,CG_BLENDINDICES5,"BLENDINDICES5",2698,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(BlendIndices8,CG_BLENDINDICES8,"BLENDINDICES8",2701,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(BlendIndices11,CG_BLENDINDICES11,"BLENDINDICES11",2704,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(BlendIndices14,CG_BLENDINDICES14,"BLENDINDICES14",2707,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(Color1,CG_COLOR1,"COLOR1",2758,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(Color4,CG_COLOR4,"COLOR4",2761,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(Color7,CG_COLOR7,"COLOR7",2764,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(Color10,CG_COLOR10,"COLOR10",2767,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(Color13,CG_COLOR13,"COLOR13",2770,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(PSize0,CG_PSIZE0,"PSIZE0",2821,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(PSize3,CG_PSIZE3,"PSIZE3",2824,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(PSize6,CG_PSIZE6,"PSIZE6",2827,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(PSize9,CG_PSIZE9,"PSIZE9",2830,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(PSize12,CG_PSIZE12,"PSIZE12",2833,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(PSize15,CG_PSIZE15,"PSIZE15",2836,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(BiNormal2,CG_BINORMAL2,"BINORMAL2",2887,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(BiNormal5,CG_BINORMAL5,"BINORMAL5",2890,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(BiNormal8,CG_BINORMAL8,"BINORMAL8",2893,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(BiNormal11,CG_BINORMAL11,"BINORMAL11",2896,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(BiNormal14,CG_BINORMAL14,"BINORMAL14",2899,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(FOG1,CG_FOG1,"FOG1",2918,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(FOG4,CG_FOG4,"FOG4",2921,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(FOG7,CG_FOG7,"FOG7",2924,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(FOG10,CG_FOG10,"FOG10",2927,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(FOG13,CG_FOG13,"FOG13",2930,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(DEPTH0,CG_DEPTH0,"DEPTH0",2933,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(DEPTH3,CG_DEPTH3,"DEPTH3",2936,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(DEPTH6,CG_DEPTH6,"DEPTH6",2939,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(DEPTH9,CG_DEPTH9,"DEPTH9",2942,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(DEPTH12,CG_DEPTH12,"DEPTH12",2945,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(DEPTH15,CG_DEPTH15,"DEPTH15",2948,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(SAMPLE2,CG_SAMPLE2,"SAMPLE2",2951,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(SAMPLE5,CG_SAMPLE5,"SAMPLE5",2954,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(SAMPLE8,CG_SAMPLE8,"SAMPLE8",2957,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(SAMPLE11,CG_SAMPLE11,"SAMPLE11",2960,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(SAMPLE14,CG_SAMPLE14,"SAMPLE14",2963,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(BlendWeight1,CG_BLENDWEIGHT1,"BLENDWEIGHT1",3029,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(BlendWeight4,CG_BLENDWEIGHT4,"BLENDWEIGHT4",3032,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(BlendWeight7,CG_BLENDWEIGHT7,"BLENDWEIGHT7",3035,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(BlendWeight10,CG_BLENDWEIGHT10,"BLENDWEIGHT10",3038,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(BlendWeight13,CG_BLENDWEIGHT13,"BLENDWEIGHT13",3041,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(Normal0,CG_NORMAL0,"NORMAL0",3092,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(Normal3,CG_NORMAL3,"NORMAL3",3095,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(Normal6,CG_NORMAL6,"NORMAL6",3098,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(Normal9,CG_NORMAL9,"NORMAL9",3101,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(Normal12,CG_NORMAL12,"NORMAL12",3104,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(Normal15,CG_NORMAL15,"NORMAL15",3107,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(TexCoord1,CG_TEXCOORD1,"TEXCOORD1",3221,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(TexCoord4,CG_TEXCOORD4,"TEXCOORD4",3224,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(TexCoord7,CG_TEXCOORD7,"TEXCOORD7",3227,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(TexCoord10,CG_TEXCOORD10,"TEXCOORD10",3230,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(TexCoord13,CG_TEXCOORD13,"TEXCOORD13",3233,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(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(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(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(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(Coverage, CG_COVERAGE, "COVERAGE", 3292, 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(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(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(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(LastColor1, CG_LASTCOL1, "LASTCOL1", 4401, 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(LastColor4, CG_LASTCOL4, "LASTCOL4", 4404, 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(LastColor7, CG_LASTCOL7, "LASTCOL7", 4407, 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(InstanceId,CG_INSTANCEID,"INSTANCEID",4412,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(Layer,CG_LAYER,"LAYER",4415,1,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SampleMask,CG_SAMPLEMASK,"SAMPLEMASK",4416,0,CG_VARYING_PARAM)
|
||||
|
||||
#undef CG_BINDLOCATION_MACRO
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic hardware
|
||||
* bind locations.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_BINDLOCATION_MACRO(name, compiler_name, enum_int)
|
||||
*
|
||||
* name : The name of the location.
|
||||
* enum_name : The C enumerant.
|
||||
* compiler_name : The name of the location within the compiler syntax.
|
||||
* int_id : Integer enumerant associated with this bind location.
|
||||
* (3256 is reservered for CG_UNDEFINED)
|
||||
* addressable : The bind location must have an integer address
|
||||
* associated with it.
|
||||
* ParamType : the cgParamType of this register.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
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(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(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(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(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(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(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(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(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(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(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(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(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(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(Attr0,CG_ATTR0,"ATTR0",2113,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(Attr3,CG_ATTR3,"ATTR3",2116,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(Attr6,CG_ATTR6,"ATTR6",2119,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(Attr9,CG_ATTR9,"ATTR9",2122,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(Attr12,CG_ATTR12,"ATTR12",2125,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(Attr15,CG_ATTR15,"ATTR15",2128,0,CG_VARYING_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(Tex1,CG_TEX1,"TEX1",2180,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(Tex4,CG_TEX4,"TEX4",2193,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(Tex7,CG_TEX7,"TEX7",2196,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(Col1,CG_COL1,"COL1",2246,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(PSiz,CG_PSIZ,"PSIZ",2309,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(Clp2,CG_CLP2,"CLP2",2312,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(Clp5,CG_CLP5,"CLP5",2315,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(Position0,CG_POSITION0,"POSITION0",2437,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(Position3,CG_POSITION3,"POSITION3",2440,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(Position6,CG_POSITION6,"POSITION6",2443,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(Position9,CG_POSITION9,"POSITION9",2446,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(Position12,CG_POSITION12,"POSITION12",2449,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(Position15,CG_POSITION15,"POSITION15",2452,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(Tangent1,CG_TANGENT1,"TANGENT1",2566,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(Tangent4,CG_TANGENT4,"TANGENT4",2569,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(Tangent7,CG_TANGENT7,"TANGENT7",2572,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(Tangent10,CG_TANGENT10,"TANGENT10",2575,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(Tangent13,CG_TANGENT13,"TANGENT13",2578,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(Specular0,CG_SPECULAR0,"SPECULAR0",2629,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(BlendIndices2,CG_BLENDINDICES2,"BLENDINDICES2",2695,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(BlendIndices5,CG_BLENDINDICES5,"BLENDINDICES5",2698,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(BlendIndices8,CG_BLENDINDICES8,"BLENDINDICES8",2701,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(BlendIndices11,CG_BLENDINDICES11,"BLENDINDICES11",2704,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(BlendIndices14,CG_BLENDINDICES14,"BLENDINDICES14",2707,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(Color1,CG_COLOR1,"COLOR1",2758,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(Color4,CG_COLOR4,"COLOR4",2761,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(Color7,CG_COLOR7,"COLOR7",2764,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(Color10,CG_COLOR10,"COLOR10",2767,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(Color13,CG_COLOR13,"COLOR13",2770,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(PSize0,CG_PSIZE0,"PSIZE0",2821,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(PSize3,CG_PSIZE3,"PSIZE3",2824,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(PSize6,CG_PSIZE6,"PSIZE6",2827,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(PSize9,CG_PSIZE9,"PSIZE9",2830,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(PSize12,CG_PSIZE12,"PSIZE12",2833,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(PSize15,CG_PSIZE15,"PSIZE15",2836,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(BiNormal2,CG_BINORMAL2,"BINORMAL2",2887,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(BiNormal5,CG_BINORMAL5,"BINORMAL5",2890,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(BiNormal8,CG_BINORMAL8,"BINORMAL8",2893,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(BiNormal11,CG_BINORMAL11,"BINORMAL11",2896,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(BiNormal14,CG_BINORMAL14,"BINORMAL14",2899,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(FOG1,CG_FOG1,"FOG1",2918,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(FOG4,CG_FOG4,"FOG4",2921,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(FOG7,CG_FOG7,"FOG7",2924,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(FOG10,CG_FOG10,"FOG10",2927,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(FOG13,CG_FOG13,"FOG13",2930,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(DEPTH0,CG_DEPTH0,"DEPTH0",2933,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(DEPTH3,CG_DEPTH3,"DEPTH3",2936,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(DEPTH6,CG_DEPTH6,"DEPTH6",2939,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(DEPTH9,CG_DEPTH9,"DEPTH9",2942,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(DEPTH12,CG_DEPTH12,"DEPTH12",2945,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(DEPTH15,CG_DEPTH15,"DEPTH15",2948,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(SAMPLE2,CG_SAMPLE2,"SAMPLE2",2951,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(SAMPLE5,CG_SAMPLE5,"SAMPLE5",2954,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(SAMPLE8,CG_SAMPLE8,"SAMPLE8",2957,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(SAMPLE11,CG_SAMPLE11,"SAMPLE11",2960,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(SAMPLE14,CG_SAMPLE14,"SAMPLE14",2963,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(BlendWeight1,CG_BLENDWEIGHT1,"BLENDWEIGHT1",3029,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(BlendWeight4,CG_BLENDWEIGHT4,"BLENDWEIGHT4",3032,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(BlendWeight7,CG_BLENDWEIGHT7,"BLENDWEIGHT7",3035,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(BlendWeight10,CG_BLENDWEIGHT10,"BLENDWEIGHT10",3038,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(BlendWeight13,CG_BLENDWEIGHT13,"BLENDWEIGHT13",3041,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(Normal0,CG_NORMAL0,"NORMAL0",3092,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(Normal3,CG_NORMAL3,"NORMAL3",3095,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(Normal6,CG_NORMAL6,"NORMAL6",3098,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(Normal9,CG_NORMAL9,"NORMAL9",3101,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(Normal12,CG_NORMAL12,"NORMAL12",3104,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(Normal15,CG_NORMAL15,"NORMAL15",3107,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(TexCoord1,CG_TEXCOORD1,"TEXCOORD1",3221,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(TexCoord4,CG_TEXCOORD4,"TEXCOORD4",3224,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(TexCoord7,CG_TEXCOORD7,"TEXCOORD7",3227,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(TexCoord10,CG_TEXCOORD10,"TEXCOORD10",3230,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(TexCoord13,CG_TEXCOORD13,"TEXCOORD13",3233,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(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(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(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(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(Coverage, CG_COVERAGE, "COVERAGE", 3292, 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(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(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(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(LastColor1, CG_LASTCOL1, "LASTCOL1", 4401, 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(LastColor4, CG_LASTCOL4, "LASTCOL4", 4404, 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(LastColor7, CG_LASTCOL7, "LASTCOL7", 4407, 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(InstanceId,CG_INSTANCEID,"INSTANCEID",4412,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(Layer,CG_LAYER,"LAYER",4415,1,CG_VARYING_PARAM)
|
||||
CG_BINDLOCATION_MACRO(SampleMask,CG_SAMPLEMASK,"SAMPLEMASK",4416,0,CG_VARYING_PARAM)
|
||||
|
||||
#undef CG_BINDLOCATION_MACRO
|
||||
|
|
|
@ -1,191 +1,191 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic data types.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, nrows, ncols, pc_name)
|
||||
*
|
||||
* name : The name of the data type.
|
||||
* compiler_name : The name of the data type within the compiler syntax.
|
||||
* enum_name : The C enumerant.
|
||||
* base_name : The C enumerant of the base type.
|
||||
* nrows : Number of rows for matrix types. Should be 0 other-wise.
|
||||
* ncols : Number of columns for scalar, vector, and matrix types.
|
||||
* 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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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)
|
||||
#undef CG_DATATYPE_MACRO
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic data types.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_DATATYPE_MACRO(name, compiler_name, enum_name, base_name, nrows, ncols, pc_name)
|
||||
*
|
||||
* name : The name of the data type.
|
||||
* compiler_name : The name of the data type within the compiler syntax.
|
||||
* enum_name : The C enumerant.
|
||||
* base_name : The C enumerant of the base type.
|
||||
* nrows : Number of rows for matrix types. Should be 0 other-wise.
|
||||
* ncols : Number of columns for scalar, vector, and matrix types.
|
||||
* 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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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)
|
||||
#undef CG_DATATYPE_MACRO
|
||||
|
|
|
@ -1,112 +1,112 @@
|
|||
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic data types.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_ENUM_MACRO(enum_name, enum_val)
|
||||
*
|
||||
* enum_name : The C enumerant name.
|
||||
* enum_val : The enumerant value.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
CG_ENUM_MACRO(CG_UNKNOWN, 4096)
|
||||
CG_ENUM_MACRO(CG_IN, 4097)
|
||||
CG_ENUM_MACRO(CG_OUT, 4098)
|
||||
CG_ENUM_MACRO(CG_INOUT, 4099)
|
||||
CG_ENUM_MACRO(CG_MIXED, 4100)
|
||||
CG_ENUM_MACRO(CG_VARYING, 4101)
|
||||
CG_ENUM_MACRO(CG_UNIFORM, 4102)
|
||||
CG_ENUM_MACRO(CG_CONSTANT, 4103)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_SOURCE, 4104)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_ENTRY, 4105)
|
||||
CG_ENUM_MACRO(CG_COMPILED_PROGRAM, 4106)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_PROFILE, 4107)
|
||||
CG_ENUM_MACRO(CG_GLOBAL, 4108)
|
||||
CG_ENUM_MACRO(CG_PROGRAM, 4109)
|
||||
CG_ENUM_MACRO(CG_DEFAULT, 4110)
|
||||
CG_ENUM_MACRO(CG_ERROR, 4111)
|
||||
CG_ENUM_MACRO(CG_SOURCE, 4112)
|
||||
CG_ENUM_MACRO(CG_OBJECT, 4113)
|
||||
CG_ENUM_MACRO(CG_COMPILE_MANUAL, 4114)
|
||||
CG_ENUM_MACRO(CG_COMPILE_IMMEDIATE, 4115)
|
||||
CG_ENUM_MACRO(CG_COMPILE_LAZY, 4116)
|
||||
CG_ENUM_MACRO(CG_CURRENT, 4117)
|
||||
CG_ENUM_MACRO(CG_LITERAL, 4118)
|
||||
CG_ENUM_MACRO(CG_VERSION, 4119)
|
||||
CG_ENUM_MACRO(CG_ROW_MAJOR, 4120)
|
||||
CG_ENUM_MACRO(CG_COLUMN_MAJOR, 4121)
|
||||
CG_ENUM_MACRO(CG_FRAGMENT, 4122)
|
||||
CG_ENUM_MACRO(CG_VERTEX, 4123)
|
||||
CG_ENUM_MACRO(CG_POINT, 4124)
|
||||
CG_ENUM_MACRO(CG_LINE, 4125)
|
||||
CG_ENUM_MACRO(CG_LINE_ADJ, 4126)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE, 4127)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE_ADJ, 4128)
|
||||
CG_ENUM_MACRO(CG_POINT_OUT, 4129)
|
||||
CG_ENUM_MACRO(CG_LINE_OUT, 4130)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE_OUT, 4131)
|
||||
CG_ENUM_MACRO(CG_IMMEDIATE_PARAMETER_SETTING, 4132)
|
||||
CG_ENUM_MACRO(CG_DEFERRED_PARAMETER_SETTING, 4133)
|
||||
CG_ENUM_MACRO(CG_NO_LOCKS_POLICY, 4134)
|
||||
CG_ENUM_MACRO(CG_THREAD_SAFE_POLICY, 4135)
|
||||
CG_ENUM_MACRO(CG_FORCE_UPPER_CASE_POLICY, 4136)
|
||||
CG_ENUM_MACRO(CG_UNCHANGED_CASE_POLICY, 4137)
|
||||
#undef CG_ENUM_MACRO
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG basic data types.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_ENUM_MACRO(enum_name, enum_val)
|
||||
*
|
||||
* enum_name : The C enumerant name.
|
||||
* enum_val : The enumerant value.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
CG_ENUM_MACRO(CG_UNKNOWN, 4096)
|
||||
CG_ENUM_MACRO(CG_IN, 4097)
|
||||
CG_ENUM_MACRO(CG_OUT, 4098)
|
||||
CG_ENUM_MACRO(CG_INOUT, 4099)
|
||||
CG_ENUM_MACRO(CG_MIXED, 4100)
|
||||
CG_ENUM_MACRO(CG_VARYING, 4101)
|
||||
CG_ENUM_MACRO(CG_UNIFORM, 4102)
|
||||
CG_ENUM_MACRO(CG_CONSTANT, 4103)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_SOURCE, 4104)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_ENTRY, 4105)
|
||||
CG_ENUM_MACRO(CG_COMPILED_PROGRAM, 4106)
|
||||
CG_ENUM_MACRO(CG_PROGRAM_PROFILE, 4107)
|
||||
CG_ENUM_MACRO(CG_GLOBAL, 4108)
|
||||
CG_ENUM_MACRO(CG_PROGRAM, 4109)
|
||||
CG_ENUM_MACRO(CG_DEFAULT, 4110)
|
||||
CG_ENUM_MACRO(CG_ERROR, 4111)
|
||||
CG_ENUM_MACRO(CG_SOURCE, 4112)
|
||||
CG_ENUM_MACRO(CG_OBJECT, 4113)
|
||||
CG_ENUM_MACRO(CG_COMPILE_MANUAL, 4114)
|
||||
CG_ENUM_MACRO(CG_COMPILE_IMMEDIATE, 4115)
|
||||
CG_ENUM_MACRO(CG_COMPILE_LAZY, 4116)
|
||||
CG_ENUM_MACRO(CG_CURRENT, 4117)
|
||||
CG_ENUM_MACRO(CG_LITERAL, 4118)
|
||||
CG_ENUM_MACRO(CG_VERSION, 4119)
|
||||
CG_ENUM_MACRO(CG_ROW_MAJOR, 4120)
|
||||
CG_ENUM_MACRO(CG_COLUMN_MAJOR, 4121)
|
||||
CG_ENUM_MACRO(CG_FRAGMENT, 4122)
|
||||
CG_ENUM_MACRO(CG_VERTEX, 4123)
|
||||
CG_ENUM_MACRO(CG_POINT, 4124)
|
||||
CG_ENUM_MACRO(CG_LINE, 4125)
|
||||
CG_ENUM_MACRO(CG_LINE_ADJ, 4126)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE, 4127)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE_ADJ, 4128)
|
||||
CG_ENUM_MACRO(CG_POINT_OUT, 4129)
|
||||
CG_ENUM_MACRO(CG_LINE_OUT, 4130)
|
||||
CG_ENUM_MACRO(CG_TRIANGLE_OUT, 4131)
|
||||
CG_ENUM_MACRO(CG_IMMEDIATE_PARAMETER_SETTING, 4132)
|
||||
CG_ENUM_MACRO(CG_DEFERRED_PARAMETER_SETTING, 4133)
|
||||
CG_ENUM_MACRO(CG_NO_LOCKS_POLICY, 4134)
|
||||
CG_ENUM_MACRO(CG_THREAD_SAFE_POLICY, 4135)
|
||||
CG_ENUM_MACRO(CG_FORCE_UPPER_CASE_POLICY, 4136)
|
||||
CG_ENUM_MACRO(CG_UNCHANGED_CASE_POLICY, 4137)
|
||||
#undef CG_ENUM_MACRO
|
||||
|
||||
|
||||
|
|
|
@ -1,320 +1,320 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following macro invocations define error codes returned by various cg
|
||||
* API functions.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_ERROR_MACRO(code, enum_name, message)
|
||||
*
|
||||
* code : The integer error code associated with the error.
|
||||
* enum_name : The name of enumerant of the error code in the API.
|
||||
* message : A description string associated with the error.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_ERROR_MACRO(0,
|
||||
CG_NO_ERROR,
|
||||
"No error has occurred.")
|
||||
|
||||
CG_ERROR_MACRO(1,
|
||||
CG_COMPILER_ERROR,
|
||||
"The compile returned an error.")
|
||||
|
||||
CG_ERROR_MACRO(2,
|
||||
CG_INVALID_PARAMETER_ERROR,
|
||||
"The parameter used is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(3,
|
||||
CG_INVALID_PROFILE_ERROR,
|
||||
"The profile is not supported.")
|
||||
|
||||
CG_ERROR_MACRO(4,
|
||||
CG_PROGRAM_LOAD_ERROR,
|
||||
"The program could not load.")
|
||||
|
||||
CG_ERROR_MACRO(5,
|
||||
CG_PROGRAM_BIND_ERROR,
|
||||
"The program could not bind.")
|
||||
|
||||
CG_ERROR_MACRO(6,
|
||||
CG_PROGRAM_NOT_LOADED_ERROR,
|
||||
"The program must be loaded before this operation may be used.")
|
||||
|
||||
CG_ERROR_MACRO(7,
|
||||
CG_UNSUPPORTED_GL_EXTENSION_ERROR,
|
||||
"An unsupported GL extension was required to perform this operation.")
|
||||
|
||||
CG_ERROR_MACRO(8,
|
||||
CG_INVALID_VALUE_TYPE_ERROR,
|
||||
"An unknown value type was assigned to a parameter.")
|
||||
|
||||
CG_ERROR_MACRO(9,
|
||||
CG_NOT_MATRIX_PARAM_ERROR,
|
||||
"The parameter is not of matrix type.")
|
||||
|
||||
CG_ERROR_MACRO(10,
|
||||
CG_INVALID_ENUMERANT_ERROR,
|
||||
"The enumerant parameter has an invalid value.")
|
||||
|
||||
CG_ERROR_MACRO(11,
|
||||
CG_NOT_4x4_MATRIX_ERROR,
|
||||
"The parameter must be a 4x4 matrix type.")
|
||||
|
||||
CG_ERROR_MACRO(12,
|
||||
CG_FILE_READ_ERROR,
|
||||
"The file could not be read.")
|
||||
|
||||
CG_ERROR_MACRO(13,
|
||||
CG_FILE_WRITE_ERROR,
|
||||
"The file could not be written.")
|
||||
|
||||
CG_ERROR_MACRO(14,
|
||||
CG_NVPARSE_ERROR,
|
||||
"nvparse could not successfully parse the output from the Cg "
|
||||
"compiler backend.")
|
||||
|
||||
CG_ERROR_MACRO(15,
|
||||
CG_MEMORY_ALLOC_ERROR,
|
||||
"Memory allocation failed.")
|
||||
|
||||
CG_ERROR_MACRO(16,
|
||||
CG_INVALID_CONTEXT_HANDLE_ERROR,
|
||||
"Invalid context handle.")
|
||||
|
||||
CG_ERROR_MACRO(17,
|
||||
CG_INVALID_PROGRAM_HANDLE_ERROR,
|
||||
"Invalid program handle.")
|
||||
|
||||
CG_ERROR_MACRO(18,
|
||||
CG_INVALID_PARAM_HANDLE_ERROR,
|
||||
"Invalid parameter handle.")
|
||||
|
||||
CG_ERROR_MACRO(19,
|
||||
CG_UNKNOWN_PROFILE_ERROR,
|
||||
"The specified profile is unknown.")
|
||||
|
||||
CG_ERROR_MACRO(20,
|
||||
CG_VAR_ARG_ERROR,
|
||||
"The variable arguments were specified incorrectly.")
|
||||
|
||||
CG_ERROR_MACRO(21,
|
||||
CG_INVALID_DIMENSION_ERROR,
|
||||
"The dimension value is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(22,
|
||||
CG_ARRAY_PARAM_ERROR,
|
||||
"The parameter must be an array.")
|
||||
|
||||
CG_ERROR_MACRO(23,
|
||||
CG_OUT_OF_ARRAY_BOUNDS_ERROR,
|
||||
"Index into the array is out of bounds.")
|
||||
|
||||
CG_ERROR_MACRO(24,
|
||||
CG_CONFLICTING_TYPES_ERROR,
|
||||
"A type being added to the context conflicts with an "
|
||||
"existing type.")
|
||||
|
||||
CG_ERROR_MACRO(25,
|
||||
CG_CONFLICTING_PARAMETER_TYPES_ERROR,
|
||||
"The parameters being bound have conflicting types.")
|
||||
|
||||
CG_ERROR_MACRO(26,
|
||||
CG_PARAMETER_IS_NOT_SHARED_ERROR,
|
||||
"The parameter must be global.")
|
||||
|
||||
CG_ERROR_MACRO(27,
|
||||
CG_INVALID_PARAMETER_VARIABILITY_ERROR,
|
||||
"The parameter could not be changed to the given variability.")
|
||||
|
||||
CG_ERROR_MACRO(28,
|
||||
CG_CANNOT_DESTROY_PARAMETER_ERROR,
|
||||
"Cannot destroy the parameter. It is bound to other parameters "
|
||||
"or is not a root parameter.")
|
||||
|
||||
|
||||
CG_ERROR_MACRO(29,
|
||||
CG_NOT_ROOT_PARAMETER_ERROR,
|
||||
"The parameter is not a root parameter.")
|
||||
|
||||
CG_ERROR_MACRO(30,
|
||||
CG_PARAMETERS_DO_NOT_MATCH_ERROR,
|
||||
"The two parameters being bound do not match.")
|
||||
|
||||
CG_ERROR_MACRO(31,
|
||||
CG_IS_NOT_PROGRAM_PARAMETER_ERROR,
|
||||
"The parameter is not a program parameter.")
|
||||
|
||||
CG_ERROR_MACRO(32,
|
||||
CG_INVALID_PARAMETER_TYPE_ERROR,
|
||||
"The type of the parameter is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(33,
|
||||
CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR,
|
||||
"The parameter must be a resizable array.")
|
||||
|
||||
CG_ERROR_MACRO(34,
|
||||
CG_INVALID_SIZE_ERROR,
|
||||
"The size value is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(35,
|
||||
CG_BIND_CREATES_CYCLE_ERROR,
|
||||
"Cannot bind the given parameters. Binding will form a cycle.")
|
||||
|
||||
CG_ERROR_MACRO(36,
|
||||
CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR,
|
||||
"Cannot bind the given parameters. Array types do not match.")
|
||||
|
||||
CG_ERROR_MACRO(37,
|
||||
CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR,
|
||||
"Cannot bind the given parameters. "
|
||||
"Array dimensions do not match.")
|
||||
|
||||
CG_ERROR_MACRO(38,
|
||||
CG_ARRAY_HAS_WRONG_DIMENSION_ERROR,
|
||||
"The array has the wrong dimension.")
|
||||
|
||||
CG_ERROR_MACRO(39,
|
||||
CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR,
|
||||
"Connecting the parameters failed because The type of the "
|
||||
"source parameter is not defined within the given program "
|
||||
"or does not match the type with the same name in the program.")
|
||||
|
||||
CG_ERROR_MACRO(40,
|
||||
CG_INVALID_EFFECT_HANDLE_ERROR,
|
||||
"Invalid effect handle.")
|
||||
|
||||
CG_ERROR_MACRO(41,
|
||||
CG_INVALID_STATE_HANDLE_ERROR,
|
||||
"Invalid state handle.")
|
||||
|
||||
CG_ERROR_MACRO(42,
|
||||
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR,
|
||||
"Invalid stateassignment handle.")
|
||||
|
||||
CG_ERROR_MACRO(43,
|
||||
CG_INVALID_PASS_HANDLE_ERROR,
|
||||
"Invalid pass handle.")
|
||||
|
||||
CG_ERROR_MACRO(44,
|
||||
CG_INVALID_ANNOTATION_HANDLE_ERROR,
|
||||
"Invalid annotation handle.")
|
||||
|
||||
CG_ERROR_MACRO(45,
|
||||
CG_INVALID_TECHNIQUE_HANDLE_ERROR,
|
||||
"Invalid technique handle.")
|
||||
|
||||
// Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead.
|
||||
CG_ERROR_MACRO(46,
|
||||
CG_INVALID_PARAMETER_HANDLE_ERROR,
|
||||
"Invalid parameter handle.")
|
||||
|
||||
CG_ERROR_MACRO(47,
|
||||
CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR,
|
||||
"Operation is not valid for this type of stateassignment.")
|
||||
|
||||
CG_ERROR_MACRO(48,
|
||||
CG_INVALID_FUNCTION_HANDLE_ERROR,
|
||||
"Invalid function handle.")
|
||||
|
||||
CG_ERROR_MACRO(49,
|
||||
CG_INVALID_TECHNIQUE_ERROR,
|
||||
"Technique did not pass validation.")
|
||||
|
||||
CG_ERROR_MACRO(50,
|
||||
CG_INVALID_POINTER_ERROR,
|
||||
"The supplied pointer is NULL.")
|
||||
|
||||
CG_ERROR_MACRO(51,
|
||||
CG_NOT_ENOUGH_DATA_ERROR,
|
||||
"Not enough data was provided.")
|
||||
|
||||
CG_ERROR_MACRO(52,
|
||||
CG_NON_NUMERIC_PARAMETER_ERROR,
|
||||
"The parameter is not of a numeric type.")
|
||||
|
||||
CG_ERROR_MACRO(53,
|
||||
CG_ARRAY_SIZE_MISMATCH_ERROR,
|
||||
"The specified array sizes are not compatible with the given array.")
|
||||
|
||||
CG_ERROR_MACRO(54,
|
||||
CG_CANNOT_SET_NON_UNIFORM_PARAMETER_ERROR,
|
||||
"Cannot set the value of a non-uniform parameter.")
|
||||
|
||||
CG_ERROR_MACRO(55,
|
||||
CG_DUPLICATE_NAME_ERROR,
|
||||
"This name is already in use.")
|
||||
|
||||
CG_ERROR_MACRO(56,
|
||||
CG_INVALID_OBJ_HANDLE_ERROR,
|
||||
"Invalid object handle.")
|
||||
|
||||
CG_ERROR_MACRO(57,
|
||||
CG_INVALID_BUFFER_HANDLE_ERROR,
|
||||
"Invalid buffer handle.")
|
||||
|
||||
CG_ERROR_MACRO(58,
|
||||
CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR,
|
||||
"Buffer index is out of bounds.")
|
||||
|
||||
CG_ERROR_MACRO(59,
|
||||
CG_BUFFER_ALREADY_MAPPED_ERROR,
|
||||
"The buffer is already mapped.")
|
||||
|
||||
CG_ERROR_MACRO(60,
|
||||
CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR,
|
||||
"The buffer cannot be updated.")
|
||||
|
||||
#undef CG_ERROR_MACRO
|
||||
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following macro invocations define error codes returned by various cg
|
||||
* API functions.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_ERROR_MACRO(code, enum_name, message)
|
||||
*
|
||||
* code : The integer error code associated with the error.
|
||||
* enum_name : The name of enumerant of the error code in the API.
|
||||
* message : A description string associated with the error.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
CG_ERROR_MACRO(0,
|
||||
CG_NO_ERROR,
|
||||
"No error has occurred.")
|
||||
|
||||
CG_ERROR_MACRO(1,
|
||||
CG_COMPILER_ERROR,
|
||||
"The compile returned an error.")
|
||||
|
||||
CG_ERROR_MACRO(2,
|
||||
CG_INVALID_PARAMETER_ERROR,
|
||||
"The parameter used is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(3,
|
||||
CG_INVALID_PROFILE_ERROR,
|
||||
"The profile is not supported.")
|
||||
|
||||
CG_ERROR_MACRO(4,
|
||||
CG_PROGRAM_LOAD_ERROR,
|
||||
"The program could not load.")
|
||||
|
||||
CG_ERROR_MACRO(5,
|
||||
CG_PROGRAM_BIND_ERROR,
|
||||
"The program could not bind.")
|
||||
|
||||
CG_ERROR_MACRO(6,
|
||||
CG_PROGRAM_NOT_LOADED_ERROR,
|
||||
"The program must be loaded before this operation may be used.")
|
||||
|
||||
CG_ERROR_MACRO(7,
|
||||
CG_UNSUPPORTED_GL_EXTENSION_ERROR,
|
||||
"An unsupported GL extension was required to perform this operation.")
|
||||
|
||||
CG_ERROR_MACRO(8,
|
||||
CG_INVALID_VALUE_TYPE_ERROR,
|
||||
"An unknown value type was assigned to a parameter.")
|
||||
|
||||
CG_ERROR_MACRO(9,
|
||||
CG_NOT_MATRIX_PARAM_ERROR,
|
||||
"The parameter is not of matrix type.")
|
||||
|
||||
CG_ERROR_MACRO(10,
|
||||
CG_INVALID_ENUMERANT_ERROR,
|
||||
"The enumerant parameter has an invalid value.")
|
||||
|
||||
CG_ERROR_MACRO(11,
|
||||
CG_NOT_4x4_MATRIX_ERROR,
|
||||
"The parameter must be a 4x4 matrix type.")
|
||||
|
||||
CG_ERROR_MACRO(12,
|
||||
CG_FILE_READ_ERROR,
|
||||
"The file could not be read.")
|
||||
|
||||
CG_ERROR_MACRO(13,
|
||||
CG_FILE_WRITE_ERROR,
|
||||
"The file could not be written.")
|
||||
|
||||
CG_ERROR_MACRO(14,
|
||||
CG_NVPARSE_ERROR,
|
||||
"nvparse could not successfully parse the output from the Cg "
|
||||
"compiler backend.")
|
||||
|
||||
CG_ERROR_MACRO(15,
|
||||
CG_MEMORY_ALLOC_ERROR,
|
||||
"Memory allocation failed.")
|
||||
|
||||
CG_ERROR_MACRO(16,
|
||||
CG_INVALID_CONTEXT_HANDLE_ERROR,
|
||||
"Invalid context handle.")
|
||||
|
||||
CG_ERROR_MACRO(17,
|
||||
CG_INVALID_PROGRAM_HANDLE_ERROR,
|
||||
"Invalid program handle.")
|
||||
|
||||
CG_ERROR_MACRO(18,
|
||||
CG_INVALID_PARAM_HANDLE_ERROR,
|
||||
"Invalid parameter handle.")
|
||||
|
||||
CG_ERROR_MACRO(19,
|
||||
CG_UNKNOWN_PROFILE_ERROR,
|
||||
"The specified profile is unknown.")
|
||||
|
||||
CG_ERROR_MACRO(20,
|
||||
CG_VAR_ARG_ERROR,
|
||||
"The variable arguments were specified incorrectly.")
|
||||
|
||||
CG_ERROR_MACRO(21,
|
||||
CG_INVALID_DIMENSION_ERROR,
|
||||
"The dimension value is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(22,
|
||||
CG_ARRAY_PARAM_ERROR,
|
||||
"The parameter must be an array.")
|
||||
|
||||
CG_ERROR_MACRO(23,
|
||||
CG_OUT_OF_ARRAY_BOUNDS_ERROR,
|
||||
"Index into the array is out of bounds.")
|
||||
|
||||
CG_ERROR_MACRO(24,
|
||||
CG_CONFLICTING_TYPES_ERROR,
|
||||
"A type being added to the context conflicts with an "
|
||||
"existing type.")
|
||||
|
||||
CG_ERROR_MACRO(25,
|
||||
CG_CONFLICTING_PARAMETER_TYPES_ERROR,
|
||||
"The parameters being bound have conflicting types.")
|
||||
|
||||
CG_ERROR_MACRO(26,
|
||||
CG_PARAMETER_IS_NOT_SHARED_ERROR,
|
||||
"The parameter must be global.")
|
||||
|
||||
CG_ERROR_MACRO(27,
|
||||
CG_INVALID_PARAMETER_VARIABILITY_ERROR,
|
||||
"The parameter could not be changed to the given variability.")
|
||||
|
||||
CG_ERROR_MACRO(28,
|
||||
CG_CANNOT_DESTROY_PARAMETER_ERROR,
|
||||
"Cannot destroy the parameter. It is bound to other parameters "
|
||||
"or is not a root parameter.")
|
||||
|
||||
|
||||
CG_ERROR_MACRO(29,
|
||||
CG_NOT_ROOT_PARAMETER_ERROR,
|
||||
"The parameter is not a root parameter.")
|
||||
|
||||
CG_ERROR_MACRO(30,
|
||||
CG_PARAMETERS_DO_NOT_MATCH_ERROR,
|
||||
"The two parameters being bound do not match.")
|
||||
|
||||
CG_ERROR_MACRO(31,
|
||||
CG_IS_NOT_PROGRAM_PARAMETER_ERROR,
|
||||
"The parameter is not a program parameter.")
|
||||
|
||||
CG_ERROR_MACRO(32,
|
||||
CG_INVALID_PARAMETER_TYPE_ERROR,
|
||||
"The type of the parameter is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(33,
|
||||
CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR,
|
||||
"The parameter must be a resizable array.")
|
||||
|
||||
CG_ERROR_MACRO(34,
|
||||
CG_INVALID_SIZE_ERROR,
|
||||
"The size value is invalid.")
|
||||
|
||||
CG_ERROR_MACRO(35,
|
||||
CG_BIND_CREATES_CYCLE_ERROR,
|
||||
"Cannot bind the given parameters. Binding will form a cycle.")
|
||||
|
||||
CG_ERROR_MACRO(36,
|
||||
CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR,
|
||||
"Cannot bind the given parameters. Array types do not match.")
|
||||
|
||||
CG_ERROR_MACRO(37,
|
||||
CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR,
|
||||
"Cannot bind the given parameters. "
|
||||
"Array dimensions do not match.")
|
||||
|
||||
CG_ERROR_MACRO(38,
|
||||
CG_ARRAY_HAS_WRONG_DIMENSION_ERROR,
|
||||
"The array has the wrong dimension.")
|
||||
|
||||
CG_ERROR_MACRO(39,
|
||||
CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR,
|
||||
"Connecting the parameters failed because The type of the "
|
||||
"source parameter is not defined within the given program "
|
||||
"or does not match the type with the same name in the program.")
|
||||
|
||||
CG_ERROR_MACRO(40,
|
||||
CG_INVALID_EFFECT_HANDLE_ERROR,
|
||||
"Invalid effect handle.")
|
||||
|
||||
CG_ERROR_MACRO(41,
|
||||
CG_INVALID_STATE_HANDLE_ERROR,
|
||||
"Invalid state handle.")
|
||||
|
||||
CG_ERROR_MACRO(42,
|
||||
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR,
|
||||
"Invalid stateassignment handle.")
|
||||
|
||||
CG_ERROR_MACRO(43,
|
||||
CG_INVALID_PASS_HANDLE_ERROR,
|
||||
"Invalid pass handle.")
|
||||
|
||||
CG_ERROR_MACRO(44,
|
||||
CG_INVALID_ANNOTATION_HANDLE_ERROR,
|
||||
"Invalid annotation handle.")
|
||||
|
||||
CG_ERROR_MACRO(45,
|
||||
CG_INVALID_TECHNIQUE_HANDLE_ERROR,
|
||||
"Invalid technique handle.")
|
||||
|
||||
// Do not use this! Use CG_INVALID_PARAM_HANDLE_ERROR instead.
|
||||
CG_ERROR_MACRO(46,
|
||||
CG_INVALID_PARAMETER_HANDLE_ERROR,
|
||||
"Invalid parameter handle.")
|
||||
|
||||
CG_ERROR_MACRO(47,
|
||||
CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR,
|
||||
"Operation is not valid for this type of stateassignment.")
|
||||
|
||||
CG_ERROR_MACRO(48,
|
||||
CG_INVALID_FUNCTION_HANDLE_ERROR,
|
||||
"Invalid function handle.")
|
||||
|
||||
CG_ERROR_MACRO(49,
|
||||
CG_INVALID_TECHNIQUE_ERROR,
|
||||
"Technique did not pass validation.")
|
||||
|
||||
CG_ERROR_MACRO(50,
|
||||
CG_INVALID_POINTER_ERROR,
|
||||
"The supplied pointer is NULL.")
|
||||
|
||||
CG_ERROR_MACRO(51,
|
||||
CG_NOT_ENOUGH_DATA_ERROR,
|
||||
"Not enough data was provided.")
|
||||
|
||||
CG_ERROR_MACRO(52,
|
||||
CG_NON_NUMERIC_PARAMETER_ERROR,
|
||||
"The parameter is not of a numeric type.")
|
||||
|
||||
CG_ERROR_MACRO(53,
|
||||
CG_ARRAY_SIZE_MISMATCH_ERROR,
|
||||
"The specified array sizes are not compatible with the given array.")
|
||||
|
||||
CG_ERROR_MACRO(54,
|
||||
CG_CANNOT_SET_NON_UNIFORM_PARAMETER_ERROR,
|
||||
"Cannot set the value of a non-uniform parameter.")
|
||||
|
||||
CG_ERROR_MACRO(55,
|
||||
CG_DUPLICATE_NAME_ERROR,
|
||||
"This name is already in use.")
|
||||
|
||||
CG_ERROR_MACRO(56,
|
||||
CG_INVALID_OBJ_HANDLE_ERROR,
|
||||
"Invalid object handle.")
|
||||
|
||||
CG_ERROR_MACRO(57,
|
||||
CG_INVALID_BUFFER_HANDLE_ERROR,
|
||||
"Invalid buffer handle.")
|
||||
|
||||
CG_ERROR_MACRO(58,
|
||||
CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR,
|
||||
"Buffer index is out of bounds.")
|
||||
|
||||
CG_ERROR_MACRO(59,
|
||||
CG_BUFFER_ALREADY_MAPPED_ERROR,
|
||||
"The buffer is already mapped.")
|
||||
|
||||
CG_ERROR_MACRO(60,
|
||||
CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR,
|
||||
"The buffer cannot be updated.")
|
||||
|
||||
#undef CG_ERROR_MACRO
|
||||
|
||||
|
|
|
@ -1,95 +1,95 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG profiles.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_PROFILE_MACRO(name, compiler_id, compiler_opt)
|
||||
*
|
||||
* 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_caps : compiler_id in caps.
|
||||
* compiler_opt : The command-line switch used to force compilation into
|
||||
* the profile.
|
||||
* int_id : Integer enumerant associated with this bind location.
|
||||
* vertex_profile : Non-zero if this is a vertex profile, otherwise it
|
||||
* is considered to be a fragment profile.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#define CG_IN_PROFILES_INCLUDE
|
||||
|
||||
#include <Cg/cgGL_profiles.h>
|
||||
|
||||
|
||||
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(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(DX9Vertex30,vs_3_0,VS_3_0,"vs_3_0",6157,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(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(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(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(DX9PixelHLSL,hlslf,HLSLF,"hlslf",6166,0)
|
||||
|
||||
CG_PROFILE_MACRO(Generic, generic, GENERIC, "generic", 7002,0)
|
||||
|
||||
#undef CG_PROFILE_MACRO
|
||||
#undef CG_IN_PROFILES_INCLUDE
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002-2007, NVIDIA Corporation.
|
||||
*
|
||||
*
|
||||
*
|
||||
* NVIDIA Corporation("NVIDIA") supplies this software to you in consideration
|
||||
* of your agreement to the following terms, and your use, installation,
|
||||
* modification or redistribution of this NVIDIA software constitutes
|
||||
* acceptance of these terms. If you do not agree with these terms, please do
|
||||
* not use, install, modify or redistribute this NVIDIA software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and
|
||||
* subject to these terms, NVIDIA grants you a personal, non-exclusive license,
|
||||
* under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA
|
||||
* Software"), to use, reproduce, modify and redistribute the NVIDIA
|
||||
* Software, with or without modifications, in source and/or binary forms;
|
||||
* provided that if you redistribute the NVIDIA Software, you must retain the
|
||||
* copyright notice of NVIDIA, this notice and the following text and
|
||||
* disclaimers in all such redistributions of the NVIDIA Software. Neither the
|
||||
* name, trademarks, service marks nor logos of NVIDIA Corporation may be used
|
||||
* to endorse or promote products derived from the NVIDIA Software without
|
||||
* specific prior written permission from NVIDIA. Except as expressly stated
|
||||
* 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
|
||||
* infringed by your derivative works or by other works in which the NVIDIA
|
||||
* Software may be incorporated. No hardware is licensed hereunder.
|
||||
*
|
||||
*
|
||||
*
|
||||
* THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
|
||||
* WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION
|
||||
* EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
|
||||
*
|
||||
*
|
||||
*
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST
|
||||
* 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,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE,
|
||||
* HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING
|
||||
* NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following macro invocations define the supported CG profiles.
|
||||
*
|
||||
* The macros have the form :
|
||||
*
|
||||
* CG_PROFILE_MACRO(name, compiler_id, compiler_opt)
|
||||
*
|
||||
* 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_caps : compiler_id in caps.
|
||||
* compiler_opt : The command-line switch used to force compilation into
|
||||
* the profile.
|
||||
* int_id : Integer enumerant associated with this bind location.
|
||||
* vertex_profile : Non-zero if this is a vertex profile, otherwise it
|
||||
* is considered to be a fragment profile.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#define CG_IN_PROFILES_INCLUDE
|
||||
|
||||
#include <Cg/cgGL_profiles.h>
|
||||
|
||||
|
||||
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(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(DX9Vertex30,vs_3_0,VS_3_0,"vs_3_0",6157,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(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(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(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(DX9PixelHLSL,hlslf,HLSLF,"hlslf",6166,0)
|
||||
|
||||
CG_PROFILE_MACRO(Generic, generic, GENERIC, "generic", 7002,0)
|
||||
|
||||
#undef CG_PROFILE_MACRO
|
||||
#undef CG_IN_PROFILES_INCLUDE
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,210 +1,210 @@
|
|||
|
||||
C GLUT version of "GL/fgl.h"
|
||||
|
||||
C Modifications from SGI IRIX 5.3 version:
|
||||
C 1) F prefix removed from GLU constants.
|
||||
C 2) Fix GLU_TRUE and GLU_FALSE.
|
||||
|
||||
C *** Generic constants ***
|
||||
|
||||
C Errors: (return value 0 = no error)
|
||||
integer*4 GLU_INVALID_ENUM
|
||||
parameter ( GLU_INVALID_ENUM = 100900 )
|
||||
integer*4 GLU_INVALID_VALUE
|
||||
parameter ( GLU_INVALID_VALUE = 100901 )
|
||||
integer*4 GLU_OUT_OF_MEMORY
|
||||
parameter ( GLU_OUT_OF_MEMORY = 100902 )
|
||||
|
||||
C For laughs:
|
||||
integer*4 GLU_TRUE
|
||||
parameter ( GLU_TRUE = 1 )
|
||||
integer*4 GLU_FALSE
|
||||
parameter ( GLU_FALSE = 0 )
|
||||
|
||||
|
||||
C *** Quadric constants ***
|
||||
|
||||
C Types of normals:
|
||||
integer*4 GLU_SMOOTH
|
||||
parameter ( GLU_SMOOTH = 100000 )
|
||||
integer*4 GLU_FLAT
|
||||
parameter ( GLU_FLAT = 100001 )
|
||||
integer*4 GLU_NONE
|
||||
parameter ( GLU_NONE = 100002 )
|
||||
|
||||
C DrawStyle types:
|
||||
integer*4 GLU_POINT
|
||||
parameter ( GLU_POINT = 100010 )
|
||||
integer*4 GLU_LINE
|
||||
parameter ( GLU_LINE = 100011 )
|
||||
integer*4 GLU_FILL
|
||||
parameter ( GLU_FILL = 100012 )
|
||||
integer*4 GLU_SILHOUETTE
|
||||
parameter ( GLU_SILHOUETTE = 100013 )
|
||||
|
||||
C Orientation types:
|
||||
integer*4 GLU_OUTSIDE
|
||||
parameter ( GLU_OUTSIDE = 100020 )
|
||||
integer*4 GLU_INSIDE
|
||||
parameter ( GLU_INSIDE = 100021 )
|
||||
|
||||
C Callback types:
|
||||
C GLU_ERROR 100103
|
||||
|
||||
|
||||
C *** Tesselation constants ***
|
||||
|
||||
C Callback types:
|
||||
integer*4 GLU_BEGIN
|
||||
parameter ( GLU_BEGIN = 100100 )
|
||||
integer*4 GLU_VERTEX
|
||||
parameter ( GLU_VERTEX = 100101 )
|
||||
integer*4 GLU_END
|
||||
parameter ( GLU_END = 100102 )
|
||||
integer*4 GLU_ERROR
|
||||
parameter ( GLU_ERROR = 100103 )
|
||||
integer*4 GLU_EDGE_FLAG
|
||||
parameter ( GLU_EDGE_FLAG = 100104 )
|
||||
|
||||
C Contours types:
|
||||
integer*4 GLU_CW
|
||||
parameter ( GLU_CW = 100120 )
|
||||
integer*4 GLU_CCW
|
||||
parameter ( GLU_CCW = 100121 )
|
||||
integer*4 GLU_INTERIOR
|
||||
parameter ( GLU_INTERIOR = 100122 )
|
||||
integer*4 GLU_EXTERIOR
|
||||
parameter ( GLU_EXTERIOR = 100123 )
|
||||
integer*4 GLU_UNKNOWN
|
||||
parameter ( GLU_UNKNOWN = 100124 )
|
||||
|
||||
integer*4 GLU_TESS_ERROR1
|
||||
parameter ( GLU_TESS_ERROR1 = 100151 )
|
||||
integer*4 GLU_TESS_ERROR2
|
||||
parameter ( GLU_TESS_ERROR2 = 100152 )
|
||||
integer*4 GLU_TESS_ERROR3
|
||||
parameter ( GLU_TESS_ERROR3 = 100153 )
|
||||
integer*4 GLU_TESS_ERROR4
|
||||
parameter ( GLU_TESS_ERROR4 = 100154 )
|
||||
integer*4 GLU_TESS_ERROR5
|
||||
parameter ( GLU_TESS_ERROR5 = 100155 )
|
||||
integer*4 GLU_TESS_ERROR6
|
||||
parameter ( GLU_TESS_ERROR6 = 100156 )
|
||||
integer*4 GLU_TESS_ERROR7
|
||||
parameter ( GLU_TESS_ERROR7 = 100157 )
|
||||
integer*4 GLU_TESS_ERROR8
|
||||
parameter ( GLU_TESS_ERROR8 = 100158 )
|
||||
|
||||
|
||||
C *** NURBS constants ***
|
||||
|
||||
C Properties:
|
||||
integer*4 GLU_AUTO_LOAD_MATRIX
|
||||
parameter ( GLU_AUTO_LOAD_MATRIX = 100200 )
|
||||
integer*4 GLU_CULLING
|
||||
parameter ( GLU_CULLING = 100201 )
|
||||
integer*4 GLU_SAMPLING_TOLERANCE
|
||||
parameter ( GLU_SAMPLING_TOLERANCE = 100203 )
|
||||
integer*4 GLU_DISPLAY_MODE
|
||||
parameter ( GLU_DISPLAY_MODE = 100204 )
|
||||
|
||||
C Trimming curve types
|
||||
integer*4 GLU_MAP1_TRIM_2
|
||||
parameter ( GLU_MAP1_TRIM_2 = 100210 )
|
||||
integer*4 GLU_MAP1_TRIM_3
|
||||
parameter ( GLU_MAP1_TRIM_3 = 100211 )
|
||||
|
||||
C Display modes:
|
||||
C GLU_FILL 100012
|
||||
integer*4 GLU_OUTLINE_POLYGON
|
||||
parameter ( GLU_OUTLINE_POLYGON = 100240 )
|
||||
integer*4 GLU_OUTLINE_PATCH
|
||||
parameter ( GLU_OUTLINE_PATCH = 100241 )
|
||||
|
||||
C Callbacks:
|
||||
C GLU_ERROR 100103
|
||||
|
||||
C Errors:
|
||||
integer*4 GLU_NURBS_ERROR1
|
||||
parameter ( GLU_NURBS_ERROR1 = 100251 )
|
||||
integer*4 GLU_NURBS_ERROR2
|
||||
parameter ( GLU_NURBS_ERROR2 = 100252 )
|
||||
integer*4 GLU_NURBS_ERROR3
|
||||
parameter ( GLU_NURBS_ERROR3 = 100253 )
|
||||
integer*4 GLU_NURBS_ERROR4
|
||||
parameter ( GLU_NURBS_ERROR4 = 100254 )
|
||||
integer*4 GLU_NURBS_ERROR5
|
||||
parameter ( GLU_NURBS_ERROR5 = 100255 )
|
||||
integer*4 GLU_NURBS_ERROR6
|
||||
parameter ( GLU_NURBS_ERROR6 = 100256 )
|
||||
integer*4 GLU_NURBS_ERROR7
|
||||
parameter ( GLU_NURBS_ERROR7 = 100257 )
|
||||
integer*4 GLU_NURBS_ERROR8
|
||||
parameter ( GLU_NURBS_ERROR8 = 100258 )
|
||||
integer*4 GLU_NURBS_ERROR9
|
||||
parameter ( GLU_NURBS_ERROR9 = 100259 )
|
||||
integer*4 GLU_NURBS_ERROR10
|
||||
parameter ( GLU_NURBS_ERROR10 = 100260 )
|
||||
integer*4 GLU_NURBS_ERROR11
|
||||
parameter ( GLU_NURBS_ERROR11 = 100261 )
|
||||
integer*4 GLU_NURBS_ERROR12
|
||||
parameter ( GLU_NURBS_ERROR12 = 100262 )
|
||||
integer*4 GLU_NURBS_ERROR13
|
||||
parameter ( GLU_NURBS_ERROR13 = 100263 )
|
||||
integer*4 GLU_NURBS_ERROR14
|
||||
parameter ( GLU_NURBS_ERROR14 = 100264 )
|
||||
integer*4 GLU_NURBS_ERROR15
|
||||
parameter ( GLU_NURBS_ERROR15 = 100265 )
|
||||
integer*4 GLU_NURBS_ERROR16
|
||||
parameter ( GLU_NURBS_ERROR16 = 100266 )
|
||||
integer*4 GLU_NURBS_ERROR17
|
||||
parameter ( GLU_NURBS_ERROR17 = 100267 )
|
||||
integer*4 GLU_NURBS_ERROR18
|
||||
parameter ( GLU_NURBS_ERROR18 = 100268 )
|
||||
integer*4 GLU_NURBS_ERROR19
|
||||
parameter ( GLU_NURBS_ERROR19 = 100269 )
|
||||
integer*4 GLU_NURBS_ERROR20
|
||||
parameter ( GLU_NURBS_ERROR20 = 100270 )
|
||||
integer*4 GLU_NURBS_ERROR21
|
||||
parameter ( GLU_NURBS_ERROR21 = 100271 )
|
||||
integer*4 GLU_NURBS_ERROR22
|
||||
parameter ( GLU_NURBS_ERROR22 = 100272 )
|
||||
integer*4 GLU_NURBS_ERROR23
|
||||
parameter ( GLU_NURBS_ERROR23 = 100273 )
|
||||
integer*4 GLU_NURBS_ERROR24
|
||||
parameter ( GLU_NURBS_ERROR24 = 100274 )
|
||||
integer*4 GLU_NURBS_ERROR25
|
||||
parameter ( GLU_NURBS_ERROR25 = 100275 )
|
||||
integer*4 GLU_NURBS_ERROR26
|
||||
parameter ( GLU_NURBS_ERROR26 = 100276 )
|
||||
integer*4 GLU_NURBS_ERROR27
|
||||
parameter ( GLU_NURBS_ERROR27 = 100277 )
|
||||
integer*4 GLU_NURBS_ERROR28
|
||||
parameter ( GLU_NURBS_ERROR28 = 100278 )
|
||||
integer*4 GLU_NURBS_ERROR29
|
||||
parameter ( GLU_NURBS_ERROR29 = 100279 )
|
||||
integer*4 GLU_NURBS_ERROR30
|
||||
parameter ( GLU_NURBS_ERROR30 = 100280 )
|
||||
integer*4 GLU_NURBS_ERROR31
|
||||
parameter ( GLU_NURBS_ERROR31 = 100281 )
|
||||
integer*4 GLU_NURBS_ERROR32
|
||||
parameter ( GLU_NURBS_ERROR32 = 100282 )
|
||||
integer*4 GLU_NURBS_ERROR33
|
||||
parameter ( GLU_NURBS_ERROR33 = 100283 )
|
||||
integer*4 GLU_NURBS_ERROR34
|
||||
parameter ( GLU_NURBS_ERROR34 = 100284 )
|
||||
integer*4 GLU_NURBS_ERROR35
|
||||
parameter ( GLU_NURBS_ERROR35 = 100285 )
|
||||
integer*4 GLU_NURBS_ERROR36
|
||||
parameter ( GLU_NURBS_ERROR36 = 100286 )
|
||||
integer*4 GLU_NURBS_ERROR37
|
||||
parameter ( GLU_NURBS_ERROR37 = 100287 )
|
||||
|
||||
|
||||
character*128 fgluErrorString
|
||||
character*128 fgluGetString
|
||||
integer*4 fgluBuild1DMipmaps
|
||||
integer*4 fgluBuild2DMipmaps
|
||||
integer*4 fgluProject
|
||||
integer*4 fgluScaleImage
|
||||
integer*4 fgluUnProject
|
||||
|
||||
C GLUT version of "GL/fgl.h"
|
||||
|
||||
C Modifications from SGI IRIX 5.3 version:
|
||||
C 1) F prefix removed from GLU constants.
|
||||
C 2) Fix GLU_TRUE and GLU_FALSE.
|
||||
|
||||
C *** Generic constants ***
|
||||
|
||||
C Errors: (return value 0 = no error)
|
||||
integer*4 GLU_INVALID_ENUM
|
||||
parameter ( GLU_INVALID_ENUM = 100900 )
|
||||
integer*4 GLU_INVALID_VALUE
|
||||
parameter ( GLU_INVALID_VALUE = 100901 )
|
||||
integer*4 GLU_OUT_OF_MEMORY
|
||||
parameter ( GLU_OUT_OF_MEMORY = 100902 )
|
||||
|
||||
C For laughs:
|
||||
integer*4 GLU_TRUE
|
||||
parameter ( GLU_TRUE = 1 )
|
||||
integer*4 GLU_FALSE
|
||||
parameter ( GLU_FALSE = 0 )
|
||||
|
||||
|
||||
C *** Quadric constants ***
|
||||
|
||||
C Types of normals:
|
||||
integer*4 GLU_SMOOTH
|
||||
parameter ( GLU_SMOOTH = 100000 )
|
||||
integer*4 GLU_FLAT
|
||||
parameter ( GLU_FLAT = 100001 )
|
||||
integer*4 GLU_NONE
|
||||
parameter ( GLU_NONE = 100002 )
|
||||
|
||||
C DrawStyle types:
|
||||
integer*4 GLU_POINT
|
||||
parameter ( GLU_POINT = 100010 )
|
||||
integer*4 GLU_LINE
|
||||
parameter ( GLU_LINE = 100011 )
|
||||
integer*4 GLU_FILL
|
||||
parameter ( GLU_FILL = 100012 )
|
||||
integer*4 GLU_SILHOUETTE
|
||||
parameter ( GLU_SILHOUETTE = 100013 )
|
||||
|
||||
C Orientation types:
|
||||
integer*4 GLU_OUTSIDE
|
||||
parameter ( GLU_OUTSIDE = 100020 )
|
||||
integer*4 GLU_INSIDE
|
||||
parameter ( GLU_INSIDE = 100021 )
|
||||
|
||||
C Callback types:
|
||||
C GLU_ERROR 100103
|
||||
|
||||
|
||||
C *** Tesselation constants ***
|
||||
|
||||
C Callback types:
|
||||
integer*4 GLU_BEGIN
|
||||
parameter ( GLU_BEGIN = 100100 )
|
||||
integer*4 GLU_VERTEX
|
||||
parameter ( GLU_VERTEX = 100101 )
|
||||
integer*4 GLU_END
|
||||
parameter ( GLU_END = 100102 )
|
||||
integer*4 GLU_ERROR
|
||||
parameter ( GLU_ERROR = 100103 )
|
||||
integer*4 GLU_EDGE_FLAG
|
||||
parameter ( GLU_EDGE_FLAG = 100104 )
|
||||
|
||||
C Contours types:
|
||||
integer*4 GLU_CW
|
||||
parameter ( GLU_CW = 100120 )
|
||||
integer*4 GLU_CCW
|
||||
parameter ( GLU_CCW = 100121 )
|
||||
integer*4 GLU_INTERIOR
|
||||
parameter ( GLU_INTERIOR = 100122 )
|
||||
integer*4 GLU_EXTERIOR
|
||||
parameter ( GLU_EXTERIOR = 100123 )
|
||||
integer*4 GLU_UNKNOWN
|
||||
parameter ( GLU_UNKNOWN = 100124 )
|
||||
|
||||
integer*4 GLU_TESS_ERROR1
|
||||
parameter ( GLU_TESS_ERROR1 = 100151 )
|
||||
integer*4 GLU_TESS_ERROR2
|
||||
parameter ( GLU_TESS_ERROR2 = 100152 )
|
||||
integer*4 GLU_TESS_ERROR3
|
||||
parameter ( GLU_TESS_ERROR3 = 100153 )
|
||||
integer*4 GLU_TESS_ERROR4
|
||||
parameter ( GLU_TESS_ERROR4 = 100154 )
|
||||
integer*4 GLU_TESS_ERROR5
|
||||
parameter ( GLU_TESS_ERROR5 = 100155 )
|
||||
integer*4 GLU_TESS_ERROR6
|
||||
parameter ( GLU_TESS_ERROR6 = 100156 )
|
||||
integer*4 GLU_TESS_ERROR7
|
||||
parameter ( GLU_TESS_ERROR7 = 100157 )
|
||||
integer*4 GLU_TESS_ERROR8
|
||||
parameter ( GLU_TESS_ERROR8 = 100158 )
|
||||
|
||||
|
||||
C *** NURBS constants ***
|
||||
|
||||
C Properties:
|
||||
integer*4 GLU_AUTO_LOAD_MATRIX
|
||||
parameter ( GLU_AUTO_LOAD_MATRIX = 100200 )
|
||||
integer*4 GLU_CULLING
|
||||
parameter ( GLU_CULLING = 100201 )
|
||||
integer*4 GLU_SAMPLING_TOLERANCE
|
||||
parameter ( GLU_SAMPLING_TOLERANCE = 100203 )
|
||||
integer*4 GLU_DISPLAY_MODE
|
||||
parameter ( GLU_DISPLAY_MODE = 100204 )
|
||||
|
||||
C Trimming curve types
|
||||
integer*4 GLU_MAP1_TRIM_2
|
||||
parameter ( GLU_MAP1_TRIM_2 = 100210 )
|
||||
integer*4 GLU_MAP1_TRIM_3
|
||||
parameter ( GLU_MAP1_TRIM_3 = 100211 )
|
||||
|
||||
C Display modes:
|
||||
C GLU_FILL 100012
|
||||
integer*4 GLU_OUTLINE_POLYGON
|
||||
parameter ( GLU_OUTLINE_POLYGON = 100240 )
|
||||
integer*4 GLU_OUTLINE_PATCH
|
||||
parameter ( GLU_OUTLINE_PATCH = 100241 )
|
||||
|
||||
C Callbacks:
|
||||
C GLU_ERROR 100103
|
||||
|
||||
C Errors:
|
||||
integer*4 GLU_NURBS_ERROR1
|
||||
parameter ( GLU_NURBS_ERROR1 = 100251 )
|
||||
integer*4 GLU_NURBS_ERROR2
|
||||
parameter ( GLU_NURBS_ERROR2 = 100252 )
|
||||
integer*4 GLU_NURBS_ERROR3
|
||||
parameter ( GLU_NURBS_ERROR3 = 100253 )
|
||||
integer*4 GLU_NURBS_ERROR4
|
||||
parameter ( GLU_NURBS_ERROR4 = 100254 )
|
||||
integer*4 GLU_NURBS_ERROR5
|
||||
parameter ( GLU_NURBS_ERROR5 = 100255 )
|
||||
integer*4 GLU_NURBS_ERROR6
|
||||
parameter ( GLU_NURBS_ERROR6 = 100256 )
|
||||
integer*4 GLU_NURBS_ERROR7
|
||||
parameter ( GLU_NURBS_ERROR7 = 100257 )
|
||||
integer*4 GLU_NURBS_ERROR8
|
||||
parameter ( GLU_NURBS_ERROR8 = 100258 )
|
||||
integer*4 GLU_NURBS_ERROR9
|
||||
parameter ( GLU_NURBS_ERROR9 = 100259 )
|
||||
integer*4 GLU_NURBS_ERROR10
|
||||
parameter ( GLU_NURBS_ERROR10 = 100260 )
|
||||
integer*4 GLU_NURBS_ERROR11
|
||||
parameter ( GLU_NURBS_ERROR11 = 100261 )
|
||||
integer*4 GLU_NURBS_ERROR12
|
||||
parameter ( GLU_NURBS_ERROR12 = 100262 )
|
||||
integer*4 GLU_NURBS_ERROR13
|
||||
parameter ( GLU_NURBS_ERROR13 = 100263 )
|
||||
integer*4 GLU_NURBS_ERROR14
|
||||
parameter ( GLU_NURBS_ERROR14 = 100264 )
|
||||
integer*4 GLU_NURBS_ERROR15
|
||||
parameter ( GLU_NURBS_ERROR15 = 100265 )
|
||||
integer*4 GLU_NURBS_ERROR16
|
||||
parameter ( GLU_NURBS_ERROR16 = 100266 )
|
||||
integer*4 GLU_NURBS_ERROR17
|
||||
parameter ( GLU_NURBS_ERROR17 = 100267 )
|
||||
integer*4 GLU_NURBS_ERROR18
|
||||
parameter ( GLU_NURBS_ERROR18 = 100268 )
|
||||
integer*4 GLU_NURBS_ERROR19
|
||||
parameter ( GLU_NURBS_ERROR19 = 100269 )
|
||||
integer*4 GLU_NURBS_ERROR20
|
||||
parameter ( GLU_NURBS_ERROR20 = 100270 )
|
||||
integer*4 GLU_NURBS_ERROR21
|
||||
parameter ( GLU_NURBS_ERROR21 = 100271 )
|
||||
integer*4 GLU_NURBS_ERROR22
|
||||
parameter ( GLU_NURBS_ERROR22 = 100272 )
|
||||
integer*4 GLU_NURBS_ERROR23
|
||||
parameter ( GLU_NURBS_ERROR23 = 100273 )
|
||||
integer*4 GLU_NURBS_ERROR24
|
||||
parameter ( GLU_NURBS_ERROR24 = 100274 )
|
||||
integer*4 GLU_NURBS_ERROR25
|
||||
parameter ( GLU_NURBS_ERROR25 = 100275 )
|
||||
integer*4 GLU_NURBS_ERROR26
|
||||
parameter ( GLU_NURBS_ERROR26 = 100276 )
|
||||
integer*4 GLU_NURBS_ERROR27
|
||||
parameter ( GLU_NURBS_ERROR27 = 100277 )
|
||||
integer*4 GLU_NURBS_ERROR28
|
||||
parameter ( GLU_NURBS_ERROR28 = 100278 )
|
||||
integer*4 GLU_NURBS_ERROR29
|
||||
parameter ( GLU_NURBS_ERROR29 = 100279 )
|
||||
integer*4 GLU_NURBS_ERROR30
|
||||
parameter ( GLU_NURBS_ERROR30 = 100280 )
|
||||
integer*4 GLU_NURBS_ERROR31
|
||||
parameter ( GLU_NURBS_ERROR31 = 100281 )
|
||||
integer*4 GLU_NURBS_ERROR32
|
||||
parameter ( GLU_NURBS_ERROR32 = 100282 )
|
||||
integer*4 GLU_NURBS_ERROR33
|
||||
parameter ( GLU_NURBS_ERROR33 = 100283 )
|
||||
integer*4 GLU_NURBS_ERROR34
|
||||
parameter ( GLU_NURBS_ERROR34 = 100284 )
|
||||
integer*4 GLU_NURBS_ERROR35
|
||||
parameter ( GLU_NURBS_ERROR35 = 100285 )
|
||||
integer*4 GLU_NURBS_ERROR36
|
||||
parameter ( GLU_NURBS_ERROR36 = 100286 )
|
||||
integer*4 GLU_NURBS_ERROR37
|
||||
parameter ( GLU_NURBS_ERROR37 = 100287 )
|
||||
|
||||
|
||||
character*128 fgluErrorString
|
||||
character*128 fgluGetString
|
||||
integer*4 fgluBuild1DMipmaps
|
||||
integer*4 fgluBuild2DMipmaps
|
||||
integer*4 fgluProject
|
||||
integer*4 fgluScaleImage
|
||||
integer*4 fgluUnProject
|
||||
|
|
|
@ -1,321 +1,321 @@
|
|||
|
||||
C Copyright (c) Mark J. Kilgard, 1994.
|
||||
|
||||
C This program is freely distributable without licensing fees
|
||||
C and is provided without guarantee or warrantee expressed or
|
||||
C implied. This program is -not- in the public domain.
|
||||
|
||||
C GLUT Fortran header file
|
||||
|
||||
C display mode bit masks
|
||||
integer*4 GLUT_RGB
|
||||
parameter ( GLUT_RGB = 0 )
|
||||
integer*4 GLUT_RGBA
|
||||
parameter ( GLUT_RGBA = 0 )
|
||||
integer*4 GLUT_INDEX
|
||||
parameter ( GLUT_INDEX = 1 )
|
||||
integer*4 GLUT_SINGLE
|
||||
parameter ( GLUT_SINGLE = 0 )
|
||||
integer*4 GLUT_DOUBLE
|
||||
parameter ( GLUT_DOUBLE = 2 )
|
||||
integer*4 GLUT_ACCUM
|
||||
parameter ( GLUT_ACCUM = 4 )
|
||||
integer*4 GLUT_ALPHA
|
||||
parameter ( GLUT_ALPHA = 8 )
|
||||
integer*4 GLUT_DEPTH
|
||||
parameter ( GLUT_DEPTH = 16 )
|
||||
integer*4 GLUT_STENCIL
|
||||
parameter ( GLUT_STENCIL = 32 )
|
||||
integer*4 GLUT_MULTISAMPLE
|
||||
parameter ( GLUT_MULTISAMPLE = 128 )
|
||||
integer*4 GLUT_STEREO
|
||||
parameter ( GLUT_STEREO = 256 )
|
||||
|
||||
C mouse buttons
|
||||
integer*4 GLUT_LEFT_BUTTON
|
||||
parameter ( GLUT_LEFT_BUTTON = 0 )
|
||||
integer*4 GLUT_MIDDLE_BUTTON
|
||||
parameter ( GLUT_MIDDLE_BUTTON = 1 )
|
||||
integer*4 GLUT_RIGHT_BUTTON
|
||||
parameter ( GLUT_RIGHT_BUTTON = 2 )
|
||||
|
||||
C mouse button callback state
|
||||
integer*4 GLUT_DOWN
|
||||
parameter ( GLUT_DOWN = 0 )
|
||||
integer*4 GLUT_UP
|
||||
parameter ( GLUT_UP = 1 )
|
||||
|
||||
C special key callback values
|
||||
integer*4 GLUT_KEY_F1
|
||||
parameter ( GLUT_KEY_F1 = 1 )
|
||||
integer*4 GLUT_KEY_F2
|
||||
parameter ( GLUT_KEY_F2 = 2 )
|
||||
integer*4 GLUT_KEY_F3
|
||||
parameter ( GLUT_KEY_F3 = 3 )
|
||||
integer*4 GLUT_KEY_F4
|
||||
parameter ( GLUT_KEY_F4 = 4 )
|
||||
integer*4 GLUT_KEY_F5
|
||||
parameter ( GLUT_KEY_F5 = 5 )
|
||||
integer*4 GLUT_KEY_F6
|
||||
parameter ( GLUT_KEY_F6 = 6 )
|
||||
integer*4 GLUT_KEY_F7
|
||||
parameter ( GLUT_KEY_F7 = 7 )
|
||||
integer*4 GLUT_KEY_F8
|
||||
parameter ( GLUT_KEY_F8 = 8 )
|
||||
integer*4 GLUT_KEY_F9
|
||||
parameter ( GLUT_KEY_F9 = 9 )
|
||||
integer*4 GLUT_KEY_F10
|
||||
parameter ( GLUT_KEY_F10 = 10 )
|
||||
integer*4 GLUT_KEY_F11
|
||||
parameter ( GLUT_KEY_F11 = 11 )
|
||||
integer*4 GLUT_KEY_F12
|
||||
parameter ( GLUT_KEY_F12 = 12 )
|
||||
integer*4 GLUT_KEY_LEFT
|
||||
parameter ( GLUT_KEY_LEFT = 100 )
|
||||
integer*4 GLUT_KEY_UP
|
||||
parameter ( GLUT_KEY_UP = 101 )
|
||||
integer*4 GLUT_KEY_RIGHT
|
||||
parameter ( GLUT_KEY_RIGHT = 102 )
|
||||
integer*4 GLUT_KEY_DOWN
|
||||
parameter ( GLUT_KEY_DOWN = 103 )
|
||||
integer*4 GLUT_KEY_PAGE_UP
|
||||
parameter ( GLUT_KEY_PAGE_UP = 104 )
|
||||
integer*4 GLUT_KEY_PAGE_DOWN
|
||||
parameter ( GLUT_KEY_PAGE_DOWN = 105 )
|
||||
integer*4 GLUT_KEY_HOME
|
||||
parameter ( GLUT_KEY_HOME = 106 )
|
||||
integer*4 GLUT_KEY_END
|
||||
parameter ( GLUT_KEY_END = 107 )
|
||||
integer*4 GLUT_KEY_INSERT
|
||||
parameter ( GLUT_KEY_INSERT = 108 )
|
||||
|
||||
C entry/exit callback state
|
||||
integer*4 GLUT_LEFT
|
||||
parameter ( GLUT_LEFT = 0 )
|
||||
integer*4 GLUT_ENTERED
|
||||
parameter ( GLUT_ENTERED = 1 )
|
||||
|
||||
C menu usage callback state
|
||||
integer*4 GLUT_MENU_NOT_IN_USE
|
||||
parameter ( GLUT_MENU_NOT_IN_USE = 0 )
|
||||
integer*4 GLUT_MENU_IN_USE
|
||||
parameter ( GLUT_MENU_IN_USE = 1 )
|
||||
|
||||
C visibility callback state
|
||||
integer*4 GLUT_NOT_VISIBLE
|
||||
parameter ( GLUT_NOT_VISIBLE = 0 )
|
||||
integer*4 GLUT_VISIBLE
|
||||
parameter ( GLUT_VISIBLE = 1 )
|
||||
|
||||
C color index component selection values
|
||||
integer*4 GLUT_RED
|
||||
parameter ( GLUT_RED = 0 )
|
||||
integer*4 GLUT_GREEN
|
||||
parameter ( GLUT_GREEN = 1 )
|
||||
integer*4 GLUT_BLUE
|
||||
parameter ( GLUT_BLUE = 2 )
|
||||
|
||||
C XXX Unfortunately, SGI's Fortran compiler links with
|
||||
C EXTERNAL data even if it is not used. This defeats
|
||||
C the purpose of GLUT naming fonts via opaque symbols.
|
||||
C This means GLUT Fortran programmers should explicitly
|
||||
C declared EXTERNAL GLUT fonts in subroutines where
|
||||
C the fonts are used.
|
||||
|
||||
C stroke font opaque names
|
||||
C external GLUT_STROKE_ROMAN
|
||||
C external GLUT_STROKE_MONO_ROMAN
|
||||
|
||||
C bitmap font opaque names
|
||||
C external GLUT_BITMAP_9_BY_15
|
||||
C external GLUT_BITMAP_8_BY_13
|
||||
C external GLUT_BITMAP_TIMES_ROMAN_10
|
||||
C external GLUT_BITMAP_TIMES_ROMAN_24
|
||||
C external GLUT_BITMAP_HELVETICA_10
|
||||
C external GLUT_BITMAP_HELVETICA_12
|
||||
C external GLUT_BITMAP_HELVETICA_18
|
||||
|
||||
C glutGet parameters
|
||||
integer*4 GLUT_WINDOW_X
|
||||
parameter ( GLUT_WINDOW_X = 100 )
|
||||
integer*4 GLUT_WINDOW_Y
|
||||
parameter ( GLUT_WINDOW_Y = 101 )
|
||||
integer*4 GLUT_WINDOW_WIDTH
|
||||
parameter ( GLUT_WINDOW_WIDTH = 102 )
|
||||
integer*4 GLUT_WINDOW_HEIGHT
|
||||
parameter ( GLUT_WINDOW_HEIGHT = 103 )
|
||||
integer*4 GLUT_WINDOW_BUFFER_SIZE
|
||||
parameter ( GLUT_WINDOW_BUFFER_SIZE = 104 )
|
||||
integer*4 GLUT_WINDOW_STENCIL_SIZE
|
||||
parameter ( GLUT_WINDOW_STENCIL_SIZE = 105 )
|
||||
integer*4 GLUT_WINDOW_DEPTH_SIZE
|
||||
parameter ( GLUT_WINDOW_DEPTH_SIZE = 106 )
|
||||
integer*4 GLUT_WINDOW_RED_SIZE
|
||||
parameter ( GLUT_WINDOW_RED_SIZE = 107 )
|
||||
integer*4 GLUT_WINDOW_GREEN_SIZE
|
||||
parameter ( GLUT_WINDOW_GREEN_SIZE = 108 )
|
||||
integer*4 GLUT_WINDOW_BLUE_SIZE
|
||||
parameter ( GLUT_WINDOW_BLUE_SIZE = 109 )
|
||||
integer*4 GLUT_WINDOW_ALPHA_SIZE
|
||||
parameter ( GLUT_WINDOW_ALPHA_SIZE = 110 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_RED_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_RED_SIZE = 111 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_GREEN_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_GREEN_SIZE = 112 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_BLUE_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_BLUE_SIZE = 113 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_ALPHA_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_ALPHA_SIZE = 114 )
|
||||
integer*4 GLUT_WINDOW_DOUBLEBUFFER
|
||||
parameter ( GLUT_WINDOW_DOUBLEBUFFER = 115 )
|
||||
integer*4 GLUT_WINDOW_RGBA
|
||||
parameter ( GLUT_WINDOW_RGBA = 116 )
|
||||
integer*4 GLUT_WINDOW_PARENT
|
||||
parameter ( GLUT_WINDOW_PARENT = 117 )
|
||||
integer*4 GLUT_WINDOW_NUM_CHILDREN
|
||||
parameter ( GLUT_WINDOW_NUM_CHILDREN = 118 )
|
||||
integer*4 GLUT_WINDOW_COLORMAP_SIZE
|
||||
parameter ( GLUT_WINDOW_COLORMAP_SIZE = 119 )
|
||||
integer*4 GLUT_WINDOW_NUM_SAMPLES
|
||||
parameter ( GLUT_WINDOW_NUM_SAMPLES = 120 )
|
||||
integer*4 GLUT_WINDOW_STEREO
|
||||
parameter ( GLUT_WINDOW_STEREO = 121 )
|
||||
integer*4 GLUT_WINDOW_CURSOR
|
||||
parameter ( GLUT_WINDOW_CURSOR = 122 )
|
||||
integer*4 GLUT_SCREEN_WIDTH
|
||||
parameter ( GLUT_SCREEN_WIDTH = 200 )
|
||||
integer*4 GLUT_SCREEN_HEIGHT
|
||||
parameter ( GLUT_SCREEN_HEIGHT = 201 )
|
||||
integer*4 GLUT_SCREEN_WIDTH_MM
|
||||
parameter ( GLUT_SCREEN_WIDTH_MM = 202 )
|
||||
integer*4 GLUT_SCREEN_HEIGHT_MM
|
||||
parameter ( GLUT_SCREEN_HEIGHT_MM = 203 )
|
||||
integer*4 GLUT_MENU_NUM_ITEMS
|
||||
parameter ( GLUT_MENU_NUM_ITEMS = 300 )
|
||||
integer*4 GLUT_DISPLAY_MODE_POSSIBLE
|
||||
parameter ( GLUT_DISPLAY_MODE_POSSIBLE = 400 )
|
||||
integer*4 GLUT_INIT_WINDOW_X
|
||||
parameter ( GLUT_INIT_WINDOW_X = 500 )
|
||||
integer*4 GLUT_INIT_WINDOW_Y
|
||||
parameter ( GLUT_INIT_WINDOW_Y = 501 )
|
||||
integer*4 GLUT_INIT_WINDOW_WIDTH
|
||||
parameter ( GLUT_INIT_WINDOW_WIDTH = 502 )
|
||||
integer*4 GLUT_INIT_WINDOW_HEIGHT
|
||||
parameter ( GLUT_INIT_WINDOW_HEIGHT = 503 )
|
||||
integer*4 GLUT_INIT_DISPLAY_MODE
|
||||
parameter ( GLUT_INIT_DISPLAY_MODE = 504 )
|
||||
integer*4 GLUT_ELAPSED_TIME
|
||||
parameter ( GLUT_ELAPSED_TIME = 700 )
|
||||
|
||||
C glutDeviceGet parameters
|
||||
integer*4 GLUT_HAS_KEYBOARD
|
||||
parameter ( GLUT_HAS_KEYBOARD = 600 )
|
||||
integer*4 GLUT_HAS_MOUSE
|
||||
parameter ( GLUT_HAS_MOUSE = 601 )
|
||||
integer*4 GLUT_HAS_SPACEBALL
|
||||
parameter ( GLUT_HAS_SPACEBALL = 602 )
|
||||
integer*4 GLUT_HAS_DIAL_AND_BUTTON_BOX
|
||||
parameter ( GLUT_HAS_DIAL_AND_BUTTON_BOX = 603 )
|
||||
integer*4 GLUT_HAS_TABLET
|
||||
parameter ( GLUT_HAS_TABLET = 604 )
|
||||
integer*4 GLUT_NUM_MOUSE_BUTTONS
|
||||
parameter ( GLUT_NUM_MOUSE_BUTTONS = 605 )
|
||||
integer*4 GLUT_NUM_SPACEBALL_BUTTONS
|
||||
parameter ( GLUT_NUM_SPACEBALL_BUTTONS = 606 )
|
||||
integer*4 GLUT_NUM_BUTTON_BOX_BUTTONS
|
||||
parameter ( GLUT_NUM_BUTTON_BOX_BUTTONS = 607 )
|
||||
integer*4 GLUT_NUM_DIALS
|
||||
parameter ( GLUT_NUM_DIALS = 608 )
|
||||
integer*4 GLUT_NUM_TABLET_BUTTONS
|
||||
parameter ( GLUT_NUM_TABLET_BUTTONS = 609 )
|
||||
|
||||
C glutLayerGet parameters
|
||||
integer*4 GLUT_OVERLAY_POSSIBLE
|
||||
parameter ( GLUT_OVERLAY_POSSIBLE = 800 )
|
||||
integer*4 GLUT_LAYER_IN_USE
|
||||
parameter ( GLUT_LAYER_IN_USE = 801 )
|
||||
integer*4 GLUT_HAS_OVERLAY
|
||||
parameter ( GLUT_HAS_OVERLAY = 802 )
|
||||
integer*4 GLUT_TRANSPARENT_INDEX
|
||||
parameter ( GLUT_TRANSPARENT_INDEX = 803 )
|
||||
integer*4 GLUT_NORMAL_DAMAGED
|
||||
parameter ( GLUT_NORMAL_DAMAGED = 804 )
|
||||
integer*4 GLUT_OVERLAY_DAMAGED
|
||||
parameter ( GLUT_OVERLAY_DAMAGED = 805 )
|
||||
|
||||
C glutUseLayer parameters
|
||||
integer*4 GLUT_NORMAL
|
||||
parameter ( GLUT_NORMAL = 0 )
|
||||
integer*4 GLUT_OVERLAY
|
||||
parameter ( GLUT_OVERLAY = 1 )
|
||||
|
||||
C glutGetModifiers return mask
|
||||
integer*4 GLUT_ACTIVE_SHIFT
|
||||
parameter ( GLUT_ACTIVE_SHIFT = 1 )
|
||||
integer*4 GLUT_ACTIVE_CTRL
|
||||
parameter ( GLUT_ACTIVE_CTRL = 2 )
|
||||
integer*4 GLUT_ACTIVE_ALT
|
||||
parameter ( GLUT_ACTIVE_ALT = 4 )
|
||||
|
||||
C glutSetCursor parameters
|
||||
integer*4 GLUT_CURSOR_RIGHT_ARROW
|
||||
parameter ( GLUT_CURSOR_RIGHT_ARROW = 0 )
|
||||
integer*4 GLUT_CURSOR_LEFT_ARROW
|
||||
parameter ( GLUT_CURSOR_LEFT_ARROW = 1 )
|
||||
integer*4 GLUT_CURSOR_INFO
|
||||
parameter ( GLUT_CURSOR_INFO = 2 )
|
||||
integer*4 GLUT_CURSOR_DESTROY
|
||||
parameter ( GLUT_CURSOR_DESTROY = 3 )
|
||||
integer*4 GLUT_CURSOR_HELP
|
||||
parameter ( GLUT_CURSOR_HELP = 4 )
|
||||
integer*4 GLUT_CURSOR_CYCLE
|
||||
parameter ( GLUT_CURSOR_CYCLE = 5 )
|
||||
integer*4 GLUT_CURSOR_SPRAY
|
||||
parameter ( GLUT_CURSOR_SPRAY = 6 )
|
||||
integer*4 GLUT_CURSOR_WAIT
|
||||
parameter ( GLUT_CURSOR_WAIT = 7 )
|
||||
integer*4 GLUT_CURSOR_TEXT
|
||||
parameter ( GLUT_CURSOR_TEXT = 8 )
|
||||
integer*4 GLUT_CURSOR_CROSSHAIR
|
||||
parameter ( GLUT_CURSOR_CROSSHAIR = 9 )
|
||||
integer*4 GLUT_CURSOR_UP_DOWN
|
||||
parameter ( GLUT_CURSOR_UP_DOWN = 10 )
|
||||
integer*4 GLUT_CURSOR_LEFT_RIGHT
|
||||
parameter ( GLUT_CURSOR_LEFT_RIGHT = 11 )
|
||||
integer*4 GLUT_CURSOR_TOP_SIDE
|
||||
parameter ( GLUT_CURSOR_TOP_SIDE = 12 )
|
||||
integer*4 GLUT_CURSOR_BOTTOM_SIDE
|
||||
parameter ( GLUT_CURSOR_BOTTOM_SIDE = 13 )
|
||||
integer*4 GLUT_CURSOR_LEFT_SIDE
|
||||
parameter ( GLUT_CURSOR_LEFT_SIDE = 14 )
|
||||
integer*4 GLUT_CURSOR_RIGHT_SIDE
|
||||
parameter ( GLUT_CURSOR_RIGHT_SIDE = 15 )
|
||||
integer*4 GLUT_CURSOR_TOP_LEFT_CORNER
|
||||
parameter ( GLUT_CURSOR_TOP_LEFT_CORNER = 16 )
|
||||
integer*4 GLUT_CURSOR_TOP_RIGHT_CORNER
|
||||
parameter ( GLUT_CURSOR_TOP_RIGHT_CORNER = 17 )
|
||||
integer*4 GLUT_CURSOR_BOTTOM_RIGHT_CORNER
|
||||
parameter ( GLUT_CURSOR_BOTTOM_RIGHT_CORNER = 18 )
|
||||
integer*4 GLUT_CURSOR_BOTTOM_LEFT_CORNER
|
||||
parameter ( GLUT_CURSOR_BOTTOM_LEFT_CORNER = 19 )
|
||||
integer*4 GLUT_CURSOR_INHERIT
|
||||
parameter ( GLUT_CURSOR_INHERIT = 100 )
|
||||
integer*4 GLUT_CURSOR_NONE
|
||||
parameter ( GLUT_CURSOR_NONE = 101 )
|
||||
integer*4 GLUT_CURSOR_FULL_CROSSHAIR
|
||||
parameter ( GLUT_CURSOR_FULL_CROSSHAIR = 102 )
|
||||
|
||||
C GLUT functions
|
||||
integer*4 glutcreatewindow
|
||||
integer*4 glutcreatesubwindow
|
||||
integer*4 glutgetwindow
|
||||
integer*4 glutcreatemenu
|
||||
integer*4 glutgetmenu
|
||||
real glutgetcolor
|
||||
integer*4 glutget
|
||||
integer*4 glutdeviceget
|
||||
integer*4 glutextensionsupported
|
||||
|
||||
C GLUT NULL name
|
||||
external glutnull
|
||||
|
||||
|
||||
C Copyright (c) Mark J. Kilgard, 1994.
|
||||
|
||||
C This program is freely distributable without licensing fees
|
||||
C and is provided without guarantee or warrantee expressed or
|
||||
C implied. This program is -not- in the public domain.
|
||||
|
||||
C GLUT Fortran header file
|
||||
|
||||
C display mode bit masks
|
||||
integer*4 GLUT_RGB
|
||||
parameter ( GLUT_RGB = 0 )
|
||||
integer*4 GLUT_RGBA
|
||||
parameter ( GLUT_RGBA = 0 )
|
||||
integer*4 GLUT_INDEX
|
||||
parameter ( GLUT_INDEX = 1 )
|
||||
integer*4 GLUT_SINGLE
|
||||
parameter ( GLUT_SINGLE = 0 )
|
||||
integer*4 GLUT_DOUBLE
|
||||
parameter ( GLUT_DOUBLE = 2 )
|
||||
integer*4 GLUT_ACCUM
|
||||
parameter ( GLUT_ACCUM = 4 )
|
||||
integer*4 GLUT_ALPHA
|
||||
parameter ( GLUT_ALPHA = 8 )
|
||||
integer*4 GLUT_DEPTH
|
||||
parameter ( GLUT_DEPTH = 16 )
|
||||
integer*4 GLUT_STENCIL
|
||||
parameter ( GLUT_STENCIL = 32 )
|
||||
integer*4 GLUT_MULTISAMPLE
|
||||
parameter ( GLUT_MULTISAMPLE = 128 )
|
||||
integer*4 GLUT_STEREO
|
||||
parameter ( GLUT_STEREO = 256 )
|
||||
|
||||
C mouse buttons
|
||||
integer*4 GLUT_LEFT_BUTTON
|
||||
parameter ( GLUT_LEFT_BUTTON = 0 )
|
||||
integer*4 GLUT_MIDDLE_BUTTON
|
||||
parameter ( GLUT_MIDDLE_BUTTON = 1 )
|
||||
integer*4 GLUT_RIGHT_BUTTON
|
||||
parameter ( GLUT_RIGHT_BUTTON = 2 )
|
||||
|
||||
C mouse button callback state
|
||||
integer*4 GLUT_DOWN
|
||||
parameter ( GLUT_DOWN = 0 )
|
||||
integer*4 GLUT_UP
|
||||
parameter ( GLUT_UP = 1 )
|
||||
|
||||
C special key callback values
|
||||
integer*4 GLUT_KEY_F1
|
||||
parameter ( GLUT_KEY_F1 = 1 )
|
||||
integer*4 GLUT_KEY_F2
|
||||
parameter ( GLUT_KEY_F2 = 2 )
|
||||
integer*4 GLUT_KEY_F3
|
||||
parameter ( GLUT_KEY_F3 = 3 )
|
||||
integer*4 GLUT_KEY_F4
|
||||
parameter ( GLUT_KEY_F4 = 4 )
|
||||
integer*4 GLUT_KEY_F5
|
||||
parameter ( GLUT_KEY_F5 = 5 )
|
||||
integer*4 GLUT_KEY_F6
|
||||
parameter ( GLUT_KEY_F6 = 6 )
|
||||
integer*4 GLUT_KEY_F7
|
||||
parameter ( GLUT_KEY_F7 = 7 )
|
||||
integer*4 GLUT_KEY_F8
|
||||
parameter ( GLUT_KEY_F8 = 8 )
|
||||
integer*4 GLUT_KEY_F9
|
||||
parameter ( GLUT_KEY_F9 = 9 )
|
||||
integer*4 GLUT_KEY_F10
|
||||
parameter ( GLUT_KEY_F10 = 10 )
|
||||
integer*4 GLUT_KEY_F11
|
||||
parameter ( GLUT_KEY_F11 = 11 )
|
||||
integer*4 GLUT_KEY_F12
|
||||
parameter ( GLUT_KEY_F12 = 12 )
|
||||
integer*4 GLUT_KEY_LEFT
|
||||
parameter ( GLUT_KEY_LEFT = 100 )
|
||||
integer*4 GLUT_KEY_UP
|
||||
parameter ( GLUT_KEY_UP = 101 )
|
||||
integer*4 GLUT_KEY_RIGHT
|
||||
parameter ( GLUT_KEY_RIGHT = 102 )
|
||||
integer*4 GLUT_KEY_DOWN
|
||||
parameter ( GLUT_KEY_DOWN = 103 )
|
||||
integer*4 GLUT_KEY_PAGE_UP
|
||||
parameter ( GLUT_KEY_PAGE_UP = 104 )
|
||||
integer*4 GLUT_KEY_PAGE_DOWN
|
||||
parameter ( GLUT_KEY_PAGE_DOWN = 105 )
|
||||
integer*4 GLUT_KEY_HOME
|
||||
parameter ( GLUT_KEY_HOME = 106 )
|
||||
integer*4 GLUT_KEY_END
|
||||
parameter ( GLUT_KEY_END = 107 )
|
||||
integer*4 GLUT_KEY_INSERT
|
||||
parameter ( GLUT_KEY_INSERT = 108 )
|
||||
|
||||
C entry/exit callback state
|
||||
integer*4 GLUT_LEFT
|
||||
parameter ( GLUT_LEFT = 0 )
|
||||
integer*4 GLUT_ENTERED
|
||||
parameter ( GLUT_ENTERED = 1 )
|
||||
|
||||
C menu usage callback state
|
||||
integer*4 GLUT_MENU_NOT_IN_USE
|
||||
parameter ( GLUT_MENU_NOT_IN_USE = 0 )
|
||||
integer*4 GLUT_MENU_IN_USE
|
||||
parameter ( GLUT_MENU_IN_USE = 1 )
|
||||
|
||||
C visibility callback state
|
||||
integer*4 GLUT_NOT_VISIBLE
|
||||
parameter ( GLUT_NOT_VISIBLE = 0 )
|
||||
integer*4 GLUT_VISIBLE
|
||||
parameter ( GLUT_VISIBLE = 1 )
|
||||
|
||||
C color index component selection values
|
||||
integer*4 GLUT_RED
|
||||
parameter ( GLUT_RED = 0 )
|
||||
integer*4 GLUT_GREEN
|
||||
parameter ( GLUT_GREEN = 1 )
|
||||
integer*4 GLUT_BLUE
|
||||
parameter ( GLUT_BLUE = 2 )
|
||||
|
||||
C XXX Unfortunately, SGI's Fortran compiler links with
|
||||
C EXTERNAL data even if it is not used. This defeats
|
||||
C the purpose of GLUT naming fonts via opaque symbols.
|
||||
C This means GLUT Fortran programmers should explicitly
|
||||
C declared EXTERNAL GLUT fonts in subroutines where
|
||||
C the fonts are used.
|
||||
|
||||
C stroke font opaque names
|
||||
C external GLUT_STROKE_ROMAN
|
||||
C external GLUT_STROKE_MONO_ROMAN
|
||||
|
||||
C bitmap font opaque names
|
||||
C external GLUT_BITMAP_9_BY_15
|
||||
C external GLUT_BITMAP_8_BY_13
|
||||
C external GLUT_BITMAP_TIMES_ROMAN_10
|
||||
C external GLUT_BITMAP_TIMES_ROMAN_24
|
||||
C external GLUT_BITMAP_HELVETICA_10
|
||||
C external GLUT_BITMAP_HELVETICA_12
|
||||
C external GLUT_BITMAP_HELVETICA_18
|
||||
|
||||
C glutGet parameters
|
||||
integer*4 GLUT_WINDOW_X
|
||||
parameter ( GLUT_WINDOW_X = 100 )
|
||||
integer*4 GLUT_WINDOW_Y
|
||||
parameter ( GLUT_WINDOW_Y = 101 )
|
||||
integer*4 GLUT_WINDOW_WIDTH
|
||||
parameter ( GLUT_WINDOW_WIDTH = 102 )
|
||||
integer*4 GLUT_WINDOW_HEIGHT
|
||||
parameter ( GLUT_WINDOW_HEIGHT = 103 )
|
||||
integer*4 GLUT_WINDOW_BUFFER_SIZE
|
||||
parameter ( GLUT_WINDOW_BUFFER_SIZE = 104 )
|
||||
integer*4 GLUT_WINDOW_STENCIL_SIZE
|
||||
parameter ( GLUT_WINDOW_STENCIL_SIZE = 105 )
|
||||
integer*4 GLUT_WINDOW_DEPTH_SIZE
|
||||
parameter ( GLUT_WINDOW_DEPTH_SIZE = 106 )
|
||||
integer*4 GLUT_WINDOW_RED_SIZE
|
||||
parameter ( GLUT_WINDOW_RED_SIZE = 107 )
|
||||
integer*4 GLUT_WINDOW_GREEN_SIZE
|
||||
parameter ( GLUT_WINDOW_GREEN_SIZE = 108 )
|
||||
integer*4 GLUT_WINDOW_BLUE_SIZE
|
||||
parameter ( GLUT_WINDOW_BLUE_SIZE = 109 )
|
||||
integer*4 GLUT_WINDOW_ALPHA_SIZE
|
||||
parameter ( GLUT_WINDOW_ALPHA_SIZE = 110 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_RED_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_RED_SIZE = 111 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_GREEN_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_GREEN_SIZE = 112 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_BLUE_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_BLUE_SIZE = 113 )
|
||||
integer*4 GLUT_WINDOW_ACCUM_ALPHA_SIZE
|
||||
parameter ( GLUT_WINDOW_ACCUM_ALPHA_SIZE = 114 )
|
||||
integer*4 GLUT_WINDOW_DOUBLEBUFFER
|
||||
parameter ( GLUT_WINDOW_DOUBLEBUFFER = 115 )
|
||||
integer*4 GLUT_WINDOW_RGBA
|
||||
parameter ( GLUT_WINDOW_RGBA = 116 )
|
||||
integer*4 GLUT_WINDOW_PARENT
|
||||
parameter ( GLUT_WINDOW_PARENT = 117 )
|
||||
integer*4 GLUT_WINDOW_NUM_CHILDREN
|
||||
parameter ( GLUT_WINDOW_NUM_CHILDREN = 118 )
|
||||
integer*4 GLUT_WINDOW_COLORMAP_SIZE
|
||||
parameter ( GLUT_WINDOW_COLORMAP_SIZE = 119 )
|
||||
integer*4 GLUT_WINDOW_NUM_SAMPLES
|
||||
parameter ( GLUT_WINDOW_NUM_SAMPLES = 120 )
|
||||
integer*4 GLUT_WINDOW_STEREO
|
||||
parameter ( GLUT_WINDOW_STEREO = 121 )
|
||||
integer*4 GLUT_WINDOW_CURSOR
|
||||
parameter ( GLUT_WINDOW_CURSOR = 122 )
|
||||
integer*4 GLUT_SCREEN_WIDTH
|
||||
parameter ( GLUT_SCREEN_WIDTH = 200 )
|
||||
integer*4 GLUT_SCREEN_HEIGHT
|
||||
parameter ( GLUT_SCREEN_HEIGHT = 201 )
|
||||
integer*4 GLUT_SCREEN_WIDTH_MM
|
||||
parameter ( GLUT_SCREEN_WIDTH_MM = 202 )
|
||||
integer*4 GLUT_SCREEN_HEIGHT_MM
|
||||
parameter ( GLUT_SCREEN_HEIGHT_MM = 203 )
|
||||
integer*4 GLUT_MENU_NUM_ITEMS
|
||||
parameter ( GLUT_MENU_NUM_ITEMS = 300 )
|
||||
integer*4 GLUT_DISPLAY_MODE_POSSIBLE
|
||||
parameter ( GLUT_DISPLAY_MODE_POSSIBLE = 400 )
|
||||
integer*4 GLUT_INIT_WINDOW_X
|
||||
parameter ( GLUT_INIT_WINDOW_X = 500 )
|
||||
integer*4 GLUT_INIT_WINDOW_Y
|
||||
parameter ( GLUT_INIT_WINDOW_Y = 501 )
|
||||
integer*4 GLUT_INIT_WINDOW_WIDTH
|
||||
parameter ( GLUT_INIT_WINDOW_WIDTH = 502 )
|
||||
integer*4 GLUT_INIT_WINDOW_HEIGHT
|
||||
parameter ( GLUT_INIT_WINDOW_HEIGHT = 503 )
|
||||
integer*4 GLUT_INIT_DISPLAY_MODE
|
||||
parameter ( GLUT_INIT_DISPLAY_MODE = 504 )
|
||||
integer*4 GLUT_ELAPSED_TIME
|
||||
parameter ( GLUT_ELAPSED_TIME = 700 )
|
||||
|
||||
C glutDeviceGet parameters
|
||||
integer*4 GLUT_HAS_KEYBOARD
|
||||
parameter ( GLUT_HAS_KEYBOARD = 600 )
|
||||
integer*4 GLUT_HAS_MOUSE
|
||||
parameter ( GLUT_HAS_MOUSE = 601 )
|
||||
integer*4 GLUT_HAS_SPACEBALL
|
||||
parameter ( GLUT_HAS_SPACEBALL = 602 )
|
||||
integer*4 GLUT_HAS_DIAL_AND_BUTTON_BOX
|
||||
parameter ( GLUT_HAS_DIAL_AND_BUTTON_BOX = 603 )
|
||||
integer*4 GLUT_HAS_TABLET
|
||||
parameter ( GLUT_HAS_TABLET = 604 )
|
||||
integer*4 GLUT_NUM_MOUSE_BUTTONS
|
||||
parameter ( GLUT_NUM_MOUSE_BUTTONS = 605 )
|
||||
integer*4 GLUT_NUM_SPACEBALL_BUTTONS
|
||||
parameter ( GLUT_NUM_SPACEBALL_BUTTONS = 606 )
|
||||
integer*4 GLUT_NUM_BUTTON_BOX_BUTTONS
|
||||
parameter ( GLUT_NUM_BUTTON_BOX_BUTTONS = 607 )
|
||||
integer*4 GLUT_NUM_DIALS
|
||||
parameter ( GLUT_NUM_DIALS = 608 )
|
||||
integer*4 GLUT_NUM_TABLET_BUTTONS
|
||||
parameter ( GLUT_NUM_TABLET_BUTTONS = 609 )
|
||||
|
||||
C glutLayerGet parameters
|
||||
integer*4 GLUT_OVERLAY_POSSIBLE
|
||||
parameter ( GLUT_OVERLAY_POSSIBLE = 800 )
|
||||
integer*4 GLUT_LAYER_IN_USE
|
||||
parameter ( GLUT_LAYER_IN_USE = 801 )
|
||||
integer*4 GLUT_HAS_OVERLAY
|
||||
parameter ( GLUT_HAS_OVERLAY = 802 )
|
||||
integer*4 GLUT_TRANSPARENT_INDEX
|
||||
parameter ( GLUT_TRANSPARENT_INDEX = 803 )
|
||||
integer*4 GLUT_NORMAL_DAMAGED
|
||||
parameter ( GLUT_NORMAL_DAMAGED = 804 )
|
||||
integer*4 GLUT_OVERLAY_DAMAGED
|
||||
parameter ( GLUT_OVERLAY_DAMAGED = 805 )
|
||||
|
||||
C glutUseLayer parameters
|
||||
integer*4 GLUT_NORMAL
|
||||
parameter ( GLUT_NORMAL = 0 )
|
||||
integer*4 GLUT_OVERLAY
|
||||
parameter ( GLUT_OVERLAY = 1 )
|
||||
|
||||
C glutGetModifiers return mask
|
||||
integer*4 GLUT_ACTIVE_SHIFT
|
||||
parameter ( GLUT_ACTIVE_SHIFT = 1 )
|
||||
integer*4 GLUT_ACTIVE_CTRL
|
||||
parameter ( GLUT_ACTIVE_CTRL = 2 )
|
||||
integer*4 GLUT_ACTIVE_ALT
|
||||
parameter ( GLUT_ACTIVE_ALT = 4 )
|
||||
|
||||
C glutSetCursor parameters
|
||||
integer*4 GLUT_CURSOR_RIGHT_ARROW
|
||||
parameter ( GLUT_CURSOR_RIGHT_ARROW = 0 )
|
||||
integer*4 GLUT_CURSOR_LEFT_ARROW
|
||||
parameter ( GLUT_CURSOR_LEFT_ARROW = 1 )
|
||||
integer*4 GLUT_CURSOR_INFO
|
||||
parameter ( GLUT_CURSOR_INFO = 2 )
|
||||
integer*4 GLUT_CURSOR_DESTROY
|
||||
parameter ( GLUT_CURSOR_DESTROY = 3 )
|
||||
integer*4 GLUT_CURSOR_HELP
|
||||
parameter ( GLUT_CURSOR_HELP = 4 )
|
||||
integer*4 GLUT_CURSOR_CYCLE
|
||||
parameter ( GLUT_CURSOR_CYCLE = 5 )
|
||||
integer*4 GLUT_CURSOR_SPRAY
|
||||
parameter ( GLUT_CURSOR_SPRAY = 6 )
|
||||
integer*4 GLUT_CURSOR_WAIT
|
||||
parameter ( GLUT_CURSOR_WAIT = 7 )
|
||||
integer*4 GLUT_CURSOR_TEXT
|
||||
parameter ( GLUT_CURSOR_TEXT = 8 )
|
||||
integer*4 GLUT_CURSOR_CROSSHAIR
|
||||
parameter ( GLUT_CURSOR_CROSSHAIR = 9 )
|
||||
integer*4 GLUT_CURSOR_UP_DOWN
|
||||
parameter ( GLUT_CURSOR_UP_DOWN = 10 )
|
||||
integer*4 GLUT_CURSOR_LEFT_RIGHT
|
||||
parameter ( GLUT_CURSOR_LEFT_RIGHT = 11 )
|
||||
integer*4 GLUT_CURSOR_TOP_SIDE
|
||||
parameter ( GLUT_CURSOR_TOP_SIDE = 12 )
|
||||
integer*4 GLUT_CURSOR_BOTTOM_SIDE
|
||||
parameter ( GLUT_CURSOR_BOTTOM_SIDE = 13 )
|
||||
integer*4 GLUT_CURSOR_LEFT_SIDE
|
||||
parameter ( GLUT_CURSOR_LEFT_SIDE = 14 )
|
||||
integer*4 GLUT_CURSOR_RIGHT_SIDE
|
||||
parameter ( GLUT_CURSOR_RIGHT_SIDE = 15 )
|
||||
integer*4 GLUT_CURSOR_TOP_LEFT_CORNER
|
||||
parameter ( GLUT_CURSOR_TOP_LEFT_CORNER = 16 )
|
||||
integer*4 GLUT_CURSOR_TOP_RIGHT_CORNER
|
||||
parameter ( GLUT_CURSOR_TOP_RIGHT_CORNER = 17 )
|
||||
integer*4 GLUT_CURSOR_BOTTOM_RIGHT_CORNER
|
||||
parameter ( GLUT_CURSOR_BOTTOM_RIGHT_CORNER = 18 )
|
||||
integer*4 GLUT_CURSOR_BOTTOM_LEFT_CORNER
|
||||
parameter ( GLUT_CURSOR_BOTTOM_LEFT_CORNER = 19 )
|
||||
integer*4 GLUT_CURSOR_INHERIT
|
||||
parameter ( GLUT_CURSOR_INHERIT = 100 )
|
||||
integer*4 GLUT_CURSOR_NONE
|
||||
parameter ( GLUT_CURSOR_NONE = 101 )
|
||||
integer*4 GLUT_CURSOR_FULL_CROSSHAIR
|
||||
parameter ( GLUT_CURSOR_FULL_CROSSHAIR = 102 )
|
||||
|
||||
C GLUT functions
|
||||
integer*4 glutcreatewindow
|
||||
integer*4 glutcreatesubwindow
|
||||
integer*4 glutgetwindow
|
||||
integer*4 glutcreatemenu
|
||||
integer*4 glutgetmenu
|
||||
real glutgetcolor
|
||||
integer*4 glutget
|
||||
integer*4 glutdeviceget
|
||||
integer*4 glutextensionsupported
|
||||
|
||||
C GLUT NULL name
|
||||
external glutnull
|
||||
|
||||
|
|
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
|
@ -1,137 +1,137 @@
|
|||
#ifndef __glsmap_h__
|
||||
#define __glsmap_h__
|
||||
|
||||
/* Copyright (c) Mark J. Kilgard, 1998. */
|
||||
|
||||
/* This program is freely distributable without licensing fees
|
||||
and is provided without guarantee or warrantee expressed or
|
||||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
/* Try hard to avoid including <windows.h> to avoid name space pollution,
|
||||
but Win32's <GL/gl.h> needs APIENTRY and WINGDIAPI defined properly. */
|
||||
# if 0
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# else
|
||||
/* XXX This is from Win32's <windef.h> */
|
||||
# ifndef APIENTRY
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
# ifndef CALLBACK
|
||||
/* XXX This is from Win32's <winnt.h> */
|
||||
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
||||
# define CALLBACK __stdcall
|
||||
# else
|
||||
# define CALLBACK
|
||||
# endif
|
||||
# endif
|
||||
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */
|
||||
# ifndef WINGDIAPI
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
/* XXX This is from Win32's <ctype.h> */
|
||||
# ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
# define _WCHAR_T_DEFINED
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
|
||||
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
SMAP_CLEAR_SMAP_TEXTURE = 0x1,
|
||||
SMAP_GENERATE_VIEW_MIPMAPS = 0x2,
|
||||
SMAP_GENERATE_SMAP_MIPMAPS = 0x4,
|
||||
SMAP_GENERATE_MIPMAPS = 0x6 /* both of above */
|
||||
} SphereMapFlags;
|
||||
|
||||
/* Cube view enumerants. */
|
||||
enum {
|
||||
SMAP_FRONT = 0,
|
||||
SMAP_TOP = 1,
|
||||
SMAP_BOTTOM = 2,
|
||||
SMAP_LEFT = 3,
|
||||
SMAP_RIGHT = 4,
|
||||
SMAP_BACK = 5
|
||||
};
|
||||
|
||||
typedef struct _SphereMap SphereMap;
|
||||
|
||||
extern SphereMap *smapCreateSphereMap(SphereMap *shareSmap);
|
||||
extern void smapDestroySphereMap(SphereMap *smap);
|
||||
|
||||
extern void smapConfigureSphereMapMesh(SphereMap *smap, int steps, int rings, int edgeExtend);
|
||||
|
||||
extern void smapSetSphereMapTexObj(SphereMap *smap, GLuint texobj);
|
||||
extern void smapSetViewTexObj(SphereMap *smap, GLuint texobj);
|
||||
extern void smapSetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
|
||||
extern void smapGetSphereMapTexObj(SphereMap *smap, GLuint *texobj);
|
||||
extern void smapGetViewTexObj(SphereMap *smap, GLuint *texobj);
|
||||
extern void smapGetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
|
||||
|
||||
extern void smapSetFlags(SphereMap *smap, SphereMapFlags flags);
|
||||
extern void smapGetFlags(SphereMap *smap, SphereMapFlags *flags);
|
||||
|
||||
extern void smapSetViewOrigin(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 smapGetSphereMapOrigin(SphereMap *smap, GLint *x, GLint *y);
|
||||
|
||||
extern void smapSetEye(SphereMap *smap, GLfloat eyex, GLfloat eyey, GLfloat eyez);
|
||||
extern void smapSetEyeVector(SphereMap *smap, GLfloat *eye);
|
||||
extern void smapSetUp(SphereMap *smap, GLfloat upx, GLfloat upy, GLfloat upz);
|
||||
extern void smapSetUpVector(SphereMap *smap, GLfloat *up);
|
||||
extern void smapSetObject(SphereMap *smap, GLfloat objx, GLfloat objy, GLfloat objz);
|
||||
extern void smapSetObjectVector(SphereMap *smap, GLfloat *obj);
|
||||
extern void smapGetEye(SphereMap *smap, GLfloat *eyex, GLfloat *eyey, GLfloat *eyez);
|
||||
extern void smapGetEyeVector(SphereMap *smap, GLfloat *eye);
|
||||
extern void smapGetUp(SphereMap *smap, GLfloat *upx, GLfloat *upy, GLfloat *upz);
|
||||
extern void smapGetUpVector(SphereMap *smap, GLfloat *up);
|
||||
extern void smapGetObject(SphereMap *smap, GLfloat *objx, GLfloat *objy, GLfloat *objz);
|
||||
extern void smapGetObjectVector(SphereMap *smap, GLfloat *obj);
|
||||
|
||||
extern void smapSetNearFar(SphereMap *smap, GLfloat viewNear, GLfloat viewFar);
|
||||
extern void smapGetNearFar(SphereMap *smap, GLfloat *viewNear, GLfloat *viewFar);
|
||||
|
||||
extern void smapSetSphereMapTexDim(SphereMap *smap, GLsizei texdim);
|
||||
extern void smapSetViewTexDim(SphereMap *smap, GLsizei texdim);
|
||||
extern void smapGetSphereMapTexDim(SphereMap *smap, GLsizei *texdim);
|
||||
extern void smapGetViewTexDim(SphereMap *smap, GLsizei *texdim);
|
||||
|
||||
extern void smapSetContextData(SphereMap *smap, void *context);
|
||||
extern void smapGetContextData(SphereMap *smap, 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 smapGetPositionLightsFunc(SphereMap *smap, void (**positionLights)(int view, void *context));
|
||||
extern void smapGetDrawViewFunc(SphereMap *smap, void (**drawView)(int view, void *context));
|
||||
|
||||
extern void smapGenViewTex(SphereMap *smap, int view);
|
||||
extern void smapGenViewTexs(SphereMap *smap);
|
||||
extern void smapGenSphereMapFromViewTexs(SphereMap *smap);
|
||||
extern void smapGenSphereMap(SphereMap *smap);
|
||||
extern void smapGenSphereMapWithOneViewTex(SphereMap *smap);
|
||||
|
||||
extern int smapRvecToSt(float rvec[3], float st[2]);
|
||||
extern void smapStToRvec(float *st, float *rvec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* __glsmap_h__ */
|
||||
#ifndef __glsmap_h__
|
||||
#define __glsmap_h__
|
||||
|
||||
/* Copyright (c) Mark J. Kilgard, 1998. */
|
||||
|
||||
/* This program is freely distributable without licensing fees
|
||||
and is provided without guarantee or warrantee expressed or
|
||||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
/* Try hard to avoid including <windows.h> to avoid name space pollution,
|
||||
but Win32's <GL/gl.h> needs APIENTRY and WINGDIAPI defined properly. */
|
||||
# if 0
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# else
|
||||
/* XXX This is from Win32's <windef.h> */
|
||||
# ifndef APIENTRY
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
# ifndef CALLBACK
|
||||
/* XXX This is from Win32's <winnt.h> */
|
||||
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
||||
# define CALLBACK __stdcall
|
||||
# else
|
||||
# define CALLBACK
|
||||
# endif
|
||||
# endif
|
||||
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */
|
||||
# ifndef WINGDIAPI
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
/* XXX This is from Win32's <ctype.h> */
|
||||
# ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
# define _WCHAR_T_DEFINED
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
|
||||
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
SMAP_CLEAR_SMAP_TEXTURE = 0x1,
|
||||
SMAP_GENERATE_VIEW_MIPMAPS = 0x2,
|
||||
SMAP_GENERATE_SMAP_MIPMAPS = 0x4,
|
||||
SMAP_GENERATE_MIPMAPS = 0x6 /* both of above */
|
||||
} SphereMapFlags;
|
||||
|
||||
/* Cube view enumerants. */
|
||||
enum {
|
||||
SMAP_FRONT = 0,
|
||||
SMAP_TOP = 1,
|
||||
SMAP_BOTTOM = 2,
|
||||
SMAP_LEFT = 3,
|
||||
SMAP_RIGHT = 4,
|
||||
SMAP_BACK = 5
|
||||
};
|
||||
|
||||
typedef struct _SphereMap SphereMap;
|
||||
|
||||
extern SphereMap *smapCreateSphereMap(SphereMap *shareSmap);
|
||||
extern void smapDestroySphereMap(SphereMap *smap);
|
||||
|
||||
extern void smapConfigureSphereMapMesh(SphereMap *smap, int steps, int rings, int edgeExtend);
|
||||
|
||||
extern void smapSetSphereMapTexObj(SphereMap *smap, GLuint texobj);
|
||||
extern void smapSetViewTexObj(SphereMap *smap, GLuint texobj);
|
||||
extern void smapSetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
|
||||
extern void smapGetSphereMapTexObj(SphereMap *smap, GLuint *texobj);
|
||||
extern void smapGetViewTexObj(SphereMap *smap, GLuint *texobj);
|
||||
extern void smapGetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
|
||||
|
||||
extern void smapSetFlags(SphereMap *smap, SphereMapFlags flags);
|
||||
extern void smapGetFlags(SphereMap *smap, SphereMapFlags *flags);
|
||||
|
||||
extern void smapSetViewOrigin(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 smapGetSphereMapOrigin(SphereMap *smap, GLint *x, GLint *y);
|
||||
|
||||
extern void smapSetEye(SphereMap *smap, GLfloat eyex, GLfloat eyey, GLfloat eyez);
|
||||
extern void smapSetEyeVector(SphereMap *smap, GLfloat *eye);
|
||||
extern void smapSetUp(SphereMap *smap, GLfloat upx, GLfloat upy, GLfloat upz);
|
||||
extern void smapSetUpVector(SphereMap *smap, GLfloat *up);
|
||||
extern void smapSetObject(SphereMap *smap, GLfloat objx, GLfloat objy, GLfloat objz);
|
||||
extern void smapSetObjectVector(SphereMap *smap, GLfloat *obj);
|
||||
extern void smapGetEye(SphereMap *smap, GLfloat *eyex, GLfloat *eyey, GLfloat *eyez);
|
||||
extern void smapGetEyeVector(SphereMap *smap, GLfloat *eye);
|
||||
extern void smapGetUp(SphereMap *smap, GLfloat *upx, GLfloat *upy, GLfloat *upz);
|
||||
extern void smapGetUpVector(SphereMap *smap, GLfloat *up);
|
||||
extern void smapGetObject(SphereMap *smap, GLfloat *objx, GLfloat *objy, GLfloat *objz);
|
||||
extern void smapGetObjectVector(SphereMap *smap, GLfloat *obj);
|
||||
|
||||
extern void smapSetNearFar(SphereMap *smap, GLfloat viewNear, GLfloat viewFar);
|
||||
extern void smapGetNearFar(SphereMap *smap, GLfloat *viewNear, GLfloat *viewFar);
|
||||
|
||||
extern void smapSetSphereMapTexDim(SphereMap *smap, GLsizei texdim);
|
||||
extern void smapSetViewTexDim(SphereMap *smap, GLsizei texdim);
|
||||
extern void smapGetSphereMapTexDim(SphereMap *smap, GLsizei *texdim);
|
||||
extern void smapGetViewTexDim(SphereMap *smap, GLsizei *texdim);
|
||||
|
||||
extern void smapSetContextData(SphereMap *smap, void *context);
|
||||
extern void smapGetContextData(SphereMap *smap, 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 smapGetPositionLightsFunc(SphereMap *smap, void (**positionLights)(int view, void *context));
|
||||
extern void smapGetDrawViewFunc(SphereMap *smap, void (**drawView)(int view, void *context));
|
||||
|
||||
extern void smapGenViewTex(SphereMap *smap, int view);
|
||||
extern void smapGenViewTexs(SphereMap *smap);
|
||||
extern void smapGenSphereMapFromViewTexs(SphereMap *smap);
|
||||
extern void smapGenSphereMap(SphereMap *smap);
|
||||
extern void smapGenSphereMapWithOneViewTex(SphereMap *smap);
|
||||
|
||||
extern int smapRvecToSt(float rvec[3], float st[2]);
|
||||
extern void smapStToRvec(float *st, float *rvec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* __glsmap_h__ */
|
||||
|
|
|
@ -1,243 +1,243 @@
|
|||
#ifndef __glx_h__
|
||||
#define __glx_h__
|
||||
|
||||
/*
|
||||
** 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
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||
**
|
||||
** Software distributed under the License is distributed on an "AS IS"
|
||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||
** language governing rights and limitations under the License.
|
||||
**
|
||||
** The Original Software is GLX version 1.2 source code, released February,
|
||||
** 1999. The developer of the Original Software is 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.
|
||||
**
|
||||
** $Header: /teleimm/telev/inc/GL/glx.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $
|
||||
*/
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xmd.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glxtokens.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GLX resources.
|
||||
*/
|
||||
typedef XID GLXContextID;
|
||||
typedef XID GLXPixmap;
|
||||
typedef XID GLXDrawable;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXFBConfigID;
|
||||
|
||||
/*
|
||||
* GLXContext is a pointer to opaque data.
|
||||
*/
|
||||
typedef struct __GLXcontextRec *GLXContext;
|
||||
|
||||
/*
|
||||
* GLXFBConfig is a pointer to opaque data.
|
||||
*/
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
* GLX 1.0 functions.
|
||||
*/
|
||||
extern XVisualInfo* glXChooseVisual(Display *dpy, int screen,
|
||||
int *attrib_list);
|
||||
|
||||
extern void glXCopyContext(Display *dpy, GLXContext src,
|
||||
GLXContext dst, unsigned int mask);
|
||||
|
||||
extern GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis,
|
||||
GLXContext share_list, Bool direct);
|
||||
|
||||
extern GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis,
|
||||
Pixmap pixmap);
|
||||
|
||||
extern void glXDestroyContext(Display *dpy, GLXContext ctx);
|
||||
|
||||
extern void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pix);
|
||||
|
||||
extern int glXGetConfig(Display *dpy, XVisualInfo *vis,
|
||||
int attrib, int *value);
|
||||
|
||||
extern GLXContext glXGetCurrentContext(void);
|
||||
|
||||
extern GLXDrawable glXGetCurrentDrawable(void);
|
||||
|
||||
extern Bool glXIsDirect(Display *dpy, GLXContext ctx);
|
||||
|
||||
extern Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable,
|
||||
GLXContext ctx);
|
||||
|
||||
extern Bool glXQueryExtension(Display *dpy, int *error_base, int *event_base);
|
||||
|
||||
extern Bool glXQueryVersion(Display *dpy, int *major, int *minor);
|
||||
|
||||
extern void glXSwapBuffers(Display *dpy, GLXDrawable drawable);
|
||||
|
||||
extern void glXUseXFont(Font font, int first, int count, int list_base);
|
||||
|
||||
extern void glXWaitGL(void);
|
||||
|
||||
extern void glXWaitX(void);
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.1 functions.
|
||||
*/
|
||||
extern const char *glXGetClientString(Display *dpy, int name);
|
||||
|
||||
extern const char *glXQueryServerString(Display *dpy, int screen, int name);
|
||||
|
||||
extern const char *glXQueryExtensionsString(Display *dpy, int screen);
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.2 functions.
|
||||
*/
|
||||
extern Display *glXGetCurrentDisplay(void);
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.3 functions.
|
||||
*/
|
||||
extern GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen,
|
||||
const int *attrib_list, int *nelements);
|
||||
|
||||
extern GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config,
|
||||
int render_type, GLXContext share_list,
|
||||
Bool direct);
|
||||
|
||||
extern GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config,
|
||||
const int *attrib_list);
|
||||
|
||||
extern GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config,
|
||||
Pixmap pixmap, const int *attrib_list);
|
||||
|
||||
extern GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config,
|
||||
Window win, const int *attrib_list);
|
||||
|
||||
extern void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf);
|
||||
|
||||
extern void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap);
|
||||
|
||||
extern void glXDestroyWindow(Display *dpy, GLXWindow win);
|
||||
|
||||
extern GLXDrawable glXGetCurrentReadDrawable(void);
|
||||
|
||||
extern int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config,
|
||||
int attribute, int *value);
|
||||
|
||||
extern GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements);
|
||||
|
||||
extern void glXGetSelectedEvent(Display *dpy, GLXDrawable draw,
|
||||
unsigned long *event_mask);
|
||||
|
||||
extern XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config);
|
||||
|
||||
extern Bool glXMakeContextCurrent(Display *display, GLXDrawable draw,
|
||||
GLXDrawable read, GLXContext ctx);
|
||||
|
||||
extern int glXQueryContext(Display *dpy, GLXContext ctx,
|
||||
int attribute, int *value);
|
||||
|
||||
extern void glXQueryDrawable(Display *dpy, GLXDrawable draw,
|
||||
int attribute, unsigned int *value);
|
||||
|
||||
extern void glXSelectEvent(Display *dpy, GLXDrawable draw,
|
||||
unsigned long event_mask);
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
* ARB_get_proc_address
|
||||
*/
|
||||
extern void (*glXGetProcAddressARB(const GLubyte *procName))(void);
|
||||
|
||||
/*
|
||||
* EXT_import_context
|
||||
*/
|
||||
extern void glXFreeContextEXT(Display *dpy, GLXContext ctx);
|
||||
|
||||
extern GLXContextID glXGetContextIDEXT(const GLXContext ctx);
|
||||
|
||||
extern GLXDrawable glXGetCurrentDrawableEXT(void);
|
||||
|
||||
extern GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID);
|
||||
|
||||
extern int glXQueryContextInfoEXT(Display *dpy, GLXContext ctx,
|
||||
int attribute, int *value);
|
||||
|
||||
/*
|
||||
* SGI_video_sync
|
||||
*/
|
||||
extern int glXGetVideoSyncSGI(unsigned int *count);
|
||||
|
||||
extern int glXWaitVideoSyncSGI(int divisor, int remainder,
|
||||
unsigned int *count);
|
||||
|
||||
extern int glXGetRefreshRateSGI(unsigned int *rate);
|
||||
|
||||
/*
|
||||
* SGIX_swap_group
|
||||
*/
|
||||
extern void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
|
||||
GLXDrawable member);
|
||||
|
||||
/*
|
||||
* SGIX_swap_barrier
|
||||
*/
|
||||
extern void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable,
|
||||
int barrier);
|
||||
|
||||
extern Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max);
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/*** Should these go here, or in another header? */
|
||||
/*
|
||||
* GLX Events
|
||||
*/
|
||||
typedef struct {
|
||||
int event_type; /* GLX_DAMAGED or GLX_SAVED */
|
||||
int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came for SendEvent request */
|
||||
Display *display; /* display the event was read from */
|
||||
GLXDrawable drawable; /* XID of Drawable */
|
||||
unsigned int buffer_mask; /* mask indicating which buffers are affected */
|
||||
unsigned int aux_buffer; /* which aux buffer was affected */
|
||||
int x, y;
|
||||
int width, height;
|
||||
int count; /* if nonzero, at least this many more */
|
||||
} GLXPbufferClobberEvent;
|
||||
|
||||
typedef union __GLXEvent {
|
||||
GLXPbufferClobberEvent glxpbufferclobber;
|
||||
long pad[24];
|
||||
} GLXEvent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__glx_h__ */
|
||||
#ifndef __glx_h__
|
||||
#define __glx_h__
|
||||
|
||||
/*
|
||||
** 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
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||
**
|
||||
** Software distributed under the License is distributed on an "AS IS"
|
||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||
** language governing rights and limitations under the License.
|
||||
**
|
||||
** The Original Software is GLX version 1.2 source code, released February,
|
||||
** 1999. The developer of the Original Software is 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.
|
||||
**
|
||||
** $Header: /teleimm/telev/inc/GL/glx.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $
|
||||
*/
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xmd.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glxtokens.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GLX resources.
|
||||
*/
|
||||
typedef XID GLXContextID;
|
||||
typedef XID GLXPixmap;
|
||||
typedef XID GLXDrawable;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXFBConfigID;
|
||||
|
||||
/*
|
||||
* GLXContext is a pointer to opaque data.
|
||||
*/
|
||||
typedef struct __GLXcontextRec *GLXContext;
|
||||
|
||||
/*
|
||||
* GLXFBConfig is a pointer to opaque data.
|
||||
*/
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
* GLX 1.0 functions.
|
||||
*/
|
||||
extern XVisualInfo* glXChooseVisual(Display *dpy, int screen,
|
||||
int *attrib_list);
|
||||
|
||||
extern void glXCopyContext(Display *dpy, GLXContext src,
|
||||
GLXContext dst, unsigned int mask);
|
||||
|
||||
extern GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis,
|
||||
GLXContext share_list, Bool direct);
|
||||
|
||||
extern GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis,
|
||||
Pixmap pixmap);
|
||||
|
||||
extern void glXDestroyContext(Display *dpy, GLXContext ctx);
|
||||
|
||||
extern void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pix);
|
||||
|
||||
extern int glXGetConfig(Display *dpy, XVisualInfo *vis,
|
||||
int attrib, int *value);
|
||||
|
||||
extern GLXContext glXGetCurrentContext(void);
|
||||
|
||||
extern GLXDrawable glXGetCurrentDrawable(void);
|
||||
|
||||
extern Bool glXIsDirect(Display *dpy, GLXContext ctx);
|
||||
|
||||
extern Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable,
|
||||
GLXContext ctx);
|
||||
|
||||
extern Bool glXQueryExtension(Display *dpy, int *error_base, int *event_base);
|
||||
|
||||
extern Bool glXQueryVersion(Display *dpy, int *major, int *minor);
|
||||
|
||||
extern void glXSwapBuffers(Display *dpy, GLXDrawable drawable);
|
||||
|
||||
extern void glXUseXFont(Font font, int first, int count, int list_base);
|
||||
|
||||
extern void glXWaitGL(void);
|
||||
|
||||
extern void glXWaitX(void);
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.1 functions.
|
||||
*/
|
||||
extern const char *glXGetClientString(Display *dpy, int name);
|
||||
|
||||
extern const char *glXQueryServerString(Display *dpy, int screen, int name);
|
||||
|
||||
extern const char *glXQueryExtensionsString(Display *dpy, int screen);
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.2 functions.
|
||||
*/
|
||||
extern Display *glXGetCurrentDisplay(void);
|
||||
|
||||
|
||||
/*
|
||||
* GLX 1.3 functions.
|
||||
*/
|
||||
extern GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen,
|
||||
const int *attrib_list, int *nelements);
|
||||
|
||||
extern GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config,
|
||||
int render_type, GLXContext share_list,
|
||||
Bool direct);
|
||||
|
||||
extern GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config,
|
||||
const int *attrib_list);
|
||||
|
||||
extern GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config,
|
||||
Pixmap pixmap, const int *attrib_list);
|
||||
|
||||
extern GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config,
|
||||
Window win, const int *attrib_list);
|
||||
|
||||
extern void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf);
|
||||
|
||||
extern void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap);
|
||||
|
||||
extern void glXDestroyWindow(Display *dpy, GLXWindow win);
|
||||
|
||||
extern GLXDrawable glXGetCurrentReadDrawable(void);
|
||||
|
||||
extern int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config,
|
||||
int attribute, int *value);
|
||||
|
||||
extern GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements);
|
||||
|
||||
extern void glXGetSelectedEvent(Display *dpy, GLXDrawable draw,
|
||||
unsigned long *event_mask);
|
||||
|
||||
extern XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config);
|
||||
|
||||
extern Bool glXMakeContextCurrent(Display *display, GLXDrawable draw,
|
||||
GLXDrawable read, GLXContext ctx);
|
||||
|
||||
extern int glXQueryContext(Display *dpy, GLXContext ctx,
|
||||
int attribute, int *value);
|
||||
|
||||
extern void glXQueryDrawable(Display *dpy, GLXDrawable draw,
|
||||
int attribute, unsigned int *value);
|
||||
|
||||
extern void glXSelectEvent(Display *dpy, GLXDrawable draw,
|
||||
unsigned long event_mask);
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
* ARB_get_proc_address
|
||||
*/
|
||||
extern void (*glXGetProcAddressARB(const GLubyte *procName))(void);
|
||||
|
||||
/*
|
||||
* EXT_import_context
|
||||
*/
|
||||
extern void glXFreeContextEXT(Display *dpy, GLXContext ctx);
|
||||
|
||||
extern GLXContextID glXGetContextIDEXT(const GLXContext ctx);
|
||||
|
||||
extern GLXDrawable glXGetCurrentDrawableEXT(void);
|
||||
|
||||
extern GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID);
|
||||
|
||||
extern int glXQueryContextInfoEXT(Display *dpy, GLXContext ctx,
|
||||
int attribute, int *value);
|
||||
|
||||
/*
|
||||
* SGI_video_sync
|
||||
*/
|
||||
extern int glXGetVideoSyncSGI(unsigned int *count);
|
||||
|
||||
extern int glXWaitVideoSyncSGI(int divisor, int remainder,
|
||||
unsigned int *count);
|
||||
|
||||
extern int glXGetRefreshRateSGI(unsigned int *rate);
|
||||
|
||||
/*
|
||||
* SGIX_swap_group
|
||||
*/
|
||||
extern void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
|
||||
GLXDrawable member);
|
||||
|
||||
/*
|
||||
* SGIX_swap_barrier
|
||||
*/
|
||||
extern void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable,
|
||||
int barrier);
|
||||
|
||||
extern Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max);
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
/*** Should these go here, or in another header? */
|
||||
/*
|
||||
* GLX Events
|
||||
*/
|
||||
typedef struct {
|
||||
int event_type; /* GLX_DAMAGED or GLX_SAVED */
|
||||
int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came for SendEvent request */
|
||||
Display *display; /* display the event was read from */
|
||||
GLXDrawable drawable; /* XID of Drawable */
|
||||
unsigned int buffer_mask; /* mask indicating which buffers are affected */
|
||||
unsigned int aux_buffer; /* which aux buffer was affected */
|
||||
int x, y;
|
||||
int width, height;
|
||||
int count; /* if nonzero, at least this many more */
|
||||
} GLXPbufferClobberEvent;
|
||||
|
||||
typedef union __GLXEvent {
|
||||
GLXPbufferClobberEvent glxpbufferclobber;
|
||||
long pad[24];
|
||||
} GLXEvent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__glx_h__ */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,252 +1,252 @@
|
|||
#ifndef __glxtokens_h__
|
||||
#define __glxtokens_h__
|
||||
|
||||
/*
|
||||
** 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
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||
**
|
||||
** Software distributed under the License is distributed on an "AS IS"
|
||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||
** language governing rights and limitations under the License.
|
||||
**
|
||||
** The Original Software is GLX version 1.2 source code, released February,
|
||||
** 1999. The developer of the Original Software is 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.
|
||||
**
|
||||
** $Header: /teleimm/telev/inc/GL/glxtokens.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLX_VERSION_1_1 1
|
||||
#define GLX_VERSION_1_2 1
|
||||
|
||||
/*
|
||||
* Names for attributes to glXGetConfig.
|
||||
*/
|
||||
#define GLX_USE_GL 1 /* support GLX rendering */
|
||||
#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
|
||||
#define GLX_LEVEL 3 /* level in plane stacking */
|
||||
#define GLX_RGBA 4 /* true if RGBA mode */
|
||||
#define GLX_DOUBLEBUFFER 5 /* double buffering supported */
|
||||
#define GLX_STEREO 6 /* stereo buffering supported */
|
||||
#define GLX_AUX_BUFFERS 7 /* number of aux buffers */
|
||||
#define GLX_RED_SIZE 8 /* number of red component bits */
|
||||
#define GLX_GREEN_SIZE 9 /* number of green component bits */
|
||||
#define GLX_BLUE_SIZE 10 /* number of blue component bits */
|
||||
#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
|
||||
#define GLX_DEPTH_SIZE 12 /* number of depth bits */
|
||||
#define GLX_STENCIL_SIZE 13 /* number of stencil 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_BLUE_SIZE 16 /* number of blue 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_SAMPLES_ARB 100001 /* number of multisample samples */
|
||||
|
||||
/*
|
||||
* FBConfig-specific attributes
|
||||
*/
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT */
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
|
||||
#define GLX_DRAWABLE_TYPE_SGIX GLX_DRAWABLE_TYPE
|
||||
#define GLX_RENDER_TYPE_SGIX GLX_RENDER_TYPE
|
||||
#define GLX_X_RENDERABLE_SGIX GLX_X_RENDERABLE
|
||||
#define GLX_FBCONFIG_ID_SGIX GLX_FBCONFIG_ID
|
||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX GLX_MAX_PBUFFER_WIDTH
|
||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX GLX_MAX_PBUFFER_HEIGHT
|
||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX GLX_MAX_PBUFFER_PIXELS
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
|
||||
/*
|
||||
* Error return values from glXGetConfig. Success is indicated by
|
||||
* a value of 0.
|
||||
*/
|
||||
#define GLX_BAD_SCREEN 1 /* screen # is bad */
|
||||
#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */
|
||||
#define GLX_NO_EXTENSION 3 /* no glx extension on server */
|
||||
#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */
|
||||
#define GLX_BAD_CONTEXT 5
|
||||
#define GLX_BAD_VALUE 6
|
||||
#define GLX_BAD_ENUM 7
|
||||
|
||||
|
||||
/* FBConfig attribute values */
|
||||
|
||||
/*
|
||||
* Generic "don't care" value for glX ChooseFBConfig attributes (except
|
||||
* GLX_LEVEL).
|
||||
*/
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
/* GLX_RENDER_TYPE bits */
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_RGBA_BIT_SGIX GLX_RGBA_BIT
|
||||
#define GLX_COLOR_INDEX_BIT_SGIX GLX_COLOR_INDEX_BIT
|
||||
|
||||
/* GLX_DRAWABLE_TYPE bits */
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_WINDOW_BIT_SGIX GLX_WINDOW_BIT
|
||||
#define GLX_PIXMAP_BIT_SGIX GLX_PIXMAP_BIT
|
||||
#define GLX_PBUFFER_BIT_SGIX GLX_PBUFFER_BIT
|
||||
|
||||
/* GLX_CONFIG_CAVEAT attribute values */
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
|
||||
/* GLX_X_VISUAL_TYPE attribute values */
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
|
||||
/* GLX_TRANSPARENT_TYPE attribute values */
|
||||
/* #define GLX_NONE 0x8000 */
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
|
||||
/* glXCreateGLXPbuffer attributes */
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040 /* 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_LARGEST_PBUFFER_SGIX GLX_LARGEST_PBUFFER
|
||||
|
||||
/* glXQueryGLXPBuffer attributes */
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_WIDTH_SGIX GLX_WIDTH
|
||||
#define GLX_HEIGHT_SGIX GLX_HEIGHT
|
||||
#define GLX_EVENT_MASK_SGIX GLX_EVENT_MASK
|
||||
|
||||
/* glXCreateNewContext render_type attribute values */
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_RGBA_TYPE_SGIX GLX_RGBA_TYPE
|
||||
#define GLX_COLOR_INDEX_TYPE_SGIX GLX_COLOR_INDEX_TYPE
|
||||
|
||||
/* glXQueryContext attributes */
|
||||
/* #define GLX_FBCONFIG_ID 0x8013 */
|
||||
/* #define GLX_RENDER_TYPE 0x8011 */
|
||||
#define GLX_SCREEN 0x800C
|
||||
|
||||
/* glXSelectEvent event mask bits */
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_PBUFFER_CLOBBER_MASK_SGIX GLX_PBUFFER_CLOBBER_MASK
|
||||
|
||||
/* GLXPbufferClobberEvent event_type values */
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_DAMAGED_SGIX GLX_DAMAGED
|
||||
#define GLX_SAVED_SGIX GLX_SAVED
|
||||
|
||||
/* GLXPbufferClobberEvent draw_type values */
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_WINDOW_SGIX GLX_WINDOW
|
||||
#define GLX_PBUFFER_SGIX GLX_PBUFFER
|
||||
|
||||
/* GLXPbufferClobberEvent buffer_mask bits */
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#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_BACK_LEFT_BUFFER_BIT_SGIX GLX_BACK_LEFT_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_DEPTH_BUFFER_BIT_SGIX GLX_DEPTH_BUFFER_BIT
|
||||
#define GLX_STENCIL_BUFFER_BIT_SGIX GLX_STENCIL_BUFFER_BIT
|
||||
#define GLX_ACCUM_BUFFER_BIT_SGIX GLX_ACCUM_BUFFER_BIT
|
||||
|
||||
/*
|
||||
* Extension return values from glXGetConfig. These are also
|
||||
* accepted as parameter values for glXChooseVisual.
|
||||
*/
|
||||
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* 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_GREEN_VALUE_EXT 0x26 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */
|
||||
|
||||
/* Property values for visual_type */
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
|
||||
/* Property values for transparent pixel */
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
|
||||
/* Property values for visual_rating */
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
|
||||
/*
|
||||
* Names for attributes to glXGetClientString.
|
||||
*/
|
||||
#define GLX_VENDOR 0x1
|
||||
#define GLX_VERSION 0x2
|
||||
#define GLX_EXTENSIONS 0x3
|
||||
|
||||
/*
|
||||
* Names for attributes to glXQueryContextInfoEXT.
|
||||
*/
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */
|
||||
#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */
|
||||
#define GLX_SCREEN_EXT 0x800C /* screen number */
|
||||
|
||||
/* NV_float_buffer */
|
||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__glxtokens_h__ */
|
||||
#ifndef __glxtokens_h__
|
||||
#define __glxtokens_h__
|
||||
|
||||
/*
|
||||
** 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
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||
**
|
||||
** Software distributed under the License is distributed on an "AS IS"
|
||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||
** language governing rights and limitations under the License.
|
||||
**
|
||||
** The Original Software is GLX version 1.2 source code, released February,
|
||||
** 1999. The developer of the Original Software is 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.
|
||||
**
|
||||
** $Header: /teleimm/telev/inc/GL/glxtokens.h,v 1.1 2006/01/05 03:28:50 zerocool Exp $
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLX_VERSION_1_1 1
|
||||
#define GLX_VERSION_1_2 1
|
||||
|
||||
/*
|
||||
* Names for attributes to glXGetConfig.
|
||||
*/
|
||||
#define GLX_USE_GL 1 /* support GLX rendering */
|
||||
#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
|
||||
#define GLX_LEVEL 3 /* level in plane stacking */
|
||||
#define GLX_RGBA 4 /* true if RGBA mode */
|
||||
#define GLX_DOUBLEBUFFER 5 /* double buffering supported */
|
||||
#define GLX_STEREO 6 /* stereo buffering supported */
|
||||
#define GLX_AUX_BUFFERS 7 /* number of aux buffers */
|
||||
#define GLX_RED_SIZE 8 /* number of red component bits */
|
||||
#define GLX_GREEN_SIZE 9 /* number of green component bits */
|
||||
#define GLX_BLUE_SIZE 10 /* number of blue component bits */
|
||||
#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
|
||||
#define GLX_DEPTH_SIZE 12 /* number of depth bits */
|
||||
#define GLX_STENCIL_SIZE 13 /* number of stencil 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_BLUE_SIZE 16 /* number of blue 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_SAMPLES_ARB 100001 /* number of multisample samples */
|
||||
|
||||
/*
|
||||
* FBConfig-specific attributes
|
||||
*/
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT */
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
|
||||
#define GLX_DRAWABLE_TYPE_SGIX GLX_DRAWABLE_TYPE
|
||||
#define GLX_RENDER_TYPE_SGIX GLX_RENDER_TYPE
|
||||
#define GLX_X_RENDERABLE_SGIX GLX_X_RENDERABLE
|
||||
#define GLX_FBCONFIG_ID_SGIX GLX_FBCONFIG_ID
|
||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX GLX_MAX_PBUFFER_WIDTH
|
||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX GLX_MAX_PBUFFER_HEIGHT
|
||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX GLX_MAX_PBUFFER_PIXELS
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
|
||||
/*
|
||||
* Error return values from glXGetConfig. Success is indicated by
|
||||
* a value of 0.
|
||||
*/
|
||||
#define GLX_BAD_SCREEN 1 /* screen # is bad */
|
||||
#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */
|
||||
#define GLX_NO_EXTENSION 3 /* no glx extension on server */
|
||||
#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */
|
||||
#define GLX_BAD_CONTEXT 5
|
||||
#define GLX_BAD_VALUE 6
|
||||
#define GLX_BAD_ENUM 7
|
||||
|
||||
|
||||
/* FBConfig attribute values */
|
||||
|
||||
/*
|
||||
* Generic "don't care" value for glX ChooseFBConfig attributes (except
|
||||
* GLX_LEVEL).
|
||||
*/
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
|
||||
/* GLX_RENDER_TYPE bits */
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_RGBA_BIT_SGIX GLX_RGBA_BIT
|
||||
#define GLX_COLOR_INDEX_BIT_SGIX GLX_COLOR_INDEX_BIT
|
||||
|
||||
/* GLX_DRAWABLE_TYPE bits */
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_WINDOW_BIT_SGIX GLX_WINDOW_BIT
|
||||
#define GLX_PIXMAP_BIT_SGIX GLX_PIXMAP_BIT
|
||||
#define GLX_PBUFFER_BIT_SGIX GLX_PBUFFER_BIT
|
||||
|
||||
/* GLX_CONFIG_CAVEAT attribute values */
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
|
||||
/* GLX_X_VISUAL_TYPE attribute values */
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
|
||||
/* GLX_TRANSPARENT_TYPE attribute values */
|
||||
/* #define GLX_NONE 0x8000 */
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
|
||||
/* glXCreateGLXPbuffer attributes */
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040 /* 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_LARGEST_PBUFFER_SGIX GLX_LARGEST_PBUFFER
|
||||
|
||||
/* glXQueryGLXPBuffer attributes */
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_WIDTH_SGIX GLX_WIDTH
|
||||
#define GLX_HEIGHT_SGIX GLX_HEIGHT
|
||||
#define GLX_EVENT_MASK_SGIX GLX_EVENT_MASK
|
||||
|
||||
/* glXCreateNewContext render_type attribute values */
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_RGBA_TYPE_SGIX GLX_RGBA_TYPE
|
||||
#define GLX_COLOR_INDEX_TYPE_SGIX GLX_COLOR_INDEX_TYPE
|
||||
|
||||
/* glXQueryContext attributes */
|
||||
/* #define GLX_FBCONFIG_ID 0x8013 */
|
||||
/* #define GLX_RENDER_TYPE 0x8011 */
|
||||
#define GLX_SCREEN 0x800C
|
||||
|
||||
/* glXSelectEvent event mask bits */
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_PBUFFER_CLOBBER_MASK_SGIX GLX_PBUFFER_CLOBBER_MASK
|
||||
|
||||
/* GLXPbufferClobberEvent event_type values */
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_DAMAGED_SGIX GLX_DAMAGED
|
||||
#define GLX_SAVED_SGIX GLX_SAVED
|
||||
|
||||
/* GLXPbufferClobberEvent draw_type values */
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_WINDOW_SGIX GLX_WINDOW
|
||||
#define GLX_PBUFFER_SGIX GLX_PBUFFER
|
||||
|
||||
/* GLXPbufferClobberEvent buffer_mask bits */
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#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_BACK_LEFT_BUFFER_BIT_SGIX GLX_BACK_LEFT_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_DEPTH_BUFFER_BIT_SGIX GLX_DEPTH_BUFFER_BIT
|
||||
#define GLX_STENCIL_BUFFER_BIT_SGIX GLX_STENCIL_BUFFER_BIT
|
||||
#define GLX_ACCUM_BUFFER_BIT_SGIX GLX_ACCUM_BUFFER_BIT
|
||||
|
||||
/*
|
||||
* Extension return values from glXGetConfig. These are also
|
||||
* accepted as parameter values for glXChooseVisual.
|
||||
*/
|
||||
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* 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_GREEN_VALUE_EXT 0x26 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */
|
||||
|
||||
/* Property values for visual_type */
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
|
||||
/* Property values for transparent pixel */
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
|
||||
/* Property values for visual_rating */
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
|
||||
/*
|
||||
* Names for attributes to glXGetClientString.
|
||||
*/
|
||||
#define GLX_VENDOR 0x1
|
||||
#define GLX_VERSION 0x2
|
||||
#define GLX_EXTENSIONS 0x3
|
||||
|
||||
/*
|
||||
* Names for attributes to glXQueryContextInfoEXT.
|
||||
*/
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */
|
||||
#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */
|
||||
#define GLX_SCREEN_EXT 0x800C /* screen number */
|
||||
|
||||
/* NV_float_buffer */
|
||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__glxtokens_h__ */
|
||||
|
|
|
@ -1,205 +1,205 @@
|
|||
/*
|
||||
* tube.h
|
||||
*
|
||||
* FUNCTION:
|
||||
* Tubing and Extrusion header file.
|
||||
* This file provides protypes and defines for the extrusion
|
||||
* and tubing primitives.
|
||||
*
|
||||
* HISTORY:
|
||||
* Linas Vepstas 1990, 1991
|
||||
*/
|
||||
|
||||
#ifndef __TUBE_H__
|
||||
#define __TUBE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
GLE API revision history:
|
||||
|
||||
GLE_API_VERSION is updated to reflect GLE API changes (interface
|
||||
changes, semantic changes, deletions, or additions).
|
||||
|
||||
GLE_API_VERSION=228 GLUT 3.7 release of GLE.
|
||||
**/
|
||||
#ifndef GLE_API_VERSION /* allow this to be overriden */
|
||||
#define GLE_API_VERSION 228
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define OPENGL_10
|
||||
#endif
|
||||
|
||||
/* some types */
|
||||
#define gleDouble double
|
||||
typedef gleDouble gleAffine[2][3];
|
||||
|
||||
/* ====================================================== */
|
||||
|
||||
/* defines for tubing join styles */
|
||||
#define TUBE_JN_RAW 0x1
|
||||
#define TUBE_JN_ANGLE 0x2
|
||||
#define TUBE_JN_CUT 0x3
|
||||
#define TUBE_JN_ROUND 0x4
|
||||
#define TUBE_JN_MASK 0xf /* mask bits */
|
||||
#define TUBE_JN_CAP 0x10
|
||||
|
||||
/* determine how normal vectors are to be handled */
|
||||
#define TUBE_NORM_FACET 0x100
|
||||
#define TUBE_NORM_EDGE 0x200
|
||||
#define TUBE_NORM_PATH_EDGE 0x400 /* for spiral, lathe, helix primitives */
|
||||
#define TUBE_NORM_MASK 0xf00 /* mask bits */
|
||||
|
||||
/* closed or open countours */
|
||||
#define TUBE_CONTOUR_CLOSED 0x1000
|
||||
|
||||
#define GLE_TEXTURE_ENABLE 0x10000
|
||||
#define GLE_TEXTURE_STYLE_MASK 0xff
|
||||
#define GLE_TEXTURE_VERTEX_FLAT 1
|
||||
#define GLE_TEXTURE_NORMAL_FLAT 2
|
||||
#define GLE_TEXTURE_VERTEX_CYL 3
|
||||
#define GLE_TEXTURE_NORMAL_CYL 4
|
||||
#define GLE_TEXTURE_VERTEX_SPH 5
|
||||
#define GLE_TEXTURE_NORMAL_SPH 6
|
||||
#define GLE_TEXTURE_VERTEX_MODEL_FLAT 7
|
||||
#define GLE_TEXTURE_NORMAL_MODEL_FLAT 8
|
||||
#define GLE_TEXTURE_VERTEX_MODEL_CYL 9
|
||||
#define GLE_TEXTURE_NORMAL_MODEL_CYL 10
|
||||
#define GLE_TEXTURE_VERTEX_MODEL_SPH 11
|
||||
#define GLE_TEXTURE_NORMAL_MODEL_SPH 12
|
||||
|
||||
#ifdef GL_32
|
||||
/* HACK for GL 3.2 -- needed because no way to tell if lighting is on. */
|
||||
#define TUBE_LIGHTING_ON 0x80000000
|
||||
|
||||
#define gleExtrusion extrusion
|
||||
#define gleSetJoinStyle setjoinstyle
|
||||
#define gleGetJoinStyle getjoinstyle
|
||||
#define glePolyCone polycone
|
||||
#define glePolyCylinder polycylinder
|
||||
#define gleSuperExtrusion super_extrusion
|
||||
#define gleTwistExtrusion twist_extrusion
|
||||
#define gleSpiral spiral
|
||||
#define gleLathe lathe
|
||||
#define gleHelicoid helicoid
|
||||
#define gleToroid toroid
|
||||
#define gleScrew screw
|
||||
|
||||
#endif /* GL_32 */
|
||||
|
||||
extern int gleGetJoinStyle (void);
|
||||
extern void gleSetJoinStyle (int style); /* bitwise OR of flags */
|
||||
extern int gleGetNumSlices(void);
|
||||
extern void gleSetNumSlices(int slices);
|
||||
|
||||
/* draw polyclinder, specified as a polyline */
|
||||
extern void glePolyCylinder (int npoints, /* num points in polyline */
|
||||
gleDouble point_array[][3], /* polyline vertces */
|
||||
float color_array[][3], /* colors at polyline verts */
|
||||
gleDouble radius); /* radius of polycylinder */
|
||||
|
||||
/* draw polycone, specified as a polyline with radii */
|
||||
extern void glePolyCone (int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3], /* colors at polyline verts */
|
||||
gleDouble radius_array[]); /* cone radii at polyline verts */
|
||||
|
||||
/* extrude arbitrary 2D contour along arbitrary 3D path */
|
||||
extern void gleExtrusion (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3]); /* colors at polyline verts */
|
||||
|
||||
/* extrude 2D contour, specifying local rotations (twists) */
|
||||
extern void gleTwistExtrusion (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3], /* color at polyline verts */
|
||||
gleDouble twist_array[]); /* countour twists (in degrees) */
|
||||
|
||||
/* extrude 2D contour, specifying local affine tranformations */
|
||||
extern void gleSuperExtrusion (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3], /* color at polyline verts */
|
||||
gleDouble xform_array[][2][3]); /* 2D contour xforms */
|
||||
|
||||
/* spiral moves contour along helical path by parallel transport */
|
||||
extern void gleSpiral (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* lathe moves contour along helical path by helically shearing 3D space */
|
||||
extern void gleLathe (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* similar to spiral, except contour is a circle */
|
||||
extern void gleHelicoid (gleDouble rToroid, /* circle contour (torus) radius */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* similar to lathe, except contour is a circle */
|
||||
extern void gleToroid (gleDouble rToroid, /* circle contour (torus) radius */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* draws a screw shape */
|
||||
extern void gleScrew (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
gleDouble startz, /* start of segment */
|
||||
gleDouble endz, /* end of segment */
|
||||
gleDouble twist); /* number of rotations */
|
||||
|
||||
extern void gleTextureMode (int mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* __TUBE_H__ */
|
||||
/* ================== END OF FILE ======================= */
|
||||
/*
|
||||
* tube.h
|
||||
*
|
||||
* FUNCTION:
|
||||
* Tubing and Extrusion header file.
|
||||
* This file provides protypes and defines for the extrusion
|
||||
* and tubing primitives.
|
||||
*
|
||||
* HISTORY:
|
||||
* Linas Vepstas 1990, 1991
|
||||
*/
|
||||
|
||||
#ifndef __TUBE_H__
|
||||
#define __TUBE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
GLE API revision history:
|
||||
|
||||
GLE_API_VERSION is updated to reflect GLE API changes (interface
|
||||
changes, semantic changes, deletions, or additions).
|
||||
|
||||
GLE_API_VERSION=228 GLUT 3.7 release of GLE.
|
||||
**/
|
||||
#ifndef GLE_API_VERSION /* allow this to be overriden */
|
||||
#define GLE_API_VERSION 228
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define OPENGL_10
|
||||
#endif
|
||||
|
||||
/* some types */
|
||||
#define gleDouble double
|
||||
typedef gleDouble gleAffine[2][3];
|
||||
|
||||
/* ====================================================== */
|
||||
|
||||
/* defines for tubing join styles */
|
||||
#define TUBE_JN_RAW 0x1
|
||||
#define TUBE_JN_ANGLE 0x2
|
||||
#define TUBE_JN_CUT 0x3
|
||||
#define TUBE_JN_ROUND 0x4
|
||||
#define TUBE_JN_MASK 0xf /* mask bits */
|
||||
#define TUBE_JN_CAP 0x10
|
||||
|
||||
/* determine how normal vectors are to be handled */
|
||||
#define TUBE_NORM_FACET 0x100
|
||||
#define TUBE_NORM_EDGE 0x200
|
||||
#define TUBE_NORM_PATH_EDGE 0x400 /* for spiral, lathe, helix primitives */
|
||||
#define TUBE_NORM_MASK 0xf00 /* mask bits */
|
||||
|
||||
/* closed or open countours */
|
||||
#define TUBE_CONTOUR_CLOSED 0x1000
|
||||
|
||||
#define GLE_TEXTURE_ENABLE 0x10000
|
||||
#define GLE_TEXTURE_STYLE_MASK 0xff
|
||||
#define GLE_TEXTURE_VERTEX_FLAT 1
|
||||
#define GLE_TEXTURE_NORMAL_FLAT 2
|
||||
#define GLE_TEXTURE_VERTEX_CYL 3
|
||||
#define GLE_TEXTURE_NORMAL_CYL 4
|
||||
#define GLE_TEXTURE_VERTEX_SPH 5
|
||||
#define GLE_TEXTURE_NORMAL_SPH 6
|
||||
#define GLE_TEXTURE_VERTEX_MODEL_FLAT 7
|
||||
#define GLE_TEXTURE_NORMAL_MODEL_FLAT 8
|
||||
#define GLE_TEXTURE_VERTEX_MODEL_CYL 9
|
||||
#define GLE_TEXTURE_NORMAL_MODEL_CYL 10
|
||||
#define GLE_TEXTURE_VERTEX_MODEL_SPH 11
|
||||
#define GLE_TEXTURE_NORMAL_MODEL_SPH 12
|
||||
|
||||
#ifdef GL_32
|
||||
/* HACK for GL 3.2 -- needed because no way to tell if lighting is on. */
|
||||
#define TUBE_LIGHTING_ON 0x80000000
|
||||
|
||||
#define gleExtrusion extrusion
|
||||
#define gleSetJoinStyle setjoinstyle
|
||||
#define gleGetJoinStyle getjoinstyle
|
||||
#define glePolyCone polycone
|
||||
#define glePolyCylinder polycylinder
|
||||
#define gleSuperExtrusion super_extrusion
|
||||
#define gleTwistExtrusion twist_extrusion
|
||||
#define gleSpiral spiral
|
||||
#define gleLathe lathe
|
||||
#define gleHelicoid helicoid
|
||||
#define gleToroid toroid
|
||||
#define gleScrew screw
|
||||
|
||||
#endif /* GL_32 */
|
||||
|
||||
extern int gleGetJoinStyle (void);
|
||||
extern void gleSetJoinStyle (int style); /* bitwise OR of flags */
|
||||
extern int gleGetNumSlices(void);
|
||||
extern void gleSetNumSlices(int slices);
|
||||
|
||||
/* draw polyclinder, specified as a polyline */
|
||||
extern void glePolyCylinder (int npoints, /* num points in polyline */
|
||||
gleDouble point_array[][3], /* polyline vertces */
|
||||
float color_array[][3], /* colors at polyline verts */
|
||||
gleDouble radius); /* radius of polycylinder */
|
||||
|
||||
/* draw polycone, specified as a polyline with radii */
|
||||
extern void glePolyCone (int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3], /* colors at polyline verts */
|
||||
gleDouble radius_array[]); /* cone radii at polyline verts */
|
||||
|
||||
/* extrude arbitrary 2D contour along arbitrary 3D path */
|
||||
extern void gleExtrusion (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3]); /* colors at polyline verts */
|
||||
|
||||
/* extrude 2D contour, specifying local rotations (twists) */
|
||||
extern void gleTwistExtrusion (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3], /* color at polyline verts */
|
||||
gleDouble twist_array[]); /* countour twists (in degrees) */
|
||||
|
||||
/* extrude 2D contour, specifying local affine tranformations */
|
||||
extern void gleSuperExtrusion (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
int npoints, /* numpoints in poly-line */
|
||||
gleDouble point_array[][3], /* polyline vertices */
|
||||
float color_array[][3], /* color at polyline verts */
|
||||
gleDouble xform_array[][2][3]); /* 2D contour xforms */
|
||||
|
||||
/* spiral moves contour along helical path by parallel transport */
|
||||
extern void gleSpiral (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* lathe moves contour along helical path by helically shearing 3D space */
|
||||
extern void gleLathe (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* similar to spiral, except contour is a circle */
|
||||
extern void gleHelicoid (gleDouble rToroid, /* circle contour (torus) radius */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* similar to lathe, except contour is a circle */
|
||||
extern void gleToroid (gleDouble rToroid, /* circle contour (torus) radius */
|
||||
gleDouble startRadius, /* spiral starts in x-y plane */
|
||||
gleDouble drdTheta, /* change in radius per revolution */
|
||||
gleDouble startZ, /* starting z value */
|
||||
gleDouble dzdTheta, /* change in Z per revolution */
|
||||
gleDouble startXform[2][3], /* starting contour affine xform */
|
||||
gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
|
||||
gleDouble startTheta, /* start angle in x-y plane */
|
||||
gleDouble sweepTheta); /* degrees to spiral around */
|
||||
|
||||
/* draws a screw shape */
|
||||
extern void gleScrew (int ncp, /* number of contour points */
|
||||
gleDouble contour[][2], /* 2D contour */
|
||||
gleDouble cont_normal[][2], /* 2D contour normals */
|
||||
gleDouble up[3], /* up vector for contour */
|
||||
gleDouble startz, /* start of segment */
|
||||
gleDouble endz, /* end of segment */
|
||||
gleDouble twist); /* number of rotations */
|
||||
|
||||
extern void gleTextureMode (int mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* __TUBE_H__ */
|
||||
/* ================== END OF FILE ======================= */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,58 +1,58 @@
|
|||
#ifndef __win32_glx_h__
|
||||
#define __win32_glx_h__
|
||||
|
||||
/* Copyright (c) Nate Robins, 1997. */
|
||||
|
||||
/* This program is freely distributable without licensing fees
|
||||
and is provided without guarantee or warrantee expressed or
|
||||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#include "win32_x11.h"
|
||||
|
||||
/* Type definitions (conversions). */
|
||||
typedef HGLRC GLXContext;
|
||||
|
||||
#define GLX_USE_GL 1 /* support GLX rendering */
|
||||
#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
|
||||
#define GLX_LEVEL 3 /* level in plane stacking */
|
||||
#define GLX_RGBA 4 /* true if RGBA mode */
|
||||
#define GLX_DOUBLEBUFFER 5 /* double buffering supported */
|
||||
#define GLX_STEREO 6 /* stereo buffering supported */
|
||||
#define GLX_AUX_BUFFERS 7 /* number of aux buffers */
|
||||
#define GLX_RED_SIZE 8 /* number of red component bits */
|
||||
#define GLX_GREEN_SIZE 9 /* number of green component bits */
|
||||
#define GLX_BLUE_SIZE 10 /* number of blue component bits */
|
||||
#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
|
||||
#define GLX_DEPTH_SIZE 12 /* number of depth bits */
|
||||
#define GLX_STENCIL_SIZE 13 /* number of stencil 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_BLUE_SIZE 16 /* number of blue accum bits */
|
||||
#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */
|
||||
|
||||
#define GLX_BAD_ATTRIB 2
|
||||
#define GLX_BAD_VISUAL 4
|
||||
|
||||
/* Functions emulated by macros. */
|
||||
|
||||
#define glXDestroyContext(display, context) \
|
||||
wglDeleteContext(context)
|
||||
|
||||
/* Function prototypes. */
|
||||
|
||||
extern GLXContext glXCreateContext(
|
||||
Display* display,
|
||||
XVisualInfo* visinfo,
|
||||
GLXContext share,
|
||||
Bool direct);
|
||||
extern int glXGetConfig(
|
||||
Display* display,
|
||||
XVisualInfo* visual,
|
||||
int attrib,
|
||||
int* value);
|
||||
extern XVisualInfo* glXChooseVisual(
|
||||
Display* display,
|
||||
int screen,
|
||||
int* attribList);
|
||||
|
||||
#endif /* __win32_glx_h__ */
|
||||
#ifndef __win32_glx_h__
|
||||
#define __win32_glx_h__
|
||||
|
||||
/* Copyright (c) Nate Robins, 1997. */
|
||||
|
||||
/* This program is freely distributable without licensing fees
|
||||
and is provided without guarantee or warrantee expressed or
|
||||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#include "win32_x11.h"
|
||||
|
||||
/* Type definitions (conversions). */
|
||||
typedef HGLRC GLXContext;
|
||||
|
||||
#define GLX_USE_GL 1 /* support GLX rendering */
|
||||
#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
|
||||
#define GLX_LEVEL 3 /* level in plane stacking */
|
||||
#define GLX_RGBA 4 /* true if RGBA mode */
|
||||
#define GLX_DOUBLEBUFFER 5 /* double buffering supported */
|
||||
#define GLX_STEREO 6 /* stereo buffering supported */
|
||||
#define GLX_AUX_BUFFERS 7 /* number of aux buffers */
|
||||
#define GLX_RED_SIZE 8 /* number of red component bits */
|
||||
#define GLX_GREEN_SIZE 9 /* number of green component bits */
|
||||
#define GLX_BLUE_SIZE 10 /* number of blue component bits */
|
||||
#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
|
||||
#define GLX_DEPTH_SIZE 12 /* number of depth bits */
|
||||
#define GLX_STENCIL_SIZE 13 /* number of stencil 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_BLUE_SIZE 16 /* number of blue accum bits */
|
||||
#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */
|
||||
|
||||
#define GLX_BAD_ATTRIB 2
|
||||
#define GLX_BAD_VISUAL 4
|
||||
|
||||
/* Functions emulated by macros. */
|
||||
|
||||
#define glXDestroyContext(display, context) \
|
||||
wglDeleteContext(context)
|
||||
|
||||
/* Function prototypes. */
|
||||
|
||||
extern GLXContext glXCreateContext(
|
||||
Display* display,
|
||||
XVisualInfo* visinfo,
|
||||
GLXContext share,
|
||||
Bool direct);
|
||||
extern int glXGetConfig(
|
||||
Display* display,
|
||||
XVisualInfo* visual,
|
||||
int attrib,
|
||||
int* value);
|
||||
extern XVisualInfo* glXChooseVisual(
|
||||
Display* display,
|
||||
int screen,
|
||||
int* attribList);
|
||||
|
||||
#endif /* __win32_glx_h__ */
|
||||
|
|
|
@ -1,319 +1,319 @@
|
|||
#ifndef __win32_x11_h__
|
||||
#define __win32_x11_h__
|
||||
|
||||
/* Copyright (c) Nate Robins, 1997. */
|
||||
|
||||
/* This program is freely distributable without licensing fees
|
||||
and is provided without guarantee or warrantee expressed or
|
||||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
/* Type definitions (conversions) */
|
||||
typedef int Visual; /* Win32 equivalent of X11 type */
|
||||
typedef HWND Window;
|
||||
typedef HPALETTE Colormap;
|
||||
typedef PIXELFORMATDESCRIPTOR XVisualInfo;
|
||||
typedef BOOL Bool;
|
||||
typedef MSG XEvent;
|
||||
typedef HDC Display;
|
||||
typedef HCURSOR Cursor;
|
||||
|
||||
typedef int Atom; /* dummies */
|
||||
typedef int XDevice;
|
||||
typedef int Status;
|
||||
|
||||
#define True TRUE /* Win32 equivalents of X11 booleans */
|
||||
#define False FALSE
|
||||
|
||||
#define None 0L /* universal null resource or null atom */
|
||||
|
||||
/* Input Event Masks. Used as event-mask window attribute and as arguments
|
||||
to Grab requests. Not to be confused with event names. */
|
||||
|
||||
#define NoEventMask 0L
|
||||
#define KeyPressMask (1L<<0)
|
||||
#define KeyReleaseMask (1L<<1)
|
||||
#define ButtonPressMask (1L<<2)
|
||||
#define ButtonReleaseMask (1L<<3)
|
||||
#define EnterWindowMask (1L<<4)
|
||||
#define LeaveWindowMask (1L<<5)
|
||||
#define PointerMotionMask (1L<<6)
|
||||
#define PointerMotionHintMask (1L<<7)
|
||||
#define Button1MotionMask (1L<<8)
|
||||
#define Button2MotionMask (1L<<9)
|
||||
#define Button3MotionMask (1L<<10)
|
||||
#define Button4MotionMask (1L<<11)
|
||||
#define Button5MotionMask (1L<<12)
|
||||
#define ButtonMotionMask (1L<<13)
|
||||
#define KeymapStateMask (1L<<14)
|
||||
#define ExposureMask (1L<<15)
|
||||
#define VisibilityChangeMask (1L<<16)
|
||||
#define StructureNotifyMask (1L<<17)
|
||||
#define ResizeRedirectMask (1L<<18)
|
||||
#define SubstructureNotifyMask (1L<<19)
|
||||
#define SubstructureRedirectMask (1L<<20)
|
||||
#define FocusChangeMask (1L<<21)
|
||||
#define PropertyChangeMask (1L<<22)
|
||||
#define ColormapChangeMask (1L<<23)
|
||||
#define OwnerGrabButtonMask (1L<<24)
|
||||
|
||||
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of
|
||||
QueryPointer, state in various key-, mouse-, and button-related
|
||||
events. */
|
||||
|
||||
#define ShiftMask (1<<0)
|
||||
#define LockMask (1<<1)
|
||||
#define ControlMask (1<<2)
|
||||
#define Mod1Mask (1<<3)
|
||||
#define Mod2Mask (1<<4)
|
||||
#define Mod3Mask (1<<5)
|
||||
#define Mod4Mask (1<<6)
|
||||
#define Mod5Mask (1<<7)
|
||||
|
||||
/* Window classes used by CreateWindow */
|
||||
/* Note that CopyFromParent is already defined as 0 above */
|
||||
|
||||
#define InputOutput 1
|
||||
#define InputOnly 2
|
||||
|
||||
/* Window attributes for CreateWindow and ChangeWindowAttributes */
|
||||
|
||||
#define CWBackPixmap (1L<<0)
|
||||
#define CWBackPixel (1L<<1)
|
||||
#define CWBorderPixmap (1L<<2)
|
||||
#define CWBorderPixel (1L<<3)
|
||||
#define CWBitGravity (1L<<4)
|
||||
#define CWWinGravity (1L<<5)
|
||||
#define CWBackingStore (1L<<6)
|
||||
#define CWBackingPlanes (1L<<7)
|
||||
#define CWBackingPixel (1L<<8)
|
||||
#define CWOverrideRedirect (1L<<9)
|
||||
#define CWSaveUnder (1L<<10)
|
||||
#define CWEventMask (1L<<11)
|
||||
#define CWDontPropagate (1L<<12)
|
||||
#define CWColormap (1L<<13)
|
||||
#define CWCursor (1L<<14)
|
||||
|
||||
/* ConfigureWindow structure */
|
||||
|
||||
#define CWX (1<<0)
|
||||
#define CWY (1<<1)
|
||||
#define CWWidth (1<<2)
|
||||
#define CWHeight (1<<3)
|
||||
#define CWBorderWidth (1<<4)
|
||||
#define CWSibling (1<<5)
|
||||
#define CWStackMode (1<<6)
|
||||
|
||||
|
||||
/* Used in GetWindowAttributes reply */
|
||||
|
||||
#define IsUnmapped 0
|
||||
#define IsUnviewable 1
|
||||
#define IsViewable 2
|
||||
|
||||
/* Window stacking method (in configureWindow) */
|
||||
|
||||
#define Above 0
|
||||
#define Below 1
|
||||
#define TopIf 2
|
||||
#define BottomIf 3
|
||||
#define Opposite 4
|
||||
|
||||
/* For CreateColormap */
|
||||
|
||||
#define AllocNone 0 /* create map with no entries */
|
||||
#define AllocAll 1 /* allocate entire map writeable */
|
||||
|
||||
|
||||
/* Flags used in StoreNamedColor, StoreColors */
|
||||
|
||||
#define DoRed (1<<0)
|
||||
#define DoGreen (1<<1)
|
||||
#define DoBlue (1<<2)
|
||||
|
||||
/*
|
||||
* Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
|
||||
* value (x, y, width, height) was found in the parsed string.
|
||||
*/
|
||||
#define NoValue 0x0000
|
||||
#define XValue 0x0001
|
||||
#define YValue 0x0002
|
||||
#define WidthValue 0x0004
|
||||
#define HeightValue 0x0008
|
||||
#define AllValues 0x000F
|
||||
#define XNegative 0x0010
|
||||
#define YNegative 0x0020
|
||||
|
||||
/* flags argument in size hints */
|
||||
#define USPosition (1L << 0) /* user specified x, y */
|
||||
#define USSize (1L << 1) /* user specified width, height */
|
||||
|
||||
/* definitions for initial window state */
|
||||
#define WithdrawnState 0 /* for windows that are not mapped */
|
||||
#define NormalState 1 /* most applications want to start this way */
|
||||
#define IconicState 3 /* application wants to start as an icon */
|
||||
#define GameModeState 4 /* Win32 GLUT only (not in Xlib!). */
|
||||
|
||||
/* Type definitions */
|
||||
|
||||
typedef struct {
|
||||
unsigned int background_pixmap; /* background pixmap */
|
||||
unsigned long background_pixel; /* background pixel */
|
||||
unsigned long border_pixel; /* border pixel value */
|
||||
long event_mask; /* set of events that should be saved */
|
||||
long do_not_propagate_mask; /* set of events that should not propagate */
|
||||
Bool override_redirect; /* boolean value for override-redirect */
|
||||
Colormap colormap; /* color map to be associated with window */
|
||||
} XSetWindowAttributes;
|
||||
|
||||
typedef struct {
|
||||
unsigned long pixel;
|
||||
unsigned short red, green, blue;
|
||||
char flags; /* do_red, do_green, do_blue */
|
||||
} XColor;
|
||||
|
||||
typedef struct {
|
||||
unsigned char *value; /* same as Property routines */
|
||||
Atom encoding; /* prop type */
|
||||
int format; /* prop data format: 8, 16, or 32 */
|
||||
unsigned long nitems; /* number of data items in value */
|
||||
} XTextProperty;
|
||||
|
||||
typedef struct {
|
||||
long flags; /* marks which fields in this structure are defined */
|
||||
int x, y; /* obsolete for new window mgrs, but clients */
|
||||
int width, height; /* should set so old wm's don't mess up */
|
||||
} XSizeHints;
|
||||
|
||||
/* Functions emulated by macros. */
|
||||
|
||||
#define XFreeColormap(display, colormap) \
|
||||
DeleteObject(colormap)
|
||||
|
||||
#define XCreateFontCursor(display, shape) \
|
||||
LoadCursor(NULL, shape)
|
||||
|
||||
#define XDefineCursor(display, window, cursor) \
|
||||
SetCursor(cursor)
|
||||
|
||||
#define XFlush(display) \
|
||||
/* Nothing. */
|
||||
|
||||
#define DisplayWidth(display, screen) \
|
||||
GetSystemMetrics(SM_CXSCREEN)
|
||||
|
||||
#define DisplayHeight(display, screen) \
|
||||
GetSystemMetrics(SM_CYSCREEN)
|
||||
|
||||
#define XMapWindow(display, window) \
|
||||
ShowWindow(window, SW_SHOWNORMAL)
|
||||
|
||||
#define XUnmapWindow(display, window) \
|
||||
ShowWindow(window, SW_HIDE)
|
||||
|
||||
#define XIconifyWindow(display, window, screen) \
|
||||
ShowWindow(window, SW_MINIMIZE)
|
||||
|
||||
#define XWithdrawWindow(display, window, screen) \
|
||||
ShowWindow(window, SW_HIDE)
|
||||
|
||||
#define XLowerWindow(display, window) \
|
||||
SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
|
||||
|
||||
#define XSetWMName(display, window, tp) \
|
||||
SetWindowText(window, (tp)->value)
|
||||
|
||||
/* There really isn't a way to set the icon name separate from the
|
||||
windows name in Win32, so, just set the windows name. */
|
||||
#define XSetWMIconName(display, window, tp) \
|
||||
XSetWMName(display, window, tp)
|
||||
|
||||
#define XDestroyWindow(display, window) \
|
||||
DestroyWindow(window)
|
||||
|
||||
/* Anything that needs to be freed was allocated with malloc in our
|
||||
fake X windows library for Win32, so free it with plain old
|
||||
free(). */
|
||||
#define XFree(data) \
|
||||
free(data)
|
||||
|
||||
/* Nothing to be done for this...the pointer is always 'ungrabbed'
|
||||
in Win32. */
|
||||
#define XUngrabPointer(display, time) \
|
||||
/* Nothing. */
|
||||
|
||||
/* Function prototypes. */
|
||||
|
||||
extern XVisualInfo* XGetVisualInfo(
|
||||
Display* display,
|
||||
long mask,
|
||||
XVisualInfo* ttemplate, /* Avoid class with C++ keyword. */
|
||||
int*nitems);
|
||||
|
||||
extern Colormap XCreateColormap(
|
||||
Display* display,
|
||||
Window root,
|
||||
Visual* visual,
|
||||
int alloc);
|
||||
|
||||
extern void XAllocColorCells(
|
||||
Display* display,
|
||||
Colormap colormap,
|
||||
Bool contig,
|
||||
unsigned long plane_masks_return[],
|
||||
unsigned int nplanes,
|
||||
unsigned long pixels_return[],
|
||||
unsigned int npixels);
|
||||
|
||||
extern void XStoreColor(
|
||||
Display* display,
|
||||
Colormap colormap,
|
||||
XColor* color);
|
||||
|
||||
extern void XSetWindowColormap(
|
||||
Display* display,
|
||||
Window window,
|
||||
Colormap colormap);
|
||||
|
||||
extern Bool XTranslateCoordinates(
|
||||
Display *display,
|
||||
Window src, Window dst,
|
||||
int src_x, int src_y,
|
||||
int* dest_x_return, int* dest_y_return,
|
||||
Window* child_return);
|
||||
|
||||
extern Status XGetGeometry(
|
||||
Display* display,
|
||||
Window window,
|
||||
Window* root_return,
|
||||
int* x_return, int* y_return,
|
||||
unsigned int* width_return, unsigned int* height_return,
|
||||
unsigned int *border_width_return,
|
||||
unsigned int* depth_return);
|
||||
|
||||
extern int DisplayWidthMM(
|
||||
Display* display,
|
||||
int screen);
|
||||
|
||||
extern int DisplayHeightMM(
|
||||
Display* display,
|
||||
int screen);
|
||||
|
||||
extern void XWarpPointer(
|
||||
Display* display,
|
||||
Window src, Window dst,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dst_x, int dst_y);
|
||||
|
||||
extern int XParseGeometry(
|
||||
char* string,
|
||||
int* x, int* y,
|
||||
unsigned int* width, unsigned int* height);
|
||||
|
||||
extern int XPending(
|
||||
Display* display);
|
||||
|
||||
#endif /* __win32_x11_h__ */
|
||||
#ifndef __win32_x11_h__
|
||||
#define __win32_x11_h__
|
||||
|
||||
/* Copyright (c) Nate Robins, 1997. */
|
||||
|
||||
/* This program is freely distributable without licensing fees
|
||||
and is provided without guarantee or warrantee expressed or
|
||||
implied. This program is -not- in the public domain. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
/* Type definitions (conversions) */
|
||||
typedef int Visual; /* Win32 equivalent of X11 type */
|
||||
typedef HWND Window;
|
||||
typedef HPALETTE Colormap;
|
||||
typedef PIXELFORMATDESCRIPTOR XVisualInfo;
|
||||
typedef BOOL Bool;
|
||||
typedef MSG XEvent;
|
||||
typedef HDC Display;
|
||||
typedef HCURSOR Cursor;
|
||||
|
||||
typedef int Atom; /* dummies */
|
||||
typedef int XDevice;
|
||||
typedef int Status;
|
||||
|
||||
#define True TRUE /* Win32 equivalents of X11 booleans */
|
||||
#define False FALSE
|
||||
|
||||
#define None 0L /* universal null resource or null atom */
|
||||
|
||||
/* Input Event Masks. Used as event-mask window attribute and as arguments
|
||||
to Grab requests. Not to be confused with event names. */
|
||||
|
||||
#define NoEventMask 0L
|
||||
#define KeyPressMask (1L<<0)
|
||||
#define KeyReleaseMask (1L<<1)
|
||||
#define ButtonPressMask (1L<<2)
|
||||
#define ButtonReleaseMask (1L<<3)
|
||||
#define EnterWindowMask (1L<<4)
|
||||
#define LeaveWindowMask (1L<<5)
|
||||
#define PointerMotionMask (1L<<6)
|
||||
#define PointerMotionHintMask (1L<<7)
|
||||
#define Button1MotionMask (1L<<8)
|
||||
#define Button2MotionMask (1L<<9)
|
||||
#define Button3MotionMask (1L<<10)
|
||||
#define Button4MotionMask (1L<<11)
|
||||
#define Button5MotionMask (1L<<12)
|
||||
#define ButtonMotionMask (1L<<13)
|
||||
#define KeymapStateMask (1L<<14)
|
||||
#define ExposureMask (1L<<15)
|
||||
#define VisibilityChangeMask (1L<<16)
|
||||
#define StructureNotifyMask (1L<<17)
|
||||
#define ResizeRedirectMask (1L<<18)
|
||||
#define SubstructureNotifyMask (1L<<19)
|
||||
#define SubstructureRedirectMask (1L<<20)
|
||||
#define FocusChangeMask (1L<<21)
|
||||
#define PropertyChangeMask (1L<<22)
|
||||
#define ColormapChangeMask (1L<<23)
|
||||
#define OwnerGrabButtonMask (1L<<24)
|
||||
|
||||
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of
|
||||
QueryPointer, state in various key-, mouse-, and button-related
|
||||
events. */
|
||||
|
||||
#define ShiftMask (1<<0)
|
||||
#define LockMask (1<<1)
|
||||
#define ControlMask (1<<2)
|
||||
#define Mod1Mask (1<<3)
|
||||
#define Mod2Mask (1<<4)
|
||||
#define Mod3Mask (1<<5)
|
||||
#define Mod4Mask (1<<6)
|
||||
#define Mod5Mask (1<<7)
|
||||
|
||||
/* Window classes used by CreateWindow */
|
||||
/* Note that CopyFromParent is already defined as 0 above */
|
||||
|
||||
#define InputOutput 1
|
||||
#define InputOnly 2
|
||||
|
||||
/* Window attributes for CreateWindow and ChangeWindowAttributes */
|
||||
|
||||
#define CWBackPixmap (1L<<0)
|
||||
#define CWBackPixel (1L<<1)
|
||||
#define CWBorderPixmap (1L<<2)
|
||||
#define CWBorderPixel (1L<<3)
|
||||
#define CWBitGravity (1L<<4)
|
||||
#define CWWinGravity (1L<<5)
|
||||
#define CWBackingStore (1L<<6)
|
||||
#define CWBackingPlanes (1L<<7)
|
||||
#define CWBackingPixel (1L<<8)
|
||||
#define CWOverrideRedirect (1L<<9)
|
||||
#define CWSaveUnder (1L<<10)
|
||||
#define CWEventMask (1L<<11)
|
||||
#define CWDontPropagate (1L<<12)
|
||||
#define CWColormap (1L<<13)
|
||||
#define CWCursor (1L<<14)
|
||||
|
||||
/* ConfigureWindow structure */
|
||||
|
||||
#define CWX (1<<0)
|
||||
#define CWY (1<<1)
|
||||
#define CWWidth (1<<2)
|
||||
#define CWHeight (1<<3)
|
||||
#define CWBorderWidth (1<<4)
|
||||
#define CWSibling (1<<5)
|
||||
#define CWStackMode (1<<6)
|
||||
|
||||
|
||||
/* Used in GetWindowAttributes reply */
|
||||
|
||||
#define IsUnmapped 0
|
||||
#define IsUnviewable 1
|
||||
#define IsViewable 2
|
||||
|
||||
/* Window stacking method (in configureWindow) */
|
||||
|
||||
#define Above 0
|
||||
#define Below 1
|
||||
#define TopIf 2
|
||||
#define BottomIf 3
|
||||
#define Opposite 4
|
||||
|
||||
/* For CreateColormap */
|
||||
|
||||
#define AllocNone 0 /* create map with no entries */
|
||||
#define AllocAll 1 /* allocate entire map writeable */
|
||||
|
||||
|
||||
/* Flags used in StoreNamedColor, StoreColors */
|
||||
|
||||
#define DoRed (1<<0)
|
||||
#define DoGreen (1<<1)
|
||||
#define DoBlue (1<<2)
|
||||
|
||||
/*
|
||||
* Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
|
||||
* value (x, y, width, height) was found in the parsed string.
|
||||
*/
|
||||
#define NoValue 0x0000
|
||||
#define XValue 0x0001
|
||||
#define YValue 0x0002
|
||||
#define WidthValue 0x0004
|
||||
#define HeightValue 0x0008
|
||||
#define AllValues 0x000F
|
||||
#define XNegative 0x0010
|
||||
#define YNegative 0x0020
|
||||
|
||||
/* flags argument in size hints */
|
||||
#define USPosition (1L << 0) /* user specified x, y */
|
||||
#define USSize (1L << 1) /* user specified width, height */
|
||||
|
||||
/* definitions for initial window state */
|
||||
#define WithdrawnState 0 /* for windows that are not mapped */
|
||||
#define NormalState 1 /* most applications want to start this way */
|
||||
#define IconicState 3 /* application wants to start as an icon */
|
||||
#define GameModeState 4 /* Win32 GLUT only (not in Xlib!). */
|
||||
|
||||
/* Type definitions */
|
||||
|
||||
typedef struct {
|
||||
unsigned int background_pixmap; /* background pixmap */
|
||||
unsigned long background_pixel; /* background pixel */
|
||||
unsigned long border_pixel; /* border pixel value */
|
||||
long event_mask; /* set of events that should be saved */
|
||||
long do_not_propagate_mask; /* set of events that should not propagate */
|
||||
Bool override_redirect; /* boolean value for override-redirect */
|
||||
Colormap colormap; /* color map to be associated with window */
|
||||
} XSetWindowAttributes;
|
||||
|
||||
typedef struct {
|
||||
unsigned long pixel;
|
||||
unsigned short red, green, blue;
|
||||
char flags; /* do_red, do_green, do_blue */
|
||||
} XColor;
|
||||
|
||||
typedef struct {
|
||||
unsigned char *value; /* same as Property routines */
|
||||
Atom encoding; /* prop type */
|
||||
int format; /* prop data format: 8, 16, or 32 */
|
||||
unsigned long nitems; /* number of data items in value */
|
||||
} XTextProperty;
|
||||
|
||||
typedef struct {
|
||||
long flags; /* marks which fields in this structure are defined */
|
||||
int x, y; /* obsolete for new window mgrs, but clients */
|
||||
int width, height; /* should set so old wm's don't mess up */
|
||||
} XSizeHints;
|
||||
|
||||
/* Functions emulated by macros. */
|
||||
|
||||
#define XFreeColormap(display, colormap) \
|
||||
DeleteObject(colormap)
|
||||
|
||||
#define XCreateFontCursor(display, shape) \
|
||||
LoadCursor(NULL, shape)
|
||||
|
||||
#define XDefineCursor(display, window, cursor) \
|
||||
SetCursor(cursor)
|
||||
|
||||
#define XFlush(display) \
|
||||
/* Nothing. */
|
||||
|
||||
#define DisplayWidth(display, screen) \
|
||||
GetSystemMetrics(SM_CXSCREEN)
|
||||
|
||||
#define DisplayHeight(display, screen) \
|
||||
GetSystemMetrics(SM_CYSCREEN)
|
||||
|
||||
#define XMapWindow(display, window) \
|
||||
ShowWindow(window, SW_SHOWNORMAL)
|
||||
|
||||
#define XUnmapWindow(display, window) \
|
||||
ShowWindow(window, SW_HIDE)
|
||||
|
||||
#define XIconifyWindow(display, window, screen) \
|
||||
ShowWindow(window, SW_MINIMIZE)
|
||||
|
||||
#define XWithdrawWindow(display, window, screen) \
|
||||
ShowWindow(window, SW_HIDE)
|
||||
|
||||
#define XLowerWindow(display, window) \
|
||||
SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
|
||||
|
||||
#define XSetWMName(display, window, tp) \
|
||||
SetWindowText(window, (tp)->value)
|
||||
|
||||
/* There really isn't a way to set the icon name separate from the
|
||||
windows name in Win32, so, just set the windows name. */
|
||||
#define XSetWMIconName(display, window, tp) \
|
||||
XSetWMName(display, window, tp)
|
||||
|
||||
#define XDestroyWindow(display, window) \
|
||||
DestroyWindow(window)
|
||||
|
||||
/* Anything that needs to be freed was allocated with malloc in our
|
||||
fake X windows library for Win32, so free it with plain old
|
||||
free(). */
|
||||
#define XFree(data) \
|
||||
free(data)
|
||||
|
||||
/* Nothing to be done for this...the pointer is always 'ungrabbed'
|
||||
in Win32. */
|
||||
#define XUngrabPointer(display, time) \
|
||||
/* Nothing. */
|
||||
|
||||
/* Function prototypes. */
|
||||
|
||||
extern XVisualInfo* XGetVisualInfo(
|
||||
Display* display,
|
||||
long mask,
|
||||
XVisualInfo* ttemplate, /* Avoid class with C++ keyword. */
|
||||
int*nitems);
|
||||
|
||||
extern Colormap XCreateColormap(
|
||||
Display* display,
|
||||
Window root,
|
||||
Visual* visual,
|
||||
int alloc);
|
||||
|
||||
extern void XAllocColorCells(
|
||||
Display* display,
|
||||
Colormap colormap,
|
||||
Bool contig,
|
||||
unsigned long plane_masks_return[],
|
||||
unsigned int nplanes,
|
||||
unsigned long pixels_return[],
|
||||
unsigned int npixels);
|
||||
|
||||
extern void XStoreColor(
|
||||
Display* display,
|
||||
Colormap colormap,
|
||||
XColor* color);
|
||||
|
||||
extern void XSetWindowColormap(
|
||||
Display* display,
|
||||
Window window,
|
||||
Colormap colormap);
|
||||
|
||||
extern Bool XTranslateCoordinates(
|
||||
Display *display,
|
||||
Window src, Window dst,
|
||||
int src_x, int src_y,
|
||||
int* dest_x_return, int* dest_y_return,
|
||||
Window* child_return);
|
||||
|
||||
extern Status XGetGeometry(
|
||||
Display* display,
|
||||
Window window,
|
||||
Window* root_return,
|
||||
int* x_return, int* y_return,
|
||||
unsigned int* width_return, unsigned int* height_return,
|
||||
unsigned int *border_width_return,
|
||||
unsigned int* depth_return);
|
||||
|
||||
extern int DisplayWidthMM(
|
||||
Display* display,
|
||||
int screen);
|
||||
|
||||
extern int DisplayHeightMM(
|
||||
Display* display,
|
||||
int screen);
|
||||
|
||||
extern void XWarpPointer(
|
||||
Display* display,
|
||||
Window src, Window dst,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dst_x, int dst_y);
|
||||
|
||||
extern int XParseGeometry(
|
||||
char* string,
|
||||
int* x, int* y,
|
||||
unsigned int* width, unsigned int* height);
|
||||
|
||||
extern int XPending(
|
||||
Display* display);
|
||||
|
||||
#endif /* __win32_x11_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
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
|
@ -1,262 +1,262 @@
|
|||
// Windows Template Library - WTL version 8.0
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This file is a part of the Windows Template Library.
|
||||
// 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)
|
||||
// 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
|
||||
// the terms of this license. You must not remove this notice, or
|
||||
// any other, from this software.
|
||||
|
||||
#ifndef __ATLRES_H__
|
||||
#define __ATLRES_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32_WCE) && !defined(__ATLRESCE_H__)
|
||||
#error Use atlresCE.h instead of atlres.h for Windows CE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
#ifndef _INC_WINDOWS
|
||||
|
||||
#define _INC_WINDOWS
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#define VS_VERSION_INFO 1
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400 // default to Windows Version 4.0
|
||||
#endif // !WINVER
|
||||
|
||||
#include <winresrc.h>
|
||||
|
||||
// operation messages sent to DLGINIT
|
||||
#define LB_ADDSTRING (WM_USER+1)
|
||||
#define CB_ADDSTRING (WM_USER+3)
|
||||
#endif // !_WIN32_WCE
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#ifdef IDC_STATIC
|
||||
#undef IDC_STATIC
|
||||
#endif // IDC_STATIC
|
||||
#define IDC_STATIC (-1)
|
||||
|
||||
#endif // !_INC_WINDOWS
|
||||
#endif // RC_INVOKED
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ATL resource types
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#define RT_DLGINIT MAKEINTRESOURCE(240)
|
||||
#define RT_TOOLBAR MAKEINTRESOURCE(241)
|
||||
#endif // RC_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard window components
|
||||
|
||||
#define ID_SEPARATOR 0 // special separator value
|
||||
#define ID_DEFAULT_PANE 0 // default status bar pane
|
||||
|
||||
#ifndef RC_INVOKED // code only
|
||||
// standard control bars (IDW = window ID)
|
||||
#define ATL_IDW_TOOLBAR 0xE800 // main Toolbar for window
|
||||
#define ATL_IDW_STATUS_BAR 0xE801 // Status bar window
|
||||
#define ATL_IDW_COMMAND_BAR 0xE802 // Command bar window
|
||||
|
||||
// parts of a frame window
|
||||
#define ATL_IDW_CLIENT 0xE900
|
||||
#define ATL_IDW_PANE_FIRST 0xE900 // first pane (256 max)
|
||||
#define ATL_IDW_PANE_LAST 0xE9FF
|
||||
#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_SIZE_BOX 0xEA20 // size box for splitters
|
||||
#define ATL_IDW_PANE_SAVE 0xEA21 // to shift ATL_IDW_PANE_FIRST
|
||||
|
||||
// bands for a rebar
|
||||
#define ATL_IDW_BAND_FIRST 0xEB00
|
||||
#define ATL_IDW_BAND_LAST 0xEBFF
|
||||
#endif // !RC_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard Commands
|
||||
|
||||
// File commands
|
||||
#define ID_FILE_NEW 0xE100
|
||||
#define ID_FILE_OPEN 0xE101
|
||||
#define ID_FILE_CLOSE 0xE102
|
||||
#define ID_FILE_SAVE 0xE103
|
||||
#define ID_FILE_SAVE_AS 0xE104
|
||||
#define ID_FILE_PAGE_SETUP 0xE105
|
||||
#define ID_FILE_PRINT_SETUP 0xE106
|
||||
#define ID_FILE_PRINT 0xE107
|
||||
#define ID_FILE_PRINT_DIRECT 0xE108
|
||||
#define ID_FILE_PRINT_PREVIEW 0xE109
|
||||
#define ID_FILE_UPDATE 0xE10A
|
||||
#define ID_FILE_SAVE_COPY_AS 0xE10B
|
||||
#define ID_FILE_SEND_MAIL 0xE10C
|
||||
|
||||
#define ID_FILE_MRU_FIRST 0xE110
|
||||
#define ID_FILE_MRU_FILE1 0xE110 // range - 16 max
|
||||
#define ID_FILE_MRU_FILE2 0xE111
|
||||
#define ID_FILE_MRU_FILE3 0xE112
|
||||
#define ID_FILE_MRU_FILE4 0xE113
|
||||
#define ID_FILE_MRU_FILE5 0xE114
|
||||
#define ID_FILE_MRU_FILE6 0xE115
|
||||
#define ID_FILE_MRU_FILE7 0xE116
|
||||
#define ID_FILE_MRU_FILE8 0xE117
|
||||
#define ID_FILE_MRU_FILE9 0xE118
|
||||
#define ID_FILE_MRU_FILE10 0xE119
|
||||
#define ID_FILE_MRU_FILE11 0xE11A
|
||||
#define ID_FILE_MRU_FILE12 0xE11B
|
||||
#define ID_FILE_MRU_FILE13 0xE11C
|
||||
#define ID_FILE_MRU_FILE14 0xE11D
|
||||
#define ID_FILE_MRU_FILE15 0xE11E
|
||||
#define ID_FILE_MRU_FILE16 0xE11F
|
||||
#define ID_FILE_MRU_LAST 0xE11F
|
||||
|
||||
// Edit commands
|
||||
#define ID_EDIT_CLEAR 0xE120
|
||||
#define ID_EDIT_CLEAR_ALL 0xE121
|
||||
#define ID_EDIT_COPY 0xE122
|
||||
#define ID_EDIT_CUT 0xE123
|
||||
#define ID_EDIT_FIND 0xE124
|
||||
#define ID_EDIT_PASTE 0xE125
|
||||
#define ID_EDIT_PASTE_LINK 0xE126
|
||||
#define ID_EDIT_PASTE_SPECIAL 0xE127
|
||||
#define ID_EDIT_REPEAT 0xE128
|
||||
#define ID_EDIT_REPLACE 0xE129
|
||||
#define ID_EDIT_SELECT_ALL 0xE12A
|
||||
#define ID_EDIT_UNDO 0xE12B
|
||||
#define ID_EDIT_REDO 0xE12C
|
||||
|
||||
// Window commands
|
||||
#define ID_WINDOW_NEW 0xE130
|
||||
#define ID_WINDOW_ARRANGE 0xE131
|
||||
#define ID_WINDOW_CASCADE 0xE132
|
||||
#define ID_WINDOW_TILE_HORZ 0xE133
|
||||
#define ID_WINDOW_TILE_VERT 0xE134
|
||||
#define ID_WINDOW_SPLIT 0xE135
|
||||
#ifndef RC_INVOKED // code only
|
||||
#define ATL_IDM_WINDOW_FIRST 0xE130
|
||||
#define ATL_IDM_WINDOW_LAST 0xE13F
|
||||
#define ATL_IDM_FIRST_MDICHILD 0xFF00 // window list starts here
|
||||
#define ATL_IDM_LAST_MDICHILD 0xFFFD
|
||||
#endif // !RC_INVOKED
|
||||
// TabView
|
||||
#define ID_WINDOW_TABFIRST 0xFF00 // = ATL_IDM_FIRST_MDICHILD
|
||||
#define ID_WINDOW_TABLAST 0xFFFD
|
||||
#define ID_WINDOW_SHOWTABLIST 0xFFFE
|
||||
|
||||
// Help and App commands
|
||||
#define ID_APP_ABOUT 0xE140
|
||||
#define ID_APP_EXIT 0xE141
|
||||
#define ID_HELP_INDEX 0xE142
|
||||
#define ID_HELP_FINDER 0xE143
|
||||
#define ID_HELP_USING 0xE144
|
||||
#define ID_CONTEXT_HELP 0xE145 // shift-F1
|
||||
// special commands for processing help
|
||||
#define ID_HELP 0xE146 // first attempt for F1
|
||||
#define ID_DEFAULT_HELP 0xE147 // last attempt
|
||||
|
||||
// Misc
|
||||
#define ID_NEXT_PANE 0xE150
|
||||
#define ID_PREV_PANE 0xE151
|
||||
#define ID_PANE_CLOSE 0xE152
|
||||
|
||||
// Format
|
||||
#define ID_FORMAT_FONT 0xE160
|
||||
|
||||
// Scroll
|
||||
#define ID_SCROLL_UP 0xE170
|
||||
#define ID_SCROLL_DOWN 0xE171
|
||||
#define ID_SCROLL_PAGE_UP 0xE172
|
||||
#define ID_SCROLL_PAGE_DOWN 0xE173
|
||||
#define ID_SCROLL_TOP 0xE174
|
||||
#define ID_SCROLL_BOTTOM 0xE175
|
||||
#define ID_SCROLL_LEFT 0xE176
|
||||
#define ID_SCROLL_RIGHT 0xE177
|
||||
#define ID_SCROLL_PAGE_LEFT 0xE178
|
||||
#define ID_SCROLL_PAGE_RIGHT 0xE179
|
||||
#define ID_SCROLL_ALL_LEFT 0xE17A
|
||||
#define ID_SCROLL_ALL_RIGHT 0xE17B
|
||||
|
||||
// OLE commands
|
||||
#define ID_OLE_INSERT_NEW 0xE200
|
||||
#define ID_OLE_EDIT_LINKS 0xE201
|
||||
#define ID_OLE_EDIT_CONVERT 0xE202
|
||||
#define ID_OLE_EDIT_CHANGE_ICON 0xE203
|
||||
#define ID_OLE_EDIT_PROPERTIES 0xE204
|
||||
#define ID_OLE_VERB_FIRST 0xE210 // range - 16 max
|
||||
#ifndef RC_INVOKED // code only
|
||||
#define ID_OLE_VERB_LAST 0xE21F
|
||||
#endif // !RC_INVOKED
|
||||
|
||||
// View commands (same number used as IDW used for toolbar and status bar)
|
||||
#define ID_VIEW_TOOLBAR 0xE800
|
||||
#define ID_VIEW_STATUS_BAR 0xE801
|
||||
#define ID_VIEW_REFRESH 0xE803
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard control IDs
|
||||
|
||||
#ifdef IDC_STATIC
|
||||
#undef IDC_STATIC
|
||||
#endif // IDC_STATIC
|
||||
#define IDC_STATIC (-1) // all static controls
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard string error/warnings
|
||||
|
||||
// idle status bar message
|
||||
#define ATL_IDS_IDLEMESSAGE 0xE001
|
||||
|
||||
#ifndef RC_INVOKED // code only
|
||||
#define ATL_IDS_SCFIRST 0xEF00
|
||||
#endif // !RC_INVOKED
|
||||
|
||||
#define ATL_IDS_SCSIZE 0xEF00
|
||||
#define ATL_IDS_SCMOVE 0xEF01
|
||||
#define ATL_IDS_SCMINIMIZE 0xEF02
|
||||
#define ATL_IDS_SCMAXIMIZE 0xEF03
|
||||
#define ATL_IDS_SCNEXTWINDOW 0xEF04
|
||||
#define ATL_IDS_SCPREVWINDOW 0xEF05
|
||||
#define ATL_IDS_SCCLOSE 0xEF06
|
||||
#define ATL_IDS_SCRESTORE 0xEF12
|
||||
#define ATL_IDS_SCTASKLIST 0xEF13
|
||||
|
||||
#define ATL_IDS_MDICHILD 0xEF1F
|
||||
#define ATL_IDS_MRU_FILE 0xEFDA
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Misc. control IDs
|
||||
|
||||
// Property Sheet control id's (determined with Spy++)
|
||||
#define ID_APPLY_NOW 0x3021
|
||||
#define ID_WIZBACK 0x3023
|
||||
#define ID_WIZNEXT 0x3024
|
||||
#define ID_WIZFINISH 0x3025
|
||||
#define ATL_IDC_TAB_CONTROL 0x3020
|
||||
|
||||
#endif // __ATLRES_H__
|
||||
// Windows Template Library - WTL version 8.0
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This file is a part of the Windows Template Library.
|
||||
// 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)
|
||||
// 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
|
||||
// the terms of this license. You must not remove this notice, or
|
||||
// any other, from this software.
|
||||
|
||||
#ifndef __ATLRES_H__
|
||||
#define __ATLRES_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32_WCE) && !defined(__ATLRESCE_H__)
|
||||
#error Use atlresCE.h instead of atlres.h for Windows CE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
#ifndef _INC_WINDOWS
|
||||
|
||||
#define _INC_WINDOWS
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#define VS_VERSION_INFO 1
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400 // default to Windows Version 4.0
|
||||
#endif // !WINVER
|
||||
|
||||
#include <winresrc.h>
|
||||
|
||||
// operation messages sent to DLGINIT
|
||||
#define LB_ADDSTRING (WM_USER+1)
|
||||
#define CB_ADDSTRING (WM_USER+3)
|
||||
#endif // !_WIN32_WCE
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#ifdef IDC_STATIC
|
||||
#undef IDC_STATIC
|
||||
#endif // IDC_STATIC
|
||||
#define IDC_STATIC (-1)
|
||||
|
||||
#endif // !_INC_WINDOWS
|
||||
#endif // RC_INVOKED
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ATL resource types
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#define RT_DLGINIT MAKEINTRESOURCE(240)
|
||||
#define RT_TOOLBAR MAKEINTRESOURCE(241)
|
||||
#endif // RC_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard window components
|
||||
|
||||
#define ID_SEPARATOR 0 // special separator value
|
||||
#define ID_DEFAULT_PANE 0 // default status bar pane
|
||||
|
||||
#ifndef RC_INVOKED // code only
|
||||
// standard control bars (IDW = window ID)
|
||||
#define ATL_IDW_TOOLBAR 0xE800 // main Toolbar for window
|
||||
#define ATL_IDW_STATUS_BAR 0xE801 // Status bar window
|
||||
#define ATL_IDW_COMMAND_BAR 0xE802 // Command bar window
|
||||
|
||||
// parts of a frame window
|
||||
#define ATL_IDW_CLIENT 0xE900
|
||||
#define ATL_IDW_PANE_FIRST 0xE900 // first pane (256 max)
|
||||
#define ATL_IDW_PANE_LAST 0xE9FF
|
||||
#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_SIZE_BOX 0xEA20 // size box for splitters
|
||||
#define ATL_IDW_PANE_SAVE 0xEA21 // to shift ATL_IDW_PANE_FIRST
|
||||
|
||||
// bands for a rebar
|
||||
#define ATL_IDW_BAND_FIRST 0xEB00
|
||||
#define ATL_IDW_BAND_LAST 0xEBFF
|
||||
#endif // !RC_INVOKED
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard Commands
|
||||
|
||||
// File commands
|
||||
#define ID_FILE_NEW 0xE100
|
||||
#define ID_FILE_OPEN 0xE101
|
||||
#define ID_FILE_CLOSE 0xE102
|
||||
#define ID_FILE_SAVE 0xE103
|
||||
#define ID_FILE_SAVE_AS 0xE104
|
||||
#define ID_FILE_PAGE_SETUP 0xE105
|
||||
#define ID_FILE_PRINT_SETUP 0xE106
|
||||
#define ID_FILE_PRINT 0xE107
|
||||
#define ID_FILE_PRINT_DIRECT 0xE108
|
||||
#define ID_FILE_PRINT_PREVIEW 0xE109
|
||||
#define ID_FILE_UPDATE 0xE10A
|
||||
#define ID_FILE_SAVE_COPY_AS 0xE10B
|
||||
#define ID_FILE_SEND_MAIL 0xE10C
|
||||
|
||||
#define ID_FILE_MRU_FIRST 0xE110
|
||||
#define ID_FILE_MRU_FILE1 0xE110 // range - 16 max
|
||||
#define ID_FILE_MRU_FILE2 0xE111
|
||||
#define ID_FILE_MRU_FILE3 0xE112
|
||||
#define ID_FILE_MRU_FILE4 0xE113
|
||||
#define ID_FILE_MRU_FILE5 0xE114
|
||||
#define ID_FILE_MRU_FILE6 0xE115
|
||||
#define ID_FILE_MRU_FILE7 0xE116
|
||||
#define ID_FILE_MRU_FILE8 0xE117
|
||||
#define ID_FILE_MRU_FILE9 0xE118
|
||||
#define ID_FILE_MRU_FILE10 0xE119
|
||||
#define ID_FILE_MRU_FILE11 0xE11A
|
||||
#define ID_FILE_MRU_FILE12 0xE11B
|
||||
#define ID_FILE_MRU_FILE13 0xE11C
|
||||
#define ID_FILE_MRU_FILE14 0xE11D
|
||||
#define ID_FILE_MRU_FILE15 0xE11E
|
||||
#define ID_FILE_MRU_FILE16 0xE11F
|
||||
#define ID_FILE_MRU_LAST 0xE11F
|
||||
|
||||
// Edit commands
|
||||
#define ID_EDIT_CLEAR 0xE120
|
||||
#define ID_EDIT_CLEAR_ALL 0xE121
|
||||
#define ID_EDIT_COPY 0xE122
|
||||
#define ID_EDIT_CUT 0xE123
|
||||
#define ID_EDIT_FIND 0xE124
|
||||
#define ID_EDIT_PASTE 0xE125
|
||||
#define ID_EDIT_PASTE_LINK 0xE126
|
||||
#define ID_EDIT_PASTE_SPECIAL 0xE127
|
||||
#define ID_EDIT_REPEAT 0xE128
|
||||
#define ID_EDIT_REPLACE 0xE129
|
||||
#define ID_EDIT_SELECT_ALL 0xE12A
|
||||
#define ID_EDIT_UNDO 0xE12B
|
||||
#define ID_EDIT_REDO 0xE12C
|
||||
|
||||
// Window commands
|
||||
#define ID_WINDOW_NEW 0xE130
|
||||
#define ID_WINDOW_ARRANGE 0xE131
|
||||
#define ID_WINDOW_CASCADE 0xE132
|
||||
#define ID_WINDOW_TILE_HORZ 0xE133
|
||||
#define ID_WINDOW_TILE_VERT 0xE134
|
||||
#define ID_WINDOW_SPLIT 0xE135
|
||||
#ifndef RC_INVOKED // code only
|
||||
#define ATL_IDM_WINDOW_FIRST 0xE130
|
||||
#define ATL_IDM_WINDOW_LAST 0xE13F
|
||||
#define ATL_IDM_FIRST_MDICHILD 0xFF00 // window list starts here
|
||||
#define ATL_IDM_LAST_MDICHILD 0xFFFD
|
||||
#endif // !RC_INVOKED
|
||||
// TabView
|
||||
#define ID_WINDOW_TABFIRST 0xFF00 // = ATL_IDM_FIRST_MDICHILD
|
||||
#define ID_WINDOW_TABLAST 0xFFFD
|
||||
#define ID_WINDOW_SHOWTABLIST 0xFFFE
|
||||
|
||||
// Help and App commands
|
||||
#define ID_APP_ABOUT 0xE140
|
||||
#define ID_APP_EXIT 0xE141
|
||||
#define ID_HELP_INDEX 0xE142
|
||||
#define ID_HELP_FINDER 0xE143
|
||||
#define ID_HELP_USING 0xE144
|
||||
#define ID_CONTEXT_HELP 0xE145 // shift-F1
|
||||
// special commands for processing help
|
||||
#define ID_HELP 0xE146 // first attempt for F1
|
||||
#define ID_DEFAULT_HELP 0xE147 // last attempt
|
||||
|
||||
// Misc
|
||||
#define ID_NEXT_PANE 0xE150
|
||||
#define ID_PREV_PANE 0xE151
|
||||
#define ID_PANE_CLOSE 0xE152
|
||||
|
||||
// Format
|
||||
#define ID_FORMAT_FONT 0xE160
|
||||
|
||||
// Scroll
|
||||
#define ID_SCROLL_UP 0xE170
|
||||
#define ID_SCROLL_DOWN 0xE171
|
||||
#define ID_SCROLL_PAGE_UP 0xE172
|
||||
#define ID_SCROLL_PAGE_DOWN 0xE173
|
||||
#define ID_SCROLL_TOP 0xE174
|
||||
#define ID_SCROLL_BOTTOM 0xE175
|
||||
#define ID_SCROLL_LEFT 0xE176
|
||||
#define ID_SCROLL_RIGHT 0xE177
|
||||
#define ID_SCROLL_PAGE_LEFT 0xE178
|
||||
#define ID_SCROLL_PAGE_RIGHT 0xE179
|
||||
#define ID_SCROLL_ALL_LEFT 0xE17A
|
||||
#define ID_SCROLL_ALL_RIGHT 0xE17B
|
||||
|
||||
// OLE commands
|
||||
#define ID_OLE_INSERT_NEW 0xE200
|
||||
#define ID_OLE_EDIT_LINKS 0xE201
|
||||
#define ID_OLE_EDIT_CONVERT 0xE202
|
||||
#define ID_OLE_EDIT_CHANGE_ICON 0xE203
|
||||
#define ID_OLE_EDIT_PROPERTIES 0xE204
|
||||
#define ID_OLE_VERB_FIRST 0xE210 // range - 16 max
|
||||
#ifndef RC_INVOKED // code only
|
||||
#define ID_OLE_VERB_LAST 0xE21F
|
||||
#endif // !RC_INVOKED
|
||||
|
||||
// View commands (same number used as IDW used for toolbar and status bar)
|
||||
#define ID_VIEW_TOOLBAR 0xE800
|
||||
#define ID_VIEW_STATUS_BAR 0xE801
|
||||
#define ID_VIEW_REFRESH 0xE803
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard control IDs
|
||||
|
||||
#ifdef IDC_STATIC
|
||||
#undef IDC_STATIC
|
||||
#endif // IDC_STATIC
|
||||
#define IDC_STATIC (-1) // all static controls
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Standard string error/warnings
|
||||
|
||||
// idle status bar message
|
||||
#define ATL_IDS_IDLEMESSAGE 0xE001
|
||||
|
||||
#ifndef RC_INVOKED // code only
|
||||
#define ATL_IDS_SCFIRST 0xEF00
|
||||
#endif // !RC_INVOKED
|
||||
|
||||
#define ATL_IDS_SCSIZE 0xEF00
|
||||
#define ATL_IDS_SCMOVE 0xEF01
|
||||
#define ATL_IDS_SCMINIMIZE 0xEF02
|
||||
#define ATL_IDS_SCMAXIMIZE 0xEF03
|
||||
#define ATL_IDS_SCNEXTWINDOW 0xEF04
|
||||
#define ATL_IDS_SCPREVWINDOW 0xEF05
|
||||
#define ATL_IDS_SCCLOSE 0xEF06
|
||||
#define ATL_IDS_SCRESTORE 0xEF12
|
||||
#define ATL_IDS_SCTASKLIST 0xEF13
|
||||
|
||||
#define ATL_IDS_MDICHILD 0xEF1F
|
||||
#define ATL_IDS_MRU_FILE 0xEFDA
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Misc. control IDs
|
||||
|
||||
// Property Sheet control id's (determined with Spy++)
|
||||
#define ID_APPLY_NOW 0x3021
|
||||
#define ID_WIZBACK 0x3023
|
||||
#define ID_WIZNEXT 0x3024
|
||||
#define ID_WIZFINISH 0x3025
|
||||
#define ATL_IDC_TAB_CONTROL 0x3020
|
||||
|
||||
#endif // __ATLRES_H__
|
||||
|
|
|
@ -1,93 +1,93 @@
|
|||
// Windows Template Library - WTL version 8.0
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This file is a part of the Windows Template Library.
|
||||
// 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)
|
||||
// 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
|
||||
// the terms of this license. You must not remove this notice, or
|
||||
// any other, from this software.
|
||||
|
||||
#ifndef __ATLRESCE_H__
|
||||
#define __ATLRESCE_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#error atlresCE.h is only for Windows CE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
#ifndef _INC_WINDOWS
|
||||
|
||||
#define VS_VERSION_INFO 1
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400 // default to Windows Version 4.0
|
||||
#endif // !WINVER
|
||||
|
||||
#if !defined(WCEOLE_ENABLE_DIALOGEX)
|
||||
#define DIALOGEX DIALOG DISCARDABLE
|
||||
#endif
|
||||
|
||||
#include <commctrl.h>
|
||||
#define SHMENUBAR RCDATA
|
||||
|
||||
#if defined(SHELLSDK_MODULES_AYGSHELL)
|
||||
#include <aygshell.h>
|
||||
#else
|
||||
#define NOMENU 0xFFFF
|
||||
#define IDS_SHNEW 1
|
||||
#define IDM_SHAREDNEW 10
|
||||
#define IDM_SHAREDNEWDEFAULT 11
|
||||
#endif
|
||||
#ifndef I_IMAGENONE
|
||||
#define I_IMAGENONE (-2)
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#endif // !_INC_WINDOWS
|
||||
#endif // RC_INVOKED
|
||||
|
||||
#include "atlres.h"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
// Visual Studio dialog editor bug fix
|
||||
#ifndef DS_FIXEDSYS
|
||||
#define DS_FIXEDSYS 0
|
||||
#endif
|
||||
|
||||
#define IDC_INFOSTATIC 0xFFFE // == IDC_STATIC -1
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Smartphone and PPC 2005 Resource IDs
|
||||
|
||||
// Command and associated string resource IDs
|
||||
#define ID_MENU_OK 0xE790
|
||||
#define ID_MENU_CANCEL 0xE791
|
||||
#define ID_MENU 0xE792
|
||||
#define ID_ACTION 0xE793
|
||||
#define ID_VIEW_FULLSCREEN 0xE802
|
||||
|
||||
// MenuBar resource IDs
|
||||
#define ATL_IDM_MENU_DONE 0xE701
|
||||
#define ATL_IDM_MENU_CANCEL 0xE702
|
||||
#define ATL_IDM_MENU_DONECANCEL 0xE703
|
||||
|
||||
// Default device MenuBar control ID and MenuBar resource ID
|
||||
#define ATL_IDW_MENU_BAR 0xE802
|
||||
|
||||
// SmartPhone spinned controls ID offset for CSpinCtrl
|
||||
#define ATL_IDW_SPIN_ID 9999
|
||||
|
||||
#endif // __ATLRESCE_H__
|
||||
// Windows Template Library - WTL version 8.0
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// This file is a part of the Windows Template Library.
|
||||
// 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)
|
||||
// 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
|
||||
// the terms of this license. You must not remove this notice, or
|
||||
// any other, from this software.
|
||||
|
||||
#ifndef __ATLRESCE_H__
|
||||
#define __ATLRESCE_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#error atlresCE.h is only for Windows CE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RC_INVOKED
|
||||
#ifndef _INC_WINDOWS
|
||||
|
||||
#define VS_VERSION_INFO 1
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS // Ignore following symbols
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0400 // default to Windows Version 4.0
|
||||
#endif // !WINVER
|
||||
|
||||
#if !defined(WCEOLE_ENABLE_DIALOGEX)
|
||||
#define DIALOGEX DIALOG DISCARDABLE
|
||||
#endif
|
||||
|
||||
#include <commctrl.h>
|
||||
#define SHMENUBAR RCDATA
|
||||
|
||||
#if defined(SHELLSDK_MODULES_AYGSHELL)
|
||||
#include <aygshell.h>
|
||||
#else
|
||||
#define NOMENU 0xFFFF
|
||||
#define IDS_SHNEW 1
|
||||
#define IDM_SHAREDNEW 10
|
||||
#define IDM_SHAREDNEWDEFAULT 11
|
||||
#endif
|
||||
#ifndef I_IMAGENONE
|
||||
#define I_IMAGENONE (-2)
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#endif // !_INC_WINDOWS
|
||||
#endif // RC_INVOKED
|
||||
|
||||
#include "atlres.h"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
// Visual Studio dialog editor bug fix
|
||||
#ifndef DS_FIXEDSYS
|
||||
#define DS_FIXEDSYS 0
|
||||
#endif
|
||||
|
||||
#define IDC_INFOSTATIC 0xFFFE // == IDC_STATIC -1
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Smartphone and PPC 2005 Resource IDs
|
||||
|
||||
// Command and associated string resource IDs
|
||||
#define ID_MENU_OK 0xE790
|
||||
#define ID_MENU_CANCEL 0xE791
|
||||
#define ID_MENU 0xE792
|
||||
#define ID_ACTION 0xE793
|
||||
#define ID_VIEW_FULLSCREEN 0xE802
|
||||
|
||||
// MenuBar resource IDs
|
||||
#define ATL_IDM_MENU_DONE 0xE701
|
||||
#define ATL_IDM_MENU_CANCEL 0xE702
|
||||
#define ATL_IDM_MENU_DONECANCEL 0xE703
|
||||
|
||||
// Default device MenuBar control ID and MenuBar resource ID
|
||||
#define ATL_IDW_MENU_BAR 0xE802
|
||||
|
||||
// SmartPhone spinned controls ID offset for CSpinCtrl
|
||||
#define ATL_IDW_SPIN_ID 9999
|
||||
|
||||
#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
|
@ -50,16 +50,16 @@
|
|||
/* Information output macros */
|
||||
#define WIIUSE_INFO(fmt, ...) fprintf(stderr, "[INFO] " fmt "\n", ##__VA_ARGS__)
|
||||
|
||||
#ifdef WITH_WIIUSE_DEBUG
|
||||
#ifdef WIN32
|
||||
#define WIIUSE_DEBUG(fmt, ...) do { \
|
||||
char* file = __FILE__; \
|
||||
int i = strlen(file) - 1; \
|
||||
for (; i && (file[i] != '\\'); --i); \
|
||||
fprintf(stderr, "[DEBUG] %s:%i: " fmt "\n", file+i+1, __LINE__, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#ifdef WITH_WIIUSE_DEBUG
|
||||
#ifdef WIN32
|
||||
#define WIIUSE_DEBUG(fmt, ...) do { \
|
||||
char* file = __FILE__; \
|
||||
int i = strlen(file) - 1; \
|
||||
for (; i && (file[i] != '\\'); --i); \
|
||||
fprintf(stderr, "[DEBUG] %s:%i: " fmt "\n", file+i+1, __LINE__, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#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
|
||||
#else
|
||||
#define WIIUSE_DEBUG(fmt, ...)
|
||||
|
|
|
@ -44,7 +44,7 @@ extern "C" {
|
|||
void wiiuse_pressed_buttons(struct wiimote_t* wm, byte* msg);
|
||||
|
||||
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
|
||||
}
|
||||
|
|
|
@ -39,14 +39,14 @@
|
|||
#ifndef OS_H_INCLUDED
|
||||
#define OS_H_INCLUDED
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef WIN32
|
||||
/* windows */
|
||||
#define isnan(x) _isnan(x)
|
||||
#define isinf(x) !_finite(x)
|
||||
|
||||
/* disable warnings I don't care about */
|
||||
#pragma warning(disable:4244) /* possible loss of data conversion */
|
||||
#pragma warning(disable:4273) /* inconsistent dll linkage */
|
||||
/* disable warnings I don't care about */
|
||||
#pragma warning(disable:4244) /* possible loss of data conversion */
|
||||
#pragma warning(disable:4273) /* inconsistent dll linkage */
|
||||
#pragma warning(disable:4217)
|
||||
#else
|
||||
/* nix */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -153,8 +153,8 @@
|
|||
#define EXP_ID_CODE_CLASSIC_CONTROLLER 0x9A1EFDFD
|
||||
#define EXP_ID_CODE_GUITAR 0x9A1EFDFB
|
||||
|
||||
#define EXP_HANDSHAKE_LEN 224
|
||||
|
||||
#define EXP_HANDSHAKE_LEN 224
|
||||
|
||||
/********************
|
||||
*
|
||||
* End Wiimote internal codes
|
||||
|
@ -205,10 +205,10 @@
|
|||
#define WIIUSE_DEFAULT_SMOOTH_ALPHA 0.07f
|
||||
|
||||
#define SMOOTH_ROLL 0x01
|
||||
#define SMOOTH_PITCH 0x02
|
||||
|
||||
#define SMOOTH_PITCH 0x02
|
||||
|
||||
#include "wiiuse.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */
|
||||
/* see jconfig.doc for explanations */
|
||||
|
||||
#define HAVE_PROTOTYPES
|
||||
#define HAVE_UNSIGNED_CHAR
|
||||
#define HAVE_UNSIGNED_SHORT
|
||||
/* #define void char */
|
||||
/* #define const */
|
||||
#undef CHAR_IS_UNSIGNED
|
||||
#define HAVE_STDDEF_H
|
||||
#define HAVE_STDLIB_H
|
||||
#undef NEED_BSD_STRINGS
|
||||
#undef NEED_SYS_TYPES_H
|
||||
//#define NEED_FAR_POINTERS /* for small or medium memory model */
|
||||
#undef NEED_SHORT_EXTERNAL_NAMES
|
||||
#undef INCOMPLETE_TYPES_BROKEN
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
|
||||
#undef RIGHT_SHIFT_IS_UNSIGNED
|
||||
|
||||
//#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */
|
||||
|
||||
#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */
|
||||
|
||||
//#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */
|
||||
|
||||
#define NEED_FHEAPMIN /* far heap management routines are broken */
|
||||
|
||||
#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */
|
||||
/* 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.
|
||||
* Please report any info on this point to jpeg-info@uunet.uu.net.
|
||||
*/
|
||||
|
||||
#endif /* JPEG_INTERNALS */
|
||||
|
||||
#ifdef JPEG_CJPEG_DJPEG
|
||||
|
||||
#define BMP_SUPPORTED /* BMP image file format */
|
||||
#define GIF_SUPPORTED /* GIF image file format */
|
||||
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
|
||||
#undef RLE_SUPPORTED /* Utah RLE image file format */
|
||||
#define TARGA_SUPPORTED /* Targa image file format */
|
||||
|
||||
#define TWO_FILE_COMMANDLINE
|
||||
#define USE_SETMODE /* Microsoft has setmode() */
|
||||
#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */
|
||||
#undef DONT_USE_B_MODE
|
||||
#undef PROGRESS_REPORT /* optional */
|
||||
|
||||
#endif /* JPEG_CJPEG_DJPEG */
|
||||
/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */
|
||||
/* see jconfig.doc for explanations */
|
||||
|
||||
#define HAVE_PROTOTYPES
|
||||
#define HAVE_UNSIGNED_CHAR
|
||||
#define HAVE_UNSIGNED_SHORT
|
||||
/* #define void char */
|
||||
/* #define const */
|
||||
#undef CHAR_IS_UNSIGNED
|
||||
#define HAVE_STDDEF_H
|
||||
#define HAVE_STDLIB_H
|
||||
#undef NEED_BSD_STRINGS
|
||||
#undef NEED_SYS_TYPES_H
|
||||
//#define NEED_FAR_POINTERS /* for small or medium memory model */
|
||||
#undef NEED_SHORT_EXTERNAL_NAMES
|
||||
#undef INCOMPLETE_TYPES_BROKEN
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
|
||||
#undef RIGHT_SHIFT_IS_UNSIGNED
|
||||
|
||||
//#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */
|
||||
|
||||
#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */
|
||||
|
||||
//#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */
|
||||
|
||||
#define NEED_FHEAPMIN /* far heap management routines are broken */
|
||||
|
||||
#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */
|
||||
/* 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.
|
||||
* Please report any info on this point to jpeg-info@uunet.uu.net.
|
||||
*/
|
||||
|
||||
#endif /* JPEG_INTERNALS */
|
||||
|
||||
#ifdef JPEG_CJPEG_DJPEG
|
||||
|
||||
#define BMP_SUPPORTED /* BMP image file format */
|
||||
#define GIF_SUPPORTED /* GIF image file format */
|
||||
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
|
||||
#undef RLE_SUPPORTED /* Utah RLE image file format */
|
||||
#define TARGA_SUPPORTED /* Targa image file format */
|
||||
|
||||
#define TWO_FILE_COMMANDLINE
|
||||
#define USE_SETMODE /* Microsoft has setmode() */
|
||||
#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */
|
||||
#undef DONT_USE_B_MODE
|
||||
#undef PROGRESS_REPORT /* optional */
|
||||
|
||||
#endif /* JPEG_CJPEG_DJPEG */
|
||||
|
|
|
@ -1,363 +1,363 @@
|
|||
/*
|
||||
* jmorecfg.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains additional configuration options that customize the
|
||||
* JPEG software for special applications or support machine-dependent
|
||||
* optimizations. Most users will not need to touch this file.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Define BITS_IN_JSAMPLE as either
|
||||
* 8 for 8-bit sample values (the usual setting)
|
||||
* 12 for 12-bit sample values
|
||||
* 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!
|
||||
* We do not support run-time selection of data precision, sorry.
|
||||
*/
|
||||
|
||||
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
|
||||
|
||||
|
||||
/*
|
||||
* Maximum number of components (color channels) allowed in JPEG image.
|
||||
* 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
|
||||
* 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
|
||||
* bytes of storage, whether actually used in an image or not.)
|
||||
*/
|
||||
|
||||
#define MAX_COMPONENTS 10 /* maximum number of image components */
|
||||
|
||||
|
||||
/*
|
||||
* Basic data types.
|
||||
* 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,
|
||||
* or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
|
||||
* but it had better be at least 16.
|
||||
*/
|
||||
|
||||
/* Representation of a single sample (pixel element value).
|
||||
* 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
|
||||
* arrays is very slow on your hardware, you might want to change these.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JSAMPLE;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
#else
|
||||
#define GETJSAMPLE(value) ((int) (value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
#define MAXJSAMPLE 255
|
||||
#define CENTERJSAMPLE 128
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 8 */
|
||||
|
||||
|
||||
#if BITS_IN_JSAMPLE == 12
|
||||
/* JSAMPLE should be the smallest type that will hold the values 0..4095.
|
||||
* On nearly all machines "short" will do nicely.
|
||||
*/
|
||||
|
||||
typedef short JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#define MAXJSAMPLE 4095
|
||||
#define CENTERJSAMPLE 2048
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 12 */
|
||||
|
||||
|
||||
/* Representation of a DCT frequency coefficient.
|
||||
* 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
|
||||
* if you have memory to burn and "short" is really slow.
|
||||
*/
|
||||
|
||||
typedef short JCOEF;
|
||||
|
||||
|
||||
/* Compressed datastreams are represented as arrays of JOCTET.
|
||||
* 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
|
||||
* managers, this is also the data type passed to fread/fwrite.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JOCTET;
|
||||
#define GETJOCTET(value) (value)
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JOCTET;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJOCTET(value) (value)
|
||||
#else
|
||||
#define GETJOCTET(value) ((value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
|
||||
/* 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
|
||||
* 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
|
||||
* typedefs live at a different point on the speed/space tradeoff curve.)
|
||||
*/
|
||||
|
||||
/* UINT8 must hold at least the values 0..255. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
typedef unsigned char UINT8;
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
typedef char UINT8;
|
||||
#else /* not CHAR_IS_UNSIGNED */
|
||||
typedef short UINT8;
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
/* UINT16 must hold at least the values 0..65535. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_SHORT
|
||||
typedef unsigned short UINT16;
|
||||
#else /* not HAVE_UNSIGNED_SHORT */
|
||||
typedef unsigned int UINT16;
|
||||
#endif /* HAVE_UNSIGNED_SHORT */
|
||||
|
||||
/* INT16 must hold at least the values -32768..32767. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
|
||||
typedef short INT16;
|
||||
#endif
|
||||
|
||||
/* INT32 must hold at least signed 32-bit values. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
|
||||
typedef long INT32;
|
||||
#endif
|
||||
|
||||
/* Datatype used for image dimensions. The JPEG standard only supports
|
||||
* 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
|
||||
* handle larger images and you don't mind deviating from the spec, you
|
||||
* can change this datatype.
|
||||
*/
|
||||
|
||||
typedef unsigned int JDIMENSION;
|
||||
|
||||
#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */
|
||||
|
||||
|
||||
/* These macros are used in all function definitions and extern declarations.
|
||||
* 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.
|
||||
* Another application is to make all functions global for use with debuggers
|
||||
* or code profilers that require it.
|
||||
*/
|
||||
|
||||
/* a function called through method pointers: */
|
||||
#define METHODDEF(type) static type
|
||||
/* a function used only in its module: */
|
||||
#define LOCAL(type) static type
|
||||
/* a function referenced thru EXTERNs: */
|
||||
#define GLOBAL(type) type
|
||||
/* a reference to a GLOBAL function: */
|
||||
#define EXTERN(type) extern type
|
||||
|
||||
|
||||
/* This macro is used to declare a "method", that is, a function pointer.
|
||||
* We want to supply prototype parameters if the compiler can cope.
|
||||
* Note that the arglist parameter must be parenthesized!
|
||||
* Again, you can customize this if you need special linkage keywords.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
||||
#else
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
||||
#endif
|
||||
|
||||
|
||||
/* Here is the pseudo-keyword for declaring pointers that must be "far"
|
||||
* 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
|
||||
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
|
||||
*/
|
||||
|
||||
#ifdef NEED_FAR_POINTERS
|
||||
#define FAR far
|
||||
#else
|
||||
#define FAR
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* 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-
|
||||
* specific header files that you want to include together with these files.
|
||||
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_BOOLEAN
|
||||
typedef int boolean;
|
||||
#endif
|
||||
#ifndef FALSE /* in case these macros already exist */
|
||||
#define FALSE 0 /* values of boolean */
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The remaining options affect code selection within the JPEG 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
|
||||
* defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
|
||||
*/
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
#define JPEG_INTERNAL_OPTIONS
|
||||
#endif
|
||||
|
||||
#ifdef JPEG_INTERNAL_OPTIONS
|
||||
|
||||
|
||||
/*
|
||||
* These defines indicate whether to include various optional functions.
|
||||
* Undefining some of these symbols will produce a smaller but less capable
|
||||
* library. Note that you can leave certain source files out of the
|
||||
* 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.)
|
||||
*/
|
||||
|
||||
/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */
|
||||
|
||||
/* Capability options common to encoder and decoder: */
|
||||
|
||||
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
||||
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
|
||||
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
|
||||
|
||||
/* Encoder capability options: */
|
||||
|
||||
#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
|
||||
/* 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
|
||||
* precision, so jchuff.c normally uses entropy optimization to compute
|
||||
* usable tables for higher precision. If you don't want to do optimization,
|
||||
* you'll have to supply different default Huffman tables.
|
||||
* The exact same statements apply for progressive JPEG: the default tables
|
||||
* don't work for progressive mode. (This may get fixed, however.)
|
||||
*/
|
||||
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
|
||||
|
||||
/* Decoder capability options: */
|
||||
|
||||
#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
|
||||
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
|
||||
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
||||
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
||||
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
|
||||
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
|
||||
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
|
||||
|
||||
/* more capability options later, no doubt */
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* the offsets will also change the order in which colormap data is organized.
|
||||
* RESTRICTIONS:
|
||||
* 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
|
||||
* 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
|
||||
* is not 3 (they don't understand about dummy color components!). So you
|
||||
* can't use color quantization if you change that value.
|
||||
*/
|
||||
|
||||
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */
|
||||
#define RGB_GREEN 1 /* Offset of Green */
|
||||
#define RGB_BLUE 2 /* Offset of Blue */
|
||||
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
|
||||
|
||||
|
||||
/* Definitions for speed-related optimizations. */
|
||||
|
||||
|
||||
/* If your compiler supports inline functions, define INLINE
|
||||
* as the inline keyword; otherwise define it as empty.
|
||||
*/
|
||||
|
||||
#ifndef INLINE
|
||||
#ifdef __GNUC__ /* for instance, GNU C knows about inline */
|
||||
#define INLINE __inline__
|
||||
#endif
|
||||
#ifndef INLINE
|
||||
#define INLINE /* default is to define it as empty */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef MULTIPLIER
|
||||
#define MULTIPLIER int /* type for fastest integer multiply */
|
||||
#endif
|
||||
|
||||
|
||||
/* 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
|
||||
* 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
|
||||
* pre-ANSI compilers (because they insist on converting to double anyway).
|
||||
* The code below therefore chooses float if we have ANSI-style prototypes.
|
||||
*/
|
||||
|
||||
#ifndef FAST_FLOAT
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define FAST_FLOAT float
|
||||
#else
|
||||
#define FAST_FLOAT double
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* JPEG_INTERNAL_OPTIONS */
|
||||
/*
|
||||
* jmorecfg.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
* This file contains additional configuration options that customize the
|
||||
* JPEG software for special applications or support machine-dependent
|
||||
* optimizations. Most users will not need to touch this file.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Define BITS_IN_JSAMPLE as either
|
||||
* 8 for 8-bit sample values (the usual setting)
|
||||
* 12 for 12-bit sample values
|
||||
* 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!
|
||||
* We do not support run-time selection of data precision, sorry.
|
||||
*/
|
||||
|
||||
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
|
||||
|
||||
|
||||
/*
|
||||
* Maximum number of components (color channels) allowed in JPEG image.
|
||||
* 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
|
||||
* 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
|
||||
* bytes of storage, whether actually used in an image or not.)
|
||||
*/
|
||||
|
||||
#define MAX_COMPONENTS 10 /* maximum number of image components */
|
||||
|
||||
|
||||
/*
|
||||
* Basic data types.
|
||||
* 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,
|
||||
* or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits,
|
||||
* but it had better be at least 16.
|
||||
*/
|
||||
|
||||
/* Representation of a single sample (pixel element value).
|
||||
* 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
|
||||
* arrays is very slow on your hardware, you might want to change these.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JSAMPLE;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
#else
|
||||
#define GETJSAMPLE(value) ((int) (value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
#define MAXJSAMPLE 255
|
||||
#define CENTERJSAMPLE 128
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 8 */
|
||||
|
||||
|
||||
#if BITS_IN_JSAMPLE == 12
|
||||
/* JSAMPLE should be the smallest type that will hold the values 0..4095.
|
||||
* On nearly all machines "short" will do nicely.
|
||||
*/
|
||||
|
||||
typedef short JSAMPLE;
|
||||
#define GETJSAMPLE(value) ((int) (value))
|
||||
|
||||
#define MAXJSAMPLE 4095
|
||||
#define CENTERJSAMPLE 2048
|
||||
|
||||
#endif /* BITS_IN_JSAMPLE == 12 */
|
||||
|
||||
|
||||
/* Representation of a DCT frequency coefficient.
|
||||
* 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
|
||||
* if you have memory to burn and "short" is really slow.
|
||||
*/
|
||||
|
||||
typedef short JCOEF;
|
||||
|
||||
|
||||
/* Compressed datastreams are represented as arrays of JOCTET.
|
||||
* 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
|
||||
* managers, this is also the data type passed to fread/fwrite.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
|
||||
typedef unsigned char JOCTET;
|
||||
#define GETJOCTET(value) (value)
|
||||
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
|
||||
typedef char JOCTET;
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
#define GETJOCTET(value) (value)
|
||||
#else
|
||||
#define GETJOCTET(value) ((value) & 0xFF)
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
|
||||
/* 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
|
||||
* 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
|
||||
* typedefs live at a different point on the speed/space tradeoff curve.)
|
||||
*/
|
||||
|
||||
/* UINT8 must hold at least the values 0..255. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_CHAR
|
||||
typedef unsigned char UINT8;
|
||||
#else /* not HAVE_UNSIGNED_CHAR */
|
||||
#ifdef CHAR_IS_UNSIGNED
|
||||
typedef char UINT8;
|
||||
#else /* not CHAR_IS_UNSIGNED */
|
||||
typedef short UINT8;
|
||||
#endif /* CHAR_IS_UNSIGNED */
|
||||
#endif /* HAVE_UNSIGNED_CHAR */
|
||||
|
||||
/* UINT16 must hold at least the values 0..65535. */
|
||||
|
||||
#ifdef HAVE_UNSIGNED_SHORT
|
||||
typedef unsigned short UINT16;
|
||||
#else /* not HAVE_UNSIGNED_SHORT */
|
||||
typedef unsigned int UINT16;
|
||||
#endif /* HAVE_UNSIGNED_SHORT */
|
||||
|
||||
/* INT16 must hold at least the values -32768..32767. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
|
||||
typedef short INT16;
|
||||
#endif
|
||||
|
||||
/* INT32 must hold at least signed 32-bit values. */
|
||||
|
||||
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
|
||||
typedef long INT32;
|
||||
#endif
|
||||
|
||||
/* Datatype used for image dimensions. The JPEG standard only supports
|
||||
* 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
|
||||
* handle larger images and you don't mind deviating from the spec, you
|
||||
* can change this datatype.
|
||||
*/
|
||||
|
||||
typedef unsigned int JDIMENSION;
|
||||
|
||||
#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */
|
||||
|
||||
|
||||
/* These macros are used in all function definitions and extern declarations.
|
||||
* 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.
|
||||
* Another application is to make all functions global for use with debuggers
|
||||
* or code profilers that require it.
|
||||
*/
|
||||
|
||||
/* a function called through method pointers: */
|
||||
#define METHODDEF(type) static type
|
||||
/* a function used only in its module: */
|
||||
#define LOCAL(type) static type
|
||||
/* a function referenced thru EXTERNs: */
|
||||
#define GLOBAL(type) type
|
||||
/* a reference to a GLOBAL function: */
|
||||
#define EXTERN(type) extern type
|
||||
|
||||
|
||||
/* This macro is used to declare a "method", that is, a function pointer.
|
||||
* We want to supply prototype parameters if the compiler can cope.
|
||||
* Note that the arglist parameter must be parenthesized!
|
||||
* Again, you can customize this if you need special linkage keywords.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
||||
#else
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
||||
#endif
|
||||
|
||||
|
||||
/* Here is the pseudo-keyword for declaring pointers that must be "far"
|
||||
* 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
|
||||
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
|
||||
*/
|
||||
|
||||
#ifdef NEED_FAR_POINTERS
|
||||
#define FAR far
|
||||
#else
|
||||
#define FAR
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* 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-
|
||||
* specific header files that you want to include together with these files.
|
||||
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_BOOLEAN
|
||||
typedef int boolean;
|
||||
#endif
|
||||
#ifndef FALSE /* in case these macros already exist */
|
||||
#define FALSE 0 /* values of boolean */
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The remaining options affect code selection within the JPEG 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
|
||||
* defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
|
||||
*/
|
||||
|
||||
#ifdef JPEG_INTERNALS
|
||||
#define JPEG_INTERNAL_OPTIONS
|
||||
#endif
|
||||
|
||||
#ifdef JPEG_INTERNAL_OPTIONS
|
||||
|
||||
|
||||
/*
|
||||
* These defines indicate whether to include various optional functions.
|
||||
* Undefining some of these symbols will produce a smaller but less capable
|
||||
* library. Note that you can leave certain source files out of the
|
||||
* 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.)
|
||||
*/
|
||||
|
||||
/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */
|
||||
|
||||
/* Capability options common to encoder and decoder: */
|
||||
|
||||
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
||||
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
|
||||
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
|
||||
|
||||
/* Encoder capability options: */
|
||||
|
||||
#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
|
||||
/* 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
|
||||
* precision, so jchuff.c normally uses entropy optimization to compute
|
||||
* usable tables for higher precision. If you don't want to do optimization,
|
||||
* you'll have to supply different default Huffman tables.
|
||||
* The exact same statements apply for progressive JPEG: the default tables
|
||||
* don't work for progressive mode. (This may get fixed, however.)
|
||||
*/
|
||||
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
|
||||
|
||||
/* Decoder capability options: */
|
||||
|
||||
#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
||||
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
||||
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
||||
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
|
||||
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
|
||||
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
||||
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
||||
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
|
||||
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
|
||||
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
|
||||
|
||||
/* more capability options later, no doubt */
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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
|
||||
* the offsets will also change the order in which colormap data is organized.
|
||||
* RESTRICTIONS:
|
||||
* 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
|
||||
* 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
|
||||
* is not 3 (they don't understand about dummy color components!). So you
|
||||
* can't use color quantization if you change that value.
|
||||
*/
|
||||
|
||||
#define RGB_RED 0 /* Offset of Red in an RGB scanline element */
|
||||
#define RGB_GREEN 1 /* Offset of Green */
|
||||
#define RGB_BLUE 2 /* Offset of Blue */
|
||||
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
|
||||
|
||||
|
||||
/* Definitions for speed-related optimizations. */
|
||||
|
||||
|
||||
/* If your compiler supports inline functions, define INLINE
|
||||
* as the inline keyword; otherwise define it as empty.
|
||||
*/
|
||||
|
||||
#ifndef INLINE
|
||||
#ifdef __GNUC__ /* for instance, GNU C knows about inline */
|
||||
#define INLINE __inline__
|
||||
#endif
|
||||
#ifndef INLINE
|
||||
#define INLINE /* default is to define it as empty */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef MULTIPLIER
|
||||
#define MULTIPLIER int /* type for fastest integer multiply */
|
||||
#endif
|
||||
|
||||
|
||||
/* 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
|
||||
* 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
|
||||
* pre-ANSI compilers (because they insist on converting to double anyway).
|
||||
* The code below therefore chooses float if we have ANSI-style prototypes.
|
||||
*/
|
||||
|
||||
#ifndef FAST_FLOAT
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define FAST_FLOAT float
|
||||
#else
|
||||
#define FAST_FLOAT double
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* JPEG_INTERNAL_OPTIONS */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,249 +1,249 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msvc/wx/msw/setup.h
|
||||
// Purpose: wrapper around the real wx/setup.h for Visual C++
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 2004-12-12
|
||||
// RCS-ID: $Id: setup.h 43687 2006-11-27 15:03:59Z VZ $
|
||||
// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
|
||||
// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
|
||||
// explicitly!
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _UNICODE
|
||||
#ifdef WXUSINGDLL
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_dll/mswud/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_dll/mswu/wx/setup.h"
|
||||
#endif
|
||||
#else
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_lib/mswud/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_lib/mswu/wx/setup.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib,"wxbase28ud")
|
||||
#pragma comment(lib,"wxbase28ud_net")
|
||||
#pragma comment(lib,"wxbase28ud_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregexud")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpatd")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpegd")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpngd")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiffd")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlibd")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28ud_adv")
|
||||
#pragma comment(lib,"wxmsw28ud_core")
|
||||
#pragma comment(lib,"wxmsw28ud_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28ud_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28ud_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28ud_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28ud_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28ud_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28ud_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28ud_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#else // release
|
||||
#pragma comment(lib,"wxbase28u")
|
||||
#pragma comment(lib,"wxbase28u_net")
|
||||
#pragma comment(lib,"wxbase28u_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregexu")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpat")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpeg")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpng")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiff")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlib")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28u_adv")
|
||||
#pragma comment(lib,"wxmsw28u_core")
|
||||
#pragma comment(lib,"wxmsw28u_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28u_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28u_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28u_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28u_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28u_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28u_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28u_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#endif // debug/release
|
||||
#else // !_UNICODE
|
||||
#ifdef WXUSINGDLL
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_dll/mswd/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_dll/msw/wx/setup.h"
|
||||
#endif
|
||||
#else // static lib
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_lib/mswd/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_lib/msw/wx/setup.h"
|
||||
#endif
|
||||
#endif // shared/static
|
||||
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib,"wxbase28d")
|
||||
#pragma comment(lib,"wxbase28d_net")
|
||||
#pragma comment(lib,"wxbase28d_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregexd")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpatd")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpegd")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpngd")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiffd")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlibd")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28d_adv")
|
||||
#pragma comment(lib,"wxmsw28d_core")
|
||||
#pragma comment(lib,"wxmsw28d_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28d_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28d_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28d_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28d_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28d_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28d_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28d_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#else // release
|
||||
#pragma comment(lib,"wxbase28")
|
||||
#pragma comment(lib,"wxbase28_net")
|
||||
#pragma comment(lib,"wxbase28_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregex")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpat")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpeg")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpng")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiff")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlib")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28_adv")
|
||||
#pragma comment(lib,"wxmsw28_core")
|
||||
#pragma comment(lib,"wxmsw28_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#endif // debug/release
|
||||
#endif // _UNICODE/!_UNICODE
|
||||
#else
|
||||
#error "This file should only be included when using Microsoft Visual C++"
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msvc/wx/msw/setup.h
|
||||
// Purpose: wrapper around the real wx/setup.h for Visual C++
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 2004-12-12
|
||||
// RCS-ID: $Id: setup.h 43687 2006-11-27 15:03:59Z VZ $
|
||||
// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
|
||||
// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
|
||||
// explicitly!
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _UNICODE
|
||||
#ifdef WXUSINGDLL
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_dll/mswud/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_dll/mswu/wx/setup.h"
|
||||
#endif
|
||||
#else
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_lib/mswud/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_lib/mswu/wx/setup.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib,"wxbase28ud")
|
||||
#pragma comment(lib,"wxbase28ud_net")
|
||||
#pragma comment(lib,"wxbase28ud_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregexud")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpatd")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpegd")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpngd")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiffd")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlibd")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28ud_adv")
|
||||
#pragma comment(lib,"wxmsw28ud_core")
|
||||
#pragma comment(lib,"wxmsw28ud_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28ud_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28ud_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28ud_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28ud_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28ud_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28ud_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28ud_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#else // release
|
||||
#pragma comment(lib,"wxbase28u")
|
||||
#pragma comment(lib,"wxbase28u_net")
|
||||
#pragma comment(lib,"wxbase28u_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregexu")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpat")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpeg")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpng")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiff")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlib")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28u_adv")
|
||||
#pragma comment(lib,"wxmsw28u_core")
|
||||
#pragma comment(lib,"wxmsw28u_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28u_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28u_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28u_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28u_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28u_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28u_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28u_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#endif // debug/release
|
||||
#else // !_UNICODE
|
||||
#ifdef WXUSINGDLL
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_dll/mswd/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_dll/msw/wx/setup.h"
|
||||
#endif
|
||||
#else // static lib
|
||||
#ifdef _DEBUG
|
||||
#include "../../../lib/vc_lib/mswd/wx/setup.h"
|
||||
#else
|
||||
#include "../../../lib/vc_lib/msw/wx/setup.h"
|
||||
#endif
|
||||
#endif // shared/static
|
||||
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib,"wxbase28d")
|
||||
#pragma comment(lib,"wxbase28d_net")
|
||||
#pragma comment(lib,"wxbase28d_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregexd")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpatd")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpegd")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpngd")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiffd")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlibd")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28d_adv")
|
||||
#pragma comment(lib,"wxmsw28d_core")
|
||||
#pragma comment(lib,"wxmsw28d_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28d_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28d_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28d_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28d_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28d_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28d_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28d_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#else // release
|
||||
#pragma comment(lib,"wxbase28")
|
||||
#pragma comment(lib,"wxbase28_net")
|
||||
#pragma comment(lib,"wxbase28_xml")
|
||||
#if wxUSE_REGEX
|
||||
#pragma comment(lib,"wxregex")
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if wxUSE_XML
|
||||
#pragma comment(lib,"wxexpat")
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
#pragma comment(lib,"wxjpeg")
|
||||
#endif
|
||||
#if wxUSE_LIBPNG
|
||||
#pragma comment(lib,"wxpng")
|
||||
#endif
|
||||
#if wxUSE_LIBTIFF
|
||||
#pragma comment(lib,"wxtiff")
|
||||
#endif
|
||||
#if wxUSE_ZLIB
|
||||
#pragma comment(lib,"wxzlib")
|
||||
#endif
|
||||
#pragma comment(lib,"wxmsw28_adv")
|
||||
#pragma comment(lib,"wxmsw28_core")
|
||||
#pragma comment(lib,"wxmsw28_html")
|
||||
#if wxUSE_GLCANVAS
|
||||
#pragma comment(lib,"wxmsw28_gl")
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT
|
||||
#pragma comment(lib,"wxmsw28_qa")
|
||||
#endif
|
||||
#if wxUSE_XRC
|
||||
#pragma comment(lib,"wxmsw28_xrc")
|
||||
#endif
|
||||
#if wxUSE_AUI
|
||||
#pragma comment(lib,"wxmsw28_aui")
|
||||
#endif
|
||||
#if wxUSE_RICHTEXT
|
||||
#pragma comment(lib,"wxmsw28_richtext")
|
||||
#endif
|
||||
#if wxUSE_MEDIACTRL
|
||||
#pragma comment(lib,"wxmsw28_media")
|
||||
#endif
|
||||
#if wxUSE_ODBC
|
||||
#pragma comment(lib,"wxbase28_odbc")
|
||||
#endif
|
||||
#endif // wxUSE_GUI
|
||||
#endif // debug/release
|
||||
#endif // _UNICODE/!_UNICODE
|
||||
#else
|
||||
#error "This file should only be included when using Microsoft Visual C++"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,155 +1,155 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aboutdlg.h
|
||||
// Purpose: declaration of wxAboutDialog class
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2006-10-07
|
||||
// RCS-ID: $Id: aboutdlg.h 41813 2006-10-09 16:56:18Z RD $
|
||||
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ABOUTDLG_H_
|
||||
#define _WX_ABOUTDLG_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ABOUTDLG
|
||||
|
||||
#include "wx/app.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAboutDialogInfo: information shown by the standard "About" dialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAboutDialogInfo
|
||||
{
|
||||
public:
|
||||
// all fields are initially uninitialized
|
||||
wxAboutDialogInfo() { }
|
||||
|
||||
// accessors for various simply fields
|
||||
// -----------------------------------
|
||||
|
||||
// name of the program, if not used defaults wxApp::GetAppName()
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
wxString GetName() const
|
||||
{ return m_name.empty() ? wxTheApp->GetAppName() : m_name; }
|
||||
|
||||
// version of the program, in free format (but without "version" word)
|
||||
void SetVersion(const wxString& version) { m_version = version; }
|
||||
bool HasVersion() const { return !m_version.empty(); }
|
||||
wxString GetVersion() const { return m_version; }
|
||||
|
||||
// brief, but possibly multiline, description of the program
|
||||
void SetDescription(const wxString& desc) { m_description = desc; }
|
||||
bool HasDescription() const { return !m_description.empty(); }
|
||||
wxString GetDescription() const { return m_description; }
|
||||
|
||||
// short string containing the program copyright information
|
||||
void SetCopyright(const wxString& copyright) { m_copyright = copyright; }
|
||||
bool HasCopyright() const { return !m_copyright.empty(); }
|
||||
wxString GetCopyright() const { return m_copyright; }
|
||||
|
||||
// long, multiline string containing the text of the program licence
|
||||
void SetLicence(const wxString& licence) { m_licence = licence; }
|
||||
void SetLicense(const wxString& licence) { m_licence = licence; }
|
||||
bool HasLicence() const { return !m_licence.empty(); }
|
||||
wxString GetLicence() const { return m_licence; }
|
||||
|
||||
// icon to be shown in the dialog, defaults to the main frame icon
|
||||
void SetIcon(const wxIcon& icon) { m_icon = icon; }
|
||||
bool HasIcon() const { return m_icon.Ok(); }
|
||||
wxIcon GetIcon() const;
|
||||
|
||||
// web site for the program and its description (defaults to URL itself if
|
||||
// empty)
|
||||
void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString)
|
||||
{
|
||||
m_url = url;
|
||||
m_urlDesc = desc.empty() ? url : desc;
|
||||
}
|
||||
|
||||
bool HasWebSite() const { return !m_url.empty(); }
|
||||
|
||||
wxString GetWebSiteURL() const { return m_url; }
|
||||
wxString GetWebSiteDescription() const { return m_urlDesc; }
|
||||
|
||||
// accessors for the arrays
|
||||
// ------------------------
|
||||
|
||||
// the list of developers of the program
|
||||
void SetDevelopers(const wxArrayString& developers)
|
||||
{ m_developers = developers; }
|
||||
void AddDeveloper(const wxString& developer)
|
||||
{ m_developers.push_back(developer); }
|
||||
|
||||
bool HasDevelopers() const { return !m_developers.empty(); }
|
||||
const wxArrayString& GetDevelopers() const { return m_developers; }
|
||||
|
||||
// the list of documentation writers
|
||||
void SetDocWriters(const wxArrayString& docwriters)
|
||||
{ m_docwriters = docwriters; }
|
||||
void AddDocWriter(const wxString& docwriter)
|
||||
{ m_docwriters.push_back(docwriter); }
|
||||
|
||||
bool HasDocWriters() const { return !m_docwriters.empty(); }
|
||||
const wxArrayString& GetDocWriters() const { return m_docwriters; }
|
||||
|
||||
// the list of artists for the program art
|
||||
void SetArtists(const wxArrayString& artists)
|
||||
{ m_artists = artists; }
|
||||
void AddArtist(const wxString& artist)
|
||||
{ m_artists.push_back(artist); }
|
||||
|
||||
bool HasArtists() const { return !m_artists.empty(); }
|
||||
const wxArrayString& GetArtists() const { return m_artists; }
|
||||
|
||||
// the list of translators
|
||||
void SetTranslators(const wxArrayString& translators)
|
||||
{ m_translators = translators; }
|
||||
void AddTranslator(const wxString& translator)
|
||||
{ m_translators.push_back(translator); }
|
||||
|
||||
bool HasTranslators() const { return !m_translators.empty(); }
|
||||
const wxArrayString& GetTranslators() const { return m_translators; }
|
||||
|
||||
|
||||
// implementation only
|
||||
// -------------------
|
||||
|
||||
// "simple" about dialog shows only textual information (with possibly
|
||||
// default icon but without hyperlink nor any long texts such as the
|
||||
// licence text)
|
||||
bool IsSimple() const
|
||||
{ return !HasWebSite() && !HasIcon() && !HasLicence(); }
|
||||
|
||||
// get the description and credits (i.e. all of developers, doc writers,
|
||||
// artists and translators) as a one long multiline string
|
||||
wxString GetDescriptionAndCredits() const;
|
||||
|
||||
private:
|
||||
wxString m_name,
|
||||
m_version,
|
||||
m_description,
|
||||
m_copyright,
|
||||
m_licence;
|
||||
|
||||
wxIcon m_icon;
|
||||
|
||||
wxString m_url,
|
||||
m_urlDesc;
|
||||
|
||||
wxArrayString m_developers,
|
||||
m_docwriters,
|
||||
m_artists,
|
||||
m_translators;
|
||||
};
|
||||
|
||||
// functions to show the about dialog box
|
||||
WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info);
|
||||
|
||||
#endif // wxUSE_ABOUTDLG
|
||||
|
||||
#endif // _WX_ABOUTDLG_H_
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aboutdlg.h
|
||||
// Purpose: declaration of wxAboutDialog class
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2006-10-07
|
||||
// RCS-ID: $Id: aboutdlg.h 41813 2006-10-09 16:56:18Z RD $
|
||||
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ABOUTDLG_H_
|
||||
#define _WX_ABOUTDLG_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ABOUTDLG
|
||||
|
||||
#include "wx/app.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAboutDialogInfo: information shown by the standard "About" dialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAboutDialogInfo
|
||||
{
|
||||
public:
|
||||
// all fields are initially uninitialized
|
||||
wxAboutDialogInfo() { }
|
||||
|
||||
// accessors for various simply fields
|
||||
// -----------------------------------
|
||||
|
||||
// name of the program, if not used defaults wxApp::GetAppName()
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
wxString GetName() const
|
||||
{ return m_name.empty() ? wxTheApp->GetAppName() : m_name; }
|
||||
|
||||
// version of the program, in free format (but without "version" word)
|
||||
void SetVersion(const wxString& version) { m_version = version; }
|
||||
bool HasVersion() const { return !m_version.empty(); }
|
||||
wxString GetVersion() const { return m_version; }
|
||||
|
||||
// brief, but possibly multiline, description of the program
|
||||
void SetDescription(const wxString& desc) { m_description = desc; }
|
||||
bool HasDescription() const { return !m_description.empty(); }
|
||||
wxString GetDescription() const { return m_description; }
|
||||
|
||||
// short string containing the program copyright information
|
||||
void SetCopyright(const wxString& copyright) { m_copyright = copyright; }
|
||||
bool HasCopyright() const { return !m_copyright.empty(); }
|
||||
wxString GetCopyright() const { return m_copyright; }
|
||||
|
||||
// long, multiline string containing the text of the program licence
|
||||
void SetLicence(const wxString& licence) { m_licence = licence; }
|
||||
void SetLicense(const wxString& licence) { m_licence = licence; }
|
||||
bool HasLicence() const { return !m_licence.empty(); }
|
||||
wxString GetLicence() const { return m_licence; }
|
||||
|
||||
// icon to be shown in the dialog, defaults to the main frame icon
|
||||
void SetIcon(const wxIcon& icon) { m_icon = icon; }
|
||||
bool HasIcon() const { return m_icon.Ok(); }
|
||||
wxIcon GetIcon() const;
|
||||
|
||||
// web site for the program and its description (defaults to URL itself if
|
||||
// empty)
|
||||
void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString)
|
||||
{
|
||||
m_url = url;
|
||||
m_urlDesc = desc.empty() ? url : desc;
|
||||
}
|
||||
|
||||
bool HasWebSite() const { return !m_url.empty(); }
|
||||
|
||||
wxString GetWebSiteURL() const { return m_url; }
|
||||
wxString GetWebSiteDescription() const { return m_urlDesc; }
|
||||
|
||||
// accessors for the arrays
|
||||
// ------------------------
|
||||
|
||||
// the list of developers of the program
|
||||
void SetDevelopers(const wxArrayString& developers)
|
||||
{ m_developers = developers; }
|
||||
void AddDeveloper(const wxString& developer)
|
||||
{ m_developers.push_back(developer); }
|
||||
|
||||
bool HasDevelopers() const { return !m_developers.empty(); }
|
||||
const wxArrayString& GetDevelopers() const { return m_developers; }
|
||||
|
||||
// the list of documentation writers
|
||||
void SetDocWriters(const wxArrayString& docwriters)
|
||||
{ m_docwriters = docwriters; }
|
||||
void AddDocWriter(const wxString& docwriter)
|
||||
{ m_docwriters.push_back(docwriter); }
|
||||
|
||||
bool HasDocWriters() const { return !m_docwriters.empty(); }
|
||||
const wxArrayString& GetDocWriters() const { return m_docwriters; }
|
||||
|
||||
// the list of artists for the program art
|
||||
void SetArtists(const wxArrayString& artists)
|
||||
{ m_artists = artists; }
|
||||
void AddArtist(const wxString& artist)
|
||||
{ m_artists.push_back(artist); }
|
||||
|
||||
bool HasArtists() const { return !m_artists.empty(); }
|
||||
const wxArrayString& GetArtists() const { return m_artists; }
|
||||
|
||||
// the list of translators
|
||||
void SetTranslators(const wxArrayString& translators)
|
||||
{ m_translators = translators; }
|
||||
void AddTranslator(const wxString& translator)
|
||||
{ m_translators.push_back(translator); }
|
||||
|
||||
bool HasTranslators() const { return !m_translators.empty(); }
|
||||
const wxArrayString& GetTranslators() const { return m_translators; }
|
||||
|
||||
|
||||
// implementation only
|
||||
// -------------------
|
||||
|
||||
// "simple" about dialog shows only textual information (with possibly
|
||||
// default icon but without hyperlink nor any long texts such as the
|
||||
// licence text)
|
||||
bool IsSimple() const
|
||||
{ return !HasWebSite() && !HasIcon() && !HasLicence(); }
|
||||
|
||||
// get the description and credits (i.e. all of developers, doc writers,
|
||||
// artists and translators) as a one long multiline string
|
||||
wxString GetDescriptionAndCredits() const;
|
||||
|
||||
private:
|
||||
wxString m_name,
|
||||
m_version,
|
||||
m_description,
|
||||
m_copyright,
|
||||
m_licence;
|
||||
|
||||
wxIcon m_icon;
|
||||
|
||||
wxString m_url,
|
||||
m_urlDesc;
|
||||
|
||||
wxArrayString m_developers,
|
||||
m_docwriters,
|
||||
m_artists,
|
||||
m_translators;
|
||||
};
|
||||
|
||||
// functions to show the about dialog box
|
||||
WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info);
|
||||
|
||||
#endif // wxUSE_ABOUTDLG
|
||||
|
||||
#endif // _WX_ABOUTDLG_H_
|
||||
|
||||
|
|
|
@ -1,171 +1,171 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/accel.h
|
||||
// Purpose: wxAcceleratorEntry and wxAcceleratorTable classes
|
||||
// Author: Julian Smart, Robert Roebling, Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 31.05.01 (extracted from other files)
|
||||
// RCS-ID: $Id: accel.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCEL_H_BASE_
|
||||
#define _WX_ACCEL_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenuItem;
|
||||
class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// wxAcceleratorEntry flags
|
||||
enum
|
||||
{
|
||||
wxACCEL_NORMAL = 0x0000, // no modifiers
|
||||
wxACCEL_ALT = 0x0001, // hold Alt key down
|
||||
wxACCEL_CTRL = 0x0002, // hold Ctrl key down
|
||||
wxACCEL_SHIFT = 0x0004, // hold Shift key down
|
||||
#if defined(__WXMAC__) || defined(__WXCOCOA__)
|
||||
wxACCEL_CMD = 0x0008 // Command key on OS X
|
||||
#else
|
||||
wxACCEL_CMD = wxACCEL_CTRL
|
||||
#endif
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// an entry in wxAcceleratorTable corresponds to one accelerator
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxAcceleratorEntry
|
||||
{
|
||||
public:
|
||||
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
|
||||
wxMenuItem *item = NULL)
|
||||
: m_flags(flags)
|
||||
, m_keyCode(keyCode)
|
||||
, m_command(cmd)
|
||||
, m_item(item)
|
||||
{ }
|
||||
|
||||
wxAcceleratorEntry(const wxAcceleratorEntry& entry)
|
||||
: m_flags(entry.m_flags)
|
||||
, m_keyCode(entry.m_keyCode)
|
||||
, m_command(entry.m_command)
|
||||
, m_item(entry.m_item)
|
||||
{ }
|
||||
|
||||
// create accelerator corresponding to the specified string, return NULL if
|
||||
// string couldn't be parsed or a pointer to be deleted by the caller
|
||||
static wxAcceleratorEntry *Create(const wxString& str);
|
||||
|
||||
wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
|
||||
{
|
||||
Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
|
||||
{
|
||||
m_flags = flags;
|
||||
m_keyCode = keyCode;
|
||||
m_command = cmd;
|
||||
m_item = item;
|
||||
}
|
||||
|
||||
void SetMenuItem(wxMenuItem *item) { m_item = item; }
|
||||
|
||||
int GetFlags() const { return m_flags; }
|
||||
int GetKeyCode() const { return m_keyCode; }
|
||||
int GetCommand() const { return m_command; }
|
||||
|
||||
wxMenuItem *GetMenuItem() const { return m_item; }
|
||||
|
||||
bool operator==(const wxAcceleratorEntry& entry) const
|
||||
{
|
||||
return m_flags == entry.m_flags &&
|
||||
m_keyCode == entry.m_keyCode &&
|
||||
m_command == entry.m_command &&
|
||||
m_item == entry.m_item;
|
||||
}
|
||||
|
||||
bool operator!=(const wxAcceleratorEntry& entry) const
|
||||
{ return !(*this == entry); }
|
||||
|
||||
#if defined(__WXMOTIF__)
|
||||
// Implementation use only
|
||||
bool MatchesEvent(const wxKeyEvent& event) const;
|
||||
#endif
|
||||
|
||||
bool IsOk() const
|
||||
{
|
||||
return m_flags != 0 &&
|
||||
m_keyCode != 0;
|
||||
}
|
||||
|
||||
|
||||
// string <-> wxAcceleratorEntry conversion
|
||||
// ----------------------------------------
|
||||
|
||||
// returns a wxString for the this accelerator.
|
||||
// this function formats it using the <flags>-<keycode> format
|
||||
// where <flags> maybe a hyphen-separed list of "shift|alt|ctrl"
|
||||
wxString ToString() const;
|
||||
|
||||
// returns true if the given string correctly initialized this object
|
||||
// (i.e. if IsOk() returns true after this call)
|
||||
bool FromString(const wxString& str);
|
||||
|
||||
|
||||
private:
|
||||
// common part of Create() and FromString()
|
||||
static bool ParseAccel(const wxString& str, int *flags, int *keycode);
|
||||
|
||||
|
||||
int m_flags; // combination of wxACCEL_XXX constants
|
||||
int m_keyCode; // ASCII or virtual keycode
|
||||
int m_command; // Command id to generate
|
||||
|
||||
// the menu item this entry corresponds to, may be NULL
|
||||
wxMenuItem *m_item;
|
||||
|
||||
// for compatibility with old code, use accessors now!
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxMenu;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include wxAcceleratorTable class declaration, it is only used by the library
|
||||
// and so doesn't have any published user visible interface
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/generic/accel.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/accel.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/accel.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/accel.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/accel.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/accel.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/generic/accel.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/accel.h"
|
||||
#endif
|
||||
|
||||
extern WXDLLEXPORT_DATA(wxAcceleratorTable) wxNullAcceleratorTable;
|
||||
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
#endif
|
||||
// _WX_ACCEL_H_BASE_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/accel.h
|
||||
// Purpose: wxAcceleratorEntry and wxAcceleratorTable classes
|
||||
// Author: Julian Smart, Robert Roebling, Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 31.05.01 (extracted from other files)
|
||||
// RCS-ID: $Id: accel.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCEL_H_BASE_
|
||||
#define _WX_ACCEL_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenuItem;
|
||||
class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// wxAcceleratorEntry flags
|
||||
enum
|
||||
{
|
||||
wxACCEL_NORMAL = 0x0000, // no modifiers
|
||||
wxACCEL_ALT = 0x0001, // hold Alt key down
|
||||
wxACCEL_CTRL = 0x0002, // hold Ctrl key down
|
||||
wxACCEL_SHIFT = 0x0004, // hold Shift key down
|
||||
#if defined(__WXMAC__) || defined(__WXCOCOA__)
|
||||
wxACCEL_CMD = 0x0008 // Command key on OS X
|
||||
#else
|
||||
wxACCEL_CMD = wxACCEL_CTRL
|
||||
#endif
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// an entry in wxAcceleratorTable corresponds to one accelerator
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxAcceleratorEntry
|
||||
{
|
||||
public:
|
||||
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
|
||||
wxMenuItem *item = NULL)
|
||||
: m_flags(flags)
|
||||
, m_keyCode(keyCode)
|
||||
, m_command(cmd)
|
||||
, m_item(item)
|
||||
{ }
|
||||
|
||||
wxAcceleratorEntry(const wxAcceleratorEntry& entry)
|
||||
: m_flags(entry.m_flags)
|
||||
, m_keyCode(entry.m_keyCode)
|
||||
, m_command(entry.m_command)
|
||||
, m_item(entry.m_item)
|
||||
{ }
|
||||
|
||||
// create accelerator corresponding to the specified string, return NULL if
|
||||
// string couldn't be parsed or a pointer to be deleted by the caller
|
||||
static wxAcceleratorEntry *Create(const wxString& str);
|
||||
|
||||
wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
|
||||
{
|
||||
Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
|
||||
{
|
||||
m_flags = flags;
|
||||
m_keyCode = keyCode;
|
||||
m_command = cmd;
|
||||
m_item = item;
|
||||
}
|
||||
|
||||
void SetMenuItem(wxMenuItem *item) { m_item = item; }
|
||||
|
||||
int GetFlags() const { return m_flags; }
|
||||
int GetKeyCode() const { return m_keyCode; }
|
||||
int GetCommand() const { return m_command; }
|
||||
|
||||
wxMenuItem *GetMenuItem() const { return m_item; }
|
||||
|
||||
bool operator==(const wxAcceleratorEntry& entry) const
|
||||
{
|
||||
return m_flags == entry.m_flags &&
|
||||
m_keyCode == entry.m_keyCode &&
|
||||
m_command == entry.m_command &&
|
||||
m_item == entry.m_item;
|
||||
}
|
||||
|
||||
bool operator!=(const wxAcceleratorEntry& entry) const
|
||||
{ return !(*this == entry); }
|
||||
|
||||
#if defined(__WXMOTIF__)
|
||||
// Implementation use only
|
||||
bool MatchesEvent(const wxKeyEvent& event) const;
|
||||
#endif
|
||||
|
||||
bool IsOk() const
|
||||
{
|
||||
return m_flags != 0 &&
|
||||
m_keyCode != 0;
|
||||
}
|
||||
|
||||
|
||||
// string <-> wxAcceleratorEntry conversion
|
||||
// ----------------------------------------
|
||||
|
||||
// returns a wxString for the this accelerator.
|
||||
// this function formats it using the <flags>-<keycode> format
|
||||
// where <flags> maybe a hyphen-separed list of "shift|alt|ctrl"
|
||||
wxString ToString() const;
|
||||
|
||||
// returns true if the given string correctly initialized this object
|
||||
// (i.e. if IsOk() returns true after this call)
|
||||
bool FromString(const wxString& str);
|
||||
|
||||
|
||||
private:
|
||||
// common part of Create() and FromString()
|
||||
static bool ParseAccel(const wxString& str, int *flags, int *keycode);
|
||||
|
||||
|
||||
int m_flags; // combination of wxACCEL_XXX constants
|
||||
int m_keyCode; // ASCII or virtual keycode
|
||||
int m_command; // Command id to generate
|
||||
|
||||
// the menu item this entry corresponds to, may be NULL
|
||||
wxMenuItem *m_item;
|
||||
|
||||
// for compatibility with old code, use accessors now!
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxMenu;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include wxAcceleratorTable class declaration, it is only used by the library
|
||||
// and so doesn't have any published user visible interface
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/generic/accel.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/accel.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/accel.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/accel.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/accel.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/accel.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/generic/accel.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/accel.h"
|
||||
#endif
|
||||
|
||||
extern WXDLLEXPORT_DATA(wxAcceleratorTable) wxNullAcceleratorTable;
|
||||
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
#endif
|
||||
// _WX_ACCEL_H_BASE_
|
||||
|
|
|
@ -1,377 +1,377 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/access.h
|
||||
// Purpose: Accessibility classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2003-02-12
|
||||
// RCS-ID: $Id: access.h 51246 2008-01-16 12:56:37Z VZ $
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCESSBASE_H_
|
||||
#define _WX_ACCESSBASE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers we have to include here
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
|
||||
#include "wx/variant.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
wxACC_FAIL,
|
||||
wxACC_FALSE,
|
||||
wxACC_OK,
|
||||
wxACC_NOT_IMPLEMENTED,
|
||||
wxACC_NOT_SUPPORTED
|
||||
} wxAccStatus;
|
||||
|
||||
// Child ids are integer identifiers from 1 up.
|
||||
// So zero represents 'this' object.
|
||||
#define wxACC_SELF 0
|
||||
|
||||
// Navigation constants
|
||||
|
||||
typedef enum
|
||||
{
|
||||
wxNAVDIR_DOWN,
|
||||
wxNAVDIR_FIRSTCHILD,
|
||||
wxNAVDIR_LASTCHILD,
|
||||
wxNAVDIR_LEFT,
|
||||
wxNAVDIR_NEXT,
|
||||
wxNAVDIR_PREVIOUS,
|
||||
wxNAVDIR_RIGHT,
|
||||
wxNAVDIR_UP
|
||||
} wxNavDir;
|
||||
|
||||
// Role constants
|
||||
|
||||
typedef enum {
|
||||
wxROLE_NONE,
|
||||
wxROLE_SYSTEM_ALERT,
|
||||
wxROLE_SYSTEM_ANIMATION,
|
||||
wxROLE_SYSTEM_APPLICATION,
|
||||
wxROLE_SYSTEM_BORDER,
|
||||
wxROLE_SYSTEM_BUTTONDROPDOWN,
|
||||
wxROLE_SYSTEM_BUTTONDROPDOWNGRID,
|
||||
wxROLE_SYSTEM_BUTTONMENU,
|
||||
wxROLE_SYSTEM_CARET,
|
||||
wxROLE_SYSTEM_CELL,
|
||||
wxROLE_SYSTEM_CHARACTER,
|
||||
wxROLE_SYSTEM_CHART,
|
||||
wxROLE_SYSTEM_CHECKBUTTON,
|
||||
wxROLE_SYSTEM_CLIENT,
|
||||
wxROLE_SYSTEM_CLOCK,
|
||||
wxROLE_SYSTEM_COLUMN,
|
||||
wxROLE_SYSTEM_COLUMNHEADER,
|
||||
wxROLE_SYSTEM_COMBOBOX,
|
||||
wxROLE_SYSTEM_CURSOR,
|
||||
wxROLE_SYSTEM_DIAGRAM,
|
||||
wxROLE_SYSTEM_DIAL,
|
||||
wxROLE_SYSTEM_DIALOG,
|
||||
wxROLE_SYSTEM_DOCUMENT,
|
||||
wxROLE_SYSTEM_DROPLIST,
|
||||
wxROLE_SYSTEM_EQUATION,
|
||||
wxROLE_SYSTEM_GRAPHIC,
|
||||
wxROLE_SYSTEM_GRIP,
|
||||
wxROLE_SYSTEM_GROUPING,
|
||||
wxROLE_SYSTEM_HELPBALLOON,
|
||||
wxROLE_SYSTEM_HOTKEYFIELD,
|
||||
wxROLE_SYSTEM_INDICATOR,
|
||||
wxROLE_SYSTEM_LINK,
|
||||
wxROLE_SYSTEM_LIST,
|
||||
wxROLE_SYSTEM_LISTITEM,
|
||||
wxROLE_SYSTEM_MENUBAR,
|
||||
wxROLE_SYSTEM_MENUITEM,
|
||||
wxROLE_SYSTEM_MENUPOPUP,
|
||||
wxROLE_SYSTEM_OUTLINE,
|
||||
wxROLE_SYSTEM_OUTLINEITEM,
|
||||
wxROLE_SYSTEM_PAGETAB,
|
||||
wxROLE_SYSTEM_PAGETABLIST,
|
||||
wxROLE_SYSTEM_PANE,
|
||||
wxROLE_SYSTEM_PROGRESSBAR,
|
||||
wxROLE_SYSTEM_PROPERTYPAGE,
|
||||
wxROLE_SYSTEM_PUSHBUTTON,
|
||||
wxROLE_SYSTEM_RADIOBUTTON,
|
||||
wxROLE_SYSTEM_ROW,
|
||||
wxROLE_SYSTEM_ROWHEADER,
|
||||
wxROLE_SYSTEM_SCROLLBAR,
|
||||
wxROLE_SYSTEM_SEPARATOR,
|
||||
wxROLE_SYSTEM_SLIDER,
|
||||
wxROLE_SYSTEM_SOUND,
|
||||
wxROLE_SYSTEM_SPINBUTTON,
|
||||
wxROLE_SYSTEM_STATICTEXT,
|
||||
wxROLE_SYSTEM_STATUSBAR,
|
||||
wxROLE_SYSTEM_TABLE,
|
||||
wxROLE_SYSTEM_TEXT,
|
||||
wxROLE_SYSTEM_TITLEBAR,
|
||||
wxROLE_SYSTEM_TOOLBAR,
|
||||
wxROLE_SYSTEM_TOOLTIP,
|
||||
wxROLE_SYSTEM_WHITESPACE,
|
||||
wxROLE_SYSTEM_WINDOW
|
||||
} wxAccRole;
|
||||
|
||||
// Object types
|
||||
|
||||
typedef enum {
|
||||
wxOBJID_WINDOW = 0x00000000,
|
||||
wxOBJID_SYSMENU = 0xFFFFFFFF,
|
||||
wxOBJID_TITLEBAR = 0xFFFFFFFE,
|
||||
wxOBJID_MENU = 0xFFFFFFFD,
|
||||
wxOBJID_CLIENT = 0xFFFFFFFC,
|
||||
wxOBJID_VSCROLL = 0xFFFFFFFB,
|
||||
wxOBJID_HSCROLL = 0xFFFFFFFA,
|
||||
wxOBJID_SIZEGRIP = 0xFFFFFFF9,
|
||||
wxOBJID_CARET = 0xFFFFFFF8,
|
||||
wxOBJID_CURSOR = 0xFFFFFFF7,
|
||||
wxOBJID_ALERT = 0xFFFFFFF6,
|
||||
wxOBJID_SOUND = 0xFFFFFFF5
|
||||
} wxAccObject;
|
||||
|
||||
// Accessible states
|
||||
|
||||
#define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001
|
||||
#define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002
|
||||
#define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004
|
||||
#define wxACC_STATE_SYSTEM_ANIMATED 0x00000008
|
||||
#define wxACC_STATE_SYSTEM_BUSY 0x00000010
|
||||
#define wxACC_STATE_SYSTEM_CHECKED 0x00000020
|
||||
#define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040
|
||||
#define wxACC_STATE_SYSTEM_DEFAULT 0x00000080
|
||||
#define wxACC_STATE_SYSTEM_EXPANDED 0x00000100
|
||||
#define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200
|
||||
#define wxACC_STATE_SYSTEM_FLOATING 0x00000400
|
||||
#define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800
|
||||
#define wxACC_STATE_SYSTEM_FOCUSED 0x00001000
|
||||
#define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000
|
||||
#define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000
|
||||
#define wxACC_STATE_SYSTEM_MARQUEED 0x00008000
|
||||
#define wxACC_STATE_SYSTEM_MIXED 0x00010000
|
||||
#define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000
|
||||
#define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000
|
||||
#define wxACC_STATE_SYSTEM_PRESSED 0x00080000
|
||||
#define wxACC_STATE_SYSTEM_PROTECTED 0x00100000
|
||||
#define wxACC_STATE_SYSTEM_READONLY 0x00200000
|
||||
#define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000
|
||||
#define wxACC_STATE_SYSTEM_SELECTED 0x00800000
|
||||
#define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000
|
||||
#define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000
|
||||
|
||||
// Selection flag
|
||||
|
||||
typedef enum
|
||||
{
|
||||
wxACC_SEL_NONE = 0,
|
||||
wxACC_SEL_TAKEFOCUS = 1,
|
||||
wxACC_SEL_TAKESELECTION = 2,
|
||||
wxACC_SEL_EXTENDSELECTION = 4,
|
||||
wxACC_SEL_ADDSELECTION = 8,
|
||||
wxACC_SEL_REMOVESELECTION = 16
|
||||
} wxAccSelectionFlags;
|
||||
|
||||
// Accessibility event identifiers
|
||||
|
||||
#define wxACC_EVENT_SYSTEM_SOUND 0x0001
|
||||
#define wxACC_EVENT_SYSTEM_ALERT 0x0002
|
||||
#define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003
|
||||
#define wxACC_EVENT_SYSTEM_MENUSTART 0x0004
|
||||
#define wxACC_EVENT_SYSTEM_MENUEND 0x0005
|
||||
#define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006
|
||||
#define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007
|
||||
#define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008
|
||||
#define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009
|
||||
#define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A
|
||||
#define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B
|
||||
#define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
|
||||
#define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D
|
||||
#define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E
|
||||
#define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F
|
||||
#define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010
|
||||
#define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011
|
||||
#define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012
|
||||
#define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013
|
||||
#define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014
|
||||
#define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015
|
||||
#define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016
|
||||
#define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017
|
||||
#define wxACC_EVENT_OBJECT_CREATE 0x8000
|
||||
#define wxACC_EVENT_OBJECT_DESTROY 0x8001
|
||||
#define wxACC_EVENT_OBJECT_SHOW 0x8002
|
||||
#define wxACC_EVENT_OBJECT_HIDE 0x8003
|
||||
#define wxACC_EVENT_OBJECT_REORDER 0x8004
|
||||
#define wxACC_EVENT_OBJECT_FOCUS 0x8005
|
||||
#define wxACC_EVENT_OBJECT_SELECTION 0x8006
|
||||
#define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007
|
||||
#define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008
|
||||
#define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009
|
||||
#define wxACC_EVENT_OBJECT_STATECHANGE 0x800A
|
||||
#define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B
|
||||
#define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C
|
||||
#define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
|
||||
#define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E
|
||||
#define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F
|
||||
#define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010
|
||||
#define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011
|
||||
#define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAccessible
|
||||
// All functions return an indication of success, failure, or not implemented.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxAccessible;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPoint;
|
||||
class WXDLLIMPEXP_FWD_CORE wxRect;
|
||||
class WXDLLEXPORT wxAccessibleBase : public wxObject
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxAccessibleBase)
|
||||
|
||||
public:
|
||||
wxAccessibleBase(wxWindow* win): m_window(win) {}
|
||||
virtual ~wxAccessibleBase() {}
|
||||
|
||||
// Overridables
|
||||
|
||||
// Can return either a child object, or an integer
|
||||
// representing the child element, starting from 1.
|
||||
// pt is in screen coordinates.
|
||||
virtual wxAccStatus HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns the rectangle for this object (id = 0) or a child element (id > 0).
|
||||
// rect is in screen coordinates.
|
||||
virtual wxAccStatus GetLocation(wxRect& WXUNUSED(rect), int WXUNUSED(elementId))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Navigates from fromId to toId/toObject.
|
||||
virtual wxAccStatus Navigate(wxNavDir WXUNUSED(navDir), int WXUNUSED(fromId),
|
||||
int* WXUNUSED(toId), wxAccessible** WXUNUSED(toObject))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the name of the specified object.
|
||||
virtual wxAccStatus GetName(int WXUNUSED(childId), wxString* WXUNUSED(name))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the number of children.
|
||||
virtual wxAccStatus GetChildCount(int* WXUNUSED(childCount))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the specified child (starting from 1).
|
||||
// If *child is NULL and return value is wxACC_OK,
|
||||
// this means that the child is a simple element and
|
||||
// not an accessible object.
|
||||
virtual wxAccStatus GetChild(int WXUNUSED(childId), wxAccessible** WXUNUSED(child))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the parent, or NULL.
|
||||
virtual wxAccStatus GetParent(wxAccessible** WXUNUSED(parent))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Performs the default action. childId is 0 (the action for this object)
|
||||
// or > 0 (the action for a child).
|
||||
// Return wxACC_NOT_SUPPORTED if there is no default action for this
|
||||
// window (e.g. an edit control).
|
||||
virtual wxAccStatus DoDefaultAction(int WXUNUSED(childId))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// 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
|
||||
// string if there is no action.
|
||||
// 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
|
||||
// a document has a default action of "Press" rather than "Prints the current document."
|
||||
virtual wxAccStatus GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns the description for this object or a child.
|
||||
virtual wxAccStatus GetDescription(int WXUNUSED(childId), wxString* WXUNUSED(description))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns help text for this object or a child, similar to tooltip text.
|
||||
virtual wxAccStatus GetHelpText(int WXUNUSED(childId), wxString* WXUNUSED(helpText))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns the keyboard shortcut for this object or child.
|
||||
// Return e.g. ALT+K
|
||||
virtual wxAccStatus GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns a role constant.
|
||||
virtual wxAccStatus GetRole(int WXUNUSED(childId), wxAccRole* WXUNUSED(role))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns a state constant.
|
||||
virtual wxAccStatus GetState(int WXUNUSED(childId), long* WXUNUSED(state))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns a localized string representing the value for the object
|
||||
// or child.
|
||||
virtual wxAccStatus GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Selects the object or child.
|
||||
virtual wxAccStatus Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the window with the keyboard focus.
|
||||
// If childId is 0 and child is NULL, no object in
|
||||
// this subhierarchy has the focus.
|
||||
// If this object has the focus, child should be 'this'.
|
||||
virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
#if wxUSE_VARIANT
|
||||
// Gets a variant representing the selected children
|
||||
// of this object.
|
||||
// Acceptable values:
|
||||
// - a null variant (IsNull() returns TRUE)
|
||||
// - a list variant (GetType() == wxT("list"))
|
||||
// - an integer representing the selected child element,
|
||||
// or 0 if this object is selected (GetType() == wxT("long"))
|
||||
// - a "void*" pointer to a wxAccessible child object
|
||||
virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
#endif // wxUSE_VARIANT
|
||||
|
||||
// Accessors
|
||||
|
||||
// Returns the window associated with this object.
|
||||
|
||||
wxWindow* GetWindow() { return m_window; }
|
||||
|
||||
// Sets the window associated with this object.
|
||||
|
||||
void SetWindow(wxWindow* window) { m_window = window; }
|
||||
|
||||
// Operations
|
||||
|
||||
// Each platform's implementation must define this
|
||||
// static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType,
|
||||
// int objectId);
|
||||
|
||||
private:
|
||||
|
||||
// Data members
|
||||
|
||||
wxWindow* m_window;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// now include the declaration of the real class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/ole/access.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
#endif // _WX_ACCESSBASE_H_
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/access.h
|
||||
// Purpose: Accessibility classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2003-02-12
|
||||
// RCS-ID: $Id: access.h 51246 2008-01-16 12:56:37Z VZ $
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCESSBASE_H_
|
||||
#define _WX_ACCESSBASE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers we have to include here
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
|
||||
#include "wx/variant.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
wxACC_FAIL,
|
||||
wxACC_FALSE,
|
||||
wxACC_OK,
|
||||
wxACC_NOT_IMPLEMENTED,
|
||||
wxACC_NOT_SUPPORTED
|
||||
} wxAccStatus;
|
||||
|
||||
// Child ids are integer identifiers from 1 up.
|
||||
// So zero represents 'this' object.
|
||||
#define wxACC_SELF 0
|
||||
|
||||
// Navigation constants
|
||||
|
||||
typedef enum
|
||||
{
|
||||
wxNAVDIR_DOWN,
|
||||
wxNAVDIR_FIRSTCHILD,
|
||||
wxNAVDIR_LASTCHILD,
|
||||
wxNAVDIR_LEFT,
|
||||
wxNAVDIR_NEXT,
|
||||
wxNAVDIR_PREVIOUS,
|
||||
wxNAVDIR_RIGHT,
|
||||
wxNAVDIR_UP
|
||||
} wxNavDir;
|
||||
|
||||
// Role constants
|
||||
|
||||
typedef enum {
|
||||
wxROLE_NONE,
|
||||
wxROLE_SYSTEM_ALERT,
|
||||
wxROLE_SYSTEM_ANIMATION,
|
||||
wxROLE_SYSTEM_APPLICATION,
|
||||
wxROLE_SYSTEM_BORDER,
|
||||
wxROLE_SYSTEM_BUTTONDROPDOWN,
|
||||
wxROLE_SYSTEM_BUTTONDROPDOWNGRID,
|
||||
wxROLE_SYSTEM_BUTTONMENU,
|
||||
wxROLE_SYSTEM_CARET,
|
||||
wxROLE_SYSTEM_CELL,
|
||||
wxROLE_SYSTEM_CHARACTER,
|
||||
wxROLE_SYSTEM_CHART,
|
||||
wxROLE_SYSTEM_CHECKBUTTON,
|
||||
wxROLE_SYSTEM_CLIENT,
|
||||
wxROLE_SYSTEM_CLOCK,
|
||||
wxROLE_SYSTEM_COLUMN,
|
||||
wxROLE_SYSTEM_COLUMNHEADER,
|
||||
wxROLE_SYSTEM_COMBOBOX,
|
||||
wxROLE_SYSTEM_CURSOR,
|
||||
wxROLE_SYSTEM_DIAGRAM,
|
||||
wxROLE_SYSTEM_DIAL,
|
||||
wxROLE_SYSTEM_DIALOG,
|
||||
wxROLE_SYSTEM_DOCUMENT,
|
||||
wxROLE_SYSTEM_DROPLIST,
|
||||
wxROLE_SYSTEM_EQUATION,
|
||||
wxROLE_SYSTEM_GRAPHIC,
|
||||
wxROLE_SYSTEM_GRIP,
|
||||
wxROLE_SYSTEM_GROUPING,
|
||||
wxROLE_SYSTEM_HELPBALLOON,
|
||||
wxROLE_SYSTEM_HOTKEYFIELD,
|
||||
wxROLE_SYSTEM_INDICATOR,
|
||||
wxROLE_SYSTEM_LINK,
|
||||
wxROLE_SYSTEM_LIST,
|
||||
wxROLE_SYSTEM_LISTITEM,
|
||||
wxROLE_SYSTEM_MENUBAR,
|
||||
wxROLE_SYSTEM_MENUITEM,
|
||||
wxROLE_SYSTEM_MENUPOPUP,
|
||||
wxROLE_SYSTEM_OUTLINE,
|
||||
wxROLE_SYSTEM_OUTLINEITEM,
|
||||
wxROLE_SYSTEM_PAGETAB,
|
||||
wxROLE_SYSTEM_PAGETABLIST,
|
||||
wxROLE_SYSTEM_PANE,
|
||||
wxROLE_SYSTEM_PROGRESSBAR,
|
||||
wxROLE_SYSTEM_PROPERTYPAGE,
|
||||
wxROLE_SYSTEM_PUSHBUTTON,
|
||||
wxROLE_SYSTEM_RADIOBUTTON,
|
||||
wxROLE_SYSTEM_ROW,
|
||||
wxROLE_SYSTEM_ROWHEADER,
|
||||
wxROLE_SYSTEM_SCROLLBAR,
|
||||
wxROLE_SYSTEM_SEPARATOR,
|
||||
wxROLE_SYSTEM_SLIDER,
|
||||
wxROLE_SYSTEM_SOUND,
|
||||
wxROLE_SYSTEM_SPINBUTTON,
|
||||
wxROLE_SYSTEM_STATICTEXT,
|
||||
wxROLE_SYSTEM_STATUSBAR,
|
||||
wxROLE_SYSTEM_TABLE,
|
||||
wxROLE_SYSTEM_TEXT,
|
||||
wxROLE_SYSTEM_TITLEBAR,
|
||||
wxROLE_SYSTEM_TOOLBAR,
|
||||
wxROLE_SYSTEM_TOOLTIP,
|
||||
wxROLE_SYSTEM_WHITESPACE,
|
||||
wxROLE_SYSTEM_WINDOW
|
||||
} wxAccRole;
|
||||
|
||||
// Object types
|
||||
|
||||
typedef enum {
|
||||
wxOBJID_WINDOW = 0x00000000,
|
||||
wxOBJID_SYSMENU = 0xFFFFFFFF,
|
||||
wxOBJID_TITLEBAR = 0xFFFFFFFE,
|
||||
wxOBJID_MENU = 0xFFFFFFFD,
|
||||
wxOBJID_CLIENT = 0xFFFFFFFC,
|
||||
wxOBJID_VSCROLL = 0xFFFFFFFB,
|
||||
wxOBJID_HSCROLL = 0xFFFFFFFA,
|
||||
wxOBJID_SIZEGRIP = 0xFFFFFFF9,
|
||||
wxOBJID_CARET = 0xFFFFFFF8,
|
||||
wxOBJID_CURSOR = 0xFFFFFFF7,
|
||||
wxOBJID_ALERT = 0xFFFFFFF6,
|
||||
wxOBJID_SOUND = 0xFFFFFFF5
|
||||
} wxAccObject;
|
||||
|
||||
// Accessible states
|
||||
|
||||
#define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001
|
||||
#define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002
|
||||
#define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004
|
||||
#define wxACC_STATE_SYSTEM_ANIMATED 0x00000008
|
||||
#define wxACC_STATE_SYSTEM_BUSY 0x00000010
|
||||
#define wxACC_STATE_SYSTEM_CHECKED 0x00000020
|
||||
#define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040
|
||||
#define wxACC_STATE_SYSTEM_DEFAULT 0x00000080
|
||||
#define wxACC_STATE_SYSTEM_EXPANDED 0x00000100
|
||||
#define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200
|
||||
#define wxACC_STATE_SYSTEM_FLOATING 0x00000400
|
||||
#define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800
|
||||
#define wxACC_STATE_SYSTEM_FOCUSED 0x00001000
|
||||
#define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000
|
||||
#define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000
|
||||
#define wxACC_STATE_SYSTEM_MARQUEED 0x00008000
|
||||
#define wxACC_STATE_SYSTEM_MIXED 0x00010000
|
||||
#define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000
|
||||
#define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000
|
||||
#define wxACC_STATE_SYSTEM_PRESSED 0x00080000
|
||||
#define wxACC_STATE_SYSTEM_PROTECTED 0x00100000
|
||||
#define wxACC_STATE_SYSTEM_READONLY 0x00200000
|
||||
#define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000
|
||||
#define wxACC_STATE_SYSTEM_SELECTED 0x00800000
|
||||
#define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000
|
||||
#define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000
|
||||
|
||||
// Selection flag
|
||||
|
||||
typedef enum
|
||||
{
|
||||
wxACC_SEL_NONE = 0,
|
||||
wxACC_SEL_TAKEFOCUS = 1,
|
||||
wxACC_SEL_TAKESELECTION = 2,
|
||||
wxACC_SEL_EXTENDSELECTION = 4,
|
||||
wxACC_SEL_ADDSELECTION = 8,
|
||||
wxACC_SEL_REMOVESELECTION = 16
|
||||
} wxAccSelectionFlags;
|
||||
|
||||
// Accessibility event identifiers
|
||||
|
||||
#define wxACC_EVENT_SYSTEM_SOUND 0x0001
|
||||
#define wxACC_EVENT_SYSTEM_ALERT 0x0002
|
||||
#define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003
|
||||
#define wxACC_EVENT_SYSTEM_MENUSTART 0x0004
|
||||
#define wxACC_EVENT_SYSTEM_MENUEND 0x0005
|
||||
#define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006
|
||||
#define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007
|
||||
#define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008
|
||||
#define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009
|
||||
#define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A
|
||||
#define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B
|
||||
#define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
|
||||
#define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D
|
||||
#define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E
|
||||
#define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F
|
||||
#define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010
|
||||
#define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011
|
||||
#define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012
|
||||
#define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013
|
||||
#define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014
|
||||
#define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015
|
||||
#define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016
|
||||
#define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017
|
||||
#define wxACC_EVENT_OBJECT_CREATE 0x8000
|
||||
#define wxACC_EVENT_OBJECT_DESTROY 0x8001
|
||||
#define wxACC_EVENT_OBJECT_SHOW 0x8002
|
||||
#define wxACC_EVENT_OBJECT_HIDE 0x8003
|
||||
#define wxACC_EVENT_OBJECT_REORDER 0x8004
|
||||
#define wxACC_EVENT_OBJECT_FOCUS 0x8005
|
||||
#define wxACC_EVENT_OBJECT_SELECTION 0x8006
|
||||
#define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007
|
||||
#define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008
|
||||
#define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009
|
||||
#define wxACC_EVENT_OBJECT_STATECHANGE 0x800A
|
||||
#define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B
|
||||
#define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C
|
||||
#define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
|
||||
#define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E
|
||||
#define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F
|
||||
#define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010
|
||||
#define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011
|
||||
#define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAccessible
|
||||
// All functions return an indication of success, failure, or not implemented.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxAccessible;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPoint;
|
||||
class WXDLLIMPEXP_FWD_CORE wxRect;
|
||||
class WXDLLEXPORT wxAccessibleBase : public wxObject
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxAccessibleBase)
|
||||
|
||||
public:
|
||||
wxAccessibleBase(wxWindow* win): m_window(win) {}
|
||||
virtual ~wxAccessibleBase() {}
|
||||
|
||||
// Overridables
|
||||
|
||||
// Can return either a child object, or an integer
|
||||
// representing the child element, starting from 1.
|
||||
// pt is in screen coordinates.
|
||||
virtual wxAccStatus HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns the rectangle for this object (id = 0) or a child element (id > 0).
|
||||
// rect is in screen coordinates.
|
||||
virtual wxAccStatus GetLocation(wxRect& WXUNUSED(rect), int WXUNUSED(elementId))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Navigates from fromId to toId/toObject.
|
||||
virtual wxAccStatus Navigate(wxNavDir WXUNUSED(navDir), int WXUNUSED(fromId),
|
||||
int* WXUNUSED(toId), wxAccessible** WXUNUSED(toObject))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the name of the specified object.
|
||||
virtual wxAccStatus GetName(int WXUNUSED(childId), wxString* WXUNUSED(name))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the number of children.
|
||||
virtual wxAccStatus GetChildCount(int* WXUNUSED(childCount))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the specified child (starting from 1).
|
||||
// If *child is NULL and return value is wxACC_OK,
|
||||
// this means that the child is a simple element and
|
||||
// not an accessible object.
|
||||
virtual wxAccStatus GetChild(int WXUNUSED(childId), wxAccessible** WXUNUSED(child))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the parent, or NULL.
|
||||
virtual wxAccStatus GetParent(wxAccessible** WXUNUSED(parent))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Performs the default action. childId is 0 (the action for this object)
|
||||
// or > 0 (the action for a child).
|
||||
// Return wxACC_NOT_SUPPORTED if there is no default action for this
|
||||
// window (e.g. an edit control).
|
||||
virtual wxAccStatus DoDefaultAction(int WXUNUSED(childId))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// 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
|
||||
// string if there is no action.
|
||||
// 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
|
||||
// a document has a default action of "Press" rather than "Prints the current document."
|
||||
virtual wxAccStatus GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns the description for this object or a child.
|
||||
virtual wxAccStatus GetDescription(int WXUNUSED(childId), wxString* WXUNUSED(description))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns help text for this object or a child, similar to tooltip text.
|
||||
virtual wxAccStatus GetHelpText(int WXUNUSED(childId), wxString* WXUNUSED(helpText))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns the keyboard shortcut for this object or child.
|
||||
// Return e.g. ALT+K
|
||||
virtual wxAccStatus GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns a role constant.
|
||||
virtual wxAccStatus GetRole(int WXUNUSED(childId), wxAccRole* WXUNUSED(role))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns a state constant.
|
||||
virtual wxAccStatus GetState(int WXUNUSED(childId), long* WXUNUSED(state))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Returns a localized string representing the value for the object
|
||||
// or child.
|
||||
virtual wxAccStatus GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Selects the object or child.
|
||||
virtual wxAccStatus Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
// Gets the window with the keyboard focus.
|
||||
// If childId is 0 and child is NULL, no object in
|
||||
// this subhierarchy has the focus.
|
||||
// If this object has the focus, child should be 'this'.
|
||||
virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
|
||||
#if wxUSE_VARIANT
|
||||
// Gets a variant representing the selected children
|
||||
// of this object.
|
||||
// Acceptable values:
|
||||
// - a null variant (IsNull() returns TRUE)
|
||||
// - a list variant (GetType() == wxT("list"))
|
||||
// - an integer representing the selected child element,
|
||||
// or 0 if this object is selected (GetType() == wxT("long"))
|
||||
// - a "void*" pointer to a wxAccessible child object
|
||||
virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections))
|
||||
{ return wxACC_NOT_IMPLEMENTED; }
|
||||
#endif // wxUSE_VARIANT
|
||||
|
||||
// Accessors
|
||||
|
||||
// Returns the window associated with this object.
|
||||
|
||||
wxWindow* GetWindow() { return m_window; }
|
||||
|
||||
// Sets the window associated with this object.
|
||||
|
||||
void SetWindow(wxWindow* window) { m_window = window; }
|
||||
|
||||
// Operations
|
||||
|
||||
// Each platform's implementation must define this
|
||||
// static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType,
|
||||
// int objectId);
|
||||
|
||||
private:
|
||||
|
||||
// Data members
|
||||
|
||||
wxWindow* m_window;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// now include the declaration of the real class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/ole/access.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
#endif // _WX_ACCESSBASE_H_
|
||||
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/afterstd.h
|
||||
// Purpose: #include after STL headers
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07/07/03
|
||||
// RCS-ID: $Id: afterstd.h 42906 2006-11-01 14:16:42Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
See the comments in beforestd.h.
|
||||
*/
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/winundef.h"
|
||||
#endif
|
||||
|
||||
// undo what we did in wx/beforestd.h
|
||||
#if defined(__VISUALC__) && __VISUALC__ <= 1201
|
||||
// MSVC 5 does not have this
|
||||
#if _MSC_VER > 1100
|
||||
// don't restore this one for VC6, it gives it in each try/catch which is a
|
||||
// bit annoying to say the least
|
||||
#if _MSC_VER >= 0x1300
|
||||
// unreachable code
|
||||
#pragma warning(default:4702)
|
||||
#endif // VC++ >= 7
|
||||
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
// 'expression' : signed/unsigned mismatch
|
||||
#pragma warning(default:4018)
|
||||
|
||||
// 'identifier' : unreferenced formal parameter
|
||||
#pragma warning(default:4100)
|
||||
|
||||
// 'conversion' : conversion from 'type1' to 'type2',
|
||||
// possible loss of data
|
||||
#pragma warning(default:4244)
|
||||
|
||||
// C++ language change: to explicitly specialize class template
|
||||
// 'identifier' use the following syntax
|
||||
#pragma warning(default:4663)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/afterstd.h
|
||||
// Purpose: #include after STL headers
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07/07/03
|
||||
// RCS-ID: $Id: afterstd.h 42906 2006-11-01 14:16:42Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
See the comments in beforestd.h.
|
||||
*/
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/winundef.h"
|
||||
#endif
|
||||
|
||||
// undo what we did in wx/beforestd.h
|
||||
#if defined(__VISUALC__) && __VISUALC__ <= 1201
|
||||
// MSVC 5 does not have this
|
||||
#if _MSC_VER > 1100
|
||||
// don't restore this one for VC6, it gives it in each try/catch which is a
|
||||
// bit annoying to say the least
|
||||
#if _MSC_VER >= 0x1300
|
||||
// unreachable code
|
||||
#pragma warning(default:4702)
|
||||
#endif // VC++ >= 7
|
||||
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
// 'expression' : signed/unsigned mismatch
|
||||
#pragma warning(default:4018)
|
||||
|
||||
// 'identifier' : unreferenced formal parameter
|
||||
#pragma warning(default:4100)
|
||||
|
||||
// 'conversion' : conversion from 'type1' to 'type2',
|
||||
// possible loss of data
|
||||
#pragma warning(default:4244)
|
||||
|
||||
// C++ language change: to explicitly specialize class template
|
||||
// 'identifier' use the following syntax
|
||||
#pragma warning(default:4663)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,77 +1,77 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/anidecod.h
|
||||
// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
|
||||
// Author: Francesco Montorsi
|
||||
// CVS-ID: $Id: anidecod.h 45563 2007-04-21 18:17:50Z VZ $
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANIDECOD_H
|
||||
#define _WX_ANIDECOD_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_STREAMS && wxUSE_ICO_CUR
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/animdecod.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
|
||||
class /*WXDLLEXPORT*/ wxANIFrameInfo;
|
||||
|
||||
WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
|
||||
WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxANIDecoder class
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder
|
||||
{
|
||||
public:
|
||||
// constructor, destructor, etc.
|
||||
wxANIDecoder();
|
||||
~wxANIDecoder();
|
||||
|
||||
|
||||
virtual wxSize GetFrameSize(unsigned int frame) const;
|
||||
virtual wxPoint GetFramePosition(unsigned int frame) const;
|
||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
|
||||
virtual long GetDelay(unsigned int frame) const;
|
||||
virtual wxColour GetTransparentColour(unsigned int frame) const;
|
||||
|
||||
// implementation of wxAnimationDecoder's pure virtuals
|
||||
virtual bool CanRead( wxInputStream& stream ) const;
|
||||
virtual bool Load( wxInputStream& stream );
|
||||
|
||||
bool ConvertToImage(unsigned int frame, wxImage *image) const;
|
||||
|
||||
wxAnimationDecoder *Clone() const
|
||||
{ return new wxANIDecoder; }
|
||||
wxAnimationType GetType() const
|
||||
{ return wxANIMATION_TYPE_ANI; }
|
||||
|
||||
private:
|
||||
// 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
|
||||
// two frames: they are just a list of images to display sequentially.
|
||||
wxImageArray m_images;
|
||||
|
||||
// the info about each image stored in m_images.
|
||||
// NB: m_info.GetCount() may differ from m_images.GetCount()!
|
||||
wxANIFrameInfoArray m_info;
|
||||
|
||||
// this is the wxCURHandler used to load the ICON chunk of the ANI files
|
||||
static wxCURHandler sm_handler;
|
||||
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxANIDecoder)
|
||||
};
|
||||
|
||||
|
||||
#endif // wxUSE_STREAM && wxUSE_ICO_CUR
|
||||
|
||||
#endif // _WX_ANIDECOD_H
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/anidecod.h
|
||||
// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
|
||||
// Author: Francesco Montorsi
|
||||
// CVS-ID: $Id: anidecod.h 45563 2007-04-21 18:17:50Z VZ $
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANIDECOD_H
|
||||
#define _WX_ANIDECOD_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_STREAMS && wxUSE_ICO_CUR
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/animdecod.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
|
||||
class /*WXDLLEXPORT*/ wxANIFrameInfo;
|
||||
|
||||
WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
|
||||
WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxANIDecoder class
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder
|
||||
{
|
||||
public:
|
||||
// constructor, destructor, etc.
|
||||
wxANIDecoder();
|
||||
~wxANIDecoder();
|
||||
|
||||
|
||||
virtual wxSize GetFrameSize(unsigned int frame) const;
|
||||
virtual wxPoint GetFramePosition(unsigned int frame) const;
|
||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
|
||||
virtual long GetDelay(unsigned int frame) const;
|
||||
virtual wxColour GetTransparentColour(unsigned int frame) const;
|
||||
|
||||
// implementation of wxAnimationDecoder's pure virtuals
|
||||
virtual bool CanRead( wxInputStream& stream ) const;
|
||||
virtual bool Load( wxInputStream& stream );
|
||||
|
||||
bool ConvertToImage(unsigned int frame, wxImage *image) const;
|
||||
|
||||
wxAnimationDecoder *Clone() const
|
||||
{ return new wxANIDecoder; }
|
||||
wxAnimationType GetType() const
|
||||
{ return wxANIMATION_TYPE_ANI; }
|
||||
|
||||
private:
|
||||
// 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
|
||||
// two frames: they are just a list of images to display sequentially.
|
||||
wxImageArray m_images;
|
||||
|
||||
// the info about each image stored in m_images.
|
||||
// NB: m_info.GetCount() may differ from m_images.GetCount()!
|
||||
wxANIFrameInfoArray m_info;
|
||||
|
||||
// this is the wxCURHandler used to load the ICON chunk of the ANI files
|
||||
static wxCURHandler sm_handler;
|
||||
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxANIDecoder)
|
||||
};
|
||||
|
||||
|
||||
#endif // wxUSE_STREAM && wxUSE_ICO_CUR
|
||||
|
||||
#endif // _WX_ANIDECOD_H
|
||||
|
|
|
@ -1,124 +1,124 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/animate.h
|
||||
// Purpose: wxAnimation and wxAnimationCtrl
|
||||
// Author: Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Modified by: Francesco Montorsi
|
||||
// Created: 13/8/99
|
||||
// RCS-ID: $Id: animate.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANIMATE_H_
|
||||
#define _WX_ANIMATE_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ANIMATIONCTRL
|
||||
|
||||
#include "wx/animdecod.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_ADV wxAnimation;
|
||||
|
||||
extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation;
|
||||
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[];
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnimationBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAnimationBase : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxAnimationBase() {}
|
||||
|
||||
virtual bool IsOk() const = 0;
|
||||
|
||||
// can be -1
|
||||
virtual int GetDelay(unsigned int frame) const = 0;
|
||||
|
||||
virtual unsigned int GetFrameCount() const = 0;
|
||||
virtual wxImage GetFrame(unsigned int frame) const = 0;
|
||||
virtual wxSize GetSize() const = 0;
|
||||
|
||||
virtual bool LoadFile(const wxString& name,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
||||
virtual bool Load(wxInputStream& stream,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
||||
|
||||
protected:
|
||||
DECLARE_ABSTRACT_CLASS(wxAnimationBase)
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnimationCtrlBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// do not autoresize to the animation's size when SetAnimation() is called
|
||||
#define wxAC_NO_AUTORESIZE (0x0010)
|
||||
|
||||
// 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
|
||||
#define wxAC_DEFAULT_STYLE (wxNO_BORDER)
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxAnimationCtrlBase() { }
|
||||
|
||||
// public API
|
||||
virtual bool LoadFile(const wxString& filename,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
||||
|
||||
virtual void SetAnimation(const wxAnimation &anim) = 0;
|
||||
virtual wxAnimation GetAnimation() const = 0;
|
||||
|
||||
virtual bool Play() = 0;
|
||||
virtual void Stop() = 0;
|
||||
|
||||
virtual bool IsPlaying() const = 0;
|
||||
|
||||
virtual void SetInactiveBitmap(const wxBitmap &bmp);
|
||||
|
||||
// always return the original bitmap set in this control
|
||||
wxBitmap GetInactiveBitmap() const
|
||||
{ return m_bmpStatic; }
|
||||
|
||||
protected:
|
||||
// the inactive bitmap as it was set by the user
|
||||
wxBitmap m_bmpStatic;
|
||||
|
||||
// the inactive bitmap currently shown in the control
|
||||
// (may differ in the size from m_bmpStatic)
|
||||
wxBitmap m_bmpStaticReal;
|
||||
|
||||
// updates m_bmpStaticReal from m_bmpStatic if needed
|
||||
virtual void UpdateStaticImage();
|
||||
|
||||
// called by SetInactiveBitmap
|
||||
virtual void DisplayStaticImage() = 0;
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase)
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-specific version of the wxAnimationCtrl class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/animate.h"
|
||||
#else
|
||||
#include "wx/generic/animate.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_ANIMATIONCTRL
|
||||
|
||||
#endif // _WX_ANIMATE_H_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/animate.h
|
||||
// Purpose: wxAnimation and wxAnimationCtrl
|
||||
// Author: Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Modified by: Francesco Montorsi
|
||||
// Created: 13/8/99
|
||||
// RCS-ID: $Id: animate.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANIMATE_H_
|
||||
#define _WX_ANIMATE_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_ANIMATIONCTRL
|
||||
|
||||
#include "wx/animdecod.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_ADV wxAnimation;
|
||||
|
||||
extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation;
|
||||
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[];
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnimationBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAnimationBase : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxAnimationBase() {}
|
||||
|
||||
virtual bool IsOk() const = 0;
|
||||
|
||||
// can be -1
|
||||
virtual int GetDelay(unsigned int frame) const = 0;
|
||||
|
||||
virtual unsigned int GetFrameCount() const = 0;
|
||||
virtual wxImage GetFrame(unsigned int frame) const = 0;
|
||||
virtual wxSize GetSize() const = 0;
|
||||
|
||||
virtual bool LoadFile(const wxString& name,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
||||
virtual bool Load(wxInputStream& stream,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
||||
|
||||
protected:
|
||||
DECLARE_ABSTRACT_CLASS(wxAnimationBase)
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnimationCtrlBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// do not autoresize to the animation's size when SetAnimation() is called
|
||||
#define wxAC_NO_AUTORESIZE (0x0010)
|
||||
|
||||
// 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
|
||||
#define wxAC_DEFAULT_STYLE (wxNO_BORDER)
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxAnimationCtrlBase() { }
|
||||
|
||||
// public API
|
||||
virtual bool LoadFile(const wxString& filename,
|
||||
wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
|
||||
|
||||
virtual void SetAnimation(const wxAnimation &anim) = 0;
|
||||
virtual wxAnimation GetAnimation() const = 0;
|
||||
|
||||
virtual bool Play() = 0;
|
||||
virtual void Stop() = 0;
|
||||
|
||||
virtual bool IsPlaying() const = 0;
|
||||
|
||||
virtual void SetInactiveBitmap(const wxBitmap &bmp);
|
||||
|
||||
// always return the original bitmap set in this control
|
||||
wxBitmap GetInactiveBitmap() const
|
||||
{ return m_bmpStatic; }
|
||||
|
||||
protected:
|
||||
// the inactive bitmap as it was set by the user
|
||||
wxBitmap m_bmpStatic;
|
||||
|
||||
// the inactive bitmap currently shown in the control
|
||||
// (may differ in the size from m_bmpStatic)
|
||||
wxBitmap m_bmpStaticReal;
|
||||
|
||||
// updates m_bmpStaticReal from m_bmpStatic if needed
|
||||
virtual void UpdateStaticImage();
|
||||
|
||||
// called by SetInactiveBitmap
|
||||
virtual void DisplayStaticImage() = 0;
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase)
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-specific version of the wxAnimationCtrl class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/animate.h"
|
||||
#else
|
||||
#include "wx/generic/animate.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_ANIMATIONCTRL
|
||||
|
||||
#endif // _WX_ANIMATE_H_
|
||||
|
|
|
@ -1,146 +1,146 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/animdecod.h
|
||||
// Purpose: wxAnimationDecoder
|
||||
// Author: Francesco Montorsi
|
||||
// CVS-ID: $Id: animdecod.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANIMDECOD_H
|
||||
#define _WX_ANIMDECOD_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
|
||||
#include "wx/colour.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxInputStream;
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
|
||||
/*
|
||||
|
||||
Differences between a wxAnimationDecoder and a wxImageHandler:
|
||||
|
||||
1) wxImageHandlers always load an input stream directly into a given wxImage
|
||||
object converting from the format-specific data representation to the
|
||||
wxImage native format (RGB24).
|
||||
wxAnimationDecoders always load an input stream using some optimized format
|
||||
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
|
||||
and time required to blit in on the screen.
|
||||
|
||||
2) wxAnimationDecoders contain the animation data in some internal var.
|
||||
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
|
||||
in wxImage format; the viceversa cannot be done.
|
||||
|
||||
4) wxAnimationDecoders are decoders only, thus do not support save features.
|
||||
|
||||
5) wxAnimationDecoders are directly used by wxAnimation (generic implementation)
|
||||
as wxObjectRefData while they need to be 'wrapped' by a wxImageHandler for
|
||||
wxImage uses.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Constants
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// NB: the values of these enum items are not casual but coincide with the
|
||||
// GIF disposal codes. Do not change them !!
|
||||
enum wxAnimationDisposal
|
||||
{
|
||||
// No disposal specified. The decoder is not required to take any action.
|
||||
wxANIM_UNSPECIFIED = -1,
|
||||
|
||||
// Do not dispose. The graphic is to be left in place.
|
||||
wxANIM_DONOTREMOVE = 0,
|
||||
|
||||
// Restore to background color. The area used by the graphic must be
|
||||
// restored to the background color.
|
||||
wxANIM_TOBACKGROUND = 1,
|
||||
|
||||
// Restore to previous. The decoder is required to restore the area
|
||||
// overwritten by the graphic with what was there prior to rendering the graphic.
|
||||
wxANIM_TOPREVIOUS = 2
|
||||
};
|
||||
|
||||
enum wxAnimationType
|
||||
{
|
||||
wxANIMATION_TYPE_INVALID,
|
||||
wxANIMATION_TYPE_GIF,
|
||||
wxANIMATION_TYPE_ANI,
|
||||
|
||||
wxANIMATION_TYPE_ANY
|
||||
};
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxAnimationDecoder class
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData
|
||||
{
|
||||
public:
|
||||
wxAnimationDecoder()
|
||||
{
|
||||
m_background = wxNullColour;
|
||||
m_nFrames = 0;
|
||||
}
|
||||
virtual ~wxAnimationDecoder() { }
|
||||
|
||||
|
||||
virtual bool Load( wxInputStream& stream ) = 0;
|
||||
virtual bool CanRead( wxInputStream& stream ) const = 0;
|
||||
|
||||
virtual wxAnimationDecoder *Clone() const = 0;
|
||||
virtual wxAnimationType GetType() const = 0;
|
||||
|
||||
// convert given frame to wxImage
|
||||
virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0;
|
||||
|
||||
|
||||
// frame specific data getters
|
||||
|
||||
// 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
|
||||
// entire animation has changed.
|
||||
virtual wxSize GetFrameSize(unsigned int frame) const = 0;
|
||||
|
||||
// the position of this frame in case it's not as big as m_szAnimation
|
||||
// or wxPoint(0,0) otherwise.
|
||||
virtual wxPoint GetFramePosition(unsigned int frame) const = 0;
|
||||
|
||||
// what should be done after displaying this frame.
|
||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0;
|
||||
|
||||
// the number of milliseconds this frame should be displayed.
|
||||
// if returns -1 then the frame must be displayed forever.
|
||||
virtual long GetDelay(unsigned int frame) const = 0;
|
||||
|
||||
// the transparent colour for this frame if any or wxNullColour.
|
||||
virtual wxColour GetTransparentColour(unsigned int frame) const = 0;
|
||||
|
||||
// get global data
|
||||
wxSize GetAnimationSize() const { return m_szAnimation; }
|
||||
wxColour GetBackgroundColour() const { return m_background; }
|
||||
unsigned int GetFrameCount() const { return m_nFrames; }
|
||||
|
||||
protected:
|
||||
wxSize m_szAnimation;
|
||||
unsigned int m_nFrames;
|
||||
|
||||
// this is the colour to use for the wxANIM_TOBACKGROUND disposal.
|
||||
// if not specified by the animation, it's set to wxNullColour
|
||||
wxColour m_background;
|
||||
};
|
||||
|
||||
|
||||
#endif // wxUSE_STREAM
|
||||
#endif // _WX_ANIMDECOD_H
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/animdecod.h
|
||||
// Purpose: wxAnimationDecoder
|
||||
// Author: Francesco Montorsi
|
||||
// CVS-ID: $Id: animdecod.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANIMDECOD_H
|
||||
#define _WX_ANIMDECOD_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
|
||||
#include "wx/colour.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxInputStream;
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
|
||||
/*
|
||||
|
||||
Differences between a wxAnimationDecoder and a wxImageHandler:
|
||||
|
||||
1) wxImageHandlers always load an input stream directly into a given wxImage
|
||||
object converting from the format-specific data representation to the
|
||||
wxImage native format (RGB24).
|
||||
wxAnimationDecoders always load an input stream using some optimized format
|
||||
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
|
||||
and time required to blit in on the screen.
|
||||
|
||||
2) wxAnimationDecoders contain the animation data in some internal var.
|
||||
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
|
||||
in wxImage format; the viceversa cannot be done.
|
||||
|
||||
4) wxAnimationDecoders are decoders only, thus do not support save features.
|
||||
|
||||
5) wxAnimationDecoders are directly used by wxAnimation (generic implementation)
|
||||
as wxObjectRefData while they need to be 'wrapped' by a wxImageHandler for
|
||||
wxImage uses.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Constants
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// NB: the values of these enum items are not casual but coincide with the
|
||||
// GIF disposal codes. Do not change them !!
|
||||
enum wxAnimationDisposal
|
||||
{
|
||||
// No disposal specified. The decoder is not required to take any action.
|
||||
wxANIM_UNSPECIFIED = -1,
|
||||
|
||||
// Do not dispose. The graphic is to be left in place.
|
||||
wxANIM_DONOTREMOVE = 0,
|
||||
|
||||
// Restore to background color. The area used by the graphic must be
|
||||
// restored to the background color.
|
||||
wxANIM_TOBACKGROUND = 1,
|
||||
|
||||
// Restore to previous. The decoder is required to restore the area
|
||||
// overwritten by the graphic with what was there prior to rendering the graphic.
|
||||
wxANIM_TOPREVIOUS = 2
|
||||
};
|
||||
|
||||
enum wxAnimationType
|
||||
{
|
||||
wxANIMATION_TYPE_INVALID,
|
||||
wxANIMATION_TYPE_GIF,
|
||||
wxANIMATION_TYPE_ANI,
|
||||
|
||||
wxANIMATION_TYPE_ANY
|
||||
};
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// wxAnimationDecoder class
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData
|
||||
{
|
||||
public:
|
||||
wxAnimationDecoder()
|
||||
{
|
||||
m_background = wxNullColour;
|
||||
m_nFrames = 0;
|
||||
}
|
||||
virtual ~wxAnimationDecoder() { }
|
||||
|
||||
|
||||
virtual bool Load( wxInputStream& stream ) = 0;
|
||||
virtual bool CanRead( wxInputStream& stream ) const = 0;
|
||||
|
||||
virtual wxAnimationDecoder *Clone() const = 0;
|
||||
virtual wxAnimationType GetType() const = 0;
|
||||
|
||||
// convert given frame to wxImage
|
||||
virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0;
|
||||
|
||||
|
||||
// frame specific data getters
|
||||
|
||||
// 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
|
||||
// entire animation has changed.
|
||||
virtual wxSize GetFrameSize(unsigned int frame) const = 0;
|
||||
|
||||
// the position of this frame in case it's not as big as m_szAnimation
|
||||
// or wxPoint(0,0) otherwise.
|
||||
virtual wxPoint GetFramePosition(unsigned int frame) const = 0;
|
||||
|
||||
// what should be done after displaying this frame.
|
||||
virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0;
|
||||
|
||||
// the number of milliseconds this frame should be displayed.
|
||||
// if returns -1 then the frame must be displayed forever.
|
||||
virtual long GetDelay(unsigned int frame) const = 0;
|
||||
|
||||
// the transparent colour for this frame if any or wxNullColour.
|
||||
virtual wxColour GetTransparentColour(unsigned int frame) const = 0;
|
||||
|
||||
// get global data
|
||||
wxSize GetAnimationSize() const { return m_szAnimation; }
|
||||
wxColour GetBackgroundColour() const { return m_background; }
|
||||
unsigned int GetFrameCount() const { return m_nFrames; }
|
||||
|
||||
protected:
|
||||
wxSize m_szAnimation;
|
||||
unsigned int m_nFrames;
|
||||
|
||||
// this is the colour to use for the wxANIM_TOBACKGROUND disposal.
|
||||
// if not specified by the animation, it's set to wxNullColour
|
||||
wxColour m_background;
|
||||
};
|
||||
|
||||
|
||||
#endif // wxUSE_STREAM
|
||||
#endif // _WX_ANIMDECOD_H
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,272 +1,272 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/apptrait.h
|
||||
// Purpose: declaration of wxAppTraits and derived classes
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 19.06.2003
|
||||
// RCS-ID: $Id: apptrait.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_APPTRAIT_H_
|
||||
#define _WX_APPTRAIT_H_
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/platinfo.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxObject;
|
||||
class WXDLLIMPEXP_FWD_BASE wxAppTraits;
|
||||
#if wxUSE_FONTMAP
|
||||
class WXDLLIMPEXP_FWD_CORE wxFontMapper;
|
||||
#endif // wxUSE_FONTMAP
|
||||
class WXDLLIMPEXP_FWD_BASE wxLog;
|
||||
class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
|
||||
class WXDLLIMPEXP_FWD_CORE wxRendererNative;
|
||||
class WXDLLIMPEXP_FWD_BASE wxString;
|
||||
|
||||
class GSocketGUIFunctionsTable;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAppTraits: this class defines various configurable aspects of wxApp
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxStandardPathsBase;
|
||||
|
||||
class WXDLLIMPEXP_BASE wxAppTraitsBase
|
||||
{
|
||||
public:
|
||||
// needed since this class declares virtual members
|
||||
virtual ~wxAppTraitsBase() { }
|
||||
|
||||
// hooks for creating the global objects, may be overridden by the user
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LOG
|
||||
// create the default log target
|
||||
virtual wxLog *CreateLogTarget() = 0;
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
// create the global object used for printing out messages
|
||||
virtual wxMessageOutput *CreateMessageOutput() = 0;
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
// create the global font mapper object used for encodings/charset mapping
|
||||
virtual wxFontMapper *CreateFontMapper() = 0;
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
||||
// 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
|
||||
// is used); this is used in GUI only and always returns NULL in console
|
||||
//
|
||||
// NB: returned pointer will be deleted by the caller
|
||||
virtual wxRendererNative *CreateRenderer() = 0;
|
||||
|
||||
#if wxUSE_STDPATHS
|
||||
// wxStandardPaths object is normally the same for wxBase and wxGUI
|
||||
// except in the case of wxMac and wxCocoa
|
||||
virtual wxStandardPathsBase& GetStandardPaths();
|
||||
#endif // wxUSE_STDPATHS
|
||||
|
||||
// functions abstracting differences between GUI and console modes
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
// show the assert dialog with the specified message in GUI or just print
|
||||
// the string to stderr in console mode
|
||||
//
|
||||
// base class version has an implementation (in spite of being pure
|
||||
// virtual) in base/appbase.cpp which can be called as last resort.
|
||||
//
|
||||
// return true to suppress subsequent asserts, false to continue as before
|
||||
virtual bool ShowAssertDialog(const wxString& msg) = 0;
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
// return true if fprintf(stderr) goes somewhere, false otherwise
|
||||
virtual bool HasStderr() = 0;
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// operations
|
||||
|
||||
// add the object to the pending delete list in GUI, delete it immediately
|
||||
// in wxBase
|
||||
virtual void ScheduleForDestroy(wxObject *object) = 0;
|
||||
|
||||
// remove this object from the pending delete list in GUI, do nothing in
|
||||
// wxBase
|
||||
virtual void RemoveFromPendingDelete(wxObject *object) = 0;
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
// 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
|
||||
// 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
|
||||
// ("wxCore") doesn't depend on networking library and so only a functions
|
||||
// table can be passed around
|
||||
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
|
||||
#endif
|
||||
|
||||
// return information about the (native) toolkit currently used and its
|
||||
// runtime (not compile-time) version.
|
||||
// returns wxPORT_BASE for console applications and one of the remaining
|
||||
// wxPORT_* values for GUI applications.
|
||||
virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const = 0;
|
||||
|
||||
// return true if the port is using wxUniversal for the GUI, false if not
|
||||
virtual bool IsUsingUniversalWidgets() const = 0;
|
||||
|
||||
// return the name of the Desktop Environment such as
|
||||
// "KDE" or "GNOME". May return an empty string.
|
||||
virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
|
||||
|
||||
protected:
|
||||
#if wxUSE_STACKWALKER && defined( __WXDEBUG__ )
|
||||
// utility function: returns the stack frame as a plain wxString
|
||||
virtual wxString GetAssertStackTrace();
|
||||
#endif
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-specific version of the class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
|
||||
// Unix code (and otherwise __UNIX__ wouldn't be defined)
|
||||
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/apptbase.h"
|
||||
#elif defined(__WIN32__)
|
||||
#include "wx/msw/apptbase.h"
|
||||
#elif defined(__UNIX__) && !defined(__EMX__)
|
||||
#include "wx/unix/apptbase.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/apptbase.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "wx/os2/apptbase.h"
|
||||
#else // no platform-specific methods to add to wxAppTraits
|
||||
// wxAppTraits must be a class because it was forward declared as class
|
||||
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
|
||||
{
|
||||
};
|
||||
#endif // platform
|
||||
|
||||
// ============================================================================
|
||||
// standard traits for console and GUI applications
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits
|
||||
{
|
||||
public:
|
||||
#if wxUSE_LOG
|
||||
virtual wxLog *CreateLogTarget();
|
||||
#endif // wxUSE_LOG
|
||||
virtual wxMessageOutput *CreateMessageOutput();
|
||||
#if wxUSE_FONTMAP
|
||||
virtual wxFontMapper *CreateFontMapper();
|
||||
#endif // wxUSE_FONTMAP
|
||||
virtual wxRendererNative *CreateRenderer();
|
||||
#if wxUSE_SOCKETS
|
||||
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
|
||||
#endif
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
virtual bool ShowAssertDialog(const wxString& msg);
|
||||
#endif // __WXDEBUG__
|
||||
virtual bool HasStderr();
|
||||
|
||||
virtual void ScheduleForDestroy(wxObject *object);
|
||||
virtual void RemoveFromPendingDelete(wxObject *object);
|
||||
|
||||
// the GetToolkitVersion for console application is always the same
|
||||
virtual wxPortId GetToolkitVersion(int *verMaj, int *verMin) const
|
||||
{
|
||||
// no toolkits (wxBase is for console applications without GUI support)
|
||||
// NB: zero means "no toolkit", -1 means "not initialized yet"
|
||||
// so we must use zero here!
|
||||
if (verMaj) *verMaj = 0;
|
||||
if (verMin) *verMin = 0;
|
||||
return wxPORT_BASE;
|
||||
}
|
||||
|
||||
virtual bool IsUsingUniversalWidgets() const { return false; }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGUIAppTraitsBase: wxAppTraits implementation for the GUI apps
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits
|
||||
{
|
||||
public:
|
||||
#if wxUSE_LOG
|
||||
virtual wxLog *CreateLogTarget();
|
||||
#endif // wxUSE_LOG
|
||||
virtual wxMessageOutput *CreateMessageOutput();
|
||||
#if wxUSE_FONTMAP
|
||||
virtual wxFontMapper *CreateFontMapper();
|
||||
#endif // wxUSE_FONTMAP
|
||||
virtual wxRendererNative *CreateRenderer();
|
||||
#if wxUSE_SOCKETS
|
||||
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
|
||||
#endif
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
virtual bool ShowAssertDialog(const wxString& msg);
|
||||
#endif // __WXDEBUG__
|
||||
virtual bool HasStderr();
|
||||
|
||||
virtual void ScheduleForDestroy(wxObject *object);
|
||||
virtual void RemoveFromPendingDelete(wxObject *object);
|
||||
|
||||
virtual bool IsUsingUniversalWidgets() const
|
||||
{
|
||||
#ifdef __WXUNIVERSAL__
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-specific version of the classes above
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/apptrait.h"
|
||||
#elif defined(__WIN32__)
|
||||
#include "wx/msw/apptrait.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "wx/os2/apptrait.h"
|
||||
#elif defined(__UNIX__)
|
||||
#include "wx/unix/apptrait.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/apptrait.h"
|
||||
#elif defined(__DOS__)
|
||||
#include "wx/msdos/apptrait.h"
|
||||
#else
|
||||
#if wxUSE_GUI
|
||||
class wxGUIAppTraits : public wxGUIAppTraitsBase
|
||||
{
|
||||
};
|
||||
#endif // wxUSE_GUI
|
||||
class wxConsoleAppTraits: public wxConsoleAppTraitsBase
|
||||
{
|
||||
};
|
||||
#endif // platform
|
||||
|
||||
#endif // _WX_APPTRAIT_H_
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/apptrait.h
|
||||
// Purpose: declaration of wxAppTraits and derived classes
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 19.06.2003
|
||||
// RCS-ID: $Id: apptrait.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_APPTRAIT_H_
|
||||
#define _WX_APPTRAIT_H_
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/platinfo.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxObject;
|
||||
class WXDLLIMPEXP_FWD_BASE wxAppTraits;
|
||||
#if wxUSE_FONTMAP
|
||||
class WXDLLIMPEXP_FWD_CORE wxFontMapper;
|
||||
#endif // wxUSE_FONTMAP
|
||||
class WXDLLIMPEXP_FWD_BASE wxLog;
|
||||
class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
|
||||
class WXDLLIMPEXP_FWD_CORE wxRendererNative;
|
||||
class WXDLLIMPEXP_FWD_BASE wxString;
|
||||
|
||||
class GSocketGUIFunctionsTable;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAppTraits: this class defines various configurable aspects of wxApp
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxStandardPathsBase;
|
||||
|
||||
class WXDLLIMPEXP_BASE wxAppTraitsBase
|
||||
{
|
||||
public:
|
||||
// needed since this class declares virtual members
|
||||
virtual ~wxAppTraitsBase() { }
|
||||
|
||||
// hooks for creating the global objects, may be overridden by the user
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LOG
|
||||
// create the default log target
|
||||
virtual wxLog *CreateLogTarget() = 0;
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
// create the global object used for printing out messages
|
||||
virtual wxMessageOutput *CreateMessageOutput() = 0;
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
// create the global font mapper object used for encodings/charset mapping
|
||||
virtual wxFontMapper *CreateFontMapper() = 0;
|
||||
#endif // wxUSE_FONTMAP
|
||||
|
||||
// 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
|
||||
// is used); this is used in GUI only and always returns NULL in console
|
||||
//
|
||||
// NB: returned pointer will be deleted by the caller
|
||||
virtual wxRendererNative *CreateRenderer() = 0;
|
||||
|
||||
#if wxUSE_STDPATHS
|
||||
// wxStandardPaths object is normally the same for wxBase and wxGUI
|
||||
// except in the case of wxMac and wxCocoa
|
||||
virtual wxStandardPathsBase& GetStandardPaths();
|
||||
#endif // wxUSE_STDPATHS
|
||||
|
||||
// functions abstracting differences between GUI and console modes
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
// show the assert dialog with the specified message in GUI or just print
|
||||
// the string to stderr in console mode
|
||||
//
|
||||
// base class version has an implementation (in spite of being pure
|
||||
// virtual) in base/appbase.cpp which can be called as last resort.
|
||||
//
|
||||
// return true to suppress subsequent asserts, false to continue as before
|
||||
virtual bool ShowAssertDialog(const wxString& msg) = 0;
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
// return true if fprintf(stderr) goes somewhere, false otherwise
|
||||
virtual bool HasStderr() = 0;
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// operations
|
||||
|
||||
// add the object to the pending delete list in GUI, delete it immediately
|
||||
// in wxBase
|
||||
virtual void ScheduleForDestroy(wxObject *object) = 0;
|
||||
|
||||
// remove this object from the pending delete list in GUI, do nothing in
|
||||
// wxBase
|
||||
virtual void RemoveFromPendingDelete(wxObject *object) = 0;
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
// 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
|
||||
// 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
|
||||
// ("wxCore") doesn't depend on networking library and so only a functions
|
||||
// table can be passed around
|
||||
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
|
||||
#endif
|
||||
|
||||
// return information about the (native) toolkit currently used and its
|
||||
// runtime (not compile-time) version.
|
||||
// returns wxPORT_BASE for console applications and one of the remaining
|
||||
// wxPORT_* values for GUI applications.
|
||||
virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const = 0;
|
||||
|
||||
// return true if the port is using wxUniversal for the GUI, false if not
|
||||
virtual bool IsUsingUniversalWidgets() const = 0;
|
||||
|
||||
// return the name of the Desktop Environment such as
|
||||
// "KDE" or "GNOME". May return an empty string.
|
||||
virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
|
||||
|
||||
protected:
|
||||
#if wxUSE_STACKWALKER && defined( __WXDEBUG__ )
|
||||
// utility function: returns the stack frame as a plain wxString
|
||||
virtual wxString GetAssertStackTrace();
|
||||
#endif
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-specific version of the class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
|
||||
// Unix code (and otherwise __UNIX__ wouldn't be defined)
|
||||
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/apptbase.h"
|
||||
#elif defined(__WIN32__)
|
||||
#include "wx/msw/apptbase.h"
|
||||
#elif defined(__UNIX__) && !defined(__EMX__)
|
||||
#include "wx/unix/apptbase.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/apptbase.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "wx/os2/apptbase.h"
|
||||
#else // no platform-specific methods to add to wxAppTraits
|
||||
// wxAppTraits must be a class because it was forward declared as class
|
||||
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
|
||||
{
|
||||
};
|
||||
#endif // platform
|
||||
|
||||
// ============================================================================
|
||||
// standard traits for console and GUI applications
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits
|
||||
{
|
||||
public:
|
||||
#if wxUSE_LOG
|
||||
virtual wxLog *CreateLogTarget();
|
||||
#endif // wxUSE_LOG
|
||||
virtual wxMessageOutput *CreateMessageOutput();
|
||||
#if wxUSE_FONTMAP
|
||||
virtual wxFontMapper *CreateFontMapper();
|
||||
#endif // wxUSE_FONTMAP
|
||||
virtual wxRendererNative *CreateRenderer();
|
||||
#if wxUSE_SOCKETS
|
||||
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
|
||||
#endif
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
virtual bool ShowAssertDialog(const wxString& msg);
|
||||
#endif // __WXDEBUG__
|
||||
virtual bool HasStderr();
|
||||
|
||||
virtual void ScheduleForDestroy(wxObject *object);
|
||||
virtual void RemoveFromPendingDelete(wxObject *object);
|
||||
|
||||
// the GetToolkitVersion for console application is always the same
|
||||
virtual wxPortId GetToolkitVersion(int *verMaj, int *verMin) const
|
||||
{
|
||||
// no toolkits (wxBase is for console applications without GUI support)
|
||||
// NB: zero means "no toolkit", -1 means "not initialized yet"
|
||||
// so we must use zero here!
|
||||
if (verMaj) *verMaj = 0;
|
||||
if (verMin) *verMin = 0;
|
||||
return wxPORT_BASE;
|
||||
}
|
||||
|
||||
virtual bool IsUsingUniversalWidgets() const { return false; }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGUIAppTraitsBase: wxAppTraits implementation for the GUI apps
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits
|
||||
{
|
||||
public:
|
||||
#if wxUSE_LOG
|
||||
virtual wxLog *CreateLogTarget();
|
||||
#endif // wxUSE_LOG
|
||||
virtual wxMessageOutput *CreateMessageOutput();
|
||||
#if wxUSE_FONTMAP
|
||||
virtual wxFontMapper *CreateFontMapper();
|
||||
#endif // wxUSE_FONTMAP
|
||||
virtual wxRendererNative *CreateRenderer();
|
||||
#if wxUSE_SOCKETS
|
||||
virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
|
||||
#endif
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
virtual bool ShowAssertDialog(const wxString& msg);
|
||||
#endif // __WXDEBUG__
|
||||
virtual bool HasStderr();
|
||||
|
||||
virtual void ScheduleForDestroy(wxObject *object);
|
||||
virtual void RemoveFromPendingDelete(wxObject *object);
|
||||
|
||||
virtual bool IsUsingUniversalWidgets() const
|
||||
{
|
||||
#ifdef __WXUNIVERSAL__
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-specific version of the classes above
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/apptrait.h"
|
||||
#elif defined(__WIN32__)
|
||||
#include "wx/msw/apptrait.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "wx/os2/apptrait.h"
|
||||
#elif defined(__UNIX__)
|
||||
#include "wx/unix/apptrait.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/apptrait.h"
|
||||
#elif defined(__DOS__)
|
||||
#include "wx/msdos/apptrait.h"
|
||||
#else
|
||||
#if wxUSE_GUI
|
||||
class wxGUIAppTraits : public wxGUIAppTraitsBase
|
||||
{
|
||||
};
|
||||
#endif // wxUSE_GUI
|
||||
class wxConsoleAppTraits: public wxConsoleAppTraitsBase
|
||||
{
|
||||
};
|
||||
#endif // platform
|
||||
|
||||
#endif // _WX_APPTRAIT_H_
|
||||
|
||||
|
|
|
@ -1,381 +1,381 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/archive.h
|
||||
// Purpose: Streams for archive formats
|
||||
// Author: Mike Wetherell
|
||||
// RCS-ID: $Id: archive.h 43445 2006-11-16 14:30:20Z MW $
|
||||
// Copyright: (c) 2004 Mike Wetherell
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ARCHIVE_H__
|
||||
#define _WX_ARCHIVE_H__
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveNotifier
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveNotifier
|
||||
{
|
||||
public:
|
||||
virtual ~wxArchiveNotifier() { }
|
||||
|
||||
virtual void OnEntryUpdated(class wxArchiveEntry& entry) = 0;
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveEntry
|
||||
//
|
||||
// Holds an entry's meta data, such as filename and timestamp.
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveEntry : public wxObject
|
||||
{
|
||||
public:
|
||||
virtual ~wxArchiveEntry() { }
|
||||
|
||||
virtual wxDateTime GetDateTime() const = 0;
|
||||
virtual wxFileOffset GetSize() const = 0;
|
||||
virtual wxFileOffset GetOffset() const = 0;
|
||||
virtual bool IsDir() const = 0;
|
||||
virtual bool IsReadOnly() const = 0;
|
||||
virtual wxString GetInternalName() const = 0;
|
||||
virtual wxPathFormat GetInternalFormat() const = 0;
|
||||
virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0;
|
||||
|
||||
virtual void SetDateTime(const wxDateTime& dt) = 0;
|
||||
virtual void SetSize(wxFileOffset size) = 0;
|
||||
virtual void SetIsDir(bool isDir = true) = 0;
|
||||
virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
|
||||
virtual void SetName(const wxString& name,
|
||||
wxPathFormat format = wxPATH_NATIVE) = 0;
|
||||
|
||||
wxArchiveEntry *Clone() const { return DoClone(); }
|
||||
|
||||
void SetNotifier(wxArchiveNotifier& notifier);
|
||||
virtual void UnsetNotifier() { m_notifier = NULL; }
|
||||
|
||||
protected:
|
||||
wxArchiveEntry() : m_notifier(NULL) { }
|
||||
wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { }
|
||||
|
||||
virtual void SetOffset(wxFileOffset offset) = 0;
|
||||
virtual wxArchiveEntry* DoClone() const = 0;
|
||||
|
||||
wxArchiveNotifier *GetNotifier() const { return m_notifier; }
|
||||
wxArchiveEntry& operator=(const wxArchiveEntry& entry);
|
||||
|
||||
private:
|
||||
wxArchiveNotifier *m_notifier;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxArchiveEntry)
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveInputStream
|
||||
//
|
||||
// GetNextEntry() returns an wxArchiveEntry object containing the meta-data
|
||||
// for the next entry in the archive (and gives away ownership). Reading from
|
||||
// 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.
|
||||
//
|
||||
// When there are no more entries, GetNextEntry() returns NULL and sets Eof().
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveInputStream : public wxFilterInputStream
|
||||
{
|
||||
public:
|
||||
typedef wxArchiveEntry entry_type;
|
||||
|
||||
virtual ~wxArchiveInputStream() { }
|
||||
|
||||
virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
|
||||
virtual bool CloseEntry() = 0;
|
||||
|
||||
wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); }
|
||||
|
||||
virtual char Peek() { return wxInputStream::Peek(); }
|
||||
|
||||
protected:
|
||||
wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv);
|
||||
wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv);
|
||||
|
||||
virtual wxArchiveEntry *DoGetNextEntry() = 0;
|
||||
|
||||
wxMBConv& GetConv() const { return m_conv; }
|
||||
|
||||
private:
|
||||
wxMBConv& m_conv;
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveOutputStream
|
||||
//
|
||||
// PutNextEntry is used to create a new entry in the output archive, then
|
||||
// the entry's data is written to the wxArchiveOutputStream.
|
||||
//
|
||||
// Only one entry can be open for output at a time; another call to
|
||||
// PutNextEntry closes the current entry and begins the next.
|
||||
//
|
||||
// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership
|
||||
// of the entry object.
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveOutputStream : public wxFilterOutputStream
|
||||
{
|
||||
public:
|
||||
virtual ~wxArchiveOutputStream() { }
|
||||
|
||||
virtual bool PutNextEntry(wxArchiveEntry *entry) = 0;
|
||||
|
||||
virtual bool PutNextEntry(const wxString& name,
|
||||
const wxDateTime& dt = wxDateTime::Now(),
|
||||
wxFileOffset size = wxInvalidOffset) = 0;
|
||||
|
||||
virtual bool PutNextDirEntry(const wxString& name,
|
||||
const wxDateTime& dt = wxDateTime::Now()) = 0;
|
||||
|
||||
virtual bool CopyEntry(wxArchiveEntry *entry,
|
||||
wxArchiveInputStream& stream) = 0;
|
||||
|
||||
virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0;
|
||||
|
||||
virtual bool CloseEntry() = 0;
|
||||
|
||||
protected:
|
||||
wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv);
|
||||
wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv);
|
||||
|
||||
wxMBConv& GetConv() const { return m_conv; }
|
||||
|
||||
private:
|
||||
wxMBConv& m_conv;
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveIterator
|
||||
//
|
||||
// An input iterator that can be used to transfer an archive's catalog to
|
||||
// a container.
|
||||
|
||||
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
template <class X, class Y> inline
|
||||
void _wxSetArchiveIteratorValue(
|
||||
X& val, Y entry, void *WXUNUSED(d))
|
||||
{
|
||||
val = X(entry);
|
||||
}
|
||||
template <class X, class Y, class Z> inline
|
||||
void _wxSetArchiveIteratorValue(
|
||||
std::pair<X, Y>& val, Z entry, Z WXUNUSED(d))
|
||||
{
|
||||
val = std::make_pair(X(entry->GetInternalName()), Y(entry));
|
||||
}
|
||||
|
||||
#if defined _MSC_VER && _MSC_VER < 1300
|
||||
template <class Arc, class T = Arc::entry_type*>
|
||||
#else
|
||||
template <class Arc, class T = typename Arc::entry_type*>
|
||||
#endif
|
||||
class wxArchiveIterator
|
||||
{
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef T value_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
|
||||
wxArchiveIterator() : m_rep(NULL) { }
|
||||
|
||||
wxArchiveIterator(Arc& arc) {
|
||||
typename Arc::entry_type* entry = arc.GetNextEntry();
|
||||
m_rep = entry ? new Rep(arc, entry) : NULL;
|
||||
}
|
||||
|
||||
wxArchiveIterator(const wxArchiveIterator& it) : m_rep(it.m_rep) {
|
||||
if (m_rep)
|
||||
m_rep->AddRef();
|
||||
}
|
||||
|
||||
~wxArchiveIterator() {
|
||||
if (m_rep)
|
||||
m_rep->UnRef();
|
||||
}
|
||||
|
||||
const T& operator *() const {
|
||||
return m_rep->GetValue();
|
||||
}
|
||||
|
||||
const T* operator ->() const {
|
||||
return &**this;
|
||||
}
|
||||
|
||||
wxArchiveIterator& operator =(const wxArchiveIterator& it) {
|
||||
if (it.m_rep)
|
||||
it.m_rep.AddRef();
|
||||
if (m_rep)
|
||||
m_rep.UnRef();
|
||||
m_rep = it.m_rep;
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxArchiveIterator& operator ++() {
|
||||
m_rep = m_rep->Next();
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxArchiveIterator operator ++(int) {
|
||||
wxArchiveIterator it(*this);
|
||||
++(*this);
|
||||
return it;
|
||||
}
|
||||
|
||||
bool operator ==(const wxArchiveIterator& j) const {
|
||||
return m_rep == j.m_rep;
|
||||
}
|
||||
|
||||
bool operator !=(const wxArchiveIterator& j) const {
|
||||
return !(*this == j);
|
||||
}
|
||||
|
||||
private:
|
||||
class Rep {
|
||||
Arc& m_arc;
|
||||
typename Arc::entry_type* m_entry;
|
||||
T m_value;
|
||||
int m_ref;
|
||||
|
||||
public:
|
||||
Rep(Arc& arc, typename Arc::entry_type* entry)
|
||||
: m_arc(arc), m_entry(entry), m_value(), m_ref(1) { }
|
||||
~Rep()
|
||||
{ delete m_entry; }
|
||||
|
||||
void AddRef() {
|
||||
m_ref++;
|
||||
}
|
||||
|
||||
void UnRef() {
|
||||
if (--m_ref == 0)
|
||||
delete this;
|
||||
}
|
||||
|
||||
Rep *Next() {
|
||||
typename Arc::entry_type* entry = m_arc.GetNextEntry();
|
||||
if (!entry) {
|
||||
UnRef();
|
||||
return NULL;
|
||||
}
|
||||
if (m_ref > 1) {
|
||||
m_ref--;
|
||||
return new Rep(m_arc, entry);
|
||||
}
|
||||
delete m_entry;
|
||||
m_entry = entry;
|
||||
m_value = T();
|
||||
return this;
|
||||
}
|
||||
|
||||
const T& GetValue() {
|
||||
if (m_entry) {
|
||||
_wxSetArchiveIteratorValue(m_value, m_entry, m_entry);
|
||||
m_entry = NULL;
|
||||
}
|
||||
return m_value;
|
||||
}
|
||||
} *m_rep;
|
||||
};
|
||||
|
||||
typedef wxArchiveIterator<wxArchiveInputStream> wxArchiveIter;
|
||||
typedef wxArchiveIterator<wxArchiveInputStream,
|
||||
std::pair<wxString, wxArchiveEntry*> > wxArchivePairIter;
|
||||
|
||||
#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveClassFactory
|
||||
//
|
||||
// A wxArchiveClassFactory instance for a particular archive type allows
|
||||
// the creation of the other classes that may be needed.
|
||||
|
||||
void WXDLLIMPEXP_BASE wxUseArchiveClasses();
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxFilterClassFactoryBase
|
||||
{
|
||||
public:
|
||||
typedef wxArchiveEntry entry_type;
|
||||
typedef wxArchiveInputStream instream_type;
|
||||
typedef wxArchiveOutputStream outstream_type;
|
||||
typedef wxArchiveNotifier notifier_type;
|
||||
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
|
||||
typedef wxArchiveIter iter_type;
|
||||
typedef wxArchivePairIter pairiter_type;
|
||||
#endif
|
||||
|
||||
virtual ~wxArchiveClassFactory() { }
|
||||
|
||||
wxArchiveEntry *NewEntry() const
|
||||
{ return DoNewEntry(); }
|
||||
wxArchiveInputStream *NewStream(wxInputStream& stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
wxArchiveInputStream *NewStream(wxInputStream *stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
wxArchiveOutputStream *NewStream(wxOutputStream *stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
|
||||
virtual wxString GetInternalName(
|
||||
const wxString& name,
|
||||
wxPathFormat format = wxPATH_NATIVE) const = 0;
|
||||
|
||||
void SetConv(wxMBConv& conv) { m_pConv = &conv; }
|
||||
wxMBConv& GetConv() const
|
||||
{ if (m_pConv) return *m_pConv; else return wxConvLocal; }
|
||||
|
||||
static const wxArchiveClassFactory *Find(const wxChar *protocol,
|
||||
wxStreamProtocolType type
|
||||
= wxSTREAM_PROTOCOL);
|
||||
|
||||
static const wxArchiveClassFactory *GetFirst();
|
||||
const wxArchiveClassFactory *GetNext() const { return m_next; }
|
||||
|
||||
void PushFront() { Remove(); m_next = sm_first; sm_first = this; }
|
||||
void Remove();
|
||||
|
||||
protected:
|
||||
// old compilers don't support covarient returns, so 'Do' methods are
|
||||
// used to simulate them
|
||||
virtual wxArchiveEntry *DoNewEntry() const = 0;
|
||||
virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0;
|
||||
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
|
||||
virtual wxArchiveInputStream *DoNewStream(wxInputStream *stream) const = 0;
|
||||
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const = 0;
|
||||
|
||||
wxArchiveClassFactory() : m_pConv(NULL), m_next(this) { }
|
||||
wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
|
||||
{ return *this; }
|
||||
|
||||
private:
|
||||
wxMBConv *m_pConv;
|
||||
static wxArchiveClassFactory *sm_first;
|
||||
wxArchiveClassFactory *m_next;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
|
||||
};
|
||||
|
||||
#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
|
||||
|
||||
#endif // _WX_ARCHIVE_H__
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/archive.h
|
||||
// Purpose: Streams for archive formats
|
||||
// Author: Mike Wetherell
|
||||
// RCS-ID: $Id: archive.h 43445 2006-11-16 14:30:20Z MW $
|
||||
// Copyright: (c) 2004 Mike Wetherell
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ARCHIVE_H__
|
||||
#define _WX_ARCHIVE_H__
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveNotifier
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveNotifier
|
||||
{
|
||||
public:
|
||||
virtual ~wxArchiveNotifier() { }
|
||||
|
||||
virtual void OnEntryUpdated(class wxArchiveEntry& entry) = 0;
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveEntry
|
||||
//
|
||||
// Holds an entry's meta data, such as filename and timestamp.
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveEntry : public wxObject
|
||||
{
|
||||
public:
|
||||
virtual ~wxArchiveEntry() { }
|
||||
|
||||
virtual wxDateTime GetDateTime() const = 0;
|
||||
virtual wxFileOffset GetSize() const = 0;
|
||||
virtual wxFileOffset GetOffset() const = 0;
|
||||
virtual bool IsDir() const = 0;
|
||||
virtual bool IsReadOnly() const = 0;
|
||||
virtual wxString GetInternalName() const = 0;
|
||||
virtual wxPathFormat GetInternalFormat() const = 0;
|
||||
virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0;
|
||||
|
||||
virtual void SetDateTime(const wxDateTime& dt) = 0;
|
||||
virtual void SetSize(wxFileOffset size) = 0;
|
||||
virtual void SetIsDir(bool isDir = true) = 0;
|
||||
virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
|
||||
virtual void SetName(const wxString& name,
|
||||
wxPathFormat format = wxPATH_NATIVE) = 0;
|
||||
|
||||
wxArchiveEntry *Clone() const { return DoClone(); }
|
||||
|
||||
void SetNotifier(wxArchiveNotifier& notifier);
|
||||
virtual void UnsetNotifier() { m_notifier = NULL; }
|
||||
|
||||
protected:
|
||||
wxArchiveEntry() : m_notifier(NULL) { }
|
||||
wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { }
|
||||
|
||||
virtual void SetOffset(wxFileOffset offset) = 0;
|
||||
virtual wxArchiveEntry* DoClone() const = 0;
|
||||
|
||||
wxArchiveNotifier *GetNotifier() const { return m_notifier; }
|
||||
wxArchiveEntry& operator=(const wxArchiveEntry& entry);
|
||||
|
||||
private:
|
||||
wxArchiveNotifier *m_notifier;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxArchiveEntry)
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveInputStream
|
||||
//
|
||||
// GetNextEntry() returns an wxArchiveEntry object containing the meta-data
|
||||
// for the next entry in the archive (and gives away ownership). Reading from
|
||||
// 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.
|
||||
//
|
||||
// When there are no more entries, GetNextEntry() returns NULL and sets Eof().
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveInputStream : public wxFilterInputStream
|
||||
{
|
||||
public:
|
||||
typedef wxArchiveEntry entry_type;
|
||||
|
||||
virtual ~wxArchiveInputStream() { }
|
||||
|
||||
virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
|
||||
virtual bool CloseEntry() = 0;
|
||||
|
||||
wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); }
|
||||
|
||||
virtual char Peek() { return wxInputStream::Peek(); }
|
||||
|
||||
protected:
|
||||
wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv);
|
||||
wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv);
|
||||
|
||||
virtual wxArchiveEntry *DoGetNextEntry() = 0;
|
||||
|
||||
wxMBConv& GetConv() const { return m_conv; }
|
||||
|
||||
private:
|
||||
wxMBConv& m_conv;
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveOutputStream
|
||||
//
|
||||
// PutNextEntry is used to create a new entry in the output archive, then
|
||||
// the entry's data is written to the wxArchiveOutputStream.
|
||||
//
|
||||
// Only one entry can be open for output at a time; another call to
|
||||
// PutNextEntry closes the current entry and begins the next.
|
||||
//
|
||||
// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership
|
||||
// of the entry object.
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveOutputStream : public wxFilterOutputStream
|
||||
{
|
||||
public:
|
||||
virtual ~wxArchiveOutputStream() { }
|
||||
|
||||
virtual bool PutNextEntry(wxArchiveEntry *entry) = 0;
|
||||
|
||||
virtual bool PutNextEntry(const wxString& name,
|
||||
const wxDateTime& dt = wxDateTime::Now(),
|
||||
wxFileOffset size = wxInvalidOffset) = 0;
|
||||
|
||||
virtual bool PutNextDirEntry(const wxString& name,
|
||||
const wxDateTime& dt = wxDateTime::Now()) = 0;
|
||||
|
||||
virtual bool CopyEntry(wxArchiveEntry *entry,
|
||||
wxArchiveInputStream& stream) = 0;
|
||||
|
||||
virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0;
|
||||
|
||||
virtual bool CloseEntry() = 0;
|
||||
|
||||
protected:
|
||||
wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv);
|
||||
wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv);
|
||||
|
||||
wxMBConv& GetConv() const { return m_conv; }
|
||||
|
||||
private:
|
||||
wxMBConv& m_conv;
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveIterator
|
||||
//
|
||||
// An input iterator that can be used to transfer an archive's catalog to
|
||||
// a container.
|
||||
|
||||
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
|
||||
template <class X, class Y> inline
|
||||
void _wxSetArchiveIteratorValue(
|
||||
X& val, Y entry, void *WXUNUSED(d))
|
||||
{
|
||||
val = X(entry);
|
||||
}
|
||||
template <class X, class Y, class Z> inline
|
||||
void _wxSetArchiveIteratorValue(
|
||||
std::pair<X, Y>& val, Z entry, Z WXUNUSED(d))
|
||||
{
|
||||
val = std::make_pair(X(entry->GetInternalName()), Y(entry));
|
||||
}
|
||||
|
||||
#if defined _MSC_VER && _MSC_VER < 1300
|
||||
template <class Arc, class T = Arc::entry_type*>
|
||||
#else
|
||||
template <class Arc, class T = typename Arc::entry_type*>
|
||||
#endif
|
||||
class wxArchiveIterator
|
||||
{
|
||||
public:
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
typedef T value_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
|
||||
wxArchiveIterator() : m_rep(NULL) { }
|
||||
|
||||
wxArchiveIterator(Arc& arc) {
|
||||
typename Arc::entry_type* entry = arc.GetNextEntry();
|
||||
m_rep = entry ? new Rep(arc, entry) : NULL;
|
||||
}
|
||||
|
||||
wxArchiveIterator(const wxArchiveIterator& it) : m_rep(it.m_rep) {
|
||||
if (m_rep)
|
||||
m_rep->AddRef();
|
||||
}
|
||||
|
||||
~wxArchiveIterator() {
|
||||
if (m_rep)
|
||||
m_rep->UnRef();
|
||||
}
|
||||
|
||||
const T& operator *() const {
|
||||
return m_rep->GetValue();
|
||||
}
|
||||
|
||||
const T* operator ->() const {
|
||||
return &**this;
|
||||
}
|
||||
|
||||
wxArchiveIterator& operator =(const wxArchiveIterator& it) {
|
||||
if (it.m_rep)
|
||||
it.m_rep.AddRef();
|
||||
if (m_rep)
|
||||
m_rep.UnRef();
|
||||
m_rep = it.m_rep;
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxArchiveIterator& operator ++() {
|
||||
m_rep = m_rep->Next();
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxArchiveIterator operator ++(int) {
|
||||
wxArchiveIterator it(*this);
|
||||
++(*this);
|
||||
return it;
|
||||
}
|
||||
|
||||
bool operator ==(const wxArchiveIterator& j) const {
|
||||
return m_rep == j.m_rep;
|
||||
}
|
||||
|
||||
bool operator !=(const wxArchiveIterator& j) const {
|
||||
return !(*this == j);
|
||||
}
|
||||
|
||||
private:
|
||||
class Rep {
|
||||
Arc& m_arc;
|
||||
typename Arc::entry_type* m_entry;
|
||||
T m_value;
|
||||
int m_ref;
|
||||
|
||||
public:
|
||||
Rep(Arc& arc, typename Arc::entry_type* entry)
|
||||
: m_arc(arc), m_entry(entry), m_value(), m_ref(1) { }
|
||||
~Rep()
|
||||
{ delete m_entry; }
|
||||
|
||||
void AddRef() {
|
||||
m_ref++;
|
||||
}
|
||||
|
||||
void UnRef() {
|
||||
if (--m_ref == 0)
|
||||
delete this;
|
||||
}
|
||||
|
||||
Rep *Next() {
|
||||
typename Arc::entry_type* entry = m_arc.GetNextEntry();
|
||||
if (!entry) {
|
||||
UnRef();
|
||||
return NULL;
|
||||
}
|
||||
if (m_ref > 1) {
|
||||
m_ref--;
|
||||
return new Rep(m_arc, entry);
|
||||
}
|
||||
delete m_entry;
|
||||
m_entry = entry;
|
||||
m_value = T();
|
||||
return this;
|
||||
}
|
||||
|
||||
const T& GetValue() {
|
||||
if (m_entry) {
|
||||
_wxSetArchiveIteratorValue(m_value, m_entry, m_entry);
|
||||
m_entry = NULL;
|
||||
}
|
||||
return m_value;
|
||||
}
|
||||
} *m_rep;
|
||||
};
|
||||
|
||||
typedef wxArchiveIterator<wxArchiveInputStream> wxArchiveIter;
|
||||
typedef wxArchiveIterator<wxArchiveInputStream,
|
||||
std::pair<wxString, wxArchiveEntry*> > wxArchivePairIter;
|
||||
|
||||
#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxArchiveClassFactory
|
||||
//
|
||||
// A wxArchiveClassFactory instance for a particular archive type allows
|
||||
// the creation of the other classes that may be needed.
|
||||
|
||||
void WXDLLIMPEXP_BASE wxUseArchiveClasses();
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxFilterClassFactoryBase
|
||||
{
|
||||
public:
|
||||
typedef wxArchiveEntry entry_type;
|
||||
typedef wxArchiveInputStream instream_type;
|
||||
typedef wxArchiveOutputStream outstream_type;
|
||||
typedef wxArchiveNotifier notifier_type;
|
||||
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
|
||||
typedef wxArchiveIter iter_type;
|
||||
typedef wxArchivePairIter pairiter_type;
|
||||
#endif
|
||||
|
||||
virtual ~wxArchiveClassFactory() { }
|
||||
|
||||
wxArchiveEntry *NewEntry() const
|
||||
{ return DoNewEntry(); }
|
||||
wxArchiveInputStream *NewStream(wxInputStream& stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
wxArchiveInputStream *NewStream(wxInputStream *stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
wxArchiveOutputStream *NewStream(wxOutputStream *stream) const
|
||||
{ return DoNewStream(stream); }
|
||||
|
||||
virtual wxString GetInternalName(
|
||||
const wxString& name,
|
||||
wxPathFormat format = wxPATH_NATIVE) const = 0;
|
||||
|
||||
void SetConv(wxMBConv& conv) { m_pConv = &conv; }
|
||||
wxMBConv& GetConv() const
|
||||
{ if (m_pConv) return *m_pConv; else return wxConvLocal; }
|
||||
|
||||
static const wxArchiveClassFactory *Find(const wxChar *protocol,
|
||||
wxStreamProtocolType type
|
||||
= wxSTREAM_PROTOCOL);
|
||||
|
||||
static const wxArchiveClassFactory *GetFirst();
|
||||
const wxArchiveClassFactory *GetNext() const { return m_next; }
|
||||
|
||||
void PushFront() { Remove(); m_next = sm_first; sm_first = this; }
|
||||
void Remove();
|
||||
|
||||
protected:
|
||||
// old compilers don't support covarient returns, so 'Do' methods are
|
||||
// used to simulate them
|
||||
virtual wxArchiveEntry *DoNewEntry() const = 0;
|
||||
virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0;
|
||||
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
|
||||
virtual wxArchiveInputStream *DoNewStream(wxInputStream *stream) const = 0;
|
||||
virtual wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const = 0;
|
||||
|
||||
wxArchiveClassFactory() : m_pConv(NULL), m_next(this) { }
|
||||
wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
|
||||
{ return *this; }
|
||||
|
||||
private:
|
||||
wxMBConv *m_pConv;
|
||||
static wxArchiveClassFactory *sm_first;
|
||||
wxArchiveClassFactory *m_next;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
|
||||
};
|
||||
|
||||
#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
|
||||
|
||||
#endif // _WX_ARCHIVE_H__
|
||||
|
|
|
@ -1,372 +1,372 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/arrstr.h
|
||||
// Purpose: wxArrayString class
|
||||
// Author: Mattia Barbon and Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07/07/03
|
||||
// RCS-ID: $Id: arrstr.h 33888 2005-04-26 19:24:12Z MBN $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ARRSTR_H
|
||||
#define _WX_ARRSTR_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
|
||||
WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
|
||||
|
||||
#if wxUSE_STL
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*);
|
||||
typedef wxString _wxArraywxBaseArrayStringBase;
|
||||
_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase,
|
||||
wxArray_SortFunction<wxString>,
|
||||
class WXDLLIMPEXP_BASE);
|
||||
WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase,
|
||||
wxBaseArrayStringBase, WXDLLIMPEXP_BASE);
|
||||
_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase,
|
||||
wxBaseArrayStringBase, = wxStringSortAscending,
|
||||
class WXDLLIMPEXP_BASE, CMPFUNCwxString);
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase
|
||||
{
|
||||
public:
|
||||
// type of function used by wxArrayString::Sort()
|
||||
typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
|
||||
const wxString& second);
|
||||
|
||||
wxArrayString() { }
|
||||
wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
|
||||
wxArrayString(size_t sz, const wxChar** a);
|
||||
wxArrayString(size_t sz, const wxString* a);
|
||||
|
||||
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
|
||||
|
||||
void Sort(bool reverseOrder = false);
|
||||
void Sort(CompareFunction function);
|
||||
void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); }
|
||||
|
||||
size_t Add(const wxString& string, size_t copies = 1)
|
||||
{
|
||||
wxArrayStringBase::Add(string, copies);
|
||||
return size() - copies;
|
||||
}
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
|
||||
{
|
||||
public:
|
||||
wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending)
|
||||
{ }
|
||||
wxSortedArrayString(const wxSortedArrayString& array)
|
||||
: wxSortedArrayStringBase(array)
|
||||
{ }
|
||||
wxSortedArrayString(const wxArrayString& src)
|
||||
: wxSortedArrayStringBase(wxStringSortAscending)
|
||||
{
|
||||
reserve(src.size());
|
||||
|
||||
for ( size_t n = 0; n < src.size(); n++ )
|
||||
Add(src[n]);
|
||||
}
|
||||
|
||||
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
|
||||
};
|
||||
|
||||
#else // if !wxUSE_STL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// The string array uses it's knowledge of internal structure of the wxString
|
||||
// class to optimize string storage. Normally, we would store pointers to
|
||||
// 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
|
||||
// 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
|
||||
// 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,
|
||||
// so the original string may be safely deleted. When a string is retrieved
|
||||
// from the array (operator[] or Item() method), a reference is returned.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArrayString
|
||||
{
|
||||
public:
|
||||
// type of function used by wxArrayString::Sort()
|
||||
typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
|
||||
const wxString& second);
|
||||
// type of function used by wxArrayString::Sort(), for compatibility with
|
||||
// wxArray
|
||||
typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first,
|
||||
wxString* second);
|
||||
|
||||
// constructors and destructor
|
||||
// default ctor
|
||||
wxArrayString() { Init(false); }
|
||||
// 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
|
||||
// using this ctor for implicit conversions from "const char *" (which
|
||||
// we'd like to be implicitly converted to wxString instead!)
|
||||
//
|
||||
// of course, using explicit would be even better - if all compilers
|
||||
// supported it...
|
||||
wxArrayString(int autoSort) { Init(autoSort != 0); }
|
||||
// C string array ctor
|
||||
wxArrayString(size_t sz, const wxChar** a);
|
||||
// wxString string array ctor
|
||||
wxArrayString(size_t sz, const wxString* a);
|
||||
// copy ctor
|
||||
wxArrayString(const wxArrayString& array);
|
||||
// assignment operator
|
||||
wxArrayString& operator=(const wxArrayString& src);
|
||||
// not virtual, this class should not be derived from
|
||||
~wxArrayString();
|
||||
|
||||
// memory management
|
||||
// empties the list, but doesn't release memory
|
||||
void Empty();
|
||||
// empties the list and releases memory
|
||||
void Clear();
|
||||
// preallocates memory for given number of items
|
||||
void Alloc(size_t nCount);
|
||||
// minimzes the memory usage (by freeing all extra memory)
|
||||
void Shrink();
|
||||
|
||||
// simple accessors
|
||||
// number of elements in the array
|
||||
size_t GetCount() const { return m_nCount; }
|
||||
// is it empty?
|
||||
bool IsEmpty() const { return m_nCount == 0; }
|
||||
// number of elements in the array (GetCount is preferred API)
|
||||
size_t Count() const { return m_nCount; }
|
||||
|
||||
// items access (range checking is done in debug version)
|
||||
// get item at position uiIndex
|
||||
wxString& Item(size_t nIndex) const
|
||||
{
|
||||
wxASSERT_MSG( nIndex < m_nCount,
|
||||
_T("wxArrayString: index out of bounds") );
|
||||
|
||||
return *(wxString *)&(m_pItems[nIndex]);
|
||||
}
|
||||
|
||||
// same as Item()
|
||||
wxString& operator[](size_t nIndex) const { return Item(nIndex); }
|
||||
// get last item
|
||||
wxString& Last() const
|
||||
{
|
||||
wxASSERT_MSG( !IsEmpty(),
|
||||
_T("wxArrayString: index out of bounds") );
|
||||
return Item(Count() - 1);
|
||||
}
|
||||
|
||||
// return a wxString[], useful for the controls which
|
||||
// take one in their ctor. You must delete[] it yourself
|
||||
// once you are done with it. Will return NULL if the
|
||||
// ArrayString was empty.
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxDEPRECATED( wxString* GetStringArray() const );
|
||||
#endif
|
||||
|
||||
// item management
|
||||
// Search the element in the array, starting from the beginning if
|
||||
// bFromEnd is false or from end otherwise. If bCase, comparison is case
|
||||
// sensitive (default). Returns index of the first item matched or
|
||||
// wxNOT_FOUND
|
||||
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
|
||||
// index
|
||||
size_t Add(const wxString& str, size_t nInsert = 1);
|
||||
// add new element at given position
|
||||
void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1);
|
||||
// expand the array to have count elements
|
||||
void SetCount(size_t count);
|
||||
// remove first item matching this value
|
||||
void Remove(const wxChar *sz);
|
||||
// remove item by index
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
|
||||
#endif
|
||||
void RemoveAt(size_t nIndex, size_t nRemove = 1);
|
||||
|
||||
// sorting
|
||||
// sort array elements in alphabetical order (or reversed alphabetical
|
||||
// order if reverseOrder parameter is true)
|
||||
void Sort(bool reverseOrder = false);
|
||||
// sort array elements using specified comparaison function
|
||||
void Sort(CompareFunction compareFunction);
|
||||
void Sort(CompareFunction2 compareFunction);
|
||||
|
||||
// comparison
|
||||
// compare two arrays case sensitively
|
||||
bool operator==(const wxArrayString& a) const;
|
||||
// compare two arrays case sensitively
|
||||
bool operator!=(const wxArrayString& a) const { return !(*this == a); }
|
||||
|
||||
// STL-like interface
|
||||
typedef wxString value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type* iterator;
|
||||
typedef const value_type* const_iterator;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef int difference_type;
|
||||
typedef size_t size_type;
|
||||
|
||||
// TODO: this code duplicates the one in dynarray.h
|
||||
class reverse_iterator
|
||||
{
|
||||
typedef wxString value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef reverse_iterator itor;
|
||||
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 difference_type operator -(const itor& i1, const itor& i2);
|
||||
public:
|
||||
pointer m_ptr;
|
||||
reverse_iterator() : m_ptr(NULL) { }
|
||||
reverse_iterator(pointer ptr) : m_ptr(ptr) { }
|
||||
reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
|
||||
reference operator*() const { return *m_ptr; }
|
||||
pointer operator->() const { return m_ptr; }
|
||||
itor& operator++() { --m_ptr; return *this; }
|
||||
const itor operator++(int)
|
||||
{ reverse_iterator tmp = *this; --m_ptr; return tmp; }
|
||||
itor& operator--() { ++m_ptr; return *this; }
|
||||
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; }
|
||||
};
|
||||
|
||||
class const_reverse_iterator
|
||||
{
|
||||
typedef wxString value_type;
|
||||
typedef const value_type* pointer;
|
||||
typedef const value_type& reference;
|
||||
typedef const_reverse_iterator itor;
|
||||
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 difference_type operator -(const itor& i1, const itor& i2);
|
||||
public:
|
||||
pointer m_ptr;
|
||||
const_reverse_iterator() : m_ptr(NULL) { }
|
||||
const_reverse_iterator(pointer ptr) : m_ptr(ptr) { }
|
||||
const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
|
||||
const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }
|
||||
reference operator*() const { return *m_ptr; }
|
||||
pointer operator->() const { return m_ptr; }
|
||||
itor& operator++() { --m_ptr; return *this; }
|
||||
const itor operator++(int)
|
||||
{ itor tmp = *this; --m_ptr; return tmp; }
|
||||
itor& operator--() { ++m_ptr; return *this; }
|
||||
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; }
|
||||
};
|
||||
|
||||
wxArrayString(const_iterator first, const_iterator last)
|
||||
{ Init(false); assign(first, last); }
|
||||
wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); }
|
||||
void assign(const_iterator first, const_iterator last);
|
||||
void assign(size_type n, const_reference v)
|
||||
{ clear(); Add(v, n); }
|
||||
reference back() { return *(end() - 1); }
|
||||
const_reference back() const { return *(end() - 1); }
|
||||
iterator begin() { return (wxString *)&(m_pItems[0]); }
|
||||
const_iterator begin() const { return (wxString *)&(m_pItems[0]); }
|
||||
size_type capacity() const { return m_nSize; }
|
||||
void clear() { Clear(); }
|
||||
bool empty() const { return IsEmpty(); }
|
||||
iterator end() { return begin() + GetCount(); }
|
||||
const_iterator end() const { return begin() + GetCount(); }
|
||||
iterator erase(iterator first, iterator last)
|
||||
{
|
||||
size_t idx = first - begin();
|
||||
RemoveAt(idx, last - first);
|
||||
return begin() + idx;
|
||||
}
|
||||
iterator erase(iterator it) { return erase(it, it + 1); }
|
||||
reference front() { return *begin(); }
|
||||
const_reference front() const { return *begin(); }
|
||||
void insert(iterator it, size_type n, const_reference v)
|
||||
{ Insert(v, it - begin(), n); }
|
||||
iterator insert(iterator it, const_reference v = value_type())
|
||||
{ size_t idx = it - begin(); Insert(v, idx); return begin() + idx; }
|
||||
void insert(iterator it, const_iterator first, const_iterator last);
|
||||
size_type max_size() const { return INT_MAX; }
|
||||
void pop_back() { RemoveAt(GetCount() - 1); }
|
||||
void push_back(const_reference v) { Add(v); }
|
||||
reverse_iterator rbegin() { return reverse_iterator(end() - 1); }
|
||||
const_reverse_iterator rbegin() const;
|
||||
reverse_iterator rend() { return reverse_iterator(begin() - 1); }
|
||||
const_reverse_iterator rend() const;
|
||||
void reserve(size_type n) /* base::reserve*/;
|
||||
void resize(size_type n, value_type v = value_type());
|
||||
size_type size() const { return GetCount(); }
|
||||
|
||||
protected:
|
||||
void Init(bool autoSort); // common part of all ctors
|
||||
void Copy(const wxArrayString& src); // copies the contents of another array
|
||||
|
||||
private:
|
||||
void Grow(size_t nIncrement = 0); // makes array bigger if needed
|
||||
void Free(); // free all the strings stored
|
||||
|
||||
void DoSort(); // common part of all Sort() variants
|
||||
|
||||
size_t m_nSize, // current size of the array
|
||||
m_nCount; // current number of elements
|
||||
|
||||
wxChar **m_pItems; // pointer to data
|
||||
|
||||
bool m_autoSort; // if true, keep the array always sorted
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString
|
||||
{
|
||||
public:
|
||||
wxSortedArrayString() : wxArrayString(true)
|
||||
{ }
|
||||
wxSortedArrayString(const wxArrayString& array) : wxArrayString(true)
|
||||
{ Copy(array); }
|
||||
};
|
||||
|
||||
#endif // !wxUSE_STL
|
||||
|
||||
// this class provides a temporary wxString* from a
|
||||
// wxArrayString
|
||||
class WXDLLIMPEXP_BASE wxCArrayString
|
||||
{
|
||||
public:
|
||||
wxCArrayString( const wxArrayString& array )
|
||||
: m_array( array ), m_strings( NULL )
|
||||
{ }
|
||||
~wxCArrayString() { delete[] m_strings; }
|
||||
|
||||
size_t GetCount() const { return m_array.GetCount(); }
|
||||
wxString* GetStrings()
|
||||
{
|
||||
if( m_strings ) return m_strings;
|
||||
size_t count = m_array.GetCount();
|
||||
m_strings = new wxString[count];
|
||||
for( size_t i = 0; i < count; ++i )
|
||||
m_strings[i] = m_array[i];
|
||||
return m_strings;
|
||||
}
|
||||
private:
|
||||
const wxArrayString& m_array;
|
||||
wxString* m_strings;
|
||||
};
|
||||
|
||||
#endif
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/arrstr.h
|
||||
// Purpose: wxArrayString class
|
||||
// Author: Mattia Barbon and Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07/07/03
|
||||
// RCS-ID: $Id: arrstr.h 33888 2005-04-26 19:24:12Z MBN $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ARRSTR_H
|
||||
#define _WX_ARRSTR_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
|
||||
WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
|
||||
|
||||
#if wxUSE_STL
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*);
|
||||
typedef wxString _wxArraywxBaseArrayStringBase;
|
||||
_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase,
|
||||
wxArray_SortFunction<wxString>,
|
||||
class WXDLLIMPEXP_BASE);
|
||||
WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase,
|
||||
wxBaseArrayStringBase, WXDLLIMPEXP_BASE);
|
||||
_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase,
|
||||
wxBaseArrayStringBase, = wxStringSortAscending,
|
||||
class WXDLLIMPEXP_BASE, CMPFUNCwxString);
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase
|
||||
{
|
||||
public:
|
||||
// type of function used by wxArrayString::Sort()
|
||||
typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
|
||||
const wxString& second);
|
||||
|
||||
wxArrayString() { }
|
||||
wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
|
||||
wxArrayString(size_t sz, const wxChar** a);
|
||||
wxArrayString(size_t sz, const wxString* a);
|
||||
|
||||
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
|
||||
|
||||
void Sort(bool reverseOrder = false);
|
||||
void Sort(CompareFunction function);
|
||||
void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); }
|
||||
|
||||
size_t Add(const wxString& string, size_t copies = 1)
|
||||
{
|
||||
wxArrayStringBase::Add(string, copies);
|
||||
return size() - copies;
|
||||
}
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
|
||||
{
|
||||
public:
|
||||
wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending)
|
||||
{ }
|
||||
wxSortedArrayString(const wxSortedArrayString& array)
|
||||
: wxSortedArrayStringBase(array)
|
||||
{ }
|
||||
wxSortedArrayString(const wxArrayString& src)
|
||||
: wxSortedArrayStringBase(wxStringSortAscending)
|
||||
{
|
||||
reserve(src.size());
|
||||
|
||||
for ( size_t n = 0; n < src.size(); n++ )
|
||||
Add(src[n]);
|
||||
}
|
||||
|
||||
int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
|
||||
};
|
||||
|
||||
#else // if !wxUSE_STL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// The string array uses it's knowledge of internal structure of the wxString
|
||||
// class to optimize string storage. Normally, we would store pointers to
|
||||
// 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
|
||||
// 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
|
||||
// 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,
|
||||
// so the original string may be safely deleted. When a string is retrieved
|
||||
// from the array (operator[] or Item() method), a reference is returned.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxArrayString
|
||||
{
|
||||
public:
|
||||
// type of function used by wxArrayString::Sort()
|
||||
typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
|
||||
const wxString& second);
|
||||
// type of function used by wxArrayString::Sort(), for compatibility with
|
||||
// wxArray
|
||||
typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first,
|
||||
wxString* second);
|
||||
|
||||
// constructors and destructor
|
||||
// default ctor
|
||||
wxArrayString() { Init(false); }
|
||||
// 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
|
||||
// using this ctor for implicit conversions from "const char *" (which
|
||||
// we'd like to be implicitly converted to wxString instead!)
|
||||
//
|
||||
// of course, using explicit would be even better - if all compilers
|
||||
// supported it...
|
||||
wxArrayString(int autoSort) { Init(autoSort != 0); }
|
||||
// C string array ctor
|
||||
wxArrayString(size_t sz, const wxChar** a);
|
||||
// wxString string array ctor
|
||||
wxArrayString(size_t sz, const wxString* a);
|
||||
// copy ctor
|
||||
wxArrayString(const wxArrayString& array);
|
||||
// assignment operator
|
||||
wxArrayString& operator=(const wxArrayString& src);
|
||||
// not virtual, this class should not be derived from
|
||||
~wxArrayString();
|
||||
|
||||
// memory management
|
||||
// empties the list, but doesn't release memory
|
||||
void Empty();
|
||||
// empties the list and releases memory
|
||||
void Clear();
|
||||
// preallocates memory for given number of items
|
||||
void Alloc(size_t nCount);
|
||||
// minimzes the memory usage (by freeing all extra memory)
|
||||
void Shrink();
|
||||
|
||||
// simple accessors
|
||||
// number of elements in the array
|
||||
size_t GetCount() const { return m_nCount; }
|
||||
// is it empty?
|
||||
bool IsEmpty() const { return m_nCount == 0; }
|
||||
// number of elements in the array (GetCount is preferred API)
|
||||
size_t Count() const { return m_nCount; }
|
||||
|
||||
// items access (range checking is done in debug version)
|
||||
// get item at position uiIndex
|
||||
wxString& Item(size_t nIndex) const
|
||||
{
|
||||
wxASSERT_MSG( nIndex < m_nCount,
|
||||
_T("wxArrayString: index out of bounds") );
|
||||
|
||||
return *(wxString *)&(m_pItems[nIndex]);
|
||||
}
|
||||
|
||||
// same as Item()
|
||||
wxString& operator[](size_t nIndex) const { return Item(nIndex); }
|
||||
// get last item
|
||||
wxString& Last() const
|
||||
{
|
||||
wxASSERT_MSG( !IsEmpty(),
|
||||
_T("wxArrayString: index out of bounds") );
|
||||
return Item(Count() - 1);
|
||||
}
|
||||
|
||||
// return a wxString[], useful for the controls which
|
||||
// take one in their ctor. You must delete[] it yourself
|
||||
// once you are done with it. Will return NULL if the
|
||||
// ArrayString was empty.
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxDEPRECATED( wxString* GetStringArray() const );
|
||||
#endif
|
||||
|
||||
// item management
|
||||
// Search the element in the array, starting from the beginning if
|
||||
// bFromEnd is false or from end otherwise. If bCase, comparison is case
|
||||
// sensitive (default). Returns index of the first item matched or
|
||||
// wxNOT_FOUND
|
||||
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
|
||||
// index
|
||||
size_t Add(const wxString& str, size_t nInsert = 1);
|
||||
// add new element at given position
|
||||
void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1);
|
||||
// expand the array to have count elements
|
||||
void SetCount(size_t count);
|
||||
// remove first item matching this value
|
||||
void Remove(const wxChar *sz);
|
||||
// remove item by index
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
|
||||
#endif
|
||||
void RemoveAt(size_t nIndex, size_t nRemove = 1);
|
||||
|
||||
// sorting
|
||||
// sort array elements in alphabetical order (or reversed alphabetical
|
||||
// order if reverseOrder parameter is true)
|
||||
void Sort(bool reverseOrder = false);
|
||||
// sort array elements using specified comparaison function
|
||||
void Sort(CompareFunction compareFunction);
|
||||
void Sort(CompareFunction2 compareFunction);
|
||||
|
||||
// comparison
|
||||
// compare two arrays case sensitively
|
||||
bool operator==(const wxArrayString& a) const;
|
||||
// compare two arrays case sensitively
|
||||
bool operator!=(const wxArrayString& a) const { return !(*this == a); }
|
||||
|
||||
// STL-like interface
|
||||
typedef wxString value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef const value_type* const_pointer;
|
||||
typedef value_type* iterator;
|
||||
typedef const value_type* const_iterator;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef int difference_type;
|
||||
typedef size_t size_type;
|
||||
|
||||
// TODO: this code duplicates the one in dynarray.h
|
||||
class reverse_iterator
|
||||
{
|
||||
typedef wxString value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef reverse_iterator itor;
|
||||
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 difference_type operator -(const itor& i1, const itor& i2);
|
||||
public:
|
||||
pointer m_ptr;
|
||||
reverse_iterator() : m_ptr(NULL) { }
|
||||
reverse_iterator(pointer ptr) : m_ptr(ptr) { }
|
||||
reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
|
||||
reference operator*() const { return *m_ptr; }
|
||||
pointer operator->() const { return m_ptr; }
|
||||
itor& operator++() { --m_ptr; return *this; }
|
||||
const itor operator++(int)
|
||||
{ reverse_iterator tmp = *this; --m_ptr; return tmp; }
|
||||
itor& operator--() { ++m_ptr; return *this; }
|
||||
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; }
|
||||
};
|
||||
|
||||
class const_reverse_iterator
|
||||
{
|
||||
typedef wxString value_type;
|
||||
typedef const value_type* pointer;
|
||||
typedef const value_type& reference;
|
||||
typedef const_reverse_iterator itor;
|
||||
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 difference_type operator -(const itor& i1, const itor& i2);
|
||||
public:
|
||||
pointer m_ptr;
|
||||
const_reverse_iterator() : m_ptr(NULL) { }
|
||||
const_reverse_iterator(pointer ptr) : m_ptr(ptr) { }
|
||||
const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
|
||||
const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }
|
||||
reference operator*() const { return *m_ptr; }
|
||||
pointer operator->() const { return m_ptr; }
|
||||
itor& operator++() { --m_ptr; return *this; }
|
||||
const itor operator++(int)
|
||||
{ itor tmp = *this; --m_ptr; return tmp; }
|
||||
itor& operator--() { ++m_ptr; return *this; }
|
||||
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; }
|
||||
};
|
||||
|
||||
wxArrayString(const_iterator first, const_iterator last)
|
||||
{ Init(false); assign(first, last); }
|
||||
wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); }
|
||||
void assign(const_iterator first, const_iterator last);
|
||||
void assign(size_type n, const_reference v)
|
||||
{ clear(); Add(v, n); }
|
||||
reference back() { return *(end() - 1); }
|
||||
const_reference back() const { return *(end() - 1); }
|
||||
iterator begin() { return (wxString *)&(m_pItems[0]); }
|
||||
const_iterator begin() const { return (wxString *)&(m_pItems[0]); }
|
||||
size_type capacity() const { return m_nSize; }
|
||||
void clear() { Clear(); }
|
||||
bool empty() const { return IsEmpty(); }
|
||||
iterator end() { return begin() + GetCount(); }
|
||||
const_iterator end() const { return begin() + GetCount(); }
|
||||
iterator erase(iterator first, iterator last)
|
||||
{
|
||||
size_t idx = first - begin();
|
||||
RemoveAt(idx, last - first);
|
||||
return begin() + idx;
|
||||
}
|
||||
iterator erase(iterator it) { return erase(it, it + 1); }
|
||||
reference front() { return *begin(); }
|
||||
const_reference front() const { return *begin(); }
|
||||
void insert(iterator it, size_type n, const_reference v)
|
||||
{ Insert(v, it - begin(), n); }
|
||||
iterator insert(iterator it, const_reference v = value_type())
|
||||
{ size_t idx = it - begin(); Insert(v, idx); return begin() + idx; }
|
||||
void insert(iterator it, const_iterator first, const_iterator last);
|
||||
size_type max_size() const { return INT_MAX; }
|
||||
void pop_back() { RemoveAt(GetCount() - 1); }
|
||||
void push_back(const_reference v) { Add(v); }
|
||||
reverse_iterator rbegin() { return reverse_iterator(end() - 1); }
|
||||
const_reverse_iterator rbegin() const;
|
||||
reverse_iterator rend() { return reverse_iterator(begin() - 1); }
|
||||
const_reverse_iterator rend() const;
|
||||
void reserve(size_type n) /* base::reserve*/;
|
||||
void resize(size_type n, value_type v = value_type());
|
||||
size_type size() const { return GetCount(); }
|
||||
|
||||
protected:
|
||||
void Init(bool autoSort); // common part of all ctors
|
||||
void Copy(const wxArrayString& src); // copies the contents of another array
|
||||
|
||||
private:
|
||||
void Grow(size_t nIncrement = 0); // makes array bigger if needed
|
||||
void Free(); // free all the strings stored
|
||||
|
||||
void DoSort(); // common part of all Sort() variants
|
||||
|
||||
size_t m_nSize, // current size of the array
|
||||
m_nCount; // current number of elements
|
||||
|
||||
wxChar **m_pItems; // pointer to data
|
||||
|
||||
bool m_autoSort; // if true, keep the array always sorted
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString
|
||||
{
|
||||
public:
|
||||
wxSortedArrayString() : wxArrayString(true)
|
||||
{ }
|
||||
wxSortedArrayString(const wxArrayString& array) : wxArrayString(true)
|
||||
{ Copy(array); }
|
||||
};
|
||||
|
||||
#endif // !wxUSE_STL
|
||||
|
||||
// this class provides a temporary wxString* from a
|
||||
// wxArrayString
|
||||
class WXDLLIMPEXP_BASE wxCArrayString
|
||||
{
|
||||
public:
|
||||
wxCArrayString( const wxArrayString& array )
|
||||
: m_array( array ), m_strings( NULL )
|
||||
{ }
|
||||
~wxCArrayString() { delete[] m_strings; }
|
||||
|
||||
size_t GetCount() const { return m_array.GetCount(); }
|
||||
wxString* GetStrings()
|
||||
{
|
||||
if( m_strings ) return m_strings;
|
||||
size_t count = m_array.GetCount();
|
||||
m_strings = new wxString[count];
|
||||
for( size_t i = 0; i < count; ++i )
|
||||
m_strings[i] = m_array[i];
|
||||
return m_strings;
|
||||
}
|
||||
private:
|
||||
const wxArrayString& m_array;
|
||||
wxString* m_strings;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,200 +1,200 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/artprov.h
|
||||
// Purpose: wxArtProvider class
|
||||
// Author: Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 18/03/2002
|
||||
// RCS-ID: $Id: artprov.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ARTPROV_H_
|
||||
#define _WX_ARTPROV_H_
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxArtProvidersList;
|
||||
class WXDLLIMPEXP_FWD_CORE wxArtProviderCache;
|
||||
class wxArtProviderModule;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef wxString wxArtClient;
|
||||
typedef wxString wxArtID;
|
||||
|
||||
#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (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(id) _T(#id)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Art clients
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxART_TOOLBAR wxART_MAKE_CLIENT_ID(wxART_TOOLBAR)
|
||||
#define wxART_MENU wxART_MAKE_CLIENT_ID(wxART_MENU)
|
||||
#define wxART_FRAME_ICON wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON)
|
||||
|
||||
#define wxART_CMN_DIALOG wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG)
|
||||
#define wxART_HELP_BROWSER wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER)
|
||||
#define wxART_MESSAGE_BOX wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX)
|
||||
#define wxART_BUTTON wxART_MAKE_CLIENT_ID(wxART_BUTTON)
|
||||
|
||||
#define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Art IDs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxART_ADD_BOOKMARK wxART_MAKE_ART_ID(wxART_ADD_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_SETTINGS wxART_MAKE_ART_ID(wxART_HELP_SETTINGS)
|
||||
#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_PAGE wxART_MAKE_ART_ID(wxART_HELP_PAGE)
|
||||
#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_UP wxART_MAKE_ART_ID(wxART_GO_UP)
|
||||
#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_HOME wxART_MAKE_ART_ID(wxART_GO_HOME)
|
||||
#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_AS wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS)
|
||||
#define wxART_PRINT wxART_MAKE_ART_ID(wxART_PRINT)
|
||||
#define wxART_HELP wxART_MAKE_ART_ID(wxART_HELP)
|
||||
#define wxART_TIP wxART_MAKE_ART_ID(wxART_TIP)
|
||||
#define wxART_REPORT_VIEW wxART_MAKE_ART_ID(wxART_REPORT_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_HARDDISK wxART_MAKE_ART_ID(wxART_HARDDISK)
|
||||
#define wxART_FLOPPY wxART_MAKE_ART_ID(wxART_FLOPPY)
|
||||
#define wxART_CDROM wxART_MAKE_ART_ID(wxART_CDROM)
|
||||
#define wxART_REMOVABLE wxART_MAKE_ART_ID(wxART_REMOVABLE)
|
||||
#define wxART_FOLDER wxART_MAKE_ART_ID(wxART_FOLDER)
|
||||
#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_EXECUTABLE_FILE wxART_MAKE_ART_ID(wxART_EXECUTABLE_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_CROSS_MARK wxART_MAKE_ART_ID(wxART_CROSS_MARK)
|
||||
#define wxART_ERROR wxART_MAKE_ART_ID(wxART_ERROR)
|
||||
#define wxART_QUESTION wxART_MAKE_ART_ID(wxART_QUESTION)
|
||||
#define wxART_WARNING wxART_MAKE_ART_ID(wxART_WARNING)
|
||||
#define wxART_INFORMATION wxART_MAKE_ART_ID(wxART_INFORMATION)
|
||||
#define wxART_MISSING_IMAGE wxART_MAKE_ART_ID(wxART_MISSING_IMAGE)
|
||||
|
||||
#define wxART_COPY wxART_MAKE_ART_ID(wxART_COPY)
|
||||
#define wxART_CUT wxART_MAKE_ART_ID(wxART_CUT)
|
||||
#define wxART_PASTE wxART_MAKE_ART_ID(wxART_PASTE)
|
||||
#define wxART_DELETE wxART_MAKE_ART_ID(wxART_DELETE)
|
||||
#define wxART_NEW wxART_MAKE_ART_ID(wxART_NEW)
|
||||
|
||||
#define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO)
|
||||
#define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO)
|
||||
|
||||
#define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT)
|
||||
|
||||
#define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND)
|
||||
#define wxART_FIND_AND_REPLACE wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE)
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxArtProvider class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxArtProvider : public wxObject
|
||||
{
|
||||
public:
|
||||
// Dtor removes the provider from providers stack if it's still on it
|
||||
virtual ~wxArtProvider();
|
||||
|
||||
|
||||
// Add new provider to the top of providers stack (i.e. the provider will
|
||||
// be queried first of all).
|
||||
static void Push(wxArtProvider *provider);
|
||||
|
||||
// Add new provider to the bottom of providers stack (i.e. the provider
|
||||
// will be queried as the last one).
|
||||
static void Insert(wxArtProvider *provider);
|
||||
|
||||
// Remove latest added provider and delete it.
|
||||
static bool Pop();
|
||||
|
||||
// Remove provider from providers stack but don't delete it.
|
||||
static bool Remove(wxArtProvider *provider);
|
||||
|
||||
// Delete the given provider and remove it from the providers stack.
|
||||
static bool Delete(wxArtProvider *provider);
|
||||
|
||||
|
||||
// Query the providers for bitmap with given ID and return it. Return
|
||||
// wxNullBitmap if no provider provides it.
|
||||
static wxBitmap GetBitmap(const wxArtID& id,
|
||||
const wxArtClient& client = wxART_OTHER,
|
||||
const wxSize& size = wxDefaultSize);
|
||||
|
||||
// Query the providers for icon with given ID and return it. Return
|
||||
// wxNullIcon if no provider provides it.
|
||||
static wxIcon GetIcon(const wxArtID& id,
|
||||
const wxArtClient& client = wxART_OTHER,
|
||||
const wxSize& size = wxDefaultSize);
|
||||
|
||||
// Get the size hint of an icon from a specific wxArtClient, queries
|
||||
// the topmost provider if platform_dependent = false
|
||||
static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
// use the corresponding methods without redundant "Provider" suffix
|
||||
wxDEPRECATED( static void PushProvider(wxArtProvider *provider) );
|
||||
wxDEPRECATED( static void InsertProvider(wxArtProvider *provider) );
|
||||
wxDEPRECATED( static bool PopProvider() );
|
||||
|
||||
// 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
|
||||
// unlike RemoveProvider() which does
|
||||
wxDEPRECATED( static bool RemoveProvider(wxArtProvider *provider) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
protected:
|
||||
friend class wxArtProviderModule;
|
||||
// Initializes default provider
|
||||
static void InitStdProvider();
|
||||
// Initializes platform's native provider, if available (e.g. GTK2)
|
||||
static void InitNativeProvider();
|
||||
// Destroy caches & all providers
|
||||
static void CleanUpProviders();
|
||||
|
||||
// Get the default size of an icon for a specific client
|
||||
virtual wxSize DoGetSizeHint(const wxArtClient& client)
|
||||
{
|
||||
return GetSizeHint(client, true);
|
||||
}
|
||||
|
||||
// Derived classes must override this method to create requested
|
||||
// art resource. This method is called only once per instance's
|
||||
// lifetime for each requested wxArtID.
|
||||
virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id),
|
||||
const wxArtClient& WXUNUSED(client),
|
||||
const wxSize& WXUNUSED(size)) = 0;
|
||||
|
||||
private:
|
||||
static void CommonAddingProvider();
|
||||
|
||||
private:
|
||||
// list of providers:
|
||||
static wxArtProvidersList *sm_providers;
|
||||
// art resources cache (so that CreateXXX is not called that often):
|
||||
static wxArtProviderCache *sm_cache;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxArtProvider)
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_ARTPROV_H_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/artprov.h
|
||||
// Purpose: wxArtProvider class
|
||||
// Author: Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 18/03/2002
|
||||
// RCS-ID: $Id: artprov.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ARTPROV_H_
|
||||
#define _WX_ARTPROV_H_
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxArtProvidersList;
|
||||
class WXDLLIMPEXP_FWD_CORE wxArtProviderCache;
|
||||
class wxArtProviderModule;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef wxString wxArtClient;
|
||||
typedef wxString wxArtID;
|
||||
|
||||
#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (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(id) _T(#id)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Art clients
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxART_TOOLBAR wxART_MAKE_CLIENT_ID(wxART_TOOLBAR)
|
||||
#define wxART_MENU wxART_MAKE_CLIENT_ID(wxART_MENU)
|
||||
#define wxART_FRAME_ICON wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON)
|
||||
|
||||
#define wxART_CMN_DIALOG wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG)
|
||||
#define wxART_HELP_BROWSER wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER)
|
||||
#define wxART_MESSAGE_BOX wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX)
|
||||
#define wxART_BUTTON wxART_MAKE_CLIENT_ID(wxART_BUTTON)
|
||||
|
||||
#define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Art IDs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxART_ADD_BOOKMARK wxART_MAKE_ART_ID(wxART_ADD_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_SETTINGS wxART_MAKE_ART_ID(wxART_HELP_SETTINGS)
|
||||
#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_PAGE wxART_MAKE_ART_ID(wxART_HELP_PAGE)
|
||||
#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_UP wxART_MAKE_ART_ID(wxART_GO_UP)
|
||||
#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_HOME wxART_MAKE_ART_ID(wxART_GO_HOME)
|
||||
#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_AS wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS)
|
||||
#define wxART_PRINT wxART_MAKE_ART_ID(wxART_PRINT)
|
||||
#define wxART_HELP wxART_MAKE_ART_ID(wxART_HELP)
|
||||
#define wxART_TIP wxART_MAKE_ART_ID(wxART_TIP)
|
||||
#define wxART_REPORT_VIEW wxART_MAKE_ART_ID(wxART_REPORT_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_HARDDISK wxART_MAKE_ART_ID(wxART_HARDDISK)
|
||||
#define wxART_FLOPPY wxART_MAKE_ART_ID(wxART_FLOPPY)
|
||||
#define wxART_CDROM wxART_MAKE_ART_ID(wxART_CDROM)
|
||||
#define wxART_REMOVABLE wxART_MAKE_ART_ID(wxART_REMOVABLE)
|
||||
#define wxART_FOLDER wxART_MAKE_ART_ID(wxART_FOLDER)
|
||||
#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_EXECUTABLE_FILE wxART_MAKE_ART_ID(wxART_EXECUTABLE_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_CROSS_MARK wxART_MAKE_ART_ID(wxART_CROSS_MARK)
|
||||
#define wxART_ERROR wxART_MAKE_ART_ID(wxART_ERROR)
|
||||
#define wxART_QUESTION wxART_MAKE_ART_ID(wxART_QUESTION)
|
||||
#define wxART_WARNING wxART_MAKE_ART_ID(wxART_WARNING)
|
||||
#define wxART_INFORMATION wxART_MAKE_ART_ID(wxART_INFORMATION)
|
||||
#define wxART_MISSING_IMAGE wxART_MAKE_ART_ID(wxART_MISSING_IMAGE)
|
||||
|
||||
#define wxART_COPY wxART_MAKE_ART_ID(wxART_COPY)
|
||||
#define wxART_CUT wxART_MAKE_ART_ID(wxART_CUT)
|
||||
#define wxART_PASTE wxART_MAKE_ART_ID(wxART_PASTE)
|
||||
#define wxART_DELETE wxART_MAKE_ART_ID(wxART_DELETE)
|
||||
#define wxART_NEW wxART_MAKE_ART_ID(wxART_NEW)
|
||||
|
||||
#define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO)
|
||||
#define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO)
|
||||
|
||||
#define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT)
|
||||
|
||||
#define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND)
|
||||
#define wxART_FIND_AND_REPLACE wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE)
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxArtProvider class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxArtProvider : public wxObject
|
||||
{
|
||||
public:
|
||||
// Dtor removes the provider from providers stack if it's still on it
|
||||
virtual ~wxArtProvider();
|
||||
|
||||
|
||||
// Add new provider to the top of providers stack (i.e. the provider will
|
||||
// be queried first of all).
|
||||
static void Push(wxArtProvider *provider);
|
||||
|
||||
// Add new provider to the bottom of providers stack (i.e. the provider
|
||||
// will be queried as the last one).
|
||||
static void Insert(wxArtProvider *provider);
|
||||
|
||||
// Remove latest added provider and delete it.
|
||||
static bool Pop();
|
||||
|
||||
// Remove provider from providers stack but don't delete it.
|
||||
static bool Remove(wxArtProvider *provider);
|
||||
|
||||
// Delete the given provider and remove it from the providers stack.
|
||||
static bool Delete(wxArtProvider *provider);
|
||||
|
||||
|
||||
// Query the providers for bitmap with given ID and return it. Return
|
||||
// wxNullBitmap if no provider provides it.
|
||||
static wxBitmap GetBitmap(const wxArtID& id,
|
||||
const wxArtClient& client = wxART_OTHER,
|
||||
const wxSize& size = wxDefaultSize);
|
||||
|
||||
// Query the providers for icon with given ID and return it. Return
|
||||
// wxNullIcon if no provider provides it.
|
||||
static wxIcon GetIcon(const wxArtID& id,
|
||||
const wxArtClient& client = wxART_OTHER,
|
||||
const wxSize& size = wxDefaultSize);
|
||||
|
||||
// Get the size hint of an icon from a specific wxArtClient, queries
|
||||
// the topmost provider if platform_dependent = false
|
||||
static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
// use the corresponding methods without redundant "Provider" suffix
|
||||
wxDEPRECATED( static void PushProvider(wxArtProvider *provider) );
|
||||
wxDEPRECATED( static void InsertProvider(wxArtProvider *provider) );
|
||||
wxDEPRECATED( static bool PopProvider() );
|
||||
|
||||
// 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
|
||||
// unlike RemoveProvider() which does
|
||||
wxDEPRECATED( static bool RemoveProvider(wxArtProvider *provider) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
protected:
|
||||
friend class wxArtProviderModule;
|
||||
// Initializes default provider
|
||||
static void InitStdProvider();
|
||||
// Initializes platform's native provider, if available (e.g. GTK2)
|
||||
static void InitNativeProvider();
|
||||
// Destroy caches & all providers
|
||||
static void CleanUpProviders();
|
||||
|
||||
// Get the default size of an icon for a specific client
|
||||
virtual wxSize DoGetSizeHint(const wxArtClient& client)
|
||||
{
|
||||
return GetSizeHint(client, true);
|
||||
}
|
||||
|
||||
// Derived classes must override this method to create requested
|
||||
// art resource. This method is called only once per instance's
|
||||
// lifetime for each requested wxArtID.
|
||||
virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id),
|
||||
const wxArtClient& WXUNUSED(client),
|
||||
const wxSize& WXUNUSED(size)) = 0;
|
||||
|
||||
private:
|
||||
static void CommonAddingProvider();
|
||||
|
||||
private:
|
||||
// list of providers:
|
||||
static wxArtProvidersList *sm_providers;
|
||||
// art resources cache (so that CreateXXX is not called that often):
|
||||
static wxArtProviderCache *sm_cache;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxArtProvider)
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_ARTPROV_H_
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/aui.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID: $Id: aui.h 40232 2006-07-22 13:14:07Z BIW $
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_AUI_H_
|
||||
#define _WX_AUI_H_
|
||||
|
||||
#include "wx/aui/framemanager.h"
|
||||
#include "wx/aui/dockart.h"
|
||||
#include "wx/aui/floatpane.h"
|
||||
#include "wx/aui/auibook.h"
|
||||
#include "wx/aui/tabmdi.h"
|
||||
|
||||
#endif // _WX_AUI_H_
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/aui.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID: $Id: aui.h 40232 2006-07-22 13:14:07Z BIW $
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_AUI_H_
|
||||
#define _WX_AUI_H_
|
||||
|
||||
#include "wx/aui/framemanager.h"
|
||||
#include "wx/aui/dockart.h"
|
||||
#include "wx/aui/floatpane.h"
|
||||
#include "wx/aui/auibook.h"
|
||||
#include "wx/aui/tabmdi.h"
|
||||
|
||||
#endif // _WX_AUI_H_
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,173 +1,173 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/dockart.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID: $Id: dockart.h 43154 2006-11-07 10:29:02Z BIW $
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DOCKART_H_
|
||||
#define _WX_DOCKART_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_AUI
|
||||
|
||||
#include "wx/pen.h"
|
||||
#include "wx/brush.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/colour.h"
|
||||
|
||||
// dock art provider code - a dock provider provides all drawing
|
||||
// functionality to the wxAui dock manager. This allows the dock
|
||||
// manager to have plugable look-and-feels
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiDockArt
|
||||
{
|
||||
public:
|
||||
|
||||
wxAuiDockArt() { }
|
||||
virtual ~wxAuiDockArt() { }
|
||||
|
||||
virtual int GetMetric(int id) = 0;
|
||||
virtual void SetMetric(int id, int new_val) = 0;
|
||||
virtual void SetFont(int id, const wxFont& font) = 0;
|
||||
virtual wxFont GetFont(int id) = 0;
|
||||
virtual wxColour GetColour(int id) = 0;
|
||||
virtual void SetColour(int id, const wxColor& colour) = 0;
|
||||
wxColour GetColor(int id) { return GetColour(id); }
|
||||
void SetColor(int id, const wxColour& color) { SetColour(id, color); }
|
||||
|
||||
virtual void DrawSash(wxDC& dc,
|
||||
wxWindow* window,
|
||||
int orientation,
|
||||
const wxRect& rect) = 0;
|
||||
|
||||
virtual void DrawBackground(wxDC& dc,
|
||||
wxWindow* window,
|
||||
int orientation,
|
||||
const wxRect& rect) = 0;
|
||||
|
||||
virtual void DrawCaption(wxDC& dc,
|
||||
wxWindow* window,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
|
||||
virtual void DrawGripper(wxDC& dc,
|
||||
wxWindow* window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
|
||||
virtual void DrawBorder(wxDC& dc,
|
||||
wxWindow* window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
|
||||
virtual void DrawPaneButton(wxDC& dc,
|
||||
wxWindow* window,
|
||||
int button,
|
||||
int button_state,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
};
|
||||
|
||||
|
||||
// this is the default art provider for wxAuiManager. Dock art
|
||||
// can be customized by creating a class derived from this one,
|
||||
// or replacing this class entirely
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
|
||||
{
|
||||
public:
|
||||
|
||||
wxAuiDefaultDockArt();
|
||||
|
||||
int GetMetric(int metric_id);
|
||||
void SetMetric(int metric_id, int new_val);
|
||||
wxColour GetColour(int id);
|
||||
void SetColour(int id, const wxColor& colour);
|
||||
void SetFont(int id, const wxFont& font);
|
||||
wxFont GetFont(int id);
|
||||
|
||||
void DrawSash(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int orientation,
|
||||
const wxRect& rect);
|
||||
|
||||
void DrawBackground(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int orientation,
|
||||
const wxRect& rect);
|
||||
|
||||
void DrawCaption(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawGripper(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawBorder(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawPaneButton(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int button,
|
||||
int button_state,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
protected:
|
||||
|
||||
void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
|
||||
|
||||
protected:
|
||||
|
||||
wxPen m_border_pen;
|
||||
wxBrush m_sash_brush;
|
||||
wxBrush m_background_brush;
|
||||
wxBrush m_gripper_brush;
|
||||
wxFont m_caption_font;
|
||||
wxBitmap m_inactive_close_bitmap;
|
||||
wxBitmap m_inactive_pin_bitmap;
|
||||
wxBitmap m_inactive_maximize_bitmap;
|
||||
wxBitmap m_inactive_restore_bitmap;
|
||||
wxBitmap m_active_close_bitmap;
|
||||
wxBitmap m_active_pin_bitmap;
|
||||
wxBitmap m_active_maximize_bitmap;
|
||||
wxBitmap m_active_restore_bitmap;
|
||||
wxPen m_gripper_pen1;
|
||||
wxPen m_gripper_pen2;
|
||||
wxPen m_gripper_pen3;
|
||||
wxColour m_base_colour;
|
||||
wxColour m_active_caption_colour;
|
||||
wxColour m_active_caption_gradient_colour;
|
||||
wxColour m_active_caption_text_colour;
|
||||
wxColour m_inactive_caption_colour;
|
||||
wxColour m_inactive_caption_gradient_colour;
|
||||
wxColour m_inactive_caption_text_colour;
|
||||
int m_border_size;
|
||||
int m_caption_size;
|
||||
int m_sash_size;
|
||||
int m_button_size;
|
||||
int m_gripper_size;
|
||||
int m_gradient_type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // wxUSE_AUI
|
||||
#endif //_WX_DOCKART_H_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/dockart.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID: $Id: dockart.h 43154 2006-11-07 10:29:02Z BIW $
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DOCKART_H_
|
||||
#define _WX_DOCKART_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_AUI
|
||||
|
||||
#include "wx/pen.h"
|
||||
#include "wx/brush.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/colour.h"
|
||||
|
||||
// dock art provider code - a dock provider provides all drawing
|
||||
// functionality to the wxAui dock manager. This allows the dock
|
||||
// manager to have plugable look-and-feels
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiDockArt
|
||||
{
|
||||
public:
|
||||
|
||||
wxAuiDockArt() { }
|
||||
virtual ~wxAuiDockArt() { }
|
||||
|
||||
virtual int GetMetric(int id) = 0;
|
||||
virtual void SetMetric(int id, int new_val) = 0;
|
||||
virtual void SetFont(int id, const wxFont& font) = 0;
|
||||
virtual wxFont GetFont(int id) = 0;
|
||||
virtual wxColour GetColour(int id) = 0;
|
||||
virtual void SetColour(int id, const wxColor& colour) = 0;
|
||||
wxColour GetColor(int id) { return GetColour(id); }
|
||||
void SetColor(int id, const wxColour& color) { SetColour(id, color); }
|
||||
|
||||
virtual void DrawSash(wxDC& dc,
|
||||
wxWindow* window,
|
||||
int orientation,
|
||||
const wxRect& rect) = 0;
|
||||
|
||||
virtual void DrawBackground(wxDC& dc,
|
||||
wxWindow* window,
|
||||
int orientation,
|
||||
const wxRect& rect) = 0;
|
||||
|
||||
virtual void DrawCaption(wxDC& dc,
|
||||
wxWindow* window,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
|
||||
virtual void DrawGripper(wxDC& dc,
|
||||
wxWindow* window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
|
||||
virtual void DrawBorder(wxDC& dc,
|
||||
wxWindow* window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
|
||||
virtual void DrawPaneButton(wxDC& dc,
|
||||
wxWindow* window,
|
||||
int button,
|
||||
int button_state,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane) = 0;
|
||||
};
|
||||
|
||||
|
||||
// this is the default art provider for wxAuiManager. Dock art
|
||||
// can be customized by creating a class derived from this one,
|
||||
// or replacing this class entirely
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
|
||||
{
|
||||
public:
|
||||
|
||||
wxAuiDefaultDockArt();
|
||||
|
||||
int GetMetric(int metric_id);
|
||||
void SetMetric(int metric_id, int new_val);
|
||||
wxColour GetColour(int id);
|
||||
void SetColour(int id, const wxColor& colour);
|
||||
void SetFont(int id, const wxFont& font);
|
||||
wxFont GetFont(int id);
|
||||
|
||||
void DrawSash(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int orientation,
|
||||
const wxRect& rect);
|
||||
|
||||
void DrawBackground(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int orientation,
|
||||
const wxRect& rect);
|
||||
|
||||
void DrawCaption(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawGripper(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawBorder(wxDC& dc,
|
||||
wxWindow *window,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
void DrawPaneButton(wxDC& dc,
|
||||
wxWindow *window,
|
||||
int button,
|
||||
int button_state,
|
||||
const wxRect& rect,
|
||||
wxAuiPaneInfo& pane);
|
||||
|
||||
protected:
|
||||
|
||||
void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
|
||||
|
||||
protected:
|
||||
|
||||
wxPen m_border_pen;
|
||||
wxBrush m_sash_brush;
|
||||
wxBrush m_background_brush;
|
||||
wxBrush m_gripper_brush;
|
||||
wxFont m_caption_font;
|
||||
wxBitmap m_inactive_close_bitmap;
|
||||
wxBitmap m_inactive_pin_bitmap;
|
||||
wxBitmap m_inactive_maximize_bitmap;
|
||||
wxBitmap m_inactive_restore_bitmap;
|
||||
wxBitmap m_active_close_bitmap;
|
||||
wxBitmap m_active_pin_bitmap;
|
||||
wxBitmap m_active_maximize_bitmap;
|
||||
wxBitmap m_active_restore_bitmap;
|
||||
wxPen m_gripper_pen1;
|
||||
wxPen m_gripper_pen2;
|
||||
wxPen m_gripper_pen3;
|
||||
wxColour m_base_colour;
|
||||
wxColour m_active_caption_colour;
|
||||
wxColour m_active_caption_gradient_colour;
|
||||
wxColour m_active_caption_text_colour;
|
||||
wxColour m_inactive_caption_colour;
|
||||
wxColour m_inactive_caption_gradient_colour;
|
||||
wxColour m_inactive_caption_text_colour;
|
||||
int m_border_size;
|
||||
int m_caption_size;
|
||||
int m_sash_size;
|
||||
int m_button_size;
|
||||
int m_gripper_size;
|
||||
int m_gradient_type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // wxUSE_AUI
|
||||
#endif //_WX_DOCKART_H_
|
||||
|
|
|
@ -1,81 +1,81 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/floatpane.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID: $Id: floatpane.h 43467 2006-11-17 13:07:01Z BIW $
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FLOATPANE_H_
|
||||
#define _WX_FLOATPANE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_AUI
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
#if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
|
||||
#include "wx/minifram.h"
|
||||
#define wxAuiFloatingFrameBaseClass wxMiniFrame
|
||||
#else
|
||||
#define wxAuiFloatingFrameBaseClass wxFrame
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
|
||||
{
|
||||
public:
|
||||
wxAuiFloatingFrame(wxWindow* parent,
|
||||
wxAuiManager* owner_mgr,
|
||||
const wxAuiPaneInfo& pane,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
|
||||
wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
|
||||
wxCLIP_CHILDREN
|
||||
);
|
||||
virtual ~wxAuiFloatingFrame();
|
||||
void SetPaneWindow(const wxAuiPaneInfo& pane);
|
||||
wxAuiManager* GetOwnerManager() const;
|
||||
|
||||
protected:
|
||||
virtual void OnMoveStart();
|
||||
virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
|
||||
virtual void OnMoveFinished();
|
||||
|
||||
private:
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnMoveEvent(wxMoveEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
static bool isMouseDown();
|
||||
|
||||
private:
|
||||
wxWindow* m_pane_window; // pane window being managed
|
||||
bool m_solid_drag; // true if system uses solid window drag
|
||||
bool m_moving;
|
||||
wxRect m_last_rect;
|
||||
wxRect m_last2_rect;
|
||||
wxRect m_last3_rect;
|
||||
wxSize m_last_size;
|
||||
wxDirection m_lastDirection;
|
||||
|
||||
wxAuiManager* m_owner_mgr;
|
||||
wxAuiManager m_mgr;
|
||||
|
||||
#ifndef SWIG
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_CLASS(wxAuiFloatingFrame)
|
||||
#endif // SWIG
|
||||
};
|
||||
|
||||
#endif // wxUSE_AUI
|
||||
#endif //_WX_FLOATPANE_H_
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/floatpane.h
|
||||
// Purpose: wxaui: wx advanced user interface - docking window manager
|
||||
// Author: Benjamin I. Williams
|
||||
// Modified by:
|
||||
// Created: 2005-05-17
|
||||
// RCS-ID: $Id: floatpane.h 43467 2006-11-17 13:07:01Z BIW $
|
||||
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
|
||||
// Licence: wxWindows Library Licence, Version 3.1
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FLOATPANE_H_
|
||||
#define _WX_FLOATPANE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_AUI
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
#if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
|
||||
#include "wx/minifram.h"
|
||||
#define wxAuiFloatingFrameBaseClass wxMiniFrame
|
||||
#else
|
||||
#define wxAuiFloatingFrameBaseClass wxFrame
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
|
||||
{
|
||||
public:
|
||||
wxAuiFloatingFrame(wxWindow* parent,
|
||||
wxAuiManager* owner_mgr,
|
||||
const wxAuiPaneInfo& pane,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
|
||||
wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
|
||||
wxCLIP_CHILDREN
|
||||
);
|
||||
virtual ~wxAuiFloatingFrame();
|
||||
void SetPaneWindow(const wxAuiPaneInfo& pane);
|
||||
wxAuiManager* GetOwnerManager() const;
|
||||
|
||||
protected:
|
||||
virtual void OnMoveStart();
|
||||
virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
|
||||
virtual void OnMoveFinished();
|
||||
|
||||
private:
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnMoveEvent(wxMoveEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
static bool isMouseDown();
|
||||
|
||||
private:
|
||||
wxWindow* m_pane_window; // pane window being managed
|
||||
bool m_solid_drag; // true if system uses solid window drag
|
||||
bool m_moving;
|
||||
wxRect m_last_rect;
|
||||
wxRect m_last2_rect;
|
||||
wxRect m_last3_rect;
|
||||
wxSize m_last_size;
|
||||
wxDirection m_lastDirection;
|
||||
|
||||
wxAuiManager* m_owner_mgr;
|
||||
wxAuiManager m_mgr;
|
||||
|
||||
#ifndef SWIG
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_CLASS(wxAuiFloatingFrame)
|
||||
#endif // SWIG
|
||||
};
|
||||
|
||||
#endif // wxUSE_AUI
|
||||
#endif //_WX_FLOATPANE_H_
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,269 +1,269 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/tabmdi.h
|
||||
// Purpose: Generic MDI (Multiple Document Interface) classes
|
||||
// Author: Hans Van Leemputten
|
||||
// Modified by: Benjamin I. Williams / Kirix Corporation
|
||||
// Created: 29/07/2002
|
||||
// RCS-ID: $Id: tabmdi.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) Hans Van Leemputten
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_AUITABMDI_H_
|
||||
#define _WX_AUITABMDI_H_
|
||||
|
||||
#if wxUSE_AUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/frame.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/notebook.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/aui/auibook.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_AUI wxAuiMDIParentFrame;
|
||||
class WXDLLIMPEXP_FWD_AUI wxAuiMDIClientWindow;
|
||||
class WXDLLIMPEXP_FWD_AUI wxAuiMDIChildFrame;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAuiMDIParentFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
wxAuiMDIParentFrame();
|
||||
wxAuiMDIParentFrame(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
~wxAuiMDIParentFrame();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr );
|
||||
|
||||
void SetArtProvider(wxAuiTabArt* provider);
|
||||
wxAuiTabArt* GetArtProvider();
|
||||
wxAuiNotebook* GetNotebook() const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenu* GetWindowMenu() const { return m_pWindowMenu; }
|
||||
void SetWindowMenu(wxMenu* pMenu);
|
||||
|
||||
virtual void SetMenuBar(wxMenuBar *pMenuBar);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
void SetChildMenuBar(wxAuiMDIChildFrame *pChild);
|
||||
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
wxAuiMDIChildFrame *GetActiveChild() const;
|
||||
void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
|
||||
|
||||
wxAuiMDIClientWindow *GetClientWindow() const;
|
||||
virtual wxAuiMDIClientWindow *OnCreateClient();
|
||||
|
||||
virtual void Cascade() { /* Has no effect */ }
|
||||
virtual void Tile(wxOrientation orient = wxHORIZONTAL);
|
||||
virtual void ArrangeIcons() { /* Has no effect */ }
|
||||
virtual void ActivateNext();
|
||||
virtual void ActivatePrevious();
|
||||
|
||||
protected:
|
||||
wxAuiMDIClientWindow* m_pClientWindow;
|
||||
wxAuiMDIChildFrame* m_pActiveChild;
|
||||
wxEvent* m_pLastEvt;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenu *m_pWindowMenu;
|
||||
wxMenuBar *m_pMyMenuBar;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
#if wxUSE_MENUS
|
||||
void RemoveWindowMenu(wxMenuBar *pMenuBar);
|
||||
void AddWindowMenu(wxMenuBar *pMenuBar);
|
||||
|
||||
void DoHandleMenu(wxCommandEvent &event);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAuiMDIChildFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel
|
||||
{
|
||||
public:
|
||||
wxAuiMDIChildFrame();
|
||||
wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxAuiMDIChildFrame();
|
||||
bool Create(wxAuiMDIParentFrame *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar() const;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
virtual void SetTitle(const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
|
||||
virtual void SetIcons(const wxIconBundle& icons);
|
||||
virtual const wxIconBundle& GetIcons() const;
|
||||
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual const wxIcon& GetIcon() const;
|
||||
|
||||
virtual void Activate();
|
||||
virtual bool Destroy();
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// no status bars
|
||||
virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1,
|
||||
long WXUNUSED(style) = 1,
|
||||
wxWindowID WXUNUSED(winid) = 1,
|
||||
const wxString& WXUNUSED(name) = wxEmptyString)
|
||||
{ return (wxStatusBar*)NULL; }
|
||||
|
||||
virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; }
|
||||
virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {}
|
||||
virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
|
||||
#endif
|
||||
|
||||
// no size hints
|
||||
virtual void DoSetSizeHints(int WXUNUSED(minW),
|
||||
int WXUNUSED(minH),
|
||||
int WXUNUSED(maxW) = wxDefaultCoord,
|
||||
int WXUNUSED(maxH) = wxDefaultCoord,
|
||||
int WXUNUSED(incW) = wxDefaultCoord,
|
||||
int WXUNUSED(incH) = wxDefaultCoord) {}
|
||||
#if wxUSE_TOOLBAR
|
||||
// no toolbar bars
|
||||
virtual wxToolBar* CreateToolBar(long WXUNUSED(style),
|
||||
wxWindowID WXUNUSED(winid),
|
||||
const wxString& WXUNUSED(name))
|
||||
{ return (wxToolBar*)NULL; }
|
||||
virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
|
||||
#endif
|
||||
|
||||
|
||||
// no maximize etc
|
||||
virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ }
|
||||
virtual void Restore() { /* Has no effect */ }
|
||||
virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ }
|
||||
virtual bool IsMaximized() const { return true; }
|
||||
virtual bool IsIconized() const { return false; }
|
||||
virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; }
|
||||
virtual bool IsFullScreen() const { return false; }
|
||||
|
||||
virtual bool IsTopLevel() const { return false; }
|
||||
|
||||
void OnMenuHighlight(wxMenuEvent& evt);
|
||||
void OnActivate(wxActivateEvent& evt);
|
||||
void OnCloseWindow(wxCloseEvent& evt);
|
||||
|
||||
void SetMDIParentFrame(wxAuiMDIParentFrame* parent);
|
||||
wxAuiMDIParentFrame* GetMDIParentFrame() const;
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
virtual bool Show(bool show = true);
|
||||
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);
|
||||
|
||||
public:
|
||||
// This function needs to be called when a size change is confirmed,
|
||||
// we needed this function to prevent anybody from the outside
|
||||
// changing the panel... it messes the UI layout when we would allow it.
|
||||
void ApplyMDIChildFrameRect();
|
||||
void DoShow(bool show);
|
||||
|
||||
protected:
|
||||
wxAuiMDIParentFrame* m_pMDIParentFrame;
|
||||
wxRect m_mdi_newrect;
|
||||
wxRect m_mdi_currect;
|
||||
wxString m_title;
|
||||
wxIcon m_icon;
|
||||
wxIconBundle m_icon_bundle;
|
||||
bool m_activate_on_create;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenuBar* m_pMenuBar;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame)
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
friend class wxAuiMDIClientWindow;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAuiMDIClientWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook
|
||||
{
|
||||
public:
|
||||
wxAuiMDIClientWindow();
|
||||
wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
|
||||
~wxAuiMDIClientWindow();
|
||||
|
||||
virtual bool CreateClient(wxAuiMDIParentFrame *parent,
|
||||
long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
virtual int SetSelection(size_t page);
|
||||
|
||||
protected:
|
||||
|
||||
void PageChanged(int old_selection, int new_selection);
|
||||
void OnPageClose(wxAuiNotebookEvent& evt);
|
||||
void OnPageChanged(wxAuiNotebookEvent& evt);
|
||||
void OnSize(wxSizeEvent& evt);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
#endif // wxUSE_AUI
|
||||
|
||||
#endif // _WX_AUITABMDI_H_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/tabmdi.h
|
||||
// Purpose: Generic MDI (Multiple Document Interface) classes
|
||||
// Author: Hans Van Leemputten
|
||||
// Modified by: Benjamin I. Williams / Kirix Corporation
|
||||
// Created: 29/07/2002
|
||||
// RCS-ID: $Id: tabmdi.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) Hans Van Leemputten
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_AUITABMDI_H_
|
||||
#define _WX_AUITABMDI_H_
|
||||
|
||||
#if wxUSE_AUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/frame.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/notebook.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/aui/auibook.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_AUI wxAuiMDIParentFrame;
|
||||
class WXDLLIMPEXP_FWD_AUI wxAuiMDIClientWindow;
|
||||
class WXDLLIMPEXP_FWD_AUI wxAuiMDIChildFrame;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAuiMDIParentFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
wxAuiMDIParentFrame();
|
||||
wxAuiMDIParentFrame(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
~wxAuiMDIParentFrame();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr );
|
||||
|
||||
void SetArtProvider(wxAuiTabArt* provider);
|
||||
wxAuiTabArt* GetArtProvider();
|
||||
wxAuiNotebook* GetNotebook() const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenu* GetWindowMenu() const { return m_pWindowMenu; }
|
||||
void SetWindowMenu(wxMenu* pMenu);
|
||||
|
||||
virtual void SetMenuBar(wxMenuBar *pMenuBar);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
void SetChildMenuBar(wxAuiMDIChildFrame *pChild);
|
||||
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
wxAuiMDIChildFrame *GetActiveChild() const;
|
||||
void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
|
||||
|
||||
wxAuiMDIClientWindow *GetClientWindow() const;
|
||||
virtual wxAuiMDIClientWindow *OnCreateClient();
|
||||
|
||||
virtual void Cascade() { /* Has no effect */ }
|
||||
virtual void Tile(wxOrientation orient = wxHORIZONTAL);
|
||||
virtual void ArrangeIcons() { /* Has no effect */ }
|
||||
virtual void ActivateNext();
|
||||
virtual void ActivatePrevious();
|
||||
|
||||
protected:
|
||||
wxAuiMDIClientWindow* m_pClientWindow;
|
||||
wxAuiMDIChildFrame* m_pActiveChild;
|
||||
wxEvent* m_pLastEvt;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenu *m_pWindowMenu;
|
||||
wxMenuBar *m_pMyMenuBar;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
#if wxUSE_MENUS
|
||||
void RemoveWindowMenu(wxMenuBar *pMenuBar);
|
||||
void AddWindowMenu(wxMenuBar *pMenuBar);
|
||||
|
||||
void DoHandleMenu(wxCommandEvent &event);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAuiMDIChildFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel
|
||||
{
|
||||
public:
|
||||
wxAuiMDIChildFrame();
|
||||
wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxAuiMDIChildFrame();
|
||||
bool Create(wxAuiMDIParentFrame *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar(wxMenuBar *menu_bar);
|
||||
virtual wxMenuBar *GetMenuBar() const;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
virtual void SetTitle(const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
|
||||
virtual void SetIcons(const wxIconBundle& icons);
|
||||
virtual const wxIconBundle& GetIcons() const;
|
||||
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual const wxIcon& GetIcon() const;
|
||||
|
||||
virtual void Activate();
|
||||
virtual bool Destroy();
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// no status bars
|
||||
virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1,
|
||||
long WXUNUSED(style) = 1,
|
||||
wxWindowID WXUNUSED(winid) = 1,
|
||||
const wxString& WXUNUSED(name) = wxEmptyString)
|
||||
{ return (wxStatusBar*)NULL; }
|
||||
|
||||
virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; }
|
||||
virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {}
|
||||
virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
|
||||
#endif
|
||||
|
||||
// no size hints
|
||||
virtual void DoSetSizeHints(int WXUNUSED(minW),
|
||||
int WXUNUSED(minH),
|
||||
int WXUNUSED(maxW) = wxDefaultCoord,
|
||||
int WXUNUSED(maxH) = wxDefaultCoord,
|
||||
int WXUNUSED(incW) = wxDefaultCoord,
|
||||
int WXUNUSED(incH) = wxDefaultCoord) {}
|
||||
#if wxUSE_TOOLBAR
|
||||
// no toolbar bars
|
||||
virtual wxToolBar* CreateToolBar(long WXUNUSED(style),
|
||||
wxWindowID WXUNUSED(winid),
|
||||
const wxString& WXUNUSED(name))
|
||||
{ return (wxToolBar*)NULL; }
|
||||
virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
|
||||
#endif
|
||||
|
||||
|
||||
// no maximize etc
|
||||
virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ }
|
||||
virtual void Restore() { /* Has no effect */ }
|
||||
virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ }
|
||||
virtual bool IsMaximized() const { return true; }
|
||||
virtual bool IsIconized() const { return false; }
|
||||
virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; }
|
||||
virtual bool IsFullScreen() const { return false; }
|
||||
|
||||
virtual bool IsTopLevel() const { return false; }
|
||||
|
||||
void OnMenuHighlight(wxMenuEvent& evt);
|
||||
void OnActivate(wxActivateEvent& evt);
|
||||
void OnCloseWindow(wxCloseEvent& evt);
|
||||
|
||||
void SetMDIParentFrame(wxAuiMDIParentFrame* parent);
|
||||
wxAuiMDIParentFrame* GetMDIParentFrame() const;
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
virtual bool Show(bool show = true);
|
||||
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);
|
||||
|
||||
public:
|
||||
// This function needs to be called when a size change is confirmed,
|
||||
// we needed this function to prevent anybody from the outside
|
||||
// changing the panel... it messes the UI layout when we would allow it.
|
||||
void ApplyMDIChildFrameRect();
|
||||
void DoShow(bool show);
|
||||
|
||||
protected:
|
||||
wxAuiMDIParentFrame* m_pMDIParentFrame;
|
||||
wxRect m_mdi_newrect;
|
||||
wxRect m_mdi_currect;
|
||||
wxString m_title;
|
||||
wxIcon m_icon;
|
||||
wxIconBundle m_icon_bundle;
|
||||
bool m_activate_on_create;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenuBar* m_pMenuBar;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame)
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
friend class wxAuiMDIClientWindow;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAuiMDIClientWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook
|
||||
{
|
||||
public:
|
||||
wxAuiMDIClientWindow();
|
||||
wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
|
||||
~wxAuiMDIClientWindow();
|
||||
|
||||
virtual bool CreateClient(wxAuiMDIParentFrame *parent,
|
||||
long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
virtual int SetSelection(size_t page);
|
||||
|
||||
protected:
|
||||
|
||||
void PageChanged(int old_selection, int new_selection);
|
||||
void OnPageClose(wxAuiNotebookEvent& evt);
|
||||
void OnPageChanged(wxAuiNotebookEvent& evt);
|
||||
void OnSize(wxSizeEvent& evt);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
#endif // wxUSE_AUI
|
||||
|
||||
#endif // _WX_AUITABMDI_H_
|
||||
|
|
|
@ -1,65 +1,65 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/beforestd.h
|
||||
// Purpose: #include before STL headers
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07/07/03
|
||||
// RCS-ID: $Id: beforestd.h 42906 2006-11-01 14:16:42Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
Unfortunately, when compiling at maximum warning level, the standard
|
||||
headers themselves may generate warnings -- and really lots of them. So
|
||||
before including them, this header should be included to temporarily
|
||||
suppress the warnings and after this the header afterstd.h should be
|
||||
included to enable them back again.
|
||||
|
||||
Note that there are intentionally no inclusion guards in this file, because
|
||||
it can be included several times.
|
||||
*/
|
||||
|
||||
// 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
|
||||
#if defined(__VISUALC__) && __VISUALC__ <= 1201
|
||||
// MSVC 5 does not have this
|
||||
#if __VISUALC__ > 1100
|
||||
// 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)
|
||||
// below for VC7.1!
|
||||
|
||||
// unreachable code
|
||||
#pragma warning(disable:4702)
|
||||
|
||||
#pragma warning(push, 1)
|
||||
#else // VC 5
|
||||
// 'expression' : signed/unsigned mismatch
|
||||
#pragma warning(disable:4018)
|
||||
|
||||
// 'identifier' : unreferenced formal parameter
|
||||
#pragma warning(disable:4100)
|
||||
|
||||
// 'conversion' : conversion from 'type1' to 'type2',
|
||||
// possible loss of data
|
||||
#pragma warning(disable:4244)
|
||||
|
||||
// C++ language change: to explicitly specialize class template
|
||||
// 'identifier' use the following syntax
|
||||
#pragma warning(disable:4663)
|
||||
#endif
|
||||
|
||||
// these warning have to be disabled and not just temporarily disabled
|
||||
// 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
|
||||
|
||||
// 'foo': unreferenced inline function has been removed
|
||||
#pragma warning(disable:4514)
|
||||
|
||||
// 'function' : function not inlined
|
||||
#pragma warning(disable:4710)
|
||||
|
||||
// 'id': identifier was truncated to 'num' characters in the debug info
|
||||
#pragma warning(disable:4786)
|
||||
#endif // VC++ < 7
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/beforestd.h
|
||||
// Purpose: #include before STL headers
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07/07/03
|
||||
// RCS-ID: $Id: beforestd.h 42906 2006-11-01 14:16:42Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
Unfortunately, when compiling at maximum warning level, the standard
|
||||
headers themselves may generate warnings -- and really lots of them. So
|
||||
before including them, this header should be included to temporarily
|
||||
suppress the warnings and after this the header afterstd.h should be
|
||||
included to enable them back again.
|
||||
|
||||
Note that there are intentionally no inclusion guards in this file, because
|
||||
it can be included several times.
|
||||
*/
|
||||
|
||||
// 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
|
||||
#if defined(__VISUALC__) && __VISUALC__ <= 1201
|
||||
// MSVC 5 does not have this
|
||||
#if __VISUALC__ > 1100
|
||||
// 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)
|
||||
// below for VC7.1!
|
||||
|
||||
// unreachable code
|
||||
#pragma warning(disable:4702)
|
||||
|
||||
#pragma warning(push, 1)
|
||||
#else // VC 5
|
||||
// 'expression' : signed/unsigned mismatch
|
||||
#pragma warning(disable:4018)
|
||||
|
||||
// 'identifier' : unreferenced formal parameter
|
||||
#pragma warning(disable:4100)
|
||||
|
||||
// 'conversion' : conversion from 'type1' to 'type2',
|
||||
// possible loss of data
|
||||
#pragma warning(disable:4244)
|
||||
|
||||
// C++ language change: to explicitly specialize class template
|
||||
// 'identifier' use the following syntax
|
||||
#pragma warning(disable:4663)
|
||||
#endif
|
||||
|
||||
// these warning have to be disabled and not just temporarily disabled
|
||||
// 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
|
||||
|
||||
// 'foo': unreferenced inline function has been removed
|
||||
#pragma warning(disable:4514)
|
||||
|
||||
// 'function' : function not inlined
|
||||
#pragma warning(disable:4710)
|
||||
|
||||
// 'id': identifier was truncated to 'num' characters in the debug info
|
||||
#pragma warning(disable:4786)
|
||||
#endif // VC++ < 7
|
||||
|
||||
|
|
|
@ -1,241 +1,241 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bitmap.h
|
||||
// Purpose: wxBitmap class interface
|
||||
// Author: Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 22.04.01
|
||||
// RCS-ID: $Id: bitmap.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BITMAP_H_BASE_
|
||||
#define _WX_BITMAP_H_BASE_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdicmn.h" // for wxBitmapType
|
||||
#include "wx/colour.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
|
||||
class WXDLLIMPEXP_FWD_CORE wxIcon;
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMask;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPalette;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxVariant support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_VARIANT
|
||||
#include "wx/variant.h"
|
||||
DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLEXPORT)
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMask represents the transparent area of the bitmap
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMaskBase : public wxObject
|
||||
{
|
||||
public:
|
||||
// create the mask from bitmap pixels of the given colour
|
||||
bool Create(const wxBitmap& bitmap, const wxColour& colour);
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
// create the mask from bitmap pixels with the given palette index
|
||||
bool Create(const wxBitmap& bitmap, int paletteIndex);
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
// create the mask from the given mono bitmap
|
||||
bool Create(const wxBitmap& bitmap);
|
||||
|
||||
protected:
|
||||
// this function is called from Create() to free the existing mask data
|
||||
virtual void FreeData() = 0;
|
||||
|
||||
// these functions must be overridden to implement the corresponding public
|
||||
// Create() methods, they shouldn't call FreeData() as it's already called
|
||||
// by the public wrappers
|
||||
virtual bool InitFromColour(const wxBitmap& bitmap,
|
||||
const wxColour& colour) = 0;
|
||||
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
|
||||
};
|
||||
|
||||
#if defined(__WXMGL__) || \
|
||||
defined(__WXDFB__) || \
|
||||
defined(__WXMAC__) || \
|
||||
defined(__WXGTK__) || \
|
||||
defined(__WXCOCOA__) || \
|
||||
defined(__WXMOTIF__) || \
|
||||
defined(__WXX11__)
|
||||
#define wxUSE_BITMAP_BASE 1
|
||||
#else
|
||||
#define wxUSE_BITMAP_BASE 0
|
||||
#endif
|
||||
|
||||
// Only used by some ports
|
||||
// FIXME -- make all ports (but MSW which uses wxGDIImage) use these base classes
|
||||
#if wxUSE_BITMAP_BASE
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapHandler: class which knows how to create/load/save bitmaps in
|
||||
// different formats
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBitmapHandlerBase : public wxObject
|
||||
{
|
||||
public:
|
||||
wxBitmapHandlerBase() { m_type = wxBITMAP_TYPE_INVALID; }
|
||||
virtual ~wxBitmapHandlerBase() { }
|
||||
|
||||
virtual bool Create(wxBitmap *bitmap, const void* data, long flags,
|
||||
int width, int height, int depth = 1);
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name,
|
||||
int type, const wxPalette *palette = NULL);
|
||||
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
void SetExtension(const wxString& ext) { m_extension = ext; }
|
||||
void SetType(wxBitmapType type) { m_type = type; }
|
||||
const wxString& GetName() const { return m_name; }
|
||||
const wxString& GetExtension() const { return m_extension; }
|
||||
wxBitmapType GetType() const { return m_type; }
|
||||
|
||||
private:
|
||||
wxString m_name;
|
||||
wxString m_extension;
|
||||
wxBitmapType m_type;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxBitmapHandlerBase)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxBitmapBase : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
/*
|
||||
Derived class must implement these:
|
||||
|
||||
wxBitmap();
|
||||
wxBitmap(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 wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
|
||||
wxBitmap(const wxImage& image, int depth = -1);
|
||||
|
||||
bool Create(int width, int height, int depth = -1);
|
||||
|
||||
static void InitStandardHandlers();
|
||||
*/
|
||||
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const = 0;
|
||||
|
||||
virtual int GetHeight() const = 0;
|
||||
virtual int GetWidth() const = 0;
|
||||
virtual int GetDepth() const = 0;
|
||||
|
||||
virtual wxImage ConvertToImage() const = 0;
|
||||
|
||||
virtual wxMask *GetMask() const = 0;
|
||||
virtual void SetMask(wxMask *mask) = 0;
|
||||
|
||||
virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0;
|
||||
|
||||
virtual bool SaveFile(const wxString &name, wxBitmapType type,
|
||||
const wxPalette *palette = (wxPalette *)NULL) const = 0;
|
||||
virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0;
|
||||
|
||||
/*
|
||||
If raw bitmap access is supported (see wx/rawbmp.h), the following
|
||||
methods should be implemented:
|
||||
|
||||
virtual bool GetRawData(wxRawBitmapData *data) = 0;
|
||||
virtual void UngetRawData(wxRawBitmapData *data) = 0;
|
||||
*/
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
virtual wxPalette *GetPalette() const = 0;
|
||||
virtual void SetPalette(const wxPalette& palette) = 0;
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon) = 0;
|
||||
|
||||
// implementation:
|
||||
virtual void SetHeight(int height) = 0;
|
||||
virtual void SetWidth(int width) = 0;
|
||||
virtual void SetDepth(int depth) = 0;
|
||||
|
||||
// Format handling
|
||||
static inline wxList& GetHandlers() { return sm_handlers; }
|
||||
static void AddHandler(wxBitmapHandlerBase *handler);
|
||||
static void InsertHandler(wxBitmapHandlerBase *handler);
|
||||
static bool RemoveHandler(const wxString& name);
|
||||
static wxBitmapHandler *FindHandler(const wxString& name);
|
||||
static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType);
|
||||
static wxBitmapHandler *FindHandler(wxBitmapType bitmapType);
|
||||
|
||||
//static void InitStandardHandlers();
|
||||
// (wxBitmap must implement this one)
|
||||
|
||||
static void CleanUpHandlers();
|
||||
|
||||
// this method is only used by the generic implementation of wxMask
|
||||
// currently but could be useful elsewhere in the future: it can be
|
||||
// overridden to quantize the colour to correspond to bitmap colour depth
|
||||
// if necessary; default implementation simply returns the colour as is
|
||||
virtual wxColour QuantizeColour(const wxColour& colour) const
|
||||
{
|
||||
return colour;
|
||||
}
|
||||
|
||||
protected:
|
||||
static wxList sm_handlers;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxBitmapBase)
|
||||
};
|
||||
|
||||
#endif // wxUSE_BITMAP_BASE
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/bitmap.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/bitmap.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/x11/bitmap.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/bitmap.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/bitmap.h"
|
||||
#elif defined(__WXX11__)
|
||||
#include "wx/x11/bitmap.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/mgl/bitmap.h"
|
||||
#elif defined(__WXDFB__)
|
||||
#include "wx/dfb/bitmap.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/bitmap.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/bitmap.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/bitmap.h"
|
||||
#endif
|
||||
|
||||
// we must include generic mask.h after wxBitmap definition
|
||||
#if defined(__WXMGL__) || defined(__WXDFB__)
|
||||
#define wxUSE_GENERIC_MASK 1
|
||||
#else
|
||||
#define wxUSE_GENERIC_MASK 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_GENERIC_MASK
|
||||
#include "wx/generic/mask.h"
|
||||
#endif
|
||||
|
||||
#endif // _WX_BITMAP_H_BASE_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bitmap.h
|
||||
// Purpose: wxBitmap class interface
|
||||
// Author: Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 22.04.01
|
||||
// RCS-ID: $Id: bitmap.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BITMAP_H_BASE_
|
||||
#define _WX_BITMAP_H_BASE_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdicmn.h" // for wxBitmapType
|
||||
#include "wx/colour.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
|
||||
class WXDLLIMPEXP_FWD_CORE wxIcon;
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMask;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPalette;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxVariant support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_VARIANT
|
||||
#include "wx/variant.h"
|
||||
DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLEXPORT)
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMask represents the transparent area of the bitmap
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMaskBase : public wxObject
|
||||
{
|
||||
public:
|
||||
// create the mask from bitmap pixels of the given colour
|
||||
bool Create(const wxBitmap& bitmap, const wxColour& colour);
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
// create the mask from bitmap pixels with the given palette index
|
||||
bool Create(const wxBitmap& bitmap, int paletteIndex);
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
// create the mask from the given mono bitmap
|
||||
bool Create(const wxBitmap& bitmap);
|
||||
|
||||
protected:
|
||||
// this function is called from Create() to free the existing mask data
|
||||
virtual void FreeData() = 0;
|
||||
|
||||
// these functions must be overridden to implement the corresponding public
|
||||
// Create() methods, they shouldn't call FreeData() as it's already called
|
||||
// by the public wrappers
|
||||
virtual bool InitFromColour(const wxBitmap& bitmap,
|
||||
const wxColour& colour) = 0;
|
||||
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
|
||||
};
|
||||
|
||||
#if defined(__WXMGL__) || \
|
||||
defined(__WXDFB__) || \
|
||||
defined(__WXMAC__) || \
|
||||
defined(__WXGTK__) || \
|
||||
defined(__WXCOCOA__) || \
|
||||
defined(__WXMOTIF__) || \
|
||||
defined(__WXX11__)
|
||||
#define wxUSE_BITMAP_BASE 1
|
||||
#else
|
||||
#define wxUSE_BITMAP_BASE 0
|
||||
#endif
|
||||
|
||||
// Only used by some ports
|
||||
// FIXME -- make all ports (but MSW which uses wxGDIImage) use these base classes
|
||||
#if wxUSE_BITMAP_BASE
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapHandler: class which knows how to create/load/save bitmaps in
|
||||
// different formats
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBitmapHandlerBase : public wxObject
|
||||
{
|
||||
public:
|
||||
wxBitmapHandlerBase() { m_type = wxBITMAP_TYPE_INVALID; }
|
||||
virtual ~wxBitmapHandlerBase() { }
|
||||
|
||||
virtual bool Create(wxBitmap *bitmap, const void* data, long flags,
|
||||
int width, int height, int depth = 1);
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name,
|
||||
int type, const wxPalette *palette = NULL);
|
||||
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
void SetExtension(const wxString& ext) { m_extension = ext; }
|
||||
void SetType(wxBitmapType type) { m_type = type; }
|
||||
const wxString& GetName() const { return m_name; }
|
||||
const wxString& GetExtension() const { return m_extension; }
|
||||
wxBitmapType GetType() const { return m_type; }
|
||||
|
||||
private:
|
||||
wxString m_name;
|
||||
wxString m_extension;
|
||||
wxBitmapType m_type;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxBitmapHandlerBase)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxBitmapBase : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
/*
|
||||
Derived class must implement these:
|
||||
|
||||
wxBitmap();
|
||||
wxBitmap(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 wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
|
||||
wxBitmap(const wxImage& image, int depth = -1);
|
||||
|
||||
bool Create(int width, int height, int depth = -1);
|
||||
|
||||
static void InitStandardHandlers();
|
||||
*/
|
||||
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const = 0;
|
||||
|
||||
virtual int GetHeight() const = 0;
|
||||
virtual int GetWidth() const = 0;
|
||||
virtual int GetDepth() const = 0;
|
||||
|
||||
virtual wxImage ConvertToImage() const = 0;
|
||||
|
||||
virtual wxMask *GetMask() const = 0;
|
||||
virtual void SetMask(wxMask *mask) = 0;
|
||||
|
||||
virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0;
|
||||
|
||||
virtual bool SaveFile(const wxString &name, wxBitmapType type,
|
||||
const wxPalette *palette = (wxPalette *)NULL) const = 0;
|
||||
virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0;
|
||||
|
||||
/*
|
||||
If raw bitmap access is supported (see wx/rawbmp.h), the following
|
||||
methods should be implemented:
|
||||
|
||||
virtual bool GetRawData(wxRawBitmapData *data) = 0;
|
||||
virtual void UngetRawData(wxRawBitmapData *data) = 0;
|
||||
*/
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
virtual wxPalette *GetPalette() const = 0;
|
||||
virtual void SetPalette(const wxPalette& palette) = 0;
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon) = 0;
|
||||
|
||||
// implementation:
|
||||
virtual void SetHeight(int height) = 0;
|
||||
virtual void SetWidth(int width) = 0;
|
||||
virtual void SetDepth(int depth) = 0;
|
||||
|
||||
// Format handling
|
||||
static inline wxList& GetHandlers() { return sm_handlers; }
|
||||
static void AddHandler(wxBitmapHandlerBase *handler);
|
||||
static void InsertHandler(wxBitmapHandlerBase *handler);
|
||||
static bool RemoveHandler(const wxString& name);
|
||||
static wxBitmapHandler *FindHandler(const wxString& name);
|
||||
static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType);
|
||||
static wxBitmapHandler *FindHandler(wxBitmapType bitmapType);
|
||||
|
||||
//static void InitStandardHandlers();
|
||||
// (wxBitmap must implement this one)
|
||||
|
||||
static void CleanUpHandlers();
|
||||
|
||||
// this method is only used by the generic implementation of wxMask
|
||||
// currently but could be useful elsewhere in the future: it can be
|
||||
// overridden to quantize the colour to correspond to bitmap colour depth
|
||||
// if necessary; default implementation simply returns the colour as is
|
||||
virtual wxColour QuantizeColour(const wxColour& colour) const
|
||||
{
|
||||
return colour;
|
||||
}
|
||||
|
||||
protected:
|
||||
static wxList sm_handlers;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxBitmapBase)
|
||||
};
|
||||
|
||||
#endif // wxUSE_BITMAP_BASE
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/bitmap.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/bitmap.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/x11/bitmap.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/bitmap.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/bitmap.h"
|
||||
#elif defined(__WXX11__)
|
||||
#include "wx/x11/bitmap.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/mgl/bitmap.h"
|
||||
#elif defined(__WXDFB__)
|
||||
#include "wx/dfb/bitmap.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/bitmap.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/bitmap.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/bitmap.h"
|
||||
#endif
|
||||
|
||||
// we must include generic mask.h after wxBitmap definition
|
||||
#if defined(__WXMGL__) || defined(__WXDFB__)
|
||||
#define wxUSE_GENERIC_MASK 1
|
||||
#else
|
||||
#define wxUSE_GENERIC_MASK 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_GENERIC_MASK
|
||||
#include "wx/generic/mask.h"
|
||||
#endif
|
||||
|
||||
#endif // _WX_BITMAP_H_BASE_
|
||||
|
|
|
@ -1,122 +1,122 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bmpbutton.h
|
||||
// Purpose: wxBitmapButton class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 25.08.00
|
||||
// RCS-ID: $Id: bmpbuttn.h 45498 2007-04-16 13:03:05Z VZ $
|
||||
// Copyright: (c) 2000 Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPBUTTON_H_BASE_
|
||||
#define _WX_BMPBUTTON_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BMPBUTTON
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/button.h"
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapButton: a button which shows bitmaps instead of the usual string.
|
||||
// It has different bitmaps for different states (focused/disabled/pressed)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBitmapButtonBase : public wxButton
|
||||
{
|
||||
public:
|
||||
wxBitmapButtonBase()
|
||||
{
|
||||
m_marginX =
|
||||
m_marginY = 0;
|
||||
}
|
||||
|
||||
// set the bitmaps
|
||||
void SetBitmapLabel(const wxBitmap& bitmap)
|
||||
{ m_bmpNormal = bitmap; OnSetBitmap(); }
|
||||
void SetBitmapSelected(const wxBitmap& sel)
|
||||
{ m_bmpSelected = sel; OnSetBitmap(); }
|
||||
void SetBitmapFocus(const wxBitmap& focus)
|
||||
{ m_bmpFocus = focus; OnSetBitmap(); }
|
||||
void SetBitmapDisabled(const wxBitmap& disabled)
|
||||
{ m_bmpDisabled = disabled; OnSetBitmap(); }
|
||||
void SetBitmapHover(const wxBitmap& hover)
|
||||
{ m_bmpHover = hover; OnSetBitmap(); }
|
||||
|
||||
// retrieve the bitmaps
|
||||
const wxBitmap& GetBitmapLabel() const { return m_bmpNormal; }
|
||||
const wxBitmap& GetBitmapSelected() const { return m_bmpSelected; }
|
||||
const wxBitmap& GetBitmapFocus() const { return m_bmpFocus; }
|
||||
const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
|
||||
const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
|
||||
wxBitmap& GetBitmapLabel() { return m_bmpNormal; }
|
||||
wxBitmap& GetBitmapSelected() { return m_bmpSelected; }
|
||||
wxBitmap& GetBitmapFocus() { return m_bmpFocus; }
|
||||
wxBitmap& GetBitmapDisabled() { return m_bmpDisabled; }
|
||||
wxBitmap& GetBitmapHover() { return m_bmpHover; }
|
||||
|
||||
// set/get the margins around the button
|
||||
virtual void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
|
||||
int GetMarginX() const { return m_marginX; }
|
||||
int GetMarginY() const { return m_marginY; }
|
||||
|
||||
// deprecated synonym for SetBitmapLabel()
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxDEPRECATED( void SetLabel(const wxBitmap& bitmap) );
|
||||
|
||||
// prevent virtual function hiding
|
||||
virtual void SetLabel(const wxString& label)
|
||||
{ wxWindow::SetLabel(label); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
protected:
|
||||
// function called when any of the bitmaps changes
|
||||
virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); }
|
||||
|
||||
// the bitmaps for various states
|
||||
wxBitmap m_bmpNormal,
|
||||
m_bmpSelected,
|
||||
m_bmpFocus,
|
||||
m_bmpDisabled,
|
||||
m_bmpHover;
|
||||
|
||||
// the margins around the bitmap
|
||||
int m_marginX,
|
||||
m_marginY;
|
||||
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxBitmapButtonBase)
|
||||
};
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
inline void wxBitmapButtonBase::SetLabel(const wxBitmap& bitmap)
|
||||
{
|
||||
SetBitmapLabel(bitmap);
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/bmpbuttn.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/bmpbuttn.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/bmpbuttn.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/bmpbuttn.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/bmpbuttn.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/bmpbuttn.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/bmpbuttn.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BMPBUTTON
|
||||
|
||||
#endif // _WX_BMPBUTTON_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bmpbutton.h
|
||||
// Purpose: wxBitmapButton class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 25.08.00
|
||||
// RCS-ID: $Id: bmpbuttn.h 45498 2007-04-16 13:03:05Z VZ $
|
||||
// Copyright: (c) 2000 Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPBUTTON_H_BASE_
|
||||
#define _WX_BMPBUTTON_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BMPBUTTON
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/button.h"
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapButton: a button which shows bitmaps instead of the usual string.
|
||||
// It has different bitmaps for different states (focused/disabled/pressed)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBitmapButtonBase : public wxButton
|
||||
{
|
||||
public:
|
||||
wxBitmapButtonBase()
|
||||
{
|
||||
m_marginX =
|
||||
m_marginY = 0;
|
||||
}
|
||||
|
||||
// set the bitmaps
|
||||
void SetBitmapLabel(const wxBitmap& bitmap)
|
||||
{ m_bmpNormal = bitmap; OnSetBitmap(); }
|
||||
void SetBitmapSelected(const wxBitmap& sel)
|
||||
{ m_bmpSelected = sel; OnSetBitmap(); }
|
||||
void SetBitmapFocus(const wxBitmap& focus)
|
||||
{ m_bmpFocus = focus; OnSetBitmap(); }
|
||||
void SetBitmapDisabled(const wxBitmap& disabled)
|
||||
{ m_bmpDisabled = disabled; OnSetBitmap(); }
|
||||
void SetBitmapHover(const wxBitmap& hover)
|
||||
{ m_bmpHover = hover; OnSetBitmap(); }
|
||||
|
||||
// retrieve the bitmaps
|
||||
const wxBitmap& GetBitmapLabel() const { return m_bmpNormal; }
|
||||
const wxBitmap& GetBitmapSelected() const { return m_bmpSelected; }
|
||||
const wxBitmap& GetBitmapFocus() const { return m_bmpFocus; }
|
||||
const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
|
||||
const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
|
||||
wxBitmap& GetBitmapLabel() { return m_bmpNormal; }
|
||||
wxBitmap& GetBitmapSelected() { return m_bmpSelected; }
|
||||
wxBitmap& GetBitmapFocus() { return m_bmpFocus; }
|
||||
wxBitmap& GetBitmapDisabled() { return m_bmpDisabled; }
|
||||
wxBitmap& GetBitmapHover() { return m_bmpHover; }
|
||||
|
||||
// set/get the margins around the button
|
||||
virtual void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
|
||||
int GetMarginX() const { return m_marginX; }
|
||||
int GetMarginY() const { return m_marginY; }
|
||||
|
||||
// deprecated synonym for SetBitmapLabel()
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxDEPRECATED( void SetLabel(const wxBitmap& bitmap) );
|
||||
|
||||
// prevent virtual function hiding
|
||||
virtual void SetLabel(const wxString& label)
|
||||
{ wxWindow::SetLabel(label); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
protected:
|
||||
// function called when any of the bitmaps changes
|
||||
virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); }
|
||||
|
||||
// the bitmaps for various states
|
||||
wxBitmap m_bmpNormal,
|
||||
m_bmpSelected,
|
||||
m_bmpFocus,
|
||||
m_bmpDisabled,
|
||||
m_bmpHover;
|
||||
|
||||
// the margins around the bitmap
|
||||
int m_marginX,
|
||||
m_marginY;
|
||||
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxBitmapButtonBase)
|
||||
};
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
inline void wxBitmapButtonBase::SetLabel(const wxBitmap& bitmap)
|
||||
{
|
||||
SetBitmapLabel(bitmap);
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/bmpbuttn.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/bmpbuttn.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/bmpbuttn.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/bmpbuttn.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/bmpbuttn.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/bmpbuttn.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/bmpbuttn.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BMPBUTTON
|
||||
|
||||
#endif // _WX_BMPBUTTON_H_BASE_
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bmpcbox.h
|
||||
// Purpose: wxBitmapComboBox base header
|
||||
// Author: Jaakko Salli
|
||||
// Modified by:
|
||||
// Created: Aug-31-2006
|
||||
// Copyright: (c) Jaakko Salli
|
||||
// RCS-ID: $Id: bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPCBOX_H_BASE_
|
||||
#define _WX_BMPCBOX_H_BASE_
|
||||
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BITMAPCOMBOBOX
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
|
||||
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[];
|
||||
|
||||
|
||||
class WXDLLIMPEXP_ADV wxBitmapComboBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxBitmapComboBoxBase() { }
|
||||
|
||||
virtual ~wxBitmapComboBoxBase() { }
|
||||
|
||||
// Returns the image of the item with the given index.
|
||||
virtual wxBitmap GetItemBitmap(unsigned int n) const = 0;
|
||||
|
||||
// Sets the image for the given item.
|
||||
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
|
||||
|
||||
// Returns size of the image used in list
|
||||
virtual wxSize GetBitmapSize() const = 0;
|
||||
};
|
||||
|
||||
|
||||
#include "wx/generic/bmpcbox.h"
|
||||
|
||||
#endif // wxUSE_BITMAPCOMBOBOX
|
||||
|
||||
#endif // _WX_BMPCBOX_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bmpcbox.h
|
||||
// Purpose: wxBitmapComboBox base header
|
||||
// Author: Jaakko Salli
|
||||
// Modified by:
|
||||
// Created: Aug-31-2006
|
||||
// Copyright: (c) Jaakko Salli
|
||||
// RCS-ID: $Id: bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPCBOX_H_BASE_
|
||||
#define _WX_BMPCBOX_H_BASE_
|
||||
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BITMAPCOMBOBOX
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
|
||||
extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[];
|
||||
|
||||
|
||||
class WXDLLIMPEXP_ADV wxBitmapComboBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxBitmapComboBoxBase() { }
|
||||
|
||||
virtual ~wxBitmapComboBoxBase() { }
|
||||
|
||||
// Returns the image of the item with the given index.
|
||||
virtual wxBitmap GetItemBitmap(unsigned int n) const = 0;
|
||||
|
||||
// Sets the image for the given item.
|
||||
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
|
||||
|
||||
// Returns size of the image used in list
|
||||
virtual wxSize GetBitmapSize() const = 0;
|
||||
};
|
||||
|
||||
|
||||
#include "wx/generic/bmpcbox.h"
|
||||
|
||||
#endif // wxUSE_BITMAPCOMBOBOX
|
||||
|
||||
#endif // _WX_BMPCBOX_H_BASE_
|
||||
|
|
|
@ -1,403 +1,403 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bookctrl.h
|
||||
// Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 19.08.03
|
||||
// RCS-ID: $Id: bookctrl.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BOOKCTRL_H_
|
||||
#define _WX_BOOKCTRL_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BOOKCTRL
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBookCtrlBaseEvent;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// wxBookCtrl hit results
|
||||
enum
|
||||
{
|
||||
wxBK_HITTEST_NOWHERE = 1, // not on tab
|
||||
wxBK_HITTEST_ONICON = 2, // on icon
|
||||
wxBK_HITTEST_ONLABEL = 4, // on label
|
||||
wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL,
|
||||
wxBK_HITTEST_ONPAGE = 8 // not on tab control, but over the selected page
|
||||
};
|
||||
|
||||
// wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook)
|
||||
#define wxBK_DEFAULT 0x0000
|
||||
#define wxBK_TOP 0x0010
|
||||
#define wxBK_BOTTOM 0x0020
|
||||
#define wxBK_LEFT 0x0040
|
||||
#define wxBK_RIGHT 0x0080
|
||||
#define wxBK_ALIGN_MASK (wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBookCtrlBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBookCtrlBase : public wxControl
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
// ------------
|
||||
|
||||
wxBookCtrlBase()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxBookCtrlBase(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, winid, pos, size, style, name);
|
||||
}
|
||||
|
||||
// quasi ctor
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
// dtor
|
||||
virtual ~wxBookCtrlBase();
|
||||
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// get number of pages in the dialog
|
||||
virtual size_t GetPageCount() const { return m_pages.size(); }
|
||||
|
||||
// get the panel which represents the given page
|
||||
wxWindow *GetPage(size_t n) { return m_pages[n]; }
|
||||
wxWindow *GetPage(size_t n) const { return m_pages[n]; }
|
||||
|
||||
// get the current page or NULL if none
|
||||
wxWindow *GetCurrentPage() const
|
||||
{
|
||||
const int n = GetSelection();
|
||||
return n == wxNOT_FOUND ? NULL : GetPage(n);
|
||||
}
|
||||
|
||||
// get the currently selected page or wxNOT_FOUND if none
|
||||
virtual int GetSelection() const = 0;
|
||||
|
||||
// set/get the title of a page
|
||||
virtual bool SetPageText(size_t n, const wxString& strText) = 0;
|
||||
virtual wxString GetPageText(size_t n) const = 0;
|
||||
|
||||
|
||||
// image list stuff: each page may have an image associated with it (all
|
||||
// images belong to the same image list)
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// sets the image list to use, it is *not* deleted by the control
|
||||
virtual void SetImageList(wxImageList *imageList);
|
||||
|
||||
// as SetImageList() but we will delete the image list ourselves
|
||||
void AssignImageList(wxImageList *imageList);
|
||||
|
||||
// get pointer (may be NULL) to the associated image list
|
||||
wxImageList* GetImageList() const { return m_imageList; }
|
||||
|
||||
// sets/returns item's image index in the current image list
|
||||
virtual int GetPageImage(size_t n) const = 0;
|
||||
virtual bool SetPageImage(size_t n, int imageId) = 0;
|
||||
|
||||
|
||||
// geometry
|
||||
// --------
|
||||
|
||||
// resize the notebook so that all pages will have the specified size
|
||||
virtual void SetPageSize(const wxSize& size);
|
||||
|
||||
// calculate the size of the control from the size of its page
|
||||
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
|
||||
|
||||
// get/set size of area between book control area and page area
|
||||
unsigned int GetInternalBorder() const { return m_internalBorder; }
|
||||
void SetInternalBorder(unsigned int border) { m_internalBorder = border; }
|
||||
|
||||
// Sets/gets the margin around the controller
|
||||
void SetControlMargin(int margin) { m_controlMargin = margin; }
|
||||
int GetControlMargin() const { return m_controlMargin; }
|
||||
|
||||
// returns true if we have wxBK_TOP or wxBK_BOTTOM style
|
||||
bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); }
|
||||
|
||||
// set/get option to shrink to fit current page
|
||||
void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; }
|
||||
bool GetFitToCurrentPage() const { return m_fitToCurrentPage; }
|
||||
|
||||
// returns the sizer containing the control, if any
|
||||
wxSizer* GetControlSizer() const { return m_controlSizer; }
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
|
||||
// remove one page from the control and delete it
|
||||
virtual bool DeletePage(size_t n);
|
||||
|
||||
// remove one page from the notebook, without deleting it
|
||||
virtual bool RemovePage(size_t n)
|
||||
{
|
||||
DoInvalidateBestSize();
|
||||
return DoRemovePage(n) != NULL;
|
||||
}
|
||||
|
||||
// remove all pages and delete them
|
||||
virtual bool DeleteAllPages()
|
||||
{
|
||||
DoInvalidateBestSize();
|
||||
WX_CLEAR_ARRAY(m_pages);
|
||||
return true;
|
||||
}
|
||||
|
||||
// adds a new page to the control
|
||||
virtual bool AddPage(wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = -1)
|
||||
{
|
||||
DoInvalidateBestSize();
|
||||
return InsertPage(GetPageCount(), page, text, bSelect, imageId);
|
||||
}
|
||||
|
||||
// the same as AddPage(), but adds the page at the specified position
|
||||
virtual bool InsertPage(size_t n,
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = -1) = 0;
|
||||
|
||||
// set the currently selected page, return the index of the previously
|
||||
// selected one (or -1 on error)
|
||||
//
|
||||
// NB: this function will generate PAGE_CHANGING/ED events
|
||||
virtual int SetSelection(size_t n) = 0;
|
||||
|
||||
// acts as SetSelection but does not generate events
|
||||
virtual int ChangeSelection(size_t n) = 0;
|
||||
|
||||
|
||||
// cycle thru the pages
|
||||
void AdvanceSelection(bool forward = true)
|
||||
{
|
||||
int nPage = GetNextPage(forward);
|
||||
if ( nPage != -1 )
|
||||
{
|
||||
// cast is safe because of the check above
|
||||
SetSelection((size_t)nPage);
|
||||
}
|
||||
}
|
||||
|
||||
// hit test: returns which page is hit and, optionally, where (icon, label)
|
||||
virtual int HitTest(const wxPoint& WXUNUSED(pt),
|
||||
long * WXUNUSED(flags) = NULL) const
|
||||
{
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
// we do have multiple pages
|
||||
virtual bool HasMultiplePages() const { return true; }
|
||||
|
||||
|
||||
protected:
|
||||
// flags for DoSetSelection()
|
||||
enum
|
||||
{
|
||||
SetSelection_SendEvent = 1
|
||||
};
|
||||
|
||||
// set the selection to the given page, sending the events (which can
|
||||
// possibly prevent the page change from taking place) if SendEvent flag is
|
||||
// included
|
||||
virtual int DoSetSelection(size_t nPage, int flags = 0);
|
||||
|
||||
// if the derived class uses DoSetSelection() for implementing
|
||||
// [Set|Change]Selection, it must override UpdateSelectedPage(),
|
||||
// CreatePageChangingEvent() and MakeChangedEvent(), but as it might not
|
||||
// use it, these functions are not pure virtual
|
||||
|
||||
// called to notify the control about a new current page
|
||||
virtual void UpdateSelectedPage(size_t WXUNUSED(newsel))
|
||||
{ wxFAIL_MSG(wxT("Override this function!")); }
|
||||
|
||||
// create a new "page changing" event
|
||||
virtual wxBookCtrlBaseEvent* CreatePageChangingEvent() const
|
||||
{ wxFAIL_MSG(wxT("Override this function!")); return NULL; }
|
||||
|
||||
// modify the event created by CreatePageChangingEvent() to "page changed"
|
||||
// event, usually by just calling SetEventType() on it
|
||||
virtual void MakeChangedEvent(wxBookCtrlBaseEvent& WXUNUSED(event))
|
||||
{ wxFAIL_MSG(wxT("Override this function!")); }
|
||||
|
||||
|
||||
// Should we accept NULL page pointers in Add/InsertPage()?
|
||||
//
|
||||
// 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
|
||||
// having nodes without any associated page)
|
||||
virtual bool AllowNullPage() const { return false; }
|
||||
|
||||
// remove the page and return a pointer to it
|
||||
virtual wxWindow *DoRemovePage(size_t page) = 0;
|
||||
|
||||
// our best size is the size which fits all our pages
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// helper: get the next page wrapping if we reached the end
|
||||
int GetNextPage(bool forward) const;
|
||||
|
||||
// Lay out controls
|
||||
void DoSize();
|
||||
|
||||
// This method also invalidates the size of the controller and should be
|
||||
// called instead of just InvalidateBestSize() whenever pages are added or
|
||||
// removed as this also affects the controller
|
||||
void DoInvalidateBestSize();
|
||||
|
||||
#if wxUSE_HELP
|
||||
// Show the help for the corresponding page
|
||||
void OnHelp(wxHelpEvent& event);
|
||||
#endif // wxUSE_HELP
|
||||
|
||||
|
||||
// the array of all pages of this control
|
||||
wxArrayPages m_pages;
|
||||
|
||||
// the associated image list or NULL
|
||||
wxImageList *m_imageList;
|
||||
|
||||
// true if we must delete m_imageList
|
||||
bool m_ownsImageList;
|
||||
|
||||
// get the page area
|
||||
wxRect GetPageRect() const;
|
||||
|
||||
// event handlers
|
||||
virtual wxSize GetControllerSize() const;
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
// controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook)
|
||||
wxControl *m_bookctrl;
|
||||
|
||||
// Whether to shrink to fit current page
|
||||
bool m_fitToCurrentPage;
|
||||
|
||||
// the sizer containing the choice control
|
||||
wxSizer *m_controlSizer;
|
||||
|
||||
// the margin around the choice control
|
||||
int m_controlMargin;
|
||||
|
||||
private:
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// internal border
|
||||
unsigned int m_internalBorder;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxBookCtrlBase)
|
||||
DECLARE_NO_COPY_CLASS(wxBookCtrlBase)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBookCtrlBaseEvent: page changing events generated by derived classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
|
||||
int nSel = -1, int nOldSel = -1)
|
||||
: wxNotifyEvent(commandType, winid)
|
||||
{
|
||||
m_nSel = nSel;
|
||||
m_nOldSel = nOldSel;
|
||||
}
|
||||
|
||||
wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event)
|
||||
: wxNotifyEvent(event)
|
||||
{
|
||||
m_nSel = event.m_nSel;
|
||||
m_nOldSel = event.m_nOldSel;
|
||||
}
|
||||
|
||||
// accessors
|
||||
// the currently selected page (-1 if none)
|
||||
int GetSelection() const { return m_nSel; }
|
||||
void SetSelection(int nSel) { m_nSel = nSel; }
|
||||
// the page that was selected before the change (-1 if none)
|
||||
int GetOldSelection() const { return m_nOldSel; }
|
||||
void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
|
||||
|
||||
private:
|
||||
int m_nSel, // currently selected page
|
||||
m_nOldSel; // previously selected page
|
||||
};
|
||||
|
||||
// make a default book control for given platform
|
||||
#if wxUSE_NOTEBOOK
|
||||
// dedicated to majority of desktops
|
||||
#include "wx/notebook.h"
|
||||
#define wxBookCtrl wxNotebook
|
||||
#define wxBookCtrlEvent wxNotebookEvent
|
||||
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
|
||||
#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_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn)
|
||||
#define wxBookctrlEventHandler(func) wxNotebookEventHandler(func)
|
||||
#else
|
||||
// dedicated to Smartphones
|
||||
#include "wx/choicebk.h"
|
||||
#define wxBookCtrl wxChoicebook
|
||||
#define wxBookCtrlEvent wxChoicebookEvent
|
||||
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
|
||||
#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_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn)
|
||||
#define wxBookctrlEventHandler(func) wxChoicebookEventHandler(func)
|
||||
#endif
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
#define wxBC_TOP wxBK_TOP
|
||||
#define wxBC_BOTTOM wxBK_BOTTOM
|
||||
#define wxBC_LEFT wxBK_LEFT
|
||||
#define wxBC_RIGHT wxBK_RIGHT
|
||||
#define wxBC_DEFAULT wxBK_DEFAULT
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BOOKCTRL
|
||||
|
||||
#endif // _WX_BOOKCTRL_H_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/bookctrl.h
|
||||
// Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 19.08.03
|
||||
// RCS-ID: $Id: bookctrl.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BOOKCTRL_H_
|
||||
#define _WX_BOOKCTRL_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BOOKCTRL
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBookCtrlBaseEvent;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// wxBookCtrl hit results
|
||||
enum
|
||||
{
|
||||
wxBK_HITTEST_NOWHERE = 1, // not on tab
|
||||
wxBK_HITTEST_ONICON = 2, // on icon
|
||||
wxBK_HITTEST_ONLABEL = 4, // on label
|
||||
wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL,
|
||||
wxBK_HITTEST_ONPAGE = 8 // not on tab control, but over the selected page
|
||||
};
|
||||
|
||||
// wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook)
|
||||
#define wxBK_DEFAULT 0x0000
|
||||
#define wxBK_TOP 0x0010
|
||||
#define wxBK_BOTTOM 0x0020
|
||||
#define wxBK_LEFT 0x0040
|
||||
#define wxBK_RIGHT 0x0080
|
||||
#define wxBK_ALIGN_MASK (wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBookCtrlBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBookCtrlBase : public wxControl
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
// ------------
|
||||
|
||||
wxBookCtrlBase()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxBookCtrlBase(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, winid, pos, size, style, name);
|
||||
}
|
||||
|
||||
// quasi ctor
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
// dtor
|
||||
virtual ~wxBookCtrlBase();
|
||||
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// get number of pages in the dialog
|
||||
virtual size_t GetPageCount() const { return m_pages.size(); }
|
||||
|
||||
// get the panel which represents the given page
|
||||
wxWindow *GetPage(size_t n) { return m_pages[n]; }
|
||||
wxWindow *GetPage(size_t n) const { return m_pages[n]; }
|
||||
|
||||
// get the current page or NULL if none
|
||||
wxWindow *GetCurrentPage() const
|
||||
{
|
||||
const int n = GetSelection();
|
||||
return n == wxNOT_FOUND ? NULL : GetPage(n);
|
||||
}
|
||||
|
||||
// get the currently selected page or wxNOT_FOUND if none
|
||||
virtual int GetSelection() const = 0;
|
||||
|
||||
// set/get the title of a page
|
||||
virtual bool SetPageText(size_t n, const wxString& strText) = 0;
|
||||
virtual wxString GetPageText(size_t n) const = 0;
|
||||
|
||||
|
||||
// image list stuff: each page may have an image associated with it (all
|
||||
// images belong to the same image list)
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// sets the image list to use, it is *not* deleted by the control
|
||||
virtual void SetImageList(wxImageList *imageList);
|
||||
|
||||
// as SetImageList() but we will delete the image list ourselves
|
||||
void AssignImageList(wxImageList *imageList);
|
||||
|
||||
// get pointer (may be NULL) to the associated image list
|
||||
wxImageList* GetImageList() const { return m_imageList; }
|
||||
|
||||
// sets/returns item's image index in the current image list
|
||||
virtual int GetPageImage(size_t n) const = 0;
|
||||
virtual bool SetPageImage(size_t n, int imageId) = 0;
|
||||
|
||||
|
||||
// geometry
|
||||
// --------
|
||||
|
||||
// resize the notebook so that all pages will have the specified size
|
||||
virtual void SetPageSize(const wxSize& size);
|
||||
|
||||
// calculate the size of the control from the size of its page
|
||||
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
|
||||
|
||||
// get/set size of area between book control area and page area
|
||||
unsigned int GetInternalBorder() const { return m_internalBorder; }
|
||||
void SetInternalBorder(unsigned int border) { m_internalBorder = border; }
|
||||
|
||||
// Sets/gets the margin around the controller
|
||||
void SetControlMargin(int margin) { m_controlMargin = margin; }
|
||||
int GetControlMargin() const { return m_controlMargin; }
|
||||
|
||||
// returns true if we have wxBK_TOP or wxBK_BOTTOM style
|
||||
bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); }
|
||||
|
||||
// set/get option to shrink to fit current page
|
||||
void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; }
|
||||
bool GetFitToCurrentPage() const { return m_fitToCurrentPage; }
|
||||
|
||||
// returns the sizer containing the control, if any
|
||||
wxSizer* GetControlSizer() const { return m_controlSizer; }
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
|
||||
// remove one page from the control and delete it
|
||||
virtual bool DeletePage(size_t n);
|
||||
|
||||
// remove one page from the notebook, without deleting it
|
||||
virtual bool RemovePage(size_t n)
|
||||
{
|
||||
DoInvalidateBestSize();
|
||||
return DoRemovePage(n) != NULL;
|
||||
}
|
||||
|
||||
// remove all pages and delete them
|
||||
virtual bool DeleteAllPages()
|
||||
{
|
||||
DoInvalidateBestSize();
|
||||
WX_CLEAR_ARRAY(m_pages);
|
||||
return true;
|
||||
}
|
||||
|
||||
// adds a new page to the control
|
||||
virtual bool AddPage(wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = -1)
|
||||
{
|
||||
DoInvalidateBestSize();
|
||||
return InsertPage(GetPageCount(), page, text, bSelect, imageId);
|
||||
}
|
||||
|
||||
// the same as AddPage(), but adds the page at the specified position
|
||||
virtual bool InsertPage(size_t n,
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = -1) = 0;
|
||||
|
||||
// set the currently selected page, return the index of the previously
|
||||
// selected one (or -1 on error)
|
||||
//
|
||||
// NB: this function will generate PAGE_CHANGING/ED events
|
||||
virtual int SetSelection(size_t n) = 0;
|
||||
|
||||
// acts as SetSelection but does not generate events
|
||||
virtual int ChangeSelection(size_t n) = 0;
|
||||
|
||||
|
||||
// cycle thru the pages
|
||||
void AdvanceSelection(bool forward = true)
|
||||
{
|
||||
int nPage = GetNextPage(forward);
|
||||
if ( nPage != -1 )
|
||||
{
|
||||
// cast is safe because of the check above
|
||||
SetSelection((size_t)nPage);
|
||||
}
|
||||
}
|
||||
|
||||
// hit test: returns which page is hit and, optionally, where (icon, label)
|
||||
virtual int HitTest(const wxPoint& WXUNUSED(pt),
|
||||
long * WXUNUSED(flags) = NULL) const
|
||||
{
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
// we do have multiple pages
|
||||
virtual bool HasMultiplePages() const { return true; }
|
||||
|
||||
|
||||
protected:
|
||||
// flags for DoSetSelection()
|
||||
enum
|
||||
{
|
||||
SetSelection_SendEvent = 1
|
||||
};
|
||||
|
||||
// set the selection to the given page, sending the events (which can
|
||||
// possibly prevent the page change from taking place) if SendEvent flag is
|
||||
// included
|
||||
virtual int DoSetSelection(size_t nPage, int flags = 0);
|
||||
|
||||
// if the derived class uses DoSetSelection() for implementing
|
||||
// [Set|Change]Selection, it must override UpdateSelectedPage(),
|
||||
// CreatePageChangingEvent() and MakeChangedEvent(), but as it might not
|
||||
// use it, these functions are not pure virtual
|
||||
|
||||
// called to notify the control about a new current page
|
||||
virtual void UpdateSelectedPage(size_t WXUNUSED(newsel))
|
||||
{ wxFAIL_MSG(wxT("Override this function!")); }
|
||||
|
||||
// create a new "page changing" event
|
||||
virtual wxBookCtrlBaseEvent* CreatePageChangingEvent() const
|
||||
{ wxFAIL_MSG(wxT("Override this function!")); return NULL; }
|
||||
|
||||
// modify the event created by CreatePageChangingEvent() to "page changed"
|
||||
// event, usually by just calling SetEventType() on it
|
||||
virtual void MakeChangedEvent(wxBookCtrlBaseEvent& WXUNUSED(event))
|
||||
{ wxFAIL_MSG(wxT("Override this function!")); }
|
||||
|
||||
|
||||
// Should we accept NULL page pointers in Add/InsertPage()?
|
||||
//
|
||||
// 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
|
||||
// having nodes without any associated page)
|
||||
virtual bool AllowNullPage() const { return false; }
|
||||
|
||||
// remove the page and return a pointer to it
|
||||
virtual wxWindow *DoRemovePage(size_t page) = 0;
|
||||
|
||||
// our best size is the size which fits all our pages
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// helper: get the next page wrapping if we reached the end
|
||||
int GetNextPage(bool forward) const;
|
||||
|
||||
// Lay out controls
|
||||
void DoSize();
|
||||
|
||||
// This method also invalidates the size of the controller and should be
|
||||
// called instead of just InvalidateBestSize() whenever pages are added or
|
||||
// removed as this also affects the controller
|
||||
void DoInvalidateBestSize();
|
||||
|
||||
#if wxUSE_HELP
|
||||
// Show the help for the corresponding page
|
||||
void OnHelp(wxHelpEvent& event);
|
||||
#endif // wxUSE_HELP
|
||||
|
||||
|
||||
// the array of all pages of this control
|
||||
wxArrayPages m_pages;
|
||||
|
||||
// the associated image list or NULL
|
||||
wxImageList *m_imageList;
|
||||
|
||||
// true if we must delete m_imageList
|
||||
bool m_ownsImageList;
|
||||
|
||||
// get the page area
|
||||
wxRect GetPageRect() const;
|
||||
|
||||
// event handlers
|
||||
virtual wxSize GetControllerSize() const;
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
// controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook)
|
||||
wxControl *m_bookctrl;
|
||||
|
||||
// Whether to shrink to fit current page
|
||||
bool m_fitToCurrentPage;
|
||||
|
||||
// the sizer containing the choice control
|
||||
wxSizer *m_controlSizer;
|
||||
|
||||
// the margin around the choice control
|
||||
int m_controlMargin;
|
||||
|
||||
private:
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// internal border
|
||||
unsigned int m_internalBorder;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxBookCtrlBase)
|
||||
DECLARE_NO_COPY_CLASS(wxBookCtrlBase)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBookCtrlBaseEvent: page changing events generated by derived classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
|
||||
int nSel = -1, int nOldSel = -1)
|
||||
: wxNotifyEvent(commandType, winid)
|
||||
{
|
||||
m_nSel = nSel;
|
||||
m_nOldSel = nOldSel;
|
||||
}
|
||||
|
||||
wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event)
|
||||
: wxNotifyEvent(event)
|
||||
{
|
||||
m_nSel = event.m_nSel;
|
||||
m_nOldSel = event.m_nOldSel;
|
||||
}
|
||||
|
||||
// accessors
|
||||
// the currently selected page (-1 if none)
|
||||
int GetSelection() const { return m_nSel; }
|
||||
void SetSelection(int nSel) { m_nSel = nSel; }
|
||||
// the page that was selected before the change (-1 if none)
|
||||
int GetOldSelection() const { return m_nOldSel; }
|
||||
void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
|
||||
|
||||
private:
|
||||
int m_nSel, // currently selected page
|
||||
m_nOldSel; // previously selected page
|
||||
};
|
||||
|
||||
// make a default book control for given platform
|
||||
#if wxUSE_NOTEBOOK
|
||||
// dedicated to majority of desktops
|
||||
#include "wx/notebook.h"
|
||||
#define wxBookCtrl wxNotebook
|
||||
#define wxBookCtrlEvent wxNotebookEvent
|
||||
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
|
||||
#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_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn)
|
||||
#define wxBookctrlEventHandler(func) wxNotebookEventHandler(func)
|
||||
#else
|
||||
// dedicated to Smartphones
|
||||
#include "wx/choicebk.h"
|
||||
#define wxBookCtrl wxChoicebook
|
||||
#define wxBookCtrlEvent wxChoicebookEvent
|
||||
#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
|
||||
#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_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn)
|
||||
#define wxBookctrlEventHandler(func) wxChoicebookEventHandler(func)
|
||||
#endif
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
#define wxBC_TOP wxBK_TOP
|
||||
#define wxBC_BOTTOM wxBK_BOTTOM
|
||||
#define wxBC_LEFT wxBK_LEFT
|
||||
#define wxBC_RIGHT wxBK_RIGHT
|
||||
#define wxBC_DEFAULT wxBK_DEFAULT
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BOOKCTRL
|
||||
|
||||
#endif // _WX_BOOKCTRL_H_
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/brush.h
|
||||
// Purpose: Includes platform-specific wxBrush file
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id: brush.h 40865 2006-08-27 09:42:42Z VS $
|
||||
// Copyright: Julian Smart
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BRUSH_H_BASE_
|
||||
#define _WX_BRUSH_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
// wxBrushBase
|
||||
class WXDLLEXPORT wxBrushBase: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
virtual ~wxBrushBase() { }
|
||||
|
||||
virtual int GetStyle() const = 0;
|
||||
|
||||
virtual bool IsHatch() const
|
||||
{ return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
|
||||
};
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/brush.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/brush.h"
|
||||
#elif defined(__WXMOTIF__) || defined(__WXX11__)
|
||||
#include "wx/x11/brush.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/brush.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/brush.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/mgl/brush.h"
|
||||
#elif defined(__WXDFB__)
|
||||
#include "wx/dfb/brush.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/brush.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/brush.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/brush.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_BRUSH_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/brush.h
|
||||
// Purpose: Includes platform-specific wxBrush file
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id: brush.h 40865 2006-08-27 09:42:42Z VS $
|
||||
// Copyright: Julian Smart
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BRUSH_H_BASE_
|
||||
#define _WX_BRUSH_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
// wxBrushBase
|
||||
class WXDLLEXPORT wxBrushBase: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
virtual ~wxBrushBase() { }
|
||||
|
||||
virtual int GetStyle() const = 0;
|
||||
|
||||
virtual bool IsHatch() const
|
||||
{ return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
|
||||
};
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/brush.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/brush.h"
|
||||
#elif defined(__WXMOTIF__) || defined(__WXX11__)
|
||||
#include "wx/x11/brush.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/brush.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/brush.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/mgl/brush.h"
|
||||
#elif defined(__WXDFB__)
|
||||
#include "wx/dfb/brush.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/brush.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/brush.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/brush.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_BRUSH_H_BASE_
|
||||
|
|
|
@ -1,314 +1,314 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/buffer.h
|
||||
// Purpose: auto buffer classes: buffers which automatically free memory
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 12.04.99
|
||||
// RCS-ID: $Id: buffer.h 45761 2007-05-02 17:09:30Z VS $
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUFFER_H
|
||||
#define _WX_BUFFER_H
|
||||
|
||||
#include "wx/wxchar.h"
|
||||
|
||||
#include <stdlib.h> // malloc() and free()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Special classes for (wide) character strings: they use malloc/free instead
|
||||
// of new/delete
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define DEFINE_BUFFER(classname, chartype, strdupfunc) \
|
||||
class WXDLLIMPEXP_BASE classname \
|
||||
{ \
|
||||
public: \
|
||||
classname(const chartype *str = NULL) \
|
||||
: m_str(str ? strdupfunc(str) : NULL) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
classname(size_t len) \
|
||||
: m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \
|
||||
{ \
|
||||
m_str[len] = (chartype)0; \
|
||||
} \
|
||||
\
|
||||
/* no need to check for NULL, free() does it */ \
|
||||
~classname() { free(m_str); } \
|
||||
\
|
||||
/* \
|
||||
WARNING: \
|
||||
\
|
||||
the copy ctor and assignment operators change the passed in object \
|
||||
even although it is declared as "const", so: \
|
||||
\
|
||||
a) it shouldn't be really const \
|
||||
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\
|
||||
of classname buffer objects possible and is very similar to what \
|
||||
std::auto_ptr<> does (as if it were an excuse...) \
|
||||
*/ \
|
||||
\
|
||||
/* \
|
||||
because of the remark above, release() is declared const even if it \
|
||||
isn't really const \
|
||||
*/ \
|
||||
chartype *release() const \
|
||||
{ \
|
||||
chartype *p = m_str; \
|
||||
((classname *)this)->m_str = NULL; \
|
||||
return p; \
|
||||
} \
|
||||
\
|
||||
void reset() \
|
||||
{ \
|
||||
free(m_str); \
|
||||
m_str = NULL; \
|
||||
} \
|
||||
\
|
||||
classname(const classname& src) \
|
||||
: m_str(src.release()) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
classname& operator=(const chartype *str) \
|
||||
{ \
|
||||
free(m_str); \
|
||||
m_str = str ? strdupfunc(str) : NULL; \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
classname& operator=(const classname& src) \
|
||||
{ \
|
||||
free(m_str); \
|
||||
m_str = src.release(); \
|
||||
\
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
bool extend(size_t len) \
|
||||
{ \
|
||||
chartype * \
|
||||
str = (chartype *)realloc(m_str, (len + 1)*sizeof(chartype)); \
|
||||
if ( !str ) \
|
||||
return false; \
|
||||
\
|
||||
m_str = str; \
|
||||
\
|
||||
return true; \
|
||||
} \
|
||||
\
|
||||
chartype *data() { return m_str; } \
|
||||
const chartype *data() const { return m_str; } \
|
||||
operator const chartype *() const { return m_str; } \
|
||||
chartype operator[](size_t n) const { return m_str[n]; } \
|
||||
\
|
||||
private: \
|
||||
chartype *m_str; \
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 20804
|
||||
// needed for wxString::char_str() and wchar_str()
|
||||
#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
|
||||
class WXDLLIMPEXP_BASE classname : public baseclass \
|
||||
{ \
|
||||
public: \
|
||||
classname(const baseclass& src) : baseclass(src) {} \
|
||||
classname(const chartype *str = NULL) : baseclass(str) {} \
|
||||
\
|
||||
operator chartype*() { return this->data(); } \
|
||||
}
|
||||
#endif // wxABI_VERSION >= 20804
|
||||
|
||||
DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
|
||||
#if wxABI_VERSION >= 20804
|
||||
DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
|
||||
#endif
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
|
||||
DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
|
||||
#if wxABI_VERSION >= 20804
|
||||
DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_WCHAR_T
|
||||
|
||||
#undef DEFINE_BUFFER
|
||||
#undef DEFINE_WRITABLE_BUFFER
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
typedef wxWCharBuffer wxWxCharBuffer;
|
||||
|
||||
#define wxMB2WXbuf wxWCharBuffer
|
||||
#define wxWX2MBbuf wxCharBuffer
|
||||
#define wxWC2WXbuf wxChar*
|
||||
#define wxWX2WCbuf wxChar*
|
||||
#else // ANSI
|
||||
typedef wxCharBuffer wxWxCharBuffer;
|
||||
|
||||
#define wxMB2WXbuf wxChar*
|
||||
#define wxWX2MBbuf wxChar*
|
||||
#define wxWC2WXbuf wxCharBuffer
|
||||
#define wxWX2WCbuf wxWCharBuffer
|
||||
#endif // Unicode/ANSI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// A class for holding growable data buffers (not necessarily strings)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// This class manages the actual data buffer pointer and is ref-counted.
|
||||
class wxMemoryBufferData
|
||||
{
|
||||
public:
|
||||
// the initial size and also the size added by ResizeIfNeeded()
|
||||
enum { DefBufSize = 1024 };
|
||||
|
||||
friend class wxMemoryBuffer;
|
||||
|
||||
// everyting is private as it can only be used by wxMemoryBuffer
|
||||
private:
|
||||
wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize)
|
||||
: m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0)
|
||||
{
|
||||
}
|
||||
~wxMemoryBufferData() { free(m_data); }
|
||||
|
||||
|
||||
void ResizeIfNeeded(size_t newSize)
|
||||
{
|
||||
if (newSize > m_size)
|
||||
{
|
||||
void *dataOld = m_data;
|
||||
m_data = realloc(m_data, newSize + wxMemoryBufferData::DefBufSize);
|
||||
if ( !m_data )
|
||||
{
|
||||
free(dataOld);
|
||||
}
|
||||
|
||||
m_size = newSize + wxMemoryBufferData::DefBufSize;
|
||||
}
|
||||
}
|
||||
|
||||
void IncRef() { m_ref += 1; }
|
||||
void DecRef()
|
||||
{
|
||||
m_ref -= 1;
|
||||
if (m_ref == 0) // are there no more references?
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
// the buffer containing the data
|
||||
void *m_data;
|
||||
|
||||
// the size of the buffer
|
||||
size_t m_size;
|
||||
|
||||
// the amount of data currently in the buffer
|
||||
size_t m_len;
|
||||
|
||||
// the reference count
|
||||
size_t m_ref;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxMemoryBufferData)
|
||||
};
|
||||
|
||||
|
||||
class wxMemoryBuffer
|
||||
{
|
||||
public:
|
||||
// ctor and dtor
|
||||
wxMemoryBuffer(size_t size = wxMemoryBufferData::DefBufSize)
|
||||
{
|
||||
m_bufdata = new wxMemoryBufferData(size);
|
||||
m_bufdata->IncRef();
|
||||
}
|
||||
|
||||
~wxMemoryBuffer() { m_bufdata->DecRef(); }
|
||||
|
||||
|
||||
// copy and assignment
|
||||
wxMemoryBuffer(const wxMemoryBuffer& src)
|
||||
: m_bufdata(src.m_bufdata)
|
||||
{
|
||||
m_bufdata->IncRef();
|
||||
}
|
||||
|
||||
wxMemoryBuffer& operator=(const wxMemoryBuffer& src)
|
||||
{
|
||||
m_bufdata->DecRef();
|
||||
m_bufdata = src.m_bufdata;
|
||||
m_bufdata->IncRef();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// Accessors
|
||||
void *GetData() const { return m_bufdata->m_data; }
|
||||
size_t GetBufSize() const { return m_bufdata->m_size; }
|
||||
size_t GetDataLen() const { return m_bufdata->m_len; }
|
||||
|
||||
void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
|
||||
void SetDataLen(size_t len)
|
||||
{
|
||||
wxASSERT(len <= m_bufdata->m_size);
|
||||
m_bufdata->m_len = len;
|
||||
}
|
||||
|
||||
// Ensure the buffer is big enough and return a pointer to it
|
||||
void *GetWriteBuf(size_t sizeNeeded)
|
||||
{
|
||||
m_bufdata->ResizeIfNeeded(sizeNeeded);
|
||||
return m_bufdata->m_data;
|
||||
}
|
||||
|
||||
// Update the length after the write
|
||||
void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); }
|
||||
|
||||
// Like the above, but appends to the buffer
|
||||
void *GetAppendBuf(size_t sizeNeeded)
|
||||
{
|
||||
m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded);
|
||||
return (char*)m_bufdata->m_data + m_bufdata->m_len;
|
||||
}
|
||||
|
||||
// Update the length after the append
|
||||
void UngetAppendBuf(size_t sizeUsed)
|
||||
{
|
||||
SetDataLen(m_bufdata->m_len + sizeUsed);
|
||||
}
|
||||
|
||||
// Other ways to append to the buffer
|
||||
void AppendByte(char data)
|
||||
{
|
||||
wxCHECK_RET( m_bufdata->m_data, _T("invalid wxMemoryBuffer") );
|
||||
|
||||
m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1);
|
||||
*(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data;
|
||||
m_bufdata->m_len += 1;
|
||||
}
|
||||
|
||||
void AppendData(const void *data, size_t len)
|
||||
{
|
||||
memcpy(GetAppendBuf(len), data, len);
|
||||
UngetAppendBuf(len);
|
||||
}
|
||||
|
||||
operator const char *() const { return (const char*)GetData(); }
|
||||
|
||||
private:
|
||||
wxMemoryBufferData* m_bufdata;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// template class for any kind of data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// TODO
|
||||
|
||||
#endif // _WX_BUFFER_H
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/buffer.h
|
||||
// Purpose: auto buffer classes: buffers which automatically free memory
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 12.04.99
|
||||
// RCS-ID: $Id: buffer.h 45761 2007-05-02 17:09:30Z VS $
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUFFER_H
|
||||
#define _WX_BUFFER_H
|
||||
|
||||
#include "wx/wxchar.h"
|
||||
|
||||
#include <stdlib.h> // malloc() and free()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Special classes for (wide) character strings: they use malloc/free instead
|
||||
// of new/delete
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define DEFINE_BUFFER(classname, chartype, strdupfunc) \
|
||||
class WXDLLIMPEXP_BASE classname \
|
||||
{ \
|
||||
public: \
|
||||
classname(const chartype *str = NULL) \
|
||||
: m_str(str ? strdupfunc(str) : NULL) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
classname(size_t len) \
|
||||
: m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \
|
||||
{ \
|
||||
m_str[len] = (chartype)0; \
|
||||
} \
|
||||
\
|
||||
/* no need to check for NULL, free() does it */ \
|
||||
~classname() { free(m_str); } \
|
||||
\
|
||||
/* \
|
||||
WARNING: \
|
||||
\
|
||||
the copy ctor and assignment operators change the passed in object \
|
||||
even although it is declared as "const", so: \
|
||||
\
|
||||
a) it shouldn't be really const \
|
||||
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\
|
||||
of classname buffer objects possible and is very similar to what \
|
||||
std::auto_ptr<> does (as if it were an excuse...) \
|
||||
*/ \
|
||||
\
|
||||
/* \
|
||||
because of the remark above, release() is declared const even if it \
|
||||
isn't really const \
|
||||
*/ \
|
||||
chartype *release() const \
|
||||
{ \
|
||||
chartype *p = m_str; \
|
||||
((classname *)this)->m_str = NULL; \
|
||||
return p; \
|
||||
} \
|
||||
\
|
||||
void reset() \
|
||||
{ \
|
||||
free(m_str); \
|
||||
m_str = NULL; \
|
||||
} \
|
||||
\
|
||||
classname(const classname& src) \
|
||||
: m_str(src.release()) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
classname& operator=(const chartype *str) \
|
||||
{ \
|
||||
free(m_str); \
|
||||
m_str = str ? strdupfunc(str) : NULL; \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
classname& operator=(const classname& src) \
|
||||
{ \
|
||||
free(m_str); \
|
||||
m_str = src.release(); \
|
||||
\
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
bool extend(size_t len) \
|
||||
{ \
|
||||
chartype * \
|
||||
str = (chartype *)realloc(m_str, (len + 1)*sizeof(chartype)); \
|
||||
if ( !str ) \
|
||||
return false; \
|
||||
\
|
||||
m_str = str; \
|
||||
\
|
||||
return true; \
|
||||
} \
|
||||
\
|
||||
chartype *data() { return m_str; } \
|
||||
const chartype *data() const { return m_str; } \
|
||||
operator const chartype *() const { return m_str; } \
|
||||
chartype operator[](size_t n) const { return m_str[n]; } \
|
||||
\
|
||||
private: \
|
||||
chartype *m_str; \
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 20804
|
||||
// needed for wxString::char_str() and wchar_str()
|
||||
#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
|
||||
class WXDLLIMPEXP_BASE classname : public baseclass \
|
||||
{ \
|
||||
public: \
|
||||
classname(const baseclass& src) : baseclass(src) {} \
|
||||
classname(const chartype *str = NULL) : baseclass(str) {} \
|
||||
\
|
||||
operator chartype*() { return this->data(); } \
|
||||
}
|
||||
#endif // wxABI_VERSION >= 20804
|
||||
|
||||
DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
|
||||
#if wxABI_VERSION >= 20804
|
||||
DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
|
||||
#endif
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
|
||||
DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
|
||||
#if wxABI_VERSION >= 20804
|
||||
DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_WCHAR_T
|
||||
|
||||
#undef DEFINE_BUFFER
|
||||
#undef DEFINE_WRITABLE_BUFFER
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
typedef wxWCharBuffer wxWxCharBuffer;
|
||||
|
||||
#define wxMB2WXbuf wxWCharBuffer
|
||||
#define wxWX2MBbuf wxCharBuffer
|
||||
#define wxWC2WXbuf wxChar*
|
||||
#define wxWX2WCbuf wxChar*
|
||||
#else // ANSI
|
||||
typedef wxCharBuffer wxWxCharBuffer;
|
||||
|
||||
#define wxMB2WXbuf wxChar*
|
||||
#define wxWX2MBbuf wxChar*
|
||||
#define wxWC2WXbuf wxCharBuffer
|
||||
#define wxWX2WCbuf wxWCharBuffer
|
||||
#endif // Unicode/ANSI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// A class for holding growable data buffers (not necessarily strings)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// This class manages the actual data buffer pointer and is ref-counted.
|
||||
class wxMemoryBufferData
|
||||
{
|
||||
public:
|
||||
// the initial size and also the size added by ResizeIfNeeded()
|
||||
enum { DefBufSize = 1024 };
|
||||
|
||||
friend class wxMemoryBuffer;
|
||||
|
||||
// everyting is private as it can only be used by wxMemoryBuffer
|
||||
private:
|
||||
wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize)
|
||||
: m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0)
|
||||
{
|
||||
}
|
||||
~wxMemoryBufferData() { free(m_data); }
|
||||
|
||||
|
||||
void ResizeIfNeeded(size_t newSize)
|
||||
{
|
||||
if (newSize > m_size)
|
||||
{
|
||||
void *dataOld = m_data;
|
||||
m_data = realloc(m_data, newSize + wxMemoryBufferData::DefBufSize);
|
||||
if ( !m_data )
|
||||
{
|
||||
free(dataOld);
|
||||
}
|
||||
|
||||
m_size = newSize + wxMemoryBufferData::DefBufSize;
|
||||
}
|
||||
}
|
||||
|
||||
void IncRef() { m_ref += 1; }
|
||||
void DecRef()
|
||||
{
|
||||
m_ref -= 1;
|
||||
if (m_ref == 0) // are there no more references?
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
// the buffer containing the data
|
||||
void *m_data;
|
||||
|
||||
// the size of the buffer
|
||||
size_t m_size;
|
||||
|
||||
// the amount of data currently in the buffer
|
||||
size_t m_len;
|
||||
|
||||
// the reference count
|
||||
size_t m_ref;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxMemoryBufferData)
|
||||
};
|
||||
|
||||
|
||||
class wxMemoryBuffer
|
||||
{
|
||||
public:
|
||||
// ctor and dtor
|
||||
wxMemoryBuffer(size_t size = wxMemoryBufferData::DefBufSize)
|
||||
{
|
||||
m_bufdata = new wxMemoryBufferData(size);
|
||||
m_bufdata->IncRef();
|
||||
}
|
||||
|
||||
~wxMemoryBuffer() { m_bufdata->DecRef(); }
|
||||
|
||||
|
||||
// copy and assignment
|
||||
wxMemoryBuffer(const wxMemoryBuffer& src)
|
||||
: m_bufdata(src.m_bufdata)
|
||||
{
|
||||
m_bufdata->IncRef();
|
||||
}
|
||||
|
||||
wxMemoryBuffer& operator=(const wxMemoryBuffer& src)
|
||||
{
|
||||
m_bufdata->DecRef();
|
||||
m_bufdata = src.m_bufdata;
|
||||
m_bufdata->IncRef();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// Accessors
|
||||
void *GetData() const { return m_bufdata->m_data; }
|
||||
size_t GetBufSize() const { return m_bufdata->m_size; }
|
||||
size_t GetDataLen() const { return m_bufdata->m_len; }
|
||||
|
||||
void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
|
||||
void SetDataLen(size_t len)
|
||||
{
|
||||
wxASSERT(len <= m_bufdata->m_size);
|
||||
m_bufdata->m_len = len;
|
||||
}
|
||||
|
||||
// Ensure the buffer is big enough and return a pointer to it
|
||||
void *GetWriteBuf(size_t sizeNeeded)
|
||||
{
|
||||
m_bufdata->ResizeIfNeeded(sizeNeeded);
|
||||
return m_bufdata->m_data;
|
||||
}
|
||||
|
||||
// Update the length after the write
|
||||
void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); }
|
||||
|
||||
// Like the above, but appends to the buffer
|
||||
void *GetAppendBuf(size_t sizeNeeded)
|
||||
{
|
||||
m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded);
|
||||
return (char*)m_bufdata->m_data + m_bufdata->m_len;
|
||||
}
|
||||
|
||||
// Update the length after the append
|
||||
void UngetAppendBuf(size_t sizeUsed)
|
||||
{
|
||||
SetDataLen(m_bufdata->m_len + sizeUsed);
|
||||
}
|
||||
|
||||
// Other ways to append to the buffer
|
||||
void AppendByte(char data)
|
||||
{
|
||||
wxCHECK_RET( m_bufdata->m_data, _T("invalid wxMemoryBuffer") );
|
||||
|
||||
m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1);
|
||||
*(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data;
|
||||
m_bufdata->m_len += 1;
|
||||
}
|
||||
|
||||
void AppendData(const void *data, size_t len)
|
||||
{
|
||||
memcpy(GetAppendBuf(len), data, len);
|
||||
UngetAppendBuf(len);
|
||||
}
|
||||
|
||||
operator const char *() const { return (const char*)GetData(); }
|
||||
|
||||
private:
|
||||
wxMemoryBufferData* m_bufdata;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// template class for any kind of data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// TODO
|
||||
|
||||
#endif // _WX_BUFFER_H
|
||||
|
|
|
@ -1,149 +1,149 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/build.h
|
||||
// Purpose: Runtime build options checking
|
||||
// Author: Vadim Zeitlin, Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 07.05.02
|
||||
// RCS-ID: $Id: build.h 35858 2005-10-09 15:48:42Z MBN $
|
||||
// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUILD_H_
|
||||
#define _WX_BUILD_H_
|
||||
|
||||
#include "wx/version.h"
|
||||
|
||||
// NB: This file contains macros for checking binary compatibility of libraries
|
||||
// in multilib buildm, plugins and user components.
|
||||
// The WX_BUILD_OPTIONS_SIGNATURE macro expands into string that should
|
||||
// uniquely identify binary compatible builds: i.e. if two builds of the
|
||||
// library are binary compatible, their signature string should be the
|
||||
// same; if two builds are binary incompatible, their signatures should
|
||||
// be different.
|
||||
//
|
||||
// Therefore, wxUSE_XXX flags that affect binary compatibility (vtables,
|
||||
// function signatures) should be accounted for here. So should compilers
|
||||
// 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!).
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// WX_BUILD_OPTIONS_SIGNATURE
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x)
|
||||
#define __WX_BO_STRINGIZE0(x) #x
|
||||
|
||||
#if (wxMINOR_VERSION % 2) == 0
|
||||
#define __WX_BO_VERSION(x,y,z) \
|
||||
__WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y)
|
||||
#else
|
||||
#define __WX_BO_VERSION(x,y,z) \
|
||||
__WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z)
|
||||
#endif
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
#define __WX_BO_DEBUG "debug"
|
||||
#else
|
||||
#define __WX_BO_DEBUG "no debug"
|
||||
#endif
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#define __WX_BO_UNICODE "Unicode"
|
||||
#else
|
||||
#define __WX_BO_UNICODE "ANSI"
|
||||
#endif
|
||||
|
||||
// GCC and Intel C++ share same C++ ABI (and possibly others in the future),
|
||||
// check if compiler versions are compatible:
|
||||
#if defined(__GXX_ABI_VERSION)
|
||||
#define __WX_BO_COMPILER \
|
||||
",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
#define __WX_BO_COMPILER ",Intel C++"
|
||||
#elif defined(__GNUG__)
|
||||
#define __WX_BO_COMPILER ",GCC " \
|
||||
__WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__)
|
||||
#elif defined(__VISUALC__)
|
||||
#define __WX_BO_COMPILER ",Visual C++"
|
||||
#elif defined(__BORLANDC__)
|
||||
#define __WX_BO_COMPILER ",Borland C++"
|
||||
#elif defined(__DIGITALMARS__)
|
||||
#define __WX_BO_COMPILER ",DigitalMars"
|
||||
#elif defined(__WATCOMC__)
|
||||
#define __WX_BO_COMPILER ",Watcom C++"
|
||||
#else
|
||||
#define __WX_BO_COMPILER
|
||||
#endif
|
||||
|
||||
// WXWIN_COMPATIBILITY macros affect presence of virtual functions
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
#define __WX_BO_WXWIN_COMPAT_2_4 ",compatible with 2.4"
|
||||
#else
|
||||
#define __WX_BO_WXWIN_COMPAT_2_4
|
||||
#endif
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
#define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6"
|
||||
#else
|
||||
#define __WX_BO_WXWIN_COMPAT_2_6
|
||||
#endif
|
||||
|
||||
// deriving wxWin containers from STL ones changes them completely:
|
||||
#if wxUSE_STL
|
||||
#define __WX_BO_STL ",STL containers"
|
||||
#else
|
||||
#define __WX_BO_STL ",wx containers"
|
||||
#endif
|
||||
|
||||
// This macro is passed as argument to wxConsoleApp::CheckBuildOptions()
|
||||
#define WX_BUILD_OPTIONS_SIGNATURE \
|
||||
__WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
|
||||
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
|
||||
__WX_BO_COMPILER \
|
||||
__WX_BO_STL \
|
||||
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
|
||||
")"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// WX_CHECK_BUILD_OPTIONS
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// 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.
|
||||
#define WX_CHECK_BUILD_OPTIONS(libName) \
|
||||
static struct wxBuildOptionsChecker \
|
||||
{ \
|
||||
wxBuildOptionsChecker() \
|
||||
{ \
|
||||
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
|
||||
libName); \
|
||||
} \
|
||||
} gs_buildOptionsCheck;
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBuildOptions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// NB: Don't use this class in new code, it relies on the ctor being always
|
||||
// inlined. WX_BUILD_OPTIONS_SIGNATURE always works.
|
||||
class wxBuildOptions
|
||||
{
|
||||
public:
|
||||
// the ctor must be inline to get the compilation settings of the code
|
||||
// which included this header
|
||||
wxBuildOptions() : m_signature(WX_BUILD_OPTIONS_SIGNATURE) {}
|
||||
|
||||
private:
|
||||
const char *m_signature;
|
||||
|
||||
// actually only CheckBuildOptions() should be our friend but well...
|
||||
friend class wxAppConsole;
|
||||
};
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
#endif // _WX_BUILD_H_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/build.h
|
||||
// Purpose: Runtime build options checking
|
||||
// Author: Vadim Zeitlin, Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 07.05.02
|
||||
// RCS-ID: $Id: build.h 35858 2005-10-09 15:48:42Z MBN $
|
||||
// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUILD_H_
|
||||
#define _WX_BUILD_H_
|
||||
|
||||
#include "wx/version.h"
|
||||
|
||||
// NB: This file contains macros for checking binary compatibility of libraries
|
||||
// in multilib buildm, plugins and user components.
|
||||
// The WX_BUILD_OPTIONS_SIGNATURE macro expands into string that should
|
||||
// uniquely identify binary compatible builds: i.e. if two builds of the
|
||||
// library are binary compatible, their signature string should be the
|
||||
// same; if two builds are binary incompatible, their signatures should
|
||||
// be different.
|
||||
//
|
||||
// Therefore, wxUSE_XXX flags that affect binary compatibility (vtables,
|
||||
// function signatures) should be accounted for here. So should compilers
|
||||
// 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!).
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// WX_BUILD_OPTIONS_SIGNATURE
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x)
|
||||
#define __WX_BO_STRINGIZE0(x) #x
|
||||
|
||||
#if (wxMINOR_VERSION % 2) == 0
|
||||
#define __WX_BO_VERSION(x,y,z) \
|
||||
__WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y)
|
||||
#else
|
||||
#define __WX_BO_VERSION(x,y,z) \
|
||||
__WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z)
|
||||
#endif
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
#define __WX_BO_DEBUG "debug"
|
||||
#else
|
||||
#define __WX_BO_DEBUG "no debug"
|
||||
#endif
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#define __WX_BO_UNICODE "Unicode"
|
||||
#else
|
||||
#define __WX_BO_UNICODE "ANSI"
|
||||
#endif
|
||||
|
||||
// GCC and Intel C++ share same C++ ABI (and possibly others in the future),
|
||||
// check if compiler versions are compatible:
|
||||
#if defined(__GXX_ABI_VERSION)
|
||||
#define __WX_BO_COMPILER \
|
||||
",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
#define __WX_BO_COMPILER ",Intel C++"
|
||||
#elif defined(__GNUG__)
|
||||
#define __WX_BO_COMPILER ",GCC " \
|
||||
__WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__)
|
||||
#elif defined(__VISUALC__)
|
||||
#define __WX_BO_COMPILER ",Visual C++"
|
||||
#elif defined(__BORLANDC__)
|
||||
#define __WX_BO_COMPILER ",Borland C++"
|
||||
#elif defined(__DIGITALMARS__)
|
||||
#define __WX_BO_COMPILER ",DigitalMars"
|
||||
#elif defined(__WATCOMC__)
|
||||
#define __WX_BO_COMPILER ",Watcom C++"
|
||||
#else
|
||||
#define __WX_BO_COMPILER
|
||||
#endif
|
||||
|
||||
// WXWIN_COMPATIBILITY macros affect presence of virtual functions
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
#define __WX_BO_WXWIN_COMPAT_2_4 ",compatible with 2.4"
|
||||
#else
|
||||
#define __WX_BO_WXWIN_COMPAT_2_4
|
||||
#endif
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
#define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6"
|
||||
#else
|
||||
#define __WX_BO_WXWIN_COMPAT_2_6
|
||||
#endif
|
||||
|
||||
// deriving wxWin containers from STL ones changes them completely:
|
||||
#if wxUSE_STL
|
||||
#define __WX_BO_STL ",STL containers"
|
||||
#else
|
||||
#define __WX_BO_STL ",wx containers"
|
||||
#endif
|
||||
|
||||
// This macro is passed as argument to wxConsoleApp::CheckBuildOptions()
|
||||
#define WX_BUILD_OPTIONS_SIGNATURE \
|
||||
__WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
|
||||
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
|
||||
__WX_BO_COMPILER \
|
||||
__WX_BO_STL \
|
||||
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
|
||||
")"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// WX_CHECK_BUILD_OPTIONS
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// 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.
|
||||
#define WX_CHECK_BUILD_OPTIONS(libName) \
|
||||
static struct wxBuildOptionsChecker \
|
||||
{ \
|
||||
wxBuildOptionsChecker() \
|
||||
{ \
|
||||
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
|
||||
libName); \
|
||||
} \
|
||||
} gs_buildOptionsCheck;
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBuildOptions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// NB: Don't use this class in new code, it relies on the ctor being always
|
||||
// inlined. WX_BUILD_OPTIONS_SIGNATURE always works.
|
||||
class wxBuildOptions
|
||||
{
|
||||
public:
|
||||
// the ctor must be inline to get the compilation settings of the code
|
||||
// which included this header
|
||||
wxBuildOptions() : m_signature(WX_BUILD_OPTIONS_SIGNATURE) {}
|
||||
|
||||
private:
|
||||
const char *m_signature;
|
||||
|
||||
// actually only CheckBuildOptions() should be our friend but well...
|
||||
friend class wxAppConsole;
|
||||
};
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
#endif // _WX_BUILD_H_
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/busyinfo.h
|
||||
// Purpose: Information window (when app is busy)
|
||||
// Author: Vaclav Slavik
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// RCS-ID: $Id: busyinfo.h 37158 2006-01-26 15:40:46Z ABX $
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __BUSYINFO_H_BASE__
|
||||
#define __BUSYINFO_H_BASE__
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BUSYINFO
|
||||
|
||||
#include "wx/generic/busyinfo.h"
|
||||
|
||||
#endif // wxUSE_BUSYINFO
|
||||
|
||||
#endif // __BUSYINFO_H_BASE__
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/busyinfo.h
|
||||
// Purpose: Information window (when app is busy)
|
||||
// Author: Vaclav Slavik
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// RCS-ID: $Id: busyinfo.h 37158 2006-01-26 15:40:46Z ABX $
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __BUSYINFO_H_BASE__
|
||||
#define __BUSYINFO_H_BASE__
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_BUSYINFO
|
||||
|
||||
#include "wx/generic/busyinfo.h"
|
||||
|
||||
#endif // wxUSE_BUSYINFO
|
||||
|
||||
#endif // __BUSYINFO_H_BASE__
|
||||
|
|
|
@ -1,106 +1,106 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/button.h
|
||||
// Purpose: wxButtonBase class
|
||||
// Author: Vadim Zetlin
|
||||
// Modified by:
|
||||
// Created: 15.08.00
|
||||
// RCS-ID: $Id: button.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) Vadim Zetlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUTTON_H_BASE_
|
||||
#define _WX_BUTTON_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton flags shared with other classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
|
||||
|
||||
// These flags affect label alignment
|
||||
#define wxBU_LEFT 0x0040
|
||||
#define wxBU_TOP 0x0080
|
||||
#define wxBU_RIGHT 0x0100
|
||||
#define wxBU_BOTTOM 0x0200
|
||||
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
|
||||
#endif
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton specific flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// These two flags are obsolete
|
||||
#define wxBU_NOAUTODRAW 0x0000
|
||||
#define wxBU_AUTODRAW 0x0004
|
||||
|
||||
// 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
|
||||
// small as possible
|
||||
#define wxBU_EXACTFIT 0x0001
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton: a push button
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxButtonBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxButtonBase() { }
|
||||
|
||||
// show the image in the button in addition to the label
|
||||
virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
|
||||
|
||||
// set the margins around the image
|
||||
virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { }
|
||||
|
||||
// this wxButton method is called when the button becomes the default one
|
||||
// on its panel
|
||||
virtual void SetDefault() { }
|
||||
|
||||
// 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
|
||||
// in wxButtonBase to make it consistent.
|
||||
virtual bool ShouldInheritColours() const { return false; }
|
||||
|
||||
// returns the default button size for this platform
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
protected:
|
||||
DECLARE_NO_COPY_CLASS(wxButtonBase)
|
||||
};
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/button.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/button.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/button.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/button.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/button.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/button.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/button.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/button.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/button.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
#endif
|
||||
// _WX_BUTTON_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/button.h
|
||||
// Purpose: wxButtonBase class
|
||||
// Author: Vadim Zetlin
|
||||
// Modified by:
|
||||
// Created: 15.08.00
|
||||
// RCS-ID: $Id: button.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) Vadim Zetlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUTTON_H_BASE_
|
||||
#define _WX_BUTTON_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton flags shared with other classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
|
||||
|
||||
// These flags affect label alignment
|
||||
#define wxBU_LEFT 0x0040
|
||||
#define wxBU_TOP 0x0080
|
||||
#define wxBU_RIGHT 0x0100
|
||||
#define wxBU_BOTTOM 0x0200
|
||||
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
|
||||
#endif
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton specific flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// These two flags are obsolete
|
||||
#define wxBU_NOAUTODRAW 0x0000
|
||||
#define wxBU_AUTODRAW 0x0004
|
||||
|
||||
// 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
|
||||
// small as possible
|
||||
#define wxBU_EXACTFIT 0x0001
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton: a push button
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxButtonBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxButtonBase() { }
|
||||
|
||||
// show the image in the button in addition to the label
|
||||
virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
|
||||
|
||||
// set the margins around the image
|
||||
virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { }
|
||||
|
||||
// this wxButton method is called when the button becomes the default one
|
||||
// on its panel
|
||||
virtual void SetDefault() { }
|
||||
|
||||
// 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
|
||||
// in wxButtonBase to make it consistent.
|
||||
virtual bool ShouldInheritColours() const { return false; }
|
||||
|
||||
// returns the default button size for this platform
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
protected:
|
||||
DECLARE_NO_COPY_CLASS(wxButtonBase)
|
||||
};
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/button.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/button.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/button.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/button.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/button.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/button.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/button.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/button.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/button.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
#endif
|
||||
// _WX_BUTTON_H_BASE_
|
||||
|
|
|
@ -1,232 +1,232 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/calctrl.h
|
||||
// Purpose: date-picker control
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 29.12.99
|
||||
// RCS-ID: $Id: calctrl.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
TODO
|
||||
|
||||
1. implement multiple selections for date ranges
|
||||
2. background bitmap for the calendar?
|
||||
*/
|
||||
|
||||
#ifndef _WX_CALCTRL_H_
|
||||
#define _WX_CALCTRL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CALENDARCTRL
|
||||
|
||||
#include "wx/dateevt.h"
|
||||
#include "wx/colour.h"
|
||||
#include "wx/font.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarCtrl flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
enum
|
||||
{
|
||||
// show Sunday as the first day of the week (default)
|
||||
wxCAL_SUNDAY_FIRST = 0x0000,
|
||||
|
||||
// show Monder as the first day of the week
|
||||
wxCAL_MONDAY_FIRST = 0x0001,
|
||||
|
||||
// highlight holidays
|
||||
wxCAL_SHOW_HOLIDAYS = 0x0002,
|
||||
|
||||
// disable the year change control, show only the month change one
|
||||
wxCAL_NO_YEAR_CHANGE = 0x0004,
|
||||
|
||||
// don't allow changing neither month nor year (implies
|
||||
// wxCAL_NO_YEAR_CHANGE)
|
||||
wxCAL_NO_MONTH_CHANGE = 0x000c,
|
||||
|
||||
// use MS-style month-selection instead of combo-spin combination
|
||||
wxCAL_SEQUENTIAL_MONTH_SELECTION = 0x0010,
|
||||
|
||||
// show the neighbouring weeks in the previous and next month
|
||||
wxCAL_SHOW_SURROUNDING_WEEKS = 0x0020
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// return values for the HitTest() method
|
||||
enum wxCalendarHitTestResult
|
||||
{
|
||||
wxCAL_HITTEST_NOWHERE, // outside of anything
|
||||
wxCAL_HITTEST_HEADER, // on the header (weekdays)
|
||||
wxCAL_HITTEST_DAY, // on a day in the calendar
|
||||
wxCAL_HITTEST_INCMONTH,
|
||||
wxCAL_HITTEST_DECMONTH,
|
||||
wxCAL_HITTEST_SURROUNDING_WEEK
|
||||
};
|
||||
|
||||
// border types for a date
|
||||
enum wxCalendarDateBorder
|
||||
{
|
||||
wxCAL_BORDER_NONE, // no border (default)
|
||||
wxCAL_BORDER_SQUARE, // a rectangular border
|
||||
wxCAL_BORDER_ROUND // a round border
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarDateAttr: custom attributes for a calendar date
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxCalendarDateAttr
|
||||
{
|
||||
#if !defined(__VISAGECPP__)
|
||||
protected:
|
||||
// This has to be before the use of Init(), for MSVC++ 1.5
|
||||
// But dorks up Visualage!
|
||||
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
{
|
||||
m_border = border;
|
||||
m_holiday = false;
|
||||
}
|
||||
#endif
|
||||
public:
|
||||
// ctors
|
||||
wxCalendarDateAttr() { Init(); }
|
||||
wxCalendarDateAttr(const wxColour& colText,
|
||||
const wxColour& colBack = wxNullColour,
|
||||
const wxColour& colBorder = wxNullColour,
|
||||
const wxFont& font = wxNullFont,
|
||||
wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
: m_colText(colText), m_colBack(colBack),
|
||||
m_colBorder(colBorder), m_font(font)
|
||||
{
|
||||
Init(border);
|
||||
}
|
||||
wxCalendarDateAttr(wxCalendarDateBorder border,
|
||||
const wxColour& colBorder = wxNullColour)
|
||||
: m_colBorder(colBorder)
|
||||
{
|
||||
Init(border);
|
||||
}
|
||||
|
||||
// setters
|
||||
void SetTextColour(const wxColour& colText) { m_colText = colText; }
|
||||
void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
|
||||
void SetBorderColour(const wxColour& col) { m_colBorder = col; }
|
||||
void SetFont(const wxFont& font) { m_font = font; }
|
||||
void SetBorder(wxCalendarDateBorder border) { m_border = border; }
|
||||
void SetHoliday(bool holiday) { m_holiday = holiday; }
|
||||
|
||||
// accessors
|
||||
bool HasTextColour() const { return m_colText.Ok(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok(); }
|
||||
bool HasBorderColour() const { return m_colBorder.Ok(); }
|
||||
bool HasFont() const { return m_font.Ok(); }
|
||||
bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
|
||||
|
||||
bool IsHoliday() const { return m_holiday; }
|
||||
|
||||
const wxColour& GetTextColour() const { return m_colText; }
|
||||
const wxColour& GetBackgroundColour() const { return m_colBack; }
|
||||
const wxColour& GetBorderColour() const { return m_colBorder; }
|
||||
const wxFont& GetFont() const { return m_font; }
|
||||
wxCalendarDateBorder GetBorder() const { return m_border; }
|
||||
#if defined(__VISAGECPP__)
|
||||
protected:
|
||||
// This has to be here for VisualAge
|
||||
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
{
|
||||
m_border = border;
|
||||
m_holiday = false;
|
||||
}
|
||||
#endif
|
||||
private:
|
||||
wxColour m_colText,
|
||||
m_colBack,
|
||||
m_colBorder;
|
||||
wxFont m_font;
|
||||
wxCalendarDateBorder m_border;
|
||||
bool m_holiday;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarCtrl events
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
|
||||
|
||||
class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
|
||||
{
|
||||
friend class wxCalendarCtrl;
|
||||
public:
|
||||
wxCalendarEvent() { Init(); }
|
||||
inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
|
||||
|
||||
void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
|
||||
wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
m_wday = wxDateTime::Inv_WeekDay;
|
||||
}
|
||||
|
||||
private:
|
||||
wxDateTime::WeekDay m_wday;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// so far we only have a generic version, so keep it simple
|
||||
#include "wx/generic/calctrl.h"
|
||||
|
||||
|
||||
// now we can define the inline ctor using wxCalendarCtrl
|
||||
inline
|
||||
wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
|
||||
: wxDateEvent(cal, cal->GetDate(), type)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// calendar event types and macros for handling them
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
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_MONTH_CHANGED, 952)
|
||||
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_WEEKDAY_CLICKED, 955)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
|
||||
|
||||
#define wxCalendarEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
|
||||
|
||||
#define wx__DECLARE_CALEVT(evt, id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(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_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_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn)
|
||||
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
|
||||
|
||||
#endif // wxUSE_CALENDARCTRL
|
||||
|
||||
#endif // _WX_CALCTRL_H_
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/calctrl.h
|
||||
// Purpose: date-picker control
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 29.12.99
|
||||
// RCS-ID: $Id: calctrl.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
TODO
|
||||
|
||||
1. implement multiple selections for date ranges
|
||||
2. background bitmap for the calendar?
|
||||
*/
|
||||
|
||||
#ifndef _WX_CALCTRL_H_
|
||||
#define _WX_CALCTRL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CALENDARCTRL
|
||||
|
||||
#include "wx/dateevt.h"
|
||||
#include "wx/colour.h"
|
||||
#include "wx/font.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarCtrl flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
enum
|
||||
{
|
||||
// show Sunday as the first day of the week (default)
|
||||
wxCAL_SUNDAY_FIRST = 0x0000,
|
||||
|
||||
// show Monder as the first day of the week
|
||||
wxCAL_MONDAY_FIRST = 0x0001,
|
||||
|
||||
// highlight holidays
|
||||
wxCAL_SHOW_HOLIDAYS = 0x0002,
|
||||
|
||||
// disable the year change control, show only the month change one
|
||||
wxCAL_NO_YEAR_CHANGE = 0x0004,
|
||||
|
||||
// don't allow changing neither month nor year (implies
|
||||
// wxCAL_NO_YEAR_CHANGE)
|
||||
wxCAL_NO_MONTH_CHANGE = 0x000c,
|
||||
|
||||
// use MS-style month-selection instead of combo-spin combination
|
||||
wxCAL_SEQUENTIAL_MONTH_SELECTION = 0x0010,
|
||||
|
||||
// show the neighbouring weeks in the previous and next month
|
||||
wxCAL_SHOW_SURROUNDING_WEEKS = 0x0020
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// return values for the HitTest() method
|
||||
enum wxCalendarHitTestResult
|
||||
{
|
||||
wxCAL_HITTEST_NOWHERE, // outside of anything
|
||||
wxCAL_HITTEST_HEADER, // on the header (weekdays)
|
||||
wxCAL_HITTEST_DAY, // on a day in the calendar
|
||||
wxCAL_HITTEST_INCMONTH,
|
||||
wxCAL_HITTEST_DECMONTH,
|
||||
wxCAL_HITTEST_SURROUNDING_WEEK
|
||||
};
|
||||
|
||||
// border types for a date
|
||||
enum wxCalendarDateBorder
|
||||
{
|
||||
wxCAL_BORDER_NONE, // no border (default)
|
||||
wxCAL_BORDER_SQUARE, // a rectangular border
|
||||
wxCAL_BORDER_ROUND // a round border
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarDateAttr: custom attributes for a calendar date
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxCalendarDateAttr
|
||||
{
|
||||
#if !defined(__VISAGECPP__)
|
||||
protected:
|
||||
// This has to be before the use of Init(), for MSVC++ 1.5
|
||||
// But dorks up Visualage!
|
||||
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
{
|
||||
m_border = border;
|
||||
m_holiday = false;
|
||||
}
|
||||
#endif
|
||||
public:
|
||||
// ctors
|
||||
wxCalendarDateAttr() { Init(); }
|
||||
wxCalendarDateAttr(const wxColour& colText,
|
||||
const wxColour& colBack = wxNullColour,
|
||||
const wxColour& colBorder = wxNullColour,
|
||||
const wxFont& font = wxNullFont,
|
||||
wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
: m_colText(colText), m_colBack(colBack),
|
||||
m_colBorder(colBorder), m_font(font)
|
||||
{
|
||||
Init(border);
|
||||
}
|
||||
wxCalendarDateAttr(wxCalendarDateBorder border,
|
||||
const wxColour& colBorder = wxNullColour)
|
||||
: m_colBorder(colBorder)
|
||||
{
|
||||
Init(border);
|
||||
}
|
||||
|
||||
// setters
|
||||
void SetTextColour(const wxColour& colText) { m_colText = colText; }
|
||||
void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
|
||||
void SetBorderColour(const wxColour& col) { m_colBorder = col; }
|
||||
void SetFont(const wxFont& font) { m_font = font; }
|
||||
void SetBorder(wxCalendarDateBorder border) { m_border = border; }
|
||||
void SetHoliday(bool holiday) { m_holiday = holiday; }
|
||||
|
||||
// accessors
|
||||
bool HasTextColour() const { return m_colText.Ok(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok(); }
|
||||
bool HasBorderColour() const { return m_colBorder.Ok(); }
|
||||
bool HasFont() const { return m_font.Ok(); }
|
||||
bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
|
||||
|
||||
bool IsHoliday() const { return m_holiday; }
|
||||
|
||||
const wxColour& GetTextColour() const { return m_colText; }
|
||||
const wxColour& GetBackgroundColour() const { return m_colBack; }
|
||||
const wxColour& GetBorderColour() const { return m_colBorder; }
|
||||
const wxFont& GetFont() const { return m_font; }
|
||||
wxCalendarDateBorder GetBorder() const { return m_border; }
|
||||
#if defined(__VISAGECPP__)
|
||||
protected:
|
||||
// This has to be here for VisualAge
|
||||
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
{
|
||||
m_border = border;
|
||||
m_holiday = false;
|
||||
}
|
||||
#endif
|
||||
private:
|
||||
wxColour m_colText,
|
||||
m_colBack,
|
||||
m_colBorder;
|
||||
wxFont m_font;
|
||||
wxCalendarDateBorder m_border;
|
||||
bool m_holiday;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarCtrl events
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
|
||||
|
||||
class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
|
||||
{
|
||||
friend class wxCalendarCtrl;
|
||||
public:
|
||||
wxCalendarEvent() { Init(); }
|
||||
inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
|
||||
|
||||
void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
|
||||
wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
m_wday = wxDateTime::Inv_WeekDay;
|
||||
}
|
||||
|
||||
private:
|
||||
wxDateTime::WeekDay m_wday;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCalendarCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// so far we only have a generic version, so keep it simple
|
||||
#include "wx/generic/calctrl.h"
|
||||
|
||||
|
||||
// now we can define the inline ctor using wxCalendarCtrl
|
||||
inline
|
||||
wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
|
||||
: wxDateEvent(cal, cal->GetDate(), type)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// calendar event types and macros for handling them
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
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_MONTH_CHANGED, 952)
|
||||
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_WEEKDAY_CLICKED, 955)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
|
||||
|
||||
#define wxCalendarEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
|
||||
|
||||
#define wx__DECLARE_CALEVT(evt, id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(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_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_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn)
|
||||
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
|
||||
|
||||
#endif // wxUSE_CALENDARCTRL
|
||||
|
||||
#endif // _WX_CALCTRL_H_
|
||||
|
||||
|
|
|
@ -1,252 +1,252 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/caret.h
|
||||
// Purpose: wxCaretBase class - the interface of wxCaret
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 23.05.99
|
||||
// RCS-ID: $Id: caret.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CARET_H_BASE_
|
||||
#define _WX_CARET_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CARET
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers we have to include
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/gdicmn.h" // for wxPoint, wxSize
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 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)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCaretBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// -----
|
||||
// default - use Create
|
||||
wxCaretBase() { Init(); }
|
||||
// create the caret of given (in pixels) width and height and associate
|
||||
// with the given window
|
||||
wxCaretBase(wxWindowBase *window, int width, int height)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(window, width, height);
|
||||
}
|
||||
// same as above
|
||||
wxCaretBase(wxWindowBase *window, const wxSize& size)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(window, size);
|
||||
}
|
||||
|
||||
// a virtual dtor has been provided since this class has virtual members
|
||||
virtual ~wxCaretBase() { }
|
||||
|
||||
// Create() functions - same as ctor but returns the success code
|
||||
// --------------------------------------------------------------
|
||||
|
||||
// same as ctor
|
||||
bool Create(wxWindowBase *window, int width, int height)
|
||||
{ return DoCreate(window, width, height); }
|
||||
// same as ctor
|
||||
bool Create(wxWindowBase *window, const wxSize& size)
|
||||
{ return DoCreate(window, size.x, size.y); }
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// is the caret valid?
|
||||
bool IsOk() const { return m_width != 0 && m_height != 0; }
|
||||
|
||||
// is the caret currently shown?
|
||||
bool IsVisible() const { return m_countVisible > 0; }
|
||||
|
||||
// get the caret position
|
||||
void GetPosition(int *x, int *y) const
|
||||
{
|
||||
if ( x ) *x = m_x;
|
||||
if ( y ) *y = m_y;
|
||||
}
|
||||
wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
|
||||
|
||||
// get the caret size
|
||||
void GetSize(int *width, int *height) const
|
||||
{
|
||||
if ( width ) *width = m_width;
|
||||
if ( height ) *height = m_height;
|
||||
}
|
||||
wxSize GetSize() const { return wxSize(m_width, m_height); }
|
||||
|
||||
// get the window we're associated with
|
||||
wxWindow *GetWindow() const { return (wxWindow *)m_window; }
|
||||
|
||||
// change the size of the caret
|
||||
void SetSize(int width, int height) {
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
DoSize();
|
||||
}
|
||||
void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
|
||||
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
|
||||
// move the caret to given position (in logical coords)
|
||||
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(); }
|
||||
|
||||
// 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
|
||||
// visible
|
||||
virtual void Show(bool show = true)
|
||||
{
|
||||
if ( show )
|
||||
{
|
||||
if ( m_countVisible++ == 0 )
|
||||
DoShow();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( --m_countVisible == 0 )
|
||||
DoHide();
|
||||
}
|
||||
}
|
||||
virtual void Hide() { Show(false); }
|
||||
|
||||
// blink time is measured in milliseconds and is the time elapsed
|
||||
// between 2 inversions of the caret (blink time of the caret is common
|
||||
// to all carets in the Universe, so these functions are static)
|
||||
static int GetBlinkTime();
|
||||
static void SetBlinkTime(int milliseconds);
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// these functions should be called by wxWindow when the window gets/loses
|
||||
// the focus - we create/show and hide/destroy the caret here
|
||||
virtual void OnSetFocus() { }
|
||||
virtual void OnKillFocus() { }
|
||||
|
||||
protected:
|
||||
// these functions may be overriden in the derived classes, but they
|
||||
// should call the base class version first
|
||||
virtual bool DoCreate(wxWindowBase *window, int width, int height)
|
||||
{
|
||||
m_window = window;
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// pure virtuals to implement in the derived class
|
||||
virtual void DoShow() = 0;
|
||||
virtual void DoHide() = 0;
|
||||
virtual void DoMove() = 0;
|
||||
virtual void DoSize() { }
|
||||
|
||||
// the common initialization
|
||||
void Init()
|
||||
{
|
||||
m_window = (wxWindowBase *)NULL;
|
||||
m_x = m_y = 0;
|
||||
m_width = m_height = 0;
|
||||
m_countVisible = 0;
|
||||
}
|
||||
|
||||
// the size of the caret
|
||||
int m_width, m_height;
|
||||
|
||||
// the position of the caret
|
||||
int m_x, m_y;
|
||||
|
||||
// the window we're associated with
|
||||
wxWindowBase *m_window;
|
||||
|
||||
// visibility count: the caret is visible only if it's positive
|
||||
int m_countVisible;
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxCaretBase)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// now include the real thing
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/caret.h"
|
||||
#else
|
||||
#include "wx/generic/caret.h"
|
||||
#endif // platform
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 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
|
||||
// avoid overdrawing the caret
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef wxHAS_CARET_USING_OVERLAYS
|
||||
|
||||
// we don't need to hide the caret if it's rendered using overlays
|
||||
class WXDLLEXPORT wxCaretSuspend
|
||||
{
|
||||
public:
|
||||
wxCaretSuspend(wxWindow *WXUNUSED(win)) {}
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCaretSuspend)
|
||||
};
|
||||
|
||||
#else // !wxHAS_CARET_USING_OVERLAYS
|
||||
|
||||
class WXDLLEXPORT wxCaretSuspend
|
||||
{
|
||||
public:
|
||||
wxCaretSuspend(wxWindow *win)
|
||||
{
|
||||
m_caret = win->GetCaret();
|
||||
m_show = false;
|
||||
if ( m_caret && m_caret->IsVisible() )
|
||||
{
|
||||
m_caret->Hide();
|
||||
m_show = true;
|
||||
}
|
||||
}
|
||||
|
||||
~wxCaretSuspend()
|
||||
{
|
||||
if ( m_caret && m_show )
|
||||
m_caret->Show();
|
||||
}
|
||||
|
||||
private:
|
||||
wxCaret *m_caret;
|
||||
bool m_show;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCaretSuspend)
|
||||
};
|
||||
|
||||
#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
|
||||
|
||||
#endif // wxUSE_CARET
|
||||
|
||||
#endif // _WX_CARET_H_BASE_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/caret.h
|
||||
// Purpose: wxCaretBase class - the interface of wxCaret
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 23.05.99
|
||||
// RCS-ID: $Id: caret.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CARET_H_BASE_
|
||||
#define _WX_CARET_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CARET
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers we have to include
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/gdicmn.h" // for wxPoint, wxSize
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 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)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCaretBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// -----
|
||||
// default - use Create
|
||||
wxCaretBase() { Init(); }
|
||||
// create the caret of given (in pixels) width and height and associate
|
||||
// with the given window
|
||||
wxCaretBase(wxWindowBase *window, int width, int height)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(window, width, height);
|
||||
}
|
||||
// same as above
|
||||
wxCaretBase(wxWindowBase *window, const wxSize& size)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(window, size);
|
||||
}
|
||||
|
||||
// a virtual dtor has been provided since this class has virtual members
|
||||
virtual ~wxCaretBase() { }
|
||||
|
||||
// Create() functions - same as ctor but returns the success code
|
||||
// --------------------------------------------------------------
|
||||
|
||||
// same as ctor
|
||||
bool Create(wxWindowBase *window, int width, int height)
|
||||
{ return DoCreate(window, width, height); }
|
||||
// same as ctor
|
||||
bool Create(wxWindowBase *window, const wxSize& size)
|
||||
{ return DoCreate(window, size.x, size.y); }
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// is the caret valid?
|
||||
bool IsOk() const { return m_width != 0 && m_height != 0; }
|
||||
|
||||
// is the caret currently shown?
|
||||
bool IsVisible() const { return m_countVisible > 0; }
|
||||
|
||||
// get the caret position
|
||||
void GetPosition(int *x, int *y) const
|
||||
{
|
||||
if ( x ) *x = m_x;
|
||||
if ( y ) *y = m_y;
|
||||
}
|
||||
wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
|
||||
|
||||
// get the caret size
|
||||
void GetSize(int *width, int *height) const
|
||||
{
|
||||
if ( width ) *width = m_width;
|
||||
if ( height ) *height = m_height;
|
||||
}
|
||||
wxSize GetSize() const { return wxSize(m_width, m_height); }
|
||||
|
||||
// get the window we're associated with
|
||||
wxWindow *GetWindow() const { return (wxWindow *)m_window; }
|
||||
|
||||
// change the size of the caret
|
||||
void SetSize(int width, int height) {
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
DoSize();
|
||||
}
|
||||
void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
|
||||
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
|
||||
// move the caret to given position (in logical coords)
|
||||
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(); }
|
||||
|
||||
// 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
|
||||
// visible
|
||||
virtual void Show(bool show = true)
|
||||
{
|
||||
if ( show )
|
||||
{
|
||||
if ( m_countVisible++ == 0 )
|
||||
DoShow();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( --m_countVisible == 0 )
|
||||
DoHide();
|
||||
}
|
||||
}
|
||||
virtual void Hide() { Show(false); }
|
||||
|
||||
// blink time is measured in milliseconds and is the time elapsed
|
||||
// between 2 inversions of the caret (blink time of the caret is common
|
||||
// to all carets in the Universe, so these functions are static)
|
||||
static int GetBlinkTime();
|
||||
static void SetBlinkTime(int milliseconds);
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// these functions should be called by wxWindow when the window gets/loses
|
||||
// the focus - we create/show and hide/destroy the caret here
|
||||
virtual void OnSetFocus() { }
|
||||
virtual void OnKillFocus() { }
|
||||
|
||||
protected:
|
||||
// these functions may be overriden in the derived classes, but they
|
||||
// should call the base class version first
|
||||
virtual bool DoCreate(wxWindowBase *window, int width, int height)
|
||||
{
|
||||
m_window = window;
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// pure virtuals to implement in the derived class
|
||||
virtual void DoShow() = 0;
|
||||
virtual void DoHide() = 0;
|
||||
virtual void DoMove() = 0;
|
||||
virtual void DoSize() { }
|
||||
|
||||
// the common initialization
|
||||
void Init()
|
||||
{
|
||||
m_window = (wxWindowBase *)NULL;
|
||||
m_x = m_y = 0;
|
||||
m_width = m_height = 0;
|
||||
m_countVisible = 0;
|
||||
}
|
||||
|
||||
// the size of the caret
|
||||
int m_width, m_height;
|
||||
|
||||
// the position of the caret
|
||||
int m_x, m_y;
|
||||
|
||||
// the window we're associated with
|
||||
wxWindowBase *m_window;
|
||||
|
||||
// visibility count: the caret is visible only if it's positive
|
||||
int m_countVisible;
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxCaretBase)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// now include the real thing
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/caret.h"
|
||||
#else
|
||||
#include "wx/generic/caret.h"
|
||||
#endif // platform
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// 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
|
||||
// avoid overdrawing the caret
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef wxHAS_CARET_USING_OVERLAYS
|
||||
|
||||
// we don't need to hide the caret if it's rendered using overlays
|
||||
class WXDLLEXPORT wxCaretSuspend
|
||||
{
|
||||
public:
|
||||
wxCaretSuspend(wxWindow *WXUNUSED(win)) {}
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCaretSuspend)
|
||||
};
|
||||
|
||||
#else // !wxHAS_CARET_USING_OVERLAYS
|
||||
|
||||
class WXDLLEXPORT wxCaretSuspend
|
||||
{
|
||||
public:
|
||||
wxCaretSuspend(wxWindow *win)
|
||||
{
|
||||
m_caret = win->GetCaret();
|
||||
m_show = false;
|
||||
if ( m_caret && m_caret->IsVisible() )
|
||||
{
|
||||
m_caret->Hide();
|
||||
m_show = true;
|
||||
}
|
||||
}
|
||||
|
||||
~wxCaretSuspend()
|
||||
{
|
||||
if ( m_caret && m_show )
|
||||
m_caret->Show();
|
||||
}
|
||||
|
||||
private:
|
||||
wxCaret *m_caret;
|
||||
bool m_show;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCaretSuspend)
|
||||
};
|
||||
|
||||
#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
|
||||
|
||||
#endif // wxUSE_CARET
|
||||
|
||||
#endif // _WX_CARET_H_BASE_
|
||||
|
|
|
@ -1,156 +1,156 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/checkbox.h
|
||||
// Purpose: wxCheckBox class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07.09.00
|
||||
// RCS-ID: $Id: checkbox.h 39901 2006-06-30 10:51:44Z VS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKBOX_H_BASE_
|
||||
#define _WX_CHECKBOX_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
|
||||
/*
|
||||
* wxCheckBox style flags
|
||||
* (Using wxCHK_* because wxCB_* is used by wxComboBox).
|
||||
* Determine whether to use a 3-state or 2-state
|
||||
* checkbox. 3-state enables to differentiate
|
||||
* between 'unchecked', 'checked' and 'undetermined'.
|
||||
*/
|
||||
#define wxCHK_2STATE 0x0000
|
||||
#define wxCHK_3STATE 0x1000
|
||||
|
||||
/*
|
||||
* If this style is set the user can set the checkbox to the
|
||||
* undetermined state. If not set the undetermined set can only
|
||||
* be set programmatically.
|
||||
* This style can only be used with 3 state checkboxes.
|
||||
*/
|
||||
#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
|
||||
|
||||
/*
|
||||
* The possible states of a 3-state checkbox (Compatible
|
||||
* with the 2-state checkbox).
|
||||
*/
|
||||
enum wxCheckBoxState
|
||||
{
|
||||
wxCHK_UNCHECKED,
|
||||
wxCHK_CHECKED,
|
||||
wxCHK_UNDETERMINED /* 3-state checkbox only */
|
||||
};
|
||||
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCheckBox: a control which shows a label and a box which may be checked
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCheckBoxBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxCheckBoxBase() { }
|
||||
|
||||
// set/get the checked status of the listbox
|
||||
virtual void SetValue(bool value) = 0;
|
||||
virtual bool GetValue() const = 0;
|
||||
|
||||
bool IsChecked() const
|
||||
{
|
||||
wxASSERT_MSG( !Is3State(), wxT("Calling IsChecked() doesn't make sense for")
|
||||
wxT(" a three state checkbox, Use Get3StateValue() instead") );
|
||||
|
||||
return GetValue();
|
||||
}
|
||||
|
||||
wxCheckBoxState Get3StateValue() const
|
||||
{
|
||||
wxCheckBoxState state = DoGet3StateValue();
|
||||
|
||||
if ( state == wxCHK_UNDETERMINED && !Is3State() )
|
||||
{
|
||||
// Undetermined state with a 2-state checkbox??
|
||||
wxFAIL_MSG( wxT("DoGet3StateValue() says the 2-state checkbox is ")
|
||||
wxT("in an undetermined/third state") );
|
||||
|
||||
state = wxCHK_UNCHECKED;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
void Set3StateValue(wxCheckBoxState state)
|
||||
{
|
||||
if ( state == wxCHK_UNDETERMINED && !Is3State() )
|
||||
{
|
||||
wxFAIL_MSG(wxT("Setting a 2-state checkbox to undetermined state"));
|
||||
state = wxCHK_UNCHECKED;
|
||||
}
|
||||
|
||||
DoSet3StateValue(state);
|
||||
}
|
||||
|
||||
bool Is3State() const { return HasFlag(wxCHK_3STATE); }
|
||||
|
||||
bool Is3rdStateAllowedForUser() const
|
||||
{
|
||||
return HasFlag(wxCHK_ALLOW_3RD_STATE_FOR_USER);
|
||||
}
|
||||
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
||||
// wxCheckBox-specific processing after processing the update event
|
||||
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
wxControl::DoUpdateWindowUI(event);
|
||||
|
||||
if ( event.GetSetChecked() )
|
||||
SetValue(event.GetChecked());
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; }
|
||||
|
||||
virtual wxCheckBoxState DoGet3StateValue() const
|
||||
{
|
||||
wxFAIL;
|
||||
return wxCHK_UNCHECKED;
|
||||
}
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxCheckBoxBase)
|
||||
};
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/checkbox.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/checkbox.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/checkbox.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/checkbox.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/checkbox.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/checkbox.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/checkbox.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/checkbox.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/checkbox.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHECKBOX
|
||||
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_BASE_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/checkbox.h
|
||||
// Purpose: wxCheckBox class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07.09.00
|
||||
// RCS-ID: $Id: checkbox.h 39901 2006-06-30 10:51:44Z VS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKBOX_H_BASE_
|
||||
#define _WX_CHECKBOX_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
|
||||
/*
|
||||
* wxCheckBox style flags
|
||||
* (Using wxCHK_* because wxCB_* is used by wxComboBox).
|
||||
* Determine whether to use a 3-state or 2-state
|
||||
* checkbox. 3-state enables to differentiate
|
||||
* between 'unchecked', 'checked' and 'undetermined'.
|
||||
*/
|
||||
#define wxCHK_2STATE 0x0000
|
||||
#define wxCHK_3STATE 0x1000
|
||||
|
||||
/*
|
||||
* If this style is set the user can set the checkbox to the
|
||||
* undetermined state. If not set the undetermined set can only
|
||||
* be set programmatically.
|
||||
* This style can only be used with 3 state checkboxes.
|
||||
*/
|
||||
#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
|
||||
|
||||
/*
|
||||
* The possible states of a 3-state checkbox (Compatible
|
||||
* with the 2-state checkbox).
|
||||
*/
|
||||
enum wxCheckBoxState
|
||||
{
|
||||
wxCHK_UNCHECKED,
|
||||
wxCHK_CHECKED,
|
||||
wxCHK_UNDETERMINED /* 3-state checkbox only */
|
||||
};
|
||||
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCheckBox: a control which shows a label and a box which may be checked
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCheckBoxBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxCheckBoxBase() { }
|
||||
|
||||
// set/get the checked status of the listbox
|
||||
virtual void SetValue(bool value) = 0;
|
||||
virtual bool GetValue() const = 0;
|
||||
|
||||
bool IsChecked() const
|
||||
{
|
||||
wxASSERT_MSG( !Is3State(), wxT("Calling IsChecked() doesn't make sense for")
|
||||
wxT(" a three state checkbox, Use Get3StateValue() instead") );
|
||||
|
||||
return GetValue();
|
||||
}
|
||||
|
||||
wxCheckBoxState Get3StateValue() const
|
||||
{
|
||||
wxCheckBoxState state = DoGet3StateValue();
|
||||
|
||||
if ( state == wxCHK_UNDETERMINED && !Is3State() )
|
||||
{
|
||||
// Undetermined state with a 2-state checkbox??
|
||||
wxFAIL_MSG( wxT("DoGet3StateValue() says the 2-state checkbox is ")
|
||||
wxT("in an undetermined/third state") );
|
||||
|
||||
state = wxCHK_UNCHECKED;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
void Set3StateValue(wxCheckBoxState state)
|
||||
{
|
||||
if ( state == wxCHK_UNDETERMINED && !Is3State() )
|
||||
{
|
||||
wxFAIL_MSG(wxT("Setting a 2-state checkbox to undetermined state"));
|
||||
state = wxCHK_UNCHECKED;
|
||||
}
|
||||
|
||||
DoSet3StateValue(state);
|
||||
}
|
||||
|
||||
bool Is3State() const { return HasFlag(wxCHK_3STATE); }
|
||||
|
||||
bool Is3rdStateAllowedForUser() const
|
||||
{
|
||||
return HasFlag(wxCHK_ALLOW_3RD_STATE_FOR_USER);
|
||||
}
|
||||
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
||||
// wxCheckBox-specific processing after processing the update event
|
||||
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
wxControl::DoUpdateWindowUI(event);
|
||||
|
||||
if ( event.GetSetChecked() )
|
||||
SetValue(event.GetChecked());
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; }
|
||||
|
||||
virtual wxCheckBoxState DoGet3StateValue() const
|
||||
{
|
||||
wxFAIL;
|
||||
return wxCHK_UNCHECKED;
|
||||
}
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxCheckBoxBase)
|
||||
};
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/checkbox.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/checkbox.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/checkbox.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/checkbox.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/checkbox.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/checkbox.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/checkbox.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/checkbox.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/checkbox.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHECKBOX
|
||||
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_BASE_
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/checklst.h
|
||||
// Purpose: wxCheckListBox class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 12.09.00
|
||||
// RCS-ID: $Id: checklst.h 38319 2006-03-23 22:05:23Z VZ $
|
||||
// Copyright: (c) Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKLST_H_BASE_
|
||||
#define _WX_CHECKLST_H_BASE_
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
|
||||
#include "wx/listbox.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCheckListBox: a listbox whose items may be checked
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCheckListBoxBase : public
|
||||
#ifdef __WXWINCE__
|
||||
// keep virtuals synchronised
|
||||
wxListBoxBase
|
||||
#else
|
||||
wxListBox
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
wxCheckListBoxBase() { }
|
||||
|
||||
// check list box specific methods
|
||||
virtual bool IsChecked(unsigned int item) const = 0;
|
||||
virtual void Check(unsigned int item, bool check = true) = 0;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
|
||||
};
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/checklst.h"
|
||||
#elif defined(__WXWINCE__)
|
||||
#include "wx/msw/wince/checklst.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/checklst.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/checklst.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/checklst.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/checklst.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/checklst.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/checklst.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/checklst.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
#endif
|
||||
// _WX_CHECKLST_H_BASE_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/checklst.h
|
||||
// Purpose: wxCheckListBox class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 12.09.00
|
||||
// RCS-ID: $Id: checklst.h 38319 2006-03-23 22:05:23Z VZ $
|
||||
// Copyright: (c) Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKLST_H_BASE_
|
||||
#define _WX_CHECKLST_H_BASE_
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
|
||||
#include "wx/listbox.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCheckListBox: a listbox whose items may be checked
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCheckListBoxBase : public
|
||||
#ifdef __WXWINCE__
|
||||
// keep virtuals synchronised
|
||||
wxListBoxBase
|
||||
#else
|
||||
wxListBox
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
wxCheckListBoxBase() { }
|
||||
|
||||
// check list box specific methods
|
||||
virtual bool IsChecked(unsigned int item) const = 0;
|
||||
virtual void Check(unsigned int item, bool check = true) = 0;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
|
||||
};
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/checklst.h"
|
||||
#elif defined(__WXWINCE__)
|
||||
#include "wx/msw/wince/checklst.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/checklst.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/checklst.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/checklst.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/checklst.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/checklst.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/checklst.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/checklst.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
#endif
|
||||
// _WX_CHECKLST_H_BASE_
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,22 +1,22 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/choicdgg.h
|
||||
// Purpose: Includes generic choice dialog file
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id: choicdlg.h 33948 2005-05-04 18:57:50Z JS $
|
||||
// Copyright: Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICDLG_H_BASE_
|
||||
#define _WX_CHOICDLG_H_BASE_
|
||||
|
||||
#if wxUSE_CHOICEDLG
|
||||
|
||||
#include "wx/generic/choicdgg.h"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CHOICDLG_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/choicdgg.h
|
||||
// Purpose: Includes generic choice dialog file
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id: choicdlg.h 33948 2005-05-04 18:57:50Z JS $
|
||||
// Copyright: Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICDLG_H_BASE_
|
||||
#define _WX_CHOICDLG_H_BASE_
|
||||
|
||||
#if wxUSE_CHOICEDLG
|
||||
|
||||
#include "wx/generic/choicdgg.h"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CHOICDLG_H_BASE_
|
||||
|
|
|
@ -1,88 +1,88 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/choice.h
|
||||
// Purpose: wxChoice class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 26.07.99
|
||||
// RCS-ID: $Id: choice.h 42727 2006-10-30 16:04:27Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICE_H_BASE_
|
||||
#define _WX_CHOICE_H_BASE_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
|
||||
#include "wx/ctrlsub.h" // the base class
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxChoice allows to select one of a non-modifiable list of strings
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
|
||||
{
|
||||
public:
|
||||
wxChoiceBase() { }
|
||||
virtual ~wxChoiceBase();
|
||||
|
||||
// all generic methods are in wxControlWithItems
|
||||
|
||||
// get the current selection: this can only be different from the normal
|
||||
// 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
|
||||
// currently always on platforms other than MSW) this is the same as
|
||||
// GetSelection()
|
||||
virtual int GetCurrentSelection() const { return GetSelection(); }
|
||||
|
||||
// set/get the number of columns in the control (as they're not supported on
|
||||
// most platforms, they do nothing by default)
|
||||
virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
|
||||
virtual int GetColumns() const { return 1 ; }
|
||||
|
||||
// emulate selecting the item event.GetInt()
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxChoiceBase)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-dependent class definition
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/choice.h"
|
||||
#elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
|
||||
#include "wx/msw/wince/choicece.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/choice.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/choice.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/choice.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/choice.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/choice.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/choice.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/choice.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHOICE
|
||||
|
||||
#endif // _WX_CHOICE_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/choice.h
|
||||
// Purpose: wxChoice class interface
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 26.07.99
|
||||
// RCS-ID: $Id: choice.h 42727 2006-10-30 16:04:27Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICE_H_BASE_
|
||||
#define _WX_CHOICE_H_BASE_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
|
||||
#include "wx/ctrlsub.h" // the base class
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxChoice allows to select one of a non-modifiable list of strings
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
|
||||
{
|
||||
public:
|
||||
wxChoiceBase() { }
|
||||
virtual ~wxChoiceBase();
|
||||
|
||||
// all generic methods are in wxControlWithItems
|
||||
|
||||
// get the current selection: this can only be different from the normal
|
||||
// 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
|
||||
// currently always on platforms other than MSW) this is the same as
|
||||
// GetSelection()
|
||||
virtual int GetCurrentSelection() const { return GetSelection(); }
|
||||
|
||||
// set/get the number of columns in the control (as they're not supported on
|
||||
// most platforms, they do nothing by default)
|
||||
virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
|
||||
virtual int GetColumns() const { return 1 ; }
|
||||
|
||||
// emulate selecting the item event.GetInt()
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
private:
|
||||
DECLARE_NO_COPY_CLASS(wxChoiceBase)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include the platform-dependent class definition
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/choice.h"
|
||||
#elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
|
||||
#include "wx/msw/wince/choicece.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/choice.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/choice.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/choice.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/choice.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/choice.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/choice.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/choice.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHOICE
|
||||
|
||||
#endif // _WX_CHOICE_H_BASE_
|
||||
|
|
|
@ -1,154 +1,154 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/choicebk.h
|
||||
// Purpose: wxChoicebook: wxChoice and wxNotebook combination
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
|
||||
// Created: 15.09.04
|
||||
// RCS-ID: $Id: choicebk.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICEBOOK_H_
|
||||
#define _WX_CHOICEBOOK_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHOICEBOOK
|
||||
|
||||
#include "wx/bookctrl.h"
|
||||
#include "wx/choice.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxChoice;
|
||||
|
||||
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED;
|
||||
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING;
|
||||
|
||||
// wxChoicebook flags
|
||||
#define wxCHB_DEFAULT wxBK_DEFAULT
|
||||
#define wxCHB_TOP wxBK_TOP
|
||||
#define wxCHB_BOTTOM wxBK_BOTTOM
|
||||
#define wxCHB_LEFT wxBK_LEFT
|
||||
#define wxCHB_RIGHT wxBK_RIGHT
|
||||
#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxChoicebook
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase
|
||||
{
|
||||
public:
|
||||
wxChoicebook()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxChoicebook(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
// quasi ctor
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
|
||||
virtual int GetSelection() const;
|
||||
virtual bool SetPageText(size_t n, const wxString& strText);
|
||||
virtual wxString GetPageText(size_t n) const;
|
||||
virtual int GetPageImage(size_t n) const;
|
||||
virtual bool SetPageImage(size_t n, int imageId);
|
||||
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
|
||||
virtual bool InsertPage(size_t n,
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = -1);
|
||||
virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); }
|
||||
virtual int ChangeSelection(size_t n) { return DoSetSelection(n); }
|
||||
virtual void SetImageList(wxImageList *imageList);
|
||||
|
||||
virtual bool DeleteAllPages();
|
||||
|
||||
// returns the choice control
|
||||
wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
|
||||
|
||||
protected:
|
||||
virtual wxWindow *DoRemovePage(size_t page);
|
||||
|
||||
// get the size which the choice control should have
|
||||
virtual wxSize GetControllerSize() const;
|
||||
|
||||
void UpdateSelectedPage(size_t newsel)
|
||||
{
|
||||
m_selection = newsel;
|
||||
GetChoiceCtrl()->Select(newsel);
|
||||
}
|
||||
|
||||
wxBookCtrlBaseEvent* CreatePageChangingEvent() const;
|
||||
void MakeChangedEvent(wxBookCtrlBaseEvent &event);
|
||||
|
||||
// event handlers
|
||||
void OnChoiceSelected(wxCommandEvent& event);
|
||||
|
||||
// the currently selected page or wxNOT_FOUND if none
|
||||
int m_selection;
|
||||
|
||||
private:
|
||||
// common part of all constructors
|
||||
void Init();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoicebook)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// choicebook event class and related stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlBaseEvent
|
||||
{
|
||||
public:
|
||||
wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
||||
int nSel = -1, int nOldSel = -1)
|
||||
: wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel)
|
||||
{
|
||||
}
|
||||
|
||||
wxChoicebookEvent(const wxChoicebookEvent& event)
|
||||
: wxBookCtrlBaseEvent(event)
|
||||
{
|
||||
}
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxChoicebookEvent(*this); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChoicebookEvent)
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxChoicebookEventFunction)(wxChoicebookEvent&);
|
||||
|
||||
#define wxChoicebookEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChoicebookEventFunction, &func)
|
||||
|
||||
#define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn))
|
||||
|
||||
#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn))
|
||||
|
||||
#endif // wxUSE_CHOICEBOOK
|
||||
|
||||
#endif // _WX_CHOICEBOOK_H_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/choicebk.h
|
||||
// Purpose: wxChoicebook: wxChoice and wxNotebook combination
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
|
||||
// Created: 15.09.04
|
||||
// RCS-ID: $Id: choicebk.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICEBOOK_H_
|
||||
#define _WX_CHOICEBOOK_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHOICEBOOK
|
||||
|
||||
#include "wx/bookctrl.h"
|
||||
#include "wx/choice.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxChoice;
|
||||
|
||||
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED;
|
||||
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING;
|
||||
|
||||
// wxChoicebook flags
|
||||
#define wxCHB_DEFAULT wxBK_DEFAULT
|
||||
#define wxCHB_TOP wxBK_TOP
|
||||
#define wxCHB_BOTTOM wxBK_BOTTOM
|
||||
#define wxCHB_LEFT wxBK_LEFT
|
||||
#define wxCHB_RIGHT wxBK_RIGHT
|
||||
#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxChoicebook
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase
|
||||
{
|
||||
public:
|
||||
wxChoicebook()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxChoicebook(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
// quasi ctor
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
|
||||
virtual int GetSelection() const;
|
||||
virtual bool SetPageText(size_t n, const wxString& strText);
|
||||
virtual wxString GetPageText(size_t n) const;
|
||||
virtual int GetPageImage(size_t n) const;
|
||||
virtual bool SetPageImage(size_t n, int imageId);
|
||||
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
|
||||
virtual bool InsertPage(size_t n,
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = -1);
|
||||
virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); }
|
||||
virtual int ChangeSelection(size_t n) { return DoSetSelection(n); }
|
||||
virtual void SetImageList(wxImageList *imageList);
|
||||
|
||||
virtual bool DeleteAllPages();
|
||||
|
||||
// returns the choice control
|
||||
wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
|
||||
|
||||
protected:
|
||||
virtual wxWindow *DoRemovePage(size_t page);
|
||||
|
||||
// get the size which the choice control should have
|
||||
virtual wxSize GetControllerSize() const;
|
||||
|
||||
void UpdateSelectedPage(size_t newsel)
|
||||
{
|
||||
m_selection = newsel;
|
||||
GetChoiceCtrl()->Select(newsel);
|
||||
}
|
||||
|
||||
wxBookCtrlBaseEvent* CreatePageChangingEvent() const;
|
||||
void MakeChangedEvent(wxBookCtrlBaseEvent &event);
|
||||
|
||||
// event handlers
|
||||
void OnChoiceSelected(wxCommandEvent& event);
|
||||
|
||||
// the currently selected page or wxNOT_FOUND if none
|
||||
int m_selection;
|
||||
|
||||
private:
|
||||
// common part of all constructors
|
||||
void Init();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoicebook)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// choicebook event class and related stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlBaseEvent
|
||||
{
|
||||
public:
|
||||
wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
||||
int nSel = -1, int nOldSel = -1)
|
||||
: wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel)
|
||||
{
|
||||
}
|
||||
|
||||
wxChoicebookEvent(const wxChoicebookEvent& event)
|
||||
: wxBookCtrlBaseEvent(event)
|
||||
{
|
||||
}
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxChoicebookEvent(*this); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChoicebookEvent)
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxChoicebookEventFunction)(wxChoicebookEvent&);
|
||||
|
||||
#define wxChoicebookEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChoicebookEventFunction, &func)
|
||||
|
||||
#define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn))
|
||||
|
||||
#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn))
|
||||
|
||||
#endif // wxUSE_CHOICEBOOK
|
||||
|
||||
#endif // _WX_CHOICEBOOK_H_
|
||||
|
|
|
@ -1,145 +1,145 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/clipbrd.h
|
||||
// Purpose: wxClipboad class and clipboard functions
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 19.10.99
|
||||
// RCS-ID: $Id: clipbrd.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) wxWidgets Team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLIPBRD_H_BASE_
|
||||
#define _WX_CLIPBRD_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/wxchar.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDataFormat;
|
||||
class WXDLLIMPEXP_FWD_CORE wxDataObject;
|
||||
class WXDLLIMPEXP_FWD_CORE wxClipboard;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxClipboard represents the system clipboard. Normally, you should use
|
||||
// wxTheClipboard which is a global pointer to the (unique) clipboard.
|
||||
//
|
||||
// Clipboard can be used to copy data to/paste data from. It works together
|
||||
// with wxDataObject.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxClipboardBase : public wxObject
|
||||
{
|
||||
public:
|
||||
wxClipboardBase() {}
|
||||
|
||||
// open the clipboard before Add/SetData() and GetData()
|
||||
virtual bool Open() = 0;
|
||||
|
||||
// close the clipboard after Add/SetData() and GetData()
|
||||
virtual void Close() = 0;
|
||||
|
||||
// query whether the clipboard is opened
|
||||
virtual bool IsOpened() const = 0;
|
||||
|
||||
// add to the clipboard data
|
||||
//
|
||||
// NB: the clipboard owns the pointer and will delete it, so data must be
|
||||
// allocated on the heap
|
||||
virtual bool AddData( wxDataObject *data ) = 0;
|
||||
|
||||
// set the clipboard data, this is the same as Clear() followed by
|
||||
// AddData()
|
||||
virtual bool SetData( wxDataObject *data ) = 0;
|
||||
|
||||
// ask if data in correct format is available
|
||||
virtual bool IsSupported( const wxDataFormat& format ) = 0;
|
||||
|
||||
// fill data with data on the clipboard (if available)
|
||||
virtual bool GetData( wxDataObject& data ) = 0;
|
||||
|
||||
// clears wxTheClipboard and the system's clipboard if possible
|
||||
virtual void Clear() = 0;
|
||||
|
||||
// flushes the clipboard: this means that the data which is currently on
|
||||
// clipboard will stay available even after the application exits (possibly
|
||||
// eating memory), otherwise the clipboard will be emptied on exit
|
||||
virtual bool Flush() { return false; }
|
||||
|
||||
// X11 has two clipboards which get selected by this call. Empty on MSW.
|
||||
virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
|
||||
|
||||
// Returns global instance (wxTheClipboard) of the object:
|
||||
static wxClipboard *Get();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// The global clipboard object - backward compatible access macro:
|
||||
#define wxTheClipboard (wxClipboard::Get())
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include platform-specific class declaration
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/clipbrd.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/clipbrd.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/clipbrd.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/clipbrd.h"
|
||||
#elif defined(__WXX11__)
|
||||
#include "wx/x11/clipbrd.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/mgl/clipbrd.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/clipbrd.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/clipbrd.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/clipbrd.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// helpful class for opening the clipboard and automatically closing it
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxClipboardLocker
|
||||
{
|
||||
public:
|
||||
wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL)
|
||||
{
|
||||
m_clipboard = clipboard ? clipboard : wxTheClipboard;
|
||||
if ( m_clipboard )
|
||||
{
|
||||
m_clipboard->Open();
|
||||
}
|
||||
}
|
||||
|
||||
bool operator!() const { return !m_clipboard->IsOpened(); }
|
||||
|
||||
~wxClipboardLocker()
|
||||
{
|
||||
if ( m_clipboard )
|
||||
{
|
||||
m_clipboard->Close();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
wxClipboard *m_clipboard;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxClipboardLocker)
|
||||
};
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
#endif // _WX_CLIPBRD_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/clipbrd.h
|
||||
// Purpose: wxClipboad class and clipboard functions
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 19.10.99
|
||||
// RCS-ID: $Id: clipbrd.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) wxWidgets Team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLIPBRD_H_BASE_
|
||||
#define _WX_CLIPBRD_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/wxchar.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDataFormat;
|
||||
class WXDLLIMPEXP_FWD_CORE wxDataObject;
|
||||
class WXDLLIMPEXP_FWD_CORE wxClipboard;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxClipboard represents the system clipboard. Normally, you should use
|
||||
// wxTheClipboard which is a global pointer to the (unique) clipboard.
|
||||
//
|
||||
// Clipboard can be used to copy data to/paste data from. It works together
|
||||
// with wxDataObject.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxClipboardBase : public wxObject
|
||||
{
|
||||
public:
|
||||
wxClipboardBase() {}
|
||||
|
||||
// open the clipboard before Add/SetData() and GetData()
|
||||
virtual bool Open() = 0;
|
||||
|
||||
// close the clipboard after Add/SetData() and GetData()
|
||||
virtual void Close() = 0;
|
||||
|
||||
// query whether the clipboard is opened
|
||||
virtual bool IsOpened() const = 0;
|
||||
|
||||
// add to the clipboard data
|
||||
//
|
||||
// NB: the clipboard owns the pointer and will delete it, so data must be
|
||||
// allocated on the heap
|
||||
virtual bool AddData( wxDataObject *data ) = 0;
|
||||
|
||||
// set the clipboard data, this is the same as Clear() followed by
|
||||
// AddData()
|
||||
virtual bool SetData( wxDataObject *data ) = 0;
|
||||
|
||||
// ask if data in correct format is available
|
||||
virtual bool IsSupported( const wxDataFormat& format ) = 0;
|
||||
|
||||
// fill data with data on the clipboard (if available)
|
||||
virtual bool GetData( wxDataObject& data ) = 0;
|
||||
|
||||
// clears wxTheClipboard and the system's clipboard if possible
|
||||
virtual void Clear() = 0;
|
||||
|
||||
// flushes the clipboard: this means that the data which is currently on
|
||||
// clipboard will stay available even after the application exits (possibly
|
||||
// eating memory), otherwise the clipboard will be emptied on exit
|
||||
virtual bool Flush() { return false; }
|
||||
|
||||
// X11 has two clipboards which get selected by this call. Empty on MSW.
|
||||
virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
|
||||
|
||||
// Returns global instance (wxTheClipboard) of the object:
|
||||
static wxClipboard *Get();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// The global clipboard object - backward compatible access macro:
|
||||
#define wxTheClipboard (wxClipboard::Get())
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// include platform-specific class declaration
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/clipbrd.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/clipbrd.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/clipbrd.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/clipbrd.h"
|
||||
#elif defined(__WXX11__)
|
||||
#include "wx/x11/clipbrd.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/mgl/clipbrd.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/clipbrd.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/clipbrd.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/clipbrd.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// helpful class for opening the clipboard and automatically closing it
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxClipboardLocker
|
||||
{
|
||||
public:
|
||||
wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL)
|
||||
{
|
||||
m_clipboard = clipboard ? clipboard : wxTheClipboard;
|
||||
if ( m_clipboard )
|
||||
{
|
||||
m_clipboard->Open();
|
||||
}
|
||||
}
|
||||
|
||||
bool operator!() const { return !m_clipboard->IsOpened(); }
|
||||
|
||||
~wxClipboardLocker()
|
||||
{
|
||||
if ( m_clipboard )
|
||||
{
|
||||
m_clipboard->Close();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
wxClipboard *m_clipboard;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxClipboardLocker)
|
||||
};
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
#endif // _WX_CLIPBRD_H_BASE_
|
||||
|
|
|
@ -1,273 +1,273 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/clntdata.h
|
||||
// Purpose: A mixin class for holding a wxClientData or void pointer
|
||||
// Author: Robin Dunn
|
||||
// Modified by:
|
||||
// Created: 9-Oct-2001
|
||||
// RCS-ID: $Id: clntdata.h 36973 2006-01-18 16:45:41Z JS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLNTDATAH__
|
||||
#define _WX_CLNTDATAH__
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/hashmap.h"
|
||||
|
||||
typedef int (*wxShadowObjectMethod)(void*, void*);
|
||||
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
|
||||
wxShadowObjectMethod,
|
||||
wxShadowObjectMethods,
|
||||
class WXDLLIMPEXP_BASE
|
||||
);
|
||||
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
|
||||
void *,
|
||||
wxShadowObjectFields,
|
||||
class WXDLLIMPEXP_BASE
|
||||
);
|
||||
|
||||
class WXDLLIMPEXP_BASE wxShadowObject
|
||||
{
|
||||
public:
|
||||
wxShadowObject() { }
|
||||
|
||||
void AddMethod( const wxString &name, wxShadowObjectMethod method )
|
||||
{
|
||||
wxShadowObjectMethods::iterator it = m_methods.find( name );
|
||||
if (it == m_methods.end())
|
||||
m_methods[ name ] = method;
|
||||
else
|
||||
it->second = method;
|
||||
}
|
||||
|
||||
bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue )
|
||||
{
|
||||
wxShadowObjectMethods::iterator it = m_methods.find( name );
|
||||
if (it == m_methods.end())
|
||||
return false;
|
||||
wxShadowObjectMethod method = it->second;
|
||||
int ret = (*method)(window, param);
|
||||
if (returnValue)
|
||||
*returnValue = ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddField( const wxString &name, void* initialValue = NULL )
|
||||
{
|
||||
wxShadowObjectFields::iterator it = m_fields.find( name );
|
||||
if (it == m_fields.end())
|
||||
m_fields[ name ] = initialValue;
|
||||
else
|
||||
it->second = initialValue;
|
||||
}
|
||||
|
||||
void SetField( const wxString &name, void* value )
|
||||
{
|
||||
wxShadowObjectFields::iterator it = m_fields.find( name );
|
||||
if (it == m_fields.end())
|
||||
return;
|
||||
it->second = value;
|
||||
}
|
||||
|
||||
void* GetField( const wxString &name, void *defaultValue = NULL )
|
||||
{
|
||||
wxShadowObjectFields::iterator it = m_fields.find( name );
|
||||
if (it == m_fields.end())
|
||||
return defaultValue;
|
||||
return it->second;
|
||||
}
|
||||
|
||||
private:
|
||||
wxShadowObjectMethods m_methods;
|
||||
wxShadowObjectFields m_fields;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// what kind of client data do we have?
|
||||
enum wxClientDataType
|
||||
{
|
||||
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_Void // client data is untyped and we don't own it
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxClientData
|
||||
{
|
||||
public:
|
||||
wxClientData() { }
|
||||
virtual ~wxClientData() { }
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxStringClientData : public wxClientData
|
||||
{
|
||||
public:
|
||||
wxStringClientData() : m_data() { }
|
||||
wxStringClientData( const wxString &data ) : m_data(data) { }
|
||||
void SetData( const wxString &data ) { m_data = data; }
|
||||
const wxString& GetData() const { return m_data; }
|
||||
|
||||
private:
|
||||
wxString m_data;
|
||||
};
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// by the container - but not both of them
|
||||
//
|
||||
// NOTE: This functionality is currently duplicated in wxEvtHandler in order
|
||||
// to avoid having more than one vtable in that class hierarchy.
|
||||
|
||||
class WXDLLIMPEXP_BASE wxClientDataContainer
|
||||
{
|
||||
public:
|
||||
wxClientDataContainer();
|
||||
virtual ~wxClientDataContainer();
|
||||
|
||||
void SetClientObject( wxClientData *data ) { DoSetClientObject(data); }
|
||||
wxClientData *GetClientObject() const { return DoGetClientObject(); }
|
||||
|
||||
void SetClientData( void *data ) { DoSetClientData(data); }
|
||||
void *GetClientData() const { return DoGetClientData(); }
|
||||
|
||||
protected:
|
||||
// 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
|
||||
// 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
|
||||
// versa.
|
||||
union
|
||||
{
|
||||
wxClientData *m_clientObject;
|
||||
void *m_clientData;
|
||||
};
|
||||
|
||||
// client data accessors
|
||||
virtual void DoSetClientObject( wxClientData *data );
|
||||
virtual wxClientData *DoGetClientObject() const;
|
||||
|
||||
virtual void DoSetClientData( void *data );
|
||||
virtual void *DoGetClientData() const;
|
||||
|
||||
// what kind of data do we have?
|
||||
wxClientDataType m_clientDataType;
|
||||
|
||||
};
|
||||
|
||||
#include "wx/vector.h"
|
||||
|
||||
struct WXDLLIMPEXP_BASE wxClientDataDictionaryPair
|
||||
{
|
||||
wxClientDataDictionaryPair( size_t idx ) : index( idx ), data( 0 ) { }
|
||||
|
||||
size_t index;
|
||||
wxClientData* data;
|
||||
};
|
||||
|
||||
_WX_DECLARE_VECTOR(
|
||||
wxClientDataDictionaryPair,
|
||||
wxClientDataDictionaryPairVector,
|
||||
WXDLLIMPEXP_BASE
|
||||
);
|
||||
|
||||
// this class is used internally to maintain the association between items
|
||||
// of (some subclasses of) wxControlWithItems and their client data
|
||||
// NOTE: this class does not keep track of whether it contains
|
||||
// wxClientData or void*. The client must ensure that
|
||||
// it does not contain a mix of the two, and that
|
||||
// DestroyData is called if it contains wxClientData
|
||||
class WXDLLIMPEXP_BASE wxClientDataDictionary
|
||||
{
|
||||
public:
|
||||
wxClientDataDictionary() {}
|
||||
|
||||
// deletes all the data
|
||||
void DestroyData()
|
||||
{
|
||||
for( size_t i = 0, end = m_vec.size(); i != end; ++i )
|
||||
delete m_vec[i].data;
|
||||
m_vec.clear();
|
||||
}
|
||||
|
||||
// if data for the given index is not present, add it,
|
||||
// if it is present, delete the old data and replace it with
|
||||
// the new one
|
||||
void Set( size_t index, wxClientData* data, bool doDelete )
|
||||
{
|
||||
size_t ptr = Find( index );
|
||||
|
||||
if( !data )
|
||||
{
|
||||
if( ptr == m_vec.size() ) return;
|
||||
if( doDelete )
|
||||
delete m_vec[ptr].data;
|
||||
m_vec.erase( ptr );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ptr == m_vec.size() )
|
||||
{
|
||||
m_vec.push_back( wxClientDataDictionaryPair( index ) );
|
||||
ptr = m_vec.size() - 1;
|
||||
}
|
||||
|
||||
if( doDelete )
|
||||
delete m_vec[ptr].data;
|
||||
m_vec[ptr].data = data;
|
||||
}
|
||||
}
|
||||
|
||||
// get the data associated with the given index,
|
||||
// return 0 if not found
|
||||
wxClientData* Get( size_t index ) const
|
||||
{
|
||||
size_t it = Find( index );
|
||||
if( it == m_vec.size() ) return 0;
|
||||
return (wxClientData*)m_vec[it].data; // const cast
|
||||
}
|
||||
|
||||
// delete the data associated with the given index
|
||||
// it also decreases by one the indices of all the elements
|
||||
// with an index greater than the given index
|
||||
void Delete( size_t index, bool doDelete )
|
||||
{
|
||||
size_t todel = m_vec.size();
|
||||
|
||||
for( size_t i = 0, end = m_vec.size(); i != end; ++i )
|
||||
{
|
||||
if( m_vec[i].index == index )
|
||||
todel = i;
|
||||
else if( m_vec[i].index > index )
|
||||
--(m_vec[i].index);
|
||||
}
|
||||
|
||||
if( todel != m_vec.size() )
|
||||
{
|
||||
if( doDelete )
|
||||
delete m_vec[todel].data;
|
||||
m_vec.erase( todel );
|
||||
}
|
||||
}
|
||||
private:
|
||||
// returns MyVec.size() if not found
|
||||
size_t Find( size_t index ) const
|
||||
{
|
||||
for( size_t i = 0, end = m_vec.size(); i != end; ++i )
|
||||
{
|
||||
if( m_vec[i].index == index )
|
||||
return i;
|
||||
}
|
||||
|
||||
return m_vec.size();
|
||||
}
|
||||
|
||||
wxClientDataDictionaryPairVector m_vec;
|
||||
};
|
||||
|
||||
#endif // _WX_CLNTDATAH__
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/clntdata.h
|
||||
// Purpose: A mixin class for holding a wxClientData or void pointer
|
||||
// Author: Robin Dunn
|
||||
// Modified by:
|
||||
// Created: 9-Oct-2001
|
||||
// RCS-ID: $Id: clntdata.h 36973 2006-01-18 16:45:41Z JS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLNTDATAH__
|
||||
#define _WX_CLNTDATAH__
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/hashmap.h"
|
||||
|
||||
typedef int (*wxShadowObjectMethod)(void*, void*);
|
||||
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
|
||||
wxShadowObjectMethod,
|
||||
wxShadowObjectMethods,
|
||||
class WXDLLIMPEXP_BASE
|
||||
);
|
||||
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
|
||||
void *,
|
||||
wxShadowObjectFields,
|
||||
class WXDLLIMPEXP_BASE
|
||||
);
|
||||
|
||||
class WXDLLIMPEXP_BASE wxShadowObject
|
||||
{
|
||||
public:
|
||||
wxShadowObject() { }
|
||||
|
||||
void AddMethod( const wxString &name, wxShadowObjectMethod method )
|
||||
{
|
||||
wxShadowObjectMethods::iterator it = m_methods.find( name );
|
||||
if (it == m_methods.end())
|
||||
m_methods[ name ] = method;
|
||||
else
|
||||
it->second = method;
|
||||
}
|
||||
|
||||
bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue )
|
||||
{
|
||||
wxShadowObjectMethods::iterator it = m_methods.find( name );
|
||||
if (it == m_methods.end())
|
||||
return false;
|
||||
wxShadowObjectMethod method = it->second;
|
||||
int ret = (*method)(window, param);
|
||||
if (returnValue)
|
||||
*returnValue = ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddField( const wxString &name, void* initialValue = NULL )
|
||||
{
|
||||
wxShadowObjectFields::iterator it = m_fields.find( name );
|
||||
if (it == m_fields.end())
|
||||
m_fields[ name ] = initialValue;
|
||||
else
|
||||
it->second = initialValue;
|
||||
}
|
||||
|
||||
void SetField( const wxString &name, void* value )
|
||||
{
|
||||
wxShadowObjectFields::iterator it = m_fields.find( name );
|
||||
if (it == m_fields.end())
|
||||
return;
|
||||
it->second = value;
|
||||
}
|
||||
|
||||
void* GetField( const wxString &name, void *defaultValue = NULL )
|
||||
{
|
||||
wxShadowObjectFields::iterator it = m_fields.find( name );
|
||||
if (it == m_fields.end())
|
||||
return defaultValue;
|
||||
return it->second;
|
||||
}
|
||||
|
||||
private:
|
||||
wxShadowObjectMethods m_methods;
|
||||
wxShadowObjectFields m_fields;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// what kind of client data do we have?
|
||||
enum wxClientDataType
|
||||
{
|
||||
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_Void // client data is untyped and we don't own it
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxClientData
|
||||
{
|
||||
public:
|
||||
wxClientData() { }
|
||||
virtual ~wxClientData() { }
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxStringClientData : public wxClientData
|
||||
{
|
||||
public:
|
||||
wxStringClientData() : m_data() { }
|
||||
wxStringClientData( const wxString &data ) : m_data(data) { }
|
||||
void SetData( const wxString &data ) { m_data = data; }
|
||||
const wxString& GetData() const { return m_data; }
|
||||
|
||||
private:
|
||||
wxString m_data;
|
||||
};
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// by the container - but not both of them
|
||||
//
|
||||
// NOTE: This functionality is currently duplicated in wxEvtHandler in order
|
||||
// to avoid having more than one vtable in that class hierarchy.
|
||||
|
||||
class WXDLLIMPEXP_BASE wxClientDataContainer
|
||||
{
|
||||
public:
|
||||
wxClientDataContainer();
|
||||
virtual ~wxClientDataContainer();
|
||||
|
||||
void SetClientObject( wxClientData *data ) { DoSetClientObject(data); }
|
||||
wxClientData *GetClientObject() const { return DoGetClientObject(); }
|
||||
|
||||
void SetClientData( void *data ) { DoSetClientData(data); }
|
||||
void *GetClientData() const { return DoGetClientData(); }
|
||||
|
||||
protected:
|
||||
// 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
|
||||
// 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
|
||||
// versa.
|
||||
union
|
||||
{
|
||||
wxClientData *m_clientObject;
|
||||
void *m_clientData;
|
||||
};
|
||||
|
||||
// client data accessors
|
||||
virtual void DoSetClientObject( wxClientData *data );
|
||||
virtual wxClientData *DoGetClientObject() const;
|
||||
|
||||
virtual void DoSetClientData( void *data );
|
||||
virtual void *DoGetClientData() const;
|
||||
|
||||
// what kind of data do we have?
|
||||
wxClientDataType m_clientDataType;
|
||||
|
||||
};
|
||||
|
||||
#include "wx/vector.h"
|
||||
|
||||
struct WXDLLIMPEXP_BASE wxClientDataDictionaryPair
|
||||
{
|
||||
wxClientDataDictionaryPair( size_t idx ) : index( idx ), data( 0 ) { }
|
||||
|
||||
size_t index;
|
||||
wxClientData* data;
|
||||
};
|
||||
|
||||
_WX_DECLARE_VECTOR(
|
||||
wxClientDataDictionaryPair,
|
||||
wxClientDataDictionaryPairVector,
|
||||
WXDLLIMPEXP_BASE
|
||||
);
|
||||
|
||||
// this class is used internally to maintain the association between items
|
||||
// of (some subclasses of) wxControlWithItems and their client data
|
||||
// NOTE: this class does not keep track of whether it contains
|
||||
// wxClientData or void*. The client must ensure that
|
||||
// it does not contain a mix of the two, and that
|
||||
// DestroyData is called if it contains wxClientData
|
||||
class WXDLLIMPEXP_BASE wxClientDataDictionary
|
||||
{
|
||||
public:
|
||||
wxClientDataDictionary() {}
|
||||
|
||||
// deletes all the data
|
||||
void DestroyData()
|
||||
{
|
||||
for( size_t i = 0, end = m_vec.size(); i != end; ++i )
|
||||
delete m_vec[i].data;
|
||||
m_vec.clear();
|
||||
}
|
||||
|
||||
// if data for the given index is not present, add it,
|
||||
// if it is present, delete the old data and replace it with
|
||||
// the new one
|
||||
void Set( size_t index, wxClientData* data, bool doDelete )
|
||||
{
|
||||
size_t ptr = Find( index );
|
||||
|
||||
if( !data )
|
||||
{
|
||||
if( ptr == m_vec.size() ) return;
|
||||
if( doDelete )
|
||||
delete m_vec[ptr].data;
|
||||
m_vec.erase( ptr );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ptr == m_vec.size() )
|
||||
{
|
||||
m_vec.push_back( wxClientDataDictionaryPair( index ) );
|
||||
ptr = m_vec.size() - 1;
|
||||
}
|
||||
|
||||
if( doDelete )
|
||||
delete m_vec[ptr].data;
|
||||
m_vec[ptr].data = data;
|
||||
}
|
||||
}
|
||||
|
||||
// get the data associated with the given index,
|
||||
// return 0 if not found
|
||||
wxClientData* Get( size_t index ) const
|
||||
{
|
||||
size_t it = Find( index );
|
||||
if( it == m_vec.size() ) return 0;
|
||||
return (wxClientData*)m_vec[it].data; // const cast
|
||||
}
|
||||
|
||||
// delete the data associated with the given index
|
||||
// it also decreases by one the indices of all the elements
|
||||
// with an index greater than the given index
|
||||
void Delete( size_t index, bool doDelete )
|
||||
{
|
||||
size_t todel = m_vec.size();
|
||||
|
||||
for( size_t i = 0, end = m_vec.size(); i != end; ++i )
|
||||
{
|
||||
if( m_vec[i].index == index )
|
||||
todel = i;
|
||||
else if( m_vec[i].index > index )
|
||||
--(m_vec[i].index);
|
||||
}
|
||||
|
||||
if( todel != m_vec.size() )
|
||||
{
|
||||
if( doDelete )
|
||||
delete m_vec[todel].data;
|
||||
m_vec.erase( todel );
|
||||
}
|
||||
}
|
||||
private:
|
||||
// returns MyVec.size() if not found
|
||||
size_t Find( size_t index ) const
|
||||
{
|
||||
for( size_t i = 0, end = m_vec.size(); i != end; ++i )
|
||||
{
|
||||
if( m_vec[i].index == index )
|
||||
return i;
|
||||
}
|
||||
|
||||
return m_vec.size();
|
||||
}
|
||||
|
||||
wxClientDataDictionaryPairVector m_vec;
|
||||
};
|
||||
|
||||
#endif // _WX_CLNTDATAH__
|
||||
|
||||
|
|
|
@ -1,200 +1,200 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/clrpicker.h
|
||||
// Purpose: wxColourPickerCtrl base header
|
||||
// Author: Francesco Montorsi (based on Vadim Zeitlin's code)
|
||||
// Modified by:
|
||||
// Created: 14/4/2006
|
||||
// Copyright: (c) Vadim Zeitlin, Francesco Montorsi
|
||||
// RCS-ID: $Id: clrpicker.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLRPICKER_H_BASE_
|
||||
#define _WX_CLRPICKER_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
|
||||
#if wxUSE_COLOURPICKERCTRL
|
||||
|
||||
#include "wx/pickerbase.h"
|
||||
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent;
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[];
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[];
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourPickerWidgetBase: a generic abstract interface which must be
|
||||
// implemented by controls used by wxColourPickerCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourPickerWidgetBase
|
||||
{
|
||||
public:
|
||||
wxColourPickerWidgetBase() { m_colour = *wxBLACK; }
|
||||
virtual ~wxColourPickerWidgetBase() {}
|
||||
|
||||
wxColour GetColour() const
|
||||
{ return m_colour; }
|
||||
virtual void SetColour(const wxColour &col)
|
||||
{ m_colour = col; UpdateColour(); }
|
||||
virtual void SetColour(const wxString &col)
|
||||
{ m_colour.Set(col); UpdateColour(); }
|
||||
|
||||
protected:
|
||||
|
||||
virtual void UpdateColour() = 0;
|
||||
|
||||
// the current colour (may be invalid if none)
|
||||
wxColour m_colour;
|
||||
};
|
||||
|
||||
|
||||
// Styles which must be supported by all controls implementing wxColourPickerWidgetBase
|
||||
// NB: these styles must be defined to carefully-chosen values to
|
||||
// avoid conflicts with wxButton's styles
|
||||
|
||||
// show the colour in HTML form (#AABBCC) as colour button label
|
||||
// (instead of no label at all)
|
||||
// NOTE: this style is supported just by wxColourButtonGeneric and
|
||||
// thus is not exposed in wxColourPickerCtrl
|
||||
#define wxCLRP_SHOW_LABEL 0x0008
|
||||
|
||||
// map platform-dependent controls which implement the wxColourPickerWidgetBase
|
||||
// under the name "wxColourPickerWidget".
|
||||
// NOTE: wxColourPickerCtrl allocates a wxColourPickerWidget and relies on the
|
||||
// fact that all classes being mapped as wxColourPickerWidget have the
|
||||
// same prototype for their contructor (and also explains why we use
|
||||
// define instead of a typedef)
|
||||
// since GTK > 2.4, there is GtkColorButton
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/clrpicker.h"
|
||||
#define wxColourPickerWidget wxColourButton
|
||||
#else
|
||||
#include "wx/generic/clrpickerg.h"
|
||||
#define wxColourPickerWidget wxGenericColourButton
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourPickerCtrl: platform-independent class which embeds a
|
||||
// platform-dependent wxColourPickerWidget and, if wxCLRP_USE_TEXTCTRL style is
|
||||
// used, a textctrl next to it.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
|
||||
#define wxCLRP_DEFAULT_STYLE 0
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase
|
||||
{
|
||||
public:
|
||||
wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {}
|
||||
virtual ~wxColourPickerCtrl() {}
|
||||
|
||||
|
||||
wxColourPickerCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxColourPickerCtrlNameStr)
|
||||
: m_bIgnoreNextTextCtrlUpdate(false)
|
||||
{ Create(parent, id, col, pos, size, style, validator, name); }
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxColour& col = *wxBLACK,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCLRP_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxColourPickerCtrlNameStr);
|
||||
|
||||
|
||||
public: // public API
|
||||
|
||||
// get the colour chosen
|
||||
wxColour GetColour() const
|
||||
{ return ((wxColourPickerWidget *)m_picker)->GetColour(); }
|
||||
|
||||
// set currently displayed color
|
||||
void SetColour(const wxColour& col);
|
||||
|
||||
// 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.
|
||||
bool SetColour(const wxString& text);
|
||||
|
||||
|
||||
public: // internal functions
|
||||
|
||||
// update the button colour to match the text control contents
|
||||
void UpdatePickerFromTextCtrl();
|
||||
|
||||
// update the text control to match the button's colour
|
||||
void UpdateTextCtrlFromPicker();
|
||||
|
||||
// event handler for our picker
|
||||
void OnColourChange(wxColourPickerEvent &);
|
||||
|
||||
protected:
|
||||
virtual long GetPickerStyle(long style) const
|
||||
{ return (style & wxCLRP_SHOW_LABEL); }
|
||||
|
||||
// true if the next UpdateTextCtrl() call is to ignore
|
||||
bool m_bIgnoreNextTextCtrlUpdate;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl)
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourPickerEvent: used by wxColourPickerCtrl only
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, 1102)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxColourPickerEvent() {}
|
||||
wxColourPickerEvent(wxObject *generator, int id, const wxColour &col)
|
||||
: wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id),
|
||||
m_colour(col)
|
||||
{
|
||||
SetEventObject(generator);
|
||||
}
|
||||
|
||||
wxColour GetColour() const { return m_colour; }
|
||||
void SetColour(const wxColour &c) { m_colour = c; }
|
||||
|
||||
|
||||
// default copy ctor, assignment operator and dtor are ok
|
||||
virtual wxEvent *Clone() const { return new wxColourPickerEvent(*this); }
|
||||
|
||||
private:
|
||||
wxColour m_colour;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxColourPickerEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event types and macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&);
|
||||
|
||||
#define wxColourPickerEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxColourPickerEventFunction, &func)
|
||||
|
||||
#define EVT_COLOURPICKER_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn))
|
||||
|
||||
|
||||
#endif // wxUSE_COLOURPICKERCTRL
|
||||
|
||||
#endif // _WX_CLRPICKER_H_BASE_
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/clrpicker.h
|
||||
// Purpose: wxColourPickerCtrl base header
|
||||
// Author: Francesco Montorsi (based on Vadim Zeitlin's code)
|
||||
// Modified by:
|
||||
// Created: 14/4/2006
|
||||
// Copyright: (c) Vadim Zeitlin, Francesco Montorsi
|
||||
// RCS-ID: $Id: clrpicker.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLRPICKER_H_BASE_
|
||||
#define _WX_CLRPICKER_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
|
||||
#if wxUSE_COLOURPICKERCTRL
|
||||
|
||||
#include "wx/pickerbase.h"
|
||||
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent;
|
||||
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[];
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[];
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourPickerWidgetBase: a generic abstract interface which must be
|
||||
// implemented by controls used by wxColourPickerCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourPickerWidgetBase
|
||||
{
|
||||
public:
|
||||
wxColourPickerWidgetBase() { m_colour = *wxBLACK; }
|
||||
virtual ~wxColourPickerWidgetBase() {}
|
||||
|
||||
wxColour GetColour() const
|
||||
{ return m_colour; }
|
||||
virtual void SetColour(const wxColour &col)
|
||||
{ m_colour = col; UpdateColour(); }
|
||||
virtual void SetColour(const wxString &col)
|
||||
{ m_colour.Set(col); UpdateColour(); }
|
||||
|
||||
protected:
|
||||
|
||||
virtual void UpdateColour() = 0;
|
||||
|
||||
// the current colour (may be invalid if none)
|
||||
wxColour m_colour;
|
||||
};
|
||||
|
||||
|
||||
// Styles which must be supported by all controls implementing wxColourPickerWidgetBase
|
||||
// NB: these styles must be defined to carefully-chosen values to
|
||||
// avoid conflicts with wxButton's styles
|
||||
|
||||
// show the colour in HTML form (#AABBCC) as colour button label
|
||||
// (instead of no label at all)
|
||||
// NOTE: this style is supported just by wxColourButtonGeneric and
|
||||
// thus is not exposed in wxColourPickerCtrl
|
||||
#define wxCLRP_SHOW_LABEL 0x0008
|
||||
|
||||
// map platform-dependent controls which implement the wxColourPickerWidgetBase
|
||||
// under the name "wxColourPickerWidget".
|
||||
// NOTE: wxColourPickerCtrl allocates a wxColourPickerWidget and relies on the
|
||||
// fact that all classes being mapped as wxColourPickerWidget have the
|
||||
// same prototype for their contructor (and also explains why we use
|
||||
// define instead of a typedef)
|
||||
// since GTK > 2.4, there is GtkColorButton
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/clrpicker.h"
|
||||
#define wxColourPickerWidget wxColourButton
|
||||
#else
|
||||
#include "wx/generic/clrpickerg.h"
|
||||
#define wxColourPickerWidget wxGenericColourButton
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourPickerCtrl: platform-independent class which embeds a
|
||||
// platform-dependent wxColourPickerWidget and, if wxCLRP_USE_TEXTCTRL style is
|
||||
// used, a textctrl next to it.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
|
||||
#define wxCLRP_DEFAULT_STYLE 0
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase
|
||||
{
|
||||
public:
|
||||
wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {}
|
||||
virtual ~wxColourPickerCtrl() {}
|
||||
|
||||
|
||||
wxColourPickerCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxColourPickerCtrlNameStr)
|
||||
: m_bIgnoreNextTextCtrlUpdate(false)
|
||||
{ Create(parent, id, col, pos, size, style, validator, name); }
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxColour& col = *wxBLACK,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCLRP_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxColourPickerCtrlNameStr);
|
||||
|
||||
|
||||
public: // public API
|
||||
|
||||
// get the colour chosen
|
||||
wxColour GetColour() const
|
||||
{ return ((wxColourPickerWidget *)m_picker)->GetColour(); }
|
||||
|
||||
// set currently displayed color
|
||||
void SetColour(const wxColour& col);
|
||||
|
||||
// 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.
|
||||
bool SetColour(const wxString& text);
|
||||
|
||||
|
||||
public: // internal functions
|
||||
|
||||
// update the button colour to match the text control contents
|
||||
void UpdatePickerFromTextCtrl();
|
||||
|
||||
// update the text control to match the button's colour
|
||||
void UpdateTextCtrlFromPicker();
|
||||
|
||||
// event handler for our picker
|
||||
void OnColourChange(wxColourPickerEvent &);
|
||||
|
||||
protected:
|
||||
virtual long GetPickerStyle(long style) const
|
||||
{ return (style & wxCLRP_SHOW_LABEL); }
|
||||
|
||||
// true if the next UpdateTextCtrl() call is to ignore
|
||||
bool m_bIgnoreNextTextCtrlUpdate;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl)
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourPickerEvent: used by wxColourPickerCtrl only
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, 1102)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxColourPickerEvent() {}
|
||||
wxColourPickerEvent(wxObject *generator, int id, const wxColour &col)
|
||||
: wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id),
|
||||
m_colour(col)
|
||||
{
|
||||
SetEventObject(generator);
|
||||
}
|
||||
|
||||
wxColour GetColour() const { return m_colour; }
|
||||
void SetColour(const wxColour &c) { m_colour = c; }
|
||||
|
||||
|
||||
// default copy ctor, assignment operator and dtor are ok
|
||||
virtual wxEvent *Clone() const { return new wxColourPickerEvent(*this); }
|
||||
|
||||
private:
|
||||
wxColour m_colour;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxColourPickerEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event types and macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&);
|
||||
|
||||
#define wxColourPickerEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxColourPickerEventFunction, &func)
|
||||
|
||||
#define EVT_COLOURPICKER_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn))
|
||||
|
||||
|
||||
#endif // wxUSE_COLOURPICKERCTRL
|
||||
|
||||
#endif // _WX_CLRPICKER_H_BASE_
|
||||
|
||||
|
|
|
@ -1,239 +1,239 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cmdline.h
|
||||
// Purpose: wxCmdLineParser and related classes for parsing the command
|
||||
// line options
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 04.01.00
|
||||
// RCS-ID: $Id: cmdline.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CMDLINE_H_
|
||||
#define _WX_CMDLINE_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
#if wxUSE_CMDLINE_PARSER
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// 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
|
||||
enum
|
||||
{
|
||||
wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
|
||||
wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
|
||||
wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
|
||||
wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
|
||||
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
|
||||
// number or a date
|
||||
enum wxCmdLineParamType
|
||||
{
|
||||
wxCMD_LINE_VAL_STRING, // should be 0 (default)
|
||||
wxCMD_LINE_VAL_NUMBER,
|
||||
wxCMD_LINE_VAL_DATE,
|
||||
wxCMD_LINE_VAL_NONE
|
||||
};
|
||||
|
||||
// for constructing the cmd line description using Init()
|
||||
enum wxCmdLineEntryType
|
||||
{
|
||||
wxCMD_LINE_SWITCH,
|
||||
wxCMD_LINE_OPTION,
|
||||
wxCMD_LINE_PARAM,
|
||||
wxCMD_LINE_NONE // to terminate the list
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineEntryDesc is a description of one command line
|
||||
// switch/option/parameter
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
struct wxCmdLineEntryDesc
|
||||
{
|
||||
wxCmdLineEntryType kind;
|
||||
const wxChar *shortName;
|
||||
const wxChar *longName;
|
||||
const wxChar *description;
|
||||
wxCmdLineParamType type;
|
||||
int flags;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineParser is a class for parsing command line.
|
||||
//
|
||||
// It has the following features:
|
||||
//
|
||||
// 1. distinguishes options, switches and parameters; allows option grouping
|
||||
// 2. allows both short and long options
|
||||
// 3. automatically generates the usage message from the cmd line description
|
||||
// 4. does type checks on the options values (number, date, ...)
|
||||
//
|
||||
// To use it you should:
|
||||
//
|
||||
// 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)
|
||||
// 3. call Parse()
|
||||
// 4. use GetXXX() to retrieve the parsed info
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxCmdLineParser
|
||||
{
|
||||
public:
|
||||
// ctors and initializers
|
||||
// ----------------------
|
||||
|
||||
// default ctor or ctor giving the cmd line in either Unix or Win form
|
||||
wxCmdLineParser() { Init(); }
|
||||
wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); }
|
||||
#if wxUSE_UNICODE
|
||||
wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); }
|
||||
#endif // wxUSE_UNICODE
|
||||
wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); }
|
||||
|
||||
// the same as above, but also gives the cmd line description - otherwise,
|
||||
// use AddXXX() later
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc)
|
||||
{ Init(); SetDesc(desc); }
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv)
|
||||
{ Init(); SetCmdLine(argc, argv); SetDesc(desc); }
|
||||
#if wxUSE_UNICODE
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv)
|
||||
{ Init(); SetCmdLine(argc, argv); SetDesc(desc); }
|
||||
#endif // wxUSE_UNICODE
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline)
|
||||
{ Init(); SetCmdLine(cmdline); SetDesc(desc); }
|
||||
|
||||
// set cmd line to parse after using one of the ctors which don't do it
|
||||
void SetCmdLine(int argc, char **argv);
|
||||
#if wxUSE_UNICODE
|
||||
void SetCmdLine(int argc, wxChar **argv);
|
||||
#endif // wxUSE_UNICODE
|
||||
void SetCmdLine(const wxString& cmdline);
|
||||
|
||||
// not virtual, don't use this class polymorphically
|
||||
~wxCmdLineParser();
|
||||
|
||||
// set different parser options
|
||||
// ----------------------------
|
||||
|
||||
// by default, '-' is switch char under Unix, '-' or '/' under Win:
|
||||
// switchChars contains all characters with which an option or switch may
|
||||
// start
|
||||
void SetSwitchChars(const wxString& switchChars);
|
||||
|
||||
// long options are not POSIX-compliant, this option allows to disable them
|
||||
void EnableLongOptions(bool enable = true);
|
||||
void DisableLongOptions() { EnableLongOptions(false); }
|
||||
|
||||
bool AreLongOptionsEnabled();
|
||||
|
||||
// extra text may be shown by Usage() method if set by this function
|
||||
void SetLogo(const wxString& logo);
|
||||
|
||||
// construct the cmd line description
|
||||
// ----------------------------------
|
||||
|
||||
// take the cmd line description from the wxCMD_LINE_NONE terminated table
|
||||
void SetDesc(const wxCmdLineEntryDesc *desc);
|
||||
|
||||
// a switch: i.e. an option without value
|
||||
void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
|
||||
const wxString& desc = wxEmptyString,
|
||||
int flags = 0);
|
||||
|
||||
// an option taking a value of the given type
|
||||
void AddOption(const wxString& name, const wxString& lng = wxEmptyString,
|
||||
const wxString& desc = wxEmptyString,
|
||||
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
|
||||
int flags = 0);
|
||||
|
||||
// a parameter
|
||||
void AddParam(const wxString& desc = wxEmptyString,
|
||||
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
|
||||
int flags = 0);
|
||||
|
||||
// actions
|
||||
// -------
|
||||
|
||||
// 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
|
||||
// syntax error occurred
|
||||
//
|
||||
// if showUsage is true, Usage() is called in case of syntax error or if
|
||||
// help was requested
|
||||
int Parse(bool showUsage = true);
|
||||
|
||||
// give the usage message describing all program options
|
||||
void Usage();
|
||||
|
||||
// get the command line arguments
|
||||
// ------------------------------
|
||||
|
||||
// returns true if the given switch was found
|
||||
bool Found(const wxString& name) const;
|
||||
|
||||
// returns true if an option taking a string value was found and stores the
|
||||
// value in the provided pointer
|
||||
bool Found(const wxString& name, wxString *value) const;
|
||||
|
||||
// returns true if an option taking an integer value was found and stores
|
||||
// the value in the provided pointer
|
||||
bool Found(const wxString& name, long *value) const;
|
||||
|
||||
#if wxUSE_DATETIME
|
||||
// returns true if an option taking a date value was found and stores the
|
||||
// value in the provided pointer
|
||||
bool Found(const wxString& name, wxDateTime *value) const;
|
||||
#endif // wxUSE_DATETIME
|
||||
|
||||
// gets the number of parameters found
|
||||
size_t GetParamCount() const;
|
||||
|
||||
// gets the value of Nth parameter (as string only for now)
|
||||
wxString GetParam(size_t n = 0u) const;
|
||||
|
||||
// Resets switches and options
|
||||
void Reset();
|
||||
|
||||
// break down the command line in arguments
|
||||
static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
|
||||
|
||||
private:
|
||||
// get usage string
|
||||
wxString GetUsageString();
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
struct wxCmdLineParserData *m_data;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCmdLineParser)
|
||||
};
|
||||
|
||||
#else // !wxUSE_CMDLINE_PARSER
|
||||
|
||||
// this function is always available (even if !wxUSE_CMDLINE_PARSER) because it
|
||||
// is used by wxWin itself under Windows
|
||||
class WXDLLIMPEXP_BASE wxCmdLineParser
|
||||
{
|
||||
public:
|
||||
static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
|
||||
};
|
||||
|
||||
#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER
|
||||
|
||||
#endif // _WX_CMDLINE_H_
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cmdline.h
|
||||
// Purpose: wxCmdLineParser and related classes for parsing the command
|
||||
// line options
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 04.01.00
|
||||
// RCS-ID: $Id: cmdline.h 49563 2007-10-31 20:46:21Z VZ $
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CMDLINE_H_
|
||||
#define _WX_CMDLINE_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
#if wxUSE_CMDLINE_PARSER
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// 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
|
||||
enum
|
||||
{
|
||||
wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
|
||||
wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
|
||||
wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
|
||||
wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
|
||||
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
|
||||
// number or a date
|
||||
enum wxCmdLineParamType
|
||||
{
|
||||
wxCMD_LINE_VAL_STRING, // should be 0 (default)
|
||||
wxCMD_LINE_VAL_NUMBER,
|
||||
wxCMD_LINE_VAL_DATE,
|
||||
wxCMD_LINE_VAL_NONE
|
||||
};
|
||||
|
||||
// for constructing the cmd line description using Init()
|
||||
enum wxCmdLineEntryType
|
||||
{
|
||||
wxCMD_LINE_SWITCH,
|
||||
wxCMD_LINE_OPTION,
|
||||
wxCMD_LINE_PARAM,
|
||||
wxCMD_LINE_NONE // to terminate the list
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineEntryDesc is a description of one command line
|
||||
// switch/option/parameter
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
struct wxCmdLineEntryDesc
|
||||
{
|
||||
wxCmdLineEntryType kind;
|
||||
const wxChar *shortName;
|
||||
const wxChar *longName;
|
||||
const wxChar *description;
|
||||
wxCmdLineParamType type;
|
||||
int flags;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineParser is a class for parsing command line.
|
||||
//
|
||||
// It has the following features:
|
||||
//
|
||||
// 1. distinguishes options, switches and parameters; allows option grouping
|
||||
// 2. allows both short and long options
|
||||
// 3. automatically generates the usage message from the cmd line description
|
||||
// 4. does type checks on the options values (number, date, ...)
|
||||
//
|
||||
// To use it you should:
|
||||
//
|
||||
// 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)
|
||||
// 3. call Parse()
|
||||
// 4. use GetXXX() to retrieve the parsed info
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxCmdLineParser
|
||||
{
|
||||
public:
|
||||
// ctors and initializers
|
||||
// ----------------------
|
||||
|
||||
// default ctor or ctor giving the cmd line in either Unix or Win form
|
||||
wxCmdLineParser() { Init(); }
|
||||
wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); }
|
||||
#if wxUSE_UNICODE
|
||||
wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); }
|
||||
#endif // wxUSE_UNICODE
|
||||
wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); }
|
||||
|
||||
// the same as above, but also gives the cmd line description - otherwise,
|
||||
// use AddXXX() later
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc)
|
||||
{ Init(); SetDesc(desc); }
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv)
|
||||
{ Init(); SetCmdLine(argc, argv); SetDesc(desc); }
|
||||
#if wxUSE_UNICODE
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv)
|
||||
{ Init(); SetCmdLine(argc, argv); SetDesc(desc); }
|
||||
#endif // wxUSE_UNICODE
|
||||
wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline)
|
||||
{ Init(); SetCmdLine(cmdline); SetDesc(desc); }
|
||||
|
||||
// set cmd line to parse after using one of the ctors which don't do it
|
||||
void SetCmdLine(int argc, char **argv);
|
||||
#if wxUSE_UNICODE
|
||||
void SetCmdLine(int argc, wxChar **argv);
|
||||
#endif // wxUSE_UNICODE
|
||||
void SetCmdLine(const wxString& cmdline);
|
||||
|
||||
// not virtual, don't use this class polymorphically
|
||||
~wxCmdLineParser();
|
||||
|
||||
// set different parser options
|
||||
// ----------------------------
|
||||
|
||||
// by default, '-' is switch char under Unix, '-' or '/' under Win:
|
||||
// switchChars contains all characters with which an option or switch may
|
||||
// start
|
||||
void SetSwitchChars(const wxString& switchChars);
|
||||
|
||||
// long options are not POSIX-compliant, this option allows to disable them
|
||||
void EnableLongOptions(bool enable = true);
|
||||
void DisableLongOptions() { EnableLongOptions(false); }
|
||||
|
||||
bool AreLongOptionsEnabled();
|
||||
|
||||
// extra text may be shown by Usage() method if set by this function
|
||||
void SetLogo(const wxString& logo);
|
||||
|
||||
// construct the cmd line description
|
||||
// ----------------------------------
|
||||
|
||||
// take the cmd line description from the wxCMD_LINE_NONE terminated table
|
||||
void SetDesc(const wxCmdLineEntryDesc *desc);
|
||||
|
||||
// a switch: i.e. an option without value
|
||||
void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
|
||||
const wxString& desc = wxEmptyString,
|
||||
int flags = 0);
|
||||
|
||||
// an option taking a value of the given type
|
||||
void AddOption(const wxString& name, const wxString& lng = wxEmptyString,
|
||||
const wxString& desc = wxEmptyString,
|
||||
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
|
||||
int flags = 0);
|
||||
|
||||
// a parameter
|
||||
void AddParam(const wxString& desc = wxEmptyString,
|
||||
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
|
||||
int flags = 0);
|
||||
|
||||
// actions
|
||||
// -------
|
||||
|
||||
// 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
|
||||
// syntax error occurred
|
||||
//
|
||||
// if showUsage is true, Usage() is called in case of syntax error or if
|
||||
// help was requested
|
||||
int Parse(bool showUsage = true);
|
||||
|
||||
// give the usage message describing all program options
|
||||
void Usage();
|
||||
|
||||
// get the command line arguments
|
||||
// ------------------------------
|
||||
|
||||
// returns true if the given switch was found
|
||||
bool Found(const wxString& name) const;
|
||||
|
||||
// returns true if an option taking a string value was found and stores the
|
||||
// value in the provided pointer
|
||||
bool Found(const wxString& name, wxString *value) const;
|
||||
|
||||
// returns true if an option taking an integer value was found and stores
|
||||
// the value in the provided pointer
|
||||
bool Found(const wxString& name, long *value) const;
|
||||
|
||||
#if wxUSE_DATETIME
|
||||
// returns true if an option taking a date value was found and stores the
|
||||
// value in the provided pointer
|
||||
bool Found(const wxString& name, wxDateTime *value) const;
|
||||
#endif // wxUSE_DATETIME
|
||||
|
||||
// gets the number of parameters found
|
||||
size_t GetParamCount() const;
|
||||
|
||||
// gets the value of Nth parameter (as string only for now)
|
||||
wxString GetParam(size_t n = 0u) const;
|
||||
|
||||
// Resets switches and options
|
||||
void Reset();
|
||||
|
||||
// break down the command line in arguments
|
||||
static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
|
||||
|
||||
private:
|
||||
// get usage string
|
||||
wxString GetUsageString();
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
struct wxCmdLineParserData *m_data;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCmdLineParser)
|
||||
};
|
||||
|
||||
#else // !wxUSE_CMDLINE_PARSER
|
||||
|
||||
// this function is always available (even if !wxUSE_CMDLINE_PARSER) because it
|
||||
// is used by wxWin itself under Windows
|
||||
class WXDLLIMPEXP_BASE wxCmdLineParser
|
||||
{
|
||||
public:
|
||||
static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
|
||||
};
|
||||
|
||||
#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER
|
||||
|
||||
#endif // _WX_CMDLINE_H_
|
||||
|
||||
|
|
|
@ -1,144 +1,144 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cmdproc.h
|
||||
// Purpose: undo/redo capable command processing framework
|
||||
// Author: Julian Smart (extracted from docview.h by VZ)
|
||||
// Modified by:
|
||||
// Created: 05.11.00
|
||||
// RCS-ID: $Id: cmdproc.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CMDPROC_H_
|
||||
#define _WX_CMDPROC_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenu;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCommand: a single command capable of performing itself
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCommand : public wxObject
|
||||
{
|
||||
public:
|
||||
wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString);
|
||||
virtual ~wxCommand(){}
|
||||
|
||||
// Override this to perform a command
|
||||
virtual bool Do() = 0;
|
||||
|
||||
// Override this to undo a command
|
||||
virtual bool Undo() = 0;
|
||||
|
||||
virtual bool CanUndo() const { return m_canUndo; }
|
||||
virtual wxString GetName() const { return m_commandName; }
|
||||
|
||||
protected:
|
||||
bool m_canUndo;
|
||||
wxString m_commandName;
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxCommand)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCommandProcessor: wxCommand manager
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCommandProcessor : public wxObject
|
||||
{
|
||||
public:
|
||||
// if max number of commands is -1, it is unlimited
|
||||
wxCommandProcessor(int maxCommands = -1);
|
||||
virtual ~wxCommandProcessor();
|
||||
|
||||
// Pass a command to the processor. The processor calls Do(); if
|
||||
// successful, is appended to the command history unless storeIt is false.
|
||||
virtual bool Submit(wxCommand *command, bool storeIt = true);
|
||||
|
||||
// just store the command without executing it
|
||||
virtual void Store(wxCommand *command);
|
||||
|
||||
virtual bool Undo();
|
||||
virtual bool Redo();
|
||||
virtual bool CanUndo() const;
|
||||
virtual bool CanRedo() const;
|
||||
|
||||
// Initialises the current command and menu strings.
|
||||
virtual void Initialize();
|
||||
|
||||
// Sets the Undo/Redo menu strings for the current menu.
|
||||
virtual void SetMenuStrings();
|
||||
|
||||
// Gets the current Undo menu label.
|
||||
wxString GetUndoMenuLabel() const;
|
||||
|
||||
// Gets the current Undo menu label.
|
||||
wxString GetRedoMenuLabel() const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// Call this to manage an edit menu.
|
||||
void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; }
|
||||
wxMenu *GetEditMenu() const { return m_commandEditMenu; }
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// command list access
|
||||
wxList& GetCommands() { return m_commands; }
|
||||
const wxList& GetCommands() const { return m_commands; }
|
||||
wxCommand *GetCurrentCommand() const
|
||||
{
|
||||
return (wxCommand *)(m_currentCommand ? m_currentCommand->GetData() : NULL);
|
||||
}
|
||||
int GetMaxCommands() const { return m_maxNoCommands; }
|
||||
virtual void ClearCommands();
|
||||
|
||||
// Has the current project been changed?
|
||||
virtual bool IsDirty() const
|
||||
{
|
||||
return m_currentCommand && (m_lastSavedCommand != m_currentCommand);
|
||||
}
|
||||
|
||||
// Mark the current command as the one where the last save took place
|
||||
void MarkAsSaved()
|
||||
{
|
||||
m_lastSavedCommand = m_currentCommand;
|
||||
}
|
||||
|
||||
|
||||
// By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y"
|
||||
const wxString& GetUndoAccelerator() const { return m_undoAccelerator; }
|
||||
const wxString& GetRedoAccelerator() const { return m_redoAccelerator; }
|
||||
|
||||
void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; }
|
||||
void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; }
|
||||
|
||||
protected:
|
||||
// for further flexibility, command processor doesn't call wxCommand::Do()
|
||||
// and Undo() directly but uses these functions which can be overridden in
|
||||
// the derived class
|
||||
virtual bool DoCommand(wxCommand& cmd);
|
||||
virtual bool UndoCommand(wxCommand& cmd);
|
||||
|
||||
int m_maxNoCommands;
|
||||
wxList m_commands;
|
||||
wxList::compatibility_iterator m_currentCommand,
|
||||
m_lastSavedCommand;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenu* m_commandEditMenu;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
wxString m_undoAccelerator;
|
||||
wxString m_redoAccelerator;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxCommandProcessor)
|
||||
DECLARE_NO_COPY_CLASS(wxCommandProcessor)
|
||||
};
|
||||
|
||||
#endif // _WX_CMDPROC_H_
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cmdproc.h
|
||||
// Purpose: undo/redo capable command processing framework
|
||||
// Author: Julian Smart (extracted from docview.h by VZ)
|
||||
// Modified by:
|
||||
// Created: 05.11.00
|
||||
// RCS-ID: $Id: cmdproc.h 49804 2007-11-10 01:09:42Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CMDPROC_H_
|
||||
#define _WX_CMDPROC_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenu;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCommand: a single command capable of performing itself
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCommand : public wxObject
|
||||
{
|
||||
public:
|
||||
wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString);
|
||||
virtual ~wxCommand(){}
|
||||
|
||||
// Override this to perform a command
|
||||
virtual bool Do() = 0;
|
||||
|
||||
// Override this to undo a command
|
||||
virtual bool Undo() = 0;
|
||||
|
||||
virtual bool CanUndo() const { return m_canUndo; }
|
||||
virtual wxString GetName() const { return m_commandName; }
|
||||
|
||||
protected:
|
||||
bool m_canUndo;
|
||||
wxString m_commandName;
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxCommand)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCommandProcessor: wxCommand manager
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxCommandProcessor : public wxObject
|
||||
{
|
||||
public:
|
||||
// if max number of commands is -1, it is unlimited
|
||||
wxCommandProcessor(int maxCommands = -1);
|
||||
virtual ~wxCommandProcessor();
|
||||
|
||||
// Pass a command to the processor. The processor calls Do(); if
|
||||
// successful, is appended to the command history unless storeIt is false.
|
||||
virtual bool Submit(wxCommand *command, bool storeIt = true);
|
||||
|
||||
// just store the command without executing it
|
||||
virtual void Store(wxCommand *command);
|
||||
|
||||
virtual bool Undo();
|
||||
virtual bool Redo();
|
||||
virtual bool CanUndo() const;
|
||||
virtual bool CanRedo() const;
|
||||
|
||||
// Initialises the current command and menu strings.
|
||||
virtual void Initialize();
|
||||
|
||||
// Sets the Undo/Redo menu strings for the current menu.
|
||||
virtual void SetMenuStrings();
|
||||
|
||||
// Gets the current Undo menu label.
|
||||
wxString GetUndoMenuLabel() const;
|
||||
|
||||
// Gets the current Undo menu label.
|
||||
wxString GetRedoMenuLabel() const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// Call this to manage an edit menu.
|
||||
void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; }
|
||||
wxMenu *GetEditMenu() const { return m_commandEditMenu; }
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// command list access
|
||||
wxList& GetCommands() { return m_commands; }
|
||||
const wxList& GetCommands() const { return m_commands; }
|
||||
wxCommand *GetCurrentCommand() const
|
||||
{
|
||||
return (wxCommand *)(m_currentCommand ? m_currentCommand->GetData() : NULL);
|
||||
}
|
||||
int GetMaxCommands() const { return m_maxNoCommands; }
|
||||
virtual void ClearCommands();
|
||||
|
||||
// Has the current project been changed?
|
||||
virtual bool IsDirty() const
|
||||
{
|
||||
return m_currentCommand && (m_lastSavedCommand != m_currentCommand);
|
||||
}
|
||||
|
||||
// Mark the current command as the one where the last save took place
|
||||
void MarkAsSaved()
|
||||
{
|
||||
m_lastSavedCommand = m_currentCommand;
|
||||
}
|
||||
|
||||
|
||||
// By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y"
|
||||
const wxString& GetUndoAccelerator() const { return m_undoAccelerator; }
|
||||
const wxString& GetRedoAccelerator() const { return m_redoAccelerator; }
|
||||
|
||||
void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; }
|
||||
void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; }
|
||||
|
||||
protected:
|
||||
// for further flexibility, command processor doesn't call wxCommand::Do()
|
||||
// and Undo() directly but uses these functions which can be overridden in
|
||||
// the derived class
|
||||
virtual bool DoCommand(wxCommand& cmd);
|
||||
virtual bool UndoCommand(wxCommand& cmd);
|
||||
|
||||
int m_maxNoCommands;
|
||||
wxList m_commands;
|
||||
wxList::compatibility_iterator m_currentCommand,
|
||||
m_lastSavedCommand;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxMenu* m_commandEditMenu;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
wxString m_undoAccelerator;
|
||||
wxString m_redoAccelerator;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxCommandProcessor)
|
||||
DECLARE_NO_COPY_CLASS(wxCommandProcessor)
|
||||
};
|
||||
|
||||
#endif // _WX_CMDPROC_H_
|
||||
|
||||
|
|
|
@ -1,454 +1,454 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cmndata.h
|
||||
// Purpose: Common GDI data classes
|
||||
// Author: Julian Smart and others
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id: cmndata.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CMNDATA_H_BASE_
|
||||
#define _WX_CMNDATA_H_BASE_
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/encinfo.h"
|
||||
#include "wx/colour.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
#include "wx/stream.h"
|
||||
#endif
|
||||
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase;
|
||||
|
||||
|
||||
class WXDLLEXPORT wxColourData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxColourData();
|
||||
wxColourData(const wxColourData& data);
|
||||
virtual ~wxColourData();
|
||||
|
||||
void SetChooseFull(bool flag) { m_chooseFull = flag; }
|
||||
bool GetChooseFull() const { return m_chooseFull; }
|
||||
void SetColour(const wxColour& colour) { m_dataColour = colour; }
|
||||
const wxColour& GetColour() const { return m_dataColour; }
|
||||
wxColour& GetColour() { return m_dataColour; }
|
||||
|
||||
// Array of 16 custom colours
|
||||
void SetCustomColour(int i, const wxColour& colour);
|
||||
wxColour GetCustomColour(int i);
|
||||
|
||||
void operator=(const wxColourData& data);
|
||||
|
||||
public:
|
||||
wxColour m_dataColour;
|
||||
wxColour m_custColours[16];
|
||||
bool m_chooseFull;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColourData)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxFontData : public wxObject
|
||||
{
|
||||
public:
|
||||
wxFontData();
|
||||
virtual ~wxFontData();
|
||||
|
||||
wxFontData(const wxFontData& data)
|
||||
: wxObject(),
|
||||
m_fontColour(data.m_fontColour),
|
||||
m_showHelp(data.m_showHelp),
|
||||
m_allowSymbols(data.m_allowSymbols),
|
||||
m_enableEffects(data.m_enableEffects),
|
||||
m_initialFont(data.m_initialFont),
|
||||
m_chosenFont(data.m_chosenFont),
|
||||
m_minSize(data.m_minSize),
|
||||
m_maxSize(data.m_maxSize),
|
||||
m_encoding(data.m_encoding),
|
||||
m_encodingInfo(data.m_encodingInfo)
|
||||
{
|
||||
}
|
||||
|
||||
wxFontData& operator=(const wxFontData& data)
|
||||
{
|
||||
wxObject::operator=(data);
|
||||
m_fontColour = data.m_fontColour;
|
||||
m_showHelp = data.m_showHelp;
|
||||
m_allowSymbols = data.m_allowSymbols;
|
||||
m_enableEffects = data.m_enableEffects;
|
||||
m_initialFont = data.m_initialFont;
|
||||
m_chosenFont = data.m_chosenFont;
|
||||
m_minSize = data.m_minSize;
|
||||
m_maxSize = data.m_maxSize;
|
||||
m_encoding = data.m_encoding;
|
||||
m_encodingInfo = data.m_encodingInfo;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SetAllowSymbols(bool flag) { m_allowSymbols = flag; }
|
||||
bool GetAllowSymbols() const { return m_allowSymbols; }
|
||||
|
||||
void SetColour(const wxColour& colour) { m_fontColour = colour; }
|
||||
const wxColour& GetColour() const { return m_fontColour; }
|
||||
|
||||
void SetShowHelp(bool flag) { m_showHelp = flag; }
|
||||
bool GetShowHelp() const { return m_showHelp; }
|
||||
|
||||
void EnableEffects(bool flag) { m_enableEffects = flag; }
|
||||
bool GetEnableEffects() const { return m_enableEffects; }
|
||||
|
||||
void SetInitialFont(const wxFont& font) { m_initialFont = font; }
|
||||
wxFont GetInitialFont() const { return m_initialFont; }
|
||||
|
||||
void SetChosenFont(const wxFont& font) { m_chosenFont = font; }
|
||||
wxFont GetChosenFont() const { return m_chosenFont; }
|
||||
|
||||
void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; }
|
||||
|
||||
// encoding info is split into 2 parts: the logical wxWin encoding
|
||||
// (wxFontEncoding) and a structure containing the native parameters for
|
||||
// it (wxNativeEncodingInfo)
|
||||
wxFontEncoding GetEncoding() const { return m_encoding; }
|
||||
void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; }
|
||||
|
||||
wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; }
|
||||
|
||||
|
||||
// public for backwards compatibility only: don't use directly
|
||||
public:
|
||||
wxColour m_fontColour;
|
||||
bool m_showHelp;
|
||||
bool m_allowSymbols;
|
||||
bool m_enableEffects;
|
||||
wxFont m_initialFont;
|
||||
wxFont m_chosenFont;
|
||||
int m_minSize;
|
||||
int m_maxSize;
|
||||
|
||||
private:
|
||||
wxFontEncoding m_encoding;
|
||||
wxNativeEncodingInfo m_encodingInfo;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFontData)
|
||||
};
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
/*
|
||||
* wxPrintData
|
||||
* Encapsulates printer information (not printer dialog information)
|
||||
*/
|
||||
|
||||
enum wxPrintBin
|
||||
{
|
||||
wxPRINTBIN_DEFAULT,
|
||||
|
||||
wxPRINTBIN_ONLYONE,
|
||||
wxPRINTBIN_LOWER,
|
||||
wxPRINTBIN_MIDDLE,
|
||||
wxPRINTBIN_MANUAL,
|
||||
wxPRINTBIN_ENVELOPE,
|
||||
wxPRINTBIN_ENVMANUAL,
|
||||
wxPRINTBIN_AUTO,
|
||||
wxPRINTBIN_TRACTOR,
|
||||
wxPRINTBIN_SMALLFMT,
|
||||
wxPRINTBIN_LARGEFMT,
|
||||
wxPRINTBIN_LARGECAPACITY,
|
||||
wxPRINTBIN_CASSETTE,
|
||||
wxPRINTBIN_FORMSOURCE,
|
||||
|
||||
wxPRINTBIN_USER
|
||||
};
|
||||
|
||||
const int wxPRINTMEDIA_DEFAULT = 0;
|
||||
|
||||
class WXDLLEXPORT wxPrintData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxPrintData();
|
||||
wxPrintData(const wxPrintData& printData);
|
||||
virtual ~wxPrintData();
|
||||
|
||||
int GetNoCopies() const { return m_printNoCopies; }
|
||||
bool GetCollate() const { return m_printCollate; }
|
||||
int GetOrientation() const { return m_printOrientation; }
|
||||
bool IsOrientationReversed() const { return m_printOrientationReversed; }
|
||||
|
||||
// Is this data OK for showing the print dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const ;
|
||||
|
||||
const wxString& GetPrinterName() const { return m_printerName; }
|
||||
bool GetColour() const { return m_colour; }
|
||||
wxDuplexMode GetDuplex() const { return m_duplexMode; }
|
||||
wxPaperSize GetPaperId() const { return m_paperId; }
|
||||
const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size
|
||||
// in wxPageSetupDialogData
|
||||
wxPrintQuality GetQuality() const { return m_printQuality; }
|
||||
wxPrintBin GetBin() const { return m_bin; }
|
||||
wxPrintMode GetPrintMode() const { return m_printMode; }
|
||||
int GetMedia() const { return m_media; }
|
||||
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; }
|
||||
void SetCollate(bool flag) { m_printCollate = flag; }
|
||||
void SetOrientation(int orient) { m_printOrientation = orient; }
|
||||
void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; }
|
||||
|
||||
void SetPrinterName(const wxString& name) { m_printerName = name; }
|
||||
void SetColour(bool colour) { m_colour = colour; }
|
||||
void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; }
|
||||
void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; }
|
||||
void SetPaperSize(const wxSize& sz) { m_paperSize = sz; }
|
||||
void SetQuality(wxPrintQuality quality) { m_printQuality = quality; }
|
||||
void SetBin(wxPrintBin bin) { m_bin = bin; }
|
||||
void SetMedia(int media) { m_media = media; }
|
||||
void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
|
||||
|
||||
wxString GetFilename() const { return m_filename; }
|
||||
void SetFilename( const wxString &filename ) { m_filename = filename; }
|
||||
|
||||
void operator=(const wxPrintData& data);
|
||||
|
||||
char* GetPrivData() const { return m_privData; }
|
||||
int GetPrivDataLen() const { return m_privDataLen; }
|
||||
void SetPrivData( char *privData, int len );
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
// PostScript-specific data
|
||||
wxString GetPrinterCommand() const;
|
||||
wxString GetPrinterOptions() const;
|
||||
wxString GetPreviewCommand() const;
|
||||
wxString GetFontMetricPath() const;
|
||||
double GetPrinterScaleX() const;
|
||||
double GetPrinterScaleY() const;
|
||||
long GetPrinterTranslateX() const;
|
||||
long GetPrinterTranslateY() const;
|
||||
|
||||
void SetPrinterCommand(const wxString& command);
|
||||
void SetPrinterOptions(const wxString& options);
|
||||
void SetPreviewCommand(const wxString& command);
|
||||
void SetFontMetricPath(const wxString& path);
|
||||
void SetPrinterScaleX(double x);
|
||||
void SetPrinterScaleY(double y);
|
||||
void SetPrinterScaling(double x, double y);
|
||||
void SetPrinterTranslateX(long x);
|
||||
void SetPrinterTranslateY(long y);
|
||||
void SetPrinterTranslation(long x, long y);
|
||||
#endif
|
||||
|
||||
// Convert between wxPrintData and native data
|
||||
void ConvertToNative();
|
||||
void ConvertFromNative();
|
||||
// Holds the native print data
|
||||
wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; }
|
||||
|
||||
private:
|
||||
wxPrintBin m_bin;
|
||||
int m_media;
|
||||
wxPrintMode m_printMode;
|
||||
|
||||
int m_printNoCopies;
|
||||
int m_printOrientation;
|
||||
bool m_printOrientationReversed;
|
||||
bool m_printCollate;
|
||||
|
||||
wxString m_printerName;
|
||||
bool m_colour;
|
||||
wxDuplexMode m_duplexMode;
|
||||
wxPrintQuality m_printQuality;
|
||||
wxPaperSize m_paperId;
|
||||
wxSize m_paperSize;
|
||||
|
||||
wxString m_filename;
|
||||
|
||||
char* m_privData;
|
||||
int m_privDataLen;
|
||||
|
||||
wxPrintNativeDataBase *m_nativeData;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintData)
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPrintDialogData
|
||||
* Encapsulates information displayed and edited in the printer dialog box.
|
||||
* Contains a wxPrintData object which is filled in according to the values retrieved
|
||||
* from the dialog.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxPrintDialogData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxPrintDialogData();
|
||||
wxPrintDialogData(const wxPrintDialogData& dialogData);
|
||||
wxPrintDialogData(const wxPrintData& printData);
|
||||
virtual ~wxPrintDialogData();
|
||||
|
||||
int GetFromPage() const { return m_printFromPage; }
|
||||
int GetToPage() const { return m_printToPage; }
|
||||
int GetMinPage() const { return m_printMinPage; }
|
||||
int GetMaxPage() const { return m_printMaxPage; }
|
||||
int GetNoCopies() const { return m_printNoCopies; }
|
||||
bool GetAllPages() const { return m_printAllPages; }
|
||||
bool GetSelection() const { return m_printSelection; }
|
||||
bool GetCollate() const { return m_printCollate; }
|
||||
bool GetPrintToFile() const { return m_printToFile; }
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
bool GetSetupDialog() const { return m_printSetupDialog; }
|
||||
#endif
|
||||
void SetFromPage(int v) { m_printFromPage = v; }
|
||||
void SetToPage(int v) { m_printToPage = v; }
|
||||
void SetMinPage(int v) { m_printMinPage = v; }
|
||||
void SetMaxPage(int v) { m_printMaxPage = v; }
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; }
|
||||
void SetAllPages(bool flag) { m_printAllPages = flag; }
|
||||
void SetSelection(bool flag) { m_printSelection = flag; }
|
||||
void SetCollate(bool flag) { m_printCollate = flag; }
|
||||
void SetPrintToFile(bool flag) { m_printToFile = flag; }
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
void SetSetupDialog(bool flag) { m_printSetupDialog = flag; }
|
||||
#endif
|
||||
void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; }
|
||||
void EnableSelection(bool flag) { m_printEnableSelection = flag; }
|
||||
void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; }
|
||||
void EnableHelp(bool flag) { m_printEnableHelp = flag; }
|
||||
|
||||
bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; }
|
||||
bool GetEnableSelection() const { return m_printEnableSelection; }
|
||||
bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; }
|
||||
bool GetEnableHelp() const { return m_printEnableHelp; }
|
||||
|
||||
// Is this data OK for showing the print dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_printData.Ok() ; }
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
|
||||
|
||||
void operator=(const wxPrintDialogData& data);
|
||||
void operator=(const wxPrintData& data); // Sets internal m_printData member
|
||||
|
||||
private:
|
||||
int m_printFromPage;
|
||||
int m_printToPage;
|
||||
int m_printMinPage;
|
||||
int m_printMaxPage;
|
||||
int m_printNoCopies;
|
||||
bool m_printAllPages;
|
||||
bool m_printCollate;
|
||||
bool m_printToFile;
|
||||
bool m_printSelection;
|
||||
bool m_printEnableSelection;
|
||||
bool m_printEnablePageNumbers;
|
||||
bool m_printEnableHelp;
|
||||
bool m_printEnablePrintToFile;
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
bool m_printSetupDialog;
|
||||
#endif
|
||||
wxPrintData m_printData;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
|
||||
};
|
||||
|
||||
/*
|
||||
* This is the data used (and returned) by the wxPageSetupDialog.
|
||||
*/
|
||||
|
||||
// Compatibility with old name
|
||||
#define wxPageSetupData wxPageSetupDialogData
|
||||
|
||||
class WXDLLEXPORT wxPageSetupDialogData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxPageSetupDialogData();
|
||||
wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
|
||||
wxPageSetupDialogData(const wxPrintData& printData);
|
||||
virtual ~wxPageSetupDialogData();
|
||||
|
||||
wxSize GetPaperSize() const { return m_paperSize; }
|
||||
wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); }
|
||||
wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; }
|
||||
wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; }
|
||||
wxPoint GetMarginTopLeft() const { return m_marginTopLeft; }
|
||||
wxPoint GetMarginBottomRight() const { return m_marginBottomRight; }
|
||||
|
||||
bool GetDefaultMinMargins() const { return m_defaultMinMargins; }
|
||||
bool GetEnableMargins() const { return m_enableMargins; }
|
||||
bool GetEnableOrientation() const { return m_enableOrientation; }
|
||||
bool GetEnablePaper() const { return m_enablePaper; }
|
||||
bool GetEnablePrinter() const { return m_enablePrinter; }
|
||||
bool GetDefaultInfo() const { return m_getDefaultInfo; }
|
||||
bool GetEnableHelp() const { return m_enableHelp; }
|
||||
|
||||
// Is this data OK for showing the page setup dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_printData.Ok() ; }
|
||||
|
||||
// If a corresponding paper type is found in the paper database, will set the m_printData
|
||||
// paper size id member as well.
|
||||
void SetPaperSize(const wxSize& sz);
|
||||
|
||||
void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); }
|
||||
|
||||
// Sets the wxPrintData id, plus the paper width/height if found in the paper database.
|
||||
void SetPaperSize(wxPaperSize id);
|
||||
|
||||
void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; }
|
||||
void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; }
|
||||
void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; }
|
||||
void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; }
|
||||
void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; }
|
||||
void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; }
|
||||
|
||||
void EnableMargins(bool flag) { m_enableMargins = flag; }
|
||||
void EnableOrientation(bool flag) { m_enableOrientation = flag; }
|
||||
void EnablePaper(bool flag) { m_enablePaper = flag; }
|
||||
void EnablePrinter(bool flag) { m_enablePrinter = flag; }
|
||||
void EnableHelp(bool flag) { m_enableHelp = flag; }
|
||||
|
||||
// Use paper size defined in this object to set the wxPrintData
|
||||
// paper id
|
||||
void CalculateIdFromPaperSize();
|
||||
|
||||
// Use paper id in wxPrintData to set this object's paper size
|
||||
void CalculatePaperSizeFromId();
|
||||
|
||||
wxPageSetupDialogData& operator=(const wxPageSetupData& data);
|
||||
wxPageSetupDialogData& operator=(const wxPrintData& data);
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
const wxPrintData& GetPrintData() const { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& printData);
|
||||
|
||||
private:
|
||||
wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
|
||||
wxPoint m_minMarginTopLeft;
|
||||
wxPoint m_minMarginBottomRight;
|
||||
wxPoint m_marginTopLeft;
|
||||
wxPoint m_marginBottomRight;
|
||||
bool m_defaultMinMargins;
|
||||
bool m_enableMargins;
|
||||
bool m_enableOrientation;
|
||||
bool m_enablePaper;
|
||||
bool m_enablePrinter;
|
||||
bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
|
||||
bool m_enableHelp;
|
||||
wxPrintData m_printData;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
|
||||
};
|
||||
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#endif
|
||||
// _WX_CMNDATA_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cmndata.h
|
||||
// Purpose: Common GDI data classes
|
||||
// Author: Julian Smart and others
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id: cmndata.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CMNDATA_H_BASE_
|
||||
#define _WX_CMNDATA_H_BASE_
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/encinfo.h"
|
||||
#include "wx/colour.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
#include "wx/stream.h"
|
||||
#endif
|
||||
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase;
|
||||
|
||||
|
||||
class WXDLLEXPORT wxColourData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxColourData();
|
||||
wxColourData(const wxColourData& data);
|
||||
virtual ~wxColourData();
|
||||
|
||||
void SetChooseFull(bool flag) { m_chooseFull = flag; }
|
||||
bool GetChooseFull() const { return m_chooseFull; }
|
||||
void SetColour(const wxColour& colour) { m_dataColour = colour; }
|
||||
const wxColour& GetColour() const { return m_dataColour; }
|
||||
wxColour& GetColour() { return m_dataColour; }
|
||||
|
||||
// Array of 16 custom colours
|
||||
void SetCustomColour(int i, const wxColour& colour);
|
||||
wxColour GetCustomColour(int i);
|
||||
|
||||
void operator=(const wxColourData& data);
|
||||
|
||||
public:
|
||||
wxColour m_dataColour;
|
||||
wxColour m_custColours[16];
|
||||
bool m_chooseFull;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColourData)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxFontData : public wxObject
|
||||
{
|
||||
public:
|
||||
wxFontData();
|
||||
virtual ~wxFontData();
|
||||
|
||||
wxFontData(const wxFontData& data)
|
||||
: wxObject(),
|
||||
m_fontColour(data.m_fontColour),
|
||||
m_showHelp(data.m_showHelp),
|
||||
m_allowSymbols(data.m_allowSymbols),
|
||||
m_enableEffects(data.m_enableEffects),
|
||||
m_initialFont(data.m_initialFont),
|
||||
m_chosenFont(data.m_chosenFont),
|
||||
m_minSize(data.m_minSize),
|
||||
m_maxSize(data.m_maxSize),
|
||||
m_encoding(data.m_encoding),
|
||||
m_encodingInfo(data.m_encodingInfo)
|
||||
{
|
||||
}
|
||||
|
||||
wxFontData& operator=(const wxFontData& data)
|
||||
{
|
||||
wxObject::operator=(data);
|
||||
m_fontColour = data.m_fontColour;
|
||||
m_showHelp = data.m_showHelp;
|
||||
m_allowSymbols = data.m_allowSymbols;
|
||||
m_enableEffects = data.m_enableEffects;
|
||||
m_initialFont = data.m_initialFont;
|
||||
m_chosenFont = data.m_chosenFont;
|
||||
m_minSize = data.m_minSize;
|
||||
m_maxSize = data.m_maxSize;
|
||||
m_encoding = data.m_encoding;
|
||||
m_encodingInfo = data.m_encodingInfo;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SetAllowSymbols(bool flag) { m_allowSymbols = flag; }
|
||||
bool GetAllowSymbols() const { return m_allowSymbols; }
|
||||
|
||||
void SetColour(const wxColour& colour) { m_fontColour = colour; }
|
||||
const wxColour& GetColour() const { return m_fontColour; }
|
||||
|
||||
void SetShowHelp(bool flag) { m_showHelp = flag; }
|
||||
bool GetShowHelp() const { return m_showHelp; }
|
||||
|
||||
void EnableEffects(bool flag) { m_enableEffects = flag; }
|
||||
bool GetEnableEffects() const { return m_enableEffects; }
|
||||
|
||||
void SetInitialFont(const wxFont& font) { m_initialFont = font; }
|
||||
wxFont GetInitialFont() const { return m_initialFont; }
|
||||
|
||||
void SetChosenFont(const wxFont& font) { m_chosenFont = font; }
|
||||
wxFont GetChosenFont() const { return m_chosenFont; }
|
||||
|
||||
void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; }
|
||||
|
||||
// encoding info is split into 2 parts: the logical wxWin encoding
|
||||
// (wxFontEncoding) and a structure containing the native parameters for
|
||||
// it (wxNativeEncodingInfo)
|
||||
wxFontEncoding GetEncoding() const { return m_encoding; }
|
||||
void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; }
|
||||
|
||||
wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; }
|
||||
|
||||
|
||||
// public for backwards compatibility only: don't use directly
|
||||
public:
|
||||
wxColour m_fontColour;
|
||||
bool m_showHelp;
|
||||
bool m_allowSymbols;
|
||||
bool m_enableEffects;
|
||||
wxFont m_initialFont;
|
||||
wxFont m_chosenFont;
|
||||
int m_minSize;
|
||||
int m_maxSize;
|
||||
|
||||
private:
|
||||
wxFontEncoding m_encoding;
|
||||
wxNativeEncodingInfo m_encodingInfo;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFontData)
|
||||
};
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
/*
|
||||
* wxPrintData
|
||||
* Encapsulates printer information (not printer dialog information)
|
||||
*/
|
||||
|
||||
enum wxPrintBin
|
||||
{
|
||||
wxPRINTBIN_DEFAULT,
|
||||
|
||||
wxPRINTBIN_ONLYONE,
|
||||
wxPRINTBIN_LOWER,
|
||||
wxPRINTBIN_MIDDLE,
|
||||
wxPRINTBIN_MANUAL,
|
||||
wxPRINTBIN_ENVELOPE,
|
||||
wxPRINTBIN_ENVMANUAL,
|
||||
wxPRINTBIN_AUTO,
|
||||
wxPRINTBIN_TRACTOR,
|
||||
wxPRINTBIN_SMALLFMT,
|
||||
wxPRINTBIN_LARGEFMT,
|
||||
wxPRINTBIN_LARGECAPACITY,
|
||||
wxPRINTBIN_CASSETTE,
|
||||
wxPRINTBIN_FORMSOURCE,
|
||||
|
||||
wxPRINTBIN_USER
|
||||
};
|
||||
|
||||
const int wxPRINTMEDIA_DEFAULT = 0;
|
||||
|
||||
class WXDLLEXPORT wxPrintData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxPrintData();
|
||||
wxPrintData(const wxPrintData& printData);
|
||||
virtual ~wxPrintData();
|
||||
|
||||
int GetNoCopies() const { return m_printNoCopies; }
|
||||
bool GetCollate() const { return m_printCollate; }
|
||||
int GetOrientation() const { return m_printOrientation; }
|
||||
bool IsOrientationReversed() const { return m_printOrientationReversed; }
|
||||
|
||||
// Is this data OK for showing the print dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const ;
|
||||
|
||||
const wxString& GetPrinterName() const { return m_printerName; }
|
||||
bool GetColour() const { return m_colour; }
|
||||
wxDuplexMode GetDuplex() const { return m_duplexMode; }
|
||||
wxPaperSize GetPaperId() const { return m_paperId; }
|
||||
const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size
|
||||
// in wxPageSetupDialogData
|
||||
wxPrintQuality GetQuality() const { return m_printQuality; }
|
||||
wxPrintBin GetBin() const { return m_bin; }
|
||||
wxPrintMode GetPrintMode() const { return m_printMode; }
|
||||
int GetMedia() const { return m_media; }
|
||||
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; }
|
||||
void SetCollate(bool flag) { m_printCollate = flag; }
|
||||
void SetOrientation(int orient) { m_printOrientation = orient; }
|
||||
void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; }
|
||||
|
||||
void SetPrinterName(const wxString& name) { m_printerName = name; }
|
||||
void SetColour(bool colour) { m_colour = colour; }
|
||||
void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; }
|
||||
void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; }
|
||||
void SetPaperSize(const wxSize& sz) { m_paperSize = sz; }
|
||||
void SetQuality(wxPrintQuality quality) { m_printQuality = quality; }
|
||||
void SetBin(wxPrintBin bin) { m_bin = bin; }
|
||||
void SetMedia(int media) { m_media = media; }
|
||||
void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
|
||||
|
||||
wxString GetFilename() const { return m_filename; }
|
||||
void SetFilename( const wxString &filename ) { m_filename = filename; }
|
||||
|
||||
void operator=(const wxPrintData& data);
|
||||
|
||||
char* GetPrivData() const { return m_privData; }
|
||||
int GetPrivDataLen() const { return m_privDataLen; }
|
||||
void SetPrivData( char *privData, int len );
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
// PostScript-specific data
|
||||
wxString GetPrinterCommand() const;
|
||||
wxString GetPrinterOptions() const;
|
||||
wxString GetPreviewCommand() const;
|
||||
wxString GetFontMetricPath() const;
|
||||
double GetPrinterScaleX() const;
|
||||
double GetPrinterScaleY() const;
|
||||
long GetPrinterTranslateX() const;
|
||||
long GetPrinterTranslateY() const;
|
||||
|
||||
void SetPrinterCommand(const wxString& command);
|
||||
void SetPrinterOptions(const wxString& options);
|
||||
void SetPreviewCommand(const wxString& command);
|
||||
void SetFontMetricPath(const wxString& path);
|
||||
void SetPrinterScaleX(double x);
|
||||
void SetPrinterScaleY(double y);
|
||||
void SetPrinterScaling(double x, double y);
|
||||
void SetPrinterTranslateX(long x);
|
||||
void SetPrinterTranslateY(long y);
|
||||
void SetPrinterTranslation(long x, long y);
|
||||
#endif
|
||||
|
||||
// Convert between wxPrintData and native data
|
||||
void ConvertToNative();
|
||||
void ConvertFromNative();
|
||||
// Holds the native print data
|
||||
wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; }
|
||||
|
||||
private:
|
||||
wxPrintBin m_bin;
|
||||
int m_media;
|
||||
wxPrintMode m_printMode;
|
||||
|
||||
int m_printNoCopies;
|
||||
int m_printOrientation;
|
||||
bool m_printOrientationReversed;
|
||||
bool m_printCollate;
|
||||
|
||||
wxString m_printerName;
|
||||
bool m_colour;
|
||||
wxDuplexMode m_duplexMode;
|
||||
wxPrintQuality m_printQuality;
|
||||
wxPaperSize m_paperId;
|
||||
wxSize m_paperSize;
|
||||
|
||||
wxString m_filename;
|
||||
|
||||
char* m_privData;
|
||||
int m_privDataLen;
|
||||
|
||||
wxPrintNativeDataBase *m_nativeData;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintData)
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPrintDialogData
|
||||
* Encapsulates information displayed and edited in the printer dialog box.
|
||||
* Contains a wxPrintData object which is filled in according to the values retrieved
|
||||
* from the dialog.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxPrintDialogData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxPrintDialogData();
|
||||
wxPrintDialogData(const wxPrintDialogData& dialogData);
|
||||
wxPrintDialogData(const wxPrintData& printData);
|
||||
virtual ~wxPrintDialogData();
|
||||
|
||||
int GetFromPage() const { return m_printFromPage; }
|
||||
int GetToPage() const { return m_printToPage; }
|
||||
int GetMinPage() const { return m_printMinPage; }
|
||||
int GetMaxPage() const { return m_printMaxPage; }
|
||||
int GetNoCopies() const { return m_printNoCopies; }
|
||||
bool GetAllPages() const { return m_printAllPages; }
|
||||
bool GetSelection() const { return m_printSelection; }
|
||||
bool GetCollate() const { return m_printCollate; }
|
||||
bool GetPrintToFile() const { return m_printToFile; }
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
bool GetSetupDialog() const { return m_printSetupDialog; }
|
||||
#endif
|
||||
void SetFromPage(int v) { m_printFromPage = v; }
|
||||
void SetToPage(int v) { m_printToPage = v; }
|
||||
void SetMinPage(int v) { m_printMinPage = v; }
|
||||
void SetMaxPage(int v) { m_printMaxPage = v; }
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; }
|
||||
void SetAllPages(bool flag) { m_printAllPages = flag; }
|
||||
void SetSelection(bool flag) { m_printSelection = flag; }
|
||||
void SetCollate(bool flag) { m_printCollate = flag; }
|
||||
void SetPrintToFile(bool flag) { m_printToFile = flag; }
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
void SetSetupDialog(bool flag) { m_printSetupDialog = flag; }
|
||||
#endif
|
||||
void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; }
|
||||
void EnableSelection(bool flag) { m_printEnableSelection = flag; }
|
||||
void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; }
|
||||
void EnableHelp(bool flag) { m_printEnableHelp = flag; }
|
||||
|
||||
bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; }
|
||||
bool GetEnableSelection() const { return m_printEnableSelection; }
|
||||
bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; }
|
||||
bool GetEnableHelp() const { return m_printEnableHelp; }
|
||||
|
||||
// Is this data OK for showing the print dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_printData.Ok() ; }
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
|
||||
|
||||
void operator=(const wxPrintDialogData& data);
|
||||
void operator=(const wxPrintData& data); // Sets internal m_printData member
|
||||
|
||||
private:
|
||||
int m_printFromPage;
|
||||
int m_printToPage;
|
||||
int m_printMinPage;
|
||||
int m_printMaxPage;
|
||||
int m_printNoCopies;
|
||||
bool m_printAllPages;
|
||||
bool m_printCollate;
|
||||
bool m_printToFile;
|
||||
bool m_printSelection;
|
||||
bool m_printEnableSelection;
|
||||
bool m_printEnablePageNumbers;
|
||||
bool m_printEnableHelp;
|
||||
bool m_printEnablePrintToFile;
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
bool m_printSetupDialog;
|
||||
#endif
|
||||
wxPrintData m_printData;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
|
||||
};
|
||||
|
||||
/*
|
||||
* This is the data used (and returned) by the wxPageSetupDialog.
|
||||
*/
|
||||
|
||||
// Compatibility with old name
|
||||
#define wxPageSetupData wxPageSetupDialogData
|
||||
|
||||
class WXDLLEXPORT wxPageSetupDialogData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxPageSetupDialogData();
|
||||
wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
|
||||
wxPageSetupDialogData(const wxPrintData& printData);
|
||||
virtual ~wxPageSetupDialogData();
|
||||
|
||||
wxSize GetPaperSize() const { return m_paperSize; }
|
||||
wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); }
|
||||
wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; }
|
||||
wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; }
|
||||
wxPoint GetMarginTopLeft() const { return m_marginTopLeft; }
|
||||
wxPoint GetMarginBottomRight() const { return m_marginBottomRight; }
|
||||
|
||||
bool GetDefaultMinMargins() const { return m_defaultMinMargins; }
|
||||
bool GetEnableMargins() const { return m_enableMargins; }
|
||||
bool GetEnableOrientation() const { return m_enableOrientation; }
|
||||
bool GetEnablePaper() const { return m_enablePaper; }
|
||||
bool GetEnablePrinter() const { return m_enablePrinter; }
|
||||
bool GetDefaultInfo() const { return m_getDefaultInfo; }
|
||||
bool GetEnableHelp() const { return m_enableHelp; }
|
||||
|
||||
// Is this data OK for showing the page setup dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_printData.Ok() ; }
|
||||
|
||||
// If a corresponding paper type is found in the paper database, will set the m_printData
|
||||
// paper size id member as well.
|
||||
void SetPaperSize(const wxSize& sz);
|
||||
|
||||
void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); }
|
||||
|
||||
// Sets the wxPrintData id, plus the paper width/height if found in the paper database.
|
||||
void SetPaperSize(wxPaperSize id);
|
||||
|
||||
void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; }
|
||||
void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; }
|
||||
void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; }
|
||||
void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; }
|
||||
void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; }
|
||||
void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; }
|
||||
|
||||
void EnableMargins(bool flag) { m_enableMargins = flag; }
|
||||
void EnableOrientation(bool flag) { m_enableOrientation = flag; }
|
||||
void EnablePaper(bool flag) { m_enablePaper = flag; }
|
||||
void EnablePrinter(bool flag) { m_enablePrinter = flag; }
|
||||
void EnableHelp(bool flag) { m_enableHelp = flag; }
|
||||
|
||||
// Use paper size defined in this object to set the wxPrintData
|
||||
// paper id
|
||||
void CalculateIdFromPaperSize();
|
||||
|
||||
// Use paper id in wxPrintData to set this object's paper size
|
||||
void CalculatePaperSizeFromId();
|
||||
|
||||
wxPageSetupDialogData& operator=(const wxPageSetupData& data);
|
||||
wxPageSetupDialogData& operator=(const wxPrintData& data);
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
const wxPrintData& GetPrintData() const { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& printData);
|
||||
|
||||
private:
|
||||
wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
|
||||
wxPoint m_minMarginTopLeft;
|
||||
wxPoint m_minMarginBottomRight;
|
||||
wxPoint m_marginTopLeft;
|
||||
wxPoint m_marginBottomRight;
|
||||
bool m_defaultMinMargins;
|
||||
bool m_enableMargins;
|
||||
bool m_enableOrientation;
|
||||
bool m_enablePaper;
|
||||
bool m_enablePrinter;
|
||||
bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
|
||||
bool m_enableHelp;
|
||||
wxPrintData m_printData;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
|
||||
};
|
||||
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#endif
|
||||
// _WX_CMNDATA_H_BASE_
|
||||
|
|
|
@ -1,104 +1,104 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/collpane.h
|
||||
// Purpose: wxCollapsiblePane
|
||||
// Author: Francesco Montorsi
|
||||
// Modified by:
|
||||
// Created: 8/10/2006
|
||||
// RCS-ID: $Id: collpane.h 43300 2006-11-11 07:32:08Z RD $
|
||||
// Copyright: (c) Francesco Montorsi
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
#define _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
|
||||
#if wxUSE_COLLPANE
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCollapsiblePaneBase: interface for wxCollapsiblePane
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER)
|
||||
#define wxCP_NO_TLW_RESIZE (0x0002)
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxCollapsiblePaneBase() {}
|
||||
|
||||
virtual void Collapse(bool collapse = true) = 0;
|
||||
void Expand() { Collapse(false); }
|
||||
|
||||
virtual bool IsCollapsed() const = 0;
|
||||
bool IsExpanded() const { return !IsCollapsed(); }
|
||||
|
||||
virtual wxWindow *GetPane() const = 0;
|
||||
|
||||
virtual wxString GetLabel() const = 0;
|
||||
virtual void SetLabel(const wxString& label) = 0;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event types and macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, 1102)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxCollapsiblePaneEvent() {}
|
||||
wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed)
|
||||
: wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id),
|
||||
m_bCollapsed(collapsed)
|
||||
{
|
||||
SetEventObject(generator);
|
||||
}
|
||||
|
||||
bool GetCollapsed() const { return m_bCollapsed; }
|
||||
void SetCollapsed(bool c) { m_bCollapsed = c; }
|
||||
|
||||
|
||||
// default copy ctor, assignment operator and dtor are ok
|
||||
virtual wxEvent *Clone() const { return new wxCollapsiblePaneEvent(*this); }
|
||||
|
||||
private:
|
||||
bool m_bCollapsed;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCollapsiblePaneEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event types and macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&);
|
||||
|
||||
#define wxCollapsiblePaneEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func)
|
||||
|
||||
#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
|
||||
|
||||
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/collpane.h"
|
||||
#else
|
||||
#include "wx/generic/collpaneg.h"
|
||||
|
||||
// use #define and not a typedef to allow forward declaring the class
|
||||
#define wxCollapsiblePane wxGenericCollapsiblePane
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_COLLPANE
|
||||
|
||||
#endif // _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/collpane.h
|
||||
// Purpose: wxCollapsiblePane
|
||||
// Author: Francesco Montorsi
|
||||
// Modified by:
|
||||
// Created: 8/10/2006
|
||||
// RCS-ID: $Id: collpane.h 43300 2006-11-11 07:32:08Z RD $
|
||||
// Copyright: (c) Francesco Montorsi
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
#define _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
|
||||
#if wxUSE_COLLPANE
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCollapsiblePaneBase: interface for wxCollapsiblePane
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER)
|
||||
#define wxCP_NO_TLW_RESIZE (0x0002)
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxCollapsiblePaneBase() {}
|
||||
|
||||
virtual void Collapse(bool collapse = true) = 0;
|
||||
void Expand() { Collapse(false); }
|
||||
|
||||
virtual bool IsCollapsed() const = 0;
|
||||
bool IsExpanded() const { return !IsCollapsed(); }
|
||||
|
||||
virtual wxWindow *GetPane() const = 0;
|
||||
|
||||
virtual wxString GetLabel() const = 0;
|
||||
virtual void SetLabel(const wxString& label) = 0;
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event types and macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, 1102)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxCollapsiblePaneEvent() {}
|
||||
wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed)
|
||||
: wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id),
|
||||
m_bCollapsed(collapsed)
|
||||
{
|
||||
SetEventObject(generator);
|
||||
}
|
||||
|
||||
bool GetCollapsed() const { return m_bCollapsed; }
|
||||
void SetCollapsed(bool c) { m_bCollapsed = c; }
|
||||
|
||||
|
||||
// default copy ctor, assignment operator and dtor are ok
|
||||
virtual wxEvent *Clone() const { return new wxCollapsiblePaneEvent(*this); }
|
||||
|
||||
private:
|
||||
bool m_bCollapsed;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCollapsiblePaneEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event types and macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&);
|
||||
|
||||
#define wxCollapsiblePaneEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func)
|
||||
|
||||
#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
|
||||
|
||||
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/collpane.h"
|
||||
#else
|
||||
#include "wx/generic/collpaneg.h"
|
||||
|
||||
// use #define and not a typedef to allow forward declaring the class
|
||||
#define wxCollapsiblePane wxGenericCollapsiblePane
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_COLLPANE
|
||||
|
||||
#endif // _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/colrdlgg.h
|
||||
// Purpose: wxColourDialog
|
||||
// Author: Vadim Zeitiln
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id: colordlg.h 36623 2006-01-02 14:26:36Z JS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLORDLG_H_BASE_
|
||||
#define _WX_COLORDLG_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_COLOURDLG
|
||||
|
||||
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/msw/colordlg.h"
|
||||
#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/mac/colordlg.h"
|
||||
#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/colordlg.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/colordlg.h"
|
||||
#else
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
|
||||
#define wxColourDialog wxGenericColourDialog
|
||||
#endif
|
||||
|
||||
// get the colour from user and return it
|
||||
wxColour WXDLLEXPORT
|
||||
wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
|
||||
const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString);
|
||||
|
||||
#endif // wxUSE_COLOURDLG
|
||||
|
||||
#endif
|
||||
// _WX_COLORDLG_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/colrdlgg.h
|
||||
// Purpose: wxColourDialog
|
||||
// Author: Vadim Zeitiln
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id: colordlg.h 36623 2006-01-02 14:26:36Z JS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLORDLG_H_BASE_
|
||||
#define _WX_COLORDLG_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_COLOURDLG
|
||||
|
||||
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/msw/colordlg.h"
|
||||
#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/mac/colordlg.h"
|
||||
#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/colordlg.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/colordlg.h"
|
||||
#else
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
|
||||
#define wxColourDialog wxGenericColourDialog
|
||||
#endif
|
||||
|
||||
// get the colour from user and return it
|
||||
wxColour WXDLLEXPORT
|
||||
wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
|
||||
const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString);
|
||||
|
||||
#endif // wxUSE_COLOURDLG
|
||||
|
||||
#endif
|
||||
// _WX_COLORDLG_H_BASE_
|
||||
|
|
|
@ -1,154 +1,154 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/colour.h
|
||||
// Purpose: wxColourBase definition
|
||||
// Author: Julian Smart
|
||||
// Modified by: Francesco Montorsi
|
||||
// Created:
|
||||
// RCS-ID: $Id: colour.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLOUR_H_BASE_
|
||||
#define _WX_COLOUR_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
|
||||
// the standard wxColour constructors;
|
||||
// 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
|
||||
// constructors
|
||||
#define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \
|
||||
wxColour( ChannelType red, ChannelType green, ChannelType blue, \
|
||||
ChannelType alpha = wxALPHA_OPAQUE ) \
|
||||
{ Set(red, green, blue, alpha); } \
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); } \
|
||||
wxColour(const wxString &colourName) { Set(colourName); } \
|
||||
wxColour(const wxChar *colourName) { Set(colourName); }
|
||||
|
||||
|
||||
// flags for wxColour -> wxString conversion (see wxColour::GetAsString)
|
||||
#define wxC2S_NAME 1 // return colour name, when possible
|
||||
#define wxC2S_CSS_SYNTAX 2 // return colour in rgb(r,g,b) syntax
|
||||
#define wxC2S_HTML_SYNTAX 4 // return colour in #rrggbb syntax
|
||||
|
||||
|
||||
const unsigned char wxALPHA_TRANSPARENT = 0;
|
||||
const unsigned char wxALPHA_OPAQUE = 0xff;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxVariant support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_VARIANT
|
||||
#include "wx/variant.h"
|
||||
DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxColourBase: this class has no data members, just some functions to avoid
|
||||
// code redundancy in all native wxColour implementations
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxColourBase : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// type of a single colour component
|
||||
typedef unsigned char ChannelType;
|
||||
|
||||
wxColourBase() {}
|
||||
virtual ~wxColourBase() {}
|
||||
|
||||
|
||||
// Set() functions
|
||||
// ---------------
|
||||
|
||||
void Set(ChannelType red,
|
||||
ChannelType green,
|
||||
ChannelType blue,
|
||||
ChannelType alpha = wxALPHA_OPAQUE)
|
||||
{ InitRGBA(red,green,blue, alpha); }
|
||||
|
||||
// implemented in colourcmn.cpp
|
||||
bool Set(const wxChar *str)
|
||||
{ return FromString(str); }
|
||||
|
||||
bool Set(const wxString &str)
|
||||
{ return FromString(str); }
|
||||
|
||||
void Set(unsigned long colRGB)
|
||||
{
|
||||
// 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
|
||||
Set((ChannelType)(0xFF & colRGB),
|
||||
(ChannelType)(0xFF & (colRGB >> 8)),
|
||||
(ChannelType)(0xFF & (colRGB >> 16)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const = 0;
|
||||
|
||||
virtual ChannelType Red() const = 0;
|
||||
virtual ChannelType Green() const = 0;
|
||||
virtual ChannelType Blue() const = 0;
|
||||
virtual ChannelType Alpha() const
|
||||
{ return wxALPHA_OPAQUE ; }
|
||||
|
||||
// implemented in colourcmn.cpp
|
||||
virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
|
||||
|
||||
|
||||
|
||||
// old, deprecated
|
||||
// ---------------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxDEPRECATED( static wxColour CreateByName(const wxString& name) );
|
||||
wxDEPRECATED( void InitFromName(const wxString& col) );
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void
|
||||
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0;
|
||||
|
||||
virtual bool FromString(const wxChar *s);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/generic/colour.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/colour.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/colour.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/colour.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/colour.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/generic/colour.h"
|
||||
#elif defined(__WXDFB__)
|
||||
#include "wx/generic/colour.h"
|
||||
#elif defined(__WXX11__)
|
||||
#include "wx/x11/colour.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/colour.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/colour.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/colour.h"
|
||||
#endif
|
||||
|
||||
#define wxColor wxColour
|
||||
|
||||
#endif // _WX_COLOUR_H_BASE_
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/colour.h
|
||||
// Purpose: wxColourBase definition
|
||||
// Author: Julian Smart
|
||||
// Modified by: Francesco Montorsi
|
||||
// Created:
|
||||
// RCS-ID: $Id: colour.h 53135 2008-04-12 02:31:04Z VZ $
|
||||
// Copyright: Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLOUR_H_BASE_
|
||||
#define _WX_COLOUR_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
|
||||
// the standard wxColour constructors;
|
||||
// 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
|
||||
// constructors
|
||||
#define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \
|
||||
wxColour( ChannelType red, ChannelType green, ChannelType blue, \
|
||||
ChannelType alpha = wxALPHA_OPAQUE ) \
|
||||
{ Set(red, green, blue, alpha); } \
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); } \
|
||||
wxColour(const wxString &colourName) { Set(colourName); } \
|
||||
wxColour(const wxChar *colourName) { Set(colourName); }
|
||||
|
||||
|
||||
// flags for wxColour -> wxString conversion (see wxColour::GetAsString)
|
||||
#define wxC2S_NAME 1 // return colour name, when possible
|
||||
#define wxC2S_CSS_SYNTAX 2 // return colour in rgb(r,g,b) syntax
|
||||
#define wxC2S_HTML_SYNTAX 4 // return colour in #rrggbb syntax
|
||||
|
||||
|
||||
const unsigned char wxALPHA_TRANSPARENT = 0;
|
||||
const unsigned char wxALPHA_OPAQUE = 0xff;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxVariant support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_VARIANT
|
||||
#include "wx/variant.h"
|
||||
DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxColourBase: this class has no data members, just some functions to avoid
|
||||
// code redundancy in all native wxColour implementations
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxColourBase : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// type of a single colour component
|
||||
typedef unsigned char ChannelType;
|
||||
|
||||
wxColourBase() {}
|
||||
virtual ~wxColourBase() {}
|
||||
|
||||
|
||||
// Set() functions
|
||||
// ---------------
|
||||
|
||||
void Set(ChannelType red,
|
||||
ChannelType green,
|
||||
ChannelType blue,
|
||||
ChannelType alpha = wxALPHA_OPAQUE)
|
||||
{ InitRGBA(red,green,blue, alpha); }
|
||||
|
||||
// implemented in colourcmn.cpp
|
||||
bool Set(const wxChar *str)
|
||||
{ return FromString(str); }
|
||||
|
||||
bool Set(const wxString &str)
|
||||
{ return FromString(str); }
|
||||
|
||||
void Set(unsigned long colRGB)
|
||||
{
|
||||
// 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
|
||||
Set((ChannelType)(0xFF & colRGB),
|
||||
(ChannelType)(0xFF & (colRGB >> 8)),
|
||||
(ChannelType)(0xFF & (colRGB >> 16)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const = 0;
|
||||
|
||||
virtual ChannelType Red() const = 0;
|
||||
virtual ChannelType Green() const = 0;
|
||||
virtual ChannelType Blue() const = 0;
|
||||
virtual ChannelType Alpha() const
|
||||
{ return wxALPHA_OPAQUE ; }
|
||||
|
||||
// implemented in colourcmn.cpp
|
||||
virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
|
||||
|
||||
|
||||
|
||||
// old, deprecated
|
||||
// ---------------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxDEPRECATED( static wxColour CreateByName(const wxString& name) );
|
||||
wxDEPRECATED( void InitFromName(const wxString& col) );
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void
|
||||
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0;
|
||||
|
||||
virtual bool FromString(const wxChar *s);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/generic/colour.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/colour.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/colour.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/colour.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/colour.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/generic/colour.h"
|
||||
#elif defined(__WXDFB__)
|
||||
#include "wx/generic/colour.h"
|
||||
#elif defined(__WXX11__)
|
||||
#include "wx/x11/colour.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/colour.h"
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/colour.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/colour.h"
|
||||
#endif
|
||||
|
||||
#define wxColor wxColour
|
||||
|
||||
#endif // _WX_COLOUR_H_BASE_
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue