-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1e38a4
commit c978fc5
Showing
37 changed files
with
165,619 additions
and
57,546 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
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 @@ | ||
Binary files swig_original/.git/index and swig/.git/index differ | ||
diff -uNr swig_original/.git/ORIG_HEAD swig/.git/ORIG_HEAD | ||
--- swig_original/.git/ORIG_HEAD 2016-05-15 18:24:45.679568751 +0800 | ||
+++ swig/.git/ORIG_HEAD 1970-01-01 08:00:00.000000000 +0800 | ||
@@ -1 +0,0 @@ | ||
-809d54b13a1e032857838efbcbf6162b64c63984 | ||
diff -uNr swig_original/Source/Modules/go.cxx swig/Source/Modules/go.cxx | ||
--- swig_original/Source/Modules/go.cxx 2016-05-15 18:24:45.666235417 +0800 | ||
+++ swig/Source/Modules/go.cxx 2016-05-15 18:11:11.339536341 +0800 | ||
@@ -6525,8 +6525,10 @@ | ||
break; | ||
} | ||
} | ||
- | ||
- if (Getattr(undefined_types, ty) && !Getattr(defined_types, ty)) { | ||
+ | ||
+ String* go_type = goType(n, ty); | ||
+ | ||
+ if (Getattr(undefined_types, go_type) && !Getattr(defined_types, go_type)) { | ||
return goWrapperType(n, type, true); | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
File renamed without changes
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,75 @@ | ||
package main | ||
|
||
import "wx" | ||
|
||
type ControlDialog struct { | ||
wx.Dialog | ||
} | ||
|
||
func NewControlDialog() ControlDialog { | ||
var f ControlDialog | ||
f.Dialog = wx.NewDialog() | ||
f.Create(wx.NullWindow, -1, "Controls") | ||
|
||
|
||
f.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) | ||
|
||
bSizer2 := wx.NewBoxSizer( wx.HORIZONTAL ) | ||
bSizer3 := wx.NewBoxSizer( wx.VERTICAL ) | ||
|
||
|
||
m_radioBox2 := wx.NewRadioBox( f, wx.ID_ANY, "wxRadioBox", wx.DefaultPosition, wx.DefaultSize, []string{"aaa", "bbb"}, 1, wx.HORIZONTAL ) | ||
m_radioBox2.SetSelection( 0 ) | ||
bSizer3.Add( m_radioBox2, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
m_checkBox2 := wx.NewCheckBox( f, wx.ID_ANY, "Check Me!", wx.DefaultPosition, wx.DefaultSize, 0) | ||
bSizer3.Add( m_checkBox2, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
m_staticText2 := wx.NewStaticText( f, wx.ID_ANY, "MyLabel", wx.DefaultPosition, wx.DefaultSize, 0) | ||
m_staticText2.Wrap( -1 ) | ||
bSizer3.Add( m_staticText2, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
m_textCtrl2 := wx.NewTextCtrl( f, wx.ID_ANY, "", wx.DefaultPosition, wx.DefaultSize, 0) | ||
bSizer3.Add( m_textCtrl2, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
m_slider1 := wx.NewSlider( f, wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.HORIZONTAL ) | ||
bSizer3.Add( m_slider1, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
|
||
bSizer2.Add( bSizer3, 1, wx.EXPAND, 5 ) | ||
|
||
bSizer4 := wx.NewBoxSizer( wx.VERTICAL ) | ||
|
||
|
||
m_listBox2 := wx.NewListBox( f, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, []string{"aaa", "bbb"}, 0) | ||
m_listBox2.InsertItems([]string{"ccc"}, 1) | ||
bSizer4.Add( m_listBox2, 1, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
m_gauge1 := wx.NewGauge( f, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.HORIZONTAL ) | ||
m_gauge1.SetValue( 50 ) | ||
bSizer4.Add( m_gauge1, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
m_button5 := wx.NewButton( f, wx.ID_ANY, "MyButton", wx.DefaultPosition, wx.DefaultSize, 0) | ||
bSizer4.Add( m_button5, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
m_button6 := wx.NewButton( f, wx.ID_ANY, "MyButton", wx.DefaultPosition, wx.DefaultSize, 0) | ||
bSizer4.Add( m_button6, 0, wx.ALL|wx.EXPAND, 5 ) | ||
|
||
|
||
bSizer2.Add( bSizer4, 1, wx.EXPAND, 5 ) | ||
|
||
|
||
f.SetSizer( bSizer2 ) | ||
f.Layout() | ||
|
||
f.Centre( wx.BOTH ) | ||
|
||
return f | ||
} | ||
|
||
func main() { | ||
wx.NewApp() | ||
f := NewControlDialog() | ||
f.ShowModal() | ||
return | ||
} |
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,127 @@ | ||
package main | ||
|
||
import "wx" | ||
|
||
//Frame Struct def | ||
type MyFrame struct { | ||
wx.Frame | ||
statusbar wx.StatusBar | ||
toolbar wx.ToolBar | ||
menubar wx.MenuBar | ||
notebook wx.AuiNotebook | ||
} | ||
|
||
//Menu Event Functions def | ||
func (f *MyFrame)evtColour(wx.Event) { | ||
colourdlg := wx.NewColourDialog(f) | ||
if colourdlg.ShowModal() == wx.ID_OK{ | ||
colour := colourdlg.GetColourData().GetColour() | ||
f.notebook.GetCurrentPage().SetForegroundColour(colour) | ||
} | ||
colourdlg.Destroy() | ||
} | ||
|
||
func (f *MyFrame)evtFont(wx.Event) { | ||
fontdlg := wx.NewFontDialog(f) | ||
if fontdlg.ShowModal() == wx.ID_OK{ | ||
font := fontdlg.GetFontData().GetChosenFont() | ||
f.notebook.GetCurrentPage().SetFont(font) | ||
} | ||
fontdlg.Destroy() | ||
} | ||
|
||
func (f *MyFrame)evtOpenFile(wx.Event) { | ||
path := wx.LoadFileSelector("Text", "*") | ||
if path != "" { | ||
textCtrl := wx.NewTextCtrl(f.notebook, wx.ID_ANY, "", wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE) | ||
textCtrl.SetMinSize(wx.NewSize(600, 400)) | ||
f.notebook.AddPage(textCtrl, path) | ||
textCtrl.LoadFile(path) | ||
textCtrl.SetFocus() | ||
} | ||
} | ||
|
||
func (f *MyFrame)evtAbout(wx.Event) { | ||
aboutinfo := wx.NewAboutDialogInfo() | ||
aboutinfo.SetName("Dapeton") | ||
aboutinfo.AddDeveloper("dontpanic") | ||
aboutinfo.SetDescription("Dapeton is a notepad using wxGo.") | ||
aboutinfo.SetWebSite("http://github.com/dontpanic92/wxGo") | ||
aboutinfo.SetVersion("0.1") | ||
wx.AboutBox(aboutinfo) | ||
} | ||
|
||
//Frame Init def | ||
func NewMyFrame() MyFrame { | ||
var f MyFrame | ||
f.Frame = wx.NewFrame() | ||
f.Create(wx.NullWindow, -1, "Dapeton") | ||
|
||
f.statusbar = f.CreateStatusBar() | ||
f.statusbar.SetStatusText("Welcome to wxWidgets") | ||
|
||
f.statusbar.SetFieldsCount(2) | ||
f.statusbar.SetStatusText("This is a statusbar!", 1) | ||
|
||
f.menubar = wx.NewMenuBar() | ||
menuFile := wx.NewMenu() | ||
menuEdit := wx.NewMenu() | ||
menuHelp := wx.NewMenu() | ||
|
||
menuItemOpenFile := wx.NewMenuItem(menuFile, wx.ID_ANY, "&Open...", "Open a File", wx.ITEM_NORMAL) | ||
menuFile.Append(menuItemOpenFile) | ||
menuItemExit := wx.NewMenuItem(menuFile, wx.ID_ANY, "&Exit", "Exit", wx.ITEM_NORMAL) | ||
menuFile.Append(menuItemExit) | ||
menuItemFont := wx.NewMenuItem(menuFile, wx.ID_ANY, "&Font...", "Select a Font", wx.ITEM_NORMAL) | ||
menuEdit.Append(menuItemFont) | ||
menuItemColour := wx.NewMenuItem(menuFile, wx.ID_ANY, "&Colour...", "Select a Colour", wx.ITEM_NORMAL) | ||
menuEdit.Append(menuItemColour) | ||
menuItemAbout := wx.NewMenuItem(menuFile, wx.ID_ANY, "&About", "About", wx.ITEM_NORMAL) | ||
menuHelp.Append(menuItemAbout) | ||
|
||
f.menubar.Append(menuFile, "&File") | ||
f.menubar.Append(menuEdit, "&Edit") | ||
f.menubar.Append(menuHelp, "&Help") | ||
f.SetMenuBar(f.menubar) | ||
|
||
|
||
f.toolbar = f.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY ) | ||
//f.toolbar.AddTool( wx.ID_ANY, "tool", wx.GetNullBitmap()) | ||
f.toolbar.AddSeparator() | ||
//f.toolbar.AddTool( wx.ID_ANY, "tool", wx.GetNullBitmap()) | ||
f.toolbar.Realize() | ||
|
||
|
||
mainSizer := wx.NewBoxSizer(wx.HORIZONTAL ) | ||
f.SetSizer(mainSizer) | ||
|
||
f.notebook = wx.NewAuiNotebook(f, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.AUI_NB_DEFAULT_STYLE | wx.AUI_NB_CLOSE_BUTTON) | ||
|
||
mainSizer.Add(f.notebook, 1, wx.EXPAND, 5) | ||
|
||
textCtrl := wx.NewTextCtrl(f.notebook, wx.ID_ANY, "", wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE) | ||
textCtrl.SetMinSize(wx.NewSize(600, 400)) | ||
|
||
f.notebook.AddPage(textCtrl, "Untitled", true) | ||
textCtrl.SetFocus() | ||
|
||
f.Layout() | ||
|
||
wx.Bind( f, wx.EVT_MENU, f.evtFont, menuItemFont.GetId() ) | ||
wx.Bind( f, wx.EVT_MENU, f.evtColour, menuItemColour.GetId() ) | ||
wx.Bind( f, wx.EVT_MENU, f.evtOpenFile, menuItemOpenFile.GetId() ) | ||
wx.Bind( f, wx.EVT_MENU, f.evtAbout, menuItemAbout.GetId() ) | ||
|
||
//wx.Unbind( f, wx.EVT_MENU, f.evtAbout, menuItemAbout.GetId() ) | ||
|
||
return f | ||
} | ||
|
||
//Main Function | ||
func main() { | ||
wx1 := wx.NewApp() | ||
f := NewMyFrame() | ||
f.Show() | ||
wx1.MainLoop() | ||
return | ||
} |
Oops, something went wrong.