π
<-
Chat plein-écran
[^]

GUI toolkit under development

C, C++, ASM...

Re: GUI toolkit under development

Message non lude Adriweb » 08 Mai 2021, 19:26

Yes I saw his comments on GitHub, if you use strings already, it's fine.
But my point was that such functions should already be using const char* as input, since I doubt it's their role to change it.
Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80%
 
Messages: 14599
Images: 1216
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: GUI toolkit under development

Message non lude SlyVTT » 08 Mai 2021, 19:41

Ok, I understood you point in a different way ;)

Yes, agree, but need to rewrite many functions that currently return (char*) to be compliant with that change. You know the story, you change one small line somewhere and then you need to change everything everywhere to make all the code "synchronized" :D
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

Re: GUI toolkit under development

Message non lude Lionel Debroux » 08 Mai 2021, 20:05

On the negative side, fixing your API to achieve const correctness will take you some time, indeed.
On the positive side, next time you design an API, you'll probably make it const correct from the get go, assuming the target language doesn't force you to do it (Rust is one of the few languages which do) :)
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Avatar de l’utilisateur
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 11.2%
 
Messages: 6858
Inscription: 23 Déc 2009, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: -
GitHub: debrouxl

Re: GUI toolkit under development

Message non lude Adriweb » 08 Mai 2021, 20:24

May I suggest using an IDE that will help you refactor things quickly? I like Clion and it's free if you're a student :)
Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80%
 
Messages: 14599
Images: 1216
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: GUI toolkit under development

Message non lude SlyVTT » 08 Mai 2021, 20:43

Lionel Debroux a écrit:On the negative side, fixing your API to achieve const correctness will take you some time, indeed.
On the positive side, next time you design an API, you'll probably make it const correct from the get go, assuming the target language doesn't force you to do it (Rust is one of the few languages which do) :)


Agree, the second attempt should be easier, as we can hope I won't do the same mistakes (but certainly others ;-)
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

Re: GUI toolkit under development

Message non lude SlyVTT » 08 Mai 2021, 20:52

Adriweb a écrit:May I suggest using an IDE that will help you refactor things quickly? I like Clion and it's free if you're a student :)


Sure this is a good idea, I am a bit old to get CLion free, as I am not a student for almost 20 years now ;-)

Today I am using Code::Blocks cause I was running on a linux virtual machine and then it was complex to have a windows based IDE and a toolchain/SDK on linux.
But I guess I will change to Visual Studio cause on my new PC, I am now using WSL so a windows based IDE is OK.
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

Re: GUI toolkit under development

Message non lude Adriweb » 10 Mai 2021, 02:04

Yes Visual Studio is not bad if you're on Windows. Although Clion works there too :P
Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80%
 
Messages: 14599
Images: 1216
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: GUI toolkit under development

Message non lude SlyVTT » 17 Mai 2021, 21:43

Hello Everybody,

my posts are a bit less regular, but don't be afraid, this does not mean I am not taking care of the GUI Toolkit anymore !!
This is the absolute opposite, I am spending a lot of time in tuning, optimizing and developing the Toolkit.

This week, thanks to the heavy rain, was very fruitful.

Three main actions made the backbone of my development week :
- update the code by changing all (char *) to std::string, which make the code more clean (and more C++ compliant rather than being a strange mixture of C/C++) + rewrite some part of code to make them more homogeneous or to add some functionalities
- pursue the debugging of the Toolkit, with many small bugs/glitches now fixed
- pursue the development of new features.

Some more details of the actions :

1) Update of the existing code

This was by far the most time consuming part of this week's actions. This is something I was postponing for weeks but now I cannot escape anymore. Procrastination is not good at all. Very boring part of development job !!! But necessary.

So I started to rewrite all the widgets code that was based on utilization of (char *) to now use std::string instead. This means double checking all the code and rewrite many part of it to be compliant with the new variable types. The problem being that when you wait too long for doing such major change, it is really a pain to do that. But now this is done and even if it was long and tough, it worth the job.

The second big part of code refurbishing was the implementation of a "asciiget" function in the keyboard handling class which aims at replacing the nio_ascii_get() function of libndls. Why doing this ? Just because I want the user to be able to map the keyboard of the nSpire CX/CX-II just as he wants, without having to recompile/modify the files of the Ndless SDK. Now this is managed by the KeyboardTask class through a dedicated method.

The current default mapping is one of libndls, but it can be easily changed by tuning the KeyboardTask.cpp file that looks like this

Code: Tout sélectionner
       if (keyevent && kbPAROPEN && !capsonmode && !kbSHIFT && ! kbCTRL) return '(';
       if (keyevent && kbPAROPEN && (capsonmode || kbSHIFT) && !kbCTRL) return '[';
       if (keyevent && kbPAROPEN && !(capsonmode || kbSHIFT) && kbCTRL) return '{';

       if (keyevent && kbPARCLOSE && !capsonmode && !kbSHIFT && ! kbCTRL) return ')';
       if (keyevent && kbPARCLOSE && (capsonmode || kbSHIFT) && !kbCTRL) return ']';
       if (keyevent && kbPARCLOSE && !(capsonmode || kbSHIFT) && kbCTRL) return '}';

