Graphically laying out wx app - code-generation

Being really new to wx, I'm wondering if there is an IDE (especially for Linux) which would help me lay out a frame or dialog or whatever just to help me see what I'm doing. That means also creating the code for those changes.
I remember way back when using resource compilers for OS/2 and Windows that produced binaries that would then create the window, and was hoping for something similar (though obviously not binary if wx doesn't support that).

I use wxFormBuilder. It is written in wxWidgets, so it works on Linux quite well. It can generate C++ code or XRC files. Make sure you understand its philosophy, and use it like this:
generate C++ code for the GUI
don't edit the code wxFormBuilder generated, but create new files
in new files, derive new classes from the classes it generated
implement event handlers in you own class (wxFB creates virtual function for each event handler you wish to use)
I usually name the wxFormBuilder generated classes/files like, for example, MainFrameGUI, and one with implementation (derived one in which I write all my code) would be just MainFrame. This enables you to change the visual layout and regenerate C++ files from wxFB at any time without overwriting your code.

DialogBlocks works quite well for me, although sometimes you need to edit the code to fix errors manually. It has a property editor that seems advanced enough.

Just another options is wxGlade. It does not have the that much features as the others mentioned seem to have, but it works just good enough for me to not daring to switch.

I use Code::Blocks IDE from http://www.codeblocks.org which has
- built-in GUI editor
- Cross compilable, so you can use it under Linux, OSX and Windows.
But I still use wxFormBuilder with it instead of built-in wxSmith editor. But they are compatible with internal wxSmith.

For windows you've got "wx-devcpp" which is Blodsheed Dev C++ with some addons providing what you looking for
Here is project page
http://wxdsgn.sourceforge.net/

Related

VS Code / IDEs: How can I enable cmd+click goto definition for variables declared at runtime?

I'm looking to improve my own productivity by trying to figure out how to provide cmd+click functionality for variables declared at runtime. I work with a library that allows you to register objects to it at runtime to be accessed later — it would be great if I could cmd+click to definitions of these! How do you think I could achieve this? I'm open to any ideas. Thanks!
Edit:
Thoughts I have so far inspired by feedback from various Slack communities:
There is no such thing as 'runtime' when providing functionality in IDEs
We need to be able to teach the IDE about what definitions to expect. Whether this means writing an extension to use the VS Code API specifically for my use-case, or otherwise working within a system that generates files that the IDE already knows to look for, which allows it to connect the dots and provide the precious peek / goto definition functionality
Edit:
I'm starting work on a VS Code extension that reads a dotfile for configuration — I'll share what I find out as I go!

Can I create VS Code extensions in Python/C++?

I am totally new to creating extensions in VS Code, and all the official examples of extensions are written in Typescript/Javascript, which I have no experience with. Is it possible to create VS Code extensions in other languages, such as Python or C++?
If so, could anyone point me to any resources to get me started?
It is possible by creating a C++ module for Node.js, which can then be loaded like any other node module. Of course, some glue code written in JS or TS is necessary to register the extension and translate calls to/from vscode.
I've gone this way in my ANTLR4 extension, but gave up eventually, because of the troubles I had due to incompatible dependencies (you have to make sure the extension uses the exact same V8 version, which was used to build the underlying Node.js used by vscode, on all supported platforms).
This situation might have change, I don't know, but with that in the background I don't recommend it.
If you want to add support for a new language in vscode you can also write a separate language server, as is mentioned in the linked SO answer. For other type of work, I'm afraid, you have no alternative to use.
No, as #rioV8 said, since VSCode is an electron app and runs on Javascript.

Is there any text editor for Mac that can be configured to have, or already has, autocomplete for Lua?

I know TextWrangler shows the option, but it doesn't actually do anything. So what I want is autocomplete, either with a key combination, or while I type.
Syntax coloring/highlighting is a requirement as well, though I know Xcode and TextWrangler have that.
You might want to use Lua Development Tools for this purpose. It has syntax coloring, plus it is doing smart autocomplete, depending on what your actual context is (required modules, ...)
It is an Eclipse Technology project, and it is Open Source! (EPL license).
Project web page - http://www.eclipse.org/koneki/ldt
Installation via Eclipse Marketplace - http://marketplace.eclipse.org/content/lua-development-tools-koneki
I don't know if you have seen this page, but it seems a good place to start:
http://lua-users.org/wiki/LuaEditorSupport
If I search for "completion" I get:
Decoda (Win)
LuaEdit (Win)
DForD (Win)
NsEditor (Win)
Visual Studio + LuaLite
Eclipse + LuaEclipse or LunarEclipse (java)
I personally use Vim + SuperTab (which only auto-fills with things that you have previously written).
There's a nice plugin for IntelliJ IDEA for Lua. IntelliJ IDEA is really nice, though kind of biggish.
Aside of that there is also TextAdept which is a lot smaller, and 100% configurable in Lua.
And probably a bunch of others.
If you want full (semantic) autocompletion, you should try lua-inspect (source code), which can be installed in the SciTE editor, and also into ViM using vim-lua-inspect.
It uses Metalua to fully parse the source code into AST and then performs code analysis. Apart from simple keyword-based syntax highlighters, it can:
differentiate between local/global variables, parameters and unused variables
jump to the definition of a variable/function
autocomplete table members
correctly rename variables/functions (not only definitions but also uses)
Even though it is not yet stable, and tends to hang on large scripts, it is very usable for standard Lua programs, mainly for it's intelligent autocompletion and renaming.

Need Help With Gtk+ Text Editor

I am creating a GTK+ text editor called Quick-Ed Pro. It was originally designed to be a cross-platform version of Quick-Ed , a text editor I wrote in raw Win Api. But after finding the awesome capabilities of GTK+ , Quick-Ed Pro emerged as an entirely different program with advanced GUI capabilities way better than Quick-Ed. But now Im stuck with a few problems.
Problems:
1- I want to make my editor multi-tabular like notepad++ or gedit. I dont know how to do this. What widget should I use?
2- GtkTextView does not seem to have any undo / redo functions. How can I make my own? (examples appreciated)
3- Gtk+ has a long startup time, usually 2-4 seconds unlike win api which started up in less than a second, so how can I create a small popup loading bar like the one in GIMP or Code::Blocks?
4-URL of my project: http://code.google.com/p/quick-ed/
URL of the WinApi Quick-Ed : http://code.google.com/p/burningprodigy ... e&can=2&q=
Any help will be appreciated. I need contributors. Please lend me a hand.
1) Tabs: You will need to write your own widget for this. No toolkit i know has one that is flexible enough to handle what is required in a good editor. But you can start with GtkNotebook for a quick prototype.
2) Yes this is a FAQ and imho bad that it is not solved directly in GTK. If you use gtkmm you can use http://view.sourceforge.net/classes.php otherwise look into the library to see how it is implemented and port it into C. There are other implementations for example for python available on the net.
3) You have to write a small dialog using the WinAPI and show this before you call the first GTK function. Usually i wouldn't recommend to do it - after the windows file cache has the files (or you have a SSD) loading speed is okay.
You should look into http://projects.gnome.org/gtksourceview/ to get a good editor. The GtkTextView is definitely not able to work as a source code editor. I'm maintaining a commerical IDE and Editor and by the way the most code is outside the editor widget anyway.

