Reformatted Motif headers; added __WXX11__ symbol support to common headers;

added place-holding src/x11 and include/wx/x11 files.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-02-05 16:34:33 +00:00
parent a4e17da546
commit 83df96d63a
162 changed files with 22793 additions and 2176 deletions

View File

@@ -75,7 +75,7 @@ public:
bool operator!=(const wxAcceleratorEntry& entry) const
{ return !(*this == entry); }
#ifdef __WXMOTIF__
#if defined(__WXMOTIF__) || defined(__WXX11__)
// Implementation use only
bool MatchesEvent(const wxKeyEvent& event) const ;
#endif
@@ -105,6 +105,8 @@ private:
#include "wx/motif/accel.h"
#elif defined(__WXGTK__)
#include "wx/gtk/accel.h"
#elif defined(__WXX11__)
#include "wx/x11/accel.h"
#elif defined(__WXMAC__)
#include "wx/mac/accel.h"
#elif defined(__WXPM__)

View File

@@ -375,6 +375,8 @@ protected:
#include "wx/mgl/app.h"
#elif defined(__WXGTK__)
#include "wx/gtk/app.h"
#elif defined(__WXX11__)
#include "wx/x11/app.h"
#elif defined(__WXMAC__)
#include "wx/mac/app.h"
#elif defined(__WXPM__)

View File

@@ -159,6 +159,8 @@ protected:
#include "wx/motif/bitmap.h"
#elif defined(__WXGTK__)
#include "wx/gtk/bitmap.h"
#elif defined(__WXX11__)
#include "wx/x11/bitmap.h"
#elif defined(__WXMGL__)
#include "wx/mgl/bitmap.h"
#elif defined(__WXMAC__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/brush.h"
#elif defined(__WXGTK__)
#include "wx/gtk/brush.h"
#elif defined(__WXX11__)
#include "wx/x11/brush.h"
#elif defined(__WXMGL__)
#include "wx/mgl/brush.h"
#elif defined(__WXMAC__)

View File

@@ -88,6 +88,8 @@ public:
#include "wx/motif/clipbrd.h"
#elif defined(__WXGTK__)
#include "wx/gtk/clipbrd.h"
#elif defined(__WXX11__)
#include "wx/x11/clipbrd.h"
#elif defined(__WXMGL__)
#include "wx/mgl/clipbrd.h"
#elif defined(__WXMAC__)

View File

@@ -9,6 +9,8 @@
#include "wx/gtk/colour.h"
#elif defined(__WXMGL__)
#include "wx/mgl/colour.h"
#elif defined(__WXX11__)
#include "wx/x11/colour.h"
#elif defined(__WXMAC__)
#include "wx/mac/colour.h"
#elif defined(__WXPM__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/cursor.h"
#elif defined(__WXGTK__)
#include "wx/gtk/cursor.h"
#elif defined(__WXX11__)
#include "wx/x11/cursor.h"
#elif defined(__WXMGL__)
#include "wx/mgl/cursor.h"
#elif defined(__WXMAC__)

View File

@@ -79,6 +79,8 @@ public:
#include "wx/motif/dataform.h"
#elif defined(__WXGTK__)
#include "wx/gtk/dataform.h"
#elif defined(__WXX11__)
#include "wx/x11/dataform.h"
#elif defined(__WXMAC__)
#include "wx/mac/dataform.h"
#elif defined(__WXPM__)

View File

@@ -758,6 +758,8 @@ private:
#include "wx/motif/dc.h"
#elif defined(__WXGTK__)
#include "wx/gtk/dc.h"
#elif defined(__WXX11__)
#include "wx/x11/dc.h"
#elif defined(__WXMGL__)
#include "wx/mgl/dc.h"
#elif defined(__WXMAC__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/dcclient.h"
#elif defined(__WXGTK__)
#include "wx/gtk/dcclient.h"
#elif defined(__WXX11__)
#include "wx/x11/dcclient.h"
#elif defined(__WXMGL__)
#include "wx/mgl/dcclient.h"
#elif defined(__WXMAC__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/dcmemory.h"
#elif defined(__WXGTK__)
#include "wx/gtk/dcmemory.h"
#elif defined(__WXX11__)
#include "wx/x11/dcmemory.h"
#elif defined(__WXMGL__)
#include "wx/mgl/dcmemory.h"
#elif defined(__WXMAC__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/dcscreen.h"
#elif defined(__WXGTK__)
#include "wx/gtk/dcscreen.h"
#elif defined(__WXX11__)
#include "wx/x11/dcscreen.h"
#elif defined(__WXMGL__)
#include "wx/mgl/dcscreen.h"
#elif defined(__WXMAC__)

View File

@@ -27,7 +27,7 @@
#error "Target can't be both X and Windows"
#elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \
!defined(__WXPM__) && !defined(__WXMAC__) && !defined(__X__) && \
!defined(__WXMGL__) && wxUSE_GUI
!defined(__WXMGL__) && !defined(__WXX11__) && wxUSE_GUI
#ifdef __UNIX__
#error "No Target! You should use wx-config program for compilation flags!"
#else // !Unix
@@ -424,6 +424,7 @@ enum
wxGEOS, // GEOS
wxOS2_PM, // OS/2 Workplace
wxWINDOWS, // Windows or WfW
wxMICROWINDOWS, // MicroWindows
wxPENWINDOWS, // Windows for Pen Computing
wxWINDOWS_NT, // Windows NT
wxWIN32S, // Windows 32S API
@@ -435,7 +436,8 @@ enum
wxMGL_OS2, // MGL on OS/2
wxMGL_DOS, // MGL on MS-DOS
wxWINDOWS_OS2, // Native OS/2 PM
wxUNIX // wxBase under Unix
wxUNIX, // wxBase under Unix
wxX11 // Plain X11 and Universal widgets
};
// ----------------------------------------------------------------------------
@@ -1852,7 +1854,7 @@ typedef WXRESULT (_System *WXFARPROC)(WXHWND, WXMSGID, WXWPARAM, WXLPARAM);
#endif //__WXPM__
#ifdef __WXMOTIF__
#if defined(__WXMOTIF__) || defined(__WXX11__)
/* Stand-ins for X/Xt/Motif types */
typedef void* WXWindow;
typedef void* WXWidget;

View File

@@ -21,6 +21,8 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#include "wx/generic/dirdlgg.h"
#elif defined(__WXGTK__)
#include "wx/generic/dirdlgg.h"
#elif defined(__WXX11__)
#include "wx/generic/dirdlgg.h"
#elif defined(__WXMGL__)
#include "wx/generic/dirdlgg.h"
#elif defined(__WXMAC__)

View File

@@ -187,6 +187,8 @@ protected:
#include "wx/msw/ole/droptgt.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/dnd.h"
#elif defined(__WXX11__)
#include "wx/x11/dnd.h"
#elif defined(__WXGTK__)
#include "wx/gtk/dnd.h"
#elif defined(__WXMAC__)

View File

@@ -22,6 +22,11 @@
#define wxDragImage wxGenericDragImage
#define sm_classwxDragImage sm_classwxGenericDragImage
#elif defined(__WXX11__)
#include "wx/generic/dragimgg.h"
#define wxDragImage wxGenericDragImage
#define sm_classwxDragImage sm_classwxGenericDragImage
#elif defined(__WXMAC__)
#include "wx/generic/dragimgg.h"
#define wxDragImage wxGenericDragImage

View File

@@ -20,6 +20,8 @@ enum
#include "wx/motif/filedlg.h"
#elif defined(__WXGTK__)
#include "wx/generic/filedlgg.h"
#elif defined(__WXX11__)
#include "wx/generic/filedlg.h"
#elif defined(__WXMGL__)
#include "wx/generic/filedlgg.h"
#elif defined(__WXMAC__)

View File

@@ -166,6 +166,8 @@ private:
#include "wx/motif/font.h"
#elif defined(__WXGTK__)
#include "wx/gtk/font.h"
#elif defined(__WXX11__)
#include "wx/x11/font.h"
#elif defined(__WXMGL__)
#include "wx/mgl/font.h"
#elif defined(__WXMAC__)

View File

@@ -166,6 +166,9 @@ enum wxStockCursor
#elif defined(__WXMOTIF__)
// Initialize from an included XPM
#define wxICON(X) wxIcon( X##_xpm )
#elif defined(__WXX11__)
// Initialize from an included XPM
#define wxICON(X) wxIcon( X##_xpm )
#else
// This will usually mean something on any platform
#define wxICON(X) wxIcon("" #X "")
@@ -177,7 +180,7 @@ enum wxStockCursor
#if defined(__WXMSW__) || defined(__WXPM__)
#define wxBITMAP(name) wxBitmap(#name, wxBITMAP_TYPE_RESOURCE)
#elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
#elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) || defined(__WXMAC__) || defined(__WXMGL__)
// Initialize from an included XPM
#define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
#else // other platforms
@@ -213,8 +216,7 @@ public:
wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); }
wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); }
// accessors
void Set(int xx, int yy) { x = xx; y = yy; }
// accessors void Set(int xx, int yy) { x = xx; y = yy; }
void SetWidth(int w) { x = w; }
void SetHeight(int h) { y = h; }

View File

@@ -7,6 +7,8 @@
#include "wx/motif/gdiobj.h"
#elif defined(__WXGTK__)
#include "wx/gtk/gdiobj.h"
#elif defined(__WXX11__)
#include "wx/x11/gdiobj.h"
#elif defined(__WXMGL__)
#include "wx/mgl/gdiobj.h"
#elif defined(__WXMAC__)

View File

@@ -11,6 +11,8 @@
#include "wx/motif/glcanvas.h"
#elif defined(__WXGTK__)
#include "wx/gtk/glcanvas.h"
#elif defined(__WXX11__)
#include "wx/x11/glcanvas.h"
#elif defined(__WXMAC__)
#include "wx/mac/glcanvas.h"
#elif defined(__WXPM__)

View File

@@ -13,6 +13,8 @@
#include "wx/motif/icon.h"
#elif defined(__WXGTK__)
#include "wx/gtk/icon.h"
#elif defined(__WXX11__)
#include "wx/x11/icon.h"
#elif defined(__WXMGL__)
#include "wx/mgl/icon.h"
#elif defined(__WXMAC__)

View File

@@ -9,6 +9,8 @@
#include "wx/motif/joystick.h"
#elif defined(__WXGTK__)
#include "wx/gtk/joystick.h"
#elif defined(__WXX11__)
#include "wx/x11/joystick.h"
#elif defined(__WXMAC__)
#include "wx/mac/joystick.h"
#elif defined(__WXPM__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/mdi.h"
#elif defined(__WXGTK__)
#include "wx/gtk/mdi.h"
#elif defined(__WXX11__)
#include "wx/x11/mdi.h"
#elif defined(__WXMAC__)
#include "wx/mac/mdi.h"
#elif defined(__WXPM__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/minifram.h"
#elif defined(__WXGTK__)
#include "wx/gtk/minifram.h"
#elif defined(__WXX11__)
#include "wx/x11/minifram.h"
#elif defined(__WXMAC__)
#include "wx/mac/minifram.h"
#elif defined(__WXPM__)

View File

@@ -20,58 +20,9 @@
#include "wx/string.h"
#include "wx/event.h"
class WXDLLEXPORT wxAcceleratorTable;
#if 0
// Hold Ctrl key down
#define wxACCEL_ALT 0x01
// Hold Ctrl key down
#define wxACCEL_CTRL 0x02
// Hold Shift key down
#define wxACCEL_SHIFT 0x04
// Hold no key down
#define wxACCEL_NORMAL 0x00
class WXDLLEXPORT wxAcceleratorEntry
{
public:
wxAcceleratorEntry(const wxAcceleratorEntry& entry)
{
m_flags = entry.m_flags; m_keyCode = entry.m_keyCode; m_command = entry.m_command;
}
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0)
{
m_flags = flags; m_keyCode = keyCode; m_command = cmd;
}
void Set(int flags, int keyCode, int cmd)
{ m_flags = flags; m_keyCode = keyCode; m_command = cmd; }
int GetFlags() const { return m_flags; }
int GetKeyCode() const { return m_keyCode; }
int GetCommand() const { return m_command; }
void operator = (const wxAcceleratorEntry& entry)
{
m_flags = entry.m_flags; m_keyCode = entry.m_keyCode; m_command = entry.m_command;
}
// Implementation use only
bool MatchesEvent(const wxKeyEvent& event) const;
public:
int m_flags;
int m_keyCode; // ASCII or virtual keycode
int m_command; // Command id to generate
};
#endif
class WXDLLEXPORT wxAcceleratorTable: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
public:
wxAcceleratorTable();
wxAcceleratorTable(const wxString& resource); // Load from .rc resource
@@ -89,7 +40,7 @@ public:
bool Ok() const;
// Implementation only
// Implementation only
int GetCount() const;
wxAcceleratorEntry* GetEntries() const;
};
@@ -97,4 +48,4 @@ public:
WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable;
#endif
// _WX_ACCEL_H_
// _WX_ACCEL_H_

View File

