Skip to content

Commit

Permalink
Make wxVariantTreeItemData and wxVariantClientData inherit from wxVar…
Browse files Browse the repository at this point in the history
…iant
  • Loading branch information
dontpanic92 committed Jan 3, 2017
1 parent 8522c9c commit 677e3bd
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 32 deletions.
16 changes: 0 additions & 16 deletions src/wxClientData.i
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,3 @@
#include "wx/clntdata.h"
%}
%include "wxGoInterface/clntdata.h"

WXGO_DECL_TYPECONV(VariantClientData)
%inline {
class wxVariantClientData : public wxClientData {
public:
wxVariantClientData(const wxVariant& data) {
m_variantData = data;
}

wxVariant& GetData() {
return m_variantData;
}
protected:
wxVariant m_variantData;
};
}
64 changes: 64 additions & 0 deletions src/wxMisc.i
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,67 @@
%include "wxGoInterface/variant.h"
%include "wxGoInterface/versioninfo.h"
%include "wxGoInterface/wupdlock.h"

WXGO_DECL_TYPECONV(VariantClientData)
%inline {
class wxVariantClientData : public wxClientData, public wxVariant {
public:
wxVariantClientData(const wxVariant& variant) : wxVariant(variant) {}

wxVariantClientData(const wxString& value) : wxVariant(value) {}

wxVariantClientData(wxChar value) : wxVariant(value) {}

wxVariantClientData(long value) : wxVariant(value) {}

wxVariantClientData(bool value) : wxVariant(value) {}

wxVariantClientData(double value) : wxVariant(value) {}

wxVariantClientData(wxLongLong value) : wxVariant(value) {}

wxVariantClientData(wxULongLong value) : wxVariant(value) {}

wxVariantClientData(const wxVariantList& value) : wxVariant(value) {}

wxVariantClientData(void* value) : wxVariant(value) {}

wxVariantClientData(wxObject* value) : wxVariant(value) {}

wxVariantClientData(const wxDateTime& value) : wxVariant(value) {}

wxVariantClientData(const wxArrayString& value) : wxVariant(value) {}
};
}

WXGO_DECL_TYPECONV(VariantTreeItemData)
%inline {
class wxVariantTreeItemData : public wxTreeItemData, public wxVariant {
public:
wxVariantTreeItemData(const wxVariant& variant) : wxVariant(variant) {}

wxVariantTreeItemData(const wxString& value) : wxVariant(value) {}

wxVariantTreeItemData(wxChar value) : wxVariant(value) {}

wxVariantTreeItemData(long value) : wxVariant(value) {}

wxVariantTreeItemData(bool value) : wxVariant(value) {}

wxVariantTreeItemData(double value) : wxVariant(value) {}

wxVariantTreeItemData(wxLongLong value) : wxVariant(value) {}

wxVariantTreeItemData(wxULongLong value) : wxVariant(value) {}

wxVariantTreeItemData(const wxVariantList& value) : wxVariant(value) {}

wxVariantTreeItemData(void* value) : wxVariant(value) {}

wxVariantTreeItemData(wxObject* value) : wxVariant(value) {}

wxVariantTreeItemData(const wxDateTime& value) : wxVariant(value) {}

wxVariantTreeItemData(const wxArrayString& value) : wxVariant(value) {}
};
}
16 changes: 0 additions & 16 deletions src/wxTree.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,3 @@
%include "wxGoInterface/treebook.h"
%include "wxGoInterface/treectrl.h"
%include "wxGoInterface/treelist.h"

WXGO_DECL_TYPECONV(VariantTreeItemData)
%inline {
class wxVariantTreeItemData : public wxTreeItemData {
public:
wxVariantTreeItemData(const wxVariant& data) {
m_variantData = data;
}

wxVariant& GetData() {
return m_variantData;
}
protected:
wxVariant m_variantData;
};
}

0 comments on commit 677e3bd

Please sign in to comment.