Any windows based IDE to view objective-c code?

I want to be able to browse through the source code of an iPhone application in windows. I do not want to compile and run the code, just need to have some kind of tool that understands the Objective-C code and iPhone application source structure. Something that view the source code as a whole (project-based) and ideally can link different classes and methods. Something more than just a plain editor with code styling and something less than a full feature IDE. Do you suggest any tools?
Most editors will support Objective-C syntax highlighting. Personally I use VIM or NotePad++. I would recommend NotePad++ for ease of use. But as far as I know there is no 'IDE' for Objective-C for Windows.
I use jEdit if I need to see the source code in Windows. Pretty much handles all the structure and syntax highlighting of objective C.
EDIT: Its an editor. Not a IDE. But with your needs of just viewing code, I guess it must suffice.
If you want a bit more than just syntax highlighting, GNUStep has an IDE called PRoject Center. GNUStep can run on Windows, so allegedly Project Center will too.
Emacs has good syntax and indentation support for Objective-C, for example it can indent the method calls the way Xcode does (based on ':') and there's a Windows version of it available here.
Though it's not an IDE, most of the time I use it for Obj-C/GNUstep without much problems.
If you use something like ctags to tag your source code you could use any editor with support for ctags.
It looks like ctags does not support Objective-C directly, but it is fairly easy to add a new language configuration to ctags.