@@ -13,7 +13,7 @@
#define _WX_APP_H_
#ifdef __GNUG__
#pragma interface "app.h"
#pragma interface "app.h"
#endif
// ----------------------------------------------------------------------------
@@ -39,7 +39,7 @@ class WXDLLEXPORT wxLog;
class WXDLLEXPORT wxApp : public wxAppBase
{
DECLARE_DYNAMIC_CLASS(wxApp)
DECLARE_DYNAMIC_CLASS(wxApp)
public:
wxApp();
@@ -127,5 +127,5 @@ protected:
int WXDLLEXPORT wxEntry( int argc, char *argv[] );
#endif
// _WX_APP_H_
// _WX_APP_H_

View File

@@ -33,33 +33,33 @@ class WXDLLEXPORT wxImage;
// transparently.
class WXDLLEXPORT wxMask: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxMask)
DECLARE_DYNAMIC_CLASS(wxMask)
public:
wxMask();
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 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 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 a mono bitmap (copies the bitmap).
wxMask(const wxBitmap& bitmap);
~wxMask();
~wxMask();
bool Create(const wxBitmap& bitmap, const wxColour& colour);
bool Create(const wxBitmap& bitmap, int paletteIndex);
bool Create(const wxBitmap& bitmap);
bool Create(const wxBitmap& bitmap, const wxColour& colour);
bool Create(const wxBitmap& bitmap, int paletteIndex);
bool Create(const wxBitmap& bitmap);
WXPixmap GetPixmap() const { return m_pixmap; }
void SetPixmap(WXPixmap pixmap) { m_pixmap = pixmap; }
WXPixmap GetPixmap() const { return m_pixmap; }
void SetPixmap(WXPixmap pixmap) { m_pixmap = pixmap; }
protected:
WXPixmap m_pixmap;
WXPixmap m_pixmap;
};
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
@@ -72,150 +72,150 @@ public:
~wxBitmapRefData();
public:
int m_width;
int m_height;
int m_depth;
bool m_ok;
int m_numColors;
wxPalette m_bitmapPalette;
int m_quality;
int m_width;
int m_height;
int m_depth;
bool m_ok;
int m_numColors;
wxPalette m_bitmapPalette;
int m_quality;
wxMask * m_bitmapMask; // Optional mask
wxMask * m_bitmapMask; // Optional mask
// Motif implementation
// Motif implementation
public:
WXPixmap m_pixmap;
WXDisplay* m_display;
bool m_freePixmap;
unsigned long* m_freeColors;
long m_freeColorsCount;
WXPixmap m_pixmap;
WXDisplay* m_display;
bool m_freePixmap;
unsigned long* m_freeColors;
long m_freeColorsCount;
// These 5 variables are for wxControl
WXPixmap m_insensPixmap ;
WXPixmap m_labelPixmap ;
WXPixmap m_armPixmap ;
WXImage* m_image ;
WXImage* m_insensImage ;
// These 5 variables are for wxControl
WXPixmap m_insensPixmap ;
WXPixmap m_labelPixmap ;
WXPixmap m_armPixmap ;
WXImage* m_image ;
WXImage* m_insensImage ;
};
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
class WXDLLEXPORT wxBitmapHandler: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
public:
wxBitmapHandler() { m_name = ""; m_extension = ""; m_type = 0; };
wxBitmapHandler() { m_name = ""; m_extension = ""; m_type = 0; };
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(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);
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; }
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; }
protected:
wxString m_name;
wxString m_extension;
long m_type;
wxString m_name;
wxString m_extension;
long m_type;
};
#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
class WXDLLEXPORT wxBitmap: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxBitmap)
DECLARE_DYNAMIC_CLASS(wxBitmap)
friend class WXDLLEXPORT wxBitmapHandler;
friend class WXDLLEXPORT wxBitmapHandler;
public:
wxBitmap(); // Platform-specific
wxBitmap(); // Platform-specific
// Copy constructors
wxBitmap(const wxBitmap& bitmap)
{ Ref(bitmap); }
// Copy constructors
wxBitmap(const wxBitmap& bitmap)
{ Ref(bitmap); }
// Initialize with raw XBM data
wxBitmap(const char bits[], int width, int height, int depth = 1);
// Initialize with raw XBM data
wxBitmap(const char bits[], int width, int height, int depth = 1);
// from XPM
wxBitmap(const char **data) { (void)CreateFromXpm(data); }
wxBitmap(char **data) { (void)CreateFromXpm((const char **)data); }
// from XPM
wxBitmap(const char **data) { (void)CreateFromXpm(data); }
wxBitmap(char **data) { (void)CreateFromXpm((const char **)data); }
// Initialize with XPM data -- deprecated
wxBitmap(char **data, wxControl* control);
// Initialize with XPM data -- deprecated
wxBitmap(char **data, wxControl* control);
// Load a file or resource
wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XPM);
// Load a file or resource
wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XPM);
// Constructor for generalised creation from data
wxBitmap(void *data, long type, int width, int height, int depth = 1);
// Constructor for generalised creation from data
wxBitmap(void *data, long type, int width, int height, int depth = 1);
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1);
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1);
// Convert from wxImage:
wxBitmap(const wxImage& image, int depth = -1) { (void)CreateFromImage(image, depth); }
// Convert from wxImage:
wxBitmap(const wxImage& image, int depth = -1) { (void)CreateFromImage(image, depth); }
~wxBitmap();
~wxBitmap();
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
wxBitmap GetSubBitmap( const wxRect& rect ) const;
wxBitmap GetSubBitmap( const wxRect& rect ) const;
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XPM);
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XPM);
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
wxImage ConvertToImage() const;
wxImage ConvertToImage() const;
bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
int GetWidth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); }
int GetHeight() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); }
int GetDepth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); }
int GetQuality() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); }
void SetWidth(int w);
void SetHeight(int h);
void SetDepth(int d);
void SetQuality(int q);
void SetOk(bool isOk);
bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
int GetWidth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); }
int GetHeight() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); }
int GetDepth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); }
int GetQuality() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); }
void SetWidth(int w);
void SetHeight(int h);
void SetDepth(int d);
void SetQuality(int q);
void SetOk(bool isOk);
wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : (wxPalette*) NULL); }
void SetPalette(const wxPalette& palette);
wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : (wxPalette*) NULL); }
void SetPalette(const wxPalette& palette);
wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : (wxMask*) NULL); }
void SetMask(wxMask *mask) ;
wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : (wxMask*) NULL); }
void SetMask(wxMask *mask) ;
wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
bool operator == (const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
bool operator != (const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
bool operator == (const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
bool operator != (const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
// Format handling
static wxList& GetHandlers() { return sm_handlers; }
static void AddHandler(wxBitmapHandler *handler);
static void InsertHandler(wxBitmapHandler *handler);
static bool RemoveHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType);
static wxBitmapHandler *FindHandler(long bitmapType);
// Format handling
static wxList& GetHandlers() { return sm_handlers; }
static void AddHandler(wxBitmapHandler *handler);
static void InsertHandler(wxBitmapHandler *handler);
static bool RemoveHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType);
static wxBitmapHandler *FindHandler(long bitmapType);
static void InitStandardHandlers();
static void CleanUpHandlers();
static void InitStandardHandlers();
static void CleanUpHandlers();
// Motif implementation
// Motif implementation
public:
WXDisplay* GetDisplay() const { return M_BITMAPDATA->m_display; }
WXPixmap GetPixmap() const { return (WXPixmap) M_BITMAPDATA->m_pixmap; }
virtual WXPixmap GetLabelPixmap(WXWidget w) ;
virtual WXPixmap GetArmPixmap(WXWidget w) ;
virtual WXPixmap GetInsensPixmap(WXWidget w = (WXWidget) 0) ;
void SetPixmapNull() { M_BITMAPDATA->m_pixmap = 0; }
WXDisplay* GetDisplay() const { return M_BITMAPDATA->m_display; }
WXPixmap GetPixmap() const { return (WXPixmap) M_BITMAPDATA->m_pixmap; }
virtual WXPixmap GetLabelPixmap(WXWidget w) ;
virtual WXPixmap GetArmPixmap(WXWidget w) ;
virtual WXPixmap GetInsensPixmap(WXWidget w = (WXWidget) 0) ;
void SetPixmapNull() { M_BITMAPDATA->m_pixmap = 0; }
protected:
static wxList sm_handlers;
static wxList sm_handlers;
protected:
bool CreateFromXpm(const char **bits);
@@ -227,4 +227,4 @@ protected:
wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, wxColour& colour);
#endif
// _WX_BITMAP_H_
// _WX_BITMAP_H_

View File

@@ -24,70 +24,70 @@ WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
class WXDLLEXPORT wxBitmapButton: public wxButton
{
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
public:
wxBitmapButton();
~wxBitmapButton();
inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, bitmap, pos, size, style, validator, name);
}
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
public:
wxBitmapButton();
~wxBitmapButton();
inline wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
Create(parent, id, bitmap, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
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);
virtual void SetLabel(const wxBitmap& bitmap)
{
SetBitmapLabel(bitmap);
}
virtual void SetLabel(const wxString& label)
{
wxControl::SetLabel(label);
}
virtual void SetLabel(const wxBitmap& bitmap)
{
SetBitmapLabel(bitmap);
}
virtual void SetLabel(const wxString& label)
{
wxControl::SetLabel(label);
}
virtual void SetBitmapLabel(const wxBitmap& bitmap);
virtual void SetBitmapLabel(const wxBitmap& bitmap);
inline wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_buttonBitmap; }
inline wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_buttonBitmapSelected; }
inline wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_buttonBitmapFocus; }
inline wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_buttonBitmapDisabled; }
inline wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_buttonBitmap; }
inline wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_buttonBitmapSelected; }
inline wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_buttonBitmapFocus; }
inline wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_buttonBitmapDisabled; }
void SetBitmapSelected(const wxBitmap& sel);
void SetBitmapFocus(const wxBitmap& focus);
void SetBitmapDisabled(const wxBitmap& disabled);
void SetBitmapSelected(const wxBitmap& sel);
void SetBitmapFocus(const wxBitmap& focus);
void SetBitmapDisabled(const wxBitmap& disabled);
inline void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
inline int GetMarginX() { return m_marginX; }
inline int GetMarginY() { return m_marginY; }
inline void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
inline int GetMarginX() { return m_marginX; }
inline int GetMarginY() { return m_marginY; }
// Implementation
void DoSetBitmap();
virtual void ChangeBackgroundColour();
// Implementation
void DoSetBitmap();
virtual void ChangeBackgroundColour();
protected:
wxBitmap m_buttonBitmapFocus;
wxBitmap m_buttonBitmap;
wxBitmap m_buttonBitmapOriginal; // May be different from m_buttonBitmap
// if m_buttonBitmap has been changed
// to reflect button background colour
wxBitmap m_buttonBitmapSelected;
wxBitmap m_buttonBitmapSelectedOriginal;
protected:
wxBitmap m_buttonBitmapFocus;
wxBitmap m_buttonBitmap;
wxBitmap m_buttonBitmapOriginal; // May be different from m_buttonBitmap
// if m_buttonBitmap has been changed
// to reflect button background colour
wxBitmap m_buttonBitmapSelected;
wxBitmap m_buttonBitmapSelectedOriginal;
wxBitmap m_buttonBitmapDisabled;
wxBitmap m_buttonBitmapDisabledOriginal;
wxBitmap m_buttonBitmapDisabled;
wxBitmap m_buttonBitmapDisabledOriginal;
int m_marginX;
int m_marginY;
int m_marginX;
int m_marginY;
WXPixmap m_insensPixmap;
WXPixmap m_insensPixmap;
};
#endif
// _WX_BMPBUTTN_H_
// _WX_BMPBUTTN_H_

View File

@@ -41,39 +41,39 @@ protected:
// Brush
class WXDLLEXPORT wxBrush: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxBrush)
DECLARE_DYNAMIC_CLASS(wxBrush)
public:
wxBrush();
wxBrush(const wxColour& col, int style);
wxBrush(const wxBitmap& stipple);
inline wxBrush(const wxBrush& brush) { Ref(brush); }
~wxBrush();
wxBrush();
wxBrush(const wxColour& col, int style);
wxBrush(const wxBitmap& stipple);
inline wxBrush(const wxBrush& brush) { Ref(brush); }
~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) ;
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) ;
inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; }
inline bool operator == (const wxBrush& brush) const { return m_refData == brush.m_refData; }
inline bool operator != (const wxBrush& brush) const { return m_refData != brush.m_refData; }
inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; }
inline bool operator == (const wxBrush& brush) const { return m_refData == brush.m_refData; }
inline bool operator != (const wxBrush& brush) const { return m_refData != brush.m_refData; }
inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); };
inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); };
inline wxBitmap *GetStipple() const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); };
inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); };
inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); };
inline wxBitmap *GetStipple() const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); };
virtual bool Ok() const { return (m_refData != NULL) ; }
virtual bool Ok() const { return (m_refData != NULL) ; }
// Implementation
// Implementation
// Useful helper: create the brush resource
bool RealizeResource();
// Useful helper: create the brush resource
bool RealizeResource();
// When setting properties, we must make sure we're not changing
// another object
void Unshare();
// When setting properties, we must make sure we're not changing
// another object
void Unshare();
};
#endif
// _WX_BRUSH_H_
// _WX_BRUSH_H_

View File

@@ -13,7 +13,7 @@
#define _WX_BUTTON_H_
#ifdef __GNUG__
#pragma interface "button.h"
#pragma interface "button.h"
#endif
#include "wx/control.h"
@@ -29,21 +29,21 @@ class WXDLLEXPORT wxButton: public wxControl
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)
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);
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual void SetDefault();
virtual void Command(wxCommandEvent& event);
@@ -57,4 +57,4 @@ public:
};
#endif
// _WX_BUTTON_H_
// _WX_BUTTON_H_

View File

@@ -24,32 +24,32 @@ WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxCheckBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxCheckBox)
DECLARE_DYNAMIC_CLASS(wxCheckBox)
public:
inline wxCheckBox() { }
inline 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);
}
public:
inline wxCheckBox() { }
inline 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);
virtual bool GetValue() const ;
virtual void Command(wxCommandEvent& event);
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);
virtual bool GetValue() const ;
virtual void Command(wxCommandEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
};
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
@@ -62,19 +62,19 @@ public:
inline wxBitmapCheckBox() { checkWidth = -1; checkHeight = -1; }
inline wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
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 wxBitmap *bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
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;
@@ -84,8 +84,8 @@ public:
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif
// _WX_CHECKBOX_H_
// _WX_CHECKBOX_H_

View File

@@ -14,26 +14,26 @@
#define _WX_CHECKLST_H_
#ifdef __GNUG__
#pragma interface "checklst.h"
#pragma interface "checklst.h"
#endif
#include "wx/listbox.h"
class wxCheckListBox : public wxListBox
{
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
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);
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);
// items may be checked
bool IsChecked(size_t uiIndex) const;
@@ -44,4 +44,4 @@ private:
};
#endif
// _WX_CHECKLST_H_
// _WX_CHECKLST_H_

View File

@@ -30,23 +30,23 @@ public:
~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)
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);
}
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);
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);
// Virtual functions required by wxControlWithItems.
// They are not all implemented yet :-(
@@ -98,11 +98,10 @@ protected:
wxStringList m_stringList;
wxList m_clientList; // contains the client data for the items
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif
// _WX_CHOICE_H_
// _WX_CHOICE_H_

View File

@@ -13,7 +13,7 @@
#define _WX_CLIPBRD_H_
#ifdef __GNUG__
#pragma interface "clipbrd.h"
#pragma interface "clipbrd.h"
#endif
#if wxUSE_CLIPBOARD
@@ -66,7 +66,7 @@ public:
virtual void Clear();
virtual void UsePrimarySelection(bool primary = TRUE)
{ m_usePrimary = primary; }
{ m_usePrimary = primary; }
// implementation from now on
@@ -81,4 +81,4 @@ private:
#endif // wxUSE_CLIPBOARD
#endif
// _WX_CLIPBRD_H_
// _WX_CLIPBRD_H_

View File

@@ -22,12 +22,12 @@
#include "wx/cmndata.h"
/*
* Platform-specific colour dialog implementation
*/
* Platform-specific colour dialog implementation
*/
class WXDLLEXPORT wxColourDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxColourDialog)
DECLARE_DYNAMIC_CLASS(wxColourDialog)
public:
wxColourDialog();
wxColourDialog(wxWindow *parent, wxColourData *data = NULL);
@@ -43,4 +43,4 @@ protected:
};
#endif
// _WX_COLORDLG_H_
// _WX_COLORDLG_H_

View File

