Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
645325a423 |
48
.cvsignore
@@ -1,48 +0,0 @@
|
||||
system.list
|
||||
bin
|
||||
.gdb_history
|
||||
Test
|
||||
config.cache
|
||||
configarg.cache
|
||||
config.status
|
||||
system.list
|
||||
linux.system.cache
|
||||
wx-config
|
||||
config.log
|
||||
linux-gnu.system.cache
|
||||
*.dsp
|
||||
*.dsw
|
||||
*.plg
|
||||
*.opt
|
||||
*.aps
|
||||
*.ncb
|
||||
*.pro
|
||||
*.opt
|
||||
*.d
|
||||
*.swp
|
||||
*.swo
|
||||
Release
|
||||
Debug
|
||||
ReleaseDLL
|
||||
DebugDLL
|
||||
robert
|
||||
stamp-h.in
|
||||
Makefile
|
||||
configure
|
||||
setup.h
|
||||
stamp-h
|
||||
libtool
|
||||
aclocal.m4
|
||||
base
|
||||
gtk
|
||||
motif
|
||||
win32
|
||||
base-debug
|
||||
gtk-debug
|
||||
motif-debug
|
||||
win32-debug
|
||||
base-release
|
||||
gtk-release
|
||||
motif-release
|
||||
win32-release
|
||||
*tags
|
257
BuildCVS.txt
@@ -1,257 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
How to build the sources from CVS
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Please use the install.txt files in docs/gtk, docs/msw, docs/motif, docs/mac
|
||||
etc. alongside these instructions.
|
||||
|
||||
I) Windows using plain makefiles
|
||||
----------------------------------------
|
||||
|
||||
a) If using Microsoft Visual C++ 5.0 or 6.0
|
||||
|
||||
Ensure that the command-line compiler and tools (including
|
||||
nmake) are installed and ready to run. Depending on your
|
||||
installation there may be a batch file (named something like
|
||||
VCVARS32.BAT) that needs to be run to set correct environment
|
||||
varaibles and PATH entries.
|
||||
|
||||
Continue with item c) below.
|
||||
|
||||
|
||||
b) If using the GNU Mingw32 or GNU Cygwin32 compilers
|
||||
|
||||
You can get Mingw32 from http://www.mingw.org
|
||||
|
||||
Cygwin32 is available at http://www.cygwin.com
|
||||
|
||||
The makefile might have small problems with Cygwin's tools
|
||||
so it is recommended to use Mingw32 and its toolchain instead
|
||||
if possible.
|
||||
|
||||
-> Set your path so that it includes the directory
|
||||
where your compiler and tools reside
|
||||
|
||||
-> If your are using an old Mingw32 version (gcc-2.95 or older),
|
||||
you might need to fix some headers with the patches contained
|
||||
in the wxWin\Mingw32-gcc295.patches file. PLEASE APPLY THESE
|
||||
PATCHES BY HAND! There are apparently a few different versions
|
||||
of the headers floating around. Note that these patches are
|
||||
not needed if you are using Mingw32 gcc-2.95.2 or newer.
|
||||
|
||||
-> Edit wx/src/makeg95.env and set the MINGW32 variable at the top of
|
||||
the file to either 1 (you have Mingw32) or 0 (you have Cygwin32).
|
||||
If using MINGW32, also set the MINGW32VERSION variable
|
||||
appropiately.
|
||||
|
||||
|
||||
c) Build instructions
|
||||
|
||||
-> Assumming that you installed the wxWindows sources
|
||||
into c:\wxWin
|
||||
-> Copy c:\wxWin\include\wx\msw\setup0.h
|
||||
to c:\wxWin\include\wx\msw\setup.h
|
||||
-> Edit c:\wxWin\include\wx\msw\setup.h so that
|
||||
most features are enabled (i.e. defined to 1), for example:
|
||||
#define wxUSE_ODBC 0
|
||||
#define wxUSE_SOCKETS 1
|
||||
#define wxUSE_HTML 1
|
||||
#define wxUSE_THREADS 1
|
||||
#define wxUSE_FS_INET 0
|
||||
#define wxUSE_FS_ZIP 1
|
||||
#define wxUSE_BUSYINFO 1
|
||||
#define wxUSE_DYNLIB_CLASS 1
|
||||
#define wxUSE_ZIPSTREAM 1
|
||||
#define wxUSE_LIBJPEG 1
|
||||
#define wxUSE_LIBPNG 1
|
||||
|
||||
and std iostreams are disabled with
|
||||
#define wxUSE_STD_IOSTREAM 0
|
||||
|
||||
-> type: cd c:\wxWin\src\msw
|
||||
-> type: make -f makefile.g95 (if using GNU tools)
|
||||
or type: nmake -f makefile.vc (if using MS VC++)
|
||||
|
||||
|
||||
II) Unix ports
|
||||
--------------
|
||||
|
||||
Building wxGTK or wxMotif completely without configure
|
||||
won't ever work, but there is now a new makefile system
|
||||
that works without libtool and automake, using only
|
||||
configure to create what is needed.
|
||||
|
||||
In order to create configure, you need to have the
|
||||
GNU autoconf package (version 2.13 or 2.14) installed
|
||||
on your system and type run "autoconf" in the base
|
||||
directory (or run the autogen.sh script in the same
|
||||
directory, which just calls autoconf).
|
||||
|
||||
Set WXWIN environment variable to the base directory such
|
||||
as ~/wxWindows (this is actually not really needed).
|
||||
|
||||
-> type: export WXWIN=~/wxWindows
|
||||
-> type: md mybuild
|
||||
-> type: cd mybuild
|
||||
-> type: ../configure --with-motif
|
||||
or type: ../configure --with-gtk
|
||||
-> type: make
|
||||
-> type: su <type root password>
|
||||
-> type: make install
|
||||
-> type: ldconfig
|
||||
-> type: exit
|
||||
|
||||
Call configure with --disable-shared to create a static
|
||||
library. Calling "make uninstall" will remove the installed
|
||||
library and "make dist" will create a distribution (not
|
||||
yet complete).
|
||||
|
||||
III) Windows using configure
|
||||
----------------------------------------
|
||||
|
||||
Take a look at Unix->Windows cross compiling. With minor
|
||||
modifications, this should work in Windows if you've got the cygnus
|
||||
utilities (bash, GNU make, etc) and either mingw32 or cygwin32 installed.
|
||||
See http://www.cygnus.com for these programs, or go straight to their
|
||||
ftp server at ftp://sourceware.cygnus.com/pub/cygwin/.
|
||||
|
||||
Of course, you can also build the library using plain makefiles (see
|
||||
section I).
|
||||
|
||||
IV) Classic MacOS using CodeWarrior (eg MacOS 8.x/9.x)
|
||||
----------------------------------------
|
||||
|
||||
Refer to the readme.txt and install.txt files in docs/mac to build
|
||||
wxWindows under Classic Mac OS using CodeWarrior.
|
||||
|
||||
If you are checking out the CVS sources using cvs under Mac OS X and
|
||||
compiling under Classic Mac OS, make sure that all text files have a
|
||||
Mac OS type of 'TEXT' otherwise CodeWarrior may ignore them. Checking
|
||||
out the CVS sources using cvs under Mac OS X creates untyped files
|
||||
which can lead to compialtion errors under CodeWarrior which are hard
|
||||
to track down.
|
||||
|
||||
V) MacOS X using configure and the Developer Tools
|
||||
----------------------------------------
|
||||
|
||||
You need to have the Developer Tools installed. If this is not the case,
|
||||
you will need to register at the Apple Developer web site (this is a free
|
||||
registration) in order to download the Developer Tools installer.
|
||||
|
||||
In order to create configure, you need to have the
|
||||
GNU autoconf package (version 2.13 or 2.14) installed
|
||||
on your system and type run "autoconf" in the base
|
||||
directory (or run the autogen.sh script in the same
|
||||
directory, which just calls autoconf).
|
||||
|
||||
-> type: mkdir macbuild
|
||||
-> type: cd macbuild
|
||||
-> type: ../configure --with-mac
|
||||
or type: ../configure
|
||||
-> type: make
|
||||
|
||||
VI) OS/2
|
||||
----------------------------------------
|
||||
|
||||
VII) Unix->Windows cross-compiling using configure
|
||||
--------------------------------------------------
|
||||
|
||||
First you'll need a cross-compiler; linux glibc binaries of mingw32 and
|
||||
cygwin32 (both based on egcs) can be found at
|
||||
ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Otherwise you can
|
||||
compile one yourself. Check the relevant FAQs.
|
||||
|
||||
[ A Note about cygwin32 and mingw32: the main difference is that cygwin32
|
||||
binaries are always linked against cygwin.dll. This dll encapsulates most
|
||||
standard Unix C extensions, which is very handy if you're porting unix
|
||||
software to windows. However, wxMSW doesn't need this, so mingw32 is
|
||||
preferable if you write portable C(++). ]
|
||||
|
||||
You might want to build both Unix and Windows binaries in the same source
|
||||
tree; to do this make subdirs for each e.g. unix and win32. If you've
|
||||
already build wxWindows in the main dir, do a 'make distclean' there,
|
||||
otherwise configure will get confused. (In any case, read the section 'Unix
|
||||
using configure' and make sure you're able to build a native wxWindows
|
||||
library; cross-compiling errors can be pretty obscure and you'll want to be
|
||||
sure that your configure setup is basically sound.)
|
||||
|
||||
To cross compile the windows library, do
|
||||
-> cd win32
|
||||
(or whatever you called it)
|
||||
Now run configure. There are two ways to do this
|
||||
-> ../configure --host=i586-mingw32 --build=i586-linux --with-mingw \
|
||||
--enable-dnd=no --without-odbc
|
||||
where --build= should read whatever platform you're building on. Configure
|
||||
will notice that build and host platforms differ, and automatically prepend
|
||||
i586-mingw32- to gcc, ar, ld, etc (make sure they're in the PATH!).
|
||||
The other way to run configure is by specifying the names of the binaries
|
||||
yourself:
|
||||
-> CC=i586-mingw32-gcc CXX=i586-mingw32-g++ RANLIB=i586-mingw32-ranlib \
|
||||
DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \
|
||||
../configure --host=i586-mingw32 --with-mingw --enable-dnd=no
|
||||
|
||||
(all assuming you're using mingw32)
|
||||
Drag'n'drop is disabled because mingw32 lacks (AFAIK) OLE headers.
|
||||
|
||||
[ Update: some new mingw32 versions now have a new set of windows header
|
||||
files, which apparently can handle ole. Untested at the moment ]
|
||||
|
||||
ODBC files don't compile as of 13.10.99 - may be this will be fixed by the
|
||||
moment you're reading these lines.
|
||||
|
||||
Configure will conclude that shared libraries are out of the question and
|
||||
opt for a static one. I haven't looked into DLL creation yet.
|
||||
|
||||
Type
|
||||
-> make
|
||||
and wait, wait, wait. Don't leave the room, because the minute you do there
|
||||
will be a compile error :-)
|
||||
|
||||
NB: you risk to get quite a few warnings about "ANSI C++ forbids implicit
|
||||
conversion from 'void *'" in all places where va_arg macro is used. This
|
||||
is due to a bug in (some versions of) mingw32 headers which may be
|
||||
corrected by editing the file
|
||||
|
||||
${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h
|
||||
|
||||
(instead of egcs-2.91.57 you may have something different), searching for
|
||||
the lines
|
||||
|
||||
/* Define __gnuc_va_list. */
|
||||
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST
|
||||
#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)
|
||||
typedef char *__gnuc_va_list;
|
||||
#else
|
||||
typedef void *__gnuc_va_list;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
and adding "|| defined(_WIN32)" to the list of platforms on which
|
||||
__gnuc_va_list is char *.
|
||||
|
||||
If this is successful, you end up with a libwx_msw.a in win32/lib. Now try
|
||||
building the minimal sample:
|
||||
|
||||
-> cd samples/minimal
|
||||
-> make
|
||||
|
||||
and run it with wine, for example (or copy to a Windows box)
|
||||
-> wine minimal.exe
|
||||
|
||||
If all is well, do an install; from win32
|
||||
-> make install
|
||||
|
||||
Native and cross-compiled installations can co-exist peacefully
|
||||
(as long as their widget sets differ), except for wx-config. You might
|
||||
want to rename the cross-compiled one to i586-mingw32-wx-config, or something.
|
||||
|
||||
Cross-compiling TODO:
|
||||
---------------------
|
||||
- resource compiling must be done manually for now (should/can we link the
|
||||
default wx resources into libwx_msw.a?) [ No we can't; the linker won't
|
||||
link it in... you have to supply an object file ]
|
||||
- dynamic libraries
|
||||
- static executables are HUGE -- there must be room for improvement.
|
||||
|
1348
Makefile.in
@@ -1,169 +0,0 @@
|
||||
*** \gcc-inc\basetyps.h Sat Jul 31 16:48:36 1999
|
||||
--- basetyps.h Fri Aug 06 11:14:36 1999
|
||||
***************
|
||||
*** 74,91 ****
|
||||
--- 74,97 ----
|
||||
STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
|
||||
}
|
||||
#define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
|
||||
|
||||
+ #ifndef GUID_DEFINED
|
||||
+ #define GUID_DEFINED
|
||||
typedef struct _GUID
|
||||
{
|
||||
unsigned long Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8];
|
||||
} GUID;
|
||||
+ #endif /* GUID_DEFINED */
|
||||
typedef GUID *REFGUID;
|
||||
typedef GUID *LPGUID;
|
||||
+ #ifndef UUID_DEFINED
|
||||
+ #define UUID_DEFINED
|
||||
typedef GUID UUID;
|
||||
+ #endif /* UUID_DEFINED */
|
||||
typedef GUID IID;
|
||||
typedef GUID CLSID;
|
||||
typedef CLSID *LPCLSID;
|
||||
typedef IID *LPIID;
|
||||
|
||||
|
||||
*** \gcc-inc\oaidl.h Sat Jul 31 16:48:42 1999
|
||||
--- oaidl.h Fri Aug 06 13:18:48 1999
|
||||
***************
|
||||
*** 39,44 ****
|
||||
--- 39,53 ----
|
||||
#define IMPLTYPEFLAG_FRESTRICTED 4
|
||||
#define IMPLTYPEFLAG_FDEFAULTVTABLE 8
|
||||
|
||||
+ #define DISPID_UNKNOWN ( -1 )
|
||||
+ #define DISPID_VALUE ( 0 )
|
||||
+ #define DISPID_PROPERTYPUT ( -3 )
|
||||
+ #define DISPID_NEWENUM ( -4 )
|
||||
+ #define DISPID_EVALUATE ( -5 )
|
||||
+ #define DISPID_CONSTRUCTOR ( -6 )
|
||||
+ #define DISPID_DESTRUCTOR ( -7 )
|
||||
+ #define DISPID_COLLECT ( -8 )
|
||||
+
|
||||
typedef interface ITypeLib *LPTYPELIB;
|
||||
typedef interface ICreateTypeInfo *LPCREATETYPEINFO;
|
||||
typedef interface ICreateTypeInfo2 *LPCREATETYPEINFO2;
|
||||
***************
|
||||
*** 49,54 ****
|
||||
--- 58,73 ----
|
||||
typedef interface IDispatch *LPDISPATCH;
|
||||
typedef interface ICreateErrorInfo *LPCREATEERRORINFO;
|
||||
|
||||
+ extern "C" const IID IID_ITypeLib;
|
||||
+ extern "C" const IID IID_ICreateTypeInfo;
|
||||
+ extern "C" const IID IID_ICreateTypeInfo2;
|
||||
+ extern "C" const IID IID_ICreateTypeLib;
|
||||
+ extern "C" const IID IID_ICreateTypeLib2;
|
||||
+ extern "C" const IID IID_ITypeInfo;
|
||||
+ extern "C" const IID IID_IErrorInfo;
|
||||
+ extern "C" const IID IID_IDispatch;
|
||||
+ extern "C" const IID IID_ICreateErrorInfo;
|
||||
+
|
||||
typedef enum tagSYSKIND {
|
||||
SYS_WIN16,SYS_WIN32,SYS_MAC
|
||||
} SYSKIND;
|
||||
***************
|
||||
*** 375,382 ****
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
|
||||
STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
|
||||
! STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID)
|
||||
PURE;
|
||||
! STDMETHOD(Invoked)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
--- 394,401 ----
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
|
||||
STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
|
||||
! STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*)
|
||||
PURE;
|
||||
! STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
|
||||
*** \gcc-inc\objidl.h Sat Jul 31 16:48:42 1999
|
||||
--- objidl.h Fri Aug 06 11:00:19 1999
|
||||
***************
|
||||
*** 627,633 ****
|
||||
STDMETHOD(QueryGetData)(THIS_ FORMATETC*) PURE;
|
||||
STDMETHOD(GetCanonicalFormatEtc)(THIS_ FORMATETC*,FORMATETC*) PURE;
|
||||
STDMETHOD(SetData)(THIS_ FORMATETC*,STGMEDIUM*,BOOL) PURE;
|
||||
! STDMETHOD(EnumFormatEtc)(THIS_ DWORD,IEnumFORMATETC*) PURE;
|
||||
STDMETHOD(DAdvise)(THIS_ FORMATETC*,DWORD,IAdviseSink*,PDWORD) PURE;
|
||||
STDMETHOD(DUnadvise)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**);
|
||||
--- 627,633 ----
|
||||
STDMETHOD(QueryGetData)(THIS_ FORMATETC*) PURE;
|
||||
STDMETHOD(GetCanonicalFormatEtc)(THIS_ FORMATETC*,FORMATETC*) PURE;
|
||||
STDMETHOD(SetData)(THIS_ FORMATETC*,STGMEDIUM*,BOOL) PURE;
|
||||
! STDMETHOD(EnumFormatEtc)(THIS_ DWORD,IEnumFORMATETC**) PURE;
|
||||
STDMETHOD(DAdvise)(THIS_ FORMATETC*,DWORD,IAdviseSink*,PDWORD) PURE;
|
||||
STDMETHOD(DUnadvise)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**);
|
||||
|
||||
|
||||
--- i386-mingw32\include\stdio.h Sun Aug 1 06:18:20 1999
|
||||
+++ stdio.h Sun Nov 7 03:41:40 1999
|
||||
@@ -203,9 +203,12 @@
|
||||
int fprintf (FILE* filePrintTo, const char* szFormat, ...);
|
||||
int printf (const char* szFormat, ...);
|
||||
int sprintf (char* caBuffer, const char* szFormat, ...);
|
||||
+int _snprintf (char* caBuffer, size_t n, const char* szFormat, ...);
|
||||
int vfprintf (FILE* filePrintTo, const char* szFormat, va_list varg);
|
||||
int vprintf (const char* szFormat, va_list varg);
|
||||
int vsprintf (char* caBuffer, const char* szFormat, va_list varg);
|
||||
+int _vsnprintf (char* caBuffer, size_t n, const char* szFormat,
|
||||
+ va_list varg);
|
||||
|
||||
/* Wide character versions */
|
||||
int fwprintf (FILE* filePrintTo, const wchar_t* wsFormat, ...);
|
||||
|
||||
|
||||
|
||||
--- i386-mingw32\include\winbase.h Sat Jul 31 17:48:48 1999
|
||||
+++ winbase.h Fri Feb 25 01:49:08 2000
|
||||
@@ -989,7 +989,7 @@
|
||||
BOOL WINAPI CopyFileExW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD);
|
||||
#define RtlMoveMemory memmove
|
||||
#define RtlCopyMemory memcpy
|
||||
-#define RtlFillMemory memset
|
||||
+#define RtlFillMemory(d,l,f) memset ((d),(f),(l))
|
||||
#define RtlZeroMemory(d,l) memset((d),0,(l))
|
||||
#define MoveMemory RtlMoveMemory
|
||||
#define CopyMemory RtlCopyMemory
|
||||
|
||||
--- i386-mingw32\include\winsock.h Sat Jul 31 17:48:50 1999
|
||||
+++ winsock.h Mon Mar 20 13:47:12 2000
|
||||
@@ -13,6 +13,10 @@
|
||||
#define _GNU_H_WINDOWS32_SOCKETS
|
||||
#include <windows.h>
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
#ifndef _SYS_TYPES_H
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
@@ -495,4 +499,9 @@
|
||||
typedef struct timeval TIMEVAL;
|
||||
typedef struct timeval *PTIMEVAL;
|
||||
typedef struct timeval *LPTIMEVAL;
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
#endif
|
||||
+#endif
|
||||
+
|
||||
|
||||
|
194
aclocal.m4
vendored
@@ -1,194 +0,0 @@
|
||||
# Configure paths for GTK+
|
||||
# Owen Taylor 97-11-3
|
||||
|
||||
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GTK_2_0,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the gtk-config-2.0 script
|
||||
dnl
|
||||
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||
, enable_gtktest=yes)
|
||||
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gthread)
|
||||
gtk_config_args="$gtk_config_args gthread"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test x$gtk_config_exec_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||
if test x${GTK_CONFIG_2_0+set} != xset ; then
|
||||
GTK_CONFIG_2_0=$gtk_config_exec_prefix/bin/gtk-config-2.0
|
||||
fi
|
||||
fi
|
||||
if test x$gtk_config_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||
if test x${GTK_CONFIG_2_0+set} != xset ; then
|
||||
GTK_CONFIG_2_0=$gtk_config_prefix/bin/gtk-config-2.0
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(GTK_CONFIG_2_0, gtk-config-2.0, no)
|
||||
min_gtk_version=ifelse([$1], ,1.3.1,$1)
|
||||
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||
no_gtk=""
|
||||
if test "$GTK_CONFIG_2_0" = "no" ; then
|
||||
no_gtk=yes
|
||||
else
|
||||
GTK_CFLAGS=`$GTK_CONFIG_2_0 $gtk_config_args --cflags`
|
||||
GTK_LIBS=`$GTK_CONFIG_2_0 $gtk_config_args --libs`
|
||||
gtk_config_major_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
gtk_config_minor_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
gtk_config_micro_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_gtktest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$GTK_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||
dnl checks the results of gtk-config-2.0 to some extent
|
||||
dnl
|
||||
rm -f conf.gtktest
|
||||
AC_TRY_RUN([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||
(gtk_micro_version != $gtk_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'gtk-config-2.0 --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf ("*** was found! If gtk-config-2.0 was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If gtk-config-2.0 was wrong, set the environment variable GTK_CONFIG_2_0\n");
|
||||
printf("*** to point to the correct copy of gtk-config-2.0, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
}
|
||||
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||
else
|
||||
{
|
||||
if ((gtk_major_version > major) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the gtk-config-2.0 shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GTK+, but you can also set the GTK_CONFIG_2_0 environment to point to the\n");
|
||||
printf("*** correct copy of gtk-config-2.0. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_gtk" = x ; then
|
||||
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$GTK_CONFIG_2_0" = "no" ; then
|
||||
echo "*** The gtk-config-2.0 script installed by GTK could not be found"
|
||||
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the GTK_CONFIG_2_0 environment variable to the"
|
||||
echo "*** full path to gtk-config-2.0."
|
||||
else
|
||||
if test -f conf.gtktest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GTK test program, checking why..."
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||
echo "***"
|
||||
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||
echo "*** came with the system with the command"
|
||||
echo "***"
|
||||
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
||||
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the gtk-config-2.0 script: $GTK_CONFIG_2_0" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GTK_CFLAGS=""
|
||||
GTK_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
rm -f conf.gtktest
|
||||
])
|
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
autoconf
|
1305
config.guess
vendored
1332
config.sub
vendored
4260
configure.in
@@ -1,15 +0,0 @@
|
||||
#
|
||||
# Makefile : Builds wxWindows utils for Unix.
|
||||
#
|
||||
|
||||
all:
|
||||
cd src; make
|
||||
|
||||
clean:
|
||||
cd src; make clean
|
||||
cd samples; make clean
|
||||
cd utils; make clean
|
||||
|
||||
|
||||
samples:
|
||||
cd samples; make
|
1016
contrib/configure
vendored
@@ -1,69 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_REVISION($Id$)dnl
|
||||
|
||||
AC_INIT(Makefile.in)
|
||||
|
||||
dnl ---------------
|
||||
dnl MMedia specific
|
||||
dnl ---------------
|
||||
|
||||
dnl Check for ESD
|
||||
|
||||
ESD_LINK=
|
||||
AC_CHECK_HEADER(esd.h, [
|
||||
AC_CHECK_LIB(esd, esd_close, [
|
||||
ESD_LINK="-lesd"
|
||||
])
|
||||
])
|
||||
|
||||
if test "$ESD_LINK" != "" ; then
|
||||
echo "ESound detected"
|
||||
fi
|
||||
|
||||
dnl -----------
|
||||
dnl Final subst
|
||||
|
||||
PATH_IFS=$wx_cv_path_ifs
|
||||
WX_TARGET_LIBRARY=$wx_cv_target_library
|
||||
WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype
|
||||
|
||||
AC_SUBST(PATH_IFS)
|
||||
AC_SUBST(ESD_LINK)
|
||||
AC_SUBST(WX_TARGET_LIBRARY)
|
||||
AC_SUBST(WX_TARGET_LIBRARY_TYPE)
|
||||
|
||||
dnl -----------
|
||||
dnl File output
|
||||
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/ogl/Makefile
|
||||
src/mmedia/Makefile
|
||||
src/stc/Makefile
|
||||
src/xml/Makefile
|
||||
src/canvas/Makefile
|
||||
src/gizmos/Makefile
|
||||
src/plot/Makefile
|
||||
src/applet/Makefile
|
||||
samples/Makefile
|
||||
samples/mmedia/Makefile
|
||||
samples/ogl/Makefile
|
||||
samples/ogl/ogledit/Makefile
|
||||
samples/ogl/studio/Makefile
|
||||
samples/stc/Makefile
|
||||
samples/canvas/Makefile
|
||||
samples/canvas/test/Makefile
|
||||
samples/canvas/simple/Makefile
|
||||
samples/gizmos/Makefile
|
||||
samples/gizmos/multicell/Makefile
|
||||
samples/gizmos/splittree/Makefile
|
||||
samples/xml/Makefile
|
||||
samples/plot/Makefile
|
||||
samples/applet/Makefile
|
||||
utils/Makefile
|
||||
utils/wxrc/Makefile
|
||||
utils/wxrcedit/Makefile
|
||||
utils/convertrc/Makefile
|
||||
])
|
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 440 B |
@@ -1,9 +0,0 @@
|
||||
\chapter{Bugs}\label{bugs}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
These are the known bugs.
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item No bugs
|
||||
\end{itemize}
|
Before Width: | Height: | Size: 138 B |
@@ -1,24 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdbase.h at 26/Feb/00 14:52:12
|
||||
%
|
||||
|
||||
\section{\class{wxCDAudio}}\label{wxcdaudio}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxObject
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
typedef struct wxCDtime {
|
||||
wxUint8 track
|
||||
};
|
||||
\end{verbatim}
|
||||
}
|
||||
{\small \begin{verbatim}
|
||||
typedef enum { PLAYING, PAUSED, STOPPED } CDstatus
|
||||
\end{verbatim}}
|
||||
|
@@ -1,66 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdunix.h at 26/Feb/00 14:52:10
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxCDAudioLinux}}\label{wxcdaudiolinux}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxCDAudio}{wxcdaudio}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCDAudioLinux::wxCDAudioLinux}\label{wxcdaudiolinuxwxcdaudiolinux}
|
||||
|
||||
\func{}{wxCDAudioLinux}{\void}
|
||||
|
||||
\func{}{wxCDAudioLinux}{\param{const char* }{dev\_name}}
|
||||
|
||||
\membersection{wxCDAudioLinux::\destruct{wxCDAudioLinux}}\label{wxcdaudiolinuxdtor}
|
||||
|
||||
\func{}{\destruct{wxCDAudioLinux}}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Play}\label{wxcdaudiolinuxplay}
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_time}, \param{const wxCDtime\& }{end\_time}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Pause}\label{wxcdaudiolinuxpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Resume}\label{wxcdaudiolinuxresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::GetStatus}\label{wxcdaudiolinuxgetstatus}
|
||||
|
||||
\func{CDstatus}{GetStatus}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::GetTime}\label{wxcdaudiolinuxgettime}
|
||||
|
||||
\func{wxCDtime}{GetTime}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::GetToc}\label{wxcdaudiolinuxgettoc}
|
||||
|
||||
\func{CDtoc\&}{GetToc}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::Ok}\label{wxcdaudiolinuxok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioLinux::OpenDevice}\label{wxcdaudiolinuxopendevice}
|
||||
|
||||
\func{void}{OpenDevice}{\param{const char* }{dev\_name}}
|
||||
|
@@ -1,78 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdwin.h at 26/Feb/00 14:52:15
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxCDAudioWin}}\label{wxcdaudiowin}
|
||||
|
||||
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxCDAudio}{wxcdaudio}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
typedef struct CDAW\_Internal {
|
||||
MCIDEVICEID dev\_id
|
||||
};
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::wxCDAudioWin}\label{wxcdaudiowinwxcdaudiowin}
|
||||
|
||||
\func{}{wxCDAudioWin}{\void}
|
||||
|
||||
\func{}{wxCDAudioWin}{\param{const char* }{dev\_name}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::\destruct{wxCDAudioWin}}\label{wxcdaudiowindtor}
|
||||
|
||||
\func{}{\destruct{wxCDAudioWin}}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Play}\label{wxcdaudiowinplay}
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_time}, \param{const wxCDtime\& }{end\_time}}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Pause}\label{wxcdaudiowinpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Resume}\label{wxcdaudiowinresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::GetStatus}\label{wxcdaudiowingetstatus}
|
||||
|
||||
\func{CDstatus}{GetStatus}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::GetTime}\label{wxcdaudiowingettime}
|
||||
|
||||
\func{wxCDtime}{GetTime}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::GetToc}\label{wxcdaudiowingettoc}
|
||||
|
||||
\func{const CDtoc\&}{GetToc}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::Ok}\label{wxcdaudiowinok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudioWin::PrepareToc}\label{wxcdaudiowinpreparetoc}
|
||||
|
||||
\func{void}{PrepareToc}{\void}
|
||||
|
@@ -1,111 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/cdbase.h at 26/Feb/00 14:52:12
|
||||
%
|
||||
|
||||
|
||||
\section{\class{CDtoc}}\label{cdtoc}
|
||||
|
||||
|
||||
Table of contents manager
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No base class
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{CDtoc::CDtoc}\label{cdtoccdtoc}
|
||||
|
||||
\func{}{CDtoc}{\param{wxCDtime\& }{tot\_tm}, \param{wxCDtime* }{trks\_tm}, \param{wxCDtime* }{trks\_pos}}
|
||||
|
||||
|
||||
\membersection{CDtoc::GetTrackTime}\label{cdtocgettracktime}
|
||||
|
||||
\constfunc{wxCDtime}{GetTrackTime}{\param{wxUint8 }{track}}
|
||||
|
||||
Returns the length of the specified track
|
||||
track: track to get length
|
||||
|
||||
|
||||
\membersection{CDtoc::GetTrackPos}\label{cdtocgettrackpos}
|
||||
|
||||
\constfunc{wxCDtime}{GetTrackPos}{\param{wxUint8 }{track}}
|
||||
|
||||
Returns the position of the specified track
|
||||
track: track to get position
|
||||
|
||||
|
||||
\membersection{CDtoc::GetTotalTime}\label{cdtocgettotaltime}
|
||||
|
||||
\constfunc{wxCDtime}{GetTotalTime}{\void}
|
||||
|
||||
Returns the total time
|
||||
|
||||
|
||||
\membersection{wxCDAudio::wxCDAudio}\label{wxcdaudiowxcdaudio}
|
||||
|
||||
\func{}{wxCDAudio}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudio::\destruct{wxCDAudio}}\label{wxcdaudiodtor}
|
||||
|
||||
\func{}{\destruct{wxCDAudio}}{\void}
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Play}\label{wxcdaudioplay}
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_play}, \param{const wxCDtime\& }{end\_play}}
|
||||
|
||||
Play audio at the specified position
|
||||
|
||||
\func{bool}{Play}{\param{const wxCDtime\& }{beg\_play}}
|
||||
|
||||
Play audio from the specified to the end of the CD audio
|
||||
|
||||
\func{bool}{Play}{\param{wxUint8 }{beg\_track}, \param{wxUint8 }{end\_track = 0}}
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Pause}\label{wxcdaudiopause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
Pause the audio playing
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Resume}\label{wxcdaudioresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
Resume a paused audio playing
|
||||
|
||||
|
||||
\membersection{wxCDAudio::GetStatus}\label{wxcdaudiogetstatus}
|
||||
|
||||
\func{CDstatus}{GetStatus}{\void}
|
||||
|
||||
Get the current CD status
|
||||
|
||||
|
||||
\membersection{wxCDAudio::GetTime}\label{wxcdaudiogettime}
|
||||
|
||||
\func{wxCDtime}{GetTime}{\void}
|
||||
|
||||
Get the current playing time
|
||||
|
||||
|
||||
\membersection{wxCDAudio::GetToc}\label{wxcdaudiogettoc}
|
||||
|
||||
\func{const CDtoc\&}{GetToc}{\void}
|
||||
|
||||
Returns the table of contents
|
||||
|
||||
|
||||
\membersection{wxCDAudio::Ok}\label{wxcdaudiook}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
CD ok
|
||||
|
@@ -1,3 +0,0 @@
|
||||
\chapter{Change log}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
@@ -1,13 +0,0 @@
|
||||
\chapter{Class reference}\label{classref}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
These are the main Mmedia classes.
|
||||
|
||||
\input cdaudio.tex
|
||||
\input cdaudlnx.tex
|
||||
\input cdaudwin.tex
|
||||
\input cdtoc.tex
|
||||
\input sndbase.tex
|
||||
\input sndfile.tex
|
||||
\input sndfrmt.tex
|
Before Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 164 B |
@@ -1,47 +0,0 @@
|
||||
\chapter{Introduction}
|
||||
\pagenumbering{arabic}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
The MMedia wxWindows extension is a wxWindows library which provides you
|
||||
a full set of multimedia classes including sound recording/playing,
|
||||
cd audio playing and video playing. The API is portable and can be used
|
||||
on any supported systems with the insurance the behaviour will be the
|
||||
same.
|
||||
|
||||
\section{File structure}
|
||||
|
||||
These are the files that comprise the mmedia library.
|
||||
|
||||
\begin{description}\itemsep=0pt
|
||||
\item[sndbase.h] Header for wxSoundStream base class and wxSoundFormat base class.
|
||||
\item[sndbase.cpp] Basic objects implementation.
|
||||
\item[sndfile.h] wxSoundFileStream base class header.
|
||||
\item[sndfile.cpp] wxSoundFileStream base class implementation.
|
||||
\item[sndpcm.h] wxSoundFormatPcm class header.
|
||||
\item[sndpcm.cpp] wxSoundFormatPcm class implementation.
|
||||
\item[sndcpcm.h] wxSoundCodecPcm class header (PCM converter).
|
||||
\item[sndcpcm.cpp] wxSoundCodecPcm class implementation (PCM converter).
|
||||
\item[sndulaw.h]
|
||||
\item[sndulaw.cpp]
|
||||
\item[sndg72x.h]
|
||||
\item[sndg72x.cpp]
|
||||
\item[sndoss.h]
|
||||
\item[sndoss.cpp]
|
||||
\item[sndesd.h]
|
||||
\item[sndesd.cpp]
|
||||
\item[sndwin.h]
|
||||
\item[sndwin.cpp]
|
||||
\item[cdbase.h]
|
||||
\item[cdbase.cpp]
|
||||
\item[cdunix.h]
|
||||
\item[cdunix.cpp]
|
||||
\item[cdwin.h]
|
||||
\item[cdwin.cpp]
|
||||
\item[vidbase.h]
|
||||
\item[vidbase.cpp]
|
||||
\item[vidxanm.h]
|
||||
\item[vidxanm.cpp]
|
||||
\item[vidwin.h]
|
||||
\item[vidwin.cpp]
|
||||
\end{description}
|
@@ -1,45 +0,0 @@
|
||||
\documentstyle[a4,makeidx,verbatim,texhelp,fancyheadings]{report}
|
||||
\definecolour{black}{0}{0}{0}%
|
||||
\definecolour{cyan}{0}{255}{255}%
|
||||
\definecolour{green}{0}{255}{0}%
|
||||
\definecolour{magenta}{255}{0}{255}%
|
||||
\definecolour{red}{255}{0}{0}%
|
||||
\definecolour{blue}{0}{0}{200}%
|
||||
\definecolour{yellow}{255}{255}{0}%
|
||||
\definecolour{white}{255}{255}{255}%
|
||||
\input psbox.tex
|
||||
\parindent 0pt
|
||||
\parskip 11pt
|
||||
\title{MMedia for wxWindows}
|
||||
\author{Guilhem Lavaux}
|
||||
\date{March 2000}
|
||||
|
||||
\makeindex
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\pagestyle{fancyplain}
|
||||
\bibliographystyle{plain}
|
||||
\pagenumbering{roman}
|
||||
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
\tableofcontents%
|
||||
|
||||
\input{intro.tex}
|
||||
%
|
||||
\input{sample.tex}
|
||||
%
|
||||
\input{classes.tex}
|
||||
%
|
||||
\input{topics.tex}
|
||||
%
|
||||
\input{bugs.tex}
|
||||
%
|
||||
\input{changes.tex}
|
||||
|
||||
%
|
||||
\addcontentsline{toc}{chapter}{Index}
|
||||
\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
\printindex
|
||||
\end{document}
|
@@ -1,520 +0,0 @@
|
||||
%
|
||||
% %%%%%%% %%%%% %%%%%% %%%%% % %
|
||||
% % % % % % % % % %
|
||||
% % % % % % % % % %
|
||||
% %%%%%%% %%%%% %%%%%% % % %
|
||||
% % % % % % % % %
|
||||
% % % % % % % % %
|
||||
% % %%%%%% %%%%%% %%%%% % %
|
||||
%
|
||||
% By Jean Orloff
|
||||
% Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch
|
||||
% No modification of this file allowed if not e-sent to me.
|
||||
%
|
||||
% A simple way to measure the size of encapsulated postscript figures
|
||||
% from inside TeX, and to use it for automatically formatting texts
|
||||
% with inserted figures. Works both under Plain TeX-based macros
|
||||
% (Phyzzx, Harvmac, Psizzl, ...) and LaTeX environment.
|
||||
% Provides exactly the same result on any PostScript printer provided
|
||||
% the single instruction \psfor... is changed to fit the needs of the
|
||||
% particular dvi->ps translator used.
|
||||
% History:
|
||||
% 1.31: adds \psforDVIALW(?)
|
||||
% 1.30: adds \splitfile & \joinfiles for multi-file management
|
||||
% 1.24: fix error handling & add \psonlyboxes
|
||||
% 1.23: adds \putsp@ce for OzTeX fix
|
||||
% 1.22: makes \drawingBox \global for use in Phyzzx
|
||||
% 1.21: accepts %%BoundingBox: (atend)
|
||||
% 1.20: tries to add \psfordvitps for the TeXPS package.
|
||||
% 1.10: adds \psforoztex, error handling...
|
||||
%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789
|
||||
%
|
||||
\def\temp{1.31}
|
||||
\let\tempp=\relax
|
||||
\expandafter\ifx\csname psboxversion\endcsname\relax
|
||||
\message{version: \temp}
|
||||
\else
|
||||
\ifdim\temp cm>\psboxversion cm
|
||||
\message{version: \temp}
|
||||
\else
|
||||
\message{psbox(\psboxversion) is already loaded: I won't load
|
||||
psbox(\temp)!}
|
||||
\let\temp=\psboxversion
|
||||
\let\tempp=\endinput
|
||||
\fi
|
||||
\fi
|
||||
\tempp
|
||||
\let\psboxversion=\temp
|
||||
\catcode`\@=11
|
||||
% Every macro likes a little privacy...
|
||||
%
|
||||
% Some common defs
|
||||
%
|
||||
\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
|
||||
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
|
||||
\def\executeinspecs#1{%
|
||||
\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
|
||||
%
|
||||
%Trying to tame the variety of \special commands for Postscript: the
|
||||
% universal internal command \PSspeci@l##1##2 takes ##1 to be the
|
||||
% filename and ##2 to be the integer scale factor*1000 (as for usual
|
||||
% TeX \scale commands)
|
||||
%
|
||||
\def\psfortextures{% For TeXtures on the Macintosh
|
||||
%-----------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\special{illustration ##1\space scaled ##2}%
|
||||
}}
|
||||
%
|
||||
\def\psfordvitops{% For the DVItoPS converter on IBM mainframes
|
||||
%----------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}%
|
||||
}}
|
||||
%
|
||||
\def\psfordvips{% For DVIPS converter on VAX, UNIX and PC's
|
||||
%--------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
% \special{/@scaleunit 1000 def}% never read dox without trying!
|
||||
\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my%
|
||||
\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space%
|
||||
urx=\psurx\space ury=\psury\space rwi=\number\d@mx}%
|
||||
}}
|
||||
%
|
||||
\def\psforoztex{% For the OzTeX shareware on the Macintosh
|
||||
%--------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\special{##1 \space
|
||||
##2 1000 div dup scale
|
||||
\putsp@ce{\number-\psllx} \putsp@ce{\number-\pslly} translate
|
||||
}%
|
||||
}}
|
||||
\def\putsp@ce#1{#1 }
|
||||
%
|
||||
\def\psfordvitps{% From the UNIX TeXPS package, vers.>3.12
|
||||
%---------------
|
||||
% Convert a dimension into the number \psn@sp (in scaled points)
|
||||
\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}}
|
||||
\def\PSspeci@l##1##2{%
|
||||
% psfig.psr contains the def of "startTexFig": if you can locate it
|
||||
% and include the correct pathname, it should work
|
||||
\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig"
|
||||
\psdimt@n@sp{\drawingwd}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\drawinght}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\psllx bp}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\pslly bp}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\psurx bp}
|
||||
\special{dvitps: Literal "\psn@sp\space"}
|
||||
\psdimt@n@sp{\psury bp}
|
||||
\special{dvitps: Literal "\psn@sp\space startTexFig\space"}
|
||||
\special{dvitps: Include1 "##1"}
|
||||
\special{dvitps: Literal "endTexFig\space"}
|
||||
}}
|
||||
\def\psforDVIALW{% Try for dvialw, a UNIX public domain
|
||||
%---------------
|
||||
\def\PSspeci@l##1##2{
|
||||
\special{language "PS"
|
||||
literal "##2 1000 div dup scale"
|
||||
include "##1"}}}
|
||||
\def\psonlyboxes{% Draft-like behaviour if none of the others works
|
||||
%---------------
|
||||
\def\PSspeci@l##1##2{%
|
||||
\at(0cm;0cm){\boxit{\vbox to\drawinght
|
||||
{\vss
|
||||
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1)}}\hss}
|
||||
}}}
|
||||
}%
|
||||
}
|
||||
%
|
||||
\def\psloc@lerr#1{%
|
||||
\let\savedPSspeci@l=\PSspeci@l%
|
||||
\def\PSspeci@l##1##2{%
|
||||
\at(0cm;0cm){\boxit{\vbox to\drawinght
|
||||
{\vss
|
||||
\hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1) #1}}\hss}
|
||||
}}}
|
||||
\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs!
|
||||
}%
|
||||
}
|
||||
%
|
||||
%\def\psfor... add your own!
|
||||
%
|
||||
% \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing
|
||||
% and stores it in \drawinght(wd)
|
||||
\newread\pst@mpin
|
||||
\newdimen\drawinght\newdimen\drawingwd
|
||||
\newdimen\psxoffset\newdimen\psyoffset
|
||||
\newbox\drawingBox
|
||||
\newif\ifNotB@undingBox
|
||||
\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
|
||||
your graphics (Jean Orloff).}
|
||||
\def\@mpty{}
|
||||
\def\s@tsize#1 #2 #3 #4\@ndsize{
|
||||
\def\psllx{#1}\def\pslly{#2}%
|
||||
\def\psurx{#3}\def\psury{#4}% needed by a crazyness of dvips!
|
||||
\ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one!
|
||||
\else
|
||||
\drawinght=#4bp\advance\drawinght by-#2bp
|
||||
\drawingwd=#3bp\advance\drawingwd by-#1bp
|
||||
% !Units related by crazy factors as bp/pt=72.27/72 should be BANNED!
|
||||
\fi
|
||||
}
|
||||
\def\sc@nline#1:#2\@ndline{\edef\p@rameter{#1}\edef\v@lue{#2}}
|
||||
\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2}
|
||||
\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
|
||||
\def\execute#1{#1}% Seems stupid, but cs are identified BEFORE execution
|
||||
{\catcode`\%=12
|
||||
\xdef\B@undingBox{%%BoundingBox}
|
||||
} %% is not a true comment in PostScript, even if % is!
|
||||
\def\ReadPSize#1{
|
||||
\edef\PSfilename{#1}
|
||||
\openin\pst@mpin=#1\relax
|
||||
\ifeof\pst@mpin \errhelp=\PShelp
|
||||
\errmessage{I haven't found your postscript file (\PSfilename)}
|
||||
\psloc@lerr{was not found}
|
||||
\s@tsize 0 0 142 142\@ndsize
|
||||
\closein\pst@mpin
|
||||
\else
|
||||
\immediate\write\psbj@inaux{#1,}
|
||||
\loop
|
||||
\executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline}
|
||||
\ifeof\pst@mpin
|
||||
\errhelp=\PShelp
|
||||
\errmessage{(\PSfilename) is not an Encapsulated PostScript File:
|
||||
I could not find any \B@undingBox: line.}
|
||||
\edef\v@lue{0 0 142 142:}
|
||||
\psloc@lerr{is not an EPSFile}
|
||||
\NotB@undingBoxfalse
|
||||
\else
|
||||
\expandafter\sc@nline\n@xtline:\@ndline
|
||||
\ifx\p@rameter\B@undingBox\NotB@undingBoxfalse
|
||||
\edef\t@mp{%
|
||||
\expandafter\g@bblefirstblank\v@lue\space\space\space}
|
||||
\expandafter\s@tsize\t@mp\@ndsize
|
||||
\else\NotB@undingBoxtrue
|
||||
\fi
|
||||
\fi
|
||||
\ifNotB@undingBox\repeat
|
||||
\closein\pst@mpin
|
||||
\fi
|
||||
\message{#1}
|
||||
}
|
||||
%
|
||||
% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and
|
||||
% TeX uniformly scales to fit the largest one. If xdim=0pt, the
|
||||
% scale is fully determined by ydim and vice versa.
|
||||
% Notice: psboxes are a real vboxes; couldn't take hbox otherwise all
|
||||
% indentation and all cr's would be interpreted as spaces (hugh!).
|
||||
%
|
||||
\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm
|
||||
\newdimen\d@mx \newdimen\d@my
|
||||
\let\ps@nnotation=\relax
|
||||
\def\psboxto(#1;#2)#3{\vbox{
|
||||
\ReadPSize{#3}
|
||||
\divide\drawingwd by 1000
|
||||
\divide\drawinght by 1000
|
||||
\d@mx=#1
|
||||
\ifdim\d@mx=0pt\xscale=1000
|
||||
\else \xscale=\d@mx \divide \xscale by \drawingwd\fi
|
||||
\d@my=#2
|
||||
\ifdim\d@my=0pt\yscale=1000
|
||||
\else \yscale=\d@my \divide \yscale by \drawinght\fi
|
||||
\ifnum\yscale=1000
|
||||
\else\ifnum\xscale=1000\xscale=\yscale
|
||||
\else\ifnum\yscale<\xscale\xscale=\yscale\fi
|
||||
\fi
|
||||
\fi
|
||||
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
|
||||
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
|
||||
\global\divide\pscm by 1000
|
||||
\global\multiply\pscm by\xscale
|
||||
\multiply\drawingwd by\xscale \multiply\drawinght by\xscale
|
||||
\ifdim\d@mx=0pt\d@mx=\drawingwd\fi
|
||||
\ifdim\d@my=0pt\d@my=\drawinght\fi
|
||||
\message{scaled \the\xscale}
|
||||
\hbox to\d@mx{\hss\vbox to\d@my{\vss
|
||||
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
|
||||
\kern-\psyoffset
|
||||
\PSspeci@l{\PSfilename}{\the\xscale}
|
||||
\vss}\hss\ps@nnotation}
|
||||
\global\ht\drawingBox=\the\drawinght
|
||||
\global\wd\drawingBox=\the\drawingwd
|
||||
\baselineskip=0pt
|
||||
\copy\drawingBox
|
||||
\vss}\hss}
|
||||
\global\psxoffset=0pt
|
||||
\global\psyoffset=0pt% These are local to one figure
|
||||
\global\pscm=1cm
|
||||
\global\drawingwd=\drawingwd
|
||||
\global\drawinght=\drawinght
|
||||
}}
|
||||
%
|
||||
% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the
|
||||
% rounding errors of TeX integer divisions for situations where the
|
||||
% TeX box should fit the original BoundingBox with a precision better
|
||||
% than 1/1000.
|
||||
%
|
||||
\def\psboxscaled#1#2{\vbox{
|
||||
\ReadPSize{#2}
|
||||
\xscale=#1
|
||||
\message{scaled \the\xscale}
|
||||
\divide\drawingwd by 1000\multiply\drawingwd by\xscale
|
||||
\divide\drawinght by 1000\multiply\drawinght by\xscale
|
||||
\divide \psxoffset by 1000\multiply\psxoffset by \xscale
|
||||
\divide \psyoffset by 1000\multiply\psyoffset by \xscale
|
||||
\global\divide\pscm by 1000
|
||||
\global\multiply\pscm by\xscale
|
||||
\global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
|
||||
\kern-\psyoffset
|
||||
\PSspeci@l{\PSfilename}{\the\xscale}
|
||||
\vss}\hss\ps@nnotation}
|
||||
\global\ht\drawingBox=\the\drawinght
|
||||
\global\wd\drawingBox=\the\drawingwd
|
||||
\baselineskip=0pt
|
||||
\copy\drawingBox
|
||||
\global\psxoffset=0pt
|
||||
\global\psyoffset=0pt% These are local to one figure
|
||||
\global\pscm=1cm
|
||||
\global\drawingwd=\drawingwd
|
||||
\global\drawinght=\drawinght
|
||||
}}
|
||||
%
|
||||
% \psbox{PSfilename} makes a TeX box having the minimal size to
|
||||
% enclose the picture
|
||||
\def\psbox#1{\psboxscaled{1000}{#1}}
|
||||
%
|
||||
%
|
||||
% \joinfiles file1, file2, ...n \into joinedfilename .
|
||||
% makes one file out of many
|
||||
% \splitfile joinedfilename
|
||||
% the opposite
|
||||
%
|
||||
%\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
|
||||
%\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
|
||||
%\def\executeinspecs#1{%
|
||||
%\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
|
||||
%\newread\pst@mpin
|
||||
\newif\ifn@teof\n@teoftrue
|
||||
\newif\ifc@ntrolline
|
||||
\newif\ifmatch
|
||||
\newread\j@insplitin
|
||||
\newwrite\j@insplitout
|
||||
\newwrite\psbj@inaux
|
||||
\immediate\openout\psbj@inaux=psbjoin.aux
|
||||
\immediate\write\psbj@inaux{\string\joinfiles}
|
||||
\immediate\write\psbj@inaux{\jobname,}
|
||||
%
|
||||
% We redefine input to keep track of the various files inputted
|
||||
%
|
||||
\immediate\let\oldinput=\input
|
||||
\def\input#1 {
|
||||
\immediate\write\psbj@inaux{#1,}
|
||||
\oldinput #1 }
|
||||
\def\empty{}
|
||||
\def\setmatchif#1\contains#2{
|
||||
\def\match##1#2##2\endmatch{
|
||||
\def\tmp{##2}
|
||||
\ifx\empty\tmp
|
||||
\matchfalse
|
||||
\else
|
||||
\matchtrue
|
||||
\fi}
|
||||
\match#1#2\endmatch}
|
||||
\def\warnopenout#1#2{
|
||||
\setmatchif{TrashMe,psbjoin.aux,psbjoin.all}\contains{#2}
|
||||
\ifmatch
|
||||
\else
|
||||
\immediate\openin\pst@mpin=#2
|
||||
\ifeof\pst@mpin
|
||||
\else
|
||||
\errhelp{If the content of this file is so precious to you, abort (ie
|
||||
press x or e) and rename it before retrying.}
|
||||
\errmessage{I'm just about to replace your file named #2}
|
||||
\fi
|
||||
\immediate\closein\pst@mpin
|
||||
\fi
|
||||
\message{#2}
|
||||
\immediate\openout#1=#2}
|
||||
% No comments allowed below: % will have an unusual catcode
|
||||
{
|
||||
\catcode`\%=12
|
||||
\gdef\splitfile#1 {
|
||||
\immediate\openin\j@insplitin=#1
|
||||
\message{Splitting file #1 into:}
|
||||
\warnopenout\j@insplitout{TrashMe}
|
||||
\loop
|
||||
\ifeof
|
||||
\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
|
||||
\else
|
||||
\n@teoftrue
|
||||
\executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter
|
||||
\ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck}
|
||||
\ifc@ntrolline
|
||||
\else
|
||||
\toks0=\expandafter{\spl@tinline}
|
||||
\immediate\write\j@insplitout{\the\toks0}
|
||||
\fi
|
||||
\fi
|
||||
\ifn@teof\repeat
|
||||
\immediate\closeout\j@insplitout}
|
||||
\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{
|
||||
\def\t@mp{#1}
|
||||
\ifx\empty\t@mp
|
||||
\def\t@mp{#3}
|
||||
\ifx\empty\t@mp
|
||||
\global\c@ntrollinefalse
|
||||
\else
|
||||
\immediate\closeout\j@insplitout
|
||||
\warnopenout\j@insplitout{#2}
|
||||
\global\c@ntrollinetrue
|
||||
\fi
|
||||
\else
|
||||
\global\c@ntrollinefalse
|
||||
\fi}
|
||||
\gdef\joinfiles#1\into#2 {
|
||||
\message{Joining following files into}
|
||||
\warnopenout\j@insplitout{#2}
|
||||
\message{:}
|
||||
{
|
||||
\edef\w@##1{\immediate\write\j@insplitout{##1}}
|
||||
\w@{% This text was produced with psbox's \string\joinfiles.}
|
||||
\w@{% To decompose and tex it:}
|
||||
\w@{%-save this with a filename CONTAINING ONLY LETTERS, and no extensions}
|
||||
\w@{% (say, JOINTFIL), in some uncrowded directory;}
|
||||
\w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}
|
||||
\w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by}
|
||||
\w@{% the first part in the joining (after splitting JOINTFIL into}
|
||||
\w@{% it's constituents, TeX will try to process it as it stands).}
|
||||
\w@{\string\input\space psbox.tex}
|
||||
\w@{\string\splitfile{\string\jobname}}
|
||||
}
|
||||
\tre@tfilelist#1, \endtre@t
|
||||
\immediate\closeout\j@insplitout}
|
||||
\gdef\tre@tfilelist#1, #2\endtre@t{
|
||||
\def\t@mp{#1}
|
||||
\ifx\empty\t@mp
|
||||
\else
|
||||
\llj@in{#1}
|
||||
\tre@tfilelist#2, \endtre@t
|
||||
\fi}
|
||||
\gdef\llj@in#1{
|
||||
\immediate\openin\j@insplitin=#1
|
||||
\ifeof\j@insplitin
|
||||
\errmessage{I couldn't find file #1.}
|
||||
\else
|
||||
\message{#1}
|
||||
\toks0={%Beginning-Of-File-Named:#1}
|
||||
\immediate\write\j@insplitout{\the\toks0}
|
||||
\executeinspecs{\global\read\j@insplitin to\oldj@ininline}
|
||||
\loop
|
||||
\ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
|
||||
\else\n@teoftrue
|
||||
\executeinspecs{\global\read\j@insplitin to\j@ininline}
|
||||
\toks0=\expandafter{\oldj@ininline}
|
||||
\let\oldj@ininline=\j@ininline
|
||||
\immediate\write\j@insplitout{\the\toks0}
|
||||
\fi
|
||||
\ifn@teof
|
||||
\repeat
|
||||
\immediate\closein\j@insplitin
|
||||
\fi}
|
||||
}
|
||||
% To be put at the end of a file, for making an tar-like file containing
|
||||
% everything it used.
|
||||
\def\autojoin{
|
||||
\immediate\write\psbj@inaux{\string\into\space psbjoin.all}
|
||||
\immediate\closeout\psbj@inaux
|
||||
\input psbjoin.aux
|
||||
}
|
||||
%
|
||||
% Annotations & Captions etc...
|
||||
%
|
||||
%
|
||||
% \centinsert{anybox} is just a centered \midinsert, but is included as
|
||||
% people barely use the original inserts from TeX.
|
||||
%
|
||||
\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert}
|
||||
\def\psannotate#1#2{\def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1}
|
||||
\def\pscaption#1#2{\vbox{
|
||||
\setbox\drawingBox=#1
|
||||
\copy\drawingBox
|
||||
\vskip\baselineskip
|
||||
\vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2}
|
||||
\ifdim\wd0>\hsize
|
||||
\noindent\unhbox0\tolerance=5000
|
||||
\else\centerline{\box0}
|
||||
\fi
|
||||
}}}
|
||||
% for compatibility with older versions
|
||||
\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}}
|
||||
\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}}
|
||||
%
|
||||
% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current
|
||||
% position without moving it (to be used in annotations).
|
||||
\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt
|
||||
\rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}}
|
||||
%
|
||||
% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left
|
||||
% corner is the current point
|
||||
\newdimen\gridht \newdimen\gridwd
|
||||
\def\gridfill(#1;#2){
|
||||
\setbox0=\hbox to 1\pscm
|
||||
{\vrule height1\pscm width.4pt\leaders\hrule\hfill}
|
||||
\gridht=#1
|
||||
\divide\gridht by \ht0
|
||||
\multiply\gridht by \ht0
|
||||
\gridwd=#2
|
||||
\divide\gridwd by \wd0
|
||||
\multiply\gridwd by \wd0
|
||||
\advance \gridwd by \wd0
|
||||
\vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}}
|
||||
%
|
||||
% Useful to measure where to put annotations
|
||||
\def\fillinggrid{\at(0cm;0cm){\vbox{
|
||||
\gridfill(\drawinght;\drawingwd)}}}
|
||||
%
|
||||
% \textleftof\anybox: Sample text\endtext
|
||||
% inserts "Sample text" on the left of \anybox ie \vbox, \psbox.
|
||||
% \textrightof is the symmetric (not documented, too uggly)
|
||||
% Welcome any suggestion about clean wraparound macros from
|
||||
% TeXhackers reading this
|
||||
%
|
||||
\def\textleftof#1:{
|
||||
\setbox1=#1
|
||||
\setbox0=\vbox\bgroup
|
||||
\advance\hsize by -\wd1 \advance\hsize by -2em}
|
||||
\def\textrightof#1:{
|
||||
\setbox0=#1
|
||||
\setbox1=\vbox\bgroup
|
||||
\advance\hsize by -\wd0 \advance\hsize by -2em}
|
||||
\def\endtext{
|
||||
\egroup
|
||||
\hbox to \hsize{\valign{\vfil##\vfil\cr%
|
||||
\box0\cr%
|
||||
\noalign{\hss}\box1\cr}}}
|
||||
%
|
||||
% \frameit{\thick}{\skip}{\anybox}
|
||||
% draws with thickness \thick a box around \anybox, leaving \skip of
|
||||
% blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}}
|
||||
% \boxit{\anybox} is a shortcut.
|
||||
\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{
|
||||
\hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}%
|
||||
\vskip#2\hrule height#1}\vrule width#1}}
|
||||
\def\boxit#1{\frameit{0.4pt}{0pt}{#1}}
|
||||
%
|
||||
%
|
||||
\catcode`\@=12 % cs containing @ are unreachable
|
||||
%
|
||||
% CUSTOMIZE YOUR DEFAULT DRIVER:
|
||||
% Uncomment the line corresponding to your TeX system:
|
||||
%\psfortextures% For TeXtures on the Macintosh
|
||||
%\psforoztex % For OzTeX shareware on the Macintosh
|
||||
%\psfordvitops % For the DVItoPS converter for TeX on IBM mainframes
|
||||
\psfordvips % For DVIPS converter on VAX and UNIX
|
||||
%\psfordvitps % For dvitps from TeXPS package under UNIX
|
||||
%\psforDVIALW % For DVIALW, UNIX public domain
|
||||
%\psonlyboxes % Blank Boxes (when all else fails).
|
@@ -1,6 +0,0 @@
|
||||
\chapter{MMboard: a sample MMedia application}\label{mmboard}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
To be written.
|
||||
|
@@ -1,68 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndaiff.h at 26/Feb/00 14:52:29
|
||||
%
|
||||
|
||||
\section{\class{wxSoundAiff}}\label{wxsoundaiff}
|
||||
|
||||
AIFF codec
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFileStream}{wxsoundfilestream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::wxSoundAiff}\label{wxsoundaiffwxsoundaiff}
|
||||
|
||||
\func{}{wxSoundAiff}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
\func{}{wxSoundAiff}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
\membersection{wxSoundAiff::\destruct{wxSoundAiff}}\label{wxsoundaiffdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundAiff}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::CanRead}\label{wxsoundaiffcanread}
|
||||
|
||||
\func{bool}{CanRead}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::GetCodecName}\label{wxsoundaiffgetcodecname}
|
||||
|
||||
\constfunc{wxString}{GetCodecName}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::PrepareToPlay}\label{wxsoundaiffpreparetoplay}
|
||||
|
||||
\func{bool}{PrepareToPlay}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::PrepareToRecord}\label{wxsoundaiffpreparetorecord}
|
||||
|
||||
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::FinishRecording}\label{wxsoundaifffinishrecording}
|
||||
|
||||
\func{bool}{FinishRecording}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::RepositionStream}\label{wxsoundaiffrepositionstream}
|
||||
|
||||
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::GetData}\label{wxsoundaiffgetdata}
|
||||
|
||||
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundAiff::PutData}\label{wxsoundaiffputdata}
|
||||
|
||||
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
@@ -1,294 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: sndbase.tex
|
||||
%% Purpose: wxMMedia docs
|
||||
%% Author: Guilhem Lavaux <lavaux@easynet.fr>
|
||||
%% Modified by:
|
||||
%% Created: 2000
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) wxWindows team
|
||||
%% Licence: wxWindows licence
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{\class{wxSoundStream}}\label{wxsoundstream}
|
||||
|
||||
Base class for sound streams
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No base class
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/mmedia/sndbase.h>
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
%%
|
||||
%% wxSoundStream errors
|
||||
%%
|
||||
|
||||
\wxheading{wxSoundStream errors}
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxSOUND\_NOERR}}{No error occured}
|
||||
\twocolitem{{\bf wxSOUND\_IOERR}}{An input/output error occured, it may concern
|
||||
either a driver or a file}
|
||||
\twocolitem{{\bf wxSOUND\_INVFRMT}}{The sound format passed to the function is
|
||||
invalid. Generally, it means that you passed out of range values to the codec
|
||||
stream or you don't pass the right sound format object to the right sound codec
|
||||
stream.}
|
||||
\twocolitem{{\bf wxSOUND\_INVDEV}}{Invalid device. Generally, it means that the
|
||||
sound stream didn't manage to open the device driver due to an invalid parameter
|
||||
or to the fact that sound is not supported on this computer.}
|
||||
\twocolitem{{\bf wxSOUND\_NOEXACT}}{No exact matching sound codec has been found for
|
||||
this sound format. It means that the sound driver didn't manage to setup the sound
|
||||
card with the specified values.}
|
||||
\twocolitem{{\bf wxSOUND\_NOCODEC}}{No matching codec has been found. Generally, it
|
||||
may happen when you call wxSoundRouterStream::SetSoundFormat().}
|
||||
\twocolitem{{\bf wxSOUND\_MEMERR}}{Not enough memory.}
|
||||
\end{twocollist}
|
||||
|
||||
%%
|
||||
%% C callback
|
||||
%%
|
||||
|
||||
\wxheading{C callback for wxSound event}
|
||||
|
||||
When a sound event is generated, it may either call the internal sound event
|
||||
processor (which can be inherited) or call a C function. Its definition is:
|
||||
|
||||
\begin{verbatim}
|
||||
typedef void (*wxSoundCallback)(wxSoundStream *stream, int evt,
|
||||
void *cdata);
|
||||
\end{verbatim}
|
||||
|
||||
The {\bf stream} parameter represents the current wxSoundStream.
|
||||
|
||||
The {\bf evt} parameter represents the sound event which is the cause of the calling. (See \helpref{wxSound events}{wxsoundstream}).
|
||||
|
||||
The {\bf cdata} parameter represents the user callback data which were specified
|
||||
when the user called \helpref{wxSoundStream::Register}{wxsoundstreamregister}.
|
||||
|
||||
{\it Note:} There are two other ways to catch sound events: you can inherit the
|
||||
sound stream and redefine \helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}, or you can reroute the events to another sound stream using \helpref{wxSoundStream::SetEventHandler}{wxsoundstreamseteventhandler}.
|
||||
|
||||
%%
|
||||
%% wxSoundStream streaming mode
|
||||
%%
|
||||
|
||||
\wxheading{wxSound streaming mode}
|
||||
|
||||
The wxSoundStream object can work in three different modes. These modes are specified
|
||||
at the call to \helpref{wxSoundStream::StartProduction}{wxsoundstreamstartproduction}
|
||||
and cannot be changed until you call
|
||||
\helpref{wxSoundStream::StopProduction}{wxsoundstreamstopproduction}.
|
||||
|
||||
The {\bf wxSOUND\_INPUT} mode is the recording mode. It generates {\bf wxSOUND\_INPUT}
|
||||
events and you cannot use wxSoundStream::Write().
|
||||
|
||||
The {\bf wxSOUND\_OUTPUT} mode is the playing mode. It generates {\bf wxSOUND\_OUTPUT}
|
||||
events and you cannot use wxSoundStream::Read().
|
||||
|
||||
The {\bf wxSOUND\_DUPLEX} mode activates the full duplex mode. The full duplex requires
|
||||
you to make synchronous call to \helpref{wxSoundStream::Read}{wxsoundstreamread} and
|
||||
\helpref{wxSoundStream::Write}{wxsoundstreamwrite}. This means that you must be
|
||||
careful with realtime problems. Each time you call Read you must call Write.
|
||||
|
||||
%%
|
||||
%% wxSoundStream events
|
||||
%%
|
||||
|
||||
\wxheading{wxSoundStream events}
|
||||
|
||||
The sound events are generated when the sound driver (or the sound stream) completes
|
||||
a previous sound buffer. There are two possible sound events and two meanings.
|
||||
|
||||
The {\bf wxSOUND\_INPUT} event is generated when the sound stream has a new input
|
||||
buffer ready to be read. You know that you can read a buffer of the size
|
||||
\helpref{GetBestSize()}{wxsoundstreamgetbestsize} without blocking.
|
||||
|
||||
The {\bf wxSOUND\_OUTPUT} event is generated when the sound stream has completed a
|
||||
previous buffer. This buffer has been sent to the sound driver and it is ready to
|
||||
process a new buffer. Consequently, \helpref{Write}{wxsoundstreamwrite} will not
|
||||
block too.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
%% Ctor && Dtor
|
||||
|
||||
\membersection{wxSoundStream::wxSoundStream}\label{wxsoundstreamwxsoundstream}
|
||||
|
||||
\func{}{wxSoundStream}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\membersection{wxSoundStream::\destruct{wxSoundStream}}\label{wxsoundstreamdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStream}}{\void}
|
||||
|
||||
Destructor. The destructor stops automatically all started production and destroys
|
||||
any temporary buffer.
|
||||
|
||||
%%
|
||||
%% Read
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::Read}\label{wxsoundstreamread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
Reads {\it len} bytes from the sound stream. This call may block the user so
|
||||
use it carefully when you need to intensively refresh the GUI. You may be
|
||||
interested by sound events: see \helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}.
|
||||
|
||||
It is better to use the size returned by \helpref{wxSoundStream::GetBestSize}{wxsoundstreamgetbestsize}: this may improve performance or accuracy of the
|
||||
sound event system.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{len}{{\it len} is expressed in bytes. If you need to do conversions between bytes
|
||||
and seconds use wxSoundFormat.
|
||||
See \helpref{wxSoundFormatBase}{wxsoundformatbase}, \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.}
|
||||
|
||||
\docparam{data}{Data in \it{buffer} are coded using the sound format attached to this sound
|
||||
stream. The format is specified with
|
||||
\helpref{SetSoundFormat}{wxsoundstreamsetsoundformat}.}
|
||||
|
||||
%%
|
||||
%% Write
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::Write}\label{wxsoundstreamwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
Writes \it{len} bytes to the sound stream. This call may block the user so
|
||||
use it carefully. You may be interested by sound events: see
|
||||
\helpref{wxSoundStream::OnSoundEvent}{wxsoundstreamonsoundevent}.
|
||||
|
||||
It is better to use the size returned by \helpref{wxSoundStream::GetBestSize}{wxsoundstreamgetbestsize}: this may improve performance or accuracy of the
|
||||
sound event system.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{len}{This is expressed in bytes. If you need to do conversions between bytes
|
||||
and seconds use wxSoundFormat.
|
||||
See \helpref{wxSoundFormatBase}{wxsoundformatbase}, \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.}
|
||||
|
||||
\docparam{buffer}{Data in \it{buffer} are coded using the sound format attached to this sound
|
||||
stream. The format is specified with
|
||||
\helpref{SetSoundFormat}{wxsoundstreamsetsoundformat}.}
|
||||
|
||||
%%
|
||||
%% GetBestSize
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::GetBestSize}\label{wxsoundstreamgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
||||
This function returns the best size for IO calls. The best size provides you
|
||||
a good alignment for data to be written (or read) to (or from) the sound stream.
|
||||
So, when, for example, a sound event is sent, you are sure the sound stream
|
||||
will not block for this buffer size.
|
||||
|
||||
%%
|
||||
%% wxSoundStream:SetSoundFormat
|
||||
%%
|
||||
|
||||
\membersection{wxSoundStream::SetSoundFormat}\label{wxsoundstreamsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
SetSoundFormat is one of the key function of the wxSoundStream object.
|
||||
It specifies the sound format the user needs. SetSoundFormat tries to
|
||||
apply the format to the current sound stream (it can be a sound file or a
|
||||
sound driver). Then, either it manages to apply it and it returns {\bf TRUE},
|
||||
or it could not and it returns {\bf FALSE}. In this case, you must check
|
||||
the error with
|
||||
\helpref{wxSoundStream::GetError}{wxsoundstreamgeterror}. See
|
||||
\helpref{wxSoundStream errors section}{wxsoundstream} for more details.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
The {\bf format} object can be destroyed after the call. The object does not need it.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
If the error is {\bf wxSOUND\_NOTEXACT}, the stream tries to find the best
|
||||
approaching format and setups it. You can check the format which it applied
|
||||
with \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.
|
||||
|
||||
%%
|
||||
%% GetSoundFormat
|
||||
%%
|
||||
\membersection{wxSoundStream::GetSoundFormat}\label{wxsoundstreamgetsoundformat}
|
||||
\constfunc{wxSoundFormatBase\&}{GetSoundFormat}{\void}
|
||||
|
||||
It returns a reference to the current sound format of the stream represented by a
|
||||
wxSoundFormatBase object. This object {\it must not} be destroyed by anyone except
|
||||
the stream itself.
|
||||
|
||||
%%
|
||||
%% SetCallback
|
||||
%%
|
||||
\membersection{wxSoundStream::SetCallback}\label{wxsoundstreamregister}
|
||||
|
||||
\func{void}{Register}{\param{int }{evt}, \param{wxSoundCallback }{cbk}, \param{void* }{cdata}}
|
||||
|
||||
It installs a C callback for wxSoundStream events. The C callbacks are still
|
||||
useful to avoid hard inheritance. You can install only one callback per event.
|
||||
Each callback has its callback data.
|
||||
|
||||
%%
|
||||
%% StartProduction
|
||||
%%
|
||||
\membersection{wxSoundStream::StartProduction}\label{wxsoundstreamstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
StartProduction starts the sound streaming. {\it evt} may be one of
|
||||
{\bf wxSOUND\_INPUT}, {\bf wxSOUND\_OUTPUT} or {\bf wxSOUND\_DUPLEX}.
|
||||
You cannot specify several flags at the same time. Starting the production
|
||||
may automaticaly in position of buffer underrun (only in the case you activated
|
||||
recording). Actually this may happen the sound IO queue is too short.
|
||||
It is also advised that you fill quickly enough the sound IO queue when the
|
||||
driver requests it (through a wxSoundEvent).
|
||||
|
||||
\membersection{wxSoundStream::StopProduction}\label{wxsoundstreamstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
I stops the async notifier and the sound streaming straightly.
|
||||
|
||||
\membersection{wxSoundStream::SetEventHandler}\label{wxsoundstreamseteventhandler}
|
||||
|
||||
\func{void}{SetEventHandler}{\param{wxSoundStream* }{handler}}
|
||||
|
||||
Sets the event handler: if it is non-null, all events are routed to it.
|
||||
|
||||
\membersection{wxSoundStream::GetError}\label{wxsoundstreamgeterror}
|
||||
|
||||
\constfunc{wxSoundError}{GetError}{\void}
|
||||
|
||||
It returns the last error which occured.
|
||||
|
||||
\membersection{wxSoundStream::GetLastAccess}\label{wxsoundstreamgetlastaccess}
|
||||
|
||||
\constfunc{wxUint32}{GetLastAccess}{\void}
|
||||
|
||||
It returns the number of bytes which were effectively written to/read from the sound stream.
|
||||
|
||||
\membersection{wxSoundStream::QueueFilled}\label{wxsoundstreamqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
||||
It returns whether the sound IO queue is full. When it is full, the next IO call will block
|
||||
until the IO queue has at least one empty entry.
|
||||
|
||||
\membersection{wxSoundStream::OnSoundEvent}\label{wxsoundstreamonsoundevent}
|
||||
|
||||
\func{void}{OnSoundEvent}{\param{int }{evt}}
|
||||
|
||||
It is called by the wxSoundStream when a new sound event occured.
|
||||
|
@@ -1,39 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndcodec.h at 26/Feb/00 14:26:29
|
||||
%
|
||||
|
||||
\section{\class{wxSoundStreamCodec}}\label{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundStreamCodec::wxSoundStreamCodec}\label{wxsoundstreamcodecwxsoundstreamcodec}
|
||||
|
||||
\func{}{wxSoundStreamCodec}{\param{wxSoundStream\& }{snd\_io}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::\destruct{wxSoundStreamCodec}}\label{wxsoundstreamcodecdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamCodec}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::StartProduction}\label{wxsoundstreamcodecstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::StopProduction}\label{wxsoundstreamcodecstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamCodec::GetBestSize}\label{wxsoundstreamcodecgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
@@ -1,64 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndesd.h at 26/Feb/00 14:26:56
|
||||
%
|
||||
|
||||
\section{\class{wxSoundStreamESD}}\label{wxsoundstreamesd}
|
||||
|
||||
ESD output class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::wxSoundStreamESD}\label{wxsoundstreamesdwxsoundstreamesd}
|
||||
|
||||
\func{}{wxSoundStreamESD}{\param{const wxString\& }{hostname = "localhost"}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::\destruct{wxSoundStreamESD}}\label{wxsoundstreamesddtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamESD}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::Read}\label{wxsoundstreamesdread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::Write}\label{wxsoundstreamesdwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::SetSoundFormat}\label{wxsoundstreamesdsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::StartProduction}\label{wxsoundstreamesdstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::StopProduction}\label{wxsoundstreamesdstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::WakeUpEvt}\label{wxsoundstreamesdwakeupevt}
|
||||
|
||||
\func{void}{WakeUpEvt}{\param{int }{evt}}
|
||||
|
||||
You should not call this.
|
||||
|
||||
|
||||
\membersection{wxSoundStreamESD::QueueFilled}\label{wxsoundstreamesdqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
@@ -1,87 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndg72x.h at 26/Feb/00 14:52:19
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatG72X}}\label{wxsoundformatg72x}
|
||||
|
||||
|
||||
G72X format
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFormatBase}{wxsoundformatbase}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef enum {
|
||||
wxSOUND\_G721,
|
||||
wxSOUND\_G723\_24,
|
||||
wxSOUND\_G723\_40
|
||||
} wxSoundG72XType
|
||||
\end{verbatim}}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct g72x\_state g72state
|
||||
\end{verbatim}}
|
||||
|
||||
This fixes a bug in Mingw95
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundFormatG72X::wxSoundFormatG72X}\label{wxsoundformatg72xwxsoundformatg72x}
|
||||
|
||||
\func{}{wxSoundFormatG72X}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::\destruct{wxSoundFormatG72X}}\label{wxsoundformatg72xdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatG72X}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::SetG72XType}\label{wxsoundformatg72xsetg72xtype}
|
||||
|
||||
\func{void}{SetG72XType}{\param{wxSoundG72XType }{type}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetG72XType}\label{wxsoundformatg72xgetg72xtype}
|
||||
|
||||
\constfunc{wxSoundG72XType}{GetG72XType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::SetSampleRate}\label{wxsoundformatg72xsetsamplerate}
|
||||
|
||||
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetSampleRate}\label{wxsoundformatg72xgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetType}\label{wxsoundformatg72xgettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::Clone}\label{wxsoundformatg72xclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetTimeFromBytes}\label{wxsoundformatg72xgettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::GetBytesFromTime}\label{wxsoundformatg72xgetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatG72X::operator!=}\label{wxsoundformatg72xoperatorneq}
|
||||
|
||||
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}
|
||||
|
@@ -1,243 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: sndfile.tex
|
||||
%% Purpose: wxMMedia docs
|
||||
%% Author: Guilhem Lavaux <lavaux@easynet.fr>
|
||||
%% Modified by:
|
||||
%% Created: 2000
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) wxWindows team
|
||||
%% Licence: wxWindows licence
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{\class{wxSoundFileStream}}\label{wxsoundfilestream}
|
||||
|
||||
Base class for file coders/decoders. This class is not constructor (it is an abstract
|
||||
class).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Include file}
|
||||
|
||||
wx/sndfile.h
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundFileStream::wxSoundFileStream}\label{wxsoundfilestreamwxsoundfilestream}
|
||||
|
||||
\func{}{wxSoundFileStream}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
It constructs a new file decoder object which will send
|
||||
audio data to the specified sound stream.
|
||||
The {\it stream} is the input stream to be decoded. The
|
||||
{\it io\_sound} is the destination sound stream.
|
||||
Once it has been constructed, you cannot change any of
|
||||
the specified streams nor the direction of the stream.
|
||||
|
||||
You will have access to the playback functions.
|
||||
|
||||
\func{}{wxSoundFileStream}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
It constructs a new file coder object which will get
|
||||
data to be recorded from the specified sound stream.
|
||||
The {\it stream} is the output wxStream. The {\it io\_sound}
|
||||
is the source sound stream of the audio data. Once
|
||||
it has been constructed, you cannot change any of
|
||||
the specified streams nor the direction of the stream.
|
||||
|
||||
\membersection{wxSoundFileStream::\destruct{wxSoundFileStream}}\label{wxsoundfilestreamdtor}
|
||||
\func{}{\destruct{wxSoundFileStream}}{\void}
|
||||
|
||||
It destroys the current sound file codec.
|
||||
|
||||
\membersection{wxSoundFileStream::Play}\label{wxsoundfilestreamplay}
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
It starts playing the file. The playing begins, in background
|
||||
in nearly all cases, after the return of the function. The
|
||||
codec returns to a {\bf stopped} state when it reaches the
|
||||
end of the file.
|
||||
On success, it returns TRUE.
|
||||
|
||||
\membersection{wxSoundFileStream::Record}\label{wxsoundfilestreamrecord}
|
||||
\func{bool}{Record}{\param{wxUint32 }{time}}
|
||||
|
||||
It starts recording data from the sound stream and writing them
|
||||
to the output stream. You have to precise the recording length in
|
||||
parameter. This length is expressed in seconds. If you want to
|
||||
control the record length (using \helpref{Stop}{wxsoundfilestreamstop}),
|
||||
you can set it to wxSOUND\_INFINITE\_TIME.
|
||||
|
||||
On success, it returns TRUE.
|
||||
|
||||
\membersection{wxSoundFileStream::Stop}\label{wxsoundfilestreamstop}
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
It stops either recording or playing. Whatever happens (even unexpected
|
||||
errors), the stream is stopped when the function returns. When you are
|
||||
in recording mode, the file headers are updated and flushed if possible
|
||||
(ie: if the output stream is seekable).
|
||||
|
||||
On success, it returns TRUE.
|
||||
|
||||
\membersection{wxSoundFileStream::Pause}\label{wxsoundfilestreampause}
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
The file codec tries to pause the stream: it means that it stops audio
|
||||
production but keep the file pointer at the place.
|
||||
|
||||
If the file codec is already paused, it returns FALSE.
|
||||
|
||||
On success, it returns TREE.
|
||||
|
||||
\membersection{wxSoundFileStream::Resume}\label{wxsoundfilestreamresume}
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
When the file codec has been paused using
|
||||
\helpref{Pause}{wxsoundfilestreampause}, you could be interrested in
|
||||
resuming it. This is the goal of this function.
|
||||
|
||||
\membersection{wxSoundFileStream::IsStopped}\label{wxsoundfilestreamisstopped}
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
||||
It returns TRUE when the stream is stopped, in another case it returns
|
||||
FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::IsPaused}\label{wxsoundfilestreamispaused}
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
It returns TRUE when the stream is paused, in another case it returns
|
||||
FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::StartProduction}\label{wxsoundfilestreamstartproduction}
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
It is really not advised you call this function. From the wxSoundFileStream
|
||||
point of view it is an internal function. Internally, it is called after
|
||||
the file stream has been prepared to be played or to receive audio data and
|
||||
when it wants to start processing audio data.
|
||||
|
||||
\membersection{wxSoundFileStream::StopProduction}\label{wxsoundfilestreamstopproduction}
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
As for \helpref{StartProduction}{wxsoundfilestreamstopproduction}, it is not
|
||||
advised for you to call this function. It is called by
|
||||
\helpref{Stop}{wxsoundfilestreamstop} when it needs to stop the audio data
|
||||
processing.
|
||||
|
||||
\membersection{wxSoundFileStream::GetLength}\label{wxsoundfilestreamgetlength}
|
||||
\func{wxUint32}{GetLength}{\void}
|
||||
|
||||
It returns the audio data length of the file stream. This length is expressed
|
||||
in bytes. If you need the length in seconds, you will need to use
|
||||
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
|
||||
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
|
||||
|
||||
\membersection{wxSoundFileStream::GetPosition}\label{wxsoundfilestreamgetposition}
|
||||
\func{wxUint32}{GetPosition}{\void}
|
||||
|
||||
It returns the current position in the soundfile stream. The position
|
||||
is expressed in bytes. If you need the length in seconds, you will need to use
|
||||
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
|
||||
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
|
||||
|
||||
\membersection{wxSoundFileStream::SetPosition}\label{wxsoundfilestreamsetposition}
|
||||
\func{wxUint32}{SetPosition}{\param{wxUint32 }{new\_position}}
|
||||
|
||||
It sets the current in the soundfile stream. The position
|
||||
{\it new\_position} must be expressed in bytes. You can get
|
||||
a length/position in bytes from a time value using
|
||||
\helpref{GetSoundFormat}{wxsoundstreamgetsoundformat} and
|
||||
\helpref{GetTimeFromBytes}{wxsoundformatbasegettimefrombytes}.
|
||||
|
||||
On success, it returns TRUE.
|
||||
|
||||
\wxheading{Warning}
|
||||
|
||||
Some wxStream may not be capable to support this function as
|
||||
it may not support the seekable functionnality. If this happens,
|
||||
it returns FALSE and leave the stream at the same position.
|
||||
|
||||
\membersection{wxSoundFileStream::Read}\label{wxsoundfilestreamread}
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
You can obtain the audio data encoded in the file using this function.
|
||||
But it must be considered as an internal function. Used carelessly, it
|
||||
may corrupt the current state of the stream.
|
||||
Data are returned using in the original file coding (You must use a sound
|
||||
format object to decode it).
|
||||
|
||||
\membersection{wxSoundFileStream::Write}\label{wxsoundfilestreamwrite}
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
You can put encoded audio data to the file using this function.
|
||||
But it must be considered as an internal function. Used carelessly, it
|
||||
may corrupt the current state of the stream.
|
||||
Data must be coded with the specified file coding (You must use a sound
|
||||
format object to do this).
|
||||
|
||||
\membersection{wxSoundFileStream::SetSoundFormat}\label{wxsoundfilestreamsetsoundformat}
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
\membersection{wxSoundFileStream::GetCodecName}\label{wxsoundfilestreamgetcodecname}
|
||||
\constfunc{wxString}{GetCodecName}{\void}
|
||||
|
||||
This function returns the Codec name. This is useful for those who
|
||||
want to build a player (But also in some other case).
|
||||
|
||||
\membersection{wxSoundFileStream::CanRead}\label{wxsoundfilestreamcanread}
|
||||
\func{bool}{CanRead}{\void}
|
||||
|
||||
You should use this function to test whether this file codec can read
|
||||
the stream you passed to it.
|
||||
|
||||
\membersection{wxSoundFileStream::PrepareToPlay}\label{wxsoundfilestreampreparetoplay}
|
||||
\func{bool}{PrepareToPlay}{\void}
|
||||
|
||||
It is called by wxSoundFileStream to prepare the specific file loader
|
||||
to prepare itself to play the file. Actually, this includes reading
|
||||
headers and setting the various parameters of the sound format.
|
||||
This should not be called by an external user but it should be
|
||||
implemented when you inherit wxSoundFileStream to build a new codec.
|
||||
|
||||
It must return when the file is identified and the parameters have
|
||||
been set. In all other cases, you must return FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::PrepareToRecord}\label{wxsoundfilestreampreparetorecord}
|
||||
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
|
||||
|
||||
\membersection{wxSoundFileStream::FinishRecording}\label{wxsoundfilestreamfinishrecording}
|
||||
\func{bool}{FinishRecording}{\void}
|
||||
|
||||
\membersection{wxSoundFileStream::RepositionStream}\label{wxsoundfilestreamrepositionstream}
|
||||
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
|
||||
|
||||
This is called by wxSoundFileStream::SetPosition to seek the input stream
|
||||
to the right position. This must be overidden by the file codec class.
|
||||
The position is relative to the beginning of the samples.
|
||||
If it is impossible (as for a piped input stream), you must return FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::FinishPreparation}\label{wxsoundfilestreamfinishpreparation}
|
||||
\func{void}{FinishPreparation}{\param{wxUint32 }{len}}
|
||||
|
||||
This is an internal function but it must called by the file codec class when
|
||||
the "playing" preparation is finished and you know the size of the stream.
|
||||
If it is an {\it infinite} stream, you should set this to wxSOUND\_INFINITE\_TIME.
|
||||
|
||||
\membersection{wxSoundFileStream::GetData}\label{wxsoundfilestreamgetdata}
|
||||
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
This is called by wxSoundFileStream when it needs to get new sound data to
|
||||
send to the device driver (or to a conversion codec). This must be eventually
|
||||
overidden by the file codec class. The default behaviour is simply to read from
|
||||
the input stream.
|
||||
|
||||
\membersection{wxSoundFileStream::PutData}\label{wxsoundfilestreamputdata}
|
||||
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
This is called by wxSoundFileStream when it needs to put new sound data received
|
||||
from the device driver (or from a conversion codec). This must be eventually
|
||||
overidden by the file codec class. The default behaviour is simply to write to
|
||||
the input stream.
|
@@ -1,104 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndpcm.h at 26/Feb/00 14:26:33
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatPcm}}\label{wxsoundformatpcm}
|
||||
|
||||
|
||||
PCM specification class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFormatBase}{wxsoundformatbase}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::wxSoundFormatPcm}\label{wxsoundformatpcmwxsoundformatpcm}
|
||||
|
||||
\func{}{wxSoundFormatPcm}{\param{wxUint32 }{srate = 22500}, \param{wxUint8 }{bps = 8}, \param{wxUint16 }{channels = 2}, \param{bool }{sign = TRUE}, \param{int }{order = wxLITTLE\_ENDIAN}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::\destruct{wxSoundFormatPcm}}\label{wxsoundformatpcmdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatPcm}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetSampleRate}\label{wxsoundformatpcmsetsamplerate}
|
||||
|
||||
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetBPS}\label{wxsoundformatpcmsetbps}
|
||||
|
||||
\func{void}{SetBPS}{\param{wxUint8 }{bps}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetChannels}\label{wxsoundformatpcmsetchannels}
|
||||
|
||||
\func{void}{SetChannels}{\param{wxUint16 }{nchannels}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::SetOrder}\label{wxsoundformatpcmsetorder}
|
||||
|
||||
\func{void}{SetOrder}{\param{int }{order}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::Signed}\label{wxsoundformatpcmsigned}
|
||||
|
||||
\func{void}{Signed}{\param{bool }{sign}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetSampleRate}\label{wxsoundformatpcmgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetBPS}\label{wxsoundformatpcmgetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetChannels}\label{wxsoundformatpcmgetchannels}
|
||||
|
||||
\constfunc{wxUint16}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetOrder}\label{wxsoundformatpcmgetorder}
|
||||
|
||||
\constfunc{int}{GetOrder}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::Signed}\label{wxsoundformatpcmgetsigned}
|
||||
|
||||
\constfunc{bool}{Signed}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetType}\label{wxsoundformatpcmgettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::Clone}\label{wxsoundformatpcmclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetTimeFromBytes}\label{wxsoundformatpcmgettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::GetBytesFromTime}\label{wxsoundformatpcmgetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatPcm::operator!}\label{wxsoundformatpcmoperatornot}
|
||||
|
||||
\constfunc{bool}{operator!}{\param{const wxSoundFormatBase\& }{frmt2}}
|
||||
|
@@ -1,69 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndbase.h at 26/Feb/00 14:23:29
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatBase}}\label{wxsoundformatbase}
|
||||
|
||||
|
||||
Base class for sound format specification
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No base class
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef enum {
|
||||
wxSOUND\_NOFORMAT,
|
||||
wxSOUND\_PCM,
|
||||
wxSOUND\_ULAW,
|
||||
wxSOUND\_G72X,
|
||||
wxSOUND\_MSADPCM
|
||||
} wxSoundFormatType
|
||||
\end{verbatim}}
|
||||
|
||||
wxSoundFormatType: it specifies the format family of the sound data
|
||||
which will be passed to the stream.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundFormatBase::wxSoundFormatBase}\label{wxsoundformatbasewxsoundformatbase}
|
||||
|
||||
\func{}{wxSoundFormatBase}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::\destruct{wxSoundFormatBase}}\label{wxsoundformatbasedtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatBase}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::GetType}\label{wxsoundformatbasegettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
It returns a "standard" format type.
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::Clone}\label{wxsoundformatbaseclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
It clones the current format.
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::GetTimeFromBytes}\label{wxsoundformatbasegettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::GetBytesFromTime}\label{wxsoundformatbasegetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatBase::operator!=}\label{wxsoundformatbaseoperatorneq}
|
||||
|
||||
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}
|
@@ -1,74 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndulaw.h at 26/Feb/00 14:52:25
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundFormatUlaw}}\label{wxsoundformatulaw}
|
||||
|
||||
|
||||
ULAW format
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFormatBase}{wxsoundformatbase}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::wxSoundFormatUlaw}\label{wxsoundformatulawwxsoundformatulaw}
|
||||
|
||||
\func{}{wxSoundFormatUlaw}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::\destruct{wxSoundFormatUlaw}}\label{wxsoundformatulawdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundFormatUlaw}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::SetSampleRate}\label{wxsoundformatulawsetsamplerate}
|
||||
|
||||
\func{void}{SetSampleRate}{\param{wxUint32 }{srate}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetSampleRate}\label{wxsoundformatulawgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::SetChannels}\label{wxsoundformatulawsetchannels}
|
||||
|
||||
\func{void}{SetChannels}{\param{wxUint8 }{channels}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetChannels}\label{wxsoundformatulawgetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetType}\label{wxsoundformatulawgettype}
|
||||
|
||||
\constfunc{wxSoundFormatType}{GetType}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::Clone}\label{wxsoundformatulawclone}
|
||||
|
||||
\constfunc{wxSoundFormatBase*}{Clone}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetTimeFromBytes}\label{wxsoundformatulawgettimefrombytes}
|
||||
|
||||
\constfunc{wxUint32}{GetTimeFromBytes}{\param{wxUint32 }{bytes}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::GetBytesFromTime}\label{wxsoundformatulawgetbytesfromtime}
|
||||
|
||||
\constfunc{wxUint32}{GetBytesFromTime}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundFormatUlaw::operator!=}\label{wxsoundformatulawoperatorneq}
|
||||
|
||||
\constfunc{bool}{operator!=}{\param{const wxSoundFormatBase\& }{frmt2}}
|
||||
|
@@ -1,54 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndg72x.h at 26/Feb/00 14:52:19
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamG72X}}\label{wxsoundstreamg72x}
|
||||
|
||||
|
||||
ULAW converter class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::wxSoundStreamG72X}\label{wxsoundstreamg72xwxsoundstreamg72x}
|
||||
|
||||
\func{}{wxSoundStreamG72X}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::\destruct{wxSoundStreamG72X}}\label{wxsoundstreamg72xdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamG72X}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::Read}\label{wxsoundstreamg72xread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::Write}\label{wxsoundstreamg72xwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::SetSoundFormat}\label{wxsoundstreamg72xsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::PutBits}\label{wxsoundstreamg72xputbits}
|
||||
|
||||
\func{void}{PutBits}{\param{wxUint8 }{bits}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamG72X::GetBits}\label{wxsoundstreamg72xgetbits}
|
||||
|
||||
\func{wxUint8}{GetBits}{\void}
|
||||
|
@@ -1,71 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndoss.h at 26/Feb/00 14:26:53
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamOSS}}\label{wxsoundstreamoss}
|
||||
|
||||
|
||||
OSS output class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::wxSoundStreamOSS}\label{wxsoundstreamosswxsoundstreamoss}
|
||||
|
||||
\func{}{wxSoundStreamOSS}{\param{const wxString\& }{dev\_name = \_T("/dev/dsp")}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::\destruct{wxSoundStreamOSS}}\label{wxsoundstreamossdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamOSS}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::Read}\label{wxsoundstreamossread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::Write}\label{wxsoundstreamosswrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::GetBestSize}\label{wxsoundstreamossgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::SetSoundFormat}\label{wxsoundstreamosssetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::StartProduction}\label{wxsoundstreamossstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::StopProduction}\label{wxsoundstreamossstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::QueueFilled}\label{wxsoundstreamossqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamOSS::WakeUpEvt}\label{wxsoundstreamosswakeupevt}
|
||||
|
||||
\func{void}{WakeUpEvt}{\param{int }{evt}}
|
||||
|
||||
You should not call this.
|
||||
|
@@ -1,48 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndcpcm.h at 26/Feb/00 14:26:35
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamPcm}}\label{wxsoundstreampcm}
|
||||
|
||||
|
||||
PCM converter class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef void (*ConverterType)(const char *buf\_in, char *buf\_out, wxUint32 len) ConverterType
|
||||
\end{verbatim}}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::wxSoundStreamPcm}\label{wxsoundstreampcmwxsoundstreampcm}
|
||||
|
||||
\func{}{wxSoundStreamPcm}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::\destruct{wxSoundStreamPcm}}\label{wxsoundstreampcmdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamPcm}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::Read}\label{wxsoundstreampcmread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::Write}\label{wxsoundstreampcmwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamPcm::SetSoundFormat}\label{wxsoundstreampcmsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
@@ -1,37 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndfile.h at 26/Feb/00 14:26:42
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundRouterStream}}\label{wxsoundrouterstream}
|
||||
|
||||
This is the router "codec" class. It should do codec routing when the device
|
||||
driver does not deal with a format.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundRouterStream::wxSoundRouterStream}\label{wxsoundrouterstreamwxsoundrouterstream}
|
||||
\func{}{wxSoundRouterStream}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
\helpref{wxSoundCodec}{wxsoundcodec}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::\destruct{wxSoundRouterStream}}\label{wxsoundrouterstreamdtor}
|
||||
\func{}{\destruct{wxSoundRouterStream}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxSoundRouterStream::SetSoundFormat}\label{wxsoundrouterstreamsetsoundformat}
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
SetSoundFormat will first try to setup the device driver with the specified
|
||||
format. If this fails, it will try to find a codec which will convert the
|
||||
input format to a valid format for the device driver. It uses an internal
|
||||
codec database.
|
@@ -1,49 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndulaw.h at 26/Feb/00 14:52:25
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamUlaw}}\label{wxsoundstreamulaw}
|
||||
|
||||
|
||||
ULAW converter class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStreamCodec}{wxsoundstreamcodec}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::wxSoundStreamUlaw}\label{wxsoundstreamulawwxsoundstreamulaw}
|
||||
|
||||
\func{}{wxSoundStreamUlaw}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::\destruct{wxSoundStreamUlaw}}\label{wxsoundstreamulawdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamUlaw}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::Read}\label{wxsoundstreamulawread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::Write}\label{wxsoundstreamulawwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::SetSoundFormat}\label{wxsoundstreamulawsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamUlaw::GetBestSize}\label{wxsoundstreamulawgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
@@ -1,91 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndwav.h at 26/Feb/00 14:26:40
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundWave}}\label{wxsoundwave}
|
||||
|
||||
|
||||
WAVE codec
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundFileStream}{wxsoundfilestream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::wxSoundWave}\label{wxsoundwavewxsoundwave}
|
||||
|
||||
\func{}{wxSoundWave}{\param{wxInputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
\func{}{wxSoundWave}{\param{wxOutputStream\& }{stream}, \param{wxSoundStream\& }{io\_sound}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::\destruct{wxSoundWave}}\label{wxsoundwavedtor}
|
||||
|
||||
\func{}{\destruct{wxSoundWave}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::CanRead}\label{wxsoundwavecanread}
|
||||
|
||||
\func{bool}{CanRead}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::GetCodecName}\label{wxsoundwavegetcodecname}
|
||||
|
||||
\constfunc{wxString}{GetCodecName}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::PrepareToPlay}\label{wxsoundwavepreparetoplay}
|
||||
|
||||
\func{bool}{PrepareToPlay}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::PrepareToRecord}\label{wxsoundwavepreparetorecord}
|
||||
|
||||
\func{bool}{PrepareToRecord}{\param{wxUint32 }{time}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::FinishRecording}\label{wxsoundwavefinishrecording}
|
||||
|
||||
\func{bool}{FinishRecording}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::RepositionStream}\label{wxsoundwaverepositionstream}
|
||||
|
||||
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::GetData}\label{wxsoundwavegetdata}
|
||||
|
||||
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::PutData}\label{wxsoundwaveputdata}
|
||||
|
||||
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleOutputPCM}\label{wxsoundwavehandleoutputpcm}
|
||||
|
||||
\func{bool}{HandleOutputPCM}{\param{wxDataInputStream\& }{data}, \param{wxUint16 }{channels}, \param{wxUint32 }{sample\_fq}, \param{wxUint32 }{byte\_p\_sec}, \param{wxUint16 }{byte\_p\_spl}, \param{wxUint16 }{bits\_p\_spl}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleOutputG721}\label{wxsoundwavehandleoutputg721}
|
||||
|
||||
\func{bool}{HandleOutputG721}{\param{wxDataInputStream\& }{data}, \param{wxUint16 }{channels}, \param{wxUint32 }{sample\_fq}, \param{wxUint32 }{byte\_p\_sec}, \param{wxUint16 }{byte\_p\_spl}, \param{wxUint16 }{bits\_p\_spl}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleInputPCM}\label{wxsoundwavehandleinputpcm}
|
||||
|
||||
\func{wxSoundFormatBase*}{HandleInputPCM}{\param{wxDataOutputStream\& }{data}}
|
||||
|
||||
|
||||
\membersection{wxSoundWave::HandleInputG72X}\label{wxsoundwavehandleinputg72x}
|
||||
|
||||
\func{wxSoundFormatBase*}{HandleInputG72X}{\param{wxDataOutputStream\& }{data}}
|
||||
|
@@ -1,140 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/sndwin.h at 26/Feb/00 14:26:51
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxSoundStreamWin}}\label{wxsoundstreamwin}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxSoundStream}{wxsoundstream}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct \_wxSoundInternal wxSoundInternal
|
||||
\end{verbatim}}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct \_wxSoundInfoHeader wxSoundInfoHeader
|
||||
\end{verbatim}}
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::wxSoundStreamWin}\label{wxsoundstreamwinwxsoundstreamwin}
|
||||
|
||||
\func{}{wxSoundStreamWin}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::\destruct{wxSoundStreamWin}}\label{wxsoundstreamwindtor}
|
||||
|
||||
\func{}{\destruct{wxSoundStreamWin}}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::Write}\label{wxsoundstreamwinwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::Read}\label{wxsoundstreamwinread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::SetSoundFormat}\label{wxsoundstreamwinsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{wxSoundFormatBase\& }{base}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::StartProduction}\label{wxsoundstreamwinstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::StopProduction}\label{wxsoundstreamwinstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::QueueFilled}\label{wxsoundstreamwinqueuefilled}
|
||||
|
||||
\constfunc{bool}{QueueFilled}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::NotifyDoneBuffer}\label{wxsoundstreamwinnotifydonebuffer}
|
||||
|
||||
\func{void}{NotifyDoneBuffer}{\param{wxUint32 }{dev\_handle}, \param{int }{flag}}
|
||||
|
||||
Internal but defined as public
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::GetBestSize}\label{wxsoundstreamwingetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::CreateSndWindow}\label{wxsoundstreamwincreatesndwindow}
|
||||
|
||||
\func{void}{CreateSndWindow}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::DestroySndWindow}\label{wxsoundstreamwindestroysndwindow}
|
||||
|
||||
\func{void}{DestroySndWindow}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::OpenDevice}\label{wxsoundstreamwinopendevice}
|
||||
|
||||
\func{bool}{OpenDevice}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::CloseDevice}\label{wxsoundstreamwinclosedevice}
|
||||
|
||||
\func{void}{CloseDevice}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::AllocHeader}\label{wxsoundstreamwinallocheader}
|
||||
|
||||
\func{wxSoundInfoHeader*}{AllocHeader}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::FreeHeader}\label{wxsoundstreamwinfreeheader}
|
||||
|
||||
\func{void}{FreeHeader}{\param{wxSoundInfoHeader* }{header}, \param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::AllocHeaders}\label{wxsoundstreamwinallocheaders}
|
||||
|
||||
\func{bool}{AllocHeaders}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::FreeHeaders}\label{wxsoundstreamwinfreeheaders}
|
||||
|
||||
\func{void}{FreeHeaders}{\param{int }{mode}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::WaitFor}\label{wxsoundstreamwinwaitfor}
|
||||
|
||||
\func{void}{WaitFor}{\param{wxSoundInfoHeader* }{info}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::AddToQueue}\label{wxsoundstreamwinaddtoqueue}
|
||||
|
||||
\func{bool}{AddToQueue}{\param{wxSoundInfoHeader* }{info}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::ClearHeader}\label{wxsoundstreamwinclearheader}
|
||||
|
||||
\func{void}{ClearHeader}{\param{wxSoundInfoHeader* }{info}}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::NextFragmentOutput}\label{wxsoundstreamwinnextfragmentoutput}
|
||||
|
||||
\func{wxSoundInfoHeader*}{NextFragmentOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundStreamWin::NextFragmentInput}\label{wxsoundstreamwinnextfragmentinput}
|
||||
|
||||
\func{wxSoundInfoHeader*}{NextFragmentInput}{\void}
|
||||
|
@@ -1,35 +0,0 @@
|
||||
; Last change: JAC 13 Oct 100 5:16 pm
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
chapterFontSize = 12
|
||||
sectionFontSize = 12
|
||||
subsectionFontSize = 12
|
||||
headerRule = yes
|
||||
footerRule = yes
|
||||
useHeadingStyles = yes
|
||||
listItemIndent=40
|
||||
generateHPJ = yes
|
||||
htmlBrowseButtons = bitmap
|
||||
winHelpVersion = 3
|
||||
winHelpContents = yes
|
||||
winHelpTitle = "MMedia Manual"
|
||||
truncateFilenames = no
|
||||
combineSubSections = yes
|
||||
\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
|
||||
\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
|
||||
\sethotspotcolour{on}\sethotspotunderline{on}}
|
||||
\docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}}
|
||||
\wxheading [1]{{\bf \htmlignore{\fcol{blue}{#1}}\htmlonly{\fcol{red}{#1}}}}
|
||||
\const [0] {{\bf const}}
|
||||
\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
\windowstyle [1] {{\bf #1}\index{#1}}
|
||||
|
||||
;;
|
||||
;; These two are for generating MS HTML Help project, contents and index files.
|
||||
;;
|
||||
htmlWorkshopFiles = true
|
||||
htmlIndex = true
|
||||
\pythonnote [1] {{\bf \fcol{blue}{wxPython note:}} #1}
|
||||
%\pythonnote [1] {}
|
||||
|
@@ -1,298 +0,0 @@
|
||||
% LaTeX style file
|
||||
% Name: texhelp.sty
|
||||
% Author: Julian Smart
|
||||
%
|
||||
% Purpose
|
||||
% -------
|
||||
% Style file to enable the simultaneous preparation of printed LaTeX and on-line
|
||||
% hypertext manuals.
|
||||
% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
|
||||
%
|
||||
% Note that if a non-ASCII character starts a newline and there should be a space
|
||||
% between the last word on the previous line and the first word on this line,
|
||||
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
|
||||
% in all other formats.
|
||||
%
|
||||
% Julian Smart
|
||||
% Artificial Intelligence Applications Institute
|
||||
%
|
||||
%
|
||||
% ============== C++/CLIPS Documentation Facilities ==============
|
||||
%
|
||||
% Each class definition should be typeset with e.g.
|
||||
%
|
||||
% \section{\class{Name}: Parent}
|
||||
%
|
||||
% followed by a description of the class.
|
||||
% Each member should follow:
|
||||
%
|
||||
% \membersection{wxName::Member}
|
||||
%
|
||||
% with a description of what this member does.
|
||||
% Then, one (or more if overloaded) member (function) in detail:
|
||||
%
|
||||
% \func{return type}{name}{args}
|
||||
% or
|
||||
% \member{type}{name}
|
||||
%
|
||||
% where args is a list of \param{type}{name}, ...
|
||||
|
||||
% Function, e.g.
|
||||
% e.g. to typeset
|
||||
%
|
||||
% void DoIt(char *string);
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \func{void}{DoIt}{\param{char *}{string}}
|
||||
%
|
||||
|
||||
\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} {\bf #2}\index{#2}}(#3)}
|
||||
|
||||
% For function/type definition where the name is a pointer,
|
||||
% e.g. to typeset
|
||||
%
|
||||
% typedef void (*wxFunction)(wxObject&)
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
|
||||
|
||||
\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} ({\bf *#2})\index{#2}}(#3)}
|
||||
|
||||
% Use an ordinary \section command for class name definitions.
|
||||
|
||||
% This is used for a member, such as wxBitmap: GetDepth
|
||||
\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
|
||||
|
||||
% CLIPS function
|
||||
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\bf #1} ({\bf #2}\index{#2}}#3)}
|
||||
|
||||
\newcommand{\clipssection}[1]{\chapter{#1}}
|
||||
|
||||
% This is used for a CLIPS function name
|
||||
\newcommand{\functionsection}[1]{\subsection*{#1}}
|
||||
|
||||
% Member: a type and a name
|
||||
\newcommand{\member}[2]{{\bf #1 \it #2}}
|
||||
|
||||
% C++ Parameter: a type and a name (no intervening space)
|
||||
\newcommand{\param}[2]{{\it #1}{\bf #2}}
|
||||
|
||||
% CLIPS Parameter: a type and a name (one intervening space)
|
||||
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
|
||||
|
||||
% Class: puts in index
|
||||
\newcommand{\class}[1]{#1\index{#1}}
|
||||
|
||||
%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}}
|
||||
|
||||
% Void type
|
||||
\newcommand{\void}{{\it void}}
|
||||
|
||||
% Typeset destructor
|
||||
\newcommand{\destruct}[1]{{$\sim$}#1}
|
||||
|
||||
% Typeset insert/extract operators
|
||||
\newcommand{\cinsert}{$<<$}
|
||||
\newcommand{\cextract}{$>>$}
|
||||
|
||||
|
||||
% =================== Hypertext facilities ===================
|
||||
%
|
||||
% To insert hyperlinks (or references, in Latex), \label the sections
|
||||
% or membersections \label{ref-label} immediately after the section, on the same line,
|
||||
% and use \helpref{text-to-show}{ref-label} to make a reference.
|
||||
%
|
||||
|
||||
% Type text with section reference
|
||||
\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
|
||||
|
||||
% Type text with URL in verbatim mode
|
||||
\newcommand{\urlref}[2]{#1 (\verb$#2$)}
|
||||
|
||||
% Don't typeset section number in LaTeX
|
||||
\newcommand{\helprefn}[2]{{\it #1}}
|
||||
|
||||
% Like helpref, but popup text in WinHelp instead of hyperlinked
|
||||
\newcommand{\popref}[2]{{\it #1}}
|
||||
|
||||
% Like footnote, but popup text.
|
||||
\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
|
||||
|
||||
% =================== On-line help specific macros ===================
|
||||
%
|
||||
|
||||
% Global document font size/family, help only.
|
||||
\newcommand{\helpfontsize}[1]{}
|
||||
\newcommand{\helpfontfamily}[1]{}
|
||||
|
||||
% Ignore in all on-line help
|
||||
\newcommand{\helpignore}[1]{#1}
|
||||
% Only print in all on-line help
|
||||
\newcommand{\helponly}[1]{}
|
||||
|
||||
% Ignore in LaTeX
|
||||
\newcommand{\latexignore}[1]{}
|
||||
% Only print in LaTeX
|
||||
\newcommand{\latexonly}[1]{#1}
|
||||
|
||||
% Ignore in linear RTF
|
||||
\newcommand{\rtfignore}[1]{#1}
|
||||
% Only print in linear RTF
|
||||
\newcommand{\rtfonly}[1]{}
|
||||
|
||||
% Ignore in WinHelp RTF
|
||||
\newcommand{\winhelpignore}[1]{#1}
|
||||
% Only print in WinHelp RTF
|
||||
\newcommand{\winhelponly}[1]{}
|
||||
|
||||
% Ignore in wxHelp
|
||||
\newcommand{\xlpignore}[1]{#1}
|
||||
% Only print in wxHelp
|
||||
\newcommand{\xlponly}[1]{}
|
||||
|
||||
% Ignore in HTML
|
||||
\newcommand{\htmlignore}[1]{#1}
|
||||
% Only print in HTML
|
||||
\newcommand{\htmlonly}[1]{}
|
||||
|
||||
% Input a file only for help system (binder thickness is not a limitation
|
||||
% in help systems!)
|
||||
\newcommand{\helpinput}[1]{}
|
||||
|
||||
\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
|
||||
|
||||
% =================== Miscellaneous macros ===================
|
||||
%
|
||||
% Headings consistent with generated ones
|
||||
\newcommand{\myheading}[1]{\vspace*{25pt}
|
||||
\begin{flushleft}
|
||||
{\LARGE \bf #1}
|
||||
\end{flushleft}
|
||||
\vskip 20pt
|
||||
}
|
||||
|
||||
% Heading with entry in contents page.
|
||||
\newcommand{\chapterheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{chapter}{#1}}
|
||||
|
||||
\newcommand{\sectionheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{section}{#1}}
|
||||
|
||||
% Glossary environment
|
||||
\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
|
||||
|
||||
% Glossary entry
|
||||
\newcommand{\gloss}[1]{\item[#1]\index{#1}}
|
||||
|
||||
% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
|
||||
\newcommand{\image}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, left aligned (HTML)
|
||||
\newcommand{\imager}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, right aligned (HTML)
|
||||
\newcommand{\imagel}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Imagemap: principally for HTML only. In Latex,
|
||||
% acts like \image.
|
||||
\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
|
||||
|
||||
% Headers and footers
|
||||
% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setheader}[6]{
|
||||
\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
|
||||
\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
|
||||
\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
|
||||
}
|
||||
|
||||
% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setfooter}[6]{
|
||||
\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
|
||||
\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
|
||||
\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
|
||||
}
|
||||
|
||||
% Needed for telling RTF where margin paragraph should go
|
||||
% in mirrored margins mode.
|
||||
\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
|
||||
% Environment for two-column table popular in WinHelp and manuals.
|
||||
\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
|
||||
\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
|
||||
\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
|
||||
|
||||
\twocolwidtha{3cm}
|
||||
\twocolwidthb{8.5cm}
|
||||
\twocolspacing{2}
|
||||
|
||||
\newcommand{\twocolitem}[2]{#1 & #2\\}
|
||||
\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
|
||||
|
||||
\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
|
||||
{\end{tabular}\renewcommand{\arraystretch}{1}}
|
||||
|
||||
% Specifying table rows for RTF compatibility
|
||||
\newcommand{\row}[1]{#1\\}
|
||||
|
||||
% Use for the last ruled row for correct RTF generation.
|
||||
\newcommand{\ruledrow}[1]{#1\\\hline}
|
||||
|
||||
% Indentation environment. Arg1 is left margin size
|
||||
\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
|
||||
{\end{list}}
|
||||
|
||||
% Framed box of text, normal formatting.
|
||||
\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
|
||||
% Double-framed box of text.
|
||||
\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
|
||||
|
||||
% WITHDRAWN -- can't do in RTF, easily.
|
||||
% Framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
|
||||
% Double-framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
|
||||
|
||||
% toocomplex environment: simply prints the argument in LaTeX,
|
||||
% comes out verbatim in all generated formats.
|
||||
\newenvironment{toocomplex}{}{}
|
||||
|
||||
% Colour: dummy commands since LaTeX doesn't support colour.
|
||||
% \definecolour{name}{red}{blue}{green}
|
||||
% \fcol{name}{text} ; Foreground
|
||||
% \bcol{name}{text} ; Background
|
||||
\newcommand{\definecolour}[4]{}
|
||||
\newcommand{\definecolor}[4]{}
|
||||
\newcommand{\fcol}[2]{#2}
|
||||
\newcommand{\bcol}[2]{#2}
|
||||
\newcommand{\sethotspotcolour}[1]{}
|
||||
\newcommand{\sethotspotunderline}[1]{}
|
||||
\newcommand{\settransparency}[1]{}
|
||||
\newcommand{\backslashraw}[0]{}
|
||||
\newcommand{\lbraceraw}[0]{}
|
||||
\newcommand{\rbraceraw}[0]{}
|
||||
\newcommand{\registered}[0]{(r)}
|
||||
\newcommand{\background}[1]{}
|
||||
\newcommand{\textcolour}[1]{}
|
||||
\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
|
||||
\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
|
||||
#2%
|
||||
\end{list}}
|
||||
\newcommand{\wxheading}[1]{{\bf #1}}
|
||||
\newcommand{\const}[0]{{\bf const}}
|
||||
\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
|
||||
|
||||
\addtolength{\textwidth}{1in}
|
||||
\addtolength{\oddsidemargin}{-0.5in}
|
||||
\addtolength{\topmargin}{-0.5in}
|
||||
\addtolength{\textheight}{1in}
|
||||
\sloppy
|
||||
|
@@ -1,10 +0,0 @@
|
||||
\chapter{Topic overviews}\label{overviews}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
The following sections describe particular topics.
|
||||
|
||||
\section{MMedia extension overview}\label{mmedoverview}
|
||||
|
||||
To be written.
|
||||
|
Before Width: | Height: | Size: 137 B |
@@ -1,173 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidbase.h at 26/Feb/00 14:51:56
|
||||
%
|
||||
|
||||
\section{\class{wxVideoBaseDriver}}\label{wxvideobasedriver}
|
||||
|
||||
Classes definition
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxObject
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef enum {
|
||||
wxVIDEO\_MSAVI,
|
||||
wxVIDEO\_MPEG,
|
||||
wxVIDEO\_QT,
|
||||
wxVIDEO\_GIF,
|
||||
wxVIDEO\_JMOV,
|
||||
wxVIDEO\_FLI,
|
||||
wxVIDEO\_IFF,
|
||||
wxVIDEO\_SGI,
|
||||
wxVIDEO\_MPEG2
|
||||
} wxVideoType
|
||||
\end{verbatim}}
|
||||
|
||||
wxMMedia2 (video) types
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
|
||||
|
||||
\func{}{wxVideoBaseDriver}{\void}
|
||||
|
||||
Ctors
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
|
||||
|
||||
\func{}{wxVideoBaseDriver}{\param{wxInputStream\& }{str}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::wxVideoBaseDriver}\label{wxvideobasedriverwxvideobasedriver}
|
||||
|
||||
\func{}{wxVideoBaseDriver}{\param{const wxString\& }{filename}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::\destruct{wxVideoBaseDriver}}\label{wxvideobasedriverdtor}
|
||||
|
||||
\func{}{\destruct{wxVideoBaseDriver}}{\void}
|
||||
|
||||
Dtor
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Play}\label{wxvideobasedriverplay}
|
||||
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
Usual functions ... They all return FALSE in case of errors.
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Stop}\label{wxvideobasedriverstop}
|
||||
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Pause}\label{wxvideobasedriverpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::Resume}\label{wxvideobasedriverresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::SetSize}\label{wxvideobasedriversetsize}
|
||||
|
||||
\func{bool}{SetSize}{\param{wxSize }{size}}
|
||||
|
||||
Size management
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetSize}\label{wxvideobasedrivergetsize}
|
||||
|
||||
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::IsCapable}\label{wxvideobasedriveriscapable}
|
||||
|
||||
\constfunc{bool}{IsCapable}{\param{wxVideoType }{WXUNUSED(v\_type)}}
|
||||
|
||||
Test the capability of the driver to handle the specified type
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetMovieCodec}\label{wxvideobasedrivergetmoviecodec}
|
||||
|
||||
\constfunc{wxString}{GetMovieCodec}{\void}
|
||||
|
||||
Return the video codec name
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetAudioCodec}\label{wxvideobasedrivergetaudiocodec}
|
||||
|
||||
\constfunc{wxString}{GetAudioCodec}{\void}
|
||||
|
||||
Return the audio codec name
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetSampleRate}\label{wxvideobasedrivergetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
Return misc info about audio
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetChannels}\label{wxvideobasedrivergetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetBPS}\label{wxvideobasedrivergetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetFrameRate}\label{wxvideobasedrivergetframerate}
|
||||
|
||||
\constfunc{double}{GetFrameRate}{\void}
|
||||
|
||||
Return frame rate
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::GetNbFrames}\label{wxvideobasedrivergetnbframes}
|
||||
|
||||
\constfunc{wxUint32}{GetNbFrames}{\void}
|
||||
|
||||
Return number of frames
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::OnFinished}\label{wxvideobasedriveronfinished}
|
||||
|
||||
\func{void}{OnFinished}{\void}
|
||||
|
||||
Called when the movie finished
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::AttachOutput}\label{wxvideobasedriverattachoutput}
|
||||
|
||||
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
|
||||
|
||||
Attaches the video output to a window. The video will be shown in that window.
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::DetachOutput}\label{wxvideobasedriverdetachoutput}
|
||||
|
||||
\func{void}{DetachOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::IsPaused}\label{wxvideobasedriverispaused}
|
||||
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
They return the state of the movie.
|
||||
|
||||
|
||||
\membersection{wxVideoBaseDriver::IsStopped}\label{wxvideobasedriverisstopped}
|
||||
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
@@ -1,148 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidwin.h at 26/Feb/00 14:52:03
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxVideoWindows}}\label{wxvideowindows}
|
||||
|
||||
|
||||
|
||||
Class definition
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxVideoBaseDriver}{wxvideobasedriver}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct VIDW\_Internal {
|
||||
MCIDEVICEID m\_dev\_id
|
||||
};
|
||||
\end{verbatim}}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxVideoWindows::OpenFile}\label{wxvideowindowsopenfile}
|
||||
|
||||
\func{void}{OpenFile}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
|
||||
|
||||
\func{}{wxVideoWindows}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
|
||||
|
||||
\func{}{wxVideoWindows}{\param{wxInputStream\& }{str}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::wxVideoWindows}\label{wxvideowindowswxvideowindows}
|
||||
|
||||
\func{}{wxVideoWindows}{\param{const wxString\& }{fname}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::\destruct{wxVideoWindows}}\label{wxvideowindowsdtor}
|
||||
|
||||
\func{}{\destruct{wxVideoWindows}}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Play}\label{wxvideowindowsplay}
|
||||
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Stop}\label{wxvideowindowsstop}
|
||||
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Pause}\label{wxvideowindowspause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::Resume}\label{wxvideowindowsresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetSize}\label{wxvideowindowsgetsize}
|
||||
|
||||
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::SetSize}\label{wxvideowindowssetsize}
|
||||
|
||||
\func{bool}{SetSize}{\param{wxSize }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetMovieCodec}\label{wxvideowindowsgetmoviecodec}
|
||||
|
||||
\constfunc{wxString}{GetMovieCodec}{\void}
|
||||
|
||||
Return codec name for each stream.
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetAudioCodec}\label{wxvideowindowsgetaudiocodec}
|
||||
|
||||
\constfunc{wxString}{GetAudioCodec}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetSampleRate}\label{wxvideowindowsgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
Return misc. info about audio
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetChannels}\label{wxvideowindowsgetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetBPS}\label{wxvideowindowsgetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetFrameRate}\label{wxvideowindowsgetframerate}
|
||||
|
||||
\constfunc{double}{GetFrameRate}{\void}
|
||||
|
||||
Return the frame rate of the video (in frames/second)
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::GetNbFrames}\label{wxvideowindowsgetnbframes}
|
||||
|
||||
\constfunc{wxUint32}{GetNbFrames}{\void}
|
||||
|
||||
Return the total number of frames in the movie
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::IsCapable}\label{wxvideowindowsiscapable}
|
||||
|
||||
\func{bool}{IsCapable}{\param{wxVideoType }{v\_type}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::AttachOutput}\label{wxvideowindowsattachoutput}
|
||||
|
||||
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::DetachOutput}\label{wxvideowindowsdetachoutput}
|
||||
|
||||
\func{void}{DetachOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::IsPaused}\label{wxvideowindowsispaused}
|
||||
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoWindows::IsStopped}\label{wxvideowindowsisstopped}
|
||||
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
@@ -1,170 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% /home/guilhem/PROJECTS/wxWindows/utils/wxMMedia2/lib/vidxanm.h at 26/Feb/00 14:52:06
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxVideoXANIM}}\label{wxvideoxanim}
|
||||
|
||||
|
||||
|
||||
Class definition
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxVideoBaseDriver}{wxvideobasedriver}
|
||||
|
||||
\wxheading{Data structures}
|
||||
|
||||
{\small \begin{verbatim}
|
||||
typedef struct wxXANIMinternal {
|
||||
Display *xanim\_dpy
|
||||
\end{verbatim}}
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
|
||||
|
||||
\func{}{wxVideoXANIM}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
|
||||
|
||||
\func{}{wxVideoXANIM}{\param{wxInputStream\& }{str}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::wxVideoXANIM}\label{wxvideoxanimwxvideoxanim}
|
||||
|
||||
\func{}{wxVideoXANIM}{\param{const wxString\& }{filename}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::\destruct{wxVideoXANIM}}\label{wxvideoxanimdtor}
|
||||
|
||||
\func{}{\destruct{wxVideoXANIM}}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Play}\label{wxvideoxanimplay}
|
||||
|
||||
\func{bool}{Play}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Pause}\label{wxvideoxanimpause}
|
||||
|
||||
\func{bool}{Pause}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Resume}\label{wxvideoxanimresume}
|
||||
|
||||
\func{bool}{Resume}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::Stop}\label{wxvideoxanimstop}
|
||||
|
||||
\func{bool}{Stop}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::SetVolume}\label{wxvideoxanimsetvolume}
|
||||
|
||||
\func{bool}{SetVolume}{\param{wxUint8 }{vol}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::SetSize}\label{wxvideoxanimsetsize}
|
||||
|
||||
\func{bool}{SetSize}{\param{wxSize }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetSize}\label{wxvideoxanimgetsize}
|
||||
|
||||
\constfunc{bool}{GetSize}{\param{wxSize\& }{size}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetMovieCodec}\label{wxvideoxanimgetmoviecodec}
|
||||
|
||||
\constfunc{wxString}{GetMovieCodec}{\void}
|
||||
|
||||
Return the video codec name
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetAudioCodec}\label{wxvideoxanimgetaudiocodec}
|
||||
|
||||
\constfunc{wxString}{GetAudioCodec}{\void}
|
||||
|
||||
Return the audio codec name
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetSampleRate}\label{wxvideoxanimgetsamplerate}
|
||||
|
||||
\constfunc{wxUint32}{GetSampleRate}{\void}
|
||||
|
||||
Return misc info about audio
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetChannels}\label{wxvideoxanimgetchannels}
|
||||
|
||||
\constfunc{wxUint8}{GetChannels}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetBPS}\label{wxvideoxanimgetbps}
|
||||
|
||||
\constfunc{wxUint8}{GetBPS}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetFrameRate}\label{wxvideoxanimgetframerate}
|
||||
|
||||
\constfunc{double}{GetFrameRate}{\void}
|
||||
|
||||
Return frame rate
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::GetNbFrames}\label{wxvideoxanimgetnbframes}
|
||||
|
||||
\constfunc{wxUint32}{GetNbFrames}{\void}
|
||||
|
||||
Return number of frames in the movie
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::IsCapable}\label{wxvideoxanimiscapable}
|
||||
|
||||
\constfunc{bool}{IsCapable}{\param{wxVideoType }{v\_type}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::AttachOutput}\label{wxvideoxanimattachoutput}
|
||||
|
||||
\func{bool}{AttachOutput}{\param{wxWindow\& }{output}}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::DetachOutput}\label{wxvideoxanimdetachoutput}
|
||||
|
||||
\func{void}{DetachOutput}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::IsPaused}\label{wxvideoxanimispaused}
|
||||
|
||||
\constfunc{bool}{IsPaused}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::IsStopped}\label{wxvideoxanimisstopped}
|
||||
|
||||
\constfunc{bool}{IsStopped}{\void}
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::RestartXANIM}\label{wxvideoxanimrestartxanim}
|
||||
|
||||
\func{bool}{RestartXANIM}{\void}
|
||||
|
||||
Start the subprocess with the right parameters
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::SendCommand}\label{wxvideoxanimsendcommand}
|
||||
|
||||
\func{bool}{SendCommand}{\param{const char* }{command}, \param{char** }{ret = NULL}, \param{wxUint32* }{size = NULL}}
|
||||
|
||||
Send a command to the subprocess
|
||||
|
||||
|
||||
\membersection{wxVideoXANIM::CollectInfo}\label{wxvideoxanimcollectinfo}
|
||||
|
||||
\func{bool}{CollectInfo}{\void}
|
||||
|
||||
Collect informations from XAnim
|
||||
|
Before Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 440 B |
@@ -1,11 +0,0 @@
|
||||
\chapter{Bugs}\label{bugs}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
These are the known bugs.
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item In the OGLEdit sample, .dia files are output double-spaced
|
||||
due to an unidentified bug in the way a stream is converted to a file.
|
||||
\end{itemize}
|
||||
|
Before Width: | Height: | Size: 138 B |
@@ -1,19 +0,0 @@
|
||||
\chapter{Change log}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
Version 3.0, September 8th 1998
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item Version for wxWindows 2.0.
|
||||
\item Various enhancements especially to wxDrawnShape
|
||||
(multiple metafiles, for different orientations).
|
||||
\item More ability to override functions e.g. OnSizeDragLeft, so events can be
|
||||
intercepted for Do/Undo.
|
||||
\end{itemize}
|
||||
|
||||
Version 2.0, June 1st 1996
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item First publicly released version.
|
||||
\end{itemize}
|
Before Width: | Height: | Size: 996 B |
Before Width: | Height: | Size: 959 B |
@@ -1,47 +0,0 @@
|
||||
\chapter{Introduction}
|
||||
\pagenumbering{arabic}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
Object Graphics Library (\ogl) is a C++ library supporting the creation and
|
||||
manipulation of simple and complex graphic images on a canvas.
|
||||
|
||||
It can be found in the directory {\tt utils/ogl/src} in the
|
||||
wxWindows distribution. The file {\tt ogl.h} must be included to make use
|
||||
of the library.
|
||||
|
||||
Please see \helpref{OGL overview}{ogloverview} for a general description how the object library works. For details,
|
||||
please see the \helpref{class reference}{classref}.
|
||||
|
||||
\section{File structure}
|
||||
|
||||
These are the files that comprise the \ogl\ library.
|
||||
|
||||
\begin{description}\itemsep=0pt
|
||||
\item[basic.h] Header for basic objects such as wxShape and wxRectangleShape.
|
||||
\item[basic.cpp] Basic objects implementation (1).
|
||||
\item[basic2.cpp] Basic objects implementation (2).
|
||||
\item[bmpshape.h] wxBitmapShape class header.
|
||||
\item[bmpshape.cpp] wxBitmapShape implementation.
|
||||
\item[canvas.h] wxShapeCanvas class header.
|
||||
\item[canvas.cpp] wxShapeCanvas class implementation.
|
||||
\item[composit.h] Composite object class header.
|
||||
\item[composit.cpp] Composite object class implementation.
|
||||
\item[constrnt.h] Constraint classes header.
|
||||
\item[constrnt.cpp] Constraint classes implementation.
|
||||
\item[divided.h] Divided object class header.
|
||||
\item[divided.cpp] Divided object class implementation.
|
||||
\item[drawn.h] Drawn (metafile) object class header.
|
||||
\item[drawn.cpp] Drawn (metafile) object class implementation.
|
||||
\item[graphics.h] Main include file.
|
||||
\item[lines.h] wxLineShape class header.
|
||||
\item[lines.cpp] wxLineShape class implementation.
|
||||
\item[misc.h] Miscellaneous graphics functions header.
|
||||
\item[misc.cpp] Miscellaneous graphics functions implementation.
|
||||
\item[ogldiag.h] wxDiagram class header.
|
||||
\item[ogldiag.cpp] wxDiagram implementation.
|
||||
\item[mfutils.h] Metafile utilities header.
|
||||
\item[mfutils.cpp] Metafile utilities implementation.
|
||||
\end{description}
|
||||
|
||||
|
@@ -1,17 +0,0 @@
|
||||
[OPTIONS]
|
||||
BMROOT=d:\wx2\wxwind~1\contrib\docs\latex\ogl ; Assume that bitmaps are where the source is
|
||||
TITLE=OGL Manual
|
||||
CONTENTS=Contents
|
||||
COMPRESS=HIGH
|
||||
|
||||
[FILES]
|
||||
ogl.rtf
|
||||
|
||||
[CONFIG]
|
||||
CreateButton("Up", "&Up", "JumpId(`ogl.hlp', `Contents')")
|
||||
BrowseButtons()
|
||||
|
||||
[MAP]
|
||||
|
||||
[BITMAPS]
|
||||
|
@@ -1,46 +0,0 @@
|
||||
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
|
||||
\newcommand{\ogl}[0]{{OGL}}%
|
||||
\definecolour{black}{0}{0}{0}%
|
||||
\definecolour{cyan}{0}{255}{255}%
|
||||
\definecolour{green}{0}{255}{0}%
|
||||
\definecolour{magenta}{255}{0}{255}%
|
||||
\definecolour{red}{255}{0}{0}%
|
||||
\definecolour{blue}{0}{0}{200}%
|
||||
\definecolour{yellow}{255}{255}{0}%
|
||||
\definecolour{white}{255}{255}{255}%
|
||||
\input psbox.tex
|
||||
\parindent 0pt
|
||||
\parskip 11pt
|
||||
\title{Object Graphics Library 3.0}
|
||||
\author{Julian Smart}
|
||||
\date{September 1998}
|
||||
|
||||
\makeindex
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\pagestyle{fancyplain}
|
||||
\bibliographystyle{plain}
|
||||
\pagenumbering{roman}
|
||||
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
\tableofcontents%
|
||||
|
||||
\input{intro.tex}
|
||||
%
|
||||
\input{sample.tex}
|
||||
%
|
||||
\input{classes.tex}
|
||||
%
|
||||
\input{topics.tex}
|
||||
%
|
||||
\input{bugs.tex}
|
||||
%
|
||||
\input{changes.tex}
|
||||
|
||||
%
|
||||
\addcontentsline{toc}{chapter}{Index}
|
||||
\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
\printindex
|
||||
\end{document}
|
Before Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 7.0 KiB |
@@ -1,87 +0,0 @@
|
||||
\chapter{OGLEdit: a sample OGL application}\label{ogledit}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
OGLEdit is a sample OGL application that allows the user to draw, edit,
|
||||
save and load a few shapes. It should clarify aspects of OGL usage, and
|
||||
can act as a template for similar applications. OGLEdit can be found in\rtfsp
|
||||
{\tt samples/ogledit} in the OGL distribution.
|
||||
|
||||
$$\image{10cm;0cm}{ogledit.eps}$$\par
|
||||
|
||||
The wxWindows document/view model has been used in OGL, to reduce the amount of
|
||||
housekeeping logic required to get it up and running. OGLEdit also provides
|
||||
a demonstration of the Undo/Redo capability supported by the document/view classes,
|
||||
and how a typical application might implement this feature.
|
||||
|
||||
\section{OGLEdit files}
|
||||
|
||||
OGLEdit comprises the following source files.
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item doc.h, doc.cpp: MyDiagram, DiagramDocument, DiagramCommand, MyEvtHandler
|
||||
classes related to diagram functionality and documents.
|
||||
\item view.h, view.cpp: MyCanvas, DiagramView classes related to visualisation of
|
||||
the diagram.
|
||||
\item ogledit.h, ogledit.cpp: MyFrame, MyApp classes related to the overall application.
|
||||
\item palette.h, palette.cpp: EditorToolPalette implementing the shape palette.
|
||||
\end{itemize}
|
||||
|
||||
\section{How OGLEdit works}
|
||||
|
||||
OGLEdit defines a DiagramDocument class, each of instance of which holds a MyDiagram
|
||||
member which itself contains the shapes.
|
||||
|
||||
In order to implement specific mouse behaviour for shapes, a class MyEvtHandler is
|
||||
defined which is `plugged into' each shape when it is created, instead of overriding each shape class
|
||||
individually. This event handler class also holds a label string.
|
||||
|
||||
The DiagramCommand class is the key to implementing Undo/Redo. Each instance of DiagramCommand
|
||||
stores enough information about an operation (create, delete, change colour etc.) to allow
|
||||
it to carry out (or undo) its command. In DiagramView::OnMenuCommand, when the user initiates the
|
||||
command, a new DiagramCommand instance is created which is then sent to the document's
|
||||
command processor (see wxWindows manual for more information about doc/view and command
|
||||
processing).
|
||||
|
||||
Apart from menu commands, another way commands are initiated is by the user left-clicking on
|
||||
the canvas or right-dragging on a node. MyCanvas::OnLeftClick in view.cpp shows how
|
||||
the appropriate wxClassInfo is passed to a DiagramCommand, to allow DiagramCommand::Do
|
||||
to create a new shape given the wxClassInfo.
|
||||
|
||||
The MyEvtHandler right-drag methods in doc.cpp implement drawing a line between
|
||||
two shapes, detecting where the right mouse button was released and looking for a second
|
||||
shape. Again, a new DiagramCommand instance is created and passed to the command
|
||||
processor to carry out the command.
|
||||
|
||||
DiagramCommand::Do and DiagramCommand::Undo embody much of the
|
||||
interesting interaction with the OGL library. A complication of note
|
||||
when implementing undo is the problem of deleting a node shape which has
|
||||
one or more arcs attached to it. If you delete the node, the arc(s)
|
||||
should be deleted too. But multiple arc deletion represents more information
|
||||
that can be incorporated in the existing DiagramCommand scheme. OGLEdit
|
||||
copes with this by treating each arc deletion as a separate command, and
|
||||
sending Cut commands recursively, providing an undo path. Undoing such a
|
||||
Cut will only undo one command at a time - not a one to one
|
||||
correspondence with the original command - but it's a reasonable
|
||||
compromise and preserves Do/Undo whilst keeping our DiagramCommand class
|
||||
simple.
|
||||
|
||||
\section{Possible enhancements}
|
||||
|
||||
OGLEdit is very simplistic and does not employ the more advanced features
|
||||
of OGL, such as:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item attachment points (arcs are drawn to particular points on a shape)
|
||||
\item metafile and bitmaps shapes
|
||||
\item divided rectangles
|
||||
\item composite shapes, and constraints
|
||||
\item creating labels in shape regions
|
||||
\item arc labels (OGL has support for three movable labels per arc)
|
||||
\item spline and multiple-segment line arcs
|
||||
\item adding annotations to node and arc shapes
|
||||
\item line-straightening (supported by OGL) and alignment (not supported directly by OGL)
|
||||
\end{itemize}
|
||||
|
||||
These could be added to OGLEdit, at the risk of making it a less
|
||||
useful example for beginners.
|
@@ -1,35 +0,0 @@
|
||||
; Last change: JAC 13 Oct 100 5:11 pm
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
chapterFontSize = 12
|
||||
sectionFontSize = 12
|
||||
subsectionFontSize = 12
|
||||
headerRule = yes
|
||||
footerRule = yes
|
||||
useHeadingStyles = yes
|
||||
listItemIndent=40
|
||||
generateHPJ = no
|
||||
htmlBrowseButtons = bitmap
|
||||
winHelpVersion = 3
|
||||
winHelpContents = yes
|
||||
winHelpTitle = "OGL Manual"
|
||||
truncateFilenames = yes
|
||||
combineSubSections = yes
|
||||
\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
|
||||
\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
|
||||
\sethotspotcolour{on}\sethotspotunderline{on}}
|
||||
\docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}}
|
||||
\wxheading [1]{{\bf \htmlignore{\fcol{blue}{#1}}\htmlonly{\fcol{red}{#1}}}}
|
||||
\const [0] {{\bf const}}
|
||||
\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
\windowstyle [1] {{\bf #1}\index{#1}}
|
||||
|
||||
;;
|
||||
;; These two are for generating MS HTML Help project, contents and index files.
|
||||
;;
|
||||
htmlWorkshopFiles = true
|
||||
htmlIndex = true
|
||||
\pythonnote [1] {{\bf \fcol{blue}{wxPython note:}} #1}
|
||||
%\pythonnote [1] {}
|
||||
|
@@ -1,298 +0,0 @@
|
||||
% LaTeX style file
|
||||
% Name: texhelp.sty
|
||||
% Author: Julian Smart
|
||||
%
|
||||
% Purpose
|
||||
% -------
|
||||
% Style file to enable the simultaneous preparation of printed LaTeX and on-line
|
||||
% hypertext manuals.
|
||||
% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
|
||||
%
|
||||
% Note that if a non-ASCII character starts a newline and there should be a space
|
||||
% between the last word on the previous line and the first word on this line,
|
||||
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
|
||||
% in all other formats.
|
||||
%
|
||||
% Julian Smart
|
||||
% Artificial Intelligence Applications Institute
|
||||
%
|
||||
%
|
||||
% ============== C++/CLIPS Documentation Facilities ==============
|
||||
%
|
||||
% Each class definition should be typeset with e.g.
|
||||
%
|
||||
% \section{\class{Name}: Parent}
|
||||
%
|
||||
% followed by a description of the class.
|
||||
% Each member should follow:
|
||||
%
|
||||
% \membersection{wxName::Member}
|
||||
%
|
||||
% with a description of what this member does.
|
||||
% Then, one (or more if overloaded) member (function) in detail:
|
||||
%
|
||||
% \func{return type}{name}{args}
|
||||
% or
|
||||
% \member{type}{name}
|
||||
%
|
||||
% where args is a list of \param{type}{name}, ...
|
||||
|
||||
% Function, e.g.
|
||||
% e.g. to typeset
|
||||
%
|
||||
% void DoIt(char *string);
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \func{void}{DoIt}{\param{char *}{string}}
|
||||
%
|
||||
|
||||
\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} {\bf #2}\index{#2}}(#3)}
|
||||
|
||||
% For function/type definition where the name is a pointer,
|
||||
% e.g. to typeset
|
||||
%
|
||||
% typedef void (*wxFunction)(wxObject&)
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
|
||||
|
||||
\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} ({\bf *#2})\index{#2}}(#3)}
|
||||
|
||||
% Use an ordinary \section command for class name definitions.
|
||||
|
||||
% This is used for a member, such as wxBitmap: GetDepth
|
||||
\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
|
||||
|
||||
% CLIPS function
|
||||
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\bf #1} ({\bf #2}\index{#2}}#3)}
|
||||
|
||||
\newcommand{\clipssection}[1]{\chapter{#1}}
|
||||
|
||||
% This is used for a CLIPS function name
|
||||
\newcommand{\functionsection}[1]{\subsection*{#1}}
|
||||
|
||||
% Member: a type and a name
|
||||
\newcommand{\member}[2]{{\bf #1 \it #2}}
|
||||
|
||||
% C++ Parameter: a type and a name (no intervening space)
|
||||
\newcommand{\param}[2]{{\it #1}{\bf #2}}
|
||||
|
||||
% CLIPS Parameter: a type and a name (one intervening space)
|
||||
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
|
||||
|
||||
% Class: puts in index
|
||||
\newcommand{\class}[1]{#1\index{#1}}
|
||||
|
||||
%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}}
|
||||
|
||||
% Void type
|
||||
\newcommand{\void}{{\it void}}
|
||||
|
||||
% Typeset destructor
|
||||
\newcommand{\destruct}[1]{{$\sim$}#1}
|
||||
|
||||
% Typeset insert/extract operators
|
||||
\newcommand{\cinsert}{$<<$}
|
||||
\newcommand{\cextract}{$>>$}
|
||||
|
||||
|
||||
% =================== Hypertext facilities ===================
|
||||
%
|
||||
% To insert hyperlinks (or references, in Latex), \label the sections
|
||||
% or membersections \label{ref-label} immediately after the section, on the same line,
|
||||
% and use \helpref{text-to-show}{ref-label} to make a reference.
|
||||
%
|
||||
|
||||
% Type text with section reference
|
||||
\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
|
||||
|
||||
% Type text with URL in verbatim mode
|
||||
\newcommand{\urlref}[2]{#1 (\verb$#2$)}
|
||||
|
||||
% Don't typeset section number in LaTeX
|
||||
\newcommand{\helprefn}[2]{{\it #1}}
|
||||
|
||||
% Like helpref, but popup text in WinHelp instead of hyperlinked
|
||||
\newcommand{\popref}[2]{{\it #1}}
|
||||
|
||||
% Like footnote, but popup text.
|
||||
\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
|
||||
|
||||
% =================== On-line help specific macros ===================
|
||||
%
|
||||
|
||||
% Global document font size/family, help only.
|
||||
\newcommand{\helpfontsize}[1]{}
|
||||
\newcommand{\helpfontfamily}[1]{}
|
||||
|
||||
% Ignore in all on-line help
|
||||
\newcommand{\helpignore}[1]{#1}
|
||||
% Only print in all on-line help
|
||||
\newcommand{\helponly}[1]{}
|
||||
|
||||
% Ignore in LaTeX
|
||||
\newcommand{\latexignore}[1]{}
|
||||
% Only print in LaTeX
|
||||
\newcommand{\latexonly}[1]{#1}
|
||||
|
||||
% Ignore in linear RTF
|
||||
\newcommand{\rtfignore}[1]{#1}
|
||||
% Only print in linear RTF
|
||||
\newcommand{\rtfonly}[1]{}
|
||||
|
||||
% Ignore in WinHelp RTF
|
||||
\newcommand{\winhelpignore}[1]{#1}
|
||||
% Only print in WinHelp RTF
|
||||
\newcommand{\winhelponly}[1]{}
|
||||
|
||||
% Ignore in wxHelp
|
||||
\newcommand{\xlpignore}[1]{#1}
|
||||
% Only print in wxHelp
|
||||
\newcommand{\xlponly}[1]{}
|
||||
|
||||
% Ignore in HTML
|
||||
\newcommand{\htmlignore}[1]{#1}
|
||||
% Only print in HTML
|
||||
\newcommand{\htmlonly}[1]{}
|
||||
|
||||
% Input a file only for help system (binder thickness is not a limitation
|
||||
% in help systems!)
|
||||
\newcommand{\helpinput}[1]{}
|
||||
|
||||
\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
|
||||
|
||||
% =================== Miscellaneous macros ===================
|
||||
%
|
||||
% Headings consistent with generated ones
|
||||
\newcommand{\myheading}[1]{\vspace*{25pt}
|
||||
\begin{flushleft}
|
||||
{\LARGE \bf #1}
|
||||
\end{flushleft}
|
||||
\vskip 20pt
|
||||
}
|
||||
|
||||
% Heading with entry in contents page.
|
||||
\newcommand{\chapterheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{chapter}{#1}}
|
||||
|
||||
\newcommand{\sectionheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{section}{#1}}
|
||||
|
||||
% Glossary environment
|
||||
\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
|
||||
|
||||
% Glossary entry
|
||||
\newcommand{\gloss}[1]{\item[#1]\index{#1}}
|
||||
|
||||
% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
|
||||
\newcommand{\image}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, left aligned (HTML)
|
||||
\newcommand{\imager}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, right aligned (HTML)
|
||||
\newcommand{\imagel}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Imagemap: principally for HTML only. In Latex,
|
||||
% acts like \image.
|
||||
\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
|
||||
|
||||
% Headers and footers
|
||||
% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setheader}[6]{
|
||||
\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
|
||||
\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
|
||||
\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
|
||||
}
|
||||
|
||||
% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setfooter}[6]{
|
||||
\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
|
||||
\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
|
||||
\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
|
||||
}
|
||||
|
||||
% Needed for telling RTF where margin paragraph should go
|
||||
% in mirrored margins mode.
|
||||
\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
|
||||
% Environment for two-column table popular in WinHelp and manuals.
|
||||
\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
|
||||
\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
|
||||
\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
|
||||
|
||||
\twocolwidtha{3cm}
|
||||
\twocolwidthb{8.5cm}
|
||||
\twocolspacing{2}
|
||||
|
||||
\newcommand{\twocolitem}[2]{#1 & #2\\}
|
||||
\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
|
||||
|
||||
\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
|
||||
{\end{tabular}\renewcommand{\arraystretch}{1}}
|
||||
|
||||
% Specifying table rows for RTF compatibility
|
||||
\newcommand{\row}[1]{#1\\}
|
||||
|
||||
% Use for the last ruled row for correct RTF generation.
|
||||
\newcommand{\ruledrow}[1]{#1\\\hline}
|
||||
|
||||
% Indentation environment. Arg1 is left margin size
|
||||
\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
|
||||
{\end{list}}
|
||||
|
||||
% Framed box of text, normal formatting.
|
||||
\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
|
||||
% Double-framed box of text.
|
||||
\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
|
||||
|
||||
% WITHDRAWN -- can't do in RTF, easily.
|
||||
% Framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
|
||||
% Double-framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
|
||||
|
||||
% toocomplex environment: simply prints the argument in LaTeX,
|
||||
% comes out verbatim in all generated formats.
|
||||
\newenvironment{toocomplex}{}{}
|
||||
|
||||
% Colour: dummy commands since LaTeX doesn't support colour.
|
||||
% \definecolour{name}{red}{blue}{green}
|
||||
% \fcol{name}{text} ; Foreground
|
||||
% \bcol{name}{text} ; Background
|
||||
\newcommand{\definecolour}[4]{}
|
||||
\newcommand{\definecolor}[4]{}
|
||||
\newcommand{\fcol}[2]{#2}
|
||||
\newcommand{\bcol}[2]{#2}
|
||||
\newcommand{\sethotspotcolour}[1]{}
|
||||
\newcommand{\sethotspotunderline}[1]{}
|
||||
\newcommand{\settransparency}[1]{}
|
||||
\newcommand{\backslashraw}[0]{}
|
||||
\newcommand{\lbraceraw}[0]{}
|
||||
\newcommand{\rbraceraw}[0]{}
|
||||
\newcommand{\registered}[0]{(r)}
|
||||
\newcommand{\background}[1]{}
|
||||
\newcommand{\textcolour}[1]{}
|
||||
\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
|
||||
\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
|
||||
#2%
|
||||
\end{list}}
|
||||
\newcommand{\wxheading}[1]{{\bf #1}}
|
||||
\newcommand{\const}[0]{{\bf const}}
|
||||
\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
|
||||
|
||||
\addtolength{\textwidth}{1in}
|
||||
\addtolength{\oddsidemargin}{-0.5in}
|
||||
\addtolength{\topmargin}{-0.5in}
|
||||
\addtolength{\textheight}{1in}
|
||||
\sloppy
|
||||
|
@@ -1,161 +0,0 @@
|
||||
\chapter{Topic overviews}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}
|
||||
|
||||
The following sections describe particular topics.
|
||||
|
||||
\section{OGL overview}\label{ogloverview}
|
||||
|
||||
\helpref{wxShapeCanvas}{wxshapecanvas}, derived from {\bf wxCanvas}, is the drawing area
|
||||
for a number of \helpref{wxShape}{wxshape} instances. Everything drawn on a
|
||||
wxShapeCanvas is derived from wxShape, which provides virtual
|
||||
member functions for redrawing, creating and destroying
|
||||
resize/selection `handles', movement and erasing behaviour, mouse
|
||||
click behaviour, calculating the bounding box of the shape, linking
|
||||
nodes with arcs, and so on.
|
||||
|
||||
The way a client application copes with `damage' to the canvas is to
|
||||
erase (white out) anything should no longer be displayed, redraw the shape,
|
||||
and then redraw everything on the canvas to repair any damage. If quick edit
|
||||
mode is on for the canvas, the complete should be omitted by OGL and the
|
||||
application.
|
||||
|
||||
Selection handles (called control points in the code) are implemented as
|
||||
wxRectangleShapes.
|
||||
|
||||
Events are passed to shapes by the canvas in a high-level form, for example {\bf OnLeftClick},
|
||||
{\bf OnBeginDragLeft}, {\bf OnDragLeft}, {\bf OnEndDragLeft}. The canvas decides
|
||||
what is a click and what is a drag, whether it is on a shape or the canvas itself,
|
||||
and (by interrogating the shape) which attachment point the click is associated with.
|
||||
|
||||
In order to provide event-handling flexibility, each shapes has an `event handler' associated with it,
|
||||
which by default is the shape itself (all shapes derive from wxShapeEvtHandler).
|
||||
An application can modify the event-handling behaviour simply by plugging a new
|
||||
event handler into the shape. This can avoid the need for multiple inheritance when
|
||||
new properties and behaviour are required for a number of different shape classes: instead
|
||||
of overriding each class, one new event handler class can be defined and used for all
|
||||
existing shape classes.
|
||||
|
||||
A range of shapes have been predefined in the library, including rectangles, ellipses,
|
||||
polygons. A client application can derive from these shapes and/or derive entirely
|
||||
new shapes from wxShape.
|
||||
|
||||
Instances of a class called \helpref{wxDiagram}{wxdiagram} organise collections of
|
||||
shapes, providing default file input and output behaviour.
|
||||
|
||||
\section{wxDividedShape overview}\label{dividedshapeoverview}
|
||||
|
||||
Classes: \helpref{wxDividedShape}{wxdividedshape}
|
||||
|
||||
A wxDividedShape is a rectangle with a number of vertical divisions. Each
|
||||
division may have its text formatted with independent characteristics, and
|
||||
the size of each division relative to the whole image may be specified.
|
||||
|
||||
Once a wxDividedShape has been created, the user may move the divisions with the
|
||||
mouse. By pressing Ctrl while right-clicking, the region attributes can be edited.
|
||||
|
||||
Here are examples of creating wxDividedShape objects:
|
||||
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
/*
|
||||
* Divided rectangle with 3 regions
|
||||
*
|
||||
*/
|
||||
|
||||
wxDividedShape *dividedRect = new wxDividedShape(50, 60);
|
||||
|
||||
wxShapeRegion *region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.5);
|
||||
dividedRect->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect->AddRegion(region);
|
||||
|
||||
dividedRect->SetSize(50, 60); // Allow it to calculate region sizes
|
||||
dividedRect->SetPen(wxBLACK_PEN);
|
||||
dividedRect->SetBrush(wxWHITE_BRUSH);
|
||||
dividedRect->Show(TRUE);
|
||||
dividedRect->NameRegions();
|
||||
|
||||
/*
|
||||
* Divided rectangle with 3 regions, rounded
|
||||
*
|
||||
*/
|
||||
|
||||
wxDividedShape *dividedRect3 = new wxDividedShape(50, 60);
|
||||
dividedRect3->SetCornerRadius(-0.4);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect3->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.5);
|
||||
dividedRect3->AddRegion(region);
|
||||
|
||||
region = new wxShapeRegion;
|
||||
region->SetProportions(0.0, 0.25);
|
||||
dividedRect3->AddRegion(region);
|
||||
|
||||
dividedRect3->SetSize(50, 60); // Allow it to calculate region sizes
|
||||
dividedRect3->SetPen(wxBLACK_PEN);
|
||||
dividedRect3->SetBrush(wxWHITE_BRUSH);
|
||||
dividedRect3->Show(TRUE);
|
||||
dividedRect3->NameRegions();
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
\section{wxCompositeShape overview}\label{compositeshapeoverview}
|
||||
|
||||
Classes: \helpref{wxCompositeShape}{wxcompositeshape}, \helpref{wxOGLConstraint}{wxoglconstraint}
|
||||
|
||||
The wxCompositeShape allows fairly complex shapes to be created, and maintains
|
||||
a set of constraints which specify the layout and proportions of child shapes.
|
||||
|
||||
Add child shapes to a wxCompositeShape using \helpref{AddChild}{wxcompositeshapeaddchild}, and
|
||||
add constraints using \helpref{AddConstraint}{wxcompositeshapeaddconstraint}.
|
||||
|
||||
After children and shapes have been added, call \helpref{Recompute}{wxcompositeshaperecompute} which
|
||||
will return TRUE is the constraints could be satisfied, FALSE otherwise. If
|
||||
constraints have been correctly and consistently specified, this call will succeed.
|
||||
|
||||
If there is more than one child, constraints must be specified: OGL cannot calculate
|
||||
the size and position of children otherwise. Don't assume that children will simply
|
||||
move relative to the parent without the use of constraints.
|
||||
|
||||
To specify a constraint, you need three things:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item a constraint type, such as gyCONSTRAINT\_CENTRED\_VERTICALLY;
|
||||
\item a reference shape, with respect to which other shapes are going to be positioned - the\rtfsp
|
||||
{\it constraining} shape;
|
||||
\item a list of one or more shapes to be constrained: the {\it constrained} shapes.
|
||||
\end{enumerate}
|
||||
|
||||
The constraining shape can be either the parent of the constrained shapes, or a sibling. The
|
||||
constrained shapes must all be siblings of each other.
|
||||
|
||||
For an exhaustive list and description of the available constraint types, see the \helpref{wxOGLConstraint constructor}{wxoglconstraintconstr}.
|
||||
Note that most constraints operate in one dimension only (vertically or horizontally), so you will
|
||||
usually need to specify constraints in pairs.
|
||||
|
||||
You can set the spacing between constraining and constrained shapes by
|
||||
calling \helpref{wxOGLConstraint::SetSpacing}{wxoglconstraintsetspacing}.
|
||||
|
||||
Finally, a wxCompositeShape can have {\it divisions}, which are special child shapes of class
|
||||
wxDivisionShape (not to be confused with wxDividedShape). The purpose of this is to allow
|
||||
the composite to be divided into user-adjustable regions (divisions) into which other shapes
|
||||
can be dropped dynamically, given suitable application code. Divisons allow the child
|
||||
shapes to have an identity of their own - they can be manipulated independently of their container -
|
||||
but to behave as if they are contained with the division, moving with the parent shape.
|
||||
Divisions boundaries can themselves be moved using the mouse.
|
||||
|
||||
To create an initial division, call \helpref{wxCompositeShape::MakeContainer}{wxcompositeshapemakecontainer}.
|
||||
Make further divisions by calling \helpref{wxDivisionShape::Divide}{wxdivisionshapedivide}.
|
||||
|
Before Width: | Height: | Size: 998 B |
@@ -1,83 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ======================================================================
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* | |
|
||||
* |This copyrighted computer code is a proprietary trade secret of |
|
||||
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||
* |written authorization from SciTech to possess or use this code, you |
|
||||
* |may be subject to civil and/or criminal penalties. |
|
||||
* | |
|
||||
* |If you received this code in error or you would like to report |
|
||||
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||
* |530-894-8400. |
|
||||
* | |
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* ======================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the wxApplet class
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_APPLET_H
|
||||
#define __WX_APPLET_H
|
||||
|
||||
#include "wx/panel.h"
|
||||
#include "wx/applet/window.h"
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the abstract base class for wxApplet objects.
|
||||
****************************************************************************/
|
||||
class wxApplet : public wxPanel {
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxApplet);
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
protected:
|
||||
wxHtmlAppletWindow *m_Parent;
|
||||
|
||||
// Special handler for background erase messages
|
||||
void OnEraseBackground(wxEraseEvent&);
|
||||
|
||||
public:
|
||||
// Constructor (called during dynamic creation)
|
||||
wxApplet() { m_Parent = NULL; }
|
||||
|
||||
// Psuedo virtual constructor
|
||||
virtual bool Create(
|
||||
wxHtmlAppletWindow *parent,
|
||||
const wxSize& size,
|
||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER);
|
||||
|
||||
// Virtual destructor
|
||||
virtual ~wxApplet();
|
||||
|
||||
// Handle HTML navigation to a new URL
|
||||
virtual void OnLinkClicked(const wxHtmlLinkInfo& link) = 0;
|
||||
|
||||
// Handle HTML navigation forward command in applet
|
||||
virtual void OnHistoryForward() = 0;
|
||||
|
||||
// Handle HTML navigation back command in applet
|
||||
virtual void OnHistoryBack() = 0;
|
||||
|
||||
// Handle messages from the wxAppletManager and other applets
|
||||
virtual void OnMessage(wxEvent& msg) = 0;
|
||||
};
|
||||
|
||||
#endif // __WX_APPLET_H
|
||||
|
@@ -1,114 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ======================================================================
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* | |
|
||||
* |This copyrighted computer code is a proprietary trade secret of |
|
||||
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||
* |written authorization from SciTech to possess or use this code, you |
|
||||
* |may be subject to civil and/or criminal penalties. |
|
||||
* | |
|
||||
* |If you received this code in error or you would like to report |
|
||||
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||
* |530-894-8400. |
|
||||
* | |
|
||||
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||
* ======================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the wxHtmlAppletWindow class
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_APPLET_WINDOW_H
|
||||
#define __WX_APPLET_WINDOW_H
|
||||
|
||||
#include "wx/html/htmlwin.h"
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
// Declare a linked list of wxApplet pointers
|
||||
class wxApplet;
|
||||
WX_DECLARE_LIST(wxApplet, wxAppletList);
|
||||
|
||||
/****************************************************************************
|
||||
MEMBERS:
|
||||
appletModules - List of register applet modules
|
||||
appletList - List of all active applets instances
|
||||
cookies - Hash table for managing cookies
|
||||
|
||||
REMARKS:
|
||||
Defines the class for wxAppletWindow. This class is derived from the
|
||||
wxHtmlWindow class and extends it with functionality to handle embedded
|
||||
wxApplet's on the HTML pages.
|
||||
****************************************************************************/
|
||||
class wxHtmlAppletWindow : public wxHtmlWindow {
|
||||
private:
|
||||
DECLARE_CLASS(wxHtmlAppletWindow);
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
protected:
|
||||
wxAppletList m_AppletList;
|
||||
wxHashTable m_Cookies;
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
wxHtmlAppletWindow(
|
||||
wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHW_SCROLLBAR_AUTO,
|
||||
const wxString& name = "htmlAppletWindow");
|
||||
|
||||
// Destructor
|
||||
~wxHtmlAppletWindow();
|
||||
|
||||
// Create an instance of an applet based on it's class name
|
||||
wxApplet *CreateApplet(
|
||||
const wxString& className,
|
||||
const wxSize& size);
|
||||
|
||||
// Find an instance of an applet based on it's class name
|
||||
wxApplet *FindApplet(const wxString& className);
|
||||
|
||||
// Remove an applet from the window. Called during applet destruction
|
||||
bool RemoveApplet(const wxApplet *applet);
|
||||
|
||||
// Load a new URL page
|
||||
bool LoadPage(const wxString& hRef);
|
||||
|
||||
// Called when users clicked on hypertext link.
|
||||
void OnLinkClicked(const wxHtmlLinkInfo& link);
|
||||
|
||||
// Handles forward navigation within the HTML stack
|
||||
bool HistoryForward();
|
||||
|
||||
// Handles backwards navigation within the HTML stack
|
||||
bool HistoryBack();
|
||||
|
||||
// Broadcast a message to all applets on the page
|
||||
void SendMessage(wxEvent& msg);
|
||||
|
||||
// Register a cookie of data in the applet manager
|
||||
bool RegisterCookie(const wxString& name,wxObject *cookie);
|
||||
|
||||
// UnRegister a cookie of data in the applet manager
|
||||
bool UnRegisterCookie(const wxString& name);
|
||||
|
||||
// Find a cookie of data given it's public name
|
||||
wxObject *FindCookie(const wxString& name);
|
||||
};
|
||||
|
||||
#endif // __WX_APPLET_WINDOW_H
|
||||
|
@@ -1,76 +0,0 @@
|
||||
#ifndef __WXBOUNDINGBOX_H__
|
||||
#define __WXBOUNDINGBOX_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "bbox.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/matrix.h"
|
||||
#include "wx/geometry.h"
|
||||
|
||||
enum OVERLAP {_IN,_ON,_OUT};
|
||||
|
||||
//Purpose The wxBoundingBox class stores one wxBoundingBox.
|
||||
//The wxBoundingBox is defined by two coordiates,
|
||||
//a upperleft coordinate and a lowerright coordinate.
|
||||
class wxBoundingBox
|
||||
{
|
||||
public:
|
||||
wxBoundingBox();
|
||||
wxBoundingBox(wxBoundingBox&);
|
||||
wxBoundingBox(const wxPoint2DDouble&);
|
||||
wxBoundingBox(double xmin, double ymin, double xmax, double ymax);
|
||||
|
||||
bool And(wxBoundingBox*, double Marge = 0);
|
||||
|
||||
void EnLarge(const double Marge);
|
||||
void Shrink(const double Marge);
|
||||
|
||||
void Expand(const wxPoint2DDouble& , const wxPoint2DDouble&);
|
||||
void Expand(const wxPoint2DDouble&);
|
||||
void Expand(double x,double y);
|
||||
void Expand(const wxBoundingBox& bbox);
|
||||
|
||||
OVERLAP Intersect( wxBoundingBox &, double Marge = 0);
|
||||
bool LineIntersect(const wxPoint2DDouble& begin, const wxPoint2DDouble& end );
|
||||
bool PointInBox( const wxPoint2DDouble&, double Marge = 0);
|
||||
bool PointInBox( double, double, double Marge = 0);
|
||||
|
||||
void Reset();
|
||||
|
||||
void Translate( wxPoint2DDouble& );
|
||||
void MapBbox( const wxTransformMatrix& matrix);
|
||||
|
||||
double GetWidth() {return m_maxx-m_minx;};
|
||||
double GetHeight(){return m_maxy-m_miny;};
|
||||
bool GetValid() const;
|
||||
void SetValid(bool);
|
||||
|
||||
void SetBoundingBox(const wxPoint2DDouble& a_point);
|
||||
|
||||
void SetMin(double, double);
|
||||
void SetMax(double, double);
|
||||
inline wxPoint2DDouble GetMin();
|
||||
inline wxPoint2DDouble GetMax();
|
||||
inline double GetMinX(){return m_minx;};
|
||||
inline double GetMinY(){return m_miny;};
|
||||
inline double GetMaxX(){return m_maxx;};
|
||||
inline double GetMaxY(){return m_maxy;};
|
||||
|
||||
wxBoundingBox& operator+( wxBoundingBox& );
|
||||
wxBoundingBox& operator=( const wxBoundingBox& );
|
||||
|
||||
protected:
|
||||
//bounding box in world
|
||||
double m_minx;
|
||||
double m_miny;
|
||||
double m_maxx;
|
||||
double m_maxy;
|
||||
bool m_validbbox;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,859 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: canvas.h
|
||||
// Author: Robert Roebling
|
||||
// Created: XX/XX/XX
|
||||
// Copyright: 2000 (c) Robert Roebling
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WXCANVAS_H__
|
||||
#define __WXCANVAS_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "canvas.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/image.h"
|
||||
#include "wx/txtstrm.h"
|
||||
#include "wx/geometry.h"
|
||||
#include "wx/matrix.h"
|
||||
#include "bbox.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// decls
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvas;
|
||||
class wxCanvasAdmin;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasObject
|
||||
//----------------------------------------------------------------------------
|
||||
enum wxDRAG_MODE
|
||||
{
|
||||
wxDRAG_RECTANGLE,
|
||||
wxDRAG_ONTOP,
|
||||
wxDRAG_REDRAW
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasObject is the base class for Canvas Objects.
|
||||
// All Objects for drawing one the canvas are derived from this class.
|
||||
// It supports dragging and moving methods that can be used in derived
|
||||
// classes for defining several ways of dragging.
|
||||
// Also it is possible to plug in events handlers to do this for all derived classes at once.
|
||||
//
|
||||
// wxCanvasObjects have themselves as their event handlers by default,
|
||||
// but their event handlers could be set to another object entirely. This
|
||||
// separation can reduce the amount of derivation required, and allow
|
||||
// alteration of a wxCanvasObject functionality
|
||||
class wxCanvasObject: public wxEvtHandler
|
||||
{
|
||||
public:
|
||||
|
||||
wxCanvasObject();
|
||||
|
||||
//If the position (x,y) is within the object this return a pointer to the object
|
||||
//Normally this function needs to be defined for each derived wxCanvasObject.
|
||||
//The default is a simple bounding box test.
|
||||
virtual wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
//render this object to the canvas (either on its buffer or directly on the canvas)
|
||||
//this depends on the wxDC that is set for the active canvas.
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
|
||||
//x position in world coordinates of the object
|
||||
virtual double GetPosX()=0;
|
||||
//y position in world coordinates of the object
|
||||
virtual double GetPosY()=0;
|
||||
|
||||
//set position in world coordinates for the object
|
||||
virtual void SetPosXY( double x, double y)=0;
|
||||
|
||||
//absolute moving the object to position x,y in world coordinates
|
||||
//also does an update of the old and new area
|
||||
virtual void MoveAbsolute( double x, double y );
|
||||
|
||||
//relative moving the object to position x,y in world coordinates
|
||||
//also does an update of the old and new area
|
||||
virtual void MoveRelative( double x, double y );
|
||||
|
||||
//relative translate the object to position x,y in world coordinates
|
||||
//does NOT update the old and new area
|
||||
//this function must be defined for each derived object,
|
||||
//it is used internally for dragging and moving objects.
|
||||
virtual void TransLate( double x, double y )=0;
|
||||
|
||||
//choose one of the three diffrenet drag methods |
|
||||
//DRAG_RECTANGLE = as a rectangle when drag is in progress |
|
||||
//DRAG_ONTOP = only redraw the object when dragging |
|
||||
//DRAG_REDRAW = redraw the damaged areas when dragging
|
||||
void SetDragMode(wxDRAG_MODE mode) { m_dragmode=mode; };
|
||||
|
||||
//return the dragmode
|
||||
wxDRAG_MODE GetDragMode() { return m_dragmode; };
|
||||
|
||||
//called when starting a drag
|
||||
virtual void DragStart();
|
||||
//called when dragging is in progress
|
||||
virtual void DragRelative( double x, double y);
|
||||
//called when dragging is ended
|
||||
virtual void DragEnd();
|
||||
|
||||
//return the object if it is part of the given object or
|
||||
//if the given object is part of a group within this object.
|
||||
//For group objects this means recursively search for it.
|
||||
virtual wxCanvasObject* Contains( wxCanvasObject* obj );
|
||||
|
||||
//calculate the boundingbox in world coordinates
|
||||
virtual void CalcBoundingBox()=0;
|
||||
|
||||
//write the object as SVG (scalable vector grafhics
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
//get the administrator for the object,
|
||||
//this will give access to the canvas's where it is displayed upon.
|
||||
//It is used to render the object to the active canvas.
|
||||
//Conversion from world to Device coordinates and visa versa is
|
||||
//done using the Active canvas at that moment.
|
||||
wxCanvasAdmin *GetAdmin() { return m_admin; }
|
||||
|
||||
//set the administrator
|
||||
virtual void SetAdmin( wxCanvasAdmin *admin ) { m_admin = admin; }
|
||||
|
||||
//is this a control type of canvas object
|
||||
bool IsControl() { return m_isControl; }
|
||||
//is this a vector type of canvas object
|
||||
bool IsVector() { return m_isVector; }
|
||||
//is this an Image type of canvas object
|
||||
bool IsImage() { return m_isImage; }
|
||||
|
||||
//get minimum X of the boundingbox in world coordinates
|
||||
inline double GetXMin() { return m_bbox.GetMinX(); }
|
||||
//get minimum Y of the boundingbox in world coordinates
|
||||
inline double GetYMin() { return m_bbox.GetMinY(); }
|
||||
//get maximum X of the boundingbox in world coordinates
|
||||
inline double GetXMax() { return m_bbox.GetMaxX(); }
|
||||
//get maximum Y of the boundingbox in world coordinates
|
||||
inline double GetYMax() { return m_bbox.GetMaxY(); }
|
||||
|
||||
//get boundingbox
|
||||
inline wxBoundingBox GetBbox() { return m_bbox; }
|
||||
|
||||
//redirect all mouse events for the canvas to this object
|
||||
void CaptureMouse();
|
||||
//release the mouse capture for this object
|
||||
void ReleaseMouse();
|
||||
//is the mouse captured for this object
|
||||
bool IsCapturedMouse();
|
||||
|
||||
//set if this object will visible (be rendered or not)
|
||||
inline void SetVisible(bool visible) { m_visible=visible; }
|
||||
//get visibility
|
||||
inline bool GetVisible() {return m_visible; }
|
||||
|
||||
//can the object be dragged
|
||||
inline void SetDraggable(bool drag) { m_dragable=drag; }
|
||||
//get if the object can be dragged
|
||||
inline bool GetDraggable() {return m_dragable; }
|
||||
|
||||
//get absolute area in the device coordinates where the object
|
||||
//its boundingbox in world coordinates is first translated using the matrix.
|
||||
wxRect GetAbsoluteArea(const wxTransformMatrix& cworld);
|
||||
|
||||
//get currently used eventhandler (always the first in the list)
|
||||
wxEvtHandler *GetEventHandler() const { return m_eventHandler; }
|
||||
|
||||
//process an event for the object, starting with the first eventhandler
|
||||
// in the list.
|
||||
bool ProcessCanvasObjectEvent(wxEvent& event);
|
||||
|
||||
// push/pop event handler: allows to chain a custom event handler to
|
||||
// already existing ones
|
||||
void PushEventHandler( wxEvtHandler *handler );
|
||||
|
||||
//remove first eventhandler in the list (one will be always stay in)
|
||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||
//append an eventhandler to the list, this event handler will be called
|
||||
//if the other skipped the event to process.
|
||||
void AppendEventHandler(wxEvtHandler *handler);
|
||||
//remove last event handler in the list (one will always stay in)
|
||||
wxEvtHandler *RemoveLastEventHandler(bool deleteHandler);
|
||||
|
||||
protected:
|
||||
|
||||
//administator for rendering and accessing the canvas's
|
||||
wxCanvasAdmin* m_admin;
|
||||
|
||||
//active event handler, default the object itself
|
||||
wxEvtHandler* m_eventHandler;
|
||||
|
||||
bool m_isControl:1;
|
||||
bool m_isVector:1;
|
||||
bool m_isImage:1;
|
||||
bool m_visible:1;
|
||||
bool m_dragable:1;
|
||||
wxDRAG_MODE m_dragmode:3;
|
||||
|
||||
//boundingbox in world coordinates
|
||||
wxBoundingBox m_bbox;
|
||||
|
||||
//used for dragging
|
||||
wxBitmap m_atnewpos;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasObjectGroup is a container for wxCanvas derived Objects.
|
||||
// It renders itself by calling the render methods of the wxCanvasObjects it contains.
|
||||
// It can have nested groups also, in the same way as the other wxCanvasObjects it already contains.
|
||||
// The group has a matrix to position/rotate/scale the group.
|
||||
class wxCanvasObjectGroup: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasObjectGroup(double x, double y);
|
||||
virtual ~wxCanvasObjectGroup();
|
||||
|
||||
void SetAdmin(wxCanvasAdmin* admin);
|
||||
|
||||
//prepend a wxCanvasObject to this group
|
||||
virtual void Prepend( wxCanvasObject* obj );
|
||||
//append a wxCanvasObject to this group
|
||||
virtual void Append( wxCanvasObject* obj );
|
||||
//insert a wxCanvasObject to this group
|
||||
virtual void Insert( size_t before, wxCanvasObject* obj );
|
||||
//remove the given object from the group
|
||||
virtual void Remove( wxCanvasObject* obj );
|
||||
|
||||
//those this group contain the given object.
|
||||
//in case of nested groups also search in there to the lowwest level.
|
||||
virtual wxCanvasObject* Contains( wxCanvasObject* obj );
|
||||
|
||||
//returns index of the given wxCanvasObject in this group
|
||||
virtual int IndexOf( wxCanvasObject* obj );
|
||||
|
||||
double GetPosX() { return lworld.GetValue(2,0); }
|
||||
double GetPosY() { return lworld.GetValue(2,1); }
|
||||
void SetPosXY( double x, double y) {lworld.SetValue(2,0,x);lworld.SetValue(2,1,y);CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
//remove all wxCanvasObjects from the group (flag for deletion of the objectsalso)
|
||||
void DeleteContents( bool );
|
||||
virtual void Render(wxTransformMatrix* cworld,int x, int y, int width, int height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
//recursive call the IsHitWorld on all contained objects, the first
|
||||
//one that is hit will be returned
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void PushEventHandler( wxEvtHandler *handler );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void AppendEventHandler(wxEvtHandler *handler);
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *RemoveLastEventHandler(bool deleteHandler);
|
||||
|
||||
protected:
|
||||
|
||||
//to position the object
|
||||
wxTransformMatrix lworld;
|
||||
|
||||
wxList m_objects;
|
||||
|
||||
friend class wxCanvas;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasObjectRef is a reference to any wxCanvasObject derived class.
|
||||
// It does not duplicate the referenced object.
|
||||
// It has a matrix to reposition/rotate/scale the object it references.
|
||||
// The position/matrix of the referenced Object is accumulated with the one here.
|
||||
class wxCanvasObjectRef: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasObjectRef(double x, double y,wxCanvasObject* obj);
|
||||
|
||||
//set rotation for the reference
|
||||
void SetRotation(double rotation);
|
||||
|
||||
//set scale in x and y ( > zero)
|
||||
void SetScale( double scalex, double scaley );
|
||||
|
||||
void SetAdmin(wxCanvasAdmin* admin);
|
||||
|
||||
double GetPosX() { return lworld.GetValue(2,0); }
|
||||
double GetPosY() { return lworld.GetValue(2,1); }
|
||||
void SetPosXY( double x, double y) {lworld.SetValue(2,0,x);lworld.SetValue(2,1,y);CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
virtual void Render(wxTransformMatrix* cworld,int x, int y, int width, int height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
//return this object if one of the objects it references is hit
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
virtual wxCanvasObject* Contains( wxCanvasObject* obj );
|
||||
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void PushEventHandler( wxEvtHandler *handler );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void AppendEventHandler(wxEvtHandler *handler);
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *RemoveLastEventHandler(bool deleteHandler);
|
||||
|
||||
protected:
|
||||
|
||||
//to position the object
|
||||
wxTransformMatrix lworld;
|
||||
|
||||
//reference to another wxCanvasObject
|
||||
wxCanvasObject* m_obj;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasRect
|
||||
class wxCanvasRect: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasRect( double x, double y, double w, double h , double radius=0 );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
double m_radius;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasCircle
|
||||
//----------------------------------------------------------------------------
|
||||
class wxCanvasCircle: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasCircle( double x, double y, double radius );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y;CalcBoundingBox(); };
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_radius;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasEllipse
|
||||
class wxCanvasEllipse: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasEllipse( double x, double y, double width, double height );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasEllipticArc
|
||||
class wxCanvasEllipticArc: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasEllipticArc( double x, double y, double width, double height, double start, double end );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
double m_start;
|
||||
double m_end;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasLine
|
||||
class wxCanvasLine: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasLine( double x1, double y1, double x2, double y2 );
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
|
||||
double GetPosX() { return m_x1; }
|
||||
double GetPosY() { return m_y1; }
|
||||
void SetPosXY( double x, double y) {m_x1=x; m_y1=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
|
||||
double m_x1;
|
||||
double m_y1;
|
||||
double m_x2;
|
||||
double m_y2;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasImage
|
||||
class wxCanvasImage: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasImage( const wxImage &image, double x, double y, double w, double h );
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
private:
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
|
||||
wxImage m_image;
|
||||
int m_orgw,m_orgh;
|
||||
|
||||
// cache
|
||||
wxBitmap m_cBitmap;
|
||||
wxImage m_cImage;
|
||||
int m_cW;
|
||||
int m_cH;
|
||||
double m_cR;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasControl
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasControl: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasControl( wxWindow *control );
|
||||
~wxCanvasControl();
|
||||
|
||||
double GetPosX();
|
||||
double GetPosY();
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void MoveRelative( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
private:
|
||||
wxWindow *m_control;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasText
|
||||
class wxCanvasText: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasText( const wxString &text, double x, double y, const wxString &foneFile, int size );
|
||||
~wxCanvasText();
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y;CalcBoundingBox(); };
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
void SetRGB( unsigned char red, unsigned char green, unsigned char blue );
|
||||
void SetFlag( int flag );
|
||||
int GetFlag() { return m_flag; }
|
||||
|
||||
private:
|
||||
wxString m_text;
|
||||
double m_x;
|
||||
double m_y;
|
||||
unsigned char *m_alpha;
|
||||
void *m_faceData;
|
||||
int m_flag;
|
||||
int m_red;
|
||||
int m_green;
|
||||
int m_blue;
|
||||
wxString m_fontFileName;
|
||||
int m_size;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvas is used to display a wxCanvasGroupObject, which contains wxCanvasObject derived
|
||||
// drawable objects. The group to draw is called the root.
|
||||
// All objects are defined in world coordinates, relative to its parent (e.g. nested groups)
|
||||
// There are methods to convert from world to device coordinates and visa versa.
|
||||
// Rendering a draw is normally started on the root, it to a buffer, afterwords
|
||||
// an update of the damaged parts will blitted from the buffer to the screen.
|
||||
// This is done in Idle time, but can also be forced.
|
||||
// World coordinates can be with the Y axis going up are down.
|
||||
// The area of the drawing in world coordinates that is visible on the canvas
|
||||
// can be set. Parts of this area can be zoomed into resulting in scroll bars
|
||||
// to be displayed.
|
||||
class wxCanvas: public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
// constructors and destructors
|
||||
wxCanvas( wxCanvasAdmin* admin ,wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxScrolledWindowStyle );
|
||||
virtual ~wxCanvas();
|
||||
|
||||
//background colour for the canvas
|
||||
virtual void SetColour( const wxColour& background );
|
||||
|
||||
//update the area given in device coordinates
|
||||
virtual void Update( int x, int y, int width, int height, bool blit = TRUE );
|
||||
|
||||
//blit all updated areas now to the screen, else it will happen in idle time.
|
||||
//Use this to support dragging for instance, becuase in such cases idle time
|
||||
//will take to long.
|
||||
virtual void UpdateNow();
|
||||
|
||||
//prevent canvas activety
|
||||
virtual void Freeze();
|
||||
//allow canvas activety
|
||||
virtual void Thaw();
|
||||
|
||||
//get the buffer that is used for rendering in general
|
||||
inline wxBitmap *GetBuffer() { return &m_buffer; }
|
||||
//get the DC that is used for rendering
|
||||
inline wxDC *GetDC() { return m_renderDC; }
|
||||
//set the DC that is used for rendering
|
||||
inline void SetDC(wxDC* dc) { m_renderDC=dc; }
|
||||
|
||||
inline int GetBufferWidth() { return m_buffer.GetWidth(); }
|
||||
inline int GetBufferHeight() { return m_buffer.GetHeight(); }
|
||||
|
||||
//updating is needed for the canvas if the buffer did change
|
||||
bool NeedUpdate() { return m_needUpdate; }
|
||||
bool IsFrozen() { return m_frozen; }
|
||||
|
||||
//blit damaged areas in the buffer to the screen
|
||||
void BlitBuffer( wxDC &dc );
|
||||
|
||||
//redirect events to this canvas object
|
||||
void SetCaptureMouse( wxCanvasObject *obj );
|
||||
//are events redirected, if so return the object else NULL
|
||||
inline wxCanvasObject* GetCaptured() { return m_captureMouse;}
|
||||
|
||||
//set the root group where the objects for this canvas are stored
|
||||
void SetRoot(wxCanvasObjectGroup* aroot){m_root=aroot;}
|
||||
|
||||
//get root group that is displayed on the canvas
|
||||
wxCanvasObjectGroup* GetRoot(){return m_root;}
|
||||
|
||||
//scroll the window in device coordinates
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = (wxRect *) NULL );
|
||||
|
||||
//get y axis orientation
|
||||
virtual bool GetYaxis() { return FALSE; }
|
||||
|
||||
//get the visible part in world coordinates
|
||||
virtual double GetMinX() const;
|
||||
virtual double GetMinY() const;
|
||||
virtual double GetMaxX() const;
|
||||
virtual double GetMaxY() const;
|
||||
|
||||
//convert from window to virtual coordinates
|
||||
virtual double DeviceToLogicalX(int x) const;
|
||||
virtual double DeviceToLogicalY(int y) const;
|
||||
virtual double DeviceToLogicalXRel(int x) const;
|
||||
virtual double DeviceToLogicalYRel(int y) const;
|
||||
virtual int LogicalToDeviceX(double x) const;
|
||||
virtual int LogicalToDeviceY(double y) const;
|
||||
virtual int LogicalToDeviceXRel(double x) const;
|
||||
virtual int LogicalToDeviceYRel(double y) const;
|
||||
|
||||
protected:
|
||||
wxBitmap m_buffer;
|
||||
|
||||
//always available and m_buffer selected
|
||||
wxDC* m_renderDC;
|
||||
|
||||
bool m_needUpdate;
|
||||
wxList m_updateRects;
|
||||
wxCanvasObjectGroup* m_root;
|
||||
|
||||
wxColour m_background;
|
||||
bool m_frozen;
|
||||
wxCanvasObject *m_lastMouse;
|
||||
wxCanvasObject *m_captureMouse;
|
||||
|
||||
int m_oldDeviceX,m_oldDeviceY;
|
||||
|
||||
wxCanvasAdmin* m_admin;
|
||||
|
||||
private:
|
||||
int m_bufferX,m_bufferY;
|
||||
|
||||
protected:
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
void OnSetFocus( wxFocusEvent &event );
|
||||
void OnKillFocus( wxFocusEvent &event );
|
||||
void OnEraseBackground( wxEraseEvent &event );
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxCanvas)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
|
||||
class wxVectorCanvas: public wxCanvas
|
||||
{
|
||||
public:
|
||||
// constructors and destructors
|
||||
wxVectorCanvas( wxCanvasAdmin* admin ,wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxScrolledWindowStyle );
|
||||
|
||||
//scroll the window in device coordinates
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = (wxRect *) NULL );
|
||||
|
||||
//set if the Yaxis goes up or down
|
||||
void SetYaxis(bool up) { m_yaxis=up; }
|
||||
|
||||
//get currently used Yaxis setting
|
||||
virtual bool GetYaxis() { return m_yaxis; }
|
||||
|
||||
//to set the total area in world coordinates that can be scrolled.
|
||||
// when totaly zoomed out (SetMappingScroll same size as given here),
|
||||
// this will be the area displayed.
|
||||
// To display all of a drawing, set this here to the boundingbox of the root group
|
||||
// of the canvas.
|
||||
void SetScroll(double vx1,double vy1,double vx2,double vy2);
|
||||
|
||||
//given the virtual size to be displayed, the mappingmatrix will be calculated
|
||||
//in such a manner that it fits (same ratio in width and height) to the window size.
|
||||
//The window size is used to intitialize the mapping.
|
||||
//The virtual size is just an indication, it will be ajusted to fit in the client window ratio.
|
||||
//When border is set an extra margin is added so that the drawing will fit nicely.
|
||||
// To display all of a drawing, set this here to the boundingbox of the root group
|
||||
// of the canvas.
|
||||
void SetMappingScroll(double vx1,double vy1,double vx2,double vy2,bool border);
|
||||
|
||||
//matrix for calculating the virtual coordinate given a screen coordinate
|
||||
wxTransformMatrix GetInverseMappingMatrix();
|
||||
|
||||
//matrix for calculating the screen coordinate given a virtual coordinate
|
||||
wxTransformMatrix GetMappingMatrix();
|
||||
|
||||
//get minimum X of the visible part in world coordinates
|
||||
virtual double GetMinX() const;
|
||||
virtual double GetMinY() const;
|
||||
virtual double GetMaxX() const;
|
||||
virtual double GetMaxY() const;
|
||||
|
||||
//convert from window to virtual coordinates and back
|
||||
virtual double DeviceToLogicalX(int x) const;
|
||||
virtual double DeviceToLogicalY(int y) const;
|
||||
virtual double DeviceToLogicalXRel(int x) const;
|
||||
virtual double DeviceToLogicalYRel(int y) const;
|
||||
virtual int LogicalToDeviceX(double x) const;
|
||||
virtual int LogicalToDeviceY(double y) const;
|
||||
virtual int LogicalToDeviceXRel(double x) const;
|
||||
virtual int LogicalToDeviceYRel(double y) const;
|
||||
|
||||
protected:
|
||||
// up or down
|
||||
bool m_yaxis;
|
||||
|
||||
// holds the matrix for mapping from virtual to screen coordinates
|
||||
wxTransformMatrix m_mapping_matrix;
|
||||
|
||||
// holds the inverse of the mapping matrix
|
||||
wxTransformMatrix m_inverse_mapping;
|
||||
|
||||
//virtual coordinates of total drawing
|
||||
double m_virtm_minX, m_virtm_minY, m_virtm_maxX, m_virtm_maxY;
|
||||
|
||||
// virtual coordinates box
|
||||
double m_virt_minX, m_virt_minY, m_virt_maxX, m_virt_maxY;
|
||||
|
||||
// bounding box
|
||||
double m_minX, m_minY, m_maxX, m_maxY;
|
||||
|
||||
//are scroll bars active?
|
||||
bool m_scrolled;
|
||||
|
||||
private:
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
void OnChar( wxKeyEvent &event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxVectorCanvas)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
|
||||
//:defenition
|
||||
//Contains a list of wxCanvas Objects that will be maintained through this class.
|
||||
//Each wxCanvasObject can be displayed on several wxCanvas Objects at the same time.
|
||||
//The active wxCanvas is used to render and convert coordinates from world to device.
|
||||
//So it is important to set the active wxCanvas based on the wxCanvas that has the focus
|
||||
//or is scrolled etc. This is normally done within wxCanvas when appropriate.
|
||||
class wxCanvasAdmin
|
||||
{
|
||||
public:
|
||||
// constructors and destructors
|
||||
wxCanvasAdmin();
|
||||
virtual ~wxCanvasAdmin();
|
||||
|
||||
//convert from window to virtual coordinates
|
||||
double DeviceToLogicalX(int x) const;
|
||||
//convert from window to virtual coordinates
|
||||
double DeviceToLogicalY(int y) const;
|
||||
//convert from window to virtual coordinates relatif
|
||||
double DeviceToLogicalXRel(int x) const;
|
||||
//convert from window to virtual coordinates relatif
|
||||
double DeviceToLogicalYRel(int y) const;
|
||||
//convert from virtual to window coordinates
|
||||
int LogicalToDeviceX(double x) const;
|
||||
//convert from virtual to window coordinates
|
||||
int LogicalToDeviceY(double y) const;
|
||||
//convert from virtual to window coordinates relatif
|
||||
int LogicalToDeviceXRel(double x) const;
|
||||
//convert from virtual to window coordinates relatif
|
||||
int LogicalToDeviceYRel(double y) const;
|
||||
|
||||
//update in the buffer off all canvases, the area given in world coordinates
|
||||
virtual void Update(wxCanvasObject* obj, double x, double y, double width, double height);
|
||||
|
||||
//blit all updated areas now to the screen, else it will happen in idle time.
|
||||
//Use this to support dragging for instance, becuase in such cases idle time
|
||||
//will take to long.
|
||||
virtual void UpdateNow();
|
||||
|
||||
//append another canvas
|
||||
virtual void Append( wxCanvas* canvas );
|
||||
|
||||
//remove a canvas
|
||||
virtual void Remove( wxCanvas* canvas );
|
||||
|
||||
//set the given canvas as active (for rendering, coordinate conversion etc.)
|
||||
void SetActive(wxCanvas* activate);
|
||||
|
||||
//get active canvas
|
||||
inline wxCanvas* GetActive() {return m_active;};
|
||||
|
||||
private:
|
||||
wxList m_canvaslist;
|
||||
wxCanvas* m_active;
|
||||
};
|
||||
|
||||
#endif
|
||||
// WXCANVAS
|
||||
|
@@ -1,58 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: liner.h
|
||||
// Author: Klaas Holwerda
|
||||
// Created: 1/10/2000
|
||||
// Copyright: 2000 (c) Klaas Holwerda
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __WXLINER_H
|
||||
#define __WXLINER_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "liner.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/geometry.h"
|
||||
|
||||
enum OUTPRODUCT {R_IS_LEFT,R_IS_ON,R_IS_RIGHT};
|
||||
|
||||
// Status of a point to a wxLine
|
||||
enum R_PointStatus {R_LEFT_SIDE, R_RIGHT_SIDE, R_ON_AREA, R_IN_AREA};
|
||||
|
||||
class wxLine
|
||||
{
|
||||
public:
|
||||
// constructors and destructor
|
||||
wxLine( double x1, double y1, double x2, double y2 );
|
||||
wxLine( const wxPoint2DDouble& a, const wxPoint2DDouble& b);
|
||||
~wxLine();
|
||||
|
||||
wxPoint2DDouble GetBeginPoint(); // Get the beginpoint from a wxLine
|
||||
wxPoint2DDouble GetEndPoint(); // Get the endpoint from a wxLine
|
||||
bool CheckIntersect( wxLine&, double Marge); // Check if two wxLines intersects
|
||||
int Intersect( wxLine&, wxPoint2DDouble& bp ,wxPoint2DDouble& ep ,double Marge) ; // Intersects two wxLines
|
||||
bool Intersect( wxLine& lijn, wxPoint2DDouble& crossing); //intersect two (infinit) lines
|
||||
R_PointStatus PointOnLine( const wxPoint2DDouble& a_Point, double& Distance, double Marge ); //For an infinite wxLine
|
||||
R_PointStatus PointInLine( const wxPoint2DDouble& a_Point, double& Distance, double Marge ); //For a non-infinite wxLine
|
||||
OUTPRODUCT OutProduct( const wxLine& two, double accur); // outproduct of two wxLines
|
||||
double Calculate_Y( double X); // Caclulate Y if X is known
|
||||
void Virtual_Point( wxPoint2DDouble& a_point, double distance) const;
|
||||
wxLine& operator=( const wxLine&); // assignment operator
|
||||
void CalculateLineParameters(); // Calculate the parameters if nessecary
|
||||
void OffsetContour( const wxLine& nextline, double factor,wxPoint2DDouble& offsetpoint) const;
|
||||
|
||||
private:
|
||||
|
||||
int ActionOnTable1(R_PointStatus,R_PointStatus); // Function needed for Intersect
|
||||
int ActionOnTable2(R_PointStatus,R_PointStatus); // Function needed for Intersect
|
||||
|
||||
double m_AA;
|
||||
double m_BB;
|
||||
double m_CC;
|
||||
wxPoint2DDouble m_a;
|
||||
wxPoint2DDouble m_b;
|
||||
bool m_valid_parameters;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,220 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: polygon.h
|
||||
// Author: Klaas Holwerda
|
||||
// Created: XX/XX/XX
|
||||
// Copyright: 2000 (c) Klaas Holwerda
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WXPOLYGON_H__
|
||||
#define __WXPOLYGON_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "polygon.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/matrix.h"
|
||||
#include "wx/geometry.h"
|
||||
#include "bbox.h"
|
||||
#include "canvas.h"
|
||||
|
||||
enum INOUTPOLY {OUTSIDE_POLY,INSIDE_POLY,ON_POLY};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolygon
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolygon: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolygon( int n, wxPoint2DDouble points[], bool spline = FALSE );
|
||||
~wxCanvasPolygon();
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; }
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
|
||||
//set colour 1
|
||||
//being the background color if filling with a monochrome bitmap
|
||||
//or in case of gradient filling the starting colour for the fill
|
||||
void SetColour1( const wxColour& fg) { m_textfg=fg;}
|
||||
//set colour 1
|
||||
//being the foreground color if filling with a monochrome bitmap
|
||||
//or in case of gradient filling the ending colour for the fill
|
||||
void SetColour2( const wxColour& bg) { m_textbg=bg;}
|
||||
//transparent filling when bitmapbrush is monochrome
|
||||
void SetTransParent(bool transp) { m_transp=transp;}
|
||||
//gradient filling using lines chnging in colour from colour1 to colour2
|
||||
void SetGradient(bool gradient, const wxPen& gpen, double distance)
|
||||
{ m_gradient=gradient;
|
||||
m_gpen=gpen;
|
||||
m_gdistance=distance;
|
||||
}
|
||||
|
||||
double GetPosX() { return m_points[0].m_x; }
|
||||
double GetPosY() { return m_points[0].m_y; }
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
INOUTPOLY PointInPolygon(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
|
||||
bool MoveUp(double horline, int& index, int direction);
|
||||
void DetectCriticalPoints();
|
||||
void FillPolygon(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
wxList m_CRlist;
|
||||
wxList m_AETlist;
|
||||
|
||||
|
||||
wxBrush m_brush;
|
||||
wxPen m_pen;
|
||||
wxColour m_textbg;
|
||||
wxColour m_textfg;
|
||||
|
||||
//if brush is of type bitmap with a mask fill with mask transparent
|
||||
bool m_transp;
|
||||
bool m_gradient;
|
||||
wxPen m_gpen;
|
||||
double m_gdistance;
|
||||
|
||||
bool m_spline;
|
||||
|
||||
int m_n;
|
||||
wxPoint2DDouble* m_points;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolyline
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolyline: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolyline(int n, wxPoint2DDouble points[]);
|
||||
~wxCanvasPolyline();
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
|
||||
double GetPosX() { return m_points[0].m_x; }
|
||||
double GetPosY() { return m_points[0].m_y; }
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
bool PointOnPolyline(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
|
||||
wxPen m_pen;
|
||||
|
||||
int m_n;
|
||||
wxPoint2DDouble* m_points;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolygon
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolygonL: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolygonL(wxList* points, bool spline = FALSE);
|
||||
~wxCanvasPolygonL();
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; }
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
void SetColour1( const wxColour& fg) { m_textfg=fg;}
|
||||
void SetColour2( const wxColour& bg) { m_textbg=bg;}
|
||||
void SetTransParent(bool transp) { m_transp=transp;}
|
||||
|
||||
double GetPosX();
|
||||
double GetPosY();
|
||||
void SetPosXY( double x, double y);
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
INOUTPOLY PointInPolygon(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
|
||||
wxBrush m_brush;
|
||||
wxPen m_pen;
|
||||
bool m_spline;
|
||||
wxColour m_textbg;
|
||||
wxColour m_textfg;
|
||||
//if brush is of type bitmap with a mask fill with mask transparent
|
||||
bool m_transp;
|
||||
|
||||
wxList* m_lpoints;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolyline
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolylineL: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolylineL(wxList* points, bool spline );
|
||||
~wxCanvasPolylineL();
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
|
||||
double GetPosX();
|
||||
double GetPosY();
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
bool PointOnPolyline(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
bool m_spline;
|
||||
|
||||
wxList* m_lpoints;
|
||||
};
|
||||
|
||||
//active edge table
|
||||
class wxAET
|
||||
{
|
||||
public:
|
||||
inline void CalculateLineParameters( const wxPoint2DDouble& p1 , const wxPoint2DDouble& p2 );
|
||||
inline void CalculateXs( double y );
|
||||
|
||||
//line paramters
|
||||
bool m_horizontal;
|
||||
double m_BdivA;
|
||||
double m_CdivA;
|
||||
int m_index;
|
||||
int m_direction;
|
||||
//intersection point with scanline;
|
||||
double m_xs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -1,59 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: editlbox.h
|
||||
// Purpose: ListBox with editable items
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __WX_EDITLBOX_H__
|
||||
#define __WX_EDITLBOX_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "editlbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/panel.h"
|
||||
|
||||
|
||||
class WXDLLEXPORT wxBitmapButton;
|
||||
class WXDLLEXPORT wxListCtrl;
|
||||
class WXDLLEXPORT wxListEvent;
|
||||
|
||||
// This class provides a composite control that lets the
|
||||
// user easily enter list of strings
|
||||
|
||||
class WXDLLEXPORT wxEditableListBox : public wxPanel
|
||||
{
|
||||
DECLARE_CLASS(wxEditableListBox);
|
||||
|
||||
public:
|
||||
wxEditableListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& name = wxT("editableListBox"));
|
||||
|
||||
void SetStrings(const wxArrayString& strings);
|
||||
void GetStrings(wxArrayString& strings);
|
||||
|
||||
protected:
|
||||
wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit;
|
||||
wxListCtrl *m_listCtrl;
|
||||
int m_selection;
|
||||
bool m_edittingNew;
|
||||
|
||||
void OnItemSelected(wxListEvent& event);
|
||||
void OnEndLabelEdit(wxListEvent& event);
|
||||
void OnNewItem(wxCommandEvent& event);
|
||||
void OnDelItem(wxCommandEvent& event);
|
||||
void OnEditItem(wxCommandEvent& event);
|
||||
void OnUpItem(wxCommandEvent& event);
|
||||
void OnDownItem(wxCommandEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,167 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: multicell.h
|
||||
// Purpose: provide two new classes for layout, wxMultiCellSizer and wxMultiCellCanvas
|
||||
// Author: Jonathan Bayer
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) Jonathan Bayer
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This was inspired by the gbsizer class written by Alex Andruschak
|
||||
|
||||
|
||||
#ifndef __WX_MULTICELL_H__
|
||||
#define __WX_MULTICELL_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "multicell.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
// The classes are derived from wxSizer
|
||||
#include "wx/sizer.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
enum wxResizable
|
||||
{
|
||||
wxNOT_RESIZABLE = 0x00,
|
||||
wxHORIZENTAL_RESIZABLE = 0x01,
|
||||
wxVERTICAL_RESIZABLE = 0x10,
|
||||
wxRESIZABLE = 0x11
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// classes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMultiCellItemHandle
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMultiCellItemHandle: public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxMultiCellItemHandle);
|
||||
protected:
|
||||
int m_column;
|
||||
int m_row;
|
||||
int m_width;
|
||||
int m_height;
|
||||
wxResizable m_style;
|
||||
wxSize m_fixedSize;
|
||||
int m_alignment;
|
||||
wxSize m_weight;
|
||||
|
||||
public:
|
||||
wxMultiCellItemHandle( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxSize size, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxResizable style, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, int align);
|
||||
int GetColumn();
|
||||
int GetRow();
|
||||
int GetWidth();
|
||||
int GetHeight();
|
||||
wxResizable GetStyle();
|
||||
wxSize GetLocalSize();
|
||||
int GetAlignment();
|
||||
wxSize GetWeight();
|
||||
|
||||
private:
|
||||
void Initialize( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMultiCellSizer
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMultiCellSizer : virtual public wxSizer
|
||||
{
|
||||
DECLARE_CLASS(wxMultiCellSizer);
|
||||
|
||||
protected:
|
||||
wxSize m_cell_count;
|
||||
|
||||
public:
|
||||
wxMultiCellSizer(wxSize & size);
|
||||
wxMultiCellSizer(int rows, int cols);
|
||||
~wxMultiCellSizer();
|
||||
|
||||
virtual void RecalcSizes();
|
||||
virtual wxSize CalcMin();
|
||||
bool SetDefaultCellSize(wxSize size);
|
||||
bool SetColumnWidth(int column, int colSize = 5, bool expandable = FALSE);
|
||||
bool SetRowHeight(int row, int rowSize = 5, bool expandable = FALSE);
|
||||
bool EnableGridLines(wxWindow *win);
|
||||
bool SetGridPen(wxPen *pen);
|
||||
void OnPaint(wxDC& dc);
|
||||
|
||||
private:
|
||||
void GetMinimums();
|
||||
int Sum(int *array, int x);
|
||||
|
||||
private:
|
||||
int *m_maxHeight;
|
||||
int *m_maxWidth;
|
||||
int *m_rowStretch;
|
||||
int *m_colStretch;
|
||||
wxSize **m_weights;
|
||||
wxSize **m_minSizes;
|
||||
int m_maxWeights;
|
||||
wxSize m_defaultCellSize;
|
||||
wxWindow *m_win; // usually used for debugging
|
||||
wxPen *m_pen;
|
||||
|
||||
void DrawGridLines(wxDC& dc);
|
||||
void Initialize(wxSize size);
|
||||
};
|
||||
|
||||
|
||||
// wxCell is used internally, so we don't need to declare it here
|
||||
|
||||
class wxCell;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMultiCellCanvas
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxMultiCellCanvas : public wxFlexGridSizer
|
||||
{
|
||||
public:
|
||||
wxMultiCellCanvas(wxWindow *parent, int numRows = 2, int numCols = 2);
|
||||
void Add(wxWindow *win, unsigned int row, unsigned int col);
|
||||
|
||||
void Resize(int numRows, int numCols);
|
||||
int MaxRows()
|
||||
{
|
||||
return m_maxRows;
|
||||
};
|
||||
int MaxCols()
|
||||
{
|
||||
return m_maxCols;
|
||||
};
|
||||
void CalculateConstraints();
|
||||
void SetMinCellSize(const wxSize size)
|
||||
{
|
||||
m_minCellSize = size;
|
||||
};
|
||||
|
||||
private:
|
||||
wxWindow *m_parent;
|
||||
unsigned int m_maxRows, m_maxCols;
|
||||
|
||||
wxSize m_minCellSize;
|
||||
wxCell **m_cells;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*** End of File ***/
|
@@ -1,227 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: splittree.h
|
||||
// Purpose: Classes to achieve a remotely-scrolled tree in a splitter
|
||||
// window that can be scrolled by a scrolled window higher in the
|
||||
// hierarchy
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 8/7/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SPLITTREE_H_
|
||||
#define _WX_SPLITTREE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "splittree.h"
|
||||
#endif
|
||||
|
||||
// Set this to 1 to use generic tree control (doesn't yet work properly)
|
||||
#define USE_GENERIC_TREECTRL 0
|
||||
|
||||
#include "wx/wx.h"
|
||||
#include "wx/treectrl.h"
|
||||
#include "wx/splitter.h"
|
||||
#include "wx/scrolwin.h"
|
||||
|
||||
#if USE_GENERIC_TREECTRL
|
||||
#include "wx/generic/treectlg.h"
|
||||
#ifndef wxTreeCtrl
|
||||
#define wxTreeCtrl wxGenericTreeCtrl
|
||||
#define sm_classwxTreeCtrl sm_classwxGenericTreeCtrl
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class wxRemotelyScrolledTreeCtrl;
|
||||
class wxThinSplitterWindow;
|
||||
class wxSplitterScrolledWindow;
|
||||
|
||||
/*
|
||||
* wxRemotelyScrolledTreeCtrl
|
||||
*
|
||||
* This tree control disables its vertical scrollbar and catches scroll
|
||||
* events passed by a scrolled window higher in the hierarchy.
|
||||
* It also updates the scrolled window vertical scrollbar as appropriate.
|
||||
*/
|
||||
|
||||
class wxRemotelyScrolledTreeCtrl: public wxTreeCtrl
|
||||
{
|
||||
DECLARE_CLASS(wxRemotelyScrolledTreeCtrl)
|
||||
public:
|
||||
wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
|
||||
~wxRemotelyScrolledTreeCtrl();
|
||||
|
||||
//// Events
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnExpand(wxTreeEvent& event);
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
|
||||
//// Overrides
|
||||
// Override this in case we're using the generic tree control.
|
||||
// Calls to this should disable the vertical scrollbar.
|
||||
|
||||
// Number of pixels per user unit (0 or -1 for no scrollbar)
|
||||
// Length of virtual canvas in user units
|
||||
// Length of page in user units
|
||||
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos = 0, int yPos = 0,
|
||||
bool noRefresh = FALSE );
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
// Get the view start
|
||||
virtual void GetViewStart(int *x, int *y) const;
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
virtual void PrepareDC(wxDC& dc);
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
virtual int GetScrollPos(int orient) const;
|
||||
|
||||
//// Helpers
|
||||
void HideVScrollbar();
|
||||
|
||||
// Calculate the tree overall size so we can set the scrollbar
|
||||
// correctly
|
||||
void CalcTreeSize(wxRect& rect);
|
||||
void CalcTreeSize(const wxTreeItemId& id, wxRect& rect);
|
||||
|
||||
// Adjust the containing wxScrolledWindow's scrollbars appropriately
|
||||
void AdjustRemoteScrollbars();
|
||||
|
||||
// Find the scrolled window that contains this control
|
||||
wxScrolledWindow* GetScrolledWindow() const;
|
||||
|
||||
// Scroll to the given line (in scroll units where each unit is
|
||||
// the height of an item)
|
||||
void ScrollToLine(int posHoriz, int posVert);
|
||||
|
||||
//// Accessors
|
||||
|
||||
// The companion window is one which will get notified when certain
|
||||
// events happen such as node expansion
|
||||
void SetCompanionWindow(wxWindow* companion) { m_companionWindow = companion; }
|
||||
wxWindow* GetCompanionWindow() const { return m_companionWindow; }
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
protected:
|
||||
wxWindow* m_companionWindow;
|
||||
};
|
||||
|
||||
/*
|
||||
* wxTreeCompanionWindow
|
||||
*
|
||||
* A window displaying values associated with tree control items.
|
||||
*/
|
||||
|
||||
class wxTreeCompanionWindow: public wxWindow
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS(wxTreeCompanionWindow)
|
||||
|
||||
wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
//// Overrides
|
||||
virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect);
|
||||
|
||||
//// Events
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
void OnExpand(wxTreeEvent& event);
|
||||
|
||||
//// Operations
|
||||
|
||||
//// Accessors
|
||||
wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; };
|
||||
void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeCtrl) { m_treeCtrl = treeCtrl; }
|
||||
|
||||
//// Data members
|
||||
protected:
|
||||
wxRemotelyScrolledTreeCtrl* m_treeCtrl;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* wxThinSplitterWindow
|
||||
*
|
||||
* Implements a splitter with a less obvious sash
|
||||
* than the usual one.
|
||||
*/
|
||||
|
||||
class wxThinSplitterWindow: public wxSplitterWindow
|
||||
{
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow)
|
||||
|
||||
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = wxSP_3D | wxCLIP_CHILDREN);
|
||||
|
||||
//// Overrides
|
||||
|
||||
void SizeWindows();
|
||||
// Tests for x, y over sash. Overriding this allows us to increase
|
||||
// the tolerance.
|
||||
bool SashHitTest(int x, int y, int tolerance = 2);
|
||||
void DrawSash(wxDC& dc);
|
||||
|
||||
//// Events
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
//// Operations
|
||||
|
||||
//// Accessors
|
||||
|
||||
//// Data members
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
* wxSplitterScrolledWindow
|
||||
*
|
||||
* This scrolled window is aware of the fact that one of its
|
||||
* children is a splitter window. It passes on its scroll events
|
||||
* (after some processing) to both splitter children for them
|
||||
* scroll appropriately.
|
||||
*/
|
||||
|
||||
class wxSplitterScrolledWindow: public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow)
|
||||
|
||||
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
//// Overrides
|
||||
|
||||
//// Events
|
||||
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
//// Operations
|
||||
|
||||
//// Accessors
|
||||
|
||||
//// Data members
|
||||
public:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _SPLITTREE_H_
|
@@ -1,74 +0,0 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Name: cdbase.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998, 1999, 2000
|
||||
// Copyright: (C) 1997, 1998, 1999, 2000 Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// ---------------------------------------------------------------------------
|
||||
#ifndef __CDA_base_H__
|
||||
#define __CDA_base_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cdbase.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
|
||||
typedef struct wxCDtime {
|
||||
wxUint8 track;
|
||||
wxUint8 hour, min, sec;
|
||||
} wxCDtime;
|
||||
|
||||
class WXDLLEXPORT wxCDAudio : public wxObject {
|
||||
DECLARE_ABSTRACT_CLASS(wxCDAudio)
|
||||
public:
|
||||
typedef enum { PLAYING, PAUSED, STOPPED } CDstatus;
|
||||
// Table of contents manager
|
||||
class WXDLLEXPORT CDtoc {
|
||||
protected:
|
||||
wxCDtime *tracks_time, *tracks_pos;
|
||||
wxCDtime total_time;
|
||||
public:
|
||||
//
|
||||
CDtoc(wxCDtime& tot_tm, wxCDtime *trks_tm, wxCDtime *trks_pos)
|
||||
{ tracks_time = trks_tm; total_time = tot_tm; tracks_pos = trks_pos; }
|
||||
|
||||
// Returns the length of the specified track
|
||||
// track: track to get length
|
||||
wxCDtime GetTrackTime(wxUint8 track) const;
|
||||
// Returns the position of the specified track
|
||||
// track: track to get position
|
||||
wxCDtime GetTrackPos(wxUint8 track) const;
|
||||
// Returns the total time
|
||||
inline wxCDtime GetTotalTime() const { return total_time; }
|
||||
};
|
||||
public:
|
||||
//
|
||||
wxCDAudio() : wxObject() {}
|
||||
//
|
||||
virtual ~wxCDAudio() {}
|
||||
|
||||
// Play audio at the specified position
|
||||
virtual bool Play(const wxCDtime& beg_play, const wxCDtime& end_play) = 0;
|
||||
// Play audio from the specified to the end of the CD audio
|
||||
bool Play(const wxCDtime& beg_play);
|
||||
//
|
||||
bool Play(wxUint8 beg_track, wxUint8 end_track = 0);
|
||||
// Pause the audio playing
|
||||
virtual bool Pause() = 0;
|
||||
// Resume a paused audio playing
|
||||
virtual bool Resume() = 0;
|
||||
// Get the current CD status
|
||||
virtual CDstatus GetStatus() = 0;
|
||||
// Get the current playing time
|
||||
virtual wxCDtime GetTime() = 0;
|
||||
// Returns the table of contents
|
||||
virtual const CDtoc& GetToc() = 0;
|
||||
// CD ok
|
||||
virtual bool Ok() const = 0;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,58 +0,0 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Name: cdunix.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 2000
|
||||
// Copyright: (C) 1997, 1998, 1999, 2000 Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// ---------------------------------------------------------------------------
|
||||
#ifndef __CDUNIXH__
|
||||
#define __CDUNIXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cdunix.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/mmedia/cdbase.h"
|
||||
|
||||
///
|
||||
class WXDLLEXPORT wxCDAudioLinux : public wxCDAudio {
|
||||
DECLARE_DYNAMIC_CLASS(wxCDAudioLinux)
|
||||
protected:
|
||||
wxCDtime m_time;
|
||||
CDstatus m_status;
|
||||
CDtoc *m_toc;
|
||||
int m_fd;
|
||||
wxCDtime *m_trksize, *m_trkpos;
|
||||
public:
|
||||
///
|
||||
wxCDAudioLinux();
|
||||
///
|
||||
wxCDAudioLinux(const wxString& dev_name);
|
||||
///
|
||||
virtual ~wxCDAudioLinux();
|
||||
|
||||
///
|
||||
virtual bool Play(const wxCDtime& beg_time, const wxCDtime& end_time);
|
||||
///
|
||||
virtual bool Pause();
|
||||
///
|
||||
virtual bool Resume();
|
||||
///
|
||||
virtual CDstatus GetStatus();
|
||||
///
|
||||
virtual wxCDtime GetTime();
|
||||
///
|
||||
virtual CDtoc& GetToc();
|
||||
///
|
||||
virtual inline bool Ok() const { return (m_fd != -1); }
|
||||
protected:
|
||||
///
|
||||
void OpenDevice(const wxString& dev_name);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,62 +0,0 @@
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cdwin.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __CDA_win_H__
|
||||
#define __CDA_win_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
#include "cdbase.h"
|
||||
|
||||
#ifdef WXMMEDIA_INTERNAL
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
typedef struct CDAW_Internal {
|
||||
MCIDEVICEID dev_id;
|
||||
} CDAW_Internal;
|
||||
#endif
|
||||
|
||||
///
|
||||
class WXDLLEXPORT wxCDAudioWin : public wxCDAudio {
|
||||
DECLARE_DYNAMIC_CLASS(wxCDAudioWin)
|
||||
protected:
|
||||
struct CDAW_Internal *m_internal;
|
||||
wxCDtime *m_trksize, *m_trkpos;
|
||||
CDtoc *m_toc;
|
||||
bool m_ok;
|
||||
public:
|
||||
///
|
||||
wxCDAudioWin(void);
|
||||
///
|
||||
wxCDAudioWin(const char *dev_name);
|
||||
///
|
||||
virtual ~wxCDAudioWin(void);
|
||||
|
||||
///
|
||||
virtual bool Play(const wxCDtime& beg_time, const wxCDtime& end_time);
|
||||
///
|
||||
virtual bool Pause(void);
|
||||
///
|
||||
virtual bool Resume(void);
|
||||
///
|
||||
virtual CDstatus GetStatus(void);
|
||||
///
|
||||
virtual wxCDtime GetTime(void);
|
||||
///
|
||||
virtual const CDtoc& GetToc(void);
|
||||
///
|
||||
virtual inline bool Ok(void) const { return m_ok; }
|
||||
protected:
|
||||
void PrepareToc();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* This source code is a product of Sun Microsystems, Inc. and is provided
|
||||
* for unrestricted use. Users may copy or modify this source code without
|
||||
* charge.
|
||||
*
|
||||
* SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
|
||||
* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun source code is provided with no support and without any obligation on
|
||||
* the part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
|
||||
/*
|
||||
* g72x.h
|
||||
*
|
||||
* Header file for CCITT conversion routines.
|
||||
*
|
||||
*/
|
||||
#ifndef _G72X_H
|
||||
#define _G72X_H
|
||||
|
||||
#define AUDIO_ENCODING_ULAW (1) /* ISDN u-law */
|
||||
#define AUDIO_ENCODING_ALAW (2) /* ISDN A-law */
|
||||
#define AUDIO_ENCODING_LINEAR (3) /* PCM 2's-complement (0-center) */
|
||||
|
||||
/*
|
||||
* The following is the definition of the state structure
|
||||
* used by the G.721/G.723 encoder and decoder to preserve their internal
|
||||
* state between successive calls. The meanings of the majority
|
||||
* of the state structure fields are explained in detail in the
|
||||
* CCITT Recommendation G.721. The field names are essentially indentical
|
||||
* to variable names in the bit level description of the coding algorithm
|
||||
* included in this Recommendation.
|
||||
*/
|
||||
struct g72x_state {
|
||||
long yl; /* Locked or steady state step size multiplier. */
|
||||
short yu; /* Unlocked or non-steady state step size multiplier. */
|
||||
short dms; /* Short term energy estimate. */
|
||||
short dml; /* Long term energy estimate. */
|
||||
short ap; /* Linear weighting coefficient of 'yl' and 'yu'. */
|
||||
|
||||
short a[2]; /* Coefficients of pole portion of prediction filter. */
|
||||
short b[6]; /* Coefficients of zero portion of prediction filter. */
|
||||
short pk[2]; /*
|
||||
* Signs of previous two samples of a partially
|
||||
* reconstructed signal.
|
||||
*/
|
||||
short dq[6]; /*
|
||||
* Previous 6 samples of the quantized difference
|
||||
* signal represented in an internal floating point
|
||||
* format.
|
||||
*/
|
||||
short sr[2]; /*
|
||||
* Previous 2 samples of the quantized difference
|
||||
* signal represented in an internal floating point
|
||||
* format.
|
||||
*/
|
||||
char td; /* delayed tone detect, new in 1988 version */
|
||||
};
|
||||
|
||||
/* External function definitions. */
|
||||
|
||||
extern unsigned char linear2alaw (int pcm_val); /* 2's complement (16-bit range) */
|
||||
extern int alaw2linear (unsigned char a_val);
|
||||
extern unsigned char linear2ulaw (int pcm_val); /* 2's complement (16-bit range) */
|
||||
extern int ulaw2linear (unsigned char u_val);
|
||||
extern int predictor_zero (struct g72x_state *state_ptr);
|
||||
extern int predictor_pole (struct g72x_state *state_ptr);
|
||||
extern int step_size (struct g72x_state *state_ptr);
|
||||
extern int quantize (int d, int y, short *table, int size);
|
||||
extern int reconstruct (int sign, int dqln, int y);
|
||||
|
||||
extern void update
|
||||
( int code_size, int y, int wi, int fi, int dq
|
||||
, int sr, int dqsez, struct g72x_state *state_ptr);
|
||||
|
||||
int tandem_adjust_alaw
|
||||
(int sr, int se, int y, int i, int sign, short *qtab);
|
||||
|
||||
int tandem_adjust_ulaw
|
||||
(int sr, int se, int y, int i, int sign, short *qtab);
|
||||
|
||||
extern void g72x_init_state (struct g72x_state *);
|
||||
extern int g721_encoder(
|
||||
int sample,
|
||||
int in_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g721_decoder(
|
||||
int code,
|
||||
int out_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_24_encoder(
|
||||
int sample,
|
||||
int in_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_24_decoder(
|
||||
int code,
|
||||
int out_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_40_encoder(
|
||||
int sample,
|
||||
int in_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
extern int g723_40_decoder(
|
||||
int code,
|
||||
int out_coding,
|
||||
struct g72x_state *state_ptr);
|
||||
|
||||
#endif /* !_G72X_H */
|
@@ -1,46 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndaiff.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDAIFF_H
|
||||
#define _WX_SNDAIFF_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndaiff.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
|
||||
//
|
||||
// AIFF codec
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundAiff: public wxSoundFileStream {
|
||||
public:
|
||||
wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound);
|
||||
wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||
~wxSoundAiff();
|
||||
|
||||
bool CanRead();
|
||||
wxString GetCodecName() const;
|
||||
|
||||
protected:
|
||||
bool PrepareToPlay();
|
||||
bool PrepareToRecord(wxUint32 time);
|
||||
bool FinishRecording();
|
||||
bool RepositionStream(wxUint32 position);
|
||||
|
||||
wxUint32 GetData(void *buffer, wxUint32 len);
|
||||
wxUint32 PutData(const void *buffer, wxUint32 len);
|
||||
protected:
|
||||
off_t m_base_offset;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,171 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndbase.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDBASE_H
|
||||
#define _WX_SNDBASE_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndbase.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// DEFINITIONS
|
||||
|
||||
// ---------------------
|
||||
// Sound streaming mode:
|
||||
// - wxSOUND_INPUT: simple recording mode
|
||||
// - wxSOUND_OUTPUT: simple playing mode
|
||||
// - wxSOUND_DUPLEX: full duplex record/play at the same time
|
||||
// ---------------------
|
||||
enum {
|
||||
wxSOUND_INPUT = 1,
|
||||
wxSOUND_OUTPUT = 2,
|
||||
wxSOUND_DUPLEX = wxSOUND_INPUT | wxSOUND_OUTPUT,
|
||||
};
|
||||
|
||||
// ---------------------
|
||||
// wxSoundFormatType: it specifies the format family of the sound data
|
||||
// which will be passed to the stream.
|
||||
// ---------------------
|
||||
typedef enum {
|
||||
wxSOUND_NOFORMAT,
|
||||
wxSOUND_PCM,
|
||||
wxSOUND_ULAW,
|
||||
wxSOUND_G72X,
|
||||
wxSOUND_MSADPCM
|
||||
} wxSoundFormatType;
|
||||
|
||||
// ---------------------
|
||||
// wxSoundError:
|
||||
// - wxSOUND_NOERR: No error occured
|
||||
// - wxSOUND_IOERR: an input/output error occured, it may concern either
|
||||
// a driver or a file
|
||||
// - wxSOUND_INVFRMT: the sound format passed to the function is invalid.
|
||||
// Generally, it means that you passed out of range values
|
||||
// to the codec stream or you don't pass the right sound
|
||||
// format object to the right sound codec stream.
|
||||
// - wxSOUND_INVDEV: Invalid device. Generally, it means that the sound stream
|
||||
// didn't manage to open the device driver due to an invalid// parameter or to the fact that sound is not supported on
|
||||
// this computer.
|
||||
// - wxSOUND_NOEXACT: No exact matching sound codec has been found for
|
||||
// this sound format. It means that the sound driver didn't
|
||||
// manage to setup the sound card with the specified
|
||||
// values.
|
||||
// - wxSOUND_NOCODEC: No matching codec has been found. Generally, it
|
||||
// may happen when you call
|
||||
// wxSoundRouterStream::SetSoundFormat().
|
||||
// - wxSOUND_MEMERR: Not enough memory.
|
||||
// - wxSOUND_NOTSTARTED: You did not start the production using
|
||||
// StartProduction()
|
||||
// ---------------------
|
||||
typedef enum {
|
||||
wxSOUND_NOERROR,
|
||||
wxSOUND_IOERROR,
|
||||
wxSOUND_INVFRMT,
|
||||
wxSOUND_INVDEV,
|
||||
wxSOUND_NOEXACT,
|
||||
wxSOUND_INVSTRM,
|
||||
wxSOUND_NOCODEC,
|
||||
wxSOUND_MEMERROR,
|
||||
wxSOUND_NOTSTARTED
|
||||
} wxSoundError;
|
||||
|
||||
class WXDLLEXPORT wxSoundStream;
|
||||
|
||||
// ---------------------
|
||||
// wxSoundCallback(stream, evt, cdata): C callback for sound event.
|
||||
// - stream: current wxSoundStream
|
||||
// - evt: the sound event which has occured, it may be wxSOUND_INPUT,
|
||||
// wxSOUND_OUTPUT or wxSOUND_DUPLEX
|
||||
// - cdata: User callback data
|
||||
// ---------------------
|
||||
typedef void (*wxSoundCallback)(wxSoundStream *stream, int evt,
|
||||
void *cdata);
|
||||
|
||||
//
|
||||
// Base class for sound format specification
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatBase();
|
||||
virtual ~wxSoundFormatBase();
|
||||
|
||||
// It returns a "standard" format type.
|
||||
virtual wxSoundFormatType GetType() const { return wxSOUND_NOFORMAT; }
|
||||
// It clones the current format.
|
||||
virtual wxSoundFormatBase *Clone() const;
|
||||
|
||||
virtual wxUint32 GetTimeFromBytes(wxUint32 bytes) const = 0;
|
||||
virtual wxUint32 GetBytesFromTime(wxUint32 time) const = 0;
|
||||
|
||||
virtual bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
};
|
||||
|
||||
//
|
||||
// Base class for sound streams
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundStream {
|
||||
public:
|
||||
wxSoundStream();
|
||||
virtual ~wxSoundStream();
|
||||
|
||||
// Reads "len" bytes from the sound stream.
|
||||
virtual wxSoundStream& Read(void *buffer, wxUint32 len) = 0;
|
||||
// Writes "len" byte to the sound stream.
|
||||
virtual wxSoundStream& Write(const void *buffer, wxUint32 len) = 0;
|
||||
// Returns the best size for IO calls
|
||||
virtual wxUint32 GetBestSize() const { return 1024; }
|
||||
|
||||
// SetSoundFormat returns TRUE when the format can be handled.
|
||||
virtual bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
// GetSoundFormat returns the current sound format.
|
||||
wxSoundFormatBase& GetSoundFormat() const { return *m_sndformat; }
|
||||
|
||||
// Register a callback for a specified async event.
|
||||
void SetCallback(int evt, wxSoundCallback cbk, void *cdata);
|
||||
|
||||
// Starts the async notifier. After this call, the stream begins either
|
||||
// recording or playing or the two at the same time.
|
||||
virtual bool StartProduction(int evt) = 0;
|
||||
// Stops the async notifier.
|
||||
virtual bool StopProduction() = 0;
|
||||
// Sets the event handler: if it is non-null, all events are routed to it.
|
||||
void SetEventHandler(wxSoundStream *handler) { m_handler = handler; }
|
||||
|
||||
wxSoundError GetError() const { return m_snderror; }
|
||||
wxUint32 GetLastAccess() const { return m_lastcount; }
|
||||
|
||||
// This is only useful for device (I think).
|
||||
virtual bool QueueFilled() const { return TRUE; }
|
||||
|
||||
protected:
|
||||
// Current sound format
|
||||
wxSoundFormatBase *m_sndformat;
|
||||
|
||||
// Last error
|
||||
wxSoundError m_snderror;
|
||||
|
||||
// Last access
|
||||
wxUint32 m_lastcount;
|
||||
|
||||
// Event handler
|
||||
wxSoundStream *m_handler;
|
||||
|
||||
wxSoundCallback m_callback[2];
|
||||
void *m_cdata[2];
|
||||
|
||||
protected:
|
||||
// Handles event
|
||||
virtual void OnSoundEvent(int evt);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,32 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndcodec.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDCODEC_H
|
||||
#define _WX_SNDCODEC_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndcodec.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
class WXDLLEXPORT wxSoundStreamCodec: public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamCodec(wxSoundStream& snd_io);
|
||||
~wxSoundStreamCodec();
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundStream *m_sndio;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,54 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndcpcm.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDCPCM_H
|
||||
#define _WX_SNDCPCM_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndcpcm.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
|
||||
//
|
||||
// PCM converter class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundStreamPcm: public wxSoundStreamCodec {
|
||||
public:
|
||||
typedef void (*ConverterType)(const void *buf_in, void *buf_out,
|
||||
wxUint32 len);
|
||||
|
||||
wxSoundStreamPcm(wxSoundStream& sndio);
|
||||
~wxSoundStreamPcm();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxUint32 GetReadSize(wxUint32 len) const;
|
||||
wxUint32 GetWriteSize(wxUint32 len) const;
|
||||
|
||||
protected:
|
||||
ConverterType m_function_out, m_function_in;
|
||||
|
||||
// Static temporary buffer
|
||||
char *m_prebuffer;
|
||||
wxUint32 m_prebuffer_size;
|
||||
// Estimated best size to fit into the static buffer
|
||||
wxUint32 m_best_size;
|
||||
// Multiplier for IO buffer size
|
||||
float m_multiplier_in, m_multiplier_out;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,53 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndesd.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDESD_H
|
||||
#define _WX_SNDESD_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndesd.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
|
||||
//
|
||||
// ESD output class
|
||||
//
|
||||
|
||||
class wxSoundStreamESD : public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamESD(const wxString& hostname = wxT("localhost"));
|
||||
~wxSoundStreamESD();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
// You should not call this.
|
||||
void WakeUpEvt(int evt);
|
||||
|
||||
bool QueueFilled() const { return m_q_filled; }
|
||||
protected:
|
||||
int m_fd_input, m_fd_output; // ESD fds
|
||||
int m_tag_input, m_tag_output; // GLIB tags
|
||||
bool m_esd_stop; // Stream started ?
|
||||
bool m_esd_ok; // ESD detected
|
||||
wxString m_hostname; // ESD host
|
||||
bool m_q_filled; // queue filled
|
||||
|
||||
private:
|
||||
void DetectBest(wxSoundFormatPcm *pcm);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,125 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndfile.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDFILE_H
|
||||
#define _WX_SNDFILE_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
|
||||
#define wxSOUND_INFINITE_TIME ((wxUint32)-1)
|
||||
|
||||
//
|
||||
// Codec router class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundRouterStream: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundRouterStream(wxSoundStream& sndio);
|
||||
~wxSoundRouterStream();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundStream *m_router;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
wxSOUND_FILE_STOPPED,
|
||||
wxSOUND_FILE_PAUSED,
|
||||
wxSOUND_FILE_PLAYING,
|
||||
wxSOUND_FILE_RECORDING
|
||||
} wxSoundFileState;
|
||||
|
||||
//
|
||||
// Base class for file coders/decoders
|
||||
//
|
||||
|
||||
class wxSoundFileStream: public wxSoundStream {
|
||||
public:
|
||||
wxSoundFileStream(wxInputStream& stream, wxSoundStream& io_sound);
|
||||
wxSoundFileStream(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||
~wxSoundFileStream();
|
||||
|
||||
// Usual sound file calls (Play, Stop, ...)
|
||||
bool Play();
|
||||
bool Record(wxUint32 time);
|
||||
bool Stop();
|
||||
bool Pause();
|
||||
bool Resume();
|
||||
|
||||
// Functions which return the current state
|
||||
bool IsStopped() const { return m_state == wxSOUND_FILE_STOPPED; }
|
||||
bool IsPaused() const { return m_state == wxSOUND_FILE_PAUSED; }
|
||||
|
||||
// A user should not call these two functions.
|
||||
// Several things must be done before calling them.
|
||||
// Users should use Play(), ...
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
// These three functions deals with the length, the position in the sound file.
|
||||
// All the values are expressed in bytes. If you need the values expressed
|
||||
// in terms of time, you have to use GetSoundFormat().GetTimeFromBytes(...)
|
||||
wxUint32 GetLength();
|
||||
wxUint32 GetPosition();
|
||||
wxUint32 SetPosition(wxUint32 new_position);
|
||||
|
||||
// These two functions use the sound format specified by GetSoundFormat().
|
||||
// All samples must be encoded in that format.
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
// This function set the sound format of the file. !! It must be used only
|
||||
// when you are in output mode (concerning the file) !! If you are in
|
||||
// input mode (concerning the file) you can't use this function to modify
|
||||
// the format of the samples returned by Read() !
|
||||
// For this action, you must use wxSoundRouterStream applied to wxSoundFileStream.
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
// This function returns the Codec name. This is useful for those who want to build
|
||||
// a player (But also in some other case).
|
||||
virtual wxString GetCodecName() const;
|
||||
|
||||
// You should use this function to test whether this file codec can read
|
||||
// the stream you passed to it.
|
||||
virtual bool CanRead() { return FALSE; }
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream m_codec;
|
||||
wxSoundStream *m_sndio;
|
||||
wxInputStream *m_input;
|
||||
wxOutputStream *m_output;
|
||||
|
||||
wxSoundFileState m_state, m_oldstate;
|
||||
wxUint32 m_length, m_bytes_left;
|
||||
bool m_prepared;
|
||||
|
||||
protected:
|
||||
virtual bool PrepareToPlay() = 0;
|
||||
virtual bool PrepareToRecord(wxUint32 time) = 0;
|
||||
virtual bool FinishRecording() = 0;
|
||||
virtual bool RepositionStream(wxUint32 position) = 0;
|
||||
void FinishPreparation(wxUint32 len);
|
||||
|
||||
virtual wxUint32 GetData(void *buffer, wxUint32 len) = 0;
|
||||
virtual wxUint32 PutData(const void *buffer, wxUint32 len) = 0;
|
||||
|
||||
void OnSoundEvent(int evt);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,85 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndg72x.h
|
||||
// Purpose:
|
||||
// Date: 08/26/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDG72X_H
|
||||
#define _WX_SNDG72X_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndg72x.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
typedef enum {
|
||||
wxSOUND_G721,
|
||||
wxSOUND_G723_24,
|
||||
wxSOUND_G723_40
|
||||
} wxSoundG72XType;
|
||||
|
||||
// This fixes a bug in Mingw95
|
||||
typedef struct g72x_state g72state;
|
||||
|
||||
//
|
||||
// G72X format
|
||||
//
|
||||
class WXDLLEXPORT wxSoundFormatG72X: public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatG72X();
|
||||
~wxSoundFormatG72X();
|
||||
|
||||
void SetG72XType(wxSoundG72XType type);
|
||||
wxSoundG72XType GetG72XType() const { return m_g72x_type; }
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_G72X; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate;
|
||||
wxSoundG72XType m_g72x_type;
|
||||
};
|
||||
|
||||
//
|
||||
// ULAW converter class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundRouterStream;
|
||||
class WXDLLEXPORT wxSoundStreamG72X: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundStreamG72X(wxSoundStream& sndio);
|
||||
~wxSoundStreamG72X();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream *m_router;
|
||||
wxUint8 m_n_bits, m_current_mask, m_current_b_pos, m_current_byte;
|
||||
wxUint8 *m_io_buffer;
|
||||
g72state *m_state;
|
||||
|
||||
int (*m_coder)(int code, int in_code, struct g72x_state *state);
|
||||
int (*m_decoder)(int code, int out_code, struct g72x_state *state);
|
||||
|
||||
protected:
|
||||
void PutBits(wxUint8 bits);
|
||||
wxUint8 GetBits();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,104 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndmsad(pcm).h
|
||||
// Purpose: MS ADPCM codec
|
||||
// Date: 25/02/2000
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 2000
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDMSAD_H
|
||||
#define _WX_SNDMSAD_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndmsad.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY(wxInt16, wxMSAdpcmCoeffs);
|
||||
|
||||
//
|
||||
// MSADPCM format
|
||||
//
|
||||
class WXDLLEXPORT wxSoundFormatMSAdpcm: public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatMSAdpcm();
|
||||
~wxSoundFormatMSAdpcm();
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
void SetCoefs(wxInt16 **coefs, wxUint16 ncoefs, wxUint16 coefs_len);
|
||||
void GetCoefs(wxInt16 **&coefs, wxUint16& ncoefs,
|
||||
wxUint16& coefs_len) const;
|
||||
|
||||
void SetBlockSize(wxUint16 block_size);
|
||||
wxUint16 GetBlockSize() const;
|
||||
|
||||
void SetChannels(wxUint16 channels);
|
||||
wxUint16 GetChannels() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_MSADPCM; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate, m_nchannels;
|
||||
wxInt16 **m_coefs;
|
||||
wxUint16 m_ncoefs, m_coefs_len;
|
||||
wxUint16 m_block_size;
|
||||
};
|
||||
|
||||
//
|
||||
// MS ADPCM converter class
|
||||
//
|
||||
class WXDLLEXPORT wxSoundRouterStream;
|
||||
class WXDLLEXPORT wxSoundStreamMSAdpcm: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundStreamMSAdpcm(wxSoundStream& sndio);
|
||||
~wxSoundStreamMSAdpcm();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream *m_router;
|
||||
|
||||
typedef struct {
|
||||
wxInt32 predictor;
|
||||
wxInt16 samp1;
|
||||
wxInt16 samp2;
|
||||
wxInt16 coeff[2];
|
||||
wxInt32 iDelta;
|
||||
} AdpcmState;
|
||||
|
||||
AdpcmState m_state[1];
|
||||
|
||||
bool m_got_header;
|
||||
bool m_stereo;
|
||||
wxInt16 **m_coefs;
|
||||
wxUint16 m_block_size;
|
||||
wxUint16 m_ncoefs;
|
||||
wxUint16 m_next_block;
|
||||
|
||||
protected:
|
||||
wxUint32 DecodeMonoADPCM(const void *in_buffer, void *out_buffer,
|
||||
wxUint32 in_len);
|
||||
wxUint32 DecodeStereoADPCM(const void *in_buffer, void *out_buffer,
|
||||
wxUint32 in_len);
|
||||
void Nibble(wxInt8 nyb,
|
||||
AdpcmState *state,
|
||||
wxInt16 **out_buffer);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,55 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndoss.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDOSS_H
|
||||
#define _WX_SNDOSS_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndoss.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndpcm.h"
|
||||
|
||||
//
|
||||
// OSS output class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundStreamOSS : public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamOSS(const wxString& dev_name = wxT("/dev/dsp"));
|
||||
~wxSoundStreamOSS();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
bool QueueFilled() const;
|
||||
|
||||
// You should not call this.
|
||||
void WakeUpEvt(int evt);
|
||||
protected:
|
||||
// OSS device
|
||||
int m_fd;
|
||||
wxUint32 m_bufsize;
|
||||
int m_tag;
|
||||
bool m_oss_stop, m_oss_ok, m_q_filled;
|
||||
wxString m_devname;
|
||||
|
||||
private:
|
||||
bool SetupFormat(wxSoundFormatPcm *pcm);
|
||||
void DetectBest(wxSoundFormatPcm *pcm);
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,57 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndpcm.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDPCM_H
|
||||
#define _WX_SNDPCM_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndpcm.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
//
|
||||
// PCM specification class
|
||||
//
|
||||
|
||||
class wxSoundFormatPcm : public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatPcm(wxUint32 srate = 22500, wxUint8 bps = 8,
|
||||
wxUint16 channels = 2, bool sign = TRUE,
|
||||
int order = wxLITTLE_ENDIAN);
|
||||
~wxSoundFormatPcm();
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
void SetBPS(wxUint8 bps);
|
||||
void SetChannels(wxUint16 nchannels);
|
||||
void SetOrder(int order);
|
||||
void Signed(bool sign);
|
||||
|
||||
wxUint32 GetSampleRate() const { return m_srate; }
|
||||
wxUint8 GetBPS() const { return m_bps; }
|
||||
wxUint16 GetChannels() const { return m_nchan; }
|
||||
int GetOrder() const { return m_order; }
|
||||
bool Signed() const { return m_signed; }
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_PCM; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator!=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate;
|
||||
wxUint8 m_bps;
|
||||
wxUint16 m_nchan;
|
||||
int m_order;
|
||||
bool m_signed;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,67 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndulaw.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDULAW_H
|
||||
#define _WX_SNDULAW_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndulaw.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
//
|
||||
// ULAW format
|
||||
//
|
||||
class WXDLLEXPORT wxSoundFormatUlaw: public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatUlaw();
|
||||
~wxSoundFormatUlaw();
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
void SetChannels(wxUint8 channels);
|
||||
wxUint8 GetChannels() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate;
|
||||
wxUint8 m_channels;
|
||||
};
|
||||
|
||||
//
|
||||
// ULAW converter class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundRouterStream;
|
||||
class WXDLLEXPORT wxSoundStreamUlaw: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundStreamUlaw(wxSoundStream& sndio);
|
||||
~wxSoundStreamUlaw();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(const wxSoundFormatBase& format);
|
||||
|
||||
wxUint32 GetBestSize() const;
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream *m_router;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,64 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndwav.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDWAV_H
|
||||
#define _WX_SNDWAV_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndwav.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/datstrm.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndfile.h"
|
||||
|
||||
//
|
||||
// WAVE codec
|
||||
//
|
||||
|
||||
class wxSoundWave: public wxSoundFileStream {
|
||||
public:
|
||||
wxSoundWave(wxInputStream& stream, wxSoundStream& io_sound);
|
||||
wxSoundWave(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||
~wxSoundWave();
|
||||
|
||||
bool CanRead();
|
||||
wxString GetCodecName() const;
|
||||
|
||||
protected:
|
||||
bool PrepareToPlay();
|
||||
bool PrepareToRecord(wxUint32 time);
|
||||
bool FinishRecording();
|
||||
bool RepositionStream(wxUint32 position);
|
||||
|
||||
wxUint32 GetData(void *buffer, wxUint32 len);
|
||||
wxUint32 PutData(const void *buffer, wxUint32 len);
|
||||
|
||||
bool HandleOutputPCM(wxDataInputStream& data, wxUint32 len,
|
||||
wxUint16 channels, wxUint32 sample_fq,
|
||||
wxUint32 byte_p_sec, wxUint16 byte_p_spl,
|
||||
wxUint16 bits_p_spl);
|
||||
bool HandleOutputMSADPCM(wxDataInputStream& data, wxUint32 len,
|
||||
wxUint16 channels, wxUint32 sample_fq,
|
||||
wxUint32 byte_p_sec, wxUint16 byte_p_spl,
|
||||
wxUint16 bits_p_spl);
|
||||
bool HandleOutputG721(wxDataInputStream& data, wxUint32 len,
|
||||
wxUint16 channels, wxUint32 sample_fq,
|
||||
wxUint32 byte_p_sec, wxUint16 byte_p_spl,
|
||||
wxUint16 bits_p_spl);
|
||||
wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
|
||||
wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
|
||||
|
||||
protected:
|
||||
off_t m_base_offset;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,65 +0,0 @@
|
||||
// --------------------------------------------------------------------------
|
||||
// Name: sndwin.h
|
||||
// Purpose:
|
||||
// Date: 08/11/1999
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 1999
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDWIN_H
|
||||
#define _WX_SNDWIN_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
typedef struct _wxSoundInternal wxSoundInternal;
|
||||
typedef struct _wxSoundInfoHeader wxSoundInfoHeader;
|
||||
|
||||
// class WXDLLEXPORT wxSoundInternal;
|
||||
class WXDLLEXPORT wxSoundStreamWin : public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamWin();
|
||||
~wxSoundStreamWin();
|
||||
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
|
||||
bool SetSoundFormat(wxSoundFormatBase& base);
|
||||
|
||||
bool StartProduction(int evt);
|
||||
bool StopProduction();
|
||||
|
||||
bool QueueFilled() const;
|
||||
|
||||
// Internal but defined as public
|
||||
void NotifyDoneBuffer(wxUint32 dev_handle, int flag);
|
||||
|
||||
wxUint32 GetBestSize() const { return 4096; }
|
||||
|
||||
protected:
|
||||
wxSoundInternal *m_internal;
|
||||
wxUint32 m_current_frag_in, m_current_frag_out;
|
||||
wxUint32 m_input_frag_in, m_output_frag_out;
|
||||
wxSoundInfoHeader **m_headers_play, **m_headers_rec;
|
||||
|
||||
bool m_production_started, m_queue_filled, m_waiting_for;
|
||||
|
||||
protected:
|
||||
void CreateSndWindow();
|
||||
void DestroySndWindow();
|
||||
bool OpenDevice(int mode);
|
||||
void CloseDevice();
|
||||
|
||||
wxSoundInfoHeader *AllocHeader(int mode);
|
||||
void FreeHeader(wxSoundInfoHeader *header, int mode);
|
||||
bool AllocHeaders(int mode);
|
||||
void FreeHeaders(int mode);
|
||||
|
||||
void WaitFor(wxSoundInfoHeader *info);
|
||||
bool AddToQueue(wxSoundInfoHeader *info);
|
||||
void ClearHeader(wxSoundInfoHeader *info);
|
||||
|
||||
wxSoundInfoHeader *NextFragmentOutput();
|
||||
wxSoundInfoHeader *NextFragmentInput();
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,110 +0,0 @@
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
// Name: vidbase.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: 1997
|
||||
// Updated: 1998
|
||||
// Copyright: (C) 1997, 1998, Guilhem Lavaux
|
||||
// CVS: $Id$
|
||||
// License: wxWindows license
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
/* Real -*- C++ -*- */
|
||||
#ifndef __VID_bdrv_H__
|
||||
#define __VID_bdrv_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "vidbase.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/frame.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMMedia2 (video) types
|
||||
|
||||
typedef enum {
|
||||
wxVIDEO_MSAVI,
|
||||
wxVIDEO_MPEG,
|
||||
wxVIDEO_QT,
|
||||
wxVIDEO_GIF,
|
||||
wxVIDEO_JMOV,
|
||||
wxVIDEO_FLI,
|
||||
wxVIDEO_IFF,
|
||||
wxVIDEO_SGI,
|
||||
wxVIDEO_MPEG2
|
||||
} wxVideoType;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Classes definition
|
||||
|
||||
class WXDLLEXPORT wxVideoBaseDriver : public wxObject {
|
||||
DECLARE_ABSTRACT_CLASS(wxVideoBaseDriver)
|
||||
protected:
|
||||
wxWindow *m_video_output;
|
||||
public:
|
||||
// Ctors
|
||||
wxVideoBaseDriver();
|
||||
wxVideoBaseDriver(wxInputStream& str);
|
||||
wxVideoBaseDriver(const wxString& filename);
|
||||
// Dtor
|
||||
virtual ~wxVideoBaseDriver();
|
||||
|
||||
// Usual functions ... They all return FALSE in case of errors.
|
||||
virtual bool Play() = 0;
|
||||
virtual bool Stop() = 0;
|
||||
virtual bool Pause() = 0;
|
||||
virtual bool Resume() = 0;
|
||||
|
||||
// Size management
|
||||
virtual bool SetSize(wxSize size) = 0;
|
||||
virtual bool GetSize(wxSize& size) const = 0;
|
||||
|
||||
// Test the capability of the driver to handle the specified type
|
||||
virtual bool IsCapable(wxVideoType WXUNUSED(v_type)) const { return FALSE; }
|
||||
|
||||
// Return the video codec name
|
||||
virtual wxString GetMovieCodec() const = 0;
|
||||
// Return the audio codec name
|
||||
virtual wxString GetAudioCodec() const = 0;
|
||||
// Return misc info about audio
|
||||
virtual wxUint32 GetSampleRate() const = 0;
|
||||
virtual wxUint8 GetChannels() const = 0;
|
||||
virtual wxUint8 GetBPS() const = 0;
|
||||
// Return frame rate
|
||||
virtual double GetFrameRate() const = 0;
|
||||
// Return number of frames
|
||||
virtual wxUint32 GetNbFrames() const = 0;
|
||||
|
||||
// Called when the movie finished
|
||||
virtual void OnFinished() {}
|
||||
|
||||
// Attaches the video output to a window. The video will be shown in that window.
|
||||
virtual bool AttachOutput(wxWindow& output);
|
||||
virtual void DetachOutput();
|
||||
|
||||
// They return the state of the movie.
|
||||
virtual bool IsPaused() const = 0;
|
||||
virtual bool IsStopped() const = 0;
|
||||
};
|
||||
|
||||
WXDLLEXPORT wxFrame *wxVideoCreateFrame(wxVideoBaseDriver *vid_drv);
|
||||
|
||||
|
||||
#endif
|
@@ -1,101 +0,0 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// Name: vidwin.h
|
||||
// Purpose: wxMMedia
|
||||
// Author: Guilhem Lavaux
|
||||
// Created: February 1998
|
||||
// Updated:
|
||||
// Copyright: (C) 1998, Guilhem Lavaux
|
||||
// License: wxWindows license
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __VID_windows_H__
|
||||
#define __VID_windows_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "vidwin.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/window.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMMedia2 headers
|
||||
|
||||
#include "wx/mmedia/vidbase.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// System headers and private types
|
||||
|
||||
#ifdef WXMMEDIA_INTERNAL
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
typedef struct VIDW_Internal {
|
||||
MCIDEVICEID m_dev_id;
|
||||
} wxVIDWinternal;
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Class definition
|
||||
|
||||
class WXDLLEXPORT wxVideoWindows : public wxVideoBaseDriver {
|
||||
DECLARE_DYNAMIC_CLASS(wxVideoWindows)
|
||||
protected:
|
||||
struct VIDW_Internal *m_internal;
|
||||
bool m_paused, m_stopped, m_remove_file;
|
||||
wxString m_filename;
|
||||
double m_frameRate;
|
||||
wxUint8 m_bps;
|
||||
|
||||
void OpenFile();
|
||||
public:
|
||||
wxVideoWindows(void);
|
||||
wxVideoWindows(wxInputStream& str);
|
||||
wxVideoWindows(const wxString& fname);
|
||||
~wxVideoWindows(void);
|
||||
|
||||
bool Play();
|
||||
bool Stop();
|
||||
bool Pause();
|
||||
bool Resume();
|
||||
|
||||
bool GetSize(wxSize& size) const;
|
||||
bool SetSize(wxSize size);
|
||||
|
||||
// Return codec name for each stream.
|
||||
wxString GetMovieCodec() const;
|
||||
wxString GetAudioCodec() const;
|
||||
// Return misc. info about audio
|
||||
wxUint32 GetSampleRate() const;
|
||||
wxUint8 GetChannels() const;
|
||||
wxUint8 GetBPS() const;
|
||||
// Return the frame rate of the video (in frames/second)
|
||||
double GetFrameRate() const;
|
||||
// Return the total number of frames in the movie
|
||||
wxUint32 GetNbFrames() const;
|
||||
|
||||
bool IsCapable(wxVideoType v_type);
|
||||
|
||||
bool AttachOutput(wxWindow& output);
|
||||
void DetachOutput(void);
|
||||
|
||||
bool IsPaused() const;
|
||||
bool IsStopped() const;
|
||||
};
|
||||
|
||||
#endif
|