Dear Ti-Planet Members,
I hope you are all doing well. Long time no write ... I have been extremely busy at work during these last two months and hence was tied up far from my keyboard, ... and from the GUI Toolkit effective development.
But now this period is over and I am returning back to coding, with new ideas ... and maybe more important, a new project.
During this period without coding, I thought a lot on how I can improve the Toolkit and solve some issues/misconceptions. I then decided to restart the project from scratch, taking benefit of building a new architecture able to reuse concepts that where proven to work and implement new ones for parts that where not very good in my first attempt.
So I am now coding the root of the GUI Toolkit NF (with NF standing for "New Foundation"). This is new the "hardware layer" that is under consideration with 3 managers recoded from scratch :
- KeyManager to handle the events linked to keys (all except one of the TouchPad) : all keys can be checked one by one (pressed status true/false) as well as Press Event / Release Event (transitional state)
- MouseManager to handle the events linked to the Touchpad (including the arrows and click keys) : for keys, same as above + position x/y of the mouse cursor. With user able to define the sensibility of the movement.
- Renderer able to render various geometrical primitives AND able to handle SDL or nGC (based on a #define preprocessor directive)
One of the problem of the first GUI Toolkit was that several instances of the keyboard/mouse handlers could be created by user, leading to some strange behavior. So now it is written using Singleton approach.
For the renderer, this is the very begining and I am learning how to use nGC.
As usual, more news to come very soon.
Regards and keep safe
Sly
GUI Toolkit NF (under development)
16 posts
• Page 1 of 2 • 1, 2
GUI Toolkit NF (under development)
Last edited by SlyVTT on 23 Jan 2022, 18:31, edited 1 time in total.
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
Re: GUI Toolkit NF (under development)
A new Github repository has been created accordingly.
Everything can be found her : https://github.com/SlyVTT/Widgets-Spire-NF
Sly
Everything can be found her : https://github.com/SlyVTT/Widgets-Spire-NF
Sly
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
Re: GUI Toolkit NF (under development)
Dear All,
This is a brief overview of the current status of the development of the GUI Toolkit NF.
One week after the start of the project, things are moving forward at a relatively good pace, considering that I do not spend that much time coding.
Right now, I am working on the foundation of the Toolkit, meaning the classes needed to properly interact with either the hardware and the main classes of the application.
The GUI Toolkit NF has reached an important milestone (in my development roadmap ) :
- the KeyManager class is now finished - all keys are correctly captured as well as transient events (Press and Release event)
- the MouseManager class is also now finished - cursor position and clicks are correctly captured as well as all arrow keys (*). As for KeyManager, all transient events for keys are also captured.
(*) as the arrow keys are physically linked to the touchpad, I was a bit concerned by the class to be used to track their status. I finally decided to use the MouseManager to be inline with the actual way of getting the information from the hardware and improve the performances.
- the two renderers used in the Toolkit, i.e. ScreenRenderer for on screen visual drawing and DepthBufferRenderer for off screen operations are working and are able to use both SDL and nGC.
We can choose the rendering mode by commuting a single #define preprocessing directive into a header file :
If SDL is used for rendering the primitive, we use :
if nGC is chosen for rendering, we switch to :
Quite easy, isn't it ?
Of course, this is a balance between performance / portability of code and size of the executable.
For example, the same application (very simple PoC as depicted by the following pictures) gives the following figures :
- compiled for use with SDL rendering : size of the executable : 280kb
- compiled for use with nGC rendering : size of the executable : 130kb
Visuals are very similar. This is the great part of my current job to have a sufficiently robust ScreenRenderer class able to perfectly translate the Toolkit Drawcalls either to SDL or nGC in a smooth way and without visual artefacts. Following are two pictures of the same program, compiled once for use with SDL and once for use with nGC.
As usual, the target is to get a simple way to code applications, so for the end user, it means a minimum code to write.
This simple app is coded with the following lines :
As you can read, the second button uses a condition to get its text content updated
Now the big part of my job is to convert all the code of all the widget of the GUI Toolkit (not NF) to the GUI Toolkit NF ... May be a bit long.
Ciao
Sly
This is a brief overview of the current status of the development of the GUI Toolkit NF.
One week after the start of the project, things are moving forward at a relatively good pace, considering that I do not spend that much time coding.
Right now, I am working on the foundation of the Toolkit, meaning the classes needed to properly interact with either the hardware and the main classes of the application.
The GUI Toolkit NF has reached an important milestone (in my development roadmap ) :
- the KeyManager class is now finished - all keys are correctly captured as well as transient events (Press and Release event)
- the MouseManager class is also now finished - cursor position and clicks are correctly captured as well as all arrow keys (*). As for KeyManager, all transient events for keys are also captured.
(*) as the arrow keys are physically linked to the touchpad, I was a bit concerned by the class to be used to track their status. I finally decided to use the MouseManager to be inline with the actual way of getting the information from the hardware and improve the performances.
- the two renderers used in the Toolkit, i.e. ScreenRenderer for on screen visual drawing and DepthBufferRenderer for off screen operations are working and are able to use both SDL and nGC.
We can choose the rendering mode by commuting a single #define preprocessing directive into a header file :
If SDL is used for rendering the primitive, we use :
- Code: Select all
//RENDER_MODE To be set to 1 if SDL is used as the renderer, and to 0 otherwise
#define RENDER_WITH_SDL 1
if nGC is chosen for rendering, we switch to :
- Code: Select all
//RENDER_MODE To be set to 1 if SDL is used as the renderer, and to 0 otherwise
#define RENDER_WITH_SDL 0
Quite easy, isn't it ?
Of course, this is a balance between performance / portability of code and size of the executable.
For example, the same application (very simple PoC as depicted by the following pictures) gives the following figures :
- compiled for use with SDL rendering : size of the executable : 280kb
- compiled for use with nGC rendering : size of the executable : 130kb
Visuals are very similar. This is the great part of my current job to have a sufficiently robust ScreenRenderer class able to perfectly translate the Toolkit Drawcalls either to SDL or nGC in a smooth way and without visual artefacts. Following are two pictures of the same program, compiled once for use with SDL and once for use with nGC.
As usual, the target is to get a simple way to code applications, so for the end user, it means a minimum code to write.
This simple app is coded with the following lines :
- Code: Select all
#include "ToolkitNF/GUIToolkitNF.hpp"
int main( void )
{
WidgetApplication::Initialize();
DesktopWidget* desktop = new DesktopWidget( "I am a Desktop", 0, 0, SCREEN_WIDTH_GUI, SCREEN_HEIGHT_GUI, nullptr );
ButtonWidget* button = new ButtonWidget( "Hello World !!!", 25, 25, 250, 20, desktop );
#if RENDER_WITH_SDL == 1
ButtonWidget* button2 = new ButtonWidget( "We are rendered with SDL", 25, 50, 250, 20, desktop );
#else
ButtonWidget* button2 = new ButtonWidget( "We are rendered with GC", 25, 50, 250, 20, desktop );
#endif
button2->Disable();
WidgetApplication::AddChild( desktop );
WidgetApplication::SetBackgroundPicture( "/documents/Widget/Wallpapers/002.bmp.tns" );
WidgetApplication::PrepareForRun();
while (!WidgetApplication::AskForClosure() && !button->IsPressed() )
{
WidgetApplication::Run( WidgetApplication::Normal );
}
WidgetApplication::Close();
return 0;
}
As you can read, the second button uses a condition to get its text content updated
Now the big part of my job is to convert all the code of all the widget of the GUI Toolkit (not NF) to the GUI Toolkit NF ... May be a bit long.
Ciao
Sly
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
Re: GUI Toolkit NF (under development)
Hello,
This is a status of the current development of the GUI Toolkit NF for the TI nSpire, right before taking some days off for summer vacations.
The conversion of the Toolkit from the "old fashioned" structure to the new "NF concept" is moving forward and almost all the widgets of the revision 0.9b are now available for the GUI Toolkit NF. The only exception is the GraphicContextWidget that needs to be heavily reimplemented to be compliant with the NF structure. It may take some time (and also some brain juice), especially considering the version using the nGC library for which some very low level portions of code will be needed to create specific drawing primitives able to handle the context (= a memory buffer).
To demonstrate what the various versions of the toolkit(s) can actually do, I put hereafter some screenshots (all done through internal routines of the toolkits). The application is a simple text editor able to handle various styles. It is far from being finished and there are still bugs to track and some parts of the Toolkit routines to be correctly tuned...
... But this is enough speach, let's go for the pictures ...
Version made with the "old fashion" GUI Toolkit rev 0.9beta : size 576ko - Need SDL - Functional / very limited bugs (but still some )
Version made with the "new" GUI Toolkit NF using SDL for rendering : size 300ko - Need SDL - Some bugs to be corrected, making behaviour quite hazardous right now (but improving - Under debugging phase)
Version made with the "new" GUI Toolkit NF using nGC for rendering : size 147ko - No Need for SDL - Some bugs to be corrected (the same as for the above version, making behaviour quite hazardous right now (but improving - Under debugging phase + Need for developping some conversion routines based on nGC )
For the two NF versions, I tried to take the same screen captures, to let you see the (almost) similar rendering of the application. There are some artefacts in the drawing primitives (especially the rounded rectangles) in the nGC version that will be improved later on.
Performance wise, all versions behave almost similarly, but I need to perform some accurate benchmarks when all features will be correctly implemented without "big bugs".
I am still in the process of making something easily useable, this is tested on my machine (a CX II-T CAS with OS 5.2), but I would be very happy in the future (let says when its done) if some volunteers could test on some other hardware and/or OS version. The target is CX/CX-II (to have color rendering).
Let me know you toughts,
Ciao and Bonnes Vacances
Sly
This is a status of the current development of the GUI Toolkit NF for the TI nSpire, right before taking some days off for summer vacations.
The conversion of the Toolkit from the "old fashioned" structure to the new "NF concept" is moving forward and almost all the widgets of the revision 0.9b are now available for the GUI Toolkit NF. The only exception is the GraphicContextWidget that needs to be heavily reimplemented to be compliant with the NF structure. It may take some time (and also some brain juice), especially considering the version using the nGC library for which some very low level portions of code will be needed to create specific drawing primitives able to handle the context (= a memory buffer).
To demonstrate what the various versions of the toolkit(s) can actually do, I put hereafter some screenshots (all done through internal routines of the toolkits). The application is a simple text editor able to handle various styles. It is far from being finished and there are still bugs to track and some parts of the Toolkit routines to be correctly tuned...
... But this is enough speach, let's go for the pictures ...
Version made with the "old fashion" GUI Toolkit rev 0.9beta : size 576ko - Need SDL - Functional / very limited bugs (but still some )
Version made with the "new" GUI Toolkit NF using SDL for rendering : size 300ko - Need SDL - Some bugs to be corrected, making behaviour quite hazardous right now (but improving - Under debugging phase)
Version made with the "new" GUI Toolkit NF using nGC for rendering : size 147ko - No Need for SDL - Some bugs to be corrected (the same as for the above version, making behaviour quite hazardous right now (but improving - Under debugging phase + Need for developping some conversion routines based on nGC )
For the two NF versions, I tried to take the same screen captures, to let you see the (almost) similar rendering of the application. There are some artefacts in the drawing primitives (especially the rounded rectangles) in the nGC version that will be improved later on.
Performance wise, all versions behave almost similarly, but I need to perform some accurate benchmarks when all features will be correctly implemented without "big bugs".
I am still in the process of making something easily useable, this is tested on my machine (a CX II-T CAS with OS 5.2), but I would be very happy in the future (let says when its done) if some volunteers could test on some other hardware and/or OS version. The target is CX/CX-II (to have color rendering).
Let me know you toughts,
Ciao and Bonnes Vacances
Sly
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
Re: GUI Toolkit NF (under development)
Great job Looking forward to the next update.
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...)My calculator programs
Mes programmes pour calculatrices
-
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Posts: 14744
- Images: 1119
- Joined: 01 Jun 2007, 00:00
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- Twitter: adriweb
- GitHub: adriweb
Re: GUI Toolkit NF (under development)
Hello,
so that's a long time since my last update in this post.
Many changes have been done in the GUI Toolkit NF, it would be much too long to explain everything here, so I will explain the main one : PC compatibility.
The Internal code has been updated to be able to run on both the nSpire architecture and a PC (tested on linux, but should also be compatible with windows when compiled with the appropriate toolchain).
This allow a quicker development, testing and debugging.
As PC can have larger screen resolution than the nSpire (320x240), the Toolkit is able to take this into consideration when the build target is PC.
I am now working on debugging heavily the Toolkit in order to make it as perfect as possible (still some work to be done).
Below are some examples of what is currently (almost) working (screenshot using internal Toolkit routines with a resolution of 640x480) :
More to come soon.
Ciao
Sly
so that's a long time since my last update in this post.
Many changes have been done in the GUI Toolkit NF, it would be much too long to explain everything here, so I will explain the main one : PC compatibility.
The Internal code has been updated to be able to run on both the nSpire architecture and a PC (tested on linux, but should also be compatible with windows when compiled with the appropriate toolchain).
This allow a quicker development, testing and debugging.
As PC can have larger screen resolution than the nSpire (320x240), the Toolkit is able to take this into consideration when the build target is PC.
I am now working on debugging heavily the Toolkit in order to make it as perfect as possible (still some work to be done).
Below are some examples of what is currently (almost) working (screenshot using internal Toolkit routines with a resolution of 640x480) :
More to come soon.
Ciao
Sly
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
Re: GUI Toolkit NF (under development)
Hello,
suite à des échanges avec Bernard Parisse, j'ai pu upgrader quelques fonctions intéressantes afin d'implémenter à terme un widget "Horloge".
Dans ma classe "TimeManager" j'ai désormais diverses méthodes qui retournent les infos sur l'heure courante :
C'est multi-cible, sur Nspire cela passe par tes indications (via le RTC) et sur PC, ça passe par les fonctions de <time.h>.
Voici ce que ça donne sur la cible de rendu PC (juste affichage sans passer par un widget spécifique, il faudra que je code spécifiquement un DigitalClockWidget) :
et sur la nSpire :
Merci beaucoup à Bernard.
Sly
suite à des échanges avec Bernard Parisse, j'ai pu upgrader quelques fonctions intéressantes afin d'implémenter à terme un widget "Horloge".
Dans ma classe "TimeManager" j'ai désormais diverses méthodes qui retournent les infos sur l'heure courante :
- int TimeManager::GetCurrentHour() qui donne HH courant entre 0 et 23
- int TimeManager::GetCurrentMinute() qui donne MM courant entre 0 et 59
- int TimeManager::GetCurrentSecond() qui donne SS courant entre 0 et 59
- void TimeManager::GetCurrentHour( int* HH, int* MM, int* SS) qui donne HH:MM:SS courant entre 00:00:00 et 23:59:59
C'est multi-cible, sur Nspire cela passe par tes indications (via le RTC) et sur PC, ça passe par les fonctions de <time.h>.
Voici ce que ça donne sur la cible de rendu PC (juste affichage sans passer par un widget spécifique, il faudra que je code spécifiquement un DigitalClockWidget) :
et sur la nSpire :
Merci beaucoup à Bernard.
Sly
Last edited by SlyVTT on 13 Nov 2021, 09:45, edited 2 times in total.
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
Re: GUI Toolkit NF (under development)
Bien joué, ca avance bien !
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...)My calculator programs
Mes programmes pour calculatrices
-
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Posts: 14744
- Images: 1119
- Joined: 01 Jun 2007, 00:00
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- Twitter: adriweb
- GitHub: adriweb
Re: GUI Toolkit NF (under development)
Hello,
Pour ceux qui se poseraient la question, le développement du GUI Toolkit NF n'est pas stoppé, il a juste été mis quelques temps en pause, par excès de flemme (un peu ), par manque de temps (pas mal ) et par manque d'idée face à un gros problème de crash (vraiment beaucoup ).
Après ces quelques semaines à laisser décanter et à programmer Magic Light, je me remets désormais dans le dur du Toolkit. Retour au C++ pur et dur pour implémenter un GarbageCollector lié à la classe WidgetApplication dont le rôle sera de faire le ménage lors de la suppression dynamique de Widget, mais aussi en fin d'application pour rendre la main proprement au système.
Autant dire que quelques soirée prises de chou sur les bugs sont déjà prévues dans les semaines à venir
Je vous en dis un peu plus dans les jours qui viennent.
Ciao
Sly
Pour ceux qui se poseraient la question, le développement du GUI Toolkit NF n'est pas stoppé, il a juste été mis quelques temps en pause, par excès de flemme (un peu ), par manque de temps (pas mal ) et par manque d'idée face à un gros problème de crash (vraiment beaucoup ).
Après ces quelques semaines à laisser décanter et à programmer Magic Light, je me remets désormais dans le dur du Toolkit. Retour au C++ pur et dur pour implémenter un GarbageCollector lié à la classe WidgetApplication dont le rôle sera de faire le ménage lors de la suppression dynamique de Widget, mais aussi en fin d'application pour rendre la main proprement au système.
Autant dire que quelques soirée prises de chou sur les bugs sont déjà prévues dans les semaines à venir
Je vous en dis un peu plus dans les jours qui viennent.
Ciao
Sly
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
Re: GUI Toolkit NF (under development)
Hello,
voici un petit point d'avancement du GUI Toolkit NF dans son état courant sous forme d'une courte vidéo.
La démo tourne sur PC, ce qui facilite l'enregistrement, mais est tout aussi fonctionnelle sur nSpire, passer d'une architecture à l'autre se faisant juste via une recompilation avec le Makefile ad-hoc.
Sans plus attendre voici la démo :
Vous pouvez y voir illustrées quelques fonctionnalités :
- menus, barres d'icones
- multi-fenêtrage avec agrandissement/restauration/minimisation de la taille de fenêtre,
- "graphical context" avec affichage d'une image (logo du projet) et une autre avec traçage d'un cercle (par exemple pour créer un logiciel de dessin/CAO)
- Rich Text Multiline pour par exemple créer un traitement de text ou un IDE de programmation
Encore quelques bugs à tracker/corriger, mais déjà une base solide.
More to come soon
Ciao
Sly
voici un petit point d'avancement du GUI Toolkit NF dans son état courant sous forme d'une courte vidéo.
La démo tourne sur PC, ce qui facilite l'enregistrement, mais est tout aussi fonctionnelle sur nSpire, passer d'une architecture à l'autre se faisant juste via une recompilation avec le Makefile ad-hoc.
Sans plus attendre voici la démo :
Vous pouvez y voir illustrées quelques fonctionnalités :
- menus, barres d'icones
- multi-fenêtrage avec agrandissement/restauration/minimisation de la taille de fenêtre,
- "graphical context" avec affichage d'une image (logo du projet) et une autre avec traçage d'un cercle (par exemple pour créer un logiciel de dessin/CAO)
- Rich Text Multiline pour par exemple créer un traitement de text ou un IDE de programmation
Encore quelques bugs à tracker/corriger, mais déjà une base solide.
More to come soon
Ciao
Sly
Some works in progress :
The GUI Toolkit NF for nSpire | MyShmup for fxCG-50 | Magic Light for Casio Graph 90+E and Magic Light for nSpire CX/CX-II | Simple Text Editor for nSpire | OutRun for Casio Graph 90+E |
And more to come ... stay tuned
-
SlyVTTPremium
Niveau 12: CP (Calculatrice sur Pattes)- Posts: 523
- Images: 31
- Joined: 19 Jan 2021, 09:41
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- GitHub: SlyVTT
16 posts
• Page 1 of 2 • 1, 2
Return to Native: Ndless, Linux, ...
Who is online
Users browsing this forum: ClaudeBot [spider] and 2 guests