Permalink
Browse files

Solved warnings about deprecated methods and duplicate constant defin…

…ition

This solves bug ticket 86
  • Loading branch information...
1 parent 4fbba6f commit 2305172e9d7208a7de456b55738b1e2e220326ca @HJvT HJvT committed Jun 28, 2014
@@ -268,7 +268,7 @@ instance Able (MenuItem a) where
instance Textual (MenuItem a) where
text
- = reflectiveAttr "text" menuItemGetText menuItemSetText
+ = reflectiveAttr "text" menuItemGetItemLabel menuItemSetItemLabel
instance Help (MenuItem a) where
help = newAttr "help" menuItemGetHelp menuItemSetHelp
View
@@ -1405,9 +1405,6 @@ MAKE_EVENT_WRAPPER(EVT_COMMAND_KILL_FOCUS)
MAKE_EVENT_WRAPPER(EVT_COMMAND_ENTER)
MAKE_EVENT_WRAPPER(EVT_HELP)
MAKE_EVENT_WRAPPER(EVT_DETAILED_HELP)
-
-// these 2 events are the same
-#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_COMMAND_MENU_SELECTED
MAKE_EVENT_WRAPPER(EVT_COMMAND_TOOL_CLICKED)
// from filectrl.h
View
@@ -754,9 +754,9 @@ EWXWEXPORT(void,wxGrid_DisableDragRowSize)(wxGrid* self)
self->DisableDragRowSize();
}
-EWXWEXPORT(bool,wxGrid_CanDragRowSize)(wxGrid* self)
+EWXWEXPORT(bool, wxGrid_CanDragRowSize)(wxGrid* self, int row)
{
- return self->CanDragRowSize();
+ return self->CanDragRowSize(row);
}
EWXWEXPORT(void,wxGrid_EnableDragColSize)(wxGrid* self,bool enable)
@@ -769,9 +769,9 @@ EWXWEXPORT(void,wxGrid_DisableDragColSize)(wxGrid* self)
self->DisableDragColSize();
}
-EWXWEXPORT(bool,wxGrid_CanDragColSize)(wxGrid* self)
+EWXWEXPORT(bool, wxGrid_CanDragColSize)(wxGrid* self, int col)
{
- return self->CanDragColSize();
+ return self->CanDragColSize(col);
}
EWXWEXPORT(void,wxGrid_EnableDragGridSize)(wxGrid* self,bool enable)
@@ -12,7 +12,7 @@ EWXWEXPORT(void*,wxIconBundle_CreateDefault)()
EWXWEXPORT(void*,wxIconBundle_CreateFromFile)(wxString* file,int type)
{
- return (void*)new wxIconBundle(*file, (long)type);
+ return (void*)new wxIconBundle(*file, (wxBitmapType)type);
}
EWXWEXPORT(void*,wxIconBundle_CreateFromIcon)(void* icon)
@@ -32,7 +32,7 @@ EWXWEXPORT(void,wxIconBundle_Delete)(void* _obj)
EWXWEXPORT(void,wxIconBundle_AddIconFromFile)(void* _obj,wxString* file,int type)
{
- ((wxIconBundle*)_obj)->AddIcon(*file, (long)type);
+ ((wxIconBundle*)_obj)->AddIcon(*file, (wxBitmapType)type);
}
EWXWEXPORT(void,wxIconBundle_AddIcon)(void* _obj,void* icon)
View
@@ -13,19 +13,17 @@ EWXWEXPORT(wxImage*,wxImage_CreateSized)(int width,int height)
return new wxImage(width, height);
}
-EWXWEXPORT(wxImage*,wxImage_CreateFromByteString)(char* data,size_t length,int type)
+EWXWEXPORT(wxImage*, wxImage_CreateFromByteString)(const wxSize &sz, unsigned char *data)
{
- wxMemoryInputStream in(data,length);
- return new wxImage(in, type);
+ return new wxImage(sz, data);
}
-EWXWEXPORT(wxImage*,wxImage_CreateFromLazyByteString)(char* data,size_t length,int type)
+EWXWEXPORT(wxImage*, wxImage_CreateFromLazyByteString)(const wxSize &sz, unsigned char *data)
{
- wxMemoryInputStream in(data,length);
- return new wxImage(in, type);
+ return new wxImage(sz, data);
}
-EWXWEXPORT(size_t,wxImage_ConvertToByteString)(wxImage* self,int type,char* data)
+EWXWEXPORT(size_t, wxImage_ConvertToByteString)(wxImage *self, wxBitmapType type, char *data)
{
wxMemoryOutputStream out;
self->SaveFile(out, type);
@@ -34,7 +32,7 @@ EWXWEXPORT(size_t,wxImage_ConvertToByteString)(wxImage* self,int type,char* data
return out.CopyTo(data, len);
}
-EWXWEXPORT(size_t,wxImage_ConvertToLazyByteString)(wxImage* self,int type,char* data)
+EWXWEXPORT(size_t, wxImage_ConvertToLazyByteString)(wxImage *self, wxBitmapType type, char *data)
{
wxMemoryOutputStream out;
self->SaveFile(out, type);
@@ -144,14 +142,14 @@ EWXWEXPORT(bool,wxImage_CanRead)(wxString* name)
return wxImage::CanRead(*name);
}
-EWXWEXPORT(bool,wxImage_LoadFile)(wxImage* self,wxString* name,int type)
+EWXWEXPORT(bool, wxImage_LoadFile)(wxImage *self, wxString *name, wxBitmapType type)
{
- return self->LoadFile(*name, (long)type);
+ return self->LoadFile(*name, type);
}
-EWXWEXPORT(bool,wxImage_SaveFile)(wxImage* self,wxString* name,int type)
+EWXWEXPORT(bool, wxImage_SaveFile)(wxImage *self, wxString *name, wxBitmapType type)
{
- return self->SaveFile(*name, (long)type);
+ return self->SaveFile(*name, type);
}
EWXWEXPORT(bool,wxImage_IsOk)(wxImage* self)
View
@@ -102,11 +102,6 @@ EWXWEXPORT(void,ELJLog_DontCreateOnDemand)(ELJLog* self)
self->DontCreateOnDemand();
}
-EWXWEXPORT(void,ELJLog_SetTraceMask)(ELJLog* self,int ulMask)
-{
- self->SetTraceMask((wxTraceMask)ulMask);
-}
-
EWXWEXPORT(void,ELJLog_AddTraceMask)(ELJLog* self,void* str)
{
self->AddTraceMask((const wxChar*)str);
View
@@ -148,10 +148,10 @@ EWXWEXPORT(void,wxMenu_SetLabel)(wxMenu* self,int id,wxString* label)
self->SetLabel(id,*label);
}
-EWXWEXPORT(wxString*,wxMenu_GetLabel)(wxMenu* self,int id)
+EWXWEXPORT(wxString*, wxMenu_GetLabelText)(wxMenu* self, int id)
{
wxString *result = new wxString();
- *result = self->GetLabel(id);
+ *result = self->GetLabelText(id);
return result;
}
@@ -260,29 +260,29 @@ EWXWEXPORT(bool,wxMenuItem_IsSeparator)(wxMenuItem* self)
return self->IsSeparator();
}
-EWXWEXPORT(void,wxMenuItem_SetText)(wxMenuItem* self,wxString* str)
+EWXWEXPORT(void, wxMenuItem_SetItemLabel)(wxMenuItem* self, wxString* str)
{
- self->SetText(*str);
+ self->SetItemLabel(*str);
}
-EWXWEXPORT(wxString*,wxMenuItem_GetLabel)(wxMenuItem* self)
+EWXWEXPORT(wxString*, wxMenuItem_GetItemLabelText)(wxMenuItem* self)
{
wxString *result = new wxString();
- *result = self->GetLabel();
+ *result = self->GetItemLabelText();
return result;
}
-EWXWEXPORT(wxString*,wxMenuItem_GetText)(wxMenuItem* self)
+EWXWEXPORT(wxString*, wxMenuItem_GetItemLabel)(wxMenuItem* self)
{
wxString *result = new wxString();
- *result = self->GetText();
+ *result = self->GetItemLabel();
return result;
}
-EWXWEXPORT(wxString*,wxMenuItem_GetLabelFromText)(wxString* text)
+EWXWEXPORT(wxString*, wxMenuItem_GetLabelText)(wxString* text)
{
wxString *result = new wxString();
- *result = wxMenuItem::GetLabelFromText(* text);
+ *result = wxMenuItem::GetLabelText(* text);
return result;
}
@@ -48,15 +48,15 @@ EWXWEXPORT(void,wxMenuBar_EnableTop)(wxMenuBar* self,int pos,bool enable)
self->EnableTop((size_t) pos, enable);
}
-EWXWEXPORT(void,wxMenuBar_SetLabelTop)(wxMenuBar* self,int pos,wxString* label)
+EWXWEXPORT(void, wxMenuBar_SetMenuLabel)(wxMenuBar* self, int pos, wxString* label)
{
- self->SetLabelTop((size_t) pos,*label);
+ self->SetMenuLabel((size_t) pos,*label);
}
-EWXWEXPORT(wxString*,wxMenuBar_GetLabelTop)(wxMenuBar* self,int pos)
+EWXWEXPORT(wxString*, wxMenuBar_GetMenuLabel)(wxMenuBar* self, int pos)
{
wxString *result = new wxString();
- *result = self->GetLabelTop((size_t) pos);
+ *result = self->GetMenuLabel((size_t) pos);
return result;
}
@@ -396,7 +396,7 @@ EWXWEXPORT(void,wxPrintData_SetCollate)(wxPrintData* self,bool flag)
EWXWEXPORT(void,wxPrintData_SetOrientation)(wxPrintData* self,int orient)
{
- self->SetOrientation(orient);
+ self->SetOrientation((wxPrintOrientation) orient);
}
EWXWEXPORT(void,wxPrintData_SetPrinterName)(wxPrintData* self,wxString* name)
View
@@ -101,19 +101,21 @@ EWXWEXPORT(wxWindow*,wxSizerItem_GetWindow)(wxSizerItem* self)
return self->GetWindow();
}
-EWXWEXPORT(void,wxSizerItem_SetWindow)(wxSizerItem* self,wxWindow* window)
+// EWXWEXPORT(void,wxSizerItem_SetWindow)(wxSizerItem* self,wxWindow* window)
+EWXWEXPORT(void, wxSizerItem_AssignWindow)(wxSizerItem* self, wxWindow* window)
{
- self->SetWindow(window);
+ self->AssignWindow(window);
}
EWXWEXPORT(void*,wxSizerItem_GetSizer)(wxSizerItem* self)
{
return (void*)self->GetSizer();
}
-EWXWEXPORT(void,wxSizerItem_SetSizer)(wxSizerItem* self,wxSizer* sizer)
+// EWXWEXPORT(void,wxSizerItem_SetSizer)(wxSizerItem* self,wxSizer* sizer)
+EWXWEXPORT(void, wxSizerItem_AssignSizer)(wxSizerItem* self, wxSizer* sizer)
{
- self->SetSizer(sizer);
+ self->AssignSizer(sizer);
}
#if (wxVERSION_NUMBER < 2800)
@@ -194,9 +196,10 @@ EWXWEXPORT(void,wxSizerItem_SetProportion)(wxSizerItem* self,int proportion)
self->SetProportion(proportion);
}
-EWXWEXPORT(void,wxSizerItem_SetSpacer)(wxSizerItem* self,int width,int height)
+// EWXWEXPORT(void,wxSizerItem_SetSpacer)(wxSizerItem* self,int width,int height)
+EWXWEXPORT(void, wxSizerItem_AssignSpacer)(wxSizerItem* self, int width, int height)
{
- self->SetSpacer(wxSize(width, height));
+ self->AssignSpacer(wxSize(width, height));
}
EWXWEXPORT(void,wxSizerItem_Show)(wxSizerItem* self,int show)
@@ -474,10 +477,9 @@ EWXWEXPORT(bool,wxSizer_Replace)(wxSizer* self,int oldindex,wxSizerItem* newsz)
return self->Replace((size_t) oldindex,newsz);
}
-EWXWEXPORT(void,wxSizer_SetVirtualSizeHints)(wxSizer* self,wxWindow* window)
-{
- self->SetVirtualSizeHints(window);
-}
+/* Deprecated; replace with wxSizer_FitInside
+// EWXWEXPORT(void,wxSizer_SetVirtualSizeHints)(wxSizer* self,wxWindow* window)
+*/
EWXWEXPORT(bool,wxSizer_ShowWindow)(wxSizer* self,wxWindow* window,bool show,bool recursive)
{
@@ -34,10 +34,8 @@ EWXWEXPORT(int,wxSlider_GetMax)(void* _obj)
return ((wxSlider*)_obj)->GetMax();
}
-EWXWEXPORT(void,wxSlider_SetTickFreq)(void* _obj, int n, int pos)
-{
- ((wxSlider*)_obj)->SetTickFreq(n, pos);
-}
+// Obsolete
+// EWXWEXPORT(void,wxSlider_SetTickFreq)(void* _obj, int n, int pos)
EWXWEXPORT(int,wxSlider_GetTickFreq)(void* _obj)
{
@@ -58,10 +58,8 @@ EWXWEXPORT(bool,wxSplitterWindow_IsSplit)(wxSplitterWindow* self)
return self->IsSplit();
}
-EWXWEXPORT(void,wxSplitterWindow_SetSashSize)(void* self,int width)
-{
- ((wxSplitterWindow*)self)->SetSashSize(width);
-}
+// Obsolete
+// EWXWEXPORT(void,wxSplitterWindow_SetSashSize)(void* self,int width)
EWXWEXPORT(void,wxSplitterWindow_SetBorderSize)(void* self,int width)
{
View
@@ -23,15 +23,24 @@ EWXWEXPORT(void,wxToolBar_AddSeparator)(wxToolBar* self)
self->AddSeparator ();
}
-EWXWEXPORT(void,wxToolBar_AddTool)(wxToolBar* self,int id,wxBitmap* bmp,wxString* shelp,wxString* lhelp)
+EWXWEXPORT(void, wxToolBar_AddTool)(wxToolBar* self, int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled, wxItemKind kind = wxITEM_NORMAL, const wxString& shortHelp = wxEmptyString, const wxString& longHelp = wxEmptyString, wxObject *data = NULL)
{
- self->AddTool (id,*bmp,*shelp,*lhelp);
+ // the full AddTool() function
+ //
+ // If bmpDisabled is wxNullBitmap, a shadowed version of the normal bitmap
+ // is created and used as the disabled image.
+ self->AddTool(toolid,
+ label,
+ bitmap,
+ bmpDisabled,
+ wxITEM_NORMAL,
+ shortHelp,
+ longHelp,
+ data);
}
-EWXWEXPORT(void,wxToolBar_AddToolEx)(wxToolBar* self,int id,wxBitmap* bmp1,wxBitmap* bmp2,bool tgl,int x,int y,wxObject* dat,wxString* shelp,wxString* lhelp)
-{
- self->AddTool (id,*bmp1,*bmp2, tgl, x, y, dat,*shelp,*lhelp);
-}
+// Obsolete
+// EWXWEXPORT(void,wxToolBar_AddToolEx)(wxToolBar* self,int id,wxBitmap* bmp1,wxBitmap* bmp2,bool tgl,int x,int y,wxObject* dat,wxString* shelp,wxString* lhelp)
EWXWEXPORT(bool,wxToolBar_DeleteTool)(wxToolBar* self,int id)
{
@@ -113,10 +122,8 @@ EWXWEXPORT(void,wxToolBar_InsertSeparator)(wxToolBar* self,int pos)
self->InsertSeparator ((size_t)pos);
}
-EWXWEXPORT(void,wxToolBar_InsertTool)(wxToolBar* self,int pos,int id,wxBitmap* bmp1,wxBitmap* bmp2,bool tgl,wxObject* dat,wxString* shelp,wxString* lhelp)
-{
- self->InsertTool ((size_t)pos, id,*bmp1,*bmp2, tgl, dat,*shelp,*lhelp);
-}
+// Obsolete
+// EWXWEXPORT(void,wxToolBar_InsertTool)(wxToolBar* self,int pos,int id,wxBitmap* bmp1,wxBitmap* bmp2,bool tgl,wxObject* dat,wxString* shelp,wxString* lhelp)
EWXWEXPORT(bool,wxToolBar_Realize)(wxToolBar* self)
{
@@ -45,9 +45,11 @@ EWXWEXPORT(bool,wxValidator_IsSilent)()
}
#endif
-EWXWEXPORT(void,wxValidator_SetBellOnError)(bool doIt)
+// EWXWEXPORT(void,wxValidator_SetBellOnError)(bool doIt)
+EWXWEXPORT(void,wxValidator_SuppressBellOnError)(bool doIt)
{
- wxValidator::SetBellOnError(doIt);
+// wxValidator::SetBellOnError(doIt);
+ wxValidator::SuppressBellOnError(doIt);
}
EWXWEXPORT(void*,wxTextValidator_Create)(int style,void* val)
@@ -223,10 +223,8 @@ EWXWEXPORT(void,wxWindow_SetExtraStyle)(wxWindow* self,long exStyle)
self->SetExtraStyle(exStyle);
}
-EWXWEXPORT(void,wxWindow_MakeModal)(wxWindow* self,bool modal)
-{
- self->MakeModal(modal);
-}
+// Obsolete
+// EWXWEXPORT(void,wxWindow_MakeModal)(wxWindow* self,bool modal)
EWXWEXPORT(void,wxWindow_SetFocus)(wxWindow* self)
{
View
@@ -2321,10 +2321,8 @@ EWXWEXPORT(void,wxLog_DontCreateOnDemand)(wxLog* self)
self->DontCreateOnDemand();
}
-EWXWEXPORT(void,wxLog_SetTraceMask)(wxLog* self,int ulMask)
-{
- self->SetTraceMask((wxTraceMask)ulMask);
-}
+// Obsolete
+// EWXWEXPORT(void,wxLog_SetTraceMask)(wxLog* self,int ulMask)
EWXWEXPORT(void,wxLog_AddTraceMask)(wxLog* self,void* str)
{
View
@@ -392,7 +392,8 @@ void wxLog_RemoveTraceMask( TSelf(wxLog) _obj, TClass(wxString) str );
void wxLog_Resume( TSelf(wxLog) _obj );
TClass(wxLog) wxLog_SetActiveTarget( TSelf(wxLog) pLogger );
void wxLog_SetTimestamp( TSelf(wxLog) _obj, TStringVoid ts );
-void wxLog_SetTraceMask( TSelf(wxLog) _obj, int ulMask );
+// Obsolete
+// void wxLog_SetTraceMask( TSelf(wxLog) _obj, int ulMask );
void wxLog_SetVerbose( TSelf(wxLog) _obj, TBoolInt bVerbose );
void wxLog_Suspend( TSelf(wxLog) _obj );
Oops, something went wrong.

0 comments on commit 2305172

Please sign in to comment.