@@ -22,71 +22,71 @@
// Colour
class WXDLLEXPORT wxColour : public wxObject
{
DECLARE_DYNAMIC_CLASS(wxColour)
DECLARE_DYNAMIC_CLASS(wxColour)
public:
// ctors
// ctors
// default
wxColour();
wxColour();
// from RGB
wxColour( unsigned char red, unsigned char green, unsigned char blue );
wxColour( unsigned long colRGB ) { Set(colRGB); }
wxColour( unsigned char red, unsigned char green, unsigned char blue );
wxColour( unsigned long colRGB ) { Set(colRGB); }
// implicit conversion from the colour name
wxColour( const wxString &colourName ) { InitFromName(colourName); }
wxColour( const char *colourName ) { InitFromName(colourName); }
wxColour( const wxString &colourName ) { InitFromName(colourName); }
wxColour( const char *colourName ) { InitFromName(colourName); }
// copy ctors and assignment operators
wxColour( const wxColour& col );
wxColour& operator = ( const wxColour& col );
wxColour( const wxColour& col );
wxColour& operator = ( const wxColour& col );
// dtor
~wxColour();
~wxColour();
// 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));
}
// 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; }
// 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; }
int GetPixel() const { return m_pixel; };
void SetPixel(int pixel) { m_pixel = pixel; m_isInit = TRUE; };
int GetPixel() const { return m_pixel; };
void SetPixel(int pixel) { m_pixel = pixel; m_isInit = TRUE; };
inline bool operator == (const wxColour& colour) const { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); }
inline bool operator == (const wxColour& colour) const { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); }
inline bool operator != (const wxColour& colour) const { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); }
inline bool operator != (const wxColour& colour) const { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); }
// Allocate a colour, or nearest colour, using the given display.
// If realloc is TRUE, ignore the existing pixel, otherwise just return
// the existing one.
// Returns the allocated pixel.
// Allocate a colour, or nearest colour, using the given display.
// If realloc is TRUE, ignore the existing pixel, otherwise just return
// the existing one.
// Returns the allocated pixel.
// TODO: can this handle mono displays? If not, we should have an extra
// flag to specify whether this should be black or white by default.
// TODO: can this handle mono displays? If not, we should have an extra
// flag to specify whether this should be black or white by default.
int AllocColour(WXDisplay* display, bool realloc = FALSE);
int AllocColour(WXDisplay* display, bool realloc = FALSE);
void InitFromName(const wxString& col);
void InitFromName(const wxString& col);
private:
bool m_isInit;
unsigned char m_red;
unsigned char m_blue;
unsigned char m_green;
bool m_isInit;
unsigned char m_red;
unsigned char m_blue;
unsigned char m_green;
public:
int m_pixel;
int m_pixel;
};
#endif
// _WX_COLOUR_H_
// _WX_COLOUR_H_

View File

@@ -31,25 +31,25 @@ public:
~wxComboBox();
inline wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
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);
}
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);
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);
// List functions
virtual void Append(const wxString& item);
@@ -89,9 +89,9 @@ public:
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif
// _WX_COMBOBOX_H_
// _WX_COMBOBOX_H_

View File

@@ -30,21 +30,21 @@ 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 )
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);
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxControlNameStr);
// simulates the event, returns TRUE if the event was processed
virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
@@ -70,10 +70,10 @@ protected:
#endif // WXWIN_COMPATIBILITY
bool m_inSetValue; // Motif: prevent callbacks being called while
// in SetValue
// in SetValue
DECLARE_EVENT_TABLE()
};
#endif
// _WX_CONTROL_H_
// _WX_CONTROL_H_

View File

@@ -19,15 +19,15 @@
#include "wx/bitmap.h"
/* Cursor for one display, so we can choose the correct one for
* the current display.
*/
* the current display.
*/
class wxXCursor : public wxObject
{
DECLARE_DYNAMIC_CLASS(wxXCursor)
DECLARE_DYNAMIC_CLASS(wxXCursor)
public:
WXDisplay* m_display;
WXCursor m_cursor;
public:
WXDisplay* m_display;
WXCursor m_cursor;
};
class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData
@@ -48,37 +48,37 @@ public:
// Cursor
class WXDLLEXPORT wxCursor: public wxBitmap
{
DECLARE_DYNAMIC_CLASS(wxCursor)
DECLARE_DYNAMIC_CLASS(wxCursor)
public:
wxCursor();
wxCursor();
// Copy constructors
wxCursor(const wxCursor& cursor) { Ref(cursor); }
// Copy constructors
wxCursor(const wxCursor& cursor) { Ref(cursor); }
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM,
int hotSpotX = 0, int hotSpotY = 0);
wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM,
int hotSpotX = 0, int hotSpotY = 0);
wxCursor(wxStockCursor id);
~wxCursor();
wxCursor(wxStockCursor id);
~wxCursor();
virtual bool Ok() const { return ((m_refData != NULL) && M_CURSORDATA->m_ok); }
virtual bool Ok() const { return ((m_refData != NULL) && M_CURSORDATA->m_ok); }
wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
// Motif-specific.
// Create/get a cursor for the current display
WXCursor GetXCursor(WXDisplay* display) ;
// Make a cursor from standard id
WXCursor MakeCursor(WXDisplay* display, wxStockCursor id);
// Motif-specific.
// Create/get a cursor for the current display
WXCursor GetXCursor(WXDisplay* display) ;
// Make a cursor from standard id
WXCursor MakeCursor(WXDisplay* display, wxStockCursor id);
};
extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
#endif
// _WX_CURSOR_H_
// _WX_CURSOR_H_

View File

@@ -25,17 +25,17 @@ public:
wxDataFormat( NativeFormat format );
wxDataFormat& operator=(NativeFormat format)
{ SetId(format); return *this; }
{ SetId(format); return *this; }
// comparison (must have both versions)
bool operator==(NativeFormat format) const
{ return m_format == (NativeFormat)format; }
{ return m_format == (NativeFormat)format; }
bool operator!=(NativeFormat format) const
{ return m_format != (NativeFormat)format; }
{ return m_format != (NativeFormat)format; }
bool operator==(wxDataFormatId format) const
{ return m_type == (wxDataFormatId)format; }
{ return m_type == (wxDataFormatId)format; }
bool operator!=(wxDataFormatId format) const
{ return m_type != (wxDataFormatId)format; }
{ return m_type != (wxDataFormatId)format; }
// explicit and implicit conversions to NativeFormat which is one of
// standard data types (implicit conversion is useful for preserving the

View File

@@ -11,7 +11,7 @@
#define _WX_MOTIF_DATAOBJ_H_
#ifdef __GNUG__
#pragma interface "dataobj.h"
#pragma interface "dataobj.h"
#endif
// ----------------------------------------------------------------------------
@@ -20,7 +20,7 @@
class wxDataObject : public wxDataObjectBase
{
public:
public:
#ifdef __DARWIN__
~wxDataObject() { }
#endif

View File

@@ -13,7 +13,7 @@
#define _WX_DC_H_
#ifdef __GNUG__
#pragma interface "dc.h"
#pragma interface "dc.h"
#endif
#include "wx/pen.h"
@@ -27,14 +27,14 @@
//-----------------------------------------------------------------------------
#ifndef MM_TEXT
#define MM_TEXT 0
#define MM_ISOTROPIC 1
#define MM_ANISOTROPIC 2
#define MM_LOMETRIC 3
#define MM_HIMETRIC 4
#define MM_TWIPS 5
#define MM_POINTS 6
#define MM_METRIC 7
#define MM_TEXT 0
#define MM_ISOTROPIC 1
#define MM_ANISOTROPIC 2
#define MM_LOMETRIC 3
#define MM_HIMETRIC 4
#define MM_TWIPS 5
#define MM_POINTS 6
#define MM_METRIC 7
#endif
//-----------------------------------------------------------------------------
@@ -66,10 +66,10 @@ public:
protected:
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
bool useMask = FALSE);
bool useMask = FALSE);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height);
wxCoord width, wxCoord height);
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetSizeMM(int* width, int* height) const;
@@ -165,4 +165,4 @@ public:
};
#endif
// _WX_DC_H_
// _WX_DC_H_

View File

@@ -13,7 +13,7 @@
#define _WX_DCCLIENT_H_
#ifdef __GNUG__
#pragma interface "dcclient.h"
#pragma interface "dcclient.h"
#endif
#include "wx/dc.h"
@@ -64,10 +64,10 @@ public:
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
virtual void DoGetTextExtent(const wxString& string,
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
wxFont *theFont = NULL) const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
@@ -91,7 +91,7 @@ public:
protected:
virtual void DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
int style = wxFLOOD_SURFACE);
int style = wxFLOOD_SURFACE);
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
@@ -99,15 +99,15 @@ protected:
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);
wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc);
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea);
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);
wxCoord width, wxCoord height,
double radius);
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
virtual void DoCrossHair(wxCoord x, wxCoord y);
@@ -116,18 +116,18 @@ protected:
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,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height);
wxCoord width, wxCoord height);
virtual void DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset);
wxCoord xoffset, wxCoord yoffset);
virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
int fillStyle = wxODDEVEN_RULE);
wxCoord xoffset, wxCoord yoffset,
int fillStyle = wxODDEVEN_RULE);
WXGC m_gc;
WXGC m_gcBacking;
@@ -174,4 +174,4 @@ public:
};
#endif
// _WX_DCCLIENT_H_
// _WX_DCCLIENT_H_

View File

@@ -13,14 +13,14 @@
#define _WX_DCMEMORY_H_
#ifdef __GNUG__
#pragma interface "dcmemory.h"
#pragma interface "dcmemory.h"
#endif
#include "wx/dcclient.h"
class wxMemoryDC : public wxWindowDC
{
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public:
wxMemoryDC();
@@ -40,4 +40,4 @@ private:
};
#endif
// _WX_DCMEMORY_H_
// _WX_DCMEMORY_H_

View File

@@ -20,15 +20,15 @@
class WXDLLEXPORT wxPrinterDC: public wxDC
{
public:
DECLARE_CLASS(wxPrinterDC)
public:
DECLARE_CLASS(wxPrinterDC)
// Create a printer DC
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT);
// Create a printer DC
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT);
~wxPrinterDC();
~wxPrinterDC();
};
#endif
// _WX_DCPRINT_H_
// _WX_DCPRINT_H_

View File

@@ -20,29 +20,29 @@
class WXDLLEXPORT wxScreenDC: public wxWindowDC
{
DECLARE_DYNAMIC_CLASS(wxScreenDC)
DECLARE_DYNAMIC_CLASS(wxScreenDC)
public:
// Create a DC representing the whole screen
wxScreenDC();
~wxScreenDC();
public:
// Create a DC representing the whole screen
wxScreenDC();
~wxScreenDC();
// Compatibility with X's requirements for
// drawing on top of all windows
static bool StartDrawingOnTop(wxWindow* window);
static bool StartDrawingOnTop(wxRect* rect = NULL);
static bool EndDrawingOnTop();
// Compatibility with X's requirements for
// drawing on top of all windows
static bool StartDrawingOnTop(wxWindow* window);
static bool StartDrawingOnTop(wxRect* rect = NULL);
static bool EndDrawingOnTop();
private:
static WXWindow sm_overlayWindow;
static WXWindow sm_overlayWindow;
// If we have started transparent drawing at a non-(0,0) point
// then we will have to adjust the device origin in the
// constructor.
static int sm_overlayWindowX;
static int sm_overlayWindowY;
// If we have started transparent drawing at a non-(0,0) point
// then we will have to adjust the device origin in the
// constructor.
static int sm_overlayWindowX;
static int sm_overlayWindowY;
};
#endif
// _WX_DCSCREEN_H_
// _WX_DCSCREEN_H_

View File

@@ -13,7 +13,7 @@
#define _WX_DIALOG_H_
#ifdef __GNUG__
#pragma interface "dialog.h"
#pragma interface "dialog.h"
#endif
WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
@@ -21,17 +21,17 @@ WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
// Dialog boxes
class WXDLLEXPORT wxDialog : public wxDialogBase
{
DECLARE_DYNAMIC_CLASS(wxDialog)
DECLARE_DYNAMIC_CLASS(wxDialog)
public:
wxDialog();
// Constructor with a modal flag, but no window id - the old convention
wxDialog(wxWindow *parent,
const wxString& title, bool modal,
int x = -1, int y= -1, int width = 500, int height = 500,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
const wxString& title, bool modal,
int x = -1, int y= -1, int width = 500, int height = 500,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
@@ -39,21 +39,21 @@ public:
// Constructor with no modal flag - the new convention.
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)
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr);
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr);
~wxDialog();
@@ -74,7 +74,7 @@ public:
void SetModal(bool flag);
virtual bool IsModal() const
{ return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
{ return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
virtual int ShowModal();
virtual void EndModal(int retCode);
@@ -110,8 +110,8 @@ public:
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
@@ -120,4 +120,4 @@ private:
};
#endif
// _WX_DIALOG_H_
// _WX_DIALOG_H_

View File

@@ -22,7 +22,7 @@ WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
class WXDLLEXPORT wxDirDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxDirDialog)
DECLARE_DYNAMIC_CLASS(wxDirDialog)
public:
wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultPath = "",
@@ -46,4 +46,4 @@ protected:
};
#endif
// _WX_DIRDLG_H_
// _WX_DIRDLG_H_

View File