so if you want the combination :nsct: + :nspo: to correspond to the character '&' instead of '{', you just need to change the adequate line in that later file like this :
Code: Tout sélectionner
       if (keyevent && kbPAROPEN && !capsonmode && !kbSHIFT && ! kbCTRL) return '(';
       if (keyevent && kbPAROPEN && (capsonmode || kbSHIFT) && !kbCTRL) return '[';
       if (keyevent && kbPAROPEN && !(capsonmode || kbSHIFT) && kbCTRL) return '&';

       if (keyevent && kbPARCLOSE && !capsonmode && !kbSHIFT && ! kbCTRL) return ')';
       if (keyevent && kbPARCLOSE && (capsonmode || kbSHIFT) && !kbCTRL) return ']';
       if (keyevent && kbPARCLOSE && !(capsonmode || kbSHIFT) && kbCTRL) return '}';

Of course this is just a dummy example to explain the concept :p



2) Bug/Glitches fixed

Many, many !! The main ones (and most significant to be reported) :
- fixed a bug on MenuPaneWidget when attached to a MenuBarWidget directly on the desktop.
- fixed the positioning of the MenuItemWidget in the MenuBarWidget to have something more aesthetic
- fixed a drawing glitch with IconBarWidget
- added a line on the IconBarWidget to create a delimitation with widgets on the bottom side of the icon bar
- fixed some bugs in the FileDialogBoxWidget
- ... many others that I even forgot ...

3) New features

As always, the best part for the end B-)

I started the development of two new widgets :

- MultiLineTextBoxWidget which intends to contain/modify text that cannot be drawn in one single line. This will be very helpful for people who would like to code text editor or console application catchers or terminal or code editor or whatever ...

This is how it looks like :
Image Image Image

This part is still under development and some part are missing. I also need to spend some time on debugging.
I am also considering a possible extension of this widget to contain some basic "formatting" options of the text (color; bold/italic; underlining/striking ...) but I need to think how I can manage this.

- GraphicalContextWidget which intends to contain pictures. This can be used either for picture viewer or to create some drawing applications. Why not having Gimp on nSpire :p

Today this is rather a proof of concept, but it work and I need add feature like scaling, scrolling, zooming/shrinking ...

This is how it looks like :
Image Image


So I reach my goal in terms of Widget to be implemented, I will now spend time of finishing the code and debugging it. This may need numerous hours to make sure the code is safe and robust.

As usual, please feel free to give me your feedback.

And some final pictures with various themes

Image Image Image

Ciao

Sly
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

Re: GUI toolkit under development

Message non lude SlyVTT » 21 Mai 2021, 07:04

Hello Everybody,

this time, this is a post with a different taste, related neither to code update (despite it is moving on) nor to issues with bugs.

this time, this is just to introduce the logo of the toolkit. Yesterday I was a bit lazy for coding and hence wanted to have something to appear as a splash screen, being said that the project still has no logo. So worked on this. I am then very happy to present the new Logo of the GUI Toolkit for TI-nSpire in its two versions:

- bright colors :
Image

- dark colors:
Image

This is the logo for upcoming revision 1.0 to be in release candidate soon.

Please let me know what you are thinking of it.

Ciao

Sly
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

Re: GUI toolkit under development

Message non lude SlyVTT » 22 Mai 2021, 19:47

Dear All,

this is the status of the art of the GUI Toolkit for TI nSpire, as usual for each end of week.

Things are still moving quite smoothly and development is now ready to start the very final step before reaching revision 1.0RC (release candidate) : the debugging stage.

The new widgets GraphicContextWidget and MultiLineTextBoxWidget are now fully implemented and are working fine.

GraphicContextWidget is able to adjust the size of the picture to fit its width, its height or both as well as handling various zoom factors between 10% to 500%. Of course if the picture to be drawn is greater than the size of the widget, the user can move it with the arrows. Zoom in / out are also possible with the +/ - keys.
The following pictures give an example showing the logo of the project with initial opening session of the application, a zoom of the picture by the user to different levels and then panning the picture with the arrow keys. at the end, return to the initial size of the window with the picture still zoomed.

Image Image Image Image Image Image Image

MultiLineTextBoxWidget is able to handle text over multiple lines and is able to load a text file to be drawn and navigated through. A special version of this widget MultiLineRichTextBoxWidget is an extension with the ability to handle formatted text with user-defined styles. This should be usefull for applications such as code editor or text based consoles.
The following pictures show the widget after loading a text from a file. Scrolling through the lines is done with SHIFT + UP / DOWN and the cursor is moved with arrow keys.

Image Image Image

The main difference between MultiLineTextBoxWidget and MultiLineRichTextBoxWidget is that the first one just draw the text without any treatment while the second one is looking for formatting options (through tags) and then draw the corresponding formatted text.
This is shown by the following pictures, with the same text in both widgets (MultiLineTextBoxWidget in the top and MultiLineRichTextBoxWidget in the bottom). The tags shown in the top are in real time converted into the bottom text.

Image Image Image Image Image Image

At the moment, the tag system is very simple, but it is very easy to change it to have a real parser/interpreter to handle a language like python/C/Pascal...

As usual, please feel free to give your feedbacks.

Ciao

Sly
Some works in progress :
The GUI Toolkit NF for nSpireMyShmup for fxCG-50Magic Light for Casio Graph 90+E
and
Magic Light for nSpire CX/CX-II
Simple Text Editor for nSpireOutRun for Casio Graph 90+E
95%
50%
100%
75%
100%
And more to come ... stay tuned
Avatar de l’utilisateur
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 42.9%
 
Messages: 481
Images: 31
Inscription: 19 Jan 2021, 09:41
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
GitHub: SlyVTT

PrécédenteSuivante

Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 9 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
778 utilisateurs:
>740 invités
>33 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)