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++ Library support » Slider&ProgressIndicator » Slider with thermometer like scale
Re: Slider with thermometer like scale [message #32398 is a reply to message #32383] Mon, 16 May 2011 08:34 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hello, koldo,

koldo wrote on Sat, 14 May 2011 21:32

Hello

About the return *this;, it has been reported that gcc options in TheIDE could check more warnings like this Sad. It is very simple to add it to TheIDE

And it has never been done ? Shocked This kind of warning is very important... I lost a lot of time with that, as I was not looking there, being sure that I should have get a warning...

koldo wrote on Sat, 14 May 2011 21:32

About the FillColor, I change it in layout designer without problems...

That's weird... With 3412 under Ubuntu 10.04, I can't get it working... Well, I'll verify the return statements Laughing

koldo wrote on Sat, 14 May 2011 21:32

About the hanging in MinGW, do you mean that in Linux it works now well? It is very strange.

Mmm... What I mean is that I didn't try with Mingw, as I work under Linux and cannot test windows exes. Under Linux with Gcc, it's working well.

If I can, I'll try on a windows computer, or with wine...
Re: Slider with thermometer like scale [message #32596 is a reply to message #27646] Thu, 26 May 2011 19:06 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Here is a new version of SliderCtrlX, with :

- Koldo's and other minor corrections,
- Focused Thumb images
- split line drawing the thumb (as avpavp didn't say anything... who is silent consents Wink )

I created also a new control, named StarIndicator, to have stars for votes. See code (and code header Wink ) for details.

BTW : I wanted to have a hand cursor when it goes on the thumb. How can I do that ?
Re: Slider with thermometer like scale [message #32600 is a reply to message #32596] Thu, 26 May 2011 22:41 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello Jibe

It works well in XP. Just do this change or similar to avoid MSVC complains:
void StarIndicator::Layout() {
...
	int y = int(ceil(double(x/5)));


Best regards
Iñaki
Re: Slider with thermometer like scale [message #32607 is a reply to message #32600] Fri, 27 May 2011 15:26 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

koldo wrote on Thu, 26 May 2011 22:41

Just do this change or similar to avoid MSVC complains

Done.

Koldo, if you want to put it in Controls4U, no problem for me. More : I think that it could be good to have all enhanced controls in one library. About other authors :
- I used indirectly avpavp's code, as I took your version of SliderCtrlX
- I took many ideas from jeson's version, but no code,
- No other authors for StarIndicator, but I picked some parts of code from ProgressIndicator in CtrlLib.

jibe wrote on Thu, 26 May 2011 19:06

BTW : I wanted to have a hand cursor when it goes on the thumb. How can I do that ?

If somebody has an idea... I can't find a simple way to do that...

[Updated on: Fri, 27 May 2011 15:45]

Report message to a moderator

Re: Slider with thermometer like scale [message #32610 is a reply to message #32607] Fri, 27 May 2011 16:23 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello Jibe

A detail to check:

index.php?t=getfile&id=3266&private=0

  • Attachment: dib.PNG
    (Size: 29.83KB, Downloaded 574 times)


Best regards
Iñaki
Re: Slider with thermometer like scale [message #32616 is a reply to message #27646] Sat, 28 May 2011 11:42 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Yes, I know that... I'll add this in the 2do list in the header :
/***********************************************************************************************
 * SliderCtrlX
 *
 * Enhanced Slider Control / Slider indicator
 *
 * Autors : avpavp, jerson, jibe, koldo
 * Last modified : May 28, 2011
 *
 * 2do : adjust DrawTicks() in every position
 *		Thumbs are not always at the right position at Min and Max values (we should have a half
 *      thumb).
 *		adjust default values when changing CONTROL/INDICATOR
 * Known bugs : Invalid memory access when choosing FillColor with .lay designer (seems to be
 *      only with ubuntu. See http://www.ultimatepp.org/forum/index.php?t=msg&th=6022&start=0&
 **********************************************************************************************/


There is also a bad position of the scale (ticks), it was already in the 2do list. I never had time to see that : seems to be not so easy to find how to adjust all that... I'll try to take time for that, but if somebody has some idea...
Re: Slider with thermometer like scale [message #32758 is a reply to message #27646] Mon, 06 June 2011 18:08 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Here is a new version correcting the thumb and ticks positions.

Re: Slider with thermometer like scale [message #32774 is a reply to message #32758] Tue, 07 June 2011 16:47 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello Jibe

Sorry for being too picky, but see the thumb at the begin and the end:

index.php?t=getfile&id=3287&private=0

It could be great if the control would check the thumb size to make it always visible
  • Attachment: dib.PNG
    (Size: 2.57KB, Downloaded 759 times)


Best regards
Iñaki
Re: Slider with thermometer like scale [message #32786 is a reply to message #27646] Thu, 09 June 2011 11:39 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Better this way...
Re: Slider with thermometer like scale [message #32790 is a reply to message #32786] Thu, 09 June 2011 12:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Almost perfect Wink

The thumb in the beginning touches the end of the control, but at the end there is a little gap between it and the end of the control.

Anyway, if you want it can be included in Controls4U, changing a little bit the authors list of course Very Happy.



Best regards
Iñaki
Re: Slider with thermometer like scale [message #32798 is a reply to message #32790] Fri, 10 June 2011 08:17 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

koldo wrote on Thu, 09 June 2011 12:44

The thumb in the beginning touches the end of the control, but at the end there is a little gap between it and the end of the control.

Yes, I don't understand why... I think that I could make it more symetric, but not a clean way... So, I left it like this, waiting for a good solution...

koldo wrote on Thu, 09 June 2011 12:44

changing a little bit the authors list of course

Did I miss somebody ? If so, I'm very sorry...

BTW : I'm looking for somebody better than me in graphics designing to make better thumbs for SliderCtrlX and better stars for StarIndicator. Any help or suggestion will be appreciated Wink
Re: Slider with thermometer like scale [message #32800 is a reply to message #32798] Fri, 10 June 2011 10:11 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello Jibe

See this:

index.php?t=getfile&id=3296&private=0

It happens the same to the horizontal ones.

About this:
Quote:

changing a little bit the authors list of course

I meant changing Controls4U authors list Smile.
  • Attachment: dib.png
    (Size: 2.62KB, Downloaded 759 times)


Best regards
Iñaki
Re: Slider with thermometer like scale [message #32802 is a reply to message #32800] Fri, 10 June 2011 15:27 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi, koldo,

koldo wrote on Fri, 10 June 2011 10:11

See this:

index.php?t=getfile&id=3296&private=0

It happens the same to the horizontal ones.

Excuse me, I'm not sure to understand what you mean... Is it about this ?
koldo wrote on Thu, 09 June 2011 12:44

The thumb in the beginning touches the end of the control, but at the end there is a little gap between it and the end of the control.

I know that there is this little gap, but don't know why and don't know how to avoid it in a clean way... I think that I could do so that there is a symetric gap, but not a clean way : this is the reason why I didn't do anything about it...

If you were showing me another problem, please explain as I don't see...

-----------

Here is a new version, with enhancements on StarIndicator :
- More readable text
- Possibility to show value/votes permanently
- Possibility to show or not the total (ie : 3.6/5 or only 3.6)
- Possibility to show the percent or the value/5 (ie : 2.5 or 50%)

[Updated on: Mon, 13 June 2011 21:23]

Report message to a moderator

Re: Slider with thermometer like scale [message #33528 is a reply to message #32802] Sun, 21 August 2011 01:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello all

Now SliderCtrlX Bazaar package has been removed as now is included in Controls_4U.

In addition JBControls have been included in Controls4U.


Best regards
Iñaki
Re: Slider with thermometer like scale [message #34548 is a reply to message #27646] Mon, 28 November 2011 16:35 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Sorry to be so late to reply... busy on other things...

Thanks to have put my controls in Controls4u Smile

... but you didn't take the last version of StarIndicator ! Pls, could you take the last one I posted, just before your post ? It has some interesting enhancements Cool (see my post upper)


Could somebody advice me about how I could obtain more beautiful stars ? Depending on the dimensions, they are very ugly Crying or Very Sad

[Updated on: Mon, 28 November 2011 16:38]

Report message to a moderator

Re: Slider with thermometer like scale [message #34551 is a reply to message #34548] Mon, 28 November 2011 16:56 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello Jibe

Welcome home Smile.

Is the version you say in "JBControls110613.zip"?

About the stars, the best way to paint something resizable in U++ is using Painter.


Best regards
Iñaki
Re: Slider with thermometer like scale [message #34552 is a reply to message #27646] Mon, 28 November 2011 18:17 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
koldo wrote on Mon, 28 November 2011 16:56

Is the version you say in "JBControls110613.zip"?

Yes, but I changed a little thing to a better display of the text, and made my stars bigger. Takes some more space, but it's a lot better.

=> here is a new version of StarIndicator.

koldo wrote on Mon, 28 November 2011 16:56

About the stars, the best way to paint something resizable in U++ is using Painter.

Uh ? Of which Painter are you talking about (and which OS Razz ) ?

Or do you mean your PainterSvg package in the bazaar ?

Don't know how to use some svg or vectorial drawing in a layer ? With your PainterSvg ? I'll see that...
Re: Slider with thermometer like scale [message #34553 is a reply to message #34552] Mon, 28 November 2011 20:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello Jibe

Painter is the way in U++ to do antialiasing graphics.

It is compatible with Draw but it adds much more features.

There are many samples in PainterExamples package.

Anyway I can try to help you to translate the stars into Painter.


Best regards
Iñaki
Re: Slider with thermometer like scale [message #34558 is a reply to message #34553] Tue, 29 November 2011 09:07 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3235
Registered: August 2008
Senior Veteran
Hello Jibe

I have tried new StarIndicator version and it works well for me.

It is rather easy to translate the Paint function to Painter. If you want I can do a simple version for you to extend it when you learn more.

One comment about comments Smile. For example

StarIndicator&	StarIndicator::SetVotes(int n)
/***********************************************************************************************
 * Sets the number of votes and the associated color
 * virtual - public
 **********************************************************************************************/
{ 
	m_nVotes=n;
	if (n<0) SetColor(LtCyan);
	else if (n < m_nVotesLow) SetColor(Color(255,128,128));
	else if (n < m_nVotesHigh) SetColor(Yellow);
	else SetColor(LtGreen);
	Refresh();
	return *this;
}


If I were you I would move all the comments like this to a .tpp help file. This way they will be accessible to help system and they will appear in web Smile.


Best regards
Iñaki

[Updated on: Tue, 29 November 2011 09:08]

Report message to a moderator

Re: Slider with thermometer like scale [message #34560 is a reply to message #27646] Tue, 29 November 2011 10:58 Go to previous messageGo to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi, koldo,

Don't know what to do about that... I will first have to know what is painter exactly and how to use it (Some "getting starting doc would be usefull ! Is there some doc that you could advice to me ?).

For now, in the last version I sent yesterday, it seems not so bad. I'm using iml images. If Painter cannot use iml images, I'm afraid that it will be a lot of changes. Are we sure that the result will be really better ?

Another thing : I tried yesterday to compile your PaiterSvgDemo, but I got an error (with 4205) in line 506 of ParseSvg.cpp. Seems not serious (conversion requested), but as I have not so much time for now, I didn't check why there is this error. I'm afraid that it hides another one...


EDIT : Pls see next post...

[Updated on: Tue, 29 November 2011 11:24]

Report message to a moderator

Previous Topic: ProgressIndicater: Get / SetData missing?
Next Topic: ProgressIndicator::Set for large value of total
Goto Forum:
  


Current Time: Mon Nov 30 11:37:39 CET 2020

Total time taken to generate the page: 0.02138 seconds