@@ -43,7 +43,7 @@ class WXDLLEXPORT wxDropSource;
class WXDLLEXPORT wxDropTarget: public wxObject
{
public:
public:
wxDropTarget();
~wxDropTarget();
@@ -57,7 +57,7 @@ class WXDLLEXPORT wxDropTarget: public wxObject
virtual size_t GetFormatCount() const = 0;
virtual wxDataFormat GetFormat(size_t n) const = 0;
// implementation
// implementation
};
//-------------------------------------------------------------------------
@@ -66,13 +66,13 @@ class WXDLLEXPORT wxDropTarget: public wxObject
class WXDLLEXPORT wxTextDropTarget: public wxDropTarget
{
public:
public:
wxTextDropTarget() {};
virtual bool OnDrop( long x, long y, const void *data, size_t size );
virtual bool OnDropText( long x, long y, const char *psz );
protected:
protected:
virtual size_t GetFormatCount() const;
virtual wxDataFormat GetFormat(size_t n) const;
@@ -86,26 +86,26 @@ class WXDLLEXPORT wxPrivateDropTarget: public wxDropTarget
{
public:
wxPrivateDropTarget();
wxPrivateDropTarget();
// you have to override OnDrop to get at the data
// you have to override OnDrop to get at the data
// the string ID identifies the format of clipboard or DnD data. a word
// processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
// to the clipboard - the latter with the Id "WXWORD_FORMAT".
// the string ID identifies the format of clipboard or DnD data. a word
// processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
// to the clipboard - the latter with the Id "WXWORD_FORMAT".
void SetId( const wxString& id )
{ m_id = id; }
void SetId( const wxString& id )
{ m_id = id; }
wxString GetId()
{ return m_id; }
wxString GetId()
{ return m_id; }
private:
virtual size_t GetFormatCount() const;
virtual wxDataFormat GetFormat(size_t n) const;
virtual size_t GetFormatCount() const;
virtual wxDataFormat GetFormat(size_t n) const;
wxString m_id;
wxString m_id;
};
// ----------------------------------------------------------------------------
@@ -114,15 +114,15 @@ private:
class WXDLLEXPORT wxFileDropTarget: public wxDropTarget
{
public:
public:
wxFileDropTarget() {};
virtual bool OnDrop( long x, long y, const void *data, size_t size );
virtual bool OnDropFiles( long x, long y,
size_t nFiles, const char * const aszFiles[] );
size_t nFiles, const char * const aszFiles[] );
protected:
protected:
virtual size_t GetFormatCount() const;
virtual wxDataFormat GetFormat(size_t n) const;
@@ -134,16 +134,16 @@ class WXDLLEXPORT wxFileDropTarget: public wxDropTarget
enum wxDragResult
{
wxDragError, // error prevented the d&d operation from completing
wxDragNone, // drag target didn't accept the data
wxDragCopy, // the data was successfully copied
wxDragMove, // the data was successfully moved
wxDragCancel // the operation was cancelled by user (not an error)
wxDragError, // error prevented the d&d operation from completing
wxDragNone, // drag target didn't accept the data
wxDragCopy, // the data was successfully copied
wxDragMove, // the data was successfully moved
wxDragCancel // the operation was cancelled by user (not an error)
};
class WXDLLEXPORT wxDropSource: public wxObject
{
public:
public:
wxDropSource( wxWindow *win );
wxDropSource( wxDataObject &data, wxWindow *win );
@@ -155,7 +155,7 @@ class WXDLLEXPORT wxDropSource: public wxObject
virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
// implementation
// implementation
#if 0
void RegisterWindow(void);
void UnregisterWindow(void);
@@ -171,8 +171,8 @@ class WXDLLEXPORT wxDropSource: public wxObject
#endif
// wxUSE_DRAG_AND_DROP
// wxUSE_DRAG_AND_DROP
#endif
//_WX_DND_H_
//_WX_DND_H_

View File

@@ -19,15 +19,15 @@
#include "wx/dialog.h"
/*
* File selector
*/
* File selector
*/
WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr;
class WXDLLEXPORT wxFileDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxFileDialog)
DECLARE_DYNAMIC_CLASS(wxFileDialog)
public:
wxString m_message;
long m_dialogStyle;
@@ -62,7 +62,7 @@ public:
inline wxString GetDirectory() const { return m_dir; }
inline wxString GetFilename() const { return m_fileName; }
inline void GetFilenames(wxArrayString& a) { a.Empty();
a.Add( m_fileName); }
a.Add( m_fileName); }
inline wxString GetWildcard() const { return m_wildCard; }
inline long GetStyle() const { return m_dialogStyle; }
inline int GetFilterIndex() const { return m_filterIndex ; }
@@ -78,15 +78,15 @@ public:
// File selector - backward compatibility
WXDLLEXPORT wxString wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
const char *default_filename = NULL, const char *default_extension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
wxWindow *parent = NULL, int x = -1, int y = -1);
const char *default_filename = NULL, const char *default_extension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
wxWindow *parent = NULL, int x = -1, int y = -1);
// An extended version of wxFileSelector
WXDLLEXPORT wxString wxFileSelectorEx(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
const char *default_filename = NULL, int *indexDefaultExtension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
wxWindow *parent = NULL, int x = -1, int y = -1);
const char *default_filename = NULL, int *indexDefaultExtension = NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
wxWindow *parent = NULL, int x = -1, int y = -1);
// Generic file load dialog
WXDLLEXPORT wxString wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
@@ -95,4 +95,4 @@ WXDLLEXPORT wxString wxLoadFileSelector(const char *what, const char *extension,
WXDLLEXPORT wxString wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
#endif
// _WX_FILEDLG_H_
// _WX_FILEDLG_H_

View File

@@ -13,7 +13,7 @@
#define _WX_FONT_H_
#ifdef __GNUG__
#pragma interface "font.h"
#pragma interface "font.h"
#endif
class wxXFont;
@@ -27,12 +27,12 @@ public:
wxFont(const wxFont& font) { Init(); Ref(font); }
wxFont(int size,
int family,
int style,
int weight,
bool underlined = FALSE,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
int family,
int style,
int weight,
bool underlined = FALSE,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
Init();
@@ -42,16 +42,16 @@ public:
wxFont(const wxNativeFontInfo& info);
bool Create(int size,
int family,
int style,
int weight,
bool underlined = FALSE,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
int family,
int style,
int weight,
bool underlined = FALSE,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
// wxMOTIF-specific
bool Create(const wxString& fontname,
wxFontEncoding fontenc = wxFONTENCODING_DEFAULT);
wxFontEncoding fontenc = wxFONTENCODING_DEFAULT);
bool Create(const wxNativeFontInfo& fontinfo);
virtual ~wxFont();
@@ -93,13 +93,13 @@ public:
// Return font struct, and optionally the Motif font list
wxXFont *GetInternalFont(double scale = 1.0,
WXDisplay* display = NULL) const;
WXDisplay* display = NULL) const;
// These two are helper functions for convenient access of the above.
WXFontStructPtr GetFontStruct(double scale = 1.0,
WXDisplay* display = NULL) const;
WXDisplay* display = NULL) const;
WXFontList GetFontList(double scale = 1.0,
WXDisplay* display = NULL) const;
WXDisplay* display = NULL) const;
protected:
// common part of all ctors
@@ -114,4 +114,4 @@ private:
};
#endif
// _WX_FONT_H_
// _WX_FONT_H_

View File

@@ -21,12 +21,12 @@
#include "wx/cmndata.h"
/*
* Font dialog
*/
* Font dialog
*/
class WXDLLEXPORT wxFontDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxFontDialog)
DECLARE_DYNAMIC_CLASS(wxFontDialog)
public:
wxFontDialog();
wxFontDialog(wxWindow *parent, wxFontData *data = NULL);
@@ -42,5 +42,5 @@ protected:
};
#endif
// _WX_FONTDLG_H_
// _WX_FONTDLG_H_

View File

@@ -13,7 +13,7 @@
#define _WX_MOTIF_FRAME_H_
#ifdef __GNUG__
#pragma interface "frame.h"
#pragma interface "frame.h"
#endif
class WXDLLEXPORT wxFrame : public wxFrameBase
@@ -21,12 +21,12 @@ class WXDLLEXPORT wxFrame : public wxFrameBase
public:
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)
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Init();
@@ -34,12 +34,12 @@ public:
}
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);
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
virtual ~wxFrame();
@@ -121,14 +121,14 @@ protected:
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxFrame)
DECLARE_DYNAMIC_CLASS(wxFrame)
};
#endif
// _WX_MOTIF_FRAME_H_
// _WX_MOTIF_FRAME_H_

View File

@@ -29,23 +29,23 @@ public:
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
inline 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)
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr)
{
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);
int range,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxGaugeNameStr);
void SetShadowWidth(int w);
void SetBezelFace(int w);
@@ -70,4 +70,4 @@ protected:
};
#endif
// _WX_GAUGE_H_
// _WX_GAUGE_H_

View File

@@ -21,28 +21,28 @@
class WXDLLEXPORT wxGDIRefData: public wxObjectRefData {
public:
inline wxGDIRefData()
{
}
{
}
};
#define M_GDIDATA ((wxGDIRefData *)m_refData)
class WXDLLEXPORT wxGDIObject: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public:
inline wxGDIObject() { m_visible = FALSE; };
inline ~wxGDIObject() {};
DECLARE_DYNAMIC_CLASS(wxGDIObject)
public:
inline wxGDIObject() { m_visible = FALSE; };
inline ~wxGDIObject() {};
inline bool IsNull() const { return (m_refData == 0); }
inline bool IsNull() const { return (m_refData == 0); }
virtual bool GetVisible() { return m_visible; }
virtual void SetVisible(bool v) { m_visible = v; }
virtual bool GetVisible() { return m_visible; }
virtual void SetVisible(bool v) { m_visible = v; }
protected:
bool m_visible; // Can a pointer to this object be safely taken?
// - only if created within FindOrCreate...
bool m_visible; // Can a pointer to this object be safely taken?
// - only if created within FindOrCreate...
};
#endif
// _WX_GDIOBJ_H_
// _WX_GDIOBJ_H_

View File

@@ -29,22 +29,22 @@
enum
{
WX_GL_RGBA=1, /* use true color palette */
WX_GL_BUFFER_SIZE, /* bits for buffer if not WX_GL_RGBA */
WX_GL_LEVEL, /* 0 for main buffer, >0 for overlay, <0 for underlay */
WX_GL_DOUBLEBUFFER, /* use doublebuffer */
WX_GL_STEREO, /* use stereoscopic display */
WX_GL_AUX_BUFFERS, /* number of auxiliary buffers */
WX_GL_MIN_RED, /* use red buffer with most bits (> MIN_RED bits) */
WX_GL_MIN_GREEN, /* use green buffer with most bits (> MIN_GREEN bits) */
WX_GL_MIN_BLUE, /* use blue buffer with most bits (> MIN_BLUE bits) */
WX_GL_MIN_ALPHA, /* use blue buffer with most bits (> MIN_ALPHA bits) */
WX_GL_DEPTH_SIZE, /* bits for Z-buffer (0,16,32) */
WX_GL_STENCIL_SIZE, /* bits for stencil buffer */
WX_GL_MIN_ACCUM_RED, /* use red accum buffer with most bits (> MIN_ACCUM_RED bits) */
WX_GL_MIN_ACCUM_GREEN, /* use green buffer with most bits (> MIN_ACCUM_GREEN bits) */
WX_GL_MIN_ACCUM_BLUE, /* use blue buffer with most bits (> MIN_ACCUM_BLUE bits) */
WX_GL_MIN_ACCUM_ALPHA /* use blue buffer with most bits (> MIN_ACCUM_ALPHA bits) */
WX_GL_RGBA=1, /* use true color palette */
WX_GL_BUFFER_SIZE, /* bits for buffer if not WX_GL_RGBA */
WX_GL_LEVEL, /* 0 for main buffer, >0 for overlay, <0 for underlay */
WX_GL_DOUBLEBUFFER, /* use doublebuffer */
WX_GL_STEREO, /* use stereoscopic display */
WX_GL_AUX_BUFFERS, /* number of auxiliary buffers */
WX_GL_MIN_RED, /* use red buffer with most bits (> MIN_RED bits) */
WX_GL_MIN_GREEN, /* use green buffer with most bits (> MIN_GREEN bits) */
WX_GL_MIN_BLUE, /* use blue buffer with most bits (> MIN_BLUE bits) */
WX_GL_MIN_ALPHA, /* use blue buffer with most bits (> MIN_ALPHA bits) */
WX_GL_DEPTH_SIZE, /* bits for Z-buffer (0,16,32) */
WX_GL_STENCIL_SIZE, /* bits for stencil buffer */
WX_GL_MIN_ACCUM_RED, /* use red accum buffer with most bits (> MIN_ACCUM_RED bits) */
WX_GL_MIN_ACCUM_GREEN, /* use green buffer with most bits (> MIN_ACCUM_GREEN bits) */
WX_GL_MIN_ACCUM_BLUE, /* use blue buffer with most bits (> MIN_ACCUM_BLUE bits) */
WX_GL_MIN_ACCUM_ALPHA /* use blue buffer with most bits (> MIN_ACCUM_ALPHA bits) */
};
//---------------------------------------------------------------------------
@@ -56,11 +56,11 @@ class WXDLLEXPORT wxGLContext: public wxObject
{
public:
wxGLContext( bool isRGB, wxWindow *win,
const wxPalette& palette = wxNullPalette );
const wxPalette& palette = wxNullPalette );
wxGLContext( bool WXUNUSED(isRGB), wxWindow *win,
const wxPalette& WXUNUSED(palette),
const wxGLContext *other /* for sharing display lists */
);
const wxPalette& WXUNUSED(palette),
const wxGLContext *other /* for sharing display lists */
);
~wxGLContext();
void SetCurrent();
@@ -77,11 +77,11 @@ public:
inline GLXContext GetContext() const { return m_glContext; }
public:
GLXContext m_glContext;
GLXContext m_glContext;
// GtkWidget *m_widget;
wxPalette m_palette;
wxWindow* m_window;
// GtkWidget *m_widget;
wxPalette m_palette;
wxWindow* m_window;
DECLARE_CLASS(wxGLContext)
};
@@ -90,27 +90,27 @@ public:
class WXDLLEXPORT wxGLCanvas: public wxScrolledWindow
{
public:
inline wxGLCanvas() {
m_glContext = (wxGLContext*) NULL;
m_sharedContext = (wxGLContext*) NULL;
// m_glWidget = (GtkWidget*) NULL;
m_vi = (void*) NULL;
// m_exposed = FALSE;
}
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
inline wxGLCanvas() {
m_glContext = (wxGLContext*) NULL;
m_sharedContext = (wxGLContext*) NULL;
// m_glWidget = (GtkWidget*) NULL;
m_vi = (void*) NULL;
// m_exposed = FALSE;
}
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@@ -118,44 +118,44 @@ public:
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
bool Create( wxWindow *parent,
const wxGLContext *shared = (wxGLContext*)NULL,
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
bool Create( wxWindow *parent,
const wxGLContext *shared = (wxGLContext*)NULL,
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
~wxGLCanvas();
~wxGLCanvas();
void SetCurrent();
void SetColour(const char *colour);
void SwapBuffers();
void SetCurrent();
void SetColour(const char *colour);
void SwapBuffers();
// void OnSize(wxSizeEvent& event);
// void OnSize(wxSizeEvent& event);
// void OnInternalIdle();
// void OnInternalIdle();
inline wxGLContext* GetContext() const { return m_glContext; }
inline wxGLContext* GetContext() const { return m_glContext; }
// implementation
// implementation
wxGLContext *m_glContext,
*m_sharedContext;
*m_sharedContext;
wxGLCanvas *m_sharedContextOf;
void *m_vi;
// GtkWidget *m_glWidget;
// bool m_exposed;
DECLARE_EVENT_TABLE()
DECLARE_CLASS(wxGLCanvas)
DECLARE_CLASS(wxGLCanvas)
};
#endif
// wxUSE_GLCANVAS
// wxUSE_GLCANVAS
#endif
// _WX_GLCANVAS_H_
// _WX_GLCANVAS_H_

View File

@@ -23,30 +23,30 @@
class WXDLLEXPORT wxXXXXHelpController: public wxHelpControllerBase
{
DECLARE_CLASS(wxXXXXHelpController)
DECLARE_CLASS(wxXXXXHelpController)
public:
wxXXXXHelpController();
~wxXXXXHelpController();
public:
wxXXXXHelpController();
~wxXXXXHelpController();
// Must call this to set the filename and server name
virtual bool Initialize(const wxString& file);
// Must call this to set the filename and server name
virtual bool Initialize(const wxString& file);
// If file is "", reloads file given in Initialize
virtual bool LoadFile(const wxString& file = "");
virtual bool DisplayContents();
virtual bool DisplaySection(int sectionNo);
virtual bool DisplayBlock(long blockNo);
virtual bool KeywordSearch(const wxString& k);
// If file is "", reloads file given in Initialize
virtual bool LoadFile(const wxString& file = "");
virtual bool DisplayContents();
virtual bool DisplaySection(int sectionNo);
virtual bool DisplayBlock(long blockNo);
virtual bool KeywordSearch(const wxString& k);
virtual bool Quit();
virtual void OnQuit();
virtual bool Quit();
virtual void OnQuit();
inline wxString GetHelpFile() const { return m_helpFile; }
inline wxString GetHelpFile() const { return m_helpFile; }
protected:
wxString m_helpFile;
wxString m_helpFile;
};
#endif
// _WX_HELPXXXX_H_
// _WX_HELPXXXX_H_

View File

@@ -18,52 +18,40 @@
#include "wx/bitmap.h"
/*
// Same as for wxBitmap
class WXDLLEXPORT wxIconRefData: public wxBitmapRefData
{
friend class WXDLLEXPORT wxBitmap;
friend class WXDLLEXPORT wxIcon;
public:
wxIconRefData();
~wxIconRefData();
};
*/
#define M_ICONDATA ((wxBitmapRefData *)m_refData)
#define M_ICONHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
// Icon
class WXDLLEXPORT wxIcon: public wxBitmap
{
DECLARE_DYNAMIC_CLASS(wxIcon)
DECLARE_DYNAMIC_CLASS(wxIcon)
public:
wxIcon();
wxIcon();
// Copy constructors
inline wxIcon(const wxIcon& icon) { Ref(icon); }
// Copy constructors
inline wxIcon(const wxIcon& icon) { Ref(icon); }
// Initialize with XBM data
wxIcon(const char bits[], int width, int height);
// Initialize with XBM data
wxIcon(const char bits[], int width, int height);
// Initialize with XPM data
wxIcon(const char **data);
wxIcon(char **data);
// Initialize with XPM data
wxIcon(const char **data);
wxIcon(char **data);
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
int desiredWidth = -1, int desiredHeight = -1);
~wxIcon();
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
int desiredWidth = -1, int desiredHeight = -1);
~wxIcon();
bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
int desiredWidth = -1, int desiredHeight = -1);
bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
int desiredWidth = -1, int desiredHeight = -1);
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) const { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) const { return m_refData != icon.m_refData; }
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) const { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) const { return m_refData != icon.m_refData; }
virtual bool Ok() const { return ((m_refData != NULL) && (M_ICONDATA->m_ok)); }
virtual bool Ok() const { return ((m_refData != NULL) && (M_ICONDATA->m_ok)); }
};
#endif
// _WX_ICON_H_
// _WX_ICON_H_

View File

@@ -20,74 +20,74 @@
class WXDLLEXPORT wxJoystick: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxJoystick)
public:
/*
* Public interface
*/
DECLARE_DYNAMIC_CLASS(wxJoystick)
public:
/*
* Public interface
*/
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
// Attributes
////////////////////////////////////////////////////////////////////////////
// Attributes
////////////////////////////////////////////////////////////////////////////
wxPoint GetPosition() const;
int GetZPosition() const;
int GetButtonState() const;
int GetPOVPosition() const;
int GetPOVCTSPosition() const;
int GetRudderPosition() const;
int GetUPosition() const;
int GetVPosition() const;
int GetMovementThreshold() const;
void SetMovementThreshold(int threshold) ;
wxPoint GetPosition() const;
int GetZPosition() const;
int GetButtonState() const;
int GetPOVPosition() const;
int GetPOVCTSPosition() const;
int GetRudderPosition() const;
int GetUPosition() const;
int GetVPosition() const;
int GetMovementThreshold() const;
void SetMovementThreshold(int threshold) ;
// Capabilities
////////////////////////////////////////////////////////////////////////////
// Capabilities
////////////////////////////////////////////////////////////////////////////
bool IsOk() const; // Checks that the joystick is functioning
int GetNumberJoysticks() const ;
int GetManufacturerId() const ;
int GetProductId() const ;
wxString GetProductName() const ;
int GetXMin() const;
int GetYMin() const;
int GetZMin() const;
int GetXMax() const;
int GetYMax() const;
int GetZMax() const;
int GetNumberButtons() const;
int GetNumberAxes() const;
int GetMaxButtons() const;
int GetMaxAxes() const;
int GetPollingMin() const;
int GetPollingMax() const;
int GetRudderMin() const;
int GetRudderMax() const;
int GetUMin() const;
int GetUMax() const;
int GetVMin() const;
int GetVMax() const;
bool IsOk() const; // Checks that the joystick is functioning
int GetNumberJoysticks() const ;
int GetManufacturerId() const ;
int GetProductId() const ;
wxString GetProductName() const ;
int GetXMin() const;
int GetYMin() const;
int GetZMin() const;
int GetXMax() const;
int GetYMax() const;
int GetZMax() const;
int GetNumberButtons() const;
int GetNumberAxes() const;
int GetMaxButtons() const;
int GetMaxAxes() const;
int GetPollingMin() const;
int GetPollingMax() const;
int GetRudderMin() const;
int GetRudderMax() const;
int GetUMin() const;
int GetUMax() const;
int GetVMin() const;
int GetVMax() const;
bool HasRudder() const;
bool HasZ() const;
bool HasU() const;
bool HasV() const;
bool HasPOV() const;
bool HasPOV4Dir() const;
bool HasPOVCTS() const;
bool HasRudder() const;
bool HasZ() const;
bool HasU() const;
bool HasV() const;
bool HasPOV() const;
bool HasPOV4Dir() const;
bool HasPOVCTS() const;
// Operations
////////////////////////////////////////////////////////////////////////////
// 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();
// 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();
protected:
int m_joystick;
int m_joystick;
};
#endif
// _WX_JOYSTICK_H_
// _WX_JOYSTICK_H_

View File

@@ -28,29 +28,29 @@ WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
// List box item
class WXDLLEXPORT wxListBox: public wxListBoxBase
{
DECLARE_DYNAMIC_CLASS(wxListBox)
DECLARE_DYNAMIC_CLASS(wxListBox)
public:
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):
m_clientDataList(wxKEY_INTEGER)
{
Create(parent, id, pos, size, n, choices, style, validator, name);
}
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):
m_clientDataList(wxKEY_INTEGER)
{
Create(parent, id, pos, size, n, 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);
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);
~wxListBox();
@@ -117,9 +117,9 @@ protected:
wxList m_clientDataList;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif
// _WX_LISTBOX_H_
// _WX_LISTBOX_H_

View File

@@ -35,103 +35,103 @@ class WXDLLEXPORT wxMDIChildFrame;
class WXDLLEXPORT wxMDIParentFrame: public wxFrame
{
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
friend class WXDLLEXPORT wxMDIChildFrame;
friend class WXDLLEXPORT wxMDIChildFrame;
public:
wxMDIParentFrame();
inline wxMDIParentFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, // Scrolling refers to client window
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
wxMDIParentFrame();
inline wxMDIParentFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, // Scrolling refers to client window
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
~wxMDIParentFrame();
~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);
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);
void OnSize(wxSizeEvent& event);
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
void OnMenuHighlight(wxMenuEvent& event);
void OnSize(wxSizeEvent& event);
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
void OnMenuHighlight(wxMenuEvent& event);
void SetMenuBar(wxMenuBar *menu_bar);
void SetMenuBar(wxMenuBar *menu_bar);
// Get the active MDI child window
wxMDIChildFrame *GetActiveChild() const ;
// Get the active MDI child window
wxMDIChildFrame *GetActiveChild() const ;
// Get the client window
wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; };
// 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() ;
// Create the client window class (don't Create the window,
// just return a new class)
virtual wxMDIClientWindow *OnCreateClient() ;
// MDI operations
virtual void Cascade();
virtual void Tile();
virtual void ArrangeIcons();
virtual void ActivateNext();
virtual void ActivatePrevious();
// MDI operations
virtual void Cascade();
virtual void Tile();
virtual void ArrangeIcons();
virtual void ActivateNext();
virtual void ActivatePrevious();
// Implementation
// Implementation
// Set the active child
inline void SetActiveChild(wxMDIChildFrame* child) { m_activeChild = child; }
// Set the active child
inline void SetActiveChild(wxMDIChildFrame* child) { m_activeChild = child; }
// Set the child's menubar into the parent frame
void SetChildMenuBar(wxMDIChildFrame* frame);
// Set the child's menubar into the parent frame
void SetChildMenuBar(wxMDIChildFrame* frame);
inline wxMenuBar* GetActiveMenuBar() const { return m_activeMenuBar; }
inline wxMenuBar* GetActiveMenuBar() const { return m_activeMenuBar; }
// Redirect events to active child first
virtual bool ProcessEvent(wxEvent& event);
// Redirect events to active child first
virtual bool ProcessEvent(wxEvent& event);
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
// Gets the size available for subwindows after menu size, toolbar size
// and status bar size have been subtracted. If you want to manage your own
// toolbar(s), don't call SetToolBar.
void DoGetClientSize(int *width, int *height) const;
// Gets the size available for subwindows after menu size, toolbar size
// and status bar size have been subtracted. If you want to manage your own
// toolbar(s), don't call SetToolBar.
void DoGetClientSize(int *width, int *height) const;
protected:
wxMDIClientWindow* m_clientWindow;
wxMDIChildFrame* m_activeChild;
wxMenuBar* m_activeMenuBar;
wxMDIClientWindow* m_clientWindow;
wxMDIChildFrame* m_activeChild;
wxMenuBar* m_activeMenuBar;
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
};
class WXDLLEXPORT wxMDIChildFrame: public wxFrame
{
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
public:
wxMDIChildFrame();
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)
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr)
{
Create(parent, id, title, pos, size, style, name);
}
@@ -139,12 +139,12 @@ public:
~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);
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
// Set menu bar
void SetMenuBar(wxMenuBar *menu_bar);
@@ -182,9 +182,9 @@ public:
WXWidget GetClientWidget() const { return m_mainWidget; };
/*
virtual void OnRaise();
virtual void OnLower();
*/
virtual void OnRaise();
virtual void OnLower();
*/
void SetMDIParentFrame(wxMDIParentFrame* parentFrame) { m_mdiParentFrame = parentFrame; }
wxMDIParentFrame* GetMDIParentFrame() const { return m_mdiParentFrame; }
@@ -193,8 +193,8 @@ protected:
wxMDIParentFrame* m_mdiParentFrame;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
void DoGetClientSize(int *width, int *height) const;
@@ -203,15 +203,15 @@ protected:
};
/* The client window is a child of the parent MDI frame, and itself
* contains the child MDI frames.
* However, you create the MDI children as children of the MDI parent:
* only in the implementation does the client window become the parent
* of the children. Phew! So the children are sort of 'adopted'...
*/
* contains the child MDI frames.
* However, you create the MDI children as children of the MDI parent:
* only in the implementation does the client window become the parent
* of the children. Phew! So the children are sort of 'adopted'...
*/
class WXDLLEXPORT wxMDIClientWindow: public wxNotebook
{
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
public:
wxMDIClientWindow() ;
@@ -233,8 +233,8 @@ public:
protected:
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
void DoGetClientSize(int *width, int *height) const;
@@ -247,4 +247,4 @@ private:
};
#endif
// _WX_MDI_H_
// _WX_MDI_H_

View File

@@ -13,7 +13,7 @@
#define _WX_MOTIF_MENU_H_
#ifdef __GNUG__
#pragma interface "menu.h"
#pragma interface "menu.h"
#endif
#include "wx/colour.h"
@@ -73,8 +73,8 @@ public:
void HidePopup();
WXWidget CreateMenu(wxMenuBar *menuBar, WXWidget parent, wxMenu *topMenu,
const wxString& title = wxEmptyString,
bool isPulldown = FALSE);
const wxString& title = wxEmptyString,
bool isPulldown = FALSE);
// For popups, need to destroy, then recreate menu for a different (or
// possibly same) window, since the parent may change.
@@ -135,7 +135,7 @@ public:
virtual wxMenu *Remove(size_t pos);
virtual int FindMenuItem(const wxString& menuString,
const wxString& itemString) const;
const wxString& itemString) const;
virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const;
virtual void EnableTop( size_t pos, bool flag );

View File

@@ -13,7 +13,7 @@
#define _WX_MOTIF_MENUITEM_H
#ifdef __GNUG__
#pragma interface "menuitem.h"
#pragma interface "menuitem.h"
#endif
#include "wx/bitmap.h"
@@ -29,21 +29,21 @@ class wxMenuItem : public wxMenuItemBase
public:
// ctor & dtor
wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
int id = wxID_SEPARATOR,
const wxString& text = wxEmptyString,
const wxString& help = wxEmptyString,
bool isCheckable = FALSE,
wxMenu *subMenu = (wxMenu *)NULL);
int id = wxID_SEPARATOR,
const wxString& text = wxEmptyString,
const wxString& help = wxEmptyString,
bool isCheckable = FALSE,
wxMenu *subMenu = (wxMenu *)NULL);
~wxMenuItem();
// accessors (some more are inherited from wxOwnerDrawn or are below)
virtual void SetText(const wxString& label);
virtual void Enable(bool enable = TRUE);
virtual void Check(bool check = TRUE);
// included SetBitmap and GetBitmap as copied from the GTK include file
// I'm not sure if this works but it silences the linker in the
// menu sample.
// JJ
// included SetBitmap and GetBitmap as copied from the GTK include file
// I'm not sure if this works but it silences the linker in the
// menu sample.
// JJ
virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }

View File

@@ -11,7 +11,6 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_METAFIILE_H_
#define _WX_METAFIILE_H_
@@ -22,74 +21,67 @@
#include "wx/setup.h"
/*
* Metafile and metafile device context classes - work in Windows 3.1 only
*
*/
* Metafile and metafile device context classes - work in Windows 3.1 only
*
*/
class WXDLLEXPORT wxDC;
class WXDLLEXPORT wxMetaFile: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxMetaFile)
public:
wxMetaFile(const wxString& file = "");
~wxMetaFile();
DECLARE_DYNAMIC_CLASS(wxMetaFile)
public:
wxMetaFile(const wxString& file = "");
~wxMetaFile();
// After this is called, the metafile cannot be used for anything
// since it is now owned by the clipboard.
virtual bool SetClipboard(int width = 0, int height = 0);
// After this is called, the metafile cannot be used for anything
// since it is now owned by the clipboard.
virtual bool SetClipboard(int width = 0, int height = 0);
virtual bool Play(wxDC *dc);
// TODO
inline bool Ok() { return FALSE; };
virtual bool Play(wxDC *dc);
// TODO
inline bool Ok() { return FALSE; };
/* TODO: Implementation
inline WXHANDLE GetHMETAFILE() { return m_metaFile; }
inline void SetHMETAFILE(WXHANDLE mf) { m_metaFile = mf; }
protected:
WXHANDLE m_metaFile;
*/
};
class WXDLLEXPORT wxMetaFileDC: public wxDC
{
DECLARE_DYNAMIC_CLASS(wxMetaFileDC)
DECLARE_DYNAMIC_CLASS(wxMetaFileDC)
public:
// Don't supply origin and extent
// Supply them to wxMakeMetaFilePlaceable instead.
wxMetaFileDC(const wxString& file = "");
public:
// Don't supply origin and extent
// Supply them to wxMakeMetaFilePlaceable instead.
wxMetaFileDC(const wxString& file = "");
// Supply origin and extent (recommended).
// Then don't need to supply them to wxMakeMetaFilePlaceable.
wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg);
// Supply origin and extent (recommended).
// Then don't need to supply them to wxMakeMetaFilePlaceable.
wxMetaFileDC(const wxString& file, int xext, int yext, int xorg, int yorg);
~wxMetaFileDC();
~wxMetaFileDC();
// Should be called at end of drawing
virtual wxMetaFile *Close();
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, float *x, float *y,
float *descent = NULL, float *externalLeading = NULL,
wxFont *theFont = NULL, bool use16bit = FALSE);
// Should be called at end of drawing
virtual wxMetaFile *Close();
virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, float *x, float *y,
float *descent = NULL, float *externalLeading = NULL,
wxFont *theFont = NULL, bool use16bit = FALSE);
// Implementation
inline wxMetaFile *GetMetaFile() { return m_metaFile; }
inline void SetMetaFile(wxMetaFile *mf) { m_metaFile = mf; }
inline int GetWindowsMappingMode() { return m_windowsMappingMode; }
inline void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; }
// Implementation
inline wxMetaFile *GetMetaFile() { return m_metaFile; }
inline void SetMetaFile(wxMetaFile *mf) { m_metaFile = mf; }
inline int GetWindowsMappingMode() { return m_windowsMappingMode; }
inline void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; }
protected:
int m_windowsMappingMode;
wxMetaFile *m_metaFile;
int m_windowsMappingMode;
wxMetaFile *m_metaFile;
};
/*
* Pass filename of existing non-placeable metafile, and bounding box.
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
*
*/
* Pass filename of existing non-placeable metafile, and bounding box.
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
*
*/
// No origin or extent
bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, float scale = 1.0);
@@ -98,4 +90,4 @@ bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, float scale =
bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = TRUE);
#endif
// _WX_METAFIILE_H_
// _WX_METAFIILE_H_

