Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

3 Pages123>
Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 30 September 2013 17:46:40(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
Hi all,

Here there is a plugin to add labels customizable by canvas inputs.

Plugin languages: English Italiano

  • extension's page: http://smath.info/view/CFLabel
  • requirements: SMath Studio 0.96.5146 Nigthly build or later, .Net Framework 2.0;
  • installation: SMath Studio: Tools > Plugins... > Online Gallery;
  • documentation: download and unzip the attached archive;
  • sources: the updated sources are available in the SVN repository;
  • languages: if you want to have a new UI language look into the documentation's Language folder


>>> PLEASE REPORT IN THIS THREAD ANY ISSUE, MORE DETAILED AS POSSIBLE <<<

Edited by user 18 August 2016 03:04:33(UTC)  | Reason: fixed flags links

File Attachment(s):
CFLabelRegion_docs.7z (84kb) downloaded 145 time(s).
Davide Carpi attached the following image(s):
2013-10-26 00_47_46-SMath Studio Desktop - [Page1.sm].png
2014-02-03 00_53_18-SMath Studio Desktop - [CFLabelRegion.sm_].png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 7 users thanked Davide Carpi for this useful post.
on 30/09/2013(UTC),  on 30/09/2013(UTC),  on 30/09/2013(UTC),  on 30/09/2013(UTC),  on 01/10/2013(UTC),  on 26/10/2013(UTC),  on 16/12/2015(UTC)
Offline omorr  
#2 Posted : 30 September 2013 18:28:24(UTC)
omorr


Rank: Administration

Groups: Registered, Administrators, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,553
Man
Serbia

Was thanked: 251 time(s) in 217 post(s)
This is nice Davide, thank you Good

By the way, we can suppress viewing the if statement (only the formated label) by right click and unchecking "Display input data"

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#3 Posted : 30 September 2013 19:30:11(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
You're right Radovan, and you can also nest many if/else to have multiple outputs Good
Davide Carpi attached the following image(s):
2013-09-30 18_36_36-SMath Studio Desktop - [Page1_].png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline PompelmoTell  
#4 Posted : 30 September 2013 20:28:28(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 71
Location: italy

Was thanked: 25 time(s) in 20 post(s)
thanks Davide,
but I can't resize the label despite the presence of grip
sergio

Win64
Portable Version Smath 0.96 (build 4909)
Offline mkraska  
#5 Posted : 30 September 2013 21:12:09(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,102
Germany

Was thanked: 548 time(s) in 373 post(s)
Originally Posted by: PompelmoTell Go to Quoted Post
thanks Davide,
but I can't resize the label despite the presence of grip
sergio

Win64
Portable Version Smath 0.96 (build 4909)

The size is exclusively driven by the contents (string length). Might be a good idea to hide the grips.

Please find attached a brick for bar charts. Please note that I was forced to fill the right of the bar by visible symbols as spaces obviously are disregarded for computing the region size.
File Attachment(s):
Example cfregion barchart.sm (5kb) downloaded 66 time(s).
mkraska attached the following image(s):
bar.PNG
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 30/09/2013(UTC)
Offline Davide Carpi  
#6 Posted : 30 September 2013 21:39:22(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
Originally Posted by: mkraska Go to Quoted Post
The size is exclusively driven by the contents (string length).
Correct, this is by design - like for hyperlink regions Good

Originally Posted by: mkraska Go to Quoted Post
Might be a good idea to hide the grips.

I know, but is not yet possible; Andrey know this issue, the behavior will change in future

Originally Posted by: mkraska Go to Quoted Post
Please note that I was forced to fill the right of the bar by visible symbols as spaces obviously are disregarded for computing the region size.

I can force the plugin to measure also the trailing spaces, if could be useful, just let me know it Good


best regards,

Davide
Davide Carpi attached the following image(s):
2013-09-30 20_38_18-SMath Studio Desktop - [Example cfregion barchart.sm].png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 30/09/2013(UTC)
Offline Davide Carpi  
#7 Posted : 30 September 2013 22:04:25(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
I can force the plugin to measure also the trailing spaces, if could be useful, just let me know it Good


Done, updated
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 30/09/2013(UTC)
Offline mkraska  
#8 Posted : 30 September 2013 22:38:42(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,102
Germany

Was thanked: 548 time(s) in 373 post(s)
Now the complete bar chart.
File Attachment(s):
Example cfregion barchart.sm (28kb) downloaded 53 time(s).
mkraska attached the following image(s):
bar.PNG
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 01/10/2013(UTC),  on 01/10/2013(UTC)
Offline Davide Carpi  
#9 Posted : 01 October 2013 17:08:16(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
UPDATED

- works in Smath Viewer;
- default background color (empty string): white;
- default foreground color (empty string): black.

Edited by user 01 October 2013 18:03:35(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 02/10/2013(UTC)
Offline mkraska  
#10 Posted : 02 October 2013 11:22:38(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,102
Germany

Was thanked: 548 time(s) in 373 post(s)
Thanks for the update.

As you see, the region can display multiline text, thus it would be possible to do stuff like the bar chart in a single region, if there was access to the newline character from the GUI.

I'd propose to accept a single string as argument, now as there are defaults for the colors.
I also propose to left align the text (or to provide optional control)
mkraska attached the following image(s):
cfr.PNG
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Offline Davide Carpi  
#11 Posted : 02 October 2013 11:43:53(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
Hi Martin,

I see, I'll think about to add more controls... as general idea this region is thinked to be used as a label (a short text) with variable appearance depending on the script events; the table region will be the better solution to have a more customizable (fixed) appearance. Good

BTW your last example puts me in mind that would be more handy and useful to use the built-in Output window to easily access these infos without calling dedicated functions or looking for log files.

Edited by user 02 October 2013 11:48:56(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline mkraska  
#12 Posted : 02 October 2013 13:05:31(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,102
Germany

Was thanked: 548 time(s) in 373 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
as general idea this region is thinked to be used as a label (a short text) with variable appearance depending on the script events; the table region will be the better solution to have a more customizable (fixed) appearance. Good

Off-spec use of features is part of the fun, isn't it?
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post

BTW your last example puts me in mind that would be more handy and useful to use the built-in Output window to easily access these infos without calling dedicated functions or looking for log files.

I suppose your proposal impies that the output window can be fed directly from inside plugins. How would I trigger this from outside? How do I identify the output of a particular math region in the midst of a SMath sheet? I can't stop the re-calculation of a sheet at a particular expression, can I?

The maxima plugin has a two-level log inspection feature:
  1. MaximaLog("all" ) displays the entire Maxima session from the Maxima perspective without translation detail)
  2. MaximaLog(#) displays the detail of the previous Maxima call including maxima command, maxima response and back-translation.
By positioning the MaximaLog(#) at the right place you can clearly tell what Maxima did in the last interaction, regardless if the call was made by a hijacked function like int(), diff(), sum() or lim(), a dedicated function like Solve() or LinSolve() or directly by a Maxima() command.
I found MaximaLog(#) handy to use for documenting bugs in the todo list and it is always close at hand (from the dynamic assistant) in the sheet without the need to open and close the output window.

I must admit that I don't know how to even reach this level of comfort and clearness using the output window. How would you control the output if not by dedicated commands? How would you identify where the output came from? When using trace(), I find myself adding label texts to output commands in order to match the output with the SMath context. But I may just oversee options, thus any ideas are welcome.

Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Offline Davide Carpi  
#13 Posted : 02 October 2013 13:35:07(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
Originally Posted by: mkraska Go to Quoted Post
Off-spec use of features is part of the fun, isn't it?
Not always (for the developpers) Tongue
The multiline feature is not easily accessible from the canvas, so the alignment feature would produce confusion (in some way like the resize's grips); BTW if you want a "display region" to send out a well formatted output from the Maxima plugin, you can also make something like the "Maple" region of Viacheslav Wink

Originally Posted by: mkraska Go to Quoted Post
I suppose your proposal impies that the output window can be fed directly from inside plugins. How would I trigger this from outside? How do I identify the output of a particular math region in the midst of a SMath sheet? I can't stop the re-calculation of a sheet at a particular expression, can I?

The maxima plugin has a two-level log inspection feature:
  1. MaximaLog("all" ) displays the entire Maxima session from the Maxima perspective without translation detail)
  2. MaximaLog(#) displays the detail of the previous Maxima call including maxima command, maxima response and back-translation.
By positioning the MaximaLog(#) at the right place you can clearly tell what Maxima did in the last interaction, regardless if the call was made by a hijacked function like int(), diff(), sum() or lim(), a dedicated function like Solve() or LinSolve() or directly by a Maxima() command.
I found MaximaLog(#) handy to use for documenting bugs in the todo list and it is always close at hand (from the dynamic assistant) in the sheet without the need to open and close the output window.

I must admit that I don't know how to even reach this level of comfort and clearness using the output window. How would you control the output if not by dedicated commands? How would you identify where the output came from? When using trace(), I find myself adding label texts to output commands in order to match the output with the SMath context. But I may just oversee options, thus any ideas are welcome.

Sincerely I don't know, I've threw a stone into the pond Good
Maybe a special context menu item could be added or a log function with canvas free result that enable the output window output, or something else Good

BTW looking back my previous post Log files are useful for crashes (deep debugging -> plugin's developpers)

Edited by user 02 October 2013 15:26:55(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline Davide Carpi  
#14 Posted : 04 October 2013 22:16:41(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
UPDATED

- Fixed regional settings issues with Font sizes (comma decimal separator related*)


* Martin's activebook svn file updated
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 04/10/2013(UTC)
Offline mkraska  
#15 Posted : 04 October 2013 22:35:37(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,102
Germany

Was thanked: 548 time(s) in 373 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
Martin's activebook svn file updated

Great, thanks. I also updated the barchart example.
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
Offline Davide Carpi  
#16 Posted : 25 October 2013 18:39:06(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
UPDATED

- small fixes
- added styles (optional 4th argument)
Davide Carpi attached the following image(s):
2013-10-25 17_33_09-SMath Studio Desktop - [Page1.sm].png
2013-10-25 19_47_40-SMath Viewer.png
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 26/10/2013(UTC)
Offline Davide Carpi  
#17 Posted : 03 February 2014 02:56:29(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
UPDATED

- SMath Studio 0.96.5146 required


best regards,

Davide
Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 2 users thanked Davide Carpi for this useful post.
on 03/02/2014(UTC),  on 03/02/2014(UTC)
Offline kaaden  
#18 Posted : 05 February 2014 11:22:07(UTC)
kaaden


Rank: Member

Groups: Registered
Joined: 21/11/2012(UTC)
Posts: 13
Spain

Hello !

Where can I download the Formatting Label for 4909 versión?

with new version I can´t open old snippets

Offline Davide Carpi  
#19 Posted : 05 February 2014 11:46:51(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,557
Man
Italy
Location: Italy

Was thanked: 831 time(s) in 551 post(s)
Originally Posted by: kaaden Go to Quoted Post
Hello !

Where can I download the Formatting Label for 4909 versión


You can use the portable version provided by mkraska (here) directly or copying the plugin from that distribution to your %APPDATA% folder

Edited by user 05 February 2014 11:55:11(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
Offline kaaden  
#20 Posted : 05 February 2014 12:18:01(UTC)
kaaden


Rank: Member

Groups: Registered
Joined: 21/11/2012(UTC)
Posts: 13
Spain

thanks

I download from here

http://smath.info/wiki/SMath%20with%20Plugins.ashx

Edited by user 05 February 2014 12:20:13(UTC)  | Reason: Not specified

Users browsing this topic
3 Pages123>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.