forked from jodonoghue/wxHaskell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request jodonoghue#20 from AB12345678/master
Added support for Pickerctrl,Hyperlinkctrl and some Streams in wxc an…
- Loading branch information
Showing
9 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include "wrapper.h" | ||
#include <wx/hyperlink.h> | ||
|
||
extern "C" | ||
{ | ||
|
||
EWXWEXPORT(wxHyperlinkCtrl*,wxHyperlinkCtrl_Create)(wxWindow* parent,int id,const wxString& label,const wxString &url, int x, int y, int w, int h, int style) | ||
{ | ||
return new wxHyperlinkCtrl(parent, id, label, url, wxPoint(x, y), wxSize(w, h), style); | ||
} | ||
|
||
EWXWEXPORT(wxColour,wxHyperlinkCtrl_GetHoverColour)(wxHyperlinkCtrl* self) | ||
{ | ||
return self->GetHoverColour(); | ||
} | ||
|
||
EWXWEXPORT(wxColour,wxHyperlinkCtrl_GetNormalColour)(wxHyperlinkCtrl* self) | ||
{ | ||
return self->GetNormalColour(); | ||
} | ||
|
||
EWXWEXPORT(wxString,wxHyperlinkCtrl_GetURL)(wxHyperlinkCtrl* self) | ||
{ | ||
return self->GetURL(); | ||
} | ||
|
||
EWXWEXPORT(bool,wxHyperlinkCtrl_GetVisited)(wxHyperlinkCtrl* self) | ||
{ | ||
return self->GetVisited(); | ||
} | ||
|
||
EWXWEXPORT(wxColour,wxHyperlinkCtrl_GetVisitedColour)(wxHyperlinkCtrl* self) | ||
{ | ||
return self->GetVisitedColour(); | ||
} | ||
|
||
EWXWEXPORT(void,wxHyperlinkCtrl_SetHoverColour)(wxHyperlinkCtrl* self,const wxColour &colour) | ||
{ | ||
self->SetHoverColour(colour); | ||
} | ||
|
||
EWXWEXPORT(void,wxHyperlinkCtrl_SetNormalColour)(wxHyperlinkCtrl* self,const wxColour &colour) | ||
{ | ||
self->SetNormalColour(colour); | ||
} | ||
|
||
EWXWEXPORT(void,wxHyperlinkCtrl_SetURL)(wxHyperlinkCtrl* self,const wxString &url) | ||
{ | ||
self->SetURL(url); | ||
} | ||
|
||
EWXWEXPORT(void,wxHyperlinkCtrl_SetVisited)(wxHyperlinkCtrl* self,bool visited) | ||
{ | ||
self->SetVisited(visited); | ||
} | ||
|
||
EWXWEXPORT(void,wxHyperlinkCtrl_SetVisitedColour)(wxHyperlinkCtrl* self,const wxColour &colour) | ||
{ | ||
self->SetVisitedColour(colour); | ||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "wrapper.h" | ||
#include <wx/clrpicker.h> | ||
|
||
|
||
extern "C" | ||
{ | ||
|
||
EWXWEXPORT( wxColourPickerCtrl*,wxColorPickerCtrl_Create)(wxWindow* parent,int id,const wxColour& colour, int x, int y, int w, int h, int style) | ||
{ | ||
return new wxColourPickerCtrl(parent, id, colour, wxPoint(x, y), wxSize(w, h), style); | ||
} | ||
|
||
EWXWEXPORT( void,wxColorPickerCtrl_GetColour)(wxColourPickerCtrl* self, wxColour* colour) | ||
{ | ||
*colour = self->GetColour(); | ||
} | ||
|
||
EWXWEXPORT( void,wxColorPickerCtrl_SetColour)(wxColourPickerCtrl* self,const wxColour &colour) | ||
{ | ||
self->SetColour(colour); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#include "wrapper.h" | ||
#include <wx/wfstream.h> | ||
|
||
extern "C" | ||
{ | ||
|
||
/*----------------------------------------------------------------------------- | ||
Memory Input stream | ||
-----------------------------------------------------------------------------*/ | ||
|
||
EWXWEXPORT( wxMemoryInputStream*, wxMemoryInputStream_Create)(void* data,int len) | ||
{ | ||
return new wxMemoryInputStream((unsigned char*) data,len); | ||
} | ||
|
||
EWXWEXPORT( void, wxMemoryInputStream_Delete)(wxMemoryInputStream* self) | ||
{ | ||
if (self) delete self; | ||
} | ||
|
||
/*----------------------------------------------------------------------------- | ||
File Input stream | ||
-----------------------------------------------------------------------------*/ | ||
|
||
EWXWEXPORT( wxFileInputStream*, wxFileInputStream_Create)(wxString* ofileName) | ||
{ | ||
return new wxFileInputStream(*ofileName); | ||
} | ||
|
||
EWXWEXPORT( void, wxFileInputStream_Delete)(wxFileInputStream* self) | ||
{ | ||
if (self) delete self; | ||
} | ||
|
||
EWXWEXPORT( bool, wxFileInputStream_IsOk)(wxFileInputStream* self) | ||
{ | ||
return self->IsOk(); | ||
} | ||
|
||
/*----------------------------------------------------------------------------- | ||
File Output stream | ||
-----------------------------------------------------------------------------*/ | ||
|
||
EWXWEXPORT( wxFileOutputStream*, wxFileOutputStream_Create)(wxString* ofileName) | ||
{ | ||
return new wxFileOutputStream(*ofileName); | ||
} | ||
|
||
EWXWEXPORT( void, wxFileOutputStream_Delete)(wxFileOutputStream* self) | ||
{ | ||
if (self) delete self; | ||
} | ||
|
||
EWXWEXPORT( bool, wxFileOutputStream_IsOk)(wxFileOutputStream* self) | ||
{ | ||
return self->IsOk(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/*----------------------------------------------------------------------------- | ||
HyperlinkCtrl | ||
-----------------------------------------------------------------------------*/ | ||
|
||
TClassDefExtend(wxHyperlinkCtrl,wxControl); | ||
|
||
|
||
TClass(wxHyperlinkCtrl) wxHyperlinkCtrl_Create( TClass(wxWindow) parent, int id, TClass(wxString) label,TClass(wxString) url, TRect(x,y,w,h), int style); | ||
TClass(wxColour) wxHyperlinkCtrl_GetHoverColour( TSelf(wxHyperlinkCtrl) self); | ||
TClass(wxColour) wxHyperlinkCtrl_GetNormalColour( TSelf(wxHyperlinkCtrl) self); | ||
TClass(wxString) wxHyperlinkCtrl_GetURL( TSelf(wxHyperlinkCtrl) self); | ||
TBool wxHyperlinkCtrl_GetVisited( TSelf(wxHyperlinkCtrl) self); | ||
TClass(wxColour) wxHyperlinkCtrl_GetVisitedColour( TSelf(wxHyperlinkCtrl) self); | ||
void wxHyperlinkCtrl_SetHoverColour( TSelf(wxHyperlinkCtrl) self, TClass(wxColour) colour); | ||
void wxHyperlinkCtrl_SetNormalColour( TSelf(wxHyperlinkCtrl) self, TClass(wxColour) colour); | ||
void wxHyperlinkCtrl_SetURL( TSelf(wxHyperlinkCtrl) self, TClass(wxString) url); | ||
void wxHyperlinkCtrl_SetVisited( TSelf(wxHyperlinkCtrl) self, TBool visited); | ||
void wxHyperlinkCtrl_SetVisitedColour( TSelf(wxHyperlinkCtrl) self, TClass(wxColour) colour); | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/*----------------------------------------------------------------------------- | ||
PickerBase | ||
-----------------------------------------------------------------------------*/ | ||
|
||
TClassDefExtend( wxPickerBase,wxControl); | ||
|
||
/*----------------------------------------------------------------------------- | ||
ColourPickerCtrl | ||
-----------------------------------------------------------------------------*/ | ||
|
||
TClassDefExtend( wxColourPickerCtrl,wxPickerBase); | ||
|
||
// wxdirect ignore wxColour.. -> wxColorPickerCtrl_.. without u | ||
TClass(wxColourPickerCtrl) wxColorPickerCtrl_Create( TClass(wxWindow) parent, int id, TClass(wxColour) colour, TRect(x,y,w,h), int style); | ||
void wxColorPickerCtrl_GetColour( TSelf(wxColourPickerCtrl) self,TClassRef(wxColour) colour); | ||
void wxColorPickerCtrl_SetColour( TSelf(wxColourPickerCtrl) self, TClass(wxColour) colour); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef FILESTEAM_H | ||
#define FILESTEAM_H | ||
|
||
/*----------------------------------------------------------------------------- | ||
Memory Input stream | ||
-----------------------------------------------------------------------------*/ | ||
|
||
TClass(wxMemoryInputStream) wxMemoryInputStream_Create(void* data,int len); | ||
void wxMemoryInputStream_Delete( TSelf(wxMemoryInputStream) self ); | ||
|
||
/*----------------------------------------------------------------------------- | ||
File Input stream | ||
-----------------------------------------------------------------------------*/ | ||
|
||
TClass(wxFileInputStream) wxFileInputStream_Create(TClass(wxString) ofileName); | ||
void wxFileInputStream_Delete( TSelf(wxFileInputStream) self ); | ||
TBool wxFileInputStream_IsOk( TSelf(wxFileInputStream) self); | ||
|
||
/*----------------------------------------------------------------------------- | ||
File Output stream | ||
-----------------------------------------------------------------------------*/ | ||
|
||
TClass(wxFileOutputStream) wxFileOutputStream_Create(TClass(wxString) ofileName); | ||
void wxFileOutputStream_Delete( TSelf(wxFileOutputStream) self ); | ||
TBool wxFileOutputStream_IsOk( TSelf(wxFileOutputStream) self); | ||
|
||
#endif /* FILESTEAM_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters