Compare commits
1 Commits
wxPython-2
...
OLD_HEADER
Author | SHA1 | Date | |
---|---|---|---|
|
43303c7386 |
250
include/install-sh
Executable file
250
include/install-sh
Executable file
@@ -0,0 +1,250 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
19
include/wx/accel.h
Normal file
19
include/wx/accel.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_ACCEL_H_BASE_
|
||||
#define _WX_ACCEL_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/accel.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/accel.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/accel.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/accel.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/accel.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/accel.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_ACCEL_H_BASE_
|
98
include/wx/app.h
Normal file
98
include/wx/app.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: app.h
|
||||
// Purpose: wxApp inclusion
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_APP_H_BASE_
|
||||
#define _WX_APP_H_BASE_
|
||||
|
||||
#ifdef __WXMSW__
|
||||
class WXDLLEXPORT wxApp;
|
||||
typedef wxApp* (*wxAppInitializerFunction) (void);
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
typedef wxObject* (*wxAppInitializerFunction) (void); // returning wxApp* won't work with gcc
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/app.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/app.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/app.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/app.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/app.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/app.h"
|
||||
#endif
|
||||
|
||||
// Having a global instance of this class allows
|
||||
// wxApp to be aware of the app creator function.
|
||||
// wxApp can then call this function to create a new
|
||||
// app object. Convoluted, but necessary.
|
||||
|
||||
class WXDLLEXPORT wxAppInitializer
|
||||
{
|
||||
public:
|
||||
wxAppInitializer(wxAppInitializerFunction fn)
|
||||
{
|
||||
wxApp::SetInitializerFunction(fn);
|
||||
}
|
||||
};
|
||||
|
||||
// Here's a macro you can use if your compiler
|
||||
// really, really wants main() to be in your main program
|
||||
// (e.g. hello.cpp).
|
||||
// Now IMPLEMENT_APP should add this code if required.
|
||||
|
||||
#if defined(__AIX__) || defined(__HPUX__)
|
||||
#define IMPLEMENT_WXWIN_MAIN \
|
||||
extern int wxEntry( int argc, char *argv[] ); \
|
||||
int main(int argc, char *argv[]) { return wxEntry(argc, argv); }
|
||||
|
||||
#elif defined(__WXMSW__) && defined(WXUSINGDLL)
|
||||
|
||||
// NT defines APIENTRY, 3.x not
|
||||
#if !defined(WXAPIENTRY)
|
||||
# ifdef __WATCOMC__
|
||||
# define WXAPIENTRY PASCAL
|
||||
# else
|
||||
# define WXAPIENTRY FAR PASCAL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define IMPLEMENT_WXWIN_MAIN \
|
||||
int WXAPIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,\
|
||||
LPSTR m_lpCmdLine, int nCmdShow )\
|
||||
{\
|
||||
return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance,\
|
||||
m_lpCmdLine, nCmdShow);\
|
||||
}
|
||||
|
||||
#else
|
||||
#define IMPLEMENT_WXWIN_MAIN
|
||||
#endif
|
||||
|
||||
#define IMPLEMENT_APP(appname) \
|
||||
wxApp *wxCreateApp(void) { return new appname; } \
|
||||
wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
|
||||
appname& wxGetApp(void) { return *(appname *)wxTheApp; } \
|
||||
IMPLEMENT_WXWIN_MAIN
|
||||
|
||||
#define DECLARE_APP(appname) \
|
||||
extern appname& wxGetApp(void) ;
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_APP_H_BASE_
|
108
include/wx/arrimpl.cpp
Normal file
108
include/wx/arrimpl.cpp
Normal file
@@ -0,0 +1,108 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listimpl.cpp
|
||||
// Purpose: helper file for implementation of dynamic lists
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 16.10.97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1997 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*****************************************************************************
|
||||
* Purpose: implements methods of "template" class declared in *
|
||||
* DECLARE_OBJARRAY macro and which couldn't be implemented inline *
|
||||
* (because they need the full definition of type T in scope) *
|
||||
* *
|
||||
* Usage: 1) #include dynarray.h *
|
||||
* 2) WX_DECLARE_OBJARRAY *
|
||||
* 3) #include arrimpl.cpp *
|
||||
* 4) WX_DEFINE_OBJARRAY *
|
||||
*****************************************************************************/
|
||||
|
||||
// macro implements remaining (not inline) methods of template list
|
||||
// (it's private to this file)
|
||||
#undef _DEFINE_OBJARRAY
|
||||
#define _DEFINE_OBJARRAY(T, name) \
|
||||
name::~name() \
|
||||
{ \
|
||||
Empty(); \
|
||||
} \
|
||||
\
|
||||
void name::DoCopy(const name& src) \
|
||||
{ \
|
||||
for ( size_t ui = 0; ui < src.Count(); ui++ ) \
|
||||
Add(src[ui]); \
|
||||
} \
|
||||
\
|
||||
name& name::operator=(const name& src) \
|
||||
{ \
|
||||
Empty(); \
|
||||
DoCopy(src); \
|
||||
\
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
name::name(const name& src) \
|
||||
{ \
|
||||
DoCopy(src); \
|
||||
} \
|
||||
\
|
||||
void name::Empty() \
|
||||
{ \
|
||||
for ( size_t ui = 0; ui < Count(); ui++ ) \
|
||||
delete (T*)wxBaseArray::Item(ui); \
|
||||
\
|
||||
wxBaseArray::Clear(); \
|
||||
} \
|
||||
\
|
||||
void name::Remove(size_t uiIndex) \
|
||||
{ \
|
||||
wxCHECK_RET( uiIndex < Count(), _T("bad index in " #name "::Remove()") ); \
|
||||
\
|
||||
delete (T*)wxBaseArray::Item(uiIndex); \
|
||||
\
|
||||
wxBaseArray::Remove(uiIndex); \
|
||||
} \
|
||||
\
|
||||
void name::Add(const T& item) \
|
||||
{ \
|
||||
T* pItem = new T(item); \
|
||||
if ( pItem != NULL ) \
|
||||
Add(pItem); \
|
||||
} \
|
||||
\
|
||||
void name::Insert(const T& item, size_t uiIndex) \
|
||||
{ \
|
||||
T* pItem = new T(item); \
|
||||
if ( pItem != NULL ) \
|
||||
Insert(pItem, uiIndex); \
|
||||
} \
|
||||
\
|
||||
int name::Index(const T& Item, bool bFromEnd) const \
|
||||
{ \
|
||||
if ( bFromEnd ) { \
|
||||
if ( Count() > 0 ) { \
|
||||
size_t ui = Count() - 1; \
|
||||
do { \
|
||||
if ( (T*)wxBaseArray::Item(ui) == &Item ) \
|
||||
return ui; \
|
||||
ui--; \
|
||||
} \
|
||||
while ( ui != 0 ); \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
for( size_t ui = 0; ui < Count(); ui++ ) { \
|
||||
if( (T*)wxBaseArray::Item(ui) == &Item ) \
|
||||
return ui; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
return wxNOT_FOUND; \
|
||||
}
|
||||
|
||||
// redefine the macro so that now it will generate the class implementation
|
||||
// old value would provoke a compile-time error if this file is not included
|
||||
#undef WX_DEFINE_OBJARRAY
|
||||
#define WX_DEFINE_OBJARRAY(name) _DEFINE_OBJARRAY(_L##name, name)
|
19
include/wx/bitmap.h
Normal file
19
include/wx/bitmap.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_BITMAP_H_BASE_
|
||||
#define _WX_BITMAP_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/bitmap.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/bitmap.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/bitmap.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/bitmap.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/bitmap.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/bitmap.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_BITMAP_H_BASE_
|
18
include/wx/bmpbuttn.h
Normal file
18
include/wx/bmpbuttn.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef _WX_BMPBUTTON_H_BASE_
|
||||
#define _WX_BMPBUTTON_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/bmpbuttn.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/bmpbuttn.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/bmpbuttn.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/bmpbuttn.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/bmpbuttn.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#endif
|
19
include/wx/brush.h
Normal file
19
include/wx/brush.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_BRUSH_H_BASE_
|
||||
#define _WX_BRUSH_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/brush.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/brush.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/brush.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/brush.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/brush.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/brush.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_BRUSH_H_BASE_
|
127
include/wx/buffer.h
Normal file
127
include/wx/buffer.h
Normal file
@@ -0,0 +1,127 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: buffer.h
|
||||
// Purpose: auto buffer classes: buffers which automatically free memory
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 12.04.99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// these classes are for private use only for now, they're not documented
|
||||
|
||||
#ifndef _WX_BUFFER_H
|
||||
#define _WX_BUFFER_H
|
||||
|
||||
#include "wx/wxchar.h"
|
||||
#include <string.h> // strdup
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Special classes for (wide) character strings: they use malloc/free instead
|
||||
// of new/delete
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxCharBuffer
|
||||
{
|
||||
public:
|
||||
wxCharBuffer(const char *str)
|
||||
{
|
||||
wxASSERT_MSG( str, _T("NULL string in wxCharBuffer") );
|
||||
|
||||
m_str = str ? strdup(str) : (char *)NULL;
|
||||
}
|
||||
wxCharBuffer(size_t len)
|
||||
{
|
||||
m_str = (char *)malloc(len+1);
|
||||
m_str[len] = '\0';
|
||||
}
|
||||
// no need to check for NULL, free() does it
|
||||
~wxCharBuffer() { free(m_str); }
|
||||
|
||||
wxCharBuffer(const wxCharBuffer& src)
|
||||
{
|
||||
m_str = src.m_str;
|
||||
// no reference count yet...
|
||||
((wxCharBuffer*)&src)->m_str = (char *)NULL;
|
||||
}
|
||||
wxCharBuffer& operator=(const wxCharBuffer& src)
|
||||
{
|
||||
m_str = src.m_str;
|
||||
// no reference count yet...
|
||||
((wxCharBuffer*)&src)->m_str = (char *)NULL;
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator const char *() const { return m_str; }
|
||||
char operator[](size_t n) const { return m_str[n]; }
|
||||
|
||||
private:
|
||||
char *m_str;
|
||||
};
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
class wxWCharBuffer
|
||||
{
|
||||
public:
|
||||
wxWCharBuffer(const wchar_t *wcs)
|
||||
{
|
||||
wxASSERT_MSG( wcs, _T("NULL string in wxWCharBuffer") );
|
||||
|
||||
if (wcs) {
|
||||
size_t siz = (wcslen(wcs)+1)*sizeof(wchar_t);
|
||||
m_wcs = (wchar_t *)malloc(siz);
|
||||
memcpy(m_wcs, wcs, siz);
|
||||
}
|
||||
else m_wcs = (wchar_t *)NULL;
|
||||
}
|
||||
wxWCharBuffer(size_t len)
|
||||
{
|
||||
m_wcs = (wchar_t *)malloc((len+1)*sizeof(wchar_t));
|
||||
m_wcs[len] = L'\0';
|
||||
}
|
||||
|
||||
// no need to check for NULL, free() does it
|
||||
~wxWCharBuffer() { free(m_wcs); }
|
||||
|
||||
wxWCharBuffer(const wxWCharBuffer& src)
|
||||
{
|
||||
m_wcs = src.m_wcs;
|
||||
// no reference count yet...
|
||||
((wxWCharBuffer*)&src)->m_wcs = (wchar_t *)NULL;
|
||||
}
|
||||
wxWCharBuffer& operator=(const wxWCharBuffer& src)
|
||||
{
|
||||
m_wcs = src.m_wcs;
|
||||
// no reference count yet...
|
||||
((wxWCharBuffer*)&src)->m_wcs = (wchar_t *)NULL;
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator const wchar_t *() const { return m_wcs; }
|
||||
wchar_t operator[](size_t n) const { return m_wcs[n]; }
|
||||
|
||||
private:
|
||||
wchar_t *m_wcs;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#define wxMB2WXbuf wxWCharBuffer
|
||||
#define wxWX2MBbuf wxCharBuffer
|
||||
#define wxWC2WXbuf wxChar*
|
||||
#define wxWX2WCbuf wxChar*
|
||||
#else
|
||||
#define wxMB2WXbuf wxChar*
|
||||
#define wxWX2MBbuf wxChar*
|
||||
#define wxWC2WXbuf wxCharBuffer
|
||||
#define wxWX2WCbuf wxWCharBuffer
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// template class for any kind of data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// TODO
|
||||
|
||||
#endif // _WX_BUFFER_H
|
19
include/wx/button.h
Normal file
19
include/wx/button.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_BUTTON_H_BASE_
|
||||
#define _WX_BUTTON_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/button.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/button.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/button.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/button.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/button.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/button.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_BUTTON_H_BASE_
|
19
include/wx/checkbox.h
Normal file
19
include/wx/checkbox.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_CHECKBOX_H_BASE_
|
||||
#define _WX_CHECKBOX_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/checkbox.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/checkbox.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/checkbox.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/checkbox.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/checkbox.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/checkbox.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_BASE_
|
19
include/wx/checklst.h
Normal file
19
include/wx/checklst.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_CHECKLST_H_BASE_
|
||||
#define _WX_CHECKLST_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/checklst.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/checklst.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/checklst.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/checklst.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/checklst.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/checklst.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CHECKLST_H_BASE_
|
7
include/wx/choicdlg.h
Normal file
7
include/wx/choicdlg.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef _WX_CHOICDLG_H_BASE_
|
||||
#define _WX_CHOICDLG_H_BASE_
|
||||
|
||||
#include "wx/generic/choicdgg.h"
|
||||
|
||||
#endif
|
||||
// _WX_CHOICDLG_H_BASE_
|
19
include/wx/choice.h
Normal file
19
include/wx/choice.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_CHOICE_H_BASE_
|
||||
#define _WX_CHOICE_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/choice.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/choice.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/choice.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/choice.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/choice.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/choice.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CHOICE_H_BASE_
|
19
include/wx/clipbrd.h
Normal file
19
include/wx/clipbrd.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_CLIPBRD_H_BASE_
|
||||
#define _WX_CLIPBRD_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/clipbrd.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/clipbrd.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/clipbrd.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/gtk/clipbrd.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/clipbrd.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/clipbrd.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CLIPBRD_H_BASE_
|
383
include/wx/cmndata.h
Normal file
383
include/wx/cmndata.h
Normal file
@@ -0,0 +1,383 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cmndata.h
|
||||
// Purpose: Common GDI data classes
|
||||
// Author: Julian Smart and others
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CMNDATA_H_BASE_
|
||||
#define _WX_CMNDATA_H_BASE_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cmndata.h"
|
||||
#endif
|
||||
|
||||
#include "wx/font.h"
|
||||
#include "wx/colour.h"
|
||||
|
||||
#if (defined(__WXMOTIF__) || defined(__WXGTK__)) && wxUSE_POSTSCRIPT
|
||||
class WXDLLEXPORT wxPrintSetupData;
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxColourData: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxColourData)
|
||||
public:
|
||||
wxColourData();
|
||||
wxColourData(const wxColourData& data);
|
||||
~wxColourData();
|
||||
|
||||
void SetChooseFull(bool flag) { chooseFull = flag; }
|
||||
bool GetChooseFull() const { return chooseFull; }
|
||||
void SetColour(wxColour& colour) { dataColour = colour; }
|
||||
wxColour &GetColour() { return dataColour; }
|
||||
|
||||
// Array of 16 custom colours
|
||||
void SetCustomColour(int i, wxColour& colour);
|
||||
wxColour GetCustomColour(int i);
|
||||
|
||||
void operator=(const wxColourData& data);
|
||||
|
||||
public:
|
||||
wxColour dataColour;
|
||||
wxColour custColours[16];
|
||||
bool chooseFull;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxFontData: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFontData)
|
||||
public:
|
||||
wxFontData();
|
||||
wxFontData(const wxFontData& fontData);
|
||||
~wxFontData();
|
||||
|
||||
void SetAllowSymbols(bool flag) { allowSymbols = flag; }
|
||||
bool GetAllowSymbols() const { return allowSymbols; }
|
||||
|
||||
void SetColour(const wxColour& colour) { fontColour = colour; }
|
||||
wxColour &GetColour() { return fontColour; }
|
||||
|
||||
void SetShowHelp(bool flag) { showHelp = flag; }
|
||||
bool GetShowHelp() const { return showHelp; }
|
||||
|
||||
void EnableEffects(bool flag) { enableEffects = flag; }
|
||||
bool GetEnableEffects() const { return enableEffects; }
|
||||
|
||||
void SetInitialFont(const wxFont& font) { initialFont = font; }
|
||||
wxFont GetInitialFont() const { return initialFont; }
|
||||
|
||||
void SetChosenFont(const wxFont& font) { chosenFont = font; }
|
||||
wxFont GetChosenFont() const { return chosenFont; }
|
||||
|
||||
void SetRange(int minRange, int maxRange) { minSize = minRange; maxSize = maxRange; }
|
||||
|
||||
void operator=(const wxFontData& data);
|
||||
|
||||
public:
|
||||
wxColour fontColour;
|
||||
bool showHelp;
|
||||
bool allowSymbols;
|
||||
bool enableEffects;
|
||||
wxFont initialFont;
|
||||
wxFont chosenFont;
|
||||
int minSize;
|
||||
int maxSize;
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPrintData
|
||||
* Encapsulates printer information (not printer dialog information)
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxPrintData: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintData)
|
||||
|
||||
wxPrintData();
|
||||
wxPrintData(const wxPrintData& printData);
|
||||
~wxPrintData();
|
||||
|
||||
int GetNoCopies() const { return m_printNoCopies; };
|
||||
bool GetCollate() const { return m_printCollate; };
|
||||
int GetOrientation() const { return m_printOrientation; };
|
||||
|
||||
const wxString& GetPrinterName() const { return m_printerName; }
|
||||
bool GetColour() const { return m_colour; }
|
||||
wxDuplexMode GetDuplex() const { return m_duplexMode; }
|
||||
wxPaperSize GetPaperId() const { return m_paperId; }
|
||||
const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size
|
||||
// in wxPageSetupDialogData
|
||||
wxPrintQuality GetQuality() const { return m_printQuality; }
|
||||
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; };
|
||||
void SetCollate(bool flag) { m_printCollate = flag; };
|
||||
void SetOrientation(int orient) { m_printOrientation = orient; };
|
||||
|
||||
void SetPrinterName(const wxString& name) { m_printerName = name; }
|
||||
void SetColour(bool colour) { m_colour = colour; }
|
||||
void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; }
|
||||
void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; }
|
||||
void SetPaperSize(const wxSize& sz) { m_paperSize = sz; }
|
||||
void SetQuality(wxPrintQuality quality) { m_printQuality = quality; }
|
||||
|
||||
// PostScript-specific data
|
||||
const wxString& GetPrinterCommand() const { return m_printerCommand; }
|
||||
const wxString& GetPrinterOptions() const { return m_printerOptions; }
|
||||
const wxString& GetPreviewCommand() const { return m_previewCommand; }
|
||||
const wxString& GetFilename() const { return m_filename; }
|
||||
const wxString& GetFontMetricPath() const { return m_afmPath; }
|
||||
double GetPrinterScaleX() const { return m_printerScaleX; }
|
||||
double GetPrinterScaleY() const { return m_printerScaleY; }
|
||||
long GetPrinterTranslateX() const { return m_printerTranslateX; }
|
||||
long GetPrinterTranslateY() const { return m_printerTranslateY; }
|
||||
wxPrintMode GetPrintMode() const { return m_printMode; }
|
||||
|
||||
void SetPrinterCommand(const wxString& command) { m_printerCommand = command; }
|
||||
void SetPrinterOptions(const wxString& options) { m_printerOptions = options; }
|
||||
void SetPreviewCommand(const wxString& command) { m_previewCommand = command; }
|
||||
void SetFilename(const wxString& filename) { m_filename = filename; }
|
||||
void SetFontMetricPath(const wxString& path) { m_afmPath = path; }
|
||||
void SetPrinterScaleX(double x) { m_printerScaleX = x; }
|
||||
void SetPrinterScaleY(double y) { m_printerScaleY = y; }
|
||||
void SetPrinterScaling(double x, double y) { m_printerScaleX = x; m_printerScaleY = y; }
|
||||
void SetPrinterTranslateX(long x) { m_printerTranslateX = x; }
|
||||
void SetPrinterTranslateY(long y) { m_printerTranslateY = y; }
|
||||
void SetPrinterTranslation(long x, long y) { m_printerTranslateX = x; m_printerTranslateY = y; }
|
||||
void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
|
||||
|
||||
void operator=(const wxPrintData& data);
|
||||
|
||||
// For compatibility
|
||||
#if (defined(__WXMOTIF__) || defined(__WXGTK__)) && wxUSE_POSTSCRIPT
|
||||
void operator=(const wxPrintSetupData& setupData);
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Convert to/from the DEVMODE structure
|
||||
void ConvertToNative();
|
||||
void ConvertFromNative();
|
||||
void* GetNativeData() const { return m_devMode; }
|
||||
void SetNativeData(void* data) { m_devMode = data; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
#ifdef __WXMSW__
|
||||
void* m_devMode;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
int m_printNoCopies;
|
||||
int m_printOrientation;
|
||||
bool m_printCollate;
|
||||
|
||||
// New members, 24/3/99
|
||||
wxString m_printerName;
|
||||
bool m_colour;
|
||||
wxDuplexMode m_duplexMode;
|
||||
wxPrintQuality m_printQuality;
|
||||
wxPaperSize m_paperId;
|
||||
wxSize m_paperSize;
|
||||
|
||||
// PostScript-specific data
|
||||
wxString m_printerCommand;
|
||||
wxString m_previewCommand;
|
||||
wxString m_printerOptions;
|
||||
wxString m_filename;
|
||||
wxString m_afmPath;
|
||||
double m_printerScaleX;
|
||||
double m_printerScaleY;
|
||||
long m_printerTranslateX;
|
||||
long m_printerTranslateY;
|
||||
wxPrintMode m_printMode;
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPrintDialogData
|
||||
* Encapsulates information displayed and edited in the printer dialog box.
|
||||
* Contains a wxPrintData object which is filled in according to the values retrieved
|
||||
* from the dialog.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxPrintDialogData: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
|
||||
|
||||
wxPrintDialogData();
|
||||
wxPrintDialogData(const wxPrintDialogData& dialogData);
|
||||
wxPrintDialogData(const wxPrintData& printData);
|
||||
~wxPrintDialogData();
|
||||
|
||||
int GetFromPage() const { return m_printFromPage; };
|
||||
int GetToPage() const { return m_printToPage; };
|
||||
int GetMinPage() const { return m_printMinPage; };
|
||||
int GetMaxPage() const { return m_printMaxPage; };
|
||||
int GetNoCopies() const { return m_printNoCopies; };
|
||||
bool GetAllPages() const { return m_printAllPages; };
|
||||
bool GetCollate() const { return m_printCollate; };
|
||||
bool GetPrintToFile() const { return m_printToFile; };
|
||||
bool GetSetupDialog() const { return m_printSetupDialog; };
|
||||
|
||||
void SetFromPage(int v) { m_printFromPage = v; };
|
||||
void SetToPage(int v) { m_printToPage = v; };
|
||||
void SetMinPage(int v) { m_printMinPage = v; };
|
||||
void SetMaxPage(int v) { m_printMaxPage = v; };
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; };
|
||||
void SetAllPages(bool flag) { m_printAllPages = flag; };
|
||||
void SetCollate(bool flag) { m_printCollate = flag; };
|
||||
void SetPrintToFile(bool flag) { m_printToFile = flag; };
|
||||
void SetSetupDialog(bool flag) { m_printSetupDialog = flag; };
|
||||
|
||||
void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; };
|
||||
void EnableSelection(bool flag) { m_printEnableSelection = flag; };
|
||||
void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; };
|
||||
void EnableHelp(bool flag) { m_printEnableHelp = flag; };
|
||||
|
||||
bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; };
|
||||
bool GetEnableSelection() const { return m_printEnableSelection; };
|
||||
bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; };
|
||||
bool GetEnableHelp() const { return m_printEnableHelp; };
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
|
||||
|
||||
void operator=(const wxPrintDialogData& data);
|
||||
void operator=(const wxPrintData& data); // Sets internal m_printData member
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Convert to/from the PRINTDLG structure
|
||||
void ConvertToNative();
|
||||
void ConvertFromNative();
|
||||
void SetOwnerWindow(wxWindow* win);
|
||||
void* GetNativeData() const { return m_printDlgData; }
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void* m_printDlgData;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
int m_printFromPage;
|
||||
int m_printToPage;
|
||||
int m_printMinPage;
|
||||
int m_printMaxPage;
|
||||
int m_printNoCopies;
|
||||
bool m_printAllPages;
|
||||
bool m_printCollate;
|
||||
bool m_printToFile;
|
||||
bool m_printEnableSelection;
|
||||
bool m_printEnablePageNumbers;
|
||||
bool m_printEnableHelp;
|
||||
bool m_printEnablePrintToFile;
|
||||
bool m_printSetupDialog;
|
||||
|
||||
wxPrintData m_printData;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is the data used (and returned) by the wxPageSetupDialog.
|
||||
*/
|
||||
|
||||
// Compatibility with old name
|
||||
#define wxPageSetupData wxPageSetupDialogData
|
||||
|
||||
class WXDLLEXPORT wxPageSetupDialogData: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
|
||||
|
||||
public:
|
||||
wxPageSetupDialogData();
|
||||
wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
|
||||
wxPageSetupDialogData(const wxPrintData& printData);
|
||||
~wxPageSetupDialogData();
|
||||
|
||||
wxSize GetPaperSize() const { return m_paperSize; };
|
||||
wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); };
|
||||
wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; };
|
||||
wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; };
|
||||
wxPoint GetMarginTopLeft() const { return m_marginTopLeft; };
|
||||
wxPoint GetMarginBottomRight() const { return m_marginBottomRight; };
|
||||
|
||||
bool GetDefaultMinMargins() const { return m_defaultMinMargins; };
|
||||
bool GetEnableMargins() const { return m_enableMargins; };
|
||||
bool GetEnableOrientation() const { return m_enableOrientation; };
|
||||
bool GetEnablePaper() const { return m_enablePaper; };
|
||||
bool GetEnablePrinter() const { return m_enablePrinter; };
|
||||
bool GetDefaultInfo() const { return m_getDefaultInfo; };
|
||||
bool GetEnableHelp() const { return m_enableHelp; };
|
||||
|
||||
// If a corresponding paper type is found in the paper database, will set the m_printData
|
||||
// paper size id member as well.
|
||||
void SetPaperSize(const wxSize& sz);
|
||||
|
||||
void SetPaperId(wxPaperSize& id) { m_printData.SetPaperId(id); };
|
||||
|
||||
// Sets the wxPrintData id, plus the paper width/height if found in the paper database.
|
||||
void SetPaperSize(wxPaperSize id);
|
||||
|
||||
void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; };
|
||||
void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; };
|
||||
void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; };
|
||||
void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; };
|
||||
void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; };
|
||||
void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; };
|
||||
|
||||
void EnableMargins(bool flag) { m_enableMargins = flag; };
|
||||
void EnableOrientation(bool flag) { m_enableOrientation = flag; };
|
||||
void EnablePaper(bool flag) { m_enablePaper = flag; };
|
||||
void EnablePrinter(bool flag) { m_enablePrinter = flag; };
|
||||
void EnableHelp(bool flag) { m_enableHelp = flag; };
|
||||
|
||||
#if defined(__WIN95__)
|
||||
// Convert to/from the PAGESETUPDLG structure
|
||||
void ConvertToNative();
|
||||
void ConvertFromNative();
|
||||
void SetOwnerWindow(wxWindow* win);
|
||||
void* GetNativeData() const { return m_pageSetupData; }
|
||||
#endif
|
||||
|
||||
// Use paper size defined in this object to set the wxPrintData
|
||||
// paper id
|
||||
void CalculateIdFromPaperSize();
|
||||
|
||||
// Use paper id in wxPrintData to set this object's paper size
|
||||
void CalculatePaperSizeFromId();
|
||||
|
||||
void operator=(const wxPageSetupData& data);
|
||||
void operator=(const wxPrintData& data);
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
|
||||
|
||||
#if defined(__WIN95__)
|
||||
void* m_pageSetupData;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
|
||||
wxPoint m_minMarginTopLeft;
|
||||
wxPoint m_minMarginBottomRight;
|
||||
wxPoint m_marginTopLeft;
|
||||
wxPoint m_marginBottomRight;
|
||||
|
||||
// Flags
|
||||
bool m_defaultMinMargins;
|
||||
bool m_enableMargins;
|
||||
bool m_enableOrientation;
|
||||
bool m_enablePaper;
|
||||
bool m_enablePrinter;
|
||||
bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
|
||||
bool m_enableHelp;
|
||||
|
||||
wxPrintData m_printData;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CMNDATA_H_BASE_
|
24
include/wx/colordlg.h
Normal file
24
include/wx/colordlg.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef _WX_COLORDLG_H_BASE_
|
||||
#define _WX_COLORDLG_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/colordlg.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
#endif
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#define wxColourDialog wxGenericColourDialog
|
||||
#define sm_classwxColourDialog sm_classwxColourDialog
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_COLORDLG_H_BASE_
|
21
include/wx/colour.h
Normal file
21
include/wx/colour.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef _WX_COLOUR_H_BASE_
|
||||
#define _WX_COLOUR_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/colour.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/colour.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/colour.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/colour.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/colour.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/colour.h"
|
||||
#endif
|
||||
|
||||
#define wxColor wxColour
|
||||
|
||||
#endif
|
||||
// _WX_COLOUR_H_BASE_
|
19
include/wx/combobox.h
Normal file
19
include/wx/combobox.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_COMBOBOX_H_BASE_
|
||||
#define _WX_COMBOBOX_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/combobox.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/combobox.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/combobox.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/combobox.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/combobox.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/combobox.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_COMBOBOX_H_BASE_
|
320
include/wx/confbase.h
Normal file
320
include/wx/confbase.h
Normal file
@@ -0,0 +1,320 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: confbase.h
|
||||
// Purpose: declaration of the base class of all config implementations
|
||||
// (see also: fileconf.h and msw/regconf.h and iniconf.h)
|
||||
// Author: Karsten Ball<6C>der & Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07.04.98 (adapted from appconf.h)
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1997 Karsten Ball<6C>der Ballueder@usa.net
|
||||
// Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CONFBASE_H_
|
||||
#define _WX_CONFBASE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "confbase.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CONFIG
|
||||
|
||||
#include "wx/string.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// shall we be case sensitive in parsing variable names?
|
||||
#ifndef wxCONFIG_CASE_SENSITIVE
|
||||
#define wxCONFIG_CASE_SENSITIVE FALSE
|
||||
#endif
|
||||
|
||||
/// separates group and entry names (probably shouldn't be changed)
|
||||
#ifndef wxCONFIG_PATH_SEPARATOR
|
||||
#define wxCONFIG_PATH_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
/// introduces immutable entries
|
||||
// (i.e. the ones which can't be changed from the local config file)
|
||||
#ifndef wxCONFIG_IMMUTABLE_PREFIX
|
||||
#define wxCONFIG_IMMUTABLE_PREFIX '!'
|
||||
#endif
|
||||
|
||||
/// should we use registry instead of configuration files under Win32?
|
||||
// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
|
||||
// FALSE) or wxRegConfig (if it's true and we're under Win32) or wxIniConfig
|
||||
// (under Win16))
|
||||
#ifndef wxCONFIG_WIN32_NATIVE
|
||||
#define wxCONFIG_WIN32_NATIVE TRUE
|
||||
#endif
|
||||
|
||||
// Style flags for constructor style parameter
|
||||
enum
|
||||
{
|
||||
wxCONFIG_USE_LOCAL_FILE = 1,
|
||||
wxCONFIG_USE_GLOBAL_FILE = 2,
|
||||
wxCONFIG_USE_RELATIVE_PATH = 4
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// various helper global functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Replace environment variables ($SOMETHING) with their values. The format is
|
||||
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
|
||||
'_' only. '$' must be escaped ('\$') in order to be taken literally.
|
||||
*/
|
||||
extern wxString wxExpandEnvVars(const wxString &sz);
|
||||
|
||||
/*
|
||||
Split path into parts removing '..' in progress
|
||||
*/
|
||||
extern void wxSplitPath(wxArrayString& aParts, const wxChar *sz);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// abstract base class wxConfigBase which defines the interface for derived
|
||||
// classes
|
||||
//
|
||||
// wxConfig organizes the items in a tree-like structure (modeled after the
|
||||
// Unix/Dos filesystem). There are groups (directories) and keys (files).
|
||||
// There is always one current group given by the current path.
|
||||
//
|
||||
// Keys are pairs "key_name = value" where value may be of string or integer
|
||||
// (long) type (TODO doubles and other types such as wxDate coming soon).
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxConfigBase
|
||||
{
|
||||
public:
|
||||
// constants
|
||||
// the type of an entry
|
||||
enum EntryType
|
||||
{
|
||||
Type_Unknown,
|
||||
Type_String,
|
||||
Type_Boolean,
|
||||
Type_Integer, // use Read(long *)
|
||||
Type_Float // use Read(double *)
|
||||
};
|
||||
|
||||
// static functions
|
||||
// sets the config object, returns the previous pointer
|
||||
static wxConfigBase *Set(wxConfigBase *pConfig);
|
||||
// get the config object, creates it on demand unless DontCreateOnDemand
|
||||
// was called
|
||||
static wxConfigBase *Get() { if ( !ms_pConfig ) Create(); return ms_pConfig; }
|
||||
// create a new config object: this function will create the "best"
|
||||
// implementation of wxConfig available for the current platform, see
|
||||
// comments near definition wxCONFIG_WIN32_NATIVE for details. It returns
|
||||
// the created object and also sets it as ms_pConfig.
|
||||
static wxConfigBase *Create();
|
||||
// should Get() try to create a new log object if the current one is NULL?
|
||||
static void DontCreateOnDemand() { ms_bAutoCreate = FALSE; }
|
||||
|
||||
// ctor & virtual dtor
|
||||
// ctor (can be used as default ctor too)
|
||||
//
|
||||
// Not all args will always be used by derived classes, but including
|
||||
// them all in each class ensures compatibility. If appName is empty,
|
||||
// uses wxApp name
|
||||
wxConfigBase(const wxString& appName = wxEmptyString,
|
||||
const wxString& vendorName = wxEmptyString,
|
||||
const wxString& localFilename = wxEmptyString,
|
||||
const wxString& globalFilename = wxEmptyString,
|
||||
long style = 0);
|
||||
|
||||
// empty but ensures that dtor of all derived classes is virtual
|
||||
virtual ~wxConfigBase() { }
|
||||
|
||||
// path management
|
||||
// set current path: if the first character is '/', it's the absolute path,
|
||||
// otherwise it's a relative path. '..' is supported. If the strPath
|
||||
// doesn't exist it is created.
|
||||
virtual void SetPath(const wxString& strPath) = 0;
|
||||
// retrieve the current path (always as absolute path)
|
||||
virtual const wxString& GetPath() const = 0;
|
||||
|
||||
// enumeration: all functions here return false when there are no more items.
|
||||
// you must pass the same lIndex to GetNext and GetFirst (don't modify it)
|
||||
// enumerate subgroups
|
||||
virtual bool GetFirstGroup(wxString& str, long& lIndex) const = 0;
|
||||
virtual bool GetNextGroup (wxString& str, long& lIndex) const = 0;
|
||||
// enumerate entries
|
||||
virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0;
|
||||
virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0;
|
||||
// get number of entries/subgroups in the current group, with or without
|
||||
// it's subgroups
|
||||
virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const = 0;
|
||||
virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const = 0;
|
||||
|
||||
// tests of existence
|
||||
// returns TRUE if the group by this name exists
|
||||
virtual bool HasGroup(const wxString& strName) const = 0;
|
||||
// same as above, but for an entry
|
||||
virtual bool HasEntry(const wxString& strName) const = 0;
|
||||
// returns TRUE if either a group or an entry with a given name exist
|
||||
bool Exists(const wxString& strName) const
|
||||
{ return HasGroup(strName) || HasEntry(strName); }
|
||||
|
||||
// get the entry type
|
||||
virtual EntryType GetEntryType(const wxString& name) const
|
||||
{
|
||||
// by default all entries are strings
|
||||
return HasEntry(name) ? Type_String : Type_Unknown;
|
||||
}
|
||||
|
||||
// key access: returns TRUE if value was really read, FALSE if default used
|
||||
// (and if the key is not found the default value is returned.)
|
||||
// read a string from the key
|
||||
virtual bool Read(const wxString& key, wxString *pStr) const = 0;
|
||||
virtual bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
|
||||
|
||||
virtual wxString Read(const wxString& key, const wxString& defVal = wxEmptyString) const;
|
||||
|
||||
virtual bool Read(const wxString& key, long *pl) const = 0;
|
||||
virtual bool Read(const wxString& key, long *pl, long defVal) const;
|
||||
|
||||
virtual long Read(const wxString& strKey, long defVal) const
|
||||
{ long l; Read(strKey, &l, defVal); return l; }
|
||||
|
||||
// Convenience functions that are built on other forms
|
||||
|
||||
// int
|
||||
virtual bool Read(const wxString& key, int *pi) const;
|
||||
virtual bool Read(const wxString& key, int *pi, int defVal) const;
|
||||
|
||||
// double
|
||||
virtual bool Read(const wxString& key, double* val) const;
|
||||
virtual bool Read(const wxString& key, double* val, double defVal) const;
|
||||
|
||||
// bool
|
||||
virtual bool Read(const wxString& key, bool* val) const;
|
||||
virtual bool Read(const wxString& key, bool* val, bool defVal) const;
|
||||
|
||||
// write the value (return true on success)
|
||||
virtual bool Write(const wxString& key, const wxString& value) = 0;
|
||||
virtual bool Write(const wxString& key, long value) = 0;
|
||||
|
||||
// Convenience functions
|
||||
virtual bool Write(const wxString& key, double value);
|
||||
virtual bool Write(const wxString& key, bool value);
|
||||
|
||||
// permanently writes all changes
|
||||
virtual bool Flush(bool bCurrentOnly = FALSE) = 0;
|
||||
|
||||
// renaming, all functions return FALSE on failure (probably because the new
|
||||
// name is already taken by an existing entry)
|
||||
// rename an entry
|
||||
virtual bool RenameEntry(const wxString& oldName,
|
||||
const wxString& newName) = 0;
|
||||
// rename a group
|
||||
virtual bool RenameGroup(const wxString& oldName,
|
||||
const wxString& newName) = 0;
|
||||
|
||||
// delete entries/groups
|
||||
// deletes the specified entry and the group it belongs to if
|
||||
// it was the last key in it and the second parameter is true
|
||||
virtual bool DeleteEntry(const wxString& key,
|
||||
bool bDeleteGroupIfEmpty = TRUE) = 0;
|
||||
// delete the group (with all subgroups)
|
||||
virtual bool DeleteGroup(const wxString& key) = 0;
|
||||
// delete the whole underlying object (disk file, registry key, ...)
|
||||
// primarly for use by desinstallation routine.
|
||||
virtual bool DeleteAll() = 0;
|
||||
|
||||
// options
|
||||
// we can automatically expand environment variables in the config entries
|
||||
// (this option is on by default, you can turn it on/off at any time)
|
||||
bool IsExpandingEnvVars() const { return m_bExpandEnvVars; }
|
||||
void SetExpandEnvVars(bool bDoIt = TRUE) { m_bExpandEnvVars = bDoIt; }
|
||||
// recording of default values
|
||||
void SetRecordDefaults(bool bDoIt = TRUE) { m_bRecordDefaults = bDoIt; }
|
||||
bool IsRecordingDefaults() const { return m_bRecordDefaults; }
|
||||
// does expansion only if needed
|
||||
wxString ExpandEnvVars(const wxString& str) const;
|
||||
|
||||
// misc accessors
|
||||
wxString GetAppName() const { return m_appName; }
|
||||
wxString GetVendorName() const { return m_vendorName; }
|
||||
|
||||
void SetStyle(long style) { m_style = style; }
|
||||
long GetStyle() const { return m_style; }
|
||||
|
||||
protected:
|
||||
static bool IsImmutable(const wxString& key)
|
||||
#ifndef __WXMAC__
|
||||
{ return !key.IsEmpty() && key[0u] == wxCONFIG_IMMUTABLE_PREFIX; }
|
||||
#else
|
||||
{ return !key.IsEmpty() && key[0ul] == wxCONFIG_IMMUTABLE_PREFIX; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
// are we doing automatic environment variable expansion?
|
||||
bool m_bExpandEnvVars;
|
||||
// do we record default values?
|
||||
bool m_bRecordDefaults;
|
||||
|
||||
// static variables
|
||||
static wxConfigBase *ms_pConfig;
|
||||
static bool ms_bAutoCreate;
|
||||
|
||||
// Application name and organisation name
|
||||
wxString m_appName;
|
||||
wxString m_vendorName;
|
||||
|
||||
// Style flag
|
||||
long m_style;
|
||||
};
|
||||
|
||||
// a handy little class which changes current path to the path of given entry
|
||||
// and restores it in dtor: so if you declare a local variable of this type,
|
||||
// you work in the entry directory and the path is automatically restored
|
||||
// when the function returns
|
||||
// Taken out of wxConfig since not all compilers can cope with nested classes.
|
||||
class wxConfigPathChanger
|
||||
{
|
||||
public:
|
||||
// ctor/dtor do path changing/restorin
|
||||
wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry);
|
||||
~wxConfigPathChanger();
|
||||
|
||||
// get the key name
|
||||
const wxString& Name() const { return m_strName; }
|
||||
|
||||
private:
|
||||
wxConfigBase *m_pContainer; // object we live in
|
||||
wxString m_strName, // name of entry (i.e. name only)
|
||||
m_strOldPath; // saved path
|
||||
bool m_bChanged; // was the path changed?
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the native wxConfigBase implementation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// under Windows we prefer to use the native implementation
|
||||
#if defined(__WXMSW__) && wxCONFIG_WIN32_NATIVE
|
||||
#ifdef __WIN32__
|
||||
#define wxConfig wxRegConfig
|
||||
#define sm_classwxConfig sm_classwxRegConfig
|
||||
#else //WIN16
|
||||
#define wxConfig wxIniConfig
|
||||
#define sm_classwxConfig sm_classwxIniConfig
|
||||
#endif
|
||||
#else // either we're under Unix or wish to use files even under Windows
|
||||
#define wxConfig wxFileConfig
|
||||
#define sm_classwxConfig sm_classwxFileConfig
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// wxUSE_CONFIG
|
||||
|
||||
#endif
|
||||
// _WX_CONFIG_H_
|
||||
|
17
include/wx/config.h
Normal file
17
include/wx/config.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _WX_CONFIG_H_BASE_
|
||||
#define _WX_CONFIG_H_BASE_
|
||||
|
||||
#include "wx/confbase.h"
|
||||
|
||||
#if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE)
|
||||
# ifdef __WIN32__
|
||||
# include "wx/msw/regconf.h"
|
||||
#else
|
||||
# include "wx/msw/iniconf.h"
|
||||
# endif
|
||||
#else
|
||||
# include "wx/fileconf.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CONFIG_H_BASE_
|
19
include/wx/control.h
Normal file
19
include/wx/control.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_CONTROL_H_BASE_
|
||||
#define _WX_CONTROL_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/control.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/control.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/control.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/control.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/control.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/control.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CONTROL_H_BASE_
|
19
include/wx/cursor.h
Normal file
19
include/wx/cursor.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_CURSOR_H_BASE_
|
||||
#define _WX_CURSOR_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/cursor.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/cursor.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/cursor.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/cursor.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/cursor.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/cursor.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_CURSOR_H_BASE_
|
19
include/wx/dataobj.h
Normal file
19
include/wx/dataobj.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_DATAOBJ_H_BASE_
|
||||
#define _WX_DATAOBJ_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/ole/dataobj.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dataobj.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dataobj.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dnd.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dnd.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dnd.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DATAOBJ_H_BASE_
|
144
include/wx/date.h
Normal file
144
include/wx/date.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: date.h
|
||||
// Purpose: wxDate class
|
||||
// Author: Julian Smart, Steve Marcus, Eric Simon, Chris Hill,
|
||||
// Charles D. Price
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DATE_H_
|
||||
#define _WX_DATE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "date.h"
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
#if wxUSE_TIMEDATE
|
||||
// These lines necessary to stop VC++ 6 being confused about namespaces
|
||||
class WXDLLEXPORT wxDate;
|
||||
bool WXDLLEXPORT operator<(const wxDate &dt1, const wxDate &dt2);
|
||||
bool WXDLLEXPORT operator<(const wxDate &dt1, const wxDate &dt2);
|
||||
bool WXDLLEXPORT operator <= (const wxDate &dt1, const wxDate &dt2);
|
||||
bool WXDLLEXPORT operator > (const wxDate &dt1, const wxDate &dt2);
|
||||
bool WXDLLEXPORT operator >= (const wxDate &dt1, const wxDate &dt2);
|
||||
bool WXDLLEXPORT operator == (const wxDate &dt1, const wxDate &dt2);
|
||||
bool WXDLLEXPORT operator != (const wxDate &dt1, const wxDate &dt2);
|
||||
|
||||
enum wxdate_format_type {wxMDY, wxDAY, wxMONTH, wxFULL, wxEUROPEAN};
|
||||
|
||||
#define wxNO_CENTURY 0x02
|
||||
#define wxDATE_ABBR 0x04
|
||||
|
||||
class WXDLLEXPORT wxDate : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDate)
|
||||
|
||||
protected:
|
||||
unsigned long julian; // see julDate(); days since 1/1/4713 B.C.
|
||||
int month; // see NMonth()
|
||||
int day; // see Day()
|
||||
int year; // see NYear4()
|
||||
int day_of_week; // see NDOW(); 1 = Sunday, ... 7 = Saturday
|
||||
|
||||
private:
|
||||
int DisplayFormat;
|
||||
unsigned char DisplayOptions;
|
||||
|
||||
void julian_to_mdy (); // convert julian day to mdy
|
||||
void julian_to_wday (); // convert julian day to day_of_week
|
||||
void mdy_to_julian (); // convert mdy to julian day
|
||||
|
||||
public:
|
||||
wxDate ();
|
||||
wxDate (long j);
|
||||
wxDate (int m, int d, int y);
|
||||
wxDate (const wxString& dat);
|
||||
wxDate (const wxDate &dt);
|
||||
|
||||
#ifndef __SALFORDC__
|
||||
operator wxString (void);
|
||||
#endif
|
||||
|
||||
void operator = (const wxDate& date);
|
||||
void operator = (const wxString& date);
|
||||
|
||||
wxDate operator + (long i);
|
||||
wxDate operator + (int i);
|
||||
|
||||
wxDate operator - (long i);
|
||||
wxDate operator - (int i);
|
||||
|
||||
long operator - (const wxDate &dt);
|
||||
|
||||
wxDate &operator += (long i);
|
||||
wxDate &operator -= (long i);
|
||||
|
||||
wxDate &operator ++ (); // Prefix increment
|
||||
wxDate &operator ++ (int); // Postfix increment
|
||||
wxDate &operator -- (); // Prefix decrement
|
||||
wxDate &operator -- (int); // Postfix decrement
|
||||
|
||||
friend bool WXDLLEXPORT operator < (const wxDate &dt1, const wxDate &dt2);
|
||||
friend bool WXDLLEXPORT operator <= (const wxDate &dt1, const wxDate &dt2);
|
||||
friend bool WXDLLEXPORT operator > (const wxDate &dt1, const wxDate &dt2);
|
||||
friend bool WXDLLEXPORT operator >= (const wxDate &dt1, const wxDate &dt2);
|
||||
friend bool WXDLLEXPORT operator == (const wxDate &dt1, const wxDate &dt2);
|
||||
friend bool WXDLLEXPORT operator != (const wxDate &dt1, const wxDate &dt2);
|
||||
|
||||
friend ostream WXDLLEXPORT & operator << (ostream &os, const wxDate &dt);
|
||||
|
||||
wxString FormatDate (int type=-1) const;
|
||||
void SetFormat (int format);
|
||||
int SetOption (int option, bool enable=TRUE);
|
||||
|
||||
long GetJulianDate() const; // returns julian date
|
||||
int GetDayOfYear() const; // returns relative date since Jan. 1
|
||||
bool IsLeapYear() const; // returns TRUE if leap year, FALSE if not
|
||||
|
||||
// Version 4.0 Extension to Public Interface - CDP
|
||||
|
||||
// These 'Set's modify the date object and actually SET it
|
||||
// They all return a reference to self (*this)
|
||||
|
||||
wxDate &Set(); // Sets to current system date
|
||||
wxDate &Set(long lJulian);
|
||||
wxDate &Set(int nMonth, int nDay, int nYear);
|
||||
|
||||
wxDate &AddWeeks(int nCount = 1); //
|
||||
wxDate &AddMonths(int nCount = 1); // May also pass neg# to decrement
|
||||
wxDate &AddYears(int nCount = 1); //
|
||||
|
||||
int GetDay() const; // Numeric Day of date object
|
||||
int GetDaysInMonth(); // Number of days in month (1..31)
|
||||
int GetFirstDayOfMonth() const; // First Day Of Month (1..7)
|
||||
|
||||
wxString GetDayOfWeekName(); // Character Day Of Week ('Sunday'..'Saturday')
|
||||
int GetDayOfWeek() const; // (1..7)
|
||||
|
||||
int GetWeekOfMonth(); // Numeric Week Of Month (1..6)
|
||||
int GetWeekOfYear(); // Numeric Week Of Year (1..52)
|
||||
|
||||
wxString GetMonthName(); // Character Month name
|
||||
int GetMonth() const; // Month Number (1..12)
|
||||
wxDate GetMonthStart(); // First Date Of Month
|
||||
wxDate GetMonthEnd(); // Last Date Of Month
|
||||
|
||||
int GetYear() const; // eg. 1992
|
||||
wxDate GetYearStart(); // First Date Of Year
|
||||
wxDate GetYearEnd(); // Last Date Of Year
|
||||
|
||||
bool IsBetween(const wxDate& first, const wxDate& second) const;
|
||||
|
||||
wxDate Previous(int dayOfWeek) const;
|
||||
};
|
||||
|
||||
#endif // wxUSE_TIMEDATE
|
||||
#endif
|
||||
// _WX_DATE_H_
|
48
include/wx/datstrm.h
Normal file
48
include/wx/datstrm.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: datstrm.h
|
||||
// Purpose: Data stream classes
|
||||
// Author: Guilhem Lavaux
|
||||
// Modified by:
|
||||
// Created: 28/06/1998
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Guilhem Lavaux
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DATSTREAM_H_
|
||||
#define _WX_DATSTREAM_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "datstrm.h"
|
||||
#endif
|
||||
|
||||
#include <wx/stream.h>
|
||||
|
||||
class WXDLLEXPORT wxDataInputStream: public wxFilterInputStream {
|
||||
public:
|
||||
wxDataInputStream(wxInputStream& s);
|
||||
virtual ~wxDataInputStream();
|
||||
|
||||
unsigned long Read32();
|
||||
unsigned short Read16();
|
||||
unsigned char Read8();
|
||||
double ReadDouble();
|
||||
wxString ReadLine();
|
||||
wxString ReadString();
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxDataOutputStream: public wxFilterOutputStream {
|
||||
public:
|
||||
wxDataOutputStream(wxOutputStream& s);
|
||||
virtual ~wxDataOutputStream();
|
||||
|
||||
void Write32(unsigned long i);
|
||||
void Write16(unsigned short i);
|
||||
void Write8(unsigned char i);
|
||||
void WriteDouble(double d);
|
||||
void WriteLine(const wxString& line);
|
||||
void WriteString(const wxString& string);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DATSTREAM_H_
|
378
include/wx/db.h
Normal file
378
include/wx/db.h
Normal file
@@ -0,0 +1,378 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: db.h
|
||||
// Purpose: Header file wxDB class. The wxDB class represents a connection
|
||||
// to an ODBC data source. The wxDB class allows operations on the data
|
||||
// source such as opening and closing the data source.
|
||||
// Author: Doug Card
|
||||
// Modified by:
|
||||
// Mods: Dec, 1998: Added support for SQL statement logging and database
|
||||
// cataloging
|
||||
// Created: 9.96
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1996 Remstar International, Inc.
|
||||
// Licence: wxWindows licence, plus:
|
||||
// Notice: This class library and its intellectual design are free of charge for use,
|
||||
// modification, enhancement, debugging under the following conditions:
|
||||
// 1) These classes may only be used as part of the implementation of a
|
||||
// wxWindows-based application
|
||||
// 2) All enhancements and bug fixes are to be submitted back to the wxWindows
|
||||
// user groups free of all charges for use with the wxWindows library.
|
||||
// 3) These classes may not be distributed as part of any other class library,
|
||||
// DLL, text (written or electronic), other than a complete distribution of
|
||||
// the wxWindows GUI development toolkit.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
// SYNOPSIS START
|
||||
// SYNOPSIS STOP
|
||||
*/
|
||||
|
||||
#ifndef DB_DOT_H
|
||||
#define DB_DOT_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "db.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) || defined(WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __WXGTK__
|
||||
|
||||
extern "C" {
|
||||
#include <../iodbc/isql.h>
|
||||
#include <../iodbc/isqlext.h>
|
||||
typedef float SFLOAT;
|
||||
typedef double SDOUBLE;
|
||||
typedef unsigned int UINT;
|
||||
#define ULONG UDWORD
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define ODBCVER 0x0250
|
||||
#include <sql.h>
|
||||
#include <sqlext.h>
|
||||
|
||||
#endif
|
||||
|
||||
enum enumDummy {enumDum1};
|
||||
|
||||
#define SQL_C_BOOLEAN (sizeof(int) == 2 ? SQL_C_USHORT : SQL_C_ULONG)
|
||||
#define SQL_C_ENUM (sizeof(enumDummy) == 2 ? SQL_C_USHORT : SQL_C_ULONG) //glt 2-21-97
|
||||
|
||||
// Database Globals
|
||||
const int DB_TYPE_NAME_LEN = 40;
|
||||
const int DB_MAX_STATEMENT_LEN = 2048;
|
||||
const int DB_MAX_WHERE_CLAUSE_LEN = 1024;
|
||||
const int DB_MAX_ERROR_MSG_LEN = 512;
|
||||
const int DB_MAX_ERROR_HISTORY = 5;
|
||||
const int DB_MAX_TABLE_NAME_LEN = 128;
|
||||
const int DB_MAX_COLUMN_NAME_LEN = 128;
|
||||
|
||||
const int DB_DATA_TYPE_VARCHAR = 1;
|
||||
const int DB_DATA_TYPE_INTEGER = 2;
|
||||
const int DB_DATA_TYPE_FLOAT = 3;
|
||||
const int DB_DATA_TYPE_DATE = 4;
|
||||
|
||||
const int DB_SELECT_KEYFIELDS = 1;
|
||||
const int DB_SELECT_WHERE = 2;
|
||||
const int DB_SELECT_MATCHING = 3;
|
||||
const int DB_SELECT_STATEMENT = 4;
|
||||
|
||||
const int DB_UPD_KEYFIELDS = 1;
|
||||
const int DB_UPD_WHERE = 2;
|
||||
|
||||
const int DB_DEL_KEYFIELDS = 1;
|
||||
const int DB_DEL_WHERE = 2;
|
||||
const int DB_DEL_MATCHING = 3;
|
||||
|
||||
const int DB_WHERE_KEYFIELDS = 1;
|
||||
const int DB_WHERE_MATCHING = 2;
|
||||
|
||||
const int DB_CURSOR0 = 0;
|
||||
const int DB_CURSOR1 = 1;
|
||||
const int DB_CURSOR2 = 2;
|
||||
//const int DB_CURSOR3 = 3;
|
||||
//const int DB_CURSOR4 = 4;
|
||||
//const int DB_CURSOR5 = 5;
|
||||
|
||||
const int DB_GRANT_SELECT = 1;
|
||||
const int DB_GRANT_INSERT = 2;
|
||||
const int DB_GRANT_UPDATE = 4;
|
||||
const int DB_GRANT_DELETE = 8;
|
||||
const int DB_GRANT_ALL = DB_GRANT_SELECT | DB_GRANT_INSERT | DB_GRANT_UPDATE | DB_GRANT_DELETE;
|
||||
|
||||
// ODBC Error codes (derived from ODBC SqlState codes)
|
||||
enum ODBC_ERRORS
|
||||
{
|
||||
DB_FAILURE = 0,
|
||||
DB_SUCCESS = 1,
|
||||
DB_ERR_NOT_IN_USE,
|
||||
DB_ERR_GENERAL_WARNING, // SqlState = '01000'
|
||||
DB_ERR_DISCONNECT_ERROR, // SqlState = '01002'
|
||||
DB_ERR_DATA_TRUNCATED, // SqlState = '01004'
|
||||
DB_ERR_PRIV_NOT_REVOKED, // SqlState = '01006'
|
||||
DB_ERR_INVALID_CONN_STR_ATTR, // SqlState = '01S00'
|
||||
DB_ERR_ERROR_IN_ROW, // SqlState = '01S01'
|
||||
DB_ERR_OPTION_VALUE_CHANGED, // SqlState = '01S02'
|
||||
DB_ERR_NO_ROWS_UPD_OR_DEL, // SqlState = '01S03'
|
||||
DB_ERR_MULTI_ROWS_UPD_OR_DEL, // SqlState = '01S04'
|
||||
DB_ERR_WRONG_NO_OF_PARAMS, // SqlState = '07001'
|
||||
DB_ERR_DATA_TYPE_ATTR_VIOL, // SqlState = '07006'
|
||||
DB_ERR_UNABLE_TO_CONNECT, // SqlState = '08001'
|
||||
DB_ERR_CONNECTION_IN_USE, // SqlState = '08002'
|
||||
DB_ERR_CONNECTION_NOT_OPEN, // SqlState = '08003'
|
||||
DB_ERR_REJECTED_CONNECTION, // SqlState = '08004'
|
||||
DB_ERR_CONN_FAIL_IN_TRANS, // SqlState = '08007'
|
||||
DB_ERR_COMM_LINK_FAILURE, // SqlState = '08S01'
|
||||
DB_ERR_INSERT_VALUE_LIST_MISMATCH, // SqlState = '21S01'
|
||||
DB_ERR_DERIVED_TABLE_MISMATCH, // SqlState = '21S02'
|
||||
DB_ERR_STRING_RIGHT_TRUNC, // SqlState = '22001'
|
||||
DB_ERR_NUMERIC_VALUE_OUT_OF_RNG, // SqlState = '22003'
|
||||
DB_ERR_ERROR_IN_ASSIGNMENT, // SqlState = '22005'
|
||||
DB_ERR_DATETIME_FLD_OVERFLOW, // SqlState = '22008'
|
||||
DB_ERR_DIVIDE_BY_ZERO, // SqlState = '22012'
|
||||
DB_ERR_STR_DATA_LENGTH_MISMATCH, // SqlState = '22026'
|
||||
DB_ERR_INTEGRITY_CONSTRAINT_VIOL, // SqlState = '23000'
|
||||
DB_ERR_INVALID_CURSOR_STATE, // SqlState = '24000'
|
||||
DB_ERR_INVALID_TRANS_STATE, // SqlState = '25000'
|
||||
DB_ERR_INVALID_AUTH_SPEC, // SqlState = '28000'
|
||||
DB_ERR_INVALID_CURSOR_NAME, // SqlState = '34000'
|
||||
DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL, // SqlState = '37000'
|
||||
DB_ERR_DUPLICATE_CURSOR_NAME, // SqlState = '3C000'
|
||||
DB_ERR_SERIALIZATION_FAILURE, // SqlState = '40001'
|
||||
DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2, // SqlState = '42000'
|
||||
DB_ERR_OPERATION_ABORTED, // SqlState = '70100'
|
||||
DB_ERR_UNSUPPORTED_FUNCTION, // SqlState = 'IM001'
|
||||
DB_ERR_NO_DATA_SOURCE, // SqlState = 'IM002'
|
||||
DB_ERR_DRIVER_LOAD_ERROR, // SqlState = 'IM003'
|
||||
DB_ERR_SQLALLOCENV_FAILED, // SqlState = 'IM004'
|
||||
DB_ERR_SQLALLOCCONNECT_FAILED, // SqlState = 'IM005'
|
||||
DB_ERR_SQLSETCONNECTOPTION_FAILED, // SqlState = 'IM006'
|
||||
DB_ERR_NO_DATA_SOURCE_DLG_PROHIB, // SqlState = 'IM007'
|
||||
DB_ERR_DIALOG_FAILED, // SqlState = 'IM008'
|
||||
DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL, // SqlState = 'IM009'
|
||||
DB_ERR_DATA_SOURCE_NAME_TOO_LONG, // SqlState = 'IM010'
|
||||
DB_ERR_DRIVER_NAME_TOO_LONG, // SqlState = 'IM011'
|
||||
DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR, // SqlState = 'IM012'
|
||||
DB_ERR_TRACE_FILE_ERROR, // SqlState = 'IM013'
|
||||
DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS, // SqlState = 'S0001'
|
||||
DB_ERR_TABLE_NOT_FOUND, // SqlState = 'S0002'
|
||||
DB_ERR_INDEX_ALREADY_EXISTS, // SqlState = 'S0011'
|
||||
DB_ERR_INDEX_NOT_FOUND, // SqlState = 'S0012'
|
||||
DB_ERR_COLUMN_ALREADY_EXISTS, // SqlState = 'S0021'
|
||||
DB_ERR_COLUMN_NOT_FOUND, // SqlState = 'S0022'
|
||||
DB_ERR_NO_DEFAULT_FOR_COLUMN, // SqlState = 'S0023'
|
||||
DB_ERR_GENERAL_ERROR, // SqlState = 'S1000'
|
||||
DB_ERR_MEMORY_ALLOCATION_FAILURE, // SqlState = 'S1001'
|
||||
DB_ERR_INVALID_COLUMN_NUMBER, // SqlState = 'S1002'
|
||||
DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE, // SqlState = 'S1003'
|
||||
DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE, // SqlState = 'S1004'
|
||||
DB_ERR_OPERATION_CANCELLED, // SqlState = 'S1008'
|
||||
DB_ERR_INVALID_ARGUMENT_VALUE, // SqlState = 'S1009'
|
||||
DB_ERR_FUNCTION_SEQUENCE_ERROR, // SqlState = 'S1010'
|
||||
DB_ERR_OPERATION_INVALID_AT_THIS_TIME, // SqlState = 'S1011'
|
||||
DB_ERR_INVALID_TRANS_OPERATION_CODE, // SqlState = 'S1012'
|
||||
DB_ERR_NO_CURSOR_NAME_AVAIL, // SqlState = 'S1015'
|
||||
DB_ERR_INVALID_STR_OR_BUF_LEN, // SqlState = 'S1090'
|
||||
DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE, // SqlState = 'S1091'
|
||||
DB_ERR_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1092'
|
||||
DB_ERR_INVALID_PARAM_NO, // SqlState = 'S1093'
|
||||
DB_ERR_INVALID_SCALE_VALUE, // SqlState = 'S1094'
|
||||
DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1095'
|
||||
DB_ERR_INF_TYPE_OUT_OF_RANGE, // SqlState = 'S1096'
|
||||
DB_ERR_COLUMN_TYPE_OUT_OF_RANGE, // SqlState = 'S1097'
|
||||
DB_ERR_SCOPE_TYPE_OUT_OF_RANGE, // SqlState = 'S1098'
|
||||
DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE, // SqlState = 'S1099'
|
||||
DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1100'
|
||||
DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1101'
|
||||
DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE, // SqlState = 'S1103'
|
||||
DB_ERR_INVALID_PRECISION_VALUE, // SqlState = 'S1104'
|
||||
DB_ERR_INVALID_PARAM_TYPE, // SqlState = 'S1105'
|
||||
DB_ERR_FETCH_TYPE_OUT_OF_RANGE, // SqlState = 'S1106'
|
||||
DB_ERR_ROW_VALUE_OUT_OF_RANGE, // SqlState = 'S1107'
|
||||
DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE, // SqlState = 'S1108'
|
||||
DB_ERR_INVALID_CURSOR_POSITION, // SqlState = 'S1109'
|
||||
DB_ERR_INVALID_DRIVER_COMPLETION, // SqlState = 'S1110'
|
||||
DB_ERR_INVALID_BOOKMARK_VALUE, // SqlState = 'S1111'
|
||||
DB_ERR_DRIVER_NOT_CAPABLE, // SqlState = 'S1C00'
|
||||
DB_ERR_TIMEOUT_EXPIRED // SqlState = 'S1T00'
|
||||
};
|
||||
|
||||
struct DbStuff
|
||||
{
|
||||
HENV Henv;
|
||||
char Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name
|
||||
char Uid[20]; // User ID
|
||||
char AuthStr[20]; // Authorization string (password)
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char TypeName[DB_TYPE_NAME_LEN];
|
||||
int FsqlType;
|
||||
long Precision;
|
||||
short CaseSensitive;
|
||||
// short MinimumScale;
|
||||
short MaximumScale;
|
||||
} SqlTypeInfo;
|
||||
|
||||
class WXDLLEXPORT CcolInf
|
||||
{
|
||||
public:
|
||||
char tableName[DB_MAX_TABLE_NAME_LEN+1];
|
||||
char colName[DB_MAX_COLUMN_NAME_LEN+1];
|
||||
int sqlDataType;
|
||||
};
|
||||
|
||||
enum sqlLog
|
||||
{
|
||||
sqlLogOFF,
|
||||
sqlLogON
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxDB
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
bool dbIsOpen;
|
||||
char *dsn; // Data source name
|
||||
char *uid; // User ID
|
||||
char *authStr; // Authorization string (password)
|
||||
FILE *fpSqlLog; // Sql Log file pointer
|
||||
enum sqlLog sqlLogState; // On or Off
|
||||
|
||||
// Private member functions
|
||||
bool getDbInfo(void);
|
||||
bool getDataTypeInfo(SWORD fSqlType, SqlTypeInfo &structSQLTypeInfo);
|
||||
bool setConnectionOptions(void);
|
||||
void logError(char *errMsg, char *SQLState);
|
||||
|
||||
public:
|
||||
|
||||
// The following structure contains database information gathered from the
|
||||
// datasource when the datasource is first opened.
|
||||
struct
|
||||
{
|
||||
char dbmsName[40]; // Name of the dbms product
|
||||
char dbmsVer[40]; // Version # of the dbms product
|
||||
char driverName[40]; // Driver name
|
||||
char odbcVer[60]; // ODBC version of the driver
|
||||
char drvMgrOdbcVer[60]; // ODBC version of the driver manager
|
||||
char driverVer[60]; // Driver version
|
||||
char serverName[80]; // Server Name, typically a connect string
|
||||
char databaseName[128]; // Database filename
|
||||
char outerJoins[2]; // Indicates whether the data source supports outer joins
|
||||
char procedureSupport[2]; // Indicates whether the data source supports stored procedures
|
||||
UWORD maxConnections; // Maximum # of connections the data source supports
|
||||
UWORD maxStmts; // Maximum # of HSTMTs per HDBC
|
||||
UWORD apiConfLvl; // ODBC API conformance level
|
||||
UWORD cliConfLvl; // Indicates whether the data source is SAG compliant
|
||||
UWORD sqlConfLvl; // SQL conformance level
|
||||
UWORD cursorCommitBehavior; // Indicates how cursors are affected by a db commit
|
||||
UWORD cursorRollbackBehavior; // Indicates how cursors are affected by a db rollback
|
||||
UWORD supportNotNullClause; // Indicates if data source supports NOT NULL clause
|
||||
char supportIEF[2]; // Integrity Enhancement Facility (Referential Integrity)
|
||||
UDWORD txnIsolation; // Default transaction isolation level supported by the driver
|
||||
UDWORD txnIsolationOptions; // Transaction isolation level options available
|
||||
UDWORD fetchDirections; // Fetch directions supported
|
||||
UDWORD lockTypes; // Lock types supported in SQLSetPos
|
||||
UDWORD posOperations; // Position operations supported in SQLSetPos
|
||||
UDWORD posStmts; // Position statements supported
|
||||
UDWORD scrollConcurrency; // Concurrency control options supported for scrollable cursors
|
||||
UDWORD scrollOptions; // Scroll Options supported for scrollable cursors
|
||||
UDWORD staticSensitivity; // Indicates if additions, deletions and updates can be detected
|
||||
UWORD txnCapable; // Indicates if the data source supports transactions
|
||||
UDWORD loginTimeout; // Number seconds to wait for a login request
|
||||
} dbInf;
|
||||
|
||||
// ODBC handles
|
||||
HENV henv; // ODBC Environment handle
|
||||
HDBC hdbc; // ODBC DB Connection handle
|
||||
HSTMT hstmt; // ODBC Statement handle
|
||||
|
||||
// ODBC Error Inf.
|
||||
char sqlState[20];
|
||||
SDWORD nativeError;
|
||||
char errorMsg[SQL_MAX_MESSAGE_LENGTH];
|
||||
SWORD cbErrorMsg;
|
||||
char errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN];
|
||||
int DB_STATUS;
|
||||
|
||||
//Error reporting mode
|
||||
bool silent;
|
||||
|
||||
// Inf. about logical data types VARCHAR, INTEGER, FLOAT and DATE.
|
||||
// This inf. is obtained from the ODBC driver by use of the
|
||||
// SQLGetTypeInfo() function. The key piece of inf. is the
|
||||
// type name the data source uses for each logical data type.
|
||||
// e.g. VARCHAR; Oracle calls it VARCHAR2.
|
||||
SqlTypeInfo typeInfVarchar, typeInfInteger, typeInfFloat, typeInfDate;
|
||||
|
||||
// Public member functions
|
||||
wxDB(HENV &aHenv);
|
||||
bool Open(char *Dsn, char *Uid, char *AuthStr); // Data Source Name, User ID, Password
|
||||
void Close(void);
|
||||
bool CommitTrans(void);
|
||||
bool RollbackTrans(void);
|
||||
bool DispAllErrors(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
|
||||
bool GetNextError(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
|
||||
void DispNextError(void);
|
||||
bool CreateView(char *viewName, char *colList, char *pSqlStmt);
|
||||
bool ExecSql(char *pSqlStmt);
|
||||
bool Grant(int privileges, char *tableName, char *userList = "PUBLIC");
|
||||
int TranslateSqlState(char *SQLState);
|
||||
bool Catalog(char *userID, char *fileName = "Catalog.txt");
|
||||
CcolInf *GetColumns(char *tableName[]);
|
||||
char *GetDatabaseName(void) {return dbInf.dbmsName;}
|
||||
char *GetDataSource(void) {return dsn;}
|
||||
char *GetUsername(void) {return uid;}
|
||||
char *GetPassword(void) {return authStr;}
|
||||
bool IsOpen(void) {return dbIsOpen;}
|
||||
HENV GetHENV(void) {return henv;}
|
||||
HDBC GetHDBC(void) {return hdbc;}
|
||||
HSTMT GetHSTMT(void) {return hstmt;}
|
||||
bool TableExists(char *tableName); // Table name can refer to a table, view, alias or synonym
|
||||
void LogError(char *errMsg, char *SQLState = 0) {logError(errMsg, SQLState);}
|
||||
bool SqlLog(enum sqlLog state, char *filename = "sqllog.txt", bool append = FALSE);
|
||||
bool WriteSqlLog(char *logMsg);
|
||||
|
||||
}; // wxDB
|
||||
|
||||
// This structure forms a node in a linked list. The linked list of "DbList" objects
|
||||
// keeps track of allocated database connections. This allows the application to
|
||||
// open more than one database connection through ODBC for multiple transaction support
|
||||
// or for multiple database support.
|
||||
|
||||
struct DbList
|
||||
{
|
||||
DbList *PtrPrev; // Pointer to previous item in the list
|
||||
char Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name
|
||||
wxDB *PtrDb; // Pointer to the wxDB object
|
||||
bool Free; // Is item free or in use?
|
||||
DbList *PtrNext; // Pointer to next item in the list
|
||||
};
|
||||
|
||||
// The following routines allow a user to get new database connections, free them
|
||||
// for other code segments to use, or close all of them when the application has
|
||||
// completed.
|
||||
|
||||
wxDB* WXDLLEXPORT GetDbConnection(DbStuff *pDbStuff);
|
||||
bool WXDLLEXPORT FreeDbConnection(wxDB *pDb);
|
||||
void WXDLLEXPORT CloseDbConnections(void);
|
||||
int WXDLLEXPORT NumberDbConnectionsInUse(void);
|
||||
|
||||
// This routine allows you to query a driver manager
|
||||
// for a list of available datasources. Call this routine
|
||||
// the first time using SQL_FETCH_FIRST. Continue to call it
|
||||
// using SQL_FETCH_NEXT until you've exhausted the list.
|
||||
bool WXDLLEXPORT GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax,
|
||||
UWORD direction = SQL_FETCH_NEXT);
|
||||
|
||||
#endif
|
165
include/wx/dbtable.h
Normal file
165
include/wx/dbtable.h
Normal file
@@ -0,0 +1,165 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: table.h
|
||||
// Purpose: Declaration of the wxTable class.
|
||||
// Author: Doug Card
|
||||
// Modified by:
|
||||
// Created: 9.96
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1996 Remstar International, Inc.
|
||||
// Licence: wxWindows licence, plus:
|
||||
// Notice: This class library and its intellectual design are free of charge for use,
|
||||
// modification, enhancement, debugging under the following conditions:
|
||||
// 1) These classes may only be used as part of the implementation of a
|
||||
// wxWindows-based application
|
||||
// 2) All enhancements and bug fixes are to be submitted back to the wxWindows
|
||||
// user groups free of all charges for use with the wxWindows library.
|
||||
// 3) These classes may not be distributed as part of any other class library,
|
||||
// DLL, text (written or electronic), other than a complete distribution of
|
||||
// the wxWindows GUI development toolkit.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
// SYNOPSIS START
|
||||
// SYNOPSIS STOP
|
||||
*/
|
||||
|
||||
#ifndef TABLE_DOT_H
|
||||
#define TABLE_DOT_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dbtable.h"
|
||||
#endif
|
||||
|
||||
#include "wx/db.h"
|
||||
|
||||
const int ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger
|
||||
|
||||
// The following class is used to define a column of a table.
|
||||
// The wxTable constructor will dynamically allocate as many of
|
||||
// these as there are columns in the table. The class derived
|
||||
// from wxTable must initialize these column definitions in it's
|
||||
// constructor. These column definitions provide inf. to the
|
||||
// wxTable class which allows it to create a table in the data
|
||||
// source, exchange data between the data source and the C++
|
||||
// object, and so on.
|
||||
|
||||
class WXDLLEXPORT CcolDef
|
||||
{
|
||||
public:
|
||||
char ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name glt 4/19/97 added one for the null terminator
|
||||
int DbDataType; // Logical Data Type; e.g. DB_DATA_TYPE_INTEGER
|
||||
int SqlCtype; // C data type; e.g. SQL_C_LONG
|
||||
void *PtrDataObj; // Address of the data object
|
||||
int SzDataObj; // Size, in bytes, of the data object
|
||||
bool KeyField; // TRUE if this column is part of the PRIMARY KEY to the table; Date fields should NOT be KeyFields.
|
||||
bool Updateable; // Specifies whether this column is updateable
|
||||
bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement
|
||||
bool DerivedCol; // Specifies whether this column is a derived value
|
||||
SDWORD CbValue; // Internal use only!!!
|
||||
}; // CcolDef
|
||||
|
||||
// This structure is used when creating secondary indexes.
|
||||
class WXDLLEXPORT CidxDef
|
||||
{
|
||||
public:
|
||||
char ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name glt 4/19/97 added one for the null terminator
|
||||
bool Ascending;
|
||||
}; // CidxDef
|
||||
|
||||
class WXDLLEXPORT wxTable
|
||||
{
|
||||
private:
|
||||
|
||||
// Private member variables
|
||||
int currCursorNo;
|
||||
|
||||
// Private member functions
|
||||
bool bindInsertParams(void);
|
||||
bool bindUpdateParams(void);
|
||||
bool bindCols(HSTMT cursor);
|
||||
bool getRec(UWORD fetchType);
|
||||
bool execDelete(char *pSqlStmt);
|
||||
bool execUpdate(char *pSqlStmt);
|
||||
bool query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt = 0);
|
||||
|
||||
public:
|
||||
|
||||
// Pointer to the database object this table belongs to
|
||||
wxDB *pDb;
|
||||
|
||||
// ODBC Handles
|
||||
HENV henv; // ODBC Environment handle
|
||||
HDBC hdbc; // ODBC DB Connection handle
|
||||
HSTMT hstmt; // ODBC Statement handle
|
||||
// HSTMT c0, c1, c2, c3, c4, c5; // Cursors 0 through 5
|
||||
HSTMT c0, c1, c2; // Limited to Cursors 0 through 2 for now
|
||||
HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts
|
||||
HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes
|
||||
HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates
|
||||
HSTMT hstmtCount; // ODBC Statement handle used specifically for COUNT(*)
|
||||
|
||||
// Table Inf.
|
||||
char tableName[DB_MAX_TABLE_NAME_LEN+1]; // Table name
|
||||
char queryTableName[DB_MAX_TABLE_NAME_LEN+1]; // Query Table Name
|
||||
int noCols; // # of columns in the table
|
||||
|
||||
// Column Definitions
|
||||
CcolDef *colDefs; // Array of CcolDef structures
|
||||
|
||||
// Where, Order By and From clauses
|
||||
char *where; // Standard SQL where clause, minus the word WHERE
|
||||
char *orderBy; // Standard SQL order by clause, minus the ORDER BY
|
||||
char *from; // Allows for joins in a Ctable::Query(). Format: ",tbl,tbl..."
|
||||
|
||||
// Flags
|
||||
bool selectForUpdate;
|
||||
|
||||
// Public member functions
|
||||
wxTable(wxDB *pwxDB, const char *tblName, const int nCols, const char *qryTblName = 0);
|
||||
virtual ~wxTable();
|
||||
bool Open(void);
|
||||
bool CreateTable(void);
|
||||
bool CreateIndex(char * idxName, bool unique, int noIdxCols, CidxDef *pIdxDefs);
|
||||
bool CloseCursor(HSTMT cursor);
|
||||
int Insert(void);
|
||||
bool Update(void);
|
||||
bool Update(char *pSqlStmt);
|
||||
bool UpdateWhere(char *pWhereClause);
|
||||
bool Delete(void);
|
||||
bool DeleteWhere(char *pWhereClause);
|
||||
bool DeleteMatching(void);
|
||||
virtual bool Query(bool forUpdate = FALSE, bool distinct = FALSE);
|
||||
bool QueryBySqlStmt(char *pSqlStmt);
|
||||
bool QueryMatching(bool forUpdate = FALSE, bool distinct = FALSE);
|
||||
bool QueryOnKeyFields(bool forUpdate = FALSE, bool distinct = FALSE);
|
||||
bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); }
|
||||
bool operator++(int) { return(getRec(SQL_FETCH_NEXT)); }
|
||||
#ifndef FWD_ONLY_CURSORS
|
||||
bool GetPrev(void) { return(getRec(SQL_FETCH_PRIOR)); }
|
||||
bool operator--(int) { return(getRec(SQL_FETCH_PRIOR)); }
|
||||
bool GetFirst(void) { return(getRec(SQL_FETCH_FIRST)); }
|
||||
bool GetLast(void) { return(getRec(SQL_FETCH_LAST)); }
|
||||
#endif
|
||||
bool IsCursorClosedOnCommit(void);
|
||||
bool IsColNull(int colNo);
|
||||
UWORD GetRowNum(void);
|
||||
void GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct);
|
||||
void GetDeleteStmt(char *pSqlStmt, int typeOfDel, char *pWhereClause = 0);
|
||||
void GetUpdateStmt(char *pSqlStmt, int typeOfUpd, char *pWhereClause = 0);
|
||||
void GetWhereClause(char *pWhereClause, int typeOfWhere, char *qualTableName = 0);
|
||||
bool CanSelectForUpdate(void);
|
||||
bool CanUpdByROWID(void);
|
||||
void ClearMemberVars(void);
|
||||
bool SetQueryTimeout(UDWORD nSeconds);
|
||||
void SetColDefs (int index, char *fieldName, int dataType, void *pData, int cType,
|
||||
int size, bool keyField = FALSE, bool upd = TRUE,
|
||||
bool insAllow = TRUE, bool derivedCol = FALSE);
|
||||
bool SetCursor(int cursorNo = DB_CURSOR0);
|
||||
int GetCursor(void) { return(currCursorNo); }
|
||||
ULONG Count(void);
|
||||
int DB_STATUS(void) { return(pDb->DB_STATUS); }
|
||||
bool Refresh(void);
|
||||
|
||||
}; // wxTable
|
||||
|
||||
#endif
|
19
include/wx/dc.h
Normal file
19
include/wx/dc.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_DC_H_BASE_
|
||||
#define _WX_DC_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dc.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dc.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dc.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dc.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dc.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dc.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DC_H_BASE_
|
19
include/wx/dcclient.h
Normal file
19
include/wx/dcclient.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_DCCLIENT_H_BASE_
|
||||
#define _WX_DCCLIENT_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dcclient.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dcclient.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dcclient.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dcclient.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dcclient.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dcclient.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DCCLIENT_H_BASE_
|
19
include/wx/dcmemory.h
Normal file
19
include/wx/dcmemory.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_DCMEMORY_H_BASE_
|
||||
#define _WX_DCMEMORY_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dcmemory.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dcmemory.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dcmemory.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dcmemory.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dcmemory.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dcmemory.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DCMEMORY_H_BASE_
|
9
include/wx/dcprint.h
Normal file
9
include/wx/dcprint.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef _WX_DCPRINT_H_BASE_
|
||||
#define _WX_DCPRINT_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dcprint.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DCPRINT_H_BASE_
|
7
include/wx/dcps.h
Normal file
7
include/wx/dcps.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef _WX_DCPS_H_BASE_
|
||||
#define _WX_DCPS_H_BASE_
|
||||
|
||||
#include "wx/generic/dcpsg.h"
|
||||
|
||||
#endif
|
||||
|
19
include/wx/dcscreen.h
Normal file
19
include/wx/dcscreen.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_DCSCREEN_H_BASE_
|
||||
#define _WX_DCSCREEN_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dcscreen.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dcscreen.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dcscreen.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dcscreen.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dcscreen.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dcscreen.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DCSCREEN_H_BASE_
|
19
include/wx/dde.h
Normal file
19
include/wx/dde.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_DDE_H_BASE_
|
||||
#define _WX_DDE_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dde.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dde.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dde.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dde.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dde.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dde.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DDE_H_BASE_
|
124
include/wx/debug.h
Normal file
124
include/wx/debug.h
Normal file
@@ -0,0 +1,124 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: debug.h
|
||||
// Purpose: Misc debug functions and macros
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 29/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DEBUG_H_
|
||||
#define _WX_DEBUG_H_
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "wx/wxchar.h"
|
||||
|
||||
#ifndef __TFILE__
|
||||
#define __XFILE__(x) _T(x)
|
||||
#define __TFILE__ __XFILE__(__FILE__)
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/**
|
||||
@name Debugging macros
|
||||
|
||||
All debugging macros rely on ASSERT() which in turn calls user-defined
|
||||
OnAssert() function. To keep things simple, it's called even when the
|
||||
expression is TRUE (i.e. everything is ok) and by default does nothing: just
|
||||
returns the same value back. But if you redefine it to do something more sexy
|
||||
(popping up a message box in your favourite GUI, sending you e-mail or
|
||||
whatever) it will affect all ASSERTs, FAILs and CHECKs in your code.
|
||||
<BR>
|
||||
<BR>
|
||||
<b>Warning</b>: if you don't like advices on programming style, don't read
|
||||
further! ;-)
|
||||
<BR>
|
||||
<BR>
|
||||
Extensive use of these macros is recommended! Remember that ASSERTs are
|
||||
disabled in final (without __WXDEBUG__ defined) build, so they add strictly
|
||||
nothing to your program's code. On the other hand, CHECK macros do stay
|
||||
even in release builds, but in general are not much of a burden, while
|
||||
a judicious use of them might increase your program's stability.
|
||||
|
||||
@memo Debugging macros (replacement for standard assert()) and more.
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
//@{
|
||||
|
||||
/** @name Macros which are completely disabled in 'release' mode */
|
||||
//@{
|
||||
#ifdef __WXDEBUG__
|
||||
/**
|
||||
this function may be redefined to do something non trivial and is called
|
||||
whenever one of debugging macros fails (i.e. condition is false in an
|
||||
assertion)
|
||||
@param szFile and nLine - file name and line number of the ASSERT
|
||||
szMsg - optional message explaining the reason
|
||||
*/
|
||||
void WXDLLEXPORT wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg = (const wxChar *) NULL);
|
||||
|
||||
/// generic assert macro
|
||||
#define wxASSERT(cond) if ( !(cond) ) wxOnAssert(__TFILE__, __LINE__)
|
||||
|
||||
#if 0 // defined(__BORLANDC__) && defined(__WIN16__)
|
||||
// Too much text, so make wxASSERT_MSG the same as wxASSERT,
|
||||
// thus removing the text from the program.
|
||||
#define wxASSERT_MSG(x, m) if ( !(x) ) wxOnAssert(__TFILE__, __LINE__)
|
||||
#else
|
||||
/// assert with additional message explaining it's cause
|
||||
#define wxASSERT_MSG(x, m) if ( !(x) ) wxOnAssert(__TFILE__, __LINE__, m)
|
||||
#endif
|
||||
|
||||
#else
|
||||
// nothing to do in release modes (hopefully at this moment there are
|
||||
// no more bugs ;-)
|
||||
#define wxASSERT(cond)
|
||||
#define wxASSERT_MSG(x, m)
|
||||
#endif //__WXDEBUG__
|
||||
|
||||
/// special form of assert: always triggers it (in debug mode)
|
||||
#define wxFAIL wxASSERT(wxFalse)
|
||||
|
||||
#if 0 // defined(__BORLANDC__) && defined(__WIN16__)
|
||||
// Too much text, so make wxFAIL_MSG the same as wxFAIL,
|
||||
// thus removing the text from the program.
|
||||
#define wxFAIL_MSG(msg) wxASSERT(wxFalse)
|
||||
#else
|
||||
/// FAIL with some message
|
||||
#define wxFAIL_MSG(msg) wxASSERT_MSG(wxFalse, msg)
|
||||
#endif
|
||||
//@}
|
||||
|
||||
// NB: these macros work also in release mode!
|
||||
|
||||
/**
|
||||
These macros must be used only in invalid situation: for example, an
|
||||
invalid parameter (NULL pointer) is passed to a function. Instead of
|
||||
dereferencing it and causing core dump the function might try using
|
||||
CHECK( p != NULL ) or CHECK( p != NULL, return LogError("p is NULL!!") )
|
||||
|
||||
@name Macros which remain even in 'release' mode
|
||||
*/
|
||||
//@{
|
||||
/// check that expression is true, "return" if not (also FAILs in debug mode)
|
||||
#define wxCHECK(x, rc) if (!(x)) {wxFAIL; return rc; }
|
||||
/// as wxCHECK but with a message explaining why we fail
|
||||
#define wxCHECK_MSG(x, rc, msg) if (!(x)) {wxFAIL_MSG(msg); return rc; }
|
||||
/// check that expression is true, perform op if not
|
||||
#define wxCHECK2(x, op) if (!(x)) {wxFAIL; op; }
|
||||
/// as wxCHECK2 but with a message explaining why we fail
|
||||
#define wxCHECK2_MSG(x, op, msg) if (!(x)) {wxFAIL_MSG(msg); op; }
|
||||
/// special form of wxCHECK2: as wxCHECK, but for use in void functions
|
||||
// NB: there is only one form (with msg parameter) and it's intentional:
|
||||
// there is no other way to tell the caller what exactly went wrong
|
||||
// from the void function (of course, the function shouldn't be void
|
||||
// to begin with...)
|
||||
#define wxCHECK_RET(x, msg) if (!(x)) {wxFAIL_MSG(msg); return; }
|
||||
//@}
|
||||
|
||||
//@}
|
||||
|
||||
#endif // _WX_DEBUG_H_
|
1200
include/wx/defs.h
Normal file
1200
include/wx/defs.h
Normal file
File diff suppressed because it is too large
Load Diff
19
include/wx/dialog.h
Normal file
19
include/wx/dialog.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_DIALOG_H_BASE_
|
||||
#define _WX_DIALOG_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dialog.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dialog.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dialog.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dialog.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dialog.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dialog.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DIALOG_H_BASE_
|
23
include/wx/dirdlg.h
Normal file
23
include/wx/dirdlg.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _WX_DIRDLG_H_BASE_
|
||||
#define _WX_DIRDLG_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__WIN16__) || defined(__GNUWIN32__) || defined(__SALFORDC__)
|
||||
#include "wx/generic/dirdlgg.h"
|
||||
#else
|
||||
#include "wx/msw/dirdlg.h"
|
||||
#endif
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/generic/dirdlgg.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/generic/dirdlgg.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dirdlg.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dirdlg.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dirdlg.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DIRDLG_H_BASE_
|
21
include/wx/dnd.h
Normal file
21
include/wx/dnd.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef _WX_DND_H_BASE_
|
||||
#define _WX_DND_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/ole/dropsrc.h"
|
||||
#include "wx/msw/ole/droptgt.h"
|
||||
#include "wx/msw/ole/dataobj.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dnd.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dnd.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/dnd.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dnd.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dnd.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DND_H_BASE_
|
83
include/wx/docmdi.h
Normal file
83
include/wx/docmdi.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: docmdi.h
|
||||
// Purpose: Frame classes for MDI document/view applications
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DOCMDI_H_
|
||||
#define _WX_DOCMDI_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "docmdi.h"
|
||||
#endif
|
||||
|
||||
#include "wx/docview.h"
|
||||
#include "wx/mdi.h"
|
||||
|
||||
/*
|
||||
* Use this instead of wxMDIParentFrame
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxDocMDIParentFrame: public wxMDIParentFrame
|
||||
{
|
||||
DECLARE_CLASS(wxDocMDIParentFrame)
|
||||
public:
|
||||
wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
|
||||
const wxString& title, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
|
||||
|
||||
// Extend event processing to search the document manager's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
wxDocManager *GetDocumentManager(void) const { return m_docManager; }
|
||||
|
||||
void OnExit(wxCommandEvent& event);
|
||||
void OnMRUFile(wxCommandEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
protected:
|
||||
wxDocManager *m_docManager;
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
* Use this instead of wxMDIChildFrame
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
|
||||
{
|
||||
DECLARE_CLASS(wxDocMDIChildFrame)
|
||||
|
||||
public:
|
||||
wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
|
||||
const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
|
||||
~wxDocMDIChildFrame(void);
|
||||
|
||||
// Extend event processing to search the view's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
inline wxDocument *GetDocument(void) const { return m_childDocument; }
|
||||
inline wxView *GetView(void) const { return m_childView; }
|
||||
inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
|
||||
inline void SetView(wxView *view) { m_childView = view; }
|
||||
protected:
|
||||
wxDocument* m_childDocument;
|
||||
wxView* m_childView;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DOCMDI_H_
|
558
include/wx/docview.h
Normal file
558
include/wx/docview.h
Normal file
@@ -0,0 +1,558 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: docview.h
|
||||
// Purpose: Doc/View classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DOCH__
|
||||
#define _WX_DOCH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "docview.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/cmndata.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
#include "wx/print.h"
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxWindow;
|
||||
class WXDLLEXPORT wxDocument;
|
||||
class WXDLLEXPORT wxView;
|
||||
class WXDLLEXPORT wxDocTemplate;
|
||||
class WXDLLEXPORT wxDocManager;
|
||||
class WXDLLEXPORT wxPrintInfo;
|
||||
class WXDLLEXPORT wxCommand;
|
||||
class WXDLLEXPORT wxCommandProcessor;
|
||||
class WXDLLEXPORT wxFileHistory;
|
||||
#if wxUSE_CONFIG
|
||||
class WXDLLEXPORT wxConfigBase;
|
||||
#endif
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||
# include <iostream.h>
|
||||
#else
|
||||
# include <istream>
|
||||
# include <ostream>
|
||||
# ifdef __VISUALC__
|
||||
using namespace std;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Document manager flags
|
||||
#define wxDOC_SDI 1
|
||||
#define wxDOC_MDI 2
|
||||
#define wxDOC_NEW 4
|
||||
#define wxDOC_SILENT 8
|
||||
#define wxDEFAULT_DOCMAN_FLAGS wxDOC_SDI
|
||||
|
||||
// Document template flags
|
||||
#define wxTEMPLATE_VISIBLE 1
|
||||
#define wxTEMPLATE_INVISIBLE 2
|
||||
#define wxDEFAULT_TEMPLATE_FLAGS wxTEMPLATE_VISIBLE
|
||||
|
||||
#define wxMAX_FILE_HISTORY 9
|
||||
|
||||
class WXDLLEXPORT wxDocument : public wxEvtHandler
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxDocument)
|
||||
public:
|
||||
wxDocument(wxDocument *parent = (wxDocument *) NULL);
|
||||
~wxDocument(void);
|
||||
|
||||
void SetFilename(const wxString& filename, bool notifyViews = FALSE);
|
||||
inline wxString GetFilename(void) const { return m_documentFile; }
|
||||
inline void SetTitle(const wxString& title) { m_documentTitle = title; };
|
||||
inline wxString GetTitle(void) const { return m_documentTitle; }
|
||||
inline void SetDocumentName(const wxString& name) { m_documentTypeName = name; };
|
||||
inline wxString GetDocumentName(void) const { return m_documentTypeName; }
|
||||
// Has the document been saved yet?
|
||||
inline bool GetDocumentSaved(void) { return m_savedYet; }
|
||||
inline void SetDocumentSaved(bool saved = TRUE) { m_savedYet = saved; }
|
||||
|
||||
virtual bool Close(void);
|
||||
virtual bool Save(void);
|
||||
virtual bool SaveAs(void);
|
||||
virtual bool Revert(void);
|
||||
|
||||
virtual ostream& SaveObject(ostream& stream);
|
||||
virtual istream& LoadObject(istream& stream);
|
||||
|
||||
// Called by wxWindows
|
||||
virtual bool OnSaveDocument(const wxString& filename);
|
||||
virtual bool OnOpenDocument(const wxString& filename);
|
||||
virtual bool OnNewDocument(void);
|
||||
virtual bool OnCloseDocument(void);
|
||||
|
||||
// Prompts for saving if about to close a modified document.
|
||||
// Returns TRUE if ok to close the document (may have saved in the
|
||||
// meantime, or set modified to FALSE)
|
||||
virtual bool OnSaveModified(void);
|
||||
|
||||
// Called by framework if created automatically by the
|
||||
// default document manager: gives document a chance to
|
||||
// initialise and (usually) create a view
|
||||
virtual bool OnCreate(const wxString& path, long flags);
|
||||
|
||||
// By default, creates a base wxCommandProcessor.
|
||||
virtual wxCommandProcessor *OnCreateCommandProcessor(void);
|
||||
virtual inline wxCommandProcessor *GetCommandProcessor(void) const { return m_commandProcessor; }
|
||||
virtual inline void SetCommandProcessor(wxCommandProcessor *proc) { m_commandProcessor = proc; }
|
||||
|
||||
// Called after a view is added or removed.
|
||||
// The default implementation deletes the document if this
|
||||
// is there are no more views.
|
||||
virtual void OnChangedViewList(void);
|
||||
|
||||
virtual bool DeleteContents(void);
|
||||
|
||||
virtual bool Draw(wxDC&);
|
||||
virtual inline bool IsModified(void) const { return m_documentModified; }
|
||||
virtual inline void Modify(bool mod) { m_documentModified = mod; }
|
||||
|
||||
virtual bool AddView(wxView *view);
|
||||
virtual bool RemoveView(wxView *view);
|
||||
inline wxList& GetViews(void) const { return (wxList&) m_documentViews; }
|
||||
wxView *GetFirstView(void) const;
|
||||
|
||||
virtual void UpdateAllViews(wxView *sender = (wxView *) NULL, wxObject *hint = (wxObject *) NULL);
|
||||
|
||||
// Remove all views (because we're closing the document)
|
||||
virtual bool DeleteAllViews(void);
|
||||
|
||||
// Other stuff
|
||||
virtual wxDocManager *GetDocumentManager(void) const;
|
||||
virtual inline wxDocTemplate *GetDocumentTemplate(void) const { return m_documentTemplate; }
|
||||
virtual inline void SetDocumentTemplate(wxDocTemplate *temp) { m_documentTemplate = temp; }
|
||||
|
||||
// Get title, or filename if no title, else [unnamed]
|
||||
virtual bool GetPrintableName(wxString& buf) const;
|
||||
|
||||
// Returns a window that can be used as a parent for document-related
|
||||
// dialogs. Override if necessary.
|
||||
virtual wxWindow *GetDocumentWindow(void) const;
|
||||
protected:
|
||||
wxList m_documentViews;
|
||||
wxString m_documentFile;
|
||||
wxString m_documentTitle;
|
||||
wxString m_documentTypeName;
|
||||
wxDocTemplate* m_documentTemplate;
|
||||
bool m_documentModified;
|
||||
wxDocument* m_documentParent;
|
||||
wxCommandProcessor* m_commandProcessor;
|
||||
bool m_savedYet;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxView: public wxEvtHandler
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxView)
|
||||
public:
|
||||
// wxView(wxDocument *doc = (wxDocument *) NULL);
|
||||
wxView();
|
||||
~wxView(void);
|
||||
|
||||
inline wxDocument *GetDocument(void) const { return m_viewDocument; }
|
||||
void SetDocument(wxDocument *doc);
|
||||
|
||||
inline wxString GetViewName(void) const { return m_viewTypeName; }
|
||||
void SetViewName(const wxString& name) { m_viewTypeName = name; };
|
||||
|
||||
inline wxFrame *GetFrame(void) const { return m_viewFrame ; }
|
||||
inline void SetFrame(wxFrame *frame) { m_viewFrame = frame; }
|
||||
|
||||
virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView);
|
||||
virtual void OnDraw(wxDC *dc) = 0;
|
||||
virtual void OnPrint(wxDC *dc, wxObject *info);
|
||||
virtual void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
|
||||
virtual void OnChangeFilename(void);
|
||||
|
||||
// Called by framework if created automatically by the
|
||||
// default document manager class: gives view a chance to
|
||||
// initialise
|
||||
virtual bool OnCreate(wxDocument *WXUNUSED(doc), long WXUNUSED(flags)) { return TRUE; };
|
||||
|
||||
// Checks if the view is the last one for the document; if so,
|
||||
// asks user to confirm save data (if modified). If ok,
|
||||
// deletes itself and returns TRUE.
|
||||
virtual bool Close(bool deleteWindow = TRUE);
|
||||
|
||||
// Override to do cleanup/veto close
|
||||
virtual bool OnClose(bool deleteWindow);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
// Defeat compiler warning
|
||||
bool OnClose(void) { return wxEvtHandler::OnClose(); }
|
||||
#endif
|
||||
|
||||
// Extend event processing to search the document's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
// A view's window can call this to notify the view it is (in)active.
|
||||
// The function then notifies the document manager.
|
||||
virtual void Activate(bool activate);
|
||||
|
||||
wxDocManager *GetDocumentManager(void) const
|
||||
{ return m_viewDocument->GetDocumentManager(); }
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
virtual wxPrintout *OnCreatePrintout(void);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
wxDocument* m_viewDocument;
|
||||
wxString m_viewTypeName;
|
||||
wxFrame* m_viewFrame;
|
||||
};
|
||||
|
||||
// Represents user interface (and other) properties of documents and views
|
||||
class WXDLLEXPORT wxDocTemplate: public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxDocTemplate)
|
||||
|
||||
friend class WXDLLEXPORT wxDocManager;
|
||||
|
||||
public:
|
||||
|
||||
// Associate document and view types.
|
||||
// They're for identifying what view is associated with what
|
||||
// template/document type
|
||||
wxDocTemplate(wxDocManager *manager, const wxString& descr, const wxString& filter, const wxString& dir,
|
||||
const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName,
|
||||
wxClassInfo *docClassInfo = (wxClassInfo *) NULL, wxClassInfo *viewClassInfo = (wxClassInfo *)NULL,
|
||||
long flags = wxDEFAULT_TEMPLATE_FLAGS);
|
||||
|
||||
~wxDocTemplate(void);
|
||||
|
||||
// By default, these two member functions dynamically creates document
|
||||
// and view using dynamic instance construction.
|
||||
// Override these if you need a different method of construction.
|
||||
virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
|
||||
virtual wxView *CreateView(wxDocument *doc, long flags = 0);
|
||||
|
||||
inline wxString GetDefaultExtension(void) const { return m_defaultExt; };
|
||||
inline wxString GetDescription(void) const { return m_description; }
|
||||
inline wxString GetDirectory(void) const { return m_directory; };
|
||||
inline wxDocManager *GetDocumentManager(void) const { return m_documentManager; }
|
||||
inline void SetDocumentManager(wxDocManager *manager) { m_documentManager = manager; }
|
||||
inline wxString GetFileFilter(void) const { return m_fileFilter; };
|
||||
inline long GetFlags(void) const { return m_flags; };
|
||||
virtual wxString GetViewName(void) const { return m_viewTypeName; }
|
||||
virtual wxString GetDocumentName(void) const { return m_docTypeName; }
|
||||
|
||||
inline void SetFileFilter(const wxString& filter) { m_fileFilter = filter; };
|
||||
inline void SetDirectory(const wxString& dir) { m_directory = dir; };
|
||||
inline void SetDescription(const wxString& descr) { m_description = descr; };
|
||||
inline void SetDefaultExtension(const wxString& ext) { m_defaultExt = ext; };
|
||||
inline void SetFlags(long flags) { m_flags = flags; };
|
||||
|
||||
inline bool IsVisible(void) const { return ((m_flags & wxTEMPLATE_VISIBLE) == wxTEMPLATE_VISIBLE); }
|
||||
|
||||
protected:
|
||||
long m_flags;
|
||||
wxString m_fileFilter;
|
||||
wxString m_directory;
|
||||
wxString m_description;
|
||||
wxString m_defaultExt;
|
||||
wxString m_docTypeName;
|
||||
wxString m_viewTypeName;
|
||||
wxDocManager* m_documentManager;
|
||||
|
||||
// For dynamic creation of appropriate instances.
|
||||
wxClassInfo* m_docClassInfo;
|
||||
wxClassInfo* m_viewClassInfo;
|
||||
|
||||
};
|
||||
|
||||
// One object of this class may be created in an application,
|
||||
// to manage all the templates and documents.
|
||||
class WXDLLEXPORT wxDocManager: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDocManager)
|
||||
public:
|
||||
wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = TRUE);
|
||||
~wxDocManager(void);
|
||||
|
||||
virtual bool Initialize(void);
|
||||
|
||||
// Handlers for common user commands
|
||||
// virtual void OldOnMenuCommand(int command);
|
||||
|
||||
void OnFileClose(wxCommandEvent& event);
|
||||
void OnFileNew(wxCommandEvent& event);
|
||||
void OnFileOpen(wxCommandEvent& event);
|
||||
void OnFileRevert(wxCommandEvent& event);
|
||||
void OnFileSave(wxCommandEvent& event);
|
||||
void OnFileSaveAs(wxCommandEvent& event);
|
||||
void OnPrint(wxCommandEvent& event);
|
||||
void OnPrintSetup(wxCommandEvent& event);
|
||||
void OnPreview(wxCommandEvent& event);
|
||||
void OnUndo(wxCommandEvent& event);
|
||||
void OnRedo(wxCommandEvent& event);
|
||||
|
||||
// Extend event processing to search the view's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
|
||||
virtual wxView *CreateView(wxDocument *doc, long flags = 0);
|
||||
virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0);
|
||||
virtual bool FlushDoc(wxDocument *doc);
|
||||
virtual wxDocTemplate *MatchTemplate(const wxString& path);
|
||||
virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates,
|
||||
int noTemplates, wxString& path, long flags, bool save = FALSE);
|
||||
virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates,
|
||||
int noTemplates);
|
||||
virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates,
|
||||
int noTemplates);
|
||||
virtual wxDocTemplate *FindTemplateForPath(const wxString& path);
|
||||
|
||||
void AssociateTemplate(wxDocTemplate *temp);
|
||||
void DisassociateTemplate(wxDocTemplate *temp);
|
||||
|
||||
wxDocument *GetCurrentDocument(void) const;
|
||||
|
||||
inline void SetMaxDocsOpen(int n) { m_maxDocsOpen = n; }
|
||||
inline int GetMaxDocsOpen(void) const { return m_maxDocsOpen; }
|
||||
|
||||
// Add and remove a document from the manager's list
|
||||
void AddDocument(wxDocument *doc);
|
||||
void RemoveDocument(wxDocument *doc);
|
||||
|
||||
// Clear remaining documents and templates
|
||||
bool Clear(bool force = TRUE);
|
||||
|
||||
// Views or windows should inform the document manager
|
||||
// when a view is going in or out of focus
|
||||
virtual void ActivateView(wxView *view, bool activate = TRUE, bool deleting = FALSE);
|
||||
virtual wxView *GetCurrentView(void) const;
|
||||
|
||||
virtual inline wxList& GetDocuments(void) const { return (wxList&) m_docs; }
|
||||
|
||||
// Make a default document name
|
||||
virtual bool MakeDefaultName(wxString& buf);
|
||||
|
||||
virtual wxFileHistory *OnCreateFileHistory(void);
|
||||
virtual inline wxFileHistory *GetFileHistory(void) const { return m_fileHistory; }
|
||||
|
||||
// File history management
|
||||
virtual void AddFileToHistory(const wxString& file);
|
||||
virtual int GetNoHistoryFiles(void) const;
|
||||
virtual wxString GetHistoryFile(int i) const;
|
||||
virtual void FileHistoryUseMenu(wxMenu *menu);
|
||||
virtual void FileHistoryRemoveMenu(wxMenu *menu);
|
||||
#if wxUSE_CONFIG
|
||||
virtual void FileHistoryLoad(wxConfigBase& config);
|
||||
virtual void FileHistorySave(wxConfigBase& config);
|
||||
#endif
|
||||
virtual void FileHistoryAddFilesToMenu();
|
||||
virtual void FileHistoryAddFilesToMenu(wxMenu* menu);
|
||||
protected:
|
||||
long m_flags;
|
||||
int m_defaultDocumentNameCounter;
|
||||
int m_maxDocsOpen;
|
||||
wxList m_docs;
|
||||
wxList m_templates;
|
||||
wxView* m_currentView;
|
||||
wxFileHistory* m_fileHistory;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
* A default child frame
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxDocChildFrame: public wxFrame
|
||||
{
|
||||
DECLARE_CLASS(wxDocChildFrame)
|
||||
|
||||
public:
|
||||
wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
|
||||
~wxDocChildFrame(void);
|
||||
|
||||
// Extend event processing to search the view's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
inline wxDocument *GetDocument(void) const { return m_childDocument; }
|
||||
inline wxView *GetView(void) const { return m_childView; }
|
||||
inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
|
||||
inline void SetView(wxView *view) { m_childView = view; }
|
||||
protected:
|
||||
wxDocument* m_childDocument;
|
||||
wxView* m_childView;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* A default parent frame
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxDocParentFrame: public wxFrame
|
||||
{
|
||||
DECLARE_CLASS(wxDocParentFrame)
|
||||
public:
|
||||
wxDocParentFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
|
||||
|
||||
// Extend event processing to search the document manager's event table
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
wxDocManager *GetDocumentManager(void) const { return m_docManager; }
|
||||
|
||||
void OnExit(wxCommandEvent& event);
|
||||
void OnMRUFile(wxCommandEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
protected:
|
||||
wxDocManager *m_docManager;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
* Provide simple default printing facilities
|
||||
*/
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
class WXDLLEXPORT wxDocPrintout: public wxPrintout
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDocPrintout)
|
||||
public:
|
||||
wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = "Printout");
|
||||
bool OnPrintPage(int page);
|
||||
bool HasPage(int page);
|
||||
bool OnBeginDocument(int startPage, int endPage);
|
||||
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
|
||||
|
||||
virtual inline wxView *GetView(void) { return m_printoutView; }
|
||||
protected:
|
||||
wxView* m_printoutView;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Command processing framework
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxCommand: public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxCommand)
|
||||
public:
|
||||
wxCommand(bool canUndoIt = FALSE, const wxString& name = "");
|
||||
~wxCommand(void);
|
||||
|
||||
// Override this to perform a command
|
||||
virtual bool Do(void) = 0;
|
||||
|
||||
// Override this to undo a command
|
||||
virtual bool Undo(void) = 0;
|
||||
|
||||
virtual inline bool CanUndo(void) const { return m_canUndo; }
|
||||
virtual inline wxString GetName(void) const { return m_commandName; }
|
||||
protected:
|
||||
bool m_canUndo;
|
||||
wxString m_commandName;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxCommandProcessor: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCommandProcessor)
|
||||
public:
|
||||
wxCommandProcessor(int maxCommands = 100);
|
||||
~wxCommandProcessor(void);
|
||||
|
||||
// Pass a command to the processor. The processor calls Do();
|
||||
// if successful, is appended to the command history unless
|
||||
// storeIt is FALSE.
|
||||
virtual bool Submit(wxCommand *command, bool storeIt = TRUE);
|
||||
virtual bool Undo(void);
|
||||
virtual bool Redo(void);
|
||||
virtual bool CanUndo(void) const;
|
||||
virtual bool CanRedo(void) const;
|
||||
|
||||
// Call this to manage an edit menu.
|
||||
inline void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; }
|
||||
inline wxMenu *GetEditMenu(void) const { return m_commandEditMenu; }
|
||||
virtual void SetMenuStrings(void);
|
||||
virtual void Initialize(void);
|
||||
|
||||
inline wxList& GetCommands(void) const { return (wxList&) m_commands; }
|
||||
inline int GetMaxCommands(void) const { return m_maxNoCommands; }
|
||||
virtual void ClearCommands(void);
|
||||
|
||||
protected:
|
||||
int m_maxNoCommands;
|
||||
wxList m_commands;
|
||||
wxNode* m_currentCommand;
|
||||
wxMenu* m_commandEditMenu;
|
||||
};
|
||||
|
||||
// File history management
|
||||
|
||||
class WXDLLEXPORT wxFileHistory: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFileHistory)
|
||||
public:
|
||||
wxFileHistory(int maxFiles = 9);
|
||||
~wxFileHistory(void);
|
||||
|
||||
// Operations
|
||||
virtual void AddFileToHistory(const wxString& file);
|
||||
virtual int GetMaxFiles(void) const { return m_fileMaxFiles; }
|
||||
virtual void UseMenu(wxMenu *menu);
|
||||
|
||||
// Remove menu from the list (MDI child may be closing)
|
||||
virtual void RemoveMenu(wxMenu *menu);
|
||||
|
||||
#if wxUSE_CONFIG
|
||||
virtual void Load(wxConfigBase& config);
|
||||
virtual void Save(wxConfigBase& config);
|
||||
#endif
|
||||
|
||||
virtual void AddFilesToMenu();
|
||||
virtual void AddFilesToMenu(wxMenu* menu); // Single menu
|
||||
|
||||
// Accessors
|
||||
virtual wxString GetHistoryFile(int i) const;
|
||||
|
||||
// A synonym for GetNoHistoryFiles
|
||||
virtual int GetCount() const { return m_fileHistoryN; }
|
||||
inline int GetNoHistoryFiles(void) const { return m_fileHistoryN; }
|
||||
|
||||
inline wxList& GetMenus() const { return (wxList&) m_fileMenus; }
|
||||
|
||||
protected:
|
||||
// Last n files
|
||||
wxChar** m_fileHistory;
|
||||
// Number of files saved
|
||||
int m_fileHistoryN;
|
||||
// Menus to maintain (may need several for an MDI app)
|
||||
wxList m_fileMenus;
|
||||
// Max files to maintain
|
||||
int m_fileMaxFiles;
|
||||
};
|
||||
|
||||
// For compatibility with existing file formats:
|
||||
// converts from/to a stream to/from a temporary file.
|
||||
bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, ostream& stream);
|
||||
bool WXDLLEXPORT wxTransferStreamToFile(istream& stream, const wxString& filename);
|
||||
|
||||
|
||||
#endif
|
23
include/wx/dragimag.h
Normal file
23
include/wx/dragimag.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _WX_DRAGIMAG_H_BASE_
|
||||
#define _WX_DRAGIMAG_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#ifdef __WIN16__
|
||||
#include "wx/generic/dragimag.h"
|
||||
#else
|
||||
#include "wx/msw/dragimag.h"
|
||||
#endif
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/generic/dragimag.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/generic/dragimag.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/generic/dragimag.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/generic/dragimag.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/generic/dragimag.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_DRAGIMAG_H_BASE_
|
443
include/wx/dynarray.h
Normal file
443
include/wx/dynarray.h
Normal file
@@ -0,0 +1,443 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dynarray.h
|
||||
// Purpose: auto-resizable (i.e. dynamic) array support
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 12.09.97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _DYNARRAY_H
|
||||
#define _DYNARRAY_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dynarray.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/debug.h"
|
||||
|
||||
/** @name Dynamic arrays and object arrays (array which own their elements)
|
||||
@memo Arrays which grow on demand and do range checking (only in debug)
|
||||
*/
|
||||
//@{
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
the initial size by which an array grows when an element is added
|
||||
default value avoids allocate one or two bytes when the array is created
|
||||
which is rather inefficient
|
||||
*/
|
||||
#define WX_ARRAY_DEFAULT_INITIAL_SIZE (16)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
callback compare function for quick sort
|
||||
must return negative value, 0 or positive value if pItem1 <, = or > pItem2
|
||||
*/
|
||||
|
||||
#ifdef __VISUALC__
|
||||
#define CMPFUNC_CONV _cdecl
|
||||
#else // !Visual C++
|
||||
#define CMPFUNC_CONV
|
||||
#endif // compiler
|
||||
typedef int (CMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/**
|
||||
base class managing data having size of type 'long' (not used directly)
|
||||
|
||||
NB: for efficiency this often used class has no virtual functions (hence no
|
||||
VTBL), even dtor is <B>not</B> virtual. If used as expected it won't
|
||||
create any problems because ARRAYs from DEFINE_ARRAY have no dtor at all,
|
||||
so it's not too important if it's not called (this happens when you cast
|
||||
"SomeArray *" as "BaseArray *" and then delete it)
|
||||
|
||||
@memo Base class for template array classes
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxBaseArray
|
||||
{
|
||||
public:
|
||||
/** @name ctors and dtor */
|
||||
//@{
|
||||
/// default ctor
|
||||
wxBaseArray();
|
||||
/// copy ctor
|
||||
wxBaseArray(const wxBaseArray& array);
|
||||
/// assignment operator
|
||||
wxBaseArray& operator=(const wxBaseArray& src);
|
||||
/// not virtual, see above
|
||||
/// EXCEPT for Gnu compiler to reduce warnings...
|
||||
#ifdef __GNUG__
|
||||
virtual
|
||||
#endif
|
||||
~wxBaseArray();
|
||||
//@}
|
||||
|
||||
/** @name memory management */
|
||||
//@{
|
||||
/// empties the array, but doesn't release memory
|
||||
void Empty() { m_nCount = 0; }
|
||||
/// empties the array and releases memory
|
||||
void Clear();
|
||||
/// preallocates memory for given number of items
|
||||
void Alloc(size_t uiSize);
|
||||
/// minimizes the memory used by the array (frees unused memory)
|
||||
void Shrink();
|
||||
//@}
|
||||
|
||||
/** @name simple accessors */
|
||||
//@{
|
||||
/// number of elements in the array
|
||||
size_t Count() const { return m_nCount; }
|
||||
size_t GetCount() const { return m_nCount; }
|
||||
/// is it empty?
|
||||
bool IsEmpty() const { return m_nCount == 0; }
|
||||
//@}
|
||||
|
||||
protected:
|
||||
// these methods are protected because if they were public one could
|
||||
// mistakenly call one of them instead of DEFINE_ARRAY's or OBJARRAY's
|
||||
// type safe methods
|
||||
|
||||
/** @name items access */
|
||||
//@{
|
||||
/// get item at position uiIndex (range checking is done in debug version)
|
||||
long& Item(size_t uiIndex) const
|
||||
{ wxASSERT( uiIndex < m_nCount ); return m_pItems[uiIndex]; }
|
||||
/// same as Item()
|
||||
long& operator[](size_t uiIndex) const { return Item(uiIndex); }
|
||||
//@}
|
||||
|
||||
/** @name item management */
|
||||
//@{
|
||||
/**
|
||||
Search the element in the array, starting from the either side
|
||||
@param bFromEnd if TRUE, start from the end
|
||||
@return index of the first item matched or wxNOT_FOUND
|
||||
@see wxNOT_FOUND
|
||||
*/
|
||||
int Index(long lItem, bool bFromEnd = FALSE) const;
|
||||
/// search for an item using binary search in a sorted array
|
||||
int Index(long lItem, CMPFUNC fnCompare) const;
|
||||
/// add new element at the end
|
||||
void Add(long lItem);
|
||||
/// add item assuming the array is sorted with fnCompare function
|
||||
void Add(long lItem, CMPFUNC fnCompare);
|
||||
/// add new element at given position (it becomes Item[uiIndex])
|
||||
void Insert(long lItem, size_t uiIndex);
|
||||
/// remove first item matching this value
|
||||
void Remove(long lItem);
|
||||
/// remove item by index
|
||||
void Remove(size_t uiIndex);
|
||||
//@}
|
||||
|
||||
/// sort array elements using given compare function
|
||||
void Sort(CMPFUNC fnCompare);
|
||||
|
||||
private:
|
||||
void Grow(); // makes array bigger if needed
|
||||
|
||||
size_t m_nSize, // current size of the array
|
||||
m_nCount; // current number of elements
|
||||
|
||||
long *m_pItems; // pointer to data
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// template classes
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// This macro generates a new array class. It is intended for storage of simple
|
||||
// types of sizeof()<=sizeof(long) or pointers if sizeof(pointer)<=sizeof(long)
|
||||
//
|
||||
// NB: it has only inline functions => takes no space at all
|
||||
// Mod by JACS: Salford C++ doesn't like 'var->operator=' syntax, as in:
|
||||
// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
|
||||
// so using a temporary variable instead.
|
||||
// ----------------------------------------------------------------------------
|
||||
#define _WX_DEFINE_ARRAY(T, name) \
|
||||
typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
|
||||
class WXDLLEXPORTLOCAL name : public wxBaseArray \
|
||||
{ \
|
||||
public: \
|
||||
name() \
|
||||
{ wxASSERT( sizeof(T) <= sizeof(long) ); } \
|
||||
\
|
||||
name& operator=(const name& src) \
|
||||
{ wxBaseArray* temp = (wxBaseArray*) this; \
|
||||
(*temp) = ((const wxBaseArray&)src); \
|
||||
return *this; } \
|
||||
\
|
||||
T& operator[](size_t uiIndex) const \
|
||||
{ return (T&)(wxBaseArray::Item(uiIndex)); } \
|
||||
T& Item(size_t uiIndex) const \
|
||||
{ return (T&)(wxBaseArray::Item(uiIndex)); } \
|
||||
T& Last() const \
|
||||
{ return (T&)(wxBaseArray::Item(Count() - 1)); } \
|
||||
\
|
||||
int Index(T Item, bool bFromEnd = FALSE) const \
|
||||
{ return wxBaseArray::Index((long)Item, bFromEnd); } \
|
||||
\
|
||||
void Add(T Item) \
|
||||
{ wxBaseArray::Add((long)Item); } \
|
||||
void Insert(T Item, size_t uiIndex) \
|
||||
{ wxBaseArray::Insert((long)Item, uiIndex) ; } \
|
||||
\
|
||||
void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \
|
||||
void Remove(T Item) \
|
||||
{ int iIndex = Index(Item); \
|
||||
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
||||
_T("removing inexisting element in wxArray::Remove") ); \
|
||||
wxBaseArray::Remove((size_t)iIndex); } \
|
||||
\
|
||||
void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// This is the same as the previous macro, but it defines a sorted array.
|
||||
// Differences:
|
||||
// 1) it must be given a COMPARE function in ctor which takes 2 items of type
|
||||
// T* and should return -1, 0 or +1 if the first one is less/greater
|
||||
// than/equal to the second one.
|
||||
// 2) the Add() method inserts the item in such was that the array is always
|
||||
// sorted (it uses the COMPARE function)
|
||||
// 3) it has no Sort() method because it's always sorted
|
||||
// 4) Index() method is much faster (the sorted arrays use binary search
|
||||
// instead of linear one), but Add() is slower.
|
||||
//
|
||||
// Summary: use this class when the speed of Index() function is important, use
|
||||
// the normal arrays otherwise.
|
||||
//
|
||||
// NB: it has only inline functions => takes no space at all
|
||||
// Mod by JACS: Salford C++ doesn't like 'var->operator=' syntax, as in:
|
||||
// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
|
||||
// so using a temporary variable instead.
|
||||
// ----------------------------------------------------------------------------
|
||||
#define _WX_DEFINE_SORTED_ARRAY(T, name) \
|
||||
typedef int (CMPFUNC_CONV *SCMPFUNC##T)(T pItem1, T pItem2); \
|
||||
class WXDLLEXPORTLOCAL name : public wxBaseArray \
|
||||
{ \
|
||||
public: \
|
||||
name(SCMPFUNC##T fn) \
|
||||
{ wxASSERT( sizeof(T) <= sizeof(long) ); m_fnCompare = fn; } \
|
||||
\
|
||||
name& operator=(const name& src) \
|
||||
{ wxBaseArray* temp = (wxBaseArray*) this; \
|
||||
(*temp) = ((const wxBaseArray&)src); \
|
||||
m_fnCompare = src.m_fnCompare; \
|
||||
return *this; } \
|
||||
\
|
||||
T& operator[](size_t uiIndex) const \
|
||||
{ return (T&)(wxBaseArray::Item(uiIndex)); } \
|
||||
T& Item(size_t uiIndex) const \
|
||||
{ return (T&)(wxBaseArray::Item(uiIndex)); } \
|
||||
T& Last() const \
|
||||
{ return (T&)(wxBaseArray::Item(Count() - 1)); } \
|
||||
\
|
||||
int Index(T Item) const \
|
||||
{ return wxBaseArray::Index((long)Item, (CMPFUNC)m_fnCompare); }\
|
||||
\
|
||||
void Add(T Item) \
|
||||
{ wxBaseArray::Add((long)Item, (CMPFUNC)m_fnCompare); } \
|
||||
\
|
||||
void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \
|
||||
void Remove(T Item) \
|
||||
{ int iIndex = Index(Item); \
|
||||
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
||||
_T("removing inexisting element in wxArray::Remove") ); \
|
||||
wxBaseArray::Remove((size_t)iIndex); } \
|
||||
\
|
||||
private: \
|
||||
SCMPFUNC##T m_fnCompare; \
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// see WX_DECLARE_OBJARRAY and WX_DEFINE_OBJARRAY
|
||||
// ----------------------------------------------------------------------------
|
||||
#define _WX_DECLARE_OBJARRAY(T, name) \
|
||||
typedef int (CMPFUNC_CONV *CMPFUNC##T)(T** pItem1, T** pItem2); \
|
||||
class WXDLLEXPORTLOCAL name : public wxBaseArray \
|
||||
{ \
|
||||
public: \
|
||||
name() { } \
|
||||
name(const name& src); \
|
||||
name& operator=(const name& src); \
|
||||
\
|
||||
~name(); \
|
||||
\
|
||||
T& operator[](size_t uiIndex) const \
|
||||
{ return *(T*)wxBaseArray::Item(uiIndex); } \
|
||||
T& Item(size_t uiIndex) const \
|
||||
{ return *(T*)wxBaseArray::Item(uiIndex); } \
|
||||
T& Last() const \
|
||||
{ return *(T*)(wxBaseArray::Item(Count() - 1)); } \
|
||||
\
|
||||
int Index(const T& Item, bool bFromEnd = FALSE) const; \
|
||||
\
|
||||
void Add(const T& Item); \
|
||||
void Add(const T* pItem) \
|
||||
{ wxBaseArray::Add((long)pItem); } \
|
||||
\
|
||||
void Insert(const T& Item, size_t uiIndex); \
|
||||
void Insert(const T* pItem, size_t uiIndex) \
|
||||
{ wxBaseArray::Insert((long)pItem, uiIndex); } \
|
||||
\
|
||||
void Empty(); \
|
||||
\
|
||||
T* Detach(size_t uiIndex) \
|
||||
{ T* p = (T*)wxBaseArray::Item(uiIndex); \
|
||||
wxBaseArray::Remove(uiIndex); return p; } \
|
||||
void Remove(size_t uiIndex); \
|
||||
\
|
||||
void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \
|
||||
\
|
||||
private: \
|
||||
void DoCopy(const name& src); \
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** @name Macros for definition of dynamic arrays and objarrays
|
||||
|
||||
These macros are ugly (especially if you look in the sources ;-), but they
|
||||
allow us to define 'template' classes without actually using templates.
|
||||
<BR>
|
||||
<BR>
|
||||
Range checking is performed in debug build for both arrays and objarrays.
|
||||
Type checking is done at compile-time. Warning: arrays <I>never</I> shrink,
|
||||
they only grow, so loading 10 millions in an array only to delete them 2
|
||||
lines below is <I>not</I> recommended. However, it does free memory when
|
||||
it's destroyed, so if you destroy array also, it's ok.
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//@{
|
||||
/**
|
||||
This macro generates a new array class. It is intended for storage of simple
|
||||
types of sizeof()<=sizeof(long) or pointers if sizeof(pointer)<=sizeof(long)
|
||||
<BR>
|
||||
NB: it has only inline functions => takes no space at all
|
||||
<BR>
|
||||
|
||||
@memo declare and define array class 'name' containing elements of type 'T'
|
||||
*/
|
||||
#define WX_DEFINE_ARRAY(T, name) typedef T _A##name; \
|
||||
_WX_DEFINE_ARRAY(_A##name, name)
|
||||
|
||||
/**
|
||||
This macro does the same as WX_DEFINE_ARRAY except that the array will be
|
||||
sorted with the specified compare function.
|
||||
*/
|
||||
#define WX_DEFINE_SORTED_ARRAY(T, name) typedef T _A##name; \
|
||||
_WX_DEFINE_SORTED_ARRAY(_A##name, name)
|
||||
|
||||
/**
|
||||
This macro generates a new objarrays class which owns the objects it
|
||||
contains, i.e. it will delete them when it is destroyed. An element is of
|
||||
type T*, but arguments of type T& are taken (see below!) and T& is
|
||||
returned. <BR>
|
||||
Don't use this for simple types such as "int" or "long"!
|
||||
You _may_ use it for "double" but it's awfully inefficient.
|
||||
<BR>
|
||||
<BR>
|
||||
Note on Add/Insert functions:
|
||||
<BR>
|
||||
1) function(T*) gives the object to the array, i.e. it will delete the
|
||||
object when it's removed or in the array's dtor
|
||||
<BR>
|
||||
2) function(T&) will create a copy of the object and work with it
|
||||
<BR>
|
||||
<BR>
|
||||
Also:
|
||||
<BR>
|
||||
1) Remove() will delete the object after removing it from the array
|
||||
<BR>
|
||||
2) Detach() just removes the object from the array (returning pointer to it)
|
||||
<BR>
|
||||
<BR>
|
||||
NB1: Base type T should have an accessible copy ctor if Add(T&) is used,
|
||||
<BR>
|
||||
NB2: Never ever cast a array to it's base type: as dtor is <B>not</B> virtual
|
||||
it will provoke memory leaks
|
||||
<BR>
|
||||
<BR>
|
||||
some functions of this class are not inline, so it takes some space to
|
||||
define new class from this template.
|
||||
|
||||
@memo declare objarray class 'name' containing elements of type 'T'
|
||||
*/
|
||||
#define WX_DECLARE_OBJARRAY(T, name) typedef T _L##name; \
|
||||
_WX_DECLARE_OBJARRAY(_L##name, name)
|
||||
/**
|
||||
To use an objarray class you must
|
||||
<ll>
|
||||
<li>#include "dynarray.h"
|
||||
<li>WX_DECLARE_OBJARRAY(element_type, list_class_name)
|
||||
<li>#include "arrimpl.cpp"
|
||||
<li>WX_DEFINE_OBJARRAY(list_class_name) // same as above!
|
||||
</ll>
|
||||
<BR><BR>
|
||||
This is necessary because at the moment of DEFINE_OBJARRAY class
|
||||
element_type must be fully defined (i.e. forward declaration is not
|
||||
enough), while WX_DECLARE_OBJARRAY may be done anywhere. The separation of
|
||||
two allows to break cicrcular dependencies with classes which have member
|
||||
variables of objarray type.
|
||||
|
||||
@memo define (must include arrimpl.cpp!) objarray class 'name'
|
||||
*/
|
||||
#define WX_DEFINE_OBJARRAY(name) "don't forget to include arrimpl.cpp!"
|
||||
//@}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** @name Some commonly used predefined arrays */
|
||||
// # overhead if not used?
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define WXDLLEXPORTLOCAL WXDLLEXPORT
|
||||
|
||||
//@{
|
||||
/** @name ArrayInt */
|
||||
WX_DEFINE_ARRAY(int, wxArrayInt);
|
||||
/** @name ArrayLong */
|
||||
WX_DEFINE_ARRAY(long, wxArrayLong);
|
||||
/** @name ArrayPtrVoid */
|
||||
WX_DEFINE_ARRAY(void *, wxArrayPtrVoid);
|
||||
//@}
|
||||
|
||||
//@}
|
||||
|
||||
#undef WXDLLEXPORTLOCAL
|
||||
#define WXDLLEXPORTLOCAL
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// convinience macros
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// delete all array elements
|
||||
//
|
||||
// NB: the class declaration of the array elements must be visible from the
|
||||
// place where you use this macro, otherwise the proper destructor may not
|
||||
// be called (a decent compiler should give a warning about it, but don't
|
||||
// count on it)!
|
||||
#define WX_CLEAR_ARRAY(array) \
|
||||
{ \
|
||||
size_t count = array.Count(); \
|
||||
for ( size_t n = 0; n < count; n++ ) \
|
||||
{ \
|
||||
delete array[n]; \
|
||||
} \
|
||||
\
|
||||
array.Empty(); \
|
||||
}
|
||||
#endif // _DYNARRAY_H
|
||||
|
121
include/wx/dynlib.h
Normal file
121
include/wx/dynlib.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dynlib.cpp
|
||||
// Purpose: Dynamic library management
|
||||
// Author: Guilhem Lavaux
|
||||
// Modified by:
|
||||
// Created: 20/07/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Guilhem Lavaux
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DYNLIB_H__
|
||||
#define _WX_DYNLIB_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <wx/setup.h>
|
||||
|
||||
#if wxUSE_DYNLIB_CLASS
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/list.h>
|
||||
#include <wx/hash.h>
|
||||
|
||||
// this is normally done by configure, but I leave it here for now...
|
||||
#if defined(__UNIX__) && !(defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD))
|
||||
#if defined(__LINUX__) || defined(__SOLARIS__) || defined(__SUNOS__) || defined(__FREEBSD__)
|
||||
#define HAVE_DLOPEN
|
||||
#elif defined(__HPUX__)
|
||||
#define HAVE_SHL_LOAD
|
||||
#endif // Unix flavour
|
||||
#endif // !Unix or already have some HAVE_xxx defined
|
||||
|
||||
#if defined(HAVE_DLOPEN)
|
||||
#include <dlfcn.h>
|
||||
|
||||
typedef void *wxDllType;
|
||||
#elif defined(HAVE_SHL_LOAD)
|
||||
#include <dl.h>
|
||||
|
||||
typedef shl_t wxDllType;
|
||||
#elif defined(__WINDOWS__)
|
||||
#include <windows.h>
|
||||
|
||||
typedef HMODULE wxDllType;
|
||||
#elif defined(__WXMAC__)
|
||||
typedef CFragConnectionID wxDllType;
|
||||
#else
|
||||
#error "wxLibrary can't be compiled on this platform, sorry."
|
||||
#endif // OS
|
||||
|
||||
// defined in windows.h
|
||||
#ifdef LoadLibrary
|
||||
#undef LoadLibrary
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxLibrary
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxLibrary : public wxObject
|
||||
{
|
||||
public:
|
||||
wxHashTable classTable;
|
||||
|
||||
public:
|
||||
wxLibrary(wxDllType handle);
|
||||
~wxLibrary();
|
||||
|
||||
// Get a symbol from the dynamic library
|
||||
void *GetSymbol(const wxString& symbname);
|
||||
|
||||
// Create the object whose classname is "name"
|
||||
wxObject *CreateObject(const wxString& name);
|
||||
|
||||
protected:
|
||||
void PrepareClasses(wxClassInfo *first);
|
||||
|
||||
wxDllType m_handle;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxLibraries
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxLibraries
|
||||
{
|
||||
public:
|
||||
wxLibraries();
|
||||
~wxLibraries();
|
||||
|
||||
// caller is responsible for deleting the returned pointer if !NULL
|
||||
wxLibrary *LoadLibrary(const wxString& basename);
|
||||
|
||||
wxObject *CreateObject(const wxString& name);
|
||||
|
||||
protected:
|
||||
wxList m_loaded;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Global variables
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
extern wxLibraries wxTheLibraries;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Interesting defines
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define WXDLL_ENTRY_FUNCTION() \
|
||||
extern "C" wxClassInfo *wxGetClassFirst(); \
|
||||
wxClassInfo *wxGetClassFirst() { \
|
||||
return wxClassInfo::GetFirst(); \
|
||||
}
|
||||
|
||||
#endif // wxUSE_DYNLIB_CLASS
|
||||
|
||||
#endif // _WX_DYNLIB_H__
|
1445
include/wx/event.h
Normal file
1445
include/wx/event.h
Normal file
File diff suppressed because it is too large
Load Diff
129
include/wx/expr.h
Normal file
129
include/wx/expr.h
Normal file
@@ -0,0 +1,129 @@
|
||||
/* //////////////////////////////////////////////////////////////////////////
|
||||
// Name: expr.h
|
||||
// Purpose: C helper defines and functions for wxExpr class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
////////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#ifndef _WX_EXPRH__
|
||||
#define _WX_EXPRH__
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef ____HPUX__
|
||||
#define alloca malloc
|
||||
#endif
|
||||
|
||||
/* Rename all YACC/LEX stuff or we'll conflict with other
|
||||
* applications
|
||||
*/
|
||||
|
||||
#define yyback PROIO_yyback
|
||||
#define yylook PROIO_yylook
|
||||
#define yywrap PROIO_yywrap
|
||||
#define yyoutput PROIO_yyoutput
|
||||
#define yylex PROIO_yylex
|
||||
#define yyerror PROIO_yyerror
|
||||
#define input PROIO_input
|
||||
#define unput PROIO_unput
|
||||
|
||||
#define yyleng PROIO_yyleng
|
||||
#define yytext PROIO_yytext
|
||||
#define yymorfg PROIO_yymorfg
|
||||
#define yylineno PROIO_yylineno
|
||||
#define yytchar PROIO_yytchar
|
||||
#define yyin PROIO_yyin
|
||||
#define yyout PROIO_yyout
|
||||
#define yysvf PROIO_yysvf
|
||||
#define yyestate PROIO_yyestate
|
||||
#define yysvec PROIO_yysvec
|
||||
#define yybgin PROIO_yybgin
|
||||
#define yyprevious PROIO_yyprevious
|
||||
#define yylhs PROIO_yylhs
|
||||
#define yylen PROIO_yylen
|
||||
#define yydefred PROIO_yydefred
|
||||
#define yydgoto PROIO_yydgoto
|
||||
#define yysindex PROIO_yysindex
|
||||
#define yyrindex PROIO_yyrindex
|
||||
#define yygindex PROIO_yygindex
|
||||
#define yytable PROIO_yytable
|
||||
#define yycheck PROIO_yycheck
|
||||
#define yyname PROIO_yyname
|
||||
#define yyrule PROIO_yyrule
|
||||
#define yydebug PROIO_yydebug
|
||||
#define yynerrs PROIO_yynerrs
|
||||
#define yyerrflag PROIO_yyerrflag
|
||||
#define yychar PROIO_yychar
|
||||
#define yyvsp PROIO_yyvsp
|
||||
#define yyssp PROIO_yyssp
|
||||
#define yyval PROIO_yyval
|
||||
#define yylval PROIO_yylval
|
||||
#define yyss PROIO_yyss
|
||||
#define yyvs PROIO_yyvs
|
||||
#define yyparse PROIO_yyparse
|
||||
|
||||
/* +++steve162e: more defines necessary */
|
||||
#define yy_init_buffer PROIO_yy_init_buffer
|
||||
#define yy_create_buffer PROIO_yy_create_buffer
|
||||
#define yy_load_buffer_state PROIO_yy_load_buffer_state
|
||||
#define yyrestart PROIO_yyrestart
|
||||
#define yy_switch_to_buffer PROIO_yy_switch_to_buffer
|
||||
#define yy_delete_buffer PROIO_yy_delete_buffer
|
||||
/* ---steve162e */
|
||||
|
||||
/* WG 1/96: still more for flex 2.5 */
|
||||
#define yy_scan_buffer PROIO_scan_buffer
|
||||
#define yy_scan_string PROIO_scan_string
|
||||
#define yy_scan_bytes PROIO_scan_bytes
|
||||
#define yy_flex_debug PROIO_flex_debug
|
||||
#define yy_flush_buffer PROIO_flush_buffer
|
||||
#define yyleng PROIO_yyleng
|
||||
#define yytext PROIO_yytext
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
char *proio_cons(char *, char *);
|
||||
char * wxmake_integer(char *);
|
||||
char * wxmake_word(char *);
|
||||
char * wxmake_string(char *);
|
||||
char * wxmake_real(char *, char *);
|
||||
char * wxmake_exp(char *, char *);
|
||||
char * wxmake_exp2(char *, char *, char*);
|
||||
void add_expr(char *);
|
||||
void process_command(char *);
|
||||
void syntax_error(char *);
|
||||
}
|
||||
#else
|
||||
#if __BORLANDC__
|
||||
char *proio_cons(char *, char *);
|
||||
char * wxmake_integer(char *);
|
||||
char * wxmake_word(char *);
|
||||
char * wxmake_string(char *);
|
||||
char * wxmake_real(char *, char *);
|
||||
char * wxmake_exp(char *, char *);
|
||||
char * wxmake_exp2(char *, char *, char*);
|
||||
void add_expr(char *);
|
||||
void process_command(char *);
|
||||
void syntax_error(char *);
|
||||
#else
|
||||
char *proio_cons();
|
||||
char * wxmake_integer();
|
||||
char * wxmake_word();
|
||||
char * wxmake_string();
|
||||
char * wxmake_real();
|
||||
char * wxmake_exp();
|
||||
char * wxmake_exp2();
|
||||
|
||||
void add_expr();
|
||||
void process_command();
|
||||
void syntax_error();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* _WX_EXPRH__ */
|
182
include/wx/file.h
Normal file
182
include/wx/file.h
Normal file
@@ -0,0 +1,182 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: file.cpp
|
||||
// Purpose: wxFile - encapsulates low-level "file descriptor"
|
||||
// wxTempFile - safely replace the old file
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 29/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FILEH__
|
||||
#define __FILEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "file.h"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
#include "wx/filefn.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// we redefine these constants here because S_IREAD &c are _not_ standard
|
||||
// however, we do assume that the values correspond to the Unix umask bits
|
||||
#define wxS_IRUSR 00400
|
||||
#define wxS_IWUSR 00200
|
||||
#define wxS_IXUSR 00100
|
||||
|
||||
#define wxS_IRGRP 00040
|
||||
#define wxS_IWGRP 00020
|
||||
#define wxS_IXGRP 00010
|
||||
|
||||
#define wxS_IROTH 00004
|
||||
#define wxS_IWOTH 00002
|
||||
#define wxS_IXOTH 00001
|
||||
|
||||
// default mode for the new files: corresponds to umask 022
|
||||
#define wxS_DEFAULT (wxS_IRUSR | wxS_IWUSR | wxS_IRGRP | wxS_IWGRP |\
|
||||
wxS_IROTH | wxS_IWOTH)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// class wxFile: raw file IO
|
||||
//
|
||||
// NB: for space efficiency this class has no virtual functions, including
|
||||
// dtor which is _not_ virtual, so it shouldn't be used as a base class.
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxFile
|
||||
{
|
||||
public:
|
||||
// more file constants
|
||||
// -------------------
|
||||
// opening mode
|
||||
enum OpenMode { read, write, read_write, write_append };
|
||||
// standard values for file descriptor
|
||||
enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr };
|
||||
|
||||
// static functions
|
||||
// ----------------
|
||||
// check whether a regular file by this name exists
|
||||
static bool Exists(const wxChar *name);
|
||||
// check whetther we can access the given file in given mode
|
||||
// (only read and write make sense here)
|
||||
static bool Access(const wxChar *name, OpenMode mode);
|
||||
|
||||
// ctors
|
||||
// -----
|
||||
// def ctor
|
||||
wxFile() { m_fd = fd_invalid; }
|
||||
// open specified file (may fail, use IsOpened())
|
||||
wxFile(const wxChar *szFileName, OpenMode mode = read);
|
||||
// attach to (already opened) file
|
||||
wxFile(int fd) { m_fd = fd; }
|
||||
|
||||
// open/close
|
||||
// create a new file (with the default value of bOverwrite, it will fail if
|
||||
// the file already exists, otherwise it will overwrite it and succeed)
|
||||
bool Create(const wxChar *szFileName, bool bOverwrite = FALSE,
|
||||
int access = wxS_DEFAULT);
|
||||
bool Open(const wxChar *szFileName, OpenMode mode = read,
|
||||
int access = wxS_DEFAULT);
|
||||
bool Close(); // Close is a NOP if not opened
|
||||
|
||||
// assign an existing file descriptor and get it back from wxFile object
|
||||
void Attach(int fd) { Close(); m_fd = fd; }
|
||||
void Detach() { m_fd = fd_invalid; }
|
||||
int fd() const { return m_fd; }
|
||||
|
||||
// read/write (unbuffered)
|
||||
// returns number of bytes read or ofsInvalid on error
|
||||
off_t Read(void *pBuf, off_t nCount);
|
||||
// returns true on success
|
||||
size_t Write(const void *pBuf, size_t nCount);
|
||||
// returns true on success
|
||||
bool Write(const wxString& s) { return Write(s.c_str(), s.Len()*sizeof(wxChar)) != 0; }
|
||||
// flush data not yet written
|
||||
bool Flush();
|
||||
|
||||
// file pointer operations (return ofsInvalid on failure)
|
||||
// move ptr ofs bytes related to start/current off_t/end of file
|
||||
off_t Seek(off_t ofs, wxSeekMode mode = wxFromStart);
|
||||
// move ptr to ofs bytes before the end
|
||||
off_t SeekEnd(off_t ofs = 0) { return Seek(ofs, wxFromEnd); }
|
||||
// get current off_t
|
||||
off_t Tell() const;
|
||||
// get current file length
|
||||
off_t Length() const;
|
||||
|
||||
// simple accessors
|
||||
// is file opened?
|
||||
bool IsOpened() const { return m_fd != fd_invalid; }
|
||||
// is end of file reached?
|
||||
bool Eof() const;
|
||||
// is an error occured?
|
||||
bool Error() const { return m_error; }
|
||||
|
||||
// dtor closes the file if opened
|
||||
~wxFile();
|
||||
|
||||
private:
|
||||
// copy ctor and assignment operator are private because
|
||||
// it doesn't make sense to copy files this way:
|
||||
// attempt to do it will provoke a compile-time error.
|
||||
wxFile(const wxFile&);
|
||||
wxFile& operator=(const wxFile&);
|
||||
|
||||
int m_fd; // file descriptor or INVALID_FD if not opened
|
||||
bool m_error; // error memory
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// class wxTempFile: if you want to replace another file, create an instance
|
||||
// of wxTempFile passing the name of the file to be replaced to the ctor. Then
|
||||
// you can write to wxTempFile and call Commit() function to replace the old
|
||||
// file (and close this one) or call Discard() to cancel the modification. If
|
||||
// you call neither of them, dtor will call Discard().
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxTempFile
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// default
|
||||
wxTempFile() { }
|
||||
// associates the temp file with the file to be replaced and opens it
|
||||
wxTempFile(const wxString& strName);
|
||||
|
||||
// open the temp file (strName is the name of file to be replaced)
|
||||
bool Open(const wxString& strName);
|
||||
|
||||
// is the file opened?
|
||||
bool IsOpened() const { return m_file.IsOpened(); }
|
||||
|
||||
// I/O (both functions return true on success, false on failure)
|
||||
bool Write(const void *p, size_t n) { return m_file.Write(p, n) != 0; }
|
||||
bool Write(const wxString& str) { return m_file.Write(str); }
|
||||
|
||||
// different ways to close the file
|
||||
// validate changes and delete the old file of name m_strName
|
||||
bool Commit();
|
||||
// discard changes
|
||||
void Discard();
|
||||
|
||||
// dtor calls Discard() if file is still opened
|
||||
~wxTempFile();
|
||||
|
||||
private:
|
||||
// no copy ctor/assignment operator
|
||||
wxTempFile(const wxTempFile&);
|
||||
wxTempFile& operator=(const wxTempFile&);
|
||||
|
||||
wxString m_strName, // name of the file to replace in Commit()
|
||||
m_strTemp; // temporary file name
|
||||
wxFile m_file; // the temporary file
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_FILEH__
|
353
include/wx/fileconf.h
Normal file
353
include/wx/fileconf.h
Normal file
@@ -0,0 +1,353 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: fileconf.h
|
||||
// Purpose: wxFileConfig derivation of wxConfigBase
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 07.04.98 (adapted from appconf.cpp)
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1997 Karsten Ball<6C>der & Vadim Zeitlin
|
||||
// Ballueder@usa.net <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _FILECONF_H
|
||||
#define _FILECONF_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "fileconf.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/textfile.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// compile options
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// it won't compile without it anyhow
|
||||
#ifndef wxUSE_CONFIG
|
||||
#error "Please define wxUSE_CONFIG or remove fileconf.cpp from your makefile"
|
||||
#endif // wxUSE_CONFIG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFileConfig
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
wxFileConfig derives from base Config and implements file based config class,
|
||||
i.e. it uses ASCII disk files to store the information. These files are
|
||||
alternatively called INI, .conf or .rc in the documentation. They are
|
||||
organized in groups or sections, which can nest (i.e. a group contains
|
||||
subgroups, which contain their own subgroups &c). Each group has some
|
||||
number of entries, which are "key = value" pairs. More precisely, the format
|
||||
is:
|
||||
|
||||
# comments are allowed after either ';' or '#' (Win/UNIX standard)
|
||||
|
||||
# blank lines (as above) are ignored
|
||||
|
||||
# global entries are members of special (no name) top group
|
||||
written_for = Windows
|
||||
platform = Linux
|
||||
|
||||
# the start of the group 'Foo'
|
||||
[Foo] # may put comments like this also
|
||||
# following 3 lines are entries
|
||||
key = value
|
||||
another_key = " strings with spaces in the beginning should be quoted, \
|
||||
otherwise the spaces are lost"
|
||||
last_key = but you don't have to put " normally (nor quote them, like here)
|
||||
|
||||
# subgroup of the group 'Foo'
|
||||
# (order is not important, only the name is: separator is '/', as in paths)
|
||||
[Foo/Bar]
|
||||
# entries prefixed with "!" are immutable, i.e. can't be changed if they are
|
||||
# set in the system-wide config file
|
||||
!special_key = value
|
||||
bar_entry = whatever
|
||||
|
||||
[Foo/Bar/Fubar] # depth is (theoretically :-) unlimited
|
||||
# may have the same name as key in another section
|
||||
bar_entry = whatever not
|
||||
|
||||
You have {read/write/delete}Entry functions (guess what they do) and also
|
||||
setCurrentPath to select current group. enum{Subgroups/Entries} allow you
|
||||
to get all entries in the config file (in the current group). Finally,
|
||||
flush() writes immediately all changed entries to disk (otherwise it would
|
||||
be done automatically in dtor)
|
||||
|
||||
wxFileConfig manages not less than 2 config files for each program: global
|
||||
and local (or system and user if you prefer). Entries are read from both of
|
||||
them and the local entries override the global ones unless the latter is
|
||||
immutable (prefixed with '!') in which case a warning message is generated
|
||||
and local value is ignored. Of course, the changes are always written to local
|
||||
file only.
|
||||
|
||||
The names of these files can be specified in a number of ways. First of all,
|
||||
you can use the standard convention: using the ctor which takes 'strAppName'
|
||||
parameter will probably be sufficient for 90% of cases. If, for whatever
|
||||
reason you wish to use the files with some other names, you can always use the
|
||||
second ctor.
|
||||
|
||||
wxFileConfig also may automatically expand the values of environment variables
|
||||
in the entries it reads: for example, if you have an entry
|
||||
score_file = $HOME/.score
|
||||
a call to Read(&str, "score_file") will return a complete path to .score file
|
||||
unless the expansion was previousle disabled with SetExpandEnvVars(FALSE) call
|
||||
(it's on by default, the current status can be retrieved with
|
||||
IsExpandingEnvVars function).
|
||||
*/
|
||||
class wxFileConfig;
|
||||
class ConfigGroup;
|
||||
class ConfigEntry;
|
||||
|
||||
// we store all lines of the local config file as a linked list in memory
|
||||
class LineList
|
||||
{
|
||||
public:
|
||||
void SetNext(LineList *pNext) { m_pNext = pNext; }
|
||||
void SetPrev(LineList *pPrev) { m_pPrev = pPrev; }
|
||||
|
||||
// ctor
|
||||
LineList(const wxString& str, LineList *pNext = (LineList *) NULL) : m_strLine(str)
|
||||
{ SetNext(pNext); SetPrev((LineList *) NULL); }
|
||||
|
||||
//
|
||||
LineList *Next() const { return m_pNext; }
|
||||
LineList *Prev() const { return m_pPrev; }
|
||||
|
||||
//
|
||||
void SetText(const wxString& str) { m_strLine = str; }
|
||||
const wxString& Text() const { return m_strLine; }
|
||||
|
||||
private:
|
||||
wxString m_strLine; // line contents
|
||||
LineList *m_pNext, // next node
|
||||
*m_pPrev; // previous one
|
||||
};
|
||||
|
||||
class wxFileConfig : public wxConfigBase
|
||||
{
|
||||
public:
|
||||
// construct the "standard" full name for global (system-wide) and
|
||||
// local (user-specific) config files from the base file name.
|
||||
//
|
||||
// the following are the filenames returned by this functions:
|
||||
// global local
|
||||
// Unix /etc/file.ext ~/.file
|
||||
// Win %windir%\file.ext %USERPROFILE%\file.ext
|
||||
//
|
||||
// where file is the basename of szFile, ext is it's extension
|
||||
// or .conf (Unix) or .ini (Win) if it has none
|
||||
static wxString GetGlobalFileName(const wxChar *szFile);
|
||||
static wxString GetLocalFileName(const wxChar *szFile);
|
||||
|
||||
// ctor & dtor
|
||||
// New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or
|
||||
// wxCONFIG_USE_GLOBAL_FILE to say which files should be used.
|
||||
wxFileConfig(const wxString& appName,
|
||||
const wxString& vendorName = _T(""),
|
||||
const wxString& localFilename = _T(""),
|
||||
const wxString& globalFilename = _T(""),
|
||||
long style = wxCONFIG_USE_LOCAL_FILE);
|
||||
|
||||
// dtor will save unsaved data
|
||||
virtual ~wxFileConfig();
|
||||
|
||||
// implement inherited pure virtual functions
|
||||
virtual void SetPath(const wxString& strPath);
|
||||
virtual const wxString& GetPath() const { return m_strPath; }
|
||||
|
||||
virtual bool GetFirstGroup(wxString& str, long& lIndex) const;
|
||||
virtual bool GetNextGroup (wxString& str, long& lIndex) const;
|
||||
virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
|
||||
virtual bool GetNextEntry (wxString& str, long& lIndex) const;
|
||||
|
||||
virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const;
|
||||
virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const;
|
||||
|
||||
virtual bool HasGroup(const wxString& strName) const;
|
||||
virtual bool HasEntry(const wxString& strName) const;
|
||||
|
||||
virtual bool Read(const wxString& key, wxString *pStr) const;
|
||||
virtual bool Read(const wxString& key, wxString *pStr, const wxString& defValue) const;
|
||||
virtual bool Read(const wxString& key, long *pl) const;
|
||||
|
||||
// The following are necessary to satisfy the compiler
|
||||
wxString Read(const wxString& key, const wxString& defVal) const
|
||||
{ return wxConfigBase::Read(key, defVal); }
|
||||
bool Read(const wxString& key, long *pl, long defVal) const
|
||||
{ return wxConfigBase::Read(key, pl, defVal); }
|
||||
long Read(const wxString& key, long defVal) const
|
||||
{ return wxConfigBase::Read(key, defVal); }
|
||||
bool Read(const wxString& key, int *pi, int defVal) const
|
||||
{ return wxConfigBase::Read(key, pi, defVal); }
|
||||
bool Read(const wxString& key, int *pi) const
|
||||
{ return wxConfigBase::Read(key, pi); }
|
||||
bool Read(const wxString& key, double* val) const
|
||||
{ return wxConfigBase::Read(key, val); }
|
||||
bool Read(const wxString& key, double* val, double defVal) const
|
||||
{ return wxConfigBase::Read(key, val, defVal); }
|
||||
bool Read(const wxString& key, bool* val) const
|
||||
{ return wxConfigBase::Read(key, val); }
|
||||
bool Read(const wxString& key, bool* val, bool defVal) const
|
||||
{ return wxConfigBase::Read(key, val, defVal); }
|
||||
|
||||
virtual bool Write(const wxString& key, const wxString& szValue);
|
||||
virtual bool Write(const wxString& key, long lValue);
|
||||
bool Write(const wxString& key, double value)
|
||||
{ return wxConfigBase::Write(key, value); }
|
||||
bool Write(const wxString& key, bool value)
|
||||
{ return wxConfigBase::Write(key, value); }
|
||||
|
||||
virtual bool Flush(bool bCurrentOnly = FALSE);
|
||||
|
||||
virtual bool RenameEntry(const wxString& oldName, const wxString& newName);
|
||||
virtual bool RenameGroup(const wxString& oldName, const wxString& newName);
|
||||
|
||||
virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso);
|
||||
virtual bool DeleteGroup(const wxString& szKey);
|
||||
virtual bool DeleteAll();
|
||||
|
||||
public:
|
||||
// functions to work with this list
|
||||
LineList *LineListAppend(const wxString& str);
|
||||
LineList *LineListInsert(const wxString& str,
|
||||
LineList *pLine); // NULL => Prepend()
|
||||
void LineListRemove(LineList *pLine);
|
||||
bool LineListIsEmpty();
|
||||
|
||||
private:
|
||||
// GetXXXFileName helpers: return ('/' terminated) directory names
|
||||
static wxString GetGlobalDir();
|
||||
static wxString GetLocalDir();
|
||||
|
||||
// common part of all ctors (assumes that m_str{Local|Global}File are already
|
||||
// initialized
|
||||
void Init();
|
||||
|
||||
// common part of from dtor and DeleteAll
|
||||
void CleanUp();
|
||||
|
||||
// parse the whole file
|
||||
void Parse(wxTextFile& file, bool bLocal);
|
||||
|
||||
// the same as SetPath("/")
|
||||
void SetRootPath();
|
||||
|
||||
// member variables
|
||||
// ----------------
|
||||
LineList *m_linesHead, // head of the linked list
|
||||
*m_linesTail; // tail
|
||||
|
||||
wxString m_strLocalFile, // local file name passed to ctor
|
||||
m_strGlobalFile; // global
|
||||
wxString m_strPath; // current path (not '/' terminated)
|
||||
|
||||
ConfigGroup *m_pRootGroup, // the top (unnamed) group
|
||||
*m_pCurrentGroup; // the current group
|
||||
|
||||
public:
|
||||
WX_DEFINE_SORTED_ARRAY(ConfigEntry *, ArrayEntries);
|
||||
WX_DEFINE_SORTED_ARRAY(ConfigGroup *, ArrayGroups);
|
||||
};
|
||||
|
||||
class ConfigEntry
|
||||
{
|
||||
private:
|
||||
ConfigGroup *m_pParent; // group that contains us
|
||||
wxString m_strName, // entry name
|
||||
m_strValue; // value
|
||||
bool m_bDirty, // changed since last read?
|
||||
m_bImmutable; // can be overriden locally?
|
||||
int m_nLine; // used if m_pLine == NULL only
|
||||
LineList *m_pLine; // pointer to our line in the linked list
|
||||
// or NULL if it was found in global file
|
||||
|
||||
public:
|
||||
ConfigEntry(ConfigGroup *pParent, const wxString& strName, int nLine);
|
||||
|
||||
// simple accessors
|
||||
const wxString& Name() const { return m_strName; }
|
||||
const wxString& Value() const { return m_strValue; }
|
||||
ConfigGroup *Group() const { return m_pParent; }
|
||||
bool IsDirty() const { return m_bDirty; }
|
||||
bool IsImmutable() const { return m_bImmutable; }
|
||||
bool IsLocal() const { return m_pLine != 0; }
|
||||
int Line() const { return m_nLine; }
|
||||
LineList *GetLine() const { return m_pLine; }
|
||||
|
||||
// modify entry attributes
|
||||
void SetValue(const wxString& strValue, bool bUser = TRUE);
|
||||
void SetDirty();
|
||||
void SetLine(LineList *pLine);
|
||||
};
|
||||
|
||||
class ConfigGroup
|
||||
{
|
||||
private:
|
||||
wxFileConfig *m_pConfig; // config object we belong to
|
||||
ConfigGroup *m_pParent; // parent group (NULL for root group)
|
||||
wxFileConfig::ArrayEntries m_aEntries; // entries in this group
|
||||
wxFileConfig::ArrayGroups m_aSubgroups; // subgroups
|
||||
wxString m_strName; // group's name
|
||||
bool m_bDirty; // if FALSE => all subgroups are not dirty
|
||||
LineList *m_pLine; // pointer to our line in the linked list
|
||||
ConfigEntry *m_pLastEntry; // last entry/subgroup of this group in the
|
||||
ConfigGroup *m_pLastGroup; // local file (we insert new ones after it)
|
||||
|
||||
// DeleteSubgroupByName helper
|
||||
bool DeleteSubgroup(ConfigGroup *pGroup);
|
||||
|
||||
public:
|
||||
// ctor
|
||||
ConfigGroup(ConfigGroup *pParent, const wxString& strName, wxFileConfig *);
|
||||
|
||||
// dtor deletes all entries and subgroups also
|
||||
~ConfigGroup();
|
||||
|
||||
// simple accessors
|
||||
const wxString& Name() const { return m_strName; }
|
||||
ConfigGroup *Parent() const { return m_pParent; }
|
||||
wxFileConfig *Config() const { return m_pConfig; }
|
||||
bool IsDirty() const { return m_bDirty; }
|
||||
|
||||
const wxFileConfig::ArrayEntries& Entries() const { return m_aEntries; }
|
||||
const wxFileConfig::ArrayGroups& Groups() const { return m_aSubgroups; }
|
||||
bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
|
||||
|
||||
// find entry/subgroup (NULL if not found)
|
||||
ConfigGroup *FindSubgroup(const wxChar *szName) const;
|
||||
ConfigEntry *FindEntry (const wxChar *szName) const;
|
||||
|
||||
// delete entry/subgroup, return FALSE if doesn't exist
|
||||
bool DeleteSubgroupByName(const wxChar *szName);
|
||||
bool DeleteEntry(const wxChar *szName);
|
||||
|
||||
// create new entry/subgroup returning pointer to newly created element
|
||||
ConfigGroup *AddSubgroup(const wxString& strName);
|
||||
ConfigEntry *AddEntry (const wxString& strName, int nLine = wxNOT_FOUND);
|
||||
|
||||
// will also recursively set parent's dirty flag
|
||||
void SetDirty();
|
||||
void SetLine(LineList *pLine);
|
||||
|
||||
// rename: no checks are done to ensure that the name is unique!
|
||||
void Rename(const wxString& newName);
|
||||
|
||||
//
|
||||
wxString GetFullName() const;
|
||||
|
||||
// get the last line belonging to an entry/subgroup of this group
|
||||
LineList *GetGroupLine(); // line which contains [group]
|
||||
LineList *GetLastEntryLine(); // after which our subgroups start
|
||||
LineList *GetLastGroupLine(); // after which the next group starts
|
||||
|
||||
// called by entries/subgroups when they're created/deleted
|
||||
void SetLastEntry(ConfigEntry *pEntry) { m_pLastEntry = pEntry; }
|
||||
void SetLastGroup(ConfigGroup *pGroup) { m_pLastGroup = pGroup; }
|
||||
};
|
||||
|
||||
#endif //_FILECONF_H
|
||||
|
20
include/wx/filedlg.h
Normal file
20
include/wx/filedlg.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef _WX_FILEDLG_H_BASE_
|
||||
#define _WX_FILEDLG_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/filedlg.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/filedlg.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/filedlg.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/filedlg.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/filedlg.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/filedlg.h"
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_FILEDLG_H_BASE_
|
239
include/wx/filefn.h
Normal file
239
include/wx/filefn.h
Normal file
@@ -0,0 +1,239 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: filefn.h
|
||||
// Purpose: File- and directory-related functions
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 29/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Julian Smart
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _FILEFN_H_
|
||||
#define _FILEFN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "filefn.h"
|
||||
#endif
|
||||
|
||||
#include <wx/list.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// define off_t
|
||||
#ifndef __WXMAC__
|
||||
#include <sys/types.h>
|
||||
#else
|
||||
typedef long off_t;
|
||||
#endif
|
||||
|
||||
#if defined(__VISUALC__) || ( defined(__MWERKS__) && defined( __INTEL__) )
|
||||
typedef _off_t off_t;
|
||||
#elif defined(__BORLANDC__) && defined(__WIN16__)
|
||||
typedef long off_t;
|
||||
#elif defined(__SC__)
|
||||
typedef long off_t;
|
||||
#elif defined(__MWERKS__) && !defined(__INTEL__)
|
||||
typedef long off_t;
|
||||
#endif
|
||||
|
||||
const off_t wxInvalidOffset = (off_t)-1;
|
||||
|
||||
enum wxSeekMode
|
||||
{
|
||||
wxFromStart,
|
||||
wxFromCurrent,
|
||||
wxFromEnd
|
||||
};
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// functions
|
||||
// ----------------------------------------------------------------------------
|
||||
WXDLLEXPORT bool wxFileExists(const wxString& filename);
|
||||
#define FileExists wxFileExists
|
||||
|
||||
// does the path exist? (may have or not '/' or '\\' at the end)
|
||||
WXDLLEXPORT bool wxPathExists(const wxChar *pszPathName);
|
||||
|
||||
#define wxDirExists wxPathExists
|
||||
#define DirExists wxDirExists
|
||||
|
||||
WXDLLEXPORT bool wxIsAbsolutePath(const wxString& filename);
|
||||
#define IsAbsolutePath wxIsAbsolutePath
|
||||
|
||||
// Get filename
|
||||
WXDLLEXPORT wxChar* wxFileNameFromPath(wxChar *path);
|
||||
WXDLLEXPORT wxString wxFileNameFromPath(const wxString& path);
|
||||
#define FileNameFromPath wxFileNameFromPath
|
||||
|
||||
// Get directory
|
||||
WXDLLEXPORT wxString wxPathOnly(const wxString& path);
|
||||
#define PathOnly wxPathOnly
|
||||
|
||||
// wxString version
|
||||
WXDLLEXPORT wxString wxRealPath(const wxString& path);
|
||||
|
||||
WXDLLEXPORT void wxDos2UnixFilename(wxChar *s);
|
||||
#define Dos2UnixFilename wxDos2UnixFilename
|
||||
|
||||
WXDLLEXPORT void wxUnix2DosFilename(wxChar *s);
|
||||
#define Unix2DosFilename wxUnix2DosFilename
|
||||
|
||||
#ifdef __WXMAC__
|
||||
WXDLLEXPORT void wxMacPathToFSSpec( const wxChar *path , FSSpec *spec ) ;
|
||||
WXDLLEXPORT void wxMac2UnixFilename(wxChar *s);
|
||||
WXDLLEXPORT void wxUnix2MacFilename(wxChar *s);
|
||||
#endif
|
||||
|
||||
// Strip the extension, in situ
|
||||
WXDLLEXPORT void wxStripExtension(wxChar *buffer);
|
||||
WXDLLEXPORT void wxStripExtension(wxString& buffer);
|
||||
|
||||
// Get a temporary filename, opening and closing the file.
|
||||
WXDLLEXPORT wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL);
|
||||
|
||||
// Expand file name (~/ and ${OPENWINHOME}/ stuff)
|
||||
WXDLLEXPORT wxChar* wxExpandPath(wxChar *dest, const wxChar *path);
|
||||
|
||||
// Contract w.r.t environment (</usr/openwin/lib, OPENWHOME> -> ${OPENWINHOME}/lib)
|
||||
// and make (if under the home tree) relative to home
|
||||
// [caller must copy-- volatile]
|
||||
WXDLLEXPORT wxChar* wxContractPath(const wxString& filename,
|
||||
const wxString& envname = wxEmptyString,
|
||||
const wxString& user = wxEmptyString);
|
||||
|
||||
// Destructive removal of /./ and /../ stuff
|
||||
WXDLLEXPORT wxChar* wxRealPath(wxChar *path);
|
||||
|
||||
// Allocate a copy of the full absolute path
|
||||
WXDLLEXPORT wxChar* wxCopyAbsolutePath(const wxString& path);
|
||||
|
||||
// Get first file name matching given wild card.
|
||||
// Flags are reserved for future use.
|
||||
#define wxFILE 1
|
||||
#define wxDIR 2
|
||||
WXDLLEXPORT wxString wxFindFirstFile(const wxChar *spec, int flags = wxFILE);
|
||||
WXDLLEXPORT wxString wxFindNextFile();
|
||||
|
||||
// Does the pattern contain wildcards?
|
||||
WXDLLEXPORT bool wxIsWild(const wxString& pattern);
|
||||
|
||||
// Does the pattern match the text (usually a filename)?
|
||||
// If dot_special is TRUE, doesn't match * against . (eliminating
|
||||
// `hidden' dot files)
|
||||
WXDLLEXPORT bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = TRUE);
|
||||
|
||||
// Concatenate two files to form third
|
||||
WXDLLEXPORT bool wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3);
|
||||
|
||||
// Copy file1 to file2
|
||||
WXDLLEXPORT bool wxCopyFile(const wxString& file1, const wxString& file2);
|
||||
|
||||
// Remove file
|
||||
WXDLLEXPORT bool wxRemoveFile(const wxString& file);
|
||||
|
||||
// Rename file
|
||||
WXDLLEXPORT bool wxRenameFile(const wxString& file1, const wxString& file2);
|
||||
|
||||
// Get current working directory.
|
||||
// If buf is NULL, allocates space using new, else
|
||||
// copies into buf.
|
||||
// IMPORTANT NOTE getcwd is know not to work under some releases
|
||||
// of Win32s 1.3, according to MS release notes!
|
||||
WXDLLEXPORT wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) NULL, int sz = 1000);
|
||||
// new and preferred version of wxGetWorkingDirectory
|
||||
// NB: can't have the same name because of overloading ambiguity
|
||||
WXDLLEXPORT wxString wxGetCwd();
|
||||
|
||||
// Set working directory
|
||||
WXDLLEXPORT bool wxSetWorkingDirectory(const wxString& d);
|
||||
|
||||
// Make directory
|
||||
WXDLLEXPORT bool wxMkdir(const wxString& dir, int perm = 0777);
|
||||
|
||||
// Remove directory. Flags reserved for future use.
|
||||
WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0);
|
||||
|
||||
// separators in file names
|
||||
#define wxFILE_SEP_EXT _T('.')
|
||||
#define wxFILE_SEP_DSK _T(':')
|
||||
#define wxFILE_SEP_PATH_DOS _T('\\')
|
||||
#define wxFILE_SEP_PATH_UNIX _T('/')
|
||||
|
||||
// separator in the path list (as in PATH environment variable)
|
||||
// NB: these are strings and not characters on purpose!
|
||||
#define wxPATH_SEP_DOS _T(";")
|
||||
#define wxPATH_SEP_UNIX _T(":")
|
||||
|
||||
// platform independent versions
|
||||
#ifdef __UNIX__
|
||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
|
||||
#define wxPATH_SEP wxPATH_SEP_UNIX
|
||||
#else // Windows
|
||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS
|
||||
#define wxPATH_SEP wxPATH_SEP_DOS
|
||||
#endif // Unix/Windows
|
||||
|
||||
// this is useful for wxString::IsSameAs(): to compare two file names use
|
||||
// filename1.IsSameAs(filename2, wxARE_FILENAMES_CASE_SENSITIVE)
|
||||
#ifdef __UNIX__
|
||||
#define wxARE_FILENAMES_CASE_SENSITIVE TRUE
|
||||
#else // Windows
|
||||
#define wxARE_FILENAMES_CASE_SENSITIVE FALSE
|
||||
#endif // Unix/Windows
|
||||
|
||||
// is the char a path separator?
|
||||
inline bool wxIsPathSeparator(wxChar c)
|
||||
{ return c == wxFILE_SEP_PATH_DOS || c == wxFILE_SEP_PATH_UNIX; }
|
||||
|
||||
// does the string ends with path separator?
|
||||
WXDLLEXPORT bool wxEndsWithPathSeparator(const wxChar *pszFileName);
|
||||
|
||||
// split the full path into path (including drive for DOS), name and extension
|
||||
// (understands both '/' and '\\')
|
||||
WXDLLEXPORT void wxSplitPath(const wxChar *pszFileName,
|
||||
wxString *pstrPath,
|
||||
wxString *pstrName,
|
||||
wxString *pstrExt);
|
||||
|
||||
// find a file in a list of directories, returns false if not found
|
||||
WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile);
|
||||
|
||||
// Get the OS directory if appropriate (such as the Windows directory).
|
||||
// On non-Windows platform, probably just return the empty string.
|
||||
WXDLLEXPORT wxString wxGetOSDirectory();
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Path searching
|
||||
class WXDLLEXPORT wxPathList : public wxStringList
|
||||
{
|
||||
public:
|
||||
// Adds all paths in environment variable
|
||||
void AddEnvList(const wxString& envVariable);
|
||||
|
||||
void Add(const wxString& path);
|
||||
// Avoid compiler warning
|
||||
wxNode *Add(const wxChar *s) { return wxStringList::Add(s); }
|
||||
// Find the first full path for which the file exists
|
||||
wxString FindValidPath(const wxString& filename);
|
||||
// Find the first full path for which the file exists; ensure it's an
|
||||
// absolute path that gets returned.
|
||||
wxString FindAbsoluteValidPath(const wxString& filename);
|
||||
// Given full path and filename, add path to list
|
||||
void EnsureFileAccessible(const wxString& path);
|
||||
// Returns TRUE if the path is in the list
|
||||
bool Member(const wxString& path);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPathList)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_FILEFN_H_
|
19
include/wx/font.h
Normal file
19
include/wx/font.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_FONT_H_BASE_
|
||||
#define _WX_FONT_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/font.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/font.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/font.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/font.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/font.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/font.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_FONT_H_BASE_
|
29
include/wx/fontdlg.h
Normal file
29
include/wx/fontdlg.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef _WX_FONTDLG_H_BASE_
|
||||
#define _WX_FONTDLG_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/fontdlg.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/generic/fontdlgg.h"
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/generic/fontdlgg.h"
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/generic/fontdlgg.h"
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/generic/fontdlgg.h"
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/generic/fontdlgg.h"
|
||||
# define wxFontDialog wxGenericFontDialog
|
||||
# define sm_classwxFontDialog sm_classwxGenericFontDialog
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_FONTDLG_H_BASE_
|
19
include/wx/frame.h
Normal file
19
include/wx/frame.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_FRAME_H_BASE_
|
||||
#define _WX_FRAME_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/frame.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/frame.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/frame.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/frame.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/frame.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/frame.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_FRAME_H_BASE_
|
19
include/wx/gauge.h
Normal file
19
include/wx/gauge.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_GAUGE_H_BASE_
|
||||
#define _WX_GAUGE_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/gauge.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/gauge.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/gauge.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/gauge.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/gauge.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/gauge.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_GAUGE_H_BASE_
|
372
include/wx/gdicmn.h
Normal file
372
include/wx/gdicmn.h
Normal file
@@ -0,0 +1,372 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gdicmn.h
|
||||
// Purpose: Common GDI classes, types and declarations
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GDICMNH__
|
||||
#define _WX_GDICMNH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "gdicmn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/hash.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/setup.h"
|
||||
#include "wx/colour.h"
|
||||
|
||||
// Standard cursors
|
||||
typedef enum {
|
||||
wxCURSOR_NONE = 0,
|
||||
wxCURSOR_ARROW = 1,
|
||||
wxCURSOR_BULLSEYE,
|
||||
wxCURSOR_CHAR,
|
||||
wxCURSOR_CROSS,
|
||||
wxCURSOR_HAND,
|
||||
wxCURSOR_IBEAM,
|
||||
wxCURSOR_LEFT_BUTTON,
|
||||
wxCURSOR_MAGNIFIER,
|
||||
wxCURSOR_MIDDLE_BUTTON,
|
||||
wxCURSOR_NO_ENTRY,
|
||||
wxCURSOR_PAINT_BRUSH,
|
||||
wxCURSOR_PENCIL,
|
||||
wxCURSOR_POINT_LEFT,
|
||||
wxCURSOR_POINT_RIGHT,
|
||||
wxCURSOR_QUESTION_ARROW,
|
||||
wxCURSOR_RIGHT_BUTTON,
|
||||
wxCURSOR_SIZENESW,
|
||||
wxCURSOR_SIZENS,
|
||||
wxCURSOR_SIZENWSE,
|
||||
wxCURSOR_SIZEWE,
|
||||
wxCURSOR_SIZING,
|
||||
wxCURSOR_SPRAYCAN,
|
||||
wxCURSOR_WAIT,
|
||||
wxCURSOR_WATCH,
|
||||
wxCURSOR_BLANK
|
||||
#ifdef __X__
|
||||
/* Not yet implemented for Windows */
|
||||
, wxCURSOR_CROSS_REVERSE,
|
||||
wxCURSOR_DOUBLE_ARROW,
|
||||
wxCURSOR_BASED_ARROW_UP,
|
||||
wxCURSOR_BASED_ARROW_DOWN
|
||||
#endif
|
||||
} wxStockCursor;
|
||||
|
||||
class WXDLLEXPORT wxSize
|
||||
{
|
||||
public:
|
||||
long x;
|
||||
long y;
|
||||
inline wxSize() { x = 0; y = 0; }
|
||||
inline wxSize(long xx, long yy) { x = xx; y = yy; }
|
||||
inline wxSize(const wxSize& sz) { x = sz.x; y = sz.y; }
|
||||
inline void operator = (const wxSize& sz) { x = sz.x; y = sz.y; }
|
||||
inline bool operator == (const wxSize& sz) const { return (x == sz.x && y == sz.y); }
|
||||
inline wxSize operator + (const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); }
|
||||
inline wxSize operator - (const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); }
|
||||
inline void Set(long xx, long yy) { x = xx; y = yy; }
|
||||
inline long GetX() const { return x; }
|
||||
inline long GetY() const { return y; }
|
||||
};
|
||||
|
||||
// Point
|
||||
class WXDLLEXPORT wxRealPoint
|
||||
{
|
||||
public:
|
||||
double x;
|
||||
double y;
|
||||
inline wxRealPoint() { x = 0.0; y = 0.0; };
|
||||
inline wxRealPoint(double _x, double _y) { x = _x; y = _y; };
|
||||
inline wxRealPoint operator + (const wxRealPoint& pt) { return wxRealPoint(x + pt.x, y + pt.y); }
|
||||
inline wxRealPoint operator - (const wxRealPoint& pt) { return wxRealPoint(x - pt.x, y - pt.y); }
|
||||
|
||||
inline void operator = (const wxRealPoint& pt) { x = pt.x; y = pt.y; }
|
||||
inline bool operator == (const wxRealPoint& pt) const { return (x == pt.x && y == pt.y); }
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxPoint
|
||||
{
|
||||
public:
|
||||
#if defined(__WXMSW__) && !defined(__WIN32__)
|
||||
int x;
|
||||
int y;
|
||||
#else
|
||||
long x;
|
||||
long y;
|
||||
#endif
|
||||
|
||||
inline wxPoint() { x = 0; y = 0; };
|
||||
wxPoint(long the_x, long the_y) { x = the_x; y = the_y; };
|
||||
wxPoint(const wxPoint& pt) { x = pt.x; y = pt.y; };
|
||||
|
||||
inline void operator = (const wxPoint& pt) { x = pt.x; y = pt.y; }
|
||||
inline bool operator == (const wxPoint& pt) const { return (x == pt.x && y == pt.y); }
|
||||
inline wxPoint operator + (const wxPoint& pt) { return wxPoint(x + pt.x, y + pt.y); }
|
||||
inline wxPoint operator - (const wxPoint& pt) { return wxPoint(x - pt.x, y - pt.y); }
|
||||
};
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
#define wxIntPoint wxPoint
|
||||
#define wxRectangle wxRect
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxRect
|
||||
{
|
||||
public:
|
||||
wxRect() ;
|
||||
wxRect(long x, long y, long w, long h);
|
||||
wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
|
||||
wxRect(const wxPoint& pos, const wxSize& size);
|
||||
wxRect(const wxRect& rect);
|
||||
|
||||
inline long GetX() const { return x; }
|
||||
inline void SetX(long X) { x = X; }
|
||||
inline long GetY() const { return y; }
|
||||
inline void SetY(long Y) { y = Y; }
|
||||
inline long GetWidth() const { return width; }
|
||||
inline void SetWidth(long w) { width = w; }
|
||||
inline long GetHeight() const { return height; }
|
||||
inline void SetHeight(long h) { height = h; }
|
||||
|
||||
inline wxPoint GetPosition() { return wxPoint(x, y); }
|
||||
inline wxSize GetSize() { return wxSize(width, height); }
|
||||
|
||||
inline long GetLeft() const { return x; }
|
||||
inline long GetTop() const { return y; }
|
||||
inline long GetBottom() const { return y + height; }
|
||||
inline long GetRight() const { return x + width; }
|
||||
|
||||
wxRect& operator = (const wxRect& rect);
|
||||
bool operator == (const wxRect& rect);
|
||||
bool operator != (const wxRect& rect);
|
||||
public:
|
||||
long x, y, width, height;
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxBrush;
|
||||
class WXDLLEXPORT wxPen;
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxIcon;
|
||||
class WXDLLEXPORT wxCursor;
|
||||
class WXDLLEXPORT wxFont;
|
||||
class WXDLLEXPORT wxPalette;
|
||||
class WXDLLEXPORT wxPalette;
|
||||
class WXDLLEXPORT wxRegion;
|
||||
|
||||
/*
|
||||
* Bitmap flags
|
||||
*/
|
||||
|
||||
// Hint to indicate filetype
|
||||
#define wxBITMAP_TYPE_BMP 1
|
||||
#define wxBITMAP_TYPE_BMP_RESOURCE 2
|
||||
#define wxBITMAP_TYPE_ICO 3
|
||||
#define wxBITMAP_TYPE_ICO_RESOURCE 4
|
||||
#define wxBITMAP_TYPE_CUR 5
|
||||
#define wxBITMAP_TYPE_CUR_RESOURCE 6
|
||||
#define wxBITMAP_TYPE_XBM 7
|
||||
#define wxBITMAP_TYPE_XBM_DATA 8
|
||||
#define wxBITMAP_TYPE_XPM 9
|
||||
#define wxBITMAP_TYPE_XPM_DATA 10
|
||||
#define wxBITMAP_TYPE_TIF 11
|
||||
#define wxBITMAP_TYPE_TIF_RESOURCE 12
|
||||
#define wxBITMAP_TYPE_GIF 13
|
||||
#define wxBITMAP_TYPE_GIF_RESOURCE 14
|
||||
#define wxBITMAP_TYPE_PNG 15
|
||||
#define wxBITMAP_TYPE_PNG_RESOURCE 16
|
||||
#define wxBITMAP_TYPE_JPEG 17
|
||||
#define wxBITMAP_TYPE_JPEG_RESOURCE 18
|
||||
#define wxBITMAP_TYPE_ANY 50
|
||||
|
||||
#define wxBITMAP_TYPE_RESOURCE wxBITMAP_TYPE_BMP_RESOURCE
|
||||
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxCursor;
|
||||
class WXDLLEXPORT wxIcon;
|
||||
class WXDLLEXPORT wxColour;
|
||||
class WXDLLEXPORT wxString;
|
||||
|
||||
// Management of pens, brushes and fonts
|
||||
class WXDLLEXPORT wxPenList: public wxList
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPenList)
|
||||
public:
|
||||
inline wxPenList()
|
||||
{ }
|
||||
~wxPenList();
|
||||
void AddPen(wxPen *pen);
|
||||
void RemovePen(wxPen *pen);
|
||||
wxPen *FindOrCreatePen(const wxColour& colour, int width, int style);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxBrushList: public wxList
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBrushList)
|
||||
public:
|
||||
inline wxBrushList()
|
||||
{ }
|
||||
~wxBrushList();
|
||||
void AddBrush(wxBrush *brush);
|
||||
void RemoveBrush(wxBrush *brush);
|
||||
wxBrush *FindOrCreateBrush(const wxColour& colour, int style);
|
||||
};
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
||||
|
||||
class WXDLLEXPORT wxFontList: public wxList
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFontList)
|
||||
public:
|
||||
inline wxFontList()
|
||||
{ }
|
||||
~wxFontList();
|
||||
void AddFont(wxFont *font);
|
||||
void RemoveFont(wxFont *font);
|
||||
wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
|
||||
bool underline = FALSE, const wxString& face = wxEmptyString);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxColourDatabase: public wxList
|
||||
{
|
||||
DECLARE_CLASS(wxColourDatabase)
|
||||
public:
|
||||
wxColourDatabase(int type);
|
||||
~wxColourDatabase() ;
|
||||
// Not const because it may add a name to the database
|
||||
wxColour *FindColour(const wxString& colour) ;
|
||||
wxString FindName(const wxColour& colour) const;
|
||||
void Initialize();
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxBitmapList: public wxList
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapList)
|
||||
public:
|
||||
wxBitmapList();
|
||||
~wxBitmapList();
|
||||
|
||||
void AddBitmap(wxBitmap *bitmap);
|
||||
void RemoveBitmap(wxBitmap *bitmap);
|
||||
};
|
||||
|
||||
// Lists of GDI objects
|
||||
WXDLLEXPORT_DATA(extern wxPenList*) wxThePenList;
|
||||
WXDLLEXPORT_DATA(extern wxBrushList*) wxTheBrushList;
|
||||
WXDLLEXPORT_DATA(extern wxFontList*) wxTheFontList;
|
||||
WXDLLEXPORT_DATA(extern wxBitmapList*) wxTheBitmapList;
|
||||
|
||||
// Stock objects
|
||||
WXDLLEXPORT_DATA(extern wxFont*) wxNORMAL_FONT;
|
||||
WXDLLEXPORT_DATA(extern wxFont*) wxSMALL_FONT;
|
||||
WXDLLEXPORT_DATA(extern wxFont*) wxITALIC_FONT;
|
||||
WXDLLEXPORT_DATA(extern wxFont*) wxSWISS_FONT;
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxRED_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxCYAN_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxGREEN_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxWHITE_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxTRANSPARENT_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_DASHED_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxGREY_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxMEDIUM_GREY_PEN;
|
||||
WXDLLEXPORT_DATA(extern wxPen*) wxLIGHT_GREY_PEN;
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxBLUE_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxGREEN_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxWHITE_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxBLACK_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxGREY_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxMEDIUM_GREY_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxLIGHT_GREY_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxTRANSPARENT_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxCYAN_BRUSH;
|
||||
WXDLLEXPORT_DATA(extern wxBrush*) wxRED_BRUSH;
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxColour*) wxBLACK;
|
||||
WXDLLEXPORT_DATA(extern wxColour*) wxWHITE;
|
||||
WXDLLEXPORT_DATA(extern wxColour*) wxRED;
|
||||
WXDLLEXPORT_DATA(extern wxColour*) wxBLUE;
|
||||
WXDLLEXPORT_DATA(extern wxColour*) wxGREEN;
|
||||
WXDLLEXPORT_DATA(extern wxColour*) wxCYAN;
|
||||
WXDLLEXPORT_DATA(extern wxColour*) wxLIGHT_GREY;
|
||||
|
||||
// 'Null' objects
|
||||
WXDLLEXPORT_DATA(extern wxBitmap) wxNullBitmap;
|
||||
WXDLLEXPORT_DATA(extern wxIcon) wxNullIcon;
|
||||
WXDLLEXPORT_DATA(extern wxCursor) wxNullCursor;
|
||||
WXDLLEXPORT_DATA(extern wxPen) wxNullPen;
|
||||
WXDLLEXPORT_DATA(extern wxBrush) wxNullBrush;
|
||||
WXDLLEXPORT_DATA(extern wxPalette) wxNullPalette;
|
||||
WXDLLEXPORT_DATA(extern wxFont) wxNullFont;
|
||||
WXDLLEXPORT_DATA(extern wxColour) wxNullColour;
|
||||
|
||||
// Stock cursors types
|
||||
WXDLLEXPORT_DATA(extern wxCursor*) wxSTANDARD_CURSOR;
|
||||
WXDLLEXPORT_DATA(extern wxCursor*) wxHOURGLASS_CURSOR;
|
||||
WXDLLEXPORT_DATA(extern wxCursor*) wxCROSS_CURSOR;
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxColourDatabase*) wxTheColourDatabase;
|
||||
extern void WXDLLEXPORT wxInitializeStockObjects();
|
||||
extern void WXDLLEXPORT wxInitializeStockLists();
|
||||
extern void WXDLLEXPORT wxDeleteStockObjects();
|
||||
extern void WXDLLEXPORT wxDeleteStockLists();
|
||||
|
||||
extern bool WXDLLEXPORT wxColourDisplay();
|
||||
|
||||
// Returns depth of screen
|
||||
extern int WXDLLEXPORT wxDisplayDepth();
|
||||
#define wxGetDisplayDepth wxDisplayDepth
|
||||
|
||||
extern void WXDLLEXPORT wxDisplaySize(int *width, int *height);
|
||||
extern wxSize WXDLLEXPORT wxGetDisplaySize();
|
||||
|
||||
extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor);
|
||||
|
||||
// Useful macro for creating icons portably
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Load from a resource
|
||||
# define wxICON(X) wxIcon("" #X "")
|
||||
|
||||
#elif defined(__WXGTK__)
|
||||
// Initialize from an included XPM
|
||||
# define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
#elif defined(__WXMOTIF__)
|
||||
// Initialize from an included XPM
|
||||
# define wxICON(X) wxIcon( X##_xpm )
|
||||
#else
|
||||
|
||||
// This will usually mean something on any platform
|
||||
# define wxICON(X) wxIcon("" #X "")
|
||||
#endif
|
||||
|
||||
/*
|
||||
Example:
|
||||
wxIcon *icon = new wxICON(mondrian);
|
||||
expands into:
|
||||
wxIcon *icon = new wxIcon("mondrian"); // On wxMSW
|
||||
wxIcon *icon = new wxIcon(mondrian_xpm); // On wxGTK
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxResourceCache: public wxList
|
||||
{
|
||||
public:
|
||||
wxResourceCache() { }
|
||||
wxResourceCache(const unsigned int keyType) : wxList(keyType) { }
|
||||
~wxResourceCache();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxResourceCache)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GDICMNH__
|
19
include/wx/gdiobj.h
Normal file
19
include/wx/gdiobj.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _WX_GDIOBJ_H_BASE_
|
||||
#define _WX_GDIOBJ_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/gdiobj.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/gdiobj.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/gdiobj.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/gdiobj.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/gdiobj.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/gdiobj.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_GDIOBJ_H_BASE_
|
102
include/wx/generic/choicdgg.h
Normal file
102
include/wx/generic/choicdgg.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choicdgg.h
|
||||
// Purpose: Generic choice dialogs
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CHOICEDLGH_G__
|
||||
#define __CHOICEDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "choicdgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
#define wxCHOICE_HEIGHT 150
|
||||
#define wxCHOICE_WIDTH 200
|
||||
|
||||
#define wxID_LISTBOX 3000
|
||||
|
||||
class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog)
|
||||
public:
|
||||
wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
const wxStringList& choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
const wxStringList& choices, wxChar **clientData = (wxChar **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
void SetSelection(int sel) ;
|
||||
inline int GetSelection(void) const { return m_selection; }
|
||||
inline wxString GetStringSelection(void) const { return m_stringSelection; }
|
||||
inline wxChar *GetSelectionClientData(void) const { return m_clientData; }
|
||||
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnListBoxDClick(wxCommandEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
protected:
|
||||
long m_dialogStyle;
|
||||
int m_selection;
|
||||
wxString m_stringSelection;
|
||||
wxChar* m_clientData;
|
||||
};
|
||||
|
||||
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
|
||||
int n, wxChar *choices[], wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
// Same as above but gets position in list of strings, instead of string,
|
||||
// or -1 if no selection
|
||||
WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
|
||||
int n, wxChar *choices[], wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
// Return client data instead
|
||||
WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, wxChar **client_data,
|
||||
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
|
||||
bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
|
||||
int n, wxChar *choices[], wxChar **client_data,
|
||||
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
|
||||
bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
/*
|
||||
WXDLLEXPORT int wxGetMultipleChoice(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices,
|
||||
int nsel, int * selection,
|
||||
wxWindow *parent = NULL, int x = -1 , int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
*/
|
||||
|
||||
#endif
|
118
include/wx/generic/colrdlgg.h
Normal file
118
include/wx/generic/colrdlgg.h
Normal file
@@ -0,0 +1,118 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colrdlgg.h
|
||||
// Purpose: wxGenericColourDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __COLORDLGH_G__
|
||||
#define __COLORDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "colrdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
#define wxID_ADD_CUSTOM 3000
|
||||
#define wxID_RED_SLIDER 3001
|
||||
#define wxID_GREEN_SLIDER 3002
|
||||
#define wxID_BLUE_SLIDER 3003
|
||||
|
||||
class WXDLLEXPORT wxSlider;
|
||||
class WXDLLEXPORT wxGenericColourDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericColourDialog)
|
||||
protected:
|
||||
wxColourData colourData;
|
||||
wxWindow *dialogParent;
|
||||
|
||||
// Area reserved for grids of colours
|
||||
wxRect standardColoursRect;
|
||||
wxRect customColoursRect;
|
||||
wxRect singleCustomColourRect;
|
||||
|
||||
// Size of each colour rectangle
|
||||
wxPoint smallRectangleSize;
|
||||
|
||||
// For single customizable colour
|
||||
wxPoint customRectangleSize;
|
||||
|
||||
// Grid spacing (between rectangles)
|
||||
int gridSpacing;
|
||||
|
||||
// Section spacing (between left and right halves of dialog box)
|
||||
int sectionSpacing;
|
||||
|
||||
// 48 'standard' colours
|
||||
wxColour standardColours[48];
|
||||
|
||||
// 16 'custom' colours
|
||||
wxColour customColours[16];
|
||||
|
||||
// One single custom colour (use sliders)
|
||||
wxColour singleCustomColour;
|
||||
|
||||
// Which colour is selected? An index into one of the two areas.
|
||||
int colourSelection;
|
||||
int whichKind; // 1 for standard colours, 2 for custom colours,
|
||||
|
||||
wxSlider *redSlider;
|
||||
wxSlider *greenSlider;
|
||||
wxSlider *blueSlider;
|
||||
|
||||
int buttonY;
|
||||
|
||||
int okButtonX;
|
||||
int customButtonX;
|
||||
|
||||
// static bool colourDialogCancelled;
|
||||
public:
|
||||
wxGenericColourDialog(void);
|
||||
wxGenericColourDialog(wxWindow *parent, wxColourData *data = (wxColourData *) NULL);
|
||||
~wxGenericColourDialog(void);
|
||||
|
||||
bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL);
|
||||
|
||||
int ShowModal(void);
|
||||
wxColourData &GetColourData(void) { return colourData; }
|
||||
|
||||
// Internal functions
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
virtual void CalculateMeasurements(void);
|
||||
virtual void CreateWidgets(void);
|
||||
virtual void InitializeColours(void);
|
||||
|
||||
virtual void PaintBasicColours(wxDC& dc);
|
||||
virtual void PaintCustomColours(wxDC& dc);
|
||||
virtual void PaintCustomColour(wxDC& dc);
|
||||
virtual void PaintHighlight(wxDC& dc, bool draw);
|
||||
|
||||
virtual void OnBasicColourClick(int which);
|
||||
virtual void OnCustomColourClick(int which);
|
||||
|
||||
void OnAddCustom(wxCommandEvent& event);
|
||||
|
||||
void OnRedSlider(wxCommandEvent& event);
|
||||
void OnGreenSlider(wxCommandEvent& event);
|
||||
void OnBlueSlider(wxCommandEvent& event);
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#ifdef __WXGTK__
|
||||
typedef wxGenericColourDialog wxColourDialog;
|
||||
#endif
|
||||
|
||||
#endif
|
282
include/wx/generic/dcpsg.h
Normal file
282
include/wx/generic/dcpsg.h
Normal file
@@ -0,0 +1,282 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dcps.h
|
||||
// Purpose: wxPostScriptDC class
|
||||
// Author: Julian Smart and others
|
||||
// Modified by:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart, Robert Roebling and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCPSG_H_
|
||||
#define _WX_DCPSG_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/dc.h"
|
||||
|
||||
#if wxUSE_POSTSCRIPT
|
||||
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/module.h"
|
||||
#include "wx/cmndata.h"
|
||||
#include <fstream.h>
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxPostScriptDC;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPostScriptDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxPostScriptDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPostScriptDC)
|
||||
|
||||
public:
|
||||
|
||||
wxPostScriptDC();
|
||||
|
||||
// Deprecated constructor
|
||||
wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL);
|
||||
|
||||
// Recommended constructor
|
||||
wxPostScriptDC(const wxPrintData& printData);
|
||||
|
||||
~wxPostScriptDC();
|
||||
|
||||
// Deprecated
|
||||
bool Create(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL);
|
||||
|
||||
virtual bool Ok() const;
|
||||
|
||||
// Deprecated: use wxGenericPrintDialog instead
|
||||
virtual bool PrinterDialog(wxWindow *parent = (wxWindow *) NULL);
|
||||
|
||||
virtual void BeginDrawing() {}
|
||||
virtual void EndDrawing() {}
|
||||
|
||||
void FloodFill(long x1, long y1, const wxColour &col, int style=wxFLOOD_SURFACE) ;
|
||||
bool GetPixel(long x1, long y1, wxColour *col) const;
|
||||
|
||||
void DrawLine(long x1, long y1, long x2, long y2);
|
||||
void CrossHair(long x, long y) ;
|
||||
void DrawArc(long x1,long y1,long x2,long y2,long xc,long yc);
|
||||
void DrawEllipticArc(long x,long y,long w,long h,double sa,double ea);
|
||||
void DrawPoint(long x, long y);
|
||||
// Avoid compiler warning
|
||||
void DrawPoint(wxPoint& point) { wxDC::DrawPoint(point); }
|
||||
void DrawLines(int n, wxPoint points[], long xoffset = 0, long yoffset = 0);
|
||||
// Avoid compiler warning
|
||||
void DrawLines(wxList *lines, long xoffset = 0, long yoffset = 0)
|
||||
{ wxDC::DrawLines(lines, xoffset, yoffset); }
|
||||
void DrawPolygon(int n, wxPoint points[], long xoffset = 0, long yoffset = 0, int fillStyle=wxODDEVEN_RULE);
|
||||
// Avoid compiler warning
|
||||
void DrawPolygon(wxList *lines, long xoffset = 0, long yoffset = 0, int fillStyle=wxODDEVEN_RULE)
|
||||
{ wxDC::DrawPolygon(lines, xoffset, yoffset, fillStyle); }
|
||||
void DrawRectangle(long x, long y, long width, long height);
|
||||
void DrawRoundedRectangle(long x, long y, long width, long height, double radius = 20);
|
||||
void DrawEllipse(long x, long y, long width, long height);
|
||||
|
||||
void DrawSpline(wxList *points);
|
||||
|
||||
bool Blit(long xdest, long ydest, long width, long height,
|
||||
wxDC *source, long xsrc, long ysrc, int rop = wxCOPY, bool useMask = FALSE);
|
||||
inline bool CanDrawBitmap(void) const { return TRUE; }
|
||||
|
||||
void DrawIcon( const wxIcon& icon, long x, long y );
|
||||
void DrawBitmap( const wxBitmap& bitmap, long x, long y, bool useMask=FALSE );
|
||||
|
||||
void DrawText(const wxString& text, long x, long y, bool use16 = FALSE);
|
||||
|
||||
void Clear();
|
||||
void SetFont( const wxFont& font );
|
||||
void SetPen( const wxPen& pen );
|
||||
void SetBrush( const wxBrush& brush );
|
||||
void SetLogicalFunction( int function );
|
||||
void SetBackground( const wxBrush& brush );
|
||||
|
||||
void SetClippingRegion(long x, long y, long width, long height);
|
||||
void SetClippingRegion( const wxRegion ®ion );
|
||||
void DestroyClippingRegion();
|
||||
|
||||
bool StartDoc(const wxString& message);
|
||||
void EndDoc();
|
||||
void StartPage();
|
||||
void EndPage();
|
||||
|
||||
long GetCharHeight();
|
||||
long GetCharWidth();
|
||||
inline bool CanGetTextExtent(void) const { return FALSE; }
|
||||
void GetTextExtent(const wxString& string, long *x, long *y,
|
||||
long *descent = (long *) NULL,
|
||||
long *externalLeading = (long *) NULL,
|
||||
wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE);
|
||||
|
||||
void GetSize(int* width, int* height) const;
|
||||
void GetSizeMM(int *width, int *height) const;
|
||||
|
||||
// Resolution in pixels per logical inch
|
||||
wxSize GetPPI(void) const;
|
||||
|
||||
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
||||
void SetDeviceOrigin( long x, long y );
|
||||
|
||||
inline void SetBackgroundMode(int WXUNUSED(mode)) {}
|
||||
inline void SetPalette(const wxPalette& WXUNUSED(palette)) {}
|
||||
|
||||
inline ofstream *GetStream(void) const { return m_pstream; }
|
||||
|
||||
inline wxPrintData& GetPrintData() { return m_printData; }
|
||||
inline void SetPrintData(const wxPrintData& data) { m_printData = data; }
|
||||
|
||||
protected:
|
||||
|
||||
ofstream * m_pstream; // PostScript output stream
|
||||
wxString m_title;
|
||||
unsigned char m_currentRed;
|
||||
unsigned char m_currentGreen;
|
||||
unsigned char m_currentBlue;
|
||||
int m_pageNumber;
|
||||
bool m_clipping;
|
||||
double m_underlinePosition;
|
||||
double m_underlineThickness;
|
||||
wxPrintData m_printData;
|
||||
};
|
||||
|
||||
// Deprecated: should use wxGenericPrintDialog instead.
|
||||
#if 1
|
||||
#define wxID_PRINTER_COMMAND 1
|
||||
#define wxID_PRINTER_OPTIONS 2
|
||||
#define wxID_PRINTER_ORIENTATION 3
|
||||
#define wxID_PRINTER_MODES 4
|
||||
#define wxID_PRINTER_X_SCALE 5
|
||||
#define wxID_PRINTER_Y_SCALE 6
|
||||
#define wxID_PRINTER_X_TRANS 7
|
||||
#define wxID_PRINTER_Y_TRANS 8
|
||||
|
||||
class WXDLLEXPORT wxPostScriptPrintDialog: public wxDialog
|
||||
{
|
||||
DECLARE_CLASS(wxPostScriptPrintDialog)
|
||||
public:
|
||||
wxPostScriptPrintDialog (wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
|
||||
virtual int ShowModal(void) ;
|
||||
};
|
||||
#endif
|
||||
|
||||
// Print Orientation (Should also add Left, Right)
|
||||
enum {
|
||||
PS_PORTRAIT = 1,
|
||||
PS_LANDSCAPE = 2
|
||||
};// ps_orientation = PS_PORTRAIT;
|
||||
|
||||
// Print Actions
|
||||
enum {
|
||||
PS_NONE,
|
||||
PS_PREVIEW,
|
||||
PS_FILE,
|
||||
PS_PRINTER
|
||||
};// ps_action = PS_PREVIEW;
|
||||
|
||||
// PostScript printer settings
|
||||
WXDLLEXPORT void wxSetPrinterCommand(const wxString& cmd);
|
||||
WXDLLEXPORT void wxSetPrintPreviewCommand(const wxString& cmd);
|
||||
WXDLLEXPORT void wxSetPrinterOptions(const wxString& flags);
|
||||
WXDLLEXPORT void wxSetPrinterOrientation(int orientation);
|
||||
WXDLLEXPORT void wxSetPrinterScaling(double x, double y);
|
||||
WXDLLEXPORT void wxSetPrinterTranslation(long x, long y);
|
||||
WXDLLEXPORT void wxSetPrinterMode(int mode);
|
||||
WXDLLEXPORT void wxSetPrinterFile(const wxString& f);
|
||||
WXDLLEXPORT void wxSetAFMPath(const wxString& f);
|
||||
|
||||
// Get current values
|
||||
WXDLLEXPORT wxString wxGetPrinterCommand();
|
||||
WXDLLEXPORT wxString wxGetPrintPreviewCommand();
|
||||
WXDLLEXPORT wxString wxGetPrinterOptions();
|
||||
WXDLLEXPORT int wxGetPrinterOrientation();
|
||||
WXDLLEXPORT void wxGetPrinterScaling(double* x, double* y);
|
||||
WXDLLEXPORT void wxGetPrinterTranslation(long *x, long *y);
|
||||
WXDLLEXPORT int wxGetPrinterMode();
|
||||
WXDLLEXPORT wxString wxGetPrinterFile();
|
||||
WXDLLEXPORT wxString wxGetAFMPath();
|
||||
|
||||
/*
|
||||
* PostScript print setup information.
|
||||
* This is now obsolete, but retained for a while for compatibility
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxPrintSetupData: public wxObject
|
||||
{
|
||||
public:
|
||||
wxPrintSetupData();
|
||||
~wxPrintSetupData();
|
||||
|
||||
void SetPrinterCommand(const wxString& cmd) { m_printerCommand = cmd; };
|
||||
void SetPaperName(const wxString& paper) { m_paperName = paper; };
|
||||
void SetPrintPreviewCommand(const wxString& cmd) { m_previewCommand = cmd; };
|
||||
void SetPrinterOptions(const wxString& flags) { m_printerFlags = flags; };
|
||||
void SetPrinterFile(const wxString& f) { m_printerFile = f; };
|
||||
void SetPrinterOrientation(int orient) { m_printerOrient = orient; };
|
||||
void SetPrinterScaling(double x, double y) { m_printerScaleX = x; m_printerScaleY = y; };
|
||||
void SetPrinterTranslation(long x, long y) { m_printerTranslateX = x; m_printerTranslateY = y; };
|
||||
// 1 = Preview, 2 = print to file, 3 = send to printer
|
||||
void SetPrinterMode(int mode) { m_printerMode = mode; };
|
||||
void SetAFMPath(const wxString& f) { m_afmPath = f; };
|
||||
void SetColour(bool col) { m_printColour = col; };
|
||||
|
||||
// Get current values
|
||||
wxString GetPrinterCommand() const { return m_printerCommand; } ;
|
||||
wxString GetPrintPreviewCommand() const { return m_previewCommand; } ;
|
||||
wxString GetPrinterOptions() const { return m_printerFlags; };
|
||||
wxString GetPrinterFile() const { return m_printerFile; };
|
||||
wxString GetPaperName() const { return m_paperName; }
|
||||
int GetPrinterOrientation() const { return m_printerOrient; };
|
||||
void GetPrinterScaling(double* x, double* y) const { *x = m_printerScaleX; *y = m_printerScaleY; };
|
||||
void GetPrinterTranslation(long *x, long *y) const { *x = m_printerTranslateX; *y = m_printerTranslateY; };
|
||||
int GetPrinterMode() const { return m_printerMode; };
|
||||
wxString GetAFMPath() const { return m_afmPath; };
|
||||
bool GetColour() const { return m_printColour; };
|
||||
|
||||
void operator=(wxPrintSetupData& data);
|
||||
|
||||
// Initialize from a wxPrintData object (wxPrintData should now be used instead of wxPrintSetupData).
|
||||
// There is also an operator for initializing a wxPrintData from a wxPrintSetupData.
|
||||
void operator=(const wxPrintData& data);
|
||||
|
||||
public:
|
||||
wxString m_printerCommand;
|
||||
wxString m_previewCommand;
|
||||
wxString m_printerFlags;
|
||||
wxString m_printerFile;
|
||||
int m_printerOrient;
|
||||
double m_printerScaleX;
|
||||
double m_printerScaleY;
|
||||
long m_printerTranslateX;
|
||||
long m_printerTranslateY;
|
||||
// 1 = Preview, 2 = print to file, 3 = send to printer
|
||||
int m_printerMode;
|
||||
wxString m_afmPath;
|
||||
// A name in the paper database (see paper.h)
|
||||
wxString m_paperName;
|
||||
bool m_printColour;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintSetupData)
|
||||
};
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxPrintSetupData*) wxThePrintSetupData;
|
||||
WXDLLEXPORT extern void wxInitializePrintSetupData(bool init = TRUE);
|
||||
|
||||
#endif
|
||||
// wxUSE_POSTSCRIPT
|
||||
|
||||
#endif
|
||||
// _WX_DCPSG_H_
|
121
include/wx/generic/dirdlgg.h
Normal file
121
include/wx/generic/dirdlgg.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dirdlgg.h
|
||||
// Purpose: wxDirDialog
|
||||
// Author: Harm van der Heijden and Robert Roebling
|
||||
// Modified by:
|
||||
// Created: 12/12/98
|
||||
// Copyright: (c) Harm van der Heijden and Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
//
|
||||
// Notes: wxDirDialog class written by Harm van der Heijden,
|
||||
// uses wxDirCtrl class written by Robert Roebling for the
|
||||
// wxFile application, modified by Harm van der Heijden
|
||||
//
|
||||
// Description: This generic dirdialog implementation defines three classes:
|
||||
// 1) wxDirItemData(public wxTreeItemData) stores pathname and
|
||||
// displayed name for each item in the directory tree
|
||||
// 2) wxDirCtrl(public wxTreeCtrl) is a tree widget that
|
||||
// displays a directory tree. It is possible to define sections
|
||||
// for fast access to parts of the file system (such as the
|
||||
// user's homedir, /usr/local, /tmp ...etc), similar to
|
||||
// Win95 Explorer's shortcuts to 'My Computer', 'Desktop', etc.
|
||||
// 3) wxDirDialog is the dialog box itself. The user can choose
|
||||
// a directory by navigating the tree, or by typing a dir
|
||||
// in an inputbox. The inputbox displays paths selected in the
|
||||
// tree. It is possible to create new directories. The user
|
||||
// will automatically be prompted for dir creation if he
|
||||
// enters a non-existing dir.
|
||||
//
|
||||
// TODO/BUGS: - standard sections only have reasonable defaults for Unix
|
||||
// (but others are easily added in wxDirCtrl::SetupSections)
|
||||
// - No direct support for "show hidden" toggle. Partly due
|
||||
// to laziness on my part and partly because
|
||||
// wxFindFirst/NextFile never seems to find hidden dirs
|
||||
// anyway.
|
||||
// - No automatic update of the tree (branch) after directory
|
||||
// creation.
|
||||
// - I call wxBeginBusyCursor while expanding items (creating
|
||||
// a new branch might take a few seconds, especially if a
|
||||
// CDROM drive or something is involved) but that doesn't
|
||||
// seem to do anything. Need to look into that.
|
||||
// - Am still looking for an efficient way to delete wxTreeCtrl
|
||||
// branches. DeleteChildren has disappeared and
|
||||
// CollapseAndReset( parent ) deletes the parent as well.
|
||||
// - The dialog window layout is done using wxConstraints. It
|
||||
// works, but it's not as simple as I'd like it to be (see
|
||||
// comments in wxDirDialog::doSize)
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DIRDLGG_H_
|
||||
#define _WX_DIRDLGG_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dirdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dialog.h"
|
||||
//#include "wx/checkbox.h"
|
||||
#include "wx/treectrl.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxDirItemData;
|
||||
class wxDirCtrl;
|
||||
class wxDirDialog;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDirDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxDirDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
public:
|
||||
wxDirDialog(wxWindow *parent,
|
||||
const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultPath = wxEmptyString,
|
||||
long style = 0, const wxPoint& pos = wxDefaultPosition);
|
||||
inline void SetMessage(const wxString& message) { m_message = message; }
|
||||
inline void SetPath(const wxString& path) { m_path = path; }
|
||||
inline void SetStyle(long style) { m_dialogStyle = style; }
|
||||
|
||||
inline wxString GetMessage() const { return m_message; }
|
||||
inline wxString GetPath() const { return m_path; }
|
||||
inline long GetStyle() const { return m_dialogStyle; }
|
||||
|
||||
int ShowModal();
|
||||
|
||||
void OnTreeSelected( wxTreeEvent &event );
|
||||
void OnTreeKeyDown( wxTreeEvent &event );
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
void OnNew(wxCommandEvent& event);
|
||||
// void OnCheck(wxCommandEvent& event);
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
protected:
|
||||
// implementation
|
||||
wxString m_message;
|
||||
long m_dialogStyle;
|
||||
wxWindow * m_parent;
|
||||
wxString m_path;
|
||||
wxDirCtrl *m_dir;
|
||||
wxTextCtrl *m_input;
|
||||
// wxCheckBox *m_check;
|
||||
wxButton *m_ok, *m_cancel, *m_new;
|
||||
void doSize();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DIRDLGG_H_
|
||||
|
591
include/wx/generic/error.xpm
Normal file
591
include/wx/generic/error.xpm
Normal file
@@ -0,0 +1,591 @@
|
||||
/* XPM */
|
||||
static char *error[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"48 48 537 2",
|
||||
" c Gray0",
|
||||
". c #000001010101",
|
||||
"X c #010101010101",
|
||||
"o c #010102020202",
|
||||
"O c #020202020202",
|
||||
"+ c #020203030303",
|
||||
"@ c #030302020202",
|
||||
"# c Gray1",
|
||||
"$ c #020204040404",
|
||||
"% c #030304040404",
|
||||
"& c #070703030202",
|
||||
"* c #040404040404",
|
||||
"= c #040405050505",
|
||||
"- c Gray2",
|
||||
"; c #050507070707",
|
||||
": c #060606060606",
|
||||
"> c #060607070707",
|
||||
", c #070707070707",
|
||||
"< c #070709090909",
|
||||
"1 c #0c0c04040303",
|
||||
"2 c #0d0d04040404",
|
||||
"3 c #0d0d05050404",
|
||||
"4 c Gray3",
|
||||
"5 c #080809090909",
|
||||
"6 c #090909090909",
|
||||
"7 c #0b0b0b0b0b0b",
|
||||
"8 c #0a0a0d0d0d0d",
|
||||
"9 c #0b0b0d0d0d0d",
|
||||
"0 c #0c0c0c0c0c0c",
|
||||
"q c Gray5",
|
||||
"w c #0d0d0f0f1010",
|
||||
"e c #101006060505",
|
||||
"r c #141404040303",
|
||||
"t c #141407070606",
|
||||
"y c #171707070606",
|
||||
"u c #1d1d09090707",
|
||||
"i c #181809090808",
|
||||
"p c #1d1d09090808",
|
||||
"a c #1e1e0a0a0808",
|
||||
"s c #1e1e0b0b0909",
|
||||
"d c #101010101010",
|
||||
"f c #101011111212",
|
||||
"g c Gray7",
|
||||
"h c #131313131313",
|
||||
"j c Gray9",
|
||||
"k c #181818181818",
|
||||
"l c #191919191919",
|
||||
"z c Gray11",
|
||||
"x c #1d1d1d1d1d1d",
|
||||
"c c Gray12",
|
||||
"v c #24240b0b0a0a",
|
||||
"b c #27270d0d0b0b",
|
||||
"n c #2b2b0e0e0c0c",
|
||||
"m c #2d2d0e0e0b0b",
|
||||
"M c #30300e0e0b0b",
|
||||
"N c #33330d0d0909",
|
||||
"B c #3a3a0f0f0b0b",
|
||||
"V c #333310100e0e",
|
||||
"C c #373710100d0d",
|
||||
"Z c #373711110e0e",
|
||||
"A c #363612120f0f",
|
||||
"S c #3d3d13130f0f",
|
||||
"D c #363612121010",
|
||||
"F c Gray14",
|
||||
"G c #252525252525",
|
||||
"H c #2a2a2a2a2a2a",
|
||||
"J c Gray18",
|
||||
"K c #323232323232",
|
||||
"L c Gray20",
|
||||
"P c Gray22",
|
||||
"I c #3f3f3f3f3f3f",
|
||||
"U c #414113130e0e",
|
||||
"Y c #414113130f0f",
|
||||
"T c #404013131010",
|
||||
"R c #404014141111",
|
||||
"E c #404015151212",
|
||||
"W c #4d4d17171212",
|
||||
"Q c #4e4e18181313",
|
||||
"! c #4e4e18181414",
|
||||
"~ c #4e4e19191515",
|
||||
"^ c #4e4e1a1a1616",
|
||||
"/ c #57571b1b1515",
|
||||
"( c #595917171010",
|
||||
") c #5b5b1a1a1313",
|
||||
"_ c #58581b1b1616",
|
||||
"` c #58581c1c1717",
|
||||
"' c #5c5c1e1e1a1a",
|
||||
"] c #5c5c1f1f1b1b",
|
||||
"[ c #6e6e19190f0f",
|
||||
"{ c #67671c1c1616",
|
||||
"} c #6b6b1b1b1212",
|
||||
"| c #68681e1e1717",
|
||||
" . c #6e6e1e1e1616",
|
||||
".. c #79791e1e1515",
|
||||
"X. c #666622221d1d",
|
||||
"o. c #6b6b24241e1e",
|
||||
"O. c #6c6c22221d1d",
|
||||
"+. c #6d6d24241f1f",
|
||||
"@. c #7d7d23231c1c",
|
||||
"#. c #727226262020",
|
||||
"$. c #757526262020",
|
||||
"%. c #777728282222",
|
||||
"&. c #7f7f28282121",
|
||||
"*. c #484848484848",
|
||||
"=. c Gray33",
|
||||
"-. c #555555555555",
|
||||
";. c #656565656565",
|
||||
":. c Gray",
|
||||
">. c #94941f1f1212",
|
||||
",. c #96961f1f1111",
|
||||
"<. c #98981f1f1111",
|
||||
"1. c #818126261e1e",
|
||||
"2. c #858523231919",
|
||||
"3. c #858525251c1c",
|
||||
"4. c #878728281e1e",
|
||||
"5. c #898921211717",
|
||||
"6. c #8a8a22221616",
|
||||
"7. c #8b8b25251c1c",
|
||||
"8. c #8c8c27271d1d",
|
||||
"9. c #888828281f1f",
|
||||
"0. c #8a8a29291f1f",
|
||||
"q. c #959520201111",
|
||||
"w. c #969620201111",
|
||||
"e. c #949424241717",
|
||||
"r. c #969624241717",
|
||||
"t. c #909024241919",
|
||||
"y. c #929225251919",
|
||||
"u. c #929225251b1b",
|
||||
"i. c #959526261b1b",
|
||||
"p. c #969624241818",
|
||||
"a. c #90902a2a1f1f",
|
||||
"s. c #969629291f1f",
|
||||
"d. c #9b9b20201313",
|
||||
"f. c #999924241616",
|
||||
"g. c #9c9c21211212",
|
||||
"h. c #9f9f21211212",
|
||||
"j. c #9d9d22221414",
|
||||
"k. c #9d9d23231414",
|
||||
"l. c #9c9c23231616",
|
||||
"z. c #989827271b1b",
|
||||
"x. c #999927271b1b",
|
||||
"c. c #9a9a26261b1b",
|
||||
"v. c #989827271c1c",
|
||||
"b. c #9c9c25251818",
|
||||
"n. c #9c9c27271b1b",
|
||||
"m. c #9d9d27271b1b",
|
||||
"M. c #999928281c1c",
|
||||
"N. c #999929291e1e",
|
||||
"B. c #9b9b28281c1c",
|
||||
"V. c #9b9b28281d1d",
|
||||
"C. c #9a9a29291e1e",
|
||||
"Z. c #9a9a2a2a1e1e",
|
||||
"A. c #9a9a2b2b1f1f",
|
||||
"S. c #9b9b2a2a1f1f",
|
||||
"D. c #9c9c28281c1c",
|
||||
"F. c #9e9e29291f1f",
|
||||
"G. c #9f9f29291e1e",
|
||||
"H. c #9e9e2a2a1e1e",
|
||||
"J. c #83832b2b2424",
|
||||
"K. c #83832c2c2525",
|
||||
"L. c #84842a2a2424",
|
||||
"P. c #8b8b29292121",
|
||||
"I. c #89892b2b2424",
|
||||
"U. c #8b8b2c2c2626",
|
||||
"Y. c #8f8f2a2a2222",
|
||||
"T. c #8f8f2b2b2323",
|
||||
"R. c #8d8d2e2e2828",
|
||||
"E. c #8f8f2f2f2828",
|
||||
"W. c #8f8f38383232",
|
||||
"Q. c #919129292020",
|
||||
"!. c #90902b2b2222",
|
||||
"~. c #91912d2d2525",
|
||||
"^. c #90902d2d2626",
|
||||
"/. c #969629292020",
|
||||
"(. c #95952c2c2323",
|
||||
"). c #97972c2c2222",
|
||||
"_. c #94942d2d2525",
|
||||
"`. c #94942e2e2626",
|
||||
"'. c #97972d2d2525",
|
||||
"]. c #96962e2e2424",
|
||||
"[. c #97972e2e2626",
|
||||
"{. c #97972f2f2727",
|
||||
"}. c #99992b2b2020",
|
||||
"|. c #99992c2c2121",
|
||||
" X c #98982d2d2323",
|
||||
".X c #99992c2c2222",
|
||||
"XX c #9b9b2c2c2121",
|
||||
"oX c #9a9a2c2c2323",
|
||||
"OX c #98982d2d2424",
|
||||
"+X c #98982e2e2525",
|
||||
"@X c #98982e2e2626",
|
||||
"#X c #9d9d2b2b2121",
|
||||
"$X c #9e9e2a2a2020",
|
||||
"%X c #9c9c2c2c2121",
|
||||
"&X c #9c9c2d2d2323",
|
||||
"*X c #9d9d2e2e2323",
|
||||
"=X c #9f9f2d2d2323",
|
||||
"-X c #9e9e2e2e2020",
|
||||
";X c #9f9f2e2e2323",
|
||||
":X c #9c9c2d2d2424",
|
||||
">X c #9d9d2f2f2525",
|
||||
",X c #9c9c2f2f2626",
|
||||
"<X c #9d9d2f2f2626",
|
||||
"1X c #9f9f2e2e2424",
|
||||
"2X c #9f9f2f2f2525",
|
||||
"3X c #9f9f2f2f2626",
|
||||
"4X c #939330302828",
|
||||
"5X c #909036362f2f",
|
||||
"6X c #949430302929",
|
||||
"7X c #959530302828",
|
||||
"8X c #949430302a2a",
|
||||
"9X c #969630302828",
|
||||
"0X c #969630302929",
|
||||
"qX c #9d9d30302727",
|
||||
"wX c #9e9e30302626",
|
||||
"eX c #9e9e30302727",
|
||||
"rX c #9e9e31312727",
|
||||
"tX c #9f9f30302626",
|
||||
"yX c #989831312929",
|
||||
"uX c #9a9a30302929",
|
||||
"iX c #9a9a31312a2a",
|
||||
"pX c #9a9a32322a2a",
|
||||
"aX c #9d9d31312929",
|
||||
"sX c #9d9d32322929",
|
||||
"dX c #9c9c32322a2a",
|
||||
"fX c #9d9d32322a2a",
|
||||
"gX c #9d9d33332a2a",
|
||||
"hX c #9d9d33332b2b",
|
||||
"jX c #9e9e31312828",
|
||||
"kX c #9e9e31312929",
|
||||
"lX c #9f9f31312828",
|
||||
"zX c #9e9e32322929",
|
||||
"xX c #9f9f32322a2a",
|
||||
"cX c #9f9f33332a2a",
|
||||
"vX c #9f9f33332b2b",
|
||||
"bX c #9d9d3a3a3232",
|
||||
"nX c #9f9f39393030",
|
||||
"mX c #9f9f3e3e3636",
|
||||
"MX c #a3a323231313",
|
||||
"NX c #a0a022221414",
|
||||
"BX c #a2a223231414",
|
||||
"VX c #a0a024241616",
|
||||
"CX c #a4a422221212",
|
||||
"ZX c #a4a423231313",
|
||||
"AX c #a5a522221212",
|
||||
"SX c #a6a622221212",
|
||||
"DX c #a6a622221313",
|
||||
"FX c #a7a722221212",
|
||||
"GX c #a4a424241515",
|
||||
"HX c #a5a525251616",
|
||||
"JX c #a7a724241414",
|
||||
"KX c #a7a724241515",
|
||||
"LX c #a6a625251717",
|
||||
"PX c #a7a725251616",
|
||||
"IX c #a7a725251717",
|
||||
"UX c #a6a626261717",
|
||||
"YX c #a0a025251818",
|
||||
"TX c #a3a325251818",
|
||||
"RX c #a2a226261818",
|
||||
"EX c #a3a326261818",
|
||||
"WX c #a2a227271a1a",
|
||||
"QX c #a2a227271b1b",
|
||||
"!X c #a3a327271a1a",
|
||||
"~X c #a5a527271919",
|
||||
"^X c #a5a527271a1a",
|
||||
"/X c #a6a626261818",
|
||||
"(X c #a6a627271818",
|
||||
")X c #a6a627271919",
|
||||
"_X c #a3a328281b1b",
|
||||
"`X c #a1a128281c1c",
|
||||
"'X c #a1a129291d1d",
|
||||
"]X c #a1a129291e1e",
|
||||
"[X c #a0a02a2a1f1f",
|
||||
"{X c #a1a12a2a1f1f",
|
||||
"}X c #a2a228281c1c",
|
||||
"|X c #a2a229291c1c",
|
||||
" o c #a3a32b2b1f1f",
|
||||
".o c #a5a528281a1a",
|
||||
"Xo c #a5a528281b1b",
|
||||
"oo c #a5a529291b1b",
|
||||
"Oo c #a4a429291c1c",
|
||||
"+o c #a4a429291d1d",
|
||||
"@o c #a5a529291c1c",
|
||||
"#o c #a5a529291d1d",
|
||||
"$o c #a4a42a2a1d1d",
|
||||
"%o c #a4a42a2a1e1e",
|
||||
"&o c #a4a42b2b1e1e",
|
||||
"*o c #a4a42b2b1f1f",
|
||||
"=o c #a9a921211010",
|
||||
"-o c #a9a921211111",
|
||||
";o c #a8a822221111",
|
||||
":o c #a9a922221111",
|
||||
">o c #a8a822221212",
|
||||
",o c #a8a823231212",
|
||||
"<o c #a8a823231313",
|
||||
"1o c #abab23231313",
|
||||
"2o c #a8a823231414",
|
||||
"3o c #a9a924241313",
|
||||
"4o c #a8a824241414",
|
||||
"5o c #acac22221111",
|
||||
"6o c #aeae22221212",
|
||||
"7o c #aeae23231212",
|
||||
"8o c #afaf24241313",
|
||||
"9o c #a9a927271818",
|
||||
"0o c #abab27271919",
|
||||
"qo c #a8a829291b1b",
|
||||
"wo c #abab28281a1a",
|
||||
"eo c #a8a829291c1c",
|
||||
"ro c #a8a82a2a1d1d",
|
||||
"to c #abab29291c1c",
|
||||
"yo c #adad29291b1b",
|
||||
"uo c #adad2a2a1b1b",
|
||||
"io c #aeae28281a1a",
|
||||
"po c #adad2b2b1d1d",
|
||||
"ao c #b1b123231111",
|
||||
"so c #b3b323231010",
|
||||
"do c #b3b323231111",
|
||||
"fo c #b1b126261515",
|
||||
"go c #b1b126261717",
|
||||
"ho c #b2b225251414",
|
||||
"jo c #b6b624241212",
|
||||
"ko c #b5b525251414",
|
||||
"lo c #b5b526261515",
|
||||
"zo c #b4b427271717",
|
||||
"xo c #b1b127271818",
|
||||
"co c #b3b32a2a1a1a",
|
||||
"vo c #b6b628281919",
|
||||
"bo c #b7b728281919",
|
||||
"no c #b5b52a2a1c1c",
|
||||
"mo c #b4b42c2c1d1d",
|
||||
"Mo c #b9b923231111",
|
||||
"No c #bbbb25251313",
|
||||
"Bo c #baba26261414",
|
||||
"Vo c #bebe25251212",
|
||||
"Co c #bdbd27271616",
|
||||
"Zo c #baba2b2b1a1a",
|
||||
"Ao c #bcbc2a2a1818",
|
||||
"So c #bebe2b2b1b1b",
|
||||
"Do c #bdbd2c2c1d1d",
|
||||
"Fo c #a0a02a2a2020",
|
||||
"Go c #a0a02b2b2020",
|
||||
"Ho c #a2a22b2b2020",
|
||||
"Jo c #a0a02c2c2020",
|
||||
"Ko c #a0a02c2c2121",
|
||||
"Lo c #a0a02d2d2222",
|
||||
"Po c #a0a02d2d2323",
|
||||
"Io c #a1a12d2d2222",
|
||||
"Uo c #a0a02e2e2323",
|
||||
"Yo c #a1a12f2f2222",
|
||||
"To c #a2a22d2d2121",
|
||||
"Ro c #a3a32c2c2020",
|
||||
"Eo c #a3a32c2c2121",
|
||||
"Wo c #a3a32d2d2121",
|
||||
"Qo c #a2a22d2d2222",
|
||||
"!o c #a2a22e2e2323",
|
||||
"~o c #a0a02e2e2424",
|
||||
"^o c #a0a02f2f2525",
|
||||
"/o c #a1a12f2f2424",
|
||||
"(o c #a1a12f2f2525",
|
||||
")o c #a2a22e2e2424",
|
||||
"_o c #a2a22f2f2424",
|
||||
"`o c #a9a92f2f2020",
|
||||
"'o c #aaaa2f2f2020",
|
||||
"]o c #a0a031312727",
|
||||
"[o c #a1a130302626",
|
||||
"{o c #a1a130302727",
|
||||
"}o c #a0a031312828",
|
||||
"|o c #a0a032322929",
|
||||
" O c #a0a032322a2a",
|
||||
".O c #a1a137372d2d",
|
||||
"XO c #a2a236362c2c",
|
||||
"oO c #a6a636362b2b",
|
||||
"OO c #a3a338382e2e",
|
||||
"+O c #a7a739392f2f",
|
||||
"@O c #a7a73a3a2f2f",
|
||||
"#O c #abab32322424",
|
||||
"$O c #abab32322525",
|
||||
"%O c #aaaa33332626",
|
||||
"&O c #aaaa33332727",
|
||||
"*O c #abab33332626",
|
||||
"=O c #aaaa34342727",
|
||||
"-O c #acac30302121",
|
||||
";O c #acac30302222",
|
||||
":O c #acac31312323",
|
||||
">O c #a9a935352929",
|
||||
",O c #a9a936362a2a",
|
||||
"<O c #a9a936362b2b",
|
||||
"1O c #a9a937372b2b",
|
||||
"2O c #aaaa34342828",
|
||||
"3O c #aaaa35352929",
|
||||
"4O c #a8a837372c2c",
|
||||
"5O c #a9a937372c2c",
|
||||
"6O c #a8a838382d2d",
|
||||
"7O c #a8a838382e2e",
|
||||
"8O c #a8a839392e2e",
|
||||
"9O c #a9a93f3f2f2f",
|
||||
"0O c #a2a23b3b3232",
|
||||
"qO c #a2a23d3d3535",
|
||||
"wO c #a2a23e3e3636",
|
||||
"eO c #a6a63b3b3131",
|
||||
"rO c #a5a53d3d3434",
|
||||
"tO c #a5a53e3e3535",
|
||||
"yO c #afaf3f3f3333",
|
||||
"uO c #c3c325251212",
|
||||
"iO c #c3c326261313",
|
||||
"pO c #c3c327271414",
|
||||
"aO c #c7c728281616",
|
||||
"sO c #c6c62c2c1a1a",
|
||||
"dO c #c7c72e2e1d1d",
|
||||
"fO c #cdcd2e2e1c1c",
|
||||
"gO c #cfcf2f2f1c1c",
|
||||
"hO c #d0d028281313",
|
||||
"jO c #d3d329291414",
|
||||
"kO c #d5d529291313",
|
||||
"lO c #d0d02e2e1b1b",
|
||||
"zO c #d8d829291414",
|
||||
"xO c #dddd2a2a1414",
|
||||
"cO c #dddd2d2d1717",
|
||||
"vO c #dfdf30301c1c",
|
||||
"bO c #e2e22b2b1515",
|
||||
"nO c #ebeb2d2d1414",
|
||||
"mO c #eded2e2e1717",
|
||||
"MO c #e4e431311b1b",
|
||||
"NO c #e9e930301a1a",
|
||||
"BO c #ebeb31311b1b",
|
||||
"VO c #e8e833331d1d",
|
||||
"CO c #e9e932321c1c",
|
||||
"ZO c #ebeb33331e1e",
|
||||
"AO c #eeee30301a1a",
|
||||
"SO c #eeee32321b1b",
|
||||
"DO c #eaea3a3a1b1b",
|
||||
"FO c #f1f132321b1b",
|
||||
"GO c #f3f331311919",
|
||||
"HO c #f7f732321b1b",
|
||||
"JO c #f6f636361b1b",
|
||||
"KO c #f6f638381c1c",
|
||||
"LO c #fcfc30301717",
|
||||
"PO c #fefe33331717",
|
||||
"IO c #ffff32321616",
|
||||
"UO c #fdfd35351717",
|
||||
"YO c #ffff34341717",
|
||||
"TO c #fafa30301919",
|
||||
"RO c #fafa31311818",
|
||||
"EO c #fafa36361919",
|
||||
"WO c #fdfd33331919",
|
||||
"QO c #ffff33331818",
|
||||
"!O c #fdfd35351818",
|
||||
"~O c #fafa3c3c1a1a",
|
||||
"^O c #fafa3d3d1a1a",
|
||||
"/O c #fbfb3d3d1d1d",
|
||||
"(O c #fdfd38381919",
|
||||
")O c #fcfc39391a1a",
|
||||
"_O c #ffff3a3a1a1a",
|
||||
"`O c #ffff3f3f1b1b",
|
||||
"'O c #ffff3c3c1d1d",
|
||||
"]O c #ffff3e3e1d1d",
|
||||
"[O c #c1c178782e2e",
|
||||
"{O c #ffff40401e1e",
|
||||
"}O c #d4d48d8d1d1d",
|
||||
"|O c #cdcd86862222",
|
||||
" + c #c1c181813838",
|
||||
".+ c #c7c79d9d3737",
|
||||
"X+ c #c5c59c9c3939",
|
||||
"o+ c #c4c49c9c3a3a",
|
||||
"O+ c #c8c89b9b3030",
|
||||
"++ c #cbcb9d9d3131",
|
||||
"@+ c #caca9e9e3434",
|
||||
"#+ c #cccc9d9d3030",
|
||||
"$+ c #cccc9f9f3232",
|
||||
"%+ c #cbcba0a03737",
|
||||
"&+ c #cfcfa3a33737",
|
||||
"*+ c #cfcfa3a33838",
|
||||
"=+ c #cfcfa5a53e3e",
|
||||
"-+ c #d5d5a8a82e2e",
|
||||
";+ c #dadaa8a82f2f",
|
||||
":+ c #dadaacac2f2f",
|
||||
">+ c #dbdbacac2e2e",
|
||||
",+ c #dddda8a82a2a",
|
||||
"<+ c #ddddacac2a2a",
|
||||
"1+ c #dedeadad2929",
|
||||
"2+ c #dfdfaeae2828",
|
||||
"3+ c #dcdcadad2d2d",
|
||||
"4+ c #d0d0a1a13131",
|
||||
"5+ c #d1d1a2a23030",
|
||||
"6+ c #d1d1a3a33333",
|
||||
"7+ c #d2d2a3a33232",
|
||||
"8+ c #d3d3a3a33232",
|
||||
"9+ c #d3d3a4a43333",
|
||||
"0+ c #d1d1a4a43636",
|
||||
"q+ c #d1d1a4a43737",
|
||||
"w+ c #d2d2a4a43535",
|
||||
"e+ c #d2d2a4a43636",
|
||||
"r+ c #d5d5a5a53333",
|
||||
"t+ c #d5d5a6a63434",
|
||||
"y+ c #d4d4a6a63737",
|
||||
"u+ c #d6d6a7a73535",
|
||||
"i+ c #d7d7a7a73434",
|
||||
"p+ c #d2d2a5a53939",
|
||||
"a+ c #d3d3a6a63838",
|
||||
"s+ c #d3d3a6a63a3a",
|
||||
"d+ c #d0d0a5a53d3d",
|
||||
"f+ c #d1d1a5a53c3c",
|
||||
"g+ c #d0d0a5a53f3f",
|
||||
"h+ c #d8d8a7a73333",
|
||||
"j+ c #d9d9a8a83232",
|
||||
"k+ c #d9d9acac3232",
|
||||
"l+ c #dfdfadad3636",
|
||||
"z+ c #d9d9abab3e3e",
|
||||
"x+ c #dadaaeae3939",
|
||||
"c+ c #dbdbafaf3a3a",
|
||||
"v+ c #dadaacac3f3f",
|
||||
"b+ c #dbdbadad3e3e",
|
||||
"n+ c #dfdfb1b13535",
|
||||
"m+ c #dfdfb0b03636",
|
||||
"M+ c #dcdcb0b03b3b",
|
||||
"N+ c #ddddb0b03a3a",
|
||||
"B+ c #dedeb1b13939",
|
||||
"V+ c #e3e3afaf2222",
|
||||
"C+ c #e0e0adad2525",
|
||||
"Z+ c #e1e1aeae2424",
|
||||
"A+ c #e4e4afaf2121",
|
||||
"S+ c #e2e2b2b23232",
|
||||
"D+ c #e0e0b2b23434",
|
||||
"F+ c #cfcfa5a54040",
|
||||
"G+ c #d3d3aaaa4747",
|
||||
"H+ c #d5d5abab4343",
|
||||
"J+ c #d6d6abab4242",
|
||||
"K+ c #d4d4aaaa4444",
|
||||
"L+ c #d2d2aaaa4848",
|
||||
"P+ c #d8d8acac4040",
|
||||
"I+ c #dfdfb4b44545",
|
||||
"U+ c #fbfbfbfbfbfb",
|
||||
"Y+ c Gray99",
|
||||
"T+ c #fdfdfdfdfdfd",
|
||||
"R+ c #fefefefefefe",
|
||||
"E+ c Gray100",
|
||||
"W+ c None",
|
||||
/* pixels */
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+'O(OWOTOGOAOBONOCOZOVO W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+]O_OQOmOjOpOBokohohofozoAosOfOgOSo W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+)OIOxOiOdo7o1o>oAX,.q.BXPXPX9o0ocoDono W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+`O!OnOuOao5o:o>o,oSXh.MXKXPXPXUXTX(X)Xqouoto5. W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+^OPOzOMo5o-o:o>oFXSXw.NXKXPXIXUX/X)X)XWXXoooro#o.. W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+~OYOhOso=o-o;o>o<o<oZXd.ZXPXLXUX/X*O*O.oXooo}X$o$ov.( W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+{OUOkOao=o:o>o>o<o2oJXKXGXj.VXHX/X)X~X=O2OooOoB.'X]XH.2.s W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+)ObOjo=o:o>o,o<o2o-O;OPXPXHXl.f.RX^X.oXo3O>O,O%o&o[XFoN.{ w W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+/OLOVo5o:o>o,o<o'o`oKX:O:OUX/X(XYXr.b.Xo@oOo$o<O1O oRoGo$X8.Z q W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+EOjO6o;o>o<o<o4o>.-X:OIX#O$O)X)X.o!Xe.p.`X$o%o*o4O6OEoJoKo/.) $ W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+DORONo;o>oCX<.JXKXk.PXLX#O$O*O%O.oXooo_Xy.t.m.*o oRo7O8OQoLoXX@.i f W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+KOcO8oFX<oDXg.KXPXPXUX/X/X*O&OyO2O@oOo$o|Xx.u.V.RoEoTo+O9OYoUo9.M 8 W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ JOaO3o}OA+A+V+Z+Z+C+2+2+1+,+<+B+I+N+:+j+k+h+7+O+6+y+y+a+[OIo1X!.Y = 7 W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ HOCo<oA+V+V+Z+Z+C+2+2+1+<+<+3+>+x+c+b+k+h+i+i+t+e+y+a+s+p+(o2X(.W % 9 W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ FOloJXV+V+Z+S+C+2+1+1+<+3+3+>+;+-+5+z+v+i+u+u+y+a+a+s+f+f+[o3X]./ + < F W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ SOfoKXV+Z+C+C+D+n+1+<+3+3+>+:+:+j+8+4+r+P+P+y+a+a+.+X+X+o+{owX_._ o ; z W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ MOgoPXZ+C+2+2+1+l+m+3+>+>+:+j+k+h+i+9+$+w+J+H+H+s+f+f+d+g+]oeX~.! . + l W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ vOxoPXC+2+2+1+<+<+B+N+>+:+j+k+#+i+i+u+0+@+&+s+K+G+d+d+=+F+}ojXI.S . + l W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ lOvoUX|O1+1+<+<+3+>+N+M+j+k+h+++++u+y+y+q+%+*+f+L+L+=+F+ +|ouX&.v . + l E+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ boZo/XEX)X.oXooon.c.$o<O5O oRoEoA.}.!o|..X~o&X2X{o]orO|o|oaX7XO.2 o > z E+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ [ dOwo~X.oXoooOo$oz.i.G.oORoEoWoQoa.a._o X(o^o<XtX}o|otOcXfXU.~ X + 5 F E+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ 4 ioyo.oQX@oOo$o%o&oM.F.C.XOKoQo!o)o4.0.OXOX{otX,XlX|ocXwOyX$.p O * q K W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+ q } moeo@oOo$o%o&o oRoZ.HoOO.O%X=X/ooX>X[o'.}o}oqXkXcXvXmXW.^ X + - j =.W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+ - 6.po+o'X%o&o oRoRoA.}.Qo@OPo*X~o[o[o]o[.[.|oxXzXvXhXE.X.e O + 6 J Y+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+ X r n.$o]X{X oRoEoWoQo|.|.)oeO(o[o{o]o}o|o{.xXvXvXdX8X#.b X + o d I Y+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+ - B D.[X[XGoEoWoQo!o!o_o(oeOnXY.+X}o|o|o9X0XvXhX8X%.D X O # 6 H :.W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+ * N 7.S.GoKoKo!o)o/o(o[oOX0O5X@X|o OcXvXgXpXR.+.V X O + + j =.E+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+L # u .s.#XLoPo;X(o[o[o]o[.bXtOxXcXfXpX6XK.] a X O + - j *.T+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+ - U 3.Q.).:X2X2XwXeXrXjXqOsXiX4XJ.o.E & O O + O 0 K T+E+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+ - 1 C | 1.P.T._.`.`.^.U.L.$.' A 3 X O O # - q J :.Y+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+ # - # O y m T Q _ ` ~ R n t @ O O O + O # g P :.E+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+ - # # # O O O O O O O O O O O + # + 7 x ;.T+Y+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+ G k : # - # # X X + . # # # O , g j -.:.R+E+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ h 6 : 6 6 # # # 6 6 0 g F *.:.T+E+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ L F c z z z c F K =.T+E+U+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+E+E+E+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
|
||||
"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+"
|
||||
};
|
95
include/wx/generic/fontdlgg.h
Normal file
95
include/wx/generic/fontdlgg.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: fontdlgg.h
|
||||
// Purpose: wxGenericFontDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FONTDLGH_G__
|
||||
#define __FONTDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "fontdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
/*
|
||||
* FONT DIALOG
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxChoice;
|
||||
class WXDLLEXPORT wxText;
|
||||
class WXDLLEXPORT wxCheckBox;
|
||||
|
||||
#define wxID_FONT_UNDERLINE 3000
|
||||
#define wxID_FONT_STYLE 3001
|
||||
#define wxID_FONT_WEIGHT 3002
|
||||
#define wxID_FONT_FAMILY 3003
|
||||
#define wxID_FONT_COLOUR 3004
|
||||
#define wxID_FONT_SIZE 3005
|
||||
|
||||
class WXDLLEXPORT wxGenericFontDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericFontDialog)
|
||||
protected:
|
||||
wxFontData fontData;
|
||||
wxFont dialogFont;
|
||||
wxWindow *dialogParent;
|
||||
|
||||
// Area reserved for font display
|
||||
wxRect fontRect;
|
||||
|
||||
wxChoice *familyChoice;
|
||||
wxChoice *styleChoice;
|
||||
wxChoice *weightChoice;
|
||||
wxChoice *colourChoice;
|
||||
wxCheckBox *underLineCheckBox;
|
||||
wxChoice *pointSizeChoice;
|
||||
bool m_useEvents;
|
||||
|
||||
// static bool fontDialogCancelled;
|
||||
public:
|
||||
|
||||
wxGenericFontDialog(void);
|
||||
wxGenericFontDialog(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
|
||||
~wxGenericFontDialog(void);
|
||||
|
||||
bool Create(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
|
||||
|
||||
int ShowModal(void);
|
||||
|
||||
inline wxFontData& GetFontData(void) { return fontData; }
|
||||
|
||||
// Internal functions
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
virtual void CreateWidgets(void);
|
||||
virtual void InitializeFont(void);
|
||||
|
||||
virtual void PaintFontBackground(wxDC& dc);
|
||||
virtual void PaintFont(wxDC& dc);
|
||||
|
||||
void OnChangeFont(wxCommandEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
wxChar WXDLLEXPORT *wxFontFamilyIntToString(int family);
|
||||
wxChar WXDLLEXPORT *wxFontWeightIntToString(int weight);
|
||||
wxChar WXDLLEXPORT *wxFontStyleIntToString(int style);
|
||||
int WXDLLEXPORT wxFontFamilyStringToInt(wxChar *family);
|
||||
int WXDLLEXPORT wxFontWeightStringToInt(wxChar *weight);
|
||||
int WXDLLEXPORT wxFontStyleStringToInt(wxChar *style);
|
||||
|
||||
#endif
|
386
include/wx/generic/gridg.h
Normal file
386
include/wx/generic/gridg.h
Normal file
@@ -0,0 +1,386 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gridg.h
|
||||
// Purpose: wxGenericGrid
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GRIDH_G__
|
||||
#define __GRIDH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "gridg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/scrolbar.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
#define wxGRID_DEFAULT_EDIT_WIDTH 300
|
||||
#define wxGRID_DEFAULT_EDIT_HEIGHT 27
|
||||
#define wxGRID_DEFAULT_EDIT_X 2
|
||||
#define wxGRID_DEFAULT_EDIT_Y 1
|
||||
#define wxGRID_DEFAULT_SHEET_TOP 31
|
||||
#define wxGRID_DEFAULT_SHEET_LEFT 0
|
||||
#define wxGRID_DEFAULT_CELL_HEIGHT 20
|
||||
#define wxGRID_DEFAULT_CELL_WIDTH 80
|
||||
#define wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH 40
|
||||
#define wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT 20
|
||||
|
||||
#ifndef wxLEFT
|
||||
#define wxLEFT 0x0400
|
||||
#endif
|
||||
|
||||
#ifndef wxRIGHT
|
||||
#define wxRIGHT 0x0800
|
||||
#endif
|
||||
|
||||
#define WXGENERIC_GRID_VERSION 0.5
|
||||
|
||||
class WXDLLEXPORT wxGridEvent;
|
||||
class WXDLLEXPORT wxGridCell;
|
||||
class WXDLLEXPORT wxGenericGrid: public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericGrid)
|
||||
public:
|
||||
wxGenericGrid(void);
|
||||
|
||||
inline wxGenericGrid(wxWindow *parent, int x, int y, int width, int height, long style = 0, char *name = "grid")
|
||||
{
|
||||
Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name);
|
||||
}
|
||||
inline wxGenericGrid(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style = 0, const wxString& name = "grid")
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
~wxGenericGrid(void);
|
||||
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID, const wxPoint& pos, const wxSize& size, long style = 0, const wxString& name = "grid");
|
||||
|
||||
bool CreateGrid(int nRows, int nCols, wxString **cellValues = (wxString **) NULL, short *widths = (short *) NULL,
|
||||
short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT);
|
||||
void PaintGrid(wxDC& dc);
|
||||
void ClearGrid(void);
|
||||
virtual wxGridCell *GetCell(int row, int col) const;
|
||||
inline wxGridCell ***GetCells(void) const { return m_gridCells; }
|
||||
bool InsertCols(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
bool InsertRows(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
bool AppendCols(int n = 1, bool updateLabels = TRUE);
|
||||
bool AppendRows(int n = 1, bool updateLabels = TRUE);
|
||||
bool DeleteCols(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
bool DeleteRows(int pos = 0, int n = 1, bool updateLabels = TRUE);
|
||||
|
||||
// Cell accessors
|
||||
void SetCellValue(const wxString& val, int row, int col);
|
||||
wxString& GetCellValue(int row, int col) const;
|
||||
void SetCellAlignment(int flag, int row, int col);
|
||||
void SetCellAlignment(int flag);
|
||||
int GetCellAlignment(int row, int col) const;
|
||||
int GetCellAlignment(void) const;
|
||||
void SetCellTextColour(const wxColour& val, int row, int col);
|
||||
void SetCellTextColour(const wxColour& col);
|
||||
wxColour& GetCellTextColour(int row, int col) const;
|
||||
inline wxColour& GetCellTextColour(void) const { return (wxColour&) m_cellTextColour; }
|
||||
void SetCellBackgroundColour(const wxColour& col);
|
||||
void SetCellBackgroundColour(const wxColour& colour, int row, int col);
|
||||
inline wxColour& GetCellBackgroundColour(void) const { return (wxColour&) m_cellBackgroundColour; }
|
||||
wxColour& GetCellBackgroundColour(int row, int col) const;
|
||||
inline wxFont& GetCellTextFont(void) const { return (wxFont&) m_cellTextFont; }
|
||||
wxFont& GetCellTextFont(int row, int col) const;
|
||||
void SetCellTextFont(const wxFont& fnt);
|
||||
void SetCellTextFont(const wxFont& fnt, int row, int col);
|
||||
wxBitmap *GetCellBitmap(int row, int col) const;
|
||||
void SetCellBitmap(wxBitmap *bitmap, int row, int col);
|
||||
|
||||
// Size accessors
|
||||
void SetColumnWidth(int col, int width);
|
||||
int GetColumnWidth(int col) const;
|
||||
void SetRowHeight(int row, int height);
|
||||
int GetRowHeight(int row) const;
|
||||
|
||||
// Label accessors
|
||||
void SetLabelSize(int orientation, int sz);
|
||||
int GetLabelSize(int orientation) const;
|
||||
void SetLabelAlignment(int orientation, int alignment);
|
||||
int GetLabelAlignment(int orientation) const;
|
||||
wxGridCell *GetLabelCell(int orientation, int pos) const;
|
||||
void SetLabelValue(int orientation, const wxString& val, int pos);
|
||||
wxString& GetLabelValue(int orientation, int pos) const;
|
||||
void SetLabelTextColour(const wxColour& colour);
|
||||
void SetLabelBackgroundColour(const wxColour& colour);
|
||||
inline wxColour& GetLabelTextColour(void) const { return (wxColour&) m_labelTextColour; }
|
||||
inline wxColour& GetLabelBackgroundColour(void) { return (wxColour&) m_labelBackgroundColour; }
|
||||
inline wxFont& GetLabelTextFont(void) { return (wxFont&) m_labelTextFont; }
|
||||
inline void SetLabelTextFont(const wxFont& fnt) { m_labelTextFont = fnt; }
|
||||
|
||||
// Miscellaneous accessors
|
||||
inline int GetCursorRow(void) const { return m_wCursorRow; }
|
||||
inline int GetCursorColumn(void) const { return m_wCursorColumn; }
|
||||
void SetGridCursor(int row, int col);
|
||||
inline int GetRows(void) const { return m_totalRows; }
|
||||
inline int GetCols(void) const { return m_totalCols; }
|
||||
inline int GetScrollPosX(void) const { return m_scrollPosX; }
|
||||
inline int GetScrollPosY(void) const { return m_scrollPosY; }
|
||||
inline void SetScrollPosX(int pos) { m_scrollPosX = pos; }
|
||||
inline void SetScrollPosY(int pos) { m_scrollPosY = pos; }
|
||||
inline wxTextCtrl *GetTextItem(void) const { return m_textItem; }
|
||||
inline wxScrollBar *GetHorizScrollBar(void) const { return m_hScrollBar; }
|
||||
inline wxScrollBar *GetVertScrollBar(void) const { return m_vScrollBar; }
|
||||
inline bool GetEditable(void) const { return m_editable; }
|
||||
void SetEditable(bool edit);
|
||||
inline wxRect& GetCurrentRect(void) const { return (wxRect&) m_currentRect; }
|
||||
inline bool CurrentCellVisible(void) const { return m_currentRectVisible; }
|
||||
inline void SetDividerPen(const wxPen& pen) { m_divisionPen = pen; }
|
||||
inline wxPen& GetDividerPen(void) const { return (wxPen&) m_divisionPen; }
|
||||
|
||||
// High-level event handling
|
||||
// Override e.g. to check value of current cell; but call
|
||||
// base member for default processing.
|
||||
virtual void OnSelectCellImplementation(wxDC *dc, int row, int col);
|
||||
|
||||
virtual void OnSelectCell(int WXUNUSED(row), int WXUNUSED(col)) {};
|
||||
void _OnSelectCell(wxGridEvent& event);
|
||||
|
||||
// Override to create your own class of grid cell
|
||||
virtual wxGridCell *OnCreateCell(void);
|
||||
void _OnCreateCell(wxGridEvent& event);
|
||||
|
||||
// Override to change labels e.g. creation of grid, inserting/deleting a row/col.
|
||||
// By default, auto-labels the grid.
|
||||
virtual void OnChangeLabels(void);
|
||||
void _OnChangeLabels(wxGridEvent& event);
|
||||
|
||||
// Override to change the label of the edit field when selecting a cell
|
||||
// By default, sets it to e.g. A12
|
||||
virtual void OnChangeSelectionLabel(void);
|
||||
void _OnChangeSelectionLabel(wxGridEvent& event);
|
||||
|
||||
// Override for event processing
|
||||
virtual void OnCellChange(int WXUNUSED(row), int WXUNUSED(col)) {};
|
||||
virtual void OnCellLeftClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
virtual void OnCellRightClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
virtual void OnLabelLeftClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
virtual void OnLabelRightClick(int WXUNUSED(row), int WXUNUSED(col), int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(control), bool WXUNUSED(shift)) {};
|
||||
|
||||
void _OnCellChange(wxGridEvent& event);
|
||||
void _OnCellLeftClick(wxGridEvent& event);
|
||||
void _OnCellRightClick(wxGridEvent& event);
|
||||
void _OnLabelLeftClick(wxGridEvent& event);
|
||||
void _OnLabelRightClick(wxGridEvent& event);
|
||||
|
||||
// Activation: call from wxFrame::OnActivate
|
||||
void OnActivate(bool active);
|
||||
|
||||
// Miscellaneous
|
||||
void AdjustScrollbars(void);
|
||||
void UpdateDimensions(void);
|
||||
|
||||
/* INTERNAL
|
||||
*/
|
||||
void SetCurrentRect (int Row, int Column, int canvasW = -1, int canvasH = -1);
|
||||
void HighlightCell (wxDC *dc);
|
||||
void DrawCellText(void);
|
||||
void SetGridClippingRegion(wxDC *dc);
|
||||
virtual bool CellHitTest(int x, int y, int *row, int *col);
|
||||
virtual bool LabelSashHitTest(int x, int y, int *orientation, int *rowOrCol, int *startPos);
|
||||
virtual bool LabelHitTest(int x, int y, int *row, int *col);
|
||||
// Painting
|
||||
virtual void DrawLabelAreas(wxDC *dc);
|
||||
virtual void DrawEditableArea(wxDC *dc);
|
||||
virtual void DrawGridLines(wxDC *dc);
|
||||
virtual void DrawColumnLabels(wxDC *dc);
|
||||
virtual void DrawColumnLabel(wxDC *dc, wxRect *rect, int col);
|
||||
virtual void DrawRowLabels(wxDC *dc);
|
||||
virtual void DrawRowLabel(wxDC *dc, wxRect *rect, int row);
|
||||
virtual void DrawCells(wxDC *dc);
|
||||
virtual void DrawCellValue(wxDC *dc, wxRect *rect, int row, int col);
|
||||
virtual void DrawCellBackground(wxDC *dc, wxRect *rect, int row, int col);
|
||||
virtual void DrawTextRect(wxDC *dc, const wxString& text, wxRect *rect, int flag);
|
||||
virtual void DrawBitmapRect(wxDC *dc, wxBitmap *bitmap, wxRect *rect, int flag);
|
||||
|
||||
// Refresh cell and optionally set the text field
|
||||
void RefreshCell(int row, int col, bool setText = FALSE);
|
||||
|
||||
// Don't refresh within the outer pair of these.
|
||||
inline void BeginBatch(void) { m_batchCount ++; }
|
||||
inline void EndBatch(void) { m_batchCount --; }
|
||||
inline int GetBatchCount(void) { return m_batchCount; }
|
||||
|
||||
void OnText(wxCommandEvent& ev);
|
||||
void OnGridScroll(wxScrollEvent& ev);
|
||||
|
||||
protected:
|
||||
wxPanel* m_editingPanel; // Contains the text control
|
||||
wxTextCtrl* m_textItem;
|
||||
wxScrollBar* m_hScrollBar;
|
||||
wxScrollBar* m_vScrollBar;
|
||||
int m_wCursorRow;
|
||||
int m_wCursorColumn;
|
||||
wxRect m_currentRect;
|
||||
bool m_currentRectVisible;
|
||||
wxGridCell*** m_gridCells;
|
||||
wxGridCell** m_rowLabelCells;
|
||||
wxGridCell** m_colLabelCells;
|
||||
bool m_editCreated;
|
||||
bool m_editable;
|
||||
|
||||
int m_totalRows;
|
||||
int m_totalCols;
|
||||
|
||||
// Row and column we're currently looking at
|
||||
int m_scrollPosX;
|
||||
int m_scrollPosY;
|
||||
|
||||
// Dimensions
|
||||
int m_leftOfSheet;
|
||||
int m_topOfSheet;
|
||||
int m_rightOfSheet; // Calculated from m_colWidths
|
||||
int m_bottomOfSheet; // Calculated from m_rowHeights
|
||||
int m_totalGridWidth; // Total 'virtual' size
|
||||
int m_totalGridHeight;
|
||||
int m_cellHeight; // For now, a default
|
||||
int m_verticalLabelWidth;
|
||||
int m_horizontalLabelHeight;
|
||||
int m_verticalLabelAlignment;
|
||||
int m_horizontalLabelAlignment;
|
||||
int m_cellAlignment;
|
||||
short* m_colWidths; // Dynamically allocated
|
||||
short* m_rowHeights; // Dynamically allocated
|
||||
int m_scrollWidth; // Vert. scroll width, horiz. scroll height
|
||||
|
||||
// Colours
|
||||
wxColour m_cellTextColour;
|
||||
wxColour m_cellBackgroundColour;
|
||||
wxFont m_cellTextFont;
|
||||
wxColour m_labelTextColour;
|
||||
wxColour m_labelBackgroundColour;
|
||||
wxBrush m_labelBackgroundBrush;
|
||||
wxFont m_labelTextFont;
|
||||
wxPen m_divisionPen;
|
||||
wxBitmap* m_doubleBufferingBitmap;
|
||||
|
||||
// Position of Edit control
|
||||
wxRect m_editControlPosition;
|
||||
|
||||
// Drag status
|
||||
int m_dragStatus;
|
||||
int m_dragRowOrCol;
|
||||
int m_dragStartPosition;
|
||||
int m_dragLastPosition;
|
||||
wxCursor m_horizontalSashCursor;
|
||||
wxCursor m_verticalSashCursor;
|
||||
|
||||
// To avoid multiple refreshes, use Begin/EndBatch
|
||||
int m_batchCount;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#define wxGRID_TEXT_CTRL 2000
|
||||
#define wxGRID_HSCROLL 2001
|
||||
#define wxGRID_VSCROLL 2002
|
||||
|
||||
class WXDLLEXPORT wxGridCell: public wxObject
|
||||
{
|
||||
public:
|
||||
wxString textValue;
|
||||
wxFont font;
|
||||
wxColour textColour;
|
||||
wxColour backgroundColour;
|
||||
wxBrush backgroundBrush;
|
||||
wxBitmap* cellBitmap;
|
||||
int alignment;
|
||||
|
||||
wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL);
|
||||
~wxGridCell(void);
|
||||
|
||||
virtual wxString& GetTextValue(void) const { return (wxString&) textValue; }
|
||||
virtual void SetTextValue(const wxString& str) { textValue = str; }
|
||||
inline wxFont& GetFont(void) const { return (wxFont&) font; }
|
||||
inline void SetFont(const wxFont& f) { font = f; }
|
||||
inline wxColour& GetTextColour(void) const { return (wxColour&) textColour; }
|
||||
inline void SetTextColour(const wxColour& colour) { textColour = colour; }
|
||||
inline wxColour& GetBackgroundColour(void) const { return (wxColour&) backgroundColour; }
|
||||
void SetBackgroundColour(const wxColour& colour);
|
||||
inline wxBrush& GetBackgroundBrush(void) const { return (wxBrush&) backgroundBrush; }
|
||||
inline void SetBackgroundBrush(const wxBrush& brush) { backgroundBrush = brush; }
|
||||
inline int GetAlignment(void) const { return alignment; }
|
||||
inline void SetAlignment(int align) { alignment = align; }
|
||||
inline wxBitmap *GetCellBitmap(void) const { return cellBitmap; }
|
||||
inline void SetCellBitmap(wxBitmap *bitmap) { cellBitmap = bitmap; }
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxGrid: public wxGenericGrid
|
||||
{
|
||||
public:
|
||||
wxGrid(void):wxGenericGrid() {}
|
||||
wxGrid(wxWindow *parent, int x=-1, int y=-1, int width=-1, int height=-1,
|
||||
long style=0, char *name = "gridWindow"):
|
||||
wxGenericGrid(parent, x, y, width, height, style, name)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxGridEvent : public wxCommandEvent {
|
||||
DECLARE_DYNAMIC_CLASS(wxGridEvent)
|
||||
public:
|
||||
wxGridEvent()
|
||||
: wxCommandEvent(), m_row(-1), m_col(-1), m_x(-1), m_y(-1),
|
||||
m_control(0), m_shift(0), m_cell(0)
|
||||
{}
|
||||
|
||||
wxGridEvent(int id, wxEventType type, wxObject* obj,
|
||||
int row=-1, int col=-1, int x=-1, int y=-1,
|
||||
bool control=FALSE, bool shift=FALSE)
|
||||
: wxCommandEvent(type, id), m_row(row), m_col(col), m_x(x), m_y(y),
|
||||
m_control(control), m_shift(shift), m_cell(0)
|
||||
{
|
||||
SetEventObject(obj);
|
||||
}
|
||||
|
||||
|
||||
int m_row;
|
||||
int m_col;
|
||||
int m_x;
|
||||
int m_y;
|
||||
bool m_control;
|
||||
bool m_shift;
|
||||
wxGridCell* m_cell;
|
||||
};
|
||||
|
||||
const wxEventType wxEVT_GRID_SELECT_CELL = wxEVT_FIRST + 1575;
|
||||
const wxEventType wxEVT_GRID_CREATE_CELL = wxEVT_FIRST + 1576;
|
||||
const wxEventType wxEVT_GRID_CHANGE_LABELS = wxEVT_FIRST + 1577;
|
||||
const wxEventType wxEVT_GRID_CHANGE_SEL_LABEL = wxEVT_FIRST + 1578;
|
||||
const wxEventType wxEVT_GRID_CELL_CHANGE = wxEVT_FIRST + 1579;
|
||||
const wxEventType wxEVT_GRID_CELL_LCLICK = wxEVT_FIRST + 1580;
|
||||
const wxEventType wxEVT_GRID_CELL_RCLICK = wxEVT_FIRST + 1581;
|
||||
const wxEventType wxEVT_GRID_LABEL_LCLICK = wxEVT_FIRST + 1582;
|
||||
const wxEventType wxEVT_GRID_LABEL_RCLICK = wxEVT_FIRST + 1583;
|
||||
|
||||
|
||||
typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&);
|
||||
|
||||
#define EVT_GRID_SELECT_CELL(fn) { wxEVT_GRID_SELECT_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_CREATE_CELL(fn) { wxEVT_GRID_CREATE_CELL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_CHANGE_LABELS(fn) { wxEVT_GRID_CHANGE_LABELS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_CHANGE_SEL_LABEL(fn) { wxEVT_GRID_CHANGE_SEL_LABEL, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_CELL_CHANGE(fn) { wxEVT_GRID_CELL_CHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_CELL_LCLICK(fn) { wxEVT_GRID_CELL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_CELL_RCLICK(fn) { wxEVT_GRID_CELL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_LABEL_LCLICK(fn) { wxEVT_GRID_LABEL_LCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
#define EVT_GRID_LABEL_RCLICK(fn) { wxEVT_GRID_LABEL_RCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxGridEventFunction) &fn, NULL },
|
||||
|
||||
#endif
|
||||
|
80
include/wx/generic/helpext.h
Normal file
80
include/wx/generic/helpext.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/*-*- c++ -*-********************************************************
|
||||
* exthlp.h - an external help controller for wxWindows *
|
||||
* *
|
||||
* (C) 1998 by Karsten Ball<6C>der (Ballueder@usa.net) *
|
||||
* *
|
||||
* $Id$
|
||||
*******************************************************************/
|
||||
#ifndef WXXHELP_H
|
||||
#define WXXHELP_H
|
||||
|
||||
#if wxUSE_HELP
|
||||
|
||||
#ifdef __GNUG__
|
||||
# pragma interface "wxexthlp.h"
|
||||
#endif
|
||||
|
||||
#include "wx/generic/helphtml.h"
|
||||
|
||||
#ifndef WXEXTHELP_DEFAULTBROWSER
|
||||
/// Default browser name.
|
||||
# define WXEXTHELP_DEFAULTBROWSER "netscape"
|
||||
/// Is default browse a variant of netscape?
|
||||
# define WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE TRUE
|
||||
#endif
|
||||
/// Name of environment variable to set help browser.
|
||||
#define WXEXTHELP_ENVVAR_BROWSER "WX_HELPBROWSER"
|
||||
/// Is browser a netscape browser?
|
||||
#define WXEXTHELP_ENVVAR_BROWSERISNETSCAPE "WX_HELPBROWSER_NS"
|
||||
|
||||
/**
|
||||
This class implements help via an external browser.
|
||||
It requires the name of a directory containing the documentation
|
||||
and a file mapping numerical Section numbers to relative URLS.
|
||||
|
||||
The map file contains two or three fields per line:
|
||||
numeric_id relative_URL [; comment/documentation]
|
||||
|
||||
The numeric_id is the id used to look up the entry in
|
||||
DisplaySection()/DisplayBlock(). The relative_URL is a filename of
|
||||
an html file, relative to the help directory. The optional
|
||||
comment/documentation field (after a ';') is used for keyword
|
||||
searches, so some meaningful text here does not hurt.
|
||||
If the documentation itself contains a ';', only the part before
|
||||
that will be displayed in the listbox, but all of it used for search.
|
||||
|
||||
Lines starting with ';' will be ignored.
|
||||
*/
|
||||
|
||||
class wxExtHelpController : public wxHTMLHelpControllerBase
|
||||
{
|
||||
DECLARE_CLASS(wxExtHelpController)
|
||||
public:
|
||||
wxExtHelpController(void);
|
||||
|
||||
/** Tell it which browser to use.
|
||||
The Netscape support will check whether Netscape is already
|
||||
running (by looking at the .netscape/lock file in the user's
|
||||
home directory) and tell it to load the page into the existing
|
||||
window.
|
||||
@param browsername The command to call a browser/html viewer.
|
||||
@param isNetscape Set this to TRUE if the browser is some variant of Netscape.
|
||||
*/
|
||||
// Obsolete form
|
||||
void SetBrowser(wxString const & browsername = WXEXTHELP_DEFAULTBROWSER,
|
||||
bool isNetscape = WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE);
|
||||
|
||||
// Set viewer: new name for SetBrowser
|
||||
virtual void SetViewer(const wxString& viewer = WXEXTHELP_DEFAULTBROWSER, long flags = wxHELP_NETSCAPE);
|
||||
|
||||
private:
|
||||
/// How to call the html viewer.
|
||||
wxString m_BrowserName;
|
||||
/// Is the viewer a variant of netscape?
|
||||
bool m_BrowserIsNetscape;
|
||||
/// Call the browser using a relative URL.
|
||||
bool DisplayHelp(wxString const &);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
128
include/wx/generic/helphtml.h
Normal file
128
include/wx/generic/helphtml.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/*-*- c++ -*-********************************************************
|
||||
* helphtml.h - base class for html based help controllers *
|
||||
* *
|
||||
* (C) 1999 by Karsten Ball<6C>der (Ballueder@usa.net) *
|
||||
* *
|
||||
* $Id$
|
||||
*******************************************************************/
|
||||
#ifndef WXXHELPHTML_H
|
||||
#define WXXHELPHTML_H
|
||||
|
||||
#if wxUSE_HELP
|
||||
|
||||
#ifdef __GNUG__
|
||||
# pragma interface "helphtml.h"
|
||||
#endif
|
||||
|
||||
#include "wx/helpbase.h"
|
||||
|
||||
/// Name for map file.
|
||||
#define WXEXTHELP_MAPFILE "wxhelp.map"
|
||||
/// Path separator.
|
||||
#define WXEXTHELP_SEPARATOR '/'
|
||||
/// Maximum line length in map file.
|
||||
#define WXEXTHELP_BUFLEN 512
|
||||
/// Character introducing comments/documentation field in map file.
|
||||
#define WXEXTHELP_COMMENTCHAR ';'
|
||||
|
||||
class wxExtHelpMapList;
|
||||
|
||||
|
||||
/**
|
||||
This class is the base class for all html help implementations.
|
||||
It requires the name of a directory containing the documentation
|
||||
and a file mapping numerical Section numbers to relative URLS.
|
||||
|
||||
The map file contains two or three fields per line:
|
||||
numeric_id relative_URL [; comment/documentation]
|
||||
|
||||
The numeric_id is the id used to look up the entry in
|
||||
DisplaySection()/DisplayBlock(). The relative_URL is a filename of
|
||||
an html file, relative to the help directory. The optional
|
||||
comment/documentation field (after a ';') is used for keyword
|
||||
searches, so some meaningful text here does not hurt.
|
||||
If the documentation itself contains a ';', only the part before
|
||||
that will be displayed in the listbox, but all of it used for search.
|
||||
|
||||
Lines starting with ';' will be ignored.
|
||||
*/
|
||||
|
||||
class wxHTMLHelpControllerBase : public wxHelpControllerBase
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase)
|
||||
public:
|
||||
wxHTMLHelpControllerBase(void);
|
||||
virtual ~wxHTMLHelpControllerBase(void);
|
||||
|
||||
/** This must be called to tell the controller where to find the
|
||||
documentation.
|
||||
If a locale is set, look in file/localename, i.e.
|
||||
If passed "/usr/local/myapp/help" and the current wxLocale is
|
||||
set to be "de", then look in "/usr/local/myapp/help/de/"
|
||||
first and fall back to "/usr/local/myapp/help" if that
|
||||
doesn't exist.
|
||||
|
||||
@param file - NOT a filename, but a directory name.
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool Initialize(const wxString& dir, int WXUNUSED(server))
|
||||
{ return Initialize(dir); }
|
||||
|
||||
/** This must be called to tell the controller where to find the
|
||||
documentation.
|
||||
If a locale is set, look in file/localename, i.e.
|
||||
If passed "/usr/local/myapp/help" and the current wxLocale is
|
||||
set to be "de", then look in "/usr/local/myapp/help/de/"
|
||||
first and fall back to "/usr/local/myapp/help" if that
|
||||
doesn't exist.
|
||||
@param dir - directory name where to fine the help files
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool Initialize(const wxString& dir);
|
||||
|
||||
/** If file is "", reloads file given in Initialize.
|
||||
@file Name of help directory.
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool LoadFile(const wxString& file = "");
|
||||
|
||||
/** Display list of all help entries.
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool DisplayContents(void);
|
||||
/** Display help for id sectionNo.
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
/** Display help for id sectionNo -- identical with DisplaySection().
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
/** Search comment/documentation fields in map file and present a
|
||||
list to chose from.
|
||||
@key k string to search for, empty string will list all entries
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool KeywordSearch(const wxString& k);
|
||||
|
||||
/// does nothing
|
||||
virtual bool Quit(void);
|
||||
/// does nothing
|
||||
virtual void OnQuit(void);
|
||||
|
||||
/// Call the browser using a relative URL.
|
||||
virtual bool DisplayHelp(wxString const &) = 0;
|
||||
|
||||
protected:
|
||||
/// Filename of currently active map file.
|
||||
wxString m_MapFile;
|
||||
/// How many entries do we have in the map file?
|
||||
int m_NumOfEntries;
|
||||
/// A list containing all id,url,documentation triples.
|
||||
wxList *m_MapList;
|
||||
/// Deletes the list and all objects.
|
||||
void DeleteList(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
127
include/wx/generic/helpxlp.h
Normal file
127
include/wx/generic/helpxlp.h
Normal file
@@ -0,0 +1,127 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpxlp.h
|
||||
// Purpose: Help system: wxHelp implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* sccsid[] = "@(#)wx_help.h 1.2 5/9/94" */
|
||||
|
||||
#ifndef __HELPXLPH__
|
||||
#define __HELPXLPH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "helpxlp.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "wx/wx.h"
|
||||
|
||||
#if wxUSE_HELP
|
||||
|
||||
#include "wx/helpbase.h"
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include "wx/dde.h"
|
||||
#else
|
||||
// Or whatever it'll be called
|
||||
#include "wx/ipctcp.h"
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxXLPHelpController;
|
||||
|
||||
// Connection class for implementing the connection between the
|
||||
// wxHelp process and the application
|
||||
class WXDLLEXPORT wxXLPHelpConnection: public
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxDDEConnection
|
||||
#else
|
||||
wxTCPConnection
|
||||
#endif
|
||||
|
||||
{
|
||||
friend class wxXLPHelpController;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxXLPHelpConnection)
|
||||
|
||||
public:
|
||||
|
||||
wxXLPHelpConnection(wxXLPHelpController *instance);
|
||||
bool OnDisconnect(void);
|
||||
|
||||
private:
|
||||
wxXLPHelpController *helpInstance;
|
||||
};
|
||||
|
||||
// Connection class for implementing the client process
|
||||
// controlling the wxHelp process
|
||||
class WXDLLEXPORT wxXLPHelpClient: public
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxDDEClient
|
||||
#else
|
||||
wxTCPClient
|
||||
#endif
|
||||
|
||||
{
|
||||
DECLARE_CLASS(wxXLPHelpClient)
|
||||
|
||||
friend class WXDLLEXPORT wxXLPHelpController;
|
||||
public:
|
||||
wxXLPHelpClient(wxXLPHelpController* c) { m_controller = c; }
|
||||
|
||||
wxConnectionBase *OnMakeConnection(void)
|
||||
{ return new wxXLPHelpConnection(m_controller);
|
||||
}
|
||||
protected:
|
||||
wxXLPHelpController* m_controller;
|
||||
};
|
||||
|
||||
// An application can have one or more instances of wxHelp,
|
||||
// represented by an object of this class.
|
||||
// Nothing happens on initial creation; the application
|
||||
// must call a member function to display help.
|
||||
// If the instance of wxHelp is already active, that instance
|
||||
// will be used for subsequent help.
|
||||
|
||||
class WXDLLEXPORT wxXLPHelpController: public wxHelpControllerBase
|
||||
{
|
||||
friend class WXDLLEXPORT wxXLPHelpConnection;
|
||||
DECLARE_CLASS(wxXLPHelpController)
|
||||
|
||||
public:
|
||||
wxXLPHelpController(void);
|
||||
~wxXLPHelpController(void);
|
||||
|
||||
// Must call this to set the filename and server name
|
||||
virtual bool Initialize(const wxString& file, int server = -1);
|
||||
// If file is "", reloads file given in Initialize
|
||||
virtual bool LoadFile(const wxString& file = "");
|
||||
virtual bool DisplayContents(void);
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
virtual bool KeywordSearch(const wxString& k);
|
||||
|
||||
virtual bool Quit(void);
|
||||
virtual void OnQuit(void);
|
||||
|
||||
// Private
|
||||
bool Run(void);
|
||||
|
||||
protected:
|
||||
wxString helpFile;
|
||||
wxString helpHost;
|
||||
int helpServer;
|
||||
bool helpRunning;
|
||||
wxXLPHelpConnection* helpConnection;
|
||||
wxXLPHelpClient helpClient;
|
||||
};
|
||||
|
||||
#endif // wxUSE_HELP
|
||||
#endif
|
||||
// __HELPXLPH__
|
78
include/wx/generic/imaglist.h
Normal file
78
include/wx/generic/imaglist.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: imaglist.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __IMAGELISTH_G__
|
||||
#define __IMAGELISTH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "imaglist.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/dc.h"
|
||||
|
||||
/*
|
||||
* wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to
|
||||
* images for their items by an index into an image list.
|
||||
* A wxImageList is capable of creating images with optional masks from
|
||||
* a variety of sources - a single bitmap plus a colour to indicate the mask,
|
||||
* two bitmaps, or an icon.
|
||||
*
|
||||
* Image lists can also create and draw images used for drag and drop functionality.
|
||||
* This is not yet implemented in wxImageList. We need to discuss a generic API
|
||||
* for doing drag and drop and see whether it ties in with the Win95 view of it.
|
||||
* See below for candidate functions and an explanation of how they might be
|
||||
* used.
|
||||
*/
|
||||
|
||||
// Flags for Draw
|
||||
#define wxIMAGELIST_DRAW_NORMAL 0x0001
|
||||
#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002
|
||||
#define wxIMAGELIST_DRAW_SELECTED 0x0004
|
||||
#define wxIMAGELIST_DRAW_FOCUSED 0x0008
|
||||
|
||||
// Flag values for Set/GetImageList
|
||||
enum {
|
||||
wxIMAGE_LIST_NORMAL, // Normal icons
|
||||
wxIMAGE_LIST_SMALL, // Small icons
|
||||
wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation)
|
||||
};
|
||||
|
||||
class wxImageList: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxImageList)
|
||||
|
||||
public:
|
||||
|
||||
wxImageList() { }
|
||||
wxImageList( int width, int height, bool mask = TRUE, int initialCount = 1 );
|
||||
~wxImageList();
|
||||
bool Create();
|
||||
int GetImageCount() const;
|
||||
int Add( const wxBitmap &bitmap );
|
||||
const wxBitmap *GetBitmap(int index) const;
|
||||
bool Replace( int index, const wxBitmap &bitmap );
|
||||
bool Remove( int index );
|
||||
bool RemoveAll();
|
||||
bool GetSize( int index, int &width, int &height ) const;
|
||||
bool Draw(int index, wxDC& dc, int x, int y,
|
||||
int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE );
|
||||
|
||||
private:
|
||||
|
||||
wxList m_images;
|
||||
int m_width;
|
||||
int m_height;
|
||||
};
|
||||
|
||||
#endif // __IMAGELISTH_G__
|
||||
|
532
include/wx/generic/info.xpm
Normal file
532
include/wx/generic/info.xpm
Normal file
@@ -0,0 +1,532 @@
|
||||
/* XPM */
|
||||
static char *info[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"48 48 478 2",
|
||||
" c Gray0",
|
||||
". c #010101010101",
|
||||
"X c #020202020202",
|
||||
"o c #050505050404",
|
||||
"O c Gray2",
|
||||
"+ c #080808080707",
|
||||
"@ c #090909090808",
|
||||
"# c #0b0b0b0b0909",
|
||||
"$ c #0b0b0b0b0b0b",
|
||||
"% c #0c0c0c0c0b0b",
|
||||
"& c #0d0d0d0d0a0a",
|
||||
"* c #0c0c0c0c0c0c",
|
||||
"= c #0f0f0e0e0c0c",
|
||||
"- c #0f0f0f0f0e0e",
|
||||
"; c Gray6",
|
||||
": c #101010100e0e",
|
||||
"> c #121212120f0f",
|
||||
", c #101010101010",
|
||||
"< c #121212121111",
|
||||
"1 c #131313131111",
|
||||
"2 c #131313131313",
|
||||
"3 c #141414141111",
|
||||
"4 c #141414141212",
|
||||
"5 c #161616161313",
|
||||
"6 c #161616161414",
|
||||
"7 c #1a1a1a1a1717",
|
||||
"8 c #1d1d1d1d1616",
|
||||
"9 c #191919191919",
|
||||
"0 c #1e1e1e1e1e1e",
|
||||
"q c #20201d1d1313",
|
||||
"w c #202020201c1c",
|
||||
"e c #212121211d1d",
|
||||
"r c #212120201e1e",
|
||||
"t c #232323231f1f",
|
||||
"y c #242421211919",
|
||||
"u c Gray15",
|
||||
"i c #272727272727",
|
||||
"p c #2a2a2a2a2727",
|
||||
"a c #282828282828",
|
||||
"s c #2a2a2a2a2a2a",
|
||||
"d c #2c2c2c2c2a2a",
|
||||
"f c #2f2f2f2f2929",
|
||||
"g c #2d2d2d2d2d2d",
|
||||
"h c Gray18",
|
||||
"j c #313131312b2b",
|
||||
"k c #303030302f2f",
|
||||
"l c #333333332f2f",
|
||||
"z c #353535352e2e",
|
||||
"x c #383835352626",
|
||||
"c c #3b3b37372424",
|
||||
"v c #333333333131",
|
||||
"b c Gray20",
|
||||
"n c #343434343434",
|
||||
"m c #353535353535",
|
||||
"M c #393937373232",
|
||||
"N c #383838383737",
|
||||
"B c #3d3d3d3d3535",
|
||||
"V c Gray23",
|
||||
"C c #3e3e3e3e3e3e",
|
||||
"Z c #42423f3f3636",
|
||||
"A c #434340403232",
|
||||
"S c #424242423a3a",
|
||||
"D c #434343433d3d",
|
||||
"F c #444444443b3b",
|
||||
"G c #474744443939",
|
||||
"H c #4f4f49493838",
|
||||
"J c #4d4d49493c3c",
|
||||
"K c #434343434242",
|
||||
"L c #434343434343",
|
||||
"P c #474747474242",
|
||||
"I c #464646464444",
|
||||
"U c #464646464646",
|
||||
"Y c Gray28",
|
||||
"T c #4b4b4b4b4444",
|
||||
"R c #4d4d4c4c4747",
|
||||
"E c #4e4e4e4e4545",
|
||||
"W c #494949494949",
|
||||
"Q c #4b4b4b4b4b4b",
|
||||
"! c #4e4e4e4e4e4e",
|
||||
"~ c #4f4f4f4f4e4e",
|
||||
"^ c #525252524848",
|
||||
"/ c #525252524949",
|
||||
"( c #555555554e4e",
|
||||
") c #565656564f4f",
|
||||
"_ c #5a5a59594c4c",
|
||||
"` c #5f5f5c5c4f4f",
|
||||
"' c Gray32",
|
||||
"] c Gray33",
|
||||
"[ c #585858585151",
|
||||
"{ c #585858585858",
|
||||
"} c #595959595858",
|
||||
"| c #5c5c5c5c5b5b",
|
||||
" . c #5f5f5e5e5959",
|
||||
".. c #6d6d66664d4d",
|
||||
"X. c #646461615959",
|
||||
"o. c #71716d6d5b5b",
|
||||
"O. c #797971715757",
|
||||
"+. c #626262626262",
|
||||
"@. c Gray39",
|
||||
"#. c #646464646464",
|
||||
"$. c #696969696464",
|
||||
"%. c #6d6d6d6d6464",
|
||||
"&. c #696969696868",
|
||||
"*. c #6b6b6b6b6a6a",
|
||||
"=. c #6d6d6d6d6d6d",
|
||||
"-. c #6f6f6f6f6f6f",
|
||||
";. c #73736f6f6161",
|
||||
":. c #707070706b6b",
|
||||
">. c #717171716f6f",
|
||||
",. c #757575756c6c",
|
||||
"<. c #797976766c6c",
|
||||
"1. c #7f7f7a7a6464",
|
||||
"2. c Gray45",
|
||||
"3. c #757575757171",
|
||||
"4. c #7b7b7b7b7a7a",
|
||||
"5. c #7b7b7b7b7b7b",
|
||||
"6. c #7f7f7f7f7b7b",
|
||||
"7. c Gray49",
|
||||
"8. c #818179795959",
|
||||
"9. c #808079795f5f",
|
||||
"0. c #8f8f82825555",
|
||||
"q. c #959588885757",
|
||||
"w. c #9b9b8c8c5a5a",
|
||||
"e. c #929289896363",
|
||||
"r. c #9d9d91916464",
|
||||
"t. c #a9a999995959",
|
||||
"y. c #abab9b9b5b5b",
|
||||
"u. c #b3b3a0a05e5e",
|
||||
"i. c #a9a9a0a07777",
|
||||
"p. c #aeaea4a47575",
|
||||
"a. c #b9b9a9a96464",
|
||||
"s. c #babaa8a86464",
|
||||
"d. c #b7b7aaaa7c7c",
|
||||
"f. c #c1c1aeae6767",
|
||||
"g. c #c4c4b2b26969",
|
||||
"h. c #c4c4b3b36b6b",
|
||||
"j. c #c6c6b3b36a6a",
|
||||
"k. c #c9c9b7b76d6d",
|
||||
"l. c #ccccb9b96e6e",
|
||||
"z. c #c1c1b3b37272",
|
||||
"x. c #c2c2b0b07171",
|
||||
"c. c #c6c6b6b67777",
|
||||
"v. c #cacab8b87171",
|
||||
"b. c #cdcdbcbc7070",
|
||||
"n. c #d1d1bcbc7070",
|
||||
"m. c #d1d1bfbf7373",
|
||||
"M. c #d1d1c0c07676",
|
||||
"N. c #d9d9c5c57777",
|
||||
"B. c #d9d9c6c67777",
|
||||
"V. c #dadac7c77777",
|
||||
"C. c #d9d9c6c67979",
|
||||
"Z. c #dbdbc7c77c7c",
|
||||
"A. c #dbdbc8c87878",
|
||||
"S. c #dbdbc9c97c7c",
|
||||
"D. c #dadac8c87e7e",
|
||||
"F. c #dbdbc9c97e7e",
|
||||
"G. c #e2e2cdcd7f7f",
|
||||
"H. c #e4e4d0d07e7e",
|
||||
"J. c #e4e4d0d07f7f",
|
||||
"K. c #e4e4d1d17e7e",
|
||||
"L. c #e6e6d2d27e7e",
|
||||
"P. c #818181818181",
|
||||
"I. c #838383838383",
|
||||
"U. c #848484848484",
|
||||
"Y. c Gray53",
|
||||
"T. c #898987878282",
|
||||
"R. c #8d8d8d8d8585",
|
||||
"E. c #8d8d8d8d8787",
|
||||
"W. c #929292928d8d",
|
||||
"Q. c #969696968e8e",
|
||||
"!. c #989895958585",
|
||||
"~. c #9b9b95958484",
|
||||
"^. c #929292929292",
|
||||
"/. c #939393939393",
|
||||
"(. c Gray58",
|
||||
"). c Gray60",
|
||||
"_. c #9d9d9d9d9999",
|
||||
"`. c #9e9e9e9e9a9a",
|
||||
"'. c #a2a29c9c8484",
|
||||
"]. c #b2b2b2b29b9b",
|
||||
"[. c #b8b8b0b09595",
|
||||
"{. c #a0a0a0a0a0a0",
|
||||
"}. c Gray63",
|
||||
"|. c #a5a5a5a5a5a5",
|
||||
" X c #a7a7a7a7a7a7",
|
||||
".X c #a9a9a9a9a4a4",
|
||||
"XX c #aeaeaeaea9a9",
|
||||
"oX c #babab6b6a9a9",
|
||||
"OX c #b3b3b3b3b0b0",
|
||||
"+X c #b3b3b3b3b1b1",
|
||||
"@X c #b4b4b4b4b2b2",
|
||||
"#X c #b4b4b4b4b4b4",
|
||||
"$X c #b6b6b6b6b6b6",
|
||||
"%X c #b9b9b9b9b1b1",
|
||||
"&X c Gray73",
|
||||
"*X c #bbbbbbbbbbbb",
|
||||
"=X c #bcbcbcbcb9b9",
|
||||
"-X c Gray75",
|
||||
";X c #c1c1b9b99999",
|
||||
":X c #c2c2bebeafaf",
|
||||
">X c #d7d7c4c48080",
|
||||
",X c #d8d8c7c78e8e",
|
||||
"<X c #dfdfcbcb8080",
|
||||
"1X c #dcdccbcb8484",
|
||||
"2X c #d7d7c8c89696",
|
||||
"3X c #c4c4c4c4b5b5",
|
||||
"4X c #c8c8c8c8b9b9",
|
||||
"5X c #cbcbcbcbbcbc",
|
||||
"6X c #dfdfd2d2a9a9",
|
||||
"7X c #e0e0cece8a8a",
|
||||
"8X c #e3e3d1d18686",
|
||||
"9X c #e7e7d1d18080",
|
||||
"0X c #e5e5d1d18787",
|
||||
"qX c #e7e7d4d48080",
|
||||
"wX c #e5e5d4d48d8d",
|
||||
"eX c #e6e6d6d68c8c",
|
||||
"rX c #eeeed6d68181",
|
||||
"tX c #efefd7d78282",
|
||||
"yX c #e8e8d6d68b8b",
|
||||
"uX c #e8e8d4d48d8d",
|
||||
"iX c #ececd7d78c8c",
|
||||
"pX c #efefd8d88181",
|
||||
"aX c #efefd8d88282",
|
||||
"sX c #efefd9d98686",
|
||||
"dX c #eeeedbdb8b8b",
|
||||
"fX c #eeeedada8d8d",
|
||||
"gX c #efefdada8e8e",
|
||||
"hX c #efefdcdc8b8b",
|
||||
"jX c #efefdddd8f8f",
|
||||
"kX c #eaeadada9191",
|
||||
"lX c #e9e9dada9696",
|
||||
"zX c #ededd9d99090",
|
||||
"xX c #efefdddd9292",
|
||||
"cX c #efefdddd9393",
|
||||
"vX c #ebebdbdb9999",
|
||||
"bX c #f1f1dcdc8686",
|
||||
"nX c #f3f3dede8787",
|
||||
"mX c #f4f4dede8787",
|
||||
"MX c #f2f2dcdc8a8a",
|
||||
"NX c #f3f3dfdf8d8d",
|
||||
"BX c #f0f0dcdc9191",
|
||||
"VX c #f1f1dcdc9292",
|
||||
"CX c #f0f0dfdf9292",
|
||||
"ZX c #f0f0dddd9c9c",
|
||||
"AX c #f1f1dfdfa1a1",
|
||||
"SX c #f1f1e0e08e8e",
|
||||
"DX c #f6f6e3e38f8f",
|
||||
"FX c #f7f7e5e58f8f",
|
||||
"GX c #f2f2e0e09090",
|
||||
"HX c #f2f2e0e09393",
|
||||
"JX c #f3f3e0e09393",
|
||||
"KX c #f3f3e2e29090",
|
||||
"LX c #f1f1e1e19595",
|
||||
"PX c #f2f2e0e09797",
|
||||
"IX c #f3f3e2e29595",
|
||||
"UX c #f3f3e2e29696",
|
||||
"YX c #f4f4e1e19191",
|
||||
"TX c #f5f5e1e19090",
|
||||
"RX c #f5f5e3e39191",
|
||||
"EX c #f5f5e2e29393",
|
||||
"WX c #f5f5e3e39393",
|
||||
"QX c #f4f4e3e39595",
|
||||
"!X c #f6f6e5e59191",
|
||||
"~X c #f6f6e4e49393",
|
||||
"^X c #f6f6e5e59393",
|
||||
"/X c #f7f7e4e49393",
|
||||
"(X c #f7f7e6e69191",
|
||||
")X c #f6f6e4e49696",
|
||||
"_X c #f7f7e6e69595",
|
||||
"`X c #f6f6e6e69797",
|
||||
"'X c #f1f1e1e19b9b",
|
||||
"]X c #f2f2e2e29a9a",
|
||||
"[X c #f4f4e2e29898",
|
||||
"{X c #f6f6e4e49898",
|
||||
"}X c #f6f6e4e49999",
|
||||
"|X c #f6f6e5e59b9b",
|
||||
" o c #f4f4e4e49d9d",
|
||||
".o c #f5f5e4e49c9c",
|
||||
"Xo c #f6f6e5e59d9d",
|
||||
"oo c #f7f7e6e69f9f",
|
||||
"Oo c #f8f8e6e69191",
|
||||
"+o c #f8f8e7e79191",
|
||||
"@o c #f8f8e7e79393",
|
||||
"#o c #f8f8e7e79595",
|
||||
"$o c #f8f8e7e79696",
|
||||
"%o c #f9f9e8e89b9b",
|
||||
"&o c #f9f9e9e99b9b",
|
||||
"*o c #f9f9e8e89e9e",
|
||||
"=o c #edede7e7baba",
|
||||
"-o c #f1f1e3e3a4a4",
|
||||
";o c #f3f3e3e3a7a7",
|
||||
":o c #f2f2e4e4a1a1",
|
||||
">o c #f3f3e4e4a1a1",
|
||||
",o c #f3f3e6e6a3a3",
|
||||
"<o c #f4f4e5e5a0a0",
|
||||
"1o c #f5f5e4e4a3a3",
|
||||
"2o c #f5f5e7e7a2a2",
|
||||
"3o c #f6f6e6e6a0a0",
|
||||
"4o c #f7f7e7e7a0a0",
|
||||
"5o c #f7f7e7e7a5a5",
|
||||
"6o c #f6f6e7e7a7a7",
|
||||
"7o c #f1f1e6e6adad",
|
||||
"8o c #f3f3e6e6adad",
|
||||
"9o c #f3f3e7e7adad",
|
||||
"0o c #f7f7e8e8a6a6",
|
||||
"qo c #f7f7e8e8a7a7",
|
||||
"wo c #f7f7eaeaafaf",
|
||||
"eo c #f9f9e9e9a7a7",
|
||||
"ro c #fafaeaeaa6a6",
|
||||
"to c #f8f8e8e8a9a9",
|
||||
"yo c #f8f8eaeaaeae",
|
||||
"uo c #f8f8eaeaafaf",
|
||||
"io c #fafaececafaf",
|
||||
"po c #f4f4e7e7b2b2",
|
||||
"ao c #f5f5e7e7b2b2",
|
||||
"so c #f4f4e7e7bbbb",
|
||||
"do c #f7f7ebebb1b1",
|
||||
"fo c #f4f4e9e9bbbb",
|
||||
"go c #f6f6ebebbebe",
|
||||
"ho c #f8f8ebebb1b1",
|
||||
"jo c #f9f9ebebb1b1",
|
||||
"ko c #fafaededb7b7",
|
||||
"lo c #f8f8ececb8b8",
|
||||
"zo c #f8f8ececb9b9",
|
||||
"xo c #f8f8ededbaba",
|
||||
"co c #fafaeeeebbbb",
|
||||
"vo c #c2c2c2c2c1c1",
|
||||
"bo c #c3c3c3c3c1c1",
|
||||
"no c Gray76",
|
||||
"mo c #c3c3c3c3c2c2",
|
||||
"Mo c #c7c7c7c7c5c5",
|
||||
"No c #cacacacac4c4",
|
||||
"Bo c Gray79",
|
||||
"Vo c #cacacacacaca",
|
||||
"Co c #cbcbcbcbcbcb",
|
||||
"Zo c #cfcfcfcfc8c8",
|
||||
"Ao c Gray80",
|
||||
"So c #cfcfcfcfcece",
|
||||
"Do c #d8d8d8d8cdcd",
|
||||
"Fo c #ddddd9d9caca",
|
||||
"Go c #d4d4d4d4d1d1",
|
||||
"Ho c #d7d7d7d7d3d3",
|
||||
"Jo c #d5d5d5d5d5d5",
|
||||
"Ko c Gray85",
|
||||
"Lo c #dadadadad8d8",
|
||||
"Po c #dadadadadada",
|
||||
"Io c gainsboro",
|
||||
"Uo c #dddddddddddd",
|
||||
"Yo c #dededededddd",
|
||||
"To c #dfdfdfdfdede",
|
||||
"Ro c #e0e0e0e0d7d7",
|
||||
"Eo c #e5e5e5e5dddd",
|
||||
"Wo c #f3f3eaeac1c1",
|
||||
"Qo c #f4f4e9e9c1c1",
|
||||
"!o c #f5f5e9e9c2c2",
|
||||
"~o c #f4f4e9e9c4c4",
|
||||
"^o c #f7f7eeeec3c3",
|
||||
"/o c #f4f4eaeac9c9",
|
||||
"(o c #f4f4eaeacaca",
|
||||
")o c #f9f9efefcbcb",
|
||||
"_o c #f8f8efefcfcf",
|
||||
"`o c #f7f7efefd0d0",
|
||||
"'o c #f7f7eeeed9d9",
|
||||
"]o c #f7f7efefd8d8",
|
||||
"[o c #f9f9f0f0c7c7",
|
||||
"{o c #fafaf3f3d0d0",
|
||||
"}o c #fafaf2f2d2d2",
|
||||
"|o c #fafaf2f2d3d3",
|
||||
" O c #f8f8f1f1dbdb",
|
||||
".O c #f9f9f1f1dbdb",
|
||||
"XO c #f8f8f2f2dbdb",
|
||||
"oO c #f9f9f2f2dbdb",
|
||||
"OO c #fafaf3f3dada",
|
||||
"+O c #fafaf3f3dbdb",
|
||||
"@O c #f8f8f1f1dcdc",
|
||||
"#O c #f8f8f2f2dede",
|
||||
"$O c #fafaf4f4d9d9",
|
||||
"%O c #fafaf5f5dede",
|
||||
"&O c #e7e7e7e7e1e1",
|
||||
"*O c #e4e4e4e4e4e4",
|
||||
"=O c #e9e9e9e9e2e2",
|
||||
"-O c #ebebebebe6e6",
|
||||
";O c Gray91",
|
||||
":O c #edededede8e8",
|
||||
">O c #ecececececec",
|
||||
",O c Gray93",
|
||||
"<O c #efefefefeeee",
|
||||
"1O c #efefefefefef",
|
||||
"2O c #f1f1f1f1ecec",
|
||||
"3O c #f2f2f2f2eeee",
|
||||
"4O c #fafaf3f3e5e5",
|
||||
"5O c #f9f9f4f4e0e0",
|
||||
"6O c #f9f9f4f4e2e2",
|
||||
"7O c #f9f9f4f4e3e3",
|
||||
"8O c #f9f9f5f5e3e3",
|
||||
"9O c #fafaf4f4e1e1",
|
||||
"0O c #f9f9f4f4e5e5",
|
||||
"qO c #f9f9f5f5e4e4",
|
||||
"wO c #f9f9f5f5e5e5",
|
||||
"eO c #f9f9f4f4e6e6",
|
||||
"rO c #f9f9f4f4e7e7",
|
||||
"tO c #f9f9f5f5e6e6",
|
||||
"yO c #f9f9f6f6e5e5",
|
||||
"uO c #f9f9f6f6e7e7",
|
||||
"iO c #fafaf5f5e4e4",
|
||||
"pO c #fafaf5f5e5e5",
|
||||
"aO c #fafaf5f5e6e6",
|
||||
"sO c #fafaf5f5e7e7",
|
||||
"dO c #fbfbf5f5e6e6",
|
||||
"fO c #fafaf6f6e6e6",
|
||||
"gO c #fafaf6f6e7e7",
|
||||
"hO c #fbfbf6f6e7e7",
|
||||
"jO c #f9f9f6f6eaea",
|
||||
"kO c #fafaf5f5e8e8",
|
||||
"lO c #fafaf6f6e8e8",
|
||||
"zO c #fafaf6f6e9e9",
|
||||
"xO c #fafaf7f7eaea",
|
||||
"cO c #fafaf7f7ebeb",
|
||||
"vO c #fbfbf7f7eaea",
|
||||
"bO c #fbfbf7f7ecec",
|
||||
"nO c #fbfbf7f7eded",
|
||||
"mO c #fafaf8f8ecec",
|
||||
"MO c #fbfbf8f8eded",
|
||||
"NO c #fbfbf8f8eeee",
|
||||
"BO c #fbfbf9f9efef",
|
||||
"VO c Gray94",
|
||||
"CO c #f1f1f1f1f1f1",
|
||||
"ZO c #f4f4f4f4f0f0",
|
||||
"AO c #f4f4f4f4f1f1",
|
||||
"SO c #f5f5f5f5f2f2",
|
||||
"DO c #f6f6f6f6f3f3",
|
||||
"FO c #f4f4f4f4f4f4",
|
||||
"GO c Gray96",
|
||||
"HO c #f6f6f6f6f4f4",
|
||||
"JO c #f7f7f7f7f5f5",
|
||||
"KO c #f6f6f6f6f6f6",
|
||||
"LO c Gray97",
|
||||
"PO c #f8f8f8f8f5f5",
|
||||
"IO c #f8f8f8f8f6f6",
|
||||
"UO c #f8f8f8f8f7f7",
|
||||
"YO c #f9f9f9f9f7f7",
|
||||
"TO c #fafaf9f9f4f4",
|
||||
"RO c #fafafafaf6f6",
|
||||
"EO c #fbfbfbfbf7f7",
|
||||
"WO c #fefefcfcf0f0",
|
||||
"QO c #fefefcfcf1f1",
|
||||
"!O c #fefefcfcf3f3",
|
||||
"~O c #fefefcfcf4f4",
|
||||
"^O c #fefefcfcf5f5",
|
||||
"/O c #fefefdfdf5f5",
|
||||
"(O c #fefefdfdf6f6",
|
||||
")O c #fefefdfdf7f7",
|
||||
"_O c #f9f9f9f9f8f8",
|
||||
"`O c #f9f9f9f9f9f9",
|
||||
"'O c #fafafafaf8f8",
|
||||
"]O c #fafafafaf9f9",
|
||||
"[O c #fbfbfbfbf8f8",
|
||||
"{O c #fbfbfbfbf9f9",
|
||||
"}O c Gray98",
|
||||
"|O c #fbfbfbfbfafa",
|
||||
" + c #fbfbfbfbfbfb",
|
||||
".+ c #fcfcfcfcf9f9",
|
||||
"X+ c #fcfcfcfcfafa",
|
||||
"o+ c #fcfcfcfcfbfb",
|
||||
"O+ c #fefefdfdf8f8",
|
||||
"++ c #fefefdfdf9f9",
|
||||
"@+ c #fefefdfdfafa",
|
||||
"#+ c #fefefdfdfbfb",
|
||||
"$+ c #fefefefefafa",
|
||||
"%+ c #fefefefefbfb",
|
||||
"&+ c Gray99",
|
||||
"*+ c #fdfdfdfdfcfc",
|
||||
"=+ c #fdfdfdfdfdfd",
|
||||
"-+ c #fefefefefcfc",
|
||||
";+ c #fefefefefdfd",
|
||||
":+ c #fefefefefefe",
|
||||
">+ c Gray100",
|
||||
",+ c None",
|
||||
/* pixels */
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+,+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+(O>+>+>+>+>+>+>+>+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+QOO+>+>+>+>+>+>+>+++!OO+>+>+>+>+>+>+>+>+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+++/O$+>+>+>+>+>+>+>+(O(O/O>+>+>+>+>+>+>+>+>+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+$+)OO+>+>+>+>+>+>+%+$+++O+>+>+>+>+>+>+>+>+>+>+>+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+O+++++-+>+>+>+>+;+-+;+-+@+>+>+>+>+>+>+)O>+>+>+>+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+@+;+;+-+>+>+>+>+;+:+:+;+%+>+>+>+>+%+/O~O>+>+>+>+>+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+-+;+:+:+:+>+>+:+:+:+:+:+:+>+;+-+++++)O$+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+,+>+>+>+/OQO++>+>+>+>+>+>+;+:+:+:+:+:+:+:+:+:+:+:+:+:+;+-+-+;+++%+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+,+>+>+>+)O~O/O)O@+;+>+>+>+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+;+@+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+>+>+>+>+>+$+)O#+;+;+;+:+:+:+:+:+:+COVoCoCo,O:+:+:+:+:+:+:+:+;+;+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+>+>+>+>+>+>+++-+:+:+:+:+:+:+,O).Q 2 h M Z y a +.no}O:+:+:+:+:+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+-+:+:+:+:+:+nog ;.7XjX[XYXJXiX,Xd.w.` $X:+:+:+:+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+;+;+:+:+:+}.0 :XVXTX5oyoeo#o$o.ovXG.>Xr I.`O:+:+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+:+:+:+no0 FosXgXuo[o%O{oro*o@o/XcX0X6X} /.:+:+:+:+;+;+%+@+/OQO",
|
||||
",+,+,+,+,+,+,+>+>+>+(O!O(OO+@+-+;+:+:+}OY oX1omXpo8OfOMOBOmOOO&o+oDXxX<X2Xb Bo:+:+:+:+;+-+O+(O>+",
|
||||
",+,+,+,+,+,+,+>+>+>+WO~O)O@+-+;+:+:+:+#X] ZXNXoo_opO6OhOsOzOfOko%oOoRXyXn.'.' :+:+:+:+;+%+%+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+++)O$+;+:+:+:+:+U.!.rXEXto9OgO6OqO6OtOsO^o4o(XFXSXA.c.p Po:+:+:+;+;+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+>+>+-+%+;+:+:+:+#.;XaX}XxoiOpOdOaO.O7OXOgo3oOoOoKXH.f.X.{.:+:+:+:+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+:+:+:+:+#.;XpX{XxoqOlOlOwO6O#O`o!o<o_X_XIXL.j.<.5.:+:+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+:+:+:+@.[.pXEXxosONOcOyOjO5O/odo2o`X|XHXqXl.O.(.:+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+;+:+:+:+P.T.BX)XwopObOuOkOnOcolo(o,o^X~XGXK.g...|.:+:+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+-+:+:+:+-XU zXMX0o$ONO OrO)oioao=o]X!XWXhXB.y.q Jo:+:+:+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+>+>+>+EOX+&+&+*+`O-.~.bXXo|ovO0O4Ozo6o9o-oQXRXkXJ.b.8.! `O:+:+:+;+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+>+>+++[OX+&+&+*+*+YoC fXqo}oxOeO'o7o o:o'XCXwXF.N.a.H X:+:+:+:+;+-+>+>+>+",
|
||||
",+,+,+,+,+,+,+>+>+>+>+++(O++[O|Oo+&+*+*+=+u PXjo+O@O]o~o>oUXLXlXeXD.V.h.q.m FO:+:+:+:+;+$+%+>+>+",
|
||||
",+,+,+,+,+,+,+,+>+>+>+O+(OO+TO[O.+o+&+*+*OA nXhooOWoQo8o'XjXdX1XM.m.k.r.D }.:+:+:+:+;+-+++O+$+>+",
|
||||
",+,+,+,+,+,+,+,+>+>+>+)O++%+ROo+{OX+o+&+voJ tXfosoAX;oPXjX8XC.v.z.p.1.$ 7.}O:+:+:+;+-+@+O+)O^O>+",
|
||||
",+,+,+,+,+,+,+,+>+>+>+>+>+>+'O|Oo+*+=+=+%.< x ._ i.uX9XZ.S.s.0.c = W *X:+:+>+>+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+>+>+>+>+>+_O]Oo+&+*+=+z _.@X<OLo$.8 e.x.u.t.G +.IoGO:+:+:+>+>+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+>+>+>+>+>+YO'O|Oo+&+`Oo 6 ( R.GoKONo[ R 9.o.s Ko*+*+:+:+:+>+>+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+,+>+>+>+>+IOYO]O|Oo+{ t Mo.XB 1 E.bo4.| & V &X*+*+*+:+:+;+>+>+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+,+>+>+>+>+HOIOYOVO|O9 ^ Ho=+LOZof P >.3.; >O&+&+&+&+:+:+-+>+>+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+>+>+>+AOHOIO>OVO + f Q.To ++X:.~ S L =+=+=+o+o+:+:+%+>+>+>+>+>+>+>+>+>+>+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+>+>+3OAOHO;O9 =XXXT - W.^.-.&.4 Y.*+*+*+X+[O;+;+@+>+>+>+>+>+>+>+>+>+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+>+>+:O3OAOHO ,.moVOVO%X/ I 6.=.O LO&+o+o+o+'O++@+O+%+>+>+>+>+>+>+>+>+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+>+Eo:O3OAO F v OX1OSo&.K ) i + +|O|O|O]O>+%+(O@+>+>+>+>+>+>+>+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+5XEo-O2O* 5 > f d `.-.*. n ]O]O]O'O'O_O>+>+++O+>+>+>+>+>+>+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].5XRo-OAo : e w N &.2. UOYOYOYOUOIOPO>+>+>+>+>+>+>+>+>+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].Do&O3 @ 5 1 # j l k , JOJOJOHOHODOSO>+>+>+>+>+>+>+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].5XE . 3 7 % : PoUoAOAOAOAOZO3O3O>+>+>+>+>+>+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].X X . X * -O:O2O2O2O2O2O:O-O-O>+>+>+>+,+,+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].3X4XDoRoRo=O=O=O=O=ORoRoDo>+>+,+,+,+,+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].5X5X5X5X5X].].].,+,+,+,+,+,+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
|
||||
",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+"
|
||||
};
|
190
include/wx/generic/laywin.h
Normal file
190
include/wx/generic/laywin.h
Normal file
@@ -0,0 +1,190 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: laywin.h
|
||||
// Purpose: Implements a simple layout algorithm, plus
|
||||
// wxSashLayoutWindow which is an example of a window with
|
||||
// layout-awareness (via event handlers). This is suited to
|
||||
// IDE-style window layout.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_LAYWIN_H_G_
|
||||
#define _WX_LAYWIN_H_G_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "laywin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/sashwin.h"
|
||||
|
||||
const wxEventType wxEVT_QUERY_LAYOUT_INFO = wxEVT_FIRST + 1500;
|
||||
const wxEventType wxEVT_CALCULATE_LAYOUT = wxEVT_FIRST + 1501;
|
||||
|
||||
enum wxLayoutOrientation {
|
||||
wxLAYOUT_HORIZONTAL,
|
||||
wxLAYOUT_VERTICAL
|
||||
};
|
||||
|
||||
enum wxLayoutAlignment {
|
||||
wxLAYOUT_NONE,
|
||||
wxLAYOUT_TOP,
|
||||
wxLAYOUT_LEFT,
|
||||
wxLAYOUT_RIGHT,
|
||||
wxLAYOUT_BOTTOM
|
||||
};
|
||||
|
||||
// Not sure this is necessary
|
||||
// Tell window which dimension we're sizing on
|
||||
#define wxLAYOUT_LENGTH_Y 0x0008
|
||||
#define wxLAYOUT_LENGTH_X 0x0000
|
||||
|
||||
// Use most recently used length
|
||||
#define wxLAYOUT_MRU_LENGTH 0x0010
|
||||
|
||||
// Only a query, so don't actually move it.
|
||||
#define wxLAYOUT_QUERY 0x0100
|
||||
|
||||
/*
|
||||
* This event is used to get information about window alignment,
|
||||
* orientation and size.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxQueryLayoutInfoEvent: public wxEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxQueryLayoutInfoEvent)
|
||||
public:
|
||||
|
||||
wxQueryLayoutInfoEvent(wxWindowID id = 0)
|
||||
{
|
||||
SetEventType(wxEVT_QUERY_LAYOUT_INFO);
|
||||
m_requestedLength = 0;
|
||||
m_flags = 0;
|
||||
m_id = id;
|
||||
m_alignment = wxLAYOUT_TOP;
|
||||
m_orientation = wxLAYOUT_HORIZONTAL;
|
||||
}
|
||||
|
||||
// Read by the app
|
||||
void SetRequestedLength(int length) { m_requestedLength = length; }
|
||||
int GetRequestedLength() const { return m_requestedLength; }
|
||||
|
||||
void SetFlags(int flags) { m_flags = flags; }
|
||||
int GetFlags() const { return m_flags; }
|
||||
|
||||
// Set by the app
|
||||
void SetSize(const wxSize& size) { m_size = size; }
|
||||
wxSize GetSize() const { return m_size; }
|
||||
|
||||
void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; }
|
||||
wxLayoutOrientation GetOrientation() const { return m_orientation; }
|
||||
|
||||
void SetAlignment(wxLayoutAlignment align) { m_alignment = align; }
|
||||
wxLayoutAlignment GetAlignment() const { return m_alignment; }
|
||||
|
||||
protected:
|
||||
int m_flags;
|
||||
int m_requestedLength;
|
||||
wxSize m_size;
|
||||
wxLayoutOrientation m_orientation;
|
||||
wxLayoutAlignment m_alignment;
|
||||
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&);
|
||||
|
||||
#define EVT_QUERY_LAYOUT_INFO(func) { wxEVT_QUERY_LAYOUT_INFO, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryLayoutInfoEventFunction) & func, NULL },
|
||||
|
||||
/*
|
||||
* This event is used to take a bite out of the available client area.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxCalculateLayoutEvent: public wxEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCalculateLayoutEvent)
|
||||
public:
|
||||
wxCalculateLayoutEvent(wxWindowID id = 0)
|
||||
{
|
||||
SetEventType(wxEVT_CALCULATE_LAYOUT);
|
||||
m_flags = 0;
|
||||
m_id = id;
|
||||
}
|
||||
// Read by the app
|
||||
inline void SetFlags(int flags) { m_flags = flags; }
|
||||
inline int GetFlags() const { return m_flags; }
|
||||
|
||||
// Set by the app
|
||||
inline void SetRect(const wxRect& rect) { m_rect = rect; }
|
||||
inline wxRect GetRect() const { return m_rect; }
|
||||
protected:
|
||||
int m_flags;
|
||||
wxRect m_rect;
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&);
|
||||
|
||||
#define EVT_CALCULATE_LAYOUT(func) { wxEVT_CALCULATE_LAYOUT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCalculateLayoutEventFunction) & func, NULL },
|
||||
|
||||
// This is window that can remember alignment/orientation, does its own layout,
|
||||
// and can provide sashes too. Useful for implementing docked windows with sashes in
|
||||
// an IDE-style interface.
|
||||
class WXDLLEXPORT wxSashLayoutWindow: public wxSashWindow
|
||||
{
|
||||
DECLARE_CLASS(wxSashLayoutWindow)
|
||||
public:
|
||||
wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow");
|
||||
|
||||
// Accessors
|
||||
inline wxLayoutAlignment GetAlignment() const { return m_alignment; };
|
||||
inline wxLayoutOrientation GetOrientation() const { return m_orientation; };
|
||||
|
||||
inline void SetAlignment(wxLayoutAlignment align) { m_alignment = align; };
|
||||
inline void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; };
|
||||
|
||||
// Give the window default dimensions
|
||||
inline void SetDefaultSize(const wxSize& size) { m_defaultSize = size; }
|
||||
|
||||
// Event handlers
|
||||
// Called by layout algorithm to allow window to take a bit out of the
|
||||
// client rectangle, and size itself if not in wxLAYOUT_QUERY mode.
|
||||
void OnCalculateLayout(wxCalculateLayoutEvent& event);
|
||||
|
||||
// Called by layout algorithm to retrieve information about the window.
|
||||
void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event);
|
||||
protected:
|
||||
wxLayoutAlignment m_alignment;
|
||||
wxLayoutOrientation m_orientation;
|
||||
wxSize m_defaultSize;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxMDIParentFrame;
|
||||
class WXDLLEXPORT wxFrame;
|
||||
|
||||
// This class implements the layout algorithm
|
||||
class WXDLLEXPORT wxLayoutAlgorithm: public wxObject
|
||||
{
|
||||
public:
|
||||
wxLayoutAlgorithm() {}
|
||||
|
||||
// The MDI client window is sized to whatever's left over.
|
||||
bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL);
|
||||
|
||||
// mainWindow is sized to whatever's left over. This function for backward
|
||||
// compatibility; use LayoutWindow.
|
||||
bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = (wxWindow*) NULL)
|
||||
{
|
||||
return LayoutWindow(frame, mainWindow);
|
||||
}
|
||||
|
||||
// mainWindow is sized to whatever's left over. This function for backward
|
||||
bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_LAYWIN_H_G_
|
652
include/wx/generic/listctrl.h
Normal file
652
include/wx/generic/listctrl.h
Normal file
@@ -0,0 +1,652 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listctrl.h
|
||||
// Purpose: Generic list control
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __LISTCTRLH_G__
|
||||
#define __LISTCTRLH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "listctrl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/generic/imaglist.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/scrolwin.h"
|
||||
#include "wx/settings.h"
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
class WXDLLEXPORT wxDropTarget;
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListItem;
|
||||
class WXDLLEXPORT wxListEvent;
|
||||
class WXDLLEXPORT wxListCtrl;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// internal classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListHeaderData;
|
||||
class WXDLLEXPORT wxListItemData;
|
||||
class WXDLLEXPORT wxListLineData;
|
||||
|
||||
class WXDLLEXPORT wxListHeaderWindow;
|
||||
class WXDLLEXPORT wxListMainWindow;
|
||||
|
||||
class WXDLLEXPORT wxListRenameTimer;
|
||||
//class wxListTextCtrl;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// types
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// type of compare function for wxListCtrl sort operation
|
||||
typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListCtrl flags
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define wxLC_ICON 0x0004
|
||||
#define wxLC_SMALL_ICON 0x0008
|
||||
#define wxLC_LIST 0x0010
|
||||
#define wxLC_REPORT 0x0020
|
||||
#define wxLC_ALIGN_TOP 0x0040
|
||||
#define wxLC_ALIGN_LEFT 0x0080
|
||||
#define wxLC_AUTOARRANGE 0x0100 // not supported in wxGLC
|
||||
#define wxLC_USER_TEXT 0x0200 // not supported in wxGLC (how does it work?)
|
||||
#define wxLC_EDIT_LABELS 0x0400
|
||||
#define wxLC_NO_HEADER 0x0800 // not supported in wxGLC
|
||||
#define wxLC_NO_SORT_HEADER 0x1000 // not supported in wxGLC
|
||||
#define wxLC_SINGLE_SEL 0x2000
|
||||
#define wxLC_SORT_ASCENDING 0x4000
|
||||
#define wxLC_SORT_DESCENDING 0x8000 // not supported in wxGLC
|
||||
|
||||
#define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
|
||||
#define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
|
||||
#define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)
|
||||
|
||||
// Omitted because (a) too much detail (b) not enough style flags
|
||||
// #define wxLC_NO_SCROLL
|
||||
// #define wxLC_NO_LABEL_WRAP
|
||||
// #define wxLC_OWNERDRAW_FIXED
|
||||
// #define wxLC_SHOW_SEL_ALWAYS
|
||||
|
||||
// Mask flags to tell app/GUI what fields of wxListItem are valid
|
||||
#define wxLIST_MASK_STATE 0x0001
|
||||
#define wxLIST_MASK_TEXT 0x0002
|
||||
#define wxLIST_MASK_IMAGE 0x0004
|
||||
#define wxLIST_MASK_DATA 0x0008
|
||||
#define wxLIST_SET_ITEM 0x0010
|
||||
#define wxLIST_MASK_WIDTH 0x0020
|
||||
#define wxLIST_MASK_FORMAT 0x0040
|
||||
|
||||
// State flags for indicating the state of an item
|
||||
#define wxLIST_STATE_DONTCARE 0x0000
|
||||
#define wxLIST_STATE_DROPHILITED 0x0001 // not supported in wxGLC
|
||||
#define wxLIST_STATE_FOCUSED 0x0002
|
||||
#define wxLIST_STATE_SELECTED 0x0004
|
||||
#define wxLIST_STATE_CUT 0x0008 // not supported in wxGLC
|
||||
|
||||
// Hit test flags, used in HitTest // wxGLC suppots 20 and 80
|
||||
#define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area.
|
||||
#define wxLIST_HITTEST_BELOW 0x0002 // Below the client area.
|
||||
#define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
|
||||
#define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
|
||||
#define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
|
||||
#define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
|
||||
#define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
|
||||
#define wxLIST_HITTEST_TOLEFT 0x0400 // To the right of the client area.
|
||||
#define wxLIST_HITTEST_TORIGHT 0x0800 // To the left of the client area.
|
||||
|
||||
#define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL | wxLIST_HITTEST_ONITEMSTATEICON)
|
||||
|
||||
|
||||
|
||||
// Flags for GetNextItem // always wxLIST_NEXT_ALL in wxGLC
|
||||
enum {
|
||||
wxLIST_NEXT_ABOVE, // Searches for an item above the specified item
|
||||
wxLIST_NEXT_ALL, // Searches for subsequent item by index
|
||||
wxLIST_NEXT_BELOW, // Searches for an item below the specified item
|
||||
wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item
|
||||
wxLIST_NEXT_RIGHT // Searches for an item to the right of the specified item
|
||||
};
|
||||
|
||||
// Alignment flags for Arrange // always wxLIST_ALIGN_LEFT in wxGLC
|
||||
enum {
|
||||
wxLIST_ALIGN_DEFAULT,
|
||||
wxLIST_ALIGN_LEFT,
|
||||
wxLIST_ALIGN_TOP,
|
||||
wxLIST_ALIGN_SNAP_TO_GRID
|
||||
};
|
||||
|
||||
// Column format // always wxLIST_FORMAT_LEFT in wxGLC
|
||||
enum {
|
||||
wxLIST_FORMAT_LEFT,
|
||||
wxLIST_FORMAT_RIGHT,
|
||||
wxLIST_FORMAT_CENTRE,
|
||||
wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE
|
||||
};
|
||||
|
||||
// Autosize values for SetColumnWidth
|
||||
enum {
|
||||
wxLIST_AUTOSIZE = -1, // always 80 in wxGLC (what else?)
|
||||
wxLIST_AUTOSIZE_USEHEADER = -2
|
||||
};
|
||||
|
||||
// Flag values for GetItemRect
|
||||
enum {
|
||||
wxLIST_RECT_BOUNDS,
|
||||
wxLIST_RECT_ICON,
|
||||
wxLIST_RECT_LABEL
|
||||
};
|
||||
|
||||
// Flag values for FindItem // not supported by wxGLC
|
||||
enum {
|
||||
wxLIST_FIND_UP,
|
||||
wxLIST_FIND_DOWN,
|
||||
wxLIST_FIND_LEFT,
|
||||
wxLIST_FIND_RIGHT
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListItem
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListItem: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListItem)
|
||||
|
||||
public:
|
||||
long m_mask; // Indicates what fields are valid
|
||||
long m_itemId; // The zero-based item position
|
||||
int m_col; // Zero-based column, if in report mode
|
||||
long m_state; // The state of the item
|
||||
long m_stateMask; // Which flags of m_state are valid (uses same flags)
|
||||
wxString m_text; // The label/header text
|
||||
int m_image; // The zero-based index into an image list
|
||||
long m_data; // App-defined data
|
||||
wxColour *m_colour; // only wxGLC, not supported by Windows ;->
|
||||
|
||||
// For columns only
|
||||
int m_format; // left, right, centre
|
||||
int m_width; // width of column
|
||||
|
||||
wxListItem(void);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListEvent
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListEvent: public wxNotifyEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListEvent)
|
||||
|
||||
public:
|
||||
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||
|
||||
int m_code;
|
||||
long m_itemIndex;
|
||||
long m_oldItemIndex;
|
||||
int m_col;
|
||||
bool m_cancelled;
|
||||
wxPoint m_pointDrag;
|
||||
|
||||
wxListItem m_item;
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
|
||||
|
||||
#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_LIST_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListItemData (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListItemData : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListItemData);
|
||||
|
||||
public:
|
||||
wxString m_text;
|
||||
int m_image;
|
||||
long m_data;
|
||||
int m_xpos,m_ypos;
|
||||
int m_width,m_height;
|
||||
wxColour *m_colour;
|
||||
|
||||
public:
|
||||
wxListItemData(void);
|
||||
wxListItemData( const wxListItem &info );
|
||||
void SetItem( const wxListItem &info );
|
||||
void SetText( const wxString &s );
|
||||
void SetImage( int image );
|
||||
void SetData( long data );
|
||||
void SetPosition( int x, int y );
|
||||
void SetSize( int width, int height );
|
||||
void SetColour( wxColour *col );
|
||||
bool HasImage(void) const;
|
||||
bool HasText(void) const;
|
||||
bool IsHit( int x, int y ) const;
|
||||
void GetText( wxString &s );
|
||||
int GetX( void ) const;
|
||||
int GetY( void ) const;
|
||||
int GetWidth(void) const;
|
||||
int GetHeight(void) const;
|
||||
int GetImage(void) const;
|
||||
void GetItem( wxListItem &info );
|
||||
wxColour *GetColour(void);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListHeaderData (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListHeaderData : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListHeaderData);
|
||||
|
||||
protected:
|
||||
long m_mask;
|
||||
int m_image;
|
||||
wxString m_text;
|
||||
int m_format;
|
||||
int m_width;
|
||||
int m_xpos,m_ypos;
|
||||
int m_height;
|
||||
|
||||
public:
|
||||
wxListHeaderData(void);
|
||||
wxListHeaderData( const wxListItem &info );
|
||||
void SetItem( const wxListItem &item );
|
||||
void SetPosition( int x, int y );
|
||||
void SetWidth( int w );
|
||||
void SetFormat( int format );
|
||||
void SetHeight( int h );
|
||||
bool HasImage(void) const;
|
||||
bool HasText(void) const;
|
||||
bool IsHit( int x, int y ) const;
|
||||
void GetItem( wxListItem &item );
|
||||
void GetText( wxString &s );
|
||||
int GetImage(void) const;
|
||||
int GetWidth(void) const;
|
||||
int GetFormat(void) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListLineData (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListLineData : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListLineData);
|
||||
|
||||
public:
|
||||
wxList m_items;
|
||||
wxRect m_bound_all;
|
||||
wxRect m_bound_label;
|
||||
wxRect m_bound_icon;
|
||||
wxRect m_bound_hilight;
|
||||
int m_mode;
|
||||
bool m_hilighted;
|
||||
wxBrush *m_hilightBrush;
|
||||
int m_spacing;
|
||||
wxListMainWindow *m_owner;
|
||||
|
||||
void DoDraw( wxDC *dc, bool hilight, bool paintBG );
|
||||
|
||||
public:
|
||||
wxListLineData( void ) {};
|
||||
wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush );
|
||||
void CalculateSize( wxDC *dc, int spacing );
|
||||
void SetPosition( wxDC *dc, int x, int y, int window_width );
|
||||
void SetColumnPosition( int index, int x );
|
||||
void GetSize( int &width, int &height );
|
||||
void GetExtent( int &x, int &y, int &width, int &height );
|
||||
void GetLabelExtent( int &x, int &y, int &width, int &height );
|
||||
long IsHit( int x, int y );
|
||||
void InitItems( int num );
|
||||
void SetItem( int index, const wxListItem &info );
|
||||
void GetItem( int index, wxListItem &info );
|
||||
void GetText( int index, wxString &s );
|
||||
void SetText( int index, const wxString s );
|
||||
int GetImage( int index );
|
||||
void GetRect( wxRect &rect );
|
||||
void Hilight( bool on );
|
||||
void ReverseHilight( void );
|
||||
void DrawRubberBand( wxDC *dc, bool on );
|
||||
void Draw( wxDC *dc );
|
||||
bool IsInRect( int x, int y, const wxRect &rect );
|
||||
bool IsHilighted( void );
|
||||
void AssignRect( wxRect &dest, int x, int y, int width, int height );
|
||||
void AssignRect( wxRect &dest, const wxRect &source );
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListHeaderWindow (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListHeaderWindow : public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListHeaderWindow)
|
||||
|
||||
protected:
|
||||
wxListMainWindow *m_owner;
|
||||
wxCursor *m_currentCursor;
|
||||
wxCursor *m_resizeCursor;
|
||||
bool m_isDraging;
|
||||
int m_column;
|
||||
int m_minX;
|
||||
int m_currentX;
|
||||
|
||||
public:
|
||||
wxListHeaderWindow( void );
|
||||
~wxListHeaderWindow( void );
|
||||
wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = "columntitles" );
|
||||
void DoDrawRect( wxDC *dc, int x, int y, int w, int h );
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void DrawCurrent();
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
void OnSetFocus( wxFocusEvent &event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListRenameTimer (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListRenameTimer: public wxTimer
|
||||
{
|
||||
private:
|
||||
wxListMainWindow *m_owner;
|
||||
|
||||
public:
|
||||
wxListRenameTimer( wxListMainWindow *owner );
|
||||
void Notify();
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListTextCtrl (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListTextCtrl);
|
||||
|
||||
private:
|
||||
bool *m_accept;
|
||||
wxString *m_res;
|
||||
wxListMainWindow *m_owner;
|
||||
|
||||
public:
|
||||
wxListTextCtrl(void) {};
|
||||
wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
||||
bool *accept, wxString *res, wxListMainWindow *owner,
|
||||
const wxString &value = "",
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
int style = 0, const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = "wxListTextCtrlText" );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
void OnKillFocus( wxFocusEvent &event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListMainWindow (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListMainWindow);
|
||||
|
||||
public:
|
||||
long m_mode;
|
||||
wxList m_lines;
|
||||
wxList m_columns;
|
||||
wxListLineData *m_current;
|
||||
int m_visibleLines;
|
||||
wxBrush *m_hilightBrush;
|
||||
wxColour *m_hilightColour;
|
||||
int m_xScroll,m_yScroll;
|
||||
bool m_dirty;
|
||||
wxImageList *m_small_image_list;
|
||||
wxImageList *m_normal_image_list;
|
||||
int m_small_spacing;
|
||||
int m_normal_spacing;
|
||||
bool m_hasFocus;
|
||||
bool m_usedKeys;
|
||||
bool m_lastOnSame;
|
||||
wxTimer *m_renameTimer;
|
||||
// wxListTextCtrl *m_text;
|
||||
bool m_renameAccept;
|
||||
wxString m_renameRes;
|
||||
bool m_isCreated;
|
||||
int m_dragCount;
|
||||
|
||||
public:
|
||||
wxListMainWindow(void);
|
||||
wxListMainWindow( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = "listctrl" );
|
||||
~wxListMainWindow(void);
|
||||
void RefreshLine( wxListLineData *line );
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void HilightAll( bool on );
|
||||
void SendNotify( wxListLineData *line, wxEventType command );
|
||||
void FocusLine( wxListLineData *line );
|
||||
void UnfocusLine( wxListLineData *line );
|
||||
void SelectLine( wxListLineData *line );
|
||||
void DeselectLine( wxListLineData *line );
|
||||
void DeleteLine( wxListLineData *line );
|
||||
void RenameLine( wxListLineData *line, const wxString &newName );
|
||||
void StartLabelEdit( wxListLineData *line );
|
||||
void OnRenameTimer(void);
|
||||
void OnRenameAccept(void);
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
void MoveToFocus( void );
|
||||
void OnArrowChar( wxListLineData *newCurrent, bool shiftDown );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
void OnSetFocus( wxFocusEvent &event );
|
||||
void OnKillFocus( wxFocusEvent &event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void DrawImage( int index, wxDC *dc, int x, int y );
|
||||
void GetImageSize( int index, int &width, int &height );
|
||||
int GetIndexOfLine( const wxListLineData *line );
|
||||
int GetTextLength( wxString &s ); // should be const
|
||||
|
||||
void SetImageList( wxImageList *imageList, int which );
|
||||
void SetItemSpacing( int spacing, bool isSmall = FALSE );
|
||||
int GetItemSpacing( bool isSmall = FALSE );
|
||||
void SetColumn( int col, wxListItem &item );
|
||||
void SetColumnWidth( int col, int width );
|
||||
void GetColumn( int col, wxListItem &item );
|
||||
int GetColumnWidth( int vol );
|
||||
int GetColumnCount( void );
|
||||
int GetCountPerPage( void );
|
||||
void SetItem( wxListItem &item );
|
||||
void GetItem( wxListItem &item );
|
||||
void SetItemState( long item, long state, long stateMask );
|
||||
int GetItemState( long item, long stateMask );
|
||||
int GetItemCount( void );
|
||||
void GetItemRect( long index, wxRect &rect );
|
||||
bool GetItemPosition(long item, wxPoint& pos);
|
||||
int GetSelectedItemCount( void );
|
||||
void SetMode( long mode );
|
||||
long GetMode( void ) const;
|
||||
void CalculatePositions( void );
|
||||
void RealizeChanges(void);
|
||||
long GetNextItem( long item, int geometry, int state );
|
||||
void DeleteItem( long index );
|
||||
void DeleteAllItems( void );
|
||||
void DeleteColumn( int col );
|
||||
void DeleteEverything( void );
|
||||
void EnsureVisible( long index );
|
||||
long FindItem(long start, const wxString& str, bool partial = FALSE );
|
||||
long FindItem(long start, long data);
|
||||
long HitTest( int x, int y, int &flags );
|
||||
void InsertItem( wxListItem &item );
|
||||
// void AddItem( wxListItem &item );
|
||||
void InsertColumn( long col, wxListItem &item );
|
||||
// void AddColumn( wxListItem &item );
|
||||
void SortItems( wxListCtrlCompare fn, long data );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListCtrl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxListCtrl: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListCtrl);
|
||||
|
||||
public:
|
||||
|
||||
wxListCtrl(void);
|
||||
wxListCtrl( wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = "listctrl" )
|
||||
{
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
~wxListCtrl(void);
|
||||
bool Create( wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = "listctrl" );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
bool GetColumn( int col, wxListItem& item ) const;
|
||||
bool SetColumn( int col, wxListItem& item );
|
||||
int GetColumnWidth( int col ) const;
|
||||
bool SetColumnWidth( int col, int width);
|
||||
int GetCountPerPage(void) const; // not the same in wxGLC as in Windows, I think
|
||||
// wxText& GetEditControl(void) const; // not supported in wxGLC
|
||||
bool GetItem( wxListItem& info ) const;
|
||||
bool SetItem( wxListItem& info ) ;
|
||||
long SetItem( long index, int col, const wxString& label, int imageId = -1 );
|
||||
int GetItemState( long item, long stateMask ) const;
|
||||
bool SetItemState( long item, long state, long stateMask);
|
||||
bool SetItemImage( long item, int image, int selImage);
|
||||
wxString GetItemText( long item ) const;
|
||||
void SetItemText( long item, const wxString& str );
|
||||
long GetItemData( long item ) const;
|
||||
bool SetItemData( long item, long data );
|
||||
bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
|
||||
bool GetItemPosition( long item, wxPoint& pos ) const;
|
||||
bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
|
||||
int GetItemCount(void) const;
|
||||
int GetColumnCount(void) const;
|
||||
void SetItemSpacing( int spacing, bool isSmall = FALSE );
|
||||
int GetItemSpacing( bool isSmall ) const;
|
||||
int GetSelectedItemCount(void) const;
|
||||
// wxColour GetTextColour(void) const; // wxGLC has colours for every Item (see wxListItem)
|
||||
// void SetTextColour(const wxColour& col);
|
||||
long GetTopItem(void) const;
|
||||
void SetSingleStyle( long style, bool add = TRUE ) ;
|
||||
void SetWindowStyleFlag(long style);
|
||||
void RecreateWindow(void) {};
|
||||
long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const;
|
||||
wxImageList *GetImageList(int which) const;
|
||||
void SetImageList(wxImageList *imageList, int which) ;
|
||||
bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC
|
||||
void ClearAll();
|
||||
bool DeleteItem( long item );
|
||||
bool DeleteAllItems(void);
|
||||
bool DeleteAllColumns(void);
|
||||
bool DeleteColumn( int col );
|
||||
// wxText& Edit(long item) ; // not supported in wxGLC
|
||||
bool EnsureVisible( long item );
|
||||
long FindItem(long start, const wxString& str, bool partial = FALSE );
|
||||
long FindItem(long start, long data);
|
||||
long FindItem(long start, const wxPoint& pt, int direction); // not supported in wxGLC
|
||||
long HitTest(const wxPoint& point, int& flags);
|
||||
long InsertItem(wxListItem& info);
|
||||
long InsertItem(long index, const wxString& label);
|
||||
long InsertItem(long index, int imageIndex);
|
||||
long InsertItem(long index, const wxString& label, int imageIndex);
|
||||
long InsertColumn(long col, wxListItem& info);
|
||||
long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT,
|
||||
int width = -1);
|
||||
bool ScrollList(int dx, int dy);
|
||||
bool SortItems(wxListCtrlCompare fn, long data);
|
||||
bool Update(long item);
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
|
||||
// We have to hand down a few functions
|
||||
|
||||
void SetBackgroundColour( const wxColour &colour );
|
||||
void SetForegroundColour( const wxColour &colour );
|
||||
void SetFont( const wxFont &font );
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
void SetDropTarget( wxDropTarget *dropTarget )
|
||||
{ m_mainWin->SetDropTarget( dropTarget ); }
|
||||
wxDropTarget *GetDropTarget() const
|
||||
{ return m_mainWin->GetDropTarget(); }
|
||||
#endif
|
||||
|
||||
void SetCursor( const wxCursor &cursor )
|
||||
{ if (m_mainWin) m_mainWin->wxWindow::SetCursor( cursor); }
|
||||
wxColour GetBackgroundColour() const
|
||||
{ if (m_mainWin) return m_mainWin->GetBackgroundColour();
|
||||
else return wxColour(); }
|
||||
wxColour GetForegroundColour() const
|
||||
{ if (m_mainWin) return m_mainWin->GetForegroundColour();
|
||||
else return wxColour(); }
|
||||
bool PopupMenu( wxMenu *menu, int x, int y )
|
||||
{ return m_mainWin->PopupMenu( menu, x, y ); }
|
||||
void SetFocus()
|
||||
{ m_mainWin->SetFocus(); }
|
||||
|
||||
// implementation
|
||||
|
||||
// wxListTextCtrl m_textCtrl;
|
||||
wxImageList *m_imageListNormal;
|
||||
wxImageList *m_imageListSmall;
|
||||
wxImageList *m_imageListState; // what's that ?
|
||||
wxListHeaderWindow *m_headerWin;
|
||||
wxListMainWindow *m_mainWin;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // __LISTCTRLH_G__
|
56
include/wx/generic/msgdlgg.h
Normal file
56
include/wx/generic/msgdlgg.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msgdlgg.h
|
||||
// Purpose: Generic wxMessageDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MSGDLGH_G__
|
||||
#define __MSGDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "msgdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
// type is an 'or' (|) of wxOK, wxCANCEL, wxYES_NO
|
||||
// Returns wxYES/NO/OK/CANCEL
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxMessageBoxCaptionStr;
|
||||
|
||||
class WXDLLEXPORT wxGenericMessageDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericMessageDialog)
|
||||
|
||||
public:
|
||||
wxGenericMessageDialog(wxWindow *parent, const wxString& message,
|
||||
const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
void OnYes(wxCommandEvent& event);
|
||||
void OnNo(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
private:
|
||||
wxList m_buttons;
|
||||
int m_dialogStyle;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#if !defined( __WXMSW__ ) && !defined( __WXMAC__)
|
||||
#define wxMessageDialog wxGenericMessageDialog
|
||||
|
||||
int wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __MSGDLGH_G__
|
275
include/wx/generic/notebook.h
Normal file
275
include/wx/generic/notebook.h
Normal file
@@ -0,0 +1,275 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: notebook.h
|
||||
// Purpose: wxNotebook class (a.k.a. property sheet, tabbed dialog)
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_NOTEBOOK_H_
|
||||
#define _WX_NOTEBOOK_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "notebook.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/generic/tabg.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// fwd declarations
|
||||
class WXDLLEXPORT wxImageList;
|
||||
class WXDLLEXPORT wxWindow;
|
||||
|
||||
// array of notebook pages
|
||||
typedef wxWindow wxNotebookPage; // so far, any window can be a page
|
||||
WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// notebook events
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
||||
int nSel = -1, int nOldSel = -1)
|
||||
: wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; }
|
||||
|
||||
// accessors
|
||||
int GetSelection() const { return m_nSel; }
|
||||
int GetOldSelection() const { return m_nOldSel; }
|
||||
|
||||
void SetSelection(int sel) { m_nSel = sel; }
|
||||
void SetOldSelection(int oldSel) { m_nOldSel = oldSel; }
|
||||
|
||||
private:
|
||||
int m_nSel, // currently selected page
|
||||
m_nOldSel; // previously selected page
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebookEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNotebook
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxNotebook;
|
||||
|
||||
// This reuses wxTabView to draw the tabs.
|
||||
class WXDLLEXPORT wxNotebookTabView: public wxTabView
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
|
||||
public:
|
||||
wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
|
||||
~wxNotebookTabView(void);
|
||||
|
||||
// Called when a tab is activated
|
||||
virtual void OnTabActivate(int activateId, int deactivateId);
|
||||
|
||||
protected:
|
||||
wxNotebook* m_notebook;
|
||||
};
|
||||
|
||||
class wxNotebook : public wxControl
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// -----
|
||||
// default for dynamic class
|
||||
wxNotebook();
|
||||
// the same arguments as for wxControl (@@@ any special styles?)
|
||||
wxNotebook(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = "notebook");
|
||||
// Create() function
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = "notebook");
|
||||
// dtor
|
||||
~wxNotebook();
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
// get number of pages in the dialog
|
||||
int GetPageCount() const;
|
||||
|
||||
// Find the position of the wxNotebookPage, -1 if not found.
|
||||
int FindPagePosition(wxNotebookPage* page) const;
|
||||
|
||||
// set the currently selected page, return the index of the previously
|
||||
// selected one (or -1 on error)
|
||||
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
|
||||
int SetSelection(int nPage);
|
||||
// cycle thru the tabs
|
||||
void AdvanceSelection(bool bForward = TRUE);
|
||||
// get the currently selected page
|
||||
int GetSelection() const { return m_nSelection; }
|
||||
|
||||
// set/get the title of a page
|
||||
bool SetPageText(int nPage, const wxString& strText);
|
||||
wxString GetPageText(int nPage) const;
|
||||
|
||||
// image list stuff: each page may have an image associated with it. All
|
||||
// the images belong to an image list, so you have to
|
||||
// 1) create an image list
|
||||
// 2) associate it with the notebook
|
||||
// 3) set for each page it's image
|
||||
// associate image list with a control
|
||||
void SetImageList(wxImageList* imageList);
|
||||
// get pointer (may be NULL) to the associated image list
|
||||
wxImageList* GetImageList() const { return m_pImageList; }
|
||||
|
||||
// sets/returns item's image index in the current image list
|
||||
int GetPageImage(int nPage) const;
|
||||
bool SetPageImage(int nPage, int nImage);
|
||||
|
||||
// currently it's always 1 because wxGTK doesn't support multi-row
|
||||
// tab controls
|
||||
int GetRowCount() const;
|
||||
|
||||
// control the appearance of the notebook pages
|
||||
// set the size (the same for all pages)
|
||||
void SetPageSize(const wxSize& size);
|
||||
// set the padding between tabs (in pixels)
|
||||
void SetPadding(const wxSize& padding);
|
||||
|
||||
// Sets the size of the tabs (assumes all tabs are the same size)
|
||||
void SetTabSize(const wxSize& sz);
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
// remove one page from the notebook, and delete the page.
|
||||
bool DeletePage(int nPage);
|
||||
bool DeletePage(wxNotebookPage* page);
|
||||
// remove one page from the notebook, without deleting the page.
|
||||
bool RemovePage(int nPage);
|
||||
bool RemovePage(wxNotebookPage* page);
|
||||
// remove all pages
|
||||
bool DeleteAllPages();
|
||||
// adds a new page to the notebook (it will be deleted ny the notebook,
|
||||
// don't delete it yourself). If bSelect, this page becomes active.
|
||||
bool AddPage(wxNotebookPage *pPage,
|
||||
const wxString& strText,
|
||||
bool bSelect = FALSE,
|
||||
int imageId = -1);
|
||||
// the same as AddPage(), but adds it at the specified position
|
||||
bool InsertPage(int nPage,
|
||||
wxNotebookPage *pPage,
|
||||
const wxString& strText,
|
||||
bool bSelect = FALSE,
|
||||
int imageId = -1);
|
||||
// get the panel which represents the given page
|
||||
wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; }
|
||||
|
||||
// callbacks
|
||||
// ---------
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnSelChange(wxNotebookEvent& event);
|
||||
void OnSetFocus(wxFocusEvent& event);
|
||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||
|
||||
// base class virtuals
|
||||
// -------------------
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual void SetConstraintSizes(bool recurse = TRUE);
|
||||
virtual bool DoPhase(int nPhase);
|
||||
|
||||
// Implementation
|
||||
|
||||
// wxNotebook on Motif uses a generic wxTabView to implement itself.
|
||||
inline wxTabView *GetTabView() const { return m_tabView; }
|
||||
inline void SetTabView(wxTabView *v) { m_tabView = v; }
|
||||
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
virtual wxRect GetAvailableClientSize();
|
||||
|
||||
// Implementation: calculate the layout of the view rect
|
||||
// and resize the children if required
|
||||
bool RefreshLayout(bool force = TRUE);
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// helper functions
|
||||
void ChangePage(int nOldSel, int nSel); // change pages
|
||||
|
||||
wxImageList *m_pImageList; // we can have an associated image list
|
||||
wxArrayPages m_aPages; // array of pages
|
||||
|
||||
int m_nSelection; // the current selection (-1 if none)
|
||||
|
||||
wxTabView* m_tabView;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebook)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event macros
|
||||
// ----------------------------------------------------------------------------
|
||||
typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
|
||||
|
||||
// Because of name truncation!
|
||||
#if defined(__BORLANDC__) && defined(__WIN16__)
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NB_PAGE_CHANGED, \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NB_PAGE_CHANGING, \ \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#else
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_NOTEBOOK_H_
|
85
include/wx/generic/panelg.h
Normal file
85
include/wx/generic/panelg.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: panelg.h
|
||||
// Purpose: wxPanel: similar to wxWindows but is coloured as for a dialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PANELH_G__
|
||||
#define __PANELH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "panelg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
||||
|
||||
|
||||
class WXDLLEXPORT wxPanel : public wxWindow
|
||||
{
|
||||
public:
|
||||
wxPanel();
|
||||
|
||||
// Old-style constructor (no default values for coordinates to avoid
|
||||
// ambiguity with the new one)
|
||||
wxPanel(wxWindow *parent,
|
||||
int x, int y, int width, int height,
|
||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
Create(parent, -1, wxPoint(x, y), wxSize(width, height), style, name);
|
||||
}
|
||||
|
||||
// Constructor
|
||||
wxPanel(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
// Pseudo ctor
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
// Sends an OnInitDialog event, which in turns transfers data to
|
||||
// to the dialog via validators.
|
||||
virtual void InitDialog();
|
||||
|
||||
// implementation
|
||||
// responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// process a keyboard navigation message (Tab traversal)
|
||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||
|
||||
// set the focus to the first child if we get it
|
||||
void OnFocus(wxFocusEvent& event);
|
||||
|
||||
// called by wxWindow whenever it gets focus
|
||||
void SetLastFocus(long focus) { m_lastFocus = focus; }
|
||||
long GetLastFocus() const { return m_lastFocus; }
|
||||
|
||||
protected:
|
||||
// the child which had the focus last time this panel was activated
|
||||
long m_lastFocus;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPanel)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __PANELH_G__
|
66
include/wx/generic/printps.h
Normal file
66
include/wx/generic/printps.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: printps.h
|
||||
// Purpose: wxPostScriptPrinter, wxPostScriptPrintPreview
|
||||
// wxGenericPageSetupDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PRINTPSH__
|
||||
#define __PRINTPSH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "printps.h"
|
||||
#endif
|
||||
|
||||
#include "wx/prntbase.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Represents the printer: manages printing a wxPrintout object
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxPostScriptPrinter : public wxPrinterBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPostScriptPrinter)
|
||||
|
||||
public:
|
||||
wxPostScriptPrinter(wxPrintDialogData *data = (wxPrintDialogData *) NULL);
|
||||
virtual ~wxPostScriptPrinter();
|
||||
|
||||
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
|
||||
virtual wxDC* PrintDialog(wxWindow *parent);
|
||||
virtual bool Setup(wxWindow *parent);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPrintPreview: programmer creates an object of this class to preview a
|
||||
// wxPrintout.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxPostScriptPrintPreview : public wxPrintPreviewBase
|
||||
{
|
||||
DECLARE_CLASS(wxPostScriptPrintPreview)
|
||||
|
||||
public:
|
||||
wxPostScriptPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting = (wxPrintout *) NULL,
|
||||
wxPrintDialogData *data = (wxPrintDialogData *) NULL);
|
||||
wxPostScriptPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data);
|
||||
|
||||
virtual ~wxPostScriptPrintPreview();
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling();
|
||||
|
||||
private:
|
||||
void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);
|
||||
};
|
||||
|
||||
#endif
|
||||
// __PRINTPSH__
|
188
include/wx/generic/prntdlgg.h
Normal file
188
include/wx/generic/prntdlgg.h
Normal file
@@ -0,0 +1,188 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: prntdlgg.h
|
||||
// Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog,
|
||||
// wxGenericPageSetupDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PRINTDLGH_G_
|
||||
#define __PRINTDLGH_G_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "prntdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
#if wxUSE_POSTSCRIPT
|
||||
#include "wx/dcps.h"
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxTextCtrl;
|
||||
class WXDLLEXPORT wxButton;
|
||||
class WXDLLEXPORT wxCheckBox;
|
||||
class WXDLLEXPORT wxChoice;
|
||||
class WXDLLEXPORT wxStaticText;
|
||||
class WXDLLEXPORT wxRadioBox;
|
||||
class WXDLLEXPORT wxPrintSetupData;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// FIXME why all these enums start with 10 or 30?
|
||||
|
||||
enum
|
||||
{
|
||||
wxPRINTID_STATIC = 10,
|
||||
wxPRINTID_RANGE,
|
||||
wxPRINTID_FROM,
|
||||
wxPRINTID_TO,
|
||||
wxPRINTID_COPIES,
|
||||
wxPRINTID_PRINTTOFILE,
|
||||
wxPRINTID_SETUP
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
wxPRINTID_LEFTMARGIN = 30,
|
||||
wxPRINTID_RIGHTMARGIN,
|
||||
wxPRINTID_TOPMARGIN,
|
||||
wxPRINTID_BOTTOMMARGIN
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
wxPRINTID_PRINTCOLOUR = 10,
|
||||
wxPRINTID_ORIENTATION,
|
||||
wxPRINTID_COMMAND,
|
||||
wxPRINTID_OPTIONS,
|
||||
wxPRINTID_PAPERSIZE
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Simulated Print and Print Setup dialogs for non-Windows platforms (and
|
||||
// Windows using PostScript print/preview)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxGenericPrintDialog : public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
|
||||
|
||||
public:
|
||||
wxGenericPrintDialog(wxWindow *parent,
|
||||
wxPrintDialogData* data = (wxPrintDialogData*)NULL);
|
||||
wxGenericPrintDialog(wxWindow *parent, wxPrintData* data);
|
||||
|
||||
virtual ~wxGenericPrintDialog();
|
||||
|
||||
void OnSetup(wxCommandEvent& event);
|
||||
void OnRange(wxCommandEvent& event);
|
||||
void OnOK(wxCommandEvent& event);
|
||||
|
||||
virtual bool TransferDataFromWindow();
|
||||
virtual bool TransferDataToWindow();
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
#if wxUSE_POSTSCRIPT
|
||||
wxPrintData& GetPrintData()
|
||||
{ return m_printDialogData.GetPrintData(); }
|
||||
#endif // wxUSE_POSTSCRIPT
|
||||
|
||||
wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
||||
wxDC *GetPrintDC();
|
||||
|
||||
public:
|
||||
// wxStaticText* m_printerMessage;
|
||||
wxButton* m_setupButton;
|
||||
// wxButton* m_helpButton;
|
||||
wxRadioBox* m_rangeRadioBox;
|
||||
wxTextCtrl* m_fromText;
|
||||
wxTextCtrl* m_toText;
|
||||
wxTextCtrl* m_noCopiesText;
|
||||
wxCheckBox* m_printToFileCheckBox;
|
||||
// wxCheckBox* m_collateCopiesCheckBox;
|
||||
|
||||
wxPrintDialogData m_printDialogData;
|
||||
|
||||
protected:
|
||||
void Init(wxWindow *parent);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxGenericPrintSetupDialog : public wxDialog
|
||||
{
|
||||
DECLARE_CLASS(wxGenericPrintSetupDialog)
|
||||
|
||||
public:
|
||||
// There are no configuration options for the dialog, so we
|
||||
// just pass the wxPrintData object (no wxPrintSetupDialogData class needed)
|
||||
wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data);
|
||||
wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data);
|
||||
virtual ~wxGenericPrintSetupDialog();
|
||||
|
||||
void Init(wxPrintData* data);
|
||||
|
||||
virtual bool TransferDataFromWindow();
|
||||
virtual bool TransferDataToWindow();
|
||||
|
||||
wxChoice *CreatePaperTypeChoice(int* x, int* y);
|
||||
|
||||
public:
|
||||
wxRadioBox* m_orientationRadioBox;
|
||||
wxTextCtrl* m_printerCommandText;
|
||||
wxTextCtrl* m_printerOptionsText;
|
||||
wxCheckBox* m_colourCheckBox;
|
||||
wxChoice* m_paperTypeChoice;
|
||||
|
||||
#if wxUSE_POSTSCRIPT
|
||||
wxPrintData m_printData;
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
#endif // wxUSE_POSTSCRIPT
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog
|
||||
{
|
||||
DECLARE_CLASS(wxGenericPageSetupDialog)
|
||||
|
||||
public:
|
||||
wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL);
|
||||
virtual ~wxGenericPageSetupDialog();
|
||||
|
||||
virtual bool TransferDataFromWindow();
|
||||
virtual bool TransferDataToWindow();
|
||||
|
||||
void OnPrinter(wxCommandEvent& event);
|
||||
|
||||
wxChoice *CreatePaperTypeChoice(int* x, int* y);
|
||||
wxPageSetupData& GetPageSetupData() { return m_pageData; }
|
||||
|
||||
public:
|
||||
wxButton* m_printerButton;
|
||||
wxRadioBox* m_orientationRadioBox;
|
||||
wxTextCtrl* m_marginLeftText;
|
||||
wxTextCtrl* m_marginTopText;
|
||||
wxTextCtrl* m_marginRightText;
|
||||
wxTextCtrl* m_marginBottomText;
|
||||
wxChoice* m_paperTypeChoice;
|
||||
|
||||
static bool m_pageSetupDialogCancelled;
|
||||
|
||||
wxPageSetupData m_pageData;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __PRINTDLGH_G__
|
155
include/wx/generic/question.xpm
Normal file
155
include/wx/generic/question.xpm
Normal file
@@ -0,0 +1,155 @@
|
||||
/* XPM */
|
||||
static char *question[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"48 48 101 2",
|
||||
" c Gray0",
|
||||
". c Transparent",
|
||||
"X c #010101010101",
|
||||
"o c #000000000202",
|
||||
"O c #000001010202",
|
||||
"+ c #010101010202",
|
||||
"@ c #010102020303",
|
||||
"# c #020202020202",
|
||||
"$ c #020202020303",
|
||||
"% c Gray1",
|
||||
"& c #030305050707",
|
||||
"* c #040404040404",
|
||||
"= c #040404040606",
|
||||
"- c #070707070707",
|
||||
"; c #060607070808",
|
||||
": c #060608080a0a",
|
||||
"> c #060608080b0b",
|
||||
", c Gray3",
|
||||
"< c #0d0d0d0d0c0c",
|
||||
"1 c Gray6",
|
||||
"2 c #191915150d0d",
|
||||
"3 c Gray8",
|
||||
"4 c Gray10",
|
||||
"5 c #22221c1c1212",
|
||||
"6 c #393939393939",
|
||||
"7 c #2b2b3d3d6161",
|
||||
"8 c #353545456464",
|
||||
"9 c #65654f4f2424",
|
||||
"0 c #6b6b55552727",
|
||||
"q c #6e6e55552626",
|
||||
"w c #707056562727",
|
||||
"e c #717159592929",
|
||||
"r c #73735f5f3b3b",
|
||||
"t c #7c7c62622d2d",
|
||||
"y c #7f7f69694141",
|
||||
"u c Gray39",
|
||||
"i c #727272727272",
|
||||
"p c #737375757979",
|
||||
"a c Gray50",
|
||||
"s c #808063632d2d",
|
||||
"d c #828266662f2f",
|
||||
"f c #87876a6a3131",
|
||||
"g c #8c8c6d6d3131",
|
||||
"h c #929273733535",
|
||||
"j c #939374743535",
|
||||
"k c #949475753636",
|
||||
"l c #979777773737",
|
||||
"z c #99997a7a3b3b",
|
||||
"x c #9d9d7d7d3a3a",
|
||||
"c c #a2a27f7f3b3b",
|
||||
"v c #92927c7c5252",
|
||||
"b c #a6a682823c3c",
|
||||
"n c #a8a884843d3d",
|
||||
"m c #aaaa86863e3e",
|
||||
"M c #a6a687874848",
|
||||
"N c #a3a38e8e5555",
|
||||
"B c #a4a48b8b5a5a",
|
||||
"V c #b3b38d8d4040",
|
||||
"C c #b8b892924343",
|
||||
"Z c #b9b993934444",
|
||||
"A c #bebe95954444",
|
||||
"S c #bebe9b9b5353",
|
||||
"D c #bebea3a36363",
|
||||
"F c #bfbfa1a16a6a",
|
||||
"G c #bebea2a27272",
|
||||
"H c #c0c097974545",
|
||||
"J c #c3c39f9f5555",
|
||||
"K c #c3c39f9f5757",
|
||||
"L c #c9c9a4a45b5b",
|
||||
"P c #d2d2a6a64c4c",
|
||||
"I c #d2d2a6a64d4d",
|
||||
"U c #d8d8abab4e4e",
|
||||
"Y c #d8d8acac5858",
|
||||
"T c #d8d8acac5b5b",
|
||||
"R c #d8d8b1b15f5f",
|
||||
"E c #c3c3a4a46666",
|
||||
"W c #c6c6a7a76a6a",
|
||||
"Q c #c9c9acac7373",
|
||||
"! c #d2d2b0b06c6c",
|
||||
"~ c #d8d8b1b16363",
|
||||
"^ c #d8d8b1b16565",
|
||||
"/ c #dcdcb4b46363",
|
||||
"( c #d8d8b5b56e6e",
|
||||
") c #d8d8b6b66e6e",
|
||||
"_ c #dadab8b87272",
|
||||
"` c #ddddbcbc7474",
|
||||
"' c #d8d8baba7b7b",
|
||||
"] c #f7f7c3c35a5a",
|
||||
"[ c #f7f7c9c96d6d",
|
||||
"{ c #f7f7cfcf7e7e",
|
||||
"} c #aaaaaaaaaaaa",
|
||||
"| c #d8d8bebe8686",
|
||||
" . c #dcdcc4c49494",
|
||||
".. c #f7f7d4d48c8c",
|
||||
"X. c #f7f7d8d89999",
|
||||
"o. c #f7f7dcdca5a5",
|
||||
"O. c #f7f7dfdfafaf",
|
||||
"+. c #f7f7e2e2b8b8",
|
||||
"@. c #f7f7e5e5c0c0",
|
||||
"#. c Gray100",
|
||||
"$. c None",
|
||||
/* pixels */
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.< $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. c C U x b t $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U X.X.+.X.' ' ' S b $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ] O.@.X...] ] ] { ' R b q $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.< ] O.o.] n j j m ] ] { ) R b * $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$. D X.+.] k h ] ] [ R R s 1 $.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.< [ @.{ k o 7 @ K ] { U R b % $.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$. N ..O.U o 8 a a B ] [ R U b # #.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$. I { ] b 8 a #.#. B [ [ ) U d # } #.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$. ] { ] b a #.#.$. B ] ) ) U 9 % } #.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$. / R A d a #.$. E [ ' U b a } #.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$. a #.$. g ! | R U e + a } #.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$. : a #. Z ..| U A 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a a a - V [ | U U $ a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a #. ] ..( Y z . 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 0 J ._ Q F 2 3 a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. f ! ( L W y & a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. l ' ^ T G . p } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. H ' ~ T v = a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U | R U r a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. S ' U A X a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. M M b s ; } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 4 6 O a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. O > a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a i u a a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.5 , #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ` { ..A $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. { X.X.U # $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ....R A # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ..) U A # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. P R A w # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. + a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. , , , a a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
|
||||
"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$."
|
||||
};
|
214
include/wx/generic/sashwin.h
Normal file
214
include/wx/generic/sashwin.h
Normal file
@@ -0,0 +1,214 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: sashwin.h
|
||||
// Purpose: wxSashWindow implementation. A sash window has an optional
|
||||
// sash on each edge, allowing it to be dragged. An event
|
||||
// is generated when the sash is released.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SASHWIN_H_G_
|
||||
#define _WX_SASHWIN_H_G_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sashwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
#define wxSASH_DRAG_NONE 0
|
||||
#define wxSASH_DRAG_DRAGGING 1
|
||||
#define wxSASH_DRAG_LEFT_DOWN 2
|
||||
|
||||
enum wxSashEdgePosition {
|
||||
wxSASH_TOP = 0,
|
||||
wxSASH_RIGHT,
|
||||
wxSASH_BOTTOM,
|
||||
wxSASH_LEFT,
|
||||
wxSASH_NONE = 100
|
||||
};
|
||||
|
||||
/*
|
||||
* wxSashEdge represents one of the four edges of a window.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxSashEdge
|
||||
{
|
||||
public:
|
||||
wxSashEdge() { m_show = FALSE; m_border = FALSE; m_margin = 0; }
|
||||
|
||||
bool m_show; // Is the sash showing?
|
||||
bool m_border; // Do we draw a border?
|
||||
int m_margin; // The margin size
|
||||
};
|
||||
|
||||
/*
|
||||
* wxSashWindow flags
|
||||
*/
|
||||
|
||||
#define wxSW_3D 0x0004
|
||||
|
||||
/*
|
||||
* wxSashWindow allows any of its edges to have a sash which can be dragged
|
||||
* to resize the window. The actual content window will be created as a child
|
||||
* of wxSashWindow.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxSashWindow: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSashWindow)
|
||||
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Public API
|
||||
|
||||
// Default constructor
|
||||
wxSashWindow();
|
||||
|
||||
// Normal constructor
|
||||
wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow");
|
||||
~wxSashWindow();
|
||||
|
||||
// Set whether there's a sash in this position
|
||||
void SetSashVisible(wxSashEdgePosition edge, bool sash);
|
||||
|
||||
// Get whether there's a sash in this position
|
||||
inline bool GetSashVisible(wxSashEdgePosition edge) const { return m_sashes[edge].m_show; }
|
||||
|
||||
// Set whether there's a border in this position
|
||||
inline void SetSashBorder(wxSashEdgePosition edge, bool border) { m_sashes[edge].m_border = border; }
|
||||
|
||||
// Get whether there's a border in this position
|
||||
inline bool HasBorder(wxSashEdgePosition edge) const { return m_sashes[edge].m_border; }
|
||||
|
||||
// Get border size
|
||||
inline int GetEdgeMargin(wxSashEdgePosition edge) const { return m_sashes[edge].m_margin; }
|
||||
|
||||
// Sets the default sash border size
|
||||
inline void SetDefaultBorderSize(int width) { m_borderSize = width; }
|
||||
|
||||
// Gets the default sash border size
|
||||
inline int GetDefaultBorderSize() const { return m_borderSize; }
|
||||
|
||||
// Sets the addition border size between child and sash window
|
||||
inline void SetExtraBorderSize(int width) { m_extraBorderSize = width; }
|
||||
|
||||
// Gets the addition border size between child and sash window
|
||||
inline int GetExtraBorderSize() const { return m_extraBorderSize; }
|
||||
|
||||
virtual void SetMinimumSizeX(int min) { m_minimumPaneSizeX = min; }
|
||||
virtual void SetMinimumSizeY(int min) { m_minimumPaneSizeY = min; }
|
||||
virtual int GetMinimumSizeX() const { return m_minimumPaneSizeX; }
|
||||
virtual int GetMinimumSizeY() const { return m_minimumPaneSizeY; }
|
||||
|
||||
virtual void SetMaximumSizeX(int max) { m_maximumPaneSizeX = max; }
|
||||
virtual void SetMaximumSizeY(int max) { m_maximumPaneSizeY = max; }
|
||||
virtual int GetMaximumSizeX() const { return m_maximumPaneSizeX; }
|
||||
virtual int GetMaximumSizeY() const { return m_maximumPaneSizeY; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Implementation
|
||||
|
||||
// Paints the border and sash
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
// Handles mouse events
|
||||
void OnMouseEvent(wxMouseEvent& ev);
|
||||
|
||||
// Adjusts the panes
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
// Draws borders
|
||||
void DrawBorders(wxDC& dc);
|
||||
|
||||
// Draws the sashes
|
||||
void DrawSash(wxSashEdgePosition edge, wxDC& dc);
|
||||
|
||||
// Draws the sashes
|
||||
void DrawSashes(wxDC& dc);
|
||||
|
||||
// Draws the sash tracker (for whilst moving the sash)
|
||||
void DrawSashTracker(wxSashEdgePosition edge, int x, int y);
|
||||
|
||||
// Tests for x, y over sash
|
||||
wxSashEdgePosition SashHitTest(int x, int y, int tolerance = 2);
|
||||
|
||||
// Resizes subwindows
|
||||
void SizeWindows();
|
||||
|
||||
// Initialize colours
|
||||
void InitColours();
|
||||
|
||||
protected:
|
||||
wxSashEdge m_sashes[4];
|
||||
int m_dragMode;
|
||||
wxSashEdgePosition m_draggingEdge;
|
||||
int m_oldX;
|
||||
int m_oldY;
|
||||
int m_borderSize;
|
||||
int m_extraBorderSize;
|
||||
int m_firstX;
|
||||
int m_firstY;
|
||||
int m_minimumPaneSizeX;
|
||||
int m_minimumPaneSizeY;
|
||||
int m_maximumPaneSizeX;
|
||||
int m_maximumPaneSizeY;
|
||||
wxCursor* m_sashCursorWE;
|
||||
wxCursor* m_sashCursorNS;
|
||||
wxColour m_lightShadowColour;
|
||||
wxColour m_mediumShadowColour;
|
||||
wxColour m_darkShadowColour;
|
||||
wxColour m_hilightColour;
|
||||
wxColour m_faceColour;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#define wxEVT_SASH_DRAGGED (wxEVT_FIRST + 1200)
|
||||
|
||||
enum wxSashDragStatus
|
||||
{
|
||||
wxSASH_STATUS_OK,
|
||||
wxSASH_STATUS_OUT_OF_RANGE
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxSashEvent: public wxCommandEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSashEvent)
|
||||
|
||||
public:
|
||||
inline wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE) {
|
||||
m_eventType = (wxEventType) wxEVT_SASH_DRAGGED; m_id = id; m_edge = edge; }
|
||||
|
||||
inline void SetEdge(wxSashEdgePosition edge) { m_edge = edge; }
|
||||
inline wxSashEdgePosition GetEdge() const { return m_edge; }
|
||||
|
||||
//// The rectangle formed by the drag operation
|
||||
inline void SetDragRect(const wxRect& rect) { m_dragRect = rect; }
|
||||
inline wxRect GetDragRect() const { return m_dragRect; }
|
||||
|
||||
//// Whether the drag caused the rectangle to be reversed (e.g.
|
||||
//// dragging the top below the bottom)
|
||||
inline void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
|
||||
inline wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
|
||||
private:
|
||||
wxSashEdgePosition m_edge;
|
||||
wxRect m_dragRect;
|
||||
wxSashDragStatus m_dragStatus;
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
|
||||
|
||||
#define EVT_SASH_DRAGGED(id, fn) { wxEVT_SASH_DRAGGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSashEventFunction) & fn, NULL },
|
||||
#define EVT_SASH_DRAGGED_RANGE(id1, id2, fn) { wxEVT_SASH_DRAGGED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxSashEventFunction) & fn, NULL },
|
||||
|
||||
#endif
|
||||
// _WX_SASHWIN_H_G_
|
138
include/wx/generic/scrolwin.h
Normal file
138
include/wx/generic/scrolwin.h
Normal file
@@ -0,0 +1,138 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: scrolwin.h
|
||||
// Purpose: wxScrolledWindow class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SCROLWINH_G__
|
||||
#define __SCROLWINH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "scrolwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
||||
|
||||
class WXDLLEXPORT wxScrolledWindow: public wxWindow
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxScrolledWindow)
|
||||
|
||||
public:
|
||||
wxScrolledWindow(void);
|
||||
inline wxScrolledWindow(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHSCROLL|wxVSCROLL,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
inline ~wxScrolledWindow(void) {}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHSCROLL|wxVSCROLL,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
// Set client size
|
||||
// Should take account of scrollbars
|
||||
// virtual void SetClientSize(int width, int size);
|
||||
|
||||
// Is the window retained?
|
||||
// inline bool IsRetained(void) const;
|
||||
|
||||
// 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 );
|
||||
|
||||
// Physically scroll the window
|
||||
virtual void Scroll(int x_pos, int y_pos);
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
virtual void GetScrollUnitsPerPage(int *x_page, int *y_page) const;
|
||||
#endif
|
||||
|
||||
int GetScrollPageSize(int orient) const ;
|
||||
void SetScrollPageSize(int orient, int pageSize);
|
||||
|
||||
virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
|
||||
// Enable/disable Windows scrolling in either direction.
|
||||
// If TRUE, wxWindows scrolls the canvas and only a bit of
|
||||
// the canvas is invalidated; no Clear() is necessary.
|
||||
// If FALSE, the whole canvas is invalidated and a Clear() is
|
||||
// necessary. Disable for when the scroll increment is used
|
||||
// to actually scroll a non-constant distance
|
||||
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
|
||||
|
||||
// Get the view start
|
||||
virtual void ViewStart(int *x, int *y) const;
|
||||
|
||||
// Actual size in pixels when scrolling is taken into account
|
||||
virtual void GetVirtualSize(int *x, int *y) const;
|
||||
|
||||
// Set the scale factor, used in PrepareDC
|
||||
inline void SetScale(double xs, double ys) { m_scaleX = xs; m_scaleY = ys; }
|
||||
inline double GetScaleX() const { return m_scaleX; }
|
||||
inline double GetScaleY() const { return m_scaleY; }
|
||||
|
||||
virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const ;
|
||||
virtual void CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const ;
|
||||
|
||||
// Adjust the scrollbars
|
||||
virtual void AdjustScrollbars(void);
|
||||
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
// Override this function to draw the graphic.
|
||||
virtual void OnDraw(wxDC& WXUNUSED(dc)) {};
|
||||
|
||||
// Override this function if you don't want to have wxScrolledWindow
|
||||
// automatically change the origin according to the scroll position.
|
||||
virtual void PrepareDC(wxDC& dc);
|
||||
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// IMPLEMENTATION
|
||||
|
||||
// Calculate scroll increment
|
||||
virtual int CalcScrollInc(wxScrollEvent& event);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// PROTECTED DATA
|
||||
protected:
|
||||
int m_xScrollPixelsPerLine;
|
||||
int m_yScrollPixelsPerLine;
|
||||
bool m_xScrollingEnabled;
|
||||
bool m_yScrollingEnabled;
|
||||
int m_xScrollPosition;
|
||||
int m_yScrollPosition;
|
||||
int m_xScrollLines;
|
||||
int m_yScrollLines;
|
||||
int m_xScrollLinesPerPage;
|
||||
int m_yScrollLinesPerPage;
|
||||
double m_scaleX;
|
||||
double m_scaleY;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// INLINES
|
||||
|
||||
#endif
|
||||
// __SCROLWINH_G__
|
199
include/wx/generic/splitter.h
Normal file
199
include/wx/generic/splitter.h
Normal file
@@ -0,0 +1,199 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: splitter.h
|
||||
// Purpose: wxSplitterWindow class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SPLITTERH_G__
|
||||
#define __SPLITTERH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "splitter.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
#define WXSPLITTER_VERSION 1.0
|
||||
|
||||
#define wxSPLIT_HORIZONTAL 1
|
||||
#define wxSPLIT_VERTICAL 2
|
||||
|
||||
#define wxSPLIT_DRAG_NONE 0
|
||||
#define wxSPLIT_DRAG_DRAGGING 1
|
||||
#define wxSPLIT_DRAG_LEFT_DOWN 2
|
||||
|
||||
/*
|
||||
* wxSplitterWindow maintains one or two panes, with
|
||||
* an optional vertical or horizontal split which
|
||||
* can be used with the mouse or programmatically.
|
||||
*/
|
||||
|
||||
// TODO:
|
||||
// 1) Perhaps make the borders sensitive to dragging in order to create a split.
|
||||
// The MFC splitter window manages scrollbars as well so is able to
|
||||
// put sash buttons on the scrollbars, but we probably don't want to go down
|
||||
// this path.
|
||||
// 2) for wxWindows 2.0, we must find a way to set the WS_CLIPCHILDREN style
|
||||
// to prevent flickering. (WS_CLIPCHILDREN doesn't work in all cases so can't be
|
||||
// standard).
|
||||
|
||||
class WXDLLEXPORT wxSplitterWindow: public wxWindow
|
||||
{
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Public API
|
||||
|
||||
// Default constructor
|
||||
wxSplitterWindow();
|
||||
|
||||
// Normal constructor
|
||||
wxSplitterWindow(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_3D|wxCLIP_CHILDREN,
|
||||
const wxString& name = "splitter");
|
||||
~wxSplitterWindow();
|
||||
|
||||
// Gets the only or left/top pane
|
||||
wxWindow *GetWindow1() const { return m_windowOne; }
|
||||
|
||||
// Gets the right/bottom pane
|
||||
wxWindow *GetWindow2() const { return m_windowTwo; }
|
||||
|
||||
// Sets the split mode
|
||||
void SetSplitMode(int mode) { m_splitMode = mode; }
|
||||
|
||||
// Gets the split mode
|
||||
int GetSplitMode() const { return m_splitMode; };
|
||||
|
||||
// Initialize with one window
|
||||
void Initialize(wxWindow *window);
|
||||
|
||||
// Associates the given window with window 2, drawing the appropriate sash
|
||||
// and changing the split mode.
|
||||
// Does nothing and returns FALSE if the window is already split.
|
||||
// A sashPosition of 0 means choose a default sash position,
|
||||
// negative sashPosition specifies the size of right/lower pane as it's
|
||||
// absolute value rather than the size of left/upper pane.
|
||||
virtual bool SplitVertically(wxWindow *window1,
|
||||
wxWindow *window2,
|
||||
int sashPosition = 0);
|
||||
virtual bool SplitHorizontally(wxWindow *window1,
|
||||
wxWindow *window2,
|
||||
int sashPosition = 0);
|
||||
|
||||
// Removes the specified (or second) window from the view
|
||||
// Doesn't actually delete the window.
|
||||
bool Unsplit(wxWindow *toRemove = (wxWindow *) NULL);
|
||||
|
||||
// Replaces one of the windows with another one (neither old nor new
|
||||
// parameter should be NULL)
|
||||
bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew);
|
||||
|
||||
// Is the window split?
|
||||
bool IsSplit() const { return (m_windowTwo != NULL); }
|
||||
|
||||
// Sets the sash size
|
||||
void SetSashSize(int width) { m_sashSize = width; }
|
||||
|
||||
// Sets the border size
|
||||
void SetBorderSize(int width) { m_borderSize = width; }
|
||||
|
||||
// Gets the sash size
|
||||
int GetSashSize() const { return m_sashSize; }
|
||||
|
||||
// Gets the border size
|
||||
int GetBorderSize() const { return m_borderSize; }
|
||||
|
||||
// Set the sash position
|
||||
void SetSashPosition(int position, bool redaw = TRUE);
|
||||
|
||||
// Gets the sash position
|
||||
int GetSashPosition() const { return m_sashPosition; }
|
||||
|
||||
// If this is zero, we can remove panes by dragging the sash.
|
||||
void SetMinimumPaneSize(int min) { m_minimumPaneSize = min; }
|
||||
int GetMinimumPaneSize() const { return m_minimumPaneSize; }
|
||||
|
||||
// Called when the sash position is about to be changed, return
|
||||
// FALSE from here to prevent the change from taking place.
|
||||
// newSashPosition here is always positive or zero.
|
||||
virtual bool OnSashPositionChange(int newSashPosition);
|
||||
|
||||
// If the sash is moved to an extreme position, a subwindow
|
||||
// is removed from the splitter window, and the app is
|
||||
// notified. The app should delete or hide the window.
|
||||
virtual void OnUnsplit(wxWindow *removed) { removed->Show(FALSE); }
|
||||
|
||||
// Called when the sash is double-clicked.
|
||||
// The default behaviour is to remove the sash if the
|
||||
// minimum pane size is zero.
|
||||
virtual void OnDoubleClickSash(int x, int y);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Implementation
|
||||
|
||||
// Paints the border and sash
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
// Handles mouse events
|
||||
void OnMouseEvent(wxMouseEvent& ev);
|
||||
|
||||
// Adjusts the panes
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
// Draws borders
|
||||
void DrawBorders(wxDC& dc);
|
||||
|
||||
// Draws the sash
|
||||
void DrawSash(wxDC& dc);
|
||||
|
||||
// Draws the sash tracker (for whilst moving the sash)
|
||||
void DrawSashTracker(int x, int y);
|
||||
|
||||
// Tests for x, y over sash
|
||||
bool SashHitTest(int x, int y, int tolerance = 2);
|
||||
|
||||
// Resizes subwindows
|
||||
void SizeWindows();
|
||||
|
||||
// Initialize colours
|
||||
void InitColours();
|
||||
|
||||
protected:
|
||||
int m_splitMode;
|
||||
wxWindow* m_windowOne;
|
||||
wxWindow* m_windowTwo;
|
||||
int m_dragMode;
|
||||
int m_oldX;
|
||||
int m_oldY;
|
||||
int m_borderSize;
|
||||
int m_sashSize; // Sash width or height
|
||||
int m_sashPosition; // Number of pixels from left or top
|
||||
int m_firstX;
|
||||
int m_firstY;
|
||||
int m_minimumPaneSize;
|
||||
wxCursor* m_sashCursorWE;
|
||||
wxCursor* m_sashCursorNS;
|
||||
wxPen* m_sashTrackerPen;
|
||||
wxPen* m_lightShadowPen;
|
||||
wxPen* m_mediumShadowPen;
|
||||
wxPen* m_darkShadowPen;
|
||||
wxPen* m_hilightPen;
|
||||
wxBrush* m_faceBrush;
|
||||
wxPen* m_facePen;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxSplitterWindow)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __SPLITTERH_G__
|
94
include/wx/generic/statusbr.h
Normal file
94
include/wx/generic/statusbr.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: statusbr.h
|
||||
// Purpose: wxStatusBar class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __STATUSBRH_G__
|
||||
#define __STATUSBRH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "statusbr.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/pen.h"
|
||||
#include "wx/font.h"
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
||||
|
||||
class WXDLLEXPORT wxStatusBar: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStatusBar)
|
||||
|
||||
public:
|
||||
wxStatusBar(void);
|
||||
inline wxStatusBar(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxStatusBar();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
// Create status line
|
||||
virtual void SetFieldsCount(int number=1, const int widths[] = (const int *) NULL);
|
||||
inline int GetFieldsCount() const { return m_nFields; }
|
||||
|
||||
// Set status line text
|
||||
virtual void SetStatusText(const wxString& text, int number = 0);
|
||||
virtual wxString GetStatusText(int number = 0) const;
|
||||
|
||||
// Set status line widths
|
||||
virtual void SetStatusWidths(int n, const int widths_field[]);
|
||||
|
||||
virtual void DrawFieldText(wxDC& dc, int i);
|
||||
virtual void DrawField(wxDC& dc, int i);
|
||||
|
||||
// Get the position and size of the field's internal bounding rectangle
|
||||
virtual bool GetFieldRect(int i, wxRect& rect) const;
|
||||
|
||||
inline int GetBorderX() const { return m_borderX; }
|
||||
inline int GetBorderY() const { return m_borderY; }
|
||||
inline void SetBorderX(int x);
|
||||
inline void SetBorderY(int y);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Implementation
|
||||
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
virtual void InitColours();
|
||||
|
||||
// Responds to colour changes
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
protected:
|
||||
int * m_statusWidths;
|
||||
int m_nFields;
|
||||
wxString * m_statusStrings;
|
||||
int m_borderX;
|
||||
int m_borderY;
|
||||
wxFont m_defaultStatusBarFont;
|
||||
wxPen m_mediumShadowPen;
|
||||
wxPen m_hilightPen;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// __STATUSBRH_G__
|
351
include/wx/generic/tabg.h
Normal file
351
include/wx/generic/tabg.h
Normal file
@@ -0,0 +1,351 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: tabg.h
|
||||
// Purpose: Generic tabbed dialogs
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TABGH_G__
|
||||
#define __TABGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "tabg.h"
|
||||
#endif
|
||||
|
||||
#define WXTAB_VERSION 1.1
|
||||
|
||||
#include "wx/hash.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
class WXDLLEXPORT wxTabView;
|
||||
|
||||
/*
|
||||
* A wxTabControl is the internal and visual representation
|
||||
* of the tab.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxTabControl: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabControl)
|
||||
public:
|
||||
wxTabControl(wxTabView *v = (wxTabView *) NULL);
|
||||
~wxTabControl(void);
|
||||
|
||||
virtual void OnDraw(wxDC& dc, bool lastInRow);
|
||||
void SetLabel(const wxString& str) { m_controlLabel = str; }
|
||||
wxString GetLabel(void) const { return m_controlLabel; }
|
||||
|
||||
void SetFont(const wxFont& f) { m_labelFont = f; }
|
||||
wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; }
|
||||
|
||||
void SetSelected(bool sel) { m_isSelected = sel; }
|
||||
bool IsSelected(void) const { return m_isSelected; }
|
||||
|
||||
void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; }
|
||||
void SetSize(int x, int y) { m_width = x; m_height = y; }
|
||||
|
||||
void SetRowPosition(int r) { m_rowPosition = r; }
|
||||
int GetRowPosition() const { return m_rowPosition; }
|
||||
void SetColPosition(int c) { m_colPosition = c; }
|
||||
int GetColPosition() const { return m_colPosition; }
|
||||
|
||||
int GetX(void) const { return m_offsetX; }
|
||||
int GetY(void) const { return m_offsetY; }
|
||||
int GetWidth(void) const { return m_width; }
|
||||
int GetHeight(void) const { return m_height; }
|
||||
|
||||
int GetId(void) const { return m_id; }
|
||||
void SetId(int i) { m_id = i; }
|
||||
|
||||
virtual bool HitTest(int x, int y) const ;
|
||||
|
||||
protected:
|
||||
wxTabView* m_view;
|
||||
wxString m_controlLabel;
|
||||
bool m_isSelected;
|
||||
wxFont m_labelFont;
|
||||
int m_offsetX; // Offsets from top-left of tab view area (the area below the tabs)
|
||||
int m_offsetY;
|
||||
int m_width;
|
||||
int m_height;
|
||||
int m_id;
|
||||
int m_rowPosition; // Position in row from 0
|
||||
int m_colPosition; // Position in col from 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Each wxTabLayer is a list of tabs. E.g. there
|
||||
* are 3 layers in the MS Word Options dialog.
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxTabLayer: public wxList
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabLayer)
|
||||
};
|
||||
|
||||
/*
|
||||
* The wxTabView controls and draws the tabbed object
|
||||
*/
|
||||
|
||||
#define wxTAB_STYLE_DRAW_BOX 1 // Draws 3D boxes round tab layers
|
||||
#define wxTAB_STYLE_COLOUR_INTERIOR 2 // Colours interior of tabs, otherwise draws outline
|
||||
|
||||
class WXDLLEXPORT wxTabView: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabView)
|
||||
public:
|
||||
wxTabView(long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
|
||||
~wxTabView();
|
||||
|
||||
inline int GetNumberOfLayers() const { return m_layers.Number(); }
|
||||
inline wxList& GetLayers() { return m_layers; }
|
||||
|
||||
inline void SetWindow(wxWindow* wnd) { m_window = wnd; }
|
||||
inline wxWindow* GetWindow(void) const { return m_window; }
|
||||
|
||||
// Automatically positions tabs
|
||||
wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = (wxTabControl *) NULL);
|
||||
|
||||
// Remove the tab without deleting the window
|
||||
bool RemoveTab(int id);
|
||||
|
||||
void ClearTabs(bool deleteTabs = TRUE);
|
||||
|
||||
bool SetTabText(int id, const wxString& label);
|
||||
wxString GetTabText(int id) const;
|
||||
|
||||
// Layout tabs (optional, e.g. if resizing window)
|
||||
void Layout(void);
|
||||
|
||||
// Draw all tabs
|
||||
virtual void Draw(wxDC& dc);
|
||||
|
||||
// Process mouse event, return FALSE if we didn't process it
|
||||
virtual bool OnEvent(wxMouseEvent& event);
|
||||
|
||||
// Called when a tab is activated
|
||||
virtual void OnTabActivate(int activateId, int deactivateId);
|
||||
// Allows vetoing
|
||||
virtual bool OnTabPreActivate(int WXUNUSED(activateId), int WXUNUSED(deactivateId) ) { return TRUE; };
|
||||
|
||||
// Allows use of application-supplied wxTabControl classes.
|
||||
virtual wxTabControl *OnCreateTabControl(void) { return new wxTabControl(this); }
|
||||
|
||||
void SetHighlightColour(const wxColour& col);
|
||||
void SetShadowColour(const wxColour& col);
|
||||
void SetBackgroundColour(const wxColour& col);
|
||||
inline void SetTextColour(const wxColour& col) { m_textColour = col; }
|
||||
|
||||
inline wxColour GetHighlightColour(void) const { return m_highlightColour; }
|
||||
inline wxColour GetShadowColour(void) const { return m_shadowColour; }
|
||||
inline wxColour GetBackgroundColour(void) const { return m_backgroundColour; }
|
||||
inline wxColour GetTextColour(void) const { return m_textColour; }
|
||||
inline wxPen *GetHighlightPen(void) const { return m_highlightPen; }
|
||||
inline wxPen *GetShadowPen(void) const { return m_shadowPen; }
|
||||
inline wxPen *GetBackgroundPen(void) const { return m_backgroundPen; }
|
||||
inline wxBrush *GetBackgroundBrush(void) const { return m_backgroundBrush; }
|
||||
|
||||
inline void SetViewRect(const wxRect& rect) { m_tabViewRect = rect; }
|
||||
inline wxRect GetViewRect(void) const { return m_tabViewRect; }
|
||||
|
||||
// Calculate tab width to fit to view, and optionally adjust the view
|
||||
// to fit the tabs exactly.
|
||||
int CalculateTabWidth(int noTabs, bool adjustView = FALSE);
|
||||
|
||||
inline void SetTabStyle(long style) { m_tabStyle = style; }
|
||||
inline long GetTabStyle(void) const { return m_tabStyle; }
|
||||
|
||||
inline void SetTabSize(int w, int h) { m_tabWidth = w; m_tabHeight = h; }
|
||||
inline int GetTabWidth(void) const { return m_tabWidth; }
|
||||
inline int GetTabHeight(void) const { return m_tabHeight; }
|
||||
inline void SetTabSelectionHeight(int h) { m_tabSelectionHeight = h; }
|
||||
inline int GetTabSelectionHeight(void) const { return m_tabSelectionHeight; }
|
||||
|
||||
// Returns the total height of the tabs component -- this may be several
|
||||
// times the height of a tab, if there are several tab layers (rows).
|
||||
int GetTotalTabHeight();
|
||||
|
||||
inline int GetTopMargin(void) const { return m_topMargin; }
|
||||
inline void SetTopMargin(int margin) { m_topMargin = margin; }
|
||||
|
||||
void SetTabSelection(int sel, bool activateTool = TRUE);
|
||||
inline int GetTabSelection() const { return m_tabSelection; }
|
||||
|
||||
// Find tab control for id
|
||||
wxTabControl *FindTabControlForId(int id) const ;
|
||||
|
||||
// Find tab control for layer, position (starting from zero)
|
||||
wxTabControl *FindTabControlForPosition(int layer, int position) const ;
|
||||
|
||||
inline int GetHorizontalTabOffset() const { return m_tabHorizontalOffset; }
|
||||
inline int GetHorizontalTabSpacing() const { return m_tabHorizontalSpacing; }
|
||||
inline void SetHorizontalTabOffset(int sp) { m_tabHorizontalOffset = sp; }
|
||||
inline void SetHorizontalTabSpacing(int sp) { m_tabHorizontalSpacing = sp; }
|
||||
|
||||
inline void SetVerticalTabTextSpacing(int s) { m_tabVerticalTextSpacing = s; }
|
||||
inline int GetVerticalTabTextSpacing() const { return m_tabVerticalTextSpacing; }
|
||||
|
||||
inline wxFont *GetTabFont() const { return (wxFont*) & m_tabFont; }
|
||||
inline void SetTabFont(const wxFont& f) { m_tabFont = f; }
|
||||
|
||||
inline wxFont *GetSelectedTabFont() const { return (wxFont*) & m_tabSelectedFont; }
|
||||
inline void SetSelectedTabFont(const wxFont& f) { m_tabSelectedFont = f; }
|
||||
// Find the node and the column at which this control is positioned.
|
||||
wxNode *FindTabNodeAndColumn(wxTabControl *control, int *col) const ;
|
||||
|
||||
// Do the necessary to change to this tab
|
||||
virtual bool ChangeTab(wxTabControl *control);
|
||||
|
||||
// Move the selected tab to the bottom layer, if necessary,
|
||||
// without calling app activation code
|
||||
bool MoveSelectionTab(wxTabControl *control);
|
||||
|
||||
inline int GetNumberOfTabs() const { return m_noTabs; }
|
||||
|
||||
protected:
|
||||
// List of layers, from front to back.
|
||||
wxList m_layers;
|
||||
|
||||
// Selected tab
|
||||
int m_tabSelection;
|
||||
|
||||
// Usual tab height
|
||||
int m_tabHeight;
|
||||
|
||||
// The height of the selected tab
|
||||
int m_tabSelectionHeight;
|
||||
|
||||
// Usual tab width
|
||||
int m_tabWidth;
|
||||
|
||||
// Space between tabs
|
||||
int m_tabHorizontalSpacing;
|
||||
|
||||
// Space between top of normal tab and text
|
||||
int m_tabVerticalTextSpacing;
|
||||
|
||||
// Horizontal offset of each tab row above the first
|
||||
int m_tabHorizontalOffset;
|
||||
|
||||
// The distance between the bottom of the first tab row
|
||||
// and the top of the client area (i.e. the margin)
|
||||
int m_topMargin;
|
||||
|
||||
// The position and size of the view above which the tabs are placed.
|
||||
// I.e., the internal client area of the sheet.
|
||||
wxRect m_tabViewRect;
|
||||
|
||||
// Bitlist of styles
|
||||
long m_tabStyle;
|
||||
|
||||
// Colours
|
||||
wxColour m_highlightColour;
|
||||
wxColour m_shadowColour;
|
||||
wxColour m_backgroundColour;
|
||||
wxColour m_textColour;
|
||||
|
||||
// Pen and brush cache
|
||||
wxPen* m_highlightPen;
|
||||
wxPen* m_shadowPen;
|
||||
wxPen* m_backgroundPen;
|
||||
wxBrush* m_backgroundBrush;
|
||||
|
||||
wxFont m_tabFont;
|
||||
wxFont m_tabSelectedFont;
|
||||
|
||||
int m_noTabs;
|
||||
|
||||
wxWindow* m_window;
|
||||
};
|
||||
|
||||
/*
|
||||
* A dialog box class that is tab-friendly
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxTabbedDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabbedDialog)
|
||||
|
||||
public:
|
||||
|
||||
wxTabbedDialog(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr);
|
||||
~wxTabbedDialog(void);
|
||||
|
||||
inline wxTabView *GetTabView() const { return m_tabView; }
|
||||
inline void SetTabView(wxTabView *v) { m_tabView = v; }
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
protected:
|
||||
wxTabView* m_tabView;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
* A panel class that is tab-friendly
|
||||
*/
|
||||
|
||||
class WXDLLEXPORT wxTabbedPanel: public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabbedPanel)
|
||||
|
||||
public:
|
||||
|
||||
wxTabbedPanel(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long windowStyle = 0, const wxString& name = wxPanelNameStr);
|
||||
~wxTabbedPanel(void);
|
||||
|
||||
inline wxTabView *GetTabView() const { return m_tabView; }
|
||||
inline void SetTabView(wxTabView *v) { m_tabView = v; }
|
||||
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
protected:
|
||||
wxTabView* m_tabView;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxPanelTabView: public wxTabView
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPanelTabView)
|
||||
public:
|
||||
wxPanelTabView(wxPanel *pan, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
|
||||
~wxPanelTabView(void);
|
||||
|
||||
// Called when a tab is activated
|
||||
virtual void OnTabActivate(int activateId, int deactivateId);
|
||||
|
||||
// Specific to this class
|
||||
void AddTabWindow(int id, wxWindow *window);
|
||||
wxWindow *GetTabWindow(int id) const ;
|
||||
void ClearWindows(bool deleteWindows = TRUE);
|
||||
inline wxWindow *GetCurrentWindow() const { return m_currentWindow; }
|
||||
|
||||
void ShowWindowForTab(int id);
|
||||
inline wxList& GetWindows() const { return (wxList&) m_tabWindows; }
|
||||
|
||||
protected:
|
||||
// List of panels, one for each tab. Indexed
|
||||
// by tab ID.
|
||||
wxList m_tabWindows;
|
||||
wxWindow* m_currentWindow;
|
||||
wxPanel* m_panel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
51
include/wx/generic/textdlgg.h
Normal file
51
include/wx/generic/textdlgg.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: textdlgg.h
|
||||
// Purpose: wxStatusBar class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TEXTDLGH_G__
|
||||
#define __TEXTDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "textdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
// Handy dialog functions (will be converted into classes at some point)
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
||||
|
||||
#define wxID_TEXT 3000
|
||||
|
||||
class WXDLLEXPORT wxTextEntryDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTextEntryDialog)
|
||||
protected:
|
||||
long m_dialogStyle;
|
||||
wxString m_value;
|
||||
public:
|
||||
wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr,
|
||||
const wxString& value = wxEmptyString, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
inline void SetValue(const wxString& val) { m_value = val; }
|
||||
inline wxString GetValue(void) const { return m_value; }
|
||||
|
||||
void OnOK(wxCommandEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
wxString WXDLLEXPORT wxGetTextFromUser(const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr,
|
||||
const wxString& default_value = wxEmptyString, wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE);
|
||||
|
||||
#endif
|
||||
// __TEXTDLGH_G__
|
494
include/wx/generic/treectrl.h
Normal file
494
include/wx/generic/treectrl.h
Normal file
@@ -0,0 +1,494 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: treectrl.h
|
||||
// Purpose: wxTreeCtrl class
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1997,1998 Robert Roebling
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _GENERIC_TREECTRL_H_
|
||||
#define _GENERIC_TREECTRL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "treectrl.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WXMSW__
|
||||
WXDLLEXPORT_DATA(extern const char*) wxTreeCtrlNameStr;
|
||||
#else
|
||||
#define wxTreeCtrlNameStr "wxTreeCtrl"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/scrolwin.h"
|
||||
#include "wx/textctrl.h"
|
||||
#include "wx/pen.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// constants
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// values for the `flags' parameter of wxTreeCtrl::HitTest() which determine
|
||||
// where exactly the specified point is situated:
|
||||
static const int wxTREE_HITTEST_NOWHERE = 0x0004;
|
||||
// on the bitmap associated with an item.
|
||||
static const int wxTREE_HITTEST_ONITEMICON = 0x0020;
|
||||
// on the label (string) associated with an item.
|
||||
static const int wxTREE_HITTEST_ONITEMLABEL = 0x0080;
|
||||
// anywhere on the item
|
||||
static const int wxTREE_HITTEST_ONITEM = wxTREE_HITTEST_ONITEMICON |
|
||||
wxTREE_HITTEST_ONITEMLABEL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// forward declaration
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class wxImageList;
|
||||
class wxGenericTreeItem;
|
||||
|
||||
class wxTreeItemData;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// wxTreeItemId - unique identifier of a tree element
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxTreeItemId
|
||||
{
|
||||
friend class wxTreeCtrl;
|
||||
friend class wxTreeEvent;
|
||||
public:
|
||||
// ctors
|
||||
// 0 is invalid value for HTREEITEM
|
||||
wxTreeItemId() { m_pItem = 0; }
|
||||
|
||||
// default copy ctor/assignment operator are ok for us
|
||||
|
||||
// accessors
|
||||
// is this a valid tree item?
|
||||
bool IsOk() const { return m_pItem != 0; }
|
||||
|
||||
// deprecated: only for compatibility
|
||||
wxTreeItemId(long itemId) { m_pItem = (wxGenericTreeItem *)itemId; }
|
||||
operator long() const { return (long)m_pItem; }
|
||||
|
||||
//protected: // not for gcc
|
||||
// for wxTreeCtrl usage only
|
||||
wxTreeItemId(wxGenericTreeItem *pItem) { m_pItem = pItem; }
|
||||
|
||||
wxGenericTreeItem *m_pItem;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTreeItemData is some (arbitrary) user class associated with some item.
|
||||
//
|
||||
// Because the objects of this class are deleted by the tree, they should
|
||||
// always be allocated on the heap!
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxTreeItemData: public wxClientData
|
||||
{
|
||||
friend class wxTreeCtrl;
|
||||
public:
|
||||
// creation/destruction
|
||||
// --------------------
|
||||
// default ctor
|
||||
wxTreeItemData() { }
|
||||
|
||||
// default copy ctor/assignment operator are ok
|
||||
|
||||
// accessor: get the item associated with us
|
||||
const wxTreeItemId& GetId() const { return m_pItem; }
|
||||
void SetId(const wxTreeItemId& id) { m_pItem = id; }
|
||||
|
||||
protected:
|
||||
wxTreeItemId m_pItem;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// wxTreeEvent - the event generated by the tree control
|
||||
// -----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent
|
||||
{
|
||||
friend class wxTreeCtrl;
|
||||
public:
|
||||
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||
|
||||
// accessors
|
||||
// get the item on which the operation was performed or the newly
|
||||
// selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events
|
||||
wxTreeItemId GetItem() const { return m_item; }
|
||||
|
||||
// for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously
|
||||
// selected item
|
||||
wxTreeItemId GetOldItem() const { return m_itemOld; }
|
||||
|
||||
// the point where the mouse was when the drag operation started (for
|
||||
// wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only)
|
||||
wxPoint GetPoint() const { return m_pointDrag; }
|
||||
|
||||
// keyboard code (for wxEVT_COMMAND_TREE_KEY_DOWN only)
|
||||
int GetCode() const { return m_code; }
|
||||
|
||||
// set return code for wxEVT_COMMAND_TREE_ITEM_{EXPAND|COLLAPS}ING events
|
||||
// call this to forbid the change in item status
|
||||
void Veto() { m_code = TRUE; }
|
||||
|
||||
// for implementation usage only
|
||||
bool WasVetoed() const { return m_code; }
|
||||
|
||||
private:
|
||||
// @@ we could save some space by using union here
|
||||
int m_code;
|
||||
wxTreeItemId m_item,
|
||||
m_itemOld;
|
||||
wxPoint m_pointDrag;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros for handling tree control events
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// GetItem() returns the item being dragged, GetPoint() the mouse coords
|
||||
#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
// GetItem() returns the itme whose label is being edited
|
||||
#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
// provide/update information about GetItem() item
|
||||
#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
// GetItem() is the item being expanded/collapsed, the "ING" versions can use
|
||||
#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
|
||||
|
||||
// GetOldItem() is the item which had the selection previously, GetItem() is
|
||||
// the item which acquires selection
|
||||
#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
|
||||
#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
|
||||
|
||||
// GetCode() returns the key code
|
||||
// NB: this is the only message for which GetItem() is invalid (you may get the
|
||||
// item from GetSelection())
|
||||
#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
|
||||
|
||||
// GetItem() returns the item being deleted, the associated data (if any) will
|
||||
// be deleted just after the return of this event handler (if any)
|
||||
#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
// GetItem() returns the item that was activated (double click, enter, space)
|
||||
#define EVT_TREE_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// wxTreeCtrl - the tree control
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxTreeCtrl : public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
// creation
|
||||
// --------
|
||||
wxTreeCtrl() { Init(); }
|
||||
|
||||
wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||
const wxValidator &validator = wxDefaultValidator,
|
||||
const wxString& name = wxTreeCtrlNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxTreeCtrl();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||
const wxValidator &validator = wxDefaultValidator,
|
||||
const wxString& name = wxTreeCtrlNameStr);
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// get the total number of items in the control
|
||||
size_t GetCount() const;
|
||||
|
||||
// indent is the number of pixels the children are indented relative to
|
||||
// the parents position. SetIndent() also redraws the control
|
||||
// immediately.
|
||||
unsigned int GetIndent() const { return m_indent; }
|
||||
void SetIndent(unsigned int indent);
|
||||
|
||||
// spacing is the number of pixels between the start and the Text
|
||||
unsigned int GetSpacing() const { return m_spacing; }
|
||||
void SetSpacing(unsigned int spacing);
|
||||
|
||||
// image list: these functions allow to associate an image list with
|
||||
// the control and retrieve it. Note that the control does _not_ delete
|
||||
// the associated image list when it's deleted in order to allow image
|
||||
// lists to be shared between different controls.
|
||||
//
|
||||
// The normal image list is for the icons which correspond to the
|
||||
// normal tree item state (whether it is selected or not).
|
||||
// Additionally, the application might choose to show a state icon
|
||||
// which corresponds to an app-defined item state (for example,
|
||||
// checked/unchecked) which are taken from the state image list.
|
||||
wxImageList *GetImageList() const;
|
||||
wxImageList *GetStateImageList() const;
|
||||
|
||||
void SetImageList(wxImageList *imageList);
|
||||
void SetStateImageList(wxImageList *imageList);
|
||||
|
||||
// Functions to work with tree ctrl items.
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// retrieve items label
|
||||
wxString GetItemText(const wxTreeItemId& item) const;
|
||||
// get the normal item image
|
||||
int GetItemImage(const wxTreeItemId& item) const;
|
||||
// get the selected item image
|
||||
int GetItemSelectedImage(const wxTreeItemId& item) const;
|
||||
// get the data associated with the item
|
||||
wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
|
||||
|
||||
// modifiers
|
||||
// ---------
|
||||
|
||||
// set items label
|
||||
void SetItemText(const wxTreeItemId& item, const wxString& text);
|
||||
// set the normal item image
|
||||
void SetItemImage(const wxTreeItemId& item, int image);
|
||||
// set the selected item image
|
||||
void SetItemSelectedImage(const wxTreeItemId& item, int image);
|
||||
// associate some data with the item
|
||||
void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
|
||||
|
||||
// force appearance of [+] button near the item. This is useful to
|
||||
// allow the user to expand the items which don't have any children now
|
||||
// - but instead add them only when needed, thus minimizing memory
|
||||
// usage and loading time.
|
||||
void SetItemHasChildren(const wxTreeItemId& item, bool has = TRUE);
|
||||
|
||||
// the item will be shown in bold
|
||||
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
|
||||
|
||||
// item status inquiries
|
||||
// ---------------------
|
||||
|
||||
// is the item visible (it might be outside the view or not expanded)?
|
||||
bool IsVisible(const wxTreeItemId& item) const;
|
||||
// does the item has any children?
|
||||
bool HasChildren(const wxTreeItemId& item) const
|
||||
{ return ItemHasChildren(item); }
|
||||
bool ItemHasChildren(const wxTreeItemId& item) const;
|
||||
// is the item expanded (only makes sense if HasChildren())?
|
||||
bool IsExpanded(const wxTreeItemId& item) const;
|
||||
// is this item currently selected (the same as has focus)?
|
||||
bool IsSelected(const wxTreeItemId& item) const;
|
||||
// is item text in bold font?
|
||||
bool IsBold(const wxTreeItemId& item) const;
|
||||
|
||||
// number of children
|
||||
// ------------------
|
||||
|
||||
// if 'recursively' is FALSE, only immediate children count, otherwise
|
||||
// the returned number is the number of all items in this branch
|
||||
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = TRUE);
|
||||
|
||||
// navigation
|
||||
// ----------
|
||||
|
||||
// wxTreeItemId.IsOk() will return FALSE if there is no such item
|
||||
|
||||
// get the root tree item
|
||||
wxTreeItemId GetRootItem() const { return m_anchor; }
|
||||
|
||||
// get the item currently selected (may return NULL if no selection)
|
||||
wxTreeItemId GetSelection() const { return m_current; }
|
||||
|
||||
// get the parent of this item (may return NULL if root)
|
||||
wxTreeItemId GetParent(const wxTreeItemId& item) const;
|
||||
|
||||
// for this enumeration function you must pass in a "cookie" parameter
|
||||
// which is opaque for the application but is necessary for the library
|
||||
// to make these functions reentrant (i.e. allow more than one
|
||||
// enumeration on one and the same object simultaneously). Of course,
|
||||
// the "cookie" passed to GetFirstChild() and GetNextChild() should be
|
||||
// the same!
|
||||
|
||||
// get the first child of this item
|
||||
wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const;
|
||||
// get the next child
|
||||
wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
|
||||
// get the last child of this item - this method doesn't use cookies
|
||||
wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
|
||||
|
||||
// get the next sibling of this item
|
||||
wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
|
||||
// get the previous sibling
|
||||
wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
|
||||
|
||||
// get first visible item
|
||||
wxTreeItemId GetFirstVisibleItem() const;
|
||||
// get the next visible item: item must be visible itself!
|
||||
// see IsVisible() and wxTreeCtrl::GetFirstVisibleItem()
|
||||
wxTreeItemId GetNextVisible(const wxTreeItemId& item) const;
|
||||
// get the previous visible item: item must be visible itself!
|
||||
wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
|
||||
// add the root node to the tree
|
||||
wxTreeItemId AddRoot(const wxString& text,
|
||||
int image = -1, int selectedImage = -1,
|
||||
wxTreeItemData *data = NULL);
|
||||
|
||||
// insert a new item in as the first child of the parent
|
||||
wxTreeItemId PrependItem(const wxTreeItemId& parent,
|
||||
const wxString& text,
|
||||
int image = -1, int selectedImage = -1,
|
||||
wxTreeItemData *data = NULL);
|
||||
|
||||
// insert a new item after a given one
|
||||
wxTreeItemId InsertItem(const wxTreeItemId& parent,
|
||||
const wxTreeItemId& idPrevious,
|
||||
const wxString& text,
|
||||
int image = -1, int selectedImage = -1,
|
||||
wxTreeItemData *data = NULL);
|
||||
|
||||
// insert a new item in as the last child of the parent
|
||||
wxTreeItemId AppendItem(const wxTreeItemId& parent,
|
||||
const wxString& text,
|
||||
int image = -1, int selectedImage = -1,
|
||||
wxTreeItemData *data = NULL);
|
||||
|
||||
// delete this item and associated data if any
|
||||
void Delete(const wxTreeItemId& item);
|
||||
// delete all children (but don't delete the item itself)
|
||||
// NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
|
||||
void DeleteChildren(const wxTreeItemId& item);
|
||||
// delete all items from the tree
|
||||
// NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
|
||||
void DeleteAllItems();
|
||||
|
||||
// expand this item
|
||||
void Expand(const wxTreeItemId& item);
|
||||
// collapse the item without removing its children
|
||||
void Collapse(const wxTreeItemId& item);
|
||||
// collapse the item and remove all children
|
||||
void CollapseAndReset(const wxTreeItemId& item);
|
||||
// toggles the current state
|
||||
void Toggle(const wxTreeItemId& item);
|
||||
|
||||
// remove the selection from currently selected item (if any)
|
||||
void Unselect();
|
||||
// select this item
|
||||
void SelectItem(const wxTreeItemId& item);
|
||||
// make sure this item is visible (expanding the parent item and/or
|
||||
// scrolling to this item if necessary)
|
||||
void EnsureVisible(const wxTreeItemId& item);
|
||||
// scroll to this item (but don't expand its parent)
|
||||
void ScrollTo(const wxTreeItemId& item);
|
||||
|
||||
// The first function is more portable (because easier to implement
|
||||
// on other platforms), but the second one returns some extra info.
|
||||
wxTreeItemId HitTest(const wxPoint& point)
|
||||
{ int dummy; return HitTest(point, dummy); }
|
||||
wxTreeItemId HitTest(const wxPoint& point, int& flags);
|
||||
|
||||
// start editing the item label: this (temporarily) replaces the item
|
||||
// with a one line edit control. The item will be selected if it hadn't
|
||||
// been before. textCtrlClass parameter allows you to create an edit
|
||||
// control of arbitrary user-defined class deriving from wxTextCtrl.
|
||||
wxTextCtrl* EditLabel(const wxTreeItemId& item,
|
||||
wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl));
|
||||
// returns the same pointer as StartEdit() if the item is being edited,
|
||||
// NULL otherwise (it's assumed that no more than one item may be
|
||||
// edited simultaneously)
|
||||
wxTextCtrl* GetEditControl() const;
|
||||
// end editing and accept or discard the changes to item label
|
||||
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE);
|
||||
|
||||
// sorting
|
||||
// this function is called to compare 2 items and should return -1, 0
|
||||
// or +1 if the first item is less than, equal to or greater than the
|
||||
// second one. The base class version performs alphabetic comparaison
|
||||
// of item labels (GetText)
|
||||
virtual int OnCompareItems(const wxTreeItemId& item1,
|
||||
const wxTreeItemId& item2);
|
||||
// sort the children of this item using OnCompareItems
|
||||
//
|
||||
// NB: this function is not reentrant and not MT-safe (FIXME)!
|
||||
void SortChildren(const wxTreeItemId& item);
|
||||
|
||||
// callbacks
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void OnSetFocus( wxFocusEvent &event );
|
||||
void OnKillFocus( wxFocusEvent &event );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
|
||||
// implementation
|
||||
void SendDeleteEvent(wxGenericTreeItem *itemBeingDeleted);
|
||||
|
||||
protected:
|
||||
wxGenericTreeItem *m_anchor;
|
||||
wxGenericTreeItem *m_current;
|
||||
bool m_hasFocus;
|
||||
bool m_dirty;
|
||||
int m_xScroll,m_yScroll;
|
||||
unsigned int m_indent;
|
||||
unsigned int m_spacing;
|
||||
int m_lineHeight;
|
||||
wxPen m_dottedPen;
|
||||
wxBrush *m_hilightBrush;
|
||||
wxImageList *m_imageListNormal,
|
||||
*m_imageListState;
|
||||
int m_dragCount;
|
||||
|
||||
// the common part of all ctors
|
||||
void Init();
|
||||
|
||||
// misc helpers
|
||||
wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
|
||||
size_t previous,
|
||||
const wxString& text,
|
||||
int image, int selectedImage,
|
||||
wxTreeItemData *data);
|
||||
|
||||
void AdjustMyScrollbars();
|
||||
void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y );
|
||||
void PaintItem( wxGenericTreeItem *item, wxDC& dc);
|
||||
|
||||
void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y );
|
||||
void CalculatePositions();
|
||||
|
||||
void RefreshSubtree( wxGenericTreeItem *item );
|
||||
void RefreshLine( wxGenericTreeItem *item );
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
|
||||
};
|
||||
|
||||
#endif // _GENERIC_TREECTRL_H_
|
||||
|
324
include/wx/generic/warning.xpm
Normal file
324
include/wx/generic/warning.xpm
Normal file
@@ -0,0 +1,324 @@
|
||||
/* XPM */
|
||||
static char *warning[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"48 48 270 2",
|
||||
" c Gray0",
|
||||
". c #010100000000",
|
||||
"X c #010101010000",
|
||||
"o c #010101010101",
|
||||
"O c #020201010000",
|
||||
"+ c #030301010000",
|
||||
"@ c #020202020000",
|
||||
"# c #020202020202",
|
||||
"$ c Gray1",
|
||||
"% c #040403030000",
|
||||
"& c #050504040000",
|
||||
"* c #070704040000",
|
||||
"= c #040404040404",
|
||||
"- c Gray2",
|
||||
"; c #060606060606",
|
||||
": c #090907070000",
|
||||
"> c #090907070101",
|
||||
", c #0e0e03030202",
|
||||
"< c #0d0d04040303",
|
||||
"1 c #0a0a08080000",
|
||||
"2 c #0b0b09090000",
|
||||
"3 c #0e0e0b0b0000",
|
||||
"4 c Gray3",
|
||||
"5 c #090909090909",
|
||||
"6 c Gray4",
|
||||
"7 c #0b0b0b0b0b0b",
|
||||
"8 c Gray6",
|
||||
"9 c #171704040202",
|
||||
"0 c #10100d0d0101",
|
||||
"q c #13130f0f0000",
|
||||
"w c #13130f0f0101",
|
||||
"e c #1c1c07070505",
|
||||
"r c #151510100101",
|
||||
"t c #191913130000",
|
||||
"y c #1d1d16160202",
|
||||
"u c #1e1e17170202",
|
||||
"i c #111111111111",
|
||||
"p c #161616161616",
|
||||
"a c #212107070505",
|
||||
"s c #222207070505",
|
||||
"d c #232307070404",
|
||||
"f c #232307070505",
|
||||
"g c #262608080606",
|
||||
"h c #2b2b0a0a0707",
|
||||
"j c #2c2c08080505",
|
||||
"k c #2e2e08080505",
|
||||
"l c #2e2e09090606",
|
||||
"z c #2e2e0a0a0808",
|
||||
"x c #24241c1c0303",
|
||||
"c c #25251d1d0202",
|
||||
"v c #25251d1d0303",
|
||||
"b c #27271e1e0202",
|
||||
"n c #3b3b0b0b0707",
|
||||
"m c #3b3b0c0c0909",
|
||||
"M c #3c3c0c0c0909",
|
||||
"N c #3d3d0c0c0909",
|
||||
"B c #3e3e0c0c0808",
|
||||
"V c #292920200303",
|
||||
"C c #2c2c23230303",
|
||||
"Z c #313126260404",
|
||||
"A c #313126260505",
|
||||
"S c #333327270404",
|
||||
"D c #38382c2c0505",
|
||||
"F c #3c3c2e2e0505",
|
||||
"G c Gray17",
|
||||
"H c #41410c0c0707",
|
||||
"J c #42420c0c0606",
|
||||
"K c #42420c0c0707",
|
||||
"L c #42420d0d0808",
|
||||
"P c #44440e0e0909",
|
||||
"I c #44440e0e0a0a",
|
||||
"U c #47470e0e0909",
|
||||
"Y c #46460e0e0a0a",
|
||||
"T c #49490d0d0707",
|
||||
"R c #4d4d0d0d0707",
|
||||
"E c #49490e0e0909",
|
||||
"W c #49490e0e0a0a",
|
||||
"Q c #4d4d10100c0c",
|
||||
"! c #52520e0e0707",
|
||||
"~ c #575711110909",
|
||||
"^ c #5a5a12120d0d",
|
||||
"/ c #5d5d11110b0b",
|
||||
"( c #5e5e11110a0a",
|
||||
") c #5c5c12120d0d",
|
||||
"_ c #5e5e12120c0c",
|
||||
"` c #404031310404",
|
||||
"' c #404031310505",
|
||||
"] c #414132320606",
|
||||
"[ c #424233330505",
|
||||
"{ c #454535350606",
|
||||
"} c #4b4b3a3a0707",
|
||||
"| c #4e4e3d3d0606",
|
||||
" . c #51513f3f0707",
|
||||
".. c #606012120b0b",
|
||||
"X. c #636311110909",
|
||||
"o. c #616113130e0e",
|
||||
"O. c #646412120909",
|
||||
"+. c #6a6a13130b0b",
|
||||
"@. c #6e6e13130a0a",
|
||||
"#. c #6e6e14140a0a",
|
||||
"$. c #6f6f14140b0b",
|
||||
"%. c #6d6d16160e0e",
|
||||
"&. c #6e6e15150c0c",
|
||||
"*. c #717115150d0d",
|
||||
"=. c #727215150d0d",
|
||||
"-. c #737315150c0c",
|
||||
";. c #737316160e0e",
|
||||
":. c #777715150c0c",
|
||||
">. c #787815150b0b",
|
||||
",. c #787815150c0c",
|
||||
"<. c #737317171111",
|
||||
"1. c #7a7a17171010",
|
||||
"2. c #787818181212",
|
||||
"3. c #7b7b19191212",
|
||||
"4. c #525240400707",
|
||||
"5. c #676750500909",
|
||||
"6. c #696952520a0a",
|
||||
"7. c #717157570a0a",
|
||||
"8. c #74745a5a0c0c",
|
||||
"9. c #7a7a61610909",
|
||||
"0. c #7c7c61610c0c",
|
||||
"q. c #858517170c0c",
|
||||
"w. c #868618180d0d",
|
||||
"e. c #8a8a18180c0c",
|
||||
"r. c #8a8a19190f0f",
|
||||
"t. c #808018181010",
|
||||
"y. c #80801a1a1313",
|
||||
"u. c #868619191010",
|
||||
"i. c #86861b1b1313",
|
||||
"p. c #87871b1b1212",
|
||||
"a. c #85851b1b1414",
|
||||
"s. c #88881a1a1111",
|
||||
"d. c #89891a1a1111",
|
||||
"f. c #8b8b1c1c1515",
|
||||
"g. c #8d8d1b1b1212",
|
||||
"h. c #8f8f1b1b1010",
|
||||
"j. c #8c8c1c1c1414",
|
||||
"k. c #90901a1a0f0f",
|
||||
"l. c #91911a1a0f0f",
|
||||
"z. c #92921a1a0e0e",
|
||||
"x. c #9b9b1b1b0e0e",
|
||||
"c. c #9a9a1c1c0f0f",
|
||||
"v. c #93931b1b1010",
|
||||
"b. c #90901e1e1212",
|
||||
"n. c #97971e1e1515",
|
||||
"m. c #99991d1d1313",
|
||||
"M. c #98981d1d1414",
|
||||
"N. c #98981f1f1717",
|
||||
"B. c #99991f1f1616",
|
||||
"V. c #9a9a1f1f1515",
|
||||
"C. c #9b9b1e1e1414",
|
||||
"Z. c #9b9b1f1f1717",
|
||||
"A. c #9c9c1e1e1313",
|
||||
"S. c #9d9d1e1e1212",
|
||||
"D. c #9e9e1d1d1111",
|
||||
"F. c #9f9f1d1d1010",
|
||||
"G. c #9f9f1e1e1313",
|
||||
"H. c #9d9d1f1f1515",
|
||||
"J. c #9c9c1f1f1616",
|
||||
"K. c #9e9e1e1e1414",
|
||||
"L. c #a0a01d1d0f0f",
|
||||
"P. c #a1a11c1c0e0e",
|
||||
"I. c #a2a21d1d0f0f",
|
||||
"U. c #a3a31c1c0e0e",
|
||||
"Y. c #a3a31d1d0f0f",
|
||||
"T. c #a4a41c1c0e0e",
|
||||
"R. c #a6a61d1d0f0f",
|
||||
"E. c #a7a71d1d0e0e",
|
||||
"W. c #a9a91d1d0f0f",
|
||||
"Q. c #a1a11d1d1010",
|
||||
"!. c #a1a11d1d1111",
|
||||
"~. c #a0a01e1e1212",
|
||||
"^. c #a2a21d1d1010",
|
||||
"/. c #b3b31f1f0f0f",
|
||||
"(. c #b2b21f1f1010",
|
||||
"). c #b9b920200f0f",
|
||||
"_. c #b6b621211111",
|
||||
"`. c #b7b720201010",
|
||||
"'. c #baba20201010",
|
||||
"]. c #bdbd21211111",
|
||||
"[. c #bfbf22221212",
|
||||
"{. c #abab42421616",
|
||||
"}. c #b1b140401010",
|
||||
"|. c #b9b95b5b1313",
|
||||
" X c #bbbb5b5b1111",
|
||||
".X c #bfbf6f6f1616",
|
||||
"XX c #92924f4f4848",
|
||||
"oX c #c6c622221010",
|
||||
"OX c #c8c823231212",
|
||||
"+X c #caca23231010",
|
||||
"@X c #cdcd25251313",
|
||||
"#X c #d1d124241212",
|
||||
"$X c #d2d224241111",
|
||||
"%X c #d2d226261414",
|
||||
"&X c #d5d525251111",
|
||||
"*X c #d4d425251313",
|
||||
"=X c #d9d926261313",
|
||||
"-X c #dbdb26261212",
|
||||
";X c #d8d827271515",
|
||||
":X c #dcdc26261313",
|
||||
">X c #dede26261212",
|
||||
",X c #e0e027271212",
|
||||
"<X c #e3e327271313",
|
||||
"1X c #e6e627271212",
|
||||
"2X c #e4e42e2e1a1a",
|
||||
"3X c #ebeb27271313",
|
||||
"4X c #ebeb28281212",
|
||||
"5X c #e8e828281414",
|
||||
"6X c #eaea29291515",
|
||||
"7X c #eaea2a2a1616",
|
||||
"8X c #ecec29291313",
|
||||
"9X c #eeee29291313",
|
||||
"0X c #eded29291414",
|
||||
"qX c #ecec2a2a1616",
|
||||
"wX c #efef29291414",
|
||||
"eX c #f1f129291212",
|
||||
"rX c #f3f329291212",
|
||||
"tX c #f4f429291313",
|
||||
"yX c #f5f529291313",
|
||||
"uX c #f5f52a2a1313",
|
||||
"iX c #f6f629291313",
|
||||
"pX c #f7f729291313",
|
||||
"aX c #f4f429291414",
|
||||
"sX c #f4f42a2a1414",
|
||||
"dX c #f6f62b2b1414",
|
||||
"fX c #c1c169691616",
|
||||
"gX c #c2c26f6f1212",
|
||||
"hX c #c1c16f6f1414",
|
||||
"jX c #c5c56b6b1212",
|
||||
"kX c #c5c57e7e1616",
|
||||
"lX c #c7c77e7e1414",
|
||||
"zX c #c8c87e7e1414",
|
||||
"xX c #b9b993930e0e",
|
||||
"cX c #bdbd93931212",
|
||||
"vX c #c9c985851717",
|
||||
"bX c #cbcb86861717",
|
||||
"nX c #cdcd87871313",
|
||||
"mX c #cccc86861414",
|
||||
"MX c #cccc86861515",
|
||||
"NX c #cbcb89891414",
|
||||
"BX c #cfcf88881212",
|
||||
"VX c #cfcf8c8c1212",
|
||||
"CX c #c3c39b9b0f0f",
|
||||
"ZX c #c4c498981313",
|
||||
"AX c #c7c79a9a1414",
|
||||
"SX c #cbcb9e9e1313",
|
||||
"DX c #d1d189891212",
|
||||
"FX c #d2d288881414",
|
||||
"GX c #d0d08c8c1313",
|
||||
"HX c #d7d7a8a81616",
|
||||
"JX c #d7d7a8a81a1a",
|
||||
"KX c #d8d8a5a51c1c",
|
||||
"LX c #dadaaaaa1616",
|
||||
"PX c #dadaaaaa1717",
|
||||
"IX c #dbdbaaaa1616",
|
||||
"UX c #dbdbabab1717",
|
||||
"YX c #dcdcabab1515",
|
||||
"TX c #dcdcaeae1111",
|
||||
"RX c #dedeacac1313",
|
||||
"EX c #dfdfadad1313",
|
||||
"WX c #d8d8a9a91919",
|
||||
"QX c #d8d8a9a91a1a",
|
||||
"!X c #d9d9aaaa1919",
|
||||
"~X c #dfdfb1b11212",
|
||||
"^X c #e0e0adad1111",
|
||||
"/X c #e1e1aeae1212",
|
||||
"(X c #e0e0aeae1414",
|
||||
")X c #e0e0b2b21313",
|
||||
"_X c #808080808080",
|
||||
"`X c None",
|
||||
/* pixels */
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X9XsXoXb._X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X8XdX$XW.q. `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.iX&XE.P.x.O. `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.pX,X/.T.T.P.e.k i `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X4X8X).T.T.}.T.c.X. `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.uX+XT.T. XgXY.L.z.n `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.yX-XR.T.T.^X~XY.Y.L.:. `X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X4X8X`.T.U./X~X~XFXY.F.l.R `X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.uX+XT.T.jX~X~X~X~XQ.^.F.-. `X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.tX>XR.T.T.^XTXxXTXRXBX^.F.k.T `X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X1XwX'.T.T.DXCXX 3 ' RXRX^.!.D.-. `X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.rX#XT.T.T.~X9.* q @ RXRXnX!.D.k.E `X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X4X5X(.T.T.)X~XC + . t RXRXYX!.!.S.=. `X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.uXOXT.T.FX~X~Xc % V RXYXYXnX~.S.h.E `X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.eX:XR.T.Y.~X~X~Xb y [ YXYXYXYX~.~.S.*. `X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X@.0X].T.T.GX~X~XRX| ` { YXYXYXIXmX~.S.d.U `X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`XR.aX=XR.T.Y.~X~X~XRXu X v ] YXYXIXIXIX~.G.m.( `X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X<X6X`.T.I.)X~X~XRXRX: X 2 v YXIXIXIXIXMXG.A.u.j `X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`XR.wX*XT.Y.FX~X~XRXRXRX& 0 1 S IXIXIXIXPXPXG.G.M._ p `X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X2X6X`.Y.Y.~X~XRXRXRXRX& w % 4.IXIXIXPXPXPXMXK.C.1.e `X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`XR.wX*XY.Y.GX~XRXRXRXRXYXD .r 7.IXIXPXPXPXPXWXK.K.g.W `X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X2X6X`.Y.Y.~XRXRXRXRXYXYXcX5.Z AXIXIXPXPXPXWXWXbXK.V.%.$ `X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`XR.wX*XY.Y.GX~XRXRXRXYXYXYXYXIXIXIXIXPXPXPXPXWXWXWXH.V.p.P `X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X2X6X_.Y.Y.~XRXRXRXYXYXYXYXSXv x ZXPXPXPXPXWXWXWXJXfXH.n.) = `X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`XR.wX%XY.Y.VXRXRXRXRXYXYXYXIX} O O 6.PXPXPXWXWXWXWXJXvXH.B.3.h `X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`XXXqX_.Y.Y.RXRXRXRXYXYXYXYXIXF % > 8.PXPXWXWXWXWXJXJXJXH.J.j.Y - `X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`XR.3X;XY.Y.zX(XEXRXYXYXYXYXIXIXcXA 0.HXPXWXWXWXWXJXJXJXJX.XJ.B.o. 7 `X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X#.7X[.Y.^.^.^.^.!.!.!.|.hXlXNXLXUXUXUX!X!X!X!XQXQXQXQXKXkX{.B.2.g G `X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`XJ @XY.L.^.^.^.!.!.!.!.~.~.~.~.G.G.G.G.K.K.K.H.H.H.H.J.J.J.J.Z.f.I `X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X9 >.! +.$.,.w.r.v.D.S.~.~.~.G.G.G.G.K.K.K.H.H.H.H.J.J.J.J.Z.Z.N.^ o `X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X - # # , d l H K ~ / ..&.;.;.;.t.s.s.s.s.p.p.p.i.i.i.i.a.a.y.<.Q # ; `X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X # # # # # # # # # < s a a f L B B B B B B N N N M M M m z e # `X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X $ $ # # # # # # # # # # # # # # # # # # # # # # # # # o `X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X 8 6 o o = = $ $ # # # # # # # # # # # # # # $ $ `X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X 5 5 4 `X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X `X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
|
||||
"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X"
|
||||
};
|
11
include/wx/grid.h
Normal file
11
include/wx/grid.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef _WX_GRID_H_BASE_
|
||||
#define _WX_GRID_H_BASE_
|
||||
|
||||
#include "wx/generic/gridg.h"
|
||||
|
||||
#ifndef wxGrid
|
||||
#define wxGrid wxGenericGrid
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_GRID_H_BASE_
|
1
include/wx/gtk/.cvsignore
Normal file
1
include/wx/gtk/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
setup.h
|
105
include/wx/gtk/accel.h
Normal file
105
include/wx/gtk/accel.h
Normal file
@@ -0,0 +1,105 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: accel.h
|
||||
// Purpose: wxAcceleratorTable class
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKACCELH__
|
||||
#define __GTKACCELH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "accel.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxAcceleratorEntry;
|
||||
class wxAcceleratorTable;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// constants
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern wxAcceleratorTable wxNullAcceleratorTable;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// constants
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Hold Ctrl key down
|
||||
#define wxACCEL_ALT 0x01
|
||||
|
||||
// Hold Ctrl key down
|
||||
#define wxACCEL_CTRL 0x02
|
||||
|
||||
// Hold Shift key down
|
||||
#define wxACCEL_SHIFT 0x04
|
||||
|
||||
// Hold no other key
|
||||
#define wxACCEL_NORMAL 0x00
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAcceleratorEntry
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxAcceleratorEntry: public wxObject
|
||||
{
|
||||
public:
|
||||
|
||||
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0)
|
||||
{ m_flags = flags; m_keyCode = keyCode; m_command = cmd; }
|
||||
|
||||
inline void Set(int flags, int keyCode, int cmd)
|
||||
{ m_flags = flags; m_keyCode = keyCode; m_command = cmd; }
|
||||
|
||||
inline int GetFlags() const { return m_flags; }
|
||||
inline int GetKeyCode() const { return m_keyCode; }
|
||||
inline int GetCommand() const { return m_command; }
|
||||
|
||||
int m_flags;
|
||||
int m_keyCode; // ASCII or virtual keycode
|
||||
int m_command; // Command id to generate
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAcceleratorTable
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxAcceleratorTable: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
||||
|
||||
public:
|
||||
wxAcceleratorTable();
|
||||
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
|
||||
~wxAcceleratorTable();
|
||||
|
||||
inline wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject()
|
||||
{ Ref(accel); }
|
||||
inline wxAcceleratorTable(const wxAcceleratorTable* accel)
|
||||
{ if (accel) Ref(*accel); }
|
||||
inline bool operator == (const wxAcceleratorTable& accel)
|
||||
{ return m_refData == accel.m_refData; }
|
||||
inline bool operator != (const wxAcceleratorTable& accel)
|
||||
{ return m_refData != accel.m_refData; }
|
||||
inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
|
||||
{ if (*this == accel) return (*this); Ref(accel); return *this; }
|
||||
|
||||
bool Ok() const;
|
||||
|
||||
// private:
|
||||
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
|
||||
};
|
||||
|
||||
#endif
|
149
include/wx/gtk/app.h
Normal file
149
include/wx/gtk/app.h
Normal file
@@ -0,0 +1,149 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: app.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKAPPH__
|
||||
#define __GTKAPPH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/frame.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxApp;
|
||||
class wxLog;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern wxApp *wxTheApp;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global functions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void wxExit(void);
|
||||
bool wxYield(void);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// constants
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define wxPRINT_WINDOWS 1
|
||||
#define wxPRINT_POSTSCRIPT 2
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxApp
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxApp: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
|
||||
public:
|
||||
|
||||
wxApp();
|
||||
~wxApp();
|
||||
|
||||
static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; }
|
||||
static wxAppInitializerFunction GetInitializerFunction() { return m_appInitFn; }
|
||||
|
||||
/* override for altering the way wxGTK intializes the GUI (palette/visual/colorcube).
|
||||
* under wxMSW, OnInitGui() does nothing by default. when overriding this method,
|
||||
* the code in it is likely to be platform dependent, otherwise use OnInit(). */
|
||||
virtual bool OnInitGui();
|
||||
|
||||
/* override to create top level frame, display splash screen etc. */
|
||||
virtual bool OnInit() { return FALSE; }
|
||||
|
||||
virtual int OnRun() { return MainLoop(); }
|
||||
virtual int OnExit() { return 0; }
|
||||
|
||||
wxWindow *GetTopWindow();
|
||||
void SetTopWindow( wxWindow *win );
|
||||
|
||||
virtual int MainLoop();
|
||||
void ExitMainLoop();
|
||||
bool Initialized();
|
||||
virtual bool Pending();
|
||||
virtual void Dispatch();
|
||||
|
||||
inline void SetWantDebugOutput( bool flag ) { m_wantDebugOutput = flag; }
|
||||
inline bool GetWantDebugOutput() { return m_wantDebugOutput; }
|
||||
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
bool SendIdleEvents();
|
||||
bool SendIdleEvents( wxWindow* win );
|
||||
|
||||
inline wxString GetAppName() const
|
||||
{ if (m_appName != "") return m_appName; else return m_className; }
|
||||
inline void SetAppName( const wxString& name ) { m_appName = name; }
|
||||
|
||||
inline wxString GetClassName() const { return m_className; }
|
||||
inline void SetClassName( const wxString& name ) { m_className = name; }
|
||||
|
||||
const wxString& GetVendorName() const { return m_vendorName; }
|
||||
void SetVendorName( const wxString& name ) { m_vendorName = name; }
|
||||
|
||||
inline void SetExitOnFrameDelete( bool flag ) { m_exitOnFrameDelete = flag; }
|
||||
inline bool GetExitOnFrameDelete() const { return m_exitOnFrameDelete; }
|
||||
|
||||
void SetPrintMode( int WXUNUSED(mode) ) {}
|
||||
int GetPrintMode() const { return wxPRINT_POSTSCRIPT; }
|
||||
|
||||
/* override this function to create default log target of arbitrary
|
||||
* user-defined classv (default implementation creates a wxLogGui object) */
|
||||
virtual wxLog *CreateLogTarget();
|
||||
|
||||
// implementation
|
||||
|
||||
static bool Initialize();
|
||||
static bool InitialzeVisual();
|
||||
static void CleanUp();
|
||||
|
||||
bool ProcessIdle();
|
||||
#if wxUSE_THREADS
|
||||
void ProcessPendingEvents();
|
||||
#endif
|
||||
void DeletePendingObjects();
|
||||
|
||||
/// This can be used to suppress the generation of Idle events.
|
||||
inline void SuppressIdleEvents(bool arg = TRUE) { m_suppressIdleEvents = arg; }
|
||||
inline bool GetSuppressIdleEvents() const { return m_suppressIdleEvents; }
|
||||
|
||||
bool m_initialized;
|
||||
bool m_exitOnFrameDelete;
|
||||
bool m_wantDebugOutput;
|
||||
wxWindow *m_topWindow;
|
||||
|
||||
gint m_idleTag;
|
||||
unsigned char *m_colorCube;
|
||||
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
wxString m_vendorName;
|
||||
wxString m_appName;
|
||||
wxString m_className;
|
||||
|
||||
static wxAppInitializerFunction m_appInitFn;
|
||||
private:
|
||||
/// Set to TRUE while we are in wxYield().
|
||||
bool m_suppressIdleEvents;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKAPPH__
|
100
include/wx/gtk/bitmap.h
Normal file
100
include/wx/gtk/bitmap.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bitmap.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKBITMAPH__
|
||||
#define __GTKBITMAPH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/palette.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMask;
|
||||
class wxBitmap;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMask
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMask: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
|
||||
public:
|
||||
wxMask();
|
||||
wxMask( const wxBitmap& bitmap, const wxColour& colour );
|
||||
wxMask( const wxBitmap& bitmap, int paletteIndex );
|
||||
wxMask( const wxBitmap& bitmap );
|
||||
~wxMask();
|
||||
|
||||
// implementation
|
||||
|
||||
GdkBitmap *m_bitmap;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmap
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBitmap: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
|
||||
public:
|
||||
wxBitmap();
|
||||
wxBitmap( int width, int height, int depth = -1 );
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char **bits );
|
||||
wxBitmap( char **bits );
|
||||
wxBitmap( const wxBitmap& bmp );
|
||||
wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM );
|
||||
~wxBitmap();
|
||||
wxBitmap& operator = ( const wxBitmap& bmp );
|
||||
bool operator == ( const wxBitmap& bmp );
|
||||
bool operator != ( const wxBitmap& bmp );
|
||||
bool Ok() const;
|
||||
|
||||
int GetHeight() const;
|
||||
int GetWidth() const;
|
||||
int GetDepth() const;
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
|
||||
bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
|
||||
bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM );
|
||||
|
||||
wxPalette *GetPalette() const;
|
||||
wxPalette *GetColourMap() const
|
||||
{ return GetPalette(); };
|
||||
|
||||
// implementation
|
||||
|
||||
void SetHeight( int height );
|
||||
void SetWidth( int width );
|
||||
void SetDepth( int depth );
|
||||
void SetPixmap( GdkPixmap *pixmap );
|
||||
|
||||
GdkPixmap *GetPixmap() const;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
#endif // __GTKBITMAPH__
|
94
include/wx/gtk/bmpbuttn.h
Normal file
94
include/wx/gtk/bmpbuttn.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bmpbutton.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __BMPBUTTONH__
|
||||
#define __BMPBUTTONH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBitmapButton;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxButtonNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmapButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBitmapButton: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
||||
|
||||
public:
|
||||
wxBitmapButton();
|
||||
inline wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr )
|
||||
{
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
void SetDefault();
|
||||
|
||||
void SetLabel( const wxString &label );
|
||||
wxString GetLabel() const;
|
||||
virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
|
||||
|
||||
wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_disabled; }
|
||||
wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_focus; }
|
||||
wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_bitmap; }
|
||||
wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_selected; }
|
||||
|
||||
void SetBitmapDisabled( const wxBitmap& bitmap );
|
||||
void SetBitmapFocus( const wxBitmap& bitmap );
|
||||
void SetBitmapLabel( const wxBitmap& bitmap );
|
||||
void SetBitmapSelected( const wxBitmap& bitmap );
|
||||
|
||||
virtual void Enable(const bool);
|
||||
|
||||
// implementation
|
||||
|
||||
void HasFocus();
|
||||
void NotFocus();
|
||||
void StartSelect();
|
||||
void EndSelect();
|
||||
void SetBitmap();
|
||||
void ApplyWidgetStyle();
|
||||
|
||||
bool m_hasFocus;
|
||||
bool m_isSelected;
|
||||
wxBitmap m_bitmap;
|
||||
wxBitmap m_disabled;
|
||||
wxBitmap m_focus;
|
||||
wxBitmap m_selected;
|
||||
};
|
||||
|
||||
#endif // __BMPBUTTONH__
|
64
include/wx/gtk/brush.h
Normal file
64
include/wx/gtk/brush.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKBRUSHH__
|
||||
#define __GTKBRUSHH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBrush;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBrush
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxBrush: public wxGDIObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBrush)
|
||||
|
||||
public:
|
||||
|
||||
wxBrush();
|
||||
wxBrush( const wxColour &colour, int style );
|
||||
wxBrush( const wxBitmap &stippleBitmap );
|
||||
wxBrush( const wxBrush &brush );
|
||||
~wxBrush();
|
||||
wxBrush& operator = ( const wxBrush& brush );
|
||||
bool operator == ( const wxBrush& brush );
|
||||
bool operator != ( const wxBrush& brush );
|
||||
bool Ok() const;
|
||||
|
||||
int GetStyle() const;
|
||||
wxColour &GetColour() const;
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
void SetColour( const wxColour& col );
|
||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||
void SetStyle( int style );
|
||||
void SetStipple( const wxBitmap& stipple );
|
||||
|
||||
void Unshare();
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
#endif // __GTKBRUSHH__
|
69
include/wx/gtk/button.h
Normal file
69
include/wx/gtk/button.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: button.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKBUTTONH__
|
||||
#define __GTKBUTTONH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxButton;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxButtonNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxButton: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
||||
|
||||
public:
|
||||
|
||||
wxButton();
|
||||
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
~wxButton();
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
void SetDefault();
|
||||
void SetLabel( const wxString &label );
|
||||
void Enable( bool enable );
|
||||
|
||||
// implementation
|
||||
|
||||
void ApplyWidgetStyle();
|
||||
};
|
||||
|
||||
#endif // __GTKBUTTONH__
|
76
include/wx/gtk/checkbox.h
Normal file
76
include/wx/gtk/checkbox.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checkbox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCHECKBOXH__
|
||||
#define __GTKCHECKBOXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxCheckBox;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxCheckBoxNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxCheckBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxCheckBox: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
||||
|
||||
public:
|
||||
wxCheckBox();
|
||||
wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr );
|
||||
|
||||
void SetValue( bool state );
|
||||
bool GetValue() const;
|
||||
|
||||
void SetLabel( const wxString& label );
|
||||
void Enable( bool enable );
|
||||
|
||||
// implementation
|
||||
void ApplyWidgetStyle();
|
||||
|
||||
bool m_blockFirstEvent;
|
||||
GtkWidget *m_widgetCheckbox;
|
||||
GtkWidget *m_widgetLabel;
|
||||
};
|
||||
|
||||
#endif // __GTKCHECKBOXH__
|
56
include/wx/gtk/checklst.h
Normal file
56
include/wx/gtk/checklst.h
Normal file
@@ -0,0 +1,56 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checklst.h
|
||||
// Purpose: wxCheckListBox class
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKCHECKLISTH__
|
||||
#define __GTKCHECKLISTH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/listbox.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxCheckListBox;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxCheckListBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxCheckListBox : public wxListBox
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
|
||||
|
||||
public:
|
||||
wxCheckListBox();
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int nStrings = 0,
|
||||
const wxString *choices = (const wxString *)NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
bool IsChecked( int index ) const;
|
||||
void Check( int index, bool check = TRUE );
|
||||
|
||||
int GetItemHeight() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
//__GTKCHECKLISTH__
|
94
include/wx/gtk/choice.h
Normal file
94
include/wx/gtk/choice.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKCHOICEH__
|
||||
#define __GTKCHOICEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxChoice;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char *wxChoiceNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxChoice
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxChoice : public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
|
||||
public:
|
||||
wxChoice();
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr )
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
~wxChoice();
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr );
|
||||
|
||||
void Append( const wxString &item );
|
||||
void Append( const wxString &item, void* clientData );
|
||||
void Append( const wxString &item, wxClientData* clientData );
|
||||
|
||||
void SetClientData( int n, void* clientData );
|
||||
void* GetClientData( int n );
|
||||
void SetClientObject( int n, wxClientData* clientData );
|
||||
wxClientData* GetClientObject( int n );
|
||||
|
||||
void Clear();
|
||||
void Delete(int n);
|
||||
|
||||
int FindString( const wxString &string ) const;
|
||||
int GetColumns() const;
|
||||
int GetSelection();
|
||||
wxString GetString( int n ) const;
|
||||
wxString GetStringSelection() const;
|
||||
int Number() const;
|
||||
void SetColumns( int n = 1 );
|
||||
void SetSelection( int n );
|
||||
void SetStringSelection( const wxString &string );
|
||||
|
||||
// implementation
|
||||
|
||||
wxList m_clientDataList;
|
||||
wxList m_clientObjectList;
|
||||
|
||||
void AppendCommon( const wxString &item );
|
||||
void ApplyWidgetStyle();
|
||||
};
|
||||
|
||||
#endif // __GTKCHOICEH__
|
111
include/wx/gtk/clipbrd.h
Normal file
111
include/wx/gtk/clipbrd.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: clipboard.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCLIPBOARDH__
|
||||
#define __GTKCLIPBOARDH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/dataobj.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/module.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxClipboard;
|
||||
class wxClipboardModule;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern wxClipboard* wxTheClipboard;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClipboard
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxClipboard : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
||||
|
||||
public:
|
||||
wxClipboard();
|
||||
~wxClipboard();
|
||||
|
||||
// open the clipboard before SetData() and GetData()
|
||||
virtual bool Open();
|
||||
|
||||
// close the clipboard after SetData() and GetData()
|
||||
virtual void Close();
|
||||
|
||||
// set the clipboard data. all other formats will be deleted.
|
||||
virtual bool SetData( wxDataObject *data );
|
||||
|
||||
// add to the clipboard data.
|
||||
virtual bool AddData( wxDataObject *data );
|
||||
|
||||
// ask if data in correct format is available
|
||||
virtual bool IsSupported( wxDataFormat format );
|
||||
|
||||
// fill data with data on the clipboard (if available)
|
||||
virtual bool GetData( wxDataObject *data );
|
||||
|
||||
// clears wxTheClipboard and the system's clipboard if possible
|
||||
virtual void Clear();
|
||||
|
||||
// implementation
|
||||
|
||||
bool m_open;
|
||||
|
||||
bool m_ownsClipboard;
|
||||
bool m_ownsPrimarySelection;
|
||||
|
||||
wxDataBroker *m_dataBroker;
|
||||
GtkWidget *m_clipboardWidget; /* for getting and offering data */
|
||||
GtkWidget *m_targetsWidget; /* for getting list of supported formats */
|
||||
bool m_waiting; /* querying data or formats is asynchronous */
|
||||
|
||||
bool m_formatSupported;
|
||||
GdkAtom m_targetRequested;
|
||||
|
||||
wxDataObject *m_receivedData;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClipboardModule
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxClipboardModule: public wxModule
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxClipboardModule)
|
||||
|
||||
public:
|
||||
wxClipboardModule() {}
|
||||
bool OnInit();
|
||||
void OnExit();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// wxUSE_CLIPBOARD
|
||||
|
||||
#endif
|
||||
// __GTKCLIPBOARDH__
|
93
include/wx/gtk/colour.h
Normal file
93
include/wx/gtk/colour.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colour.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCOLOURH__
|
||||
#define __GTKCOLOURH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/palette.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxDC;
|
||||
class wxPaintDC;
|
||||
class wxBitmap;
|
||||
class wxWindow;
|
||||
|
||||
class wxColour;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxColour
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxColour: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// default
|
||||
wxColour();
|
||||
// from RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue );
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); }
|
||||
|
||||
// implicit conversion from the colour name
|
||||
wxColour( const wxString &colourName ) { InitFromName(colourName); }
|
||||
wxColour( const char *colourName ) { InitFromName(colourName); }
|
||||
|
||||
// copy ctors and assignment operators
|
||||
wxColour( const wxColour& col );
|
||||
wxColour& operator = ( const wxColour& col );
|
||||
|
||||
// dtor
|
||||
~wxColour();
|
||||
|
||||
// comparison
|
||||
bool operator == ( const wxColour& col ) const;
|
||||
bool operator != ( const wxColour& col ) const;
|
||||
|
||||
// accessors
|
||||
void Set( unsigned char red, unsigned char green, unsigned char blue );
|
||||
void Set( unsigned long colRGB )
|
||||
{
|
||||
// we don't need to know sizeof(long) here because we assume that the three
|
||||
// least significant bytes contain the R, G and B values
|
||||
Set((unsigned char)colRGB,
|
||||
(unsigned char)(colRGB >> 8),
|
||||
(unsigned char)(colRGB >> 16));
|
||||
}
|
||||
|
||||
unsigned char Red() const;
|
||||
unsigned char Green() const;
|
||||
unsigned char Blue() const;
|
||||
bool Ok() const;
|
||||
|
||||
// implementation
|
||||
void CalcPixel( GdkColormap *cmap );
|
||||
int GetPixel() const;
|
||||
GdkColor *GetColor() const;
|
||||
|
||||
protected:
|
||||
// helper functions
|
||||
void InitFromName(const wxString& colourName);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColour)
|
||||
};
|
||||
|
||||
#endif // __GTKCOLOURH__
|
123
include/wx/gtk/combobox.h
Normal file
123
include/wx/gtk/combobox.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCOMBOBOXH__
|
||||
#define __GTKCOMBOBOXH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "combobox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxComboBox;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern const char* wxComboBoxNameStr;
|
||||
extern const wxChar* wxEmptyString;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxComboBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxComboBox : public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||
|
||||
public:
|
||||
|
||||
inline wxComboBox() {}
|
||||
inline wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
~wxComboBox();
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
void Append( const wxString &item );
|
||||
void Append( const wxString &item, void* clientData );
|
||||
void Append( const wxString &item, wxClientData* clientData );
|
||||
|
||||
void SetClientData( int n, void* clientData );
|
||||
void* GetClientData( int n );
|
||||
void SetClientObject( int n, wxClientData* clientData );
|
||||
wxClientData* GetClientObject( int n );
|
||||
|
||||
void Clear();
|
||||
void Delete( int n );
|
||||
|
||||
int FindString( const wxString &item );
|
||||
int GetSelection() const;
|
||||
wxString GetString( int n ) const;
|
||||
wxString GetStringSelection() const;
|
||||
int Number() const;
|
||||
void SetSelection( int n );
|
||||
void SetStringSelection( const wxString &string );
|
||||
|
||||
wxString GetValue() const;
|
||||
void SetValue(const wxString& value);
|
||||
|
||||
void Copy();
|
||||
void Cut();
|
||||
void Paste();
|
||||
void SetInsertionPoint( long pos );
|
||||
void SetInsertionPointEnd();
|
||||
long GetInsertionPoint() const;
|
||||
long GetLastPosition() const;
|
||||
void Replace( long from, long to, const wxString& value );
|
||||
void Remove( long from, long to );
|
||||
void SetSelection( long from, long to );
|
||||
void SetEditable( bool editable );
|
||||
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
|
||||
// implementation
|
||||
|
||||
bool m_alreadySent;
|
||||
wxList m_clientDataList;
|
||||
wxList m_clientObjectList;
|
||||
|
||||
void AppendCommon( const wxString &item );
|
||||
GtkWidget* GetConnectWidget();
|
||||
bool IsOwnGtkWindow( GdkWindow *window );
|
||||
void ApplyWidgetStyle();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// __GTKCOMBOBOXH__
|
55
include/wx/gtk/control.h
Normal file
55
include/wx/gtk/control.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: control.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKCONTROLH__
|
||||
#define __GTKCONTROLH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/window.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxControl;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxControl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxControl: public wxWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxControl)
|
||||
|
||||
public:
|
||||
wxControl();
|
||||
wxControl( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = wxPanelNameStr );
|
||||
|
||||
virtual void Command( wxCommandEvent &event );
|
||||
|
||||
// this function will filter out '&' characters and will put the accelerator
|
||||
// char (the one immediately after '&') into m_chAccel (@@ not yet)
|
||||
virtual void SetLabel( const wxString &label );
|
||||
virtual wxString GetLabel() const;
|
||||
|
||||
protected:
|
||||
wxString m_label;
|
||||
char m_chAccel; // enabled to avoid breaking binary compatibility later on
|
||||
|
||||
};
|
||||
|
||||
#endif // __GTKCONTROLH__
|
46
include/wx/gtk/cursor.h
Normal file
46
include/wx/gtk/cursor.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cursor.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKCURSORH__
|
||||
#define __GTKCURSORH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxCursor
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxCursor: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCursor)
|
||||
|
||||
public:
|
||||
|
||||
wxCursor();
|
||||
wxCursor( int cursorId );
|
||||
wxCursor( const wxCursor &cursor );
|
||||
~wxCursor();
|
||||
wxCursor& operator = ( const wxCursor& cursor );
|
||||
bool operator == ( const wxCursor& cursor ) const;
|
||||
bool operator != ( const wxCursor& cursor ) const;
|
||||
bool Ok() const;
|
||||
|
||||
GdkCursor *GetCursor() const;
|
||||
|
||||
// no data :-)
|
||||
};
|
||||
|
||||
#endif // __GTKCURSORH__
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user