View File

@@ -22,25 +22,25 @@
class WXDLLEXPORT wxMiniFrame: public wxFrame {
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
public:
inline wxMiniFrame() {}
inline wxMiniFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ,
const wxString& name = wxFrameNameStr)
{
// Use wxFrame constructor in absence of more specific code.
Create(parent, id, title, pos, size, style, name);
}
inline wxMiniFrame() {}
inline wxMiniFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ,
const wxString& name = wxFrameNameStr)
{
// Use wxFrame constructor in absence of more specific code.
Create(parent, id, title, pos, size, style, name);
}
~wxMiniFrame() {}
~wxMiniFrame() {}
protected:
};
#endif
// _WX_MINIFRAM_H_
// _WX_MINIFRAM_H_

View File

@@ -32,15 +32,15 @@ class WXDLLEXPORT wxMessageDialog: public wxDialog
public:
wxMessageDialog(wxWindow *parent,
const wxString& message,
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
const wxString& message,
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
int ShowModal();
// implementation only from now on
// called by the Motif callback
// called by the Motif callback
void SetResult(long result) { m_result = result; }
protected:
@@ -52,4 +52,4 @@ protected:
};
#endif
// _WX_MSGBOXDLG_H_
// _WX_MSGBOXDLG_H_

View File

@@ -24,7 +24,7 @@ class WXDLLEXPORT wxPalette;
// Palette for one display
class wxXPalette : public wxObject
{
DECLARE_DYNAMIC_CLASS(wxXPalette)
DECLARE_DYNAMIC_CLASS(wxXPalette)
public:
wxXPalette();
@@ -51,31 +51,31 @@ protected:
class WXDLLEXPORT wxPalette: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxPalette)
DECLARE_DYNAMIC_CLASS(wxPalette)
public:
wxPalette();
wxPalette(const wxPalette& palette) { Ref(palette); }
wxPalette();
wxPalette(const wxPalette& palette) { Ref(palette); }
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
~wxPalette();
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
~wxPalette();
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
virtual bool Ok() const { return (m_refData != NULL) ; }
virtual bool Ok() const { return (m_refData != NULL) ; }
wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; }
bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
// Motif-specific
WXColormap GetXColormap(WXDisplay* display = NULL) const;
bool TransferBitmap(void *data, int depth, int size);
bool TransferBitmap8(unsigned char *data, unsigned long size, void *dest, unsigned int bpp);
unsigned long *GetXPixArray(WXDisplay* display, int *pix_array_n);
void PutXColormap(WXDisplay* display, WXColormap cmap, bool destroyable);
// Motif-specific
WXColormap GetXColormap(WXDisplay* display = NULL) const;
bool TransferBitmap(void *data, int depth, int size);
bool TransferBitmap8(unsigned char *data, unsigned long size, void *dest, unsigned int bpp);
unsigned long *GetXPixArray(WXDisplay* display, int *pix_array_n);
void PutXColormap(WXDisplay* display, WXColormap cmap, bool destroyable);
};
#endif
// _WX_PALETTE_H_
// _WX_PALETTE_H_

View File

@@ -33,14 +33,14 @@ public:
~wxPenRefData();
protected:
int m_width;
int m_style;
int m_join ;
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxMOTIFDash *m_dash ;
wxColour m_colour;
int m_width;
int m_style;
int m_join ;
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxMOTIFDash *m_dash ;
wxColour m_colour;
};
#define M_PENDATA ((wxPenRefData *)m_refData)
@@ -48,55 +48,55 @@ protected:
// Pen
class WXDLLEXPORT wxPen: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxPen)
DECLARE_DYNAMIC_CLASS(wxPen)
public:
wxPen();
wxPen(const wxColour& col, int width, int style);
wxPen(const wxBitmap& stipple, int width);
inline wxPen(const wxPen& pen) { Ref(pen); }
~wxPen();
wxPen();
wxPen(const wxColour& col, int width, int style);
wxPen(const wxBitmap& stipple, int width);
inline wxPen(const wxPen& pen) { Ref(pen); }
~wxPen();
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; }
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
virtual bool Ok() const { return (m_refData != NULL) ; }
virtual bool Ok() const { return (m_refData != NULL) ; }
// Override in order to recreate the pen
void SetColour(const wxColour& col) ;
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
// Override in order to recreate the pen
void SetColour(const wxColour& col) ;
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
void SetWidth(int width) ;
void SetStyle(int style) ;
void SetStipple(const wxBitmap& stipple) ;
void SetDashes(int nb_dashes, const wxDash *dash) ;
void SetJoin(int join) ;
void SetCap(int cap) ;
void SetWidth(int width) ;
void SetStyle(int style) ;
void SetStipple(const wxBitmap& stipple) ;
void SetDashes(int nb_dashes, const wxDash *dash) ;
void SetJoin(int join) ;
void SetCap(int cap) ;
inline wxColour& GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); };
inline int GetWidth() const { return (M_PENDATA ? M_PENDATA->m_width : 0); };
inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); };
inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
inline int GetDashes(wxDash **ptr) const
{
*ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
}
inline int GetDashCount() const { return (M_PENDATA->m_nbDash); }
inline wxDash* GetDash() const { return (wxDash*)M_PENDATA->m_dash; }
inline wxColour& GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); };
inline int GetWidth() const { return (M_PENDATA ? M_PENDATA->m_width : 0); };
inline int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); };
inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
inline int GetDashes(wxDash **ptr) const
{
*ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
}
inline int GetDashCount() const { return (M_PENDATA->m_nbDash); }
inline wxDash* GetDash() const { return (wxDash*)M_PENDATA->m_dash; }
inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };
inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };
// Implementation
// Implementation
// Useful helper: create the brush resource
bool RealizeResource();
// Useful helper: create the brush resource
bool RealizeResource();
// When setting properties, we must make sure we're not changing
// another object
void Unshare();
// When setting properties, we must make sure we're not changing
// another object
void Unshare();
};
#endif
// _WX_PEN_H_
// _WX_PEN_H_

View File

@@ -19,38 +19,38 @@
#include "wx/prntbase.h"
/*
* Represents the printer: manages printing a wxPrintout object
*/
* Represents the printer: manages printing a wxPrintout object
*/
class WXDLLEXPORT wxPrinter: public wxPrinterBase
{
DECLARE_DYNAMIC_CLASS(wxPrinter)
DECLARE_DYNAMIC_CLASS(wxPrinter)
public:
wxPrinter(wxPrintData *data = NULL);
~wxPrinter();
public:
wxPrinter(wxPrintData *data = NULL);
~wxPrinter();
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
virtual bool PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent);
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
virtual bool PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent);
};
/*
* wxPrintPreview
* Programmer creates an object of this class to preview a wxPrintout.
*/
* wxPrintPreview
* Programmer creates an object of this class to preview a wxPrintout.
*/
class WXDLLEXPORT wxPrintPreview: public wxPrintPreviewBase
{
DECLARE_CLASS(wxPrintPreview)
DECLARE_CLASS(wxPrintPreview)
public:
wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL);
~wxPrintPreview();
public:
wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL);
~wxPrintPreview();
virtual bool Print(bool interactive);
virtual void DetermineScaling();
virtual bool Print(bool interactive);
virtual void DetermineScaling();
};
#endif
// _WX_PRINT_H_
// _WX_PRINT_H_

View File

@@ -22,49 +22,49 @@
#include "wx/cmndata.h"
/*
* wxPrinterDialog
* The common dialog for printing.
*/
* wxPrinterDialog
* The common dialog for printing.
*/
class WXDLLEXPORT wxDC;
class WXDLLEXPORT wxPrintDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
public:
wxPrintDialog();
wxPrintDialog(wxWindow *parent, wxPrintData* data = NULL);
~wxPrintDialog();
public:
wxPrintDialog();
wxPrintDialog(wxWindow *parent, wxPrintData* data = NULL);
~wxPrintDialog();
bool Create(wxWindow *parent, wxPrintData* data = NULL);
virtual int ShowModal();
bool Create(wxWindow *parent, wxPrintData* data = NULL);
virtual int ShowModal();
inline wxPrintData& GetPrintData() { return m_printData; }
virtual wxDC *GetPrintDC();
inline wxPrintData& GetPrintData() { return m_printData; }
virtual wxDC *GetPrintDC();
private:
wxPrintData m_printData;
wxDC* m_printerDC;
wxWindow* m_dialogParent;
private:
wxPrintData m_printData;
wxDC* m_printerDC;
wxWindow* m_dialogParent;
};
class WXDLLEXPORT wxPageSetupDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
DECLARE_DYNAMIC_CLASS(wxPageSetupDialog)
private:
wxPageSetupData m_pageSetupData;
wxWindow* m_dialogParent;
public:
wxPageSetupDialog();
wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
~wxPageSetupDialog();
private:
wxPageSetupData m_pageSetupData;
wxWindow* m_dialogParent;
public:
wxPageSetupDialog();
wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
~wxPageSetupDialog();
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
virtual int ShowModal();
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
virtual int ShowModal();
inline wxPageSetupData& GetPageSetupData() { return m_pageSetupData; }
inline wxPageSetupData& GetPageSetupData() { return m_pageSetupData; }
};
#endif
// _WX_PRINTDLG_H_
// _WX_PRINTDLG_H_

View File

@@ -90,7 +90,7 @@ public:
wxXmString(const wxString& str)
{
m_string = XmStringCreateLtoR((char *)str.c_str(),
XmSTRING_DEFAULT_CHARSET);
XmSTRING_DEFAULT_CHARSET);
}
~wxXmString() { XmStringFree(m_string); }
@@ -117,4 +117,4 @@ private:
extern "C" XtAppContext wxGetAppContext();
#endif
// _WX_PRIVATE_H_
// _WX_PRIVATE_H_

View File

@@ -25,16 +25,16 @@ class WXDLLEXPORT wxBitmap ;
class WXDLLEXPORT wxRadioBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxRadioBox)
DECLARE_DYNAMIC_CLASS(wxRadioBox)
public:
wxRadioBox();
wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
{
Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
}
@@ -42,10 +42,10 @@ public:
~wxRadioBox();
bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
int FindString(const wxString& s) const;
void SetSelection(int N);
@@ -92,9 +92,9 @@ protected:
wxString* m_radioButtonLabels;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
};
#endif
// _WX_RADIOBOX_H_
// _WX_RADIOBOX_H_

View File

@@ -27,28 +27,28 @@ protected:
public:
wxRadioButton();
inline wxRadioButton(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 = wxRadioButtonNameStr)
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxRadioButtonNameStr)
{
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 = wxRadioButtonNameStr);
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxRadioButtonNameStr);
virtual void SetValue(bool val);
virtual bool GetValue() const ;
void Command(wxCommandEvent& event);
// Implementation
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
@@ -62,33 +62,33 @@ WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
{
DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
protected:
wxBitmap *theButtonBitmap;
public:
inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapRadioButtonNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
protected:
wxBitmap *theButtonBitmap;
public:
inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapRadioButtonNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapRadioButtonNameStr);
bool Create(wxWindow *parent, wxWindowID id,
const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapRadioButtonNameStr);
virtual void SetLabel(const wxBitmap *label);
virtual void SetValue(bool val) ;
virtual bool GetValue() const ;
virtual void SetLabel(const wxBitmap *label);
virtual void SetValue(bool val) ;
virtual bool GetValue() const ;
};
#endif
#endif
// _WX_RADIOBUT_H_
// _WX_RADIOBUT_H_

View File

@@ -28,91 +28,91 @@ WX_DECLARE_LIST(wxRect, wxRectList);
enum wxRegionContain {
wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2
wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2
};
// So far, for internal use only
enum wxRegionOp {
wxRGN_AND, // Creates the intersection of the two combined regions.
wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1.
wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2.
wxRGN_OR, // Creates the union of two combined regions.
wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas.
wxRGN_AND, // Creates the intersection of the two combined regions.
wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1.
wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2.
wxRGN_OR, // Creates the union of two combined regions.
wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas.
};
class WXDLLEXPORT wxRegion : public wxGDIObject {
DECLARE_DYNAMIC_CLASS(wxRegion)
friend class WXDLLEXPORT wxRegionIterator;
friend class WXDLLEXPORT wxRegionIterator;
public:
wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
wxRegion(const wxRect& rect);
wxRegion();
~wxRegion();
wxRegion();
~wxRegion();
//# Copying
inline wxRegion(const wxRegion& r)
{ Ref(r); }
inline wxRegion& operator = (const wxRegion& r)
{ Ref(r); return (*this); }
//# Copying
inline wxRegion(const wxRegion& r)
{ Ref(r); }
inline wxRegion& operator = (const wxRegion& r)
{ Ref(r); return (*this); }
//# Modify region
// Clear current region
void Clear();
//# Modify region
// Clear current region
void Clear();
// Union rectangle or region with this.
inline bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_OR); }
inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); }
inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); }
// Union rectangle or region with this.
inline bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_OR); }
inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); }
inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); }
// Intersect rectangle or region with this.
inline bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_AND); }
inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); }
inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); }
// Intersect rectangle or region with this.
inline bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_AND); }
inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); }
inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); }
// Subtract rectangle or region from this:
// Subtract rectangle or region from this:
// Combines the parts of 'this' that are not part of the second region.
inline bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_DIFF); }
inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); }
inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); }
inline bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_DIFF); }
inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); }
inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); }
// XOR: the union of two combined regions except for any overlapping areas.
inline bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_XOR); }
inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); }
inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); }
// XOR: the union of two combined regions except for any overlapping areas.
inline bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_XOR); }
inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); }
inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); }
//# Information on region
// Outer bounds of region
void GetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const;
wxRect GetBox() const ;
//# Information on region
// Outer bounds of region
void GetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const;
wxRect GetBox() const ;
// Is region empty?
bool Empty() const;
inline bool IsEmpty() const { return Empty(); }
bool Ok() const { return (m_refData != NULL) ; }
// Is region empty?
bool Empty() const;
inline bool IsEmpty() const { return Empty(); }
bool Ok() const { return (m_refData != NULL) ; }
//# Tests
// Does the region contain the point (x,y)?
wxRegionContain Contains(wxCoord x, wxCoord y) const;
// Does the region contain the point pt?
wxRegionContain Contains(const wxPoint& pt) const;
// Does the region contain the rectangle (x, y, w, h)?
wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h) const;
// Does the region contain the rectangle rect?
wxRegionContain Contains(const wxRect& rect) const;
//# Tests
// Does the region contain the point (x,y)?
wxRegionContain Contains(wxCoord x, wxCoord y) const;
// Does the region contain the point pt?
wxRegionContain Contains(const wxPoint& pt) const;
// Does the region contain the rectangle (x, y, w, h)?
wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h) const;
// Does the region contain the rectangle rect?
wxRegionContain Contains(const wxRect& rect) const;
// Internal
bool Combine(wxCoord x, wxCoord y, wxCoord width, wxCoord height, wxRegionOp op);
bool Combine(const wxRegion& region, wxRegionOp op);
bool Combine(const wxRect& rect, wxRegionOp op);
// Internal
bool Combine(wxCoord x, wxCoord y, wxCoord width, wxCoord height, wxRegionOp op);
bool Combine(const wxRegion& region, wxRegionOp op);
bool Combine(const wxRect& rect, wxRegionOp op);
// Get the internal Region handle
WXRegion GetXRegion() const;
// 'Naughty' functions that allow wxWindows to use a list of rects
// instead of the region, in certain circumstances (e.g. when
// making a region out of the update rectangles).
// These are used by wxPaintDC::wxPaintDC and wxRegionIterator::Reset.
// 'Naughty' functions that allow wxWindows to use a list of rects
// instead of the region, in certain circumstances (e.g. when
// making a region out of the update rectangles).
// These are used by wxPaintDC::wxPaintDC and wxRegionIterator::Reset.
bool UsingRects() const;
wxRect* GetRects();
int GetRectCount() const;
@@ -123,33 +123,33 @@ public:
class WXDLLEXPORT wxRegionIterator : public wxObject {
DECLARE_DYNAMIC_CLASS(wxRegionIterator)
public:
wxRegionIterator();
wxRegionIterator(const wxRegion& region);
~wxRegionIterator();
wxRegionIterator();
wxRegionIterator(const wxRegion& region);
~wxRegionIterator();
void Reset() { m_current = 0; }
void Reset(const wxRegion& region);
void Reset() { m_current = 0; }
void Reset(const wxRegion& region);
operator bool () const { return m_current < m_numRects; }
bool HaveRects() const { return m_current < m_numRects; }
operator bool () const { return m_current < m_numRects; }
bool HaveRects() const { return m_current < m_numRects; }
void operator ++ ();
void operator ++ (int);
void operator ++ ();
void operator ++ (int);
wxCoord GetX() const;
wxCoord GetY() const;
wxCoord GetW() const;
wxCoord GetWidth() const { return GetW(); }
wxCoord GetH() const;
wxCoord GetHeight() const { return GetH(); }
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
wxCoord GetX() const;
wxCoord GetY() const;
wxCoord GetW() const;
wxCoord GetWidth() const { return GetW(); }
wxCoord GetH() const;
wxCoord GetHeight() const { return GetH(); }
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
private:
size_t m_current;
size_t m_numRects;
wxRegion m_region;
wxRect* m_rects;
size_t m_current;
size_t m_numRects;
wxRegion m_region;
wxRect* m_rects;
};
#endif
// _WX_REGION_H_
// _WX_REGION_H_

View File

@@ -23,51 +23,49 @@ WXDLLEXPORT_DATA(extern const char*) wxScrollBarNameStr;
// Scrollbar item
class WXDLLEXPORT wxScrollBar: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxScrollBar)
DECLARE_DYNAMIC_CLASS(wxScrollBar)
public:
inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
~wxScrollBar();
inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
~wxScrollBar();
inline wxScrollBar(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxScrollBarNameStr)
{
Create(parent, id, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxScrollBarNameStr);
inline wxScrollBar(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxScrollBarNameStr)
{
Create(parent, id, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxScrollBarNameStr);
int GetThumbPosition() const ;
inline int GetThumbSize() const { return m_pageSize; }
inline int GetPageSize() const { return m_viewSize; }
inline int GetRange() const { return m_objectSize; }
int GetThumbPosition() const ;
inline int GetThumbSize() const { return m_pageSize; }
inline int GetPageSize() const { return m_viewSize; }
inline int GetRange() const { return m_objectSize; }
virtual void SetThumbPosition(int viewStart);
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
bool refresh = TRUE);
virtual void SetThumbPosition(int viewStart);
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
bool refresh = TRUE);
void Command(wxCommandEvent& event);
void Command(wxCommandEvent& event);
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
// Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour();
protected:
int m_pageSize;
int m_viewSize;
int m_objectSize;
// DECLARE_EVENT_TABLE()
};
#endif
// _WX_SCROLBAR_H_
// _WX_SCROLBAR_H_

View File

@@ -23,18 +23,18 @@ WXDLLEXPORT_DATA(extern const char*) wxSliderNameStr;
// Slider
class WXDLLEXPORT wxSlider: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxSlider)
DECLARE_DYNAMIC_CLASS(wxSlider)
public:
wxSlider();
wxSlider(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr)
{
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
}
@@ -42,12 +42,12 @@ public:
~wxSlider();
bool Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
int value, int minValue, int maxValue,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxSliderNameStr);
virtual int GetValue() const ;
virtual void SetValue(int);
@@ -90,12 +90,12 @@ protected:
int m_tickFreq;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
private:
DECLARE_EVENT_TABLE()
};
#endif
// _WX_SLIDER_H_
// _WX_SLIDER_H_

View File

@@ -13,7 +13,7 @@
#define _WX_SPINBUTT_H_
#ifdef __GNUG__
#pragma interface "spinbutt.h"
#pragma interface "spinbutt.h"
#endif
class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase
@@ -24,23 +24,22 @@ public:
wxSpinButton() { }
wxSpinButton(wxWindow *parent,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_VERTICAL,
const wxString& name = "wxSpinButton")
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_VERTICAL,
const wxString& name = "wxSpinButton")
{
Create(parent, id, pos, size, style, name);
}
~wxSpinButton();
bool Create(wxWindow *parent,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_VERTICAL,
const wxString& name = "wxSpinButton");
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_VERTICAL,
const wxString& name = "wxSpinButton");
// accessors
int GetValue() const;
@@ -63,4 +62,4 @@ protected:
};
#endif
// _WX_SPINBUTT_H_
// _WX_SPINBUTT_H_

View File

@@ -23,28 +23,28 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
class WXDLLEXPORT wxStaticBitmap : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
public:
wxStaticBitmap() { }
~wxStaticBitmap();
wxStaticBitmap(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr)
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr)
{
Create(parent, id, label, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr);
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBitmapNameStr);
virtual void SetBitmap(const wxBitmap& bitmap);
@@ -81,4 +81,4 @@ protected:
};
#endif
// _WX_STATBMP_H_
// _WX_STATBMP_H_

View File

@@ -23,27 +23,27 @@ WXDLLEXPORT_DATA(extern const char*) wxStaticBoxNameStr;
// Group box
class WXDLLEXPORT wxStaticBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxStaticBox)
DECLARE_DYNAMIC_CLASS(wxStaticBox)
public:
wxStaticBox();
wxStaticBox(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr)
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr)
{
Create(parent, id, label, pos, size, style, name);
}
~wxStaticBox();
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticBoxNameStr);
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
{
@@ -66,12 +66,12 @@ protected:
WXWidget m_labelWidget;
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
private:
DECLARE_EVENT_TABLE()
};
#endif
// _WX_STATBOX_H_
// _WX_STATBOX_H_

View File

@@ -28,21 +28,21 @@ public:
wxStaticText() { }
wxStaticText(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticTextNameStr)
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticTextNameStr)
{
Create(parent, id, label, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticTextNameStr);
const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxStaticTextNameStr);
// implementation
// --------------
@@ -59,4 +59,4 @@ public:
};
#endif
// _WX_STATTEXT_H_
// _WX_STATTEXT_H_

View File

@@ -19,8 +19,8 @@
class wxImageList;
/*
* Flags returned by HitTest
*/
* Flags returned by HitTest
*/
#define wxTAB_HITTEST_NOWHERE 1
#define wxTAB_HITTEST_ONICON 2
@@ -29,22 +29,22 @@ class wxImageList;
class WXDLLEXPORT wxTabCtrl: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxTabCtrl)
public:
/*
* Public interface
DECLARE_DYNAMIC_CLASS(wxTabCtrl)
public:
/*
* Public interface
*/
wxTabCtrl();
inline wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "tabCtrl")
long style = 0, const wxString& name = "tabCtrl")
{
Create(parent, id, pos, size, style, name);
}
~wxTabCtrl();
// Accessors
// Accessors
// Get the selection
int GetSelection() const;
@@ -94,10 +94,10 @@ class WXDLLEXPORT wxTabCtrl: public wxControl
// Set the padding between tabs
void SetPadding(const wxSize& padding);
// Operations
// Operations
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "tabCtrl");
long style = 0, const wxString& name = "tabCtrl");
// Delete all items
bool DeleteAllItems();
@@ -116,23 +116,23 @@ class WXDLLEXPORT wxTabCtrl: public wxControl
protected:
wxImageList* m_imageList;
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
};
class WXDLLEXPORT wxTabEvent: public wxCommandEvent
{
DECLARE_DYNAMIC_CLASS(wxTabEvent)
DECLARE_DYNAMIC_CLASS(wxTabEvent)
public:
wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
public:
wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
};
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
#define EVT_TAB_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGED, \
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ),
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ),
#define EVT_TAB_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGING, \
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ),
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL ),
#endif
// _WX_TABCTRL_H_
// _WX_TABCTRL_H_

View File

@@ -23,16 +23,16 @@
class wxTaskBarIcon: public wxObject
{
public:
wxTaskBarIcon();
virtual ~wxTaskBarIcon();
wxTaskBarIcon();
virtual ~wxTaskBarIcon();
// Accessors
// Accessors
// Operations
// Operations
bool SetIcon(const wxIcon& icon, const wxString& tooltip = "");
bool RemoveIcon();
// Overridables
// Overridables
virtual void OnMouseMove();
virtual void OnLButtonDown();
virtual void OnLButtonUp();
@@ -41,9 +41,9 @@ public:
virtual void OnLButtonDClick();
virtual void OnRButtonDClick();
// Data members
// Data members
protected:
};
#endif
// _WX_TASKBAR_H_
// _WX_TASKBAR_H_

View File

@@ -13,7 +13,7 @@
#define _WX_TEXTCTRL_H_
#ifdef __GNUG__
#pragma interface "textctrl.h"
#pragma interface "textctrl.h"
#endif
WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr;
@@ -29,23 +29,23 @@ public:
// --------
wxTextCtrl();
wxTextCtrl(wxWindow *parent,
wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
{
Create(parent, id, value, pos, size, style, validator, name);
}
wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
{
Create(parent, id, value, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
// accessors
// ---------
@@ -129,7 +129,7 @@ public:
// send the CHAR and TEXT_UPDATED events
void DoSendEvents(void /* XmTextVerifyCallbackStruct */ *cbs,
long keycode);
long keycode);
protected:
wxString m_fileName;
@@ -148,4 +148,4 @@ private:
};
#endif
// _WX_TEXTCTRL_H_
// _WX_TEXTCTRL_H_

View File

@@ -13,17 +13,17 @@
#define _WX_TIMER_H_
#ifdef __GNUG__
#pragma interface "timer.h"
#pragma interface "timer.h"
#endif
class WXDLLEXPORT wxTimer : public wxTimerBase
{
friend void wxTimerCallback(wxTimer * timer);
friend void wxTimerCallback(wxTimer * timer);
public:
wxTimer() { Init(); }
wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id)
{ Init(); }
{ Init(); }
~wxTimer();
virtual bool Start(int milliseconds = -1, bool oneShot = FALSE);
@@ -41,4 +41,4 @@ private:
};
#endif
// _WX_TIMER_H_
// _WX_TIMER_H_

View File

@@ -13,7 +13,7 @@
#define _WX_TOOLBAR_H_
#ifdef __GNUG__
#pragma interface "toolbar.h"
#pragma interface "toolbar.h"
#endif
class WXDLLEXPORT wxToolBar : public wxToolBarBase
@@ -23,11 +23,11 @@ public:
wxToolBar() { Init(); }
wxToolBar(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr)
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr)
{
Init();
@@ -35,11 +35,11 @@ public:
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr);
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr);
virtual ~wxToolBar();
@@ -66,12 +66,12 @@ protected:
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
virtual wxToolBarToolBase *CreateTool(int id,
const wxBitmap& bitmap1,
const wxBitmap& bitmap2,
bool toggle,
wxObject *clientData,
const wxString& shortHelpString,
const wxString& longHelpString);
const wxBitmap& bitmap1,
const wxBitmap& bitmap2,
bool toggle,
wxObject *clientData,
const wxString& shortHelpString,
const wxString& longHelpString);
virtual wxToolBarToolBase *CreateTool(wxControl *control);
private:
@@ -79,4 +79,4 @@ private:
};
#endif
// _WX_TOOLBAR_H_
// _WX_TOOLBAR_H_

View File

@@ -22,23 +22,23 @@
class wxWave : public wxObject
{
public:
wxWave();
wxWave(const wxString& fileName, bool isResource = FALSE);
~wxWave();
wxWave();
wxWave(const wxString& fileName, bool isResource = FALSE);
~wxWave();
public:
bool Create(const wxString& fileName, bool isResource = FALSE);
bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
bool Play(bool async = TRUE, bool looped = FALSE) const;
bool Create(const wxString& fileName, bool isResource = FALSE);
bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
bool Play(bool async = TRUE, bool looped = FALSE) const;
protected:
bool Free();
bool Free();
private:
char* m_waveData;
int m_waveLength;
bool m_isResource;
char* m_waveData;
int m_waveLength;
bool m_isResource;
};
#endif
// _WX_WAVE_H_
// _WX_WAVE_H_

View File

