comparison mac/dw.m @ 1190:76262040ed5f

Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to show a rotating or otherwise indeterminate percent bar on supported platforms. Platforms which don't support it will either show no progress or potentially growing and contracting progress in the future if that doesn't look too weird. Committed from Windows so may be fixes coming for the other platforms soon.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 28 Sep 2011 08:22:48 +0000
parents 408ea33b19cf
children 698875cfe8e5
comparison
equal deleted inserted replaced
1189:c5419ef79a77 1190:76262040ed5f
3738 * position: Position of the percent bar withing the range. 3738 * position: Position of the percent bar withing the range.
3739 */ 3739 */
3740 void API dw_percent_set_pos(HWND handle, unsigned int position) 3740 void API dw_percent_set_pos(HWND handle, unsigned int position)
3741 { 3741 {
3742 DWPercent *percent = handle; 3742 DWPercent *percent = handle;
3743 [percent setDoubleValue:(double)position]; 3743
3744 /* Handle indeterminate */
3745 if(position == DW_PERCENT_INDETERMINATE)
3746 [percent setIndeterminate:YES];
3747 else
3748 {
3749 /* Handle normal */
3750 if([percent isIndeterminate])
3751 [percent setIndeterminate:NO];
3752 [percent setDoubleValue:(double)position];
3753 }
3744 } 3754 }
3745 3755
3746 /* 3756 /*
3747 * Create a new checkbox window (widget) to be packed. 3757 * Create a new checkbox window (widget) to be packed.
3748 * Parameters: 3758 * Parameters: