class WXDLLEXPORT wxAppBase : public wxEvtHandler
{
+ DECLARE_NO_COPY_CLASS(wxAppBase)
+
public:
wxAppBase();
virtual ~wxAppBase();
class WXDLLEXPORT wxControlContainer
{
+ DECLARE_NO_COPY_CLASS(wxControlContainer)
+
public:
// ctors and such
wxControlContainer(wxWindow *winParent = NULL);
// log everything to a "FILE *", stderr by default
class WXDLLEXPORT wxLogStderr : public wxLog
{
+ DECLARE_NO_COPY_CLASS(wxLogStderr)
+
public:
// redirect log output to a FILE
wxLogStderr(FILE *fp = (FILE *) NULL);
class WXDLLEXPORT wxLogNull
{
public:
- wxLogNull() { m_flagOld = wxLog::EnableLogging(FALSE); }
- ~wxLogNull() { (void)wxLog::EnableLogging(m_flagOld); }
+ wxLogNull() : m_flagOld(wxLog::EnableLogging(FALSE)) { }
+ ~wxLogNull() { (void)wxLog::EnableLogging(m_flagOld); }
private:
bool m_flagOld; // the previous value of the wxLog::ms_doLog
// transparently.
class WXDLLEXPORT wxMask: public wxObject
{
- DECLARE_DYNAMIC_CLASS(wxMask)
+ DECLARE_DYNAMIC_CLASS(wxMask)
+ DECLARE_NO_COPY_CLASS(wxMask)
public:
wxMask();
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
{
+ DECLARE_NO_COPY_CLASS(wxBitmapRefData)
+
friend class WXDLLEXPORT wxBitmap;
friend class WXDLLEXPORT wxIcon;
friend class WXDLLEXPORT wxCursor;
wxPalette m_bitmapPalette;
int m_quality;
- int m_bitmapType ;
- WXHMETAFILE m_hPict ;
- WXHBITMAP m_hBitmap;
- WXHICON m_hIcon ;
+ int m_bitmapType ;
+ WXHMETAFILE m_hPict ;
+ WXHBITMAP m_hBitmap;
+ WXHICON m_hIcon ;
wxMask * m_bitmapMask; // Optional mask
};
{
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
public:
- wxBitmapHandler() { m_name = ""; m_extension = ""; m_type = 0; };
-#ifdef __DARWIN__
- virtual ~wxBitmapHandler() { }
-#endif
+ wxBitmapHandler() : m_name(), m_extension(), m_type(0) { }
+ virtual ~wxBitmapHandler();
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(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
- inline void SetName(const wxString& name) { m_name = name; }
- inline void SetExtension(const wxString& ext) { m_extension = ext; }
- inline void SetType(long type) { m_type = type; }
- inline wxString GetName() const { return m_name; }
- inline wxString GetExtension() const { return m_extension; }
- inline 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;
wxBitmap(); // Platform-specific
// Copy constructors
- inline wxBitmap(const wxBitmap& bitmap)
+ wxBitmap(const wxBitmap& bitmap)
+ : wxBitmapBase()
{ Ref(bitmap); }
// Initialize with raw data.
class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData
{
+ DECLARE_NO_COPY_CLASS(wxCursorRefData)
+
friend class WXDLLEXPORT wxBitmap;
friend class WXDLLEXPORT wxCursor;
public:
~wxCursorRefData();
protected:
- WXHCURSOR m_hCursor;
+ WXHCURSOR m_hCursor;
};
#define M_CURSORDATA ((wxCursorRefData *)m_refData)
wxCursor();
// Copy constructors
- inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
+ wxCursor(const wxCursor& cursor)
+ : wxBitmap()
+ { Ref(cursor); }
wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
const char maskBits[] = NULL);
class WXDLLEXPORT wxDC: public wxDCBase
{
- DECLARE_DYNAMIC_CLASS(wxDC)
+ DECLARE_DYNAMIC_CLASS(wxDC)
+ DECLARE_NO_COPY_CLASS(wxDC)
public:
class WXDLLEXPORT wxPaletteRefData: public wxGDIRefData
{
+ DECLARE_NO_COPY_CLASS(wxPaletteRefData)
+
friend class WXDLLEXPORT wxPalette;
public:
wxPaletteRefData();
~wxPaletteRefData();
protected:
- wxColour* m_palette;
- wxInt32 m_count ;
+ wxColour* m_palette;
+ wxInt32 m_count ;
};
#define M_PALETTEDATA ((wxPaletteRefData *)m_refData)
public:
wxPalette();
- inline wxPalette(const wxPalette& palette) { Ref(palette); }
+ wxPalette(const wxPalette& palette)
+ : wxGDIObject()
+ { Ref(palette); }
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
~wxPalette();
{
public:
// lock the mutex in the ctor
- wxMutexLocker(wxMutex& mutex) : m_mutex(mutex)
- { m_isOk = m_mutex.Lock() == wxMUTEX_NO_ERROR; }
+ wxMutexLocker(wxMutex& mutex)
+ : m_isOk(FALSE), m_mutex(mutex)
+ { m_isOk = ( m_mutex.Lock() == wxMUTEX_NO_ERROR ); }
// returns TRUE if mutex was successfully locked in ctor
bool IsOk() const
class WXDLLEXPORT wxCondition
{
+ DECLARE_NO_COPY_CLASS(wxCondition)
+
public:
// constructor and destructor
class WXDLLEXPORT wxSemaphoreInternal;
class WXDLLEXPORT wxSemaphore
{
+ DECLARE_NO_COPY_CLASS(wxSemaphore)
+
public:
// specifying a maxcount of 0 actually makes wxSemaphore behave as if there
// is no upper limit, if maxcount is 1 the semaphore behaves as a mutex
// wxApp then should block all "dangerous" messages
extern bool WXDLLEXPORT wxIsWaitingForThread();
#elif defined(__WXMAC__)
- extern void WXDLLEXPORT wxMutexGuiLeaveOrEnter();
+ extern void WXDLLEXPORT wxMutexGuiLeaveOrEnter();
// returns TRUE if the main thread has GUI lock
extern bool WXDLLEXPORT wxGuiOwnedByMainThread();
extern bool WXDLLEXPORT wxIsWaitingForThread();
// implement wxCriticalSection using mutexes
- inline wxCriticalSection::wxCriticalSection() { }
+ inline wxCriticalSection::wxCriticalSection() : m_mutex() { }
inline wxCriticalSection::~wxCriticalSection() { }
inline void wxCriticalSection::Enter() { (void)m_mutex.Lock(); }
// ctor and enables them back in its dtor
class WXDLLEXPORT wxWindowDisabler
{
+ DECLARE_NO_COPY_CLASS(wxWindowDisabler)
+
public:
wxWindowDisabler(wxWindow *winToSkip = (wxWindow *)NULL);
~wxWindowDisabler();
static bool ms_isSilent;
DECLARE_DYNAMIC_CLASS(wxValidator)
+ DECLARE_NO_COPY_CLASS(wxValidator)
};
WXDLLEXPORT_DATA(extern const wxValidator) wxDefaultValidator;
void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue )
{
(**newColors).ctTable[index].value = index;
- (**newColors).ctTable[index].rgb.red = red ;// someRedValue;
+ (**newColors).ctTable[index].rgb.red = red ; // someRedValue;
(**newColors).ctTable[index].rgb.green = green ; // someGreenValue;
(**newColors).ctTable[index].rgb.blue = blue ; // someBlueValue;
}
}
wxBitmapRefData::wxBitmapRefData()
+ : m_width(0)
+ , m_height(0)
+ , m_depth(0)
+ , m_ok(FALSE)
+ , m_numColors(0)
+ , m_quality(0)
{
- m_ok = FALSE;
- m_width = 0;
- m_height = 0;
- m_depth = 0;
- m_quality = 0;
- m_numColors = 0;
m_bitmapMask = NULL;
m_hBitmap = NULL ;
m_hPict = NULL ;
m_bitmapType = kMacBitmapTypeUnknownType ;
}
-// TODO move this do a public function of Bitmap Ref
+// TODO move this to a public function of Bitmap Ref
static void DisposeBitmapRefData(wxBitmapRefData *data)
{
switch (data->m_bitmapType)
SetGWorld( (GWorldPtr) GetHBITMAP() , NULL ) ;
// Render image
- RGBColor colorRGB ;
-
register unsigned char* data = image.GetData();
char* destinationBase = GetPixBaseAddr( pixMap );
register unsigned char* destination = (unsigned char*) destinationBase ;
*/
wxMask::wxMask()
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
}
// Construct a mask from a bitmap and a colour indicating
// the transparent area
wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour)
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
Create(bitmap, colour);
}
// Construct a mask from a bitmap and a palette index indicating
// the transparent area
wxMask::wxMask(const wxBitmap& bitmap, int paletteIndex)
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
Create(bitmap, paletteIndex);
}
// Construct a mask from a mono bitmap (copies the bitmap).
wxMask::wxMask(const wxBitmap& bitmap)
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
Create(bitmap);
}
// the transparent area
bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
{
-// TODO
- wxCHECK_MSG( 0, false, wxT("Not implemented"));
+ // TODO
+ wxCHECK_MSG( 0, false, wxT("wxMask::Create not yet implemented"));
return FALSE;
}
* wxBitmapHandler
*/
+wxBitmapHandler::~wxBitmapHandler()
+{
+}
+
bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
{
return FALSE;
void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue )
{
(**newColors).ctTable[index].value = index;
- (**newColors).ctTable[index].rgb.red = red ;// someRedValue;
+ (**newColors).ctTable[index].rgb.red = red ; // someRedValue;
(**newColors).ctTable[index].rgb.green = green ; // someGreenValue;
(**newColors).ctTable[index].rgb.blue = blue ; // someBlueValue;
}
}
wxBitmapRefData::wxBitmapRefData()
+ : m_width(0)
+ , m_height(0)
+ , m_depth(0)
+ , m_ok(FALSE)
+ , m_numColors(0)
+ , m_quality(0)
{
- m_ok = FALSE;
- m_width = 0;
- m_height = 0;
- m_depth = 0;
- m_quality = 0;
- m_numColors = 0;
m_bitmapMask = NULL;
m_hBitmap = NULL ;
m_hPict = NULL ;
m_bitmapType = kMacBitmapTypeUnknownType ;
}
-// TODO move this do a public function of Bitmap Ref
+// TODO move this to a public function of Bitmap Ref
static void DisposeBitmapRefData(wxBitmapRefData *data)
{
switch (data->m_bitmapType)
SetGWorld( (GWorldPtr) GetHBITMAP() , NULL ) ;
// Render image
- RGBColor colorRGB ;
-
register unsigned char* data = image.GetData();
char* destinationBase = GetPixBaseAddr( pixMap );
register unsigned char* destination = (unsigned char*) destinationBase ;
*/
wxMask::wxMask()
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
}
// Construct a mask from a bitmap and a colour indicating
// the transparent area
wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour)
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
Create(bitmap, colour);
}
// Construct a mask from a bitmap and a palette index indicating
// the transparent area
wxMask::wxMask(const wxBitmap& bitmap, int paletteIndex)
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
Create(bitmap, paletteIndex);
}
// Construct a mask from a mono bitmap (copies the bitmap).
wxMask::wxMask(const wxBitmap& bitmap)
+ : m_maskBitmap(NULL)
{
- m_maskBitmap = 0;
Create(bitmap);
}
// the transparent area
bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
{
-// TODO
- wxCHECK_MSG( 0, false, wxT("Not implemented"));
+ // TODO
+ wxCHECK_MSG( 0, false, wxT("wxMask::Create not yet implemented"));
return FALSE;
}
* wxBitmapHandler
*/
+wxBitmapHandler::~wxBitmapHandler()
+{
+}
+
bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
{
return FALSE;