PDA

View Full Version : InputBox in 0.8 - fixed some bugs and added functionality



ValkaVALES
06-26-2007, 06:30 PM
Hi to all ClanLib developers and everybody!

First of all - great thanks to you for such a nice library! I like it very much.
And sorry for my not ideal English :)

I'm working now on my little game which uses graphical interface and some GUI elements. ClanLib has been chosen as the most programmer-friendly and powerfull cross-platform lib (I think I like it more than even QT).

Since the 09 version is not released (I tried to get it from SVN, but it is very raw for now), I use the 08 version.
But it has some little defects and not enough functionality in its InputBox element:

1) does not properly work max_length parameter;
2) if the string is too big (I tested 3 millions chars), it is drawed very slowly because of a lot of "for's" while calculating width, etc;
3) it does not properly draw a big string;
4) there is no clipboard support;
5) there is no support of text selection using mouse;
6) there is no support of Undo-Redo operations;
and some other issues.

I fixed it (but clipboard - only for Windows for the first time) and I'll be glad to send my changed files to you or put it into SVN to make your product little better :)

Remark 1. For now the Undo-Redo class is located in inputbox_generic.* files. I'm sure I should get it out to a different place. Can you suggest me where it can be putted better? In Core/System?

Remark 2. I just got the latest version from SVN (I worked with its released version before) and see that the clipboard is now implemented. So, I can just put its support to the InputBox and remove my raw Windows code.

Thanks,
Alexey Kharkov.

ValkaVALES
06-28-2007, 11:18 AM
Hi again,

Now I'm adding support of RichEdit control to the ClanLib 8.0.

It already has following functionality:

1) multi paragraphs support; it automatically fits text in each paragraph when resizing;
2) proper scrolling using mouse and scrollbar;
3) support of different text colors;
4) support of images of any size in the text lines (smiles, for example).

Now I'm working on:

1) selection of text using mouse;
2) navigating using keyboard;
3) clipboard support;
4) faster text displaying (see my post about drawing into custom image).

I'll be glad to add my modest work to this nice product, if it is needed.

If you do not plan to support the 8.0 version of ClanLib any more, just tell me about it.

Thanks,
Alexey.

Seth
06-28-2007, 11:24 PM
Hi ValkaVALES,

I'm really glad to hear you're working on a RichEdit for 0.8, I'd be happy to support you with this.

I'm sort of the CL 0.8 maintainer, I added the clipboard support and rewrote the main input box to "feel" like windows in the SVN version.

But I agree, it needs much more work!!

The only rule is that any changes we make must be absolutely backwards compatible with old code, we shouldn't break any existing interfaces.

If you do IRC, please stop by #clanlib on freenode.net sometime.

ValkaVALES
06-30-2007, 06:53 AM
Hi Seth,


I'm sort of the CL 0.8 maintainer, I added the clipboard support and rewrote the main input box to "feel" like windows in the SVN version.

Yes, I've got the last version from SVN and seen your changes.


I'm really glad to hear you're working on a RichEdit for 0.8, I'd be happy to support you with this.

Thank you!
Yesterday I made my code of new RichEdit control more pretty and now it is ready to be put into SVN. It's not full-functional yet, but it's just a first version. In addition, I've made a RichEdit example in Examples folder to make it easier to learn.


The only rule is that any changes we make must be absolutely backwards compatible with old code, we shouldn't break any existing interfaces.

Of course, I understand this rule and do not change existing interfaces and remove existing functionality. And moreover, I try to make new code style be similar to the existing code style.


If you do IRC, please stop by #clanlib on freenode.net sometime.

Saying frankly, I have never used IRC before. Today I logged to #clanlib on freenode.net, but I'm not sure that I fully understand how to use it :)

Can I send you my code changes or put them into SVN?
My e-mail is AlexeyKharkov@mail.ru. My ICQ is 399-873-093.

Thanks,
Alexey.

Seth
07-01-2007, 08:33 PM
Yesterday I made my code of new RichEdit control more pretty and now it is ready to be put into SVN. It's not full-functional yet, but it's just a first version. In addition, I've made a RichEdit example in Examples folder to make it easier to learn.

Excellent!

The best way for now is probably to make a patch with subversions's patch system, if you use TortoiseSVN, you can just right click the 0.8 folder and choose "Create patch", this will let you choose which file changes to include.

Feel free to post it here or in a new thread.

Then I'll test it on win/mac/linux and apply it to 0.8's SVN if there are no issues that need to be worked out. :D

ValkaVALES
07-03-2007, 09:47 AM
See http://www.rtsoft.com/forums/showthread.php?p=6373

Thanks,
Alexey.