Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Packages » Application stub template
Application stub template [message #24410] Fri, 15 January 2010 14:28 Go to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

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. Smile

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 #24413 is a reply to message #24410] Fri, 15 January 2010 15:59 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 307
Registered: July 2009
Senior Member
dolik.rce wrote on Fri, 15 January 2010 14:28

Any suggestions for improvements are welcomed.


Very nice template Smile.

Just two comments:
1. add a DeQtf around filesel.Get() to show full file names.
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

Re: Application stub template [message #24436 is a reply to message #24413] Sun, 17 January 2010 20:21 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

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 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 890
Registered: December 2006
Experienced 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 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

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 Smile 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 Smile But you're free to contribute Wink 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 #24481 is a reply to message #24452] Tue, 19 January 2010 06:05 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 890
Registered: December 2006
Experienced Contributor
I mean "bazaar/Docking". I personally use it all the time. Smile
I'll try to add support of Docking to your template during this week.


Regards,
Novo
Re: Application stub template [message #24553 is a reply to message #24410] Sun, 24 January 2010 10:22 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

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 236 times)
Previous Topic: packages, sub packages and big projects
Next Topic: Project package dependencies
Goto Forum:
  


Current Time: Fri Nov 15 03:30:30 CET 2019

Total time taken to generate the page: 0.02241 seconds