]> git.saurik.com Git - wxWidgets.git/commitdiff
Keep wxPalmOS buildable - wxIcon and wxCursor moved to generic implementations.
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 24 Aug 2006 14:43:20 +0000 (14:43 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 24 Aug 2006 14:43:20 +0000 (14:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/palmos/makefile
include/wx/colour.h
include/wx/icon.h
include/wx/palmos/colour.h [deleted file]
include/wx/palmos/icon.h [deleted file]
src/palmos/colour.cpp [deleted file]
src/palmos/icon.cpp [deleted file]

index 0f4e0184982ad728732b7cf1313830963e4088b3..9401e4de0a82dece47fe4194df8028ee9d0071a1 100644 (file)
@@ -76,6 +76,7 @@ BASE_CMN_SRC = \
 ../../src/common/module.cpp \
 ../../src/common/mstream.cpp \
 ../../src/common/object.cpp \
+../../src/common/platinfo.cpp \
 ../../src/common/process.cpp \
 ../../src/common/regex.cpp \
 ../../src/common/stdpbase.cpp \
@@ -135,7 +136,7 @@ PALMOS_LOWLEVEL_SRC = \
 ../../src/palmos/brush.cpp \
 ../../src/palmos/caret.cpp \
 ../../src/palmos/clipbrd.cpp \
-../../src/palmos/colour.cpp \
+../../src/generic/colour.cpp \
 ../../src/palmos/cursor.cpp \
 ../../src/palmos/data.cpp \
 ../../src/palmos/dc.cpp \
@@ -150,8 +151,7 @@ PALMOS_LOWLEVEL_SRC = \
 ../../src/palmos/fontenum.cpp \
 ../../src/palmos/fontutil.cpp \
 ../../src/palmos/gdiimage.cpp \
-../../src/palmos/gdiobj.cpp \
-../../src/palmos/icon.cpp \
+../../src/generic/icon.cpp \
 ../../src/palmos/minifram.cpp \
 ../../src/palmos/palette.cpp \
 ../../src/palmos/pen.cpp \
index 509dc7440512c16dc09f43612b1ebd3e7652f794..11a729d702b8dd2de71a8c706f648c60100d1bb8 100644 (file)
@@ -104,7 +104,7 @@ public:
 
 
 #if defined(__WXPALMOS__)
-#include "wx/palmos/colour.h"
+#include "wx/generic/colour.h"
 #elif defined(__WXMSW__)
 #include "wx/msw/colour.h"
 #elif defined(__WXMOTIF__)
index 50dda58d637c92d934548a46f8b670006ea771ec..bb006a25406d09b56e93b88b5112c0cc56266a8e 100644 (file)
@@ -15,7 +15,7 @@
 #include "wx/iconloc.h"
 
 #if defined(__WXPALMOS__)
-  #include "wx/palmos/icon.h"
+  #include "wx/generic/icon.h"
 #elif defined(__WXMSW__)
   #include "wx/msw/icon.h"
 #elif defined(__WXMOTIF__)
diff --git a/include/wx/palmos/colour.h b/include/wx/palmos/colour.h
deleted file mode 100644 (file)
index 6bf696d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        wx/palmos/colour.h
-// Purpose:     wxColour class
-// Author:      William Osborne - minimal working wxPalmOS port
-// Modified by:
-// Created:     10/13/04
-// RCS-ID:      $Id$
-// Copyright:   (c) William Osborne
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COLOUR_H_
-#define _WX_COLOUR_H_
-
-#include "wx/object.h"
-
-// ----------------------------------------------------------------------------
-// wxColour
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxColour : public wxColourBase
-{
-public:
-    // constructors
-    // ------------
-
-    wxColour() { Init(); }
-    DEFINE_STD_WXCOLOUR_CONSTRUCTORS
-
-    // copy ctors and assignment operators
-    wxColour(const wxColour& col);
-    wxColour& operator=( const wxColour& col);
-
-    // dtor
-    ~wxColour();
-
-
-
-    bool Ok() const { return m_isInit; }
-
-    unsigned char Red() const { return m_red; }
-    unsigned char Green() const { return m_green; }
-    unsigned char Blue() const { return m_blue; }
-
-    // comparison
-    bool operator==(const wxColour& colour) const
-    {
-        return m_isInit == colour.m_isInit
-            && m_red == colour.m_red
-            && m_green == colour.m_green
-            && m_blue == colour.m_blue;
-    }
-
-    bool operator != (const wxColour& colour) const { return !(*this == colour); }
-
-    WXCOLORREF GetPixel() const { return m_pixel; };
-
-public:
-    WXCOLORREF m_pixel;
-
-protected:
-    // Helper function
-    void Init();
-
-    virtual void InitWith(unsigned char red, unsigned char green, unsigned char blue);
-
-private:
-    bool          m_isInit;
-    unsigned char m_red;
-    unsigned char m_blue;
-    unsigned char m_green;
-
-private:
-    DECLARE_DYNAMIC_CLASS(wxColour)
-};
-
-#endif
-        // _WX_COLOUR_H_
diff --git a/include/wx/palmos/icon.h b/include/wx/palmos/icon.h
deleted file mode 100644 (file)
index 1f838c5..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        wx/palmos/icon.h
-// Purpose:     wxIcon class
-// Author:      William Osborne - minimal working wxPalmOS port
-// Modified by:
-// Created:     10/13/04
-// RCS-ID:      $Id$
-// Copyright:   (c) William Osborne
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ICON_H_
-#define _WX_ICON_H_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/palmos/gdiimage.h"
-
-// ---------------------------------------------------------------------------
-// icon data
-// ---------------------------------------------------------------------------
-
-// notice that although wxIconRefData inherits from wxBitmapRefData, it is not
-// a valid wxBitmapRefData
-class WXDLLEXPORT wxIconRefData : public wxGDIImageRefData
-{
-public:
-    wxIconRefData() { }
-    virtual ~wxIconRefData() { Free(); }
-
-    virtual void Free();
-};
-
-// ---------------------------------------------------------------------------
-// Icon
-// ---------------------------------------------------------------------------
-
-class WXDLLEXPORT wxIcon : public wxGDIImage
-{
-public:
-    // ctors
-        // default
-    wxIcon() { }
-
-        // from raw data
-    wxIcon(const char bits[], int width, int height);
-
-        // from XPM data
-    wxIcon(const char **data) { CreateIconFromXpm(data); }
-
-    wxIcon(char **data) { CreateIconFromXpm((const char **)data); }
-
-        // from resource/file
-    wxIcon(const wxString& name,
-           long type = wxBITMAP_TYPE_ICO_RESOURCE,
-           int desiredWidth = -1, int desiredHeight = -1);
-
-    wxIcon(const wxIconLocation& loc);
-
-    virtual ~wxIcon();
-
-    virtual bool LoadFile(const wxString& name,
-                          long type = wxBITMAP_TYPE_ICO_RESOURCE,
-                          int desiredWidth = -1, int desiredHeight = -1);
-
-    bool operator == (const wxIcon& icon) const
-        { return m_refData == icon.m_refData; }
-    bool operator != (const wxIcon& icon) const
-        { return m_refData != icon.m_refData; }
-
-    // implementation only from now on
-    wxIconRefData *GetIconData() const { return (wxIconRefData *)m_refData; }
-
-    void SetHICON(WXHICON icon) { SetHandle((WXHANDLE)icon); }
-    WXHICON GetHICON() const { return (WXHICON)GetHandle(); }
-
-    // create from bitmap (which should have a mask unless it's monochrome):
-    // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
-    // ctors, assignment operators...), but it's ok to have such function
-    void CopyFromBitmap(const wxBitmap& bmp);
-
-protected:
-    virtual wxGDIImageRefData *CreateData() const
-    {
-        return new wxIconRefData;
-    }
-
-    // create from XPM data
-    void CreateIconFromXpm(const char **data);
-
-private:
-    DECLARE_DYNAMIC_CLASS(wxIcon)
-};
-
-#endif
-    // _WX_ICON_H_
diff --git a/src/palmos/colour.cpp b/src/palmos/colour.cpp
deleted file mode 100644 (file)
index 73a0a66..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        src/palmos/colour.cpp
-// Purpose:     wxColour class
-// Author:      William Osborne - minimal working wxPalmOS port
-// Modified by:
-// Created:     10/13/04
-// RCS-ID:      $Id$
-// Copyright:   (c) William Osborne
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-    #pragma hdrstop
-#endif
-
-#include "wx/colour.h"
-
-#ifndef WX_PRECOMP
-    #include "wx/gdicmn.h"
-#endif
-
-#include <string.h>
-
-#if wxUSE_EXTENDED_RTTI
-
-template<> void wxStringReadValue(const wxString &s , wxColour &data )
-{
-    if ( !data.Set(s) )
-    {
-        wxLogError(_("String To Colour : Incorrect colour specification : %s"),
-            s.c_str() );
-        data = wxNullColour;
-    }
-}
-
-template<> void wxStringWriteValue(wxString &s , const wxColour &data )
-{
-    s = data.GetAsString(wxC2S_HTML_SYNTAX);
-}
-
-wxTO_STRING_IMP( wxColour )
-wxFROM_STRING_IMP( wxColour )
-
-IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( wxColour , wxObject , "wx/colour.h" ,  &wxTO_STRING( wxColour ) , &wxFROM_STRING( wxColour ))
-
-wxBEGIN_PROPERTIES_TABLE(wxColour)
-    wxREADONLY_PROPERTY( Red, unsigned char, Red, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group"))
-    wxREADONLY_PROPERTY( Green, unsigned char, Green, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group"))
-    wxREADONLY_PROPERTY( Blue, unsigned char, Blue, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group"))
-wxEND_PROPERTIES_TABLE()
-
-wxCONSTRUCTOR_3( wxColour, unsigned char, Red, unsigned char, Green, unsigned char, Blue )
-
-wxBEGIN_HANDLERS_TABLE(wxColour)
-wxEND_HANDLERS_TABLE()
-#else
-IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
-#endif
-
-// Colour
-
-void wxColour::Init()
-{
-    m_isInit = false;
-    m_pixel = 0;
-    m_red =
-    m_blue =
-    m_green = 0;
-}
-
-wxColour::wxColour(const wxColour& col)
-{
-    *this = col;
-}
-
-wxColour& wxColour::operator=(const wxColour& col)
-{
-    m_red = col.m_red;
-    m_green = col.m_green;
-    m_blue = col.m_blue;
-    m_isInit = col.m_isInit;
-    m_pixel = col.m_pixel;
-    return *this;
-}
-
-wxColour::~wxColour()
-{
-}
-
-void wxColour::InitWith(unsigned char r, unsigned char g, unsigned char b)
-{
-    m_red = r;
-    m_green = g;
-    m_blue = b;
-    m_isInit = true;
-}
diff --git a/src/palmos/icon.cpp b/src/palmos/icon.cpp
deleted file mode 100644 (file)
index 12a7d01..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        src/palmos/icon.cpp
-// Purpose:     wxIcon class
-// Author:      William Osborne - minimal working wxPalmOS port
-// Modified by:
-// Created:     10/13/04
-// RCS-ID:      $Id$
-// Copyright:   (c) William Osborne
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-    #pragma hdrstop
-#endif
-
-#include "wx/icon.h"
-
-#ifndef WX_PRECOMP
-    #include "wx/list.h"
-    #include "wx/utils.h"
-    #include "wx/app.h"
-    #include "wx/bitmap.h"
-    #include "wx/log.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// wxWin macros
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxGDIObject)
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxIconRefData
-// ----------------------------------------------------------------------------
-
-void wxIconRefData::Free()
-{
-}
-
-// ----------------------------------------------------------------------------
-// wxIcon
-// ----------------------------------------------------------------------------
-
-wxIcon::wxIcon(const char bits[], int width, int height)
-{
-}
-
-wxIcon::wxIcon(const wxString& iconfile,
-               long flags,
-               int desiredWidth,
-               int desiredHeight)
-
-{
-}
-
-wxIcon::wxIcon(const wxIconLocation& loc)
-{
-}
-
-wxIcon::~wxIcon()
-{
-}
-
-void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
-{
-}
-
-void wxIcon::CreateIconFromXpm(const char **data)
-{
-}
-
-bool wxIcon::LoadFile(const wxString& filename,
-                      long type,
-                      int desiredWidth, int desiredHeight)
-{
-    return false;
-}