@@ -13,7 +13,7 @@
#define _WX_WINDOW_H_
#ifdef __GNUG__
#pragma interface "window.h"
#pragma interface "window.h"
#endif
#include "wx/region.h"
@@ -24,18 +24,18 @@
class wxWindow : public wxWindowBase
{
friend class WXDLLEXPORT wxDC;
friend class WXDLLEXPORT wxWindowDC;
friend class WXDLLEXPORT wxDC;
friend class WXDLLEXPORT wxWindowDC;
public:
wxWindow() { Init(); }
wxWindow(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
{
Init();
Create(parent, id, pos, size, style, name);
@@ -44,11 +44,11 @@ public:
virtual ~wxWindow();
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
// implement base class pure virtuals
virtual void SetTitle( const wxString& title);
@@ -65,7 +65,7 @@ public:
virtual void WarpPointer(int x, int y);
virtual void Refresh( bool eraseBackground = TRUE,
const wxRect *rect = (const wxRect *) NULL );
const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
virtual bool SetBackgroundColour( const wxColour &colour );
@@ -77,24 +77,24 @@ public:
virtual int GetCharHeight() const;
virtual int GetCharWidth() const;
virtual void GetTextExtent(const wxString& string,
int *x, int *y,
int *descent = (int *) NULL,
int *externalLeading = (int *) NULL,
const wxFont *theFont = (const wxFont *) NULL)
const;
int *x, int *y,
int *descent = (int *) NULL,
int *externalLeading = (int *) NULL,
const wxFont *theFont = (const wxFont *) NULL)
const;
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
int range, bool refresh = TRUE );
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
virtual void ScrollWindow( int dx, int dy,
const wxRect* rect = (wxRect *) NULL );
const wxRect* rect = (wxRect *) NULL );
virtual void SetSizeHints(int minW, int minH,
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1);
int maxW = -1, int maxH = -1,
int incW = -1, int incH = -1);
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget );
#endif // wxUSE_DRAG_AND_DROP
@@ -134,7 +134,7 @@ public:
void SetButton3(bool pressed) { m_button3Pressed = pressed; }
void SetLastClick(int button, long timestamp)
{ m_lastButton = button; m_lastTS = timestamp; }
{ m_lastButton = button; m_lastTS = timestamp; }
int GetLastClickedButton() const { return m_lastButton; }
long GetLastClickTime() const { return m_lastTS; }
@@ -155,7 +155,7 @@ public:
// Adds a recangle to the updates list
void AddUpdateRect(int x, int y, int w, int h)
{ m_updateRects.Append(new wxRect(x, y, w, h)); }
{ m_updateRects.Append(new wxRect(x, y, w, h)); }
// Empties the m_updateRects list
void ClearUpdateRects();
@@ -180,14 +180,14 @@ protected:
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
wxWindow *GetChild(int number) const
{ return GetChildren().Item(number)->GetData(); }
{ return GetChildren().Item(number)->GetData(); }
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);
// Motif-specific
// CanvasXXXSiize functions
// CanvasXXXSiize functions
void CanvasGetSize(int* width, int* height) const; // If have drawing area
void CanvasGetClientSize(int *width, int *height) const;
void CanvasGetPosition(int *x, int *y) const; // If have drawing area
@@ -219,7 +219,7 @@ public:
protected:
// Adds the widget to the hash table and adds event handlers.
bool AttachWidget(wxWindow* parent, WXWidget mainWidget,
WXWidget formWidget, int x, int y, int width, int height);
WXWidget formWidget, int x, int y, int width, int height);
bool DetachWidget(WXWidget widget);
// How to implement accelerators. If we find a key event, translate to
@@ -254,7 +254,7 @@ protected:
// get either hor or vert scrollbar widget
WXWidget GetScrollbar(wxOrientation orient) const
{ return orient == wxHORIZONTAL ? m_hScrollBar : m_vScrollBar; }
{ return orient == wxHORIZONTAL ? m_hScrollBar : m_vScrollBar; }
// set the scroll pos
void SetInternalScrollPos(wxOrientation orient, int pos)
@@ -309,8 +309,8 @@ 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);
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual bool DoPopupMenu(wxMenu *menu, int x, int y);
@@ -345,14 +345,14 @@ private:
class WXDLLEXPORT wxNoOptimize
{
public:
wxNoOptimize() { ms_count++; }
~wxNoOptimize() { ms_count--; }
wxNoOptimize() { ms_count++; }
~wxNoOptimize() { ms_count--; }
static bool CanOptimize() { return ms_count == 0; }
static bool CanOptimize() { return ms_count == 0; }
protected:
static int ms_count;
static int ms_count;
};
#endif
// _WX_WINDOW_H_
// _WX_WINDOW_H_

View File

@@ -12,6 +12,8 @@
#include "wx/motif/palette.h"
#elif defined(__WXGTK__)
#include "wx/generic/paletteg.h"
#elif defined(__WXX11__)
#include "wx/x11/palette.h"
#elif defined(__WXMGL__)
#include "wx/mgl/palette.h"
#elif defined(__WXMAC__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/pen.h"
#elif defined(__WXGTK__)
#include "wx/gtk/pen.h"
#elif defined(__WXX11__)
#include "wx/x11/pen.h"
#elif defined(__WXMGL__)
#include "wx/mgl/pen.h"
#elif defined(__WXMAC__)

View File

@@ -55,6 +55,8 @@ public:
#include "wx/os2/popupwin.h"
#elif __WXGTK__
#include "wx/gtk/popupwin.h"
#ifdef __WXX11__
#include "wx/x11/popupwin.h"
#elif __WXMGL__
#include "wx/mgl/popupwin.h"
#else

View File

@@ -7,6 +7,8 @@
#include "wx/generic/prntdlgg.h"
#elif defined(__WXGTK__)
#include "wx/generic/prntdlgg.h"
#elif defined(__WXX11__)
#include "wx/generic/prntdlgg.h"
#elif defined(__WXMAC__)
#include "wx/mac/printdlg.h"
#elif defined(__WXPM__)

View File

@@ -7,6 +7,8 @@
#include "wx/motif/region.h"
#elif defined(__WXGTK__)
#include "wx/gtk/region.h"
#elif defined(__WXX11__)
#include "wx/x11/region.h"
#elif defined(__WXMGL__)
#include "wx/mgl/region.h"
#elif defined(__WXMAC__)

View File

@@ -107,6 +107,8 @@ protected:
#include "wx/motif/timer.h"
#elif defined(__WXGTK__)
#include "wx/gtk/timer.h"
#elif defined(__WXX11__)
#include "wx/x11/timer.h"
#elif defined(__WXMGL__)
#include "wx/mgl/timer.h"
#elif defined(__WXMAC__)

View File

@@ -43,6 +43,8 @@
#include "wx/motif/toolbar.h"
#elif defined(__WXGTK__)
#include "wx/gtk/tbargtk.h"
#elif defined(__WXX11__)
#include "wx/x11/toolbar.h"
#elif defined(__WXMAC__)
#include "wx/mac/toolbar.h"
#elif defined(__WXPM__)

View File

@@ -158,6 +158,9 @@ protected:
#elif defined(__WXGTK__)
#include "wx/gtk/toplevel.h"
#define wxTopLevelWindowNative wxTopLevelWindowGTK
#elif defined(__WXX11__)
#include "wx/x11/toplevel.h"
#define wxTopLevelWindowNative wxTopLevelWindowX11
#elif defined(__WXMGL__)
#include "wx/mgl/toplevel.h"
#define wxTopLevelWindowNative wxTopLevelWindowMGL

View File

@@ -977,6 +977,14 @@ private:
#define sm_classwxWindowGTK sm_classwxWindow
#endif // wxUniv
#include "wx/gtk/window.h"
#elif defined(__WXX11__)
#ifdef __WXUNIVERSAL__
#define wxWindowNative wxWindowX11
#else // !wxUniv
#define wxWindowX11 wxWindow
#define sm_classwxWindowX11 sm_classwxWindow
#endif // wxUniv
#include "wx/x11/window.h"
#elif defined(__WXMGL__)
#ifdef __WXUNIVERSAL__
#define wxWindowNative wxWindowMGL

51
include/wx/x11/accel.h Normal file
View File

@@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////////////////////
// Name: accel.h
// Purpose: wxAcceleratorTable class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ACCEL_H_
#define _WX_ACCEL_H_
#ifdef __GNUG__
#pragma interface "accel.h"
#endif
#include "wx/object.h"
#include "wx/string.h"
#include "wx/event.h"
class WXDLLEXPORT wxAcceleratorTable: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
public:
wxAcceleratorTable();
wxAcceleratorTable(const wxString& resource); // Load from .rc resource
wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); // Load from array
// Copy constructors
wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); }
wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); }
~wxAcceleratorTable();
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; }
bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; }
bool Ok() const;
// Implementation only
int GetCount() const;
wxAcceleratorEntry* GetEntries() const;
};
WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable;
#endif
// _WX_ACCEL_H_

131
include/wx/x11/app.h Normal file
View File

@@ -0,0 +1,131 @@
/////////////////////////////////////////////////////////////////////////////
// Name: app.h
// Purpose: wxApp class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_APP_H_
#define _WX_APP_H_
#ifdef __GNUG__
#pragma interface "app.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/gdicmn.h"
#include "wx/event.h"
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxFrame;
class WXDLLEXPORT wxWindow;
class WXDLLEXPORT wxApp;
class WXDLLEXPORT wxKeyEvent;
class WXDLLEXPORT wxLog;
// ----------------------------------------------------------------------------
// the wxApp class for Motif - see wxAppBase for more details
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxApp : public wxAppBase
{
DECLARE_DYNAMIC_CLASS(wxApp)
public:
wxApp();
~wxApp() {}
// override base class (pure) virtuals
// -----------------------------------
virtual int MainLoop();
virtual void ExitMainLoop();
virtual bool Initialized();
virtual bool Pending();
virtual void Dispatch();
virtual bool Yield(bool onlyIfNeeded = FALSE);
virtual bool OnInitGui();
virtual wxIcon GetStdIcon(int which) const;
// implementation from now on
// --------------------------
void OnIdle(wxIdleEvent& event);
// Send idle event to all top-level windows.
// Returns TRUE if more idle time is requested.
bool SendIdleEvents();
// Send idle event to window and all subwindows
// Returns TRUE if more idle time is requested.
bool SendIdleEvents(wxWindow* win);
// Motif implementation.
// Processes an X event.
virtual void ProcessXEvent(WXEvent* event);
// Returns TRUE if an accelerator has been processed
virtual bool CheckForAccelerator(WXEvent* event);
// Returns TRUE if a key down event has been processed
virtual bool CheckForKeyDown(WXEvent* event);
// Returns TRUE if a key up event has been processed
virtual bool CheckForKeyUp(WXEvent* event);
protected:
bool m_showOnInit;
public:
// Implementation
static bool Initialize();
static void CleanUp();
void DeletePendingObjects();
bool ProcessIdle();
// Motif-specific
WXAppContext GetAppContext() const { return m_appContext; }
WXWidget GetTopLevelWidget() const { return m_topLevelWidget; }
WXColormap GetMainColormap(WXDisplay* display);
WXDisplay* GetInitialDisplay() const { return m_initialDisplay; }
long GetMaxRequestSize() const { return m_maxRequestSize; }
// This handler is called when a property change event occurs
virtual void HandlePropertyChange(WXEvent *event);
public:
static long sm_lastMessageTime;
int m_nCmdShow;
protected:
bool m_keepGoing;
// Motif-specific
WXAppContext m_appContext;
WXWidget m_topLevelWidget;
WXColormap m_mainColormap;
WXDisplay* m_initialDisplay;
long m_maxRequestSize;
DECLARE_EVENT_TABLE()
};
int WXDLLEXPORT wxEntry( int argc, char *argv[] );
#endif
// _WX_APP_H_

230
include/wx/x11/bitmap.h Normal file
View File

@@ -0,0 +1,230 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bitmap.h
// Purpose: wxBitmap class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BITMAP_H_
#define _WX_BITMAP_H_
#ifdef __GNUG__
#pragma interface "bitmap.h"
#endif
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
#include "wx/palette.h"
// Bitmap
class WXDLLEXPORT wxDC;
class WXDLLEXPORT wxControl;
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxBitmapHandler;
class WXDLLEXPORT wxIcon;
class WXDLLEXPORT wxCursor;
class WXDLLEXPORT wxImage;
// A mask is a mono bitmap used for drawing bitmaps
// transparently.
class WXDLLEXPORT wxMask: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxMask)
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);
~wxMask();
bool Create(const wxBitmap& bitmap, const wxColour& colour);
bool Create(const wxBitmap& bitmap, int paletteIndex);
bool Create(const wxBitmap& bitmap);
WXPixmap GetPixmap() const { return m_pixmap; }
void SetPixmap(WXPixmap pixmap) { m_pixmap = pixmap; }
protected:
WXPixmap m_pixmap;
};
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
{
friend class WXDLLEXPORT wxBitmap;
friend class WXDLLEXPORT wxIcon;
friend class WXDLLEXPORT wxCursor;
public:
wxBitmapRefData();
~wxBitmapRefData();
public:
int m_width;
int m_height;
int m_depth;
bool m_ok;
int m_numColors;
wxPalette m_bitmapPalette;
int m_quality;
wxMask * m_bitmapMask; // Optional mask
// Motif implementation
public:
WXPixmap m_pixmap;
WXDisplay* m_display;
bool m_freePixmap;
unsigned long* m_freeColors;
long m_freeColorsCount;
// These 5 variables are for wxControl
WXPixmap m_insensPixmap ;
WXPixmap m_labelPixmap ;
WXPixmap m_armPixmap ;
WXImage* m_image ;
WXImage* m_insensImage ;
};
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
class WXDLLEXPORT wxBitmapHandler: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
public:
wxBitmapHandler() { m_name = ""; m_extension = ""; m_type = 0; };
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);
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; }
protected:
wxString m_name;
wxString m_extension;
long m_type;
};
#define M_BITMAPHANDLERDATA ((wxBitmapRefData *)bitmap->GetRefData())
class WXDLLEXPORT wxBitmap: public wxGDIObject
{
DECLARE_DYNAMIC_CLASS(wxBitmap)
friend class WXDLLEXPORT wxBitmapHandler;
public:
wxBitmap(); // Platform-specific
// Copy constructors
wxBitmap(const wxBitmap& bitmap)
{ Ref(bitmap); }
// Initialize with raw XBM data
wxBitmap(const char bits[], int width, int height, int depth = 1);
// from XPM
wxBitmap(const char **data) { (void)CreateFromXpm(data); }
wxBitmap(char **data) { (void)CreateFromXpm((const char **)data); }
// Initialize with XPM data -- deprecated
wxBitmap(char **data, wxControl* control);
// Load a file or resource
wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XPM);
// Constructor for generalised creation from data
wxBitmap(void *data, long type, int width, int height, int depth = 1);
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1);
// Convert from wxImage:
wxBitmap(const wxImage& image, int depth = -1) { (void)CreateFromImage(image, depth); }
~wxBitmap();
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
wxBitmap GetSubBitmap( const wxRect& rect ) const;
virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XPM);
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
wxImage ConvertToImage() const;
bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
int GetWidth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_width : 0); }
int GetHeight() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_height : 0); }
int GetDepth() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_depth : 0); }
int GetQuality() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_quality : 0); }
void SetWidth(int w);
void SetHeight(int h);
void SetDepth(int d);
void SetQuality(int q);
void SetOk(bool isOk);
wxPalette* GetPalette() const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : (wxPalette*) NULL); }
void SetPalette(const wxPalette& palette);
wxMask *GetMask() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : (wxMask*) NULL); }
void SetMask(wxMask *mask) ;
wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
bool operator == (const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; }
bool operator != (const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; }
// Format handling
static wxList& GetHandlers() { return sm_handlers; }
static void AddHandler(wxBitmapHandler *handler);
static void InsertHandler(wxBitmapHandler *handler);
static bool RemoveHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& name);
static wxBitmapHandler *FindHandler(const wxString& extension, long bitmapType);
static wxBitmapHandler *FindHandler(long bitmapType);
static void InitStandardHandlers();
static void CleanUpHandlers();
// Motif implementation
public:
WXDisplay* GetDisplay() const { return M_BITMAPDATA->m_display; }
WXPixmap GetPixmap() const { return (WXPixmap) M_BITMAPDATA->m_pixmap; }
virtual WXPixmap GetLabelPixmap(WXWidget w) ;
virtual WXPixmap GetArmPixmap(WXWidget w) ;
virtual WXPixmap GetInsensPixmap(WXWidget w = (WXWidget) 0) ;
void SetPixmapNull() { M_BITMAPDATA->m_pixmap = 0; }
protected:
static wxList sm_handlers;
protected:
bool CreateFromXpm(const char **bits);
bool CreateFromImage(const wxImage& image, int depth);
};
// Creates a bitmap with transparent areas drawn in
// the given colour.
wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, wxColour& colour);
#endif
// _WX_BITMAP_H_

Some files were not shown because too many files have changed in this diff Show More