mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-19 12:23:07 +08:00
Committed William Osborne's wxPalmOS port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
+3
-1
@@ -561,7 +561,9 @@ protected:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_GUI
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/app.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/app.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/app.h"
|
||||
|
||||
@@ -134,7 +134,9 @@ public:
|
||||
|
||||
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
|
||||
// Unix code (and otherwise __UNIX__ wouldn't be defined)
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/apptbase.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/apptbase.h"
|
||||
#elif defined(__UNIX__) && !defined(__EMX__)
|
||||
#include "wx/unix/apptbase.h"
|
||||
@@ -217,7 +219,9 @@ public:
|
||||
// include the platform-specific version of the classes above
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/apptrait.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/apptrait.h"
|
||||
#elif defined(__UNIX__) && !defined(__EMX__)
|
||||
#include "wx/unix/apptrait.h"
|
||||
|
||||
+3
-1
@@ -163,7 +163,9 @@ protected:
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/bitmap.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/bitmap.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/x11/bitmap.h"
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_BRUSH_H_BASE_
|
||||
#define _WX_BRUSH_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/brush.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/brush.h"
|
||||
#elif defined(__WXMOTIF__) || defined(__WXX11__)
|
||||
#include "wx/x11/brush.h"
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
Compiler-specific checking.
|
||||
*/
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
# include "wx/palmos/chkconf.h"
|
||||
#elif defined(__WXMSW__)
|
||||
# include "wx/msw/chkconf.h"
|
||||
#elif defined(__WXMAC__)
|
||||
# include "wx/mac/chkconf.h"
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_COLOUR_H_BASE_
|
||||
#define _WX_COLOUR_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/colour.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/colour.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/colour.h"
|
||||
|
||||
@@ -100,6 +100,8 @@ protected:
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/control.h"
|
||||
#elif defined(__PALMOS__)
|
||||
#include "wx/palmos/control.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/control.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_CURSOR_H_BASE_
|
||||
#define _WX_CURSOR_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/cursor.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/cursor.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/cursor.h"
|
||||
|
||||
+3
-1
@@ -786,7 +786,9 @@ private:
|
||||
// now include the declaration of wxDC class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/dc.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/dc.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dc.h"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_DCCLIENT_H_BASE_
|
||||
#define _WX_DCCLIENT_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/dcclient.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/dcclient.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dcclient.h"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_DCMEMORY_H_BASE_
|
||||
#define _WX_DCMEMORY_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/dcmemory.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/dcmemory.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dcmemory.h"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_DCPRINT_H_BASE_
|
||||
#define _WX_DCPRINT_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/dcprint.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/dcprint.h"
|
||||
#endif
|
||||
#if defined(__WXPM__)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_DCSCREEN_H_BASE_
|
||||
#define _WX_DCSCREEN_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/dcscreen.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/dcscreen.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dcscreen.h"
|
||||
|
||||
+3
-1
@@ -71,7 +71,9 @@ protected:
|
||||
#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
|
||||
#include "wx/univ/dialog.h"
|
||||
#else
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/dialog.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/dialog.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dialog.h"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
struct WXDLLEXPORT wxNativeEncodingInfo
|
||||
{
|
||||
wxString facename; // may be empty meaning "any"
|
||||
#ifndef __PALMOS__
|
||||
wxFontEncoding encoding; // so that we know what this struct represents
|
||||
|
||||
#if defined(__WXMSW__) || \
|
||||
@@ -60,7 +61,7 @@ struct WXDLLEXPORT wxNativeEncodingInfo
|
||||
#else
|
||||
#error "Unsupported toolkit"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// 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);
|
||||
|
||||
@@ -72,7 +72,9 @@ protected:
|
||||
// can sometimes be very useful (e.g. under MSW this is necessary for
|
||||
// integration with MFC) but currently this is done for MSW only, other ports
|
||||
// should follow a.s.a.p.
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/evtloop.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/evtloop.h"
|
||||
#else
|
||||
|
||||
|
||||
+3
-1
@@ -174,7 +174,9 @@ enum wxSeekMode
|
||||
|
||||
// detect compilers which have support for huge files (currently only
|
||||
// Digital Mars doesn't)
|
||||
#ifndef __PALMOS__
|
||||
#include "wx/msw/private.h"
|
||||
#endif
|
||||
|
||||
#undef wxHAS_HUGE_FILES
|
||||
#if defined(__MINGW32__)
|
||||
@@ -300,7 +302,7 @@ enum wxSeekMode
|
||||
#endif
|
||||
|
||||
// constants (unless already defined by the user code)
|
||||
#if !defined(__BORLANDC__) && !defined(__WATCOMC__)
|
||||
#if !defined(__BORLANDC__) && !defined(__WATCOMC__) && !defined(__PALMOS__)
|
||||
#ifndef O_RDONLY
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
|
||||
+3
-1
@@ -231,7 +231,9 @@ private:
|
||||
};
|
||||
|
||||
// include the real class declaration
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/font.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/font.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/font.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "wx/font.h" // for wxFont and wxFontEncoding
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__WXMSW__) && !defined(__PALMOS__)
|
||||
#include "wx/msw/wrapwin.h"
|
||||
#endif
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
|
||||
// set the XFLD
|
||||
void SetXFontName(const wxString& xFontName);
|
||||
#elif defined(__WXMSW__)
|
||||
#elif defined(__WXMSW__) && !defined(__PALMOS__)
|
||||
LOGFONT lf;
|
||||
#elif defined(__WXPM__)
|
||||
// OS/2 native structures that define a font
|
||||
|
||||
+3
-1
@@ -250,7 +250,9 @@ protected:
|
||||
#if defined(__WXUNIVERSAL__) // && !defined(__WXMICROWIN__)
|
||||
#include "wx/univ/frame.h"
|
||||
#else // !__WXUNIVERSAL__
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/frame.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/frame.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/frame.h"
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_GDIOBJ_H_BASE_
|
||||
#define _WX_GDIOBJ_H_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/gdiobj.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/gdiobj.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/gdiobj.h"
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "wx/msw/wince/helpwce.h"
|
||||
|
||||
#define wxHelpController wxWinceHelpController
|
||||
#elif defined(__PALMOS__)
|
||||
#include "wx/palmos/help.h"
|
||||
|
||||
#define wxHelpController wxPalmHelpController
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/helpwin.h"
|
||||
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@
|
||||
|
||||
#include "wx/iconloc.h"
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/icon.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/icon.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/icon.h"
|
||||
|
||||
@@ -498,6 +498,8 @@ protected:
|
||||
#else // !wxUSE_BASE_CLASSES_ONLY
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/menu.h"
|
||||
#elif defined(__PALMOS__)
|
||||
#include "wx/palmos/menu.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/menu.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
||||
@@ -155,6 +155,8 @@ private:
|
||||
#else // !wxUSE_BASE_CLASSES_ONLY
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/menuitem.h"
|
||||
#elif defined(__PALMOS__)
|
||||
#include "wx/palmos/menuitem.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/menuitem.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if wxUSE_ENH_METAFILE
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/enhmeta.h"
|
||||
#else
|
||||
#include "wx/msw/enhmeta.h"
|
||||
#endif
|
||||
|
||||
// map all metafile classes to enh metafile
|
||||
#if !wxUSE_WIN_METAFILES_ALWAYS
|
||||
@@ -34,8 +38,12 @@
|
||||
#define wxMETAFILE_IS_ENH
|
||||
#endif // wxUSE_WIN_METAFILES_ALWAYS
|
||||
#else // !wxUSE_ENH_METAFILE
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/metafile.h"
|
||||
#else
|
||||
#include "wx/msw/metafile.h"
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/metafile.h"
|
||||
#elif defined(__WXMAC__)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#ifndef _WX_MINIFRAM_H_BASE_
|
||||
#define _WX_MINIFRAMH_BASE_
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#if defined(__PALMOS__)
|
||||
#include "wx/palmos/minifram.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/minifram.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/minifram.h"
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#if defined(__WXUNIVERSAL__) || defined(__WXGPE__)
|
||||
#include "wx/generic/msgdlgg.h"
|
||||
#elif defined(__PALMOS__)
|
||||
#include "wx/palmos/msgdlg.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/msgdlg.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
// 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.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,9 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,58 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/accel.h
|
||||
// Purpose: wxAcceleratorTable class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCEL_H_
|
||||
#define _WX_ACCEL_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "accel.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the accel table has all accelerators for a given window or menu
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxAcceleratorTable : public wxObject
|
||||
{
|
||||
public:
|
||||
// default ctor
|
||||
wxAcceleratorTable();
|
||||
|
||||
// copy ctor
|
||||
wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); }
|
||||
|
||||
// load from .rc resource (Windows specific)
|
||||
wxAcceleratorTable(const wxString& resource);
|
||||
|
||||
// initialize from array
|
||||
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
|
||||
|
||||
virtual ~wxAcceleratorTable();
|
||||
|
||||
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; }
|
||||
bool operator==(const wxAcceleratorTable& accel) const
|
||||
{ return m_refData == accel.m_refData; } // FIXME: this is wrong (VZ)
|
||||
bool operator!=(const wxAcceleratorTable& accel) const
|
||||
{ return !(*this == accel); }
|
||||
|
||||
bool Ok() 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_
|
||||
@@ -0,0 +1,117 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: app.h
|
||||
// Purpose: wxApp class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/17/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_APP_H_
|
||||
#define _WX_APP_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "app.h"
|
||||
#endif
|
||||
|
||||
#include "wx/event.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFrame;
|
||||
class WXDLLIMPEXP_CORE wxWindow;
|
||||
class WXDLLIMPEXP_CORE wxApp;
|
||||
class WXDLLIMPEXP_CORE wxKeyEvent;
|
||||
class WXDLLIMPEXP_BASE wxLog;
|
||||
|
||||
// Represents the application. Derive OnInit and declare
|
||||
// a new App object to start application
|
||||
class WXDLLEXPORT 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 bool Yield(bool onlyIfNeeded = false);
|
||||
virtual void WakeUpIdle();
|
||||
|
||||
virtual void SetPrintMode(int mode) { m_printMode = mode; }
|
||||
virtual int GetPrintMode() const { return m_printMode; }
|
||||
|
||||
// implementation only
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnEndSession(wxCloseEvent& event);
|
||||
void OnQueryEndSession(wxCloseEvent& event);
|
||||
|
||||
#if wxUSE_EXCEPTIONS
|
||||
virtual bool OnExceptionInMainLoop();
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
|
||||
// deprecated functions, use wxEventLoop directly instead
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxDEPRECATED( void DoMessage(WXMSG *pMsg) );
|
||||
wxDEPRECATED( bool DoMessage() );
|
||||
wxDEPRECATED( bool ProcessMessage(WXMSG* pMsg) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
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()
|
||||
DECLARE_NO_COPY_CLASS(wxApp)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Palm OS specific wxEntry() overload and IMPLEMENT_WXWIN_MAIN definition
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifndef SW_SHOWNORMAL
|
||||
#define SW_SHOWNORMAL 1
|
||||
#endif
|
||||
|
||||
extern int WXDLLEXPORT
|
||||
wxEntry();
|
||||
|
||||
#include <PalmOS.h>
|
||||
#define IMPLEMENT_WXWIN_MAIN \
|
||||
uint32_t PilotMain(uint16_t cmd, MemPtr cmdPBP, uint16_t launchFlags) \
|
||||
{ \
|
||||
switch (cmd) { \
|
||||
case sysAppLaunchCmdNormalLaunch: \
|
||||
wxEntry(); \
|
||||
break; \
|
||||
default: \
|
||||
break; \
|
||||
} \
|
||||
return errNone; \
|
||||
}
|
||||
|
||||
#endif // _WX_APP_H_
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/apptbase.h
|
||||
// Purpose: declaration of wxAppTraits for Palm OS
|
||||
// Author: William Osborne
|
||||
// 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: the MSW version adds extra hooks needed by MSW-only code
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
// process pending Windows messages, even in console app
|
||||
virtual void AlwaysYield() = 0;
|
||||
|
||||
// called after starting to wait for the child termination, the parameter
|
||||
// is the return value of BeforeChildWaitLoop()
|
||||
virtual void AfterChildWaitLoop(void *data) = 0;
|
||||
|
||||
|
||||
// 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;
|
||||
|
||||
// other miscellaneous helpers
|
||||
// ---------------------------
|
||||
|
||||
// under MSW this function returns same version for both console and GUI
|
||||
// applications so we can implement it directly in the base class and only
|
||||
// override it wxGUIAppTraits to fill in toolkit information
|
||||
virtual wxToolkitInfo& GetToolkitInfo();
|
||||
};
|
||||
|
||||
#endif // _WX_PALMOS_APPTBASE_H_
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/apptrait.h
|
||||
// Purpose: class implementing wxAppTraits for Palm OS
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSW_APPTRAIT_H_
|
||||
#define _WX_MSW_APPTRAIT_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
|
||||
{
|
||||
public:
|
||||
virtual void *BeforeChildWaitLoop();
|
||||
virtual void AlwaysYield();
|
||||
virtual void AfterChildWaitLoop(void *data);
|
||||
|
||||
virtual bool DoMessageFromThreadWait();
|
||||
};
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
|
||||
{
|
||||
public:
|
||||
virtual void *BeforeChildWaitLoop();
|
||||
virtual void AlwaysYield();
|
||||
virtual void AfterChildWaitLoop(void *data);
|
||||
|
||||
virtual bool DoMessageFromThreadWait();
|
||||
virtual wxToolkitInfo& GetToolkitInfo();
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif // _WX_MSW_APPTRAIT_H_
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/bitmap.h
|
||||
// Purpose: wxBitmap class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BITMAP_H_
|
||||
#define _WX_BITMAP_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "bitmap.h"
|
||||
#endif
|
||||
|
||||
#include "wx/palmos/gdiimage.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/palette.h"
|
||||
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
class WXDLLEXPORT wxBitmapHandler;
|
||||
class WXDLLEXPORT wxBitmapRefData;
|
||||
class WXDLLEXPORT wxControl;
|
||||
class WXDLLEXPORT wxCursor;
|
||||
class WXDLLEXPORT wxDC;
|
||||
#if wxUSE_WXDIB
|
||||
class WXDLLEXPORT wxDIB;
|
||||
#endif
|
||||
class WXDLLEXPORT wxIcon;
|
||||
class WXDLLEXPORT wxImage;
|
||||
class WXDLLEXPORT wxMask;
|
||||
class WXDLLEXPORT wxPalette;
|
||||
class WXDLLEXPORT wxPixelDataBase;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmap: a mono or colour bitmap
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBitmap : public wxGDIImage
|
||||
{
|
||||
public:
|
||||
// default ctor creates an invalid bitmap, you must Create() it later
|
||||
wxBitmap() { Init(); }
|
||||
|
||||
// Copy constructors
|
||||
wxBitmap(const wxBitmap& bitmap) { Init(); Ref(bitmap); }
|
||||
|
||||
// Initialize with raw data
|
||||
wxBitmap(const char bits[], int width, int height, int depth = 1);
|
||||
|
||||
// Initialize with XPM data
|
||||
wxBitmap(const char **data) { CreateFromXpm(data); }
|
||||
wxBitmap(char **data) { CreateFromXpm((const char **)data); }
|
||||
|
||||
// Load a file or resource
|
||||
wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_BMP_RESOURCE);
|
||||
|
||||
// New constructor for generalised creation from data
|
||||
wxBitmap(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);
|
||||
|
||||
// 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 wxBitmap& bitmap)
|
||||
{
|
||||
if ( m_refData != bitmap.m_refData )
|
||||
Ref(bitmap);
|
||||
return *this;
|
||||
}
|
||||
|
||||
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;
|
||||
#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 = -1);
|
||||
virtual bool Create(int width, int height, const wxDC& dc);
|
||||
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
|
||||
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_BMP_RESOURCE);
|
||||
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);
|
||||
|
||||
bool operator==(const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
|
||||
bool operator!=(const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
|
||||
|
||||
// these functions are internal and shouldn't be used, they risk to
|
||||
// disappear in the future
|
||||
bool HasAlpha() const;
|
||||
void UseAlpha();
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
// these functions do nothing and are only there for backwards
|
||||
// compatibility
|
||||
wxDEPRECATED( int GetQuality() const );
|
||||
wxDEPRECATED( void SetQuality(int quality) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
public:
|
||||
void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); }
|
||||
WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); }
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
void SetSelectedInto(wxDC *dc);
|
||||
wxDC *GetSelectedInto() const;
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
virtual wxGDIImageRefData *CreateData() const;
|
||||
|
||||
// creates the bitmap from XPM data, supposed to be called from ctor
|
||||
bool CreateFromXpm(const char **bits);
|
||||
|
||||
// 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:
|
||||
#ifdef __WIN32__
|
||||
// common part of CopyFromIcon/CopyFromCursor for Win32
|
||||
bool CopyFromIconOrCursor(const wxGDIImage& icon);
|
||||
#endif // __WIN32__
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMask: a mono bitmap used for drawing bitmaps transparently.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT 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 WXDLLEXPORT 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,
|
||||
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,
|
||||
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_
|
||||
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: bmpbuttn.h
|
||||
// Purpose: wxBitmapButton class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BMPBUTTN_H_
|
||||
#define _WX_BMPBUTTN_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/button.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
#define wxDEFAULT_BUTTON_MARGIN 4
|
||||
|
||||
class WXDLLEXPORT 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 SetDefault();
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
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_
|
||||
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BRUSH_H_
|
||||
#define _WX_BRUSH_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "brush.h"
|
||||
#endif
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLEXPORT wxBrush;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBrush
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxBrush : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxBrush();
|
||||
wxBrush(const wxColour& col, int style = wxSOLID);
|
||||
wxBrush(const wxBitmap& stipple);
|
||||
wxBrush(const wxBrush& brush) { Ref(brush); }
|
||||
virtual ~wxBrush();
|
||||
|
||||
virtual void SetColour(const wxColour& col);
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||
virtual void SetStyle(int style);
|
||||
virtual void SetStipple(const wxBitmap& stipple);
|
||||
|
||||
wxBrush& operator=(const wxBrush& brush);
|
||||
bool operator==(const wxBrush& brush) const;
|
||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||
|
||||
wxColour GetColour() const;
|
||||
int GetStyle() const;
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
bool Ok() const { return m_refData != NULL; }
|
||||
|
||||
// return the HBRUSH for this brush
|
||||
virtual WXHANDLE GetResourceHandle() const;
|
||||
|
||||
protected:
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBrush)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_BRUSH_H_
|
||||
@@ -0,0 +1,94 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/button.h
|
||||
// Purpose: wxButton class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUTTON_H_
|
||||
#define _WX_BUTTON_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "button.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Pushbutton
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxButton : public wxButtonBase
|
||||
{
|
||||
public:
|
||||
wxButton() { }
|
||||
wxButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
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 void SetDefault();
|
||||
|
||||
// implementation from now on
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
|
||||
virtual void ApplyParentThemeBackground(const wxColour& bg)
|
||||
{
|
||||
// avoide switching into owner-drawn mode
|
||||
wxControl::SetBackgroundColour(bg);
|
||||
}
|
||||
|
||||
#ifdef __WIN32__
|
||||
// coloured buttons support
|
||||
virtual bool SetBackgroundColour(const wxColour &colour);
|
||||
virtual bool SetForegroundColour(const wxColour &colour);
|
||||
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
|
||||
private:
|
||||
void MakeOwnerDrawn();
|
||||
#endif // __WIN32__
|
||||
|
||||
protected:
|
||||
// send a notification event, return TRUE if processed
|
||||
bool SendClickEvent();
|
||||
|
||||
// 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;
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const ;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_BUTTON_H_
|
||||
@@ -0,0 +1,68 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: palmos/caret.h
|
||||
// Purpose: wxCaret class - the Palm OS implementation of wxCaret
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CARET_H_
|
||||
#define _WX_CARET_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "caret.h"
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT 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;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCaret)
|
||||
};
|
||||
|
||||
#endif // _WX_CARET_H_
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/checkbox.h
|
||||
// Purpose: wxCheckBox class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKBOX_H_
|
||||
#define _WX_CHECKBOX_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "checkbox.h"
|
||||
#endif
|
||||
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLEXPORT 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 SetLabel(const wxString& label);
|
||||
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual void DoSet3StateValue(wxCheckBoxState value);
|
||||
|
||||
virtual wxCheckBoxState DoGet3StateValue() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckBox)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_
|
||||
@@ -0,0 +1,98 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checklst.h
|
||||
// Purpose: wxCheckListBox class - a listbox with checkable items
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CHECKLST__H_
|
||||
#define __CHECKLST__H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "checklst.h"
|
||||
#endif
|
||||
|
||||
#if !wxUSE_OWNER_DRAWN
|
||||
#error "wxCheckListBox class requires owner-drawn functionality."
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxOwnerDrawn;
|
||||
class WXDLLEXPORT wxCheckListBoxItem; // fwd decl, defined in checklst.cpp
|
||||
|
||||
class WXDLLEXPORT 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(int n);
|
||||
|
||||
virtual bool SetFont( const wxFont &font );
|
||||
|
||||
// items may be checked
|
||||
virtual bool IsChecked(size_t uiIndex) const;
|
||||
virtual void Check(size_t 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
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Name: wx/palmos/chkconf.h
|
||||
* Purpose: Compiler-specific configuration checking
|
||||
* Author: William Osborne
|
||||
* Modified by:
|
||||
* 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 don't work for some compilers
|
||||
*/
|
||||
|
||||
/*
|
||||
* If using PostScript-in-MSW in Univ, must enable PostScript
|
||||
*/
|
||||
|
||||
#if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
|
||||
#undef wxUSE_POSTSCRIPT
|
||||
#define wxUSE_POSTSCRIPT 1
|
||||
#endif
|
||||
|
||||
#ifndef wxUSE_NORLANDER_HEADERS
|
||||
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1200)) || defined(__WINE__) || ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
|
||||
# define wxUSE_NORLANDER_HEADERS 1
|
||||
#else
|
||||
# define wxUSE_NORLANDER_HEADERS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GCC does not have SEH (__try/__catch)
|
||||
*/
|
||||
|
||||
#if defined(__GNUG__)
|
||||
#undef wxUSE_ON_FATAL_EXCEPTION
|
||||
#define wxUSE_ON_FATAL_EXCEPTION 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior
|
||||
*/
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#endif
|
||||
|
||||
#if defined(__GNUWIN32__)
|
||||
/* These don't work as expected for mingw32 and cygwin32 */
|
||||
#undef wxUSE_MEMORY_TRACING
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
|
||||
#undef wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
/* Cygwin betas don't have wcslen */
|
||||
#if defined(__CYGWIN__) || defined(__CYGWIN32__)
|
||||
# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
|
||||
# undef wxUSE_WCHAR_T
|
||||
# define wxUSE_WCHAR_T 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* __GNUWIN32__ */
|
||||
|
||||
/* MFC duplicates these operators */
|
||||
#if wxUSE_MFC
|
||||
#undef wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#endif
|
||||
/* wxUSE_MFC */
|
||||
|
||||
#if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
|
||||
/* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
|
||||
#undef wxUSE_DRAG_AND_DROP
|
||||
#define wxUSE_DRAG_AND_DROP 0
|
||||
#endif
|
||||
|
||||
#if !wxUSE_OWNER_DRAWN
|
||||
#undef wxUSE_CHECKLISTBOX
|
||||
#define wxUSE_CHECKLISTBOX 0
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
|
||||
/* BC++ 4.0 can't compile JPEG library */
|
||||
#undef wxUSE_LIBJPEG
|
||||
#define wxUSE_LIBJPEG 0
|
||||
#endif
|
||||
|
||||
/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
|
||||
#if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) && (defined(__WATCOMC__) && __WATCOMC__ < 1200)
|
||||
#undef wxUSE_WCHAR_T
|
||||
#define wxUSE_WCHAR_T 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* _WX_PALMOS_CHKCONF_H_ */
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICE_H_
|
||||
#define _WX_CHOICE_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "choice.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Choice item
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT 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 DoAppend(const wxString& item);
|
||||
virtual int DoInsert(const wxString& item, int pos);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
|
||||
virtual int GetCount() const;
|
||||
virtual int GetSelection() const;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
|
||||
// MSW only
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
protected:
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
virtual void DoSetItemClientData( int n, void* clientData );
|
||||
virtual void* DoGetItemClientData( int n ) const;
|
||||
virtual void DoSetItemClientObject( int n, wxClientData* clientData );
|
||||
virtual wxClientData* DoGetItemClientObject( 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);
|
||||
|
||||
virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg);
|
||||
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// 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_
|
||||
@@ -0,0 +1,102 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/clipbrd.h
|
||||
// Purpose: wxClipboad class and clipboard functions for Palm OS
|
||||
// Author: William Osborne
|
||||
// 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 defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "clipbrd.h"
|
||||
#endif
|
||||
|
||||
#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
|
||||
WXDLLEXPORT bool wxOpenClipboard();
|
||||
WXDLLEXPORT bool wxIsClipboardOpened();
|
||||
#define wxClipboardOpen wxIsClipboardOpened
|
||||
WXDLLEXPORT bool wxCloseClipboard();
|
||||
|
||||
// get/set data
|
||||
WXDLLEXPORT bool wxEmptyClipboard();
|
||||
WXDLLEXPORT bool wxSetClipboardData(wxDataFormat dataFormat,
|
||||
const void *data,
|
||||
int width = 0, int height = 0);
|
||||
WXDLLEXPORT void* wxGetClipboardData(wxDataFormat dataFormat,
|
||||
long *len = NULL);
|
||||
|
||||
// clipboard formats
|
||||
WXDLLEXPORT bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
|
||||
WXDLLEXPORT wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
|
||||
WXDLLEXPORT int wxRegisterClipboardFormat(wxChar *formatName);
|
||||
WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat,
|
||||
wxChar *formatName,
|
||||
int maxCount);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClipboard
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxDataObject;
|
||||
class WXDLLEXPORT wxClipboard : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
||||
|
||||
public:
|
||||
wxClipboard();
|
||||
~wxClipboard();
|
||||
|
||||
// open the clipboard before SetData() and GetData()
|
||||
virtual bool Open();
|
||||
|
||||
// close the clipboard after SetData() and GetData()
|
||||
virtual void Close();
|
||||
|
||||
// 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();
|
||||
|
||||
// X11 has two clipboards which get selected by this call. Empty on MSW.
|
||||
void UsePrimarySelection( bool WXUNUSED(primary) = FALSE ) { }
|
||||
|
||||
private:
|
||||
bool m_clearOnExit;
|
||||
bool m_isOpened;
|
||||
};
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
#endif
|
||||
// _WX_CLIPBRD_H_
|
||||
@@ -0,0 +1,61 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/colordlg.h
|
||||
// Purpose: wxColourDialog class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLORDLG_H_
|
||||
#define _WX_COLORDLG_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "colordlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourDialog: dialog for choosing a colours
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxColourDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
wxColourDialog();
|
||||
wxColourDialog(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
bool Create(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
wxColourData& GetColourData() { return m_colourData; }
|
||||
|
||||
// override some base class virtuals
|
||||
virtual void SetTitle(const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual void DoGetPosition( int *x, int *y ) 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);
|
||||
|
||||
wxColourData m_colourData;
|
||||
wxString m_title;
|
||||
|
||||
wxPoint m_pos;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxColourDialog)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_COLORDLG_H_
|
||||
@@ -0,0 +1,114 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/palmos/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLOUR_H_
|
||||
#define _WX_COLOUR_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "colour.h"
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Colour
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxColour : public wxObject
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
|
||||
// default
|
||||
wxColour() { Init(); }
|
||||
|
||||
// from separate RGB
|
||||
wxColour( unsigned char red, unsigned char green, unsigned char blue )
|
||||
{ Set(red, green, blue); }
|
||||
|
||||
// from packed RGB
|
||||
wxColour( unsigned long colRGB ) { Set(colRGB); }
|
||||
|
||||
// implicit conversion from the colour name
|
||||
wxColour(const wxString &colourName) { InitFromName(colourName); }
|
||||
wxColour(const wxChar *colourName) { InitFromName(colourName); }
|
||||
|
||||
|
||||
// copy ctors and assignment operators
|
||||
wxColour(const wxColour& col);
|
||||
wxColour& operator=( const wxColour& col);
|
||||
|
||||
// dtor
|
||||
~wxColour();
|
||||
|
||||
|
||||
// other methods
|
||||
// -------------
|
||||
|
||||
// to have the matching Create also for this class
|
||||
void Create( unsigned char red, unsigned char green, unsigned char blue )
|
||||
{ Set(red, green, blue); }
|
||||
|
||||
// Set() functions
|
||||
void Set(unsigned char red, unsigned char green, unsigned char blue);
|
||||
void Set(unsigned long colRGB)
|
||||
{
|
||||
// we don't need to know sizeof(long) here because we assume that the three
|
||||
// least significant bytes contain the R, G and B values
|
||||
Set((unsigned char)colRGB,
|
||||
(unsigned char)(colRGB >> 8),
|
||||
(unsigned char)(colRGB >> 16));
|
||||
}
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
bool Ok() const { return m_isInit; }
|
||||
|
||||
unsigned char Red() const { return m_red; }
|
||||
unsigned char Green() const { return m_green; }
|
||||
unsigned char Blue() const { return m_blue; }
|
||||
|
||||
// comparison
|
||||
bool operator==(const wxColour& colour) const
|
||||
{
|
||||
return m_isInit == colour.m_isInit
|
||||
&& m_red == colour.m_red
|
||||
&& m_green == colour.m_green
|
||||
&& m_blue == colour.m_blue;
|
||||
}
|
||||
|
||||
bool operator != (const wxColour& colour) const { return !(*this == colour); }
|
||||
|
||||
WXCOLORREF GetPixel() const { return m_pixel; };
|
||||
|
||||
void InitFromName(const wxString& colourName);
|
||||
|
||||
public:
|
||||
WXCOLORREF m_pixel;
|
||||
|
||||
protected:
|
||||
// Helper function
|
||||
void Init();
|
||||
|
||||
private:
|
||||
bool m_isInit;
|
||||
unsigned char m_red;
|
||||
unsigned char m_blue;
|
||||
unsigned char m_green;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColour)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_COLOUR_H_
|
||||
@@ -0,0 +1,114 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COMBOBOX_H_
|
||||
#define _WX_COMBOBOX_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "combobox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/choice.h"
|
||||
|
||||
#if wxUSE_COMBOBOX
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Combobox control
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT 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 long 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);
|
||||
|
||||
// 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);
|
||||
|
||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||
WXUINT message, 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_
|
||||
@@ -0,0 +1,136 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: control.h
|
||||
// Purpose: wxControl class
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CONTROL_H_
|
||||
#define _WX_CONTROL_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||
#pragma interface "control.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// General item class
|
||||
class WXDLLEXPORT wxControl : public wxControlBase
|
||||
{
|
||||
public:
|
||||
wxControl() { }
|
||||
|
||||
wxControl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr)
|
||||
{
|
||||
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); }
|
||||
|
||||
|
||||
// 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);
|
||||
|
||||
// MSW-specific
|
||||
#ifdef __WIN95__
|
||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||
#endif // Win95
|
||||
|
||||
// For ownerdraw items
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *WXUNUSED(item)) { return FALSE; };
|
||||
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *WXUNUSED(item)) { return FALSE; };
|
||||
|
||||
const wxArrayLong& GetSubcontrols() const { return m_subControls; }
|
||||
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
protected:
|
||||
// choose the default border for this window
|
||||
virtual wxBorder GetDefaultBorder() const;
|
||||
|
||||
// return default best size (doesn't really make any sense, override this)
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// create the control of the given Windows class: 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 MSWCreateControl(const wxChar *classname,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size);
|
||||
|
||||
// NB: the method below is deprecated now, with MSWGetStyle() the method
|
||||
// above should be used instead! Once all the controls are updated to
|
||||
// implement MSWGetStyle() this version will disappear.
|
||||
//
|
||||
// create the control of the given class with the given style (combination
|
||||
// of WS_XXX flags, i.e. Windows style, not wxWidgets one), returns
|
||||
// FALSE if creation failed
|
||||
//
|
||||
// All parameters except classname and style are optional, if the
|
||||
// size/position are not given, they should be set later with SetSize()
|
||||
// and, label (the title of the window), of course, is left empty. The
|
||||
// extended style is determined from the style and the app 3D settings
|
||||
// automatically if it's not specified explicitly.
|
||||
bool MSWCreateControl(const wxChar *classname,
|
||||
WXDWORD style,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& label = wxEmptyString,
|
||||
WXDWORD exstyle = (WXDWORD)-1);
|
||||
|
||||
// default style for the control include WS_TABSTOP if it AcceptsFocus()
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// 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;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CONTROL_H_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user