Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
WxBasic
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Open-source BASIC interpretation software}} {{primary sources|date=November 2014}} {{Lowercase}} {{Infobox software | name = wxBasic | logo = | screenshot = | caption = | collapsible = | author = | developer = David Cuny | released = {{Start date and age|2002}} | latest release version = 2.8.12.43<ref name=news0614>{{cite web|url=http://www.wxbasic.net|title=News, November 2016|publisher=wxbasic.net|access-date=25 September 2017}}</ref> | latest release date = {{Start date and age|2016|11|13}}<ref name=news0614/> | latest preview version = | latest preview date = | frequently updated = | programming language = | operating system = [[Cross-platform]] | platform = | size = | language = | status = | genre = | license = [[GNU Lesser General Public License]] | website = {{URL|wxbasic.net}} }} '''wxBasic''' is a [[free software]] / [[open-source software]], [[cross-platform]] [[BASIC programming language|BASIC]] [[interpreter (computing)|interpreter]]. As it is based on syntax of the BASIC language, it is designed to be simple to learn and understand, and allow novice programmers to write applications for graphical environments like [[Microsoft Windows|Windows]] and [[Linux]] with minimal effort. wxBasic is a [[bytecode]] based language, like [[Perl]] or [[Java (programming language)|Java]]. It is licensed under the [[LGPL]], so [[proprietary software]]'s source code can be linked against it. It can create stand-alone [[executable]]s by binding together [[source code]] with the [[Interpreter (computing)|interpreter]]. In contrast with executables created by similar commercial programs like [[Visual Basic]], executables produced by wxBasic do not require any external [[DLL file]], [[Resource (Windows)|resource file]], or [[installer]] to run. The executable is distributed alone and can be run immediately by [[end-user]]s. As with programs written in any [[interpreted language]], wxBasic programs may also be run straight from the source code on any platform, if wxBasic is present. wxBasic is written primarily in [[C (programming language)|C]], with some [[C++]] linking it to the [[wxWidgets]] library. wxWidgets supplies the cross-platform features. It runs on [[Microsoft Windows]] using native controls, and on [[Linux]] and [[macOS]] using the [[GTK+]] library.<ref>{{cite web|url=https://www.wxbasic.net/downloads|title=Download|publisher=wxbasic.net|access-date=25 September 2017}}</ref> wxBasic is also the basis for the [[SdlBasic]] project. ==Example== The following program implements a text viewer: <syntaxhighlight lang="vbscript"> ' from http://wxbasic.sourceforge.net/phpBB2/viewtopic.php?t=554 ' Simple Text Viewer written in wxBasic dim AppName = "Text Viewer" fileName = "" ' Main window dim frame = new wxFrame( Nothing, -1, AppName & " - Untitled Document" ) ' Text edit control dim control = new wxTextCtrl( frame, -1, "", wxPoint( 0, 0 ), wxSize( 100, 100 ), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH) ' Status bar - The one at the bottom of the window dim status = frame.CreateStatusBar( 1 ) frame.SetStatusText("Ready") ' ' Dialog used for Open dim fileDialog = new wxFileDialog( frame ) ' ' add menubar to the frame dim mBar = new wxMenuBar() frame.SetMenuBar(mBar) ' ' build the "File" dropdown menu dim mFile = new wxMenu() mBar.Append(mFile, "&File") ' make it ' mFile.Append( wxID_OPEN, "&Open...", "Loads an existing file from disk" ) ' mFile.AppendSeparator() mFile.Append( wxID_EXIT, "E&xit\tAlt-X", "Exit Application" ) Sub onFileOpen( event ) fileDialog.SetMessage("Open File") fileDialog.SetStyle( wxOPEN ) If fileDialog.ShowModal() = wxID_OK Then fileName = fileDialog.GetPath() Ext = fileDialog.GetFilename() control.Clear() control.LoadFile( fileName ) frame.SetTitle( AppName & " - " & fileName ) frame.SetStatusText(Ext) End If End Sub ' Connect( frame, wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, "onFileOpen" ) Sub onFileExit( event ) frame.Close(True) End Sub ' Connect( frame, wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, "onFileExit" ) ' build the "Help" dropdown menu dim mHelp = new wxMenu() mBar.Append(mHelp, "&Help") mHelp.Append( wxID_HELP, "&About\tF1", "About this program" ) ' Sub onHelpAbout( event ) Dim msg = "Text View allows any text file\n" & "to be viewed regardless of its extension.\n" & "If the file being opened isn't a text file\n" & "then it won't be displayed. There will be a\n" & "little garbage shown and that's all." wxMessageBox( msg, "About Text View", wxOK + wxICON_INFORMATION, frame ) End Sub Connect( frame, wxID_HELP, wxEVT_COMMAND_MENU_SELECTED, "onHelpAbout" ) frame.Show(True) </syntaxhighlight> ==References== {{reflist}} ==External links== {{Portal|Free Software}} *[http://wxbasic.net WxBasic website] *{{sourceforge|wxbasic}} *[http://wxbasic.sourceforge.net WxBasic Forum] *[http://wiki.wxwidgets.org/WxBasic_Tutorial WxBasic tutorial] {{BASIC}} {{wxWidgets}} [[Category:Free and open source interpreters]] [[Category:Free computer libraries]] [[Category:WxWidgets]] [[Category:Software that uses wxWidgets]] [[Category:Software using the GNU Lesser General Public License]] [[Category:BASIC interpreters]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:BASIC
(
edit
)
Template:Cite web
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Lowercase
(
edit
)
Template:Main other
(
edit
)
Template:Portal
(
edit
)
Template:Primary sources
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Sourceforge
(
edit
)
Template:Template other
(
edit
)
Template:WxWidgets
(
edit
)