Remove Palm OS port.
The platform targeted by this port doesn't exist any more and the port never achieved really working state so remove the code to avoid having to maintain it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
16
Makefile.in
16
Makefile.in
@@ -700,12 +700,6 @@ ALL_PORTS_BASE_HEADERS = \
|
||||
wx/msw/fswatcher.h \
|
||||
$(BASE_WINCE_HDR) \
|
||||
$(BASE_OSX_HDR) \
|
||||
wx/palmos/apptbase.h \
|
||||
wx/palmos/apptrait.h \
|
||||
wx/palmos/chkconf.h \
|
||||
wx/palmos/mimetype.h \
|
||||
wx/palmos/missing.h \
|
||||
wx/palmos/stdpaths.h \
|
||||
wx/msdos/mimetype.h \
|
||||
wx/fs_inet.h \
|
||||
wx/protocol/file.h \
|
||||
@@ -859,14 +853,6 @@ ALL_BASE_SOURCES = \
|
||||
src/msdos/dir.cpp \
|
||||
src/msdos/mimetype.cpp \
|
||||
src/msdos/utilsdos.cpp \
|
||||
src/palmos/base.cpp \
|
||||
src/palmos/dir.cpp \
|
||||
src/palmos/prefconf.cpp \
|
||||
src/palmos/snglinst.cpp \
|
||||
src/palmos/stdall.c \
|
||||
src/palmos/thread.cpp \
|
||||
src/palmos/utils.cpp \
|
||||
src/palmos/utilsexc.cpp \
|
||||
src/common/event.cpp \
|
||||
src/common/fs_mem.cpp \
|
||||
src/common/msgout.cpp \
|
||||
@@ -37843,7 +37829,6 @@ BASE_DIST: ALL_DIST INTL_DIST
|
||||
mkdir $(DISTDIR)/include/wx/osx/carbon
|
||||
mkdir $(DISTDIR)/include/wx/osx/core
|
||||
mkdir $(DISTDIR)/include/wx/os2
|
||||
mkdir $(DISTDIR)/include/wx/palmos
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
mkdir $(DISTDIR)/src/osx
|
||||
mkdir $(DISTDIR)/src/osx/core
|
||||
@@ -37851,7 +37836,6 @@ BASE_DIST: ALL_DIST INTL_DIST
|
||||
mkdir $(DISTDIR)/src/msdos
|
||||
mkdir $(DISTDIR)/src/msw
|
||||
mkdir $(DISTDIR)/src/os2
|
||||
mkdir $(DISTDIR)/src/palmos
|
||||
$(CP_P) $(DOCDIR)/base/readme.txt $(DISTDIR)/README.txt
|
||||
$(CP_P) $(WXDIR)/src/common/*.inc $(DISTDIR)/src/common
|
||||
list='$(ALL_PORTS_BASE_HEADERS)'; for p in $$list; do \
|
||||
|
@@ -22,10 +22,6 @@
|
||||
<set var="PLATFORM_MACOS">0</set>
|
||||
</if>
|
||||
|
||||
<!-- FIXME: PalmOS is another candidate to bakefiles -->
|
||||
<set var="PLATFORM_PALMOS">0</set>
|
||||
|
||||
|
||||
<include file="config.bkl"/>
|
||||
|
||||
<include file="plugins_deps.bkl"/>
|
||||
|
@@ -268,35 +268,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/os2/wxrsc.h
|
||||
</set>
|
||||
|
||||
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
|
||||
<!-- PalmOS -->
|
||||
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
|
||||
|
||||
<set var="BASE_PALMOS_SRC" hints="files">
|
||||
src/palmos/base.cpp
|
||||
src/palmos/dir.cpp
|
||||
src/palmos/prefconf.cpp
|
||||
src/palmos/snglinst.cpp
|
||||
src/palmos/stdall.c
|
||||
src/palmos/thread.cpp
|
||||
src/palmos/utils.cpp
|
||||
src/palmos/utilsexc.cpp
|
||||
</set>
|
||||
|
||||
<set var="BASE_AND_GUI_PALMOS_SRC" hints="files">
|
||||
src/palmos/main.cpp
|
||||
src/palmos/volume.cpp
|
||||
</set>
|
||||
|
||||
<set var="BASE_PALMOS_HDR" hints="files">
|
||||
wx/palmos/apptbase.h
|
||||
wx/palmos/apptrait.h
|
||||
wx/palmos/chkconf.h
|
||||
wx/palmos/mimetype.h
|
||||
wx/palmos/missing.h
|
||||
wx/palmos/stdpaths.h
|
||||
</set>
|
||||
|
||||
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
|
||||
<!-- MSDOS -->
|
||||
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
|
||||
@@ -3794,7 +3765,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
<if cond="PLATFORM_WIN32=='1'">$(BASE_WIN32_SRC) $(BASE_WINCE_SRC)</if>
|
||||
<if cond="PLATFORM_MACOSX=='1'">$(BASE_OSX_SHARED_SRC)</if>
|
||||
<if cond="PLATFORM_OS2=='1'">$(BASE_OS2_SRC)</if>
|
||||
<if cond="PLATFORM_PALMOS=='1'">$(BASE_PALMOS_SRC)</if>
|
||||
<if cond="PLATFORM_MSDOS=='1'">$(BASE_MSDOS_SRC)</if>
|
||||
</set>
|
||||
<set var="BASE_AND_GUI_TOOLKIT_SRC" hints="files">
|
||||
@@ -3803,7 +3773,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
</set>
|
||||
<set var="BASE_AND_GUI_PLATFORM_SRC" hints="files">
|
||||
<if cond="PLATFORM_WIN32=='1'">$(BASE_AND_GUI_WIN32_SRC)</if>
|
||||
<if cond="PLATFORM_PALMOS=='1'">$(BASE_AND_GUI_PALMOS_SRC)</if>
|
||||
<if cond="PLATFORM_MSDOS=='1'">$(BASE_AND_GUI_MSDOS_SRC)</if>
|
||||
<!-- At the moment, BASE_AND_GUI_TOOLKIT_SRC handles this -->
|
||||
<!-- if cond="PLATFORM_MACOS=='1'">$(BASE_AND_GUI_MAC_SRC)</if -->
|
||||
@@ -3828,7 +3797,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
<if cond="PLATFORM_UNIX=='1'">$(BASE_UNIX_HDR)</if>
|
||||
<if cond="PLATFORM_WIN32=='1'">$(BASE_WIN32_HDR) $(BASE_WINCE_HDR)</if>
|
||||
<if cond="PLATFORM_MACOSX=='1'">$(BASE_OSX_HDR)</if>
|
||||
<if cond="PLATFORM_PALMOS=='1'">$(BASE_PALMOS_HDR)</if>
|
||||
<if cond="PLATFORM_MSDOS=='1'">$(BASE_MSDOS_HDR)</if>
|
||||
<if cond="PLATFORM_OS2=='1'">$(BASE_OS2_HDR)</if>
|
||||
</set>
|
||||
@@ -4043,7 +4011,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
$(BASE_UNIX_HDR)
|
||||
$(BASE_WIN32_HDR) $(BASE_WINCE_HDR)
|
||||
$(BASE_OSX_HDR)
|
||||
$(BASE_PALMOS_HDR)
|
||||
$(BASE_MSDOS_HDR)
|
||||
$(NET_CMN_HDR)
|
||||
$(XML_HDR)
|
||||
@@ -4056,7 +4023,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
$(BASE_OSX_SRC)
|
||||
$(BASE_OS2_SRC)
|
||||
$(BASE_MSDOS_SRC)
|
||||
$(BASE_PALMOS_SRC)
|
||||
$(BASE_AND_GUI_CMN_SRC)
|
||||
$(BASE_AND_GUI_OSX_CARBON_SRC)
|
||||
$(BASE_AND_GUI_OSX_COCOA_SRC)
|
||||
|
@@ -303,7 +303,6 @@ BASE_DIST: ALL_DIST INTL_DIST
|
||||
mkdir $(DISTDIR)/include/wx/osx/carbon
|
||||
mkdir $(DISTDIR)/include/wx/osx/core
|
||||
mkdir $(DISTDIR)/include/wx/os2
|
||||
mkdir $(DISTDIR)/include/wx/palmos
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
mkdir $(DISTDIR)/src/osx
|
||||
mkdir $(DISTDIR)/src/osx/core
|
||||
@@ -311,7 +310,6 @@ BASE_DIST: ALL_DIST INTL_DIST
|
||||
mkdir $(DISTDIR)/src/msdos
|
||||
mkdir $(DISTDIR)/src/msw
|
||||
mkdir $(DISTDIR)/src/os2
|
||||
mkdir $(DISTDIR)/src/palmos
|
||||
$(CP_P) $(DOCDIR)/base/readme.txt $(DISTDIR)/README.txt
|
||||
$(CP_P) $(WXDIR)/src/common/*.inc $(DISTDIR)/src/common
|
||||
list='$(ALL_PORTS_BASE_HEADERS)'; for p in $$list; do \
|
||||
|
@@ -38,7 +38,7 @@ SolidCompression=yes
|
||||
|
||||
[Files]
|
||||
; source files
|
||||
Source: "{#INNODIR}\*"; DestDir: "{app}"; Excludes: ".cvsignore,cocoa,dfb,mac,gtk,gtk1,mgl,motif,msdos,os2,palmos,wxWindows.xcod*,x11,debian,distrib,docs,misc,tests,wxPython,*.pch,*.pch++,*.pchmm"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "{#INNODIR}\*"; DestDir: "{app}"; Excludes: ".cvsignore,cocoa,dfb,mac,gtk,gtk1,mgl,motif,msdos,os2,wxWindows.xcod*,x11,debian,distrib,docs,misc,tests,wxPython,*.pch,*.pch++,*.pchmm"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; docs and helpfile
|
||||
Source: "{#INNODIR}\docs\htmlhelp\*"; DestDir: "{app}\docs\htmlhelp\"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "{#INNODIR}\docs\licence.txt"; DestDir: "{app}\docs\"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
|
@@ -101,7 +101,6 @@ update_common_setup_h include/wx/msw/setup0.h
|
||||
update_common_setup_h include/wx/msw/wince/setup.h
|
||||
update_common_setup_h include/wx/osx/setup0.h
|
||||
update_common_setup_h include/wx/os2/setup0.h
|
||||
update_common_setup_h include/wx/palmos/setup0.h
|
||||
update_common_setup_h include/wx/univ/setup0.h
|
||||
update_common_setup_h setup.h.in
|
||||
|
||||
|
@@ -57,7 +57,6 @@ always tested using @ifdef_ and not @if_.
|
||||
@itemdef{__WXOSX_MAC__, Mac OS X (Carbon or Cocoa)}
|
||||
@itemdef{__WXOSX_OR_COCOA__, Any Mac OS X port (wxOSX-Carbon, wxOSX-Cocoa or
|
||||
wxCocoa)}
|
||||
@itemdef{__WXPALMOS__, PalmOS}
|
||||
@itemdef{__WXPM__, OS/2 native Presentation Manager}
|
||||
@itemdef{__WXSTUBS__, Stubbed version ('template' wxWin implementation)}
|
||||
@itemdef{__WXXT__, Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x}
|
||||
@@ -104,7 +103,6 @@ symbols, although this has not always been followed.
|
||||
@itemdef{__MACH__, Mach-O Architecture (Mac OS X only builds)}
|
||||
@itemdef{__OSF__, OSF/1}
|
||||
@itemdef{__QNX__, QNX Neutrino RTOS}
|
||||
@itemdef{__PALMOS__, PalmOS}
|
||||
@itemdef{__SGI__, IRIX}
|
||||
@itemdef{__SOLARIS__, Solaris}
|
||||
@itemdef{__SUN__, Any Sun}
|
||||
|
@@ -1,128 +0,0 @@
|
||||
wxPalm README
|
||||
=============
|
||||
|
||||
NB: wxPalm is currently in pre-alpha stage -- but it's already fun!
|
||||
|
||||
I. Building wxPalm under Windows
|
||||
--------------------------------
|
||||
|
||||
First, you need the freely distributable Palm OS Developer Studio available at
|
||||
|
||||
http://www.palmos.com/dev/tools/dev_suite.html
|
||||
|
||||
Beware, its installation takes about 500Mb (+ 150 Mb of cygwin if not installed
|
||||
yet), so make sure you have enough disk space for it and for wxWidgets build
|
||||
tree (another 50Mb). Last tested set: PODS 1.2, SDK 6.1, wxWidgets 2.7.0.
|
||||
|
||||
The Developer Studio is Eclipse-based and so is a GUI environment, however it
|
||||
is also possible to build Palm applications from the command line using the
|
||||
usual GNU tools. Both methods are covered below, choose one which you prefer.
|
||||
|
||||
a) Using command line tools:
|
||||
- If you have installed Developer Studio in a non default location (e.g.
|
||||
d:\PalmOS), you will need to set the environment variables:
|
||||
|
||||
set TOOLS_DIR=D:/PalmOS/PalmOSTools/
|
||||
set SDK_LOCATION=D:/PalmOS/sdk-6/
|
||||
|
||||
Don't use backslashes and don't forget the trailing slash. On the bright
|
||||
side, spaces don't need to be escaped in any way.
|
||||
|
||||
- create a lib/gcc_lib/palmos/wx directory
|
||||
- copy include/wx/palmos/setup0.h to lib/gcc_lib/palmos/wx/setup.h
|
||||
TODO: modify Makefile to do it automatically
|
||||
|
||||
- ensure that the directories d:\PalmOS\PalmOSTools and the one containing
|
||||
GNU tools (i.e. cygwin bin directory) are in your PATH
|
||||
|
||||
- go to build/palmos and run make
|
||||
|
||||
- you should end up with DebugSim/wxWidgets.prc: this is the Palm database
|
||||
which you can load into the emulator
|
||||
|
||||
- to test it, run the emulator (you need PalmOS 6 one!) after seting
|
||||
another env var:
|
||||
|
||||
set PALMSOURCE_SIM_PATH=wxWindows\build\palmos\DebugSim
|
||||
|
||||
wait until the emulator finishes to boot, right click it and choose
|
||||
"Install" in the menu, select wxWindows.prc in the file open dialog.
|
||||
You should see "Minimal App" with a familiar icon appear in the list,
|
||||
click it and it should start.
|
||||
|
||||
|
||||
b) Using IDE:
|
||||
TODO: write this after checking that the instructions below work
|
||||
|
||||
|
||||
|
||||
|
||||
Original note from William Osborne follows:
|
||||
|
||||
wxWidgets 2.5.3 CVS 10-18-2004
|
||||
------------------------------
|
||||
|
||||
This is a Palm OS 6 port of the wxWidgets toolkit. Included in the source
|
||||
package is the complete source necessary to build the Palm OS port using the
|
||||
Palm OS Developer Studio. Also included is the diff showing the changes that
|
||||
need to be incorporated into the wxWidgets 2.5.3 CVS source tree before the
|
||||
Palm OS port can be integrated.
|
||||
|
||||
I am releasing this port to the wxWidgets team under the terms of the wxWindows
|
||||
license. A copy of the wxWindows license is included in the source package.
|
||||
|
||||
No third party libraries or code were used in making this port. The port consists
|
||||
entirely of code I personally wrote combined with code that was included in the
|
||||
wxWidgets 2.5.3 CSV source tree. Whenever possible, I have used the Palm OS 6 API,
|
||||
in places where the API was not practical to use, I wrote my own functions.
|
||||
|
||||
I am submitting this source package as an entry in the wxWidgets Palm OS 6 port
|
||||
challenge. Details on this challenge are available at:
|
||||
http://www.wxwidgets.org/about/news/palmos.htm
|
||||
|
||||
Please note that this port is in a very early state. Currently the port
|
||||
provides limited functionality for the wxFrame, wxMenu, wxStatusBar,
|
||||
wxTopLevelWindow, and wxWindow classes. The other classes in the wxWidgets
|
||||
toolkit still need to be ported. In it's current state, the Palm OS 6 port
|
||||
is capable of running the minimal wxWidgets sample
|
||||
|
||||
The easiest way to see the port in action is to build the source package with
|
||||
the Palm OS Developer Studio available at http://www.palmos.com/dev/dl/dl_tools/dl_pods/
|
||||
Here are the steps that you need to follow to build the package:
|
||||
|
||||
1) Unpack the ZIP file into a directory located within the Palm OS Developer
|
||||
Studio workspace directory. The path to the folder should look something
|
||||
like this: "C:\Program Files\PalmSource\Palm OS Developer Suite\workspace\wxWidgets"
|
||||
|
||||
2) Open Palm OS Developer Studio and click on File->Import.
|
||||
|
||||
3) Select "Existing Project into Workspace" as the import source and click Next.
|
||||
|
||||
4) On the next screen click the Browse button next to Project contents and select
|
||||
the folder you unpacked the source package into. Click on Finish to continue.
|
||||
|
||||
5) You should now see the project listed in the Project pane on the right side of the
|
||||
window. Click on the name of the project. Now click on the Project menu and select
|
||||
"Rebuild Project"
|
||||
|
||||
6) After the build is complete, click on the Run menu and select "" The Palm OS 6 simulator
|
||||
should start. If this is the first time you have used the simulator, you will be prompted
|
||||
to choose a ROM file. You can find the ROM files in a folder like "C:\Program
|
||||
Files\PalmSource\Palm OS Developer Suite\sdk-6\tools\Simulator\6.0.1\ROM" It doesn't
|
||||
really matter whether you choose a Release or a Debug ROM (the debug ROM generates extra
|
||||
reports when an application crashes.)
|
||||
|
||||
7) You should see the Palm logo appear in the simulator window. You may get a dialog box
|
||||
asking you to choose a language. Click OK to continue. You should see the simulator
|
||||
initialize the built-in Palm applications. After a few moments, the wxWidgets minimal
|
||||
sample should start. Have fun!
|
||||
|
||||
Since this source package was based on the wxWidgets 2.5.3 CVS source tree dated October 18,
|
||||
2004 I don't anticipate any problems with merging the sources into the 2.5.3 source tree.
|
||||
|
||||
If you have any questions or comments about the port, please feel free to send an email to
|
||||
the wxWidgets developer list or directly to me at wbo@freeshell.org
|
||||
|
||||
Enjoy!
|
||||
William Osborne
|
||||
wbo@freeshell.org
|
@@ -58,7 +58,7 @@ both are supported). wxWidgets includes many code pieces for
|
||||
optimising dialog and general layout for small screens such as those
|
||||
of the recent netbooks and mobile phones and tablets.</P>
|
||||
<P ALIGN=JUSTIFY>There is varying support for other platforms or
|
||||
toolkits such as OS/2, Motif, GTK 1.2, PalmOS and various mobile
|
||||
toolkits such as OS/2, Motif, GTK 1.2 and various mobile
|
||||
Linux variants using GTK+ or the Hildon framework and also a version
|
||||
for OS X using the Cocoa API and even the iPhone SDK.</P>
|
||||
<H3 CLASS="western">Documentation in Doxygen</H3>
|
||||
|
@@ -16,7 +16,6 @@ The following platforms are supported:
|
||||
- Mac OS X using Cocoa (beta)
|
||||
- OS/2 (beta)
|
||||
- MGL for Linux and DOS
|
||||
- Palm OS (alpha)
|
||||
|
||||
To get wxWidgets, please go to the Download page at:
|
||||
|
||||
|
@@ -191,8 +191,6 @@ protected:
|
||||
// #include "wx/cocoa/anybutton.h"
|
||||
//#elif defined(__WXPM__)
|
||||
// #include "wx/os2/anybutton.h"
|
||||
//#elif defined(__WXPALMOS__)
|
||||
// #include "wx/palmos/anybutton.h"
|
||||
#else
|
||||
typedef wxAnyButtonBase wxAnyButton;
|
||||
#endif
|
||||
|
@@ -681,9 +681,7 @@ protected:
|
||||
// now include the declaration of the real class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/app.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/app.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/app.h"
|
||||
|
@@ -177,9 +177,7 @@ private:
|
||||
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
|
||||
// Unix code (and otherwise __UNIX__ wouldn't be defined)
|
||||
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/apptbase.h"
|
||||
#elif defined(__WIN32__)
|
||||
#if defined(__WIN32__)
|
||||
#include "wx/msw/apptbase.h"
|
||||
#elif defined(__UNIX__) && !defined(__EMX__)
|
||||
#include "wx/unix/apptbase.h"
|
||||
@@ -274,9 +272,7 @@ public:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/apptrait.h"
|
||||
#elif defined(__WIN32__)
|
||||
#if defined(__WIN32__)
|
||||
#include "wx/msw/apptrait.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "wx/os2/apptrait.h"
|
||||
|
@@ -84,9 +84,9 @@ protected:
|
||||
#define wxBITMAP_SCREEN_DEPTH (-1)
|
||||
|
||||
|
||||
// All ports except wxMSW,wxOS2,wxPalmOS use wxBitmapHandler and wxBitmapBase as base class
|
||||
// for wxBitmapHandler; wxMSW,wxOS2,wxPalmOS use wxGDIImageHandler as base class
|
||||
// since it allows some code reuse there.
|
||||
// All ports except wxMSW and wxOS2 use wxBitmapHandler and wxBitmapBase as
|
||||
// base class for wxBitmapHandler; wxMSW and wxOS2 use wxGDIImageHandler as
|
||||
// base class since it allows some code reuse there.
|
||||
#if wxUSE_BITMAP_BASE
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -237,10 +237,7 @@ protected:
|
||||
|
||||
// the wxBITMAP_DEFAULT_TYPE constant defines the default argument value
|
||||
// for wxBitmap's ctor and wxBitmap::LoadFile() functions.
|
||||
#if defined(__WXPALMOS__)
|
||||
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
|
||||
#include "wx/palmos/bitmap.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
|
||||
#include "wx/msw/bitmap.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
@@ -130,8 +130,6 @@ protected:
|
||||
#include "wx/cocoa/bmpbuttn.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/bmpbuttn.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BMPBUTTON
|
||||
|
@@ -70,9 +70,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/brush.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/brush.h"
|
||||
#elif defined(__WXMOTIF__) || defined(__WXX11__)
|
||||
#include "wx/x11/brush.h"
|
||||
|
@@ -15,9 +15,7 @@
|
||||
#include "wx/chartype.h"
|
||||
#include "wx/wxcrtbase.h"
|
||||
|
||||
#ifndef __WXPALMOS5__
|
||||
#include <stdlib.h> // malloc() and free()
|
||||
#endif // ! __WXPALMOS5__
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxCStrData;
|
||||
|
||||
|
@@ -63,8 +63,6 @@ protected:
|
||||
#include "wx/cocoa/button.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/button.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/button.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_BUTTON
|
||||
|
@@ -105,8 +105,6 @@
|
||||
#define wxHAVE_TCHAR_SUPPORT
|
||||
#elif defined(__DMC__)
|
||||
#define wxHAVE_TCHAR_SUPPORT
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include <stddef.h>
|
||||
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
|
||||
#define wxHAVE_TCHAR_SUPPORT
|
||||
#include <stddef.h>
|
||||
|
@@ -184,8 +184,6 @@ private:
|
||||
#elif defined(__WXPM__)
|
||||
#undef wxHAS_3STATE_CHECKBOX
|
||||
#include "wx/os2/checkbox.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/checkbox.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHECKBOX
|
||||
|
@@ -748,7 +748,7 @@
|
||||
#endif /* !defined(wxUSE_HTML) */
|
||||
|
||||
#ifndef wxUSE_LIBMSPACK
|
||||
# if !defined(__UNIX__) || defined(__WXPALMOS__)
|
||||
# if !defined(__UNIX__)
|
||||
/* set to 0 on platforms that don't have libmspack */
|
||||
# define wxUSE_LIBMSPACK 0
|
||||
# else
|
||||
@@ -1201,9 +1201,7 @@
|
||||
checks use wxUSE_XXX symbols in #if tests.
|
||||
*/
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
# include "wx/palmos/chkconf.h"
|
||||
#elif defined(__WXWINCE__)
|
||||
#if defined(__WXWINCE__)
|
||||
# include "wx/msw/wince/chkconf.h"
|
||||
#elif defined(__WXMSW__)
|
||||
# include "wx/msw/chkconf.h"
|
||||
@@ -1634,9 +1632,7 @@
|
||||
#ifndef wxUSE_NATIVE_STATUSBAR
|
||||
# define wxUSE_NATIVE_STATUSBAR 0
|
||||
#elif wxUSE_NATIVE_STATUSBAR
|
||||
# if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
|
||||
defined(__WXMAC__) || \
|
||||
defined(__WXPALMOS__) )
|
||||
# if defined(__WXUNIVERSAL__) || !(defined(__WXMSW__) || defined(__WXMAC__))
|
||||
# undef wxUSE_NATIVE_STATUSBAR
|
||||
# define wxUSE_NATIVE_STATUSBAR 0
|
||||
# endif
|
||||
@@ -1987,7 +1983,7 @@
|
||||
#endif /* wxUSE_FILEDLG */
|
||||
|
||||
#if !wxUSE_GAUGE || !wxUSE_BUTTON
|
||||
# if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__)
|
||||
# if wxUSE_PROGRESSDLG
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
|
||||
# else
|
||||
@@ -2048,7 +2044,7 @@
|
||||
# define wxUSE_RADIOBTN 1
|
||||
# endif
|
||||
# endif
|
||||
# if !wxUSE_STATBOX && !defined(__WXPALMOS__)
|
||||
# if !wxUSE_STATBOX
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
|
||||
# else
|
||||
|
@@ -84,8 +84,6 @@ private:
|
||||
#include "wx/cocoa/choice.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/choice.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/choice.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_CHOICE
|
||||
|
@@ -24,8 +24,6 @@
|
||||
#include "wx/osx/colordlg.h"
|
||||
#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/colordlg.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/colordlg.h"
|
||||
#else
|
||||
#include "wx/generic/colrdlgg.h"
|
||||
|
||||
|
@@ -213,9 +213,7 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
|
||||
|
||||
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/generic/colour.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/colour.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/colour.h"
|
||||
|
@@ -28,9 +28,6 @@
|
||||
#elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE
|
||||
#include "wx/os2/iniconf.h"
|
||||
#define wxConfig wxIniConfig
|
||||
#elif defined(__WXPALMOS__) && wxUSE_CONFIG_NATIVE
|
||||
#include "wx/palmos/prefconf.h"
|
||||
#define wxConfig wxPrefConfig
|
||||
#else // either we're under Unix or wish to always use config files
|
||||
#include "wx/fileconf.h"
|
||||
#define wxConfig wxFileConfig
|
||||
|
@@ -221,8 +221,6 @@ protected:
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/control.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/control.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/control.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
@@ -34,10 +34,7 @@ public:
|
||||
|
||||
*/
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
|
||||
#include "wx/palmos/cursor.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
|
||||
#include "wx/msw/cursor.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
@@ -76,11 +76,7 @@ public:
|
||||
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
|
||||
};
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/datectrl.h"
|
||||
|
||||
#define wxHAS_NATIVE_DATEPICKCTRL
|
||||
#elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/msw/datectrl.h"
|
||||
|
||||
#define wxHAS_NATIVE_DATEPICKCTRL
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
#ifdef __WXWINCE__
|
||||
#include "wx/msw/wince/time.h"
|
||||
#elif !defined(__WXPALMOS5__)
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif // OS
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#ifndef _WX_DEBUG_H_
|
||||
#define _WX_DEBUG_H_
|
||||
|
||||
#if !defined(__WXPALMOS5__) && !defined(__WXWINCE__)
|
||||
#if !defined(__WXWINCE__)
|
||||
#include <assert.h>
|
||||
#endif // systems without assert.h
|
||||
|
||||
|
@@ -31,11 +31,8 @@
|
||||
/* Make sure the environment is set correctly */
|
||||
# if defined(__WXMSW__) && defined(__X__)
|
||||
# error "Target can't be both X and Windows"
|
||||
# elif defined(__WXMSW__) && defined(__PALMOS__)
|
||||
# error "Target can't be both PalmOS and Windows"
|
||||
# elif !defined(__WXMOTIF__) && \
|
||||
!defined(__WXMSW__) && \
|
||||
!defined(__WXPALMOS__)&& \
|
||||
!defined(__WXGTK__) && \
|
||||
!defined(__WXPM__) && \
|
||||
!defined(__WXOSX_CARBON__) && \
|
||||
@@ -403,11 +400,9 @@ typedef short int WXTYPE;
|
||||
|
||||
#ifndef HAVE_WOSTREAM
|
||||
/*
|
||||
Mingw <= 3.4 and all versions of Cygwin as well as any gcc version (so
|
||||
far) targeting PalmOS don't have std::wostream
|
||||
Mingw <= 3.4 and all versions of Cygwin don't have std::wostream
|
||||
*/
|
||||
#if defined(__PALMOS__) || \
|
||||
(defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \
|
||||
#if (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \
|
||||
defined(__CYGWIN__)
|
||||
#define wxNO_WOSTREAM
|
||||
#endif
|
||||
@@ -579,7 +574,7 @@ typedef short int WXTYPE;
|
||||
/* NULL declaration: it must be defined as 0 for C++ programs (in particular, */
|
||||
/* it must not be defined as "(void *)0" which is standard for C but completely */
|
||||
/* breaks C++ code) */
|
||||
#if !defined(__HANDHELDPC__) && !defined(__PALMOS__)
|
||||
#if !defined(__HANDHELDPC__)
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
@@ -782,7 +777,7 @@ enum { wxDefaultCoord = -1 };
|
||||
/* define fixed length types */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
||||
#if defined(__WXPALMOS__) || defined(__MINGW32__)
|
||||
#if defined(__MINGW32__)
|
||||
#if !defined(__MWERKS__)
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -834,19 +829,7 @@ typedef wxUint16 wxWord;
|
||||
*/
|
||||
|
||||
/* 32bit */
|
||||
#ifdef __PALMOS__
|
||||
typedef int wxInt32;
|
||||
typedef unsigned int wxUint32;
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_WCHAR_T 2
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#ifdef __WXPALMOS6__
|
||||
#define wxSIZE_T_IS_UINT
|
||||
#endif
|
||||
#define SIZEOF_VOID_P 4
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#elif defined(__WINDOWS__)
|
||||
#if defined(__WINDOWS__)
|
||||
#if defined(__WIN32__)
|
||||
typedef int wxInt32;
|
||||
typedef unsigned int wxUint32;
|
||||
@@ -1033,14 +1016,6 @@ typedef wxUint32 wxDword;
|
||||
#error "The 64 bit integer support in CodeWarrior has been disabled."
|
||||
#error "See the documentation on the 'longlong' pragma."
|
||||
#endif
|
||||
#elif defined(__WXPALMOS__)
|
||||
#if defined(__WXPALMOS6__)
|
||||
#define wxLongLong_t int64_t
|
||||
#else
|
||||
#define wxLongLong_t long long
|
||||
#endif /* __WXPALMOS6__ */
|
||||
#define wxLongLongSuffix ll
|
||||
#define wxLongLongFmtSpec "ll"
|
||||
#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
|
||||
#define wxLongLong_t long long
|
||||
#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
|
||||
@@ -1060,16 +1035,7 @@ typedef wxUint32 wxDword;
|
||||
|
||||
|
||||
#ifdef wxLongLong_t
|
||||
|
||||
#ifdef __WXPALMOS__
|
||||
#if defined(__WXPALMOS6__)
|
||||
#define wxULongLong_t uint64_t
|
||||
#else
|
||||
#define wxULongLong_t unsigned long long
|
||||
#endif /* __WXPALMOS6__ */
|
||||
#else
|
||||
#define wxULongLong_t unsigned wxLongLong_t
|
||||
#endif
|
||||
|
||||
/*
|
||||
wxLL() and wxULL() macros allow to define 64 bit constants in a
|
||||
@@ -1119,8 +1085,6 @@ typedef wxUint32 wxDword;
|
||||
#if defined(_SSIZE_T_) || defined(_SSIZE_T_DEFINED)
|
||||
#define HAVE_SSIZE_T
|
||||
#endif
|
||||
#elif defined(__PALMOS__)
|
||||
#define HAVE_SSIZE_T
|
||||
#elif wxCHECK_WATCOM_VERSION(1,4)
|
||||
#define HAVE_SSIZE_T
|
||||
#endif
|
||||
@@ -1871,14 +1835,12 @@ enum wxBorder
|
||||
/* Old names for compatibility */
|
||||
#define wxRA_HORIZONTAL wxHORIZONTAL
|
||||
#define wxRA_VERTICAL wxVERTICAL
|
||||
#define wxRA_USE_CHECKBOX 0x0010 /* alternative native subcontrols (wxPalmOS) */
|
||||
|
||||
/*
|
||||
* wxRadioButton style flag
|
||||
*/
|
||||
#define wxRB_GROUP 0x0004
|
||||
#define wxRB_SINGLE 0x0008
|
||||
#define wxRB_USE_CHECKBOX 0x0010 /* alternative native control (wxPalmOS) */
|
||||
|
||||
/*
|
||||
* wxScrollBar flags
|
||||
@@ -3042,41 +3004,6 @@ typedef WX_NSString* WXGLPixelFormat;
|
||||
|
||||
#endif /* __WXMAC__ */
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
|
||||
typedef void * WXHWND;
|
||||
typedef void * WXHANDLE;
|
||||
typedef void * WXHICON;
|
||||
typedef void * WXHFONT;
|
||||
typedef void * WXHMENU;
|
||||
typedef void * WXHPEN;
|
||||
typedef void * WXHBRUSH;
|
||||
typedef void * WXHPALETTE;
|
||||
typedef void * WXHCURSOR;
|
||||
typedef void * WXHRGN;
|
||||
typedef void * WXHACCEL;
|
||||
typedef void * WXHINSTANCE;
|
||||
typedef void * WXHBITMAP;
|
||||
typedef void * WXHIMAGELIST;
|
||||
typedef void * WXHGLOBAL;
|
||||
typedef void * WXHDC;
|
||||
typedef unsigned int WXUINT;
|
||||
typedef unsigned long WXDWORD;
|
||||
typedef unsigned short WXWORD;
|
||||
|
||||
typedef unsigned long WXCOLORREF;
|
||||
typedef struct tagMSG WXMSG;
|
||||
|
||||
typedef WXHWND WXWINHANDLE; /* WinHandle of PalmOS */
|
||||
typedef WXWINHANDLE WXWidget;
|
||||
|
||||
typedef void * WXFORMPTR;
|
||||
typedef void * WXEVENTPTR;
|
||||
typedef void * WXRECTANGLEPTR;
|
||||
|
||||
#endif /* __WXPALMOS__ */
|
||||
|
||||
|
||||
/* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */
|
||||
#if defined(__WIN32__)
|
||||
|
||||
|
@@ -350,9 +350,7 @@ public:
|
||||
#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
|
||||
#include "wx/univ/dialog.h"
|
||||
#else
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/dialog.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dialog.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dialog.h"
|
||||
|
@@ -118,7 +118,6 @@ protected:
|
||||
defined(__WXX11__) || \
|
||||
defined(__WXMGL__) || \
|
||||
defined(__WXCOCOA__) || \
|
||||
defined(__WXPALMOS__) || \
|
||||
defined(__WXPM__)
|
||||
#include "wx/generic/dirdlgg.h" // Other ports use generic implementation
|
||||
#define wxDirDialog wxGenericDirDialog
|
||||
|
@@ -35,7 +35,6 @@
|
||||
struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
|
||||
{
|
||||
wxString facename; // may be empty meaning "any"
|
||||
#ifndef __WXPALMOS__
|
||||
wxFontEncoding encoding; // so that we know what this struct represents
|
||||
|
||||
#if defined(__WXMSW__) || \
|
||||
@@ -60,7 +59,6 @@ struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
|
||||
#else
|
||||
#error "Unsupported toolkit"
|
||||
#endif
|
||||
#endif // !__WXPALMOS__
|
||||
// this struct is saved in config by wxFontMapper, so it should know to
|
||||
// serialise itself (implemented in platform-specific code)
|
||||
bool FromString(const wxString& s);
|
||||
|
@@ -233,9 +233,7 @@ private:
|
||||
// integration with MFC) but currently this is not done for all ports yet (e.g.
|
||||
// wxX11) so fall back to the old wxGUIEventLoop definition below for them
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/evtloop.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
// this header defines both console and GUI loops for MSW
|
||||
#include "wx/msw/evtloop.h"
|
||||
#elif defined(__WXOSX__)
|
||||
|
@@ -232,9 +232,6 @@ wxSaveFileSelector(const wxString& what,
|
||||
#include "wx/cocoa/filedlg.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/filedlg.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#define wxHAS_GENERIC_FILEDIALOG
|
||||
#include "wx/generic/filedlgg.h"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_FILEDLG
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include "wx/list.h"
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
#ifndef __WXPALMOS5__
|
||||
#ifdef __WXWINCE__
|
||||
#include "wx/msw/wince/time.h"
|
||||
#include "wx/msw/private.h"
|
||||
@@ -40,7 +39,6 @@
|
||||
#include <unix.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif // !__WXPALMOS5__
|
||||
|
||||
#ifdef __OS2__
|
||||
// need to check for __OS2__ first since currently both
|
||||
@@ -85,11 +83,10 @@
|
||||
#include <dir.h>
|
||||
#endif
|
||||
|
||||
#ifndef __WXPALMOS5__
|
||||
#ifndef __WXWINCE__
|
||||
#include <fcntl.h> // O_RDONLY &c
|
||||
#endif
|
||||
#endif // !__WXPALMOS5__
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -115,8 +112,6 @@
|
||||
typedef long off_t;
|
||||
#elif defined(__MWERKS__) && !defined(__INTEL__) && !defined(__MACH__)
|
||||
typedef long off_t;
|
||||
#elif defined(__WXPALMOS5__)
|
||||
typedef long off_t;
|
||||
#endif
|
||||
|
||||
enum wxSeekMode
|
||||
@@ -205,7 +200,7 @@ enum wxPosixPermissions
|
||||
#define wxCRT_RmDir _wrmdir
|
||||
#define wxCRT_Stat _wstat
|
||||
#define wxStructStat struct _stat
|
||||
#elif (defined(__WXMSW__) || defined(__OS2__)) && !defined(__WXPALMOS__) && \
|
||||
#elif (defined(__WXMSW__) || defined(__OS2__)) && \
|
||||
( \
|
||||
defined(__VISUALC__) || \
|
||||
defined(__MINGW64__) || \
|
||||
@@ -474,43 +469,6 @@ enum wxPosixPermissions
|
||||
// private defines, undefine so that nobody gets tempted to use
|
||||
#undef wxHAS_HUGE_FILES
|
||||
#undef wxHAS_HUGE_STDIO_FILES
|
||||
#elif defined (__WXPALMOS__)
|
||||
typedef off_t wxFileOffset;
|
||||
#ifdef _LARGE_FILES
|
||||
#define wxFileOffsetFmtSpec wxLongLongFmtSpec
|
||||
wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t), BadFileSizeType );
|
||||
// wxFile is present and supports large files
|
||||
#ifdef wxUSE_FILE
|
||||
#define wxHAS_LARGE_FILES
|
||||
#endif
|
||||
// wxFFile is present and supports large files
|
||||
#if SIZEOF_LONG == 8 || defined HAVE_FSEEKO
|
||||
#define wxHAS_LARGE_FFILES
|
||||
#endif
|
||||
#else
|
||||
#define wxFileOffsetFmtSpec wxT("")
|
||||
#endif
|
||||
#define wxClose close
|
||||
#define wxRead ::read
|
||||
#define wxWrite ::write
|
||||
#define wxLseek lseek
|
||||
#define wxSeek lseek
|
||||
#define wxFsync fsync
|
||||
#define wxEof eof
|
||||
|
||||
#define wxCRT_MkDir mkdir
|
||||
#define wxCRT_RmDir rmdir
|
||||
|
||||
#define wxTell(fd) lseek(fd, 0, SEEK_CUR)
|
||||
|
||||
#define wxStructStat struct stat
|
||||
|
||||
#define wxCRT_Open open
|
||||
#define wxCRT_Stat svfs_stat
|
||||
#define wxCRT_Lstat lstat
|
||||
#define wxCRT_Access access
|
||||
|
||||
#define wxHAS_NATIVE_LSTAT
|
||||
#else // Unix or Windows using unknown compiler, assume POSIX supported
|
||||
typedef off_t wxFileOffset;
|
||||
#ifdef HAVE_LARGEFILE_SUPPORT
|
||||
@@ -770,9 +728,6 @@ WXDLLIMPEXP_BASE bool wxIsExecutable(const wxString &path);
|
||||
// CYGWIN also uses UNIX settings
|
||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
|
||||
#define wxPATH_SEP wxPATH_SEP_UNIX
|
||||
#elif defined(__WXPALMOS__)
|
||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
|
||||
#define wxPATH_SEP wxPATH_SEP_UNIX
|
||||
#elif defined(__MAC__)
|
||||
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC
|
||||
#define wxPATH_SEP wxPATH_SEP_MAC
|
||||
|
@@ -341,9 +341,7 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font);
|
||||
wxFont Scaled(float x) const
|
||||
|
||||
// include the real class declaration
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/font.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/font.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/font.h"
|
||||
|
@@ -251,9 +251,7 @@ protected:
|
||||
#if defined(__WXUNIVERSAL__) // && !defined(__WXMICROWIN__)
|
||||
#include "wx/univ/frame.h"
|
||||
#else // !__WXUNIVERSAL__
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/frame.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/frame.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/frame.h"
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
// because it's still widely used)
|
||||
bool Ok() const { return IsOk(); }
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXPALMOS__)
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
// Creates the resource
|
||||
virtual bool RealizeResource() { return false; }
|
||||
|
||||
|
@@ -22,10 +22,6 @@
|
||||
#include "wx/msw/wince/helpwce.h"
|
||||
|
||||
#define wxHelpController wxWinceHelpController
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/help.h"
|
||||
|
||||
#define wxHelpController wxPalmHelpController
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/helpchm.h"
|
||||
|
||||
|
@@ -23,10 +23,7 @@
|
||||
// constant defines the default argument value for wxIcon ctor and wxIcon::LoadFile()
|
||||
// functions.
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM
|
||||
#include "wx/generic/icon.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE
|
||||
#include "wx/msw/icon.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
@@ -42,7 +42,7 @@ enum
|
||||
#define wxIMAGELIST_DRAW_SELECTED 0x0004
|
||||
#define wxIMAGELIST_DRAW_FOCUSED 0x0008
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXPALMOS__)
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||
#define wxHAS_NATIVE_IMAGELIST
|
||||
#endif
|
||||
|
||||
@@ -52,8 +52,6 @@ enum
|
||||
#include "wx/msw/imaglist.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/osx/imaglist.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/imaglist.h"
|
||||
#endif
|
||||
|
||||
#endif // _WX_IMAGLIST_H_BASE_
|
||||
|
@@ -57,11 +57,9 @@ class WXDLLIMPEXP_FWD_BASE wxObject;
|
||||
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
#ifndef __WXPALMOS5__
|
||||
#ifndef __WXWINCE__
|
||||
#include <time.h> // for time_t
|
||||
#endif
|
||||
#endif // ! __WXPALMOS5__
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/hashmap.h"
|
||||
|
@@ -580,8 +580,6 @@ protected:
|
||||
#else // !wxUSE_BASE_CLASSES_ONLY
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/menu.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/menu.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/menu.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
@@ -189,8 +189,6 @@ inline void wxMenuItemBase::SetText(const wxString& text) { SetItemLabel(text);
|
||||
#else // !wxUSE_BASE_CLASSES_ONLY
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/menuitem.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/menuitem.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/menuitem.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
@@ -25,11 +25,7 @@
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if wxUSE_ENH_METAFILE
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/enhmeta.h"
|
||||
#else
|
||||
#include "wx/msw/enhmeta.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_WIN_METAFILES_ALWAYS
|
||||
// use normal metafiles as well
|
||||
@@ -45,12 +41,8 @@
|
||||
#define wxMETAFILE_IS_ENH
|
||||
#endif // wxUSE_WIN_METAFILES_ALWAYS
|
||||
#else // !wxUSE_ENH_METAFILE
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/metafile.h"
|
||||
#else
|
||||
#include "wx/msw/metafile.h"
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/metafile.h"
|
||||
#elif defined(__WXMAC__)
|
||||
|
@@ -16,9 +16,7 @@
|
||||
|
||||
#if wxUSE_MINIFRAME
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/minifram.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/minifram.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/minifram.h"
|
||||
|
@@ -290,8 +290,6 @@ private:
|
||||
#define wxMessageDialog wxGenericMessageDialog
|
||||
#elif defined(__WXCOCOA__)
|
||||
#include "wx/cocoa/msgdlg.h"
|
||||
#elif defined(__WXPALMOS__)
|
||||
#include "wx/palmos/msgdlg.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/msgdlg.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
@@ -28,9 +28,7 @@ public:
|
||||
virtual int GetColoursCount() const { wxFAIL_MSG( wxT("not implemented") ); return 0; }
|
||||
};
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
#include "wx/palmos/palette.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/palette.h"
|
||||
#elif defined(__WXX11__) || defined(__WXMOTIF__)
|
||||
#include "wx/x11/palette.h"
|
||||
|
@@ -1,94 +0,0 @@
|
||||
// Header generated by Constructor for Palm OS (R) 1.9
|
||||
//
|
||||
// Generated at 3:29:52 PM on Tuesday, June 24, 2003
|
||||
//
|
||||
// Generated for file: BasicApp.xrd
|
||||
//
|
||||
// THIS IS AN AUTOMATICALLY GENERATED HEADER FILE
|
||||
// DO NOT EDIT - CHANGES MADE TO THIS FILE WILL BE LOST
|
||||
//
|
||||
// Palm App Name: "BasicApp"
|
||||
//
|
||||
// Palm App Version: "1.0a1"
|
||||
|
||||
|
||||
// Resource: tFRM 1000
|
||||
#define MainForm 1000 //(Left Origin = 0, Top Origin = 0, Width = 160, Height = 160, Usable = 1, Modal = 0, Save Behind = 0, Help ID = 0, Menu Bar ID = 1000, Default Button ID = 0)
|
||||
#define MainContentLabel 1603 //(Left Origin = 32, Top Origin = 50, Usable = 1, Font = Bold)
|
||||
#define MainForm2Button 1001 //(Left Origin = 1, Top Origin = 147, Width = 39, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
|
||||
#define MainDialogButton 1002 //(Left Origin = 46, Top Origin = 147, Width = 39, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
|
||||
|
||||
// Resource: tFRM 1200
|
||||
#define DialogForm 1200 //(Left Origin = 2, Top Origin = 58, Width = 156, Height = 100, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 1200, Menu Bar ID = 0, Default Button ID = 1202)
|
||||
#define DialogOKButton 1201 //(Left Origin = 5, Top Origin = 83, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
|
||||
#define DialogCancelButton 1202 //(Left Origin = 47, Top Origin = 83, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
|
||||
#define DialogContentLabel 1203 //(Left Origin = 10, Top Origin = 23, Usable = 1, Font = Bold)
|
||||
|
||||
// Resource: tFRM 1300
|
||||
#define Form2Form 1300 //(Left Origin = 0, Top Origin = 0, Width = 160, Height = 160, Usable = 1, Modal = 0, Save Behind = 0, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0)
|
||||
#define Form2DoneButton 1301 //(Left Origin = 1, Top Origin = 147, Width = 36, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
|
||||
|
||||
// Resource: tFRM 2000
|
||||
#define AboutForm 2000 //(Left Origin = 2, Top Origin = 2, Width = 156, Height = 156, Usable = 1, Modal = 1, Save Behind = 1, Help ID = 0, Menu Bar ID = 0, Default Button ID = 0)
|
||||
#define AboutTitleLabel 2002 //(Left Origin = 54, Top Origin = 25, Usable = 1, Font = Bold 12)
|
||||
#define AboutText1Label 2003 //(Left Origin = 23, Top Origin = 54, Usable = 1, Font = Standard)
|
||||
#define AboutText2Label 2004 //(Left Origin = 50, Top Origin = 104, Usable = 1, Font = Bold)
|
||||
#define AboutOKButton 2005 //(Left Origin = 58, Top Origin = 139, Width = 40, Height = 12, Usable = 1, Anchor Left = 1, Frame = 1, Non-bold Frame = 1, Font = Standard)
|
||||
|
||||
|
||||
// Resource: MBAR 1000
|
||||
#define MainFormMenuBar 1000
|
||||
|
||||
|
||||
// Resource: MENU 1000
|
||||
#define MainOptionsMenu 1000
|
||||
#define MainOptionsAboutBasicApp 1000
|
||||
|
||||
|
||||
// Resource: tSTR 1200
|
||||
#define HelpID1200String 1200 // "Placeholder text for the modal dialog Tips button."
|
||||
|
||||
|
||||
// Resource: PICT 1000
|
||||
#define Largeicon1bitBitmap 1000
|
||||
|
||||
// Resource: PICT 1001
|
||||
#define Largeicon2bitBitmap 1001
|
||||
|
||||
// Resource: PICT 1002
|
||||
#define Largeicon8bitBitmap 1002
|
||||
|
||||
// Resource: PICT 1003
|
||||
#define LargeiconX21bitBitmap 1003
|
||||
|
||||
// Resource: PICT 1004
|
||||
#define LargeiconX22bitBitmap 1004
|
||||
|
||||
// Resource: PICT 1005
|
||||
#define LargeiconX28bitBitmap 1005
|
||||
|
||||
// Resource: PICT 1006
|
||||
#define Smallicon1bitBitmap 1006
|
||||
|
||||
// Resource: PICT 1007
|
||||
#define Smallicon2bitBitmap 1007
|
||||
|
||||
// Resource: PICT 1008
|
||||
#define Smallicon8bitBitmap 1008
|
||||
|
||||
// Resource: PICT 1009
|
||||
#define SmalliconX21bitBitmap 1009
|
||||
|
||||
// Resource: PICT 1010
|
||||
#define SmalliconX22bitBitmap 1010
|
||||
|
||||
// Resource: PICT 1011
|
||||
#define SmalliconX28bitBitmap 1011
|
||||
|
||||
|
||||
// Resource: taif 1000
|
||||
#define Largeicons12and8bitsAppIconFamily 1000
|
||||
|
||||
// Resource: taif 1001
|
||||
#define Smallicons12and8bitsAppIconFamily 1001
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<PALMOS_RESOURCE_FILE>
|
||||
|
||||
<APP_VERSION_RESOURCE RESOURCE_ID="1000">
|
||||
<TEXT> "1.0" </TEXT>
|
||||
</APP_VERSION_RESOURCE>
|
||||
|
||||
</PALMOS_RESOURCE_FILE>
|
@@ -1,46 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/accel.h
|
||||
// Purpose: wxAcceleratorTable class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCEL_H_
|
||||
#define _WX_ACCEL_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the accel table has all accelerators for a given window or menu
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject
|
||||
{
|
||||
public:
|
||||
// default ctor
|
||||
wxAcceleratorTable();
|
||||
|
||||
// load from .rc resource (Windows specific)
|
||||
wxAcceleratorTable(const wxString& resource);
|
||||
|
||||
// initialize from array
|
||||
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
|
||||
|
||||
virtual ~wxAcceleratorTable();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
void SetHACCEL(WXHACCEL hAccel);
|
||||
WXHACCEL GetHACCEL() const;
|
||||
|
||||
// translate the accelerator, return true if done
|
||||
bool Translate(wxWindow *window, WXMSG *msg) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_ACCEL_H_
|
@@ -1,107 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/app.h
|
||||
// Purpose: wxApp class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/17/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_APP_H_
|
||||
#define _WX_APP_H_
|
||||
|
||||
#include "wx/event.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFrame;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxApp;
|
||||
class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
|
||||
class WXDLLIMPEXP_FWD_BASE wxLog;
|
||||
|
||||
// Represents the application. Derive OnInit and declare
|
||||
// a new App object to start application
|
||||
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
|
||||
public:
|
||||
wxApp();
|
||||
virtual ~wxApp();
|
||||
|
||||
// override base class (pure) virtuals
|
||||
virtual bool Initialize(int& argc, wxChar **argv);
|
||||
virtual void CleanUp();
|
||||
|
||||
virtual void WakeUpIdle();
|
||||
|
||||
virtual void SetPrintMode(int mode) { m_printMode = mode; }
|
||||
virtual int GetPrintMode() const { return m_printMode; }
|
||||
|
||||
// implementation only
|
||||
void OnEndSession(wxCloseEvent& event);
|
||||
void OnQueryEndSession(wxCloseEvent& event);
|
||||
|
||||
#if wxUSE_EXCEPTIONS
|
||||
virtual bool OnExceptionInMainLoop();
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
|
||||
protected:
|
||||
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
||||
|
||||
public:
|
||||
// Implementation
|
||||
static bool RegisterWindowClasses();
|
||||
static bool UnregisterWindowClasses();
|
||||
|
||||
#if wxUSE_RICHEDIT
|
||||
// initialize the richedit DLL of (at least) given version, return true if
|
||||
// ok (Win95 has version 1, Win98/NT4 has 1 and 2, W2K has 3)
|
||||
static bool InitRichEdit(int version = 2);
|
||||
#endif // wxUSE_RICHEDIT
|
||||
|
||||
// returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it
|
||||
// wasn't found at all
|
||||
static int GetComCtl32Version();
|
||||
|
||||
// the SW_XXX value to be used for the frames opened by the application
|
||||
// (currently seems unused which is a bug -- TODO)
|
||||
static int m_nCmdShow;
|
||||
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxDECLARE_NO_COPY_CLASS(wxApp);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Palm OS specific wxEntry() overload and IMPLEMENT_WXWIN_MAIN definition
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifndef SW_SHOWNORMAL
|
||||
#define SW_SHOWNORMAL 1
|
||||
#endif
|
||||
|
||||
extern WXDLLIMPEXP_CORE int wxEntry();
|
||||
|
||||
#define wxIMPLEMENT_WXWIN_MAIN \
|
||||
\
|
||||
extern "C" { \
|
||||
\
|
||||
uint32_t PilotMain(uint16_t cmd, MemPtr cmdPBP, uint16_t launchFlags) \
|
||||
{ \
|
||||
switch (cmd) { \
|
||||
case 0 /* sysAppLaunchCmdNormalLaunch */ : \
|
||||
wxEntry(); \
|
||||
break; \
|
||||
default: \
|
||||
break; \
|
||||
} \
|
||||
return 0 /* errNone */ ; \
|
||||
} \
|
||||
\
|
||||
}
|
||||
|
||||
#endif // _WX_APP_H_
|
||||
|
@@ -1,45 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/apptbase.h
|
||||
// Purpose: declaration of wxAppTraits for Palm OS
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALMOS_APPTBASE_H_
|
||||
#define _WX_PALMOS_APPTBASE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAppTraits
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
|
||||
{
|
||||
public:
|
||||
// wxExecute() support methods
|
||||
// ---------------------------
|
||||
|
||||
// called before starting to wait for the child termination, may return
|
||||
// some opaque data which will be passed later to AfterChildWaitLoop()
|
||||
virtual void *BeforeChildWaitLoop() = 0;
|
||||
|
||||
// called after starting to wait for the child termination, the parameter
|
||||
// is the return value of BeforeChildWaitLoop()
|
||||
virtual void AfterChildWaitLoop(void *data) = 0;
|
||||
|
||||
|
||||
#if wxUSE_THREADS
|
||||
// wxThread helpers
|
||||
// ----------------
|
||||
|
||||
// process a message while waiting for a(nother) thread, should return
|
||||
// false if and only if we have to exit the application
|
||||
virtual bool DoMessageFromThreadWait() = 0;
|
||||
#endif // wxUSE_THREADS
|
||||
};
|
||||
|
||||
#endif // _WX_PALMOS_APPTBASE_H_
|
||||
|
@@ -1,61 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/apptrait.h
|
||||
// Purpose: class implementing wxAppTraits for Palm OS
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Yunhui Fu
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALM_APPTRAIT_H_
|
||||
#define _WX_PALM_APPTRAIT_H_
|
||||
|
||||
#if wxUSE_TIMER
|
||||
#include "wx/palmos/private/timer.h" // wxPalmOSTimerImpl
|
||||
#endif // wxUSE_TIMER
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
|
||||
{
|
||||
public:
|
||||
#if wxUSE_CONSOLE_EVENTLOOP
|
||||
virtual wxEventLoopBase *CreateEventLoop();
|
||||
#endif // wxUSE_CONSOLE_EVENTLOOP
|
||||
virtual void *BeforeChildWaitLoop();
|
||||
virtual void AfterChildWaitLoop(void *data);
|
||||
#if wxUSE_TIMER
|
||||
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) { return new wxPalmOSTimerImpl(timer); }
|
||||
#endif // wxUSE_TIMER
|
||||
#if wxUSE_THREADS
|
||||
virtual bool DoMessageFromThreadWait();
|
||||
virtual WXDWORD WaitForThread(WXHANDLE hThread);
|
||||
#endif // wxUSE_THREADS
|
||||
};
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
|
||||
{
|
||||
public:
|
||||
virtual wxEventLoopBase *CreateEventLoop();
|
||||
virtual void *BeforeChildWaitLoop();
|
||||
virtual void AfterChildWaitLoop(void *data);
|
||||
#if wxUSE_TIMER
|
||||
// there is no wxTimer support yet
|
||||
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
|
||||
#endif // wxUSE_TIMER
|
||||
#if wxUSE_THREADS
|
||||
virtual bool DoMessageFromThreadWait();
|
||||
#endif // wxUSE_THREADS
|
||||
virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif // _WX_PALM_APPTRAIT_H_
|
||||
|
@@ -1,259 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/bitmap.h
|
||||
// Purpose: wxBitmap class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BITMAP_H_
|
||||
#define _WX_BITMAP_H_
|
||||
|
||||
#include "wx/palmos/gdiimage.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/palette.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmapRefData;
|
||||
class WXDLLIMPEXP_FWD_CORE wxControl;
|
||||
class WXDLLIMPEXP_FWD_CORE wxCursor;
|
||||
class WXDLLIMPEXP_FWD_CORE wxDC;
|
||||
#if wxUSE_WXDIB
|
||||
class WXDLLIMPEXP_FWD_CORE wxDIB;
|
||||
#endif
|
||||
class WXDLLIMPEXP_FWD_CORE wxIcon;
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMask;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPalette;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPixelDataBase;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmap: a mono or colour bitmap
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmap : public wxGDIImage
|
||||
{
|
||||
public:
|
||||
// default ctor creates an invalid bitmap, you must Create() it later
|
||||
wxBitmap() { Init(); }
|
||||
|
||||
// Initialize with raw data
|
||||
wxBitmap(const char bits[], int width, int height, int depth = 1);
|
||||
|
||||
// Initialize with XPM data
|
||||
wxBitmap(const char* const* data);
|
||||
|
||||
// Load a file or resource
|
||||
wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
|
||||
|
||||
// New constructor for generalised creation from data
|
||||
wxBitmap(const void* data, long type, int width, int height, int depth = 1);
|
||||
|
||||
// Create a new, uninitialized bitmap of the given size and depth (if it
|
||||
// is omitted, will create a bitmap compatible with the display)
|
||||
//
|
||||
// NB: this ctor will create a DIB for 24 and 32bpp bitmaps, use ctor
|
||||
// taking a DC argument if you want to force using DDB in this case
|
||||
wxBitmap(int width, int height, int depth = -1) { /*TODO*/ }
|
||||
wxBitmap(const wxSize& sz, int depth = -1) { /*TODO*/ }
|
||||
|
||||
// Create a bitmap compatible with the given DC
|
||||
wxBitmap(int width, int height, const wxDC& dc);
|
||||
|
||||
#if wxUSE_IMAGE && wxUSE_WXDIB
|
||||
// Convert from wxImage
|
||||
wxBitmap(const wxImage& image, int depth = -1)
|
||||
{ (void)CreateFromImage(image, depth); }
|
||||
|
||||
// Create a DDB compatible with the given DC from wxImage
|
||||
wxBitmap(const wxImage& image, const wxDC& dc)
|
||||
{ (void)CreateFromImage(image, dc); }
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
// we must have this, otherwise icons are silently copied into bitmaps using
|
||||
// the copy ctor but the resulting bitmap is invalid!
|
||||
wxBitmap(const wxIcon& icon) { Init(); CopyFromIcon(icon); }
|
||||
|
||||
wxBitmap& operator=(const wxIcon& icon)
|
||||
{
|
||||
(void)CopyFromIcon(icon);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxBitmap& operator=(const wxCursor& cursor)
|
||||
{
|
||||
(void)CopyFromCursor(cursor);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual ~wxBitmap() {}
|
||||
|
||||
#if wxUSE_IMAGE && wxUSE_WXDIB
|
||||
wxImage ConvertToImage() const;
|
||||
wxBitmap ConvertToDisabled(unsigned char brightness = 255) const;
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
// get the given part of bitmap
|
||||
wxBitmap GetSubBitmap( const wxRect& rect ) const;
|
||||
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
bool CopyFromIcon(const wxIcon& icon);
|
||||
|
||||
// copies the contents and mask of the given cursor to the bitmap
|
||||
bool CopyFromCursor(const wxCursor& cursor);
|
||||
|
||||
#if wxUSE_WXDIB
|
||||
// copies from a device independent bitmap
|
||||
bool CopyFromDIB(const wxDIB& dib);
|
||||
#endif
|
||||
|
||||
virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
|
||||
virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
|
||||
{ return Create(sz.GetWidth(), sz.GetHeight(), depth); }
|
||||
|
||||
virtual bool Create(int width, int height, const wxDC& dc);
|
||||
virtual bool Create(const void* data, long type, int width, int height, int depth = 1);
|
||||
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_DEFAULT_TYPE);
|
||||
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
|
||||
|
||||
wxBitmapRefData *GetBitmapData() const
|
||||
{ return (wxBitmapRefData *)m_refData; }
|
||||
|
||||
// raw bitmap access support functions
|
||||
void *GetRawData(wxPixelDataBase& data, int bpp);
|
||||
void UngetRawData(wxPixelDataBase& data);
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
wxPalette* GetPalette() const;
|
||||
void SetPalette(const wxPalette& palette);
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask(wxMask *mask);
|
||||
|
||||
// these functions are internal and shouldn't be used, they risk to
|
||||
// disappear in the future
|
||||
bool HasAlpha() const;
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
public:
|
||||
void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); }
|
||||
WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); }
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
virtual wxGDIImageRefData *CreateData() const;
|
||||
|
||||
// creates an uninitialized bitmap, called from Create()s above
|
||||
bool DoCreate(int w, int h, int depth, WXHDC hdc);
|
||||
|
||||
#if wxUSE_IMAGE && wxUSE_WXDIB
|
||||
// creates the bitmap from wxImage, supposed to be called from ctor
|
||||
bool CreateFromImage(const wxImage& image, int depth);
|
||||
|
||||
// creates a DDB from wxImage, supposed to be called from ctor
|
||||
bool CreateFromImage(const wxImage& image, const wxDC& dc);
|
||||
|
||||
// common part of the 2 methods above (hdc may be 0)
|
||||
bool CreateFromImage(const wxImage& image, int depth, WXHDC hdc);
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMask: a mono bitmap used for drawing bitmaps transparently.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMask : public wxObject
|
||||
{
|
||||
public:
|
||||
wxMask();
|
||||
|
||||
// Construct a mask from a bitmap and a colour indicating the transparent
|
||||
// area
|
||||
wxMask(const wxBitmap& bitmap, const wxColour& colour);
|
||||
|
||||
// Construct a mask from a bitmap and a palette index indicating the
|
||||
// transparent area
|
||||
wxMask(const wxBitmap& bitmap, int paletteIndex);
|
||||
|
||||
// Construct a mask from a mono bitmap (copies the bitmap).
|
||||
wxMask(const wxBitmap& bitmap);
|
||||
|
||||
// construct a mask from the givne bitmap handle
|
||||
wxMask(WXHBITMAP hbmp) { m_maskBitmap = hbmp; }
|
||||
|
||||
virtual ~wxMask();
|
||||
|
||||
bool Create(const wxBitmap& bitmap, const wxColour& colour);
|
||||
bool Create(const wxBitmap& bitmap, int paletteIndex);
|
||||
bool Create(const wxBitmap& bitmap);
|
||||
|
||||
// Implementation
|
||||
WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; }
|
||||
void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; }
|
||||
|
||||
protected:
|
||||
WXHBITMAP m_maskBitmap;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapHandler is a class which knows how to load/save bitmaps to/from file
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapHandler : public wxGDIImageHandler
|
||||
{
|
||||
public:
|
||||
wxBitmapHandler() { m_type = wxBITMAP_TYPE_INVALID; }
|
||||
wxBitmapHandler(const wxString& name, const wxString& ext, long type)
|
||||
: wxGDIImageHandler(name, ext, type)
|
||||
{
|
||||
}
|
||||
|
||||
// keep wxBitmapHandler derived from wxGDIImageHandler compatible with the
|
||||
// old class which worked only with bitmaps
|
||||
virtual bool Create(wxBitmap *bitmap,
|
||||
const void* data,
|
||||
long flags,
|
||||
int width, int height, int depth = 1);
|
||||
virtual bool LoadFile(wxBitmap *bitmap,
|
||||
const wxString& name,
|
||||
long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool SaveFile(wxBitmap *bitmap,
|
||||
const wxString& name,
|
||||
int type,
|
||||
const wxPalette *palette = NULL);
|
||||
|
||||
virtual bool Create(wxGDIImage *image,
|
||||
const void* data,
|
||||
long flags,
|
||||
int width, int height, int depth = 1);
|
||||
virtual bool Load(wxGDIImage *image,
|
||||
const wxString& name,
|
||||
long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool Save(wxGDIImage *image,
|
||||
const wxString& name,
|
||||
int type);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_BITMAP_H_
|
@@ -1,59 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/bmpbuttn.h
|
||||
// Purpose: wxBitmapButton class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPBUTTN_H_
|
||||
#define _WX_BMPBUTTN_H_
|
||||
|
||||
#include "wx/button.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
#define wxDEFAULT_BUTTON_MARGIN 4
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
|
||||
{
|
||||
public:
|
||||
wxBitmapButton()
|
||||
{ m_marginX = m_marginY = wxDEFAULT_BUTTON_MARGIN; }
|
||||
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);
|
||||
|
||||
// Implementation
|
||||
virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_BMPBUTTN_H_
|
@@ -1,64 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BRUSH_H_
|
||||
#define _WX_BRUSH_H_
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBrush;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBrush
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
|
||||
{
|
||||
public:
|
||||
wxBrush();
|
||||
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
|
||||
#endif
|
||||
wxBrush(const wxBitmap& stipple);
|
||||
virtual ~wxBrush();
|
||||
|
||||
virtual void SetColour(const wxColour& col);
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
virtual void SetStyle(wxBrushStyle style);
|
||||
virtual void SetStipple(const wxBitmap& stipple);
|
||||
|
||||
bool operator==(const wxBrush& brush) const;
|
||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||
|
||||
wxColour GetColour() const;
|
||||
wxBrushStyle GetStyle() const;
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
||||
{ SetStyle((wxBrushStyle)style); }
|
||||
#endif
|
||||
|
||||
// return the HBRUSH for this brush
|
||||
virtual WXHANDLE GetResourceHandle() const;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBrush)
|
||||
};
|
||||
|
||||
#endif // _WX_BRUSH_H_
|
@@ -1,71 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/button.h
|
||||
// Purpose: wxButton class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Wlodzimierz ABX Skiba - native wxButton implementation
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne, Wlodzimierz Skiba
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUTTON_H_
|
||||
#define _WX_BUTTON_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Pushbutton
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
|
||||
{
|
||||
public:
|
||||
wxButton() { }
|
||||
wxButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
virtual ~wxButton();
|
||||
|
||||
virtual wxWindow *SetDefault();
|
||||
|
||||
// implementation from now on
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// send a notification event, return true if processed
|
||||
bool SendClickEvent();
|
||||
|
||||
protected:
|
||||
|
||||
// default button handling
|
||||
void SetTmpDefault();
|
||||
void UnsetTmpDefault();
|
||||
|
||||
// set or unset BS_DEFPUSHBUTTON style
|
||||
static void SetDefaultStyle(wxButton *btn, bool on);
|
||||
|
||||
// usually overridden base class virtuals
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_BUTTON_H_
|
@@ -1,64 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/caret.h
|
||||
// Purpose: wxCaret class - the Palm OS implementation of wxCaret
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CARET_H_
|
||||
#define _WX_CARET_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase
|
||||
{
|
||||
public:
|
||||
wxCaret() { Init(); }
|
||||
// create the caret of given (in pixels) width and height and associate
|
||||
// with the given window
|
||||
wxCaret(wxWindow *window, int width, int height)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(window, width, height);
|
||||
}
|
||||
// same as above
|
||||
wxCaret(wxWindowBase *window, const wxSize& size)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(window, size);
|
||||
}
|
||||
|
||||
// process wxWindow notifications
|
||||
virtual void OnSetFocus();
|
||||
virtual void OnKillFocus();
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
wxCaretBase::Init();
|
||||
|
||||
m_hasCaret = FALSE;
|
||||
}
|
||||
|
||||
// override base class virtuals
|
||||
virtual void DoMove();
|
||||
virtual void DoShow();
|
||||
virtual void DoHide();
|
||||
virtual void DoSize();
|
||||
|
||||
// helper function which creates the system caret
|
||||
bool PalmOSCreateCaret();
|
||||
|
||||
private:
|
||||
bool m_hasCaret;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxCaret);
|
||||
};
|
||||
|
||||
#endif // _WX_CARET_H_
|
||||
|
||||
|
@@ -1,63 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/checkbox.h
|
||||
// Purpose: wxCheckBox class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Wlodzimierz ABX Skiba - native implementation
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne, Wlodzimierz Skiba
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKBOX_H_
|
||||
#define _WX_CHECKBOX_H_
|
||||
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase
|
||||
{
|
||||
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);
|
||||
|
||||
virtual void SetValue(bool value);
|
||||
virtual bool GetValue() const;
|
||||
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// send a notification event, return true if processed
|
||||
bool SendClickEvent();
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual void DoSet3StateValue(wxCheckBoxState value);
|
||||
|
||||
virtual wxCheckBoxState DoGet3StateValue() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckBox)
|
||||
// current state of the checkbox
|
||||
wxCheckBoxState m_state;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_
|
@@ -1,94 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/checklst.h
|
||||
// Purpose: wxCheckListBox class - a listbox with checkable items
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CHECKLST__H_
|
||||
#define __CHECKLST__H_
|
||||
|
||||
#if !wxUSE_OWNER_DRAWN
|
||||
#error "wxCheckListBox class requires owner-drawn functionality."
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxOwnerDrawn;
|
||||
class WXDLLIMPEXP_FWD_CORE wxCheckListBoxItem; // fwd decl, defined in checklst.cpp
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxCheckListBox();
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int nStrings = 0,
|
||||
const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
// override base class virtuals
|
||||
virtual void Delete(unsigned int n);
|
||||
|
||||
virtual bool SetFont( const wxFont &font );
|
||||
|
||||
// items may be checked
|
||||
virtual bool IsChecked(unsigned int uiIndex) const;
|
||||
virtual void Check(unsigned int uiIndex, bool bCheck = true);
|
||||
|
||||
// return the index of the item at this position or wxNOT_FOUND
|
||||
int HitTest(const wxPoint& pt) const { return DoHitTestItem(pt.x, pt.y); }
|
||||
int HitTest(wxCoord x, wxCoord y) const { return DoHitTestItem(x, y); }
|
||||
|
||||
// accessors
|
||||
size_t GetItemHeight() const { return m_nItemHeight; }
|
||||
|
||||
protected:
|
||||
// we create our items ourselves and they have non-standard size,
|
||||
// so we need to override these functions
|
||||
virtual wxOwnerDrawn *CreateLboxItem(size_t n);
|
||||
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
||||
|
||||
// this can't be called DoHitTest() because wxWindow already has this method
|
||||
int DoHitTestItem(wxCoord x, wxCoord y) const;
|
||||
|
||||
// pressing space or clicking the check box toggles the item
|
||||
void OnKeyDown(wxKeyEvent& event);
|
||||
void OnLeftClick(wxMouseEvent& event);
|
||||
|
||||
private:
|
||||
size_t m_nItemHeight; // height of checklistbox items (the same for all)
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox)
|
||||
};
|
||||
|
||||
#endif //_CHECKLST_H
|
@@ -1,340 +0,0 @@
|
||||
/*
|
||||
* Name: wx/palmos/chkconf.h
|
||||
* Purpose: Compiler-specific configuration checking
|
||||
* Author: William Osborne - minimal working wxPalmOS port
|
||||
* Modified by: Yunhui Fu
|
||||
* Created: 10/13/04
|
||||
* RCS-ID: $Id$
|
||||
* Copyright: (c) William Osborne
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
||||
|
||||
#ifndef _WX_PALMOS_CHKCONF_H_
|
||||
#define _WX_PALMOS_CHKCONF_H_
|
||||
|
||||
/*
|
||||
* disable the settings which are not implemented yet
|
||||
*/
|
||||
|
||||
#undef wxUSE_ACCEL
|
||||
#define wxUSE_ACCEL 0
|
||||
|
||||
#undef wxUSE_ARCHIVE_STREAMS
|
||||
#define wxUSE_ARCHIVE_STREAMS 0
|
||||
|
||||
#undef wxUSE_BMPBUTTON
|
||||
#define wxUSE_BMPBUTTON 0
|
||||
|
||||
#undef wxUSE_CALENDARCTRL
|
||||
#define wxUSE_CALENDARCTRL 0
|
||||
|
||||
#undef wxUSE_CARET
|
||||
#define wxUSE_CARET 0
|
||||
|
||||
#undef wxUSE_CHECKLISTBOX
|
||||
#define wxUSE_CHECKLISTBOX 0
|
||||
|
||||
#undef wxUSE_CHOICE
|
||||
#define wxUSE_CHOICE 0
|
||||
|
||||
#undef wxUSE_CHOICEBOOK
|
||||
#define wxUSE_CHOICEBOOK 0
|
||||
|
||||
#undef wxUSE_CHOICEDLG
|
||||
#define wxUSE_CHOICEDLG 0
|
||||
|
||||
#undef wxUSE_CLIPBOARD
|
||||
#define wxUSE_CLIPBOARD 0
|
||||
|
||||
#undef wxUSE_COMBOBOX
|
||||
#define wxUSE_COMBOBOX 0
|
||||
|
||||
#undef wxUSE_DATAOBJ
|
||||
#define wxUSE_DATAOBJ 0
|
||||
|
||||
#undef wxUSE_DIRDLG
|
||||
#define wxUSE_DIRDLG 1
|
||||
|
||||
#undef wxUSE_DISPLAY
|
||||
#define wxUSE_DISPLAY 0
|
||||
|
||||
#undef wxUSE_DOC_VIEW_ARCHITECTURE
|
||||
#define wxUSE_DOC_VIEW_ARCHITECTURE 0
|
||||
|
||||
#undef wxUSE_DRAG_AND_DROP
|
||||
#define wxUSE_DRAG_AND_DROP 0
|
||||
|
||||
#undef wxUSE_DRAGIMAGE
|
||||
#define wxUSE_DRAGIMAGE 0
|
||||
|
||||
#undef wxUSE_DYNAMIC_LOADER
|
||||
#define wxUSE_DYNAMIC_LOADER 0
|
||||
|
||||
#undef wxUSE_DYNLIB_CLASS
|
||||
#define wxUSE_DYNLIB_CLASS 0
|
||||
|
||||
#undef wxUSE_ENH_METAFILE
|
||||
#define wxUSE_ENH_METAFILE 0
|
||||
|
||||
#undef wxUSE_FFILE
|
||||
#define wxUSE_FFILE 0
|
||||
|
||||
#undef wxUSE_FILE
|
||||
#define wxUSE_FILE 1
|
||||
|
||||
#undef wxUSE_FILECONFIG
|
||||
#define wxUSE_FILECONFIG 0
|
||||
|
||||
#undef wxUSE_FILEDLG
|
||||
#define wxUSE_FILEDLG 1
|
||||
|
||||
#undef wxUSE_FILESYSTEM
|
||||
#define wxUSE_FILESYSTEM 0
|
||||
|
||||
#undef wxUSE_FINDREPLDLG
|
||||
#define wxUSE_FINDREPLDLG 0
|
||||
|
||||
#undef wxUSE_FONTDLG
|
||||
#define wxUSE_FONTDLG 0
|
||||
|
||||
#undef wxUSE_FONTMAP
|
||||
#define wxUSE_FONTMAP 0
|
||||
|
||||
#undef wxUSE_FS_ARCHIVE
|
||||
#define wxUSE_FS_ARCHIVE 0
|
||||
|
||||
#undef wxUSE_FS_INET
|
||||
#define wxUSE_FS_INET 0
|
||||
|
||||
#undef wxUSE_FS_ZIP
|
||||
#define wxUSE_FS_ZIP 0
|
||||
|
||||
#undef wxUSE_GAUGE
|
||||
#define wxUSE_GAUGE 0
|
||||
|
||||
#undef wxUSE_GRID
|
||||
#define wxUSE_GRID 0
|
||||
|
||||
#undef wxUSE_HELP
|
||||
#define wxUSE_HELP 0
|
||||
|
||||
#undef wxUSE_HTML
|
||||
#define wxUSE_HTML 0
|
||||
|
||||
#undef wxUSE_IMAGE
|
||||
#define wxUSE_IMAGE 0
|
||||
|
||||
#undef wxUSE_LIBPNG
|
||||
#define wxUSE_LIBPNG 0
|
||||
|
||||
#undef wxUSE_LIBJPEG
|
||||
#define wxUSE_LIBJPEG 0
|
||||
|
||||
#undef wxUSE_LIBTIFF
|
||||
#define wxUSE_LIBTIFF 0
|
||||
|
||||
#undef wxUSE_GIF
|
||||
#define wxUSE_GIF 0
|
||||
|
||||
#undef wxUSE_PNM
|
||||
#define wxUSE_PNM 0
|
||||
|
||||
#undef wxUSE_PCX
|
||||
#define wxUSE_PCX 0
|
||||
|
||||
#undef wxUSE_XPM
|
||||
#define wxUSE_XPM 0
|
||||
|
||||
#undef wxUSE_ICO_CUR
|
||||
#define wxUSE_ICO_CUR 0
|
||||
|
||||
#undef wxUSE_SVG
|
||||
#define wxUSE_SVG 0
|
||||
|
||||
#undef wxUSE_INTL
|
||||
#define wxUSE_INTL 0
|
||||
|
||||
#undef wxUSE_IPC
|
||||
#define wxUSE_IPC 0
|
||||
|
||||
#undef wxUSE_JOYSTICK
|
||||
#define wxUSE_JOYSTICK 0
|
||||
|
||||
#undef wxUSE_LISTBOOK
|
||||
#define wxUSE_LISTBOOK 0
|
||||
|
||||
#undef wxUSE_LISTBOX
|
||||
#define wxUSE_LISTBOX 0
|
||||
|
||||
#undef wxUSE_LISTCTRL
|
||||
#define wxUSE_LISTCTRL 0
|
||||
|
||||
#undef wxUSE_LOG_DIALOG
|
||||
#define wxUSE_LOG_DIALOG 0
|
||||
|
||||
#undef wxUSE_LOGWINDOW
|
||||
#define wxUSE_LOGWINDOW 0
|
||||
|
||||
#undef wxUSE_METAFILE
|
||||
#define wxUSE_METAFILE 0
|
||||
|
||||
#undef wxUSE_MDI
|
||||
#define wxUSE_MDI 0
|
||||
|
||||
#undef wxUSE_MDI_ARCHITECTURE
|
||||
#define wxUSE_MDI_ARCHITECTURE 0
|
||||
|
||||
#undef wxUSE_MEDIACTRL
|
||||
#define wxUSE_MEDIACTRL 0
|
||||
|
||||
#undef wxUSE_MIMETYPE
|
||||
#define wxUSE_MIMETYPE 0
|
||||
|
||||
#undef wxUSE_MOUSEWHEEL
|
||||
#define wxUSE_MOUSEWHEEL 0
|
||||
|
||||
#undef wxUSE_NOTEBOOK
|
||||
#define wxUSE_NOTEBOOK 0
|
||||
|
||||
#undef wxUSE_NUMBERDLG
|
||||
#define wxUSE_NUMBERDLG 0
|
||||
|
||||
#undef wxUSE_ON_FATAL_EXCEPTION
|
||||
#define wxUSE_ON_FATAL_EXCEPTION 0
|
||||
|
||||
#undef wxUSE_PALETTE
|
||||
#define wxUSE_PALETTE 0
|
||||
|
||||
#undef wxUSE_POPUPWIN
|
||||
#define wxUSE_POPUPWIN 0
|
||||
|
||||
#undef wxUSE_PRINTING_ARCHITECTURE
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 0
|
||||
|
||||
#undef wxUSE_PROTOCOL
|
||||
#define wxUSE_PROTOCOL 0
|
||||
|
||||
#undef wxUSE_PROTOCOL_FILE
|
||||
#define wxUSE_PROTOCOL_FILE 0
|
||||
|
||||
#undef wxUSE_PROTOCOL_FTP
|
||||
#define wxUSE_PROTOCOL_FTP 0
|
||||
|
||||
#undef wxUSE_PROTOCOL_HTTP
|
||||
#define wxUSE_PROTOCOL_HTTP 0
|
||||
|
||||
#undef wxUSE_REGEX
|
||||
#define wxUSE_REGEX 0
|
||||
|
||||
#undef wxUSE_SCROLLBAR
|
||||
#define wxUSE_SCROLLBAR 0
|
||||
|
||||
#undef wxUSE_SNGLINST_CHECKER
|
||||
#define wxUSE_SNGLINST_CHECKER 0
|
||||
|
||||
#undef wxUSE_SOCKETS
|
||||
#define wxUSE_SOCKETS 0
|
||||
|
||||
#undef wxUSE_SOUND
|
||||
#define wxUSE_SOUND 0
|
||||
|
||||
#undef wxUSE_SPINBTN
|
||||
#define wxUSE_SPINBTN 0
|
||||
|
||||
#undef wxUSE_SPINCTRL
|
||||
#define wxUSE_SPINCTRL 0
|
||||
|
||||
#undef wxUSE_SPLASH
|
||||
#define wxUSE_SPLASH 0
|
||||
|
||||
#undef wxUSE_SPLINES
|
||||
#define wxUSE_SPLINES 0
|
||||
|
||||
#undef wxUSE_STARTUP_TIPS
|
||||
#define wxUSE_STARTUP_TIPS 0
|
||||
|
||||
#undef wxUSE_STATBMP
|
||||
#define wxUSE_STATBMP 0
|
||||
|
||||
#undef wxUSE_STATBOX
|
||||
#define wxUSE_STATBOX 0
|
||||
|
||||
#undef wxUSE_STATLINE
|
||||
#define wxUSE_STATLINE 0
|
||||
|
||||
#undef wxUSE_TARSTREAM
|
||||
#define wxUSE_TARSTREAM 0
|
||||
|
||||
#undef wxUSE_TEXTBUFFER
|
||||
#define wxUSE_TEXTBUFFER 0
|
||||
|
||||
#undef wxUSE_TEXTCTRL
|
||||
#define wxUSE_TEXTCTRL 0
|
||||
|
||||
#undef wxUSE_TEXTFILE
|
||||
#define wxUSE_TEXTFILE 0
|
||||
|
||||
#undef wxUSE_TEXTDLG
|
||||
#define wxUSE_TEXTDLG 0
|
||||
|
||||
#undef wxUSE_THREADS
|
||||
#define wxUSE_THREADS 0
|
||||
|
||||
#undef wxUSE_TIPWINDOW
|
||||
#define wxUSE_TIPWINDOW 0
|
||||
|
||||
#undef wxUSE_TREEBOOK
|
||||
#define wxUSE_TREEBOOK 0
|
||||
|
||||
#undef wxUSE_TREECTRL
|
||||
#define wxUSE_TREECTRL 0
|
||||
|
||||
#undef wxUSE_TIMER
|
||||
#define wxUSE_TIMER 0
|
||||
|
||||
#undef wxUSE_TOOLBAR
|
||||
#define wxUSE_TOOLBAR 0
|
||||
|
||||
#undef wxUSE_TOOLBAR_NATIVE
|
||||
#define wxUSE_TOOLBAR_NATIVE 0
|
||||
|
||||
#undef wxUSE_TOOLTIPS
|
||||
#define wxUSE_TOOLTIPS 0
|
||||
|
||||
#undef wxUSE_URL
|
||||
#define wxUSE_URL 0
|
||||
|
||||
/* #undef wxUSE_WCHAR_T */
|
||||
/* #define wxUSE_WCHAR_T 1 */
|
||||
|
||||
#undef wxUSE_WIZARDDLG
|
||||
#define wxUSE_WIZARDDLG 0
|
||||
|
||||
#undef wxUSE_WXHTML_HELP
|
||||
#define wxUSE_WXHTML_HELP 0
|
||||
|
||||
#undef wxUSE_XML
|
||||
#define wxUSE_XML 0
|
||||
|
||||
#undef wxUSE_XRC
|
||||
#define wxUSE_XRC 0
|
||||
|
||||
#undef wxUSE_ZIPSTREAM
|
||||
#define wxUSE_ZIPSTREAM 0
|
||||
|
||||
#undef wxUSE_ZLIB
|
||||
#define wxUSE_ZLIB 0
|
||||
|
||||
#undef wxUSE_COLLPANE
|
||||
#define wxUSE_COLLPANE 0
|
||||
|
||||
#undef wxUSE_TOOLBOOK
|
||||
#define wxUSE_TOOLBOOK 0
|
||||
|
||||
#undef wxUSE_SELECT_DISPATCHER
|
||||
#define wxUSE_SELECT_DISPATCHER 1
|
||||
|
||||
#endif
|
||||
/* _WX_PALMOS_CHKCONF_H_ */
|
@@ -1,112 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Yunhui Fu
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICE_H_
|
||||
#define _WX_CHOICE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Choice item
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxChoice() { }
|
||||
virtual ~wxChoice();
|
||||
|
||||
wxChoice(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual void DoClear();
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual int GetSelection() const;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
|
||||
protected:
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
virtual void DoSetItemClientData(unsigned int n, void* clientData);
|
||||
virtual void* DoGetItemClientData(unsigned int n) const;
|
||||
|
||||
// MSW implementation
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoGetSize(int *w, int *h) const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
|
||||
// update the height of the drop down list to fit the number of items we
|
||||
// have (without changing the visible height)
|
||||
void UpdateVisibleHeight();
|
||||
|
||||
// create and initialize the control
|
||||
bool CreateAndInit(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
int n, const wxString choices[],
|
||||
long style,
|
||||
const wxValidator& validator,
|
||||
const wxString& name);
|
||||
|
||||
// free all memory we have (used by Clear() and dtor)
|
||||
void Free();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoice)
|
||||
};
|
||||
|
||||
#endif // _WX_CHOICE_H_
|
@@ -1,95 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/clipbrd.h
|
||||
// Purpose: wxClipboad class and clipboard functions for Palm OS
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLIPBRD_H_
|
||||
#define _WX_CLIPBRD_H_
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
#include "wx/list.h"
|
||||
#include "wx/module.h"
|
||||
#include "wx/dataobj.h" // for wxDataFormat
|
||||
|
||||
// These functions superceded by wxClipboard, but retained in order to
|
||||
// implement wxClipboard, and for compatibility.
|
||||
|
||||
// open/close the clipboard
|
||||
WXDLLIMPEXP_CORE bool wxOpenClipboard();
|
||||
WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
|
||||
#define wxClipboardOpen wxIsClipboardOpened
|
||||
WXDLLIMPEXP_CORE bool wxCloseClipboard();
|
||||
|
||||
// get/set data
|
||||
WXDLLIMPEXP_CORE bool wxEmptyClipboard();
|
||||
WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat,
|
||||
const void *data,
|
||||
int width = 0, int height = 0);
|
||||
WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat,
|
||||
long *len = NULL);
|
||||
|
||||
// clipboard formats
|
||||
WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
|
||||
WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
|
||||
WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
|
||||
WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat,
|
||||
wxChar *formatName,
|
||||
int maxCount);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClipboard
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDataObject;
|
||||
class WXDLLIMPEXP_CORE wxClipboard : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
||||
|
||||
public:
|
||||
wxClipboard();
|
||||
virtual ~wxClipboard();
|
||||
|
||||
// open the clipboard before SetData() and GetData()
|
||||
virtual bool Open();
|
||||
|
||||
// close the clipboard after SetData() and GetData()
|
||||
virtual void Close();
|
||||
|
||||
// query whether the clipboard is opened
|
||||
virtual bool IsOpened() const;
|
||||
|
||||
// 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();
|
||||
|
||||
// flushes the clipboard: this means that the data which is currently on
|
||||
// clipboard will stay available even after the application exits (possibly
|
||||
// eating memory), otherwise the clipboard will be emptied on exit
|
||||
virtual bool Flush();
|
||||
|
||||
private:
|
||||
bool m_clearOnExit;
|
||||
bool m_isOpened;
|
||||
};
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
#endif
|
||||
// _WX_CLIPBRD_H_
|
@@ -1,41 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/colordlg.h
|
||||
// Purpose: wxColourDialog class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Wlodzimierz ABX Skiba - real native implementation
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne, Wlodzimierz Skiba
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLORDLG_H_
|
||||
#define _WX_COLORDLG_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourDialog: dialog for choosing a colours
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
wxColourDialog();
|
||||
wxColourDialog(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
bool Create(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
wxColourData& GetColourData() { return m_colourData; }
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
protected:
|
||||
wxColourData m_colourData;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxColourDialog)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_COLORDLG_H_
|
@@ -1,118 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COMBOBOX_H_
|
||||
#define _WX_COMBOBOX_H_
|
||||
|
||||
#include "wx/choice.h"
|
||||
|
||||
#if wxUSE_COMBOBOX
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Combobox control
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxComboBox: public wxChoice
|
||||
{
|
||||
public:
|
||||
wxComboBox() { }
|
||||
|
||||
wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Create(parent, id, value, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0,
|
||||
const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
// List functions: see wxChoice
|
||||
|
||||
// Text field functions
|
||||
wxString GetValue() const { return GetLabel(); }
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
// Clipboard operations
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual void SetInsertionPointEnd();
|
||||
virtual long GetInsertionPoint() const;
|
||||
virtual wxTextPos GetLastPosition() const;
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void SetEditable(bool editable);
|
||||
virtual bool IsEditable() const;
|
||||
|
||||
virtual void Undo();
|
||||
virtual void Redo();
|
||||
virtual void SelectAll();
|
||||
|
||||
virtual bool CanCopy() const;
|
||||
virtual bool CanCut() const;
|
||||
virtual bool CanPaste() const;
|
||||
virtual bool CanUndo() const;
|
||||
virtual bool CanRedo() const;
|
||||
|
||||
// implementation only from now on
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
WXHWND GetEditHWND() const;
|
||||
|
||||
protected:
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
|
||||
};
|
||||
|
||||
#endif // wxUSE_COMBOBOX
|
||||
#endif
|
||||
// _WX_COMBOBOX_H_
|
@@ -1,155 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/control.h
|
||||
// Purpose: wxControl class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Wlodzimierz ABX Skiba - native implementation
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne, Wlodzimierz Skiba
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CONTROL_H_
|
||||
#define _WX_CONTROL_H_
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// General item class
|
||||
class WXDLLIMPEXP_CORE wxControl : public wxControlBase
|
||||
{
|
||||
public:
|
||||
wxControl() { Init(); }
|
||||
|
||||
wxControl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr);
|
||||
|
||||
virtual ~wxControl();
|
||||
|
||||
// Simulates an event
|
||||
virtual void Command(wxCommandEvent& event) { ProcessCommand(event); }
|
||||
|
||||
virtual bool Enable( bool enable = true );
|
||||
virtual bool IsEnabled() const;
|
||||
|
||||
virtual bool Show( bool show = true );
|
||||
virtual bool IsShown() const;
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
//virtual wxString GetLabel();
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// Calls the callback and appropriate event handlers
|
||||
bool ProcessCommand(wxCommandEvent& event);
|
||||
|
||||
const wxArrayLong& GetSubcontrols() const { return m_subControls; }
|
||||
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
protected:
|
||||
// regardless how deeply we are in wxWidgets hierarchy always get correct form
|
||||
WXFORMPTR GetParentForm() const;
|
||||
WXFORMPTR GetObjectFormIndex(uint16_t& index) const;
|
||||
void* GetObjectPtr() const;
|
||||
|
||||
// choose the default border for this window
|
||||
virtual wxBorder GetDefaultBorder() const;
|
||||
|
||||
// on/off-like controls
|
||||
void SetBoolValue(bool value);
|
||||
bool GetBoolValue() const;
|
||||
void SetIntValue(int val);
|
||||
|
||||
// native labels access
|
||||
void SetFieldLabel(const wxString& label);
|
||||
void SetControlLabel(const wxString& label);
|
||||
wxString GetFieldLabel();
|
||||
wxString GetControlLabel();
|
||||
|
||||
// return default best size (doesn't really make any sense, override this)
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// getting and setting sizes
|
||||
virtual void DoGetPosition( int *x, int *y ) const;
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// create the control of the given ControlStyleType: this is typically called
|
||||
// from Create() method of the derived class passing its label, pos and
|
||||
// size parameter (style parameter is not needed because m_windowStyle is
|
||||
// supposed to had been already set and so is used instead when this
|
||||
// function is called)
|
||||
bool PalmCreateControl(int palmStyle,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
uint8_t groupID = 0);
|
||||
inline bool IsPalmControl() const { return m_palmControl; }
|
||||
|
||||
bool PalmCreateField(const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
bool editable,
|
||||
bool underlined,
|
||||
int justification);
|
||||
inline bool IsPalmField() const { return m_palmField; }
|
||||
|
||||
// this is a helper for the derived class GetClassDefaultAttributes()
|
||||
// implementation: it returns the right colours for the classes which
|
||||
// contain something else (e.g. wxListBox, wxTextCtrl, ...) instead of
|
||||
// being simple controls (such as wxButton, wxCheckBox, ...)
|
||||
static wxVisualAttributes
|
||||
GetCompositeControlsDefaultAttributes(wxWindowVariant variant);
|
||||
|
||||
|
||||
// for controls like radiobuttons which are really composite this array
|
||||
// holds the ids (not HWNDs!) of the sub controls
|
||||
wxArrayLong m_subControls;
|
||||
|
||||
// m_label stores label in case of wxButton, wxCheckBox, wxToggleButton etc.
|
||||
// We must ensure that it persists for as long as it is being displayed
|
||||
// (that is, for as long as the control is displayed or until we call
|
||||
// CtlSetLabel() with a new string), and we must free the string after
|
||||
// it is no longer in use (typically after the form containing the
|
||||
// control is freed).
|
||||
wxString m_label;
|
||||
|
||||
private:
|
||||
|
||||
bool m_palmControl:1;
|
||||
bool m_palmField:1;
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
virtual void DoGetBounds( WXRECTANGLEPTR rect ) const;
|
||||
virtual void DoSetBounds( WXRECTANGLEPTR rect );
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CONTROL_H_
|
@@ -1,48 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CURSOR_H_
|
||||
#define _WX_CURSOR_H_
|
||||
|
||||
#include "wx/palmos/gdiimage.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
|
||||
// Cursor
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIImage
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
wxCursor();
|
||||
wxCursor(const wxImage& image);
|
||||
wxCursor(const wxString& name,
|
||||
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
wxCursor(wxStockCursor id) { InitFromStock(id); }
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
|
||||
#endif
|
||||
virtual ~wxCursor();
|
||||
|
||||
// implementation only
|
||||
void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
|
||||
WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
|
||||
|
||||
protected:
|
||||
void InitFromStock(wxStockCursor);
|
||||
virtual wxGDIImageRefData *CreateData() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxCursor)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CURSOR_H_
|
@@ -1,72 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/datectrl.h
|
||||
// Purpose: wxDatePickerCtrl for PalmOS
|
||||
// Author: Wlodzimierz ABX Skiba
|
||||
// Modified by:
|
||||
// Created: 02/15/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Wlodzimierz Skiba
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALMOS_DATECTRL_H_
|
||||
#define _WX_PALMOS_DATECTRL_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDatePickerCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxDatePickerCtrl() { Init(); }
|
||||
|
||||
wxDatePickerCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& dt = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxDatePickerCtrlNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, dt, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& dt = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxDatePickerCtrlNameStr);
|
||||
|
||||
// set/get the date
|
||||
virtual void SetValue(const wxDateTime& dt);
|
||||
virtual wxDateTime GetValue() const;
|
||||
|
||||
// set/get the allowed valid range for the dates, if either/both of them
|
||||
// are invalid, there is no corresponding limit and if neither is set
|
||||
// GetRange() returns false
|
||||
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
|
||||
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
|
||||
|
||||
// send a notification event, return true if processed
|
||||
bool SendClickEvent();
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
wxDateTime m_dt;
|
||||
|
||||
void Init() { m_dt = wxDateTime::Today(); }
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
|
||||
};
|
||||
|
||||
#endif // _WX_PALMOS_DATECTRL_H_
|
@@ -1,364 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dc.h
|
||||
// Purpose: wxDC class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALM_DC_H_
|
||||
#define _WX_PALM_DC_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/dc.h"
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// macros
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_DC_CACHEING
|
||||
/*
|
||||
* Cached blitting, maintaining a cache
|
||||
* of bitmaps required for transparent blitting
|
||||
* instead of constant creation/deletion
|
||||
*/
|
||||
|
||||
class wxDCCacheEntry: public wxObject
|
||||
{
|
||||
public:
|
||||
wxDCCacheEntry(WXHBITMAP hBitmap, int w, int h, int depth);
|
||||
wxDCCacheEntry(WXHDC hDC, int depth);
|
||||
virtual ~wxDCCacheEntry();
|
||||
|
||||
WXHBITMAP m_bitmap;
|
||||
WXHDC m_dc;
|
||||
int m_width;
|
||||
int m_height;
|
||||
int m_depth;
|
||||
};
|
||||
#endif
|
||||
|
||||
// this is an ABC: use one of the derived classes to create a DC associated
|
||||
// with a window, screen, printer and so on
|
||||
class WXDLLIMPEXP_CORE wxPalmDCImpl: public wxDCImpl
|
||||
{
|
||||
public:
|
||||
wxPalmDCImpl(wxDC *owner, WXHDC hDC);
|
||||
virtual ~wxPalmDCImpl();
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual bool StartDoc(const wxString& message);
|
||||
virtual void EndDoc();
|
||||
|
||||
virtual void StartPage();
|
||||
virtual void EndPage();
|
||||
|
||||
virtual void SetFont(const wxFont& font);
|
||||
virtual void SetPen(const wxPen& pen);
|
||||
virtual void SetBrush(const wxBrush& brush);
|
||||
virtual void SetBackground(const wxBrush& brush);
|
||||
virtual void SetBackgroundMode(int mode);
|
||||
#if wxUSE_PALETTE
|
||||
virtual void SetPalette(const wxPalette& palette);
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
virtual void DestroyClippingRegion();
|
||||
|
||||
virtual wxCoord GetCharHeight() const;
|
||||
virtual wxCoord GetCharWidth() const;
|
||||
|
||||
virtual bool CanDrawBitmap() const;
|
||||
virtual bool CanGetTextExtent() const;
|
||||
virtual int GetDepth() const;
|
||||
virtual wxSize GetPPI() const;
|
||||
|
||||
|
||||
virtual void SetMapMode(wxMappingMode mode);
|
||||
virtual void SetUserScale(double x, double y);
|
||||
virtual void SetLogicalScale(double x, double y);
|
||||
virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
|
||||
virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
|
||||
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
|
||||
|
||||
virtual void SetLogicalFunction(wxRasterOperationMode function);
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
virtual void SetRop(WXHDC cdc);
|
||||
virtual void SelectOldObjects(WXHDC dc);
|
||||
|
||||
void SetWindow(wxWindow *win)
|
||||
{
|
||||
m_window = win;
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
// if we have palettes use the correct one for this window
|
||||
InitializePalette();
|
||||
#endif // wxUSE_PALETTE
|
||||
}
|
||||
|
||||
WXHDC GetHDC() const { return m_hDC; }
|
||||
void SetHDC(WXHDC dc, bool bOwnsDC = false)
|
||||
{
|
||||
m_hDC = dc;
|
||||
m_bOwnsDC = bOwnsDC;
|
||||
|
||||
// we might have a pre existing clipping region, make sure that we
|
||||
// return it if asked -- but avoid calling ::GetClipBox() right now as
|
||||
// it could be unnecessary wasteful
|
||||
m_clipping = true;
|
||||
m_clipX1 =
|
||||
m_clipX2 = 0;
|
||||
}
|
||||
|
||||
const wxBitmap& GetSelectedBitmap() const { return m_selectedBitmap; }
|
||||
wxBitmap& GetSelectedBitmap() { return m_selectedBitmap; }
|
||||
|
||||
// update the internal clip box variables
|
||||
void UpdateClipBox();
|
||||
|
||||
#if wxUSE_DC_CACHEING
|
||||
static wxDCCacheEntry* FindBitmapInCache(WXHDC hDC, int w, int h);
|
||||
static wxDCCacheEntry* FindDCInCache(wxDCCacheEntry* notThis, WXHDC hDC);
|
||||
|
||||
static void AddToBitmapCache(wxDCCacheEntry* entry);
|
||||
static void AddToDCCache(wxDCCacheEntry* entry);
|
||||
static void ClearCache();
|
||||
#endif
|
||||
|
||||
// RTL related functions
|
||||
// ---------------------
|
||||
|
||||
// get or change the layout direction (LTR or RTL) for this dc,
|
||||
// wxLayout_Default is returned if layout direction is not supported
|
||||
virtual wxLayoutDirection GetLayoutDirection() const;
|
||||
virtual void SetLayoutDirection(wxLayoutDirection dir);
|
||||
|
||||
protected:
|
||||
void Init()
|
||||
{
|
||||
m_bOwnsDC = false;
|
||||
m_hDC = NULL;
|
||||
|
||||
m_oldBitmap = NULL;
|
||||
m_oldPen = NULL;
|
||||
m_oldBrush = NULL;
|
||||
m_oldFont = NULL;
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
m_oldPalette = NULL;
|
||||
#endif // wxUSE_PALETTE
|
||||
}
|
||||
|
||||
// create an uninitialized DC: this should be only used by the derived
|
||||
// classes
|
||||
wxPalmDCImpl( wxDC *owner ) : wxDCImpl( owner ) { Init(); }
|
||||
|
||||
void RealizeScaleAndOrigin();
|
||||
|
||||
public:
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
wxCoord *x, wxCoord *y,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL) const;
|
||||
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
|
||||
|
||||
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||
wxFloodFillStyle style = wxFLOOD_SURFACE);
|
||||
|
||||
virtual void DoGradientFillLinear(const wxRect& rect,
|
||||
const wxColour& initialColour,
|
||||
const wxColour& destColour,
|
||||
wxDirection nDirection = wxEAST);
|
||||
|
||||
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
|
||||
|
||||
virtual void DoDrawPoint(wxCoord x, wxCoord y);
|
||||
virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
|
||||
|
||||
virtual void DoDrawArc(wxCoord x1, wxCoord y1,
|
||||
wxCoord x2, wxCoord y2,
|
||||
wxCoord xc, wxCoord yc);
|
||||
virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height);
|
||||
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
||||
double sa, double ea);
|
||||
|
||||
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height,
|
||||
double radius);
|
||||
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
|
||||
#if wxUSE_SPLINES
|
||||
virtual void DoDrawSpline(const wxPointList *points);
|
||||
#endif
|
||||
|
||||
virtual void DoCrossHair(wxCoord x, wxCoord y);
|
||||
|
||||
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = false);
|
||||
|
||||
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
|
||||
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
|
||||
double angle);
|
||||
|
||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
|
||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||
|
||||
virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest,
|
||||
wxCoord dstWidth, wxCoord dstHeight,
|
||||
wxDC *source,
|
||||
wxCoord xsrc, wxCoord ysrc,
|
||||
wxCoord srcWidth, wxCoord srcHeight,
|
||||
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
|
||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height);
|
||||
virtual void DoSetDeviceClippingRegion(const wxRegion& region);
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
|
||||
wxCoord *w, wxCoord *h) const;
|
||||
|
||||
virtual void DoGetSizeMM(int* width, int* height) const;
|
||||
|
||||
virtual void DoDrawLines(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset);
|
||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
|
||||
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
|
||||
{
|
||||
return subrect == NULL ? GetSelectedBitmap()
|
||||
: GetSelectedBitmap().GetSubBitmap(*subrect);
|
||||
}
|
||||
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
// MSW specific, select a logical palette into the HDC
|
||||
// (tell windows to translate pixel from other palettes to our custom one
|
||||
// and vice versa)
|
||||
// Realize tells it to also reset the system palette to this one.
|
||||
void DoSelectPalette(bool realize = false);
|
||||
|
||||
// Find out what palette our parent window has, then select it into the dc
|
||||
void InitializePalette();
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
protected:
|
||||
// common part of DoDrawText() and DoDrawRotatedText()
|
||||
void DrawAnyText(const wxString& text, wxCoord x, wxCoord y);
|
||||
|
||||
// implementation of DoGetSize() for wxScreen/PrinterDC: this simply
|
||||
// returns the size of the entire device this DC is associated with
|
||||
//
|
||||
// notice that we intentionally put it in a separate function instead of
|
||||
// DoGetSize() itself because we want it to remain pure virtual both
|
||||
// because each derived class should take care to define it as needed (this
|
||||
// implementation is not at all always appropriate) and because we want
|
||||
// wxDC to be an ABC to prevent it from being created directly
|
||||
void GetDeviceSize(int *width, int *height) const;
|
||||
|
||||
|
||||
// MSW-specific member variables
|
||||
// -----------------------------
|
||||
|
||||
// the window associated with this DC (may be NULL)
|
||||
wxWindow *m_canvas;
|
||||
|
||||
wxBitmap m_selectedBitmap;
|
||||
|
||||
// TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it
|
||||
bool m_bOwnsDC:1;
|
||||
|
||||
// our HDC
|
||||
WXHDC m_hDC;
|
||||
|
||||
// Store all old GDI objects when do a SelectObject, so we can select them
|
||||
// back in (this unselecting user's objects) so we can safely delete the
|
||||
// DC.
|
||||
WXHBITMAP m_oldBitmap;
|
||||
WXHPEN m_oldPen;
|
||||
WXHBRUSH m_oldBrush;
|
||||
WXHFONT m_oldFont;
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
WXHPALETTE m_oldPalette;
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
#if wxUSE_DC_CACHEING
|
||||
static wxObjectList sm_bitmapCache;
|
||||
static wxObjectList sm_dcCache;
|
||||
#endif
|
||||
|
||||
DECLARE_CLASS(wxPalmDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxPalmDCImpl);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDCTemp: a wxDC which doesn't free the given HDC (used by wxWidgets
|
||||
// only/mainly)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDCTempImpl : public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
// construct a temporary DC with the specified HDC and size (it should be
|
||||
// specified whenever we know it for this HDC)
|
||||
wxDCTempImpl(wxDC *owner, WXHDC hdc, const wxSize& size )
|
||||
: wxPalmDCImpl( owner, hdc ),
|
||||
m_size(size)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~wxDCTempImpl()
|
||||
{
|
||||
// prevent base class dtor from freeing it
|
||||
SetHDC((WXHDC)NULL);
|
||||
}
|
||||
|
||||
virtual void DoGetSize(int *w, int *h) const
|
||||
{
|
||||
wxASSERT_MSG( m_size.IsFullySpecified(),
|
||||
wxT("size of this DC hadn't been set and is unknown") );
|
||||
|
||||
if ( w )
|
||||
*w = m_size.x;
|
||||
if ( h )
|
||||
*h = m_size.y;
|
||||
}
|
||||
|
||||
private:
|
||||
// size of this DC must be explicitly set by SetSize() as we have no way to
|
||||
// find it ourselves
|
||||
const wxSize m_size;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxDCTempImpl);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDCTemp : public wxDC
|
||||
{
|
||||
public:
|
||||
wxDCTemp(WXHDC hdc, const wxSize& size = wxDefaultSize)
|
||||
: wxDC(new wxDCTempImpl(this, hdc, size))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_PALM_DC_H_
|
@@ -1,100 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dcclient.h
|
||||
// Purpose: wxClientDC class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCCLIENT_H_
|
||||
#define _WX_DCCLIENT_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/palmos/dc.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// array types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// this one if used by wxPaintDC only
|
||||
struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
|
||||
|
||||
WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// DC classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
// default ctor
|
||||
wxWindowDCImpl( wxDC *owner );
|
||||
|
||||
// Create a DC corresponding to the whole window
|
||||
wxWindowDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
protected:
|
||||
// initialize the newly created DC
|
||||
void InitDC();
|
||||
|
||||
DECLARE_CLASS(wxWindowDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
// default ctor
|
||||
wxClientDCImpl( wxDC *owner );
|
||||
|
||||
// Create a DC corresponding to the client area of the window
|
||||
wxClientDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual ~wxClientDCImpl();
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
protected:
|
||||
void InitDC();
|
||||
|
||||
DECLARE_CLASS(wxClientDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
|
||||
{
|
||||
public:
|
||||
wxPaintDCImpl( wxDC *owner );
|
||||
|
||||
// Create a DC corresponding for painting the window in OnPaint()
|
||||
wxPaintDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual ~wxPaintDCImpl();
|
||||
|
||||
// find the entry for this DC in the cache (keyed by the window)
|
||||
static WXHDC FindDCInCache(wxWindow* win);
|
||||
|
||||
protected:
|
||||
static wxArrayDCInfo ms_cache;
|
||||
|
||||
// find the entry for this DC in the cache (keyed by the window)
|
||||
wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
|
||||
|
||||
DECLARE_CLASS(wxPaintDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DCCLIENT_H_
|
@@ -1,43 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dcmemory.h
|
||||
// Purpose: wxMemoryDC class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCMEMORY_H_
|
||||
#define _WX_DCMEMORY_H_
|
||||
|
||||
#include "wx/dcmemory.h"
|
||||
#include "wx/palmos/dc.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
wxMemoryDCImpl( wxMemoryDC *owner );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); // Create compatible DC
|
||||
|
||||
// override some base class virtuals
|
||||
virtual void DoGetSize(int* width, int* height) const;
|
||||
virtual void DoSelect(const wxBitmap& bitmap);
|
||||
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const;
|
||||
|
||||
protected:
|
||||
// create DC compatible with the given one or screen if dc == NULL
|
||||
bool CreateCompatible(wxDC *dc);
|
||||
|
||||
// initialize the newly created DC
|
||||
void Init();
|
||||
|
||||
DECLARE_CLASS(wxMemoryDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DCMEMORY_H_
|
@@ -1,67 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dcprint.h
|
||||
// Purpose: wxPrinterDC class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCPRINT_H_
|
||||
#define _WX_DCPRINT_H_
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPrinterDC : public wxDC
|
||||
{
|
||||
public:
|
||||
// Create a printer DC (obsolete function: use wxPrintData version now)
|
||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, wxPrintOrientation orientation = wxPORTRAIT);
|
||||
|
||||
// Create from print data
|
||||
wxPrinterDC(const wxPrintData& data);
|
||||
|
||||
wxPrinterDC(WXHDC theDC);
|
||||
|
||||
// override some base class virtuals
|
||||
virtual bool StartDoc(const wxString& message);
|
||||
virtual void EndDoc();
|
||||
virtual void StartPage();
|
||||
virtual void EndPage();
|
||||
|
||||
wxRect GetPaperRect() const;
|
||||
|
||||
protected:
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = FALSE);
|
||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode rop = wxCOPY, bool useMask = FALSE,
|
||||
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
||||
|
||||
// init the dc
|
||||
void Init();
|
||||
|
||||
wxPrintData m_printData;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPrinterDC)
|
||||
};
|
||||
|
||||
// Gets an HDC for the default printer configuration
|
||||
// WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(int orientation);
|
||||
|
||||
// Gets an HDC for the specified printer configuration
|
||||
WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& data);
|
||||
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#endif
|
||||
// _WX_DCPRINT_H_
|
||||
|
@@ -1,32 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dcscreen.h
|
||||
// Purpose: wxScreenDC class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCSCREEN_H_
|
||||
#define _WX_DCSCREEN_H_
|
||||
|
||||
#include "wx/dcscreen.h"
|
||||
#include "wx/palmos/dc.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxPalmDCImpl
|
||||
{
|
||||
public:
|
||||
// Create a DC representing the whole screen
|
||||
wxScreenDCImpl( wxScreenDC *owner );
|
||||
|
||||
virtual void DoGetSize(int *w, int *h) const;
|
||||
|
||||
DECLARE_CLASS(wxScreenDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DCSCREEN_H_
|
||||
|
@@ -1,83 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dialog.h
|
||||
// Purpose: wxDialog class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DIALOG_H_
|
||||
#define _WX_DIALOG_H_
|
||||
|
||||
#include "wx/panel.h"
|
||||
|
||||
//WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxDialogNameStr[];
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDialogModalData;
|
||||
|
||||
// Dialog boxes
|
||||
class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase
|
||||
{
|
||||
public:
|
||||
wxDialog() { Init(); }
|
||||
|
||||
// full ctor
|
||||
wxDialog(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr);
|
||||
|
||||
virtual ~wxDialog();
|
||||
|
||||
// return true if we're showing the dialog modally
|
||||
virtual bool IsModal() const { return m_modalData != NULL; }
|
||||
|
||||
// show the dialog modally and return the value passed to EndModal()
|
||||
virtual int ShowModal();
|
||||
|
||||
// may be called to terminate the dialog with the given return code
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// override some base class virtuals
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
virtual void Raise();
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
private:
|
||||
wxWindow* m_oldFocus;
|
||||
bool m_endModalCalled; // allow for closing within InitDialog
|
||||
|
||||
// this pointer is non-NULL only while the modal event loop is running
|
||||
wxDialogModalData *m_modalData;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
wxDECLARE_NO_COPY_CLASS(wxDialog);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DIALOG_H_
|
@@ -1,243 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dib.h
|
||||
// Purpose: wxDIB class representing device independent bitmaps
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALMOS_DIB_H_
|
||||
#define _WX_PALMOS_DIB_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPalette;
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#if wxUSE_WXDIB
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDIB: represents a DIB section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDIB
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
// --------------
|
||||
|
||||
// create an uninitialized DIB with the given width, height and depth (only
|
||||
// 24 and 32 bpp DIBs are currently supported)
|
||||
//
|
||||
// after using this ctor, GetData() and GetHandle() may be used if IsOk()
|
||||
// returns true
|
||||
wxDIB(int width, int height, int depth)
|
||||
{ Init(); (void)Create(width, height, depth); }
|
||||
|
||||
// create a DIB from the DDB
|
||||
wxDIB(const wxBitmap& bmp)
|
||||
{ Init(); (void)Create(bmp); }
|
||||
|
||||
// load a DIB from file (any depth is supoprted here unlike above)
|
||||
//
|
||||
// as above, use IsOk() to see if the bitmap was loaded successfully
|
||||
wxDIB(const wxString& filename)
|
||||
{ Init(); (void)Load(filename); }
|
||||
|
||||
// same as the corresponding ctors but with return value
|
||||
bool Create(int width, int height, int depth);
|
||||
bool Create(const wxBitmap& bmp);
|
||||
bool Load(const wxString& filename);
|
||||
|
||||
// dtor is not virtual, this class is not meant to be used polymorphically
|
||||
~wxDIB();
|
||||
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
// create a bitmap compatiblr with the given HDC (or screen by default) and
|
||||
// return its handle, the caller is responsible for freeing it (using
|
||||
// DeleteObject())
|
||||
HBITMAP CreateDDB(HDC hdc = 0) const;
|
||||
#endif // !__WXWINCE__
|
||||
|
||||
// get the handle from the DIB and reset it, i.e. this object won't destroy
|
||||
// the DIB after this (but the caller should do it)
|
||||
HBITMAP Detach() { HBITMAP hbmp = m_handle; m_handle = 0; return hbmp; }
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
// create a palette for this DIB (always a trivial/default one for 24bpp)
|
||||
wxPalette *CreatePalette() const;
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
// save the DIB as a .BMP file to the file with the given name
|
||||
bool Save(const wxString& filename);
|
||||
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// return true if DIB was successfully created, false otherwise
|
||||
bool IsOk() const { return m_handle != 0; }
|
||||
|
||||
// get the bitmap size
|
||||
wxSize GetSize() const { DoGetObject(); return wxSize(m_width, m_height); }
|
||||
int GetWidth() const { DoGetObject(); return m_width; }
|
||||
int GetHeight() const { DoGetObject(); return m_height; }
|
||||
|
||||
// get the number of bits per pixel, or depth
|
||||
int GetDepth() const { DoGetObject(); return m_depth; }
|
||||
|
||||
// get the DIB handle
|
||||
HBITMAP GetHandle() const { return m_handle; }
|
||||
|
||||
// get raw pointer to bitmap bits, you should know what you do if you
|
||||
// decide to use it
|
||||
void *GetData() const { DoGetObject(); return m_data; }
|
||||
|
||||
|
||||
// HBITMAP conversion
|
||||
// ------------------
|
||||
|
||||
// these functions are only used by wxWidgets internally right now, please
|
||||
// don't use them directly if possible as they're subject to change
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
// creates a DDB compatible with the given (or screen) DC from either
|
||||
// a plain DIB or a DIB section (in which case the last parameter must be
|
||||
// non NULL)
|
||||
static HBITMAP ConvertToBitmap(const BITMAPINFO *pbi,
|
||||
HDC hdc = 0,
|
||||
void *bits = NULL);
|
||||
|
||||
// create a plain DIB (not a DIB section) from a DDB, the caller is
|
||||
// responsable for freeing it using ::GlobalFree()
|
||||
static HGLOBAL ConvertFromBitmap(HBITMAP hbmp);
|
||||
|
||||
// creates a DIB from the given DDB or calculates the space needed by it:
|
||||
// if pbi is NULL, only the space is calculated, otherwise pbi is supposed
|
||||
// to point at BITMAPINFO of the correct size which is filled by this
|
||||
// function (this overload is needed for wxBitmapDataObject code in
|
||||
// src/msw/ole/dataobj.cpp)
|
||||
static size_t ConvertFromBitmap(BITMAPINFO *pbi, HBITMAP hbmp);
|
||||
#endif // __WXWINCE__
|
||||
|
||||
|
||||
// wxImage conversion
|
||||
// ------------------
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
// create a DIB from the given image, the DIB will be either 24 or 32 (if
|
||||
// the image has alpha channel) bpp
|
||||
wxDIB(const wxImage& image) { Init(); (void)Create(image); }
|
||||
|
||||
// same as the above ctor but with the return code
|
||||
bool Create(const wxImage& image);
|
||||
|
||||
// create wxImage having the same data as this DIB
|
||||
wxImage ConvertToImage() const;
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
|
||||
// helper functions
|
||||
// ----------------
|
||||
|
||||
// return the size of one line in a DIB with given width and depth: the
|
||||
// point here is that as the scan lines need to be DWORD aligned so we may
|
||||
// need to add some padding
|
||||
static unsigned long GetLineSize(int width, int depth)
|
||||
{
|
||||
return ((width*depth + 31) & ~31) >> 3;
|
||||
}
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// free resources
|
||||
void Free();
|
||||
|
||||
// initialize the contents from the provided DDB (Create() must have been
|
||||
// already called)
|
||||
bool CopyFromDDB(HBITMAP hbmp);
|
||||
|
||||
|
||||
// the DIB section handle, 0 if invalid
|
||||
HBITMAP m_handle;
|
||||
|
||||
// NB: we could store only m_handle and not any of the other fields as
|
||||
// we may always retrieve them from it using ::GetObject(), but we
|
||||
// decide to still store them for efficiency concerns -- however if we
|
||||
// don't have them from the very beginning (e.g. DIB constructed from a
|
||||
// bitmap), we only retrieve them when necessary and so these fields
|
||||
// should *never* be accessed directly, even from inside wxDIB code
|
||||
|
||||
// function which must be called before accessing any members and which
|
||||
// gets their values from m_handle, if not done yet
|
||||
void DoGetObject() const;
|
||||
|
||||
// pointer to DIB bits, may be NULL
|
||||
void *m_data;
|
||||
|
||||
// size and depth of the image
|
||||
int m_width,
|
||||
m_height,
|
||||
m_depth;
|
||||
|
||||
// in some cases we could be using a handle which we didn't create and in
|
||||
// this case we shouldn't free it neither -- this flag tell us if this is
|
||||
// the case
|
||||
bool m_ownsHandle;
|
||||
|
||||
|
||||
// DIBs can't be copied
|
||||
wxDIB(const wxDIB&);
|
||||
wxDIB& operator=(const wxDIB&);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// inline functions implementation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
inline
|
||||
void wxDIB::Init()
|
||||
{
|
||||
m_handle = 0;
|
||||
m_ownsHandle = true;
|
||||
|
||||
m_data = NULL;
|
||||
|
||||
m_width =
|
||||
m_height =
|
||||
m_depth = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void wxDIB::Free()
|
||||
{
|
||||
if ( m_handle && m_ownsHandle )
|
||||
{
|
||||
if ( !::DeleteObject(m_handle) )
|
||||
{
|
||||
wxLogLastError(wxT("DeleteObject(hDIB)"));
|
||||
}
|
||||
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
inline wxDIB::~wxDIB()
|
||||
{
|
||||
Free();
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_WXDIB
|
||||
|
||||
#endif // _WX_PALMOS_DIB_H_
|
||||
|
@@ -1,35 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dirdlg.h
|
||||
// Purpose: wxDirDialog class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DIRDLG_H_
|
||||
#define _WX_DIRDLG_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
|
||||
{
|
||||
public:
|
||||
wxDirDialog(wxWindow *parent,
|
||||
const wxString& message = wxDirSelectorPromptStr,
|
||||
const wxString& defaultPath = wxEmptyString,
|
||||
long style = 0,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& name = wxDirDialogNameStr);
|
||||
|
||||
void SetPath(const wxString& path);
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDirDialog)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DIRDLG_H_
|
@@ -1,262 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/dragimag.h
|
||||
// Purpose: wxDragImage class: a kind of a cursor, that can cope
|
||||
// with more sophisticated images
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DRAGIMAG_H_
|
||||
#define _WX_DRAGIMAG_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/icon.h"
|
||||
#include "wx/cursor.h"
|
||||
#include "wx/treectrl.h"
|
||||
#include "wx/listctrl.h"
|
||||
|
||||
// If 1, use a simple wxCursor instead of ImageList_SetDragCursorImage
|
||||
#define wxUSE_SIMPLER_DRAGIMAGE 0
|
||||
|
||||
/*
|
||||
To use this class, create a wxDragImage when you start dragging, for example:
|
||||
|
||||
void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event)
|
||||
{
|
||||
CaptureMouse();
|
||||
|
||||
m_dragImage = new wxDragImage(* this, itemId);
|
||||
m_dragImage->BeginDrag(wxPoint(0, 0), this);
|
||||
m_dragImage->Move(pt, this);
|
||||
m_dragImage->Show(this);
|
||||
...
|
||||
}
|
||||
|
||||
In your OnMouseMove function, hide the image, do any display updating required,
|
||||
then move and show the image again:
|
||||
|
||||
void MyTreeCtrl::OnMouseMove(wxMouseEvent& event)
|
||||
{
|
||||
if (m_dragMode == MY_TREE_DRAG_NONE)
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent screen corruption by hiding the image
|
||||
if (m_dragImage)
|
||||
m_dragImage->Hide(this);
|
||||
|
||||
// Do some updating of the window, such as highlighting the drop target
|
||||
...
|
||||
|
||||
// Move and show the image again
|
||||
m_dragImage->Move(event.GetPosition(), this);
|
||||
m_dragImage->Show(this);
|
||||
}
|
||||
|
||||
Eventually we end the drag and delete the drag image.
|
||||
|
||||
void MyTreeCtrl::OnLeftUp(wxMouseEvent& event)
|
||||
{
|
||||
...
|
||||
|
||||
// End the drag and delete the drag image
|
||||
if (m_dragImage)
|
||||
{
|
||||
m_dragImage->EndDrag(this);
|
||||
delete m_dragImage;
|
||||
m_dragImage = NULL;
|
||||
}
|
||||
ReleaseMouse();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
Notes for Unix version:
|
||||
Can we simply use cursors instead, creating a cursor dynamically, setting it into the window
|
||||
in BeginDrag, and restoring the old cursor in EndDrag?
|
||||
For a really bog-standard implementation, we could simply use a normal dragging cursor
|
||||
and ignore the image.
|
||||
*/
|
||||
|
||||
/*
|
||||
* wxDragImage
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDragImage: public wxObject
|
||||
{
|
||||
public:
|
||||
|
||||
// Ctors & dtor
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxDragImage();
|
||||
wxDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(image, cursor);
|
||||
}
|
||||
|
||||
// Deprecated form of the above
|
||||
wxDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(image, cursor, cursorHotspot);
|
||||
}
|
||||
|
||||
wxDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(image, cursor);
|
||||
}
|
||||
|
||||
// Deprecated form of the above
|
||||
wxDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(image, cursor, cursorHotspot);
|
||||
}
|
||||
|
||||
wxDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(str, cursor);
|
||||
}
|
||||
|
||||
// Deprecated form of the above
|
||||
wxDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(str, cursor, cursorHotspot);
|
||||
}
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(treeCtrl, id);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTCTRL
|
||||
wxDragImage(const wxListCtrl& listCtrl, long id)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(listCtrl, id);
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual ~wxDragImage();
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Create a drag image from a bitmap and optional cursor
|
||||
bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor);
|
||||
bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||
{
|
||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||
return Create(image, cursor);
|
||||
}
|
||||
|
||||
// Create a drag image from an icon and optional cursor
|
||||
bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor);
|
||||
bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||
{
|
||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||
return Create(image, cursor);
|
||||
}
|
||||
|
||||
// Create a drag image from a string and optional cursor
|
||||
bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor);
|
||||
bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||
{
|
||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||
return Create(str, cursor);
|
||||
}
|
||||
|
||||
#if wxUSE_TREECTRL
|
||||
// Create a drag image for the given tree control item
|
||||
bool Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTCTRL
|
||||
// Create a drag image for the given list control item
|
||||
bool Create(const wxListCtrl& listCtrl, long id);
|
||||
#endif
|
||||
|
||||
// Begin drag. hotspot is the location of the drag position relative to the upper-left
|
||||
// corner of the image.
|
||||
bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = NULL);
|
||||
|
||||
// Begin drag. hotspot is the location of the drag position relative to the upper-left
|
||||
// corner of the image. This is full screen only. fullScreenRect gives the
|
||||
// position of the window on the screen, to restrict the drag to.
|
||||
bool BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* fullScreenRect);
|
||||
|
||||
// End drag
|
||||
bool EndDrag();
|
||||
|
||||
// Move the image: call from OnMouseMove. Pt is in window client coordinates if window
|
||||
// is non-NULL, or in screen coordinates if NULL.
|
||||
bool Move(const wxPoint& pt);
|
||||
|
||||
// Show the image
|
||||
bool Show();
|
||||
|
||||
// Hide the image
|
||||
bool Hide();
|
||||
|
||||
// Implementation
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Initialize variables
|
||||
void Init();
|
||||
|
||||
// Returns the native image list handle
|
||||
WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; }
|
||||
|
||||
#if !wxUSE_SIMPLER_DRAGIMAGE
|
||||
// Returns the native image list handle for the cursor
|
||||
WXHIMAGELIST GetCursorHIMAGELIST() const { return m_hCursorImageList; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
WXHIMAGELIST m_hImageList;
|
||||
|
||||
#if wxUSE_SIMPLER_DRAGIMAGE
|
||||
wxCursor m_oldCursor;
|
||||
#else
|
||||
WXHIMAGELIST m_hCursorImageList;
|
||||
#endif
|
||||
|
||||
wxCursor m_cursor;
|
||||
// wxPoint m_cursorHotspot; // Obsolete
|
||||
wxPoint m_position;
|
||||
wxWindow* m_window;
|
||||
wxRect m_boundingRect;
|
||||
bool m_fullScreen;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxDragImage)
|
||||
wxDECLARE_NO_COPY_CLASS(wxDragImage);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DRAGIMAG_H_
|
@@ -1,177 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/enhmeta.h
|
||||
// Purpose: wxEnhMetaFile class for PalmOS
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALMOS_ENHMETA_H_
|
||||
#define _WX_PALMOS_ENHMETA_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
#include "wx/dataobj.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxEnhMetaFile: encapsulation of Win32 HENHMETAFILE
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxEnhMetaFile : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxEnhMetaFile(const wxString& file = wxEmptyString) : m_filename(file)
|
||||
{ Init(); }
|
||||
wxEnhMetaFile(const wxEnhMetaFile& metafile)
|
||||
{ Init(); Assign(metafile); }
|
||||
wxEnhMetaFile& operator=(const wxEnhMetaFile& metafile)
|
||||
{ Free(); Assign(metafile); return *this; }
|
||||
|
||||
virtual ~wxEnhMetaFile()
|
||||
{ Free(); }
|
||||
|
||||
// display the picture stored in the metafile on the given DC
|
||||
bool Play(wxDC *dc, wxRect *rectBound = NULL);
|
||||
|
||||
// accessors
|
||||
virtual bool IsOk() const { return m_hMF != 0; }
|
||||
|
||||
wxSize GetSize() const;
|
||||
int GetWidth() const { return GetSize().x; }
|
||||
int GetHeight() const { return GetSize().y; }
|
||||
|
||||
const wxString& GetFileName() const { return m_filename; }
|
||||
|
||||
// copy the metafile to the clipboard: the width and height parameters are
|
||||
// for backwards compatibility (with wxMetaFile) only, they are ignored by
|
||||
// this method
|
||||
bool SetClipboard(int width = 0, int height = 0);
|
||||
|
||||
// implementation
|
||||
WXHANDLE GetHENHMETAFILE() const { return m_hMF; }
|
||||
void SetHENHMETAFILE(WXHANDLE hMF) { Free(); m_hMF = hMF; }
|
||||
|
||||
protected:
|
||||
void Init() { m_hMF = 0; }
|
||||
void Free();
|
||||
void Assign(const wxEnhMetaFile& mf);
|
||||
|
||||
private:
|
||||
wxString m_filename;
|
||||
WXHANDLE m_hMF;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxEnhMetaFile)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxEnhMetaFileDC: allows to create a wxEnhMetaFile
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxEnhMetaFileDC : public wxDC
|
||||
{
|
||||
public:
|
||||
// the ctor parameters specify the filename (empty for memory metafiles),
|
||||
// the metafile picture size and the optional description/comment
|
||||
wxEnhMetaFileDC(const wxString& filename = wxEmptyString,
|
||||
int width = 0, int height = 0,
|
||||
const wxString& description = wxEmptyString);
|
||||
|
||||
virtual ~wxEnhMetaFileDC();
|
||||
|
||||
// obtain a pointer to the new metafile (caller should delete it)
|
||||
wxEnhMetaFile *Close();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxEnhMetaFileDC)
|
||||
};
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxEnhMetaFileDataObject is a specialization of wxDataObject for enh metafile
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// notice that we want to support both CF_METAFILEPICT and CF_ENHMETAFILE and
|
||||
// so we derive from wxDataObject and not from wxDataObjectSimple
|
||||
class WXDLLIMPEXP_CORE wxEnhMetaFileDataObject : public wxDataObject
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxEnhMetaFileDataObject() { }
|
||||
wxEnhMetaFileDataObject(const wxEnhMetaFile& metafile)
|
||||
: m_metafile(metafile) { }
|
||||
|
||||
// virtual functions which you may override if you want to provide data on
|
||||
// demand only - otherwise, the trivial default versions will be used
|
||||
virtual void SetMetafile(const wxEnhMetaFile& metafile)
|
||||
{ m_metafile = metafile; }
|
||||
virtual wxEnhMetaFile GetMetafile() const
|
||||
{ return m_metafile; }
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual wxDataFormat GetPreferredFormat(Direction dir) const;
|
||||
virtual size_t GetFormatCount(Direction dir) const;
|
||||
virtual void GetAllFormats(wxDataFormat *formats, Direction dir) const;
|
||||
virtual size_t GetDataSize(const wxDataFormat& format) const;
|
||||
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
|
||||
virtual bool SetData(const wxDataFormat& format, size_t len,
|
||||
const void *buf);
|
||||
|
||||
protected:
|
||||
wxEnhMetaFile m_metafile;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileDataObject);
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxEnhMetaFileSimpleDataObject does derive from wxDataObjectSimple which
|
||||
// makes it more convenient to use (it can be used with wxDataObjectComposite)
|
||||
// at the price of not supoprting any more CF_METAFILEPICT but only
|
||||
// CF_ENHMETAFILE
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxEnhMetaFileSimpleDataObject : public wxDataObjectSimple
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxEnhMetaFileSimpleDataObject() : wxDataObjectSimple(wxDF_ENHMETAFILE) { }
|
||||
wxEnhMetaFileSimpleDataObject(const wxEnhMetaFile& metafile)
|
||||
: wxDataObjectSimple(wxDF_ENHMETAFILE), m_metafile(metafile) { }
|
||||
|
||||
// virtual functions which you may override if you want to provide data on
|
||||
// demand only - otherwise, the trivial default versions will be used
|
||||
virtual void SetEnhMetafile(const wxEnhMetaFile& metafile)
|
||||
{ m_metafile = metafile; }
|
||||
virtual wxEnhMetaFile GetEnhMetafile() const
|
||||
{ return m_metafile; }
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual size_t GetDataSize() const;
|
||||
virtual bool GetDataHere(void *buf) const;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
|
||||
virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const
|
||||
{ return GetDataSize(); }
|
||||
virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format),
|
||||
void *buf) const
|
||||
{ return GetDataHere(buf); }
|
||||
virtual bool SetData(const wxDataFormat& WXUNUSED(format),
|
||||
size_t len, const void *buf)
|
||||
{ return SetData(len, buf); }
|
||||
|
||||
protected:
|
||||
wxEnhMetaFile m_metafile;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileSimpleDataObject);
|
||||
};
|
||||
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif // _WX_PALMOS_ENHMETA_H_
|
@@ -1,53 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/evtloop.h
|
||||
// Purpose: wxEventLoop class for Palm OS
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 2004-10-14
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALMOS_EVTLOOP_H_
|
||||
#define _WX_PALMOS_EVTLOOP_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxEventLoop
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase
|
||||
{
|
||||
public:
|
||||
wxGUIEventLoop();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int Run();
|
||||
virtual void Exit(int rc = 0);
|
||||
virtual bool Pending() const;
|
||||
virtual bool Dispatch();
|
||||
virtual int DispatchTimeout(unsigned long timeout);
|
||||
virtual bool IsRunning() const;
|
||||
virtual bool YieldFor(long eventsToProcess);
|
||||
|
||||
// MSW-specific methods
|
||||
// --------------------
|
||||
|
||||
// preprocess a message, return true if processed (i.e. no further
|
||||
// dispatching required)
|
||||
virtual bool PreProcessMessage(WXMSG *msg);
|
||||
|
||||
// process a single message
|
||||
virtual void ProcessMessage(WXMSG *msg);
|
||||
virtual void WakeUp();
|
||||
|
||||
protected:
|
||||
// should we exit the loop?
|
||||
bool m_shouldExit;
|
||||
|
||||
// the loop exit code
|
||||
int m_exitcode;
|
||||
};
|
||||
|
||||
#endif // _WX_PALMOS_EVTLOOP_H_
|
||||
|
@@ -1,62 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/fdrepdlg.h
|
||||
// Purpose: wxFindReplaceDialog class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALMOS_FDREPDLG_H_
|
||||
#define _WX_PALMOS_FDREPDLG_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFindReplaceDialog: dialog for searching / replacing text
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFindReplaceDialog : public wxFindReplaceDialogBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxFindReplaceDialog() { Init(); }
|
||||
wxFindReplaceDialog(wxWindow *parent,
|
||||
wxFindReplaceData *data,
|
||||
const wxString &title,
|
||||
int style = 0);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxFindReplaceData *data,
|
||||
const wxString &title,
|
||||
int style = 0);
|
||||
|
||||
virtual ~wxFindReplaceDialog();
|
||||
|
||||
// implementation only from now on
|
||||
|
||||
wxFindReplaceDialogImpl *GetImpl() const { return m_impl; }
|
||||
|
||||
// override some base class virtuals
|
||||
virtual bool Show(bool show = TRUE);
|
||||
virtual void SetTitle( const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
|
||||
protected:
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
void Init();
|
||||
|
||||
wxString m_title;
|
||||
|
||||
wxFindReplaceDialogImpl *m_impl;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFindReplaceDialog)
|
||||
wxDECLARE_NO_COPY_CLASS(wxFindReplaceDialog);
|
||||
};
|
||||
|
||||
#endif // _WX_PALMOS_FDREPDLG_H_
|
@@ -1,46 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/filedlg.h
|
||||
// Purpose: wxFileDialog class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FILEDLG_H_
|
||||
#define _WX_FILEDLG_H_
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxFileDialog
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
|
||||
{
|
||||
public:
|
||||
wxFileDialog(wxWindow *parent,
|
||||
const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultDir = wxEmptyString,
|
||||
const wxString& defaultFile = wxEmptyString,
|
||||
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
||||
long style = wxFD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
const wxString& name = wxFileDialogNameStr);
|
||||
|
||||
virtual void SetPath(const wxString& path);
|
||||
virtual void GetPaths(wxArrayString& paths) const;
|
||||
virtual void GetFilenames(wxArrayString& files) const;
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
private:
|
||||
wxArrayString m_fileNames;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFileDialog)
|
||||
wxDECLARE_NO_COPY_CLASS(wxFileDialog);
|
||||
};
|
||||
|
||||
#endif // _WX_FILEDLG_H_
|
||||
|
@@ -1,153 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/font.h
|
||||
// Purpose: wxFont class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Yunhui Fu
|
||||
// Created: 10/14/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FONT_H_
|
||||
#define _WX_FONT_H_
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFont
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFont : public wxFontBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxFont() { }
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxFont(int size,
|
||||
int family,
|
||||
int style,
|
||||
int weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
(void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
|
||||
}
|
||||
#endif
|
||||
|
||||
wxFont(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Create(size, family, style, weight, underlined, face, encoding);
|
||||
}
|
||||
|
||||
bool Create(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
wxFont(const wxSize& pixelSize,
|
||||
int family,
|
||||
int style,
|
||||
int weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
(void)Create(pixelSize, family, style, weight,
|
||||
underlined, face, encoding);
|
||||
}
|
||||
|
||||
wxFont(const wxNativeFontInfo& info, WXHFONT hFont = 0)
|
||||
{
|
||||
Create(info, hFont);
|
||||
}
|
||||
|
||||
wxFont(const wxString& fontDesc);
|
||||
|
||||
bool Create(const wxSize& pixelSize,
|
||||
int family,
|
||||
int style,
|
||||
int weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
return DoCreate(-1, pixelSize, true, family, style,
|
||||
weight, underlined, face, encoding);
|
||||
}
|
||||
|
||||
bool Create(const wxNativeFontInfo& info, WXHFONT hFont = 0);
|
||||
|
||||
virtual ~wxFont();
|
||||
|
||||
// wxFontBase overridden functions
|
||||
virtual wxString GetNativeFontInfoDesc() const;
|
||||
virtual wxString GetNativeFontInfoUserDesc() const;
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int GetPointSize() const;
|
||||
virtual wxSize GetPixelSize() const;
|
||||
virtual bool IsUsingSizeInPixels() const;
|
||||
virtual wxFontStyle GetStyle() const;
|
||||
virtual wxFontWeight GetWeight() const;
|
||||
virtual bool GetUnderlined() const;
|
||||
virtual wxString GetFaceName() const;
|
||||
virtual wxFontEncoding GetEncoding() const;
|
||||
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
|
||||
|
||||
virtual void SetPointSize(int pointSize);
|
||||
virtual void SetPixelSize(const wxSize& pixelSize);
|
||||
virtual void SetFamily(wxFontFamily family);
|
||||
virtual void SetStyle(wxFontStyle style);
|
||||
virtual void SetWeight(wxFontWeight weight);
|
||||
virtual bool SetFaceName(const wxString& faceName);
|
||||
virtual void SetUnderlined(bool underlined);
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
wxDECLARE_COMMON_FONT_METHODS();
|
||||
|
||||
virtual bool IsFixedWidth() const;
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
virtual bool IsFree() const;
|
||||
virtual bool RealizeResource();
|
||||
virtual WXHANDLE GetResourceHandle() const;
|
||||
virtual bool FreeResource(bool force = false);
|
||||
|
||||
protected:
|
||||
// real font creation function, used in all cases
|
||||
bool DoCreate(int size,
|
||||
const wxSize& pixelSize,
|
||||
bool sizeUsingPixels,
|
||||
int family,
|
||||
int style,
|
||||
int weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
|
||||
virtual wxFontFamily DoGetFamily() const;
|
||||
|
||||
// implement wxObject virtuals which are used by AllocExclusive()
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
};
|
||||
|
||||
#endif // _WX_FONT_H_
|
@@ -1,35 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/fontdlg.h
|
||||
// Purpose: wxFontDialog class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALMOS_FONTDLG_H_
|
||||
#define _WX_PALMOS_FONTDLG_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFontDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFontDialog : public wxFontDialogBase
|
||||
{
|
||||
public:
|
||||
wxFontDialog() : wxFontDialogBase() { /* must be Create()d later */ }
|
||||
wxFontDialog(wxWindow *parent)
|
||||
: wxFontDialogBase(parent) { Create(parent); }
|
||||
wxFontDialog(wxWindow *parent, const wxFontData& data)
|
||||
: wxFontDialogBase(parent, data) { Create(parent, data); }
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontDialog)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_PALMOS_FONTDLG_H_
|
@@ -1,105 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/frame.h
|
||||
// Purpose: wxFrame class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FRAME_H_
|
||||
#define _WX_FRAME_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
wxFrame() { Init(); }
|
||||
wxFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxFrame();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual void Raise();
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// event handlers
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
// Toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
virtual void PositionToolBar();
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// event handlers
|
||||
bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
|
||||
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
bool HandleMenuOpen();
|
||||
bool HandleMenuSelect(WXEVENTPTR event);
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// override base class virtuals
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
// a plug in for MDI frame classes which need to do something special when
|
||||
// the menubar is set
|
||||
virtual void InternalSetMenuBar();
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
// propagate our state change to all child frames
|
||||
void IconizeChildFrames(bool bIconize);
|
||||
|
||||
virtual bool IsMDIChild() const { return false; }
|
||||
|
||||
// Data to save/restore when calling ShowFullScreen
|
||||
int m_fsStatusBarFields; // 0 for no status bar
|
||||
int m_fsStatusBarHeight;
|
||||
int m_fsToolBarHeight;
|
||||
|
||||
private:
|
||||
// used by IconizeChildFrames(), see comments there
|
||||
bool m_wasMinimized;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_FRAME_H_
|
@@ -1,65 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/gauge.h
|
||||
// Purpose: wxGauge class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _GAUGE_H_
|
||||
#define _GAUGE_H_
|
||||
|
||||
#if wxUSE_GAUGE
|
||||
|
||||
WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxGaugeNameStr[];
|
||||
|
||||
// Group box
|
||||
class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase
|
||||
{
|
||||
public:
|
||||
wxGauge() { }
|
||||
|
||||
wxGauge(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr)
|
||||
{
|
||||
(void)Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
|
||||
// set gauge range/value
|
||||
virtual void SetRange(int range);
|
||||
virtual void SetValue(int pos);
|
||||
|
||||
// overridden base class virtuals
|
||||
virtual bool SetForegroundColour(const wxColour& col);
|
||||
virtual bool SetBackgroundColour(const wxColour& col);
|
||||
|
||||
protected:
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge)
|
||||
};
|
||||
|
||||
#endif // wxUSE_GAUGE
|
||||
|
||||
#endif
|
||||
// _GAUGE_H_
|
@@ -1,191 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/gdiimage.h
|
||||
// Purpose: wxGDIImage class: base class for wxBitmap, wxIcon, wxCursor
|
||||
// under Palm OS
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Yunhui Fu
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// NB: this is a private header, it is not intended to be directly included by
|
||||
// user code (but may be included from other, public, wxWin headers
|
||||
|
||||
#ifndef _WX_PALMOS_GDIIMAGE_H_
|
||||
#define _WX_PALMOS_GDIIMAGE_H_
|
||||
|
||||
#include "wx/gdiobj.h" // base class
|
||||
#include "wx/gdicmn.h" // wxBITMAP_TYPE_INVALID
|
||||
#include "wx/list.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxGDIImageRefData;
|
||||
class WXDLLIMPEXP_FWD_CORE wxGDIImageHandler;
|
||||
class WXDLLIMPEXP_FWD_CORE wxGDIImage;
|
||||
|
||||
WX_DECLARE_EXPORTED_LIST(wxGDIImageHandler, wxGDIImageHandlerList);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGDIImageRefData: common data fields for all derived classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGDIImageRefData : public wxGDIRefData
|
||||
{
|
||||
public:
|
||||
wxGDIImageRefData()
|
||||
{
|
||||
m_width = m_height = m_depth = 0;
|
||||
|
||||
m_handle = 0;
|
||||
}
|
||||
|
||||
// accessors
|
||||
virtual bool IsOk() const { return m_handle != 0; }
|
||||
|
||||
void SetSize(int w, int h) { m_width = w; m_height = h; }
|
||||
|
||||
// free the ressources we allocated
|
||||
virtual void Free() = 0;
|
||||
|
||||
// for compatibility, the member fields are public
|
||||
|
||||
// the size of the image
|
||||
int m_width, m_height;
|
||||
|
||||
// the depth of the image
|
||||
int m_depth;
|
||||
|
||||
// the handle to it
|
||||
union
|
||||
{
|
||||
WXHANDLE m_handle; // for untyped access
|
||||
WXHBITMAP m_hBitmap;
|
||||
WXHICON m_hIcon;
|
||||
WXHCURSOR m_hCursor;
|
||||
};
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGDIImageHandler: a class which knows how to load/save wxGDIImages.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGDIImageHandler : public wxObject
|
||||
{
|
||||
public:
|
||||
// ctor
|
||||
wxGDIImageHandler() { m_type = wxBITMAP_TYPE_INVALID; }
|
||||
wxGDIImageHandler(const wxString& name,
|
||||
const wxString& ext,
|
||||
long type)
|
||||
: m_name(name), m_extension(ext)
|
||||
{
|
||||
m_type = type;
|
||||
}
|
||||
|
||||
// accessors
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
void SetExtension(const wxString& ext) { m_extension = ext; }
|
||||
void SetType(long type) { m_type = type; }
|
||||
|
||||
wxString GetName() const { return m_name; }
|
||||
wxString GetExtension() const { return m_extension; }
|
||||
long GetType() const { return m_type; }
|
||||
|
||||
// real handler operations: to implement in derived classes
|
||||
virtual bool Create(wxGDIImage *image,
|
||||
const void* data,
|
||||
long flags,
|
||||
int width, int height, int depth = 1) = 0;
|
||||
virtual bool Load(wxGDIImage *image,
|
||||
const wxString& name,
|
||||
long flags,
|
||||
int desiredWidth, int desiredHeight) = 0;
|
||||
virtual bool Save(wxGDIImage *image,
|
||||
const wxString& name,
|
||||
int type) = 0;
|
||||
|
||||
protected:
|
||||
wxString m_name;
|
||||
wxString m_extension;
|
||||
long m_type;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGDIImage: this class supports GDI image handlers which may be registered
|
||||
// dynamically and will be used for loading/saving the images in the specified
|
||||
// format. It also falls back to wxImage if no appropriate image is found.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGDIImage : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
// handlers list interface
|
||||
static wxGDIImageHandlerList& GetHandlers() { return ms_handlers; }
|
||||
|
||||
static void AddHandler(wxGDIImageHandler *handler);
|
||||
static void InsertHandler(wxGDIImageHandler *handler);
|
||||
static bool RemoveHandler(const wxString& name);
|
||||
|
||||
static wxGDIImageHandler *FindHandler(const wxString& name);
|
||||
static wxGDIImageHandler *FindHandler(const wxString& extension, long type);
|
||||
static wxGDIImageHandler *FindHandler(long type);
|
||||
|
||||
static void InitStandardHandlers();
|
||||
static void CleanUpHandlers();
|
||||
|
||||
// access to the ref data casted to the right type
|
||||
wxGDIImageRefData *GetGDIImageData() const
|
||||
{ return (wxGDIImageRefData *)m_refData; }
|
||||
|
||||
// create data if we don't have it yet
|
||||
void EnsureHasData() { if ( IsNull() ) m_refData = CreateData(); }
|
||||
|
||||
// accessors
|
||||
WXHANDLE GetHandle() const
|
||||
{ return IsNull() ? 0 : GetGDIImageData()->m_handle; }
|
||||
void SetHandle(WXHANDLE handle)
|
||||
{ EnsureHasData(); GetGDIImageData()->m_handle = handle; }
|
||||
|
||||
int GetWidth() const { return IsNull() ? 0 : GetGDIImageData()->m_width; }
|
||||
int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; }
|
||||
int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_depth; }
|
||||
|
||||
wxSize GetSize() const
|
||||
{
|
||||
return IsNull() ? wxSize(0,0) :
|
||||
wxSize(GetGDIImageData()->m_width, GetGDIImageData()->m_height);
|
||||
}
|
||||
|
||||
void SetWidth(int w) { EnsureHasData(); GetGDIImageData()->m_width = w; }
|
||||
void SetHeight(int h) { EnsureHasData(); GetGDIImageData()->m_height = h; }
|
||||
void SetDepth(int d) { EnsureHasData(); GetGDIImageData()->m_depth = d; }
|
||||
|
||||
void SetSize(int w, int h)
|
||||
{
|
||||
EnsureHasData();
|
||||
GetGDIImageData()->SetSize(w, h);
|
||||
}
|
||||
void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
|
||||
|
||||
// forward some of base class virtuals to wxGDIImageRefData
|
||||
bool FreeResource(bool force = FALSE);
|
||||
virtual WXHANDLE GetResourceHandle() const;
|
||||
|
||||
protected:
|
||||
// create the data for the derived class here
|
||||
virtual wxGDIImageRefData *CreateData() const = 0;
|
||||
virtual wxGDIRefData *CreateGDIRefData() const { return CreateData(); }
|
||||
// we can't [efficiently] clone objects of this class
|
||||
virtual wxGDIRefData *
|
||||
CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const
|
||||
{
|
||||
wxFAIL_MSG( wxT("must be implemented if used") );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static wxGDIImageHandlerList ms_handlers;
|
||||
};
|
||||
|
||||
#endif // _WX_PALMOS_GDIIMAGE_H_
|
@@ -1,125 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/glcanvas.h
|
||||
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Palm OS
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GLCANVAS_H_
|
||||
#define _WX_GLCANVAS_H_
|
||||
|
||||
#include "wx/palette.h"
|
||||
#include "wx/scrolwin.h"
|
||||
|
||||
#include "wx/msw/wrapwin.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
class WXDLLIMPEXP_FWD_GL wxGLCanvas; /* forward reference */
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLContext: public wxObject
|
||||
{
|
||||
public:
|
||||
wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette);
|
||||
|
||||
wxGLContext( bool isRGB, wxGLCanvas *win,
|
||||
const wxPalette& WXUNUSED(palette),
|
||||
const wxGLContext *other /* for sharing display lists */ );
|
||||
|
||||
virtual ~wxGLContext();
|
||||
|
||||
|
||||
void SetCurrent();
|
||||
|
||||
void SetColour(const wxString& colour);
|
||||
|
||||
void SwapBuffers();
|
||||
|
||||
|
||||
inline wxWindow* GetWindow() const { return m_window; }
|
||||
|
||||
inline WXHDC GetHDC() const { return m_hDC; }
|
||||
|
||||
inline HGLRC GetGLRC() const { return m_glContext; }
|
||||
|
||||
public:
|
||||
HGLRC m_glContext;
|
||||
WXHDC m_hDC;
|
||||
wxWindow* m_window;
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLCanvas: public wxWindow
|
||||
{
|
||||
DECLARE_CLASS(wxGLCanvas)
|
||||
public:
|
||||
wxGLCanvas(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = wxGLCanvasName, int *attribList = 0,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
const wxGLContext *shared = NULL,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
const wxGLCanvas *shared = NULL,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
int *attribList = 0,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
virtual ~wxGLCanvas();
|
||||
|
||||
// Replaces wxWindow::Create functionality, since
|
||||
// we need to use a different window class
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style, const wxString& name);
|
||||
|
||||
void SetCurrent();
|
||||
|
||||
#ifdef __WXUNIVERSAL__
|
||||
virtual bool SetCurrent(bool doit) { return wxWindow::SetCurrent(doit); }
|
||||
#endif
|
||||
|
||||
void SetColour(const wxChar *colour);
|
||||
|
||||
void SwapBuffers();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
void OnQueryNewPalette(wxQueryNewPaletteEvent& event);
|
||||
|
||||
void OnPaletteChanged(wxPaletteChangedEvent& event);
|
||||
|
||||
inline wxGLContext* GetContext() const { return m_glContext; }
|
||||
|
||||
inline WXHDC GetHDC() const { return m_hDC; }
|
||||
|
||||
void SetupPixelFormat(int *attribList = NULL);
|
||||
|
||||
void SetupPalette(const wxPalette& palette);
|
||||
|
||||
protected:
|
||||
WXHDC m_hDC;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GLCANVAS_H_
|
||||
|
@@ -1,56 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/help.h
|
||||
// Purpose: Help system: WinHelp implementation
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HELP_H_
|
||||
#define _WX_HELP_H_
|
||||
|
||||
#include "wx/wx.h"
|
||||
|
||||
#if wxUSE_HELP
|
||||
|
||||
#include "wx/helpbase.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPalmHelpController: public wxHelpControllerBase
|
||||
{
|
||||
DECLARE_CLASS(wxPalmHelpController)
|
||||
|
||||
public:
|
||||
wxPalmHelpController() {}
|
||||
virtual ~wxPalmHelpController() {}
|
||||
|
||||
// Must call this to set the filename
|
||||
virtual bool Initialize(const wxString& file);
|
||||
virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); }
|
||||
|
||||
// If file is "", reloads file given in Initialize
|
||||
virtual bool LoadFile(const wxString& file = wxEmptyString);
|
||||
virtual bool DisplayContents();
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); }
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
virtual bool DisplayContextPopup(int contextId);
|
||||
virtual bool KeywordSearch(const wxString& k,
|
||||
wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
|
||||
virtual bool Quit();
|
||||
|
||||
inline wxString GetHelpFile() const { return m_helpFile; }
|
||||
|
||||
protected:
|
||||
// Append extension if necessary.
|
||||
wxString GetValidFilename(const wxString& file) const;
|
||||
|
||||
private:
|
||||
wxString m_helpFile;
|
||||
};
|
||||
|
||||
#endif // wxUSE_HELP
|
||||
#endif
|
||||
// _WX_HELP_H_
|
@@ -1,214 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/imaglist.h
|
||||
// Purpose: wxImageList class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Yunhui Fu
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_IMAGLIST_H_
|
||||
#define _WX_IMAGLIST_H_
|
||||
|
||||
#include "wx/bitmap.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.
|
||||
*/
|
||||
|
||||
// Eventually we'll make this a reference-counted wxGDIObject. For
|
||||
// now, the app must take care of ownership issues. That is, the
|
||||
// image lists must be explicitly deleted after the control(s) that uses them
|
||||
// is (are) deleted, or when the app exits.
|
||||
class WXDLLIMPEXP_CORE wxImageList : public wxObject
|
||||
{
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxImageList();
|
||||
|
||||
// Creates an image list.
|
||||
// Specify the width and height of the images in the list,
|
||||
// whether there are masks associated with them (e.g. if creating images
|
||||
// from icons), and the initial size of the list.
|
||||
wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1)
|
||||
{
|
||||
Create(width, height, mask, initialCount);
|
||||
}
|
||||
virtual ~wxImageList();
|
||||
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Returns the number of images in the image list.
|
||||
int GetImageCount() const;
|
||||
|
||||
// Returns the size (same for all images) of the images in the list
|
||||
bool GetSize(int index, int &width, int &height) const;
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Creates an image list
|
||||
// width, height specify the size of the images in the list (all the same).
|
||||
// mask specifies whether the images have masks or not.
|
||||
// initialNumber is the initial number of images to reserve.
|
||||
bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1);
|
||||
|
||||
// Adds a bitmap, and optionally a mask bitmap.
|
||||
// Note that wxImageList creates *new* bitmaps, so you may delete
|
||||
// 'bitmap' and 'mask' after calling Add.
|
||||
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
|
||||
|
||||
// Adds a bitmap, using the specified colour to create the mask bitmap
|
||||
// Note that wxImageList creates *new* bitmaps, so you may delete
|
||||
// 'bitmap' after calling Add.
|
||||
int Add(const wxBitmap& bitmap, const wxColour& maskColour);
|
||||
|
||||
// Adds a bitmap and mask from an icon.
|
||||
int Add(const wxIcon& icon);
|
||||
|
||||
// Replaces a bitmap, optionally passing a mask bitmap.
|
||||
// Note that wxImageList creates new bitmaps, so you may delete
|
||||
// 'bitmap' and 'mask' after calling Replace.
|
||||
bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
|
||||
|
||||
/* Not supported by Win95
|
||||
// Replacing a bitmap, using the specified colour to create the mask bitmap
|
||||
// Note that wxImageList creates new bitmaps, so you may delete
|
||||
// 'bitmap'.
|
||||
bool Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour);
|
||||
*/
|
||||
|
||||
// Replaces a bitmap and mask from an icon.
|
||||
// You can delete 'icon' after calling Replace.
|
||||
bool Replace(int index, const wxIcon& icon);
|
||||
|
||||
// Removes the image at the given index.
|
||||
bool Remove(int index);
|
||||
|
||||
// Remove all images
|
||||
bool RemoveAll();
|
||||
|
||||
// Draws the given image on a dc at the specified position.
|
||||
// If 'solidBackground' is TRUE, Draw sets the image list background
|
||||
// colour to the background colour of the wxDC, to speed up
|
||||
// drawing by eliminating masked drawing where possible.
|
||||
bool Draw(int index, wxDC& dc, int x, int y,
|
||||
int flags = wxIMAGELIST_DRAW_NORMAL,
|
||||
bool solidBackground = FALSE);
|
||||
|
||||
// TODO: miscellaneous functionality
|
||||
/*
|
||||
wxIcon *MakeIcon(int index);
|
||||
bool SetOverlayImage(int index, int overlayMask);
|
||||
|
||||
*/
|
||||
|
||||
// TODO: Drag-and-drop related functionality.
|
||||
|
||||
#if 0
|
||||
// Creates a new drag image by combining the given image (typically a mouse cursor image)
|
||||
// with the current drag image.
|
||||
bool SetDragCursorImage(int index, const wxPoint& hotSpot);
|
||||
|
||||
// If successful, returns a pointer to the temporary image list that is used for dragging;
|
||||
// otherwise, NULL.
|
||||
// dragPos: receives the current drag position.
|
||||
// hotSpot: receives the offset of the drag image relative to the drag position.
|
||||
static wxImageList *GetDragImageList(wxPoint& dragPos, wxPoint& hotSpot);
|
||||
|
||||
// Call this function to begin dragging an image. This function creates a temporary image list
|
||||
// that is used for dragging. The image combines the specified image and its mask with the
|
||||
// current cursor. In response to subsequent mouse move messages, you can move the drag image
|
||||
// by using the DragMove member function. To end the drag operation, you can use the EndDrag
|
||||
// member function.
|
||||
bool BeginDrag(int index, const wxPoint& hotSpot);
|
||||
|
||||
// Ends a drag operation.
|
||||
bool EndDrag();
|
||||
|
||||
// Call this function to move the image that is being dragged during a drag-and-drop operation.
|
||||
// This function is typically called in response to a mouse move message. To begin a drag
|
||||
// operation, use the BeginDrag member function.
|
||||
static bool DragMove(const wxPoint& point);
|
||||
|
||||
// During a drag operation, locks updates to the window specified by lockWindow and displays
|
||||
// the drag image at the position specified by point.
|
||||
// The coordinates are relative to the window's upper left corner, so you must compensate
|
||||
// for the widths of window elements, such as the border, title bar, and menu bar, when
|
||||
// specifying the coordinates.
|
||||
// If lockWindow is NULL, this function draws the image in the display context associated
|
||||
// with the desktop window, and coordinates are relative to the upper left corner of the screen.
|
||||
// This function locks all other updates to the given window during the drag operation.
|
||||
// If you need to do any drawing during a drag operation, such as highlighting the target
|
||||
// of a drag-and-drop operation, you can temporarily hide the dragged image by using the
|
||||
// wxImageList::DragLeave function.
|
||||
|
||||
// lockWindow: pointer to the window that owns the drag image.
|
||||
// point: position at which to display the drag image. Coordinates are relative to the
|
||||
// upper left corner of the window (not the client area).
|
||||
|
||||
static bool DragEnter( wxWindow *lockWindow, const wxPoint& point );
|
||||
|
||||
// Unlocks the window specified by pWndLock and hides the drag image, allowing the
|
||||
// window to be updated.
|
||||
static bool DragLeave( wxWindow *lockWindow );
|
||||
|
||||
/* Here's roughly how you'd use these functions if implemented in this Win95-like way:
|
||||
|
||||
1) Starting to drag:
|
||||
|
||||
wxImageList *dragImageList = new wxImageList(16, 16, TRUE);
|
||||
dragImageList->Add(myDragImage); // Provide an image to combine with the current cursor
|
||||
dragImageList->BeginDrag(0, wxPoint(0, 0));
|
||||
wxShowCursor(FALSE); // wxShowCursor not yet implemented in wxWin
|
||||
myWindow->CaptureMouse();
|
||||
|
||||
2) Dragging:
|
||||
|
||||
// Called within mouse move event. Could also use dragImageList instead of assuming
|
||||
// these are static functions.
|
||||
// These two functions could possibly be combined into one, since DragEnter is
|
||||
// a bit obscure.
|
||||
wxImageList::DragMove(wxPoint(x, y)); // x, y are current cursor position
|
||||
wxImageList::DragEnter(NULL, wxPoint(x, y)); // NULL assumes dragging across whole screen
|
||||
|
||||
3) Finishing dragging:
|
||||
|
||||
dragImageList->EndDrag();
|
||||
myWindow->ReleaseMouse();
|
||||
wxShowCursor(TRUE);
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
// Implementation
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Returns the native image list handle
|
||||
WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; }
|
||||
|
||||
protected:
|
||||
WXHIMAGELIST m_hImageList;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxImageList)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_IMAGLIST_H_
|
@@ -1,92 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/joystick.h
|
||||
// Purpose: wxJoystick class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_JOYSTICK_H_
|
||||
#define _WX_JOYSTICK_H_
|
||||
|
||||
#include "wx/event.h"
|
||||
|
||||
class WXDLLIMPEXP_ADV wxJoystick: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxJoystick)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxJoystick(int joystick = wxJOYSTICK1);
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxPoint GetPosition(void) const;
|
||||
int GetPosition(unsigned axis) const;
|
||||
bool GetButtonState(unsigned button) const;
|
||||
int GetZPosition(void) const;
|
||||
int GetButtonState(void) const;
|
||||
int GetPOVPosition(void) const;
|
||||
int GetPOVCTSPosition(void) const;
|
||||
int GetRudderPosition(void) const;
|
||||
int GetUPosition(void) const;
|
||||
int GetVPosition(void) const;
|
||||
int GetMovementThreshold(void) const;
|
||||
void SetMovementThreshold(int threshold) ;
|
||||
|
||||
// Capabilities
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static int GetNumberJoysticks(void);
|
||||
|
||||
bool IsOk(void) const; // Checks that the joystick is functioning
|
||||
int GetManufacturerId(void) const ;
|
||||
int GetProductId(void) const ;
|
||||
wxString GetProductName(void) const ;
|
||||
int GetXMin(void) const;
|
||||
int GetYMin(void) const;
|
||||
int GetZMin(void) const;
|
||||
int GetXMax(void) const;
|
||||
int GetYMax(void) const;
|
||||
int GetZMax(void) const;
|
||||
int GetNumberButtons(void) const;
|
||||
int GetNumberAxes(void) const;
|
||||
int GetMaxButtons(void) const;
|
||||
int GetMaxAxes(void) const;
|
||||
int GetPollingMin(void) const;
|
||||
int GetPollingMax(void) const;
|
||||
int GetRudderMin(void) const;
|
||||
int GetRudderMax(void) const;
|
||||
int GetUMin(void) const;
|
||||
int GetUMax(void) const;
|
||||
int GetVMin(void) const;
|
||||
int GetVMax(void) const;
|
||||
|
||||
bool HasRudder(void) const;
|
||||
bool HasZ(void) const;
|
||||
bool HasU(void) const;
|
||||
bool HasV(void) const;
|
||||
bool HasPOV(void) const;
|
||||
bool HasPOV4Dir(void) const;
|
||||
bool HasPOVCTS(void) const;
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// pollingFreq = 0 means that movement events are sent when above the threshold.
|
||||
// If pollingFreq > 0, events are received every this many milliseconds.
|
||||
bool SetCapture(wxWindow* win, int pollingFreq = 0);
|
||||
bool ReleaseCapture(void);
|
||||
|
||||
protected:
|
||||
int m_joystick;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_JOYSTICK_H_
|
@@ -1,158 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_LISTBOX_H_
|
||||
#define _WX_LISTBOX_H_
|
||||
|
||||
#if wxUSE_LISTBOX
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// simple types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
class WXDLLIMPEXP_FWD_CORE wxOwnerDrawn;
|
||||
|
||||
// define the array of list box items
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY_PTR(wxOwnerDrawn *, wxListBoxItemsArray);
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
|
||||
// forward decl for GetSelections()
|
||||
class wxArrayInt;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// List box control
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxListBox();
|
||||
wxListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
virtual ~wxListBox();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void DoClear();
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
virtual int GetSelection() const;
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
|
||||
virtual void DoSetFirstItem(int n);
|
||||
|
||||
virtual void DoSetItemClientData(unsigned int n, void* clientData);
|
||||
virtual void* DoGetItemClientData(unsigned int n) const;
|
||||
|
||||
// wxCheckListBox support
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
||||
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
|
||||
// plug-in for derived classes
|
||||
virtual wxOwnerDrawn *CreateLboxItem(size_t n);
|
||||
|
||||
// allows to get the item and use SetXXX functions to set it's appearance
|
||||
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
|
||||
|
||||
// get the index of the given item
|
||||
int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); }
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
|
||||
// Windows-specific code to set the horizontal extent of the listbox, if
|
||||
// necessary. If s is non-NULL, it's used to calculate the horizontal
|
||||
// extent. Otherwise, all strings are used.
|
||||
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
|
||||
|
||||
// Windows callbacks
|
||||
bool MSWCommand(WXUINT param, WXWORD id);
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL)
|
||||
{
|
||||
return GetCompositeControlsDefaultAttributes(variant);
|
||||
}
|
||||
|
||||
protected:
|
||||
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// free memory (common part of Clear() and dtor)
|
||||
void Free();
|
||||
|
||||
int m_selected;
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
// control items
|
||||
wxListBoxItemsArray m_aItems;
|
||||
#endif
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxListBox)
|
||||
};
|
||||
|
||||
#endif // wxUSE_LISTBOX
|
||||
|
||||
#endif
|
||||
// _WX_LISTBOX_H_
|
@@ -1,396 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/listctrl.h
|
||||
// Purpose: wxListCtrl class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by: Yunhui Fu
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_LISTCTRL_H_
|
||||
#define _WX_LISTCTRL_H_
|
||||
|
||||
#if wxUSE_LISTCTRL
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/hash.h"
|
||||
#include "wx/textctrl.h"
|
||||
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
|
||||
/*
|
||||
The wxListCtrl can show lists of items in four different modes:
|
||||
wxLC_LIST: multicolumn list view, with optional small icons (icons could be
|
||||
optional for some platforms). Columns are computed automatically,
|
||||
i.e. you don't set columns as in wxLC_REPORT. In other words,
|
||||
the list wraps, unlike a wxListBox.
|
||||
wxLC_REPORT: single or multicolumn report view (with optional header)
|
||||
wxLC_ICON: large icon view, with optional labels
|
||||
wxLC_SMALL_ICON: small icon view, with optional labels
|
||||
|
||||
You can change the style dynamically, either with SetSingleStyle or
|
||||
SetWindowStyleFlag.
|
||||
|
||||
Further window styles:
|
||||
|
||||
wxLC_ALIGN_TOP icons align to the top (default)
|
||||
wxLC_ALIGN_LEFT icons align to the left
|
||||
wxLC_AUTOARRANGE icons arrange themselves
|
||||
wxLC_USER_TEXT the app provides label text on demand, except for column headers
|
||||
wxLC_EDIT_LABELS labels are editable: app will be notified.
|
||||
wxLC_NO_HEADER no header in report mode
|
||||
wxLC_NO_SORT_HEADER can't click on header
|
||||
wxLC_SINGLE_SEL single selection
|
||||
wxLC_SORT_ASCENDING sort ascending (must still supply a comparison callback in SortItems)
|
||||
wxLC_SORT_DESCENDING sort descending (ditto)
|
||||
|
||||
Items are referred to by their index (position in the list starting from zero).
|
||||
|
||||
Label text is supplied via insertion/setting functions and is stored by the
|
||||
control, unless the wxLC_USER_TEXT style has been specified, in which case
|
||||
the app will be notified when text is required (see sample).
|
||||
|
||||
Images are dealt with by (optionally) associating 3 image lists with the control.
|
||||
Zero-based indexes into these image lists indicate which image is to be used for
|
||||
which item. Each image in an image list can contain a mask, and can be made out
|
||||
of either a bitmap, two bitmaps or an icon. See ImagList.h for more details.
|
||||
|
||||
Notifications are passed via the wxWidgets 2.0 event system, or using virtual
|
||||
functions in wxWidgets 1.66.
|
||||
|
||||
See the sample wxListCtrl app for API usage.
|
||||
|
||||
TODO:
|
||||
- addition of further convenience functions
|
||||
to avoid use of wxListItem in some functions
|
||||
- state/overlay images: probably not needed.
|
||||
- testing of whole API, extending current sample.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
|
||||
{
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxListCtrl() { Init(); }
|
||||
|
||||
wxListCtrl(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListCtrlNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxListCtrl();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListCtrlNameStr);
|
||||
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Set the control colours
|
||||
bool SetForegroundColour(const wxColour& col);
|
||||
bool SetBackgroundColour(const wxColour& col);
|
||||
|
||||
// Gets information about this column
|
||||
bool GetColumn(int col, wxListItem& item) const;
|
||||
|
||||
// Sets information about this column
|
||||
bool SetColumn(int col, wxListItem& item) ;
|
||||
|
||||
// Gets the column width
|
||||
int GetColumnWidth(int col) const;
|
||||
|
||||
// Sets the column width
|
||||
bool SetColumnWidth(int col, int width) ;
|
||||
|
||||
// Gets the number of items that can fit vertically in the
|
||||
// visible area of the list control (list or report view)
|
||||
// or the total number of items in the list control (icon
|
||||
// or small icon view)
|
||||
int GetCountPerPage() const;
|
||||
|
||||
// return the total area occupied by all the items (icon/small icon only)
|
||||
wxRect GetViewRect() const;
|
||||
|
||||
// Gets the edit control for editing labels.
|
||||
wxTextCtrl* GetEditControl() const;
|
||||
|
||||
// Gets information about the item
|
||||
bool GetItem(wxListItem& info) const ;
|
||||
|
||||
// Sets information about the item
|
||||
bool SetItem(wxListItem& info) ;
|
||||
|
||||
// Sets a string field at a particular column
|
||||
long SetItem(long index, int col, const wxString& label, int imageId = -1);
|
||||
|
||||
// Gets the item state
|
||||
int GetItemState(long item, long stateMask) const ;
|
||||
|
||||
// Sets the item state
|
||||
bool SetItemState(long item, long state, long stateMask) ;
|
||||
|
||||
// Sets the item image
|
||||
bool SetItemImage(long item, int image, int selImage) ;
|
||||
bool SetItemColumnImage(long item, long column, int image);
|
||||
|
||||
// Gets the item text
|
||||
wxString GetItemText(long item) const ;
|
||||
|
||||
// Sets the item text
|
||||
void SetItemText(long item, const wxString& str) ;
|
||||
|
||||
// Gets the item data
|
||||
long GetItemData(long item) const ;
|
||||
|
||||
// Sets the item data
|
||||
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||
bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }
|
||||
|
||||
// Gets the item rectangle
|
||||
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
||||
|
||||
// Gets the item position
|
||||
bool GetItemPosition(long item, wxPoint& pos) const ;
|
||||
|
||||
// Sets the item position
|
||||
bool SetItemPosition(long item, const wxPoint& pos) ;
|
||||
|
||||
// Gets the number of items in the list control
|
||||
int GetItemCount() const;
|
||||
|
||||
// Gets the number of columns in the list control
|
||||
int GetColumnCount() const { return m_colCount; }
|
||||
|
||||
// get the horizontal and vertical components of the item spacing
|
||||
wxSize GetItemSpacing() const;
|
||||
|
||||
// Foreground colour of an item.
|
||||
void SetItemTextColour( long item, const wxColour& col);
|
||||
wxColour GetItemTextColour( long item ) const;
|
||||
|
||||
// Background colour of an item.
|
||||
void SetItemBackgroundColour( long item, const wxColour &col);
|
||||
wxColour GetItemBackgroundColour( long item ) const;
|
||||
|
||||
// Gets the number of selected items in the list control
|
||||
int GetSelectedItemCount() const;
|
||||
|
||||
// Gets the text colour of the listview
|
||||
wxColour GetTextColour() const;
|
||||
|
||||
// Sets the text colour of the listview
|
||||
void SetTextColour(const wxColour& col);
|
||||
|
||||
// Gets the index of the topmost visible item when in
|
||||
// list or report view
|
||||
long GetTopItem() const ;
|
||||
|
||||
// Add or remove a single window style
|
||||
void SetSingleStyle(long style, bool add = true) ;
|
||||
|
||||
// Searches for an item, starting from 'item'.
|
||||
// item can be -1 to find the first item that matches the
|
||||
// specified flags.
|
||||
// Returns the item or -1 if unsuccessful.
|
||||
long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ;
|
||||
|
||||
// Gets one of the three image lists
|
||||
wxImageList *GetImageList(int which) const ;
|
||||
|
||||
// Sets the image list
|
||||
void SetImageList(wxImageList *imageList, int which) ;
|
||||
void AssignImageList(wxImageList *imageList, int which) ;
|
||||
|
||||
// are we in report mode?
|
||||
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
||||
|
||||
// are we in virtual report mode?
|
||||
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
|
||||
|
||||
// refresh items selectively (only useful for virtual list controls)
|
||||
void RefreshItem(long item);
|
||||
void RefreshItems(long itemFrom, long itemTo);
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Arranges the items
|
||||
bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
|
||||
|
||||
// Deletes an item
|
||||
bool DeleteItem(long item);
|
||||
|
||||
// Deletes all items
|
||||
bool DeleteAllItems() ;
|
||||
|
||||
// Deletes a column
|
||||
bool DeleteColumn(int col);
|
||||
|
||||
// Deletes all columns
|
||||
bool DeleteAllColumns();
|
||||
|
||||
// Clears items, and columns if there are any.
|
||||
void ClearAll();
|
||||
|
||||
// Edit the label
|
||||
wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl));
|
||||
|
||||
// End label editing, optionally cancelling the edit
|
||||
bool EndEditLabel(bool cancel);
|
||||
|
||||
// Ensures this item is visible
|
||||
bool EnsureVisible(long item) ;
|
||||
|
||||
// Find an item whose label matches this string, starting from the item after 'start'
|
||||
// or the beginning if 'start' is -1.
|
||||
long FindItem(long start, const wxString& str, bool partial = false);
|
||||
|
||||
// Find an item whose data matches this data, starting from the item after 'start'
|
||||
// or the beginning if 'start' is -1.
|
||||
long FindItem(long start, long data);
|
||||
|
||||
// Find an item nearest this position in the specified direction, starting from
|
||||
// the item after 'start' or the beginning if 'start' is -1.
|
||||
long FindItem(long start, const wxPoint& pt, int direction);
|
||||
|
||||
// Determines which item (if any) is at the specified point,
|
||||
// giving details in 'flags' (see wxLIST_HITTEST_... flags above)
|
||||
long HitTest(const wxPoint& point, int& flags);
|
||||
|
||||
// Inserts an item, returning the index of the new item if successful,
|
||||
// -1 otherwise.
|
||||
long InsertItem(wxListItem& info);
|
||||
|
||||
// Insert a string item
|
||||
long InsertItem(long index, const wxString& label);
|
||||
|
||||
// Insert an image item
|
||||
long InsertItem(long index, int imageIndex);
|
||||
|
||||
// Insert an image/string item
|
||||
long InsertItem(long index, const wxString& label, int imageIndex);
|
||||
|
||||
// For list view mode (only), inserts a column.
|
||||
long InsertColumn(long col, wxListItem& info);
|
||||
|
||||
long InsertColumn(long col,
|
||||
const wxString& heading,
|
||||
int format = wxLIST_FORMAT_LEFT,
|
||||
int width = -1);
|
||||
|
||||
// set the number of items in a virtual list control
|
||||
void SetItemCount(long count);
|
||||
|
||||
// Scrolls the list control. If in icon, small icon or report view mode,
|
||||
// x specifies the number of pixels to scroll. If in list view mode, x
|
||||
// specifies the number of columns to scroll.
|
||||
// If in icon, small icon or list view mode, y specifies the number of pixels
|
||||
// to scroll. If in report view mode, y specifies the number of lines to scroll.
|
||||
bool ScrollList(int dx, int dy);
|
||||
|
||||
// Sort items.
|
||||
|
||||
// fn is a function which takes 3 long arguments: item1, item2, data.
|
||||
// item1 is the long data associated with a first item (NOT the index).
|
||||
// item2 is the long data associated with a second item (NOT the index).
|
||||
// data is the same value as passed to SortItems.
|
||||
// The return value is a negative number if the first item should precede the second
|
||||
// item, a positive number of the second item should precede the first,
|
||||
// or zero if the two items are equivalent.
|
||||
|
||||
// data is arbitrary data to be passed to the sort function.
|
||||
bool SortItems(wxListCtrlCompare fn, long data);
|
||||
|
||||
// bring the control in sync with current m_windowStyle value
|
||||
void UpdateStyle();
|
||||
|
||||
// Event handlers
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Necessary for drawing hrules and vrules, if specified
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
|
||||
virtual bool ShouldInheritColours() const { return false; }
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// free memory taken by all internal data
|
||||
void FreeAllInternalData();
|
||||
|
||||
wxTextCtrl* m_textCtrl; // The control used for editing a label
|
||||
wxImageList * m_imageListNormal; // The image list for normal icons
|
||||
wxImageList * m_imageListSmall; // The image list for small icons
|
||||
wxImageList * m_imageListState; // The image list state icons (not implemented yet)
|
||||
bool m_ownsImageListNormal,
|
||||
m_ownsImageListSmall,
|
||||
m_ownsImageListState;
|
||||
|
||||
int m_colCount; // Windows doesn't have GetColumnCount so must
|
||||
// keep track of inserted/deleted columns
|
||||
long m_count; // Keep track of item count to save calls to
|
||||
// ListView_GetItemCount
|
||||
bool m_ignoreChangeMessages;
|
||||
|
||||
// true if we have any internal data (user data & attributes)
|
||||
bool m_AnyInternalData;
|
||||
|
||||
// true if we have any items with custom attributes
|
||||
bool m_hasAnyAttr;
|
||||
|
||||
// these functions are only used for virtual list view controls, i.e. the
|
||||
// ones with wxLC_VIRTUAL style
|
||||
|
||||
// return the text for the given column of the given item
|
||||
virtual wxString OnGetItemText(long item, long column) const;
|
||||
|
||||
// return the icon for the given item. In report view, OnGetItemImage will
|
||||
// only be called for the first column. See OnGetItemColumnImage for
|
||||
// details.
|
||||
virtual int OnGetItemImage(long item) const;
|
||||
|
||||
// return the attribute for the item (may return NULL if none)
|
||||
virtual wxListItemAttr *OnGetItemAttr(long item) const;
|
||||
|
||||
private:
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxListCtrl)
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxDECLARE_NO_COPY_CLASS(wxListCtrl);
|
||||
};
|
||||
|
||||
#endif // wxUSE_LISTCTRL
|
||||
|
||||
#endif // _WX_LISTCTRL_H_
|
@@ -1,218 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/mdi.h
|
||||
// Purpose: MDI (Multiple Document Interface) classes
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MDI_H_
|
||||
#define _WX_MDI_H_
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxStatusLineNameStr[];
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxMDIParentFrame
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
wxMDIParentFrame();
|
||||
wxMDIParentFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual ~wxMDIParentFrame();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// Get the active MDI child window (Windows only)
|
||||
wxMDIChildFrame *GetActiveChild() const;
|
||||
|
||||
// Get the client window
|
||||
wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; }
|
||||
|
||||
// Create the client window class (don't Create the window,
|
||||
// just return a new class)
|
||||
virtual wxMDIClientWindow *OnCreateClient(void);
|
||||
|
||||
// MDI windows menu
|
||||
wxMenu* GetWindowMenu() const { return m_windowMenu; }
|
||||
void SetWindowMenu(wxMenu* menu) ;
|
||||
|
||||
// MDI operations
|
||||
// --------------
|
||||
virtual void Cascade();
|
||||
virtual void Tile();
|
||||
virtual void ArrangeIcons();
|
||||
virtual void ActivateNext();
|
||||
virtual void ActivatePrevious();
|
||||
|
||||
// handlers
|
||||
// --------
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
// override window proc for MDI-specific message processing
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
virtual WXLRESULT MSWDefWindowProc(WXUINT, WXWPARAM, WXLPARAM);
|
||||
virtual bool MSWTranslateMessage(WXMSG* msg);
|
||||
|
||||
protected:
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
virtual void InternalSetMenuBar();
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
virtual WXHICON GetDefaultIcon() const;
|
||||
|
||||
wxMDIClientWindow * m_clientWindow;
|
||||
wxMDIChildFrame * m_currentChild;
|
||||
wxMenu* m_windowMenu;
|
||||
|
||||
// true if MDI Frame is intercepting commands, not child
|
||||
bool m_parentFrameActive;
|
||||
|
||||
private:
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
wxDECLARE_NO_COPY_CLASS(wxMDIParentFrame);
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxMDIChildFrame
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
wxMDIChildFrame() { Init(); }
|
||||
wxMDIChildFrame(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual ~wxMDIChildFrame();
|
||||
|
||||
bool Create(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual bool IsTopLevel() const { return false; }
|
||||
|
||||
// MDI operations
|
||||
virtual void Maximize(bool maximize = true);
|
||||
virtual void Restore();
|
||||
virtual void Activate();
|
||||
|
||||
// Implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// Handlers
|
||||
bool HandleMDIActivate(long bActivate, WXHWND, WXHWND);
|
||||
bool HandleWindowPosChanging(void *lpPos);
|
||||
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual WXLRESULT MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual bool MSWTranslateMessage(WXMSG *msg);
|
||||
|
||||
virtual void MSWDestroyWindow();
|
||||
|
||||
bool ResetWindowStyle(void *vrect);
|
||||
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
protected:
|
||||
virtual void DoGetPosition(int *x, int *y) const;
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void InternalSetMenuBar();
|
||||
virtual bool IsMDIChild() const { return true; }
|
||||
|
||||
virtual WXHICON GetDefaultIcon() const;
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
private:
|
||||
bool m_needsResize; // flag which tells us to artificially resize the frame
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIChildFrame)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxMDIClientWindow
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxWindow
|
||||
{
|
||||
public:
|
||||
wxMDIClientWindow() { Init(); }
|
||||
wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0)
|
||||
{
|
||||
Init();
|
||||
|
||||
CreateClient(parent, style);
|
||||
}
|
||||
|
||||
// Note: this is virtual, to allow overridden behaviour.
|
||||
virtual bool CreateClient(wxMDIParentFrame *parent,
|
||||
long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
// Explicitly call default scroll behaviour
|
||||
void OnScroll(wxScrollEvent& event);
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
protected:
|
||||
void Init() { m_scrollX = m_scrollY = 0; }
|
||||
|
||||
int m_scrollX, m_scrollY;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIClientWindow)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_MDI_H_
|
@@ -1,174 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/menu.h
|
||||
// Purpose: wxMenu, wxMenuBar classes
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MENU_H_
|
||||
#define _WX_MENU_H_
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
#include "wx/accel.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY_PTR(wxAcceleratorEntry *, wxAcceleratorArray);
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFrame;
|
||||
|
||||
#if defined(__WXWINCE__) && wxUSE_TOOLBAR
|
||||
class WXDLLIMPEXP_FWD_CORE wxToolBar;
|
||||
#endif
|
||||
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase
|
||||
{
|
||||
public:
|
||||
// ctors & dtor
|
||||
wxMenu(const wxString& title, long style = 0)
|
||||
: wxMenuBase(title, style) { Init(); }
|
||||
|
||||
wxMenu(long style = 0) : wxMenuBase(style) { Init(); }
|
||||
|
||||
virtual ~wxMenu();
|
||||
|
||||
// implement base class virtuals
|
||||
virtual wxMenuItem* DoAppend(wxMenuItem *item);
|
||||
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
|
||||
virtual wxMenuItem* DoRemove(wxMenuItem *item);
|
||||
|
||||
virtual void Break();
|
||||
|
||||
virtual void SetTitle(const wxString& title);
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
virtual void Attach(wxMenuBarBase *menubar);
|
||||
|
||||
bool PalmCommand(WXUINT param, WXWORD id);
|
||||
|
||||
// semi-private accessors
|
||||
// get the window which contains this menu
|
||||
wxWindow *GetWindow() const;
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
// called by wxMenuBar to build its accel table from the accels of all menus
|
||||
bool HasAccels() const { return !m_accels.IsEmpty(); }
|
||||
size_t GetAccelCount() const { return m_accels.GetCount(); }
|
||||
size_t CopyAccels(wxAcceleratorEntry *accels) const;
|
||||
|
||||
// called by wxMenuItem when its accels changes
|
||||
void UpdateAccel(wxMenuItem *item);
|
||||
|
||||
// helper used by wxMenu itself (returns the index in m_accels)
|
||||
int FindAccel(int id) const;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// common part of Append/Insert (behaves as Append is pos == (size_t)-1)
|
||||
bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1);
|
||||
|
||||
// terminate the current radio group, if any
|
||||
void EndRadioGroup();
|
||||
|
||||
// if true, insert a break before appending the next item
|
||||
bool m_doBreak;
|
||||
|
||||
// the position of the first item in the current radio group or -1
|
||||
int m_startRadioGroup;
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
// the accelerators for our menu items
|
||||
wxAcceleratorArray m_accels;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenu)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu Bar (a la Windows)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase
|
||||
{
|
||||
public:
|
||||
// ctors & dtor
|
||||
// default constructor
|
||||
wxMenuBar();
|
||||
|
||||
wxMenuBar(long style);
|
||||
// menubar takes ownership of the menus arrays but copies the titles
|
||||
wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0);
|
||||
virtual ~wxMenuBar();
|
||||
|
||||
virtual bool Append( wxMenu *menu, const wxString &title );
|
||||
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Remove(size_t pos);
|
||||
|
||||
virtual void EnableTop( size_t pos, bool flag );
|
||||
virtual void SetMenuLabel( size_t pos, const wxString& label );
|
||||
virtual wxString GetMenuLabel( size_t pos ) const;
|
||||
|
||||
// implementation from now on
|
||||
WXHMENU Create();
|
||||
virtual void Detach();
|
||||
virtual void Attach(wxFrame *frame);
|
||||
|
||||
void LoadMenu();
|
||||
int ProcessCommand(int ItemID);
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
// get the accel table for all the menus
|
||||
const wxAcceleratorTable& GetAccelTable() const { return m_accelTable; }
|
||||
|
||||
// update the accel table (must be called after adding/deleting a menu)
|
||||
void RebuildAccelTable();
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
// if the menubar is modified, the display is not updated automatically,
|
||||
// call this function to update it (m_menuBarFrame should be !NULL)
|
||||
void Refresh();
|
||||
|
||||
// To avoid compile warning
|
||||
void Refresh( bool eraseBackground,
|
||||
const wxRect *rect = (const wxRect *) NULL ) { wxWindow::Refresh(eraseBackground, rect); }
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
wxArrayString m_titles ;
|
||||
wxMenuInfoList m_menuInfos;
|
||||
|
||||
// Return the Palm position for a wxMenu which is sometimes different from
|
||||
// the wxWidgets position.
|
||||
int PalmPositionForWxMenu(wxMenu *menu, int wxpos);
|
||||
#if wxUSE_ACCEL
|
||||
// the accelerator table for all accelerators in all our menus
|
||||
wxAcceleratorTable m_accelTable;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
#if defined(__WXWINCE__) && wxUSE_TOOLBAR
|
||||
wxToolBar* m_toolBar;
|
||||
#endif
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuBar)
|
||||
};
|
||||
|
||||
#endif // _WX_MENU_H_
|
@@ -1,87 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/menuitem.h
|
||||
// Purpose: wxMenuItem class
|
||||
// Author: William Osborne - minimal working wxPalmOS port
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MENUITEM_H
|
||||
#define _MENUITEM_H
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
#include "wx/ownerdrw.h" // base class
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
, public wxOwnerDrawn
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
// ctor & dtor
|
||||
wxMenuItem(wxMenu *parentMenu = NULL,
|
||||
int id = wxID_SEPARATOR,
|
||||
const wxString& name = wxEmptyString,
|
||||
const wxString& help = wxEmptyString,
|
||||
wxItemKind kind = wxITEM_NORMAL,
|
||||
wxMenu *subMenu = NULL);
|
||||
virtual ~wxMenuItem();
|
||||
|
||||
// override base class virtuals
|
||||
virtual void SetItemLabel(const wxString& strName);
|
||||
virtual void SetCheckable(bool checkable);
|
||||
|
||||
virtual void Enable(bool bDoEnable = TRUE);
|
||||
virtual void Check(bool bDoCheck = TRUE);
|
||||
virtual bool IsChecked() const;
|
||||
|
||||
// unfortunately needed to resolve ambiguity between
|
||||
// wxMenuItemBase::IsCheckable() and wxOwnerDrawn::IsCheckable()
|
||||
bool IsCheckable() const { return wxMenuItemBase::IsCheckable(); }
|
||||
|
||||
// mark item as belonging to the given radio group
|
||||
void SetAsRadioGroupStart();
|
||||
void SetRadioGroupStart(int start);
|
||||
void SetRadioGroupEnd(int end);
|
||||
|
||||
// compatibility only, don't use in new code
|
||||
wxMenuItem(wxMenu *parentMenu,
|
||||
int id,
|
||||
const wxString& text,
|
||||
const wxString& help,
|
||||
bool isCheckable,
|
||||
wxMenu *subMenu = NULL);
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// the positions of the first and last items of the radio group this item
|
||||
// belongs to or -1: start is the radio group start and is valid for all
|
||||
// but first radio group items (m_isRadioGroupStart == FALSE), end is valid
|
||||
// only for the first one
|
||||
union
|
||||
{
|
||||
int start;
|
||||
int end;
|
||||
} m_radioGroup;
|
||||
|
||||
// does this item start a radio group?
|
||||
bool m_isRadioGroupStart;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuItem)
|
||||
};
|
||||
|
||||
#endif //_MENUITEM_H
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user