moved wxDash typedef to gdicmn.h

added wxXXXDash, platform dependant types for all ports
made using native dialogs the default in msw/setup0.h


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2000-03-13 14:34:35 +00:00
parent dfd2e67583
commit 236a9de39a
19 changed files with 103 additions and 82 deletions

View File

@@ -324,6 +324,8 @@ public:
// Management of pens, brushes and fonts
// ---------------------------------------------------------------------------
typedef wxInt8 wxDash;
class WXDLLEXPORT wxPenList : public wxList
{
DECLARE_DYNAMIC_CLASS(wxPenList)

View File

@@ -21,7 +21,7 @@
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
#include <gtk/gtk.h>
#include <gtk/gtk.h> // only needed for wxGTKDash, should it go elsewhere..
//-----------------------------------------------------------------------------
// classes
@@ -29,8 +29,6 @@
class wxPen;
typedef wxInt8 wxDash;
#if GTK_CHECK_VERSION(1,2,7)
typedef gint8 wxGTKDash;
#else

View File

@@ -21,7 +21,7 @@
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
#include <gtk/gtk.h>
#include <gtk/gtk.h> // only needed for wxGTKDash, should it go elsewhere..
//-----------------------------------------------------------------------------
// classes
@@ -29,8 +29,6 @@
class wxPen;
typedef wxInt8 wxDash;
#if GTK_CHECK_VERSION(1,2,7)
typedef gint8 wxGTKDash;
#else

View File

@@ -20,7 +20,7 @@
#include "wx/colour.h"
#include "wx/bitmap.h"
typedef long wxDash ;
typedef long wxMACDash;
class WXDLLEXPORT wxPen;
@@ -39,7 +39,7 @@ protected:
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxDash * m_dash ;
wxMACDash * m_dash ;
wxColour m_colour;
/* TODO: implementation
WXHPEN m_hPen;
@@ -81,8 +81,10 @@ public:
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 ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 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 wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };

View File

@@ -149,7 +149,7 @@ protected:
int m_currentPenJoin ;
int m_currentPenCap ;
int m_currentPenDashCount ;
char* m_currentPenDash ;
wxMOTIFDash* m_currentPenDash ;
wxBitmap m_currentStipple ;
int m_currentStyle ;
int m_currentFill ;

View File

@@ -20,7 +20,7 @@
#include "wx/colour.h"
#include "wx/bitmap.h"
typedef char wxDash ;
typedef char wxMOTIFDash;
class WXDLLEXPORT wxPen;
@@ -39,7 +39,7 @@ protected:
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxDash * m_dash ;
wxMOTIFDash *m_dash ;
wxColour m_colour;
};
@@ -78,11 +78,13 @@ public:
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 ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 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 (M_PENDATA->m_dash); }
inline wxDash* GetDash() const { return (wxDash*)M_PENDATA->m_dash; }
inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };

View File

@@ -19,7 +19,7 @@
#include "wx/gdiobj.h"
#include "wx/bitmap.h"
typedef WXDWORD wxDash ;
typedef WXDWORD wxMSWDash;
class WXDLLEXPORT wxPen;
@@ -38,7 +38,7 @@ protected:
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxDash * m_dash ;
wxMSWDash * m_dash ;
wxColour m_colour;
WXHPEN m_hPen;
};
@@ -78,8 +78,10 @@ public:
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 ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 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 wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };

View File

@@ -471,7 +471,7 @@
// Define 1 for font size to be backward compatible
// to 1.63 and earlier. 1.64 and later define point
// sizes to be compatible with Windows.
#define wxUSE_GENERIC_DIALOGS_IN_MSW 1
#define wxUSE_GENERIC_DIALOGS_IN_MSW 0
// Define 1 to use generic dialogs in Windows, even though
// they duplicate native common dialog (e.g. wxColourDialog)
#define wxUSE_PENWINDOWS 0

View File

@@ -15,7 +15,7 @@
#include "wx/gdiobj.h"
#include "wx/bitmap.h"
typedef long wxDash ;
typedef long wxPMDash;
class WXDLLEXPORT wxPen;
@@ -34,7 +34,7 @@ protected:
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxDash * m_dash ;
wxPMDash * m_dash ;
wxColour m_colour;
WXHPEN m_hPen;
};
@@ -74,8 +74,10 @@ public:
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 ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 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 wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };

View File

@@ -17,8 +17,9 @@
#endif
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
typedef WXDWORD wxDash ;
typedef WXDWORD wxQTDash;
class WXDLLEXPORT wxPen;
@@ -37,7 +38,7 @@ protected:
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxDash * m_dash ;
wxQTDash * m_dash;
wxColour m_colour;
/* TODO: implementation
WXHPEN m_hPen;
@@ -82,8 +83,10 @@ public:
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 ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 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 wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); };

View File

@@ -20,7 +20,17 @@
#include "wx/colour.h"
#include "wx/bitmap.h"
typedef long wxDash ;
// PORTERS, NB: this typedef is the platform specific type for dashes..
// change all occurences of XSTUBX in pen.h and pen.cpp to something
// meaningful for your port (eg. wxMSWDash, wxGTKDash) and change the
// type from long to whatever your platform requires.
typedef long wxXSTUBXDash;
// wxDash is typedef'd in gdicmn.h and is the type that should be used
// for all public interfaces. Convert parameters to the wxXSTUBXDash
// type for use inside the platform specific methods, and cast them
// back to wxDash again before passing back to the user. -- RL
class WXDLLEXPORT wxPen;
@@ -35,11 +45,11 @@ public:
protected:
int m_width;
int m_style;
int m_join ;
int m_cap ;
wxBitmap m_stipple ;
int m_nbDash ;
wxDash * m_dash ;
int m_join;
int m_cap;
wxBitmap m_stipple;
int m_nbDash;
wxXSTUBXDash *m_dash;
wxColour m_colour;
/* TODO: implementation
WXHPEN m_hPen;
@@ -81,8 +91,10 @@ public:
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 ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 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 wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };