wxMac completed so far, generic listctrl extension
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -186,6 +186,7 @@ public:
|
||||
// Convenience functions
|
||||
virtual bool Write(const wxString& key, double value);
|
||||
virtual bool Write(const wxString& key, bool value);
|
||||
virtual bool Write(const wxString& key, const wxChar *text ) ;
|
||||
|
||||
// permanently writes all changes
|
||||
virtual bool Flush(bool bCurrentOnly = FALSE) = 0;
|
||||
|
@@ -446,6 +446,8 @@ private:
|
||||
// #include "wx/motif/dataobj2.h" -- not yet
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dataobj2.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dataobj2.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/dataobj2.h"
|
||||
#endif
|
||||
|
@@ -586,6 +586,25 @@ enum
|
||||
#define wxByte wxUint8
|
||||
#define wxWord wxUint16
|
||||
|
||||
// base floating point types
|
||||
// wxFloat32 : 32 bit IEEE float ( 1 sign , 8 exponent bits , 23 fraction bits
|
||||
// wxFloat64 : 64 bit IEEE float ( 1 sign , 11 exponent bits , 52 fraction bits
|
||||
// wxDouble : native fastest representation that has at least wxFloat64
|
||||
// precision, so use the IEEE types for storage , and this for calculations
|
||||
|
||||
typedef float wxFloat32 ;
|
||||
#if defined( __WXMAC__ ) && defined (__MWERKS__)
|
||||
typedef short double wxFloat64;
|
||||
#else
|
||||
typedef double wxFloat64;
|
||||
#endif
|
||||
|
||||
#if defined( __WXMAC__ ) && !defined( __POWERPC__ )
|
||||
typedef long double wxDouble;
|
||||
#else
|
||||
typedef double wxDouble ;
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// byte ordering related definition and macros
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -604,6 +623,36 @@ enum
|
||||
|
||||
// byte swapping
|
||||
|
||||
#if defined (__MWERKS__) && ( (__MWERKS__ < 0x0900) || macintosh )
|
||||
// assembler versions for these
|
||||
#ifdef __POWERPC__
|
||||
inline wxUint16 wxUINT16_SWAP_ALWAYS( wxUint16 i )
|
||||
{return (__lhbrx( &i , 0 ) ) ;}
|
||||
inline wxInt16 wxINT16_SWAP_ALWAYS( wxInt16 i )
|
||||
{return (__lhbrx( &i , 0 ) ) ;}
|
||||
inline wxUint32 wxUINT32_SWAP_ALWAYS( wxUint32 i )
|
||||
{return (__lwbrx( &i , 0 ) ) ;}
|
||||
inline wxInt32 wxINT32_SWAP_ALWAYS( wxInt32 i )
|
||||
{return (__lwbrx( &i , 0 ) ) ;}
|
||||
#else
|
||||
#pragma parameter __D0 wxUINT16_SWAP_ALWAYS(__D0)
|
||||
pascal wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value)
|
||||
= { 0xE158 };
|
||||
|
||||
#pragma parameter __D0 wxINT16_SWAP_ALWAYS(__D0)
|
||||
pascal wxInt16 wxUINT16_SWAP_ALWAYS(wxInt16 value)
|
||||
= { 0xE158 };
|
||||
|
||||
#pragma parameter __D0 wxUINT32_SWAP_ALWAYS (__D0)
|
||||
pascal wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value)
|
||||
= { 0xE158, 0x4840, 0xE158 };
|
||||
|
||||
#pragma parameter __D0 wxINT32_SWAP_ALWAYS (__D0)
|
||||
pascal wxInt32 wxUINT32_SWAP_ALWAYS(wxInt32 value)
|
||||
= { 0xE158, 0x4840, 0xE158 };
|
||||
|
||||
#endif
|
||||
#else // !MWERKS
|
||||
#define wxUINT16_SWAP_ALWAYS(val) \
|
||||
((wxUint16) ( \
|
||||
(((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \
|
||||
@@ -627,7 +676,7 @@ enum
|
||||
(((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
|
||||
(((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
|
||||
(((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
|
||||
|
||||
#endif
|
||||
// machine specific byte swapping
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
|
@@ -194,6 +194,8 @@ public:
|
||||
{ return wxConfigBase::Write(key, value); }
|
||||
bool Write(const wxString& key, bool value)
|
||||
{ return wxConfigBase::Write(key, value); }
|
||||
bool Write(const wxString& key, const wxChar* value)
|
||||
{ return wxConfigBase::Write(key, value); }
|
||||
|
||||
virtual bool Flush(bool bCurrentOnly = FALSE);
|
||||
|
||||
|
@@ -456,7 +456,8 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
||||
void OnSetFocus( wxFocusEvent &event );
|
||||
void OnKillFocus( wxFocusEvent &event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
|
||||
void OnScroll(wxScrollWinEvent& event) ;
|
||||
|
||||
void DrawImage( int index, wxDC *dc, int x, int y );
|
||||
void GetImageSize( int index, int &width, int &height );
|
||||
int GetIndexOfLine( const wxListLineData *line );
|
||||
|
@@ -22,8 +22,8 @@ class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
||||
public:
|
||||
wxFontRefData()
|
||||
{
|
||||
Init(12, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE,
|
||||
"", wxFONTENCODING_DEFAULT);
|
||||
Init(10, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE,
|
||||
"Geneva", wxFONTENCODING_DEFAULT);
|
||||
}
|
||||
|
||||
wxFontRefData(const wxFontRefData& data)
|
||||
|
@@ -131,7 +131,7 @@ public:
|
||||
|
||||
// Checks if there is a toolbar, and returns the first free client position
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
virtual void GetClientSize(int *x, int *y) const ;
|
||||
virtual void DoGetClientSize(int *x, int *y) const ;
|
||||
virtual void DoSetClientSize(int clientwidth, int clientheight) ;
|
||||
|
||||
// tooltip management
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
// 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 GetClientSize(int *width, int *height) const;
|
||||
void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
// Get the active MDI child window (Windows only)
|
||||
wxMDIChildFrame *GetActiveChild() const ;
|
||||
|
@@ -17,6 +17,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define WORDS_BIGENDIAN 1
|
||||
|
||||
#define wxUSE_CONFIG 1
|
||||
// Use wxConfig, with CreateConfig in wxApp
|
||||
|
||||
@@ -138,7 +140,7 @@
|
||||
// since you may well need to output
|
||||
// an error log in a production
|
||||
// version (or non-debugging beta)
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 1
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors), set this to 0.
|
||||
|
||||
|
@@ -180,6 +180,7 @@ public:
|
||||
// --------------
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void MacOnScroll(wxScrollEvent&event ) ;
|
||||
|
||||
public:
|
||||
// For implementation purposes - sometimes decorations make the client area
|
||||
@@ -251,6 +252,7 @@ public :
|
||||
virtual void MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** rootwin) ;
|
||||
MacWindowData* MacGetWindowData() { return m_macWindowData ; }
|
||||
static WindowRef MacGetWindowInUpdate() { return s_macWindowInUpdate ; }
|
||||
bool MacIsWindowScrollbar( const wxScrollBar* sb ) { return (m_hScrollBar == sb || m_vScrollBar == sb) ; }
|
||||
static wxWindow* s_lastMouseWindow ;
|
||||
private:
|
||||
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindow** outWin ) ;
|
||||
|
@@ -213,7 +213,8 @@ class WXDLLEXPORT wxObject
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
void * operator new[] (size_t size, wxChar * fileName , int lineNum = 0);
|
||||
void * operator new[] (size_t size, wxChar * fileName , int lineNum = 0);
|
||||
void * operator new[] (size_t size) { return operator new[] ( size , NULL , 0 ) ; }
|
||||
void operator delete[] (void * buf);
|
||||
#endif
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: os2/dataobj2.h
|
||||
// Name: mac/dataobj2.h
|
||||
// Purpose: declaration of standard wxDataObjectSimple-derived classes
|
||||
// Author: David Webster (adapted from Robert Roebling's gtk port
|
||||
// Author: Stefan Csomor (adapted from Robert Roebling's gtk port
|
||||
// Modified by:
|
||||
// Created: 10/21/99
|
||||
// RCS-ID: $Id$
|
||||
@@ -9,8 +9,8 @@
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DATAOBJ2_H_
|
||||
#define _WX_GTK_DATAOBJ2_H_
|
||||
#ifndef _WX_MAC_DATAOBJ2_H_
|
||||
#define _WX_MAC_DATAOBJ2_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dataobj.h"
|
||||
@@ -86,5 +86,5 @@ private:
|
||||
{ return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_DATAOBJ2_H_
|
||||
#endif // _WX_MAC_DATAOBJ2_H_
|
||||
|
||||
|
@@ -302,7 +302,7 @@ public:
|
||||
wxString(const unsigned char* psz, size_t nLength = wxSTRING_MAXLEN)
|
||||
{ InitWith((const char*)psz, 0, nLength); }
|
||||
// from multibyte string
|
||||
wxString(const char *psz, wxMBConv& WXUNUSED(conv), size_t nLength = wxSTRING_MAXLEN)
|
||||
wxString(const char *psz, wxMBConv& WXUNUSED(conv) , size_t nLength = wxSTRING_MAXLEN)
|
||||
{ InitWith(psz, 0, nLength); }
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
|
Reference in New Issue
Block a user