Added most of the Windows implementation of ProgressBar. Now to grab the comctl32.dll stuff.
This commit is contained in:
parent
d8c0df7993
commit
668de3bccb
|
@ -53,6 +53,10 @@ var stdDlgSizes = [nctypes]dlgunits{
|
||||||
// height is not clearly defined here ("an integral number of items (3 items minimum)") so just use a three-line edit control
|
// height is not clearly defined here ("an integral number of items (3 items minimum)") so just use a three-line edit control
|
||||||
height: 14 + 10 + 10,
|
height: 14 + 10 + 10,
|
||||||
},
|
},
|
||||||
|
c_progressbar: dlgunits{
|
||||||
|
width: 237, // the first reference says 107 also works; TODO decide which to use
|
||||||
|
height: 8,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -92,6 +92,11 @@ var classTypes = [nctypes]*classData{
|
||||||
selectedIndexErr: _LB_ERR,
|
selectedIndexErr: _LB_ERR,
|
||||||
addSpaceErr: _LB_ERRSPACE,
|
addSpaceErr: _LB_ERRSPACE,
|
||||||
},
|
},
|
||||||
|
c_progressbar: &classData{
|
||||||
|
name: XXXXX,
|
||||||
|
style: _PBS_SMOOTH | controlstyle,
|
||||||
|
xstyle: 0 | controlxstyle,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *sysData) addChild(child *sysData) _HMENU {
|
func (s *sysData) addChild(child *sysData) _HMENU {
|
||||||
|
@ -501,3 +506,19 @@ func (s *sysData) delete(index int) (err error) {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *sysData) setProgress(percent int) {
|
||||||
|
ret := make(chan uiret)
|
||||||
|
defer close(ret)
|
||||||
|
uitask <- &uimsg{
|
||||||
|
call: _sendMessage,
|
||||||
|
p: []uintptr{
|
||||||
|
uintptr(s.hwnd),
|
||||||
|
uintptr(_PBM_SETPOS),
|
||||||
|
uintptr(_WPARAM(percent)),
|
||||||
|
uintptr(0),
|
||||||
|
},
|
||||||
|
ret: ret,
|
||||||
|
}
|
||||||
|
<-ret
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue