mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
SomE WHITESPACE
This commit is contained in:
parent
bbaa7554cd
commit
69db656239
3 changed files with 175 additions and 182 deletions
|
@ -104,7 +104,7 @@ double getCairoTextWith(cairo_t * cr, const char * str)
|
||||||
return ex.width;
|
return ex.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
void trimToFit(cairo_t * cr, std::string * str, double maxWidth)
|
void trimStringToFit(cairo_t * cr, std::string * str, double maxWidth)
|
||||||
{
|
{
|
||||||
double ellWidth = getCairoTextWith(cr, "…");
|
double ellWidth = getCairoTextWith(cr, "…");
|
||||||
double textWidth = getCairoTextWith(cr, str->c_str());
|
double textWidth = getCairoTextWith(cr, str->c_str());
|
||||||
|
@ -253,7 +253,7 @@ void ClipSelector::draw()
|
||||||
cairo_set_font_size( cr, 11 );
|
cairo_set_font_size( cr, 11 );
|
||||||
|
|
||||||
std::string tmp = clips[i].getName();
|
std::string tmp = clips[i].getName();
|
||||||
trimToFit(cr, &tmp, clipWidth - (clipHeight + 15 + beatLen));
|
trimStringToFit(cr, &tmp, clipWidth - (clipHeight + 15 + beatLen));
|
||||||
cairo_show_text( cr, tmp.c_str() );
|
cairo_show_text( cr, tmp.c_str() );
|
||||||
|
|
||||||
// special indicator
|
// special indicator
|
||||||
|
@ -316,16 +316,6 @@ void setLengthCb(Fl_Widget *w, void* data)
|
||||||
writeToDspRingbuffer( &e );
|
writeToDspRingbuffer( &e );
|
||||||
}
|
}
|
||||||
|
|
||||||
int ClipSelector::findClipNum() {
|
|
||||||
// calculate the clicked clip number
|
|
||||||
int clipHeight = (h / numClips);
|
|
||||||
clipNum = ( (Fl::event_y() ) - y ) / clipHeight;
|
|
||||||
if (clipNum >= numClips)
|
|
||||||
clipNum = numClips -1; // fix for clicking the lowest pixel
|
|
||||||
|
|
||||||
return clipNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ClipSelector::getLastClipNum()
|
int ClipSelector::getLastClipNum()
|
||||||
{
|
{
|
||||||
return clipNum;
|
return clipNum;
|
||||||
|
@ -342,7 +332,13 @@ int ClipSelector::handle(int event)
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
highlight = 1;
|
highlight = 1;
|
||||||
{
|
{
|
||||||
findClipNum();
|
// calculate the clicked clip number
|
||||||
|
int clipHeight = (h / numClips);
|
||||||
|
clipNum = ( (Fl::event_y() ) - y ) / clipHeight;
|
||||||
|
if (clipNum >= numClips)
|
||||||
|
clipNum = numClips -1; // fix for clicking the lowest pixel
|
||||||
|
|
||||||
|
return clipNum;
|
||||||
|
|
||||||
// handle right clicks: popup menu
|
// handle right clicks: popup menu
|
||||||
if ( Fl::event_state(FL_BUTTON3) ) {
|
if ( Fl::event_state(FL_BUTTON3) ) {
|
||||||
|
|
|
@ -129,13 +129,11 @@ public:
|
||||||
int handle(int event);
|
int handle(int event);
|
||||||
|
|
||||||
void resize(int X, int Y, int W, int H);
|
void resize(int X, int Y, int W, int H);
|
||||||
int findClipNum();
|
|
||||||
int getLastClipNum();
|
int getLastClipNum();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int clipNum;
|
int clipNum;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Avtk
|
} // Avtk
|
||||||
|
|
||||||
#endif // AVTK_CLIP_SELECTOR_H
|
#endif // AVTK_CLIP_SELECTOR_H
|
||||||
|
|
|
@ -203,7 +203,6 @@ void Looper::pitchShift(int count, float* input, float* output)
|
||||||
&65535]))) + (fTemp3 * (((fRec0[0] - iTemp1) * fVec0[(IOTA-int((int(
|
&65535]))) + (fTemp3 * (((fRec0[0] - iTemp1) * fVec0[(IOTA-int((int(
|
||||||
iTemp2) & 65535)))&65535]) + ((iTemp2 - fRec0[0]) * fVec0[(IOTA-int((
|
iTemp2) & 65535)))&65535]) + ((iTemp2 - fRec0[0]) * fVec0[(IOTA-int((
|
||||||
iTemp1 & 65535)))&65535]))));
|
iTemp1 & 65535)))&65535]))));
|
||||||
|
|
||||||
output[0]=out;
|
output[0]=out;
|
||||||
fRec0[1] = fRec0[0];
|
fRec0[1] = fRec0[0];
|
||||||
IOTA = IOTA+1;
|
IOTA = IOTA+1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue