projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Warning fix about assigning unused value + little source cleaning.
[wxWidgets.git]
/
src
/
motif
/
icon.cpp
diff --git
a/src/motif/icon.cpp
b/src/motif/icon.cpp
index fb9802ebfa21d8b886b2dd1c899fb1419f46129b..b1a4a57d6b3ce5ab87c20afbf75bde3e1e7455a1 100644
(file)
--- a/
src/motif/icon.cpp
+++ b/
src/motif/icon.cpp
@@
-9,29
+9,20
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if
def __GNUG__
+#if
defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "icon.h"
#endif
#pragma implementation "icon.h"
#endif
-#include "wx/icon.h"
-#include "wx/window.h"
-
-#ifdef __VMS__
-#pragma message disable nosimpint
-#endif
-#include <Xm/Xm.h>
-#include <X11/cursorfont.h>
-#ifdef __VMS__
-#pragma message enable nosimpint
-#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
-#include "wx/
motif/private
.h"
+#include "wx/
icon
.h"
-IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
+IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
;
-/
*
-
*
Icons
-*/
+/
/ ============================================================================
+
//
Icons
+// ============================================================================
wxIcon::wxIcon()
{
wxIcon::wxIcon()
{
@@
-49,29
+40,31
@@
wxIcon::wxIcon(char **data)
(void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
(void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
-wxIcon::wxIcon(const wxString& icon_file, long flags,
- int desiredWidth, int desiredHeight)
-
+wxIcon::wxIcon(const char **data)
{
{
- LoadFile(icon_file, flags, desiredWidth, desiredHeight);
+ (void) Create((void*) data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
+}
+
+void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
+{
+ wxIcon *icon = (wxIcon*)(&bmp);
+ *this = *icon;
}
wxIcon::~wxIcon()
{
}
}
wxIcon::~wxIcon()
{
}
-bool wxIcon::LoadFile(const wxString& filename,
long
type,
+bool wxIcon::LoadFile(const wxString& filename,
wxBitmapType
type,
int desiredWidth, int desiredHeight)
{
UnRef();
int desiredWidth, int desiredHeight)
{
UnRef();
-
- m_refData = new wxBitmapRefData;
-
+
wxBitmapHandler *handler = FindHandler(type);
if ( handler )
wxBitmapHandler *handler = FindHandler(type);
if ( handler )
- return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
+ return handler->LoadFile(this, filename, type,
+ desiredWidth, desiredHeight);
else
else
- return
FALSE
;
+ return
false
;
}
}
-