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 » Developing U++ » UppHub » Knob control
Re: Knob control [message #27963 is a reply to message #27959] Thu, 12 August 2010 10:11 Go to previous messageGo to previous message
jerson is currently offline  jerson
Messages: 202
Registered: June 2010
Location: Bombay, India
Experienced Member

koldo wrote on Thu, 12 August 2010 11:43


Two questions:
- How would you call the marks between major marks?
- How would you call the mark locking knob behavior?

I am thinking more in terms of the slider code I just modified. In that code, the ticks are marked for every minorticks and thick one for every majorticks. The increment is by minorticks.

The knob locks on to minortick increments. Majorticks is just a special case of minorticks as I see it.

This is the relevant part of that code
	// draw gradations	
	for( 	int i = Min(); 
			( m_nMajorTicks > 0 ) && ( i <= Max() ) ;
			i += ( m_nMinorTicks == 0 ? m_nMajorTicks : m_nMinorTicks ) ) {
		
		int nPos = SliderToClient( i );
		
		if( ( m_nMajorTicks != 0 ) && ( i % m_nMajorTicks ) == 0 )
			DrawTick( w, MAJOR, (HOVE)HoVe( HORZ, VERT ), nPos, i );
		else if( ( m_nMinorTicks != 0 ) && ( i % m_nMinorTicks ) == 0 )
			DrawTick( w, MINOR, (HOVE)HoVe( HORZ, VERT ), nPos, i );
	}


Regards
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Single Threaded RS232
Next Topic: Docking - Saved Layout - Main window size?
Goto Forum:
  


Current Time: Fri May 10 15:13:05 CEST 2024

Total time taken to generate the page: 0.03267 seconds