Home » U++ TheIDE » U++ TheIDE: Packages » Application stub template
Application stub template [message #24410] |
Fri, 15 January 2010 14:28  |
|
Hi,
Inspired by mr_peds post about Ubuntu quickly, I've decided to write a simple template file for theide that would prepare stub of a GUI application, with most of the common functions ready to use. Or at least almost ready to use - after adding a few lines of application specific code. 
I hope it could make it easier for beginners starting who just start to develop apps in U++. It should show at least some of the methods and tricks used in U++ (menu building, layouts, iml, ...).
Features:- Creates main window
- Creates menubar AND/OR toolbar
- Optionaly creates status bar
- Optionaly creates empty layout file
- Creates iml file
- Implements stubs for most common functions (file handling, exit, about box)
- Works out of the box
If you want to try this, just copy attached file anywhere in your MyApps folder.
Any suggestions for improvements are welcomed.
Best regards,
Honza
EDIT: Attachment deleted, see newer version below.
[Updated on: Sun, 17 January 2010 20:22] Report message to a moderator
|
|
|
|
Re: Application stub template [message #24436 is a reply to message #24413] |
Sun, 17 January 2010 20:21   |
|
Hi Zbych!
Zbych wrote on Fri, 15 January 2010 15:59 | 1. add a DeQtf around filesel.Get() to show full file names.
| Missed that, thanks.
Zbych wrote on Fri, 15 January 2010 15:59 | 2. I think you should place declaration of class/functions in *.h, rest of code in main.cpp. Right now almost everything is in *.h
| Well I usually don't care in small apps like this one. But I agree that it's good practice to do so.
Both bugs are fixed in the attached file. Also added some more comments about what some parts of code do. I think that beginners will appreciate if this works a little bit as a tutorial.
Anyone has some more comments?
Best regards,
Honza
EDIT: Attachment deleted, see newer version below
[Updated on: Sun, 24 January 2010 10:22] Report message to a moderator
|
|
|
Re: Application stub template [message #24451 is a reply to message #24436] |
Mon, 18 January 2010 03:02   |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
dolik.rce wrote on Sun, 17 January 2010 14:21 |
Anyone has some more comments?
|
I'd make support for Imagelist optional and include support for Docking. Docking is cool.
Regards,
Novo
|
|
|
Re: Application stub template [message #24452 is a reply to message #24451] |
Mon, 18 January 2010 09:14   |
|
Novo wrote on Mon, 18 January 2010 03:02 | I'd make support for Imagelist optional and include support for Docking. Docking is cool.
|
Hi Novo,
The main reason for imagelist was exit icon There is none in CtrlImg (why?). But why not, it can be optional too.
I'm not sure what do you mean with docking support. Only reasonable feature I can imagine for small app like this is opening files on drag and drop to the window. Is that what you mean? Anyway, there is a little problem - I haven't learned any of that yet But you're free to contribute You can just send me the code (preferably based on the current template), I can convert it to template.
Best regards,
Honza
|
|
|
|
Re: Application stub template [message #24553 is a reply to message #24410] |
Sun, 24 January 2010 10:22  |
|
Hi all,
Sorry for how long it took me. I've made the imagelist optional, as Novo suggested.
Any other ideas about what generic app should have or what should it demonstrate to U++ beginner? If not, what do the main developers think about adding this template to uppsrc?
Best regards,
Honza
-
Attachment: appstub.upt
(Size: 5.57KB, Downloaded 354 times)
|
|
|
Goto Forum:
Current Time: Thu Dec 07 10:43:19 CET 2023
Total time taken to generate the page: 0.03908 seconds
|