WxBasic

Last updated
wxBasic
Developer(s) David Cuny
Initial release2002;21 years ago (2002)
Stable release
2.8.12.43 [1] / November 13, 2016;6 years ago (2016-11-13) [1]
Operating system Cross-platform
License GNU Lesser General Public License
Website wxbasic.net

wxBasic is a free software / open-source software, cross-platform BASIC 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 Windows and Linux with minimal effort. wxBasic is a bytecode based language, like Perl or Java. It is licensed under the LGPL, so proprietary software's source code can be linked against it.

Contents

It can create stand-alone executables by binding together source code with the 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 file, or installer to run. The executable is distributed alone and can be run immediately by end-users. 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, 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. [2] wxBasic is also the basis for the SdlBasic project.

Example

The following program implements a text viewer:

' from http://wxbasic.sourceforge.net/phpBB2/viewtopic.php?t=554' Simple Text Viewer written in wxBasicdimAppName="Text Viewer"fileName=""' Main windowdimframe=newwxFrame(Nothing,-1,AppName&" - Untitled Document")' Text edit controldimcontrol=newwxTextCtrl(frame,-1,"",wxPoint(0,0),wxSize(100,100),wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH)' Status bar - The one at the bottom of the windowdimstatus=frame.CreateStatusBar(1)frame.SetStatusText("Ready")'' Dialog used for OpendimfileDialog=newwxFileDialog(frame)'' add menubar to the framedimmBar=newwxMenuBar()frame.SetMenuBar(mBar)'' build the "File" dropdown menudimmFile=newwxMenu()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")SubonFileOpen(event)fileDialog.SetMessage("Open File")fileDialog.SetStyle(wxOPEN)IffileDialog.ShowModal()=wxID_OKThenfileName=fileDialog.GetPath()Ext=fileDialog.GetFilename()control.Clear()control.LoadFile(fileName)frame.SetTitle(AppName&" - "&fileName)frame.SetStatusText(Ext)EndIfEndSub'Connect(frame,wxID_OPEN,wxEVT_COMMAND_MENU_SELECTED,"onFileOpen")SubonFileExit(event)frame.Close(True)EndSub'Connect(frame,wxID_EXIT,wxEVT_COMMAND_MENU_SELECTED,"onFileExit")' build the "Help" dropdown menudimmHelp=newwxMenu()mBar.Append(mHelp,"&Help")mHelp.Append(wxID_HELP,"&About\tF1","About this program")'SubonHelpAbout(event)Dimmsg="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)EndSubConnect(frame,wxID_HELP,wxEVT_COMMAND_MENU_SELECTED,"onHelpAbout")frame.Show(True)

Related Research Articles

<span class="mw-page-title-main">PureBasic</span>

PureBasic is a commercially distributed procedural computer programming language and integrated development environment based on BASIC and developed by Fantaisie Software for Windows, Linux, and macOS. An Amiga version is available, although it has been discontinued and some parts of it are released as open-source. The first public release of PureBasic for Windows was on 17 December 2000. It has been continually updated ever since.

AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system automation tools. The term "AppleScript" may refer to the language itself, to an individual script written in the language, or, informally, to the macOS Open Scripting Architecture that underlies the language.

Object Linking & Embedding (OLE) is a proprietary technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control Extension (OCX), a way to develop and use custom user interface elements. On a technical level, an OLE object is any object that implements the IOleObject interface, possibly along with a wide range of other interfaces, depending on the object's needs.

<span class="mw-page-title-main">Visual IRC</span> Open source Internet Relay Chat client

Visual IRC (ViRC) is an open-source Internet Relay Chat client for the Windows operating system. Unlike many other IRC clients, nearly all of the functionality in ViRC is driven by the included IRC script, with the result that the program's behavior can be extended or changed without altering the source code.

<span class="mw-page-title-main">Menu (computing)</span> List of options or commands within a computer program

In user interface design, a menu is a list of options or commands presented to the user of a computer or embedded system. A menu may either be a system's entire user interface, or only part of a more complex one.

<span class="mw-page-title-main">Graphical widget</span> Element of interaction in a graphical user interface

A graphical widget in a graphical user interface is an element of interaction, such as a button or a scroll bar. Controls are software components that a computer user interacts with through direct manipulation to read or edit information about an application. User interface libraries such as Windows Presentation Foundation, Qt, GTK, and Cocoa, contain a collection of controls and the logic to render these.

<span class="mw-page-title-main">Fox toolkit</span>

The FOX toolkit is an open-source, cross-platform widget toolkit, i.e. a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X.

wxPython Python wrapper for wxWidgets

wxPython is a wrapper for the cross-platform GUI API wxWidgets for the Python programming language. It is one of the alternatives to Tkinter. It is implemented as a Python extension module.

<span class="mw-page-title-main">Microsoft Project</span> Project management software

Microsoft Project is a project management software product, developed and sold by Microsoft. It is designed to assist a project manager in developing a schedule, assigning resources to tasks, tracking progress, managing the budget, and analyzing workloads.

Microsoft WinHelp is a proprietary format for online help files that can be displayed by the Microsoft Help browser winhelp.exe or winhlp32.exe. The file format is based on Rich Text Format (RTF). It remained a popular Help platform from Windows 3.0 through Windows XP. WinHelp was removed in Windows Vista purportedly to discourage software developers from using the obsolete format and encourage use of newer help formats.

Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de facto standard GUI. Tkinter is included with standard Linux, Microsoft Windows and macOS installs of Python.

The booting process of Windows NT includes Windows NT 4.0, Windows 2000, Windows XP and Windows Server 2003. In Windows Vista and later, this process has changed significantly; see Windows NT 6 startup process for information about what has changed.

<span class="mw-page-title-main">Task Manager (Windows)</span> Task manager application included with the Windows NT family of operating systems

Task Manager, previously known as Windows Task Manager, is a task manager, system monitor, and startup manager included with Microsoft Windows systems. It provides information about computer performance and running software, including name of running processes, CPU and GPU load, commit charge, I/O details, logged-in users, and Windows services. Task Manager can also be used to set process priorities, processor affinity, start and stop services, and forcibly terminate processes.

<span class="mw-page-title-main">Tk (software)</span> GUI toolkit or framework

Tk is a free and open-source, cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages.

<span class="mw-page-title-main">Command-line interface</span> Computer interface that uses text

A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and providing information to them as to what actions they are to perform. In some cases the invocation is conditional based on conditions established by the user or previous executables. Such access was first provided by computer terminals starting in the mid-1960s. This provided an interactive environment not available with punched cards or other input methods.

Microsoft Office shared tools are software components that are included in all Microsoft Office products.

wxPHP stands for "wxWidgets for PHP" and is a PHP extension that wraps the wxWidgets library, which allows writing multi-platform desktop applications that make use of the native graphical components available to the different platforms. It supports the three major operating systems: Windows, Linux and Mac OS X by using the PHP language. Applications are written in PHP language, and since it is an interpreted language, it does not require an intermediate compilation step in order to run the application, provided the PHP interpreter has the extension available.

Classic Shell is a computer program for Microsoft Windows that provides user interface elements intended to restore familiar features from past versions of Windows. It focuses on the Start menu, File Explorer and Internet Explorer — three major components of the Windows shell although it also does some minor tweaks for the Windows Taskbar. In particular, it can serve as a Start menu replacement for Windows 8 and Windows 10 systems.

References

  1. 1 2 "News, November 2016". wxbasic.net. Retrieved 25 September 2017.
  2. "Download". wxbasic.net. Retrieved 25 September 2017.